diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/embeddedobjectcontainer.hxx | 1 | ||||
-rw-r--r-- | include/embeddedobj/embeddedupdate.hxx | 52 | ||||
-rw-r--r-- | include/embeddedobj/embobjdllapi.h | 20 | ||||
-rw-r--r-- | include/svtools/embedhlp.hxx | 5 | ||||
-rw-r--r-- | include/svtools/filechangedchecker.hxx | 6 | ||||
-rw-r--r-- | include/unotools/mediadescriptor.hxx | 1 |
6 files changed, 83 insertions, 2 deletions
diff --git a/include/comphelper/embeddedobjectcontainer.hxx b/include/comphelper/embeddedobjectcontainer.hxx index c477a6fbe8c2..cc040da152c3 100644 --- a/include/comphelper/embeddedobjectcontainer.hxx +++ b/include/comphelper/embeddedobjectcontainer.hxx @@ -166,6 +166,7 @@ public: bool StoreChildren(bool _bOasisFormat,bool _bObjectsOnly); bool StoreAsChildren( bool _bOasisFormat ,bool _bCreateEmbedded + ,bool _bAutoSaveEvent ,const css::uno::Reference < css::embed::XStorage >& _xStorage); static css::uno::Reference< css::io::XInputStream > GetGraphicReplacementStream( diff --git a/include/embeddedobj/embeddedupdate.hxx b/include/embeddedobj/embeddedupdate.hxx new file mode 100644 index 000000000000..1db3f36d61dc --- /dev/null +++ b/include/embeddedobj/embeddedupdate.hxx @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include <embeddedobj/embobjdllapi.h> + +namespace com +{ +namespace sun +{ +namespace star +{ +namespace embed +{ +/** This class is only used to tell the OCommonEmbeddedObject class + that the following call is an Link- / Ole-refresh. + + @since LibreOffice 7.4 + */ +class EMBOBJ_DLLPUBLIC EmbeddedUpdate +{ + /** By "Refresh all" is used to perform an OLE update and a link update. + In the case of a link update, the class OCommonEmbeddedObject is + informed with true that a link update will take place next + + @param bIsOleUpdate + what kind of update, when true is OLE-Object + when false is Link-Object + */ +public: + virtual void SetOleState(bool bIsOleUpdate) = 0; + + EmbeddedUpdate() = default; + virtual ~EmbeddedUpdate() = default; + +private: + EmbeddedUpdate(const EmbeddedUpdate&) = delete; + EmbeddedUpdate& operator=(const EmbeddedUpdate&) = delete; +}; +}; +}; +}; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/embeddedobj/embobjdllapi.h b/include/embeddedobj/embobjdllapi.h new file mode 100644 index 000000000000..36aa54217fb9 --- /dev/null +++ b/include/embeddedobj/embobjdllapi.h @@ -0,0 +1,20 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include <sal/types.h> + +#if defined(EMBOBJ_DLLIMPLEMENTATION) +#define EMBOBJ_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define EMBOBJ_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/svtools/embedhlp.hxx b/include/svtools/embedhlp.hxx index 9d4cb8e85c39..4930e5b7630b 100644 --- a/include/svtools/embedhlp.hxx +++ b/include/svtools/embedhlp.hxx @@ -49,6 +49,7 @@ class SVT_DLLPUBLIC EmbeddedObjectRef SVT_DLLPRIVATE std::unique_ptr<SvStream> GetGraphicStream( bool bUpdate ) const; SVT_DLLPRIVATE void GetReplacement( bool bUpdate ); + SVT_DLLPRIVATE void UpdateOleObject( bool bUpdateOle); EmbeddedObjectRef& operator = ( const EmbeddedObjectRef& ) = delete; @@ -101,7 +102,9 @@ public: const css::uno::Reference< css::io::XInputStream >& xInGrStream, const OUString& rMediaType ); - void UpdateReplacement(); + // bUpdateOle = false udate the Link-Objects + // = true update the OLE-Objects + void UpdateReplacement( bool bUpdateOle = false ); void UpdateReplacementOnDemand(); void Lock( bool bLock = true ); void Clear(); diff --git a/include/svtools/filechangedchecker.hxx b/include/svtools/filechangedchecker.hxx index d63d146688c6..9800654678fa 100644 --- a/include/svtools/filechangedchecker.hxx +++ b/include/svtools/filechangedchecker.hxx @@ -35,7 +35,11 @@ private: public: void resetTimer(); - bool hasFileChanged(); + // bUpdate = true when file has changed, get the return and the object get the new time + // = false when file has changed, only get the return, not change the object + bool hasFileChanged(bool bUpdate = true); FileChangedChecker(const OUString& rFilename, const ::std::function<void ()>& rCallback); + // with out Timer function + FileChangedChecker(const OUString& rFilename); }; diff --git a/include/unotools/mediadescriptor.hxx b/include/unotools/mediadescriptor.hxx index 1e4b3c064d1c..92728fa51972 100644 --- a/include/unotools/mediadescriptor.hxx +++ b/include/unotools/mediadescriptor.hxx @@ -101,6 +101,7 @@ class UNOTOOLS_DLLPUBLIC MediaDescriptor : public comphelper::SequenceAsHashMap static constexpr OUStringLiteral PROP_VIEWONLY = u"ViewOnly"; static constexpr OUStringLiteral PROP_DOCUMENTBASEURL = u"DocumentBaseURL"; static constexpr OUStringLiteral PROP_SUGGESTEDSAVEASNAME = u"SuggestedSaveAsName"; + static constexpr OUStringLiteral PROP_AUTOSAVEEVENT = u"AutoSaveEvent"; // interface public: |