diff options
Diffstat (limited to 'vbahelper/source')
-rw-r--r-- | vbahelper/source/vbahelper/vbadocumentbase.cxx | 9 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbahelper.cxx | 5 |
2 files changed, 4 insertions, 10 deletions
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index 5028d1504b90..5db5cc04cbf7 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -208,13 +208,10 @@ VbaDocumentBase::Unprotect( const uno::Any &aPassword ) uno::Reference< util::XProtectable > xProt( getModel(), uno::UNO_QUERY_THROW ); if( !xProt->isProtected() ) throw uno::RuntimeException("File is already unprotected" ); + if( aPassword >>= rPassword ) + xProt->unprotect( rPassword ); else - { - if( aPassword >>= rPassword ) - xProt->unprotect( rPassword ); - else - xProt->unprotect( OUString() ); - } + xProt->unprotect( OUString() ); } void diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index ff0c5f591cba..327986919ab7 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -219,10 +219,7 @@ getCurrentDoc( const OUString& sKey ) throw uno::RuntimeException( "Can't extract model from basic ( it's obviously not set yet therefore don't know the current document context)" ); } - else - { - SAL_INFO("vbahelper", "Have model points to url " << xModel->getURL()); - } + SAL_INFO("vbahelper", "Have model points to url " << xModel->getURL()); } else { |