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-12 00:27:51 +0100 |
commit | 61e1e0413296928d929f99c0f006c6cbbcf4ac40 (patch) | |
tree | 7381bdafbe0176f9102934ddb292fc4897d2d3a4 /include | |
parent | 38e6a5ddb408d8cfabf7f3e578b8bce760c02d11 (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.
Change-Id: I45ffa8709f7cdda949fac78f3b363f120f0c4a03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88257
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
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 63d5ce036c63..d7367587db1d 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(); |