diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2020-02-07 23:16:50 +0000 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-02-13 10:19:20 +0100 |
commit | d6188f8c3803490f75fbd1931a0bd6f821c4d700 (patch) | |
tree | 09e4e9a924207f2c3045f5d2dd13c4fb63e5a25f /include | |
parent | c38ba97261c0af28cb48786a7ad7edcab1e85cb4 (diff) |
tdf#126700 allow replacing the default documents
Per default, a document opened by a user action will always open
in a new frame. For tdf#83722, this behaviour was extended to
documents created from templates.
But this currently also affects the default factory templates, if
these are replaced by a config setting with a real template, which
was not intentional.
So this patch introduces a new MediaDescriptor property, which
allows to mark a document as replaceable and automatically sets
it for factory default documents. If this property is set to true,
a document just acts as a placeholder while it's unmodified. I.e.
the next opened document from its frame will close and replace it.
For this backport the documentation in MediaDescriptor.idl is
dropped, so people won't rely on this as a feature before 7.0.
Change-Id: I45ffa8709f7cdda949fac78f3b363f120f0c4a03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88257
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 61e1e0413296928d929f99c0f006c6cbbcf4ac40)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88537
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/sfxsids.hrc | 2 | ||||
-rw-r--r-- | include/unotools/mediadescriptor.hxx | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 9fa90a5f6226..eb8e0e5c0360 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -269,8 +269,8 @@ class SvxSearchItem; #define SID_LOCK_PRINT (SID_SFX_START + 1736) #define SID_LOCK_SAVE (SID_SFX_START + 1737) #define SID_LOCK_EDITDOC (SID_SFX_START + 1738) +#define SID_REPLACEABLE (SID_SFX_START + 1739) -// SID_SFX_free_START (SID_SFX_START + 1739) // SID_SFX_free_END (SID_SFX_START + 3999) #define SID_OPEN_NEW_VIEW (SID_SFX_START + 520) diff --git a/include/unotools/mediadescriptor.hxx b/include/unotools/mediadescriptor.hxx index 6a826ce309ac..da94f4188b3c 100644 --- a/include/unotools/mediadescriptor.hxx +++ b/include/unotools/mediadescriptor.hxx @@ -84,6 +84,7 @@ class UNOTOOLS_DLLPUBLIC MediaDescriptor : public comphelper::SequenceAsHashMap static const OUString& PROP_PREVIEW(); static const OUString& PROP_READONLY(); static const OUString& PROP_REFERRER(); + static const OUString& PROP_REPLACEABLE(); static const OUString& PROP_SALVAGEDFILE(); static const OUString& PROP_STATUSINDICATOR(); static const OUString& PROP_STREAM(); |