summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-08 00:13:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-08 13:04:49 +0100
commitcb64bcb4ae4918b4f132c44fa30449bf671f23b1 (patch)
tree953fc87d3dccddb05553093f36a0d6b014d23482 /unotools
parent8a3cdcdc5d705b55173b611305e2e088cab75a7d (diff)
callcatcher: ditch some more methods
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/atom.hxx14
-rw-r--r--unotools/inc/unotools/configitem.hxx6
-rw-r--r--unotools/source/config/configitem.cxx23
-rw-r--r--unotools/source/misc/atom.cxx96
4 files changed, 0 insertions, 139 deletions
diff --git a/unotools/inc/unotools/atom.hxx b/unotools/inc/unotools/atom.hxx
index c6cff2529343..714355fea147 100644
--- a/unotools/inc/unotools/atom.hxx
+++ b/unotools/inc/unotools/atom.hxx
@@ -112,20 +112,6 @@ namespace utl {
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::AtomDescription > SAL_CALL getRecentAtoms( sal_Int32 atomClass, sal_Int32 atom ) throw();
virtual sal_Int32 SAL_CALL getAtom( sal_Int32 atomClass, const ::rtl::OUString& description, sal_Bool create ) throw();
};
-
- class AtomClient
- {
- private:
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XAtomServer > m_xServer;
- MultiAtomProvider m_aProvider;
- public:
- AtomClient( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XAtomServer >& );
- ~AtomClient();
-
- void updateAtomClasses( const ::com::sun::star::uno::Sequence< sal_Int32 >& atomClasses );
- int getAtom( int atomClass, const ::rtl::OUString& description, sal_Bool bCreate );
- const ::rtl::OUString& getString( int atomClass, int atom );
- };
}
#endif
diff --git a/unotools/inc/unotools/configitem.hxx b/unotools/inc/unotools/configitem.hxx
index dd1ab6964b93..1b1558d024b4 100644
--- a/unotools/inc/unotools/configitem.hxx
+++ b/unotools/inc/unotools/configitem.hxx
@@ -117,7 +117,6 @@ namespace utl
protected:
ConfigItem(const rtl::OUString &rSubTree,
sal_Int16 nMode = CONFIG_MODE_DELAYED_UPDATE);
- ConfigItem(utl::ConfigManager& rManager, const rtl::OUString rSubTree);
void SetModified (); // mark item as modified
void ClearModified(); // reset state after commit!
@@ -189,11 +188,6 @@ namespace utl
/** is called from the ConfigManager if it is destroyed before the ConfigItem. */
void ReleaseConfigMgr();
- /** enable locking of the XHierarchicalNameAccess if CONFIG_MODE_RELEASE_TREE is set to
- prevent multiple calls ConfigManager::AcquireTree() from a single Commit() operation*/
- void LockTree();
- void UnlockTree();
-
const rtl::OUString& GetSubTreeName() const {return sSubTree;}
sal_Bool IsModified() const;
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 0832b203ab2c..254b91891227 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -237,15 +237,6 @@ ConfigItem::ConfigItem(const OUString &rSubTree, sal_Int16 nSetMode ) :
pImpl->nMode &= ~CONFIG_MODE_PROPAGATE_ERRORS;
}
-ConfigItem::ConfigItem(utl::ConfigManager& rManager, const rtl::OUString rSubTree) :
- sSubTree(rSubTree),
- pImpl(new ConfigItem_Impl)
-{
- pImpl->pManager = &rManager;
- pImpl->nMode = CONFIG_MODE_IMMEDIATE_UPDATE; // does not allow exceptions
- m_xHierarchyAccess = pImpl->pManager->AddConfigItem(*this);
-}
-
sal_Bool ConfigItem::IsValidConfigMgr() const
{
return ( pImpl->pManager && pImpl->pManager->GetConfigurationProvider().is() );
@@ -1327,18 +1318,4 @@ Reference< XHierarchicalNameAccess> ConfigItem::GetTree()
return xRet;
}
-void ConfigItem::LockTree()
-{
- OSL_ENSURE(0 != (pImpl->nMode&CONFIG_MODE_RELEASE_TREE), "call LockTree in CONFIG_MODE_RELEASE_TREE mode, only");
- m_xHierarchyAccess = GetTree();
-}
-
-void ConfigItem::UnlockTree()
-{
- OSL_ENSURE(0 != (pImpl->nMode&CONFIG_MODE_RELEASE_TREE), "call UnlockTree in CONFIG_MODE_RELEASE_TREE mode, only");
- if(0 != (pImpl->nMode&CONFIG_MODE_RELEASE_TREE))
- m_xHierarchyAccess = 0;
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unotools/source/misc/atom.cxx b/unotools/source/misc/atom.cxx
index d8bf5bbfa053..b54c7da965c4 100644
--- a/unotools/source/misc/atom.cxx
+++ b/unotools/source/misc/atom.cxx
@@ -287,100 +287,4 @@ Sequence< ::rtl::OUString > AtomServer::getAtomDescriptions( const Sequence< Ato
return aRet;
}
-// -----------------------------------------------------------------------
-
-AtomClient::AtomClient( const Reference< XAtomServer >& xServer ) :
- m_xServer( xServer )
-{
-}
-
-AtomClient::~AtomClient()
-{
-}
-
-int AtomClient::getAtom( int atomClass, const ::rtl::OUString& description, sal_Bool bCreate )
-{
- int nAtom = m_aProvider.getAtom( atomClass, description, sal_False );
- if( nAtom == INVALID_ATOM && bCreate )
- {
- try
- {
- nAtom = m_xServer->getAtom( atomClass, description, bCreate );
- }
- catch( RuntimeException& )
- {
- return INVALID_ATOM;
- }
- if( nAtom != INVALID_ATOM )
- m_aProvider.overrideAtom( atomClass, nAtom, description );
- }
- return nAtom;
-}
-
-const ::rtl::OUString& AtomClient::getString( int atomClass, int atom )
-{
- static ::rtl::OUString aEmpty;
-
- if( ! m_aProvider.hasAtom( atomClass, atom ) )
- {
- Sequence< NMSP_UTIL::AtomDescription > aSeq;
- try
- {
- aSeq = m_xServer->getRecentAtoms( atomClass, m_aProvider.getLastAtom( atomClass ) );
- }
- catch( RuntimeException& )
- {
- return aEmpty;
- }
- const NMSP_UTIL::AtomDescription* pDescriptions = aSeq.getConstArray();
- for( int i = 0; i < aSeq.getLength(); i++ )
- m_aProvider.overrideAtom( atomClass,
- pDescriptions[i].atom,
- pDescriptions[i].description
- );
-
- if( ! m_aProvider.hasAtom( atomClass, atom ) )
- {
- // holes may occur by the above procedure!
- Sequence< AtomClassRequest > aReq( 1 );
- aReq.getArray()[0].atomClass = atomClass;
- aReq.getArray()[0].atoms.realloc( 1 );
- aReq.getArray()[0].atoms.getArray()[0] = atom;
- Sequence< ::rtl::OUString > aRet;
- try
- {
- aRet = m_xServer->getAtomDescriptions( aReq );
- }
- catch( RuntimeException& )
- {
- return aEmpty;
- }
- if( aRet.getLength() == 1 )
- m_aProvider.overrideAtom( atomClass, atom, aRet.getConstArray()[0] );
- }
- }
- return m_aProvider.getString( atomClass, atom );
-}
-
-void AtomClient::updateAtomClasses( const Sequence< sal_Int32 >& atomClasses )
-{
- Sequence< Sequence< NMSP_UTIL::AtomDescription > > aUpdate;
- try
- {
- aUpdate = m_xServer->getClasses( atomClasses );
- }
- catch( RuntimeException& )
- {
- return;
- }
- for( int i = 0; i < atomClasses.getLength(); i++ )
- {
- int nClass = atomClasses.getConstArray()[i];
- const Sequence< NMSP_UTIL::AtomDescription >& rClass = aUpdate.getConstArray()[i];
- const NMSP_UTIL::AtomDescription* pDesc = rClass.getConstArray();
- for( int n = 0; n < rClass.getLength(); n++, pDesc++ )
- m_aProvider.overrideAtom( nClass, pDesc->atom, pDesc->description );
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */