summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/data/xlsx/protectedRange.xlsxbin0 -> 8828 bytes
-rw-r--r--sc/qa/unit/subsequent_export_test2.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/protectedRange.xlsx b/sc/qa/unit/data/xlsx/protectedRange.xlsx
new file mode 100644
index 000000000000..a185ac3598d0
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/protectedRange.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_export_test2.cxx b/sc/qa/unit/subsequent_export_test2.cxx
index 9f281928c732..c0b17e11aeb8 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -1263,6 +1263,17 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf126024XLSX)
"External");
}
+CPPUNIT_TEST_FIXTURE(ScExportTest2, testProtectedRange)
+{
+ createScDoc("xlsx/protectedRange.xlsx");
+ save("Calc Office Open XML");
+
+ xmlDocUniquePtr pDoc = parseExport("xl/worksheets/sheet1.xml");
+ CPPUNIT_ASSERT(pDoc);
+ // entire row was being exported as shorthand 'B:B' which LO couldn't read back
+ assertXPath(pDoc, "//x:protectedRanges/x:protectedRange"_ostr, "sqref"_ostr, "B1:B1048576");
+}
+
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf91332)
{
createScDoc("xlsx/tdf91332.xlsx");