diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-05-21 22:26:05 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-05-22 13:12:55 +0200 |
commit | 5246fa262450f686674850c53df666422f441c86 (patch) | |
tree | 2793175c788f1a097d0ff02cefcb0acff56ef8d5 /basic/source/inc | |
parent | 5ca4b9d51046b9b6a36b91c9abd0cc1e7c04b480 (diff) |
fdo#68983: basic: if the library is not loaded fully, copy source storage
Also fixes fdo#42899 and fdo#67685 in a different way; the previous fix
for fdo#42899 caused the problem with password-protected libraries for
which the password is not known: only the binary representation of the
BAISC module was stored, not the source code; by simply copying from the
source storage the problem can be avoided.
It would be possible to ask for the password when storing, but that
would not work when non-interactive (called via API).
An alternative fix would be to pass in the
SfxObjectShell::IsSetModifyEnabled() flag and actually reset the BASIC
library's modify flag correctly, but that requires adding a
parameter to XStorageBasedLibraryContainer::storeLibrariesToStorage().
(regression from af34774d260a68fc02cd78ba90dd8d4afaf1a2a4 )
Change-Id: I4701401f35171139fc2fe8d225d13d4e533091a0
Diffstat (limited to 'basic/source/inc')
-rw-r--r-- | basic/source/inc/namecont.hxx | 4 | ||||
-rw-r--r-- | basic/source/inc/scriptcont.hxx | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index 109835a84927..6355549bd162 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -582,7 +582,9 @@ private: bool mbReadOnlyLink; bool mbPreload; +protected: bool mbPasswordProtected; +private: bool mbPasswordVerified; bool mbDoc50Password; OUString maPassword; @@ -702,6 +704,8 @@ public: } protected: + virtual bool isLoadedStorable(); + virtual bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const = 0; }; diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx index ea09a910a8e8..0a331b9cf7f9 100644 --- a/basic/source/inc/scriptcont.hxx +++ b/basic/source/inc/scriptcont.hxx @@ -154,6 +154,7 @@ class SfxScriptLibrary : public SfxLibrary, public SfxScriptLibrary_BASE const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) SAL_OVERRIDE; virtual void storeResourcesToStorage( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XStorage >& xStorage ) SAL_OVERRIDE; + virtual bool isLoadedStorable() SAL_OVERRIDE; public: SfxScriptLibrary |