summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/unocontrols.cxx
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2010-10-13 10:55:27 +0100
committerNoel Power <noel.power@novell.com>2010-10-13 10:55:27 +0100
commit8c6ba71655f67845e11c5a7566a45118151f55c9 (patch)
treef0ad544c538f55e01dffb585994ae9afb8adcd44 /toolkit/source/controls/unocontrols.cxx
parent34ebfb2b61686999065015295dab9f623027e94d (diff)
parent48e0d844280937f54d65aca7ad4ce911bf02b5c4 (diff)
Merge branch 'vba' fix conflics, trailing ws & tab issues
Conflicts: unotools/source/config/fltrcfg.cxx
Diffstat (limited to 'toolkit/source/controls/unocontrols.cxx')
-rw-r--r--toolkit/source/controls/unocontrols.cxx77
1 files changed, 73 insertions, 4 deletions
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index fd605cff8eaa..dff0ad3c28a0 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -536,7 +536,7 @@ uno::Any GraphicControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
- uno::Reference< graphic::XGraphic > GraphicControlModel::getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL )
+ uno::Reference< graphic::XGraphic > getGraphicFromURL_nothrow( uno::Reference< graphic::XGraphicObject >& rxGrfObj, const ::rtl::OUString& _rURL )
{
uno::Reference< graphic::XGraphic > xGraphic;
@@ -546,10 +546,10 @@ uno::Any GraphicControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
rtl::OUString sID = _rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 );
// get the DefaultContext
::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
- mxGrfObj = graphic::GraphicObject::createWithId( aContext.getUNOContext(), sID );
+ rxGrfObj = graphic::GraphicObject::createWithId( aContext.getUNOContext(), sID );
}
else // linked
- mxGrfObj = NULL; // release the GraphicObject
+ rxGrfObj = NULL; // release the GraphicObject
if ( !_rURL.getLength() )
return xGraphic;
@@ -590,7 +590,7 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n
mbAdjustingGraphic = true;
::rtl::OUString sImageURL;
OSL_VERIFY( rValue >>= sImageURL );
- setPropertyValue( GetPropertyName( BASEPROPERTY_GRAPHIC ), uno::makeAny( getGraphicFromURL_nothrow( sImageURL ) ) );
+ setPropertyValue( GetPropertyName( BASEPROPERTY_GRAPHIC ), uno::makeAny( getGraphicFromURL_nothrow( mxGrfObj, sImageURL ) ) );
mbAdjustingGraphic = false;
}
break;
@@ -1728,6 +1728,75 @@ sal_Bool UnoGroupBoxControl::isTransparent() throw(uno::RuntimeException)
return sal_True;
}
+// MultiPage
+
+UnoMultiPageModel::UnoMultiPageModel()
+{
+ ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
+ ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR );
+ ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
+ ImplRegisterProperty( BASEPROPERTY_HELPURL );
+ ImplRegisterProperty( BASEPROPERTY_LABEL );
+ ImplRegisterProperty( BASEPROPERTY_PRINTABLE );
+ ImplRegisterProperty( BASEPROPERTY_PROGRESSVALUE );
+ ImplRegisterProperty( BASEPROPERTY_PROGRESSVALUE_MAX );
+}
+
+::rtl::OUString UnoMultiPageModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
+{
+ return ::rtl::OUString::createFromAscii( szServiceName_UnoMultiPageModel );
+}
+
+uno::Any UnoMultiPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+{
+ if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
+ {
+ uno::Any aAny;
+ aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoControlGroupBox );
+ //aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoMultiPageControl );
+ return aAny;
+ }
+ return UnoControlModel::ImplGetDefaultValue( nPropId );
+}
+
+::cppu::IPropertyArrayHelper& UnoMultiPageModel::getInfoHelper()
+{
+ static UnoPropertyArrayHelper* pHelper = NULL;
+ if ( !pHelper )
+ {
+ uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
+ pHelper = new UnoPropertyArrayHelper( aIDs );
+ }
+ return *pHelper;
+}
+
+// beans::XMultiPropertySet
+uno::Reference< beans::XPropertySetInfo > UnoMultiPageModel::getPropertySetInfo( ) throw(uno::RuntimeException)
+{
+ static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+}
+
+// ----------------------------------------------------
+// class MultiPageControl
+// ----------------------------------------------------
+UnoMultiPageControl::UnoMultiPageControl()
+{
+ maComponentInfos.nWidth = 100;
+ maComponentInfos.nHeight = 100;
+}
+
+::rtl::OUString UnoMultiPageControl::GetComponentServiceName()
+{
+ return ::rtl::OUString::createFromAscii( "multipage" );
+}
+
+sal_Bool UnoMultiPageControl::isTransparent() throw(uno::RuntimeException)
+{
+ return sal_True;
+}
+
// =====================================================================================================================
// = UnoControlListBoxModel_Data
// =====================================================================================================================