diff options
Diffstat (limited to 'stoc/source/simpleregistry/simpleregistry.cxx')
-rw-r--r-- | stoc/source/simpleregistry/simpleregistry.cxx | 210 |
1 files changed, 50 insertions, 160 deletions
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index c48913fcab80..d50c243949f6 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -61,45 +61,33 @@ public: osl::Mutex mutex_; private: - virtual OUString SAL_CALL getURL() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getURL() override; virtual void SAL_CALL open( - OUString const & rURL, sal_Bool bReadOnly, sal_Bool bCreate) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + OUString const & rURL, sal_Bool bReadOnly, sal_Bool bCreate) override; - virtual sal_Bool SAL_CALL isValid() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isValid() override; - virtual void SAL_CALL close() throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL close() override; - virtual void SAL_CALL destroy() throw( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL destroy() override; virtual css::uno::Reference< css::registry::XRegistryKey > SAL_CALL - getRootKey() throw( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + getRootKey() override; - virtual sal_Bool SAL_CALL isReadOnly() throw( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isReadOnly() override; virtual void SAL_CALL mergeKey( - OUString const & aKeyName, OUString const & aUrl) - throw ( - css::registry::InvalidRegistryException, - css::registry::MergeConflictException, css::uno::RuntimeException, std::exception) override; + OUString const & aKeyName, OUString const & aUrl) override; - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override + virtual OUString SAL_CALL getImplementationName() override { return OUString("com.sun.star.comp.stoc.SimpleRegistry"); } - virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override { return cppu::supportsService(this, ServiceName); } virtual css::uno::Sequence< OUString > SAL_CALL - getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override + getSupportedServiceNames() override { css::uno::Sequence< OUString > names { "com.sun.star.registry.SimpleRegistry" }; return names; @@ -116,158 +104,100 @@ public: registry_(registry), key_(key) {} private: - virtual OUString SAL_CALL getKeyName() - throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getKeyName() override; - virtual sal_Bool SAL_CALL isReadOnly() throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isReadOnly() override; - virtual sal_Bool SAL_CALL isValid() throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isValid() override; virtual css::registry::RegistryKeyType SAL_CALL getKeyType( - OUString const & rKeyName) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + OUString const & rKeyName) override; - virtual css::registry::RegistryValueType SAL_CALL getValueType() throw( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual css::registry::RegistryValueType SAL_CALL getValueType() override; - virtual sal_Int32 SAL_CALL getLongValue() throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getLongValue() override; - virtual void SAL_CALL setLongValue(sal_Int32 value) throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setLongValue(sal_Int32 value) override; - virtual css::uno::Sequence< sal_Int32 > SAL_CALL getLongListValue() throw( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< sal_Int32 > SAL_CALL getLongListValue() override; virtual void SAL_CALL setLongListValue( - css::uno::Sequence< sal_Int32 > const & seqValue) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + css::uno::Sequence< sal_Int32 > const & seqValue) override; - virtual OUString SAL_CALL getAsciiValue() throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAsciiValue() override; - virtual void SAL_CALL setAsciiValue(OUString const & value) throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setAsciiValue(OUString const & value) override; - virtual css::uno::Sequence< OUString > SAL_CALL getAsciiListValue() - throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getAsciiListValue() override; virtual void SAL_CALL setAsciiListValue( - css::uno::Sequence< OUString > const & seqValue) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + css::uno::Sequence< OUString > const & seqValue) override; - virtual OUString SAL_CALL getStringValue() throw( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getStringValue() override; - virtual void SAL_CALL setStringValue(OUString const & value) throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setStringValue(OUString const & value) override; - virtual css::uno::Sequence< OUString > SAL_CALL getStringListValue() - throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getStringListValue() override; virtual void SAL_CALL setStringListValue( - css::uno::Sequence< OUString > const & seqValue) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + css::uno::Sequence< OUString > const & seqValue) override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBinaryValue() throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBinaryValue() override; virtual void SAL_CALL setBinaryValue( - css::uno::Sequence< sal_Int8 > const & value) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + css::uno::Sequence< sal_Int8 > const & value) override; virtual css::uno::Reference< css::registry::XRegistryKey > SAL_CALL openKey( - OUString const & aKeyName) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + OUString const & aKeyName) override; virtual css::uno::Reference< css::registry::XRegistryKey > SAL_CALL - createKey(OUString const & aKeyName) throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + createKey(OUString const & aKeyName) override; - virtual void SAL_CALL closeKey() throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL closeKey() override; - virtual void SAL_CALL deleteKey(OUString const & rKeyName) throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL deleteKey(OUString const & rKeyName) override; virtual css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > > - SAL_CALL openKeys() throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + SAL_CALL openKeys() override; - virtual css::uno::Sequence< OUString > SAL_CALL getKeyNames() throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getKeyNames() override; virtual sal_Bool SAL_CALL createLink( - OUString const & aLinkName, OUString const & aLinkTarget) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + OUString const & aLinkName, OUString const & aLinkTarget) override; - virtual void SAL_CALL deleteLink(OUString const & rLinkName) throw ( - css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL deleteLink(OUString const & rLinkName) override; - virtual OUString SAL_CALL getLinkTarget(OUString const & rLinkName) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getLinkTarget(OUString const & rLinkName) override; - virtual OUString SAL_CALL getResolvedName(OUString const & aKeyName) - throw ( - css::registry::InvalidRegistryException, - css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getResolvedName(OUString const & aKeyName) override; rtl::Reference< SimpleRegistry > registry_; RegistryKey key_; }; -OUString Key::getKeyName() throw (css::uno::RuntimeException, std::exception) { +OUString Key::getKeyName() { osl::MutexGuard guard(registry_->mutex_); return key_.getName(); } sal_Bool Key::isReadOnly() - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); return key_.isReadOnly(); } -sal_Bool Key::isValid() throw (css::uno::RuntimeException, std::exception) { +sal_Bool Key::isValid() { osl::MutexGuard guard(registry_->mutex_); return key_.isValid(); } css::registry::RegistryKeyType Key::getKeyType(OUString const & ) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { return css::registry::RegistryKeyType_KEY; } css::registry::RegistryValueType Key::getValueType() - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegValueType type; @@ -309,9 +239,7 @@ css::registry::RegistryValueType Key::getValueType() } } -sal_Int32 Key::getLongValue() throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) +sal_Int32 Key::getLongValue() { osl::MutexGuard guard(registry_->mutex_); sal_Int32 value; @@ -335,7 +263,6 @@ sal_Int32 Key::getLongValue() throw ( } void Key::setLongValue(sal_Int32 value) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.setValue( @@ -349,9 +276,7 @@ void Key::setLongValue(sal_Int32 value) } } -css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) +css::uno::Sequence< sal_Int32 > Key::getLongListValue() { osl::MutexGuard guard(registry_->mutex_); RegistryValueList< sal_Int32 > list; @@ -389,7 +314,6 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw ( } void Key::setLongListValue(css::uno::Sequence< sal_Int32 > const & seqValue) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); std::vector< sal_Int32 > list; @@ -407,9 +331,7 @@ void Key::setLongListValue(css::uno::Sequence< sal_Int32 > const & seqValue) } } -OUString Key::getAsciiValue() throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) +OUString Key::getAsciiValue() { osl::MutexGuard guard(registry_->mutex_); RegValueType type; @@ -476,7 +398,6 @@ OUString Key::getAsciiValue() throw ( } void Key::setAsciiValue(OUString const & value) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); OString utf8; @@ -503,9 +424,7 @@ void Key::setAsciiValue(OUString const & value) } } -css::uno::Sequence< OUString > Key::getAsciiListValue() throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) +css::uno::Sequence< OUString > Key::getAsciiListValue() { osl::MutexGuard guard(registry_->mutex_); RegistryValueList< char * > list; @@ -560,7 +479,6 @@ css::uno::Sequence< OUString > Key::getAsciiListValue() throw ( void Key::setAsciiListValue( css::uno::Sequence< OUString > const & seqValue) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); std::vector< OString > list; @@ -596,9 +514,7 @@ void Key::setAsciiListValue( } } -OUString Key::getStringValue() throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) +OUString Key::getStringValue() { osl::MutexGuard guard(registry_->mutex_); RegValueType type; @@ -653,7 +569,6 @@ OUString Key::getStringValue() throw ( } void Key::setStringValue(OUString const & value) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.setValue( @@ -670,9 +585,7 @@ void Key::setStringValue(OUString const & value) } } -css::uno::Sequence< OUString > Key::getStringListValue() throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) +css::uno::Sequence< OUString > Key::getStringListValue() { osl::MutexGuard guard(registry_->mutex_); RegistryValueList< sal_Unicode * > list; @@ -713,7 +626,6 @@ css::uno::Sequence< OUString > Key::getStringListValue() throw ( void Key::setStringListValue( css::uno::Sequence< OUString > const & seqValue) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); std::vector< sal_Unicode * > list; @@ -733,9 +645,6 @@ void Key::setStringListValue( } css::uno::Sequence< sal_Int8 > Key::getBinaryValue() - throw ( - css::registry::InvalidRegistryException, - css::registry::InvalidValueException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegValueType type; @@ -774,7 +683,6 @@ css::uno::Sequence< sal_Int8 > Key::getBinaryValue() } void Key::setBinaryValue(css::uno::Sequence< sal_Int8 > const & value) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.setValue( @@ -792,7 +700,6 @@ void Key::setBinaryValue(css::uno::Sequence< sal_Int8 > const & value) css::uno::Reference< css::registry::XRegistryKey > Key::openKey( OUString const & aKeyName) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegistryKey key; @@ -813,7 +720,6 @@ css::uno::Reference< css::registry::XRegistryKey > Key::openKey( css::uno::Reference< css::registry::XRegistryKey > Key::createKey( OUString const & aKeyName) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegistryKey key; @@ -833,7 +739,6 @@ css::uno::Reference< css::registry::XRegistryKey > Key::createKey( } void Key::closeKey() - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.closeKey(); @@ -847,7 +752,6 @@ void Key::closeKey() } void Key::deleteKey(OUString const & rKeyName) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.deleteKey(rKeyName); @@ -862,7 +766,6 @@ void Key::deleteKey(OUString const & rKeyName) css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > > Key::openKeys() - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegistryKeyArray list; @@ -891,7 +794,6 @@ Key::openKeys() } css::uno::Sequence< OUString > Key::getKeyNames() - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); RegistryKeyNames list; @@ -919,7 +821,6 @@ css::uno::Sequence< OUString > Key::getKeyNames() sal_Bool Key::createLink( OUString const & /*aLinkName*/, OUString const & /*aLinkTarget*/) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { throw css::registry::InvalidRegistryException( "com.sun.star.registry.SimpleRegistry key createLink: links are no longer supported", @@ -927,7 +828,6 @@ sal_Bool Key::createLink( } void Key::deleteLink(OUString const & /*rLinkName*/) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { throw css::registry::InvalidRegistryException( "com.sun.star.registry.SimpleRegistry key deleteLink: links are no longer supported", @@ -935,7 +835,6 @@ void Key::deleteLink(OUString const & /*rLinkName*/) } OUString Key::getLinkTarget(OUString const & /*rLinkName*/) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { throw css::registry::InvalidRegistryException( "com.sun.star.registry.SimpleRegistry key getLinkTarget: links are no longer supported", @@ -943,7 +842,6 @@ OUString Key::getLinkTarget(OUString const & /*rLinkName*/) } OUString Key::getResolvedName(OUString const & aKeyName) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(registry_->mutex_); OUString resolved; @@ -958,14 +856,13 @@ OUString Key::getResolvedName(OUString const & aKeyName) return resolved; } -OUString SimpleRegistry::getURL() throw (css::uno::RuntimeException, std::exception) { +OUString SimpleRegistry::getURL() { osl::MutexGuard guard(mutex_); return registry_.getName(); } void SimpleRegistry::open( OUString const & rURL, sal_Bool bReadOnly, sal_Bool bCreate) - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(mutex_); RegError err = (rURL.isEmpty() && bCreate) @@ -984,13 +881,12 @@ void SimpleRegistry::open( } } -sal_Bool SimpleRegistry::isValid() throw (css::uno::RuntimeException, std::exception) { +sal_Bool SimpleRegistry::isValid() { osl::MutexGuard guard(mutex_); return registry_.isValid(); } void SimpleRegistry::close() - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(mutex_); RegError err = registry_.close(); @@ -1004,7 +900,6 @@ void SimpleRegistry::close() } void SimpleRegistry::destroy() - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(mutex_); RegError err = registry_.destroy(OUString()); @@ -1018,7 +913,6 @@ void SimpleRegistry::destroy() } css::uno::Reference< css::registry::XRegistryKey > SimpleRegistry::getRootKey() - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(mutex_); RegistryKey root; @@ -1034,7 +928,6 @@ css::uno::Reference< css::registry::XRegistryKey > SimpleRegistry::getRootKey() } sal_Bool SimpleRegistry::isReadOnly() - throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(mutex_); return registry_.isReadOnly(); @@ -1042,9 +935,6 @@ sal_Bool SimpleRegistry::isReadOnly() void SimpleRegistry::mergeKey( OUString const & aKeyName, OUString const & aUrl) - throw ( - css::registry::InvalidRegistryException, - css::registry::MergeConflictException, css::uno::RuntimeException, std::exception) { osl::MutexGuard guard(mutex_); RegistryKey root; |