diff options
author | Noel Grandin <noel@peralex.com> | 2016-07-01 14:58:43 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-07-04 06:48:25 +0000 |
commit | 70bfe5f71c1d45c14ce831051480a11c58ffc34d (patch) | |
tree | cf4db776bea8a8f27097d12edb175ae732d2bcb9 /stoc | |
parent | f904bd567facfe29c81f99100f924e3cd1385312 (diff) |
remove deprecated Link functions from Registry
Change-Id: Id678d4b6263df86993b289e8439faac847dd7c5f
Reviewed-on: https://gerrit.libreoffice.org/26855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/simpleregistry/simpleregistry.cxx | 48 |
1 files changed, 11 insertions, 37 deletions
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index eeef53671b78..1c279ba2b205 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -920,54 +920,28 @@ css::uno::Sequence< OUString > Key::getKeyNames() } sal_Bool Key::createLink( - OUString const & aLinkName, OUString const & aLinkTarget) + OUString const & /*aLinkName*/, OUString const & /*aLinkTarget*/) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { - osl::MutexGuard guard(registry_->mutex_); - RegError err = key_.createLink(aLinkName, aLinkTarget); - switch (err) { - case RegError::NO_ERROR: - return true; - case RegError::INVALID_KEY: - case RegError::DETECT_RECURSION: - throw css::registry::InvalidRegistryException( - (("com.sun.star.registry.SimpleRegistry key createLink:" - " underlying RegistryKey::createLink() = ") + - OUString::number(static_cast<int>(err))), + throw css::registry::InvalidRegistryException( + "com.sun.star.registry.SimpleRegistry key createLink: links are no longer supported", static_cast< OWeakObject * >(this)); - default: - return false; - } } -void Key::deleteLink(OUString const & rLinkName) +void Key::deleteLink(OUString const & /*rLinkName*/) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { - osl::MutexGuard guard(registry_->mutex_); - RegError err = key_.deleteLink(rLinkName); - if (err != RegError::NO_ERROR) { - throw css::registry::InvalidRegistryException( - (("com.sun.star.registry.SimpleRegistry key deleteLink:" - " underlying RegistryKey::deleteLink() = ") + - OUString::number(static_cast<int>(err))), - static_cast< OWeakObject * >(this)); - } + throw css::registry::InvalidRegistryException( + "com.sun.star.registry.SimpleRegistry key deleteLink: links are no longer supported", + static_cast< OWeakObject * >(this)); } -OUString Key::getLinkTarget(OUString const & rLinkName) +OUString Key::getLinkTarget(OUString const & /*rLinkName*/) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException, std::exception) { - osl::MutexGuard guard(registry_->mutex_); - OUString target; - RegError err = key_.getLinkTarget(rLinkName, target); - if (err != RegError::NO_ERROR) { - throw css::registry::InvalidRegistryException( - (("com.sun.star.registry.SimpleRegistry key getLinkTarget:" - " underlying RegistryKey::getLinkTarget() = ") + - OUString::number(static_cast<int>(err))), - static_cast< OWeakObject * >(this)); - } - return target; + throw css::registry::InvalidRegistryException( + "com.sun.star.registry.SimpleRegistry key getLinkTarget: links are no longer supported", + static_cast< OWeakObject * >(this)); } OUString Key::getResolvedName(OUString const & aKeyName) |