summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2002-06-07 14:14:15 +0000
committerDaniel Boelzle <dbo@openoffice.org>2002-06-07 14:14:15 +0000
commit2a4158ff5bf2823ee553b43622f7824e7017cf17 (patch)
tree3120790da86fc4259fdfeadbfde119c5ede79f43
parentdabd8c92f897211ffbae5f38ee98a17f46930522 (diff)
#96232# throw exception when merging into read-only rdb
-rw-r--r--stoc/source/implementationregistration/mergekeys.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/stoc/source/implementationregistration/mergekeys.cxx b/stoc/source/implementationregistration/mergekeys.cxx
index 316d16869726..a796ff1446d9 100644
--- a/stoc/source/implementationregistration/mergekeys.cxx
+++ b/stoc/source/implementationregistration/mergekeys.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: mergekeys.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dbo $ $Date: 2001-09-11 09:27:11 $
+ * last change: $Author: dbo $ $Date: 2002-06-07 15:14:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -174,6 +174,14 @@ void SAL_CALL mergeKeys(
Reference< registry::XRegistryKey > const & xSource )
SAL_THROW( (registry::InvalidRegistryException, registry::MergeConflictException) )
{
+ if (xDest->isReadOnly())
+ {
+ throw registry::InvalidRegistryException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "destination registry is read-only! cannot merge!") ),
+ Reference< XInterface >() );
+ }
+
t_links links;
links.reserve( 16 );
mergeKeys( xDest, xSource, links );