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:26:09 +0200 |
commit | 9387cca95176889d171a63a46cb2d0f6d59b3d1b (patch) | |
tree | 3376e8a7c16040de1e917ecfdd60f5c5f7101f5d /include | |
parent | b34f03271ed765795bb6131c733c3fba425b5425 (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.
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 ff04e3c7f1d5..edbe6d10690d 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -216,6 +216,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: @@ -463,6 +464,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; |