diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-23 17:28:44 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-23 23:39:13 +0100 |
commit | dec6d3e93503d805c74adc04b07758a8a44d74a6 (patch) | |
tree | f4cad18473fa3aab4cc341a5f9a90dea9b0d0af1 /toolkit/source/controls | |
parent | 6dbff3aae9cb727fab74a3b2d8ebf7cb136ce215 (diff) |
tk: Constructor feature for OGeometryControlModel<UnoControlDialogModel>.
Change-Id: I9afc83610ccc06ea090a10588fb8240159715197
Diffstat (limited to 'toolkit/source/controls')
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 8f32532dcea9..491ec62592f0 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -23,6 +23,7 @@ #include <vcl/wall.hxx> #include <osl/mutex.hxx> #include <toolkit/controls/dialogcontrol.hxx> +#include <toolkit/controls/geometrycontrolmodel.hxx> #include <toolkit/helper/property.hxx> #include <toolkit/helper/unopropertyarrayhelper.hxx> #include <toolkit/controls/stdtabcontroller.hxx> @@ -142,9 +143,32 @@ public: ////HELPER OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl ); -// ---------------------------------------------------- -// class UnoControlDialogModel -// ---------------------------------------------------- +namespace { + +class UnoControlDialogModel : public ControlModelContainerBase +{ +protected: + css::uno::Reference< css::graphic::XGraphicObject > mxGrfObj; + css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + // ::cppu::OPropertySetHelper + void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) throw (css::uno::Exception); +public: + UnoControlDialogModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); + UnoControlDialogModel( const UnoControlDialogModel& rModel ); + ~UnoControlDialogModel(); + + UnoControlModel* Clone() const; + // css::beans::XMultiPropertySet + css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException); + + // css::io::XPersistObject + OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException); + + // XServiceInfo + DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel, ControlModelContainerBase, "com.sun.star.awt.UnoControlDialogModel" ) +}; + UnoControlDialogModel::UnoControlDialogModel( const Reference< XComponentContext >& rxContext ) :ControlModelContainerBase( rxContext ) { @@ -214,7 +238,7 @@ UnoControlModel* UnoControlDialogModel::Clone() const OUString UnoControlDialogModel::getServiceName( ) throw(RuntimeException) { - return OUString::createFromAscii( szServiceName_UnoControlDialogModel ); + return OUString("stardiv.vcl.controlmodel.Dialog"); } Any UnoControlDialogModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const @@ -274,6 +298,9 @@ void SAL_CALL UnoControlDialogModel::setFastPropertyValue_NoBroadcast( sal_Int32 OSL_ENSURE( sal_False, "UnoControlDialogModel::setFastPropertyValue_NoBroadcast: caught an exception while setting ImageURL properties!" ); } } + +} + // ============================================================================ // = class UnoDialogControl // ============================================================================ @@ -1202,4 +1229,12 @@ uno::Reference< beans::XPropertySetInfo > UnoFrameModel::getPropertySetInfo( ) return xInfo; } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +stardiv_Toolkit_UnoControlDialogModel_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new OGeometryControlModel<UnoControlDialogModel>(context)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |