diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-10-21 09:09:01 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-10-21 09:41:36 +0200 |
commit | 5a10f87708363217feabaebc88b993edce06940b (patch) | |
tree | ea79c5eca395e9d7bce275e022353c9cba456747 /include | |
parent | faec766d902f612ba0e580eb86a3d64147eb0e4b (diff) |
tdf#95095: Implement "AvoidRecentDocs" property for loadComponentFromURL().
When "AvoidRecentDocs" is set to true, the loaded document is not added to the
recent documents list, avoiding the (a bit expensive) thumbnail creation.
Useful when loadComponentFromURL() is called from macros, or when LibreOffice
is controlled via UNO. See the bug for an example.
Conflicts:
sfx2/source/doc/objxtor.cxx
Change-Id: I99d516cae8b278199a01276686465f716b9b4cec
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/objsh.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index ce8ab3018f6f..437f15030e20 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -211,6 +211,7 @@ private: bool bHasName :1; // sal_True := existing object, // sal_False := new object bool bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030 + bool mbAvoidRecentDocs; ///< Avoid adding to the recent documents list, if not necessary. bool CloseInternal(); private: @@ -458,6 +459,12 @@ public: bool IsInGenerateAndStoreThumbnail() const {return bIsInGenerateThumbnail;}//optimize thumbnail generate and store procedure to improve odt saving performance, i120030 + /// Don't add to the recent documents - it's an expensive operation, sometimes it is not wanted. + bool IsAvoidRecentDocs() const { return mbAvoidRecentDocs; } + + /// Don't add to the recent documents - it's an expensive operation, sometimes it is not wanted. + void AvoidRecentDocs(bool bAvoid = true) { mbAvoidRecentDocs = bAvoid; } + // Transfer IFace void AbortImport(); bool IsAbortingImport() const; |