diff options
Diffstat (limited to 'xmloff/qa/unit')
-rw-r--r-- | xmloff/qa/unit/data/content-control-alias.fodt | 2 | ||||
-rw-r--r-- | xmloff/qa/unit/text.cxx | 5 |
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 48fdc7b9436c..0742610ca63a 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" loext:tab-index="4" loext:lock="sdtContentLocked">test</loext:content-control></text:p> + <text:p><loext:content-control loext:alias="my alias" loext:tag="my tag" loext:id="2147483647" loext:tab-index="4" 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 9d6be54c5e70..c8dc35c28d00 100644 --- a/xmloff/qa/unit/text.cxx +++ b/xmloff/qa/unit/text.cxx @@ -849,6 +849,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("Id", uno::Any(static_cast<sal_Int32>(-2147483648))); xContentControlProps->setPropertyValue("TabIndex", uno::Any(sal_uInt32(3))); xContentControlProps->setPropertyValue("Lock", uno::Any(OUString("unlocked"))); xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true); @@ -872,6 +873,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", "id", "-2147483648"); assertXPath(pXmlDoc, "//loext:content-control", "tab-index", "3"); assertXPath(pXmlDoc, "//loext:content-control", "lock", "unlocked"); } @@ -939,6 +941,9 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlImport) OUString aTag; xContentControlProps->getPropertyValue("Tag") >>= aTag; CPPUNIT_ASSERT_EQUAL(OUString("my tag"), aTag); + sal_Int32 nId = 0; + xContentControlProps->getPropertyValue("Id") >>= nId; + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2147483647), nId); sal_uInt32 nTabIndex; xContentControlProps->getPropertyValue("TabIndex") >>= nTabIndex; CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(4), nTabIndex); |