summaryrefslogtreecommitdiff
path: root/framework/inc/uiconfiguration
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-09-25 21:47:16 +0200
committerMathias Bauer <mba@openoffice.org>2009-09-25 21:47:16 +0200
commit4c8fba36e0b8955ecb49293e6218829ad7cd40a9 (patch)
treed24e9d1b546873c85d4f5aaef4b719a315692ca3 /framework/inc/uiconfiguration
parente3441919174583045e0b7c8110b2a2d4119b66d1 (diff)
parent5228b9163b7c889a62b553e543fea51800099f7a (diff)
merge commit
Diffstat (limited to 'framework/inc/uiconfiguration')
-rw-r--r--framework/inc/uiconfiguration/imagemanager.hxx62
-rw-r--r--framework/inc/uiconfiguration/moduleimagemanager.hxx115
-rw-r--r--framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx92
-rw-r--r--framework/inc/uiconfiguration/uicategorydescription.hxx50
-rw-r--r--framework/inc/uiconfiguration/uiconfigurationmanager.hxx81
-rw-r--r--framework/inc/uiconfiguration/windowstateconfiguration.hxx9
6 files changed, 24 insertions, 385 deletions
diff --git a/framework/inc/uiconfiguration/imagemanager.hxx b/framework/inc/uiconfiguration/imagemanager.hxx
index 997826b10a..b7326f7e11 100644
--- a/framework/inc/uiconfiguration/imagemanager.hxx
+++ b/framework/inc/uiconfiguration/imagemanager.hxx
@@ -38,6 +38,7 @@
#include <vector>
#include <list>
#include <hash_map>
+#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -68,7 +69,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <rtl/ustring.hxx>
@@ -80,16 +81,12 @@
namespace framework
{
- class ImageManager : public com::sun::star::lang::XTypeProvider ,
- public css::lang::XServiceInfo ,
- public ::com::sun::star::ui::XImageManager ,
- private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
- public ::cppu::OWeakObject
+ class ImageManagerImpl;
+ class ImageManager : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
+ public ::cppu::WeakImplHelper2< ::com::sun::star::ui::XImageManager, css::lang::XServiceInfo>
{
public:
// XInterface, XTypeProvider, XServiceInfo
- FWK_DECLARE_XINTERFACE
- FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
ImageManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager );
@@ -127,54 +124,7 @@ namespace framework
void setStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::uno::RuntimeException);
private:
- typedef std::hash_map< rtl::OUString,
- sal_Bool,
- OUStringHashCode,
- ::std::equal_to< ::rtl::OUString > > ImageNameMap;
-
- // private data types
- enum Layer
- {
- LAYER_DEFAULT,
- LAYER_USERDEFINED,
- LAYER_COUNT
- };
-
- enum NotifyOp
- {
- NotifyOp_Remove,
- NotifyOp_Insert,
- NotifyOp_Replace
- };
-
- typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
-
- // private methods
- void implts_initialize();
- void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
- ImageList* implts_getUserImageList( ImageType nImageType );
- sal_Bool implts_loadUserImages( ImageType nImageType,
- const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserImageStorage,
- const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserBitmapsStorage );
- sal_Bool implts_storeUserImages( ImageType nImageType,
- const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserImageStorage,
- const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserBitmapsStorage );
-
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserConfigStorage;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserImageStorage;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserBitmapsStorage;
- bool m_bReadOnly;
- bool m_bInitialized;
- bool m_bModified;
- bool m_bConfigRead;
- bool m_bDisposed;
- rtl::OUString m_aXMLPostfix;
- rtl::OUString m_aModuleIdentifier;
- rtl::OUString m_aResourceString;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
- ImageList* m_pUserImageList[ImageType_COUNT];
- bool m_bUserImageListModified[ImageType_COUNT];
+ ::std::auto_ptr<ImageManagerImpl> m_pImpl;
};
}
diff --git a/framework/inc/uiconfiguration/moduleimagemanager.hxx b/framework/inc/uiconfiguration/moduleimagemanager.hxx
index b19ff34bb3..5e24d2a377 100644
--- a/framework/inc/uiconfiguration/moduleimagemanager.hxx
+++ b/framework/inc/uiconfiguration/moduleimagemanager.hxx
@@ -38,6 +38,7 @@
#include <vector>
#include <list>
#include <hash_map>
+#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -68,7 +69,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <rtl/ustring.hxx>
@@ -80,64 +81,12 @@
namespace framework
{
- class CmdImageList
- {
- public:
- CmdImageList( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
- const ::rtl::OUString& aModuleIdentifier );
- virtual ~CmdImageList();
-
- virtual Image getImageFromCommandURL( sal_Int16 nImageType, const rtl::OUString& rCommandURL );
- virtual bool hasImage( sal_Int16 nImageType, const rtl::OUString& rCommandURL );
- virtual ::std::vector< rtl::OUString >& getImageNames();
- virtual ::std::vector< rtl::OUString >& getImageCommandNames();
-
- protected:
- void impl_fillCommandToImageNameMap();
- ImageList* impl_getImageList( sal_Int16 nImageType );
- std::vector< ::rtl::OUString >& impl_getImageNameVector();
- std::vector< ::rtl::OUString >& impl_getImageCommandNameVector();
+ class ImageManagerImpl;
- private:
- sal_Bool m_bVectorInit;
- rtl::OUString m_aModuleIdentifier;
- ImageList* m_pImageList[ImageType_COUNT];
- CommandToImageNameMap m_aCommandToImageNameMap;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ::std::vector< rtl::OUString > m_aImageNameVector;
- ::std::vector< rtl::OUString > m_aImageCommandNameVector;
- sal_Int16 m_nSymbolsStyle;
- };
-
- class GlobalImageList : public CmdImageList, public rtl::IReference
+ class ModuleImageManager : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
+ public ::cppu::WeakImplHelper1< ::com::sun::star::ui::XImageManager>
{
public:
- GlobalImageList( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
- virtual ~GlobalImageList();
-
- virtual Image getImageFromCommandURL( sal_Int16 nImageType, const rtl::OUString& rCommandURL );
- virtual bool hasImage( sal_Int16 nImageType, const rtl::OUString& rCommandURL );
- virtual ::std::vector< rtl::OUString >& getImageNames();
- virtual ::std::vector< rtl::OUString >& getImageCommandNames();
-
- // ÍReference
- virtual oslInterlockedCount SAL_CALL acquire();
- virtual oslInterlockedCount SAL_CALL release();
-
- private:
- oslInterlockedCount m_nRefCount;
- };
-
- class ModuleImageManager : public com::sun::star::lang::XTypeProvider ,
- public ::com::sun::star::ui::XImageManager ,
- private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
- public ::cppu::OWeakObject
- {
- public:
- // XInterface, XTypeProvider, XServiceInfo
- FWK_DECLARE_XINTERFACE
- FWK_DECLARE_XTYPEPROVIDER
-
ModuleImageManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager );
virtual ~ModuleImageManager();
@@ -170,59 +119,7 @@ namespace framework
virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException);
private:
- typedef std::hash_map< rtl::OUString,
- sal_Bool,
- OUStringHashCode,
- ::std::equal_to< ::rtl::OUString > > ImageNameMap;
-
- // private data types
- enum Layer
- {
- LAYER_DEFAULT,
- LAYER_USERDEFINED,
- LAYER_COUNT
- };
-
- enum NotifyOp
- {
- NotifyOp_Remove,
- NotifyOp_Insert,
- NotifyOp_Replace
- };
-
- typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
-
- // private methods
- void implts_initialize();
- void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
- const rtl::Reference< GlobalImageList >& implts_getGlobalImageList();
- CmdImageList* implts_getDefaultImageList();
- ImageList* implts_getUserImageList( ImageType nImageType );
- sal_Bool implts_loadUserImages( ImageType nImageType,
- const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserImageStorage,
- const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserBitmapsStorage );
- sal_Bool implts_storeUserImages( ImageType nImageType,
- const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserImageStorage,
- const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xUserBitmapsStorage );
-
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserConfigStorage;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserImageStorage;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserBitmapsStorage;
- bool m_bReadOnly;
- bool m_bInitialized;
- bool m_bModified;
- bool m_bConfigRead;
- bool m_bDisposed;
- rtl::OUString m_aXMLPostfix;
- rtl::OUString m_aModuleIdentifier;
- rtl::OUString m_aResourceString;
- com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
- rtl::Reference< GlobalImageList > m_pGlobalImageList;
- CmdImageList* m_pDefaultImageList;
- ImageList* m_pUserImageList[ImageType_COUNT];
- bool m_bUserImageListModified[ImageType_COUNT];
+ ::std::auto_ptr<ImageManagerImpl> m_pImpl;
};
}
diff --git a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
index 05fd57f3d8..37584d5a3b 100644
--- a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
+++ b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
@@ -38,6 +38,7 @@
#include <vector>
#include <list>
#include <hash_map>
+#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -77,6 +78,7 @@
namespace framework
{
+ class UIConfigurationManagerImpl;
class ModuleUIConfigurationManager : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XComponent ,
@@ -85,7 +87,6 @@ namespace framework
public ::com::sun::star::ui::XUIConfigurationManager ,
public ::com::sun::star::ui::XModuleUIConfigurationManager ,
public ::com::sun::star::ui::XUIConfigurationPersistence ,
- private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
@@ -134,94 +135,7 @@ namespace framework
virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException);
private:
- // private data types
- enum Layer
- {
- LAYER_DEFAULT,
- LAYER_USERDEFINED,
- LAYER_COUNT
- };
-
- enum NotifyOp
- {
- NotifyOp_Remove,
- NotifyOp_Insert,
- NotifyOp_Replace
- };
-
- struct UIElementInfo
- {
- UIElementInfo( const rtl::OUString& rResourceURL, const rtl::OUString& rUIName ) :
- aResourceURL( rResourceURL), aUIName( rUIName ) {}
- rtl::OUString aResourceURL;
- rtl::OUString aUIName;
- };
-
- struct UIElementData
- {
- UIElementData() : bModified( false ), bDefault( true ), bDefaultNode( true ) {};
-
- rtl::OUString aResourceURL;
- rtl::OUString aName;
- bool bModified; // has been changed since last storing
- bool bDefault; // default settings
- bool bDefaultNode; // this is a default layer element data
- com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > xSettings;
- };
-
- struct UIElementType;
- friend struct UIElementType;
- typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap;
-
- struct UIElementType
- {
- UIElementType() : bModified( false ),
- bLoaded( false ),
- bDefaultLayer( false ),
- nElementType( ::com::sun::star::ui::UIElementType::UNKNOWN ) {}
-
-
- bool bModified;
- bool bLoaded;
- bool bDefaultLayer;
- sal_Int16 nElementType;
- UIElementDataHashMap aElementsHashMap;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage;
- };
-
- typedef ::std::vector< UIElementType > UIElementTypesVector;
- typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
- typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap;
-
- // private methods
- void impl_Initialize();
- void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
- void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType );
- void impl_preloadUIElementTypeList( Layer eLayer, sal_Int16 nElementType );
- UIElementData* impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true );
- void impl_requestUIElementData( sal_Int16 nElementType, Layer eLayer, UIElementData& aUIElementData );
- void impl_storeElementTypeData( com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage, UIElementType& rElementType, bool bResetModifyState = true );
- void impl_resetElementTypeData( UIElementType& rUserElementType, UIElementType& rDefaultElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer );
- void impl_reloadElementTypeData( UIElementType& rUserElementType, UIElementType& rDefaultElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer );
-
- UIElementTypesVector m_aUIElements[LAYER_COUNT];
- PresetHandler* m_pStorageHandler[::com::sun::star::ui::UIElementType::COUNT];
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDefaultConfigStorage;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserConfigStorage;
- bool m_bReadOnly;
- bool m_bInitialized;
- bool m_bModified;
- bool m_bConfigRead;
- bool m_bDisposed;
- rtl::OUString m_aXMLPostfix;
- rtl::OUString m_aPropUIName;
- rtl::OUString m_aPropResourceURL;
- rtl::OUString m_aModuleIdentifier;
- rtl::OUString m_aModuleShortName;
- com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
- com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xModuleImageManager;
+ ::std::auto_ptr<UIConfigurationManagerImpl> m_pImpl;
};
}
diff --git a/framework/inc/uiconfiguration/uicategorydescription.hxx b/framework/inc/uiconfiguration/uicategorydescription.hxx
index 825dff1145..0990715390 100644
--- a/framework/inc/uiconfiguration/uicategorydescription.hxx
+++ b/framework/inc/uiconfiguration/uicategorydescription.hxx
@@ -43,9 +43,8 @@
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
-#include <macros/xinterface.hxx>
-#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
+#include <uielement/uicommanddescription.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -59,61 +58,18 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
-#include <cppuhelper/weak.hxx>
-#include <rtl/ustring.hxx>
namespace framework
{
-
-class ConfigurationAccess_UICategory;
-class UICategoryDescription : public com::sun::star::lang::XTypeProvider ,
- public com::sun::star::lang::XServiceInfo ,
- public com::sun::star::container::XNameAccess ,
- private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
- public ::cppu::OWeakObject
+class UICategoryDescription : public UICommandDescription
{
public:
UICategoryDescription( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~UICategoryDescription();
- // XInterface, XTypeProvider, XServiceInfo
- FWK_DECLARE_XINTERFACE
- FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
-
- // XNameAccess
- virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
- throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
- throw (::com::sun::star::uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XElementAccess
- virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasElements()
- throw (::com::sun::star::uno::RuntimeException);
-
- typedef ::std::hash_map< ::rtl::OUString,
- ::rtl::OUString,
- OUStringHashCode,
- ::std::equal_to< ::rtl::OUString > > ModuleToCategoryFileMap;
-
- typedef ::std::hash_map< ::rtl::OUString,
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >,
- OUStringHashCode,
- ::std::equal_to< ::rtl::OUString > > CategoryHashMap;
-
private:
- sal_Bool m_bConfigRead;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ModuleToCategoryFileMap m_aModuleToCategoryFileMap;
- CategoryHashMap m_aCategoryHashMap;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xGenericCategories;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > impl_createConfigAccess(const ::rtl::OUString& _sName);
};
} // namespace framework
diff --git a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx
index 66ebbd0f13..d907d64c83 100644
--- a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx
+++ b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx
@@ -38,6 +38,7 @@
#include <vector>
#include <list>
#include <hash_map>
+#include <memory>
//_________________________________________________________________________________________________________________
// my own includes
@@ -77,6 +78,7 @@
namespace framework
{
+ class UIConfigurationManagerImpl;
class UIConfigurationManager : public com::sun::star::lang::XTypeProvider ,
public com::sun::star::lang::XServiceInfo ,
public com::sun::star::lang::XComponent ,
@@ -84,7 +86,6 @@ namespace framework
public ::com::sun::star::ui::XUIConfigurationManager ,
public ::com::sun::star::ui::XUIConfigurationPersistence ,
public ::com::sun::star::ui::XUIConfigurationStorage ,
- private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OWeakObject
{
public:
@@ -130,83 +131,7 @@ namespace framework
virtual sal_Bool SAL_CALL hasStorage() throw (::com::sun::star::uno::RuntimeException);
private:
- // private data types
- enum NotifyOp
- {
- NotifyOp_Remove,
- NotifyOp_Insert,
- NotifyOp_Replace
- };
-
- struct UIElementInfo
- {
- UIElementInfo( const rtl::OUString& rResourceURL, const rtl::OUString& rUIName ) :
- aResourceURL( rResourceURL), aUIName( rUIName ) {}
- rtl::OUString aResourceURL;
- rtl::OUString aUIName;
- };
-
- struct UIElementData
- {
- UIElementData() : bModified( false ), bDefault( true ) {};
-
- rtl::OUString aResourceURL;
- rtl::OUString aName;
- bool bModified; // has been changed since last storing
- bool bDefault; // default settings
- com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > xSettings;
- };
-
- struct UIElementType;
- friend struct UIElementType;
- typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap;
-
- struct UIElementType
- {
- UIElementType() : bModified( false ),
- bLoaded( false ),
- bDefaultLayer( false ),
- nElementType( ::com::sun::star::ui::UIElementType::UNKNOWN ) {}
-
-
- bool bModified;
- bool bLoaded;
- bool bDefaultLayer;
- sal_Int16 nElementType;
- UIElementDataHashMap aElementsHashMap;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage;
- };
-
- typedef ::std::vector< UIElementType > UIElementTypesVector;
- typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer;
- typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap;
-
- // private methods
- void impl_Initialize();
- void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp );
- void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType );
- void impl_preloadUIElementTypeList( sal_Int16 nElementType );
- UIElementData* impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true );
- void impl_requestUIElementData( sal_Int16 nElementType, UIElementData& aUIElementData );
- void impl_storeElementTypeData( com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, UIElementType& rElementType, bool bResetModifyState = true );
- void impl_resetElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer );
- void impl_reloadElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer );
-
- UIElementTypesVector m_aUIElements;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDocConfigStorage;
- bool m_bReadOnly;
- bool m_bInitialized;
- bool m_bModified;
- bool m_bConfigRead;
- bool m_bDisposed;
- rtl::OUString m_aXMLPostfix;
- rtl::OUString m_aPropUIName;
- rtl::OUString m_aPropResourceURL;
- rtl::OUString m_aModuleIdentifier;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
- com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xImageManager;
- com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_xAccConfig;
+ ::std::auto_ptr<UIConfigurationManagerImpl> m_pImpl;
};
}
diff --git a/framework/inc/uiconfiguration/windowstateconfiguration.hxx b/framework/inc/uiconfiguration/windowstateconfiguration.hxx
index a4aba0a402..7d78e981dc 100644
--- a/framework/inc/uiconfiguration/windowstateconfiguration.hxx
+++ b/framework/inc/uiconfiguration/windowstateconfiguration.hxx
@@ -59,7 +59,7 @@
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
namespace framework
@@ -83,11 +83,8 @@ namespace framework
#define WINDOWSTATE_PROPERTY_CONTEXTACTIVE "ContextActive"
class ConfigurationAccess_Windows;
-class WindowStateConfiguration : public com::sun::star::lang::XTypeProvider ,
- public com::sun::star::lang::XServiceInfo ,
- public com::sun::star::container::XNameAccess ,
- private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
- public ::cppu::OWeakObject
+class WindowStateConfiguration : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
+ public ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameAccess, css::lang::XServiceInfo>
{
public:
WindowStateConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );