summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-10-23 12:44:20 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-10-23 15:20:57 +0200
commit8f06d4b34661411db5c6fd78c4c6c702557cf344 (patch)
treebc7f8dc22b45091ae8d603b488c602a9881c106b
parent48ab1b2fbb3496cef478db11539ccd08b527656d (diff)
Add test for LockExport property
Change-Id: I81533ccd34ac517b31afa1e7e6b818b74c42bc1d Reviewed-on: https://gerrit.libreoffice.org/81376 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--sfx2/source/appl/appuno.cxx8
-rw-r--r--sw/qa/python/check_xmodel.py4
2 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index cc2912f452db..6e5965770710 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1078,6 +1078,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
++nAdditional;
if ( rSet.GetItemState( SID_CONVERT_IMAGES ) == SfxItemState::SET )
nAdditional++;
+ if ( rSet.GetItemState( SID_LOCK_CONTENT_EXTRACTION ) == SfxItemState::SET )
+ nAdditional++;
+ if ( rSet.GetItemState( SID_LOCK_EXPORT ) == SfxItemState::SET )
+ nAdditional++;
// consider additional arguments
nProps += nAdditional;
@@ -1235,6 +1239,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
continue;
if ( nId == SID_SUGGESTEDSAVEASNAME )
continue;
+ if ( nId == SID_LOCK_CONTENT_EXTRACTION )
+ continue;
+ if ( nId == SID_LOCK_EXPORT )
+ continue;
}
OString aDbg = "Unknown item detected: " + OString::number(static_cast<sal_Int32>(nId));
diff --git a/sw/qa/python/check_xmodel.py b/sw/qa/python/check_xmodel.py
index a71fdf9bc142..bcceed6acd77 100644
--- a/sw/qa/python/check_xmodel.py
+++ b/sw/qa/python/check_xmodel.py
@@ -33,13 +33,15 @@ class TestXModel(unittest.TestCase):
p1 = PropertyValue(Name="SuggestedSaveAsName", Value="prettyFileName")
p2 = PropertyValue(Name="SuggestedSaveAsDir", Value="/my/dir")
p3 = PropertyValue(Name="LockContentExtraction", Value=True)
- xDoc.setArgs([p1, p2, p3])
+ p4 = PropertyValue(Name="LockExport", Value=True)
+ xDoc.setArgs([p1, p2, p3, p4])
# Make sure that all properties are returned with getArgs()
args = xDoc.getArgs()
self.assertTrue(p1 in args)
self.assertTrue(p2 in args)
self.assertTrue(p3 in args)
+ self.assertTrue(p4 in args)
xDoc.close(True)