summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-02-18 18:29:51 +0100
committerLászló Németh <nemeth@numbertext.org>2019-02-19 01:14:12 +0100
commit3707e2a7b8b05617b0afb75374f866c967593861 (patch)
treeabd4602d22bdb518c648aadefa2395f1759eaf65 /sw
parent6fb9ef15aa67b91dec016873ad8224db2323291c (diff)
tdf#122624 XLSX OLE in DOCX: export view positions
of the visible sheet of an embedded spreadsheet, instead of exporting always the first column and row. Change-Id: Iaf87bfc5b7658cd4d64cb9c83c50bbf66fd6e7f0 Reviewed-on: https://gerrit.libreoffice.org/67982 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport12.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 7f485a1f2847..797c2d1e8884 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -967,6 +967,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf122594, "tdf122594.docx")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xIndexAccess->getCount());
uno::Sequence<beans::PropertyValue> aSeq;
+ sal_Int32 nCheck = 0;
if (xIndexAccess->getByIndex(0) >>= aSeq)
{
sal_Int32 nCount(aSeq.getLength());
@@ -977,11 +978,31 @@ DECLARE_OOXMLEXPORT_TEST(testTdf122594, "tdf122594.docx")
{
OUString sTabName;
if (aSeq[i].Value >>= sTabName)
+ {
// Sheet2, not Sheet1
CPPUNIT_ASSERT_EQUAL(OUString("Munka2"), sTabName);
+ nCheck++;
+ }
+ }
+ // tdf#122624 column and row viewarea positions
+ else if (sName == "PositionLeft")
+ {
+ sal_Int32 nPosLeft;
+ aSeq[i].Value >>= nPosLeft;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nPosLeft);
+ nCheck++;
+ }
+ else if (sName == "PositionTop")
+ {
+ sal_Int32 nPosTop;
+ aSeq[i].Value >>= nPosTop;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nPosTop);
+ nCheck++;
}
}
}
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), nCheck);
}
CPPUNIT_PLUGIN_IMPLEMENT();