diff options
author | Armin Le Grand (Allotropia) <armin.le.grand@me.com> | 2021-04-08 10:30:15 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2021-04-08 13:22:09 +0200 |
commit | f4c66a2272d890eaa7a6d7429e5bfa7bdb1f7162 (patch) | |
tree | 750489b2444fcbd8658bff19ed2b4bc497f6ec19 /embeddedobj/source/inc | |
parent | 2411097e1fdf63f176cb6bbeabbbab8241f773c3 (diff) |
tdf#141529 sync linked OLE save(s) with hosting file save(s)
Before deactivating a linked OLE saved it and overwrote the
original, even when not saving the hosting document at all.
This is not intuitive from user perspective and may lead
to unexpected data loss (of the OLE content).
Reported case was especially about closing the hosted document
without saving in the understandable believe that that way the
changed OLE will not be changed on external medium.
Added mechanism for linked OLE to hold data in a hidden local
temp file, synching/writing back on hosting file save. Most
complicated was adapting the 'break link' case and ensuring
other cases to work, but looks good now from my POV
Change-Id: I7f63d667820b2d9725abc598a9dd7360be1f8d5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113793
Tested-by: Armin Le Grand <Armin.Le.Grand@me.com>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'embeddedobj/source/inc')
-rw-r--r-- | embeddedobj/source/inc/commonembobj.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx index e28b3654d1e7..1cae4845745a 100644 --- a/embeddedobj/source/inc/commonembobj.hxx +++ b/embeddedobj/source/inc/commonembobj.hxx @@ -32,6 +32,7 @@ #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/chart2/XDefaultSizeTransmitter.hpp> +#include <com/sun/star/io/XTempFile.hpp> #include <cppuhelper/weak.hxx> #include <rtl/ref.hxx> #include <map> @@ -133,7 +134,8 @@ protected: css::awt::Rectangle m_aOwnRectangle; css::awt::Rectangle m_aClipRectangle; - bool m_bIsLink; + bool m_bIsLinkURL; + bool m_bLinkTempFileChanged; // embedded object related stuff OUString m_aEntryName; @@ -147,6 +149,9 @@ protected: bool m_bLinkHasPassword; OUString m_aLinkPassword; + // tdf#141529 hold a cc of a linked OLE + css::uno::Reference < css::io::XTempFile > m_aLinkTempFile; + css::uno::Reference< css::uno::XInterface > m_xParent; bool m_bHasClonedSize; // the object has cached size |