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 /sw/qa/python | |
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 'sw/qa/python')
-rw-r--r-- | sw/qa/python/check_xmodel.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/qa/python/check_xmodel.py b/sw/qa/python/check_xmodel.py index f6894dd21a3f..27740958ddb1 100644 --- a/sw/qa/python/check_xmodel.py +++ b/sw/qa/python/check_xmodel.py @@ -37,7 +37,8 @@ class TestXModel(unittest.TestCase): p5 = PropertyValue(Name="LockPrint", Value=True) p6 = PropertyValue(Name="LockSave", Value=True) p7 = PropertyValue(Name="LockEditDoc", Value=True) - xDoc.setArgs([p1, p2, p3, p4, p5, p6, p7]) + p8 = PropertyValue(Name="Replaceable", Value=True) + xDoc.setArgs([p1, p2, p3, p4, p5, p6, p7, p8]) # Make sure that all properties are returned with getArgs() args = xDoc.getArgs() @@ -48,6 +49,7 @@ class TestXModel(unittest.TestCase): self.assertTrue(p5 in args) self.assertTrue(p6 in args) self.assertTrue(p7 in args) + self.assertTrue(p8 in args) xDoc.close(True) |