diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-07-13 14:38:37 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-07-13 14:38:37 +0200 |
commit | ca851f72310bf83c0e6e7cb98fd58e6271fa0f01 (patch) | |
tree | 7f1d1b1461d41b823a7a91464b1874c21b25d2a3 /unotools/inc | |
parent | 22e9afcab567030e0b1d029400dd85851b2d86e3 (diff) | |
parent | be588658ea127a6a05390435126f1d739a477b58 (diff) |
CWS changehid: resync to m84
Diffstat (limited to 'unotools/inc')
-rw-r--r-- | unotools/inc/unotools/configmgr.hxx | 3 | ||||
-rw-r--r-- | unotools/inc/unotools/confignode.hxx | 67 | ||||
-rw-r--r-- | unotools/inc/unotools/lingucfg.hxx | 4 |
3 files changed, 49 insertions, 25 deletions
diff --git a/unotools/inc/unotools/configmgr.hxx b/unotools/inc/unotools/configmgr.hxx index 82af190aab4f..c26ff5245739 100644 --- a/unotools/inc/unotools/configmgr.hxx +++ b/unotools/inc/unotools/configmgr.hxx @@ -99,7 +99,8 @@ namespace utl PRODUCTXMLFILEFORMATVERSION, WRITERCOMPATIBILITYVERSIONOOO11, OPENSOURCECONTEXT, - ABOUTBOXPRODUCTVERSION + ABOUTBOXPRODUCTVERSION, + OOOVENDOR }; //direct readonly access to some special configuration elements static com::sun::star::uno::Any GetDirectConfigProperty(ConfigProperty eProp); diff --git a/unotools/inc/unotools/confignode.hxx b/unotools/inc/unotools/confignode.hxx index 8745508375a1..57b5f5bd2afb 100644 --- a/unotools/inc/unotools/confignode.hxx +++ b/unotools/inc/unotools/confignode.hxx @@ -35,6 +35,11 @@ #include <com/sun/star/util/XChangesBatch.hpp> #include <unotools/eventlisteneradapter.hxx> +namespace comphelper +{ + class ComponentContext; +} + //........................................................................ namespace utl { @@ -59,19 +64,23 @@ namespace utl m_xReplaceAccess; /// replacing child values ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xContainerAccess; /// modifying set nodes (optional interface of our UNO object) - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - m_xProvider; /// the configuration provider which supplied the nodes of the hierarchy we're a part of + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + m_xDummy; sal_Bool m_bEscapeNames; /// escape names before accessing children ? ::rtl::OUString m_sCompletePath; OConfigurationNode insertNode(const ::rtl::OUString& _rName,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xNode) const throw(); + protected: /// constructs a node object with an interface representing a node OConfigurationNode( - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxNode, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxProvider); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxNode + ); + + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& + getUNONode() const { return m_xDirectAccess; } public: /// constructs an empty and invalid node object @@ -88,6 +97,9 @@ namespace utl /// returns the local name of the node ::rtl::OUString getLocalName() const; + /// returns the fully qualified path of the node + ::rtl::OUString getNodePath() const; + /** open a sub node @param _rPath access path of the to-be-opened sub node. May be a hierarchical path. */ @@ -186,14 +198,6 @@ namespace utl */ sal_Bool getEscape() const { return m_bEscapeNames; } - /** clone the object, creating a new hierarchy where the root represents the same node as the object - where this method is called does.<p/> - The new hierarchy does not share any updates with the one the object is a part of, i.e. any changes made - in the existing hierarchy are not visible to the newly created one until committed (and vice versa). - @param _rRoot out parameter. upon return, contains the object representing the root of the new hierarchy. - */ - OConfigurationTreeRoot cloneAsRoot() const throw(); - /// invalidate the object virtual void clear() throw(); @@ -246,22 +250,23 @@ namespace utl /** ctor<p/> */ OConfigurationTreeRoot( - const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesBatch >& _rxRootNode, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxProvider); + const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesBatch >& _rxRootNode + ); /** ctor for a readonly node */ OConfigurationTreeRoot( - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxRootNode, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxProvider); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxRootNode + ); public: - /// modes to used when creating a top-level node object + /// modes to use when creating a top-level node object enum CREATION_MODE { - CM_READONLY, /// open the node (i.e. sub tree) for read access only - CM_UPDATABLE, /// open the node (i.e. sub tree) for read and write access - CM_PREFER_UPDATABLE /// open the node (i.e. sub tree) for read and write access, if this fails, open it for read acces + /// open the node (i.e. sub tree) for read access only + CM_READONLY, + /// open the node (i.e. sub tree) for read and write access, fall back to read-only if write access is not possible + CM_UPDATABLE }; public: @@ -270,6 +275,22 @@ namespace utl */ OConfigurationTreeRoot() :OConfigurationNode() { } + /** creates a configuration tree for the given path in the given mode + */ + OConfigurationTreeRoot( + const ::comphelper::ComponentContext& i_rContext, + const sal_Char* i_pAsciiNodePath, + const bool i_bUpdatable + ); + + /** creates a configuration tree for the given path in the given mode + */ + OConfigurationTreeRoot( + const ::comphelper::ComponentContext& i_rContext, + const ::rtl::OUString& i_rNodePath, + const bool i_bUpdatable + ); + /// copy ctor OConfigurationTreeRoot(const OConfigurationTreeRoot& _rSource) :OConfigurationNode(_rSource), m_xCommitter(_rSource.m_xCommitter) { } @@ -293,7 +314,7 @@ namespace utl const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxConfProvider, const ::rtl::OUString& _rPath, sal_Int32 _nDepth = -1, - CREATION_MODE _eMode = CM_PREFER_UPDATABLE, + CREATION_MODE _eMode = CM_UPDATABLE, sal_Bool _bLazyWrite = sal_True ); @@ -310,7 +331,7 @@ namespace utl @param _eMode specifies which privileges should be applied when retrieving the node */ static OConfigurationTreeRoot createWithServiceFactory(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, - const ::rtl::OUString& _rPath, sal_Int32 _nDepth = -1, CREATION_MODE _eMode = CM_PREFER_UPDATABLE, sal_Bool _bLazyWrite = sal_True); + const ::rtl::OUString& _rPath, sal_Int32 _nDepth = -1, CREATION_MODE _eMode = CM_UPDATABLE, sal_Bool _bLazyWrite = sal_True); /** tolerant version of the <member>createWithServiceFactory</member> @@ -319,7 +340,7 @@ namespace utl given node path does not exist) are still asserted.</p> */ static OConfigurationTreeRoot tryCreateWithServiceFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, - const ::rtl::OUString& _rPath, sal_Int32 _nDepth = -1, CREATION_MODE _eMode = CM_PREFER_UPDATABLE, sal_Bool _bLazyWrite = sal_True ); + const ::rtl::OUString& _rPath, sal_Int32 _nDepth = -1, CREATION_MODE _eMode = CM_UPDATABLE, sal_Bool _bLazyWrite = sal_True ); /** commit all changes made on the subtree the object is the root for<p/> All changes made on any <type>OConfigurationNode</type> object retrieved (maybe indirect) from this root diff --git a/unotools/inc/unotools/lingucfg.hxx b/unotools/inc/unotools/lingucfg.hxx index 720a2efb381c..9a26bdd73021 100644 --- a/unotools/inc/unotools/lingucfg.hxx +++ b/unotools/inc/unotools/lingucfg.hxx @@ -230,8 +230,10 @@ public: ::rtl::OUString GetSpellAndGrammarDialogImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; ::rtl::OUString GetSpellAndGrammarContextSuggestionImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; ::rtl::OUString GetSpellAndGrammarContextDictionaryImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; + ::rtl::OUString GetThesaurusDialogImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; + ::rtl::OUString GetSynonymsContextImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; - bool HasAnyVendorImages() const; + bool HasVendorImages( const char *pImageName ) const; bool HasGrammarChecker() const; }; |