diff options
-rw-r--r-- | basic/source/uno/scriptcont.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index e315d3ef34b3..09388fcf0e87 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -94,6 +94,11 @@ void SfxScriptLibraryContainer::setLibraryPassword( const OUString& rLibraryName pImplLib->mbDoc50Password = true; pImplLib->mbPasswordProtected = true; pImplLib->maPassword = rPassword; + SfxScriptLibrary *const pSL(dynamic_cast<SfxScriptLibrary *>(pImplLib)); + if (pSL && pSL->mbLoaded) + { + pSL->mbLoadedSource = true; // must store source code now! + } } } catch(const NoSuchElementException& ) {} @@ -486,6 +491,11 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& pImplLib->mbPasswordProtected = true; pImplLib->mbPasswordVerified = true; pImplLib->maPassword = NewPassword; + SfxScriptLibrary *const pSL(dynamic_cast<SfxScriptLibrary *>(pImplLib)); + if (pSL && pSL->mbLoaded) + { + pSL->mbLoadedSource = true; // must store source code now! + } maModifiable.setModified( true ); pImplLib->implSetModified( true ); |