summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-24 11:02:42 +0200
committerNoel Grandin <noel@peralex.com>2016-05-24 11:02:42 +0200
commit95d20a3799998b9816bd2e8aebdbc96c61cead3e (patch)
tree8206ecc848631432cb8b027d5e780483734f808a /stoc
parent3caf31b05d7bbf3d50a1bbda6c8b95982cb5c2b5 (diff)
Revert "remove some manual ref-counting"
until I have a better understanding of the UNO reference counting. This reverts commit 111de438ea3e512a541281dc0716cc728ea8d152.
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/defaultregistry/defaultregistry.cxx158
1 files changed, 82 insertions, 76 deletions
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index 5241a0e99959..5637d55f439f 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -139,7 +139,7 @@ protected:
OUString m_name;
sal_uInt32 m_state;
- css::uno::Reference<NestedRegistryImpl> m_xRegistry;
+ NestedRegistryImpl* m_pRegistry;
Reference<XRegistryKey> m_localKey;
Reference<XRegistryKey> m_defaultKey;
};
@@ -148,8 +148,10 @@ protected:
NestedKeyImpl::NestedKeyImpl( NestedRegistryImpl* pDefaultRegistry,
Reference<XRegistryKey>& localKey,
Reference<XRegistryKey>& defaultKey )
- : m_xRegistry(pDefaultRegistry)
+ : m_pRegistry(pDefaultRegistry)
{
+ m_pRegistry->acquire();
+
m_localKey = localKey;
m_defaultKey = defaultKey;
@@ -162,14 +164,16 @@ NestedKeyImpl::NestedKeyImpl( NestedRegistryImpl* pDefaultRegistry,
m_name = m_defaultKey->getKeyName();
}
- m_state = m_xRegistry->m_state;
+ m_state = m_pRegistry->m_state;
}
NestedKeyImpl::NestedKeyImpl( const OUString& rKeyName,
NestedKeyImpl* pKey)
- : m_xRegistry(pKey->m_xRegistry)
+ : m_pRegistry(pKey->m_pRegistry)
{
+ m_pRegistry->acquire();
+
if (pKey->m_localKey.is() && pKey->m_localKey->isValid())
{
m_localKey = pKey->m_localKey->openKey(rKeyName);
@@ -188,21 +192,23 @@ NestedKeyImpl::NestedKeyImpl( const OUString& rKeyName,
m_name = m_defaultKey->getKeyName();
}
- m_state = m_xRegistry->m_state;
+ m_state = m_pRegistry->m_state;
}
NestedKeyImpl::~NestedKeyImpl()
{
+ if ( m_pRegistry )
+ m_pRegistry->release();
}
void NestedKeyImpl::computeChanges()
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
- if ( m_state != m_xRegistry->m_state )
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
+ if ( m_state != m_pRegistry->m_state )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
Reference<XRegistryKey> tmpKey = rootKey->openKey(m_name);
@@ -211,7 +217,7 @@ void NestedKeyImpl::computeChanges()
m_localKey = rootKey->openKey(m_name);
}
- m_state = m_xRegistry->m_state;
+ m_state = m_pRegistry->m_state;
}
}
@@ -222,7 +228,7 @@ OUString NestedKeyImpl::computeName(const OUString& name)
{
OUString resLocalName, resDefaultName;
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
try
{
if ( m_localKey.is() && m_localKey->isValid() )
@@ -234,10 +240,10 @@ OUString NestedKeyImpl::computeName(const OUString& name)
return m_defaultKey->getResolvedName(name);
}
- if ( !resLocalName.isEmpty() && m_xRegistry->m_defaultReg->isValid() )
+ if ( !resLocalName.isEmpty() && m_pRegistry->m_defaultReg->isValid() )
{
- Reference<XRegistryKey> localRoot(m_xRegistry->m_localReg->getRootKey());
- Reference<XRegistryKey> defaultRoot(m_xRegistry->m_defaultReg->getRootKey());
+ Reference<XRegistryKey> localRoot(m_pRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> defaultRoot(m_pRegistry->m_defaultReg->getRootKey());
resDefaultName = defaultRoot->getResolvedName(resLocalName);
@@ -265,7 +271,7 @@ OUString NestedKeyImpl::computeName(const OUString& name)
OUString SAL_CALL NestedKeyImpl::getKeyName() throw(RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
return m_name;
}
@@ -273,7 +279,7 @@ OUString SAL_CALL NestedKeyImpl::getKeyName() throw(RuntimeException, std::excep
sal_Bool SAL_CALL NestedKeyImpl::isReadOnly( )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -285,7 +291,7 @@ sal_Bool SAL_CALL NestedKeyImpl::isReadOnly( )
sal_Bool SAL_CALL NestedKeyImpl::isValid( ) throw(RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
return ((m_localKey.is() && m_localKey->isValid()) ||
(m_defaultKey.is() && m_defaultKey->isValid()) );
}
@@ -294,7 +300,7 @@ sal_Bool SAL_CALL NestedKeyImpl::isValid( ) throw(RuntimeException, std::except
RegistryKeyType SAL_CALL NestedKeyImpl::getKeyType( const OUString& rKeyName )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -313,7 +319,7 @@ RegistryKeyType SAL_CALL NestedKeyImpl::getKeyType( const OUString& rKeyName )
RegistryValueType SAL_CALL NestedKeyImpl::getValueType( )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -332,7 +338,7 @@ RegistryValueType SAL_CALL NestedKeyImpl::getValueType( )
sal_Int32 SAL_CALL NestedKeyImpl::getLongValue( )
throw(InvalidRegistryException, InvalidValueException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -353,7 +359,7 @@ sal_Int32 SAL_CALL NestedKeyImpl::getLongValue( )
void SAL_CALL NestedKeyImpl::setLongValue( sal_Int32 value )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -362,10 +368,10 @@ void SAL_CALL NestedKeyImpl::setLongValue( sal_Int32 value )
}
else if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
m_localKey = rootKey->createKey(m_name);
m_localKey->setLongValue(value);
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
}
else
{
@@ -377,7 +383,7 @@ void SAL_CALL NestedKeyImpl::setLongValue( sal_Int32 value )
Sequence< sal_Int32 > SAL_CALL NestedKeyImpl::getLongListValue( )
throw(InvalidRegistryException, InvalidValueException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -398,7 +404,7 @@ Sequence< sal_Int32 > SAL_CALL NestedKeyImpl::getLongListValue( )
void SAL_CALL NestedKeyImpl::setLongListValue( const Sequence< sal_Int32 >& seqValue )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -407,10 +413,10 @@ void SAL_CALL NestedKeyImpl::setLongListValue( const Sequence< sal_Int32 >& seqV
}
else if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
m_localKey = rootKey->createKey(m_name);
m_localKey->setLongListValue(seqValue);
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
}
else
{
@@ -422,7 +428,7 @@ void SAL_CALL NestedKeyImpl::setLongListValue( const Sequence< sal_Int32 >& seqV
OUString SAL_CALL NestedKeyImpl::getAsciiValue( )
throw(InvalidRegistryException, InvalidValueException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -443,7 +449,7 @@ OUString SAL_CALL NestedKeyImpl::getAsciiValue( )
void SAL_CALL NestedKeyImpl::setAsciiValue( const OUString& value )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -452,10 +458,10 @@ void SAL_CALL NestedKeyImpl::setAsciiValue( const OUString& value )
}
else if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
m_localKey = rootKey->createKey(m_name);
m_localKey->setAsciiValue(value);
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
}
else
{
@@ -467,7 +473,7 @@ void SAL_CALL NestedKeyImpl::setAsciiValue( const OUString& value )
Sequence< OUString > SAL_CALL NestedKeyImpl::getAsciiListValue( )
throw(InvalidRegistryException, InvalidValueException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -488,7 +494,7 @@ Sequence< OUString > SAL_CALL NestedKeyImpl::getAsciiListValue( )
void SAL_CALL NestedKeyImpl::setAsciiListValue( const Sequence< OUString >& seqValue )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -497,10 +503,10 @@ void SAL_CALL NestedKeyImpl::setAsciiListValue( const Sequence< OUString >& seqV
}
else if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
m_localKey = rootKey->createKey(m_name);
m_localKey->setAsciiListValue(seqValue);
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
}
else
{
@@ -512,7 +518,7 @@ void SAL_CALL NestedKeyImpl::setAsciiListValue( const Sequence< OUString >& seqV
OUString SAL_CALL NestedKeyImpl::getStringValue( )
throw(InvalidRegistryException, InvalidValueException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -533,7 +539,7 @@ OUString SAL_CALL NestedKeyImpl::getStringValue( )
void SAL_CALL NestedKeyImpl::setStringValue( const OUString& value )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -542,10 +548,10 @@ void SAL_CALL NestedKeyImpl::setStringValue( const OUString& value )
}
else if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
m_localKey = rootKey->createKey(m_name);
m_localKey->setStringValue(value);
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
}
else
{
@@ -557,7 +563,7 @@ void SAL_CALL NestedKeyImpl::setStringValue( const OUString& value )
Sequence< OUString > SAL_CALL NestedKeyImpl::getStringListValue( )
throw(InvalidRegistryException, InvalidValueException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -578,7 +584,7 @@ Sequence< OUString > SAL_CALL NestedKeyImpl::getStringListValue( )
void SAL_CALL NestedKeyImpl::setStringListValue( const Sequence< OUString >& seqValue )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -587,10 +593,10 @@ void SAL_CALL NestedKeyImpl::setStringListValue( const Sequence< OUString >& seq
}
else if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
m_localKey = rootKey->createKey(m_name);
m_localKey->setStringListValue(seqValue);
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
}
else
{
@@ -602,7 +608,7 @@ void SAL_CALL NestedKeyImpl::setStringListValue( const Sequence< OUString >& seq
Sequence< sal_Int8 > SAL_CALL NestedKeyImpl::getBinaryValue( )
throw(InvalidRegistryException, InvalidValueException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -623,7 +629,7 @@ Sequence< sal_Int8 > SAL_CALL NestedKeyImpl::getBinaryValue( )
void SAL_CALL NestedKeyImpl::setBinaryValue( const Sequence< sal_Int8 >& value )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
computeChanges();
if ( m_localKey.is() && m_localKey->isValid() )
@@ -632,10 +638,10 @@ void SAL_CALL NestedKeyImpl::setBinaryValue( const Sequence< sal_Int8 >& value )
}
else if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
m_localKey = rootKey->createKey(m_name);
m_localKey->setBinaryValue(value);
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
}
else
{
@@ -647,7 +653,7 @@ void SAL_CALL NestedKeyImpl::setBinaryValue( const Sequence< sal_Int8 >& value )
Reference< XRegistryKey > SAL_CALL NestedKeyImpl::openKey( const OUString& aKeyName )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
if ( !m_localKey.is() && !m_defaultKey.is() )
{
throw InvalidRegistryException();
@@ -662,16 +668,16 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::openKey( const OUString& aKeyN
if ( m_localKey.is() && m_localKey->isValid() )
{
- localKey = m_xRegistry->m_localReg->getRootKey()->openKey(resolvedName);
+ localKey = m_pRegistry->m_localReg->getRootKey()->openKey(resolvedName);
}
if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- defaultKey = m_xRegistry->m_defaultReg->getRootKey()->openKey(resolvedName);
+ defaultKey = m_pRegistry->m_defaultReg->getRootKey()->openKey(resolvedName);
}
if ( localKey.is() || defaultKey.is() )
{
- return static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey));
+ return static_cast<XRegistryKey*>(new NestedKeyImpl(m_pRegistry, localKey, defaultKey));
}
else
{
@@ -683,7 +689,7 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::openKey( const OUString& aKeyN
Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKeyName )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
if ( (!m_localKey.is() && !m_defaultKey.is()) ||
(m_localKey.is() && m_localKey->isReadOnly()) )
{
@@ -699,17 +705,17 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKe
{
Reference<XRegistryKey> localKey, defaultKey;
- localKey = m_xRegistry->m_localReg->getRootKey()->createKey(resolvedName);
+ localKey = m_pRegistry->m_localReg->getRootKey()->createKey(resolvedName);
if ( localKey.is() )
{
if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- defaultKey = m_xRegistry->m_defaultReg->getRootKey()->openKey(resolvedName);
+ defaultKey = m_pRegistry->m_defaultReg->getRootKey()->openKey(resolvedName);
}
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
- return (static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey)));
+ return (static_cast<XRegistryKey*>(new NestedKeyImpl(m_pRegistry, localKey, defaultKey)));
}
}
else
@@ -718,18 +724,18 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKe
if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
m_localKey = rootKey->createKey(m_name);
- localKey = m_xRegistry->m_localReg->getRootKey()->createKey(resolvedName);
+ localKey = m_pRegistry->m_localReg->getRootKey()->createKey(resolvedName);
if ( localKey.is() )
{
- defaultKey = m_xRegistry->m_defaultReg->getRootKey()->openKey(resolvedName);
+ defaultKey = m_pRegistry->m_defaultReg->getRootKey()->openKey(resolvedName);
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
- return (static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey)));
+ return (static_cast<XRegistryKey*>(new NestedKeyImpl(m_pRegistry, localKey, defaultKey)));
}
}
}
@@ -741,7 +747,7 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKe
void SAL_CALL NestedKeyImpl::closeKey( )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
if ( m_localKey.is() && m_localKey->isValid() )
{
m_localKey->closeKey();
@@ -756,7 +762,7 @@ void SAL_CALL NestedKeyImpl::closeKey( )
void SAL_CALL NestedKeyImpl::deleteKey( const OUString& rKeyName )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
if ( m_localKey.is() && m_localKey->isValid() &&
!m_localKey->isReadOnly() )
{
@@ -767,7 +773,7 @@ void SAL_CALL NestedKeyImpl::deleteKey( const OUString& rKeyName )
throw InvalidRegistryException();
}
- m_xRegistry->m_localReg->getRootKey()->deleteKey(resolvedName);
+ m_pRegistry->m_localReg->getRootKey()->deleteKey(resolvedName);
}
else
{
@@ -779,7 +785,7 @@ void SAL_CALL NestedKeyImpl::deleteKey( const OUString& rKeyName )
Sequence< Reference< XRegistryKey > > SAL_CALL NestedKeyImpl::openKeys( )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
if ( !m_localKey.is() && !m_defaultKey.is() )
{
throw InvalidRegistryException();
@@ -858,7 +864,7 @@ Sequence< Reference< XRegistryKey > > SAL_CALL NestedKeyImpl::openKeys( )
Sequence< OUString > SAL_CALL NestedKeyImpl::getKeyNames( )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
if ( !m_localKey.is() && !m_defaultKey.is() )
{
throw InvalidRegistryException();
@@ -924,7 +930,7 @@ Sequence< OUString > SAL_CALL NestedKeyImpl::getKeyNames( )
sal_Bool SAL_CALL NestedKeyImpl::createLink( const OUString& aLinkName, const OUString& aLinkTarget )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
bool isCreated = false;
if ( !m_localKey.is() && !m_defaultKey.is() )
@@ -959,21 +965,21 @@ sal_Bool SAL_CALL NestedKeyImpl::createLink( const OUString& aLinkName, const OU
if ( m_localKey.is() && m_localKey->isValid() )
{
- isCreated = m_xRegistry->m_localReg->getRootKey()->createLink(resolvedName, aLinkTarget);
+ isCreated = m_pRegistry->m_localReg->getRootKey()->createLink(resolvedName, aLinkTarget);
}
else
{
if ( m_defaultKey.is() && m_defaultKey->isValid() )
{
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ Reference<XRegistryKey> rootKey(m_pRegistry->m_localReg->getRootKey());
m_localKey = rootKey->createKey(m_name);
- isCreated = m_xRegistry->m_localReg->getRootKey()->createLink(resolvedName, aLinkTarget);
+ isCreated = m_pRegistry->m_localReg->getRootKey()->createLink(resolvedName, aLinkTarget);
}
}
if ( isCreated )
- m_state = m_xRegistry->m_state++;
+ m_state = m_pRegistry->m_state++;
return isCreated;
}
@@ -982,7 +988,7 @@ sal_Bool SAL_CALL NestedKeyImpl::createLink( const OUString& aLinkName, const OU
void SAL_CALL NestedKeyImpl::deleteLink( const OUString& rLinkName )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
if ( !m_localKey.is() && !m_defaultKey.is() )
{
throw InvalidRegistryException();
@@ -1016,7 +1022,7 @@ void SAL_CALL NestedKeyImpl::deleteLink( const OUString& rLinkName )
if ( m_localKey.is() && m_localKey->isValid() &&
!m_localKey->isReadOnly() )
{
- m_xRegistry->m_localReg->getRootKey()->deleteLink(resolvedName);
+ m_pRegistry->m_localReg->getRootKey()->deleteLink(resolvedName);
}
else
{
@@ -1028,7 +1034,7 @@ void SAL_CALL NestedKeyImpl::deleteLink( const OUString& rLinkName )
OUString SAL_CALL NestedKeyImpl::getLinkTarget( const OUString& rLinkName )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
if ( !m_localKey.is() && !m_defaultKey.is() )
{
throw InvalidRegistryException();
@@ -1064,7 +1070,7 @@ OUString SAL_CALL NestedKeyImpl::getLinkTarget( const OUString& rLinkName )
{
try
{
- linkTarget = m_xRegistry->m_localReg->getRootKey()->getLinkTarget(resolvedName);
+ linkTarget = m_pRegistry->m_localReg->getRootKey()->getLinkTarget(resolvedName);
return linkTarget;
}
catch(InvalidRegistryException& )
@@ -1073,7 +1079,7 @@ OUString SAL_CALL NestedKeyImpl::getLinkTarget( const OUString& rLinkName )
}
if ( m_defaultKey.is() && m_defaultKey->isValid() )
- linkTarget = m_xRegistry->m_defaultReg->getRootKey()->getLinkTarget(resolvedName);
+ linkTarget = m_pRegistry->m_defaultReg->getRootKey()->getLinkTarget(resolvedName);
return linkTarget;
}
@@ -1082,7 +1088,7 @@ OUString SAL_CALL NestedKeyImpl::getLinkTarget( const OUString& rLinkName )
OUString SAL_CALL NestedKeyImpl::getResolvedName( const OUString& aKeyName )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
- Guard< Mutex > aGuard( m_xRegistry->m_mutex );
+ Guard< Mutex > aGuard( m_pRegistry->m_mutex );
if ( !m_localKey.is() && !m_defaultKey.is() )
{
throw InvalidRegistryException();