summaryrefslogtreecommitdiff
path: root/xmloff/qa
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/qa')
-rw-r--r--xmloff/qa/unit/data/content-control-alias.fodt2
-rw-r--r--xmloff/qa/unit/text.cxx5
2 files changed, 6 insertions, 1 deletions
diff --git a/xmloff/qa/unit/data/content-control-alias.fodt b/xmloff/qa/unit/data/content-control-alias.fodt
index 8307f682e474..8f541bef42cc 100644
--- a/xmloff/qa/unit/data/content-control-alias.fodt
+++ b/xmloff/qa/unit/data/content-control-alias.fodt
@@ -2,7 +2,7 @@
<office:document xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
<office:body>
<office:text>
- <text:p><loext:content-control loext:alias="my alias" loext:tag="my tag">test</loext:content-control></text:p>
+ <text:p><loext:content-control loext:alias="my alias" loext:tag="my tag" loext:lock="sdtContentLocked">test</loext:content-control></text:p>
</office:text>
</office:body>
</office:document>
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
index 45f3323d92a5..2187e3d2a89d 100644
--- a/xmloff/qa/unit/text.cxx
+++ b/xmloff/qa/unit/text.cxx
@@ -781,6 +781,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlExport)
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
xContentControlProps->setPropertyValue("Alias", uno::Any(OUString("my alias")));
xContentControlProps->setPropertyValue("Tag", uno::Any(OUString("my tag")));
+ xContentControlProps->setPropertyValue("Lock", uno::Any(OUString("unlocked")));
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
// When exporting to ODT:
@@ -794,6 +795,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlExport)
// i.e. alias was lost on export.
assertXPath(pXmlDoc, "//loext:content-control", "alias", "my alias");
assertXPath(pXmlDoc, "//loext:content-control", "tag", "my tag");
+ assertXPath(pXmlDoc, "//loext:content-control", "lock", "unlocked");
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testComboBoxContentControlImport)
@@ -853,6 +855,9 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlImport)
OUString aTag;
xContentControlProps->getPropertyValue("Tag") >>= aTag;
CPPUNIT_ASSERT_EQUAL(OUString("my tag"), aTag);
+ OUString aLock;
+ xContentControlProps->getPropertyValue("Lock") >>= aLock;
+ CPPUNIT_ASSERT_EQUAL(OUString("sdtContentLocked"), aLock);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlAutostyleExport)