summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-16 14:13:36 +0200
committerNoel Grandin <noel@peralex.com>2013-05-21 08:23:58 +0200
commit6c61b20a8d4a6dcac28801cde82a211fb7e30654 (patch)
treed82328eaa120b8bc822f028fa1e62bc7814c9e1b /toolkit
parent6c53dff36ebdac7b6a6cf514ab469b2202d6aa48 (diff)
fdo#46808, Convert awt::UnoControlDialogModel to new style
Change-Id: I4b912034ef3f4855b87d6d6f18ff13bd1ecc8f72
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx62
1 files changed, 60 insertions, 2 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 096d07c0d848..bd3ce4c09771 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -146,7 +146,7 @@ OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::c
// class UnoControlDialogModel
// ----------------------------------------------------
UnoControlDialogModel::UnoControlDialogModel( const Reference< XComponentContext >& rxContext )
- :ControlModelContainerBase( rxContext )
+ :UnoControlDialogModel_Base( rxContext )
{
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
// ImplRegisterProperty( BASEPROPERTY_BORDER );
@@ -180,7 +180,7 @@ UnoControlDialogModel::UnoControlDialogModel( const Reference< XComponentContext
}
UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rModel )
- : ControlModelContainerBase( rModel )
+ : UnoControlDialogModel_Base( rModel )
{
// need to clone BASEPROPERTY_USERFORMCONTAINEES too
Reference< XNameContainer > xSrcNameCont( const_cast< UnoControlDialogModel& >(rModel).getPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ) ), UNO_QUERY );
@@ -274,6 +274,64 @@ void SAL_CALL UnoControlDialogModel::setFastPropertyValue_NoBroadcast( sal_Int32
OSL_ENSURE( sal_False, "UnoControlDialogModel::setFastPropertyValue_NoBroadcast: caught an exception while setting ImageURL properties!" );
}
}
+
+OUString UnoControlDialogModel::getPropertyString(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue(aPropertyName);
+ OUString b;
+ any >>= b;
+ return b;
+}
+
+sal_Bool UnoControlDialogModel::getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue(aPropertyName);
+ sal_Bool b = sal_False;
+ any >>= b;
+ return b;
+}
+
+sal_Int16 UnoControlDialogModel::getPropertyInt16(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue(aPropertyName);
+ sal_Int16 b = 0;
+ any >>= b;
+ return b;
+}
+
+sal_Int32 UnoControlDialogModel::getPropertyInt32(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue(aPropertyName);
+ sal_Int32 b = 0;
+ any >>= b;
+ return b;
+}
+
+Reference<css::resource::XStringResourceManager> UnoControlDialogModel::getResourceResolver() throw(css::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue("ResourceResolver");
+ Reference<css::resource::XStringResourceManager> b;
+ any >>= b;
+ return b;
+}
+
+css::awt::FontDescriptor UnoControlDialogModel::getFontDescriptor() throw(css::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue("FontDescriptor");
+ awt::FontDescriptor b;
+ any >>= b;
+ return b;
+}
+
+Reference<css::graphic::XGraphic> SAL_CALL UnoControlDialogModel::getGraphic() throw(::com::sun::star::uno::RuntimeException)
+{
+ uno::Any any = getPropertyValue("Graphic");
+ Reference<css::graphic::XGraphic> b;
+ any >>= b;
+ return b;
+}
+
+
// ============================================================================
// = class UnoDialogControl
// ============================================================================