summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-04-28 18:00:14 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-04-28 18:00:14 +0000
commit516319a6c0732a160f13a17f773adcb9eb37bcb7 (patch)
tree1d229a34050b4eeb24f3d115b31d0bf23e289e98 /configmgr
parent01d72b6647f7d40223c44884563a5e489d7f20e7 (diff)
CWS-TOOLING: integrate CWS sb109
2009-04-21 13:42:45 +0200 sb r271035 : removed obsolete psprint dependency 2009-04-21 10:33:31 +0200 sb r271024 : changes to previous -c270971 so that build does not break for USE_SHELL!=bash (but instead resulting bridgetest_xxx scripts are nonfunctional) 2009-04-21 08:56:48 +0200 sb r271017 : merged in cws/sb107 -c 268250 (avoid warnings about format specifier and argument mismatch (on 64bit debug builds)) 2009-04-20 16:42:27 +0200 sb r270995 : #i98625# add make_xxx functions for C++ representations of UNO polystructs; fixed and adapted tests (patch by thb, slightly adapted) 2009-04-20 14:23:45 +0200 sb r270981 : #i84751# selective performance improvements (patch by mmeeks, slightly adapted) 2009-04-20 13:39:50 +0200 sb r270978 : #i99711# removed dead code (patch by cmc, slightly modified) 2009-04-20 11:59:39 +0200 sb r270972 : #i97975# avoid crashes during shutdown (patch by cmc, slightly modified) 2009-04-20 11:57:52 +0200 sb r270971 : made tests work again after LD_LIBRARY_PATH clean up 2009-04-20 09:49:32 +0200 sb r270963 : #i95593# made tests work again after LD_LIBRARY_PATH cleanup 2009-04-17 13:52:33 +0200 sb r270941 : merged in cws/sb107 -c 270023 (added svn:ignore) 2009-04-15 13:46:24 +0200 sb r270841 : #i92131# dead code elimination (based on a patch by cmc) 2009-04-15 13:29:27 +0200 sb r270839 : #i100743# use a FastLess for the Data map (based on a patch my mmeeks) 2009-04-15 13:12:11 +0200 sb r270837 : #i100583# dead code elimination (patch by cmc) 2009-04-15 13:02:19 +0200 sb r270835 : avoid bogus Solaris C++ compiler warning when building with debug=x 2009-04-15 11:49:46 +0200 sb r270828 : adapted to cleared LD_LIBRARY_PATH 2009-04-15 10:49:48 +0200 sb r270826 : #i101101# for performance reasons, do not put ComponentContext in unsafe appartment 2009-04-15 10:08:20 +0200 sb r270824 : #i99113# removed duplicated stocservices.uno lib from basis layer
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/qa/unit/makefile.mk10
-rw-r--r--configmgr/source/api2/apiaccessobj.hxx3
-rw-r--r--configmgr/source/api2/apifactory.cxx33
-rw-r--r--configmgr/source/api2/apifactory.hxx2
-rw-r--r--configmgr/source/api2/apitreeimplobj.cxx13
-rw-r--r--configmgr/source/api2/apitreeimplobj.hxx1
-rw-r--r--configmgr/source/api2/broadcaster.cxx16
-rw-r--r--configmgr/source/api2/broadcaster.hxx3
-rw-r--r--configmgr/source/api2/groupobjects.hxx8
-rw-r--r--configmgr/source/api2/providerimpl.cxx12
-rw-r--r--configmgr/source/api2/providerimpl.hxx3
-rw-r--r--configmgr/source/api2/setobjects.hxx12
-rw-r--r--configmgr/source/backend/binaryreader.cxx10
-rw-r--r--configmgr/source/backend/binaryreader.hxx14
-rw-r--r--configmgr/source/inc/configgroup.hxx2
-rw-r--r--configmgr/source/inc/nodechange.hxx16
-rw-r--r--configmgr/source/inc/tree.hxx2
-rw-r--r--configmgr/source/inc/treemanager.hxx1
-rw-r--r--configmgr/source/inc/valueref.hxx2
-rw-r--r--configmgr/source/tree/cmtree.cxx7
-rw-r--r--configmgr/source/treecache/cacheaccess.cxx18
-rw-r--r--configmgr/source/treecache/cacheaccess.hxx3
-rw-r--r--configmgr/source/treecache/cachecontroller.cxx132
-rw-r--r--configmgr/source/treecache/cachecontroller.hxx3
-rw-r--r--configmgr/source/treecache/cachemulticaster.cxx13
-rw-r--r--configmgr/source/treecache/disposetimer.cxx19
-rw-r--r--configmgr/source/treecache/disposetimer.hxx3
-rw-r--r--configmgr/source/treecache/treemanager.cxx7
-rw-r--r--configmgr/source/treemgr/configgroup.cxx6
-rw-r--r--configmgr/source/treemgr/nodechange.cxx46
-rw-r--r--configmgr/source/treemgr/noderef.cxx7
-rw-r--r--configmgr/source/treemgr/setnodeimpl.hxx13
-rw-r--r--configmgr/source/treemgr/treeimpl.cxx2
33 files changed, 40 insertions, 402 deletions
diff --git a/configmgr/qa/unit/makefile.mk b/configmgr/qa/unit/makefile.mk
index 4b57dabac7..a6a79ebdd0 100644
--- a/configmgr/qa/unit/makefile.mk
+++ b/configmgr/qa/unit/makefile.mk
@@ -54,10 +54,10 @@ ALLTAR: test
$(MISC)$/$(TARGET).rdb .ERRREMOVE:
$(COPY) $(SOLARBINDIR)$/types.rdb $@
- regcomp -register -r $@ -c $(subst,$/,/ $(DLLDEST)$/configmgr2.uno$(DLLPOST))
- regcomp -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/sax.uno$(DLLPOST))
- regcomp -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/stocservices.uno$(DLLPOST))
- regcomp -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/streams.uno$(DLLPOST))
+ $(REGCOMP) -register -r $@ -c $(subst,$/,/ $(DLLDEST)$/configmgr2.uno$(DLLPOST))
+ $(REGCOMP) -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/sax.uno$(DLLPOST))
+ $(REGCOMP) -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/stocservices.uno$(DLLPOST))
+ $(REGCOMP) -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/streams.uno$(DLLPOST))
test .PHONY: $(SHL1TARGETN) $(MISC)$/$(TARGET).rdb
- testshl2 $(SHL1TARGETN) -forward "$(MISC)$/$(TARGET).rdb#$(PWD)$/$(MISC)$/$(TARGET).registry"
+ $(AUGMENT_LIBRARY_PATH) testshl2 $(SHL1TARGETN) -forward "$(MISC)$/$(TARGET).rdb#$(PWD)$/$(MISC)$/$(TARGET).registry"
diff --git a/configmgr/source/api2/apiaccessobj.hxx b/configmgr/source/api2/apiaccessobj.hxx
index 0dae110bf8..85832c27aa 100644
--- a/configmgr/source/api2/apiaccessobj.hxx
+++ b/configmgr/source/api2/apiaccessobj.hxx
@@ -81,9 +81,6 @@ namespace configmgr
mutable ApiTreeImpl m_aTree;
public:
- OSetElement(uno::XInterface* pUnoThis, rtl::Reference< configuration::Tree > const& aTree, ApiTreeImpl& rParentTree)
- : m_aTree(pUnoThis, aTree,rParentTree)
- {}
OSetElement(uno::XInterface* pUnoThis, rtl::Reference< configuration::Tree > const& aTree, ApiProvider& rProvider, ApiTreeImpl* pParentTree = 0)
: m_aTree(pUnoThis, rProvider,aTree,pParentTree)
{}
diff --git a/configmgr/source/api2/apifactory.cxx b/configmgr/source/api2/apifactory.cxx
index 457a11a963..418d5ce756 100644
--- a/configmgr/source/api2/apifactory.cxx
+++ b/configmgr/source/api2/apifactory.cxx
@@ -228,39 +228,6 @@ TreeElement* Factory::makeAccessRoot(rtl::Reference< configuration::Tree > const
}
//-----------------------------------------------------------------------------
-uno::Reference< uno::XInterface > Factory::makeUnoGroupMember(rtl::Reference< configuration::Tree > const& aTree, configuration::NodeRef const& aNode)
-{
- return implToUno(makeGroupMember(aTree,aNode));
-}
-//-----------------------------------------------------------------------------
-NodeElement* Factory::makeGroupMember(rtl::Reference< configuration::Tree > const& aTree, configuration::NodeRef const& aNode)
-{
- OSL_PRECOND( !configuration::isEmpty(aTree.get()) , "ERROR: Configuration: Creating an object requires a valid tree");
- if (configuration::isEmpty(aTree.get())) return 0;
-
- OSL_PRECOND( aNode.isValid() , "ERROR: Configuration: Creating an object requires a valid node");
- OSL_PRECOND( aTree->isValidNode(aNode.getOffset()), "ERROR: Configuration: NodeRef does not match Tree");
- if (!aTree->isValidNode(aNode.getOffset())) return 0;
-
- OSL_PRECOND( configuration::isStructuralNode(aTree,aNode), "ERROR: Configuration: Cannot make object for value node");
- OSL_ENSURE(!aTree->isRootNode(aNode),"INTERNAL ERROR: Root of Tree should not be used for a group member object");
-
- configuration::NodeID aNodeID(aTree,aNode);
- NodeElement* pRet = findElement(aNodeID);
- if (0 == pRet)
- {
- rtl::Reference<configuration::Template> aTemplate = implGetSetElementTemplate(aTree,aNode);
-
- pRet = doCreateGroupMember(aTree,aNode,aTemplate.get());
-
- OSL_ENSURE( pRet,"WARNING: New API object could not be created");
-
- implHaveNewElement(aNodeID,pRet);
- }
- return pRet;
-}
-//-----------------------------------------------------------------------------
-
uno::Reference< uno::XInterface > Factory::makeUnoSetElement(rtl::Reference< configuration::ElementTree > const& aElementTree)
{
uno::Reference< uno::XInterface > aRet = implToUno(makeSetElement(aElementTree));
diff --git a/configmgr/source/api2/apifactory.hxx b/configmgr/source/api2/apifactory.hxx
index 1c80fc9655..62b8d41065 100644
--- a/configmgr/source/api2/apifactory.hxx
+++ b/configmgr/source/api2/apifactory.hxx
@@ -79,13 +79,11 @@ namespace configmgr
uno::Reference< uno::XInterface > makeUnoElement(rtl::Reference< configuration::Tree > const& aTree, configuration::NodeRef const& aNode);
uno::Reference< uno::XInterface > findUnoElement(configuration::NodeID const& aNode);
- uno::Reference< uno::XInterface > makeUnoGroupMember(rtl::Reference< configuration::Tree > const& aTree, configuration::NodeRef const& aNode);
uno::Reference< uno::XInterface > makeUnoSetElement(rtl::Reference< configuration::ElementTree > const& aTree);
NodeElement* makeElement(rtl::Reference< configuration::Tree > const& aTree, configuration::NodeRef const& aNode);
NodeElement* findElement(configuration::NodeID const& aNode);
- NodeElement* makeGroupMember(rtl::Reference< configuration::Tree > const& aTree, configuration::NodeRef const& aNode);
TreeElement* makeAccessRoot(rtl::Reference< configuration::Tree > const& aTree, RequestOptions const& _aOptions);
SetElement* makeSetElement(rtl::Reference< configuration::ElementTree > const& aTree);
diff --git a/configmgr/source/api2/apitreeimplobj.cxx b/configmgr/source/api2/apitreeimplobj.cxx
index 388f9d444b..ff0453f17e 100644
--- a/configmgr/source/api2/apitreeimplobj.cxx
+++ b/configmgr/source/api2/apitreeimplobj.cxx
@@ -356,19 +356,6 @@ configuration::DefaultProvider extractDefaultProvider(ApiTreeImpl* pParentTree)
return configuration::DefaultProvider::createEmpty();
}
//-------------------------------------------------------------------------
-ApiTreeImpl::ApiTreeImpl(uno::XInterface* pInstance, rtl::Reference< configuration::Tree > const& aTree, ApiTreeImpl& rParentTree)
-: m_aTree(aTree)
-, m_aNotifier(new NotifierImpl(aTree))
-, m_aDefaultProvider(rParentTree.getDefaultProvider())
-, m_xProvider()
-, m_rProvider(rParentTree.getProvider())
-, m_pParentTree(0)
-, m_pInstance(pInstance)
-{
- setNodeInstance(aTree->getRootNode(), pInstance);
- init(&rParentTree);
-}
-//-------------------------------------------------------------------------
ApiTreeImpl::ApiTreeImpl(uno::XInterface* pInstance, ApiProvider& rProvider, rtl::Reference< configuration::Tree > const& aTree, ApiTreeImpl* pParentTree)
: m_aTree(aTree)
, m_aNotifier(new NotifierImpl(aTree))
diff --git a/configmgr/source/api2/apitreeimplobj.hxx b/configmgr/source/api2/apitreeimplobj.hxx
index 7e8bd6770d..087893e817 100644
--- a/configmgr/source/api2/apitreeimplobj.hxx
+++ b/configmgr/source/api2/apitreeimplobj.hxx
@@ -100,7 +100,6 @@ namespace configmgr
uno::XInterface* m_pInstance;
public:
- explicit ApiTreeImpl(uno::XInterface* pInstance, rtl::Reference< configuration::Tree > const& aTree, ApiTreeImpl& rParentTree);
explicit ApiTreeImpl(uno::XInterface* pInstance, ApiProvider& rProvider, rtl::Reference< configuration::Tree > const& aTree, ApiTreeImpl* pParentTree);
explicit ApiTreeImpl(uno::XInterface* _pInstance, ApiProvider& _rProvider, rtl::Reference< configuration::Tree > const& _aTree, configuration::DefaultProvider const & _aDefaultProvider);
~ApiTreeImpl();
diff --git a/configmgr/source/api2/broadcaster.cxx b/configmgr/source/api2/broadcaster.cxx
index 9bd6cf0d27..71b29177c5 100644
--- a/configmgr/source/api2/broadcaster.cxx
+++ b/configmgr/source/api2/broadcaster.cxx
@@ -1112,12 +1112,6 @@ Broadcaster::Broadcaster(Notifier const& aNotifier, configuration::NodeChanges c
OSL_ASSERT(m_pImpl.isValid());
}
// ---------------------------------------------------------------------------------------------------
-Broadcaster::Broadcaster(Notifier const& aNotifier, configuration::NodeChangeInformation const& aChange, bool bLocal)
-: m_pImpl( Impl::create(aNotifier.m_aImpl,ApiTreeRef(aNotifier.m_pTree),aChange,bLocal) )
-{
- OSL_ASSERT(m_pImpl.isValid());
-}
-// ---------------------------------------------------------------------------------------------------
Broadcaster::Broadcaster(Notifier const& aNotifier, configuration::NodeChangesInformation const& aChanges, bool bLocal)
: m_pImpl( Impl::create(aNotifier.m_aImpl,ApiTreeRef(aNotifier.m_pTree),aChanges,bLocal) )
{
@@ -1184,16 +1178,6 @@ void Broadcaster::notifyListeners(configuration::NodeChange const& aChange) thro
}
// ---------------------------------------------------------------------------------------------------
-void Broadcaster::notifyListeners(configuration::NodeChangeInformation const& aChange) throw()
-{
- OSL_ENSURE(!aChange.isEmptyChange(),"Notifying without a change !");
-
- configuration::NodeChangesInformation aChanges;
- aChanges.push_back(aChange);
- this->notifyListeners(aChanges, true);
-}
-// ---------------------------------------------------------------------------------------------------
-
void Broadcaster::notifyListeners(configuration::NodeChanges const& aChanges, bool bSingleBase) throw()
{
OSL_ENSURE(!aChanges.isEmpty(),"Notifying without a change !");
diff --git a/configmgr/source/api2/broadcaster.hxx b/configmgr/source/api2/broadcaster.hxx
index 3923e05b44..280e894bc2 100644
--- a/configmgr/source/api2/broadcaster.hxx
+++ b/configmgr/source/api2/broadcaster.hxx
@@ -60,7 +60,6 @@ namespace configmgr
/// construct a broadcaster
Broadcaster(Notifier const& aNotifier, configuration::NodeChange const& aChange, bool bLocal);
Broadcaster(Notifier const& aNotifier, configuration::NodeChanges const& aChanges, bool bLocal);
- Broadcaster(Notifier const& aNotifier, configuration::NodeChangeInformation const& aChange, bool bLocal);
Broadcaster(Notifier const& aNotifier, configuration::NodeChangesInformation const& aChanges, bool bLocal);
Broadcaster(Broadcaster const& aOther);
~Broadcaster();
@@ -74,8 +73,6 @@ namespace configmgr
void notifyListeners(configuration::NodeChange const& aChange) throw();
/// notify all listeners which are affected by any of these changes (potentially from many different bases)
void notifyListeners(configuration::NodeChanges const& aChanges, bool bSingleBase) throw();
- /// notify all listeners which are affected by this change
- void notifyListeners(configuration::NodeChangeInformation const& aChange) throw();
/// notify all listeners which are affected by any of these changes (potentially from many different bases)
void notifyListeners(configuration::NodeChangesInformation const& aChanges, bool bSingleBase = false) throw();
diff --git a/configmgr/source/api2/groupobjects.hxx b/configmgr/source/api2/groupobjects.hxx
index 7393c929f3..321b0a2cff 100644
--- a/configmgr/source/api2/groupobjects.hxx
+++ b/configmgr/source/api2/groupobjects.hxx
@@ -129,10 +129,6 @@ namespace configmgr
{
public:
// Construction/Destruction
- OSetElementGroupInfo(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiTreeImpl& rParentTree)
- : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rParentTree)
- {
- }
OSetElementGroupInfo(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
: m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
{
@@ -167,10 +163,6 @@ namespace configmgr
{
public:
// Construction/Destruction
- OSetElementGroupUpdate(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiTreeImpl& rParentTree)
- : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rParentTree)
- {
- }
OSetElementGroupUpdate(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
: m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
{
diff --git a/configmgr/source/api2/providerimpl.cxx b/configmgr/source/api2/providerimpl.cxx
index 2c1e559d26..03ce8a9278 100644
--- a/configmgr/source/api2/providerimpl.cxx
+++ b/configmgr/source/api2/providerimpl.cxx
@@ -425,18 +425,6 @@ namespace configmgr
m_pTreeManager->enableAsync(bEnableAsync);
}
//-----------------------------------------------------------------------------
- void SAL_CALL OProviderImpl::acquire( ) throw ()
- {
- m_pProvider->acquire();
- }
-
- //-----------------------------------------------------------------------------
- void SAL_CALL OProviderImpl::release( ) throw ()
- {
- m_pProvider->release();
- }
-
- //-----------------------------------------------------------------------------
uno::XInterface* OProviderImpl::getProviderInstance()
{
return static_cast<com::sun::star::lang::XMultiServiceFactory*>(m_pProvider);
diff --git a/configmgr/source/api2/providerimpl.hxx b/configmgr/source/api2/providerimpl.hxx
index 3c7c4f8978..9e8e9e252d 100644
--- a/configmgr/source/api2/providerimpl.hxx
+++ b/configmgr/source/api2/providerimpl.hxx
@@ -191,9 +191,6 @@ namespace configmgr
virtual sal_Bool fetchDefaultData(configuration::AbsolutePath const& aSubtreePath, const RequestOptions& _aOptions
) SAL_THROW((com::sun::star::uno::Exception));
- void SAL_CALL acquire( ) throw ();
- void SAL_CALL release( ) throw ();
-
// DefaultProvider access
rtl::Reference< TreeManager > getDefaultProvider() const SAL_THROW((com::sun::star::uno::RuntimeException));
diff --git a/configmgr/source/api2/setobjects.hxx b/configmgr/source/api2/setobjects.hxx
index 472796ddf8..b1272b4e6b 100644
--- a/configmgr/source/api2/setobjects.hxx
+++ b/configmgr/source/api2/setobjects.hxx
@@ -157,10 +157,6 @@ namespace configmgr
{
public:
// Construction/Destruction
- OSetElementSetInfo(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiTreeImpl& rParentTree)
- : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rParentTree)
- {
- }
OSetElementSetInfo(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
: m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
{
@@ -193,10 +189,6 @@ namespace configmgr
{
public:
// Construction/Destruction
- OSetElementTreeSetUpdate(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiTreeImpl& rParentTree)
- : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rParentTree)
- {
- }
OSetElementTreeSetUpdate(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
: m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
{
@@ -231,10 +223,6 @@ namespace configmgr
{
public:
// Construction/Destruction
- OSetElementValueSetUpdate(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiTreeImpl& rParentTree)
- : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rParentTree)
- {
- }
OSetElementValueSetUpdate(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
: m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
{
diff --git a/configmgr/source/backend/binaryreader.cxx b/configmgr/source/backend/binaryreader.cxx
index c6e21db004..fcf971a8ba 100644
--- a/configmgr/source/backend/binaryreader.cxx
+++ b/configmgr/source/backend/binaryreader.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/io/XDataInputStream.hpp>
#include <com/sun/star/io/XDataOutputStream.hpp>
#include <com/sun/star/io/BufferSizeExceededException.hpp>
#include <com/sun/star/io/UnexpectedEOFException.hpp>
@@ -513,6 +514,11 @@ namespace configmgr
// BinaryReader implementation.
// --------------------------------------------------------------------------
+ BinaryReader::BinaryReader(rtl::OUString const & _sFileURL):
+ m_sFileURL(_sFileURL) {}
+
+ BinaryReader::~BinaryReader() {}
+
bool BinaryReader::open()
SAL_THROW( (io::IOException, uno::RuntimeException) )
{
@@ -532,10 +538,10 @@ namespace configmgr
// --------------------------------------------------------------------------
- inline uno::Reference<io::XDataInputStream> BinaryReader::getDataInputStream()
+ inline BinaryReader_Impl * BinaryReader::getDataInputStream()
{
OSL_ENSURE(m_xDataInputStream.is(),"Binary Cache: Reader was not opened - no input stream");
- return m_xDataInputStream;
+ return m_xDataInputStream.get();
}
// --------------------------------------------------------------------------
diff --git a/configmgr/source/backend/binaryreader.hxx b/configmgr/source/backend/binaryreader.hxx
index 1b7a4de4a9..d299008b58 100644
--- a/configmgr/source/backend/binaryreader.hxx
+++ b/configmgr/source/backend/binaryreader.hxx
@@ -30,12 +30,12 @@
#ifndef CONFIGMGR_BINARYREADER_HXX
#define CONFIGMGR_BINARYREADER_HXX
+#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include <osl/file.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/io/XDataInputStream.hpp>
namespace configmgr
{
@@ -48,18 +48,16 @@ namespace configmgr
namespace uno = css::uno;
namespace lang = css::lang;
// -----------------------------------------------------------------------------
+ class BinaryReader_Impl;
class BinaryReader
{
rtl::OUString m_sFileURL;
- uno::Reference<io::XDataInputStream> m_xDataInputStream;
+ rtl::Reference<BinaryReader_Impl> m_xDataInputStream;
public:
- explicit BinaryReader (rtl::OUString const & _sFileURL)
- : m_sFileURL(_sFileURL)
- {}
+ explicit BinaryReader (rtl::OUString const & _sFileURL);
- ~BinaryReader()
- {}
+ ~BinaryReader();
public:
bool open() SAL_THROW( (io::IOException, uno::RuntimeException) );
@@ -75,7 +73,7 @@ namespace configmgr
void read(uno::Sequence< rtl::OUString > &_aValue) SAL_THROW( (io::IOException, uno::RuntimeException) );
private:
- inline uno::Reference<io::XDataInputStream> getDataInputStream();
+ inline BinaryReader_Impl * getDataInputStream();
};
// --------------------------------------------------------------------------
diff --git a/configmgr/source/inc/configgroup.hxx b/configmgr/source/inc/configgroup.hxx
index 99be0b0a18..c9fd42f732 100644
--- a/configmgr/source/inc/configgroup.hxx
+++ b/configmgr/source/inc/configgroup.hxx
@@ -96,8 +96,6 @@ namespace configmgr
bool hasDoneSet() const { return m_bHasDoneSet; }
- bool isDataAvailable();
-
NodeChange validateSetToDefaultValue(ValueRef const& aValueNode);
NodeChange validateSetToDefaultState(NodeRef const& aNode);
diff --git a/configmgr/source/inc/nodechange.hxx b/configmgr/source/inc/nodechange.hxx
index 6024cbf986..30536d85d0 100644
--- a/configmgr/source/inc/nodechange.hxx
+++ b/configmgr/source/inc/nodechange.hxx
@@ -92,16 +92,9 @@ namespace configmgr
NodeChange const& apply() const;
// retrieve the tree where the change is actually taking place
- rtl::Reference< Tree > getBaseTree() const;
- // retrieve the node where the change is actually taking place
- NodeRef getBaseNode() const;
-
- // retrieve the tree where the change is actually taking place
rtl::Reference< Tree > getAffectedTree() const;
// retrieve the node where the change is actually taking place
NodeRef getAffectedNode() const;
- // identify the node where the change is actually taking place
- NodeID getAffectedNodeID() const;
// Comparison
friend bool operator==(NodeChange const& lhs, NodeChange const& rhs)
@@ -141,10 +134,6 @@ namespace configmgr
NodeChanges& test() { implTest(); return *this; }
NodeChanges const& test() const { implTest(); return *this; }
- /// apply all changes
- NodeChanges& apply() { implApply(); return *this; }
- NodeChanges const& apply() const{ implApply(); return *this; }
-
/// remove all changes known to be doing nothing from this collection.
NodeChanges& compact();
@@ -152,10 +141,6 @@ namespace configmgr
*/
void add(NodeChange const& aChange);
- /** insert changes into this collection
- */
- void add(NodeChanges const& aChanges);
-
/// returns an STL-style iterator to the first element of the collection
std::vector<NodeChange>::const_iterator begin() const { return m_aChanges.begin(); }
std::vector<NodeChange>::iterator begin() { return m_aChanges.begin(); }
@@ -166,7 +151,6 @@ namespace configmgr
private:
void implTest() const;
- void implApply() const;
std::vector<NodeChange> m_aChanges;
};
diff --git a/configmgr/source/inc/tree.hxx b/configmgr/source/inc/tree.hxx
index bad6b23e4e..f9675be2b3 100644
--- a/configmgr/source/inc/tree.hxx
+++ b/configmgr/source/inc/tree.hxx
@@ -243,7 +243,9 @@ namespace configmgr
bool isValidValueNode(ValueRef const & value);
+#if OSL_DEBUG_LEVEL > 0
bool isValidAnyNode(AnyNodeRef const & node);
+#endif
/// checks whether the node has any element nodes (of its own)
bool hasElements(NodeRef const & node);
diff --git a/configmgr/source/inc/treemanager.hxx b/configmgr/source/inc/treemanager.hxx
index d6609308a2..b261f4e43e 100644
--- a/configmgr/source/inc/treemanager.hxx
+++ b/configmgr/source/inc/treemanager.hxx
@@ -132,7 +132,6 @@ namespace configmgr
void addListener(configuration::AbsolutePath const& aName, const RequestOptions& _aOptions, rtl::Reference<INodeListener> const& pListener);
void removeListener(const RequestOptions& _aOptions, rtl::Reference<INodeListener> const& pListener);
- void disposing(backend::CacheController & _rProvider) SAL_THROW(());
void componentCreated(backend::ComponentRequest const & _aComponent) SAL_THROW(());
void componentChanged(backend::UpdateRequest const & _anUpdate) SAL_THROW(());
diff --git a/configmgr/source/inc/valueref.hxx b/configmgr/source/inc/valueref.hxx
index a9c06782d9..3973586896 100644
--- a/configmgr/source/inc/valueref.hxx
+++ b/configmgr/source/inc/valueref.hxx
@@ -102,7 +102,7 @@ namespace configmgr
// checking
bool isValidNode() const;
// hashing
- size_t hashCode() const;
+ size_t hashCode() const { return m_aParentID.hashCode() + 5*m_sNodeName.hashCode(); }
// containing node this
NodeID getParentID() const { return m_aParentID; }
// containing node this
diff --git a/configmgr/source/tree/cmtree.cxx b/configmgr/source/tree/cmtree.cxx
index e03dd684e2..71d7733005 100644
--- a/configmgr/source/tree/cmtree.cxx
+++ b/configmgr/source/tree/cmtree.cxx
@@ -65,12 +65,11 @@ namespace configmgr
// ------------------------ ChildListSet implementations ------------------------
ChildListSet::ChildListSet(ChildListSet const& aSet, treeop::DeepChildCopy)
- : m_aChildList(0)
+ : m_aChildList(aSet.m_aChildList.size())
{
for (size_t i = 0; i < aSet.m_aChildList.size(); i++)
{
- m_aChildList.insert(m_aChildList.end(),
- aSet.m_aChildList[i]->clone().release());
+ m_aChildList[i] = aSet.m_aChildList[i]->clone().release();
}
}
ChildListSet::~ChildListSet()
@@ -81,6 +80,8 @@ namespace configmgr
struct ltNode
{
+ ltNode() {}
+
bool operator()(const configmgr::INode* n1, const configmgr::INode* n2) const
{
return n1->getName().compareTo(n2->getName()) < 0;
diff --git a/configmgr/source/treecache/cacheaccess.cxx b/configmgr/source/treecache/cacheaccess.cxx
index 6f8101161f..831cd0f2f4 100644
--- a/configmgr/source/treecache/cacheaccess.cxx
+++ b/configmgr/source/treecache/cacheaccess.cxx
@@ -249,24 +249,6 @@ bool CacheLoadingAccess::findPendingChangedModules( std::vector< rtl::OUString >
return !_rPendingList.empty();
}
-// -----------------------------------------------------------------------------
-void CacheLoadingAccess::clearData(std::vector< rtl::Reference<CacheLine> >& _rList) SAL_THROW(())
-{
- CFG_TRACE_INFO("Tree Info: Removing all module trees for cleanup" );
-
- ExtendedCacheData::ModuleList& rModules = this->m_aData.accessModuleList();
-
- for(ExtendedCacheData::ModuleList::iterator it = rModules.begin();
- it != rModules.end();
- ++it)
- {
- if (it->second.is())
- _rList.push_back(it->second);
- }
-
- rModules.clear();
- m_aDeadModules.clear();
-}
// -------------------------------------------------------------------------
TimeStamp CacheLoadingAccess::collectDisposeList(std::vector< rtl::Reference<CacheLine> > & _rList, TimeStamp const & _aLimitTime, TimeInterval const & _aDelay)
diff --git a/configmgr/source/treecache/cacheaccess.hxx b/configmgr/source/treecache/cacheaccess.hxx
index fbe1396a9f..3956e7861c 100644
--- a/configmgr/source/treecache/cacheaccess.hxx
+++ b/configmgr/source/treecache/cacheaccess.hxx
@@ -134,9 +134,6 @@ namespace configmgr
TimeStamp const & _aLimitTime,
TimeInterval const & _aDelay);
- /// clear the contained tree, return all remaining modules
- void clearData( std::vector< rtl::Reference<CacheLine> >& _rDisposeList) SAL_THROW(());
-
// stuff that is particular for CacheLoadingAccess
/** add the given subtree at the given location,
return the tree that is then pertinent and clientAcquire() it once
diff --git a/configmgr/source/treecache/cachecontroller.cxx b/configmgr/source/treecache/cachecontroller.cxx
index 6aa34a68ca..513e134e5a 100644
--- a/configmgr/source/treecache/cachecontroller.cxx
+++ b/configmgr/source/treecache/cachecontroller.cxx
@@ -151,138 +151,6 @@ void CacheController::dispose() SAL_THROW((com::sun::star::uno::RuntimeException
}
// -------------------------------------------------------------------------
-void CacheController::disposeOne(RequestOptions const & _aOptions, bool _bFlushUpdates)
-{
- CFG_TRACE_INFO("CacheController: Disposing data and TreeInfo for user '%s' with locale '%s'",
- OUSTRING2ASCII(_aOptions.getEntity()), OUSTRING2ASCII(_aOptions.getLocale()) );
-
- m_pDisposer->clearTasks(_aOptions);
- if (!m_pCacheWriter->clearTasks(_aOptions)) // had no pending updates
- {
- _bFlushUpdates = false;
- }
- else if (!_bFlushUpdates)
- {
- CFG_TRACE_WARNING_NI("Found orphaned Changes in the cache - Discarding.");
- }
-
- rtl::Reference<CacheLoadingAccess> aRemoved = m_aCacheMap.remove(_aOptions);
-
- if (aRemoved.is())
- {
- // got it out of reachability - now dispose/notify without lock
- implDisposeOne(aRemoved, _aOptions, _bFlushUpdates);
- }
- else
- CFG_TRACE_INFO_NI("- No affected TreeInfo found" );
-}
-
-// -------------------------------------------------------------------------
-void CacheController::disposeUser(RequestOptions const & _aUserOptions, bool _bFlushUpdates)
-{
- CFG_TRACE_INFO("CacheController: Disposing data and TreeInfo(s) for user '%s'",
- OUSTRING2ASCII(_aUserOptions.getEntity()) );
-
- std::vector< std::pair< RequestOptions, rtl::Reference<CacheLoadingAccess> > > aDisposeList;
- // collect the ones to dispose
- {
- rtl::OUString sUser = _aUserOptions.getEntity();
- OSL_ASSERT(sUser.getLength());
-
- // This depends on the fact that Options are sorted (by struct ltOptions)
- // so that all options belonging to one user are together
- // (and that options with only a user set, sort first)
-
- CacheMap::Map aCacheData;
- m_aCacheMap.swap(aCacheData);
-
- // find the lower_bound of all options for the user
- CacheMap::Map::iterator const aFirst = aCacheData.lower_bound(_aUserOptions);
-
- // find the upper_bound of all options for the user (using the lower one)
- CacheMap::Map::iterator aLast = aFirst;
- while (aLast != aCacheData.end() && aLast->first.getEntity() == sUser)
- ++aLast;
-
- if (aFirst != aLast)
- {
- aDisposeList.reserve( std::distance(aFirst, aLast) );
-
- bool bHasPendingChanges = false;
-
- for (CacheMap::Map::iterator it = aFirst; it != aLast; ++it)
- {
- CFG_TRACE_INFO_NI("- Found TreeInfo for locale '%s'", OUSTRING2ASCII(it->first.getLocale()) );
- m_pDisposer->clearTasks(it->first);
-
- if (m_pCacheWriter->clearTasks(it->first))
- bHasPendingChanges = true;
-
- OSL_ASSERT(it->second.is());
- if (it->second.is())
- {
- //aDisposeList.push_back( *it );
- aDisposeList.push_back( std::make_pair(it->first,it->second) );
- }
- }
-
- if (!bHasPendingChanges)
- _bFlushUpdates = false;
-
- else if (!_bFlushUpdates)
- CFG_TRACE_WARNING_NI("Found orphaned Changes in the cache - Discarding.");
-
- aCacheData.erase(aFirst, aLast);
- }
- else
- CFG_TRACE_INFO_NI("- No affected TreeInfo found" );
-
- // replace the data into the map
- m_aCacheMap.swap(aCacheData);
- }
-
- // got all out of external reach - now dispose/notify without lock
- for (std::vector< std::pair< RequestOptions, rtl::Reference<CacheLoadingAccess> > >::iterator i = aDisposeList.begin(); i != aDisposeList.end(); ++i)
- {
- if (i->second.is())
- implDisposeOne(i->second, i->first, _bFlushUpdates);
- }
-}
-
-// -------------------------------------------------------------------------
-void CacheController::implDisposeOne(rtl::Reference<CacheLoadingAccess> const & _aDisposedCache, RequestOptions const & _aOptions, bool _bFlushUpdates)
-{
- OSL_ASSERT(_aDisposedCache.is());
- CFG_TRACE_INFO("Now removing Cache section (user '%s' with locale '%s')",
- OUSTRING2ASCII(_aOptions.getEntity()), OUSTRING2ASCII(_aOptions.getLocale()) );
-
- if (_bFlushUpdates) try
- {
- CFG_TRACE_INFO_NI("- Flushing pending changes" );
-
- if ( !this->saveAllPendingChanges(_aDisposedCache,_aOptions) )
- {
- CFG_TRACE_ERROR_NI("- Error while flushing - changes will be lost" );
- OSL_ENSURE(false,"Error while flushing changes from discarded Cache section - changes will be lost" );
- }
- }
- catch (uno::Exception& e)
- {
- (void)e;
- CFG_TRACE_ERROR_NI("- Failed with exception %s (ignoring here)", OUSTRING2ASCII(e.Message) );
- }
-
- std::vector< rtl::Reference<CacheLine> > aDisposedList;
- _aDisposedCache->clearData(aDisposedList);
-
- if (aDisposedList.size() > 0)
- {
- CFG_TRACE_INFO_NI("- Closing %d modules at the session",int(aDisposedList.size()));
- this->closeModules(aDisposedList,_aOptions);
- }
-}
-
-// -------------------------------------------------------------------------
CacheController::CacheController(rtl::Reference< backend::IMergedDataProvider > const & _xBackend,
const uno::Reference<uno::XComponentContext>& xContext)
: m_aNotifier()
diff --git a/configmgr/source/treecache/cachecontroller.hxx b/configmgr/source/treecache/cachecontroller.hxx
index e62f82f9ae..bf6ca4b85e 100644
--- a/configmgr/source/treecache/cachecontroller.hxx
+++ b/configmgr/source/treecache/cachecontroller.hxx
@@ -311,9 +311,6 @@ namespace configmgr
// disposing
void disposeAll(bool _bFlushRemainingUpdates);
- void disposeOne(RequestOptions const & _aOptions, bool _bFlushUpdates = true);
- void disposeUser(RequestOptions const & _aUserOptions, bool _bFlushUpdates = true);
- void implDisposeOne(rtl::Reference<CacheLoadingAccess> const & _aCache, RequestOptions const & _aOptions, bool _bFlushUpdates);
void closeModules(std::vector< rtl::Reference<CacheLine> > & _aList, RequestOptions const & _aOptions);
private:
diff --git a/configmgr/source/treecache/cachemulticaster.cxx b/configmgr/source/treecache/cachemulticaster.cxx
index d5c0e9a1ec..12e900fe76 100644
--- a/configmgr/source/treecache/cachemulticaster.cxx
+++ b/configmgr/source/treecache/cachemulticaster.cxx
@@ -52,20 +52,7 @@ namespace configmgr
namespace
{
// manually implemented helpers, as rtl::References don't work well with std binders
-// ---------------------------------------------------------------------------
-
- // replacing std::bind2nd( std::mem_fun(&aFunc), aArg )
- struct NotifyDisposing : std::unary_function<rtl::Reference<TreeManager>,void>
- {
- CacheController & m_arg;
- NotifyDisposing(CacheController * _pProvider) SAL_THROW(())
- : m_arg(*_pProvider)
- {}
-
- void operator()(rtl::Reference<TreeManager> const & _xListener) const SAL_THROW(())
- { _xListener->disposing(m_arg); }
- };
// ---------------------------------------------------------------------------
// replacing std::bind2nd( std::mem_fun(&TreeManager::componentCreated), _aComponentName )
diff --git a/configmgr/source/treecache/disposetimer.cxx b/configmgr/source/treecache/disposetimer.cxx
index cabe6f39bc..c8afe1270a 100644
--- a/configmgr/source/treecache/disposetimer.cxx
+++ b/configmgr/source/treecache/disposetimer.cxx
@@ -77,25 +77,6 @@ bool equivalentOptions(RequestOptions const& lhs, RequestOptions const& rhs)
}
// -------------------------------------------------------------------------
-void OTreeDisposeScheduler::clearTasks(RequestOptions const& _aOptions)
-{
- CFG_TRACE_INFO("Cancelling all data cleanup tasks for user '%s' with locale '%s'",
- OUSTRING2ASCII(_aOptions.getEntity()),
- OUSTRING2ASCII(_aOptions.getLocale()));
-
- Agenda::iterator it = m_aAgenda.begin();
- while(it != m_aAgenda.end())
- {
- Agenda::iterator cur = it++;
- if (equivalentOptions(_aOptions,cur->second))
- {
- m_aAgenda.erase(cur);
- CFG_TRACE_INFO_NI("- One pending task canceled");
- }
- }
-}
-// -------------------------------------------------------------------------
-
void OTreeDisposeScheduler::stopAndClearTasks()
{
CFG_TRACE_INFO("Cancelling all data cleanup tasks, Stopping Cleanup timer");
diff --git a/configmgr/source/treecache/disposetimer.hxx b/configmgr/source/treecache/disposetimer.hxx
index 2f3beece63..b9ee058321 100644
--- a/configmgr/source/treecache/disposetimer.hxx
+++ b/configmgr/source/treecache/disposetimer.hxx
@@ -143,9 +143,6 @@ namespace configmgr
/// ensure this will execute cleanup duties for _xOptions (no later than after getCleanupDelay() has elapsed)
void scheduleCleanup(RequestOptions const & _aOptions);
- /// stop and discard pending activities for _xOptions
- void clearTasks(RequestOptions const & _aOptions);
-
/// stop and discard pending activities
void stopAndClearTasks();
diff --git a/configmgr/source/treecache/treemanager.cxx b/configmgr/source/treecache/treemanager.cxx
index 221939aba0..44b36bf53a 100644
--- a/configmgr/source/treecache/treemanager.cxx
+++ b/configmgr/source/treecache/treemanager.cxx
@@ -494,13 +494,6 @@ void TreeManager::nodeUpdated(TreeChangeList& _rChanges)
// ----------------------------------------------------------------------------
-void TreeManager::disposing(backend::CacheController & /*_rProvider*/) SAL_THROW(())
-{
- CFG_TRACE_INFO("TreeManager: provider is being disposed");
- this->dispose();
-}
-// ----------------------------------------------------------------------------
-
void TreeManager::componentCreated(backend::ComponentRequest const & ) SAL_THROW(())
{
CFG_TRACE_INFO("TreeManager: component was created");
diff --git a/configmgr/source/treemgr/configgroup.cxx b/configmgr/source/treemgr/configgroup.cxx
index eb0fd3a1cc..5420a61394 100644
--- a/configmgr/source/treemgr/configgroup.cxx
+++ b/configmgr/source/treemgr/configgroup.cxx
@@ -353,12 +353,6 @@ bool GroupDefaulter::ensureDataAvailable(rtl::Reference< Tree > const& _aParentT
}
//-----------------------------------------------------------------------------
-bool GroupDefaulter::isDataAvailable()
-{
- return m_aHelper.tree()->areValueDefaultsAvailable(m_aHelper.node());
-}
-//-----------------------------------------------------------------------------
-
NodeChange GroupDefaulter::validateSetToDefaultValue(ValueRef const& aValueNode)
{
m_aHelper.validateNode(aValueNode);
diff --git a/configmgr/source/treemgr/nodechange.cxx b/configmgr/source/treemgr/nodechange.cxx
index 139838976f..cfffd7cc15 100644
--- a/configmgr/source/treemgr/nodechange.cxx
+++ b/configmgr/source/treemgr/nodechange.cxx
@@ -142,27 +142,7 @@ bool NodeChange::getChangeLocation(NodeChangeLocation& rLoc) const
{
return m_pImpl && m_pImpl->fillChangeLocation(rLoc);
}
-//-----------------------------------------------------------------------------
-
-rtl::Reference< Tree > NodeChange::getBaseTree() const
-{
- return m_pImpl->getTargetTree().get();
-}
-//-----------------------------------------------------------------------------
-
-// retrieve the tree where the change is actually taking place
-NodeRef NodeChange::getBaseNode() const
-{
- rtl::Reference<Tree> aTree = m_pImpl->getTargetTree();
- unsigned int nOffset = m_pImpl->getTargetNode();
-
- OSL_ASSERT(aTree.is() && aTree->isValidNode(nOffset));
- if (aTree.is() && nOffset)
- return aTree->getNode(nOffset);
-
- return NodeRef();
-}
//-----------------------------------------------------------------------------
// retrieve the tree where the change is actually taking place
@@ -192,17 +172,6 @@ NodeRef NodeChange::getAffectedNode() const
}
//-----------------------------------------------------------------------------
-NodeID NodeChange::getAffectedNodeID() const
-{
- rtl::Reference<Tree> aTree = m_pImpl->getTargetTree();
- unsigned int nOffset = m_pImpl->getTargetNode();
-
- OSL_ASSERT(aTree.is() ? aTree->isValidNode(nOffset) : 0==nOffset);
-
- return NodeID(aTree.get(),nOffset);
-}
-//-----------------------------------------------------------------------------
-
NodeChange& NodeChange::test()
{
if (m_pImpl) m_pImpl->test();
@@ -270,28 +239,13 @@ void NodeChanges::implTest() const
}
}
//-----------------------------------------------------------------------------
-void NodeChanges::implApply() const
-{
- for(std::vector<NodeChange>::const_iterator it = begin(), stop = end(); it != stop; ++it)
- {
- it ->apply();
- }
-}
-//-----------------------------------------------------------------------------
/** insert a change into this collection
*/
void NodeChanges::add(NodeChange const& aChange)
{
m_aChanges.push_back(aChange);
}
-//-----------------------------------------------------------------------------
-/** insert multiple changes into this collection
-*/
-void NodeChanges::add(NodeChanges const& aChanges)
-{
- m_aChanges.insert(m_aChanges.end(),aChanges.begin(),aChanges.end());
-}
//-----------------------------------------------------------------------------
/** removes a change to <var>aNode</var> from this collection (if there is one)
diff --git a/configmgr/source/treemgr/noderef.cxx b/configmgr/source/treemgr/noderef.cxx
index 7b2c36ba71..c7aeeca267 100644
--- a/configmgr/source/treemgr/noderef.cxx
+++ b/configmgr/source/treemgr/noderef.cxx
@@ -422,13 +422,6 @@ bool SubNodeID::isValidNode() const
}
//-----------------------------------------------------------------------------
-// hashing
-size_t SubNodeID::hashCode() const
-{
- return m_aParentID.hashCode() + 5*m_sNodeName.hashCode();
-}
-//-----------------------------------------------------------------------------
-
bool operator < (SubNodeID const& lhs, SubNodeID const& rhs)
{
if (lhs.m_aParentID == rhs.m_aParentID)
diff --git a/configmgr/source/treemgr/setnodeimpl.hxx b/configmgr/source/treemgr/setnodeimpl.hxx
index 3134b7826a..ba1bfaafd9 100644
--- a/configmgr/source/treemgr/setnodeimpl.hxx
+++ b/configmgr/source/treemgr/setnodeimpl.hxx
@@ -108,8 +108,19 @@ namespace configmgr
class ElementSet
{
+ struct FastLess
+ {
+ bool operator ()(
+ rtl::OUString const & a, rtl::OUString const & b) const
+ {
+ // first sort by length; order is immaterial, and it is fast
+ return a.getLength() == b.getLength()
+ ? a < b : a.getLength() < b.getLength();
+ }
+ };
+
public:
- typedef std::map<rtl::OUString, ElementTreeData> Data;
+ typedef std::map<rtl::OUString, ElementTreeData, FastLess> Data;
// the following must be implemented by derived classes
bool isEmpty() const { return m_aData.empty(); }
diff --git a/configmgr/source/treemgr/treeimpl.cxx b/configmgr/source/treemgr/treeimpl.cxx
index 3520e525ee..ec0e3afece 100644
--- a/configmgr/source/treemgr/treeimpl.cxx
+++ b/configmgr/source/treemgr/treeimpl.cxx
@@ -470,6 +470,7 @@ bool Tree::isValidValueNode(ValueRef const & value) {
return true;
}
+#if OSL_DEBUG_LEVEL > 0
bool Tree::isValidAnyNode(AnyNodeRef const & node) {
OSL_ASSERT(nodeCount() != 0);
return node.isValid() && isValidNode(node.m_nUsedPos) &&
@@ -477,6 +478,7 @@ bool Tree::isValidAnyNode(AnyNodeRef const & node) {
(view::ViewTreeAccess(this).isGroupNodeAt(node.m_nUsedPos) &&
getMemberNode(node.toValue()).isValid()));
}
+#endif
bool Tree::hasElements(NodeRef const & node) {
OSL_ASSERT(