UnoApiTest: Add enum for filter names
and use it in save/saveAndReload Change-Id: I3d82ab54119ab6c35587ea706c82254a5c39dbd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194158 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
@@ -351,7 +351,7 @@ void PivotChartTest::testRoundtrip()
|
||||
CPPUNIT_ASSERT_EQUAL(u"Total"_ustr, xLabelDataSequence->getData()[0].get<OUString>());
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
xChartDoc = getPivotChartDocFromSheet(1 );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@@ -208,7 +208,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarXLSX)
|
||||
testErrorBar(xErrorBarYProps);
|
||||
}
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
{
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0 );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -228,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarPropXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/testErrorBarProp.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendline)
|
||||
skipValidation();
|
||||
loadFromFile(u"ods/trendline.ods");
|
||||
checkTrendlinesInChart(getDataSeriesFromDoc( getChartDocFromSheet( 0), 0 ));
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
checkTrendlinesInChart(getDataSeriesFromDoc( getChartDocFromSheet( 0), 0 ));
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineOOXML)
|
||||
{
|
||||
loadFromFile(u"ods/trendline.ods");
|
||||
checkTrendlinesInChart(getDataSeriesFromDoc( getChartDocFromSheet( 0), 0 ));
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
checkTrendlinesInChart(getDataSeriesFromDoc( getChartDocFromSheet( 0), 0 ));
|
||||
}
|
||||
|
||||
@@ -268,14 +268,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineXLS)
|
||||
{
|
||||
loadFromFile(u"ods/trendline.ods");
|
||||
checkTrendlinesInChart(getDataSeriesFromDoc( getChartDocFromSheet( 0), 0 ));
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
checkTrendlinesInChart(getDataSeriesFromDoc( getChartDocFromSheet( 0), 0 ));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testMovingAverage)
|
||||
{
|
||||
loadFromFile(u"ods/moving-type.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -311,7 +311,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testStockChart)
|
||||
*/
|
||||
loadFromFile(u"docx/testStockChart.docx");
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -326,7 +326,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testStockChart)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChart)
|
||||
{
|
||||
loadFromFile(u"docx/testBarChart.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -338,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses)
|
||||
// test crosses val="autoZero" with DOCX
|
||||
{
|
||||
loadFromFile(u"docx/Bar_horizontal_cone.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", "val", u"autoZero");
|
||||
@@ -346,7 +346,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses)
|
||||
// tdf#142351: test crossesAt val="-50" with XLSX
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf142351.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -396,7 +396,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterChartTextXValues)
|
||||
CPPUNIT_ASSERT_EQUAL(5.0, aYValues[2][3]);
|
||||
|
||||
// Test the export.
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -407,7 +407,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisValues)
|
||||
{
|
||||
loadFromFile(u"odt/tdf114657.odt");
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -422,7 +422,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisCategories)
|
||||
{
|
||||
loadFromFile(u"odt/tdf131143.odt");
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:ptCount", "val", u"4");
|
||||
@@ -434,7 +434,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartDataTable)
|
||||
{
|
||||
loadFromFile(u"docx/testChartDataTable.docx");
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showHorzBorder", "val", u"1");
|
||||
@@ -446,7 +446,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartExternalData)
|
||||
{
|
||||
loadFromFile(u"docx/testMultipleChart.docx");
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:externalData");
|
||||
@@ -498,7 +498,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAreaChartLoad)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:showVal", "val", u"1");
|
||||
@@ -508,7 +508,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAreaChartLoad)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testUpDownBars)
|
||||
{
|
||||
loadFromFile(u"docx/UpDownBars.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:upDownBars", 0);
|
||||
@@ -517,7 +517,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testUpDownBars)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDoughnutChart)
|
||||
{
|
||||
loadFromFile(u"docx/doughnutChart.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -527,7 +527,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDoughnutChart)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieOfPieChart)
|
||||
{
|
||||
loadFromFile(u"xlsx/pieOfPieChart.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -538,7 +538,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieOfPieChart)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarOfPieChart)
|
||||
{
|
||||
loadFromFile(u"xlsx/barOfPieChart.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -549,7 +549,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarOfPieChart)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieOfPieSplitPos)
|
||||
{
|
||||
loadFromFile(u"xlsx/pieOfPieChart2.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -560,7 +560,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieOfPieSplitPos)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarOfPieSplitPos)
|
||||
{
|
||||
loadFromFile(u"xlsx/barOfPieChart2.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -571,7 +571,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarOfPieSplitPos)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDisplayUnits)
|
||||
{
|
||||
loadFromFile(u"docx/DisplayUnits.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -581,7 +581,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDisplayUnits)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallGradientFill)
|
||||
{
|
||||
loadFromFile(u"docx/fdo74115_WallGradientFill.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -591,7 +591,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallGradientFill)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallBitmapFill)
|
||||
{
|
||||
loadFromFile(u"docx/fdo74115_WallBitmapFill.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:blipFill");
|
||||
@@ -604,7 +604,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartWallLineStyle)
|
||||
// FIXME: validation error in OOXML export: Errors: 9
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:ln/a:noFill");
|
||||
@@ -615,7 +615,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartWallLineStyle)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290LineChartMarkerX)
|
||||
{
|
||||
loadFromFile(u"docx/fdo78290_Line_Chart_Marker_x.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val",u"x");
|
||||
@@ -627,7 +627,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290LineChartMarkerX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290ScatterChartMarkerX)
|
||||
{
|
||||
loadFromFile(u"docx/fdo78290_Scatter_Chart_Marker_x.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val",u"x");
|
||||
@@ -640,7 +640,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290ScatterChartMarkerX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290CombinationChartMarkerX)
|
||||
{
|
||||
loadFromFile(u"docx/fdo78290_Combination_Chart_Marker_x.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val",u"x");
|
||||
@@ -651,7 +651,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTdf126115IndividualMarker)
|
||||
{
|
||||
// Check individual marker properties.
|
||||
loadFromFile(u"xlsx/tdf126115.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// 1. series
|
||||
@@ -703,7 +703,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatODS)
|
||||
verify(xChartDoc);
|
||||
|
||||
// Reload the document and make sure everything remains intact.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
xChartDoc = getChartDocFromSheet(0);
|
||||
verify(xChartDoc);
|
||||
}
|
||||
@@ -752,7 +752,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatXLS)
|
||||
xPS->setPropertyValue( CHART_UNONAME_NUMFMT, aAny );
|
||||
|
||||
// Write the document(xls) with changes made close it, load it and check if changes are intact
|
||||
saveAndReload( u"MS Excel 97"_ustr );
|
||||
saveAndReload(TestFilter::XLS);
|
||||
xChartDoc = getChartDocFromSheet( 0 );
|
||||
verify( xChartDoc, false, util::NumberFormat::NUMBER );
|
||||
}
|
||||
@@ -837,7 +837,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBordersDOCX)
|
||||
// FIXME: validation error in OOXML export: Errors: 3
|
||||
skipValidation();
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
verify(xChartDoc , 0);
|
||||
@@ -855,7 +855,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabel3DChartDOCX)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -872,7 +872,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBarChartDOCX)
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -891,7 +891,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelClusteredBarChartDOCX)
|
||||
// FIXME: validation error in OOXML export: Errors: 9
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -906,7 +906,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelRadarChartDOCX)
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -925,7 +925,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDoughnutChartDOCX)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -944,7 +944,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelAreaChartDOCX)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -964,7 +964,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDefaultLineChartDOCX)
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
|
||||
@@ -983,7 +983,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testIndividualDataLabelProps)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr", "b", u"1");
|
||||
@@ -995,7 +995,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testIndividualDataLabelProps)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChartRotation)
|
||||
{
|
||||
loadFromFile(u"docx/barChartRotation.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1015,7 +1015,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testShapeFollowedByChart)
|
||||
// FIXME: validation error in OOXML export: Errors: 5
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr );
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1032,7 +1032,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartDataLabels)
|
||||
// FIXME: validation error in OOXML export: Errors: 19
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos", "val", u"outEnd");
|
||||
@@ -1041,7 +1041,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartDataLabels)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSeriesIdxOrder)
|
||||
{
|
||||
loadFromFile(u"docx/testSeriesIdxOrder.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:idx[1]", "val", u"1");
|
||||
@@ -1065,7 +1065,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterPlotLabels)
|
||||
CPPUNIT_ASSERT_EQUAL(u"c"_ustr, aLabels[2][0].get<OUString>());
|
||||
|
||||
// Reload the doc and check again. The labels should not change.
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1083,7 +1083,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterPlotLabels)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarDataRangeODS)
|
||||
{
|
||||
loadFromFile(u"ods/ErrorBarRange.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0 );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1112,7 +1112,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarDataRangeODS)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_barOfPie)
|
||||
{
|
||||
loadFromFile(u"ods/tdf50934_barOfPie.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0 );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1135,7 +1135,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_barOfPie)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_pieOfPie)
|
||||
{
|
||||
loadFromFile(u"ods/tdf50934_pieOfPie.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0 );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1158,7 +1158,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_pieOfPie)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf161800_barOfPie_split_pos)
|
||||
{
|
||||
loadFromFile(u"ods/tdf161800_barOfPie_split_pos.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0 );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1178,7 +1178,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf161800_barOfPie_split_pos)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf161800_pieOfPie_split_pos)
|
||||
{
|
||||
loadFromFile(u"ods/tdf161800_pieOfPie_split_pos.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0 );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1201,7 +1201,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf161800_pieOfPie_split_pos)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartCrash)
|
||||
{
|
||||
loadFromFile(u"docx/FDO75975.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
}
|
||||
@@ -1209,7 +1209,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartCrash)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartRotation)
|
||||
{
|
||||
loadFromFile(u"docx/pieChartRotation.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX", "val", u"40");
|
||||
@@ -1295,7 +1295,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testGapWidthXLSX)
|
||||
xChartDoc = getChartDocFromSheet( 1 );
|
||||
checkSheetForGapWidthAndOverlap(getChartTypeFromDoc( xChartDoc, 0 ), 50, 30);
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
xChartDoc = getChartDocFromSheet( 0 );
|
||||
checkSheetForGapWidthAndOverlap(getChartTypeFromDoc( xChartDoc, 0 ), 120, -60);
|
||||
@@ -1316,7 +1316,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataseriesOverlapStackedChartXLSX)
|
||||
xChartDoc = getChartDocFromSheet( 1);
|
||||
checkSheetForGapWidthAndOverlap(getChartTypeFromDoc( xChartDoc, 0 ), 100, 35);
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
xChartDoc = getChartDocFromSheet( 0);
|
||||
checkSheetForGapWidthAndOverlap(getChartTypeFromDoc( xChartDoc, 0 ), 100, 100);
|
||||
@@ -1328,7 +1328,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataseriesOverlapStackedChartXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSmoothedLines)
|
||||
{
|
||||
loadFromFile(u"ods/smoothedLines.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:smooth", "val", u"0");
|
||||
@@ -1346,7 +1346,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testLabelStringODS)
|
||||
OUString aLabelString = xLabelSeq->getSourceRangeRepresentation();
|
||||
CPPUNIT_ASSERT_EQUAL(u"\"LabelName\""_ustr, aLabelString);
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
xChartDoc = getChartDocFromSheet( 0 );
|
||||
xLabelSeq = getLabelDataSequenceFromDoc(xChartDoc);
|
||||
@@ -1403,7 +1403,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testStyleImportExport)
|
||||
// Test that this value round-trips successfully.
|
||||
loadFromFile(std::u16string_view(u"xlsx/column-style.xlsx"));
|
||||
|
||||
save("Calc Office Open XML");
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/style1.xml");
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/cs:chartStyle");
|
||||
|
||||
@@ -42,7 +42,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testSetSeriesToSecondaryAxisXLSX)
|
||||
// Attach the second series to the secondary axis. (The third series is already attached.)
|
||||
xPropSet->setPropertyValue(u"AttachedAxisIndex"_ustr, uno::Any(AxisIndex));
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Check there are only two <lineChart> tag in the XML, one for the primary and one for the secondary axis.
|
||||
@@ -53,7 +53,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisXLSX)
|
||||
{
|
||||
// Original file was created with MS Office
|
||||
loadFromFile(u"xlsx/combined_chart_secondary_axis.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Collect barchart axID on secondary Axis
|
||||
@@ -81,7 +81,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisODS)
|
||||
{
|
||||
// Original file was created with LibreOffice
|
||||
loadFromFile(u"ods/combined_chart_secondary_axis.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Collect barchart axID on secondary Axis
|
||||
@@ -115,7 +115,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenXLSX)
|
||||
// Original files were created with MS Office
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf127777.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
|
||||
@@ -123,7 +123,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenXLSX)
|
||||
}
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf132076.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
|
||||
@@ -135,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenWithDeletedAxis)
|
||||
{
|
||||
// Original file was created with MS Office (the category axis is deleted in the file)
|
||||
loadFromFile(u"xlsx/tdf128633.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
|
||||
@@ -146,7 +146,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenODS)
|
||||
{
|
||||
// Original file was created with LibreOffice
|
||||
loadFromFile(u"ods/test_CrossBetween.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
|
||||
@@ -156,7 +156,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenODS)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartexTitleXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/funnel1.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chartEx1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -174,7 +174,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartexTitleXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartexPPTX)
|
||||
{
|
||||
loadFromFile(u"pptx/funnel-pp1.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chartEx1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -185,7 +185,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartexPPTX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitleRotationXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/axis_title_rotation.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -196,7 +196,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitleRotationXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitlePositionDOCX)
|
||||
{
|
||||
loadFromFile(u"docx/testAxisTitlePosition.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -233,7 +233,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisCrossBetweenDOCX)
|
||||
// FIXME: validation error in OOXML export: Errors: 3
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "(//c:crossBetween)[1]", "val", u"midCat");
|
||||
}
|
||||
@@ -241,7 +241,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisCrossBetweenDOCX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testPieChartDataPointExplosionXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/pie_chart_datapoint_explosion.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -360,7 +360,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel)
|
||||
aFields[1]->getFieldType());
|
||||
CPPUNIT_ASSERT_EQUAL(u" <CELLREF"_ustr, aFields[1]->getString());
|
||||
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Check the data labels font color for the complete data series
|
||||
@@ -377,7 +377,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataSeriesName)
|
||||
// ODF
|
||||
{
|
||||
loadFromFile(u"ods/ser_labels.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
CPPUNIT_ASSERT(xDataSeries.is());
|
||||
@@ -391,7 +391,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataSeriesName)
|
||||
// OOXML
|
||||
{
|
||||
loadFromFile(u"xlsx/ser_labels.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
CPPUNIT_ASSERT(xDataSeries.is());
|
||||
@@ -410,7 +410,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
|
||||
|
||||
loadFromFile(u"xlsx/testCustomPosDataLabels.xlsx");
|
||||
{
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -435,7 +435,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
|
||||
|
||||
loadFromFile(u"docx/testTdf108110.docx");
|
||||
{
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -460,7 +460,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
|
||||
|
||||
loadFromFile(u"ods/tdf136024.ods");
|
||||
{
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
// tdf#136024: test custom position of pie chart data label after an ods export
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -484,7 +484,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf161571PiechartCustomPosDataLabels
|
||||
skipValidation();
|
||||
|
||||
loadFromFile(u"xlsx/tdf161607PieChartLeaderLinesColorWidth.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -576,7 +576,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines)
|
||||
|
||||
loadFromFile(u"xlsx/testTdf90749.xlsx");
|
||||
{
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc,
|
||||
@@ -590,7 +590,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines)
|
||||
}
|
||||
loadFromFile(u"docx/MSO_Custom_Leader_Line.docx");
|
||||
{
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// tdf#134571: Check the leader line is switch off.
|
||||
@@ -607,7 +607,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf161607PieChartLeaderLinesColorWid
|
||||
skipValidation();
|
||||
|
||||
loadFromFile(u"xlsx/tdf161607PieChartLeaderLinesColorWidth.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -631,7 +631,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf161607PieChartLeaderLinesColorWid
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNumberFormatExportPPTX)
|
||||
{
|
||||
loadFromFile(u"pptx/tdf115859.pptx");
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -648,7 +648,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLabelSeparatorExportDOCX)
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -666,7 +666,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLabelSeparatorExportDOCX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesColorFillPPTX)
|
||||
{
|
||||
loadFromFile(u"pptx/testChartTitlePropertiesColorFill.pptx");
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPathInsensitive(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr",
|
||||
@@ -677,7 +677,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesColorFillPPTX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesGradientFillPPTX)
|
||||
{
|
||||
loadFromFile(u"pptx/testChartTitlePropertiesGradientFill.pptx");
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPathInsensitive(
|
||||
@@ -692,7 +692,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesGradientFillPPTX
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesBitmapFillPPTX)
|
||||
{
|
||||
loadFromFile(u"pptx/testChartTitlePropertiesBitmapFill.pptx");
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed",
|
||||
@@ -703,7 +703,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesBitmapFillPPTX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testxAxisLabelsRotation)
|
||||
{
|
||||
loadFromFile(u"xlsx/xAxisLabelsRotation.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc1);
|
||||
|
||||
@@ -715,7 +715,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testxAxisLabelsRotation)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesXLSX)
|
||||
{
|
||||
loadFromFile(u"ods/multilevelcat.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// check category axis labels number of first level
|
||||
@@ -748,7 +748,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesDOCX)
|
||||
{
|
||||
loadFromFile(u"odt/multilevelcat.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// check category axis labels number of first level
|
||||
@@ -781,7 +781,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesDOCX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf116163)
|
||||
{
|
||||
loadFromFile(u"pptx/tdf116163.pptx");
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -792,7 +792,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf116163)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf111824)
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf111824.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -807,7 +807,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf111824)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, test3DAreaChartZAxis)
|
||||
{
|
||||
loadFromFile(u"xlsx/test3DAreaChartZAxis.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -823,7 +823,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf119029)
|
||||
{
|
||||
loadFromFile(u"odp/tdf119029.odp");
|
||||
// Only use "chart", without number, because the number depends on the previous tests
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -835,7 +835,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf119029)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf108022)
|
||||
{
|
||||
loadFromFile(u"odt/tdf108022.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// assert we really have two charts
|
||||
Reference<chart2::XChartDocument> xChartDoc1(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
@@ -847,7 +847,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf108022)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121744)
|
||||
{
|
||||
loadFromFile(u"docx/tdf121744.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -863,7 +863,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121744)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121189)
|
||||
{
|
||||
loadFromFile(u"odp/tdf121189.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0),
|
||||
@@ -881,7 +881,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf122031)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -901,7 +901,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf122031)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf115012)
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf115012.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// workaround: use-zero instead of leave-gap to show the original line chart
|
||||
@@ -915,7 +915,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134118)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// workaround: use leave-gap instead of zero to show the original line chart
|
||||
@@ -932,7 +932,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123206_customLabelText)
|
||||
// FIXME: validation error in OOXML export: Errors: 2
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -946,7 +946,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, test_style)
|
||||
{
|
||||
loadFromFile(u"xlsx/column-style.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// workaround: use leave-gap instead of zero to show the original line chart
|
||||
@@ -963,7 +963,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomLabelText)
|
||||
// FIXME: validation error in OOXML export: Errors: 3
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -996,7 +996,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries)
|
||||
{
|
||||
loadFromFile(u"xlsx/deleted_legend_entry.xlsx");
|
||||
{
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 1));
|
||||
@@ -1010,7 +1010,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries)
|
||||
|
||||
loadFromFile(u"xlsx/deleted_legend_entry2.xlsx");
|
||||
{
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
@@ -1036,7 +1036,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf60316)
|
||||
{
|
||||
loadFromFile(u"pptx/tdf60316.pptx");
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1048,7 +1048,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf60316)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf130225)
|
||||
{
|
||||
loadFromFile(u"docx/piechart_deleted_legend_entry.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
@@ -1063,7 +1063,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf130225)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf59857)
|
||||
{
|
||||
loadFromFile(u"ods/tdf59857.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1079,7 +1079,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf59857)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf126076)
|
||||
{
|
||||
loadFromFile(u"xlsx/auto_marker_excel10.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1094,7 +1094,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf126076)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf75330)
|
||||
{
|
||||
loadFromFile(u"ods/legend_overlay.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
{
|
||||
uno::Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0);
|
||||
uno::Reference<chart::XChartDocument> xChartDoc(xChart2Doc, uno::UNO_QUERY);
|
||||
@@ -1104,7 +1104,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf75330)
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Overlay"_ustr) >>= bOverlay);
|
||||
CPPUNIT_ASSERT(bOverlay);
|
||||
}
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
{
|
||||
uno::Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0);
|
||||
uno::Reference<chart::XChartDocument> xChartDoc(xChart2Doc, uno::UNO_QUERY);
|
||||
@@ -1119,7 +1119,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf75330)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf127792)
|
||||
{
|
||||
loadFromFile(u"docx/MSO_axis_position.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
|
||||
@@ -1135,7 +1135,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf131979)
|
||||
{
|
||||
loadFromFile(u"ods/tdf131115.ods");
|
||||
{
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
@@ -1151,7 +1151,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf131979)
|
||||
|
||||
loadFromFile(u"ods/tdf131979.ods");
|
||||
{
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
@@ -1173,7 +1173,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132076)
|
||||
|
||||
{
|
||||
loadFromFile(u"ods/tdf132076.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt", "formatCode",
|
||||
@@ -1183,7 +1183,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132076)
|
||||
}
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf132076.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt", "formatCode",
|
||||
@@ -1196,7 +1196,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132076)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf125812)
|
||||
{
|
||||
loadFromFile(u"odp/ellipticalGradientFill.odp");
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path", "path",
|
||||
@@ -1218,7 +1218,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133190)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1240,7 +1240,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133191)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1254,7 +1254,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133191)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132594)
|
||||
{
|
||||
loadFromFile(u"xlsx/chart_pie2007.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1279,7 +1279,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134255)
|
||||
skipValidation();
|
||||
|
||||
// export test
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1309,7 +1309,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134977)
|
||||
skipValidation();
|
||||
|
||||
//export test
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc,
|
||||
@@ -1321,7 +1321,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134977)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123647)
|
||||
{
|
||||
loadFromFile(u"xlsx/empty_chart.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1335,7 +1335,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf136267)
|
||||
// FIXME: validation error in OOXML export: Errors: 2
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1348,7 +1348,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf136267)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataLabelPlacementPieChart)
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf134978.xlsx");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0), UNO_QUERY_THROW);
|
||||
// test the placement of the manually positioned label
|
||||
Reference<beans::XPropertySet> xDataPointPropSet(
|
||||
@@ -1367,7 +1367,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf137917)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1438,7 +1438,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204)
|
||||
// FIXME: validation error in OOXML export: Errors: 2
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1482,7 +1482,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138181)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomShapeText)
|
||||
{
|
||||
loadFromFile(u"ods/tdf72776.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0), UNO_QUERY_THROW);
|
||||
// test that the text of custom shape exists inside the chart
|
||||
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
|
||||
@@ -1497,7 +1497,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomShapeText)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf128621.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1525,7 +1525,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesDOCX)
|
||||
{
|
||||
loadFromFile(u"docx/tdf143130.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1553,7 +1553,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesDOCX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testGraphicBlipXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf143127.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1581,7 +1581,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testGraphicBlipXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNameRangeXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/chart_with_name_range.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// test the syntax of local range name on the local sheet.
|
||||
@@ -1630,7 +1630,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942)
|
||||
// FIXME: validation error in OOXML export: Errors: 4
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1670,7 +1670,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDateCategoriesPPTX)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1730,7 +1730,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataTableImportExport)
|
||||
CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Keys"_ustr) >>= bKeys);
|
||||
CPPUNIT_ASSERT_EQUAL(false, bKeys);
|
||||
}
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
{
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -1760,7 +1760,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf166249)
|
||||
loadFromFile(u"xlsx/tdf166249.xlsx");
|
||||
// FIXME: validation error in OOXML export
|
||||
skipValidation();
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf108107)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx", "val", u"1");
|
||||
@@ -42,7 +42,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf108107)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf114139)
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf114139.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -55,7 +55,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf114139)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf64224)
|
||||
{
|
||||
loadFromFile(u"ods/tdf64224.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -67,7 +67,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf64224)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillDOCX)
|
||||
{
|
||||
loadFromFile(u"docx/testChartTitlePropertiesColorFill.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPathInsensitive(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", u"ff0000");
|
||||
@@ -77,7 +77,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillDOCX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillDOCX)
|
||||
{
|
||||
loadFromFile(u"docx/testChartTitlePropertiesGradientFill.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPathInsensitive(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", u"cccccc");
|
||||
@@ -88,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillDOCX
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillDOCX)
|
||||
{
|
||||
loadFromFile(u"docx/testChartTitlePropertiesBitmapFill.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", u"rId1");
|
||||
@@ -100,7 +100,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyDOCX)
|
||||
{
|
||||
// Test color gradient (two color) with gradient transparency
|
||||
loadFromFile(u"docx/testColorGradientWithTransparency.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Test the transparency of the first color
|
||||
@@ -113,7 +113,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyODS)
|
||||
{
|
||||
// Test color gradient (two color) with simple transparency
|
||||
loadFromFile(u"ods/testColorGradientWithTransparency.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Test the transparency of the first color
|
||||
@@ -126,7 +126,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientStopXLSX)
|
||||
{
|
||||
// Test color gradient (two color) stop of the first color
|
||||
loadFromFile(u"xlsx/tdf128619.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Test the position of the first color
|
||||
@@ -138,7 +138,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientStopXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRadialColorGradientDOCX)
|
||||
{
|
||||
loadFromFile(u"docx/tdf128794.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Test the gradient style (if there is no 'a:path' attribute, it is a linear gradient)
|
||||
@@ -154,7 +154,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRadialColorGradientDOCX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropDOCX)
|
||||
{
|
||||
loadFromFile(u"docx/testBarChartDataPointPropDOCX.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -177,7 +177,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFdo83058dlblPos)
|
||||
// FIXME: validation error in OOXML export: Errors: 1
|
||||
skipValidation();
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[2]/c:dLblPos", "val", u"outEnd");
|
||||
@@ -189,7 +189,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFdo83058dlblPos)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDelXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/autotitledel_2007.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted", "val", u"0");
|
||||
@@ -198,7 +198,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDelXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDispBlanksAsXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/dispBlanksAs_2007.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs", "val", u"gap");
|
||||
@@ -207,7 +207,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDispBlanksAsXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMarkerColorXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/markerColor.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPathInsensitive(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:marker/c:spPr/a:solidFill/a:srgbClr", "val", u"92d050");
|
||||
@@ -216,7 +216,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMarkerColorXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRoundedCornersXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/markerColor.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:roundedCorners", "val", u"0");
|
||||
@@ -225,7 +225,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRoundedCornersXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisNumberFormatXLSX)
|
||||
{
|
||||
loadFromFile(u"ods/axis_number_format.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx", 2);
|
||||
@@ -243,7 +243,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX)
|
||||
|
||||
loadFromFile(u"ods/tdf123774.ods");
|
||||
{
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt", "formatCode", u"[$-40E]0.00%");
|
||||
@@ -255,7 +255,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX)
|
||||
|
||||
loadFromFile(u"xlsx/tdf130986.xlsx");
|
||||
{
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:idx", "val", u"1");
|
||||
@@ -275,7 +275,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelDefaultValuesXLSX)
|
||||
CPPUNIT_ASSERT(aAny >>= aLabel);
|
||||
CPPUNIT_ASSERT(aLabel.ShowNumber);
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:showVal", "val", u"1");
|
||||
@@ -292,7 +292,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelFillColor)
|
||||
sal_Int32 nLabelFillColor;
|
||||
CPPUNIT_ASSERT(aAny >>= nLabelFillColor);
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPathInsensitive(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:spPr/a:solidFill/a:srgbClr", "val", u"f79646");
|
||||
@@ -301,7 +301,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelFillColor)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleOverlayXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/chart_title.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:overlay", "val", u"0");
|
||||
@@ -310,7 +310,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleOverlayXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testInvertIfNegativeXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/bar_chart_simple.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:invertIfNegative", "val", u"0");
|
||||
@@ -319,7 +319,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testInvertIfNegativeXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBubble3DXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/bubble_chart_simple.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[1]/c:bubble3D", "val", u"0");
|
||||
@@ -330,7 +330,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBubble3DXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testNoMarkerXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/no_marker.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:marker/c:symbol", "val", u"none");
|
||||
@@ -341,7 +341,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testNoMarkerXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleManualLayoutXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/title_manual_layout.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:layoutTarget", 0);
|
||||
@@ -365,7 +365,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleManualLayoutXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotAreaManualLayoutXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/plot_area_manual_layout.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -399,7 +399,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotAreaManualLayoutXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testLegendManualLayoutXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/legend_manual_layout.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -436,7 +436,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testLegendManualLayoutXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle)
|
||||
{
|
||||
loadFromFile(u"ods/testChartSubTitle.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// test properties of subtitle
|
||||
@@ -457,7 +457,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartMainWithSubTitle)
|
||||
{
|
||||
loadFromFile(u"ods/testChartMainWithSubTitle.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// test properties of title
|
||||
@@ -480,7 +480,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartMainWithSubTitle)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDeleted)
|
||||
{
|
||||
loadFromFile(u"xlsx/testAutoTitleDeleted.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted", "val", u"1");
|
||||
@@ -489,7 +489,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDeleted)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/testChartTitlePropertiesColorFill.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPathInsensitive(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", u"ff0000");
|
||||
@@ -499,7 +499,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/testChartTitlePropertiesGradientFill.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPathInsensitive(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", u"cccccc");
|
||||
@@ -510,7 +510,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillXLSX
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/testChartTitlePropertiesBitmapFill.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", u"rId1");
|
||||
@@ -520,7 +520,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/testBarChartDataPointPropXLSX.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -539,7 +539,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisCharacterPropertiesXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/axis_character_properties.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -557,7 +557,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisCharacterPropertiesXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleCharacterPropertiesXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/title_character_properties.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -571,7 +571,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleCharacterPropertiesXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotVisOnlyXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/hidden_cells.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -581,7 +581,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotVisOnlyXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartVaryColorsXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf90876.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -591,7 +591,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartVaryColorsXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf96161)
|
||||
{
|
||||
loadFromFile(u"ods/tdf96161.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -605,7 +605,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTableOnPage3)
|
||||
// FIXME: validation error in OOXML export: Errors: 2
|
||||
skipValidation();
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@@ -622,7 +622,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, tdf137691)
|
||||
{
|
||||
// given a doc where the banana negative data formats as ($123) and the pineapple data as $(123)
|
||||
loadFromFile(u"pptx/tdf137691_dataTable.pptx");
|
||||
saveAndReload(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX_2007);
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
|
||||
@@ -642,7 +642,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, tdf137691)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMultipleAxisXLSX)
|
||||
{
|
||||
loadFromFile(u"ods/multiple_axis.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -658,7 +658,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMultipleAxisXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testSecondaryAxisXLSX)
|
||||
{
|
||||
loadFromFile(u"ods/secondary_axis.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -675,7 +675,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testSecondaryAxisXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartSecondaryAxisXLSX)
|
||||
{
|
||||
loadFromFile(u"xlsx/testSecondaryAxis.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Collect barchart axID on primary Axis
|
||||
@@ -694,7 +694,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartSecondaryAxisXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testEmptyCharts)
|
||||
{
|
||||
loadFromFile(u"odt/testEmptyCharts.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Make sure each chart exists in the respective XML
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
|
||||
@@ -729,7 +729,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148142)
|
||||
xAxis->setScaleData(aScaleData);
|
||||
|
||||
// Check the X axis position after export.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
Reference<chart2::XChartDocument> xChartDoc2 = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChartDoc2.is());
|
||||
Reference<chart2::XAxis> xAxis2 = getAxisFromDoc(xChartDoc2, 0, 0, 0);
|
||||
@@ -741,7 +741,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148142)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFormattedChartTitles)
|
||||
{
|
||||
loadFromFile(u"xlsx/tdf39052.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -896,7 +896,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testODSFormattedChartTitles)
|
||||
// The document contains a line chart with "Between tick marks" X axis position.
|
||||
loadFromFile(u"ods/tdf39052.ods");
|
||||
// Check formatted strings after export.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0);
|
||||
CPPUNIT_ASSERT(xChart2Doc.is());
|
||||
@@ -911,7 +911,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testODSFormattedChartTitles)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148117)
|
||||
{
|
||||
loadFromFile(u"pptx/tdf148117.pptx");
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/c:chartSpace/c:date1904", "val", u"0");
|
||||
@@ -920,7 +920,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148117)
|
||||
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, test1904NullDate)
|
||||
{
|
||||
loadFromFile(u"pptx/1904NullDate.pptx");
|
||||
saveAndReload(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX_2007);
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
Reference<beans::XPropertySet> xPropSet(xChartDoc, uno::UNO_QUERY);
|
||||
|
||||
@@ -74,7 +74,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap()
|
||||
{
|
||||
// It tests chart area, data series line and regression-curve line.
|
||||
loadFromFile(u"xlsx/tdf135184RoundLineCap.xlsx");
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -103,7 +103,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap2()
|
||||
{
|
||||
// It tests legend, data series sector and title.
|
||||
loadFromFile(u"xlsx/tdf135184RoundLineCap2.xlsx");
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -134,7 +134,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap3()
|
||||
{
|
||||
// It tests chart area, data series line and regression-curve line.
|
||||
loadFromFile(u"xlsx/tdf135184RoundLineCap.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -152,7 +152,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap4()
|
||||
{
|
||||
// It tests legend, data series sector and title.
|
||||
loadFromFile(u"xlsx/tdf135184RoundLineCap2.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -177,7 +177,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export()
|
||||
// ODF im/export for MCGR is integrated
|
||||
|
||||
// Make sure the chart area has a transparency in gradient stops in saved pptx file.
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -203,7 +203,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
|
||||
loadFromFile(u"pptx/tdf128345_ChartArea_CG_TS.pptx");
|
||||
|
||||
// Find transparency gradient name
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
const OUString sOUChartStyleName = getXPathContent(
|
||||
@@ -218,7 +218,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
|
||||
= getXPathContent(pXmlDoc, sStylePath + "/style:graphic-properties/@draw:opacity-name");
|
||||
|
||||
// Verify the content of the opacity definition
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc2 = parseExport(u"Object 1/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc2);
|
||||
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
|
||||
@@ -238,7 +238,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_export()
|
||||
loadFromFile(u"odp/tdf128345_ChartWall_CS_TG.odp");
|
||||
|
||||
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -257,7 +257,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import()
|
||||
loadFromFile(u"pptx/tdf128345_ChartWall_CS_TG.pptx");
|
||||
|
||||
// Find transparency gradient name
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
const OUString sOUChartStyleName
|
||||
@@ -272,7 +272,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import()
|
||||
= getXPathContent(pXmlDoc, sStylePath + "/style:graphic-properties/@draw:opacity-name");
|
||||
|
||||
// Verify content of the opacity definition
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc2 = parseExport(u"Object 1/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc2);
|
||||
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
|
||||
@@ -290,7 +290,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_export()
|
||||
loadFromFile(u"odp/tdf128345_Legend_CS_TG_axial.odp");
|
||||
|
||||
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
|
||||
save(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
save(TestFilter::PPTX_2007);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -319,7 +319,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
|
||||
loadFromFile(u"pptx/tdf128345_Legend_CS_TG_axial.pptx");
|
||||
|
||||
// Find transparency gradient name
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
const OUString sOUChartStyleName
|
||||
@@ -334,7 +334,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
|
||||
= getXPathContent(pXmlDoc, sStylePath + "/style:graphic-properties/@draw:opacity-name");
|
||||
|
||||
// Verify content of the opacity definition
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc2 = parseExport(u"Object 1/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc2);
|
||||
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
|
||||
@@ -439,7 +439,7 @@ void Chart2GeometryTest::testTdf135366LabelExport()
|
||||
// FIXME: Error: unexpected attribute "loext:label-stroke-color"
|
||||
skipValidation();
|
||||
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -468,7 +468,7 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText()
|
||||
// although the used <chart:data-label> element exists since ODF 1.2.
|
||||
SetODFDefaultVersion(SvtSaveOptions::ODFVER_012);
|
||||
loadFromFile(u"pptx/tdf135366_CustomLabelText.pptx");
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
|
||||
@@ -942,7 +942,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf166428)
|
||||
|
||||
// The attribute table:cell-range-address does not exist in ODF 1.4. and therefore may not be
|
||||
// be written.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
|
||||
assertXPathNoAttribute(pXmlDoc,
|
||||
"/office:document-content/office:body/office:chart/chart:chart/"
|
||||
|
||||
+12
-12
@@ -79,7 +79,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentLine)
|
||||
loadFromFile(u"semi-transparent-line.odg");
|
||||
|
||||
// Export it to SVG.
|
||||
save(u"draw_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_DRAW);
|
||||
|
||||
// Get the style of the group around the actual <path> element.
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
@@ -99,7 +99,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentFillWithTransparentLine)
|
||||
loadFromFile(u"semi-transparent-fill.odg");
|
||||
|
||||
// Export it to SVG.
|
||||
save(u"draw_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_DRAW);
|
||||
|
||||
// Get the style of the group around the actual <path> element.
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
@@ -128,7 +128,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentText)
|
||||
loadFromFile(u"TransparentText.odg");
|
||||
|
||||
// Export to SVG.
|
||||
save(u"draw_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_DRAW);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
// We expect 2 groups of class "TextShape" that
|
||||
@@ -170,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentMultiParaText)
|
||||
xShapeProps->setPropertyValue(u"CharTransparence"_ustr, uno::Any(static_cast<sal_Int16>(20)));
|
||||
|
||||
// When exporting to SVG:
|
||||
save(u"draw_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_DRAW);
|
||||
|
||||
// Then make sure that the two semi-transparent paragraphs have the same X position:
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
@@ -215,7 +215,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testCustomBullet)
|
||||
loadFromFile(u"custom-bullet.fodp");
|
||||
|
||||
// When exporting that to SVG:
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
// Then make sure the bullet glyph is not lost:
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
@@ -235,7 +235,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, attributeRedefinedTest)
|
||||
loadFromFile(u"attributeRedefinedTest.odp");
|
||||
|
||||
// Export to SVG.
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
// We expect four paragraph
|
||||
@@ -279,7 +279,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testTab)
|
||||
xShapeText->setString(u"A\tB"_ustr);
|
||||
|
||||
// When exporting that document to SVG:
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
// Then make sure the tab is not lost:
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
@@ -296,7 +296,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, textInImage)
|
||||
loadFromFile(u"text-in-image.odp");
|
||||
|
||||
// Export to SVG.
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
@@ -314,7 +314,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentTextBullet)
|
||||
loadFromFile(u"semi-transparent-text-bullet.odg");
|
||||
|
||||
// When exporting to SVG:
|
||||
save(u"draw_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_DRAW);
|
||||
|
||||
// Then make sure the result is correct:
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
@@ -342,7 +342,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testMapModeText)
|
||||
loadFromFile(u"YAxis.odg");
|
||||
|
||||
// Export to SVG.
|
||||
save(u"draw_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_DRAW);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
@@ -370,7 +370,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testTdf91315)
|
||||
// Load a presentation containing RTL text
|
||||
loadFromFile(u"tdf91315.fodp");
|
||||
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
@@ -385,7 +385,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testTdf166789)
|
||||
// A fit-to-size text
|
||||
loadFromFile(u"fit-to-size-text.fodg");
|
||||
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
|
||||
@@ -23,6 +23,94 @@
|
||||
#include <unotools/tempfile.hxx>
|
||||
#include <vcl/filter/PDFiumLibrary.hxx>
|
||||
|
||||
enum class TestFilter
|
||||
{
|
||||
NONE,
|
||||
CSV,
|
||||
DOC,
|
||||
DOCBOOK,
|
||||
DOCM,
|
||||
DOCX,
|
||||
DOCX_2007,
|
||||
DOTX,
|
||||
FODG,
|
||||
FODS,
|
||||
FODT,
|
||||
HTML_CALC,
|
||||
HTML_IMPRESS,
|
||||
HTML_WRITER,
|
||||
MD,
|
||||
MML,
|
||||
ODB,
|
||||
ODG,
|
||||
ODM,
|
||||
ODP,
|
||||
ODS,
|
||||
ODT,
|
||||
OTT,
|
||||
PDF_WRITER,
|
||||
POTX,
|
||||
PPT,
|
||||
PPTM,
|
||||
PPTX,
|
||||
PPTX_2007,
|
||||
RTF,
|
||||
SVG_DRAW,
|
||||
SVG_IMPRESS,
|
||||
TEXT,
|
||||
TEXT_ENCODED,
|
||||
XHTML_CALC,
|
||||
XHTML_DRAW,
|
||||
XHTML_WRITER,
|
||||
XLS,
|
||||
XLSM,
|
||||
XLST,
|
||||
XLSX,
|
||||
};
|
||||
|
||||
const std::unordered_map<TestFilter, OUString> TestFilterNames{
|
||||
{ TestFilter::CSV, u"Text - txt - csv (StarCalc)"_ustr },
|
||||
{ TestFilter::DOC, u"MS Word 97"_ustr },
|
||||
{ TestFilter::DOCBOOK, u"DocBook File"_ustr },
|
||||
{ TestFilter::DOCM, u"MS Word 2007 XML VBA"_ustr },
|
||||
{ TestFilter::DOCX, u"Office Open XML Text"_ustr },
|
||||
{ TestFilter::DOCX_2007, u"MS Word 2007 XML"_ustr },
|
||||
{ TestFilter::DOTX, u"MS Word 2007 XML Template"_ustr },
|
||||
{ TestFilter::FODG, u"OpenDocument Drawing Flat XML"_ustr },
|
||||
{ TestFilter::FODS, u"OpenDocument Spreadsheet Flat XML"_ustr },
|
||||
{ TestFilter::FODT, u"OpenDocument Text Flat XML"_ustr },
|
||||
{ TestFilter::HTML_CALC, u"HTML (StarCalc)"_ustr },
|
||||
{ TestFilter::HTML_IMPRESS, u"impress_html_Export"_ustr },
|
||||
{ TestFilter::HTML_WRITER, u"HTML (StarWriter)"_ustr },
|
||||
{ TestFilter::MD, u"Markdown"_ustr },
|
||||
{ TestFilter::MML, u"MathML XML (Math)"_ustr },
|
||||
{ TestFilter::ODB, u"StarOffice XML (Base)"_ustr },
|
||||
{ TestFilter::ODG, u"draw8"_ustr },
|
||||
{ TestFilter::ODM, u"writerglobal8_writer"_ustr },
|
||||
{ TestFilter::ODP, u"impress8"_ustr },
|
||||
{ TestFilter::ODS, u"calc8"_ustr },
|
||||
{ TestFilter::ODT, u"writer8"_ustr },
|
||||
{ TestFilter::OTT, u"writer8_template"_ustr },
|
||||
{ TestFilter::PDF_WRITER, u"writer_pdf_Export"_ustr },
|
||||
{ TestFilter::POTX, u"Impress Office Open XML Template"_ustr },
|
||||
{ TestFilter::PPT, u"MS PowerPoint 97"_ustr },
|
||||
{ TestFilter::PPTM, u"Impress MS PowerPoint 2007 XML VBA"_ustr },
|
||||
{ TestFilter::PPTX, u"Impress Office Open XML"_ustr },
|
||||
{ TestFilter::PPTX_2007, u"Impress MS PowerPoint 2007 XML"_ustr },
|
||||
{ TestFilter::RTF, u"Rich Text Format"_ustr },
|
||||
{ TestFilter::SVG_DRAW, u"draw_svg_Export"_ustr },
|
||||
{ TestFilter::SVG_IMPRESS, u"impress_svg_Export"_ustr },
|
||||
{ TestFilter::TEXT, u"Text"_ustr },
|
||||
{ TestFilter::TEXT_ENCODED, u"Text (encoded)"_ustr },
|
||||
{ TestFilter::XHTML_CALC, u"XHTML Calc File"_ustr },
|
||||
{ TestFilter::XHTML_DRAW, u"XHTML Draw File"_ustr },
|
||||
{ TestFilter::XHTML_WRITER, u"XHTML Writer File"_ustr },
|
||||
{ TestFilter::XLS, u"MS Excel 97"_ustr },
|
||||
{ TestFilter::XLSM, u"Calc MS Excel 2007 VBA XML"_ustr },
|
||||
{ TestFilter::XLST, u"Calc MS Excel 2007 XML Template"_ustr },
|
||||
{ TestFilter::XLSX, u"Calc Office Open XML"_ustr },
|
||||
};
|
||||
|
||||
// basic uno api test class
|
||||
|
||||
class OOO_DLLPUBLIC_TEST UnoApiTest : public test::BootstrapFixture, public unotest::MacrosTest
|
||||
@@ -43,9 +131,9 @@ public:
|
||||
css::uno::Any executeMacro(const OUString& rScriptURL,
|
||||
const css::uno::Sequence<css::uno::Any>& rParams = {});
|
||||
|
||||
void save(const OUString& rFilter, const char* pPassword = nullptr);
|
||||
void save(TestFilter eFilter, const char* pPassword = nullptr);
|
||||
void saveWithParams(const css::uno::Sequence<css::beans::PropertyValue>& rParams);
|
||||
void saveAndReload(const OUString& rFilter, const char* pPassword = nullptr);
|
||||
void saveAndReload(TestFilter eFilter, const char* pPassword = nullptr);
|
||||
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> parsePDFExport(const OString& rPassword = OString());
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText)
|
||||
{
|
||||
loadFromFile(u"transparent-text.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
|
||||
@@ -98,7 +98,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText)
|
||||
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf131082)
|
||||
{
|
||||
loadFromFile(u"tdf131082.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
|
||||
@@ -314,7 +314,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
|
||||
// was lost on import.
|
||||
verify(mxComponent);
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
// Without the accompanying fix in place, this test would have failed, because shadow on a table
|
||||
// was lost on export.
|
||||
@@ -343,7 +343,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf142605_CurveSize)
|
||||
// rectangle of the shape. Error was, that the export uses a path size which included the
|
||||
// control points.
|
||||
loadFromFile(u"tdf142605_CurveSize.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
auto xPage = xDrawPagesSupplier->getDrawPages()->getByIndex(0);
|
||||
|
||||
+47
-47
@@ -31,7 +31,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPolylineConnectorPosition)
|
||||
// Given a document with a group shape and therein a polyline and a connector.
|
||||
loadFromFile(u"tdf141786_PolylineConnectorInGroup.odt");
|
||||
// When saving that to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure polyline and connector have the correct position.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -60,7 +60,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRotatedShapePosition)
|
||||
skipValidation();
|
||||
|
||||
// When saving that to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure the rotated child shape has the correct position.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -80,7 +80,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertCheckboxContentControlOdt)
|
||||
dispatchCommand(mxComponent, u".uno:TrackChanges"_ustr, {});
|
||||
dispatchCommand(mxComponent, u".uno:InsertCheckboxContentControl"_ustr, {});
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// validate(maTempFile.GetFileName(), test::OOXML); // Enable when unrelated errors are fixed.
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertCheckboxContentControlDocx)
|
||||
// when exporting to docx.
|
||||
dispatchCommand(mxComponent, u".uno:InsertCheckboxContentControl"_ustr, {});
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// validate(maTempFile.GetFileName(), test::OOXML); // Enable when unrelated errors are fixed.
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertCheckboxContentControlDocx)
|
||||
dispatchCommand(mxComponent, u".uno:InsertCheckboxContentControl"_ustr, {});
|
||||
|
||||
// Loading should not show the "corrupted" dialog, which would assert.
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// Now that we loaded it successfully, delete the controls,
|
||||
// still with change-tracking enabled, and save.
|
||||
@@ -123,7 +123,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertCheckboxContentControlDocx)
|
||||
dispatchCommand(mxComponent, u".uno:Delete"_ustr, {});
|
||||
|
||||
// Loading should not show the "corrupted" dialog, which would assert.
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// validate(maTempFile.GetFileName(), test::OOXML); // Enable when unrelated errors are fixed.
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapePolygon)
|
||||
skipValidation();
|
||||
|
||||
// When saving that to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure that the group shape, the group shape's child size and the child shape's size
|
||||
// match:
|
||||
@@ -158,7 +158,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport)
|
||||
skipValidation();
|
||||
|
||||
// When saving that to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then the shapes should retain their correct control values.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -344,7 +344,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCameraRevolutionGrabBag)
|
||||
loadFromFile(u"camera-rotation-revolution-nonwps.pptx");
|
||||
|
||||
// When saving that document:
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// Then make sure the revolution is exported without a problem:
|
||||
@@ -369,7 +369,7 @@ CPPUNIT_TEST_FIXTURE(Test, testReferToTheme)
|
||||
loadFromFile(u"refer-to-theme.pptx");
|
||||
|
||||
// When saving that document:
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// Then make sure the shape text color is a scheme color:
|
||||
@@ -410,7 +410,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColor_ShapeFill)
|
||||
loadFromFile(u"ReferenceShapeFill.fodp");
|
||||
|
||||
// When saving that document:
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Then make sure the shape fill color is a scheme color.
|
||||
// Note that this was already working from PPTX files via grab-bags,
|
||||
@@ -426,7 +426,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146690_endParagraphRunPropertiesNewLinesTextSi
|
||||
loadFromFile(u"endParaRPr-newline-textsize.pptx");
|
||||
|
||||
// When saving that document:
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// Make sure the text size is exported correctly:
|
||||
@@ -445,7 +445,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_endsubpath)
|
||||
loadFromFile(u"tdf147978_endsubpath.odp");
|
||||
|
||||
// When saving that document:
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// Then make sure the pathLst has two child elements,
|
||||
@@ -462,7 +462,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandA)
|
||||
loadFromFile(u"tdf147978_enhancedPath_commandA.odp");
|
||||
|
||||
// When saving that document:
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// Then make sure the path has a child element arcTo. Prior to the fix that part of the curve was
|
||||
@@ -483,7 +483,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandT)
|
||||
loadFromFile(u"tdf147978_enhancedPath_commandT.odp");
|
||||
|
||||
// Export to pptx had only exported the command M and has used a wrong path size
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -512,7 +512,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandXY)
|
||||
loadFromFile(u"tdf147978_enhancedPath_commandXY.odp");
|
||||
|
||||
// Export to pptx had dropped commands X and Y.
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -546,7 +546,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandHIJK)
|
||||
loadFromFile(u"tdf147978_enhancedPath_commandHIJK.odp");
|
||||
|
||||
// Export to pptx had dropped commands X and Y.
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -568,7 +568,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath)
|
||||
loadFromFile(u"tdf147978_enhancedPath_subpath.pptx");
|
||||
|
||||
// Export to pptx had dropped the subpaths.
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -588,7 +588,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf100391TextAreaRect)
|
||||
// The document has a custom shape of type "non-primitive" to trigger the custGeom export
|
||||
loadFromFile(u"tdf100391_TextAreaRect.odp");
|
||||
// When saving to PPTX the textarea rect was set to default instead of using the actual area
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup. Without fix the values were l="l", t="t", r="r", b="b"
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -613,7 +613,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf109169_OctagonBevel)
|
||||
skipValidation();
|
||||
|
||||
// Export to docx had not written a:fill or a:stroke attributes at all.
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Verify the markup:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -634,7 +634,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFaultyPathCommandsAWT)
|
||||
// instead of the normally used lnTo. If a lnTo is written, MS Office shows nothing of the shape.
|
||||
loadFromFile(u"FaultyPathStart.odp");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -652,7 +652,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchXY)
|
||||
// When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered. The
|
||||
// line at right and bottom edge were positioned inside as if the shape had a square size.
|
||||
loadFromFile(u"tdf148784_StretchXY.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -688,7 +688,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandQ)
|
||||
// When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered.
|
||||
// That results in wrong arcs on the right or bottom side of the shape.
|
||||
loadFromFile(u"tdf148784_StretchCommandQ.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -727,7 +727,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandVW)
|
||||
// When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered.
|
||||
// That results in circles instead of ellipses.
|
||||
loadFromFile(u"tdf148784_StretchCommandVW.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -761,7 +761,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149551VertPadding)
|
||||
// has paddings lIns="720000"=2cm, tIns="360000"=1cm, rIns="0" and bIns="0".
|
||||
// After load and save the paddings were rotated and a 90deg text rotation was added.
|
||||
loadFromFile(u"tdf149551_vert_and_padding.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup. The values must be the same as in the original file.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -783,7 +783,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149538upright)
|
||||
// attribute but no 'rot' attribute. Without the fix the 'rot' attribute with values from
|
||||
// the emulation was written out.
|
||||
loadFromFile(u"tdf149538_upright.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup. The values must be the same as in the original file.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -794,7 +794,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149538upright)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf151008VertAnchor)
|
||||
{
|
||||
loadFromFile(u"tdf151008_eaVertAnchor.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// The order of the shapes in the file is by name "Right", "Center", "Left", "RightMiddle",
|
||||
// "CenterMiddle" and "LeftMiddle". I access the shapes here by index, because the XPath is
|
||||
@@ -830,7 +830,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkBitmapFill)
|
||||
skipValidation();
|
||||
|
||||
// Saving that to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Make sure it is exported to VML and has no txbxContent but a textpath element. Without fix it
|
||||
// was exported as DML 'abc transform', but that is not able to use bitmap fill in Word.
|
||||
@@ -861,7 +861,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkFontProperties)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Make sure the style attribute of the textpath element has the needed items. Without fix only
|
||||
// font-family and font-size were written.
|
||||
@@ -897,7 +897,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkSlantUp)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup. I could identify the following two problems to hinder Word from
|
||||
// accepting the markup. There might exist more problems.
|
||||
@@ -924,7 +924,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkArchUp)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -946,7 +946,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLAdjustmentExport)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -974,7 +974,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkDirectColor)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1009,7 +1009,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkThemeColor)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1057,7 +1057,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkDistance)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1080,7 +1080,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkLinGradientRGBColor)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1127,7 +1127,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkAxialGradientTransparency)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1177,7 +1177,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRadialGradient)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1219,7 +1219,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkEllipticalGradient)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1263,7 +1263,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkSquareGradient)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1305,7 +1305,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRectGradient)
|
||||
skipValidation();
|
||||
|
||||
// Save to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Examine the saved markup.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1351,7 +1351,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColorTransparency)
|
||||
// Without fix the transparency was not written to file.
|
||||
loadFromFile(u"tdf139618_ThemeColorTransparency.pptx");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
// Make sure a:alpha is written for line color and for fill color.
|
||||
@@ -1377,7 +1377,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeFontTypeface)
|
||||
|
||||
loadFromFile(u"tdf155412_typeface.pptx");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/theme/theme1.xml"_ustr);
|
||||
|
||||
// Make sure typeface is written.
|
||||
@@ -1392,7 +1392,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157289CircularArrowExport)
|
||||
// the ellipse bounding box is defined by bottom-right vertex first and then top-left vertex.
|
||||
// When saving to PPTX this had resulted in negative radii for the ellipse.
|
||||
loadFromFile(u"tdf157289_circularArrow_export.fodp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Verify the markup. Both wR and hR must be positive.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -1406,7 +1406,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134401_ExportAutoGrowToTextWordWrap)
|
||||
// which is similar. If autoGrowWidth and autoGrowHeight are set in the document,
|
||||
// then they are exported to pptx as TextWordWrap = "none".
|
||||
loadFromFile(u"tdf134401_ExportAutoGrowToTextWordWrap.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// There are 2 shapes in the test file.
|
||||
// The 1. shape is without autoGrowWidth/Height.
|
||||
@@ -1420,7 +1420,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134401_ExportAutoGrowToTextWordWrap)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf163803_ImageFill)
|
||||
{
|
||||
loadFromFile(u"tdf163803_image_with_fill.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// Check that the fill color is saved:
|
||||
@@ -1439,7 +1439,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPPTXExportOutlinerListStyle)
|
||||
loadFromFile(u"outliner-list-style.odp");
|
||||
|
||||
// When saving to PPTX:
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Then make sure that the list style of the outliner shape on the master page is written:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr);
|
||||
|
||||
@@ -28,7 +28,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradient)
|
||||
// Given a document with three-color gradient on a Fontwork.
|
||||
loadFromFile(u"MCGR_FontworkColorGradient.fodp");
|
||||
// Save it to PPTX
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
// And make sure a multi-color gradient fill is exported.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// linear gradient with 30deg angle
|
||||
@@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord)
|
||||
// Given a document with three-color gradient on a Fontwork.
|
||||
loadFromFile(u"MCGR_FontworkColorGradient.fodt");
|
||||
// Save it to DOCX
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// And make sure a multi-color gradient fill is exported.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// linear gradient with 30deg angle
|
||||
@@ -75,7 +75,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testTdf155825_SourcOffsetRangeDifferent)
|
||||
// Save it to PPTX
|
||||
// Without fix, a debug-build would have crashed in oox/source/export/drawingml.cxx from
|
||||
// assert(false && "oox::WriteGradientFill: non-synchronized gradients (!)");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(TestMCGR, testStepCount)
|
||||
@@ -83,7 +83,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testStepCount)
|
||||
// Given a document with two-color gradient with StepCount 4.
|
||||
loadFromFile(u"tdf155852_MCGR_StepCount4.fodp");
|
||||
// Save it to PPTX
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
// Without the fix the colors in the sections were wrong. And when opening a file with StepCount
|
||||
@@ -109,7 +109,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testAxialColorLinearTrans)
|
||||
// two-stop linear transparency gradient from start 80% to end 0%.
|
||||
loadFromFile(u"tdf155827_MCGR_AxialColorLinearTrans.fodp");
|
||||
// Save it to PPTX
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
// OOXML has transparency together with color. Transparency is stored as opacity.
|
||||
// Expected: pos 0 #00ffff 20000, pos 50000 #ff0000 60000, pos 100000 #00ffff 100000.
|
||||
// Because of conversion through gray color the opacity values are not exact. If rounding
|
||||
|
||||
@@ -535,7 +535,7 @@ CPPUNIT_TEST_FIXTURE(TestScene3d, test_material_wireframe)
|
||||
uno::Reference<drawing::XShape> xShape(getShape(0, 0));
|
||||
|
||||
// Make sure the export to ODF has the corresponding attributes.
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc,
|
||||
@@ -631,7 +631,7 @@ CPPUNIT_TEST_FIXTURE(TestScene3d, test_shape_rotation)
|
||||
uno::Reference<drawing::XShape> xShape(getShape(0, 0));
|
||||
|
||||
// Make sure that the immediate export to pptx has the same shape rotation
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//p:spPr/a:xfrm", "rot", u"300000");
|
||||
}
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testWriterFontworkTrimTrue)
|
||||
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
|
||||
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
|
||||
skipValidation();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XShape> xShape(xDrawPageSupplier->getDrawPage()->getByIndex(0),
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
void testHtmlSkipImage()
|
||||
{
|
||||
loadFromFile(u"BaseForHTMLExport.ods");
|
||||
save(u"HTML (StarCalc)"_ustr);
|
||||
save(TestFilter::HTML_CALC);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT (pDoc);
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
assertXPath(pDoc, "/html/body/table/tr/td/img", 1);
|
||||
|
||||
setFilterOptions(u"SkipImages"_ustr);
|
||||
save(u"HTML (StarCalc)"_ustr);
|
||||
save(TestFilter::HTML_CALC);
|
||||
|
||||
pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT (pDoc);
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
void testTdf155244()
|
||||
{
|
||||
loadFromFile(u"default-styles.ods");
|
||||
save(u"XHTML Calc File"_ustr);
|
||||
save(TestFilter::XHTML_CALC);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -145,7 +145,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testTdf146742)
|
||||
createScDoc("tdf146742.ods");
|
||||
|
||||
// Export to ODS and reload the file
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(u"1"_ustr, pDoc->GetString(ScAddress(0,0,0)));
|
||||
@@ -164,7 +164,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testMacroButtonFormControlXlsxExport)
|
||||
createScDoc("macro-button-form-control.xlsm");
|
||||
|
||||
// When exporting to XLSM:
|
||||
save(u"Calc MS Excel 2007 VBA XML"_ustr);
|
||||
save(TestFilter::XLSM);
|
||||
|
||||
// Then make sure that the macro is associated with the control:
|
||||
xmlDocUniquePtr pSheetDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
@@ -188,7 +188,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testTdf104902)
|
||||
executeMacro(u"vnd.sun.Star.script:Standard.Module1.display_bug?language=Basic&location=document"_ustr);
|
||||
|
||||
// Export to ODS
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(u"string no newlines"_ustr, pDoc->GetString(ScAddress(0, 0, 0)));
|
||||
@@ -231,7 +231,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testTdf142033)
|
||||
executeMacro(u"vnd.sun.Star.script:Standard.Module1.display_bug?language=Basic&location=document"_ustr);
|
||||
|
||||
// Export to ODS
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(u"string no newlines"_ustr, pDoc->GetString(ScAddress(0,0,0)));
|
||||
@@ -253,7 +253,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testTdf89920)
|
||||
"location=document"_ustr);
|
||||
|
||||
// Export to ODS
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
xmlDocUniquePtr pContentXml = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pContentXml);
|
||||
@@ -301,7 +301,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testPasswordProtectedUnicodeString)
|
||||
CPPUNIT_ASSERT(xLC->isLibraryLoaded(sLibName));
|
||||
|
||||
// Now check that saving stores Unicode data correctly in image's string pool
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
{
|
||||
Any aRet = executeMacro(sMacroURL);
|
||||
@@ -341,7 +341,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testPasswordProtectedArrayInUserType)
|
||||
CPPUNIT_ASSERT(xLC->isLibraryLoaded(sLibName));
|
||||
|
||||
// Now check that saving stores array bounds correctly
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
{
|
||||
Any aRet = executeMacro(sMacroURL);
|
||||
@@ -469,7 +469,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testTdf71271)
|
||||
xProps->setPropertyValue(u"CodeName"_ustr, uno::Any(u"NewCodeName"_ustr));
|
||||
}
|
||||
|
||||
saveAndReload(u""_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
{
|
||||
uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
@@ -507,7 +507,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testTdf75263)
|
||||
CPPUNIT_ASSERT_EQUAL(u"проба"_ustr, pDoc->GetString(ScAddress(0, 0, 0)));
|
||||
}
|
||||
|
||||
saveAndReload(u"Calc MS Excel 2007 VBA XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSM);
|
||||
|
||||
{
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -160,7 +160,7 @@ void ScSolverSettingsObj::testXSolverSettings()
|
||||
CPPUNIT_ASSERT_EQUAL(uno::Any(static_cast<sal_Int32>(10)), aEngProps[5].Value);
|
||||
|
||||
// Save file and reload to check if solver settings are still there
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
uno::Reference<sheet::XSpreadsheetDocument> xDoc2(mxComponent, uno::UNO_QUERY_THROW);
|
||||
uno::Reference<container::XIndexAccess> xIndex2(xDoc2->getSheets(), uno::UNO_QUERY_THROW);
|
||||
uno::Reference<sheet::XSpreadsheet> xSheet2(xIndex2->getByIndex(0), uno::UNO_QUERY_THROW);
|
||||
|
||||
@@ -100,7 +100,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/PivotTableCellFormatsTest_1_DataFieldInRow_RowLabelColor.xlsx");
|
||||
assertDataFieldInRow_RowLabelColor(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertDataFieldInRow_RowLabelColor(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
createScDoc(
|
||||
"xlsx/pivot-table/PivotTableCellFormatsTest_2_DataFieldInRow_ColumnLabelColor.xlsx");
|
||||
assertDataFieldInRow_ColumnLabelColor(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertDataFieldInRow_ColumnLabelColor(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
createScDoc(
|
||||
"xlsx/pivot-table/PivotTableCellFormatsTest_3_DataFieldInColumn_ColumnLabelColor.xlsx");
|
||||
assertDataFieldInColumn_ColumnLabelColor(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertDataFieldInColumn_ColumnLabelColor(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/PivotTableCellFormatsTest_4_DataFieldInColumn_DataColor.xlsx");
|
||||
assertDataFieldInColumn_DataColor(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertDataFieldInColumn_DataColor(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
createScDoc("xlsx/pivot-table//"
|
||||
"PivotTableCellFormatsTest_5_DataFieldInColumnAndTwoRowFields_DataColor.xlsx");
|
||||
assertDataFieldInColumnAndTwoRowFields_DataColor(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertDataFieldInColumnAndTwoRowFields_DataColor(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
createScDoc(
|
||||
"xlsx/pivot-table//PivotTableCellFormatsTest_6_SingleDataFieldInColumn_DataColor.xlsx");
|
||||
assertSingleDataFieldInColumn_DataColor(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertSingleDataFieldInColumn_DataColor(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
createScDoc(
|
||||
"xlsx/pivot-table//PivotTableCellFormatsTest_7_TwoRowTwoColumnFields_DataColor.xlsx");
|
||||
assertTwoRowTwoColumnFields_DataColor(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertTwoRowTwoColumnFields_DataColor(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/PivotTableCellFormatsTest_8_DataFieldInRow_DataColor.xlsx");
|
||||
assertDataFieldInRow_DataColor(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertDataFieldInRow_DataColor(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/PivotTableCellFormatsTest_9_MultipleSelections.xlsx");
|
||||
assertMultipleSelections(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertMultipleSelections(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/PivotTableCellFormatsTest_11_WholeDataColumnSelected.xlsx");
|
||||
assertWholeDataColumnSelected(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertWholeDataColumnSelected(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/PivotTableCellFormatsTest_12_WholeLabelColumnSelected.xlsx");
|
||||
assertWholeLabelColumnSelected(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertWholeLabelColumnSelected(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/PivotTableCellFormatsTest_13_SelectionInLabelAndData.xlsx");
|
||||
assertSelectionInLabelAndData(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertSelectionInLabelAndData(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
createScDoc("xlsx/pivot-table/"
|
||||
"PivotTableCellFormatsTest_14_TwoRowsDataFieldInColumn_LabelColor.xlsx");
|
||||
assertTwoRowsDataFieldInColumn_LabelColor(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertTwoRowsDataFieldInColumn_LabelColor(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
|
||||
createScDoc("xlsx/pivot-table/"
|
||||
"PivotTableCellFormatsTest_15_TwoDataFieldColumns_WholeDataColumnSelected.xlsx");
|
||||
assertTwoDataFieldColumns_WholeDataColumnSelected(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertTwoDataFieldColumns_WholeDataColumnSelected(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, Pivot_Table_with_Cell_Prot
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/Pivot_Table_with_Cell_Protection.xlsx");
|
||||
assertFields_WithCellProtection(*getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
assertFields_WithCellProtection(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, Pivot_Table_with_No_Source
|
||||
{
|
||||
// We need to round-trip this document without crashing
|
||||
createScDoc("xlsx/pivot-table/PivotTableWithNoSourceData.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
}
|
||||
|
||||
} // end anonymous namespace
|
||||
|
||||
@@ -152,7 +152,7 @@ void SparklineImportExportTest::testSparklinesRoundtripXLSX()
|
||||
|
||||
checkSparklines(*pModelObj->GetDocument());
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
|
||||
@@ -165,7 +165,7 @@ void SparklineImportExportTest::testSparklinesExportODS()
|
||||
loadFromFile(u"xlsx/Sparklines.xlsx");
|
||||
|
||||
// Save as ODS and check content.xml with XPath
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
// We have 3 sparkline groups = 3 tables that contain sparklines
|
||||
@@ -216,7 +216,7 @@ void SparklineImportExportTest::testSparklinesRoundtripODS()
|
||||
checkSparklines(*pModelObj->GetDocument());
|
||||
|
||||
// Trigger export and import of sparklines
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
|
||||
@@ -231,7 +231,7 @@ void SparklineImportExportTest::testNoSparklinesInDocumentXLSX()
|
||||
// Load the document containing NO sparklines
|
||||
loadFromFile(u"xlsx/empty.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -279,7 +279,7 @@ void SparklineImportExportTest::testSparklinesRoundtripThemeColorsODS()
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
checkSparklineThemeColors(*pModelObj->GetDocument());
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
@@ -289,7 +289,7 @@ void SparklineImportExportTest::testSparklinesRoundtripThemeColorsODS()
|
||||
void SparklineImportExportTest::testSparklinesRoundtripThemeColorsOOXML()
|
||||
{
|
||||
loadFromFile(u"fods/Sparklines.fods");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
|
||||
@@ -73,7 +73,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExportAndImport)
|
||||
CPPUNIT_ASSERT_EQUAL(u""_ustr, pTheme->getFormatScheme().getName());
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
{
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExportOOXML)
|
||||
{
|
||||
loadFromFile(u"xlsx/CalcThemeTest.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
{
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/theme/theme1.xml"_ustr);
|
||||
@@ -220,7 +220,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBackgroundThemeColorOOXML)
|
||||
{
|
||||
loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx");
|
||||
checkCellBackgroundThemeColor(getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
checkCellBackgroundThemeColor(getScDoc());
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBackgroundThemeColorODF)
|
||||
// Open the OOXML source
|
||||
loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx");
|
||||
// Save as ODF and load again - checks import / export cycle
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
// Check the values and show that the document is unchanged and all the data preserved
|
||||
checkCellBackgroundThemeColor(getScDoc());
|
||||
}
|
||||
@@ -291,7 +291,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellTextThemeColor)
|
||||
{
|
||||
loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx");
|
||||
checkCellTextThemeColor(getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
checkCellTextThemeColor(getScDoc());
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellTextThemeColorODF)
|
||||
// Open the OOXML source
|
||||
loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx");
|
||||
// Save as ODF and load again - checks import / export cycle
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
// Check the values and show that the document is unchanged and all the data preserved
|
||||
checkCellTextThemeColor(getScDoc());
|
||||
}
|
||||
@@ -420,7 +420,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBorderThemeColor)
|
||||
{
|
||||
loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx");
|
||||
checkCellBorderThemeColor(getScDoc());
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
checkCellBorderThemeColor(getScDoc());
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBorderThemeColorODF)
|
||||
// Open the OOXML source
|
||||
loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx");
|
||||
// Save as ODF and load again - checks import / export cycle
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
// Check the values and show that the document is unchanged and all the data preserved
|
||||
checkCellBorderThemeColor(getScDoc());
|
||||
}
|
||||
|
||||
+19
-19
@@ -597,7 +597,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testColorScaleExportODS)
|
||||
{
|
||||
createScDoc("ods/colorscale.ods");
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -609,7 +609,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testColorScaleExportXLSX)
|
||||
{
|
||||
createScDoc("xlsx/colorscale.xlsx");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -621,7 +621,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testDataBarExportODS)
|
||||
{
|
||||
createScDoc("ods/databar.ods");
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -632,7 +632,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testDataBarExportXLSX)
|
||||
{
|
||||
createScDoc("xlsx/databar.xlsx");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -662,7 +662,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testComplexIconSetsXLSX)
|
||||
|
||||
createScDoc("xlsx/complex_icon_set.xlsx");
|
||||
verify();
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -684,12 +684,12 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testTdf162948)
|
||||
|
||||
createScDoc("xlsx/tdf162948.xlsx");
|
||||
verify();
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
verify();
|
||||
|
||||
// FIXME: Error: tag name "calcext:icon-set" is not allowed. Possible tag names are: <color-scale>,<condition>,<data-bar>
|
||||
skipValidation();
|
||||
saveAndReload(u"calc8"_ustr); // tdf#163337
|
||||
saveAndReload(TestFilter::ODS); // tdf#163337
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -716,7 +716,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testTdf165383)
|
||||
|
||||
createScDoc("ods/tdf165383.ods");
|
||||
verify();
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -744,14 +744,14 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testTdf166669)
|
||||
|
||||
createScDoc("ods/tdf166669.ods");
|
||||
verify();
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
verify();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(CondFormatTest, testCondFormatExportCellIs)
|
||||
{
|
||||
createScDoc("xlsx/condFormat_cellis.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetCondFormList(0)->size());
|
||||
@@ -784,7 +784,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatExportXLSX)
|
||||
{
|
||||
createScDoc("xlsx/new_cond_format_test_export.xlsx");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
{
|
||||
OUString aCSVPath = createFilePath(u"contentCSV/new_cond_format_test_export.csv");
|
||||
@@ -820,7 +820,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatExportODS)
|
||||
{
|
||||
createScDoc("ods/new_cond_format_test_export.ods");
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
OUString aCSVPath = createFilePath(u"contentCSV/new_cond_format_test_export.csv");
|
||||
testCondFile(aCSVPath, pDoc, 0);
|
||||
@@ -842,7 +842,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatNumberInTextRule)
|
||||
pFormat->AddEntry(pEntry);
|
||||
pDocument->AddCondFormat(std::move(pFormat), 0);
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDocument = getScDoc();
|
||||
|
||||
ScConditionalFormat* pCondFormat = pDocument->GetCondFormat(0, 0, 0);
|
||||
@@ -1045,7 +1045,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testCondFormatCfvoScaleValueXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(CondFormatTest, testNumberFormatODS)
|
||||
{
|
||||
createScDoc("ods/testNumberFormats.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
sal_uInt32 nNumberFormat;
|
||||
const sal_Int32 nCountFormats = 18;
|
||||
@@ -1075,7 +1075,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testNumberFormatODS)
|
||||
CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatRangeListXLSX)
|
||||
{
|
||||
createScDoc("ods/conditionalformat_rangelist.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "//x:conditionalFormatting", "sqref", u"F4 F10");
|
||||
@@ -1084,7 +1084,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatRangeListXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatContainsTextXLSX)
|
||||
{
|
||||
createScDoc("ods/conditionalformat_containstext.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPathContent(pDoc, "//x:conditionalFormatting/x:cfRule/x:formula",
|
||||
@@ -1094,7 +1094,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatContainsTextXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatPriorityCheckXLSX)
|
||||
{
|
||||
createScDoc("xlsx/conditional_fmt_checkpriority.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
constexpr bool bHighPriorityExtensionA1
|
||||
@@ -1141,7 +1141,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatPriorityCheckXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(CondFormatTest, testConditionalFormatOriginXLSX)
|
||||
{
|
||||
createScDoc("xlsx/conditional_fmt_origin.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
// tdf#124953 : The range-list is B3:C6 F1:G2, origin address in the formula should be B1, not B3.
|
||||
@@ -1160,7 +1160,7 @@ CPPUNIT_TEST_FIXTURE(CondFormatTest, testTdf79998)
|
||||
CPPUNIT_ASSERT_EQUAL(u"Utilities (FX Kurse, Kreditkarten etc)"_ustr, aTabNames1[1]);
|
||||
|
||||
// check: saved XLSX document has truncated tab name
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
const std::vector<OUString> aTabNames2 = pDoc->GetAllTableNames();
|
||||
CPPUNIT_ASSERT_EQUAL(u"Utilities (FX Kurse, Kreditkart"_ustr, aTabNames2[1]);
|
||||
|
||||
@@ -626,11 +626,11 @@ void ScModelTestBase::miscRowHeightsTest( TestParam const * aTestValues, unsigne
|
||||
for ( unsigned int index=0; index<numElems; ++index )
|
||||
{
|
||||
const std::u16string_view sFileName = aTestValues[ index ].sTestDoc;
|
||||
const OUString sExportType = aTestValues[ index ].sExportType;
|
||||
TestFilter eExportType = aTestValues[ index ].eExportType;
|
||||
loadFromFile(sFileName);
|
||||
|
||||
if ( !sExportType.isEmpty() )
|
||||
saveAndReload(sExportType);
|
||||
if ( eExportType != TestFilter::NONE )
|
||||
saveAndReload(aTestValues[ index ].eExportType);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ struct TestParam
|
||||
bool bOptimal;
|
||||
};
|
||||
const std::u16string_view sTestDoc;
|
||||
const OUString sExportType; // empty for import test, otherwise this is an export test
|
||||
TestFilter eExportType;
|
||||
int nRowData;
|
||||
RowData const * pData;
|
||||
};
|
||||
|
||||
@@ -66,21 +66,21 @@ public:
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
private:
|
||||
void testRoundtripColumn2000(const char* name, const char* format);
|
||||
void testRoundtripNamedRanges(const char* name, const char* format);
|
||||
void testRoundtripColumn2000(const char* name, TestFilter eFormat);
|
||||
void testRoundtripNamedRanges(const char* name, TestFilter eFormat);
|
||||
};
|
||||
|
||||
void ScJumboSheetsTest::testRoundtripColumn2000Ods()
|
||||
{
|
||||
testRoundtripColumn2000("ods/value-in-column-2000.ods", "calc8");
|
||||
testRoundtripColumn2000("ods/value-in-column-2000.ods", TestFilter::ODS);
|
||||
}
|
||||
|
||||
void ScJumboSheetsTest::testRoundtripColumn2000Xlsx()
|
||||
{
|
||||
testRoundtripColumn2000("xlsx/value-in-column-2000.xlsx", "Calc Office Open XML");
|
||||
testRoundtripColumn2000("xlsx/value-in-column-2000.xlsx", TestFilter::XLSX);
|
||||
}
|
||||
|
||||
void ScJumboSheetsTest::testRoundtripColumn2000(const char* name, const char* format)
|
||||
void ScJumboSheetsTest::testRoundtripColumn2000(const char* name, TestFilter eFormat)
|
||||
{
|
||||
createScDoc(name);
|
||||
{
|
||||
@@ -94,7 +94,7 @@ void ScJumboSheetsTest::testRoundtripColumn2000(const char* name, const char* fo
|
||||
CPPUNIT_ASSERT_EQUAL(-5.0, pDoc->GetValue(0, 0, 0));
|
||||
}
|
||||
|
||||
saveAndReload(OUString::createFromAscii(format));
|
||||
saveAndReload(eFormat);
|
||||
{
|
||||
ScDocument* pDoc = getScDoc();
|
||||
// Check again.
|
||||
@@ -116,7 +116,7 @@ void ScJumboSheetsTest::testRoundtripColumnRangeOds()
|
||||
CPPUNIT_ASSERT_EQUAL(u"=SUM(C:C)"_ustr, pDoc->GetFormula(1, 0, 0));
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
{
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL(u"=SUM(2:2)"_ustr, pDoc->GetFormula(0, 0, 0));
|
||||
@@ -137,7 +137,7 @@ void ScJumboSheetsTest::testRoundtripColumnRangeOds()
|
||||
void ScJumboSheetsTest::testRoundtripColumnRangeXlsx()
|
||||
{
|
||||
createScDoc("ods/sum-whole-column-row.ods");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
{
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL(u"=SUM(2:2)"_ustr, pDoc->GetFormula(0, 0, 0));
|
||||
@@ -149,7 +149,7 @@ void ScJumboSheetsTest::testRoundtripColumnRangeXlsx()
|
||||
}
|
||||
}
|
||||
|
||||
void ScJumboSheetsTest::testRoundtripNamedRanges(const char* name, const char* format)
|
||||
void ScJumboSheetsTest::testRoundtripNamedRanges(const char* name, TestFilter eFormat)
|
||||
{
|
||||
createScDoc(name);
|
||||
|
||||
@@ -171,7 +171,7 @@ void ScJumboSheetsTest::testRoundtripNamedRanges(const char* name, const char* f
|
||||
}
|
||||
}
|
||||
|
||||
saveAndReload(OUString::createFromAscii(format));
|
||||
saveAndReload(eFormat);
|
||||
{
|
||||
ScDocument* pDoc = getScDoc();
|
||||
for (const auto& range : ranges)
|
||||
@@ -185,12 +185,12 @@ void ScJumboSheetsTest::testRoundtripNamedRanges(const char* name, const char* f
|
||||
|
||||
void ScJumboSheetsTest::testRoundtripNamedRangesOds()
|
||||
{
|
||||
testRoundtripNamedRanges("ods/ranges-column-2000.ods", "calc8");
|
||||
testRoundtripNamedRanges("ods/ranges-column-2000.ods", TestFilter::ODS);
|
||||
}
|
||||
|
||||
void ScJumboSheetsTest::testRoundtripNamedRangesXlsx()
|
||||
{
|
||||
testRoundtripNamedRanges("ods/ranges-column-2000.ods", "Calc Office Open XML");
|
||||
testRoundtripNamedRanges("ods/ranges-column-2000.ods", TestFilter::XLSX);
|
||||
}
|
||||
|
||||
void ScJumboSheetsTest::testNamedRangeNameConflict()
|
||||
|
||||
@@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableBasicODS)
|
||||
CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf123225PivotTableRowColItems)
|
||||
{
|
||||
createScDoc("ods/tdf123225_pivotTable_row_col_items.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
@@ -177,7 +177,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf123225PivotTableRowColItems
|
||||
CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf123225PivotTableNoColItems)
|
||||
{
|
||||
createScDoc("ods/tdf123225_pivotTable_no_col_items.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
@@ -235,7 +235,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf123225PivotTableEmptyRowCol
|
||||
// this doc contains blank row/col items
|
||||
// <sharedItems containsBlank="1" count="..."> (xl/pivotCache/pivotCacheDefinition1.xml)
|
||||
createScDoc("ods/tdf123225_pivotTable_empty_row_col_items.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
@@ -523,7 +523,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableSharedDateGroupXLSX)
|
||||
createScDoc("xlsx/pivot-table/shared-dategroup.xlsx");
|
||||
testThis(*getScDoc());
|
||||
// Now test round-trip of group fields
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
testThis(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableSharedNestedDateGrou
|
||||
createScDoc("xlsx/pivot-table/shared-nested-dategroup.xlsx");
|
||||
testThis(*getScDoc());
|
||||
// Now test round-trip of group fields
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
testThis(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -702,7 +702,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableExportXLSX)
|
||||
|
||||
createScDoc("xlsx/tdf89139_pivot_table.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -717,7 +717,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableExportXLSXSingleData
|
||||
{
|
||||
createScDoc("ods/tdf123421_1datafield.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -736,7 +736,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableExportXLSXMultipleDa
|
||||
{
|
||||
createScDoc("ods/tdf123421_2datafields.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -766,7 +766,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotCacheExportXLSX)
|
||||
|
||||
createScDoc("xlsx/pivot-table/with-strings-integers-and-dates.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pCacheDef = parseExport(u"xl/pivotCache/pivotCacheDefinition1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pCacheDef);
|
||||
|
||||
@@ -1130,7 +1130,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
|
||||
bool bCheck = aTest.check(*pDoc);
|
||||
CPPUNIT_ASSERT_MESSAGE("Initial check failed.", bCheck);
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// Reload check.
|
||||
@@ -1251,7 +1251,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableTwoDataFieldsXLSX)
|
||||
bool bCheck = aTest.check(*pDoc);
|
||||
CPPUNIT_ASSERT_MESSAGE("Initial check failed.", bCheck);
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// Reload check.
|
||||
@@ -1264,7 +1264,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableMedianODS)
|
||||
createScDoc("ods/pivot-table-median.ods");
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Check sheet
|
||||
ScDocument* pDoc = getScDoc();
|
||||
@@ -1327,7 +1327,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableRowHeaderXLS)
|
||||
}
|
||||
|
||||
// Check also after a reload
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// There should be exactly 2 pivot tables
|
||||
@@ -1367,7 +1367,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableDoubleFieldFilter)
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pDPs->GetCount());
|
||||
@@ -1465,7 +1465,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableStringFieldFilter)
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -1497,7 +1497,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableDateFieldFilter)
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -1584,7 +1584,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableBoolFieldFilter)
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -1616,7 +1616,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableRowColPageFieldFilte
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -1722,7 +1722,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableEmptyItem)
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -1758,7 +1758,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTablePageFieldFilter)
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -1857,7 +1857,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableFirstHeaderRowXLSX)
|
||||
// The documentation is not clear about what firstHeaderRow actually means, but MS Excel works on this way
|
||||
createScDoc("xlsx/pivot_table_first_header_row.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
assertXPath(pTable, "/x:pivotTableDefinition/x:location", "firstHeaderRow", u"1");
|
||||
@@ -1879,7 +1879,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableDoubleFieldFilterXLS
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pDPs->GetCount());
|
||||
@@ -1977,7 +1977,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableStringFieldFilterXLS
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -2009,7 +2009,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableDateFieldFilterXLSX)
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -2082,7 +2082,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableBoolFieldFilterXLSX)
|
||||
CPPUNIT_ASSERT_EQUAL(u"TRUE"_ustr, pDoc->GetString(ScAddress(0, 1, 0))); //A2
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -2114,7 +2114,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableRowColPageFieldFilte
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check filtering of row dimensions
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -2218,7 +2218,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableErrorItemFilterXLSX)
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check whether filtering is preserved
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -2266,7 +2266,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableErrorItem2FilterXLSX
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check whether filtering is preserved
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -2286,7 +2286,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableOutlineModeXLSX)
|
||||
{
|
||||
createScDoc("xlsx/pivottable_outline_mode.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -2302,7 +2302,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableDuplicatedMemberFilt
|
||||
{
|
||||
createScDoc("xlsx/pivottable_duplicated_member_filter.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -2317,7 +2317,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableTabularModeXLSX)
|
||||
{
|
||||
createScDoc("xlsx/pivottable_tabular_mode.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -2334,7 +2334,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableDuplicateFields)
|
||||
{
|
||||
createScDoc("ods/caseinsensitive-duplicate-fields.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pCacheDef = parseExport(u"xl/pivotCache/pivotCacheDefinition1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pCacheDef);
|
||||
|
||||
@@ -2360,7 +2360,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf112106)
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
|
||||
// Reload and check data layout dim
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
pDPs = pDoc->GetDPCollection();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDPs->GetCount());
|
||||
@@ -2383,7 +2383,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf123923)
|
||||
|
||||
createScDoc("ods/pivot-table-err-in-cache.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotCache/pivotCacheDefinition1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -2397,7 +2397,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf123939)
|
||||
|
||||
createScDoc("ods/pivot-table-str-and-err-in-data.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotCache/pivotCacheDefinition1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -2418,7 +2418,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf124651)
|
||||
{
|
||||
createScDoc("ods/tdf124651_simplePivotTable.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
// We have to export name attribute, even though it's optional according to ECMA-376 standard,
|
||||
@@ -2431,7 +2431,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf124736)
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/shared-dategroup.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotCache/pivotCacheDefinition1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
@@ -2481,7 +2481,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf124772NumFmt)
|
||||
{
|
||||
createScDoc("ods/pivot-table-num-fmt.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
@@ -2504,7 +2504,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf124810)
|
||||
// First, test that we roundtrip existing pivot table style information from XLSX.
|
||||
createScDoc("xlsx/pivot_dark1.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -2529,7 +2529,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf124810)
|
||||
// exporting better pivot table style information.
|
||||
createScDoc("ods/tdf124651_simplePivotTable.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -2553,7 +2553,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf124883)
|
||||
{
|
||||
createScDoc("xlsx/pivot-table/two-data-fields.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable);
|
||||
|
||||
@@ -2568,7 +2568,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf125046)
|
||||
{
|
||||
createScDoc("xlsx/pivottable_long_text.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/pivotCache/pivotCacheDefinition1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems",
|
||||
@@ -2579,7 +2579,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf125055)
|
||||
{
|
||||
createScDoc("xlsx/pivottable_1s_difference.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/pivotCache/pivotCacheDefinition1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -2614,7 +2614,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testTdf125086)
|
||||
{
|
||||
createScDoc("ods/pivottable_fieldInRowsAndData.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/pivotTables/pivotTable1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/x:pivotTableDefinition/x:pivotFields/x:pivotField[2]", "axis", u"axisRow");
|
||||
@@ -2721,10 +2721,10 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableCompactLayoutXLSX)
|
||||
createScDoc("xlsx/pivot-table/pivotcompact.xlsx");
|
||||
testThis(*getScDoc());
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
testThis(*getScDoc());
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
testThis(*getScDoc());
|
||||
}
|
||||
|
||||
@@ -2798,7 +2798,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testFirstHeaderRowZero)
|
||||
// Check that the text under the table is visible
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("under"), getScDoc()->GetString(ScAddress(2, 6, 1)));
|
||||
|
||||
save("Calc Office Open XML");
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport("xl/pivotTables/pivotTable1.xml");
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/x:pivotTableDefinition/x:location", "firstHeaderRow", u"0");
|
||||
|
||||
+19
-19
@@ -115,7 +115,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf144242_OpenBezier_noSwapWH)
|
||||
tools::Rectangle aExpectRect(pObj->GetSnapRect());
|
||||
|
||||
// Save, reload and compare
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
pObj = lcl_getSdrObjectWithAssert(*pDoc, 0);
|
||||
tools::Rectangle aSnapRect(pObj->GetSnapRect());
|
||||
@@ -148,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf144242_Line_noSwapWH)
|
||||
tools::Rectangle aExpectRect(pObj->GetSnapRect());
|
||||
|
||||
// Save, reload and compare
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
pObj = lcl_getSdrObjectWithAssert(*pDoc, 0);
|
||||
tools::Rectangle aSnapRect(pObj->GetSnapRect());
|
||||
@@ -346,7 +346,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf137082_RTL_cell_anchored)
|
||||
CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aSnapRectB, pObj->GetSnapRect(), 1);
|
||||
|
||||
// Save and reload.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document
|
||||
pDoc = getScDoc();
|
||||
@@ -395,7 +395,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf137081_RTL_page_anchored)
|
||||
CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE(aTopLeft, pObjCS->GetLogicRect().TopLeft(), 1);
|
||||
|
||||
// Save and reload.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document
|
||||
pDoc = getScDoc();
|
||||
@@ -440,7 +440,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf139583_Rotate180deg)
|
||||
pObj.clear();
|
||||
|
||||
// Save and reload.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document and object
|
||||
pDoc = getScDoc();
|
||||
@@ -467,7 +467,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf137033_FlipHori_Resize)
|
||||
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *pDoc, 0 /*SCTAB*/, true /*bResizeWithCell*/);
|
||||
|
||||
// Save and reload.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document and shape
|
||||
pDoc = getScDoc();
|
||||
@@ -513,7 +513,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf137033_RotShear_ResizeHide)
|
||||
CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aExpectRect, aSnapRect, 1);
|
||||
|
||||
// Save and reload.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document and shape
|
||||
pDoc = getScDoc();
|
||||
@@ -547,7 +547,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf137033_RotShear_Hide)
|
||||
pDoc->SetDrawPageSize(0); // trigger recalcpos, otherwise shapes are not changed
|
||||
|
||||
// Save and reload.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document and shape
|
||||
pDoc = getScDoc();
|
||||
@@ -595,7 +595,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf137576_LogicRectInDefaultMeasureline)
|
||||
Point aOldPos = pObj->GetRelativePos();
|
||||
|
||||
// Save and reload, get ScDocShell
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document and object
|
||||
pDoc = getScDoc();
|
||||
@@ -667,7 +667,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testMeasurelineHideColSave)
|
||||
CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE(aEndPoint, pObj->GetPoint(1), 1);
|
||||
|
||||
// save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document and shape
|
||||
pDoc = getScDoc();
|
||||
@@ -765,7 +765,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf138138_MoveCellWithRotatedShape)
|
||||
CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aExpectedRect, aSnapRect, 1);
|
||||
|
||||
// Save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document and shape
|
||||
pDoc = getScDoc();
|
||||
@@ -817,7 +817,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf117948_CollapseBeforeShape)
|
||||
CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aExpectedRect1, aSnapRect1Collapse, 1);
|
||||
|
||||
// Save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document and objects
|
||||
pDoc = getScDoc();
|
||||
@@ -915,7 +915,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf115655_HideDetail)
|
||||
CPPUNIT_ASSERT_MESSAGE("Collapse: Image should not be visible", !pObj->IsVisible());
|
||||
|
||||
// Save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Get document and image
|
||||
pDoc = getScDoc();
|
||||
@@ -1005,7 +1005,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testLargeAnchorOffset)
|
||||
// Just to check that it imports correctly
|
||||
CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE(Point(9504, 9089), aOldPos, 1);
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
pDoc = getScDoc();
|
||||
pObj = lcl_getSdrObjectWithAssert(*pDoc, 0);
|
||||
@@ -1211,7 +1211,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf154821_shape_in_group)
|
||||
pViewShell->GetViewData().SetCurY(1);
|
||||
pViewShell->GetViewData().GetDispatcher().Execute(SID_OUTLINE_HIDE);
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Expand the lower group
|
||||
pViewShell = getViewShell();
|
||||
@@ -1284,7 +1284,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf160369_groupshape)
|
||||
tools::Rectangle aOrigRect = pObj->GetSnapRect();
|
||||
|
||||
// Save document but do not reload. Saving alone had already caused the error.
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
|
||||
// Get geometry of the group again
|
||||
ScDrawObjData* pAfterObjData = ScDrawLayer::GetObjData(pObj);
|
||||
@@ -1307,7 +1307,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf160369_groupshape)
|
||||
pDoc->SetColHidden(3, 3, 0, true);
|
||||
pDoc->SetDrawPageSize(0);
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// Verify geometry is same as before save
|
||||
pDoc = getScDoc();
|
||||
@@ -1379,7 +1379,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf167450_copySheet)
|
||||
CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aRectSource, pObjTarget->GetLogicRect(), 1);
|
||||
|
||||
// Compare positions after save and reload. Without fix the position was wrong after reload.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDocTarget = getScDoc();
|
||||
pObjTarget = lcl_getSdrObjectWithAssert(*pDocTarget, 0, 1);
|
||||
CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aRectSource, pObjTarget->GetLogicRect(), 1);
|
||||
@@ -1412,7 +1412,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf140866)
|
||||
CPPUNIT_ASSERT_EQUAL(u"Test 1"_ustr, pNote->GetText());
|
||||
|
||||
// Save, reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
// Check that we still have the comment on A1 after save&reload
|
||||
pNote = pDoc->GetNote(ScAddress(0, 0, 0));
|
||||
|
||||
@@ -46,7 +46,7 @@ using namespace ::com::sun::star::uno;
|
||||
class ScExportTest : public ScModelTestBase
|
||||
{
|
||||
protected:
|
||||
void testExcelCellBorders(const OUString& sFormatType);
|
||||
void testExcelCellBorders(TestFilter eFormatType);
|
||||
|
||||
public:
|
||||
ScExportTest()
|
||||
@@ -63,7 +63,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testExport)
|
||||
|
||||
pDoc->SetValue(0, 0, 0, 1.0);
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
pDoc = getScDoc();
|
||||
double aVal = pDoc->GetValue(0, 0, 0);
|
||||
@@ -80,7 +80,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testDefaultFontHeight)
|
||||
pPool->SetUserDefaultItem(SvxFontHeightItem(400, 100, ATTR_CJK_FONT_HEIGHT));
|
||||
pPool->SetUserDefaultItem(SvxFontHeightItem(400, 100, ATTR_CTL_FONT_HEIGHT));
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
pDoc = getScDoc();
|
||||
pPool = pDoc->GetPool();
|
||||
@@ -96,7 +96,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf139167)
|
||||
{
|
||||
createScDoc("xlsx/tdf139167.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testFontColorWithMultipleAttributesDefined)
|
||||
|
||||
createScDoc("xlsx/tdf113271.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -132,7 +132,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf139394)
|
||||
{
|
||||
createScDoc("xlsx/tdf139394.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -157,7 +157,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testExtCondFormatXLSX)
|
||||
{
|
||||
createScDoc("xlsx/tdf139021.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -197,7 +197,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf90104)
|
||||
{
|
||||
createScDoc("xlsx/tdf90104.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -218,7 +218,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf111876)
|
||||
|
||||
createScDoc("xlsx/tdf111876.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/_rels/sheet1.xml.rels"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
OUString sTarget = getXPath(pDoc, "/rels:Relationships/rels:Relationship", "Target");
|
||||
@@ -229,8 +229,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf111876)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest, testPasswordExport)
|
||||
{
|
||||
std::vector<OUString> aFilterNames{ u"calc8"_ustr, u"MS Excel 97"_ustr,
|
||||
u"Calc Office Open XML"_ustr };
|
||||
std::vector<TestFilter> aFilterNames{ TestFilter::ODS, TestFilter::XLS, TestFilter::XLSX };
|
||||
|
||||
for (size_t i = 0; i < aFilterNames.size(); ++i)
|
||||
{
|
||||
@@ -258,7 +257,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf134332)
|
||||
|
||||
ASSERT_DOUBLES_EQUAL(238.0, pDoc->GetValue(ScAddress(0, 10144, 0)));
|
||||
|
||||
saveAndReload(u"calc8"_ustr, /*pPassword*/ "test");
|
||||
saveAndReload(TestFilter::ODS, /*pPassword*/ "test");
|
||||
|
||||
// Without the fixes in place, it would have failed here
|
||||
pDoc = getScDoc();
|
||||
@@ -271,7 +270,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf99856_dataValidationTest)
|
||||
{
|
||||
createScDoc("ods/tdf99856_dataValidationTest.ods");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
const ScValidationData* pData = pDoc->GetValidationEntry(2);
|
||||
@@ -299,7 +298,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testProtectionKeyODS_UTF16LErtlSHA1)
|
||||
|
||||
// we can't assume that the user entered the password; check that we
|
||||
// round-trip the password as-is
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc,
|
||||
"//office:spreadsheet[@table:structure-protected='true' and "
|
||||
@@ -326,7 +325,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testProtectionKeyODS_UTF8SHA1)
|
||||
|
||||
// we can't assume that the user entered the password; check that we
|
||||
// round-trip the password as-is
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc,
|
||||
"//office:spreadsheet[@table:structure-protected='true' and "
|
||||
@@ -353,7 +352,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testProtectionKeyODS_UTF8SHA256ODF12)
|
||||
|
||||
// we can't assume that the user entered the password; check that we
|
||||
// round-trip the password as-is
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(
|
||||
pXmlDoc,
|
||||
@@ -382,7 +381,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testProtectionKeyODS_UTF8SHA256W3C)
|
||||
|
||||
// we can't assume that the user entered the password; check that we
|
||||
// round-trip the password as-is
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(
|
||||
pXmlDoc,
|
||||
@@ -411,7 +410,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testProtectionKeyODS_XL_SHA1)
|
||||
|
||||
// we can't assume that the user entered the password; check that we
|
||||
// round-trip the password as-is
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(
|
||||
pXmlDoc,
|
||||
@@ -433,7 +432,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testFormatExportODS)
|
||||
{
|
||||
createScDoc("ods/formats.ods");
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -445,7 +444,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testCommentExportXLSX)
|
||||
//tdf#104729 FILESAVE OpenOffice do not save author of the comment during export to .xlsx
|
||||
createScDoc("ods/comment.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pComments = parseExport(u"xl/comments1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pComments);
|
||||
|
||||
@@ -486,7 +485,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testCommentExportXLSX_2_XLSX)
|
||||
|
||||
pNote->ShowCaption(aPosC9, true);
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pComments = parseExport(u"xl/comments1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pComments);
|
||||
|
||||
@@ -505,7 +504,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testCustomColumnWidthExportXLSX)
|
||||
//tdf#100946 FILESAVE Excel on macOS ignored column widths in XLSX last saved by LO
|
||||
createScDoc("ods/custom_column_width.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -577,7 +576,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testXfDefaultValuesXLSX)
|
||||
//tdf#70565 FORMATTING: User Defined Custom Formatting is not applied during importing XLSX documents
|
||||
createScDoc("xlsx/xf_default_values.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -629,7 +628,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testODF13)
|
||||
// FIXME: Error: unexpected attribute "loext:scale-to-X"
|
||||
skipValidation();
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// check XML
|
||||
@@ -649,7 +648,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testODF13)
|
||||
// export ODF 1.2 Extended
|
||||
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_012_EXTENDED);
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// check XML
|
||||
@@ -669,7 +668,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testODF13)
|
||||
// export ODF 1.2
|
||||
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_012);
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
|
||||
// check XML
|
||||
xmlDocUniquePtr pContentXml = parseExport(u"content.xml"_ustr);
|
||||
@@ -697,7 +696,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testColumnWidthResaveXLSX)
|
||||
// Test if after resave .xlsx file, columns width is identical with previous one
|
||||
createScDoc("xlsx/different-column-width-excel2010.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -763,7 +762,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testColumnWidthExportFromODStoXLSX)
|
||||
// Export to .xlsx and compare column width with the .ods
|
||||
// We expect that column width from .ods will be exactly the same as imported from .xlsx
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
pDoc = getScDoc();
|
||||
|
||||
@@ -796,7 +795,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testOutlineExportXLSX)
|
||||
//tdf#51524 FILESAVE .xlsx and.xls looses width information for hidden/collapsed grouped columns
|
||||
createScDoc("ods/outline.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -940,7 +939,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testAllRowsHiddenXLSX)
|
||||
{
|
||||
createScDoc("xlsx/tdf105840_allRowsHidden.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
assertXPath(pSheet, "/x:worksheet/x:sheetFormatPr", "zeroHeight", u"true");
|
||||
@@ -952,7 +951,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testHiddenEmptyRowsXLSX)
|
||||
//tdf#98106 FILESAVE: Hidden and empty rows became visible when export to .XLSX
|
||||
createScDoc("ods/hidden-empty-rows.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -968,7 +967,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testHiddenEmptyColsODS)
|
||||
//tdf#98106 FILESAVE: Hidden and empty rows became visible when export to .XLSX
|
||||
createScDoc("ods/tdf128895_emptyHiddenCols.ods");
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
assertXPath(pSheet, "//table:table/table:table-column[2]");
|
||||
@@ -980,7 +979,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testLandscapeOrientationXLSX)
|
||||
//tdf#48767 - Landscape page orientation is not loaded from .xlsx format with MS Excel, after export with Libre Office
|
||||
createScDoc("ods/hidden-empty-rows.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -1013,7 +1012,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf162963)
|
||||
// The error was, that the property "TotalsRow" was not written to ods at all.
|
||||
// With fix it is written as calcext:contains-footer.
|
||||
{
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
|
||||
uno::Reference<beans::XPropertySet> xDocPropSet(xDoc, UNO_QUERY_THROW);
|
||||
uno::Reference<container::XNameAccess> xNameAccess(
|
||||
@@ -1047,7 +1046,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf162963_ODF)
|
||||
// Save to ODF 1.3 extended.
|
||||
// Adapt to a concrete version when attribute contains-footer is available in ODF strict.
|
||||
// Make sure attribute is written in calcext namespace
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc,
|
||||
"/office:document-content/office:body/office:spreadsheet/"
|
||||
@@ -1056,7 +1055,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf162963_ODF)
|
||||
// Save to ODF 1.3 strict. Make sure attribute is not written.
|
||||
// Adapt to ODF 1.4 strict, when it is available.
|
||||
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
|
||||
save(u"calc8"_ustr); // this saves to .ods not to .fods
|
||||
save(TestFilter::ODS); // this saves to .ods not to .fods
|
||||
pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc,
|
||||
"/office:document-content/office:body/office:spreadsheet/"
|
||||
@@ -1078,7 +1077,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf162177_EastersundayODF14)
|
||||
|
||||
// Verify that saving to ODF1.3 produces ORG.OPENOFFICE.EASTERSUNDAY
|
||||
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
|
||||
save(u"calc8"_ustr); // this saves to .ods not to .fods
|
||||
save(TestFilter::ODS); // this saves to .ods not to .fods
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
const OString sPath = "/office:document-content/office:body/office:spreadsheet/table:table/"
|
||||
"table:table-row/table:table-cell"_ostr;
|
||||
@@ -1086,7 +1085,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf162177_EastersundayODF14)
|
||||
|
||||
// Verify that saving to ODF1.4 produces EASTERSUNDAY
|
||||
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_014);
|
||||
save(u"calc8"_ustr); // this saves to .ods not to .fods
|
||||
save(TestFilter::ODS); // this saves to .ods not to .fods
|
||||
pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc, sPath, "formula", u"of:=EASTERSUNDAY(2024)");
|
||||
}
|
||||
@@ -1117,16 +1116,14 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testMiscRowHeightExport)
|
||||
// additionally there is effectively a default row height ( 5.29 mm ). So we test the
|
||||
// unset rows at the end of the document to ensure the effective xlsx default height
|
||||
// is set there too.
|
||||
{ u"xlsx/miscrowheights.xlsx", u"Calc Office Open XML"_ustr, SAL_N_ELEMENTS(DfltRowData),
|
||||
DfltRowData },
|
||||
{ u"xlsx/miscrowheights.xlsx", TestFilter::XLSX, SAL_N_ELEMENTS(DfltRowData), DfltRowData },
|
||||
// Checks that some distributed ( non-empty ) heights remain set after export (to xls)
|
||||
{ u"xlsx/miscrowheights.xlsx", u"MS Excel 97"_ustr, SAL_N_ELEMENTS(DfltRowData),
|
||||
DfltRowData },
|
||||
{ u"xlsx/miscrowheights.xlsx", TestFilter::XLS, SAL_N_ELEMENTS(DfltRowData), DfltRowData },
|
||||
// Checks that repeated rows ( of various heights ) remain set after export ( to xlsx )
|
||||
{ u"ods/miscemptyrepeatedrowheights.ods", u"Calc Office Open XML"_ustr,
|
||||
{ u"ods/miscemptyrepeatedrowheights.ods", TestFilter::XLSX,
|
||||
SAL_N_ELEMENTS(EmptyRepeatRowData), EmptyRepeatRowData },
|
||||
// Checks that repeated rows ( of various heights ) remain set after export ( to xls )
|
||||
{ u"ods/miscemptyrepeatedrowheights.ods", u"MS Excel 97"_ustr,
|
||||
{ u"ods/miscemptyrepeatedrowheights.ods", TestFilter::XLS,
|
||||
SAL_N_ELEMENTS(EmptyRepeatRowData), EmptyRepeatRowData },
|
||||
};
|
||||
miscRowHeightsTest(aTestValues, SAL_N_ELEMENTS(aTestValues));
|
||||
@@ -1220,7 +1217,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testNamedRangeBugfdo62729)
|
||||
pDoc->DeleteTab(0);
|
||||
//should be still a single named range
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(1), pNames->size());
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
pDoc = getScDoc();
|
||||
|
||||
@@ -1234,7 +1231,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testBuiltinRangesXLSX)
|
||||
{
|
||||
createScDoc("xlsx/built-in_ranges.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/workbook.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1639,7 +1636,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testRichTextExportODS)
|
||||
}
|
||||
|
||||
// Now, save and reload this document.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
{
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_MESSAGE("Reloaded document should at least have one sheet.",
|
||||
@@ -1659,7 +1656,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testRichTextExportODS)
|
||||
}
|
||||
|
||||
// Reload the doc again, and check the content of B2 and B4.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
{
|
||||
ScDocument* pDoc = getScDoc();
|
||||
ScFieldEditEngine* pEE = &pDoc->GetEditEngine();
|
||||
@@ -1725,7 +1722,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testRichTextExportODS)
|
||||
}
|
||||
|
||||
// Reload the doc again, and check the content of B2, B4, B6 and B7.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
pEditText = pDoc->GetEditText(ScAddress(1, 1, 0));
|
||||
@@ -1755,7 +1752,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testRichTextCellFormatXLSX)
|
||||
{
|
||||
createScDoc("xls/cellformat.xls");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -1794,7 +1791,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testFormulaRefSheetNameODS)
|
||||
pDoc->GetFormula(1, 1, 0));
|
||||
}
|
||||
// Now, save and reload this document.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
pDoc->CalcAll();
|
||||
@@ -1835,7 +1832,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testCellValuesExportODS)
|
||||
pDoc->SetString(ScAddress(0, 7, 0), u"=$A$6"_ustr); //A8
|
||||
}
|
||||
// save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_MESSAGE("Reloaded document should at least have one sheet.",
|
||||
pDoc->GetTableCount() > 0);
|
||||
@@ -1890,7 +1887,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testCellNoteExportODS)
|
||||
CPPUNIT_ASSERT_MESSAGE("There should be a note at A2.", pDoc->HasNote(aPos));
|
||||
}
|
||||
// save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
aPos.SetRow(0); // Move back to A1.
|
||||
@@ -1922,7 +1919,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testCellNoteExportXLS)
|
||||
CPPUNIT_ASSERT(pDoc->HasNote(ScAddress(0, 2, 2)));
|
||||
}
|
||||
// save and reload as XLS.
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
{
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("This document should have 3 sheets.", SCTAB(3),
|
||||
@@ -1972,7 +1969,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testInlineArrayXLS)
|
||||
{
|
||||
createScDoc("xls/inline-array.xls");
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -1990,7 +1987,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testEmbeddedChartODS)
|
||||
{
|
||||
createScDoc("xls/embedded-chart.xls");
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -2005,7 +2002,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testEmbeddedChartXLS)
|
||||
{
|
||||
createScDoc("xls/embedded-chart.xls");
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -2030,7 +2027,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testCellAnchoredGroupXLS)
|
||||
{
|
||||
createScDoc("xls/cell-anchored-group.xls");
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// the document contains a group anchored on the first cell, make sure it's there in the right place
|
||||
ScDocument* pDoc = getScDoc();
|
||||
@@ -2053,7 +2050,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testFormulaReferenceXLS)
|
||||
{
|
||||
createScDoc("xls/formula-reference.xls");
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -2079,7 +2076,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testSheetProtectionXLSX)
|
||||
{
|
||||
createScDoc("xlsx/ProtecteSheet1234Pass.xlsx");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
const ScTableProtection* pTabProtect = pDoc->GetTabProtection(0);
|
||||
@@ -2100,7 +2097,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testSheetProtectionXLSB)
|
||||
{
|
||||
createScDoc("xlsb/tdf108017_calcProtection.xlsb");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
const ScTableProtection* pTabProtect = pDoc->GetTabProtection(0);
|
||||
@@ -2136,7 +2133,7 @@ const char* toBorderName(SvxBorderLineStyle eStyle)
|
||||
}
|
||||
}
|
||||
|
||||
void ScExportTest::testExcelCellBorders(const OUString& sFormatType)
|
||||
void ScExportTest::testExcelCellBorders(TestFilter eFormatType)
|
||||
{
|
||||
static const struct
|
||||
{
|
||||
@@ -2172,7 +2169,7 @@ void ScExportTest::testExcelCellBorders(const OUString& sFormatType)
|
||||
}
|
||||
}
|
||||
|
||||
saveAndReload(sFormatType);
|
||||
saveAndReload(eFormatType);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
for (auto const[nRow, eStyle, nWidth] : aChecks)
|
||||
{
|
||||
@@ -2188,13 +2185,13 @@ void ScExportTest::testExcelCellBorders(const OUString& sFormatType)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest, testCellBordersXLS)
|
||||
{
|
||||
createScDoc("xls/cell-borders.xls");
|
||||
testExcelCellBorders(u"MS Excel 97"_ustr);
|
||||
testExcelCellBorders(TestFilter::XLS);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest, testCellBordersXLSX)
|
||||
{
|
||||
createScDoc("xlsx/cell-borders.xlsx");
|
||||
testExcelCellBorders(u"Calc Office Open XML"_ustr);
|
||||
testExcelCellBorders(TestFilter::XLSX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf155368)
|
||||
@@ -2205,7 +2202,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf155368)
|
||||
|
||||
dispatchCommand(mxComponent, u".uno:WrapText"_ustr, {});
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pStyles = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pStyles);
|
||||
|
||||
@@ -43,7 +43,7 @@ ScExportTest2::ScExportTest2()
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testGroupShape)
|
||||
{
|
||||
createScDoc("xlsx/groupShape.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -57,7 +57,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testFreezePaneStartCellXLSX)
|
||||
|
||||
createScDoc("xlsx/freezePaneStartCell.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
OUString sFirstNonFrozenCell = getXPath(pDoc, "//x:sheetViews//x:pane", "topLeftCell");
|
||||
@@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testMatrixMultiplicationXLSX)
|
||||
{
|
||||
createScDoc("xlsx/matrix-multiplication.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -91,7 +91,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testRefStringXLSX)
|
||||
createScDoc("xlsx/ref_string.xlsx");
|
||||
|
||||
//make sure ref syntax gets saved for MSO-produced docs
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
ScCalcConfig aCalcConfig = pDoc->GetCalcConfig();
|
||||
@@ -103,7 +103,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testRefStringConfigXLSX)
|
||||
// this doc is configured with CalcA1 ref syntax
|
||||
createScDoc("xlsx/empty.xlsx");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
ScCalcConfig aConfig = pDoc->GetCalcConfig();
|
||||
@@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testRefStringConfigXLSX)
|
||||
aConfig.meStringRefAddressSyntax = formula::FormulaGrammar::CONV_XL_R1C1;
|
||||
pDoc->SetCalcConfig(aConfig);
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
// ... and make sure it got saved
|
||||
pDoc = getScDoc();
|
||||
@@ -148,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testRefStringUnspecified)
|
||||
// change formula syntax (i.e. not string ref syntax) to ExcelA1
|
||||
pDoc->SetGrammar(formula::FormulaGrammar::GRAM_NATIVE_XL_A1);
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// with string ref syntax at its default value, we should've saved ExcelA1
|
||||
pDoc = getScDoc();
|
||||
@@ -162,7 +162,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testHeaderImageODS)
|
||||
{
|
||||
// Graphic as header background was lost on export.
|
||||
createScDoc("ods/header-image.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
|
||||
uno::UNO_QUERY);
|
||||
uno::Reference<container::XNameAccess> xStyleFamilies
|
||||
@@ -180,7 +180,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testHeaderImageODS)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testHeaderFooterContentODS)
|
||||
{
|
||||
createScDoc("ods/header-footer-content.ods");
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
|
||||
uno::UNO_QUERY);
|
||||
uno::Reference<container::XNameAccess> xStyleFamilies
|
||||
@@ -213,7 +213,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTextDirectionXLSX)
|
||||
{
|
||||
createScDoc("xlsx/writingMode.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -231,7 +231,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf121260)
|
||||
// change formula syntax (i.e. not string ref syntax) to ExcelA1
|
||||
FormulaGrammarSwitch aFGSwitch(pDoc, formula::FormulaGrammar::GRAM_NATIVE_XL_A1);
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pChart1 = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pChart1);
|
||||
|
||||
@@ -250,7 +250,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf120168)
|
||||
{
|
||||
createScDoc("xlsx/tdf120168.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -269,7 +269,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf117266)
|
||||
{
|
||||
createScDoc("xlsm/tdf117266_macroButton.xlsm");
|
||||
|
||||
save(u"Calc MS Excel 2007 VBA XML"_ustr);
|
||||
save(TestFilter::XLSM);
|
||||
xmlDocUniquePtr pVmlDrawing = parseExport(u"xl/drawings/vmlDrawing1.vml"_ustr);
|
||||
|
||||
assertXPath(pVmlDrawing, "/xml/v:shape", "id", u"Button 1001");
|
||||
@@ -287,7 +287,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf66668)
|
||||
// Would hang on exporting without the fix in place
|
||||
createScDoc("xlsx/tdf66668.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
}
|
||||
@@ -296,7 +296,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf130108)
|
||||
{
|
||||
createScDoc("ods/tdf130108.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -312,7 +312,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf76949)
|
||||
{
|
||||
createScDoc("ods/tdf76949.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -324,7 +324,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf107586)
|
||||
{
|
||||
createScDoc("xlsx/tdf107586.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -337,7 +337,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf55417)
|
||||
{
|
||||
createScDoc("xlsx/tdf55417.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/x:styleSheet/x:cellXfs/x:xf[1]/x:alignment", 1);
|
||||
@@ -348,7 +348,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf129985)
|
||||
{
|
||||
createScDoc("xlsx/tdf129985.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -359,7 +359,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf73063)
|
||||
{
|
||||
createScDoc("xlsx/tdf73063.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -372,7 +372,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf95640_ods_to_xlsx)
|
||||
// Roundtripping sort options with user defined list to XLSX
|
||||
createScDoc("ods/tdf95640.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
|
||||
assertXPath(pDoc, "//x:worksheet/x:autoFilter", "ref", u"A1:B4");
|
||||
@@ -387,7 +387,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf95640_ods_to_xlsx_with_standard_list)
|
||||
{
|
||||
// Roundtripping sort options with user defined list to XLSX
|
||||
createScDoc("ods/tdf95640_standard_list.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
|
||||
assertXPath(pDoc, "//x:worksheet/x:autoFilter", "ref", u"A1:B4");
|
||||
@@ -406,7 +406,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf95640_xlsx_to_xlsx)
|
||||
// low, medium, high
|
||||
createScDoc("xlsx/tdf95640.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
|
||||
assertXPath(pDoc, "//x:worksheet/x:autoFilter", "ref", u"A1:B4");
|
||||
@@ -425,7 +425,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testSortConditionRef)
|
||||
// - In <>, attribute 'ref' of '//x:worksheet/x:autoFilter/x:sortState/x:sortCondition' incorrect value.
|
||||
createScDoc("xlsx/sortconditionref.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
|
||||
assertXPath(pDoc, "//x:worksheet/x:autoFilter", "ref", u"B2");
|
||||
@@ -439,7 +439,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testSortConditionRef2)
|
||||
//- Actual : J11:J300
|
||||
//- In <>, attribute 'ref' of '//x:worksheet/x:autoFilter/x:sortState/x:sortCondition' incorrect value.
|
||||
createScDoc("xlsx/sortconditionref2.xlsx");
|
||||
save("Calc Office Open XML");
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport("xl/worksheets/sheet1.xml");
|
||||
|
||||
assertXPath(pDoc, "//x:worksheet/x:autoFilter/x:sortState/x:sortCondition", "ref", u"A11:A300");
|
||||
@@ -450,7 +450,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testDateAutofilterXLSX)
|
||||
// XLSX Roundtripping autofilter with date list
|
||||
createScDoc("xlsx/dateAutofilter.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -474,7 +474,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testDateAutofilterODS)
|
||||
{
|
||||
createScDoc("ods/tdf142231.ods");
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -488,7 +488,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testAutofilterColorsODF)
|
||||
{
|
||||
createScDoc("ods/autofilter-colors.ods");
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -526,7 +526,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testAutofilterColorsOOXML)
|
||||
{
|
||||
{
|
||||
createScDoc("xlsx/autofilter-colors.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable1 = parseExport(u"xl/tables/table1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable1);
|
||||
sal_Int32 nDxfId
|
||||
@@ -543,7 +543,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testAutofilterColorsOOXML)
|
||||
|
||||
{
|
||||
createScDoc("xlsx/autofilter-colors-fg.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pTable1 = parseExport(u"xl/tables/table1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pTable1);
|
||||
sal_Int32 nDxfId
|
||||
@@ -563,7 +563,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testAutofilterTop10XLSX)
|
||||
{
|
||||
createScDoc("xlsx/tdf143068_top10filter.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "//x:autoFilter/x:filterColumn", "colId", u"0");
|
||||
@@ -577,7 +577,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testAutofilterColButton)
|
||||
// - In <>, XPath '//x:autoFilter/x:filterColumn' unexpected 'hiddenButton' attribute
|
||||
createScDoc("ods/autofilter-colbutton.ods");
|
||||
|
||||
save("Calc Office Open XML");
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport("xl/worksheets/sheet1.xml");
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPathNoAttribute(pDoc, "//x:autoFilter/x:filterColumn", "hiddenButton");
|
||||
@@ -587,7 +587,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf88657ODS)
|
||||
{
|
||||
createScDoc("ods/tdf88657.ods");
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -598,7 +598,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf41722)
|
||||
{
|
||||
createScDoc("xlsx/tdf41722.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -611,7 +611,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf113621)
|
||||
{
|
||||
createScDoc("xlsx/tdf113621.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -622,7 +622,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testEscapeCharInNumberFormatXLSX)
|
||||
{
|
||||
createScDoc("xlsx/tdf81939.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -645,7 +645,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testNatNumInNumberFormatXLSX)
|
||||
{
|
||||
createScDoc("ods/tdf79398_NatNum5.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -656,9 +656,9 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testNatNumInNumberFormatXLSX)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testExponentWithoutSignFormatXLSX)
|
||||
{
|
||||
createScDoc("ods/tdf102370_ExponentWithoutSign.ods");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
sal_uInt32 nNumberFormat = pDoc->GetNumberFormat(0, 0, 0);
|
||||
@@ -673,7 +673,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testExtendedLCIDXLSX)
|
||||
{
|
||||
createScDoc("ods/tdf36038_ExtendedLCID.ods");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDocXml);
|
||||
// Check export
|
||||
@@ -729,7 +729,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testHiddenRepeatedRowsODS)
|
||||
pDoc->SetRowHidden(0, 20, 0, true);
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
SCROW nFirstRow = 0;
|
||||
SCROW nLastRow = 0;
|
||||
@@ -756,7 +756,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testHyperlinkTargetFrameODS)
|
||||
OUString aTargetFrame = pURLData->GetTargetFrame();
|
||||
CPPUNIT_ASSERT_EQUAL(u"_blank"_ustr, aTargetFrame);
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDocXml);
|
||||
OUString aTargetFrameExport
|
||||
@@ -787,7 +787,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testKeepSettingsOfBlankRows)
|
||||
{
|
||||
createScDoc("xlsx/tdf41425.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -799,7 +799,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf133595)
|
||||
{
|
||||
createScDoc("xlsx/tdf133595.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -811,7 +811,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf134769)
|
||||
{
|
||||
createScDoc("xlsx/tdf134769.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -830,7 +830,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf106181)
|
||||
{
|
||||
createScDoc("ods/tdf106181.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -868,7 +868,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf145057)
|
||||
{
|
||||
createScDoc("xlsx/tdf145057.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/tables/table1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -878,7 +878,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf145057)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf105272)
|
||||
{
|
||||
createScDoc("xlsx/tdf105272.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
//without the fix in place,it would fail
|
||||
//Expected: Table1[[#This Row],[Total]]/Table1[[#This Row],['# Athletes]]
|
||||
@@ -892,7 +892,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf105272)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf118990)
|
||||
{
|
||||
createScDoc("xlsx/tdf118990.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
// TODO: also test A1, which contains a UNC reference to \\localhost\share\lookupsource.xlsx,
|
||||
@@ -914,7 +914,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf118990)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf121612)
|
||||
{
|
||||
createScDoc("ods/tdf121612.ods");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -931,7 +931,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf112936)
|
||||
{
|
||||
createScDoc("xlsx/tdf112936.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/pivotCache/pivotCacheDefinition1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -945,7 +945,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testXltxExport)
|
||||
createScDoc();
|
||||
|
||||
// Export as template and check content type
|
||||
save(u"Calc MS Excel 2007 XML Template"_ustr);
|
||||
save(TestFilter::XLST);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"[Content_Types].xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/ContentType:Types/ContentType:Override[@PartName='/xl/workbook.xml']",
|
||||
@@ -958,7 +958,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testPivotCacheAfterExportXLSX)
|
||||
createScDoc("ods/numgroup_example.ods");
|
||||
|
||||
// export only
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT(pDoc->HasPivotTable());
|
||||
@@ -983,7 +983,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf114969XLSX)
|
||||
{
|
||||
createScDoc("ods/sheet_name_with_dots.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/x:worksheet/x:hyperlinks/x:hyperlink[1]", "location", u"'1.1.1.1'!C1");
|
||||
@@ -994,7 +994,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf115192XLSX)
|
||||
{
|
||||
createScDoc("xlsx/test_115192.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/_rels/drawing1.xml.rels"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']", "TargetMode",
|
||||
@@ -1008,7 +1008,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf142764)
|
||||
{
|
||||
createScDoc("ods/tdf142764.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -1019,7 +1019,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf142764)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf91634XLSX)
|
||||
{
|
||||
createScDoc("xlsx/image_hyperlink.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -1055,7 +1055,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testValidationCopyPaste)
|
||||
pDoc->CopyFromClip(aDstRange, aMark2, InsertDeleteFlags::ALL, nullptr, &aClipDoc);
|
||||
|
||||
// save as XLSX
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
// check validation
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
@@ -1068,7 +1068,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf115159)
|
||||
{
|
||||
createScDoc("xlsx/tdf115159.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/workbook.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1090,7 +1090,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf112567)
|
||||
|
||||
createScDoc("xlsx/tdf112567.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/workbook.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1107,11 +1107,11 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf75702)
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("load a1", sA1, pDoc->GetString(0, 0, 0));
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("reload a1", sA1, pDoc->GetString(0, 0, 0));
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pContent = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pContent, "//table:table-row[1]/table:table-cell/text:p", 2);
|
||||
}
|
||||
@@ -1128,7 +1128,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf103829)
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("load a1", sA1, pDoc->GetString(0, 0, 0));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("load a2", sA2, pDoc->GetString(0, 1, 0));
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("reload a1", sA1, pDoc->GetString(0, 0, 0));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("reload a2", sA2, pDoc->GetString(0, 1, 0));
|
||||
@@ -1151,7 +1151,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf122191)
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL(u"IGAZ"_ustr, pDoc->GetString(0, 0, 0));
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
pDoc = getScDoc();
|
||||
// Without the fix in place, this test would have failed with
|
||||
@@ -1164,7 +1164,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf142881)
|
||||
{
|
||||
createScDoc("xlsx/tdf142881.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDrawing1 = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDrawing1);
|
||||
|
||||
@@ -1194,7 +1194,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf161365)
|
||||
{
|
||||
createScDoc("xlsx/tdf161365.xlsx");
|
||||
|
||||
save("Calc Office Open XML");
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet1 = parseExport("xl/worksheets/sheet1.xml");
|
||||
CPPUNIT_ASSERT(pSheet1);
|
||||
@@ -1256,7 +1256,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf112567b)
|
||||
|
||||
createScDoc("ods/tdf112567.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/workbook.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1271,7 +1271,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf112567b)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf123645XLSX)
|
||||
{
|
||||
createScDoc("xlsx/chart_hyperlink.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -1307,7 +1307,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf123645XLSX)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf125173XLSX)
|
||||
{
|
||||
createScDoc("ods/text_box_hyperlink.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -1324,7 +1324,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf125173XLSX)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf79972XLSX)
|
||||
{
|
||||
createScDoc("xlsx/tdf79972.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -1340,7 +1340,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf79972XLSX)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf126024XLSX)
|
||||
{
|
||||
createScDoc("xlsx/hyperlink_formula.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -1356,7 +1356,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf126024XLSX)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testEnhancedProtectionRangeShorthand)
|
||||
{
|
||||
createScDoc("xlsx/enhancedProtectionRangeShorthand.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
// the shorthand version was not recognized as a valid range on import
|
||||
@@ -1366,7 +1366,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testEnhancedProtectionRangeShorthand)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf91332)
|
||||
{
|
||||
createScDoc("xlsx/tdf91332.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0),
|
||||
@@ -1387,7 +1387,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf137543XLSX)
|
||||
// LET function test
|
||||
createScDoc("xlsx/tdf137543.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
void testCeilingFloor(const OUString& sFormatType);
|
||||
void testFunctionsExcel2010(const OUString& sFormatType);
|
||||
void testCeilingFloor(TestFilter eFormatType);
|
||||
void testFunctionsExcel2010(TestFilter eFormatType);
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testBordersExchangeXLSX)
|
||||
@@ -221,7 +221,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testBordersExchangeXLSX)
|
||||
|
||||
createScDoc("ods/test_borders_export.ods");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
for (size_t nCol = 0; nCol < nMaxCol; ++nCol)
|
||||
@@ -460,7 +460,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTrackChangesSimpleXLSX)
|
||||
bool bGood = aTest.check(*pDoc);
|
||||
CPPUNIT_ASSERT_MESSAGE("Initial check failed (xls).", bGood);
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
bGood = aTest.check(*pDoc);
|
||||
CPPUNIT_ASSERT_MESSAGE("Check after reload failed (xls).", bGood);
|
||||
@@ -484,7 +484,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTrackChangesSimpleXLSX)
|
||||
aTest.check(*pDoc);
|
||||
CPPUNIT_ASSERT_MESSAGE("Initial check failed (xlsx).", bGood);
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
bGood = aTest.check(*pDoc);
|
||||
CPPUNIT_ASSERT_MESSAGE("Check after reload failed (xlsx).", bGood);
|
||||
@@ -548,7 +548,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetTabColorsXLSX)
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed on the initial content check.", bRes);
|
||||
}
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
bool bRes = aTest.checkContent(*pDoc);
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed on the content check after reload.", bRes);
|
||||
@@ -558,7 +558,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTdf133487)
|
||||
{
|
||||
createScDoc("fods/shapes_foreground_background.fods");
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -704,7 +704,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLS)
|
||||
CPPUNIT_ASSERT_MESSAGE("Content check on the original document failed.", bRes);
|
||||
}
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
|
||||
// Check the content of the reloaded. This should be identical.
|
||||
ScDocument* pDoc = getScDoc();
|
||||
@@ -797,7 +797,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLSX)
|
||||
}
|
||||
|
||||
// Save and reload, and check the content again.
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
pDoc->CalcAll(); // Recalculate to flush all cached results.
|
||||
@@ -865,7 +865,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaStringResultExportXLSX)
|
||||
CPPUNIT_ASSERT_MESSAGE("Content check on the initial recalculated document failed.", bRes);
|
||||
}
|
||||
// Reload and check again.
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
bool bRes = aTest.checkContent(*pDoc);
|
||||
@@ -952,7 +952,7 @@ void testCeilingFloor_Impl(ScDocument& rDoc)
|
||||
}
|
||||
}
|
||||
|
||||
void ScExportTest3::testFunctionsExcel2010(const OUString& sFormatType)
|
||||
void ScExportTest3::testFunctionsExcel2010(TestFilter eFormatType)
|
||||
{
|
||||
createScDoc("xlsx/functions-excel-2010.xlsx");
|
||||
|
||||
@@ -961,7 +961,7 @@ void ScExportTest3::testFunctionsExcel2010(const OUString& sFormatType)
|
||||
|
||||
testFunctionsExcel2010_Impl(*pDoc);
|
||||
|
||||
saveAndReload(sFormatType);
|
||||
saveAndReload(eFormatType);
|
||||
pDoc = getScDoc();
|
||||
pDoc->CalcAll(); // perform hard re-calculation.
|
||||
|
||||
@@ -970,17 +970,20 @@ void ScExportTest3::testFunctionsExcel2010(const OUString& sFormatType)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testFunctionsExcel2010XLSX)
|
||||
{
|
||||
testFunctionsExcel2010(u"Calc Office Open XML"_ustr);
|
||||
testFunctionsExcel2010(TestFilter::XLSX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testFunctionsExcel2010XLS)
|
||||
{
|
||||
testFunctionsExcel2010(u"MS Excel 97"_ustr);
|
||||
testFunctionsExcel2010(TestFilter::XLS);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testFunctionsExcel2010ODS) { testFunctionsExcel2010("calc8"); }
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testFunctionsExcel2010ODS)
|
||||
{
|
||||
testFunctionsExcel2010(TestFilter::ODS);
|
||||
}
|
||||
|
||||
void ScExportTest3::testCeilingFloor(const OUString& sFormatType)
|
||||
void ScExportTest3::testCeilingFloor(TestFilter eFormatType)
|
||||
{
|
||||
createScDoc("xlsx/ceiling-floor.xlsx");
|
||||
|
||||
@@ -989,28 +992,25 @@ void ScExportTest3::testCeilingFloor(const OUString& sFormatType)
|
||||
|
||||
testCeilingFloor_Impl(*pDoc);
|
||||
|
||||
saveAndReload(sFormatType);
|
||||
saveAndReload(eFormatType);
|
||||
pDoc = getScDoc();
|
||||
pDoc->CalcAll(); // perform hard re-calculation.
|
||||
|
||||
testCeilingFloor_Impl(*pDoc);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testCeilingFloorXLSX)
|
||||
{
|
||||
testCeilingFloor(u"Calc Office Open XML"_ustr);
|
||||
}
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testCeilingFloorXLSX) { testCeilingFloor(TestFilter::XLSX); }
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testCeilingFloorXLS) { testCeilingFloor(u"MS Excel 97"_ustr); }
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testCeilingFloorXLS) { testCeilingFloor(TestFilter::XLS); }
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testCeilingFloorODS) { testCeilingFloor(u"calc8"_ustr); }
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testCeilingFloorODS) { testCeilingFloor(TestFilter::ODS); }
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testCeilingFloorODSToXLSX)
|
||||
{
|
||||
// tdf#100011 - Cannot open sheet containing FLOOR/CEILING functions by MS Excel, after export to .xlsx
|
||||
createScDoc("ods/ceiling-floor.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/workbook.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -1023,7 +1023,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testCustomXml)
|
||||
// Load document and export it to a temporary file
|
||||
createScDoc("xlsx/customxml.xlsx");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"customXml/item1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
xmlDocUniquePtr pRelsDoc = parseExport(u"customXml/_rels/item1.xml.rels"_ustr);
|
||||
@@ -1058,7 +1058,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testRelativePathsODS)
|
||||
{
|
||||
createScDoc("ods/fdo79305.ods");
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
OUString aURL = getXPath(pDoc,
|
||||
@@ -1103,7 +1103,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetProtectionODS)
|
||||
|
||||
testSheetProtection_Impl(*pDoc);
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
pDoc = getScDoc();
|
||||
|
||||
@@ -1112,8 +1112,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetProtectionODS)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testSwappedOutImageExport)
|
||||
{
|
||||
std::vector<OUString> aFilterNames{ u"calc8"_ustr, u"MS Excel 97"_ustr,
|
||||
u"Calc Office Open XML"_ustr };
|
||||
std::vector<TestFilter> aFilterNames{ TestFilter::ODS, TestFilter::XLS, TestFilter::XLSX };
|
||||
|
||||
for (size_t i = 0; i < aFilterNames.size(); ++i)
|
||||
{
|
||||
@@ -1121,7 +1120,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSwappedOutImageExport)
|
||||
createScDoc("ods/document_with_two_images.ods");
|
||||
|
||||
const OString sFailedMessage
|
||||
= OString::Concat("Failed on filter: ") + aFilterNames[i].toUtf8();
|
||||
= OString::Concat("Failed on filter: ") + TestFilterNames.at(aFilterNames[i]).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(aFilterNames[i]);
|
||||
@@ -1178,7 +1177,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSupBookVirtualPathXLS)
|
||||
{
|
||||
createScDoc("xls/external-ref.xls");
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -1195,15 +1194,14 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSupBookVirtualPathXLS)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testLinkedGraphicRT)
|
||||
{
|
||||
// Problem was with linked images
|
||||
std::vector<OUString> aFilterNames{ u"calc8"_ustr, u"MS Excel 97"_ustr,
|
||||
u"Calc Office Open XML"_ustr };
|
||||
std::vector<TestFilter> aFilterNames{ TestFilter::ODS, TestFilter::XLS, TestFilter::XLSX };
|
||||
|
||||
for (size_t i = 0; i < aFilterNames.size(); ++i)
|
||||
{
|
||||
// Load the original file with one image
|
||||
createScDoc("ods/document_with_linked_graphic.ods");
|
||||
const OString sFailedMessage
|
||||
= OString::Concat("Failed on filter: ") + aFilterNames[i].toUtf8();
|
||||
= OString::Concat("Failed on filter: ") + TestFilterNames.at(aFilterNames[i]).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(aFilterNames[i]);
|
||||
@@ -1216,7 +1214,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testLinkedGraphicRT)
|
||||
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pPage != nullptr);
|
||||
SdrGrafObj* pObject = dynamic_cast<SdrGrafObj*>(pPage->GetObj(0));
|
||||
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pObject != nullptr);
|
||||
if (aFilterNames[i] == "Calc Office Open XML")
|
||||
if (aFilterNames[i] == TestFilter::XLSX)
|
||||
{
|
||||
// FIXME: tdf#152036
|
||||
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), !pObject->IsLinkedGraphic());
|
||||
@@ -1234,15 +1232,14 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testLinkedGraphicRT)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest3, testImageWithSpecialID)
|
||||
{
|
||||
std::vector<OUString> aFilterNames{ u"calc8"_ustr, u"MS Excel 97"_ustr,
|
||||
u"Calc Office Open XML"_ustr };
|
||||
std::vector<TestFilter> aFilterNames{ TestFilter::ODS, TestFilter::XLS, TestFilter::XLSX };
|
||||
|
||||
for (size_t i = 0; i < aFilterNames.size(); ++i)
|
||||
{
|
||||
createScDoc("ods/images_with_special_IDs.ods");
|
||||
|
||||
const OString sFailedMessage
|
||||
= OString::Concat("Failed on filter: ") + aFilterNames[i].toUtf8();
|
||||
= OString::Concat("Failed on filter: ") + TestFilterNames.at(aFilterNames[i]).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(aFilterNames[i]);
|
||||
@@ -1304,7 +1301,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testAbsNamedRangeHTML)
|
||||
|
||||
//reset import filter
|
||||
setImportFilterName(u"calc8"_ustr);
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDocSh = getScDocShell();
|
||||
pDocSh->DoHardRecalc();
|
||||
|
||||
@@ -1320,7 +1317,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTdf80149)
|
||||
createScDoc("csv/tdf80149.csv");
|
||||
ScDocShell* pDocSh = getScDocShell();
|
||||
pDocSh->DoHardRecalc();
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDocSh = getScDocShell();
|
||||
pDocSh->DoHardRecalc();
|
||||
|
||||
@@ -1346,7 +1343,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetLocalRangeNameXLS)
|
||||
createScDoc("xls/named-ranges-local.xls");
|
||||
ScDocShell* pDocSh = getScDocShell();
|
||||
pDocSh->DoHardRecalc();
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDocSh = getScDocShell();
|
||||
pDocSh->DoHardRecalc();
|
||||
|
||||
@@ -1368,7 +1365,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testRelativeNamedExpressionsXLS)
|
||||
createScDoc("ods/tdf113991_relativeNamedRanges.ods");
|
||||
ScDocShell* pDocSh = getScDocShell();
|
||||
pDocSh->DoHardRecalc();
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDocSh = getScDocShell();
|
||||
pDocSh->DoHardRecalc();
|
||||
|
||||
@@ -1398,7 +1395,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetTextBoxHyperlinkXLSX)
|
||||
{
|
||||
createScDoc("xlsx/textbox-hyperlink.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1412,7 +1409,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testFontSizeXLSX)
|
||||
{
|
||||
createScDoc("xlsx/fontSize.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
OUString fontSize = getXPath(
|
||||
@@ -1425,9 +1422,9 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetCharacterKerningSpaceXLSX)
|
||||
{
|
||||
createScDoc("xlsx/textbox-CharKerningSpace.xlsx");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1443,7 +1440,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetCondensedCharacterSpaceXLSX)
|
||||
{
|
||||
createScDoc("xlsx/textbox-CondensedCharacterSpace.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1459,7 +1456,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTextUnderlineColorXLSX)
|
||||
{
|
||||
createScDoc("xlsx/underlineColor.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
// Make sure the underline type is double line
|
||||
@@ -1491,7 +1488,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetRunParagraphPropertyXLSX)
|
||||
{
|
||||
createScDoc("xlsx/TextColor.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/sharedStrings.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1503,7 +1500,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testPreserveTextWhitespaceXLSX)
|
||||
{
|
||||
createScDoc("xlsx/preserve-whitespace.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/sharedStrings.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/x:sst/x:si/x:t", "space", u"preserve");
|
||||
@@ -1513,7 +1510,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testPreserveTextWhitespace2XLSX)
|
||||
{
|
||||
createScDoc("xlsx/preserve_space.xlsx");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/sharedStrings.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/x:sst/x:si[1]/x:t", "space", u"preserve");
|
||||
@@ -1557,7 +1554,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testHiddenShapeXLSX)
|
||||
CPPUNIT_ASSERT_MESSAGE("Drawing object should not be visible.", !pObj->IsVisible());
|
||||
CPPUNIT_ASSERT_MESSAGE("Drawing object should not be printable.", !pObj->IsPrintable());
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDocXml);
|
||||
assertXPath(pDocXml, "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp[1]/xdr:nvSpPr/xdr:cNvPr", "hidden",
|
||||
@@ -1568,7 +1565,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testShapeAutofitXLSX)
|
||||
{
|
||||
createScDoc("xlsx/testShapeAutofit.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1582,7 +1579,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testHyperlinkXLSX)
|
||||
{
|
||||
createScDoc("xlsx/hyperlink.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/_rels/drawing1.xml.rels"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/rels:Relationships/rels:Relationship", "Target", u"#Sheet2!A1");
|
||||
@@ -1656,7 +1653,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testMoveCellAnchoredShapesODS)
|
||||
aNDataEnd = pNData->maEnd;
|
||||
|
||||
// Save the document and load again to check anchor persist
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// There are two cell-anchored objects on the first sheet.
|
||||
pDoc = getScDoc();
|
||||
@@ -1721,7 +1718,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testMoveCellAnchoredShapesODS)
|
||||
aNDataEnd = pNData->maEnd;
|
||||
|
||||
// Save the document and load again to check anchor persist
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// There are two cell-anchored objects on the first sheet.
|
||||
pDoc = getScDoc();
|
||||
@@ -1805,7 +1802,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testLegacyCellAnchoredRotatedShape)
|
||||
// test save and reload
|
||||
// for some reason having this test in subsequent_export-test.cxx causes
|
||||
// a core dump in editeng ( so moved to here )
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
impl_testLegacyCellAnchoredRotatedShape(*pDoc, aRect, aAnchor);
|
||||
}
|
||||
@@ -1830,7 +1827,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testLegacyCellAnchoredRotatedShape)
|
||||
pDoc->SetDrawPageSize(0); // trigger recalcpos
|
||||
impl_testLegacyCellAnchoredRotatedShape(*pDoc, aRect, aAnchor);
|
||||
// test save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
impl_testLegacyCellAnchoredRotatedShape(*pDoc, aRect, aAnchor);
|
||||
}
|
||||
@@ -1852,7 +1849,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testLegacyCellAnchoredRotatedShape)
|
||||
// test import
|
||||
impl_testLegacyCellAnchoredRotatedShape(*pDoc, aRect, aAnchor);
|
||||
// test save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
impl_testLegacyCellAnchoredRotatedShape(*pDoc, aRect, aAnchor);
|
||||
}
|
||||
@@ -1862,7 +1859,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTdf113646)
|
||||
{
|
||||
createScDoc("ods/tdf113646.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -1874,7 +1871,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testDateStandardfilterXLSX)
|
||||
// XLSX Roundtripping standard filter with date
|
||||
createScDoc("ods/tdf142607.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1911,7 +1908,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTdf137576_Measureline)
|
||||
CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE(Point(4800, 5200), aEnd, 1);
|
||||
|
||||
// Save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// Get shape
|
||||
@@ -1958,7 +1955,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTdf137044_CoverHiddenRows)
|
||||
pDoc->SetRowHidden(4, 5, 0, true);
|
||||
|
||||
// Save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// Get shape
|
||||
@@ -1999,7 +1996,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTdf137020_FlipVertical)
|
||||
CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aSnapRectOrig, aSnapRectFlip, 1);
|
||||
|
||||
// Save and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// Get shape
|
||||
@@ -2019,7 +2016,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTdf82254_csv_bom)
|
||||
{
|
||||
setImportFilterName(SC_TEXT_CSV_FILTER_NAME);
|
||||
createScDoc("csv/testTdf82254-csv-bom.csv");
|
||||
saveAndReload(SC_TEXT_CSV_FILTER_NAME);
|
||||
saveAndReload(TestFilter::CSV);
|
||||
ScDocShell* pDocSh = getScDocShell();
|
||||
SvStream* pStream = pDocSh->GetMedium()->GetInStream();
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ ScExportTest4::ScExportTest4()
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf126177XLSX)
|
||||
{
|
||||
createScDoc("xlsx/hyperlink_export.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -94,7 +94,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testCommentTextVAlignment)
|
||||
// Testing comment text alignments.
|
||||
createScDoc("ods/CommentTextVAlign.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pVmlDrawing = parseExport(u"xl/drawings/vmlDrawing1.vml"_ustr);
|
||||
CPPUNIT_ASSERT(pVmlDrawing);
|
||||
@@ -107,7 +107,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testCommentTextHAlignment)
|
||||
// Testing comment text alignments.
|
||||
createScDoc("ods/CommentTextHAlign.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pVmlDrawing = parseExport(u"xl/drawings/vmlDrawing1.vml"_ustr);
|
||||
CPPUNIT_ASSERT(pVmlDrawing);
|
||||
@@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testRotatedImageODS)
|
||||
|
||||
createScDoc("ods/tdf103092_RotatedImage.ods");
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -150,7 +150,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf120177)
|
||||
// Error: unexpected attribute "form:input-required"
|
||||
skipValidation();
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -179,7 +179,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf85553)
|
||||
{
|
||||
createScDoc("ods/tdf85553.ods");
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -191,15 +191,14 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf85553)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf151484)
|
||||
{
|
||||
std::vector<OUString> aFilterNames{ u"calc8"_ustr, u"MS Excel 97"_ustr,
|
||||
u"Calc Office Open XML"_ustr };
|
||||
std::vector<TestFilter> aFilterNames{ TestFilter::ODS, TestFilter::XLS, TestFilter::XLSX };
|
||||
|
||||
for (size_t i = 0; i < aFilterNames.size(); ++i)
|
||||
{
|
||||
createScDoc("ods/tdf151484.ods");
|
||||
|
||||
const OString sFailedMessage
|
||||
= OString::Concat("Failed on filter: ") + aFilterNames[i].toUtf8();
|
||||
= OString::Concat("Failed on filter: ") + TestFilterNames.at(aFilterNames[i]).toUtf8();
|
||||
|
||||
saveAndReload(aFilterNames[i]);
|
||||
|
||||
@@ -240,7 +239,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf143979)
|
||||
CPPUNIT_ASSERT_EQUAL(u"2021-08Aug-30Mon"_ustr, pDoc->GetString(ScAddress(0, 0, 0)));
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
// Without the fix in place, this test would have failed with
|
||||
@@ -253,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf128976)
|
||||
{
|
||||
createScDoc("xls/tdf128976.xls");
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -277,7 +276,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf120502)
|
||||
const auto nOldWidth = pDoc->GetColWidth(nMaxCol, 0);
|
||||
pDoc->SetColWidth(nMaxCol, 0, nOldWidth + 100);
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet1 = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet1);
|
||||
|
||||
@@ -289,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf131372)
|
||||
{
|
||||
createScDoc("ods/tdf131372.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
@@ -302,7 +301,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf81470)
|
||||
createScDoc("xls/tdf81470.xls");
|
||||
|
||||
//without the fix in place, it would have crashed at export time
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
//also check revisions are exported
|
||||
xmlDocUniquePtr pHeaders = parseExport(u"xl/revisions/revisionHeaders.xml"_ustr);
|
||||
@@ -320,7 +319,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf162262)
|
||||
{
|
||||
createScDoc("xlsx/subtotal-above.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
@@ -343,7 +342,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf162262_summarybelow)
|
||||
CPPUNIT_ASSERT(!aParam.bSummaryBelow);
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
pDBCollection = pDoc->GetDBCollection();
|
||||
CPPUNIT_ASSERT(pDBCollection);
|
||||
@@ -360,7 +359,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf122331)
|
||||
{
|
||||
createScDoc("ods/tdf122331.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
@@ -375,7 +374,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf83779)
|
||||
// Roundtripping TRUE/FALSE constants (not functions) must convert them to functions
|
||||
createScDoc("xlsx/tdf83779.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pVmlDrawing = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pVmlDrawing);
|
||||
@@ -389,7 +388,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf121715_FirstPageHeaderFooterXLSX)
|
||||
// Check if first page header and footer are exported properly
|
||||
createScDoc("xlsx/tdf121715.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -406,7 +405,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf121716_ExportEvenHeaderFooterXLSX)
|
||||
|
||||
createScDoc("ods/tdf121716_EvenHeaderFooter.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -434,7 +433,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf134459_HeaderFooterColorXLSX)
|
||||
// Colors in header and footer should be exported, and imported properly
|
||||
createScDoc("xlsx/tdf134459_HeaderFooterColor.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -449,7 +448,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf134817_HeaderFooterTextWith2SectionXL
|
||||
// Header/footer text with multiple selection should be exported, and imported properly
|
||||
createScDoc("xlsx/tdf134817_HeaderFooterTextWith2Section.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -464,7 +463,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf121718_UseFirstPageNumberXLSX)
|
||||
// If "First page number" is not checked then useFirstPageNumb, and firstPageNumber should not be exported.
|
||||
createScDoc("ods/tdf121718_UseFirstPageNumber.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -521,7 +520,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf154445_unused_pagestyles)
|
||||
pDoc->SetPageStyle(0, ScResId(STR_STYLENAME_STANDARD));
|
||||
|
||||
// Save and reload the document to check if the unused page styles are still present
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// Without the accompanying fix in place, the unused page styles don't exist anymore
|
||||
@@ -538,7 +537,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf135828_Shape_Rect)
|
||||
// forth conversion between emu and hmm.
|
||||
createScDoc("xlsx/tdf135828_Shape_Rect.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDrawing = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDrawing);
|
||||
@@ -621,7 +620,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf123353)
|
||||
{
|
||||
createScDoc("xlsx/tdf123353.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -633,7 +632,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf140098)
|
||||
{
|
||||
createScDoc("ods/tdf140098.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -646,7 +645,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf133688_precedents)
|
||||
// tdf#133688 Check that we do not export detective shapes.
|
||||
createScDoc("ods/tdf133688_dont_save_precedents_to_xlsx.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDrawing = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDrawing);
|
||||
|
||||
@@ -660,7 +659,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf91251_missingOverflowRoundtrip)
|
||||
// getting preserved after roundtrip
|
||||
createScDoc("xlsx/tdf91251_missingOverflowRoundtrip.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDrawing = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDrawing);
|
||||
@@ -679,7 +678,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf137000_handle_upright)
|
||||
// of workaround 'rot'.
|
||||
createScDoc("xlsx/tdf137000_export_upright.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDrawing = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDrawing);
|
||||
|
||||
@@ -691,7 +690,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf126305_DataValidatyErrorAlert)
|
||||
{
|
||||
createScDoc("ods/tdf126305.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -762,7 +761,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf87973_externalLinkSkipUnuseds)
|
||||
pDoc->SetFormula(ScAddress(3, 2, 0), aFormula, formula::FormulaGrammar::GRAM_NATIVE_UI);
|
||||
|
||||
// save and load back
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
// check if the new filename is present in the link (and not replaced by '[2]')
|
||||
pDoc = getScDoc();
|
||||
@@ -789,7 +788,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf51022_lostPrintRange)
|
||||
pDoc->AddPrintRange(0, aRange2);
|
||||
|
||||
// save and load back
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
// check if the same print ranges are present
|
||||
pDoc = getScDoc();
|
||||
@@ -808,7 +807,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf148170_ExceedXlsPrintRange)
|
||||
ScDocument* pDoc = getScDoc();
|
||||
pDoc->AddPrintRange(0, aCalcPrintRange);
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
|
||||
// Check if print range was shrunk to xls limitations
|
||||
pDoc = getScDoc();
|
||||
@@ -823,7 +822,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf138741_externalLinkSkipUnusedsCrash)
|
||||
createScDoc("xlsx/tdf138741_externalLinkSkipUnusedsCrash.xlsx");
|
||||
|
||||
//without the fix in place, it would have crashed at export time
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf138824_linkToParentDirectory)
|
||||
@@ -847,7 +846,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf138824_linkToParentDirectory)
|
||||
aFormula = aFormula.replaceAt(nIdxOfFile, nIdxOfFilename - nIdxOfFile, aTempFilename);
|
||||
pDoc->SetFormula(ScAddress(3, 1, 0), aFormula, formula::FormulaGrammar::GRAM_NATIVE_UI);
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"xl/externalLinks/_rels/externalLink1.xml.rels"_ustr);
|
||||
CPPUNIT_ASSERT(pDocXml);
|
||||
|
||||
@@ -860,7 +859,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf129969)
|
||||
{
|
||||
createScDoc("ods/external_hyperlink.ods");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
ScAddress aPos(0, 0, 0);
|
||||
const EditTextObject* pEditText = pDoc->GetEditText(aPos);
|
||||
@@ -873,7 +872,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf147088)
|
||||
{
|
||||
createScDoc("fods/tdf147088.fods");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -887,7 +886,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf84874)
|
||||
{
|
||||
createScDoc("ods/tdf84874.ods");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
@@ -913,7 +912,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf136721_paper_size)
|
||||
{
|
||||
createScDoc("xlsx/tdf136721_letter_sized_paper.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -925,7 +924,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf139258_rotated_image)
|
||||
// Check that the topleft position of the image is correct.
|
||||
createScDoc("ods/tdf139258_rotated_image.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDrawing = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDrawing);
|
||||
@@ -974,7 +973,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf151755_stylesLostOnXLSXExport)
|
||||
createScDoc("xlsx/tdf151755_stylesLostOnXLSXExport.xlsx");
|
||||
|
||||
// Resave the xlsx file without any modification.
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -991,7 +990,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf152581_bordercolorNotExportedToXLSX)
|
||||
createScDoc("xlsx/tdf152581_bordercolorNotExportedToXLSX.xlsx");
|
||||
|
||||
// Resave the xlsx file without any modification.
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pStyles = parseExport(u"xl/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pStyles);
|
||||
|
||||
@@ -1003,7 +1002,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf140431)
|
||||
{
|
||||
createScDoc("xlsx/129969-min.xlsx");
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
ScAddress aPos(0, 2, 0);
|
||||
const EditTextObject* pEditText = pDoc->GetEditText(aPos);
|
||||
@@ -1020,7 +1019,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testCheckboxFormControlXlsxExport)
|
||||
createScDoc("xlsx/checkbox-form-control.xlsx");
|
||||
|
||||
// When exporting to XLSX:
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
// Then make sure its VML markup is written and it has a correct position + size:
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/drawings/vmlDrawing1.vml"_ustr);
|
||||
@@ -1035,7 +1034,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testButtonFormControlXlsxExport)
|
||||
createScDoc("xlsx/button-form-control.xlsx");
|
||||
|
||||
// When exporting to XLSX:
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
// Then make sure its control markup is written and it has a correct position + size:
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
@@ -1060,7 +1059,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf142929_filterLessThanXLSX)
|
||||
// Document contains a standard filter with '<' condition.
|
||||
createScDoc("xlsx/tdf142929.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "//x:customFilters/x:customFilter", "val", u"2");
|
||||
@@ -1086,7 +1085,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testInvalidNamedRange)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testExternalDefinedNameXLSX)
|
||||
{
|
||||
createScDoc("xlsx/tdf144397.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
ScDocShell* pDocSh = getScDocShell();
|
||||
pDocSh->ReloadAllLinks();
|
||||
@@ -1122,7 +1121,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testExternalDefinedNameXLSX)
|
||||
CPPUNIT_ASSERT_EQUAL(u"June"_ustr, aRes.maString.getString());
|
||||
}
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"xl/externalLinks/externalLink1.xml"_ustr);
|
||||
|
||||
CPPUNIT_ASSERT(pDocXml);
|
||||
@@ -1146,7 +1145,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testHyperlinkLocationXLSX)
|
||||
{
|
||||
createScDoc("ods/tdf143220.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDoc = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -1174,7 +1173,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf142264ManyChartsToXLSX)
|
||||
pBatch->commit();
|
||||
|
||||
createScDoc("ods/many_charts.ods");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
css::uno::Reference<css::drawing::XDrawPagesSupplier> xSupplier(mxComponent,
|
||||
css::uno::UNO_QUERY_THROW);
|
||||
@@ -1264,7 +1263,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf143929MultiColumnToODS)
|
||||
xColProps->getPropertyValue(u"AutomaticDistance"_ustr));
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
{
|
||||
css::uno::Reference<css::drawing::XDrawPagesSupplier> xSupplier(mxComponent,
|
||||
css::uno::UNO_QUERY_THROW);
|
||||
@@ -1311,7 +1310,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf142578)
|
||||
{
|
||||
createScDoc("ods/tdf142578.ods");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -1346,7 +1345,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf145059)
|
||||
createScDoc("ods/tdf145059.ods");
|
||||
|
||||
// Export to xlsx.
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
xmlDocUniquePtr pStyle = parseExport(u"xl/styles.xml"_ustr);
|
||||
@@ -1370,7 +1369,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf130104_XLSXIndent)
|
||||
createScDoc("xlsx/tdf130104_indent.xlsx");
|
||||
|
||||
// Resave the xlsx file without any modification.
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
xmlDocUniquePtr pStyle = parseExport(u"xl/styles.xml"_ustr);
|
||||
@@ -1462,7 +1461,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testWholeRowBold)
|
||||
pDoc->ApplyPatternAreaTab(0, 1, pDoc->MaxCol(), 1, 0, boldAttr);
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScDocument* pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0));
|
||||
vcl::Font aFont;
|
||||
@@ -1470,7 +1469,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testWholeRowBold)
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD,
|
||||
aFont.GetWeightMaybeAskConfig());
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0));
|
||||
pDoc->GetPattern(pDoc->MaxCol(), 1, 0)->fillFontOnly(aFont);
|
||||
@@ -1482,13 +1481,13 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testXlsxRowsOrder)
|
||||
{
|
||||
createScDoc("xlsx/tdf58243.xlsx");
|
||||
// Make sure code in SheetDataBuffer doesn't assert columns/rows sorting.
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf91286)
|
||||
{
|
||||
createScDoc("ods/tdf91286.ods");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
|
||||
@@ -1509,7 +1508,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf91286)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf148820)
|
||||
{
|
||||
createScDoc("xlsx/tdf148820.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -1569,15 +1568,15 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testBlankInExponent)
|
||||
createScDoc("ods/tdf156449-Blank-In-Exponent.ods");
|
||||
|
||||
// save to ODS and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
lcl_TestNumberFormat(*getScDoc(), u"0.00E+?0"_ustr);
|
||||
lcl_SetNumberFormat(*getScDoc(), u"0.00E+??"_ustr);
|
||||
// at least one '0' in exponent
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
lcl_TestNumberFormat(*getScDoc(), u"0.00E+?0"_ustr);
|
||||
|
||||
// save to XLSX and reload
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
lcl_TestNumberFormat(*getScDoc(), u"0.00E+?0"_ustr);
|
||||
}
|
||||
|
||||
@@ -1587,7 +1586,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testSecondsWithoutTruncateAndDecimals)
|
||||
lcl_TestNumberFormat(*getScDoc(), u"[SS].00"_ustr);
|
||||
|
||||
// save to ODS and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
lcl_TestNumberFormat(*getScDoc(), u"[SS].00"_ustr);
|
||||
}
|
||||
|
||||
@@ -1596,11 +1595,11 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testBlankWidthCharacter)
|
||||
createScDoc("ods/tdf152724-Blank-width-char.ods");
|
||||
|
||||
// save to ODS and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
lcl_TestNumberFormat(*getScDoc(), u"[>0]_-?0;[<0]-?0;_-?0;@"_ustr);
|
||||
|
||||
// save to XLSX and reload
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
lcl_TestNumberFormat(*getScDoc(), u"_-?0;-?0;_-?0;@"_ustr);
|
||||
}
|
||||
|
||||
@@ -1610,7 +1609,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testEmbeddedTextInDecimal)
|
||||
lcl_TestNumberFormat(*getScDoc(), u"#,##0.000\" \"###\" \"###"_ustr);
|
||||
|
||||
// save to ODS and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
lcl_TestNumberFormat(*getScDoc(), u"#,##0.000\" \"###\" \"###"_ustr);
|
||||
}
|
||||
|
||||
@@ -1619,19 +1618,19 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testLowercaseExponent)
|
||||
createScDoc("ods/tdf153993-Exponent-lower-case.ods");
|
||||
|
||||
// save to ODS and reload
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
lcl_TestNumberFormat(*getScDoc(), u"0.000\" \"000\" \"e+\" \"0"_ustr);
|
||||
|
||||
// save to XLSX and reload
|
||||
// lower case not preserve in XLSX
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
lcl_TestNumberFormat(*getScDoc(), u"0.000 000 E+ 0"_ustr);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTotalsRowFunction)
|
||||
{
|
||||
createScDoc("xlsx/totalsRowFunction.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
{
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"xl/tables/table1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDocXml);
|
||||
@@ -1640,7 +1639,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTotalsRowFunction)
|
||||
}
|
||||
ScDocument* pDoc = getScDoc();
|
||||
pDoc->InsertCol(ScRange(3, 0, 0, 3, pDoc->MaxRow(), 0)); // Insert col 4
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
{
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"xl/tables/table1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDocXml);
|
||||
@@ -1654,7 +1653,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTotalsRowFunction)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf167689_xmlMaps_and_xmlColumnPr)
|
||||
{
|
||||
createScDoc("xlsx/tdf167689_xmlMaps_and_xmlColumnPr.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
// xl/xmlMaps.xml
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"xl/xmlMaps.xml"_ustr);
|
||||
@@ -1685,7 +1684,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf167689_xmlMaps_and_xmlColumnPr)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf167689_tableType)
|
||||
{
|
||||
createScDoc("xlsx/tdf167689_tableType.xlsx");
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDocXmlTables = parseExport(u"xl/tables/table1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDocXmlTables);
|
||||
@@ -1702,7 +1701,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf167689_tableType)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testAutofilterHiddenButton)
|
||||
{
|
||||
createScDoc("xlsx/hiddenButton.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pDocXml = parseExport(u"xl/tables/table1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDocXml);
|
||||
for (int i = 1; i <= 5; i++)
|
||||
@@ -1756,7 +1755,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testShapeStyles)
|
||||
->setPropertyValue(u"Style"_ustr, Any(xStyle));
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
{
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDPS(mxComponent, uno::UNO_QUERY_THROW);
|
||||
@@ -1809,7 +1808,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testCommentStyles)
|
||||
pNote->ShowCaption(aPos, false);
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
{
|
||||
ScDocument aDoc;
|
||||
@@ -1827,7 +1826,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testCommentStyles)
|
||||
CPPUNIT_ASSERT_EQUAL(u"MyStyle1"_ustr, pCaption->GetStyleSheet()->GetName());
|
||||
}
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
{
|
||||
ScDocument* pDoc = getScDoc();
|
||||
@@ -1848,7 +1847,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testCommentStyles)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf119565)
|
||||
{
|
||||
createScDoc("xlsx/tdf119565.xlsx");
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0),
|
||||
@@ -1876,7 +1875,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf152980)
|
||||
createScDoc("csv/tdf152980.csv");
|
||||
ScDocShell* pDocSh = getScDocShell();
|
||||
pDocSh->DoHardRecalc();
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDocSh = getScDocShell();
|
||||
pDocSh->DoHardRecalc();
|
||||
|
||||
@@ -1916,7 +1915,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf100034)
|
||||
dispatchCommand(mxComponent, u".uno:DeletePrintArea"_ustr, {});
|
||||
|
||||
// Save and load back
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
// Check if the same print ranges are present
|
||||
pDoc = getScDoc();
|
||||
@@ -1930,7 +1929,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf157318)
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
// Save as XLSX and load back
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// Check if there is one global named range
|
||||
@@ -1951,7 +1950,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testChangesAuthorDate)
|
||||
officecfg::Office::Common::Security::Scripting::RemovePersonalInfoOnSaving::set(true, pBatch);
|
||||
pBatch->commit();
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -1980,7 +1979,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testChangesAuthorDateXLSX)
|
||||
officecfg::Office::Common::Security::Scripting::RemovePersonalInfoOnSaving::set(true, pBatch);
|
||||
pBatch->commit();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/revisions/revisionHeaders.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -2004,7 +2003,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf163554)
|
||||
pDoc->GetFormula(0, 0, 0));
|
||||
CPPUNIT_ASSERT_EQUAL(u"7"_ustr, pDoc->GetString(ScAddress(0, 0, 0)));
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(u"=SUM($'time (misc) - last'.B1:$'time (pnrst)'.B1)"_ustr,
|
||||
@@ -2021,7 +2020,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testNotesAuthor)
|
||||
officecfg::Office::Common::Security::Scripting::RemovePersonalInfoOnSaving::set(true, pBatch);
|
||||
pBatch->commit();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/comments1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -2075,10 +2074,10 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testSheetProtections)
|
||||
createScDoc("xlsx/tdfSheetProts.xlsx");
|
||||
verify();
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
verify();
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -2086,7 +2085,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf164417)
|
||||
{
|
||||
createScDoc("xlsx/tdf164417.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet1 = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet1);
|
||||
@@ -2103,7 +2102,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf165503)
|
||||
|
||||
// FIXME: Invalid content was found starting with element 'c:noMultiLvlLbl'
|
||||
skipValidation();
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pChart1 = parseExport(u"xl/charts/chart1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pChart1);
|
||||
@@ -2133,7 +2132,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf165655)
|
||||
{
|
||||
createScDoc("xlsx/tdf165655.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pDrawing = parseExport(u"xl/drawings/drawing1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pDrawing);
|
||||
@@ -2149,7 +2148,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf165886)
|
||||
{
|
||||
createScDoc("xlsx/tdf165886.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
@@ -2181,7 +2180,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf166413)
|
||||
{
|
||||
createScDoc("xlsx/tdf166413.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
@@ -2216,7 +2215,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf166712)
|
||||
{
|
||||
createScDoc("xlsx/tdf166712.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pConn = parseExport(u"xl/connections.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pConn);
|
||||
@@ -2231,7 +2230,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf167689_x15_namespace)
|
||||
{
|
||||
createScDoc("xlsx/tdf167689_x15_namespace.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pConn = parseExport(u"xl/connections.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pConn);
|
||||
@@ -2257,7 +2256,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf166939)
|
||||
loadWithParams(createFileURL(u"ods/autostyle-name-is-single-char.ods"),
|
||||
{ comphelper::makePropertyValue(u"AsTemplate"_ustr, true) });
|
||||
// Saving it must not crash / fail an assertion!
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
// Check that we tested the codepath preserving existing names - otherwise test makes no sense
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
@@ -2272,7 +2271,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf166939_1)
|
||||
loadWithParams(createFileURL(u"fods/lostRowStyle.fods"),
|
||||
{ comphelper::makePropertyValue(u"AsTemplate"_ustr, true) });
|
||||
// Saving it must keep the autostyles
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(
|
||||
@@ -2290,7 +2289,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf166939_1)
|
||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf108244)
|
||||
{
|
||||
createScDoc("ods/tdf108244.ods");
|
||||
save(u"OpenDocument Spreadsheet Flat XML"_ustr);
|
||||
save(TestFilter::FODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -2328,7 +2327,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf150229)
|
||||
|
||||
// Test XLSX export: the hyperlink must truncate at 8192 character boundary
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
|
||||
{
|
||||
auto xDoc = mxComponent.queryThrow<sheet::XSpreadsheetDocument>();
|
||||
@@ -2352,7 +2351,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf150229)
|
||||
// Test XLS export: the hyperlink must truncate at 2083 character boundary (that's the limit
|
||||
// I found experimentally)
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
|
||||
{
|
||||
auto xDoc = mxComponent.queryThrow<sheet::XSpreadsheetDocument>();
|
||||
@@ -2382,7 +2381,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf165733_leap_day_BCE)
|
||||
pDoc->GetFormatTable()->GetType(pDoc->GetNumberFormat(0, 0, 0)));
|
||||
}
|
||||
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
{
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -494,7 +494,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest, testHiddenRangeNameODS)
|
||||
pRangeData2->GetUnoType() & sheet::NamedRangeFlag::HIDDEN);
|
||||
|
||||
// Check if both named ranges are hidden after saving and reloading
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
pRangeData1 = pDoc->GetRangeName()->findByUpperName(u"NAMEDRANGE1"_ustr);
|
||||
CPPUNIT_ASSERT(pRangeData1);
|
||||
@@ -523,7 +523,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest, testHiddenRangeNameXLSX)
|
||||
pRangeData2->GetUnoType() & sheet::NamedRangeFlag::HIDDEN);
|
||||
|
||||
// Save as ODS and test if the named ranges are still with the correct hidden flag
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
pRangeData1 = pDoc->GetRangeName()->findByUpperName(u"NAMEDRANGE1"_ustr);
|
||||
CPPUNIT_ASSERT(pRangeData1);
|
||||
@@ -555,7 +555,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest, testHiddenNamedExpression)
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(4), pNamedRanges->size());
|
||||
|
||||
// Save and reload to test whether the named expressions retain the hidden where applicable
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
pNamedRanges = pDoc->GetRangeName();
|
||||
CPPUNIT_ASSERT_EQUAL(size_t(4), pNamedRanges->size());
|
||||
|
||||
@@ -89,11 +89,12 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testMiscRowHeights)
|
||||
have default row heights ( there was a problem where the optimal
|
||||
height was being calculated after import if no hard height )
|
||||
*/
|
||||
{ u"ods/alldefaultheights.ods", OUString(), SAL_N_ELEMENTS(DfltRowData), DfltRowData },
|
||||
{ u"ods/alldefaultheights.ods", TestFilter::NONE, SAL_N_ELEMENTS(DfltRowData),
|
||||
DfltRowData },
|
||||
/* Checks the imported height of some multiline input, additionally checks
|
||||
that the optimal height flag is set ( or not )
|
||||
*/
|
||||
{ u"ods/multilineoptimal.ods", OUString(), SAL_N_ELEMENTS(MultiLineOptData),
|
||||
{ u"ods/multilineoptimal.ods", TestFilter::NONE, SAL_N_ELEMENTS(MultiLineOptData),
|
||||
MultiLineOptData },
|
||||
};
|
||||
miscRowHeightsTest(aTestValues, SAL_N_ELEMENTS(aTestValues));
|
||||
|
||||
@@ -242,7 +242,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf161948_NaturalSortSaveLoad)
|
||||
}
|
||||
|
||||
// Save and reload, verify file format and reloaded sort descriptor
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
|
||||
assertXPath(pXmlDoc, "//table:sort", "embedded-number-behavior", u"double");
|
||||
pDoc = getScDoc();
|
||||
@@ -267,7 +267,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf161948_NaturalSortSaveLoad)
|
||||
|
||||
// Save and reload, verify file format and reloaded sort descriptor
|
||||
// "alpha-numeric" is default and thus not written.
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pXmlDoc = parseExport("content.xml");
|
||||
assertXPathNoAttribute(pXmlDoc, "//table:sort", "embedded-number-behavior");
|
||||
pDoc = getScDoc();
|
||||
|
||||
@@ -487,7 +487,7 @@ CPPUNIT_TEST_FIXTURE(SheetViewTest, testCheckIfSheetViewIsSavedInDocument_ODF)
|
||||
dispatchCommand(mxComponent, u".uno:NewSheetView"_ustr, {});
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
@@ -503,7 +503,7 @@ CPPUNIT_TEST_FIXTURE(SheetViewTest, testCheckIfSheetViewIsSavedInDocument_OOXML)
|
||||
dispatchCommand(mxComponent, u".uno:NewSheetView"_ustr, {});
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"xl/workbook.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -2533,7 +2533,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testInvalidEntrySave)
|
||||
loadFromFile(u"validity.xlsx");
|
||||
|
||||
// .uno:Save modifies the original file, make a copy first
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
|
||||
@@ -2980,7 +2980,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testNoInvalidateOnSave)
|
||||
loadFromFile(u"invalidate-on-save.ods");
|
||||
|
||||
// .uno:Save modifies the original file, make a copy first
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
|
||||
@@ -3139,7 +3139,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testCellInvalidationDocWithExistingZo
|
||||
|
||||
{
|
||||
uno::ContextLayer aLayer(comphelper::NewFlagContext(u"IsLOKExport"_ustr));
|
||||
save(u"calc8"_ustr); // .ODS
|
||||
save(TestFilter::ODS); // .ODS
|
||||
}
|
||||
xmlDocUniquePtr pSettingsXml = parseExport(u"settings.xml"_ustr);
|
||||
// Multi-user export: don't save every user's view into the exported file
|
||||
@@ -3147,7 +3147,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testCellInvalidationDocWithExistingZo
|
||||
// Use view's logic (not technical) zoom level for export
|
||||
assertXPathContent(pSettingsXml, "//config:config-item[@config:name='ZoomValue'][1]", u"150");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr); // .XLSX
|
||||
save(TestFilter::XLSX); // .XLSX
|
||||
xmlDocUniquePtr pSheet1Xml = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
// Use view's logic (not technical) zoom level for export
|
||||
assertXPath(pSheet1Xml, "//x:sheetViews/x:sheetView", "zoomScale", u"150");
|
||||
@@ -3479,7 +3479,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testNumberFormatLocaleMultiUser)
|
||||
|
||||
// save and reopen
|
||||
// .uno:Save modifies the original file, make a copy first
|
||||
saveAndReload(u"Calc MS Excel 2007 VBA XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSM);
|
||||
|
||||
ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
|
||||
@@ -170,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testSplitPanes)
|
||||
{
|
||||
createDoc("split-panes.ods");
|
||||
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
|
||||
xmlDocUniquePtr pSettings = parseExport(u"settings.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSettings);
|
||||
@@ -190,7 +190,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testSplitPanesXLSX)
|
||||
{
|
||||
createDoc("split-panes.xlsx");
|
||||
|
||||
save(u"Calc Office Open XML"_ustr);
|
||||
save(TestFilter::XLSX);
|
||||
|
||||
xmlDocUniquePtr pSheet = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pSheet);
|
||||
|
||||
@@ -113,7 +113,7 @@ CPPUNIT_TEST_FIXTURE(SolverTest, testSingleModel)
|
||||
|
||||
// Save and reload the file
|
||||
pSettings->SaveSolverSettings();
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
pTable = pDoc->FetchTable(0);
|
||||
pSettings = pTable->GetSolverSettings();
|
||||
|
||||
@@ -98,7 +98,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testExternalReferences)
|
||||
insertStringToCell(u"D3"_ustr, u"FISHY");
|
||||
|
||||
// Save the document
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
|
||||
// Open a new document
|
||||
createScDoc();
|
||||
@@ -305,7 +305,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf103994)
|
||||
insertStringToCell(u"B1"_ustr, u"2");
|
||||
|
||||
// Save the document
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
|
||||
// Open a new document
|
||||
createScDoc();
|
||||
@@ -341,7 +341,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf113541)
|
||||
insertStringToCell(u"A1"_ustr, u"50");
|
||||
|
||||
// Save the document
|
||||
save(u"calc8"_ustr);
|
||||
save(TestFilter::ODS);
|
||||
|
||||
// Open a new document
|
||||
createScDoc();
|
||||
@@ -789,7 +789,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf124820)
|
||||
|
||||
dispatchCommand(mxComponent, u".uno:Strikeout"_ustr, {});
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
|
||||
vcl::Font aFont;
|
||||
@@ -1024,7 +1024,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf143896)
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(u"Test"_ustr, pDoc->GetString(ScAddress(0, 1999, 0)));
|
||||
|
||||
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::XLSX);
|
||||
pDoc = getScDoc();
|
||||
|
||||
// Without the fix in place, this test would have failed with
|
||||
@@ -1083,7 +1083,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf159046)
|
||||
dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
|
||||
|
||||
// Without the fix in place, this test would have crashed here
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
|
||||
pDoc = getScDoc();
|
||||
pDrawLayer = pDoc->GetDrawLayer();
|
||||
@@ -1130,7 +1130,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf144244)
|
||||
CPPUNIT_ASSERT_EQUAL(u"x"_ustr, pDoc->GetString(ScAddress(0, 0, 0)));
|
||||
|
||||
// Without the fix in place, this test would have crashed
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
|
||||
pDoc = getScDoc();
|
||||
|
||||
@@ -1206,7 +1206,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf100582)
|
||||
|
||||
dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
|
||||
|
||||
saveAndReload(u"MS Excel 97"_ustr);
|
||||
saveAndReload(TestFilter::XLS);
|
||||
pDoc = getScDoc();
|
||||
|
||||
OUString aFormula = pDoc->GetFormula(3, 10, 0);
|
||||
@@ -2503,7 +2503,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf143940)
|
||||
// Without the fix in place, this test would have crashed
|
||||
// FIXME: Error: uncompleted content model. expecting: <covered-table-cell>,<table-cell>
|
||||
skipValidation();
|
||||
saveAndReload(u"calc8"_ustr);
|
||||
saveAndReload(TestFilter::ODS);
|
||||
pDoc = getScDoc();
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill)
|
||||
{
|
||||
// Save the bugdoc to PPT.
|
||||
loadFromFile(u"custom-shape-bitmap-fill.pptx");
|
||||
saveAndReload(u"MS PowerPoint 97"_ustr);
|
||||
saveAndReload(TestFilter::PPT);
|
||||
|
||||
// Check if the bitmap shape was lost.
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
@@ -83,7 +83,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeExport)
|
||||
}
|
||||
|
||||
// Export to PPTX and load again:
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
// Verify that this color is not lost:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/theme/theme1.xml"_ustr);
|
||||
@@ -117,7 +117,7 @@ CPPUNIT_TEST_FIXTURE(Test, testLoopingFromAnimation)
|
||||
loadFromFile(u"video-loop.pptx");
|
||||
|
||||
// When exporting that to PPTX:
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Then make sure that the "infinite" repeat count is written:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -87,7 +87,7 @@ CPPUNIT_TEST_FIXTURE(FontEmbeddingTest, testRoundtripEmbeddedFontsPPTX)
|
||||
}
|
||||
|
||||
// Test Export
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Check the exported document has the font
|
||||
{
|
||||
@@ -123,7 +123,7 @@ CPPUNIT_TEST_FIXTURE(FontEmbeddingTest, testExportEmbeddedFontsPPTX)
|
||||
xProps->setPropertyValue(u"EmbedAsianScriptFonts"_ustr, uno::Any(false));
|
||||
xProps->setPropertyValue(u"EmbedComplexScriptFonts"_ustr, uno::Any(false));
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Check the exported document has the embedded fonts enabled and has entries
|
||||
{
|
||||
@@ -156,7 +156,7 @@ CPPUNIT_TEST_FIXTURE(FontEmbeddingTest, testTdf167214)
|
||||
createSdImpressDoc("pptx/tdf167214.pptx");
|
||||
verify();
|
||||
//Without the fix in place, it would crash at export time
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
verify();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
void testHTMLExport()
|
||||
{
|
||||
loadFromFile(u"HtmlExportTestDocument.odp");
|
||||
save(u"impress_html_Export"_ustr);
|
||||
save(TestFilter::HTML_IMPRESS);
|
||||
htmlDocUniquePtr htmlDoc = parseHtml(maTempFile);
|
||||
|
||||
assertXPath(htmlDoc, "/html", 1);
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
void testTdf154989()
|
||||
{
|
||||
loadFromFile(u"tdf154989.odg");
|
||||
save(u"XHTML Draw File"_ustr);
|
||||
save(TestFilter::XHTML_DRAW);
|
||||
xmlDocUniquePtr pXmlDoc = parseXml(maTempFile);
|
||||
|
||||
assertXPath(pXmlDoc, "/xhtml:html", 1);
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
void testSVGExportTextDecorations()
|
||||
{
|
||||
loadFromFile(u"svg-export-text-decorations.odp");
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(svgDoc);
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
void testSVGExportJavascriptURL()
|
||||
{
|
||||
loadFromFile(u"textbox-link-javascript.odp");
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(svgDoc);
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
void testSVGExportSlideCustomBackground()
|
||||
{
|
||||
loadFromFile(u"slide-custom-background.odp");
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(svgDoc);
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
void testSVGExportTextFieldsInMasterPage()
|
||||
{
|
||||
loadFromFile(u"text-fields.odp");
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(svgDoc);
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
void testSVGExportEmbeddedVideo()
|
||||
{
|
||||
loadFromFile(u"slide-video-thumbnail.odp");
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(svgDoc);
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
void testSVGExportSlideBitmapBackground()
|
||||
{
|
||||
loadFromFile(u"slide-bitmap-background.odp");
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(svgDoc);
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
void testSVGExportSlideTileBitmapBackground()
|
||||
{
|
||||
loadFromFile(u"slide-tile-background.odp");
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(svgDoc);
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
Application::SetSettings(aSettings);
|
||||
|
||||
loadFromFile(u"text-fields.odp");
|
||||
save(u"impress_svg_Export"_ustr);
|
||||
save(TestFilter::SVG_IMPRESS);
|
||||
|
||||
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(svgDoc);
|
||||
|
||||
@@ -256,7 +256,7 @@ void ShapeImportExportTest::testTextDistancesOOXML_Export()
|
||||
{
|
||||
createSdImpressDoc("TextDistancesInsets3.pptx");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -372,7 +372,7 @@ void ShapeImportExportTest::testTextDistancesOOXML_Export()
|
||||
void ShapeImportExportTest::testTextDistancesODP_OOXML_Export()
|
||||
{
|
||||
createSdImpressDoc("odp/tdf150966_hugeInset.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ void checkFontAttributes(const SdrTextObj* pObj, ItemValue nVal, sal_uInt32 nId)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf152335)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf152335.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocTheme = parseExport(u"ppt/theme/theme1.xml"_ustr);
|
||||
assertXPathChildren(
|
||||
@@ -87,7 +87,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf152335)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149803)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf149803.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp", "useBgFill", u"1");
|
||||
@@ -96,7 +96,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149803)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149311)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf149311.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
|
||||
|
||||
@@ -107,7 +107,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149311)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149128)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf149128.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "id",
|
||||
@@ -123,7 +123,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149128)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf66228)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf66228.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:spPr/a:prstGeom", "prst",
|
||||
@@ -133,7 +133,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf66228)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf147919)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf147919.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[1]/p:spPr/a:prstGeom", "prst",
|
||||
@@ -202,7 +202,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf147919)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf130165)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf146223.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/p:sld", "showMasterSp", u"0");
|
||||
@@ -211,7 +211,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf130165)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf124781)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf124781.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:r[2]/a:rPr", "baseline",
|
||||
@@ -225,7 +225,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf124781)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf168786_ppt_to_pptx_internal_link_to_nowhere)
|
||||
{
|
||||
createSdImpressDoc("ppt/tdf168786.ppt");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:nvSpPr/p:cNvPr/a:hlinkClick", "action",
|
||||
@@ -241,7 +241,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf168786_ppt_to_pptx_internal_link
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf144914)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf144616.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:nvSpPr/p:cNvPr/a:hlinkClick", "action",
|
||||
@@ -281,7 +281,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf144914)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf124232)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf141704.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick", "action",
|
||||
@@ -321,7 +321,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf124232)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf143624)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf143624.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presProps.xml"_ustr);
|
||||
|
||||
@@ -341,7 +341,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf142648)
|
||||
uno::Reference<container::XNamed> xNamed(xDrawPage, uno::UNO_QUERY_THROW);
|
||||
xNamed->setName(u"#Slide 1"_ustr);
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr);
|
||||
|
||||
@@ -352,7 +352,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf142648)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf47365)
|
||||
{
|
||||
createSdImpressDoc("pptx/loopNoPause.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presProps.xml"_ustr);
|
||||
|
||||
@@ -364,7 +364,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf47365)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf125071)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf125071.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presentation.xml"_ustr);
|
||||
|
||||
@@ -375,7 +375,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf125071)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf54037)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf54037.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
|
||||
@@ -393,7 +393,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf54037)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf127237)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf127237.pptx");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
CPPUNIT_ASSERT(pPage != nullptr);
|
||||
@@ -412,7 +412,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf127237)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc887230)
|
||||
{
|
||||
createSdImpressDoc("pptx/bnc887230.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -426,7 +426,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc887230)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc870233_1)
|
||||
{
|
||||
createSdImpressDoc("pptx/bnc870233_1.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -450,7 +450,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc870233_1)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc870233_2)
|
||||
{
|
||||
createSdImpressDoc("pptx/bnc870233_2.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -486,7 +486,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testN828390_4)
|
||||
bool bPassed = false;
|
||||
createSdImpressDoc("n828390_4.odp");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
{
|
||||
@@ -524,7 +524,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testN828390_5)
|
||||
{
|
||||
createSdImpressDoc("n828390_5.odp");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
{
|
||||
@@ -608,7 +608,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testPlaceholderFillAndOutlineExport)
|
||||
aLineStyle = xShpProps->getPropertyValue(u"LineStyle"_ustr);
|
||||
aLineColor = xShpProps->getPropertyValue(u"LineColor"_ustr);
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
@@ -635,7 +635,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo71961)
|
||||
{
|
||||
createSdImpressDoc("fdo71961.odp");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
// Export to .pptx changes all text frames to custom shape objects, which obey TextWordWrap property
|
||||
@@ -664,7 +664,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testN828390)
|
||||
bool bPassed = false;
|
||||
createSdImpressDoc("pptx/n828390.pptx");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
{
|
||||
@@ -687,7 +687,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testN828390)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc880763)
|
||||
{
|
||||
createSdImpressDoc("pptx/bnc880763.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -712,7 +712,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc880763)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc862510_5)
|
||||
{
|
||||
createSdImpressDoc("pptx/bnc862510_5.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -733,7 +733,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc862510_5)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc822347_EmptyBullet)
|
||||
{
|
||||
createSdImpressDoc("bnc822347_EmptyBullet.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
|
||||
CPPUNIT_ASSERT(pXImpressDocument);
|
||||
@@ -763,7 +763,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc822347_EmptyBullet)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo90607)
|
||||
{
|
||||
createSdImpressDoc("fdo90607.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage->GetObj(1));
|
||||
@@ -776,7 +776,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo90607)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo83751)
|
||||
{
|
||||
createSdImpressDoc("pptx/fdo83751.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(
|
||||
mxComponent, uno::UNO_QUERY);
|
||||
@@ -792,7 +792,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo83751)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo79731)
|
||||
{
|
||||
createSdImpressDoc("fdo79731.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
|
||||
CPPUNIT_ASSERT(pXImpressDocument);
|
||||
SdDrawDocument* pDoc = pXImpressDocument->GetDoc();
|
||||
@@ -805,7 +805,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellFillProperties)
|
||||
createSdImpressDoc("odp/Table_with_Cell_Fill.odp");
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -835,7 +835,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellFillProperties)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletStartNumber)
|
||||
{
|
||||
createSdImpressDoc("pptx/n90255.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage->GetObj(0));
|
||||
@@ -850,7 +850,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletStartNumber)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testLineStyle)
|
||||
{
|
||||
createSdImpressDoc("pptx/lineStyle.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
SdrObject const* pShape = pPage->GetObj(0);
|
||||
@@ -876,7 +876,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf134862)
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong paragraph WritingMode", text::WritingMode2::RL_TB,
|
||||
nWritingMode);
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
xShape.set(getShapeFromPage(0, 0));
|
||||
|
||||
@@ -893,7 +893,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testRightToLeftParaghraph)
|
||||
{
|
||||
createSdImpressDoc("pptx/rightToLeftParagraph.pptx");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
|
||||
// Get first paragraph
|
||||
@@ -910,7 +910,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTextboxWithHyperlink)
|
||||
{
|
||||
createSdImpressDoc("pptx/hyperlinktest.pptx");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
|
||||
// Get first paragraph
|
||||
@@ -934,7 +934,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf136911)
|
||||
{
|
||||
createSdImpressDoc("ppt/tdf136911.ppt");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
|
||||
// Get second paragraph
|
||||
@@ -958,7 +958,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletColor)
|
||||
{
|
||||
createSdImpressDoc("pptx/bulletColor.pptx");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -975,7 +975,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletColor)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletCharAndFont)
|
||||
{
|
||||
createSdImpressDoc("odp/bulletCharAndFont.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
|
||||
@@ -1004,7 +1004,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletCharAndFont)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletMarginAndIndentation)
|
||||
{
|
||||
createSdImpressDoc("pptx/bulletMarginAndIndent.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -1026,7 +1026,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testParaMarginAndindentation)
|
||||
{
|
||||
createSdImpressDoc("pptx/paraMarginAndIndentation.pptx");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
|
||||
// Get first paragraph
|
||||
@@ -1045,7 +1045,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testParaMarginAndindentation)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCellLeftAndRightMargin)
|
||||
{
|
||||
createSdImpressDoc("pptx/n90223.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
sal_Int32 nLeftMargin, nRightMargin;
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
@@ -1083,7 +1083,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCellLeftAndRightMargin)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testMergedCells)
|
||||
{
|
||||
createSdImpressDoc("odp/cellspan.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
sdr::table::SdrTableObj* pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
|
||||
@@ -1100,7 +1100,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testMergedCells)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellBorder)
|
||||
{
|
||||
createSdImpressDoc("pptx/n90190.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -1144,7 +1144,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellBorder)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf111884)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf111884.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
SdrObject const* pShape = pPage->GetObj(2);
|
||||
@@ -1158,7 +1158,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf112633)
|
||||
{
|
||||
// Load document and export it to a temporary file
|
||||
createSdImpressDoc("pptx/tdf112633.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
|
||||
@@ -1188,7 +1188,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf112633)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128952)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf128952.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1201,7 +1201,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128952)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf127090)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf127090.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1212,7 +1212,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCustomXml)
|
||||
{
|
||||
// Load document and export it to a temporary file
|
||||
createSdImpressDoc("pptx/customxml.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"customXml/item1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
@@ -1233,7 +1233,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf94238)
|
||||
{
|
||||
// Load document and export it to a temporary file.
|
||||
createSdImpressDoc("pptx/tdf94238.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xDoc.is());
|
||||
|
||||
@@ -1276,7 +1276,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testPictureTransparency)
|
||||
{
|
||||
// Load document and export it to a temporary file.
|
||||
createSdImpressDoc("odp/image_transparency.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xDoc.is());
|
||||
|
||||
@@ -1294,7 +1294,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testPictureTransparency)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf125554)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf125554.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape = getShapeFromPage(0, 0);
|
||||
uno::Any aFillTransparenceGradientName
|
||||
@@ -1323,7 +1323,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testRoundtripOwnLineStyles)
|
||||
}
|
||||
|
||||
// Save to pptx, reload and compare the LineDash values
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDocpptx(mxComponent, uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xDocpptx.is());
|
||||
uno::Reference<drawing::XDrawPage> xPagepptx(xDocpptx->getDrawPages()->getByIndex(0),
|
||||
@@ -1350,7 +1350,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testRoundtripPrstDash)
|
||||
{
|
||||
// load and save document, compare prstDash values in saved document with original.
|
||||
createSdImpressDoc("pptx/presetDashDot.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
const OUString sOriginal[]
|
||||
= { u"dash"_ustr, u"dashDot"_ustr, u"dot"_ustr, u"lgDash"_ustr,
|
||||
@@ -1388,7 +1388,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testDashOnHairline)
|
||||
{
|
||||
// load and save document, make sure the custDash has 11 child elements.
|
||||
createSdImpressDoc("odp/tdf127267DashOnHairline.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:ln/a:custDash/a:ds", 11);
|
||||
@@ -1399,13 +1399,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testNarrationNonMediaShape)
|
||||
createSdImpressDoc("pptx/narration-non-media-shape.pptx");
|
||||
// Without the accompanying fix in place, this test would have failed,
|
||||
// beans::UnknownPropertyException was thrown.
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCustomshapeBitmapfillSrcrect)
|
||||
{
|
||||
createSdImpressDoc("pptx/customshape-bitmapfill-srcrect.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1436,7 +1436,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCustomshapeBitmapfillSrcrect)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf100348FontworkBitmapFill)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf100348_FontworkBitmapFill.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Make sure the fontwork shape has a blip bitmap fill and a colored outline.
|
||||
// Without the patch, fill and outline were black.
|
||||
@@ -1449,7 +1449,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf100348FontworkBitmapFill)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf100348FontworkGradientGlow)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf100348_FontworkGradientGlow.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Make sure the fontwork shape has a gradient fill and a colored glow.
|
||||
// Without the patch, fill was black and no glow applied.
|
||||
@@ -1464,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf100348FontworkGradientGlow)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345FullTransparentGradient)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf128345_FullTransparentGradient.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Make sure the shape has no fill. Without the patch, fill was solid red.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -1474,7 +1474,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345FullTransparentGradient)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientLinear)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf128345_GradientLinear.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Make sure the shape has a lin fill. Without the patch, fill was solid red.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -1494,7 +1494,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientLinear)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientRadial)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf128345_GradientRadial.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Make sure the shape has transparency. In OOXML alpha means 'opacity' with default
|
||||
// 100000 for full opak, so only the full transparency with val 0 should be written.
|
||||
@@ -1512,7 +1512,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientAxial)
|
||||
// Without the patch, symmetric linear gradient with full transparence outside and
|
||||
// full opak in the middle were imported as full transparent.
|
||||
createSdImpressDoc("odp/tdf128345_GradientAxial.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShapePropSet(getShapeFromPage(0, 0));
|
||||
|
||||
awt::Gradient2 aTransparenceGradient;
|
||||
@@ -1535,7 +1535,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientAxial)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf134969TransparencyOnColorGradient)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf134969_TransparencyOnColorGradient.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Make sure the shape has a transparency in gradient stops.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -1550,7 +1550,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf134969TransparencyOnColorGradien
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testArcTo)
|
||||
{
|
||||
createSdImpressDoc("pptx/arc-validiert.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
static constexpr const char* sPath("//a:custGeom/a:pathLst/a:path/a:arcTo");
|
||||
@@ -1563,7 +1563,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testArcTo)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testNarrationMimeType)
|
||||
{
|
||||
createSdImpressDoc("pptx/narration.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr);
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - Expected: audio/mp4
|
||||
@@ -1626,7 +1626,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testNarrationMimeType)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf150316)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf150316.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:p/a:pPr", "indent", u"-343080");
|
||||
@@ -1635,7 +1635,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf150316)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf140865Wordart3D)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf140865Wordart3D.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
// without the fix in place a:sp3d was lost on round trip, and so extrusion was lost.
|
||||
@@ -1655,7 +1655,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf140865Wordart3D)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf124457)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf124457.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1673,7 +1673,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf124457)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf143126)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf143126.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presProps.xml"_ustr);
|
||||
|
||||
@@ -1685,7 +1685,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf143126)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf143129)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf143129.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presProps.xml"_ustr);
|
||||
|
||||
@@ -1696,7 +1696,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf143129)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf118045)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf118045.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr/a:lnSpc/a:spcPct", "val",
|
||||
@@ -1706,7 +1706,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf118045)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf137675)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf137675.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path", "fill",
|
||||
@@ -1716,7 +1716,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf137675)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf151134)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf151134.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr", "lIns", u"91440");
|
||||
|
||||
@@ -85,7 +85,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testRepeatBitmapMode)
|
||||
if (!IsDefaultDPI())
|
||||
return;
|
||||
createSdImpressDoc("odp/repeatBitmapMode.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile", "tx", u"1269669");
|
||||
@@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testRepeatBitmapMode)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf153107)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf153107.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// placeholder
|
||||
xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -164,7 +164,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf153107)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf142291)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdt142291.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent,
|
||||
@@ -192,7 +192,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf142291)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf151492)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf151492.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn",
|
||||
@@ -202,7 +202,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf151492)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf149697)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf149697.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent,
|
||||
@@ -220,7 +220,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf149697)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf149126)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf149126.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom", "prst",
|
||||
@@ -230,7 +230,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf149126)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf131905)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf131905.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(
|
||||
@@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf131905)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf93883)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf93883.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
|
||||
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
|
||||
@@ -263,7 +263,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testBnc822341)
|
||||
{
|
||||
// Check import / export of embedded text document
|
||||
createSdImpressDoc("odp/bnc822341.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Export an LO specific ole object (imported from an ODP document)
|
||||
{
|
||||
@@ -291,7 +291,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testBnc822341)
|
||||
CPPUNIT_ASSERT_EQUAL(SdrObjKind::OLE2, pObj->GetObjIdentifier());
|
||||
}
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Export an MS specific ole object (imported from a PPTX document)
|
||||
{
|
||||
@@ -324,7 +324,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testMathObject)
|
||||
{
|
||||
// Check import / export of math object
|
||||
createSdImpressDoc("odp/math.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Export an LO specific ole object (imported from an ODP document)
|
||||
{
|
||||
@@ -342,7 +342,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testMathObject)
|
||||
CPPUNIT_ASSERT_EQUAL(SdrObjKind::OLE2, pObj->GetObjIdentifier());
|
||||
}
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Export an MS specific ole object (imported from a PPTX document)
|
||||
{
|
||||
@@ -365,7 +365,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testMathExportNonBMP)
|
||||
{
|
||||
// Check import / export of math object
|
||||
createSdImpressDoc("odp/Math.fodp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Export an MS specific ole object
|
||||
{
|
||||
@@ -387,7 +387,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testMathExportNonBMP)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf119015)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf119015.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -407,7 +407,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf119015)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf123090)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf123090.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -431,7 +431,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf123090)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf126324)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf126324.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xPage.is());
|
||||
@@ -462,7 +462,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf119187)
|
||||
= rProperties.GetItem(SDRATTR_TEXT_VERTADJUST);
|
||||
const SdrTextVertAdjust eTVA = rSdrTextVertAdjustItem.GetValue();
|
||||
CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_TOP, eTVA);
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf132472)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf80224)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf80224.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
|
||||
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
|
||||
@@ -522,7 +522,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf91378)
|
||||
OUString propValue;
|
||||
xUDProps->getPropertyValue(u"Testing"_ustr) >>= propValue;
|
||||
CPPUNIT_ASSERT(propValue.isEmpty());
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ static bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> co
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testExportTransitionsPPTX)
|
||||
{
|
||||
createSdImpressDoc("AllTransitions.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
|
||||
// WIPE TRANSITIONS
|
||||
@@ -728,7 +728,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPresetShapesExport)
|
||||
"val 3770",
|
||||
};
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocCT = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
static constexpr OStringLiteral sT("_T_");
|
||||
@@ -772,7 +772,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf92527)
|
||||
uno::Reference<beans::XPropertySet> xPropertySet1(xShape1, uno::UNO_QUERY);
|
||||
xPropertySet1->setPropertyValue(u"CustomShapeGeometry"_ustr, uno::Any(aShapeGeometry));
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc2(mxComponent, uno::UNO_QUERY_THROW);
|
||||
uno::Reference<drawing::XDrawPage> xPage2(xDoc2->getDrawPages()->getByIndex(0),
|
||||
@@ -852,7 +852,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testDatetimeFieldNumberFormat)
|
||||
{
|
||||
createSdImpressDoc("odp/numfmt.odp");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
for (sal_uInt16 i = 0; i <= 8; ++i)
|
||||
{
|
||||
@@ -864,7 +864,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testDatetimeFieldNumberFormatPPTX)
|
||||
{
|
||||
createSdImpressDoc("pptx/numfmt.pptx");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
for (sal_uInt16 i = 0; i <= 8; ++i)
|
||||
{
|
||||
@@ -876,7 +876,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSlideNumberField)
|
||||
{
|
||||
createSdImpressDoc("odp/slidenum_field.odp");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
|
||||
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
|
||||
@@ -886,7 +886,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSlideNumberFieldPPTX)
|
||||
{
|
||||
createSdImpressDoc("pptx/slidenum_field.pptx");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
|
||||
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
|
||||
@@ -896,7 +896,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSlideCountField)
|
||||
{
|
||||
createSdImpressDoc("odp/slidecount_field.odp");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
|
||||
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
|
||||
@@ -906,7 +906,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSlideNameField)
|
||||
{
|
||||
createSdImpressDoc("odp/slidename_field.odp");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
|
||||
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
|
||||
@@ -916,7 +916,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testExtFileField)
|
||||
{
|
||||
createSdImpressDoc("odp/extfile_field.odp");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
for (sal_uInt16 i = 0; i <= 3; ++i)
|
||||
{
|
||||
@@ -947,7 +947,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAuthorField)
|
||||
{
|
||||
createSdImpressDoc("odp/author_field.odp");
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
|
||||
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
|
||||
@@ -956,7 +956,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAuthorField)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf99224)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf99224.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
|
||||
// This was 0: the image with text was lost on export.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xPage->getCount());
|
||||
@@ -965,7 +965,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf99224)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf92076)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf92076.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xPage->getCount());
|
||||
}
|
||||
@@ -973,7 +973,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf92076)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf59046)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf59046.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path", 1);
|
||||
}
|
||||
@@ -981,7 +981,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf59046)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf133502)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf133502.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/comments/comment1.xml"_ustr);
|
||||
|
||||
// Without the fix to tdf#168754 the special characters would cause errors during parsing
|
||||
@@ -997,7 +997,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf105739)
|
||||
{
|
||||
// Gradient was lost during saving to ODP
|
||||
createSdImpressDoc("pptx/tdf105739.pptx");
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
|
||||
uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
|
||||
uno::Any aAny = xPropSet->getPropertyValue(u"Background"_ustr);
|
||||
@@ -1033,7 +1033,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPageBitmapWithTransparency)
|
||||
{
|
||||
createSdImpressDoc("pptx/page_transparent_bitmap.pptx");
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly one page", static_cast<sal_Int32>(1),
|
||||
xDoc->getDrawPages()->getCount());
|
||||
@@ -1056,7 +1056,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPageBitmapWithTransparency)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPptmContentType)
|
||||
{
|
||||
createSdImpressDoc("pptm/macro.pptm");
|
||||
save(u"Impress MS PowerPoint 2007 XML VBA"_ustr);
|
||||
save(TestFilter::PPTM);
|
||||
|
||||
// Assert that the content type is the one of PPTM
|
||||
xmlDocUniquePtr pXmlContentType = parseExport(u"[Content_Types].xml"_ustr);
|
||||
@@ -1068,7 +1068,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPptmContentType)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111798)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf111798.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
const std::u16string_view data[][11]
|
||||
@@ -1106,7 +1106,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111798)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPptmVBAStream)
|
||||
{
|
||||
createSdImpressDoc("pptm/macro.pptm");
|
||||
save(u"Impress MS PowerPoint 2007 XML VBA"_ustr);
|
||||
save(TestFilter::PPTM);
|
||||
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
|
||||
@@ -1118,7 +1118,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPptmVBAStream)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111863)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf111863.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// check that transition attribute didn't change from 'out' to 'in'
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -1131,7 +1131,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111863)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111518)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf111518.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
OUString sActual = getXPath(pXmlDocRels,
|
||||
@@ -1145,7 +1145,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111518)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf100387)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf100387.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn",
|
||||
@@ -1197,7 +1197,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf100387)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testClosingShapesAndLineCaps)
|
||||
{
|
||||
createSdImpressDoc("odp/closed-shapes.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent,
|
||||
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo/a:pt",
|
||||
@@ -1244,7 +1244,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testClosingShapesAndLineCaps)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testRotateFlip)
|
||||
{
|
||||
createSdImpressDoc("odp/rotate_flip.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
const std::u16string_view data[][4] = { // flipH flipV x y
|
||||
@@ -1291,7 +1291,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testRotateFlip)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106867)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf106867.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -1324,7 +1324,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106867)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112280)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf112280.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// check the animRot value
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -1337,7 +1337,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112280)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112088)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf112088.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// check gradient stops
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -1348,7 +1348,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112088)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112333)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf112333.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1396,7 +1396,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112552)
|
||||
{
|
||||
// Background fill was not displayed, but it was because of the wrong geometry
|
||||
createSdImpressDoc("odp/tdf112552.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path",
|
||||
@@ -1415,7 +1415,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112557)
|
||||
{
|
||||
// Subtitle shape should be skipped by export.
|
||||
createSdImpressDoc("odp/tdf112557.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sldMaster/p:cSld/p:spTree/p:sp", 2); // title and object
|
||||
@@ -1424,7 +1424,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112557)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf128049)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf128049.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:custGeom", 0);
|
||||
@@ -1439,7 +1439,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf128049)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106026)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf106026.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlMasterContent = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr);
|
||||
assertXPath(pXmlMasterContent,
|
||||
@@ -1479,7 +1479,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106026)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112334)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf112334.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1493,7 +1493,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112334)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112089)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf112089.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1510,7 +1510,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112089)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112086)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf112086.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1544,7 +1544,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112086)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112647)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf112647.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xShape));
|
||||
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
|
||||
@@ -1558,7 +1558,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112647)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testGroupRotation)
|
||||
{
|
||||
createSdImpressDoc("odp/group_rotation.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPathNoAttribute(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:grpSpPr/a:xfrm",
|
||||
@@ -1572,7 +1572,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testGroupRotation)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf104788)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf104788.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide6.xml"_ustr);
|
||||
|
||||
@@ -1602,7 +1602,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSmartartRotation2)
|
||||
uno::Sequence<beans::PropertyValue> aInteropGrabBag;
|
||||
xShape->setPropertyValue(u"InteropGrabBag"_ustr, uno::Any(aInteropGrabBag));
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPathContent(pXmlDocContent,
|
||||
@@ -1622,7 +1622,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSmartartRotation2)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf91999_rotateShape)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf91999_rotateShape.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:nvSpPr/p:cNvPr", "name",
|
||||
@@ -1639,7 +1639,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf91999_rotateShape)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf114845_rotateShape)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf114845_rotateShape.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:nvCxnSpPr/p:cNvPr", "name",
|
||||
@@ -1658,7 +1658,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf114845_rotateShape)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testGroupsPosition)
|
||||
{
|
||||
createSdImpressDoc("pptx/group.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp[1]/p:sp[1]/p:spPr/a:xfrm/a:off",
|
||||
@@ -1674,7 +1674,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testGroupsPosition)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testGroupsRotatedPosition)
|
||||
{
|
||||
createSdImpressDoc("pptx/group-rot.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "x",
|
||||
@@ -1686,7 +1686,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testGroupsRotatedPosition)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAccentColor)
|
||||
{
|
||||
createSdImpressDoc("pptx/accent-color.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp/p:style/a:fillRef/a:schemeClr", "val",
|
||||
@@ -1712,7 +1712,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAccentColor)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testThemeColors)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf84205.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocTheme2 = parseExport(u"ppt/theme/theme1.xml"_ustr);
|
||||
assertXPathInsensitive(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr",
|
||||
@@ -1725,7 +1725,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testThemeColors)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111785)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf111785.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1740,7 +1740,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111785)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf118825)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf118825-motionpath.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
CPPUNIT_ASSERT_MOTIONPATH(
|
||||
@@ -1800,7 +1800,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTextColumns_tdf140852)
|
||||
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(1000)),
|
||||
xColProps->getPropertyValue(u"AutomaticDistance"_ustr));
|
||||
}
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
{
|
||||
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
|
||||
@@ -1846,7 +1846,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTextColumns_3columns)
|
||||
CPPUNIT_ASSERT_LESS(100.0, fFontScale);
|
||||
}
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
{
|
||||
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
|
||||
@@ -1876,7 +1876,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf59323_slideFooters)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf59323.pptx");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xDoc->getDrawPages()->getCount());
|
||||
@@ -1918,7 +1918,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf53970)
|
||||
// Embedded media file
|
||||
{
|
||||
createSdImpressDoc("odp/tdf53970.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
// Without fix in place, the media shape was lost on export.
|
||||
CPPUNIT_ASSERT(getPage(0)->hasElements());
|
||||
@@ -1927,7 +1927,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf53970)
|
||||
// Linked media file
|
||||
{
|
||||
createSdImpressDoc("odp/tdf53970_linked.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlRels);
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf165670)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf165670.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -55,7 +55,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf165670)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf165262)
|
||||
{
|
||||
createSdImpressDoc("ppt/tdf165262.ppt");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[1]/p:spPr/a:custGeom");
|
||||
@@ -78,7 +78,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf165262)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf164775_ConnectorShape)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf164775.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "idx",
|
||||
@@ -90,7 +90,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf164775_ConnectorShape)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf153105)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf153105.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:stretch/a:fillRect", "l",
|
||||
@@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf153105)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf92222)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf92222.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocTheme = parseExport(u"ppt/theme/theme1.xml"_ustr);
|
||||
assertXPath(pXmlDocTheme, "/a:theme/a:themeElements/a:fmtScheme/a:lnStyleLst/a:ln[1]", "w",
|
||||
@@ -120,7 +120,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf92222)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf129430)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf129430.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:pPr/a:lnSpc/a:spcPct",
|
||||
@@ -130,7 +130,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf129430)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf114848)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf114848.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocTheme1 = parseExport(u"ppt/theme/theme1.xml"_ustr);
|
||||
assertXPathInsensitive(pXmlDocTheme1, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr",
|
||||
@@ -140,7 +140,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf114848)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf147586)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf147586.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// Without the fix in place, this test would have failed with
|
||||
@@ -157,7 +157,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf147586)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf68759)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf68759.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:spPr/a:xfrm/a:off", "x",
|
||||
@@ -180,7 +180,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf68759)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf127901)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf127901.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:lum", "bright",
|
||||
@@ -199,7 +199,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf127901)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf48735)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf48735.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:srcRect", "b",
|
||||
@@ -215,7 +215,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf48735)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf90626)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf90626.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr/a:buSzPct",
|
||||
@@ -231,7 +231,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf90626)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf107608)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf107608.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_SET_THROW);
|
||||
@@ -254,7 +254,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf111786)
|
||||
// Export line transparency with the color
|
||||
|
||||
createSdImpressDoc("pptx/tdf111786.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_SET_THROW);
|
||||
@@ -271,7 +271,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf111786)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testFontScale)
|
||||
{
|
||||
createSdImpressDoc("pptx/font-scale.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
// Rounding errors possible, approximate value (+/- 1%)
|
||||
@@ -283,7 +283,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testFontScale)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testShapeAutofitPPTX)
|
||||
{
|
||||
createSdImpressDoc("pptx/testShapeAutofit.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDocContent);
|
||||
|
||||
@@ -296,7 +296,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testShapeAutofitPPTX)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testLegacyShapeAutofitPPTX)
|
||||
{
|
||||
createSdImpressDoc("odp/testLegacyShapeAutofit.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDocContent);
|
||||
|
||||
@@ -311,7 +311,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testLegacyShapeAutofitPPTX)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115394)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf115394.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
|
||||
CPPUNIT_ASSERT(pXImpressDocument);
|
||||
@@ -347,7 +347,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115394)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115394Zero)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf115394-zero.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
double fTransitionDuration;
|
||||
|
||||
SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
|
||||
@@ -361,7 +361,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115394Zero)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115005)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf115005.odp");
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
// additional checks of the output file
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
@@ -394,7 +394,7 @@ int SdOOXMLExportTest3::testTdf115005_FallBack_Images(bool bAddReplacementImages
|
||||
}
|
||||
|
||||
// save the file with already set options
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
// additional checks of the output file
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
@@ -432,7 +432,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115005_FallBack_Images_Off)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118806)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf118806.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "//p:animMotion", "origin", u"layout");
|
||||
@@ -441,7 +441,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118806)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf130058)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf130058.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
bool bHasShadow = false;
|
||||
@@ -471,7 +471,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf111789)
|
||||
// Shadow properties were not exported for text shapes.
|
||||
|
||||
createSdImpressDoc("pptx/tdf111789.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// First text shape has some shadow
|
||||
{
|
||||
@@ -510,7 +510,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf111789)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf145162)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf145162.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buNone");
|
||||
@@ -522,7 +522,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testZeroIndentExport)
|
||||
// Load the bugdoc and save to pptx then.
|
||||
|
||||
createSdImpressDoc("odp/testZeroIndent.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
// There are 3 slides, get them
|
||||
xmlDocUniquePtr pSlide1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
xmlDocUniquePtr pSlide2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
|
||||
@@ -553,7 +553,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testZeroIndentExport)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf100348_convert_Fontwork2TextWarp)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf100348_Fontwork2TextWarp.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Resulting pptx has to contain the TextWarp shape
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -606,7 +606,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf100348_convert_Fontwork2TextWarp
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf125573_FontWorkScaleX)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf125573_FontWorkScaleX.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Error was, that attribute 'fromWordArt' was ignored
|
||||
// ensure, resulting pptx has fromWordArt="1" on textArchDown shape
|
||||
@@ -640,7 +640,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99497_keepAppearanceOfCircleKind
|
||||
// Adjustment values need to exist and their values need to correspond to the
|
||||
// original angles. Shape 'arc' needs to be unfilled.
|
||||
createSdImpressDoc("odp/tdf99497_CircleKind.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// slide 1 45° -> adj1 = 20493903, 270° -> adj2 = 5400000, <a:noFill/> exists
|
||||
xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -671,7 +671,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99497_keepAppearanceOfCircleKind
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104792)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf104792-smart-art-animation.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent,
|
||||
@@ -684,7 +684,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104792)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf90627)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf90627.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// Don't export empty endCondLst without cond.
|
||||
@@ -698,7 +698,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf90627)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104786)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf104786.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide2.xml"_ustr);
|
||||
// Don't export empty 'to'
|
||||
@@ -712,7 +712,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104786)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118783)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf118783.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
OUString sAttributeName
|
||||
@@ -723,7 +723,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118783)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104789)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf104789.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
OUString sAttributeName = getXPathContent(
|
||||
@@ -740,7 +740,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testOpenDocumentAsReadOnly)
|
||||
CPPUNIT_ASSERT(pXImpressDocument);
|
||||
sd::DrawDocShell* pDocShell = pXImpressDocument->GetDocShell();
|
||||
CPPUNIT_ASSERT(pDocShell->IsSecurityOptOpenReadOnly());
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
|
||||
CPPUNIT_ASSERT(pXImpressDocument);
|
||||
pDocShell = pXImpressDocument->GetDocShell();
|
||||
@@ -750,7 +750,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testOpenDocumentAsReadOnly)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118835)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf118835.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "(//p:animClr)[1]", "clrSpc", u"rgb");
|
||||
@@ -775,7 +775,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118835)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118768)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf118768-brake.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "//p:anim[1]", "from", u"(-#ppt_w/2)");
|
||||
@@ -792,7 +792,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118768)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118836)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf118836.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "//p:animScale/p:by", "x", u"250000");
|
||||
@@ -881,7 +881,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf116350TextEffects)
|
||||
CPPUNIT_ASSERT_EQUAL(true, bScaleX);
|
||||
|
||||
// Export
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "//p:sp[1]/p:txBody/a:bodyPr/a:prstTxWarp", "prst", u"textArchUp");
|
||||
@@ -892,7 +892,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf116350TextEffects)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf128096)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf128096.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPathInsensitive(
|
||||
@@ -910,7 +910,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf128096)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf120573)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf120573.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:nvPr/a:audioFile", 1);
|
||||
@@ -932,7 +932,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf148478_transitionMusic)
|
||||
// This original file does not open cleanly in MS PowerPoint
|
||||
// because the file name has a Unicode character: ../media/Cortázar.wav.
|
||||
createSdImpressDoc("pptx/tdf148478_transitionMusic.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// an MD5-based ascii replacement was substituted for the unicode name. This now opens in MS PP.
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
@@ -958,7 +958,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf148478_transitionMusic)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf119118)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf119118.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent, "//p:iterate", "type", u"lt");
|
||||
assertXPath(pXmlDocContent, "//p:tmAbs", "val", u"200");
|
||||
@@ -967,7 +967,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf119118)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99213)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf99213-target-missing.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
// Number of nodes with p:attrNameLst was 3, including one that missed tgtEl
|
||||
assertXPath(pXmlDocContent, "//p:attrNameLst", 2);
|
||||
@@ -981,7 +981,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testPotxExport)
|
||||
createSdImpressDoc();
|
||||
|
||||
// Export as a POTM template
|
||||
save(u"Impress Office Open XML Template"_ustr);
|
||||
save(TestFilter::POTX);
|
||||
|
||||
// Load and check content type
|
||||
xmlDocUniquePtr pContentTypes = parseExport(u"[Content_Types].xml"_ustr);
|
||||
@@ -995,7 +995,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testPotxExport)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf44223)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf44223.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
std::unique_ptr<SvStream> const pStream1(
|
||||
parseExportStream(maTempFile.GetURL(), u"ppt/media/audio1.wav"_ustr));
|
||||
@@ -1037,7 +1037,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf44223)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf135843)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf135843_export.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
static constexpr OString sPathStart(
|
||||
@@ -1061,7 +1061,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf135843)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testNegativeTimeAnimateValue)
|
||||
{
|
||||
createSdImpressDoc("ppt/novell6655408.ppt");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf160591)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf160591.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Char scheme color
|
||||
xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -67,7 +67,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf160591)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testSmartArtPreserve)
|
||||
{
|
||||
createSdImpressDoc("pptx/smartart-preserve.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr");
|
||||
@@ -118,7 +118,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testSmartArtPreserve)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf168755_anim_on_SmartArt)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf168755_anim_on_SmartArt.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -151,7 +151,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125346)
|
||||
// There are two themes in the test document, make sure we use the right theme
|
||||
|
||||
createSdImpressDoc("pptx/tdf125346.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_SET_THROW);
|
||||
@@ -171,7 +171,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125346_2)
|
||||
// Test more slides with different themes
|
||||
|
||||
createSdImpressDoc("pptx/tdf125346_2.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
@@ -224,7 +224,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125360)
|
||||
|
||||
xShape->setPropertyValue(u"FillTransparence"_ustr, uno::Any(static_cast<sal_Int32>(23)));
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xShape.set(getShapeFromPage(0, 0));
|
||||
|
||||
@@ -244,7 +244,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125360_1)
|
||||
|
||||
xShape->setPropertyValue(u"FillTransparence"_ustr, uno::Any(static_cast<sal_Int32>(23)));
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xShape.set(getShapeFromPage(0, 0));
|
||||
|
||||
@@ -268,7 +268,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125360_2)
|
||||
|
||||
xShape->setPropertyValue(u"FillTransparence"_ustr, uno::Any(static_cast<sal_Int32>(23)));
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xShape.set(getShapeFromPage(0, 0));
|
||||
|
||||
@@ -280,7 +280,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125360_2)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125551)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf125551.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XShape> xShapeBg(xGroupShape->getByIndex(0), uno::UNO_QUERY);
|
||||
@@ -294,7 +294,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125551)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf136830)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf136830.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Without the fix in place, the X position of the shapes would have been 0
|
||||
uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
|
||||
@@ -315,7 +315,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf136830)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf126234)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf126234.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// check relative size of the bullet, 400% is a legitimate value for MS Office document
|
||||
// Without a fix, it will fail to set the size correctly
|
||||
@@ -331,7 +331,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf126234)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf126741)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf126741.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// dash dot dot line style import fix
|
||||
// The original fixed values are replaced with the percent values, because
|
||||
@@ -354,7 +354,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf126741)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf127372)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf127372.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
awt::Gradient2 aTransparenceGradient;
|
||||
xShape->getPropertyValue(u"FillTransparenceGradient"_ustr) >>= aTransparenceGradient;
|
||||
@@ -373,7 +373,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf127372)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf127379)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf127379.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDoc->getDrawPages()->getCount());
|
||||
|
||||
@@ -406,7 +406,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf127379)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf98603)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf98603.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
|
||||
uno::Reference<text::XTextRange> xRun(getRunFromParagraph(0, xParagraph));
|
||||
@@ -420,7 +420,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf98603)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf128213)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf128213.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPathNoAttribute(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm", "rot");
|
||||
@@ -429,7 +429,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf128213)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf79082)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf79082.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocContent,
|
||||
@@ -473,7 +473,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf129372)
|
||||
//Without the fix in place, it would crash at import time
|
||||
|
||||
createSdImpressDoc("pptx/tdf129372.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
const SdrObject* pObj = pPage->GetObj(0);
|
||||
@@ -484,7 +484,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf129372)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeGlowEffect)
|
||||
{
|
||||
createSdImpressDoc("pptx/shape-glow-effect.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
sal_Int32 nRadius = -1;
|
||||
xShape->getPropertyValue(u"GlowEffectRadius"_ustr) >>= nRadius;
|
||||
@@ -500,7 +500,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeGlowEffect)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeTextGlowEffect)
|
||||
{
|
||||
createSdImpressDoc("pptx/shape-text-glow-effect.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
sal_Int32 nRadius = -1;
|
||||
xShape->getPropertyValue(u"GlowTextEffectRadius"_ustr) >>= nRadius;
|
||||
@@ -533,7 +533,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testUnderline)
|
||||
xPropSet->getPropertyValue(u"CharUnderline"_ustr) >>= nUnderline;
|
||||
CPPUNIT_ASSERT_EQUAL(awt::FontUnderline::DOUBLE, nUnderline);
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
xShape.set(getShapeFromPage(0, 0));
|
||||
xParagraph.set(getParagraphFromShape(0, xShape));
|
||||
@@ -553,7 +553,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testUnderline)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf119087)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf119087.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
// This would fail both on export validation, and reloading the saved pptx file.
|
||||
|
||||
// Get first paragraph of the text
|
||||
@@ -571,7 +571,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf119087)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf131554)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf131554.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XShape> xShape(getShapeFromPage(1, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5622), xShape->getPosition().X);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(13251), xShape->getPosition().Y);
|
||||
@@ -580,7 +580,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf131554)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf132282)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf132282.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XShape> xShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
|
||||
// Without the fix in place, the position would be 0,0, height = 1 and width = 1
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1736), xShape->getPosition().X);
|
||||
@@ -592,7 +592,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf132282)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf132201EffectOrder)
|
||||
{
|
||||
createSdImpressDoc("pptx/effectOrder.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPathChildren(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:effectLst", 2);
|
||||
// The relative order of effects is important: glow must be before shadow
|
||||
@@ -607,7 +607,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf132201EffectOrder)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeSoftEdgeEffect)
|
||||
{
|
||||
createSdImpressDoc("pptx/shape-soft-edges.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
auto xShapeProps(getShapeFromPage(0, 0));
|
||||
sal_Int32 nRadius = -1;
|
||||
xShapeProps->getPropertyValue(u"SoftEdgeRadius"_ustr) >>= nRadius;
|
||||
@@ -621,7 +621,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeSoftEdgeEffect)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeShadowBlurEffect)
|
||||
{
|
||||
createSdImpressDoc("pptx/shape-blur-effect.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
bool bHasShadow = false;
|
||||
xShape->getPropertyValue(u"Shadow"_ustr) >>= bHasShadow;
|
||||
@@ -634,7 +634,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeShadowBlurEffect)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf119223)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf119223.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDocRels, "//p:cNvPr[@name='SomeCustomShape']");
|
||||
@@ -655,7 +655,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf119223)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf128213ShapeRot)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf128213-shaperot.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -670,7 +670,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125560_textDeflate)
|
||||
createSdImpressDoc("pptx/ShapePlusImage.pptx");
|
||||
|
||||
// This problem did not affect the pptx export, only the ODP so assert that
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDocRels,
|
||||
@@ -684,7 +684,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125560_textInflateTop)
|
||||
createSdImpressDoc("pptx/ShapeTextInflateTop.pptx");
|
||||
|
||||
// This problem did not affect the pptx export, only the ODP so assert that
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDocRels,
|
||||
@@ -697,7 +697,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf142235_TestPlaceholderTextAlignm
|
||||
{
|
||||
createSdImpressDoc("odp/placeholder-box-textalignment.odp");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXml1 = parseExport(u"ppt/slides/slide2.xml"_ustr);
|
||||
xmlDocUniquePtr pXml2 = parseExport(u"ppt/slides/slide3.xml"_ustr);
|
||||
@@ -727,7 +727,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf96061_textHighlight)
|
||||
xPropSet2->getPropertyValue(u"CharBackColor"_ustr) >>= aColor;
|
||||
CPPUNIT_ASSERT_EQUAL(COL_AUTO, aColor);
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape2(getShapeFromPage(0, 0));
|
||||
uno::Reference<text::XTextRange> const xParagraph3(getParagraphFromShape(0, xShape2));
|
||||
@@ -759,7 +759,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf143222_embeddedWorksheet)
|
||||
CPPUNIT_ASSERT_MESSAGE("no graphic", !pGraphic->IsNone());
|
||||
|
||||
// Check export of embedded worksheet in slide.
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
pPage = GetPage(1);
|
||||
pOleObj = static_cast<SdrOle2Obj*>(pPage->GetObj(0));
|
||||
@@ -774,7 +774,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf143315)
|
||||
{
|
||||
createSdImpressDoc("ppt/tdf143315-WordartWithoutBullet.ppt");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -805,7 +805,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf147121)
|
||||
// Save the font size
|
||||
const auto nFontSizeBefore = xRun->getPropertyValue(u"CharHeight"_ustr).get<float>() * 100;
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Parse the export
|
||||
xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
@@ -835,7 +835,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf140912_PicturePlaceholder)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testEnhancedPathViewBox)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf147978_enhancedPath_viewBox.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
auto xShapeProps(getShapeFromPage(0, 0));
|
||||
awt::Rectangle aBoundRectangle;
|
||||
xShapeProps->getPropertyValue(u"BoundRect"_ustr) >>= aBoundRectangle;
|
||||
@@ -847,7 +847,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testEnhancedPathViewBox)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf74670)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf74670.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
|
||||
@@ -872,7 +872,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf109169_OctagonBevel)
|
||||
// rectangle and thus had 4 points.
|
||||
|
||||
createSdImpressDoc("odp/tdf109169_Octagon.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
auto xPropSet(getShapeFromPage(0, 0));
|
||||
auto aGeomPropSeq = xPropSet->getPropertyValue(u"CustomShapeGeometry"_ustr)
|
||||
@@ -892,7 +892,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf109169_DiamondBevel)
|
||||
// rectangle and thus had 4 points.
|
||||
|
||||
createSdImpressDoc("odp/tdf109169_Diamond.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
auto xPropSet(getShapeFromPage(0, 0));
|
||||
auto aGeomPropSeq = xPropSet->getPropertyValue(u"CustomShapeGeometry"_ustr)
|
||||
@@ -911,7 +911,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf144092_emptyShapeTextProps)
|
||||
// text properties contained inside endParaRPr - The import and export
|
||||
// of endParaRPr for empty cells and shapes are tested here
|
||||
createSdImpressDoc("pptx/tdf144092-emptyShapeTextProps.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
Color aColor;
|
||||
// check text properties of empty shape
|
||||
@@ -954,7 +954,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf149551_tbrl90)
|
||||
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL90, eWritingMode);
|
||||
|
||||
// Test, that it is exported to vert="vert"
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//a:bodyPr", "vert", u"vert");
|
||||
|
||||
@@ -965,7 +965,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf149551_tbrl90)
|
||||
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL90, eWritingMode2);
|
||||
|
||||
// Test, that it is written to odp with loext:writing-mode="tb-rl90"
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(
|
||||
pXmlDoc,
|
||||
@@ -986,7 +986,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf149551_btlr)
|
||||
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, eWritingMode);
|
||||
|
||||
// Test, that it is exported to vert="vert270"
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//a:bodyPr", "vert", u"vert270");
|
||||
|
||||
@@ -997,7 +997,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf149551_btlr)
|
||||
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, eWritingMode2);
|
||||
|
||||
// Test, that it is written to odp with loext:writing-mode="bt-lr"
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(
|
||||
pXmlDoc,
|
||||
@@ -1015,7 +1015,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf94122_autoColor)
|
||||
|
||||
createSdImpressDoc("odp/tdf94122_autocolor.odp");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Without the accompanying fix in place, these tests would have failed with:
|
||||
// - Expected: 1
|
||||
@@ -1053,7 +1053,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf124333)
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("number of shapes is incorrect", sal_Int32(2),
|
||||
getPage(0)->getCount());
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
// Check number of shapes after export.
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("number of shapes is incorrect after export", sal_Int32(2),
|
||||
@@ -1064,7 +1064,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testAutofittedTextboxIndent)
|
||||
{
|
||||
createSdImpressDoc("odp/autofitted-textbox-indent.odp");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
// Check that the indent hasn't changed and wasn't scaled when exporting
|
||||
// (the behaviour changed).
|
||||
@@ -1078,7 +1078,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf151622_oleIcon)
|
||||
{
|
||||
createSdImpressDoc("odp/ole_icon.odp");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1092,7 +1092,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf151622_oleIcon)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf152436)
|
||||
{
|
||||
createSdImpressDoc("pptx/ole-emf_min.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
// Check number of shapes after export.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getPage(0)->getCount());
|
||||
@@ -1102,7 +1102,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testLinkedOLE)
|
||||
{
|
||||
createSdImpressDoc("odp/linked_ole.odp");
|
||||
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1117,7 +1117,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testLinkedOLE)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf102261_testParaTabStopDefaultDistance)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf102261_testParaTabStopDefaultDistance.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
{
|
||||
@@ -1147,7 +1147,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testNotesAuthorDate)
|
||||
pBatch);
|
||||
pBatch->commit();
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXml = parseExport(u"ppt/commentAuthors.xml"_ustr);
|
||||
assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=0]", "name", u"Hans Wurst");
|
||||
@@ -1160,7 +1160,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testNotesAuthorDate)
|
||||
officecfg::Office::Common::Security::Scripting::KeepNoteAuthorDateInfoOnSaving::set(false,
|
||||
pBatch);
|
||||
pBatch->commit();
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
pXml = parseExport(u"ppt/commentAuthors.xml"_ustr);
|
||||
assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=0]", "name", u"Author1");
|
||||
@@ -1173,7 +1173,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testNotesAuthorDate)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTableCellVerticalPropertyRoundtrip)
|
||||
{
|
||||
createSdImpressDoc("pptx/tcPr-vert-roundtrip.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1185,7 +1185,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTableCellVerticalPropertyRoundtrip)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf157740_slideMasters)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf157740.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
// The original file has 1 slide master and 7 slide layouts in that master
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr);
|
||||
@@ -1198,7 +1198,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf157740_slideMasters)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf159931_slideLayouts)
|
||||
{
|
||||
createSdImpressDoc("odp/repeatBitmapMode.odp");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels1 = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
|
||||
xmlDocUniquePtr pXmlDocRels2 = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr);
|
||||
@@ -1261,7 +1261,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf163483_export_math_fallback)
|
||||
css::lang::IndexOutOfBoundsException); // Only one shape on page
|
||||
}
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
// After save-and-reload, there must still be a single shape; now it's a fallback image.
|
||||
// When we start to import formulas from PPTX, that will be formula.
|
||||
@@ -1301,7 +1301,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf163483_export_math_fallback)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testPlaceHolderFitHeightToText)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf160487.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(1, 0));
|
||||
bool bTextAutoGrowHeight = false;
|
||||
xShape->getPropertyValue(u"TextAutoGrowHeight"_ustr) >>= bTextAutoGrowHeight;
|
||||
@@ -1311,7 +1311,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testPlaceHolderFitHeightToText)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testDeduplicateMasters)
|
||||
{
|
||||
createSdImpressDoc("pptx/onemaster-twolayouts.pptx");
|
||||
saveAndReload("Impress Office Open XML");
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
// Check that the document still has one master and two layouts
|
||||
xmlDocUniquePtr pXmlDocContent = parseExport("ppt/presentation.xml");
|
||||
@@ -1348,7 +1348,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testDeduplicateMasters)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testConvertWithMasterDeduplication)
|
||||
{
|
||||
createSdImpressDoc("odp/dupmastermultlayouts.odp");
|
||||
save("Impress Office Open XML");
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
|
||||
@@ -1383,7 +1383,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testConvertWithMasterDeduplication)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf162571HorzAnchor)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf165261.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XShape> xShape(getShapeFromPage(1, 0), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xProp(xShape, uno::UNO_QUERY);
|
||||
@@ -1396,7 +1396,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf162571HorzAnchor)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf165261HorzAnchor)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf165261.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XShape> xShape(xGroupShape->getByIndex(0), uno::UNO_QUERY);
|
||||
@@ -1410,7 +1410,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf165261HorzAnchor)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCustomPromptTexts)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf163239.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage1 = GetPage(1);
|
||||
{
|
||||
@@ -1474,7 +1474,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCustomPromptTexts)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testPresObjTextStyles)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf163239_v2.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
|
||||
uno::UNO_QUERY);
|
||||
@@ -1539,7 +1539,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testPresObjTextStyles)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTextStylesXML)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf163239_v2.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slideLayouts/slideLayout1.xml"_ustr);
|
||||
|
||||
@@ -1553,7 +1553,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTextStylesXML)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTextAlignLeft)
|
||||
{
|
||||
createSdImpressDoc("pptx/presLeftAlign.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
@@ -1563,7 +1563,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTextAlignLeft)
|
||||
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testOLEObjectAnimationTarget)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf169088.pptx");
|
||||
save(u"Impress Office Open XML"_ustr);
|
||||
save(TestFilter::PPTX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
|
||||
|
||||
|
||||
+86
-85
@@ -138,7 +138,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBackgroundImage)
|
||||
|
||||
// Save as PPTX, reload and check again so we make sure exporting to PPTX is working correctly
|
||||
{
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("not exactly one page", static_cast<sal_Int32>(1),
|
||||
xDoc->getDrawPages()->getCount());
|
||||
@@ -163,7 +163,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBackgroundImage)
|
||||
|
||||
// Save as ODP, reload and check again so we make sure exporting and importing to ODP is working correctly
|
||||
{
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("not exactly one page", static_cast<sal_Int32>(1),
|
||||
xDoc->getDrawPages()->getCount());
|
||||
@@ -211,7 +211,7 @@ void checkFontAttributes(const SdrTextObj* pObj, ItemValue nVal, sal_uInt32 nId)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTransparentBackground)
|
||||
{
|
||||
createSdImpressDoc("odp/transparent_background.odp");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -225,7 +225,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTransparentBackground)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf162283)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf162283.pptx");
|
||||
saveAndReload(u"MS PowerPoint 97"_ustr);
|
||||
saveAndReload(TestFilter::PPT);
|
||||
|
||||
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
|
||||
uno::Reference<beans::XPropertySet> xPropSet(getShape(0, xPage));
|
||||
@@ -343,17 +343,17 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testDecorative)
|
||||
|
||||
doTest("initial pptx load: "_ostr);
|
||||
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
doTest("reload OOXML: "_ostr);
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
doTest("reload ODF: "_ostr);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf142716)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf142716.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
const SdrTextObj* pObj = DynCastSdrTextObj(pPage->GetObj(0));
|
||||
@@ -381,7 +381,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testMediaEmbedding)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testFillBitmapUnused)
|
||||
{
|
||||
createSdImpressDoc("odp/fillbitmap2.odp");
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
// shapes
|
||||
@@ -458,7 +458,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testFillBitmapUnused)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testFdo84043)
|
||||
{
|
||||
createSdImpressDoc("fdo84043.odp");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
// the bug was duplicate attributes, causing crash in a build with asserts
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
@@ -496,7 +496,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf97630)
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_ALLLINES, tmp);
|
||||
}
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
{
|
||||
uno::Reference<drawing::XDrawPage> xDP(getPage(0));
|
||||
@@ -557,7 +557,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf97630)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testImpressPasswordExport)
|
||||
{
|
||||
std::vector<OUString> vFormat{ u"impress8"_ustr, u"Impress Office Open XML"_ustr };
|
||||
std::vector<TestFilter> vFormat{ TestFilter::ODP, TestFilter::PPTX };
|
||||
|
||||
for (size_t i = 0; i < vFormat.size(); i++)
|
||||
{
|
||||
@@ -571,21 +571,21 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testDrawPasswordExport)
|
||||
{
|
||||
createSdDrawDoc();
|
||||
|
||||
saveAndReload(u"draw8"_ustr, /*pPassword*/ "test");
|
||||
saveAndReload(TestFilter::ODG, /*pPassword*/ "test");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testSwappedOutImageExport)
|
||||
{
|
||||
// Problem was with the swapped out images, which were not swapped in during export.
|
||||
|
||||
std::vector<OUString> vFormat{ u"impress8"_ustr, u"Impress Office Open XML"_ustr,
|
||||
u"MS PowerPoint 97"_ustr };
|
||||
std::vector<TestFilter> vFormat{ TestFilter::ODP, TestFilter::PPTX, TestFilter::PPT };
|
||||
|
||||
for (size_t i = 0; i < vFormat.size(); i++)
|
||||
{
|
||||
// Load the original file with one image
|
||||
createSdImpressDoc("odp/document_with_two_images.odp");
|
||||
const OString sFailedMessage = "Failed on filter: " + vFormat[i].toUtf8();
|
||||
const OString sFailedMessage
|
||||
= "Failed on filter: " + TestFilterNames.at(vFormat[i]).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(vFormat[i]);
|
||||
@@ -645,7 +645,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testOOoXMLAnimations)
|
||||
// FIXME: Error: unexpected attribute "presentation:preset-property"
|
||||
skipValidation();
|
||||
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
// the problem was that legacy OOoXML animations were lost if store
|
||||
// immediately follows load because they were "converted" async by a timer
|
||||
@@ -715,7 +715,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testUnknownAttributes)
|
||||
// FIXME: Error: unexpected attribute "foo:non-existent-att"
|
||||
skipValidation();
|
||||
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/"
|
||||
@@ -740,7 +740,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf80020)
|
||||
uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName(u"Test Style"_ustr),
|
||||
uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(u"text"_ustr, xStyle->getParentStyle());
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
}
|
||||
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
|
||||
uno::UNO_QUERY);
|
||||
@@ -773,7 +773,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf128985)
|
||||
|
||||
xPropSet->setPropertyValue(u"WritingMode"_ustr, uno::Any(text::WritingMode2::LR_TB));
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
}
|
||||
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
|
||||
uno::UNO_QUERY);
|
||||
@@ -796,7 +796,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf128985)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testLinkedGraphicRT)
|
||||
{
|
||||
// FIXME: PPTX fails
|
||||
std::vector<OUString> vFormat{ u"impress8"_ustr, u"MS PowerPoint 97"_ustr };
|
||||
std::vector<TestFilter> vFormat{ TestFilter::ODP, TestFilter::PPT };
|
||||
for (size_t i = 0; i < vFormat.size(); i++)
|
||||
{
|
||||
// Load the original file with one image
|
||||
@@ -829,7 +829,8 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testLinkedGraphicRT)
|
||||
|
||||
// Check whether graphic imported well after export
|
||||
{
|
||||
const OString sFailedMessage = "Failed on filter: " + vFormat[i].toUtf8();
|
||||
const OString sFailedMessage
|
||||
= "Failed on filter: " + TestFilterNames.at(vFormat[i]).toUtf8();
|
||||
|
||||
SdXImpressDocument* pXImpressDocument
|
||||
= dynamic_cast<SdXImpressDocument*>(mxComponent.get());
|
||||
@@ -854,7 +855,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testLinkedGraphicRT)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf79082)
|
||||
{
|
||||
createSdImpressDoc("ppt/tdf79082.ppt");
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
// P1 should have 6 tab stops defined
|
||||
@@ -891,13 +892,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testImageWithSpecialID)
|
||||
// Check how LO handles when the imported graphic's ID is different from that one
|
||||
// which is generated by LO.
|
||||
|
||||
std::vector<OUString> vFormat{ u"impress8"_ustr, u"Impress Office Open XML"_ustr,
|
||||
u"MS PowerPoint 97"_ustr };
|
||||
std::vector<TestFilter> vFormat{ TestFilter::ODP, TestFilter::PPTX, TestFilter::PPT };
|
||||
for (size_t i = 0; i < vFormat.size(); i++)
|
||||
{
|
||||
// Load the original file
|
||||
createSdImpressDoc("odp/images_with_special_IDs.odp");
|
||||
const OString sFailedMessage = "Failed on filter: " + vFormat[i].toUtf8();
|
||||
const OString sFailedMessage
|
||||
= "Failed on filter: " + TestFilterNames.at(vFormat[i]).toUtf8();
|
||||
saveAndReload(vFormat[i]);
|
||||
|
||||
// Check whether graphic was exported well
|
||||
@@ -971,7 +972,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf62176)
|
||||
CPPUNIT_ASSERT_EQUAL(u"Hello World"_ustr, xParagraph->getString());
|
||||
|
||||
//Saving and Reloading the file
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
uno::Reference<drawing::XDrawPage> xPage2(getPage(0));
|
||||
//there should be only *one* shape
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xPage2->getCount());
|
||||
@@ -1000,7 +1001,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testEmbeddedPdf)
|
||||
}
|
||||
|
||||
createSdImpressDoc("odp/embedded-pdf.odp");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
|
||||
uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY);
|
||||
uno::Reference<graphic::XGraphic> xGraphic;
|
||||
@@ -1019,7 +1020,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdf)
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODG);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -1042,7 +1043,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfTextPos)
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODG);
|
||||
|
||||
xmlDocUniquePtr pXml = parseLayout();
|
||||
sal_Int32 x = getXPath(pXml, "//textarray[1]", "x").toInt32();
|
||||
@@ -1073,7 +1074,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfFont)
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODG);
|
||||
|
||||
xmlDocUniquePtr pXml = parseLayout();
|
||||
{
|
||||
@@ -1111,7 +1112,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfHindi)
|
||||
loadFromFile(u"pdf/BasicHindi.pdf");
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
save(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
save(TestFilter::FODG);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
@@ -1139,7 +1140,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfGrayscaleImageUnderInvisibleTe
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODG);
|
||||
|
||||
uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xGroupShape.is());
|
||||
@@ -1186,7 +1187,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfClippedImages)
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODG);
|
||||
|
||||
uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xGroupShape.is());
|
||||
@@ -1216,7 +1217,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfMissingFontVersion)
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODG);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
|
||||
@@ -1240,7 +1241,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfEmbeddedFonts)
|
||||
loadFromFile(u"pdf/sciencejournalsource.pdf");
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
save(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
save(TestFilter::FODG);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
@@ -1261,7 +1262,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfPatternStroke)
|
||||
loadFromFile(u"pdf/pattern-stroke.pdf");
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
save(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
save(TestFilter::FODG);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
@@ -1281,7 +1282,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfPatternFill)
|
||||
loadFromFile(u"pdf/pattern-fill.pdf");
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
save(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
save(TestFilter::FODG);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
@@ -1303,7 +1304,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testPdfPageMasterOrientation)
|
||||
loadFromFile(u"pdf/SampleSlideDeck.pdf");
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
save(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
save(TestFilter::FODG);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
@@ -1325,7 +1326,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfTextShear)
|
||||
loadFromFile(u"pdf/textshear.pdf");
|
||||
|
||||
setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}");
|
||||
save(u"OpenDocument Drawing Flat XML"_ustr);
|
||||
save(TestFilter::FODG);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
|
||||
@@ -1339,7 +1340,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfTextShear)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testEmbeddedText)
|
||||
{
|
||||
createSdDrawDoc("objectwithtext.fodg");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
|
||||
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
|
||||
uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY);
|
||||
@@ -1367,7 +1368,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testEmbeddedText)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTransparenText)
|
||||
{
|
||||
createSdDrawDoc("transparent-text.fodg");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
|
||||
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
|
||||
uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY);
|
||||
@@ -1384,7 +1385,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTransparenText)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testDefaultSubscripts)
|
||||
{
|
||||
createSdDrawDoc("tdf80194_defaultSubscripts.fodg");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
|
||||
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
|
||||
uno::Reference<drawing::XShape> xShape(xPage->getByIndex(1), uno::UNO_QUERY);
|
||||
@@ -1396,7 +1397,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testDefaultSubscripts)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf98477)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf98477grow.pptx");
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//anim:animateTransform", "by", u"0.5,0.5");
|
||||
@@ -1406,7 +1407,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testAuthorField)
|
||||
{
|
||||
createSdImpressDoc("odp/author_fixed.odp");
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
|
||||
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
|
||||
@@ -1421,7 +1422,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf50499)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf50499.pptx");
|
||||
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//anim:animate[1]", "from", u"(-width/2)");
|
||||
@@ -1433,7 +1434,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf100926)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf100926_ODP.pptx");
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
CPPUNIT_ASSERT(pPage != nullptr);
|
||||
@@ -1461,7 +1462,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testPageWithTransparentBackground)
|
||||
{
|
||||
createSdImpressDoc("odp/page_transparent_background.odp");
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly one page", static_cast<sal_Int32>(1),
|
||||
xDoc->getDrawPages()->getCount());
|
||||
@@ -1493,7 +1494,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTextRotation)
|
||||
// attribute value "tb-rl90" is included in ODF strict.
|
||||
{
|
||||
createSdImpressDoc("pptx/shape-text-rotate.pptx");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
|
||||
uno::Reference<beans::XPropertySet> xPropSet(getShape(0, xPage));
|
||||
@@ -1507,7 +1508,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTextRotation)
|
||||
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
|
||||
|
||||
createSdImpressDoc("pptx/shape-text-rotate.pptx");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
|
||||
uno::Reference<beans::XPropertySet> xPropSet(getShape(0, xPage));
|
||||
@@ -1530,7 +1531,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf115394PPT)
|
||||
createSdImpressDoc("ppt/tdf115394.ppt");
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(u"MS PowerPoint 97"_ustr);
|
||||
saveAndReload(TestFilter::PPT);
|
||||
|
||||
double fTransitionDuration;
|
||||
|
||||
@@ -1556,7 +1557,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf115394PPT)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpress8)
|
||||
{
|
||||
createSdImpressDoc("odp/BulletsAsImage.odp");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
|
||||
@@ -1606,7 +1607,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpress8)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpressOfficeOpenXml)
|
||||
{
|
||||
createSdImpressDoc("odp/BulletsAsImage.odp");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
|
||||
@@ -1658,7 +1659,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpressOfficeOpenXml)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageMsPowerpoint97)
|
||||
{
|
||||
createSdImpressDoc("odp/BulletsAsImage.odp");
|
||||
saveAndReload(u"MS PowerPoint 97"_ustr);
|
||||
saveAndReload(TestFilter::PPT);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
|
||||
@@ -1711,9 +1712,9 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf113822)
|
||||
createSdImpressDoc("pptx/tdf113822underline.pptx");
|
||||
|
||||
// Was unable to export iterate container (tdf#99213).
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
// Was unable to import iterate container (tdf#113822).
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -1729,9 +1730,9 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf113822)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf113818)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf113818-swivel.pptx");
|
||||
saveAndReload(u"MS PowerPoint 97"_ustr);
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
save(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::PPT);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//anim:animate[1]", "formula", u"width*sin(2.5*pi*$)");
|
||||
@@ -1741,8 +1742,8 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf113818)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf119629)
|
||||
{
|
||||
createSdImpressDoc("ppt/tdf119629.ppt");
|
||||
saveAndReload(u"MS PowerPoint 97"_ustr);
|
||||
save(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::PPT);
|
||||
save(TestFilter::ODP);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -1762,7 +1763,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf119629)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf141269)
|
||||
{
|
||||
createSdImpressDoc("odp/tdf141269.odp");
|
||||
saveAndReload(u"MS PowerPoint 97"_ustr);
|
||||
saveAndReload(TestFilter::PPT);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0), uno::UNO_SET_THROW);
|
||||
CPPUNIT_ASSERT(xShape.is());
|
||||
@@ -1785,8 +1786,8 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf141269)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf123557)
|
||||
{
|
||||
createSdImpressDoc("pptx/trigger.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
save(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
// Contains 2 interactive sequences and 3 triggered effects.
|
||||
@@ -1808,7 +1809,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf123557)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf126761)
|
||||
{
|
||||
createSdImpressDoc("ppt/tdf126761.ppt");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
|
||||
// Get first paragraph of the text
|
||||
@@ -1827,7 +1828,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf126761)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testGlow)
|
||||
{
|
||||
createSdDrawDoc("odg/glow.odg");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
|
||||
// Check glow properties
|
||||
@@ -1866,7 +1867,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testGlow)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testGlowTextInShape)
|
||||
{
|
||||
createSdImpressDoc("odp/shape-text-glow-effect.odp");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
uno::Reference<drawing::XDrawPage> xDP(getPage(0));
|
||||
uno::Reference<beans::XPropertySet> xShape(xDP->getByIndex(0), uno::UNO_QUERY);
|
||||
@@ -1907,7 +1908,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testGlowTextInShape)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testSoftEdges)
|
||||
{
|
||||
createSdDrawDoc("odg/softedges.odg");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
auto xShapeProps(getShapeFromPage(0, 0));
|
||||
|
||||
// Check property
|
||||
@@ -1945,7 +1946,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testSoftEdges)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testShadowBlur)
|
||||
{
|
||||
createSdImpressDoc("odp/shadow-blur.odp");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
|
||||
|
||||
sal_Int32 nRad = 0;
|
||||
@@ -1966,14 +1967,14 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testRhbz1870501)
|
||||
{
|
||||
//Without the fix in place, it would crash at export time
|
||||
createSdDrawDoc("odg/rhbz1870501.odg");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf152606)
|
||||
{
|
||||
//Without the fix in place, it would crash at import time
|
||||
createSdImpressDoc("pptx/tdf152606.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
|
||||
@@ -1986,20 +1987,20 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf154754)
|
||||
//Without the fix in place, it would crash at export time
|
||||
skipValidation();
|
||||
createSdImpressDoc("odp/tdf154754.odp");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf91060)
|
||||
{
|
||||
//Without the fix in place, it would crash at import time
|
||||
createSdImpressDoc("pptx/tdf91060.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf128550)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf128550.pptx");
|
||||
save(u"impress8"_ustr);
|
||||
save(TestFilter::ODP);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//anim:iterate[@anim:sub-item='background']", 1);
|
||||
assertXPath(pXmlDoc, "//anim:iterate[@anim:sub-item='text']", 4);
|
||||
@@ -2010,7 +2011,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf140714)
|
||||
//Without the fix in place, shape will be imported as GraphicObjectShape instead of CustomShape.
|
||||
|
||||
createSdImpressDoc("pptx/tdf140714.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XShape> xShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.CustomShape"_ustr, xShape->getShapeType());
|
||||
@@ -2019,7 +2020,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf140714)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf156649)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf156649.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
auto xShapeProps(getShapeFromPage(0, 0));
|
||||
// Without the fix in place, this test would have failed with
|
||||
@@ -2131,7 +2132,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testMasterPageBackgroundFullSize)
|
||||
xBackgroundProps->getPropertyValue(u"FillTransparence"_ustr).get<sal_Int16>());
|
||||
}
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
xMPS.set(mxComponent, uno::UNO_QUERY);
|
||||
xMPs.set(xMPS->getMasterPages());
|
||||
@@ -2283,7 +2284,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testColumnsODG)
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(700), pTextObj->GetTextColumnsSpacing());
|
||||
}
|
||||
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
|
||||
{
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent,
|
||||
@@ -2321,7 +2322,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testColumnsODG)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf112126)
|
||||
{
|
||||
createSdDrawDoc("tdf112126.odg");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
|
||||
uno::Reference<beans::XPropertySet> xPropertySet(xPage, uno::UNO_QUERY);
|
||||
|
||||
@@ -2342,7 +2343,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testCellProperties)
|
||||
skipValidation();
|
||||
|
||||
createSdDrawDoc("odg/tablestyles.fodg");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
auto pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
|
||||
@@ -2374,7 +2375,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testUserTableStyles)
|
||||
skipValidation();
|
||||
|
||||
createSdDrawDoc("odg/tablestyles.fodg");
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
|
||||
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
|
||||
uno::UNO_QUERY);
|
||||
@@ -2399,7 +2400,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testUserTableStyles)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf153179)
|
||||
{
|
||||
createSdImpressDoc("pptx/ole-emf_min.pptx");
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
// Check number of shapes after export.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getPage(0)->getCount());
|
||||
@@ -2407,14 +2408,14 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf153179)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testSvgImageSupport)
|
||||
{
|
||||
for (OUString const& rFormat : { u"impress8"_ustr, u"Impress Office Open XML"_ustr })
|
||||
for (TestFilter eFormat : { TestFilter::ODP, TestFilter::PPTX })
|
||||
{
|
||||
// Load the original file
|
||||
createSdImpressDoc("odp/SvgImageTest.odp");
|
||||
// Save into the target format
|
||||
saveAndReload(rFormat);
|
||||
saveAndReload(eFormat);
|
||||
|
||||
const OString sFailedMessage = "Failed on filter: " + rFormat.toUtf8();
|
||||
const OString sFailedMessage = "Failed on filter: " + TestFilterNames.at(eFormat).toUtf8();
|
||||
|
||||
// Check whether SVG graphic was exported as expected
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent,
|
||||
@@ -2450,7 +2451,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testSvgImageSupport)
|
||||
CPPUNIT_TEST_FIXTURE(SdExportTest, testTableBordersTransparancy)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf164936.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
sdr::table::SdrTableObj* pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
|
||||
|
||||
@@ -1458,7 +1458,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTestSmartArt, testFillColorList)
|
||||
CPPUNIT_TEST_FIXTURE(SdImportTestSmartArt, testTdf134221)
|
||||
{
|
||||
createSdImpressDoc("pptx/smartart-tdf134221.pptx");
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0), uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XShape> xShapeB = findChildShapeByText(xGroup, u"B"_ustr);
|
||||
CPPUNIT_ASSERT(xShapeB.is());
|
||||
|
||||
+19
-19
@@ -125,36 +125,36 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testDocumentLayout)
|
||||
static const struct
|
||||
{
|
||||
std::u16string_view sInput, sDump;
|
||||
OUString sExportType;
|
||||
TestFilter sExportType;
|
||||
} aFilesToCompare[]
|
||||
= { { u"odp/shapes-test.odp", u"xml/shapes-test_page", u""_ustr },
|
||||
{ u"fdo47434.pptx", u"xml/fdo47434_", u""_ustr },
|
||||
{ u"n758621.ppt", u"xml/n758621_", u""_ustr },
|
||||
{ u"fdo64586.ppt", u"xml/fdo64586_", u""_ustr },
|
||||
= { { u"odp/shapes-test.odp", u"xml/shapes-test_page", TestFilter::NONE },
|
||||
{ u"fdo47434.pptx", u"xml/fdo47434_", TestFilter::NONE },
|
||||
{ u"n758621.ppt", u"xml/n758621_", TestFilter::NONE },
|
||||
{ u"fdo64586.ppt", u"xml/fdo64586_", TestFilter::NONE },
|
||||
|
||||
// needed to adapt this, the border parameter is no longer
|
||||
// exported with MCGRs due to oox neither needing nor
|
||||
// supporting it with now freely definable gradients
|
||||
{ u"n819614.pptx", u"xml/n819614_", u""_ustr },
|
||||
{ u"n819614.pptx", u"xml/n819614_", TestFilter::NONE },
|
||||
|
||||
{ u"n820786.pptx", u"xml/n820786_", u""_ustr },
|
||||
{ u"n762695.pptx", u"xml/n762695_", u""_ustr },
|
||||
{ u"n593612.pptx", u"xml/n593612_", u""_ustr },
|
||||
{ u"fdo71434.pptx", u"xml/fdo71434_", u""_ustr },
|
||||
{ u"n902652.pptx", u"xml/n902652_", u""_ustr },
|
||||
{ u"tdf90403.pptx", u"xml/tdf90403_", u""_ustr },
|
||||
{ u"tdf90338.odp", u"xml/tdf90338_", u"Impress Office Open XML"_ustr },
|
||||
{ u"tdf92001.odp", u"xml/tdf92001_", u"Impress Office Open XML"_ustr },
|
||||
{ u"n820786.pptx", u"xml/n820786_", TestFilter::NONE },
|
||||
{ u"n762695.pptx", u"xml/n762695_", TestFilter::NONE },
|
||||
{ u"n593612.pptx", u"xml/n593612_", TestFilter::NONE },
|
||||
{ u"fdo71434.pptx", u"xml/fdo71434_", TestFilter::NONE },
|
||||
{ u"n902652.pptx", u"xml/n902652_", TestFilter::NONE },
|
||||
{ u"tdf90403.pptx", u"xml/tdf90403_", TestFilter::NONE },
|
||||
{ u"tdf90338.odp", u"xml/tdf90338_", TestFilter::PPTX },
|
||||
{ u"tdf92001.odp", u"xml/tdf92001_", TestFilter::PPTX },
|
||||
// GCC -mfpmath=387 rounding issues in lclPushMarkerProperties
|
||||
// (oox/source/drawingml/lineproperties.cxx); see mail sub-thread starting at
|
||||
// <https://lists.freedesktop.org/archives/libreoffice/2016-September/
|
||||
// 075211.html> "Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods:
|
||||
// fails with Assertion" for how "-mfpmath=sse -msse2" would fix that:
|
||||
#if !(defined LINUX && defined X86)
|
||||
{ u"tdf100491.pptx", u"xml/tdf100491_", u""_ustr },
|
||||
{ u"tdf100491.pptx", u"xml/tdf100491_", TestFilter::NONE },
|
||||
#endif
|
||||
{ u"tdf109317.pptx", u"xml/tdf109317_", u"impress8"_ustr },
|
||||
// { u"pptx/n828390.pptx", u"pptx/xml/n828390_", "Impress Office Open XML" }, // Example
|
||||
{ u"tdf109317.pptx", u"xml/tdf109317_", TestFilter::ODP },
|
||||
// { u"pptx/n828390.pptx", u"pptx/xml/n828390_", TestFilter::PPTX }, // Example
|
||||
};
|
||||
|
||||
for (int i = 0; i < static_cast<int>(SAL_N_ELEMENTS(aFilesToCompare)); ++i)
|
||||
@@ -163,7 +163,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testDocumentLayout)
|
||||
= -1; // index of test we want to update; supposedly only when the test is created
|
||||
|
||||
loadFromFile(aFilesToCompare[i].sInput);
|
||||
if (!aFilesToCompare[i].sExportType.isEmpty())
|
||||
if (aFilesToCompare[i].sExportType != TestFilter::NONE)
|
||||
saveAndReload(aFilesToCompare[i].sExportType);
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent,
|
||||
uno::UNO_QUERY_THROW);
|
||||
@@ -347,7 +347,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testTdf154363)
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), nGlueId);
|
||||
}
|
||||
|
||||
saveAndReload(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX_2007);
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xConnector1(getShapeFromPage(1, 0), uno::UNO_SET_THROW);
|
||||
uno::Reference<beans::XPropertySet> xConnector2(getShapeFromPage(3, 0), uno::UNO_SET_THROW);
|
||||
|
||||
@@ -191,7 +191,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf157285)
|
||||
CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf152186)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf152186.pptx");
|
||||
saveAndReload(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX_2007);
|
||||
|
||||
bool bHasShadow = bool();
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
@@ -1670,7 +1670,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf127964)
|
||||
CPPUNIT_ASSERT_EQUAL(true, rFillBackgroundItem.GetValue());
|
||||
}
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
{
|
||||
const SdrPage* pPage = GetPage(1);
|
||||
@@ -2077,7 +2077,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf149961AutofitIndentation)
|
||||
CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf149588TransparentSolidFill)
|
||||
{
|
||||
createSdImpressDoc("pptx/tdf149588_transparentSolidFill.pptx");
|
||||
saveAndReload(u"Impress MS PowerPoint 2007 XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX_2007);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(6, 0));
|
||||
uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xShape));
|
||||
@@ -2104,7 +2104,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testOverflowBehaviorClip)
|
||||
true, xPropSet->getPropertyValue(u"TextClipVerticalOverflow"_ustr).get<bool>());
|
||||
}
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xPropSet(getShapeFromPage(0, 0));
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
|
||||
@@ -535,7 +535,7 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf168010)
|
||||
}
|
||||
|
||||
// 2. It must stay enabled after ODP round-trip
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
{
|
||||
CPPUNIT_ASSERT(
|
||||
getDoc()->GetCompatibilityFlag(SdrCompatibilityFlag::UseTrailingEmptyLinesInLayout));
|
||||
@@ -559,7 +559,7 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf168010)
|
||||
}
|
||||
|
||||
// 4. It must stay disabled after ODP round-trip
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
{
|
||||
CPPUNIT_ASSERT(
|
||||
!getDoc()->GetCompatibilityFlag(SdrCompatibilityFlag::UseTrailingEmptyLinesInLayout));
|
||||
@@ -586,7 +586,7 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf168010)
|
||||
}
|
||||
|
||||
// 6. Check PPTX round-trip
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
{
|
||||
CPPUNIT_ASSERT(
|
||||
getDoc()->GetCompatibilityFlag(SdrCompatibilityFlag::UseTrailingEmptyLinesInLayout));
|
||||
@@ -602,7 +602,7 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf168010)
|
||||
skipValidation();
|
||||
|
||||
// 7. It must round-trip to ODP
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
{
|
||||
CPPUNIT_ASSERT(
|
||||
getDoc()->GetCompatibilityFlag(SdrCompatibilityFlag::UseTrailingEmptyLinesInLayout));
|
||||
|
||||
+10
-10
@@ -395,7 +395,7 @@ void SdMiscTest::testTdf44774()
|
||||
rStyleB.SetParent(u"StyleA"_ustr);
|
||||
|
||||
// Now save the file and reload
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
|
||||
CPPUNIT_ASSERT(pXImpressDocument);
|
||||
pDocShell = pXImpressDocument->GetDocShell();
|
||||
@@ -420,7 +420,7 @@ void SdMiscTest::testTdf38225()
|
||||
pSSPool->Make(u"StyleWithName1"_ustr, SfxStyleFamily::Para, SfxStyleSearchBits::UserDefined);
|
||||
|
||||
// Now save the file and reload
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
|
||||
CPPUNIT_ASSERT(pXImpressDocument);
|
||||
pDocShell = pXImpressDocument->GetDocShell();
|
||||
@@ -433,7 +433,7 @@ void SdMiscTest::testTdf38225()
|
||||
CPPUNIT_ASSERT(pStyle->SetName(u"StyleWithName2"_ustr));
|
||||
|
||||
// Save the file and reload again
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
|
||||
CPPUNIT_ASSERT(pXImpressDocument);
|
||||
pDocShell = pXImpressDocument->GetDocShell();
|
||||
@@ -549,7 +549,7 @@ void SdMiscTest::testTdf101242_ODF_add_settings()
|
||||
comphelper::ConfigurationChanges::create());
|
||||
officecfg::Office::Common::Misc::WriteLayerStateAsConfigItem::set(true, pBatch);
|
||||
pBatch->commit();
|
||||
save(u"draw8"_ustr);
|
||||
save(TestFilter::ODG);
|
||||
|
||||
// Verify, that the saved document still has the ODF attributes
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -603,7 +603,7 @@ void SdMiscTest::testTdf101242_ODF_no_settings()
|
||||
comphelper::ConfigurationChanges::create());
|
||||
officecfg::Office::Common::Misc::WriteLayerStateAsConfigItem::set(false, pBatch);
|
||||
pBatch->commit();
|
||||
save(u"draw8"_ustr);
|
||||
save(TestFilter::ODG);
|
||||
|
||||
// Verify, that the saved document still has the ODF attributes
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -640,7 +640,7 @@ void SdMiscTest::testTdf101242_settings_keep()
|
||||
comphelper::ConfigurationChanges::create());
|
||||
officecfg::Office::Common::Misc::WriteLayerStateAsConfigItem::set(true, pBatch);
|
||||
pBatch->commit();
|
||||
save(u"draw8"_ustr);
|
||||
save(TestFilter::ODG);
|
||||
|
||||
// Verify, that the saved document has the ODF attributes
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -695,7 +695,7 @@ void SdMiscTest::testTdf101242_settings_remove()
|
||||
comphelper::ConfigurationChanges::create());
|
||||
officecfg::Office::Common::Misc::WriteLayerStateAsConfigItem::set(false, pBatch);
|
||||
pBatch->commit();
|
||||
save(u"draw8"_ustr);
|
||||
save(TestFilter::ODG);
|
||||
|
||||
// Verify, that the saved document has the ODF attributes
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -740,7 +740,7 @@ void SdMiscTest::testTdf119392()
|
||||
pPageView->SetLayerVisible(u"-P-"_ustr, false);
|
||||
pPageView->SetLayerPrintable(u"-P-"_ustr, true);
|
||||
pPageView->SetLayerLocked(u"-P-"_ustr, false);
|
||||
save(u"draw8"_ustr);
|
||||
save(TestFilter::ODG);
|
||||
|
||||
// Verify correct bit order in bitfield in the config items in settings.xml
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"settings.xml"_ustr);
|
||||
@@ -842,7 +842,7 @@ void SdMiscTest::testTdf98839_ShearVFlipH()
|
||||
pShape->Mirror(Point(4000, 2000), Point(4000, 10000));
|
||||
|
||||
// Save and examine attribute draw:transform
|
||||
save(u"draw8"_ustr);
|
||||
save(TestFilter::ODG);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed to get 'content.xml'", pXmlDoc);
|
||||
static constexpr OString sPathStart(
|
||||
@@ -1034,7 +1034,7 @@ void SdMiscTest::testEncodedTableStyles()
|
||||
->replaceByName(u"body"_ustr, uno::Any(xCellStyle));
|
||||
}
|
||||
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
|
||||
{
|
||||
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
|
||||
|
||||
@@ -1263,7 +1263,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testTdf81754)
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
// now save, reload, and assert that we did not lose the edit
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XDrawPage> xPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
|
||||
|
||||
@@ -1983,7 +1983,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf153161)
|
||||
// Type something, getting into text editing mode (appending) automatically
|
||||
insertStringToObject(1, u"Foo Bar", /*bUseEscape*/ false);
|
||||
|
||||
saveAndReload(u"impress8"_ustr);
|
||||
saveAndReload(TestFilter::ODP);
|
||||
|
||||
xDrawPagesSupplier.set(mxComponent, uno::UNO_QUERY);
|
||||
xDrawPage.set(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
|
||||
@@ -2033,7 +2033,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127696)
|
||||
dispatchCommand(mxComponent, u".uno:OutlineFont"_ustr, {});
|
||||
|
||||
// Save it as PPTX and load it again.
|
||||
saveAndReload(u"Impress Office Open XML"_ustr);
|
||||
saveAndReload(TestFilter::PPTX);
|
||||
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(1),
|
||||
|
||||
@@ -61,7 +61,7 @@ void MathMLExportTest::testBlank()
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
pDocShell->SetText(u"x`y~~z"_ustr);
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
save(TestFilter::MML);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mspace[1]", "width", u"0.5em");
|
||||
@@ -74,7 +74,7 @@ void MathMLExportTest::testTdf97049()
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
pDocShell->SetText(u"intd {{1 over x} dx}"_ustr);
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
save(TestFilter::MML);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mo[1]", "stretchy", u"true");
|
||||
@@ -87,7 +87,7 @@ void MathMLExportTest::checkMathVariant(SmDocShell& rDocShell, bool bCapital, bo
|
||||
{
|
||||
rDocShell.SetText(u"%GAMMA %iGAMMA {ital %GAMMA} {nitalic %iGAMMA} "
|
||||
"%gamma %igamma {ital %gamma} {nitalic %igamma}"_ustr);
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
save(TestFilter::MML);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
if (bCapital)
|
||||
@@ -129,7 +129,7 @@ void MathMLExportTest::testMaj()
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
pDocShell->SetText(
|
||||
u"maj to { \u0661 } from { \U0001EE0A = \u0660 } { \u0661 over \U0001EE0A }"_ustr);
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
save(TestFilter::MML);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mo", "stretchy", u"false");
|
||||
@@ -142,7 +142,7 @@ void MathMLExportTest::testHadd()
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
pDocShell->SetText(u"hadd to { \U0001EE4E } from { \U0001EE4E } \U0001EE4E"_ustr);
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
save(TestFilter::MML);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mi", u"\U0001EEF1");
|
||||
@@ -154,7 +154,7 @@ void MathMLExportTest::testTdf158867()
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
pDocShell->SetText(u"1,2 over 2 = 0,65"_ustr);
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
save(TestFilter::MML);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:mfrac/m:mn[1]", u"1,2");
|
||||
|
||||
@@ -1186,7 +1186,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf136176)
|
||||
}
|
||||
|
||||
// Save and reload
|
||||
saveAndReload(u"draw8"_ustr);
|
||||
saveAndReload(TestFilter::ODG);
|
||||
|
||||
// Expected values of point 4 of the shape polygon
|
||||
const OString sTestCase[] = { "FlipH"_ostr, "FlipV"_ostr, "FlipHV"_ostr };
|
||||
|
||||
@@ -602,7 +602,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testPageViewDrawLayerClip)
|
||||
loadFromFile(u"page-view-draw-layer-clip.docx");
|
||||
|
||||
// When saving that document to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that line shape gets clipped:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pDoc = parsePDFExport();
|
||||
|
||||
@@ -112,7 +112,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDrawTest, testTdf107727FrameBorder)
|
||||
createSwDoc("tdf107727_FrameBorder.odt");
|
||||
|
||||
// Export to RTF and reload
|
||||
saveAndReload(u"Rich Text Format"_ustr);
|
||||
saveAndReload(TestFilter::RTF);
|
||||
|
||||
// Get frame without border and inspect it.
|
||||
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
|
||||
@@ -109,7 +109,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testHeaderFooterWithSpecialFirstPage_OOXM
|
||||
{
|
||||
// Load, save in OOXML format and reload
|
||||
createSwDoc("tdf118393.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(7, getPages());
|
||||
|
||||
@@ -147,7 +147,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testHeaderFooterWithSpecialFirstPage_ODF)
|
||||
{
|
||||
// Load, save in ODF format and reload
|
||||
createSwDoc("tdf118393.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(7, getPages());
|
||||
|
||||
@@ -187,7 +187,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFloatingTableInHeader)
|
||||
// This was 0, floating table in header wasn't converted to a TextFrame.
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// This was 0, floating table in header wasn't converted to a TextFrame.
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
@@ -258,7 +258,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstPageHeadersAndEmptyFooters)
|
||||
|
||||
createSwDoc("fdo66145.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -288,14 +288,14 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooterImport)
|
||||
|
||||
createSwDoc("first-header-footer.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooterRoundTrip)
|
||||
{
|
||||
createSwDoc("first-header-footerB.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(6, getPages());
|
||||
|
||||
@@ -317,7 +317,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooterRoundTrip)
|
||||
CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooter_ODF)
|
||||
{
|
||||
createSwDoc("first-header-footer.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(6, getPages());
|
||||
// Test import and export of the header-first token.
|
||||
@@ -341,7 +341,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooter_ODF)
|
||||
CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooter_DOC)
|
||||
{
|
||||
createSwDoc("first-header-footer.doc");
|
||||
saveAndReload(u"MS Word 97"_ustr);
|
||||
saveAndReload(TestFilter::DOC);
|
||||
|
||||
// Test import and export of a section's headerf/footerf properties.
|
||||
|
||||
@@ -387,7 +387,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFdo65655)
|
||||
};
|
||||
createSwDoc("fdo65655.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testImageInHeader)
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(4, getShapes());
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(4, getShapes());
|
||||
@@ -415,7 +415,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testImageInFooter)
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
@@ -432,7 +432,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf112694)
|
||||
|
||||
createSwDoc("tdf112694.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testContSectBreakHeaderFooter)
|
||||
|
||||
createSwDoc("cont-sect-break-header-footer.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
// Additional problem: top margin on page 3 was wrong.
|
||||
@@ -481,7 +481,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testContSectBreakHeaderFooter)
|
||||
CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf145998_firstHeader)
|
||||
{
|
||||
createSwDoc("tdf145998_firstHeader.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// Sanity check - always good to test when dealing with page styles and breaks.
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
@@ -561,7 +561,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testEvenPageOddPageFooter_Roundtrip)
|
||||
|
||||
// Load, save as OOXML and reload
|
||||
createSwDoc("tdf135216_evenOddFooter.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
|
||||
@@ -598,7 +598,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testEvenPageOddPageFooter_Roundtrip)
|
||||
CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf69635)
|
||||
{
|
||||
createSwDoc("tdf69635.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlHeader1 = parseExport(u"word/header1.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlHeader1);
|
||||
@@ -618,7 +618,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf69635)
|
||||
CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf113849_evenAndOddHeaders)
|
||||
{
|
||||
createSwDoc("tdf113849_evenAndOddHeaders.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Header2 text", u"L. J. Kendall"_ustr,
|
||||
@@ -657,7 +657,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstPageFooterEnabled)
|
||||
};
|
||||
createSwDoc("TestFirstFooterDisabled.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -750,7 +750,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testBnc519228OddBreaks)
|
||||
|
||||
createSwDoc("bnc519228_odd-breaksB.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
#endif
|
||||
@@ -893,7 +893,7 @@ CPPUNIT_TEST_FIXTURE(TestHFBase, testHFLinkToPrev)
|
||||
};
|
||||
createSwDoc("headerfooter-link-to-prev.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -915,14 +915,14 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testN750935)
|
||||
};
|
||||
createSwDoc("n750935.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testOnlyLeftPageStyle)
|
||||
{
|
||||
createSwDoc("TestPageStyleOnlyLeft.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// There should be 2 pages - first page should be blank
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
@@ -971,7 +971,7 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testMsoPosition)
|
||||
};
|
||||
|
||||
createSwDoc("bnc884615-mso-position.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verifyHeader();
|
||||
verifyFooter();
|
||||
}
|
||||
|
||||
@@ -738,7 +738,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyThenTable)
|
||||
// When layout is calculated during PDF export:
|
||||
// Then make sure that finishes without errors:
|
||||
// This crashed, due to a stack overflow in layout code.
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSplitFlyInTextSection)
|
||||
|
||||
@@ -409,7 +409,7 @@ void SwMacrosTest::testFdo68983()
|
||||
loadFromFile(u"odt/fdo68983.odt");
|
||||
Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW);
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// check that password-protected library survived store and re-load
|
||||
Reference<document::XEmbeddedScripts> xDocScr(mxComponent, UNO_QUERY_THROW);
|
||||
@@ -438,7 +438,7 @@ void SwMacrosTest::testFdo87530()
|
||||
xBasLibPwd->changeLibraryPassword(u"BarLibrary"_ustr, u""_ustr, u"foo"_ustr);
|
||||
}
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
{
|
||||
// check that password-protected library survived store and re-load
|
||||
@@ -461,7 +461,7 @@ void SwMacrosTest::testFdo87530()
|
||||
xBasLibPwd->changeLibraryPassword(u"FooLibrary"_ustr, u""_ustr, u"foo"_ustr);
|
||||
}
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// check that password-protected library survived store and re-load
|
||||
Reference<document::XEmbeddedScripts> xDocScr(mxComponent, UNO_QUERY_THROW);
|
||||
|
||||
@@ -151,7 +151,7 @@ CPPUNIT_TEST_FIXTURE(Test, testContentControlHeaderPDFExport)
|
||||
createSwDoc("content-control-header.docx");
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure all the expected text is there on page 2:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -215,7 +215,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCheckedCheckboxContentControlPDF)
|
||||
pWrtShell->GotoContentControl(rFormatContentControl);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that a checked checkbox form widget is emitted:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(Test, testContentControlPDFFontColor)
|
||||
pWrtShell->InsertContentControl(SwContentControlType::RICH_TEXT);
|
||||
|
||||
// When exporting that document to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that the widget in the PDF result has that custom font color:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -306,7 +306,7 @@ CPPUNIT_TEST_FIXTURE(Test, testContentControlPDFDropDownText)
|
||||
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
|
||||
|
||||
// When exporting that to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that the custom default is not lost:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
|
||||
+20
-20
@@ -110,7 +110,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testLastBibliographyPdfExport)
|
||||
createSwDoc("tdf158505.odt");
|
||||
|
||||
// It should be possible to export to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Without the accompanying fix, the export to PDF would get stuck in an infinite loop
|
||||
CPPUNIT_ASSERT(true);
|
||||
@@ -182,7 +182,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf159903)
|
||||
CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf159924)
|
||||
{
|
||||
createSwDoc("tdf159924.odt");
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
vcl::filter::PDFDocument aDocument;
|
||||
SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
|
||||
@@ -218,7 +218,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf159336)
|
||||
{
|
||||
SwExportFormFieldsGuard g;
|
||||
createSwDoc("tdf159336.odt");
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
vcl::filter::PDFDocument aDocument;
|
||||
SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
|
||||
@@ -276,7 +276,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport)
|
||||
xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure the field links the source.
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -313,7 +313,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport2)
|
||||
xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure the field links when the Target URL is set
|
||||
// (this test is important, isn't the same as the one above)
|
||||
@@ -349,7 +349,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport3)
|
||||
xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure there are no links since UseTargetURL is not set
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -385,7 +385,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport4)
|
||||
xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure the field links when the Target URL is set
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -430,7 +430,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport5)
|
||||
xTableIndex->update();
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure the mark links to the table when table is present
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -525,7 +525,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport6)
|
||||
CPPUNIT_ASSERT_EQUAL(iTabPos, sDocumentText.lastIndexOf(sExpectedPattern));
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure the mark links to the table even when format contains tab stop
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1055,7 +1055,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testContentControlPDF)
|
||||
pContentControl->SetAlias(u"mydesc"_ustr);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that a fillable form widget is emitted:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1086,7 +1086,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testContentControlPlaceholderPDF)
|
||||
pWrtShell->InsertContentControl(SwContentControlType::RICH_TEXT);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that a fillable form widget is emitted with the expected value:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1114,7 +1114,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testCheckboxContentControlPDF)
|
||||
pWrtShell->InsertContentControl(SwContentControlType::CHECKBOX);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that a checkbox form widget is emitted:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1144,7 +1144,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testDropdownContentControlPDF)
|
||||
pWrtShell->InsertContentControl(SwContentControlType::DROP_DOWN_LIST);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that a dropdown form widget is emitted:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1170,7 +1170,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testDropdownContentControlPDF2)
|
||||
SwExportFormFieldsGuard g;
|
||||
createSwDoc("tdf153040.docx");
|
||||
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Make sure that a dropdown form widget is emitted:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1199,7 +1199,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testDateContentControlPDF)
|
||||
pWrtShell->InsertContentControl(SwContentControlType::DATE);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that a date form widget is emitted:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1236,7 +1236,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testContentControlPDFFont)
|
||||
pWrtShell->InsertContentControl(SwContentControlType::RICH_TEXT);
|
||||
|
||||
// When exporting that document to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that the widget in the PDF result has that custom font size:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1264,7 +1264,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testComboContentControlPDF)
|
||||
pWrtShell->InsertContentControl(SwContentControlType::COMBO_BOX);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that a combo box form widget is emitted:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1306,7 +1306,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testRichContentControlPDF)
|
||||
pWrtShell->SetAttrSet(aSet);
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that a single fillable form widget is emitted:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1329,7 +1329,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testPlaceholderFieldPDF)
|
||||
createSwDoc("placeholder.fodt");
|
||||
|
||||
// When exporting to PDF (default setting is "create a PDF form"):
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
// Then make sure that a fillable form widget is emitted:
|
||||
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
|
||||
@@ -1683,7 +1683,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf161990)
|
||||
createSwDoc("tdf161990-subscripts.fodt");
|
||||
|
||||
// When exporting to PDF:
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
auto pPdfDocument = parsePDFExport();
|
||||
|
||||
// Check that both subscripts are positioned correctly relative to the non-subscript runs
|
||||
|
||||
@@ -853,7 +853,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testParagraphMarkerODFExport)
|
||||
createSwDoc("paragraph-marker.docx");
|
||||
|
||||
// When saving that as ODT + reload:
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// Then make sure that it still has the correct color:
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
@@ -871,7 +871,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testParagraphMarkerFormattedRun)
|
||||
createSwDoc("paragraph-marker-formatted-run.docx");
|
||||
|
||||
// When saving that as ODT + reload:
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// Then make sure that the numbering portion is still non-bold, matching Word:
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
@@ -989,7 +989,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testCollectFrameAtNodeWithLayout)
|
||||
calcLayout();
|
||||
|
||||
// When saving to ODT:
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
|
||||
// Then make sure the output is valid and hasa 1 <draw:frame>:
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(DocbookExportTest, testsimple)
|
||||
{
|
||||
createSwDoc("simple.docx");
|
||||
save(u"DocBook File"_ustr);
|
||||
save(TestFilter::DOCBOOK);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -33,7 +33,7 @@ CPPUNIT_TEST_FIXTURE(DocbookExportTest, testsimple)
|
||||
CPPUNIT_TEST_FIXTURE(DocbookExportTest, testtdf91095)
|
||||
{
|
||||
createSwDoc("tdf91095.docx");
|
||||
save(u"DocBook File"_ustr);
|
||||
save(TestFilter::DOCBOOK);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOpenODTWithRestrictedEmbeddedFont)
|
||||
CPPUNIT_ASSERT(fontMappingData.wasSubstituted(u"Naftalene"));
|
||||
|
||||
// Make sure that saving doesn't somehow embed the font
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXml = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXml, "//style:font-face[@style:name='Naftalene']");
|
||||
assertXPath(pXml, "//style:font-face[@style:name='Naftalene']/svg:font-face-src", 0);
|
||||
@@ -225,7 +225,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOpenODTWithRestrictedEmbeddedFont)
|
||||
CPPUNIT_ASSERT(!fontMappingData.wasSubstituted(u"Naftalene"));
|
||||
|
||||
// Make sure that saving doesn't somehow embed the font
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXml = parseExport(u"content.xml"_ustr);
|
||||
assertXPath(pXml, "//style:font-face[@style:name='Naftalene']");
|
||||
assertXPath(pXml, "//style:font-face[@style:name='Naftalene']/svg:font-face-src", 0);
|
||||
@@ -262,7 +262,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOpenDOCXWithRestrictedEmbeddedFont)
|
||||
CPPUNIT_ASSERT(!fontMappingData.wasSubstituted(u"Unsteady Oversteer"));
|
||||
|
||||
// Make sure that saving doesn't somehow embed the font
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/fontTable.xml"_ustr);
|
||||
assertXPath(pXml, "/w:fonts/w:font[@w:name='Naftalene']");
|
||||
assertXPath(pXml, "/w:fonts/w:font[@w:name='Naftalene']/w:embedRegular", 0);
|
||||
@@ -298,7 +298,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOpenDOCXWithRestrictedEmbeddedFont)
|
||||
CPPUNIT_ASSERT(!fontMappingData.wasSubstituted(u"Unsteady Oversteer"));
|
||||
|
||||
// Make sure that saving doesn't somehow embed the font
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/fontTable.xml"_ustr);
|
||||
assertXPath(pXml, "/w:fonts/w:font[@w:name='Naftalene']");
|
||||
assertXPath(pXml, "/w:fonts/w:font[@w:name='Naftalene']/w:embedRegular", 0);
|
||||
@@ -334,7 +334,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOpenDOCXWithRestrictedEmbeddedFont)
|
||||
CPPUNIT_ASSERT(!fontMappingData.wasSubstituted(u"Unsteady Oversteer"));
|
||||
|
||||
// Make sure that saving doesn't somehow embed the font
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/fontTable.xml"_ustr);
|
||||
assertXPath(pXml, "/w:fonts/w:font[@w:name='Naftalene']");
|
||||
assertXPath(pXml, "/w:fonts/w:font[@w:name='Naftalene']/w:embedRegular", 0);
|
||||
@@ -386,7 +386,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf167849)
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf166627)
|
||||
{
|
||||
createSwDoc("font_used_in_header_only.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// DejaVu Serif wasn't embedded before fix, because it was only seen used in header
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -455,7 +455,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontEmbedding)
|
||||
// CASE 1 - no font embedding enabled
|
||||
|
||||
// Save the document
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT(maTempFile.IsValid());
|
||||
|
||||
// Check setting - No font embedding should be enabled
|
||||
@@ -497,7 +497,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontEmbedding)
|
||||
xProps->setPropertyValue(u"EmbedOnlyUsedFonts"_ustr, uno::Any(false));
|
||||
|
||||
// Save the document again
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT(maTempFile.IsValid());
|
||||
|
||||
// Check setting - font embedding should be enabled
|
||||
@@ -554,7 +554,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontEmbedding)
|
||||
xProps->setPropertyValue(u"EmbedComplexScriptFonts"_ustr, uno::Any(true));
|
||||
|
||||
// Save the document again
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT(maTempFile.IsValid());
|
||||
|
||||
// Check setting - font embedding should be enabled + embed only used fonts and scripts
|
||||
@@ -623,7 +623,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEmbeddedFontProps)
|
||||
xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY_THROW);
|
||||
xProps->setPropertyValue(u"EmbedFonts"_ustr, uno::Any(true));
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
#if !defined(MACOSX)
|
||||
// Test that font style/weight of embedded fonts is exposed.
|
||||
@@ -674,7 +674,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontEmbeddingDOCX)
|
||||
xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT_EQUAL(uno::Any(true), xProps->getPropertyValue(u"EmbedFonts"_ustr));
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/fontTable.xml"_ustr);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf113696)
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
|
||||
save(u"OpenDocument Text Flat XML"_ustr);
|
||||
save(TestFilter::FODT);
|
||||
// Test that an image which is written in svm format (image/x-vclgraphic)
|
||||
// is accompanied by a png fallback graphic.
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
@@ -46,7 +46,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf113696WriterImage)
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
|
||||
save(u"OpenDocument Text Flat XML"_ustr);
|
||||
save(TestFilter::FODT);
|
||||
// Same as testTdf113696, but with a writer image instead of a draw image
|
||||
// (they use different code paths).
|
||||
xmlDocUniquePtr pXmlDoc = parseExportedFile();
|
||||
@@ -82,7 +82,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSvgImageRoundtrip)
|
||||
|
||||
createSwDoc("SvgImageTest.fodt");
|
||||
verify();
|
||||
saveAndReload(u"OpenDocument Text Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODT);
|
||||
verify();
|
||||
}
|
||||
|
||||
|
||||
@@ -101,24 +101,24 @@ public:
|
||||
|
||||
void Test::testEmbeddedGraphicRoundtrip()
|
||||
{
|
||||
OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"Rich Text Format"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
// Check whether the export code swaps in the image which was swapped out before by auto mechanism
|
||||
|
||||
createSwDoc("document_with_two_images.odt");
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check whether graphic exported well after it was swapped out
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 2, getShapes());
|
||||
|
||||
// First image
|
||||
@@ -157,21 +157,21 @@ void Test::testEmbeddedGraphicRoundtrip()
|
||||
|
||||
void Test::testLinkedGraphicRT()
|
||||
{
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
// "Rich Text Format", Note: picture is there, but SwGrfNode is not found?
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
// TestFilter::RTF, Note: picture is there, but SwGrfNode is not found?
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("document_with_linked_graphic.odt");
|
||||
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pDoc);
|
||||
@@ -213,22 +213,22 @@ void Test::testImageWithSpecialID()
|
||||
// Check how LO handles when the imported graphic's ID is different from that one
|
||||
// which is generated by LO.
|
||||
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"Rich Text Format"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("images_with_special_IDs.odt");
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check whether graphic exported well
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 2, getShapes());
|
||||
|
||||
uno::Reference<drawing::XShape> xImage = getShape(1);
|
||||
@@ -296,22 +296,22 @@ void Test::testGraphicShape()
|
||||
// There are two kind of images in Writer: 1) Writer specific handled by SwGrfNode and
|
||||
// 2) graphic shape handled by SdrGrafObj (e.g. after copy&paste from Impress).
|
||||
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"Rich Text Format"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("graphic_shape.odt");
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check whether graphic exported well
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 2, getShapes());
|
||||
|
||||
uno::Reference<drawing::XShape> xImage = lcl_getShape(mxComponent, true);
|
||||
@@ -330,13 +330,13 @@ void Test::testGraphicShape()
|
||||
}
|
||||
|
||||
// MS filters make this kind of linked images broken !?
|
||||
if (rFilterName != "writer8")
|
||||
if (eFilterName != TestFilter::ODT)
|
||||
return;
|
||||
|
||||
// Second image is a linked one
|
||||
xImage = lcl_getShape(mxComponent, false);
|
||||
XPropSet.set(xImage, uno::UNO_QUERY);
|
||||
const OString sFailedImageLoad = OString::Concat("Couldn't load the shape/image for ") + rFilterName.toUtf8();
|
||||
const OString sFailedImageLoad = OString::Concat("Couldn't load the shape/image for ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
CPPUNIT_ASSERT_MESSAGE(sFailedImageLoad.getStr(), xImage.is());
|
||||
|
||||
// Check size
|
||||
@@ -385,22 +385,22 @@ void Test::testMultipleIdenticalGraphics()
|
||||
// after loading them again. This test check that the de-duplication
|
||||
// works as expected.
|
||||
|
||||
const OUString aFilterNames[] {
|
||||
u"writer8"_ustr,
|
||||
//"Rich Text Format", // doesn't work correctly for now
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
//TestFilter::RTF, doesn't work correctly for now
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("multiple_identical_graphics.odt");
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check whether graphic exported well
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
auto aGraphics = lcl_getGraphics(mxComponent);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), size_t(5), aGraphics.size());
|
||||
@@ -417,7 +417,7 @@ void Test::testMultipleIdenticalGraphics()
|
||||
// Check all addresses are the same
|
||||
bool bResult = std::equal(aGfxLinkAddresses.begin() + 1, aGfxLinkAddresses.end(), aGfxLinkAddresses.begin());
|
||||
const OString sGraphicNotTheSameFailedMessage = OString::Concat("Graphics not the same for filter: '") +
|
||||
rFilterName.toUtf8() + OString::Concat("'");
|
||||
TestFilterNames.at(eFilterName).toUtf8() + OString::Concat("'");
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sGraphicNotTheSameFailedMessage.getStr(), true, bResult);
|
||||
}
|
||||
}
|
||||
@@ -427,21 +427,21 @@ void Test::testCharHighlightBody()
|
||||
// MS Word has two kind of character backgrounds called character shading and highlighting
|
||||
// MS filters handle these attributes separately, but ODF export merges them into one background attribute
|
||||
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"Rich Text Format"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("char_highlight.docx");
|
||||
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
const uno::Reference< text::XTextRange > xPara = getParagraph(1);
|
||||
// Both highlight and background
|
||||
@@ -470,7 +470,7 @@ void Test::testCharHighlightBody()
|
||||
case 16: nHighlightColor = COL_LIGHTGRAY; break; //light gray 0xC0C0C0
|
||||
}
|
||||
|
||||
if (rFilterName == "writer8")
|
||||
if (eFilterName == TestFilter::ODT)
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), COL_TRANSPARENT, getProperty<Color>(xRun,u"CharHighlight"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), nHighlightColor, getProperty<Color>(xRun,u"CharBackColor"_ustr));
|
||||
@@ -485,7 +485,7 @@ void Test::testCharHighlightBody()
|
||||
// Only highlight
|
||||
{
|
||||
const uno::Reference<beans::XPropertySet> xRun(getRun(xPara,18), uno::UNO_QUERY);
|
||||
if (rFilterName == "writer8")
|
||||
if (eFilterName == TestFilter::ODT)
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), COL_TRANSPARENT, getProperty<Color>(xRun,u"CharHighlight"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), COL_LIGHTRED, getProperty<Color>(xRun,u"CharBackColor"_ustr));
|
||||
@@ -511,20 +511,21 @@ void Test::testCharStyleHighlight()
|
||||
// MS Word has two kind of character backgrounds called character shading and highlighting.
|
||||
// However, their character style can only accept shading. It ignores the highlighting value.
|
||||
|
||||
const OUString aFilterNames[] = {
|
||||
u"Rich Text Format"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("tdf138345_charstyle_highlight.odt");
|
||||
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xCharStyle;
|
||||
getStyles(u"CharacterStyles"_ustr)->getByName(u"charBackground"_ustr) >>= xCharStyle;
|
||||
@@ -590,7 +591,7 @@ void Test::testCharHighlightODF()
|
||||
}
|
||||
}
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
xPara.set(getParagraph(1));
|
||||
for (int i = 1; i <= 4; ++i)
|
||||
@@ -624,22 +625,22 @@ void Test::testMSCharBackgroundEditing()
|
||||
// Simulate the editing process of imported MSO character background attributes
|
||||
// and check how export behaves.
|
||||
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"Rich Text Format"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
auto batch = comphelper::ConfigurationChanges::create();
|
||||
officecfg::Office::Common::Filter::Microsoft::Export::CharBackgroundToHighlighting::set(true, batch);
|
||||
batch->commit();
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("char_background_editing.docx");
|
||||
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
// Check whether import was done on the right way
|
||||
uno::Reference< text::XTextRange > xPara = getParagraph(1);
|
||||
@@ -691,7 +692,7 @@ void Test::testMSCharBackgroundEditing()
|
||||
}
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check whether background was exported as highlighting
|
||||
xPara.set(getParagraph(1));
|
||||
@@ -706,7 +707,7 @@ void Test::testMSCharBackgroundEditing()
|
||||
case 4: nBackColor = COL_LIGHTMAGENTA; break; //light magenta 0xff00ff
|
||||
}
|
||||
const uno::Reference<beans::XPropertySet> xRun(getRun(xPara,i), uno::UNO_QUERY);
|
||||
if (rFilterName == "writer8")
|
||||
if (eFilterName == TestFilter::ODT)
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), COL_TRANSPARENT, getProperty<Color>(xRun,u"CharHighlight"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), nBackColor, getProperty<Color>(xRun,u"CharBackColor"_ustr));
|
||||
@@ -725,24 +726,24 @@ void Test::testCharBackgroundToHighlighting()
|
||||
// MSO highlighting has less kind of values so let's see how LO character background is converted
|
||||
// to these values
|
||||
|
||||
const OUString aFilterNames[] = {
|
||||
u"Rich Text Format"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("char_background.odt");
|
||||
|
||||
OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
auto batch = comphelper::ConfigurationChanges::create();
|
||||
officecfg::Office::Common::Filter::Microsoft::Export::CharBackgroundToHighlighting::set(true, batch);
|
||||
batch->commit();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check highlight color
|
||||
const uno::Reference< text::XTextRange > xPara = getParagraph(1);
|
||||
@@ -908,22 +909,22 @@ void Test::testNestedFieldmark()
|
||||
CPPUNIT_ASSERT_EQUAL(pInner, rIDMA.getInnerFieldmarkFor(innerPos));
|
||||
};
|
||||
|
||||
std::pair<OUString, OUString> const aFilterNames[] = {
|
||||
{"writer8", "fieldmark_QUOTE_nest.fodt"},
|
||||
{"Office Open XML Text", "fieldmark_QUOTE_nest.docx"},
|
||||
{"Rich Text Format", "fieldmark_QUOTE_nest.rtf"},
|
||||
std::pair<TestFilter, OUString> const aFilterNames[] = {
|
||||
{TestFilter::ODT, "fieldmark_QUOTE_nest.fodt"},
|
||||
{TestFilter::DOCX, "fieldmark_QUOTE_nest.docx"},
|
||||
{TestFilter::RTF, "fieldmark_QUOTE_nest.rtf"},
|
||||
};
|
||||
|
||||
for (auto const & rFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc(rFilterName.second.toUtf8().getStr());
|
||||
|
||||
verify(rFilterName.first + ", load");
|
||||
verify(TestFilterNames.at(rFilterName.first) + ", load");
|
||||
|
||||
// Export the document and import again
|
||||
saveAndReload(rFilterName.first);
|
||||
|
||||
verify(rFilterName.first + " exported-reload");
|
||||
verify(TestFilterNames.at(rFilterName.first) + " exported-reload");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -972,7 +973,7 @@ void Test::testODF13()
|
||||
// export ODF 1.3
|
||||
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// check XML
|
||||
xmlDocUniquePtr pContentXml = parseExport(u"content.xml"_ustr);
|
||||
@@ -1030,7 +1031,7 @@ void Test::testODF13()
|
||||
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_012);
|
||||
|
||||
// don't reload - no point
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
|
||||
// check XML
|
||||
xmlDocUniquePtr pContentXml = parseExport(u"content.xml"_ustr);
|
||||
@@ -1051,11 +1052,11 @@ void Test::testODF13()
|
||||
|
||||
void Test::testRedlineFlags()
|
||||
{
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"Rich Text Format"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
createSwDoc();
|
||||
@@ -1080,30 +1081,30 @@ void Test::testRedlineFlags()
|
||||
rIDRA.GetRedlineFlags() & ~RedlineFlags::ShowDelete;
|
||||
rIDRA.SetRedlineFlags(nRedlineFlags);
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
// export the document
|
||||
save(rFilterName);
|
||||
save(eFilterName);
|
||||
|
||||
// tdf#97103 check that redline mode is properly restored
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(
|
||||
OString(OString::Concat("redline mode not restored in ") + rFilterName.toUtf8()).getStr(),
|
||||
OString(OString::Concat("redline mode not restored in ") + TestFilterNames.at(eFilterName).toUtf8()).getStr(),
|
||||
static_cast<int>(nRedlineFlags), static_cast<int>(rIDRA.GetRedlineFlags()));
|
||||
}
|
||||
}
|
||||
|
||||
void Test::testBulletAsImage()
|
||||
{
|
||||
OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
u"Rich Text Format"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
createSwDoc("BulletAsImage.odt");
|
||||
|
||||
@@ -1154,7 +1155,7 @@ void Test::testBulletAsImage()
|
||||
}
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
{
|
||||
uno::Reference<text::XTextRange> xPara(getParagraph(1));
|
||||
@@ -1197,18 +1198,18 @@ void Test::testBulletAsImage()
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), tools::Long(16), aGraphic.GetSizePixel().Height());
|
||||
|
||||
// Graphic Size
|
||||
if (rFilterName == "write8") // ODT is correct
|
||||
if (eFilterName == TestFilter::ODT) // ODT is correct
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), sal_Int32(400), aSize.Width);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), sal_Int32(400), aSize.Height);
|
||||
}
|
||||
// FIXME: MS Filters don't work correctly for graphic bullet size
|
||||
else if (rFilterName == "Office Open XML Text" || rFilterName == "Rich Text Format")
|
||||
else if (eFilterName == TestFilter::DOCX || eFilterName == TestFilter::RTF)
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), sal_Int32(279), aSize.Width);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), sal_Int32(279), aSize.Height);
|
||||
}
|
||||
else if (rFilterName == "MS Word 97")
|
||||
else if (eFilterName == TestFilter::DOC)
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), sal_Int32(296), aSize.Width);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), sal_Int32(296), aSize.Height);
|
||||
@@ -1715,7 +1716,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143311)
|
||||
xDrawPage->add(xShape);
|
||||
}
|
||||
// check DOCX filters
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), u"Decorative"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(2), u"Decorative"_ustr));
|
||||
{
|
||||
@@ -1725,7 +1726,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143311)
|
||||
xStyle->setPropertyValue(u"Decorative"_ustr, uno::Any(true));
|
||||
}
|
||||
// check ODF filters
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), u"Decorative"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(2), u"Decorative"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getStyles(u"FrameStyles"_ustr)->getByName(u"Formula"_ustr), u"Decorative"_ustr));
|
||||
@@ -1819,20 +1820,20 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143311)
|
||||
|
||||
void Test::testTextFormField()
|
||||
{
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (const OUString& rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("text_form_field.odt");
|
||||
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check the document after round trip
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
@@ -1869,20 +1870,20 @@ void Test::testTextFormField()
|
||||
|
||||
void Test::testCheckBoxFormField()
|
||||
{
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (const OUString& rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("checkbox_form_field.odt");
|
||||
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check the document after round trip
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
@@ -1896,7 +1897,7 @@ void Test::testCheckBoxFormField()
|
||||
{
|
||||
::sw::mark::Fieldmark* pFieldmark = dynamic_cast<::sw::mark::Fieldmark*>(*aIter);
|
||||
|
||||
if(rFilterName == "Office Open XML Text") // OOXML import also generates bookmarks
|
||||
if(eFilterName == TestFilter::DOCX) // OOXML import also generates bookmarks
|
||||
{
|
||||
if(!pFieldmark)
|
||||
continue;
|
||||
@@ -1920,20 +1921,21 @@ void Test::testCheckBoxFormField()
|
||||
|
||||
void Test::testDropDownFormField()
|
||||
{
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"MS Word 97"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::RTF,
|
||||
TestFilter::DOC,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (const OUString& rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("dropdown_form_field.odt");
|
||||
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check the document after round trip
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
@@ -1994,22 +1996,22 @@ void Test::testDropDownFormField()
|
||||
|
||||
void Test::testDateFormField()
|
||||
{
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (const OUString& rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("date_form_field.odt");
|
||||
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check the document after round trip
|
||||
if (rFilterName == "writer8")
|
||||
if (eFilterName == TestFilter::ODT)
|
||||
{
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
|
||||
@@ -2174,22 +2176,22 @@ void Test::testDateFormField()
|
||||
|
||||
void Test::testDateFormFieldCharacterFormatting()
|
||||
{
|
||||
const OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (const OUString& rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
createSwDoc("date_form_field_char_formatting.odt");
|
||||
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
// Export the document and import again for a check
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Check the document after round trip
|
||||
if (rFilterName == "writer8")
|
||||
if (eFilterName == TestFilter::ODT)
|
||||
{
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
|
||||
@@ -2213,7 +2215,7 @@ void Test::testDateFormFieldCharacterFormatting()
|
||||
uno::Reference<beans::XPropertySet> xTextPortion(getRun(getParagraph(1), 1), uno::UNO_QUERY);
|
||||
OUString aPortionType;
|
||||
xTextPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aPortionType;
|
||||
CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), u"ContentControl"_ustr, aPortionType);
|
||||
|
||||
uno::Reference<text::XTextContent> xContentControl;
|
||||
xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
|
||||
@@ -2238,12 +2240,12 @@ void Test::testDateFormFieldCharacterFormatting()
|
||||
|
||||
void Test::testSvgImageSupport()
|
||||
{
|
||||
OUString aFilterNames[] = {
|
||||
u"writer8"_ustr,
|
||||
u"Office Open XML Text"_ustr,
|
||||
TestFilter aFilterNames[] = {
|
||||
TestFilter::ODT,
|
||||
TestFilter::DOCX,
|
||||
};
|
||||
|
||||
for (OUString const & rFilterName : aFilterNames)
|
||||
for (TestFilter eFilterName : aFilterNames)
|
||||
{
|
||||
// Use case to import a document containing a SVG image, export in target format, import and check if the
|
||||
// SVG image is present and as expected in the document
|
||||
@@ -2252,10 +2254,10 @@ void Test::testSvgImageSupport()
|
||||
createSwDoc("SvgImageTest.odt");
|
||||
|
||||
// Export the document in target format and import again
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(eFilterName);
|
||||
|
||||
// Prepare fail message (writing which import/export filter was used)
|
||||
const OString sFailedMessage = "Failed on filter: "_ostr + rFilterName.toUtf8();
|
||||
const OString sFailedMessage = "Failed on filter: "_ostr + TestFilterNames.at(eFilterName).toUtf8();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 1, getShapes());
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo81276)
|
||||
setImportFilterName(u"HTML (StarWriter)"_ustr);
|
||||
createSwDoc("fdo81276.html");
|
||||
verify();
|
||||
saveAndReload(u"HTML (StarWriter)"_ustr);
|
||||
saveAndReload(TestFilter::HTML_WRITER);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo62336)
|
||||
// The problem was essentially a crash during table export as docx/rtf/html
|
||||
// If calc-layout is enabled, the crash does not occur, that's why loadFromFile/save is used
|
||||
loadFromFile(u"fdo62336.docx");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo86857)
|
||||
@@ -94,7 +94,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo86857)
|
||||
setImportFilterName(u"HTML (StarWriter)"_ustr);
|
||||
createSwDoc("fdo86857.html");
|
||||
verify();
|
||||
saveAndReload(u"HTML (StarWriter)"_ustr);
|
||||
saveAndReload(TestFilter::HTML_WRITER);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -143,14 +143,14 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testCharacterBorder)
|
||||
};
|
||||
createSwDoc("charborder.odt");
|
||||
verify();
|
||||
saveAndReload(u"HTML (StarWriter)"_ustr);
|
||||
saveAndReload(TestFilter::HTML_WRITER);
|
||||
verify();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportOfImages)
|
||||
{
|
||||
createSwDoc("textAndImage.docx");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -162,7 +162,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportOfImagesWithSkipImagesEnabled)
|
||||
{
|
||||
createSwDoc("textAndImage.docx");
|
||||
setFilterOptions(u"SkipImages"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -175,7 +175,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbedded)
|
||||
{
|
||||
createSwDoc("skipimage-embedded.doc");
|
||||
setFilterOptions(u"SkipImages"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
// Embedded spreadsheet was exported as image, so content was lost. Make
|
||||
// sure it's exported as HTML instead.
|
||||
@@ -194,7 +194,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbeddedDocument)
|
||||
{
|
||||
createSwDoc("skipimage-embedded-document.docx");
|
||||
setFilterOptions(u"SkipImages"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
// Similar to testSkipImagesEmbedded, but with an embedded Writer object,
|
||||
// not a Calc one, and this time OOXML, not WW8.
|
||||
@@ -210,7 +210,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testSkipImagesEmbeddedDocument)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportImageProperties)
|
||||
{
|
||||
createSwDoc("HTMLImage.odt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportImageProperties)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportCheckboxRadioButtonState)
|
||||
{
|
||||
createSwDoc("checkbox-radiobutton.doc");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -274,7 +274,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportCheckboxRadioButtonState)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportUrlEncoding)
|
||||
{
|
||||
createSwDoc("tdf76291.odt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -286,7 +286,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportUrlEncoding)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportInternalUrl)
|
||||
{
|
||||
createSwDoc("tdf90905.odt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -298,7 +298,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportInternalUrl)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportImageBulletList)
|
||||
{
|
||||
createSwDoc("tdf66822.odt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -338,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExportImageBulletList)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf83890)
|
||||
{
|
||||
createSwDoc("tdf83890.odt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -348,7 +348,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf83890)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExtbChars)
|
||||
{
|
||||
createSwWebDoc("extb.html");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
OUString aExpected(u"\U00024b62"_ustr);
|
||||
// Assert that UTF8 encoded non-BMP Unicode character is correct
|
||||
uno::Reference<text::XTextRange> xTextRange1 = getRun(getParagraph(1), 1);
|
||||
@@ -362,7 +362,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testExtbChars)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testNormalImageExport)
|
||||
{
|
||||
createSwDoc("textAndImage.docx");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -377,7 +377,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testEmbedImagesEnabled)
|
||||
{
|
||||
createSwDoc("textAndImage.docx");
|
||||
setFilterOptions(u"EmbedImages"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -396,7 +396,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTML)
|
||||
{
|
||||
createSwWebDoc("hello.html");
|
||||
setFilterOptions(u"XHTML"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
OString aExpected("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML"_ostr);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
@@ -417,7 +417,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfParagraph)
|
||||
setImportFilterName(u"HTML (StarWriter)"_ustr);
|
||||
createSwDoc("reqif-p.xhtml");
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
@@ -469,7 +469,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOleData)
|
||||
createSwDoc("reqif-ole-data.xhtml");
|
||||
verify();
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
saveAndReload(u"HTML (StarWriter)"_ustr);
|
||||
saveAndReload(TestFilter::HTML_WRITER);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOleImg)
|
||||
createSwDoc("reqif-ole-img.xhtml");
|
||||
verify();
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
saveAndReload(u"HTML (StarWriter)"_ustr);
|
||||
saveAndReload(TestFilter::HTML_WRITER);
|
||||
verify();
|
||||
|
||||
// "type" attribute was missing for the inner <object> element.
|
||||
@@ -580,7 +580,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfJpgImg)
|
||||
setImportFilterName(u"HTML (StarWriter)"_ustr);
|
||||
createSwDoc("reqif-jpg-img.xhtml");
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
@@ -596,7 +596,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable)
|
||||
setImportFilterName(u"HTML (StarWriter)"_ustr);
|
||||
createSwDoc("reqif-table.xhtml");
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
xmlDocUniquePtr pDoc = WrapReqifFromTempFile();
|
||||
|
||||
@@ -619,7 +619,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfTable2)
|
||||
{
|
||||
createSwDoc("reqif-table2.odt");
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
@@ -659,7 +659,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTMLUseCSS)
|
||||
{
|
||||
createSwDoc("xhtml-css.odt");
|
||||
setFilterOptions(u"XHTML"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
@@ -677,7 +677,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfList)
|
||||
setImportFilterName(u"HTML (StarWriter)"_ustr);
|
||||
createSwDoc("reqif-list.xhtml");
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
@@ -722,7 +722,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOle2)
|
||||
createSwDoc("reqif-ole2.xhtml");
|
||||
verify();
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
saveAndReload(u"HTML (StarWriter)"_ustr);
|
||||
saveAndReload(TestFilter::HTML_WRITER);
|
||||
verify();
|
||||
|
||||
// Check that the replacement graphic is exported at RTF level.
|
||||
@@ -766,14 +766,14 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testReqIfOle2Odg)
|
||||
createSwDoc("reqif-ole-odg.xhtml");
|
||||
verify();
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
saveAndReload(u"HTML (StarWriter)"_ustr);
|
||||
saveAndReload(TestFilter::HTML_WRITER);
|
||||
verify();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testList)
|
||||
{
|
||||
createSwWebDoc("list.html");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
sal_uInt64 nLength = pStream->TellEnd();
|
||||
@@ -786,7 +786,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testList)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTransparentImage)
|
||||
{
|
||||
createSwDoc("transparent-image.odt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -820,7 +820,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testOleNodataReqIf)
|
||||
{
|
||||
createSwDoc("reqif-ole-nodata.odt");
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
// This failed, io::IOException was thrown during the filter() call.
|
||||
xmlDocUniquePtr pDoc = WrapReqifFromTempFile();
|
||||
@@ -837,7 +837,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testNoLangReqIf)
|
||||
{
|
||||
createSwDoc("reqif-no-lang.odt");
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
xmlDocUniquePtr pDoc = WrapReqifFromTempFile();
|
||||
|
||||
@@ -848,7 +848,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testNoLangReqIf)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFieldShade)
|
||||
{
|
||||
createSwDoc("field-shade.odt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -866,7 +866,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFieldShade)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf132739)
|
||||
{
|
||||
createSwDoc("tdf132739.odt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -881,7 +881,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFieldShadeReqIf)
|
||||
{
|
||||
createSwDoc("field-shade-reqif.odt");
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
@@ -898,7 +898,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFieldShadeReqIf)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf126879)
|
||||
{
|
||||
createSwDoc("tdf126879.odt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
static constexpr OString aExpected("<!DOCTYPE html>"_ostr);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
@@ -1044,7 +1044,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PDF)
|
||||
|
||||
// Now import this back and check the ODT result.
|
||||
ImportFromReqif(maTempFile.GetURL());
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
|
||||
maTempFile.GetURL());
|
||||
@@ -1067,7 +1067,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1Paint)
|
||||
ImportFromReqif(createFileURL(u"paint-ole.xhtml"));
|
||||
|
||||
// Save it as ODT to inspect the result of the OLE1 -> OLE2 conversion.
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
|
||||
maTempFile.GetURL());
|
||||
|
||||
@@ -110,7 +110,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testShapeAsImageHtml)
|
||||
xDrawPageSupplier->getDrawPage()->add(xShape);
|
||||
|
||||
// When exporting to plain HTML:
|
||||
saveAndReload(u"HTML (StarWriter)"_ustr);
|
||||
saveAndReload(TestFilter::HTML_WRITER);
|
||||
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - Expected:
|
||||
@@ -133,7 +133,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testJson)
|
||||
// When exporting to HTML, and specifying options as JSON:
|
||||
setFilterOptions(u"{\"XhtmlNs\":{\"type\":\"string\", \"value\":\"reqif-xhtml\"},"
|
||||
"\"ShapeDPI\":{\"type\":\"long\",\"value\":\"192\"}}"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
// Then make sure those options are not ignored:
|
||||
// Without the accompanying fix in place, this test would have failed, as GetPngPath() expects
|
||||
@@ -489,7 +489,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testClearingBreak)
|
||||
createSwWebDoc("clearing-break.html");
|
||||
// Then make sure that the clear property of the break is not ignored:
|
||||
verify();
|
||||
saveAndReload(u"HTML (StarWriter)"_ustr);
|
||||
saveAndReload(TestFilter::HTML_WRITER);
|
||||
// Make sure that the clear property of the break is not ignored during export:
|
||||
verify();
|
||||
}
|
||||
@@ -552,7 +552,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testImageKeepRatio)
|
||||
xBodyText->insertTextContent(xCursor, xTextContent, false);
|
||||
|
||||
// When exporting to HTML:
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
// Then make sure that the width is not a fixed size, that would break on resizing the browser
|
||||
// window:
|
||||
@@ -623,7 +623,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf114769)
|
||||
xRun->setPropertyValue(u"HyperLinkURL"_ustr, uno::Any(u".\\another.odt"_ustr));
|
||||
|
||||
// Export
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
htmlDocUniquePtr pHtmlDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pHtmlDoc);
|
||||
@@ -638,7 +638,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf114769)
|
||||
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf153923)
|
||||
{
|
||||
createSwDoc("TableWithIndent.fodt");
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
|
||||
// Parse it as XML (strict!)
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
|
||||
@@ -210,7 +210,7 @@ void SwHtmlDomExportTest::ParseOle1FromRtfUrl(const OUString& rRtfUrl, SvMemoryS
|
||||
void SwHtmlDomExportTest::ExportToReqif()
|
||||
{
|
||||
setFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
|
||||
save(u"HTML (StarWriter)"_ustr);
|
||||
save(TestFilter::HTML_WRITER);
|
||||
}
|
||||
|
||||
void SwHtmlDomExportTest::ExportToHTML()
|
||||
|
||||
@@ -27,7 +27,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testImageEmbedding)
|
||||
{
|
||||
createSwDoc("image-mimetype.odt");
|
||||
setFilterOptions(u"UTF8"_ustr);
|
||||
save(u"XHTML Writer File"_ustr);
|
||||
save(TestFilter::XHTML_WRITER);
|
||||
htmlDocUniquePtr pDoc = parseHtml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
@@ -41,7 +41,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf131812)
|
||||
{
|
||||
createSwDoc("tdf131812.odt");
|
||||
setFilterOptions(u"UTF8"_ustr);
|
||||
save(u"XHTML Writer File"_ustr);
|
||||
save(TestFilter::XHTML_WRITER);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
sal_uInt64 nLength = pStream->TellEnd();
|
||||
@@ -56,7 +56,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf146264)
|
||||
{
|
||||
createSwDoc("tdf146264.odt");
|
||||
setFilterOptions(u"UTF8"_ustr);
|
||||
save(u"XHTML Writer File"_ustr);
|
||||
save(TestFilter::XHTML_WRITER);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
sal_uInt64 nLength = pStream->TellEnd();
|
||||
@@ -75,7 +75,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf167910)
|
||||
{
|
||||
createSwDoc("tdf167910.fodt");
|
||||
setFilterOptions(u"UTF8"_ustr);
|
||||
save(u"XHTML Writer File"_ustr);
|
||||
save(TestFilter::XHTML_WRITER);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
sal_uInt64 nLength = pStream->TellEnd();
|
||||
@@ -105,7 +105,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf118637)
|
||||
{
|
||||
createSwDoc("tdf118637.odt");
|
||||
setFilterOptions(u"UTF8"_ustr);
|
||||
save(u"XHTML Writer File"_ustr);
|
||||
save(TestFilter::XHTML_WRITER);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
sal_uInt64 nLength = pStream->TellEnd();
|
||||
@@ -118,7 +118,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf145361)
|
||||
{
|
||||
createSwDoc("tdf145361.odt");
|
||||
setFilterOptions(u"UTF8"_ustr);
|
||||
save(u"XHTML Writer File"_ustr);
|
||||
save(TestFilter::XHTML_WRITER);
|
||||
// Without the fix in place, this test would have failed with
|
||||
// - SfxBaseModel::impl_store <file:///tmp/lu66091ameq.tmp> failed: 0xc10(Error Area:Io Class:Write Code:16)
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
@@ -133,7 +133,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf142483)
|
||||
{
|
||||
createSwDoc("tdf142483.odt");
|
||||
setFilterOptions(u"UTF8"_ustr);
|
||||
save(u"XHTML Writer File"_ustr);
|
||||
save(TestFilter::XHTML_WRITER);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
sal_uInt64 nLength = pStream->TellEnd();
|
||||
@@ -172,7 +172,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf107696)
|
||||
{
|
||||
createSwDoc("tdf107696.odt");
|
||||
setFilterOptions(u"UTF8"_ustr);
|
||||
save(u"XHTML Writer File"_ustr);
|
||||
save(TestFilter::XHTML_WRITER);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
sal_uInt64 nLength = pStream->TellEnd();
|
||||
@@ -202,7 +202,7 @@ CPPUNIT_TEST_FIXTURE(XHtmlExportTest, testTdf66305)
|
||||
{
|
||||
createSwDoc("tdf66305.odt");
|
||||
setFilterOptions(u"UTF8"_ustr);
|
||||
save(u"XHTML Writer File"_ustr);
|
||||
save(TestFilter::XHTML_WRITER);
|
||||
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
|
||||
CPPUNIT_ASSERT(pStream);
|
||||
sal_uInt64 nLength = pStream->TellEnd();
|
||||
|
||||
@@ -3595,7 +3595,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf109137)
|
||||
createSwDoc("tdf109137.docx");
|
||||
// FIXME: Error: attribute "text:start-value" has a bad value
|
||||
skipValidation();
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
// This was 0, the blue rectangle moved from the 1st to the 2nd page.
|
||||
assertXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/fly/notxt",
|
||||
|
||||
@@ -1392,7 +1392,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTableCellInvalidate)
|
||||
// inline the loading because currently properties can't be passed...
|
||||
OUString const url(createFileURL(u"table_cell_overlap.fodt"));
|
||||
loadWithParams(url, comphelper::containerToSequence(aFilterOptions));
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
// somehow these 2 rows overlapped in the PDF unless CalcLayout() runs
|
||||
|
||||
@@ -65,7 +65,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf134463)
|
||||
CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf117188)
|
||||
{
|
||||
createSwDoc("tdf117188.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
OUString sWidth = getXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/bounds", "width");
|
||||
OUString sHeight = getXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/bounds", "height");
|
||||
@@ -2124,7 +2124,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf122607_regression)
|
||||
// inline the loading because currently properties can't be passed...
|
||||
OUString const url(createFileURL(u"tdf122607_leerzeile.odt"));
|
||||
loadWithParams(url, comphelper::containerToSequence(aFilterOptions));
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
// somehow these 2 rows overlapped in the PDF unless CalcLayout() runs
|
||||
@@ -2152,7 +2152,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, TestTdf150616)
|
||||
// inline the loading because currently properties can't be passed...
|
||||
OUString const url(createFileURL(u"in_056132_mod.odt"));
|
||||
loadWithParams(url, comphelper::containerToSequence(aFilterOptions));
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
@@ -2962,7 +2962,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf156724)
|
||||
// inline the loading because currently properties can't be passed...
|
||||
OUString const url(createFileURL(u"fdo56797-2-min.odt"));
|
||||
loadWithParams(url, comphelper::containerToSequence(aFilterOptions));
|
||||
save(u"writer_pdf_Export"_ustr);
|
||||
save(TestFilter::PDF_WRITER);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
// both pages have a tab frame and one footnote
|
||||
|
||||
@@ -1019,7 +1019,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter4, testTdf147666)
|
||||
dispatchCommand(mxComponent, u".uno:GoToEndOfPara"_ustr, {});
|
||||
dispatchCommand(mxComponent, u".uno:GoDown"_ustr, {});
|
||||
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
sal_Int32 nNonInsertedViewTop = getXPathContent(parseExport(u"settings.xml"_ustr),
|
||||
"//config:config-item[@config:name='ViewTop']")
|
||||
.toInt32();
|
||||
@@ -1030,7 +1030,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter4, testTdf147666)
|
||||
};
|
||||
dispatchCommand(mxComponent, u".uno:InsertGraphic"_ustr, aArgs);
|
||||
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
sal_Int32 nInsertedViewTop = getXPathContent(parseExport(u"settings.xml"_ustr),
|
||||
"//config:config-item[@config:name='ViewTop']")
|
||||
.toInt32();
|
||||
|
||||
@@ -148,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf92714_TOC_pageBreak)
|
||||
SfxDispatcher& rDispatcher = *pView->GetViewFrame().GetDispatcher();
|
||||
rDispatcher.Execute(FN_REMOVE_CUR_TOX);
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
|
||||
@@ -1124,7 +1124,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf121509)
|
||||
aNewAnch.SetAnchor(aCursor.Start());
|
||||
CPPUNIT_ASSERT(pTriangleShapeFormat->SetFormatAttr(aNewAnch));
|
||||
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// The second part: check if the reloaded doc has flys inside a fly
|
||||
// FIXME: if we use 'saveAndReload' or 'loadFromURL' here, it fails with
|
||||
@@ -1913,7 +1913,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf167526)
|
||||
}
|
||||
|
||||
// DOCX roundtrip:
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// check layout
|
||||
{
|
||||
@@ -2029,7 +2029,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf167540)
|
||||
verify_me();
|
||||
|
||||
// DOCX roundtrip:
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
verify_me();
|
||||
}
|
||||
@@ -2147,7 +2147,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf168858)
|
||||
assertXPath(pXmlDoc, "//page['pass 1']/body/section/infos/bounds", "height", u"0");
|
||||
}
|
||||
{
|
||||
saveAndReload(u"OpenDocument Text Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODT);
|
||||
Scheduler::ProcessEventsToIdle(); // Recalculate conditions
|
||||
auto xTextSections
|
||||
= mxComponent.queryThrow<text::XTextSectionsSupplier>()->getTextSections();
|
||||
@@ -2191,7 +2191,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf168858)
|
||||
assertXPath(pXmlDoc, "//page['pass 3']/body/section/infos/bounds", "height", u"0");
|
||||
}
|
||||
{
|
||||
saveAndReload(u"OpenDocument Text Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODT);
|
||||
Scheduler::ProcessEventsToIdle(); // Recalculate conditions
|
||||
auto xTextSections
|
||||
= mxComponent.queryThrow<text::XTextSectionsSupplier>()->getTextSections();
|
||||
|
||||
@@ -78,7 +78,7 @@ CPPUNIT_TEST_FIXTURE(Test, testMathObjectFlatExport)
|
||||
officecfg::Office::Common::Cache::Writer::OLE_Objects::set(1, pBatch);
|
||||
pBatch->commit();
|
||||
createSwDoc("2_MathType3.docx");
|
||||
saveAndReload(u"OpenDocument Text Flat XML"_ustr); // doesn't happen with ODF package
|
||||
saveAndReload(TestFilter::FODT); // doesn't happen with ODF package
|
||||
|
||||
uno::Reference<util::XModifiable> xModifiable(mxComponent, uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(!xModifiable->isModified());
|
||||
@@ -194,7 +194,7 @@ void testTdf43569_CheckIfFieldParse()
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf43569)
|
||||
{
|
||||
createSwDoc("tdf43569_conditionalfield.doc");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// check if our parser is valid
|
||||
testTdf43569_CheckIfFieldParse();
|
||||
|
||||
@@ -210,7 +210,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf43569)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf130314)
|
||||
{
|
||||
createSwDoc("tdf130314.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// Without the fix in place, this test would have hung
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
@@ -218,7 +218,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf130314)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133487)
|
||||
{
|
||||
createSwDoc("MadeByLO7.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(3, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
@@ -236,7 +236,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133487)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf141467)
|
||||
{
|
||||
createSwDoc("Formcontrol needs high z-index.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
@@ -269,7 +269,7 @@ DECLARE_ODFEXPORT_TEST(testTdf139126, "tdf139126.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf125877)
|
||||
{
|
||||
createSwDoc("tdf95806.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<text::XTextTablesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xTables(xSupplier->getTextTables(), uno::UNO_QUERY);
|
||||
@@ -287,7 +287,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf125877)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf150149)
|
||||
{
|
||||
createSwDoc("tdf150149.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
// This was 0 (lost table header in multi-column section)
|
||||
@@ -335,7 +335,7 @@ DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testUserFieldDecl)
|
||||
{
|
||||
createSwDoc("user-field-decl.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
// Without the accompanying fix in place, this test would have failed with 'Expected: 2;
|
||||
@@ -347,7 +347,7 @@ CPPUNIT_TEST_FIXTURE(Test, testUserFieldDecl)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testUserFieldDeclFly)
|
||||
{
|
||||
createSwDoc("user-field-decl-fly.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -477,7 +477,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFramebackgrounds)
|
||||
|
||||
createSwDoc("framebackgrounds.odt");
|
||||
verify();
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
@@ -498,7 +498,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSHA1Correct)
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
getParagraph(1, u"012"_ustr);
|
||||
|
||||
saveAndReload(u"writer8"_ustr, sPass);
|
||||
saveAndReload(TestFilter::ODT, sPass);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
getParagraph(1, u"012"_ustr);
|
||||
@@ -512,7 +512,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSHA1Wrong)
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
getParagraph(1, u"012"_ustr);
|
||||
|
||||
saveAndReload(u"writer8"_ustr, sPass);
|
||||
saveAndReload(TestFilter::ODT, sPass);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
getParagraph(1, u"012"_ustr);
|
||||
@@ -521,7 +521,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSHA1Wrong)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOOoxmlEmbedded)
|
||||
{
|
||||
createSwDoc("oooxml_embedded.sxw");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects());
|
||||
uno::Sequence<OUString> aSeq(xAccess->getElementNames());
|
||||
@@ -596,7 +596,7 @@ DECLARE_ODFEXPORT_TEST(testTdf140437, "tdf140437.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf131621)
|
||||
{
|
||||
createSwDoc("tdf131621.ott");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(12, getShapes());
|
||||
//Crash test, Check number of pages
|
||||
CPPUNIT_ASSERT_EQUAL( 1, getPages() );
|
||||
@@ -605,7 +605,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131621)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf135144)
|
||||
{
|
||||
createSwDoc("tdf135144.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
//Crashes at import time after roundtrip
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(4, getShapes());
|
||||
@@ -648,7 +648,7 @@ DECLARE_ODFEXPORT_TEST(testFdo38244, "fdo38244.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSenderInitials)
|
||||
{
|
||||
createSwDoc("sender-initials.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// Test sender-initial properties (both annotation metadata and text field)
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
@@ -746,7 +746,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf92379)
|
||||
|
||||
createSwDoc("tdf92379.fodt");
|
||||
verify();
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -821,7 +821,7 @@ DECLARE_ODFEXPORT_TEST(testTextframeGradient, "textframe-gradient.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testDuplicateCrossRefHeadingBookmark)
|
||||
{
|
||||
createSwDoc("CrossRefHeadingBookmark.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// the file contains invalid duplicate heading cross reference bookmarks
|
||||
// but we have to round trip them, tdf#94804
|
||||
|
||||
@@ -927,7 +927,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo58949)
|
||||
officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(false, pBatch);
|
||||
pBatch->commit();
|
||||
createSwDoc("fdo58949.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
/*
|
||||
* The problem was that the exporter didn't insert "Obj102" to the
|
||||
@@ -935,7 +935,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo58949)
|
||||
* and replacement image) OLE objects using UNO, so we'll check the zip file directly.
|
||||
*/
|
||||
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
|
||||
uno::Sequence<uno::Any> aArgs{ uno::Any(maTempFile.GetURL()) };
|
||||
uno::Reference<container::XNameAccess> xNameAccess(m_xSFactory->createInstanceWithArguments(u"com.sun.star.packages.zip.ZipFileAccess"_ustr, aArgs), uno::UNO_QUERY);
|
||||
@@ -963,7 +963,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo58949)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf134987)
|
||||
{
|
||||
createSwDoc("tdf134987.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects());
|
||||
uno::Sequence<OUString> aSeq(xAccess->getElementNames());
|
||||
@@ -1223,7 +1223,7 @@ CPPUNIT_TEST_FIXTURE(Test, testProtectionKey)
|
||||
|
||||
createSwDoc("protection-key.fodt");
|
||||
verify();
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
verify();
|
||||
|
||||
// we can't assume that the user entered the password; check that we
|
||||
@@ -1238,7 +1238,7 @@ CPPUNIT_TEST_FIXTURE(Test, testProtectionKey)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128188)
|
||||
{
|
||||
createSwDoc("footnote-collect-at-end-of-section.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
SwFootnoteIdxs const& rFootnotes(pDoc->GetFootnoteIdxs());
|
||||
// Section1
|
||||
@@ -1272,7 +1272,7 @@ DECLARE_ODFEXPORT_TEST(testFdo43807, "fdo43807.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf103091)
|
||||
{
|
||||
createSwDoc("tdf103091.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// check that all conditional paragraph style conditions are imported
|
||||
uno::Reference<container::XNameAccess> xParaStyles(getStyles(u"ParagraphStyles"_ustr));
|
||||
uno::Reference<beans::XPropertySet> xStyle1(xParaStyles->getByName(
|
||||
@@ -1440,7 +1440,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf69500)
|
||||
xPersistence->store();
|
||||
}
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// Without the fix, the toolbar will be gone after save-and-reload
|
||||
{
|
||||
@@ -1487,7 +1487,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf60700_images)
|
||||
xImgMgr->store();
|
||||
}
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// Verify that the custom icon is still present after save-and-reload
|
||||
{
|
||||
@@ -1531,7 +1531,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf60700_accelerators)
|
||||
xAccel->store();
|
||||
}
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// Verify that the custom keyboard shortcut is still present after save-and-reload
|
||||
{
|
||||
@@ -1546,7 +1546,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf60700_accelerators)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf60700_directories)
|
||||
{
|
||||
createSwDoc();
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
|
||||
// There is no way to read the contents of Configurations2/ from a loaded document,
|
||||
// because only UIConfigurationManager has a reference to it and there is no method
|
||||
|
||||
@@ -82,7 +82,7 @@ DECLARE_ODFEXPORT_TEST(testTdf77961, "tdf77961.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf106733)
|
||||
{
|
||||
createSwDoc("tdf106733.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -112,7 +112,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page)
|
||||
|
||||
// fo:hyphenation-keep="page" defined in direct paragraph formatting
|
||||
createSwDoc("tdf132599_page.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// This was 2 (not truncated hyphenated line)
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
}
|
||||
@@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto)
|
||||
|
||||
// fo:hyphenation-keep="auto" defined in direct paragraph formatting
|
||||
createSwDoc("tdf132599_auto.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// not truncated hyphenated line
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
@@ -138,7 +138,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_spread)
|
||||
|
||||
// fo:hyphenation-keep="page" loext:hyphenation-keep-type="spread"
|
||||
createSwDoc("tdf132599_spread.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// shift last line of right page, resulting 3 pages
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
}
|
||||
@@ -151,7 +151,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_spread_left_page)
|
||||
|
||||
// fo:hyphenation-keep="page" loext:hyphenation-keep-type="spread"
|
||||
createSwDoc("tdf132599_spread-left-page.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// do not shift last line of left page
|
||||
// This was 4 (shifted last line of left page, when it's hyphenated)
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
@@ -166,7 +166,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_column)
|
||||
// last line of the left column is shifted, according to
|
||||
// fo:hyphenation-keep="page" loext:hyphenation-keep-type="column"
|
||||
createSwDoc("tdf132599_column.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// shift last line of the first column, resulting 3 pages
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
}
|
||||
@@ -180,7 +180,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_not_last_column)
|
||||
// last line of the not last column is not shifted, according to
|
||||
// fo:hyphenation-keep="page" loext:hyphenation-keep-type="page"
|
||||
createSwDoc("tdf132599_page_in_not_last_column.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// do not shift last line of the first column, resulting 2 pages
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
@@ -194,7 +194,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_last_column)
|
||||
// last line of the last column is shifted, according to
|
||||
// fo:hyphenation-keep="page" loext:hyphenation-keep-type="page"
|
||||
createSwDoc("tdf132599_page_in_last_column.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// shift last line of the first page, resulting 3 pages
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
}
|
||||
@@ -208,7 +208,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_always)
|
||||
// last full line of the paragraph column is not hyphenated
|
||||
// fo:hyphenation-keep="page" loext:hyphenation-keep-type="always"
|
||||
createSwDoc("tdf132599_always.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
@@ -224,7 +224,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_table)
|
||||
// last full line of the table is not hyphenated on page 1
|
||||
// fo:hyphenation-keep="page" loext:hyphenation-keep-type=""
|
||||
createSwDoc("tdf132599_page_in_table.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// This was 2 (not handling hyphenation-keep in tables)
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
|
||||
@@ -240,7 +240,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_default_paragraph_style)
|
||||
|
||||
// fo:hyphenation-keep="page" defined in default paragraph style
|
||||
createSwDoc("tdf160518_page_in_default_paragraph_style.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_default_paragraph_style)
|
||||
|
||||
// fo:hyphenation-keep="auto" defined in default paragraph style
|
||||
createSwDoc("tdf160518_auto_in_default_paragraph_style.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_text_body_style)
|
||||
|
||||
// fo:hyphenation-keep="page" defined in text body style
|
||||
createSwDoc("tdf160518_page_in_text_body_style.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_text_body_style)
|
||||
|
||||
// fo:hyphenation-keep="auto" defined in text body style
|
||||
createSwDoc("tdf160518_auto_in_text_body_style.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165354_page)
|
||||
|
||||
// fo:hyphenation-keep="page" defined in direct paragraph formatting
|
||||
createSwDoc("tdf165354_page.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// This was 3 in tdf132599, but now 2, shifting only the last hyphenated word,
|
||||
// not the full line, because of loext:hyphenation-keep-line=true
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
@@ -297,7 +297,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165354_page)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf158885_compound_remain)
|
||||
{
|
||||
createSwDoc("tdf158885_compound-remain.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc, "//style:style[@style:family='paragraph']/style:text-properties[@loext:hyphenation-compound-remain-char-count='3']", 1);
|
||||
@@ -340,7 +340,7 @@ DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testRubyPosition)
|
||||
{
|
||||
createSwDoc("ruby-position.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -364,7 +364,7 @@ DECLARE_ODFEXPORT_TEST(testAllowOverlap, "allow-overlap.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSignatureLineProperties)
|
||||
{
|
||||
createSwDoc("signatureline-properties.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
uno::Reference<drawing::XShape> xShape = getShape(1);
|
||||
CPPUNIT_ASSERT(xShape.is());
|
||||
|
||||
@@ -538,7 +538,7 @@ DECLARE_ODFEXPORT_TEST(tdf118502, "tdf118502.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf99631)
|
||||
{
|
||||
createSwDoc("tdf99631.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// check import of VisualArea settings of the embedded XLSX OLE objects
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/settings.xml"_ustr);
|
||||
assertXPathContent(pXmlDoc, "//config:config-item[@config:name='VisibleAreaWidth']", u"4516");
|
||||
@@ -553,7 +553,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf163575)
|
||||
{
|
||||
// crashes/assert at export time
|
||||
createSwDoc("tdf163575.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
}
|
||||
|
||||
DECLARE_ODFEXPORT_TEST(testTdf159923, "tdf159923.fodt")
|
||||
@@ -571,7 +571,7 @@ DECLARE_ODFEXPORT_TEST(testTdf159923_stretched, "tdf159923_stretched.fodt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf145871)
|
||||
{
|
||||
createSwDoc("tdf145871.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
|
||||
@@ -586,7 +586,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf145871)
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf128504)
|
||||
{
|
||||
createSwDoc("tdf128504.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
uno::Reference<text::XTextRange> xPara = getParagraph(6);
|
||||
uno::Reference<beans::XPropertySet> xRun(getRun(xPara,1), uno::UNO_QUERY);
|
||||
OUString unVisitedStyleName = getProperty<OUString>(xRun, u"UnvisitedCharStyleName"_ustr);
|
||||
@@ -728,7 +728,7 @@ DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf124470)
|
||||
{
|
||||
createSwDoc("tdf124470TableAndEmbeddedUsedFonts.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// Table styles were exported out of place, inside font-face-decls.
|
||||
// Without the fix in place, this will fail already in ODF validation:
|
||||
// "content.xml[2,2150]: Error: tag name "style:style" is not allowed. Possible tag names are: <font-face>"
|
||||
|
||||
@@ -93,7 +93,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTextboxRoundedCorners)
|
||||
|
||||
createSwDoc("textbox-rounded-corners.odt");
|
||||
verify();
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
verify();
|
||||
|
||||
// Table inside a textbox should be in the extension namespace.
|
||||
@@ -541,14 +541,14 @@ CPPUNIT_TEST_FIXTURE(Test, testBtlrFrame)
|
||||
|
||||
createSwDoc("btlr-frame.odt");
|
||||
verify();
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf129520)
|
||||
{
|
||||
createSwDoc("tdf129520.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(u"M"_ustr, getParagraph(1)->getString());
|
||||
|
||||
@@ -635,7 +635,7 @@ DECLARE_ODFEXPORT_TEST(testMasterPageWithDrawingPage, "sw_hatch.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeOOo)
|
||||
{
|
||||
createSwDoc("pagestyle_background_ooo33.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
// Standard
|
||||
@@ -730,7 +730,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeOOo)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeLO64)
|
||||
{
|
||||
createSwDoc("pagestyle_background_lo64.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(6, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
// Standard
|
||||
@@ -912,7 +912,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeLO64)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeLO70)
|
||||
{
|
||||
createSwDoc("pagestyle_background_lo70.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(6, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
// Standard
|
||||
@@ -1094,7 +1094,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageStyleBackgroundFullSizeLO70)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFillBitmapUnused)
|
||||
{
|
||||
createSwDoc("fillbitmap3.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(4, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// nav_5f_home and all its references are completely gone
|
||||
@@ -1243,7 +1243,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEmbeddedPdf)
|
||||
|
||||
createSwDoc("embedded-pdf.odt");
|
||||
verify();
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
verify();
|
||||
|
||||
uno::Sequence<uno::Any> aArgs{ uno::Any(maTempFile.GetURL()) };
|
||||
@@ -1514,7 +1514,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTableStyles3)
|
||||
{
|
||||
createSwDoc("table_styles_3.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// This test checks if default valued attributes aren't exported.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -1705,7 +1705,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableStyles4)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTableStyles5)
|
||||
{
|
||||
createSwDoc("table_styles_5.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Test if cell styles doesn't have a style:parent-style-name attribute.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
@@ -1779,7 +1779,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableStyles5)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf145226)
|
||||
{
|
||||
createSwDoc("tdf145226.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -1809,7 +1809,7 @@ DECLARE_ODFEXPORT_TEST(testTdf101710, "tdf101710.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf129568)
|
||||
{
|
||||
createSwDoc("tdf129568.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// Test that export doesn't fail, and that style is imported and in use.
|
||||
uno::Reference<style::XStyle> xStyle(
|
||||
getStyles(u"CellStyles"_ustr)->getByName(u"Default Style.1"_ustr), uno::UNO_QUERY);
|
||||
@@ -1820,7 +1820,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf129568)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf129568ui)
|
||||
{
|
||||
createSwDoc("tdf129568-ui.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// Same as above, but styles referenced by UI name.
|
||||
uno::Reference<style::XStyle> xStyle(
|
||||
getStyles(u"CellStyles"_ustr)->getByName(u"Default Style.1"_ustr), uno::UNO_QUERY);
|
||||
@@ -1831,7 +1831,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf129568ui)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf164712)
|
||||
{
|
||||
createSwDoc("tdf164712.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
auto xText = getParagraph(1)->getText();
|
||||
CPPUNIT_ASSERT(xText.is());
|
||||
auto xCursor(xText->createTextCursorByRange(getParagraph(1)));
|
||||
@@ -1918,7 +1918,7 @@ DECLARE_ODFEXPORT_TEST(testArabicZero5Numbering, "arabic-zero5-numbering.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testImageMimetype)
|
||||
{
|
||||
createSwDoc("image-mimetype.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Test that the loext:mimetype attribute is written for exported images, tdf#109202
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf135942)
|
||||
{
|
||||
createSwDoc("nestedTableInFooter.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// All table autostyles should be collected, including nested, and must not crash.
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
@@ -67,7 +67,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf150927)
|
||||
// Similar to tdf135942
|
||||
|
||||
createSwDoc("table-in-frame-in-table-in-header-base.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// All table autostyles should be collected, including nested, and must not crash.
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
@@ -88,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPersonalMetaData)
|
||||
pBatch->commit();
|
||||
|
||||
createSwDoc("personalmetadata.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"meta.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/office:document-meta/office:meta/meta:initial-creator", 1);
|
||||
assertXPath(pXmlDoc, "/office:document-meta/office:meta/meta:creation-date", 1);
|
||||
@@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPersonalMetaData)
|
||||
pBatch->commit();
|
||||
|
||||
createSwDoc("personalmetadata.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
pXmlDoc = parseExport(u"meta.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/office:document-meta/office:meta/meta:initial-creator", 0);
|
||||
assertXPath(pXmlDoc, "/office:document-meta/office:meta/meta:creation-date", 0);
|
||||
@@ -144,7 +144,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRemoveOnlyEditTimeMetaData)
|
||||
{
|
||||
// 1. Check we have the original edit time info
|
||||
createSwDoc("personalmetadata.odt");
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"meta.xml"_ustr);
|
||||
assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/meta:editing-duration",
|
||||
u"PT21M22S");
|
||||
@@ -156,7 +156,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRemoveOnlyEditTimeMetaData)
|
||||
|
||||
// 2. Check edit time info is 0
|
||||
createSwDoc("personalmetadata.odt");
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
pXmlDoc = parseExport(u"meta.xml"_ustr);
|
||||
assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/meta:editing-duration", u"P0D");
|
||||
|
||||
@@ -170,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf151100)
|
||||
// Similar to tdf135942
|
||||
|
||||
createSwDoc("tdf151100.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// All table autostyles should be collected, including nested, and must not crash.
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
@@ -273,7 +273,7 @@ DECLARE_ODFEXPORT_TEST(testTdf143793_noBodyWrapping, "tdf143793_noBodyWrapping.o
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf137199)
|
||||
{
|
||||
createSwDoc("tdf137199.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(u">1<"_ustr,
|
||||
getProperty<OUString>(getParagraph(1), u"ListLabelString"_ustr));
|
||||
|
||||
@@ -299,7 +299,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165115)
|
||||
{
|
||||
// Test saving a template file with password protection
|
||||
createSwDoc();
|
||||
saveAndReload("writer8_template", "test");
|
||||
saveAndReload(TestFilter::OTT, "test");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf57317_autoListName)
|
||||
@@ -317,7 +317,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf57317_autoListName)
|
||||
|
||||
// This was failing with a duplicate auto numbering style name of L1 instead of a unique name,
|
||||
// thus it was showing the same info as before the bullet modification.
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
xPara.set(getParagraph(1), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(u""_ustr, getProperty<OUString>(xPara, u"ListLabelString"_ustr));
|
||||
|
||||
@@ -336,7 +336,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf57317_autoListName)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testListFormatDocx)
|
||||
{
|
||||
createSwDoc("listformat.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// Ensure in resulting ODT we also have not just prefix/suffix, but custom delimiters
|
||||
CPPUNIT_ASSERT_EQUAL(u">1<"_ustr,
|
||||
getProperty<OUString>(getParagraph(1), u"ListLabelString"_ustr));
|
||||
@@ -392,7 +392,7 @@ CPPUNIT_TEST_FIXTURE(Test, testListFormatDocx)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testShapeWithHyperlink)
|
||||
{
|
||||
createSwDoc("shape-with-hyperlink.odt");
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
@@ -443,7 +443,7 @@ CPPUNIT_TEST_FIXTURE(Test, testListFormatOdt)
|
||||
|
||||
createSwDoc("listformat.odt");
|
||||
verify();
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
@@ -524,7 +524,7 @@ CPPUNIT_TEST_FIXTURE(Test, testStyleLink)
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf120972)
|
||||
{
|
||||
createSwDoc("table_number_format_3.docx");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
OUString cDecimal(SvtSysLocale().GetLocaleData().getNumDecimalSep()[0]);
|
||||
@@ -831,7 +831,7 @@ DECLARE_ODFEXPORT_TEST(testTdf78510, "WordTest_edit.odt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testParagraphMarkerMarkupRoundtrip)
|
||||
{
|
||||
createSwDoc("ParagraphMarkerMarkup.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// Test that the markup stays at save-and-reload
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
OUString autostyle = getXPath(pXmlDoc, "//office:body/office:text/text:p", "marker-style-name");
|
||||
@@ -856,7 +856,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCommentStyles)
|
||||
|
||||
xComment->attach(getParagraph(1)->getEnd());
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
auto xFields(
|
||||
mxComponent.queryThrow<text::XTextFieldsSupplier>()->getTextFields()->createEnumeration());
|
||||
@@ -882,7 +882,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCommentStyles)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf150408_IsLegal)
|
||||
{
|
||||
createSwDoc("IsLegal.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// Second level's numbering should use Arabic numbers for first level reference
|
||||
auto xPara = getParagraph(1);
|
||||
@@ -926,7 +926,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382)
|
||||
CPPUNIT_ASSERT_LESS(sal_Int32(100), width); // It was 720, i.e. 0.5 inch
|
||||
}
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// 2. Make sure that exported document has NoGapAfterNoteNumber option set,
|
||||
// and has correct layout
|
||||
{
|
||||
@@ -1006,7 +1006,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159438)
|
||||
// Given a text with bookmarks, where an end of one bookmark is the position of another,
|
||||
// and the start of a third
|
||||
createSwDoc("bookmark_order.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
auto xPara = getParagraph(1);
|
||||
|
||||
// Check that the order of runs is correct (bookmarks don't overlap)
|
||||
@@ -1095,7 +1095,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160700)
|
||||
{
|
||||
// Given a document with an empty numbered paragraph, and a cross-reference to it
|
||||
createSwDoc("tdf160700.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// Refresh fields and ensure cross-reference to numbered para is okay
|
||||
auto xTextFieldsSupplier(mxComponent.queryThrow<text::XTextFieldsSupplier>());
|
||||
@@ -1128,7 +1128,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160253_ordinary_numbering)
|
||||
// Before the fix, this already failed with
|
||||
// Error: "list2916587379" is referenced by an IDREF, but not defined.
|
||||
createSwDoc("tdf160253_ordinary_numbering.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// Make sure that the fourth paragraph has correct number - it was "1." before the fix
|
||||
CPPUNIT_ASSERT_EQUAL(u"3."_ustr,
|
||||
@@ -1149,7 +1149,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160253_outline_numbering)
|
||||
// Before the fix, this already failed with
|
||||
// Error: "list2916587379" is referenced by an IDREF, but not defined.
|
||||
createSwDoc("tdf160253_outline_numbering.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
// Make sure that the third paragraph has correct number - it was "1" before the fix
|
||||
CPPUNIT_ASSERT_EQUAL(u"2"_ustr,
|
||||
@@ -1166,7 +1166,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableInFrameAnchoredToPage)
|
||||
// Given a table in a frame anchored to a page:
|
||||
// it must not assert on export because of missing format for an exported table
|
||||
createSwDoc("table_in_frame_to_page.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
auto AutoStyleUsedIn = [this, &pXmlDoc](const OString& path, const char* attr) -> OString {
|
||||
@@ -1192,7 +1192,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDeletedTableAutostylesExport)
|
||||
// Given a document with deleted table:
|
||||
// it must not assert on export because of missing format for an exported table
|
||||
createSwDoc("deleted_table.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
}
|
||||
|
||||
DECLARE_ODFEXPORT_TEST(testTdf160877, "tdf160877.odt")
|
||||
@@ -1216,7 +1216,7 @@ CPPUNIT_TEST_FIXTURE(Test, testMidnightRedlineDatetime)
|
||||
// - Error: "2001-01-01" does not satisfy the "dateTime" type
|
||||
// because "2001-01-01T00:00:00" became "2001-01-01" on roundtrip.
|
||||
createSwDoc("midnight_redline.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPathContent(pXmlDoc,
|
||||
@@ -1230,7 +1230,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf122452)
|
||||
// FIXME: Error: element "text:insertion" was found where no element may occur
|
||||
skipValidation();
|
||||
createSwDoc("tdf122452.doc");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
|
||||
|
||||
// Without the fix in place this fails with:
|
||||
@@ -1243,7 +1243,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf122452)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf159027)
|
||||
{
|
||||
createSwDoc("tdf159027.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
pDoc->getIDocumentFieldsAccess().UpdateFields(true);
|
||||
|
||||
@@ -1273,7 +1273,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121119)
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xIndexAccess->getCount());
|
||||
|
||||
saveAndReload(u"writerglobal8_writer"_ustr);
|
||||
saveAndReload(TestFilter::ODM);
|
||||
pDoc = getSwDoc();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
@@ -1315,7 +1315,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf163703)
|
||||
{
|
||||
// Given a document with italics autostyle in a comment
|
||||
createSwDoc("italics-in-comment.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
auto xFields(
|
||||
mxComponent.queryThrow<text::XTextFieldsSupplier>()->getTextFields()->createEnumeration());
|
||||
@@ -1364,7 +1364,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf36709)
|
||||
{
|
||||
// Verifies that loext:text-indent correctly round-trips
|
||||
createSwDoc("tdf36709.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -1391,7 +1391,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf163913)
|
||||
{
|
||||
// Verifies that loext:left-margin and loext:right-margin correctly round-trip
|
||||
createSwDoc("tdf163913.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -1470,7 +1470,7 @@ CPPUNIT_TEST_FIXTURE(Test, testMsWordUlTrailSpace)
|
||||
CPPUNIT_ASSERT_EQUAL(u"false"_ustr, val);
|
||||
}
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// 2. Make sure that exported document has MsWordUlTrailSpace option set
|
||||
{
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"settings.xml"_ustr);
|
||||
@@ -1511,7 +1511,7 @@ CPPUNIT_TEST_FIXTURE(Test, testMsWordUlTrailSpace)
|
||||
CPPUNIT_ASSERT_EQUAL(u"false"_ustr, val);
|
||||
}
|
||||
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
// 4. Make sure that exported document has MsWordUlTrailSpace option not set
|
||||
{
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"settings.xml"_ustr);
|
||||
@@ -1552,7 +1552,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf71583)
|
||||
{
|
||||
// Verifies that loext:text-indent correctly round-trips
|
||||
createSwDoc("tdf71583.odt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
assertXPathNodeName(pXmlDoc, "//office:body/office:text/text:p/*[1]", "page-count-range");
|
||||
}
|
||||
@@ -1561,7 +1561,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166011)
|
||||
{
|
||||
// Verifies that style:script-type correctly round-trips
|
||||
createSwDoc("tdf166011.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -1575,7 +1575,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166011ee)
|
||||
{
|
||||
// Verifies that style:script-type correctly round-trips with Edit Engine
|
||||
createSwDoc("tdf166011ee.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -1590,7 +1590,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf168817)
|
||||
// A ruby text with a hyperlink
|
||||
// Without the fix, it failed an assertion on save, and produced invalid XML that couldn't load
|
||||
createSwDoc("ruby+hyperlink.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
// Check that only one instance of respective elements are produced
|
||||
assertXPath(pXmlDoc, "//text:p", 1);
|
||||
@@ -1610,7 +1610,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf164677)
|
||||
// properties, and generated a single section autostyle, so all the sections got identical
|
||||
// properties after reload:
|
||||
createSwDoc("colored-sections-separators.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
auto xTextSections = mxComponent.queryThrow<text::XTextSectionsSupplier>()->getTextSections();
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTextSections->getElementNames().getLength());
|
||||
|
||||
@@ -1670,7 +1670,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf168980)
|
||||
// - com.sun.star.io.IOException: {Message: "SfxBaseModel::impl_store
|
||||
// <file:///C:/lo/build/tmp/test_sw_odfexport4.dllizeba.tmp> failed: 0xc10(Error
|
||||
// Area:Io Class:Write Code:16)
|
||||
saveAndReload(u"OpenDocument Text Flat XML"_ustr);
|
||||
saveAndReload(TestFilter::FODT);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf37128ConvertStartEndOnResave)
|
||||
@@ -1679,7 +1679,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf37128ConvertStartEndOnResave)
|
||||
// start/end, respectively. Make sure documents produced by older
|
||||
// versions of LO convert these values to left/right.
|
||||
createSwDoc("tdf37128-start-end-to-left-right.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
|
||||
@@ -1706,7 +1706,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf118350StartEndPreserved)
|
||||
// Check that fo:text-align start/end round-trip correctly for
|
||||
// documents made by newer versions of LO.
|
||||
createSwDoc("tdf118350-start-end-preserved.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
|
||||
|
||||
@@ -1731,7 +1731,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf118350StartEndPreserved)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf162120StyleWritingModeAutomaticSerialization)
|
||||
{
|
||||
createSwDoc("tdf162120-style-writing-mode-automatic.fodt");
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
auto pStylesDoc = parseExport(u"styles.xml"_ustr);
|
||||
assertXPath(pStylesDoc, "//style:paragraph-properties[@style:writing-mode-automatic]", 1);
|
||||
|
||||
@@ -1335,7 +1335,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVerticallyMergedCellBorder)
|
||||
CPPUNIT_ASSERT(!rA2Set.GetBox().GetRight());
|
||||
|
||||
// Given this document model, when exporting to ODT:
|
||||
save(u"writer8"_ustr);
|
||||
save(TestFilter::ODT);
|
||||
|
||||
// Then make sure the covered cell has a style.
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"content.xml"_ustr);
|
||||
|
||||
@@ -26,7 +26,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasswordMSO2007)
|
||||
// Standard encryption format, AES 128, SHA1
|
||||
uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
|
||||
CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, getParagraph(1)->getString());
|
||||
saveAndReload(u"Office Open XML Text"_ustr, sPass);
|
||||
saveAndReload(TestFilter::DOCX, sPass);
|
||||
CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, getParagraph(1)->getString());
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasswordMSO2010)
|
||||
createSwDoc("Encrypted_MSO2010_abc.docx", sPass);
|
||||
// Agile encryption format, AES 128, CBC, SHA1
|
||||
CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, getParagraph(1)->getString());
|
||||
saveAndReload(u"Office Open XML Text"_ustr, sPass);
|
||||
saveAndReload(TestFilter::DOCX, sPass);
|
||||
CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, getParagraph(1)->getString());
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasswordMSO2013)
|
||||
// Agile encryption format, AES 256, CBC, SHA512
|
||||
uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
|
||||
CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, getParagraph(1)->getString());
|
||||
saveAndReload(u"Office Open XML Text"_ustr, sPass);
|
||||
saveAndReload(TestFilter::DOCX, sPass);
|
||||
CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, getParagraph(1)->getString());
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasswordLOStandard)
|
||||
// Standard encryption format, AES 128, SHA1
|
||||
uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
|
||||
CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, getParagraph(1)->getString());
|
||||
saveAndReload(u"Office Open XML Text"_ustr, sPass);
|
||||
saveAndReload(TestFilter::DOCX, sPass);
|
||||
CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, getParagraph(1)->getString());
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo81381)
|
||||
{
|
||||
createSwDoc("fdo81381.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:object[1]/o:OLEObject[1]", "DrawAspect", u"Icon");
|
||||
}
|
||||
@@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo81381)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSdtAlias)
|
||||
{
|
||||
createSwDoc("sdt-alias.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// <w:alias> was completely missing.
|
||||
@@ -61,7 +61,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtAlias)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFooterBodyDistance)
|
||||
{
|
||||
createSwDoc("footer-body-distance.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// Page break was exported as section break, this was 0
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:br", 1);
|
||||
@@ -84,7 +84,7 @@ DECLARE_OOXMLEXPORT_TEST(testfdo81031, "fdo81031.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPlausableBorder)
|
||||
{
|
||||
createSwDoc("plausable-border.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// sw::util::IsPlausableSingleWordSection() did not merge two page styles due to borders.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// Page break was exported as section break, this was 0
|
||||
@@ -96,7 +96,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPlausableBorder)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testUnwantedSectionBreak)
|
||||
{
|
||||
createSwDoc("unwanted-section-break.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 2: an additional sectPr was added to the document.
|
||||
assertXPath(pXmlDoc, "//w:sectPr", 1);
|
||||
@@ -105,7 +105,7 @@ CPPUNIT_TEST_FIXTURE(Test, testUnwantedSectionBreak)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo80897 )
|
||||
{
|
||||
createSwDoc("fdo80897.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:bodyPr/a:prstTxWarp", "prst", u"textTriangle");
|
||||
}
|
||||
@@ -121,7 +121,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo80997, "fdo80997.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo80902)
|
||||
{
|
||||
createSwDoc("fdo80902.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that the docGrid type was set as default so fix it for other grid type
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -131,7 +131,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo80902)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testParaShading)
|
||||
{
|
||||
createSwDoc("para-shading.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Make sure the themeColor attribute is not written when it would be empty.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:shd", "themeColor");
|
||||
@@ -140,7 +140,7 @@ CPPUNIT_TEST_FIXTURE(Test, testParaShading)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFDO83044)
|
||||
{
|
||||
createSwDoc("fdo83044.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:text", 1);
|
||||
@@ -157,7 +157,7 @@ DECLARE_OOXMLEXPORT_TEST(testfdo83428, "fdo83428.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testShapeInFloattable)
|
||||
{
|
||||
createSwDoc("shape-in-floattable.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// No nested drawingML w:txbxContent.
|
||||
assertXPath(pXmlDoc, "//mc:Choice//w:txbxContent//w:txbxContent", 0);
|
||||
@@ -169,7 +169,7 @@ CPPUNIT_TEST_FIXTURE(Test, testShapeInFloattable)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testEmptyAnnotationMark)
|
||||
{
|
||||
createSwDoc("empty-annotation-mark.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Delete the word that is commented, and save again.
|
||||
uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 3);
|
||||
CPPUNIT_ASSERT_EQUAL(u"with"_ustr, xRun->getString());
|
||||
@@ -242,7 +242,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDropdownInCell)
|
||||
|
||||
createSwDoc("dropdown-in-cell.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ DECLARE_OOXMLEXPORT_TEST(testTableAlignment, "table-alignment.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSdtIgnoredFooter)
|
||||
{
|
||||
createSwDoc("sdt-ignored-footer.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 1, make sure no w:sdt sneaks into the main document from the footer.
|
||||
assertXPath(pXmlDoc, "//w:sdt", 0);
|
||||
@@ -267,7 +267,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtIgnoredFooter)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSdtRunPicture)
|
||||
{
|
||||
createSwDoc("sdt-run-picture.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// SDT around run was exported as SDT around paragraph
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 1: there was an SDT around w:p.
|
||||
@@ -288,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChartDupe)
|
||||
|
||||
createSwDoc("chart-dupe.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDocCT = parseExport(u"[Content_Types].xml"_ustr);
|
||||
@@ -348,7 +348,7 @@ DECLARE_OOXMLEXPORT_TEST(testNumberingFont, "numbering-font.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf106541_noinheritChapterNumbering)
|
||||
{
|
||||
createSwDoc("tdf106541_noinheritChapterNumbering.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// in LO, it appears that styles based on the Chapter Numbering style explicitly set the
|
||||
// numbering style/outline level to 0 by default, and that LO prevents inheriting directly from "Outline" style.
|
||||
@@ -390,7 +390,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104713_undefinedStyles, "tdf104713_undefinedStyl
|
||||
CPPUNIT_TEST_FIXTURE(Test, testDrawingmlFlipv)
|
||||
{
|
||||
createSwDoc("drawingml-flipv.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that the shape had vertical flip only, but then we added rotation as well on export.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPathNoAttribute(pXmlDoc, "//a:xfrm", "rot");
|
||||
@@ -399,7 +399,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDrawingmlFlipv)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testRot90Fliph)
|
||||
{
|
||||
createSwDoc("rot90-fliph.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that a shape rotation of 90° got turned into 270° after roundtrip.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//a:xfrm", "flipH", u"1");
|
||||
@@ -410,7 +410,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRot90Fliph)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testRot180Flipv)
|
||||
{
|
||||
createSwDoc("rot180-flipv.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// 180° rotation got lost after roundtrip.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//a:xfrm", "flipV", u"1");
|
||||
@@ -421,7 +421,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRot180Flipv)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testRot270Flipv)
|
||||
{
|
||||
createSwDoc("rot270-flipv.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// 270° rotation got turned into 90° after roundtrip.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//a:xfrm", "flipV", u"1");
|
||||
@@ -507,7 +507,7 @@ DECLARE_OOXMLEXPORT_TEST(testTextboxTable, "textbox-table.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testCropPixel)
|
||||
{
|
||||
createSwDoc("crop-pixel.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// If map mode of the graphic is in pixels, then we used to handle original
|
||||
// size of the graphic as mm100, but it was in pixels.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -519,7 +519,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCropPixel)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testEffectExtent)
|
||||
{
|
||||
createSwDoc("effect-extent.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that in case there were no shadows on the picture, we
|
||||
// wrote a <wp:effectExtent> full or zeros.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
|
||||
@@ -530,7 +530,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEffectExtent)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testEffectExtentInline)
|
||||
{
|
||||
createSwDoc("effect-extent-inline.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that in case there was inline rotated picture, we
|
||||
// wrote a <wp:effectExtent> full or zeros.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -590,7 +590,7 @@ DECLARE_OOXMLEXPORT_TEST(testParagraphMark2, "paragraph-mark2.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testParagraphMarkNonempty)
|
||||
{
|
||||
createSwDoc("paragraph-mark-nonempty.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
validate(maTempFile.GetFileName(), u"Office Open XML Text");
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -679,7 +679,7 @@ DECLARE_OOXMLEXPORT_TEST(testOoxmlSymbolChicagoList, "symbol_chicago_list.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHTW)
|
||||
{
|
||||
createSwDoc("numlist-zhtw.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/numbering.xml"_ustr);
|
||||
|
||||
@@ -689,7 +689,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHTW)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHCN)
|
||||
{
|
||||
createSwDoc("numlist-zhcn.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/numbering.xml"_ustr);
|
||||
|
||||
@@ -699,7 +699,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHCN)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOOxmlOutlineNumberTypes)
|
||||
{
|
||||
createSwDoc("outline-number-types.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/numbering.xml"_ustr);
|
||||
|
||||
@@ -800,7 +800,7 @@ DECLARE_OOXMLEXPORT_TEST(testEffectExtentMargin, "effectextent-margin.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf88583)
|
||||
{
|
||||
createSwDoc("tdf88583.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x00cc00), getProperty<Color>(getParagraph(1), u"FillColor"_ustr));
|
||||
@@ -832,7 +832,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf89791)
|
||||
uno::Reference< beans::XPropertySet > properties(getStyles(u"ParagraphStyles"_ustr)->getByName(u"Titre"_ustr), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(u"Corps de texte"_ustr, getProperty<OUString>(properties, u"FollowStyle"_ustr));
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
properties.set(getStyles(u"ParagraphStyles"_ustr)->getByName(u"Titre"_ustr), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(u"Corps de texte"_ustr, getProperty<OUString>(properties, u"FollowStyle"_ustr));
|
||||
@@ -923,7 +923,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf44986, "tdf44986.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf118682)
|
||||
{
|
||||
createSwDoc("tdf118682.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
@@ -952,7 +952,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf118682)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133163)
|
||||
{
|
||||
createSwDoc("tdf133163.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
@@ -980,7 +980,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133163)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf166102)
|
||||
{
|
||||
createSwDoc("tdf166102.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
@@ -1003,7 +1003,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166102)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133647)
|
||||
{
|
||||
createSwDoc("tdf133647.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Keep original formula during round-trip
|
||||
@@ -1020,7 +1020,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133647)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123386)
|
||||
{
|
||||
createSwDoc("tdf123386.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Keep original formula during round-trip
|
||||
@@ -1039,7 +1039,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123386)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123389)
|
||||
{
|
||||
createSwDoc("tdf123389.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Keep original formula during round-trip
|
||||
@@ -1067,7 +1067,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf115094v3)
|
||||
// i.e. some unwanted ~-2mm left margin appeared.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(1991), pFormat->GetHoriOrient().GetPos());
|
||||
}
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// floating table is now exported directly without surrounding frame
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
|
||||
@@ -96,14 +96,14 @@ CPPUNIT_TEST_FIXTURE(Test, testSmartart)
|
||||
};
|
||||
createSwDoc("smartart.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo69548)
|
||||
{
|
||||
createSwDoc("fdo69548.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// The problem was that the last space in target URL was removed
|
||||
CPPUNIT_ASSERT_EQUAL(u"#this_is_a_bookmark"_ustr, getProperty<OUString>(getRun(getParagraph(1), 1), u"HyperLinkURL"_ustr));
|
||||
}
|
||||
@@ -136,7 +136,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableNestedDOCXExport)
|
||||
createSwDoc("floattable-nested.odt");
|
||||
|
||||
// When exporting to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure both floating table is exported:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -153,7 +153,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableNestedCellStartDOCXExport)
|
||||
createSwDoc("floattable-nested-cell-start.odt");
|
||||
|
||||
// When exporting to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure both floating table is exported at the right position:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -275,7 +275,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf162916_nastyTOC, "tdf162916_nastyTOC.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFontEsc)
|
||||
{
|
||||
createSwDoc("test_tdf120412.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc =parseExport(u"word/document.xml"_ustr);
|
||||
// don't lose the run with superscript formatting
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 2);
|
||||
@@ -430,7 +430,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo73389)
|
||||
{
|
||||
createSwDoc("fdo73389.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The width of the inner table was too large. The first fix still converted
|
||||
// the "auto" table width to a fixed one. The second fix used variable width.
|
||||
// The recent fix uses fixed width again, according to the fixed width cells.
|
||||
@@ -443,7 +443,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo73389)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133735)
|
||||
{
|
||||
createSwDoc("fdo73389.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tr[2]/w:tc[1]/w:p/w:pPr/w:spacing", "after", u"0");
|
||||
@@ -456,7 +456,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133735)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf134569_nestedTable)
|
||||
{
|
||||
createSwDoc("tdf134569_nestedTable.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// non-overridden w:after spacing in the table was pushing the document to the second page.
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
}
|
||||
@@ -464,7 +464,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134569_nestedTable)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf59274)
|
||||
{
|
||||
createSwDoc("tdf59274.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Table with "auto" table width and incomplete grid: 11 columns, but only 4 gridCol elements.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -621,7 +621,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSmartartStrict)
|
||||
};
|
||||
createSwDoc("strict-smartart.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -732,7 +732,7 @@ DECLARE_OOXMLEXPORT_TEST(testGridBefore, "gridbefore.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf116194)
|
||||
{
|
||||
createSwDoc("tdf116194.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that the importer lost consecutive tables with w:gridBefore
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl", 2);
|
||||
@@ -741,7 +741,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf116194)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf134606)
|
||||
{
|
||||
createSwDoc("tdf134606.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that the importer lost the nested table structure with w:gridBefore
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl");
|
||||
|
||||
@@ -77,7 +77,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAutoB, "tdf90906_colAutoB.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf92524_autoColor)
|
||||
{
|
||||
createSwDoc("tdf92524_autoColor.doc");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr));
|
||||
CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(getParagraph(1), u"ParaBackColor"_ustr));
|
||||
}
|
||||
@@ -85,7 +85,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf92524_autoColor)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf116436_rowFill)
|
||||
{
|
||||
createSwDoc("tdf116436_rowFill.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
|
||||
@@ -103,7 +103,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121665_back2backColumnBreaks, "tdf121665_back2ba
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf126795_TabsRelativeToIndent0)
|
||||
{
|
||||
createSwDoc("tdf126795_TabsRelativeToIndent0.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), u"ParaTabStops"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength());
|
||||
@@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf126795_TabsRelativeToIndent0)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf126795_TabsRelativeToIndent1)
|
||||
{
|
||||
createSwDoc("tdf126795_TabsRelativeToIndent1.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), u"ParaTabStops"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength());
|
||||
@@ -152,7 +152,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124384, "tdf124384.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121456_tabsOffset)
|
||||
{
|
||||
createSwDoc("tdf121456_tabsOffset.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
for (int i=2; i<8; i++)
|
||||
{
|
||||
uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( i ), u"ParaTabStops"_ustr);
|
||||
@@ -166,7 +166,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121456_tabsOffset)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121561_tocTitle)
|
||||
{
|
||||
createSwDoc("tdf121456_tabsOffset.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r/w:t", u"Inhaltsverzeichnis");
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r/w:instrText", u" TOC \\f \\o \"1-9\" \\h");
|
||||
@@ -177,7 +177,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121561_tocTitle)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf129525)
|
||||
{
|
||||
createSwDoc("tdf129525.rtf");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[4]/w:t", u"Overview");
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[5]/w:t", u"3");
|
||||
@@ -198,7 +198,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124106, "tdf121456.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121561_tocTitleDocx)
|
||||
{
|
||||
createSwDoc("tdf121456_tabsOffset.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(7, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -255,7 +255,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82065_Ind_start_strict, "tdf82065_Ind_start_stri
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf76683_negativeTwipsMeasure)
|
||||
{
|
||||
createSwDoc("tdf76683_negativeTwipsMeasure.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col", 2);
|
||||
sal_uInt32 nColumn1 = getXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col[1]", "w").toUInt32();
|
||||
@@ -360,7 +360,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf94801, "tdf94801.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testParagraphSplitOnSectionBorder)
|
||||
{
|
||||
createSwDoc("parasplit-on-section-border.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -373,7 +373,7 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphSplitOnSectionBorder)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf44832_testSectionWithDifferentHeader)
|
||||
{
|
||||
createSwDoc("tdf44832_section_new_header.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:headerReference", 1);
|
||||
@@ -420,7 +420,7 @@ DECLARE_OOXMLEXPORT_TEST(testSignatureLineShape, "signature-line-all-props-set.d
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf117805)
|
||||
{
|
||||
createSwDoc("tdf117805.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
@@ -471,7 +471,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113547, "tdf113547.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf113399)
|
||||
{
|
||||
createSwDoc("tdf113399.doc");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// 0 padding was not preserved
|
||||
// In LO 0 is the default, but in OOXML format the default is 254 / 127
|
||||
uno::Reference<beans::XPropertySet> xPropSet(getShape(1), uno::UNO_QUERY);
|
||||
@@ -548,7 +548,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf142542_cancelledAutospacing, "tdf142542_cancelle
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf137655)
|
||||
{
|
||||
createSwDoc("tdf137655.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// These were 280.
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "before", u"0");
|
||||
@@ -594,7 +594,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104354_firstParaInSection, "tdf104354_firstParaI
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPageBreak_after)
|
||||
{
|
||||
createSwDoc("pageBreak_after.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// The problem was that the page breakAfter put the empty page BEFORE the table
|
||||
xmlDocUniquePtr pDump = parseLayoutDump();
|
||||
assertXPath(pDump, "/root/page[1]/body/tab", 1);
|
||||
@@ -722,7 +722,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119760_positionCellBorder, "tdf119760_positionCe
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf98620_environmentBiDi)
|
||||
{
|
||||
createSwDoc("tdf98620_environmentBiDi.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( getParagraph(1), u"WritingMode"_ustr ));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_RIGHT), getProperty<sal_Int32>( getParagraph(1), u"ParaAdjust"_ustr ));
|
||||
@@ -871,7 +871,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf149996, "lorem_hyperlink.fodt")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testGroupedShapeLink)
|
||||
{
|
||||
createSwDoc("grouped_link.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#145147 Hyperlink in grouped shape not imported
|
||||
// tdf#154469 Hyperlink in grouped shape not exported
|
||||
uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTableCrossReference)
|
||||
{
|
||||
createSwDoc("table_cross_reference.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// tdf#42346: Cross references to tables were not saved
|
||||
// MSO uses simple bookmarks for referencing table caption, so we do the same by export
|
||||
@@ -206,7 +206,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableCrossReference)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTableCrossReferenceCustomFormat)
|
||||
{
|
||||
createSwDoc("table_cross_reference_custom_format.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// tdf#42346: Cross references to tables were not saved
|
||||
// Check also captions with custom formatting
|
||||
@@ -340,7 +340,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableCrossReferenceCustomFormat)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testObjectCrossReference)
|
||||
{
|
||||
createSwDoc("object_cross_reference.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(10, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
// tdf#42346: Cross references to objects were not saved
|
||||
@@ -731,14 +731,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTd112202)
|
||||
|
||||
createSwDoc("090716_Studentische_Arbeit_VWS.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf79435_legacyInputFields)
|
||||
{
|
||||
createSwDoc("tdf79435_legacyInputFields.doc");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
//using .doc input file to verify cross-format compatibility.
|
||||
uno::Reference<text::XFormField> xFormField = getProperty<uno::Reference<text::XFormField>>(
|
||||
getRun(getParagraph(5), 3), u"Bookmark"_ustr);
|
||||
@@ -888,7 +888,7 @@ DECLARE_OOXMLEXPORT_TEST(testWatermarkTrim, "tdf114308.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testVMLShapetypeId)
|
||||
{
|
||||
createSwDoc("controlshape.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// must be _x0000_t<NR>
|
||||
assertXPath(pXmlDoc,
|
||||
@@ -906,7 +906,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLShapetypeId)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf73547)
|
||||
{
|
||||
createSwDoc("tdf73547-dash.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
double nD = getXPath(pXmlDoc, "//a:custDash/a:ds[1]", "d").toDouble();
|
||||
CPPUNIT_ASSERT_DOUBLES_EQUAL(105000.0, nD, 5000.0); // was 100000
|
||||
@@ -936,7 +936,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119143, "tdf119143.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf105444)
|
||||
{
|
||||
createSwDoc("tdf105444.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlComm = parseExport(u"word/comments.xml"_ustr);
|
||||
// there is no extra paragraph on Win32, only a single one.
|
||||
assertXPath(pXmlComm, "/w:comments/w:comment/w:p", 1);
|
||||
@@ -961,7 +961,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117137, "tdf117137.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf138780)
|
||||
{
|
||||
createSwDoc("tdf138780.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Paragraphs were not part of a numbering anymore after roundtrip.
|
||||
uno::Reference<beans::XPropertySet> xPara1(getParagraph(1), uno::UNO_QUERY);
|
||||
@@ -980,7 +980,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf138780)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf134618)
|
||||
{
|
||||
createSwDoc("tdf134618.doc");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
//Without the fix it in place, it would have failed with
|
||||
@@ -994,7 +994,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134618)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf99631)
|
||||
{
|
||||
createSwDoc("tdf99631.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc, "//w:object", 2);
|
||||
@@ -1010,7 +1010,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf99631)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf138899)
|
||||
{
|
||||
createSwDoc("tdf138899.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 6, not removed empty temporary paragraph at the end of the section
|
||||
assertXPath(pXmlDocument, "/w:document/w:body/w:p", 5);
|
||||
@@ -1022,7 +1022,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf138899)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf122563)
|
||||
{
|
||||
createSwDoc("tdf122563.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object", 1);
|
||||
@@ -1034,7 +1034,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf122563)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf94628)
|
||||
{
|
||||
createSwDoc("tdf94628.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<beans::XPropertySet> xPropertySet(
|
||||
getStyles(u"NumberingStyles"_ustr)->getByName(u"WWNum1"_ustr), uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xLevels(
|
||||
@@ -1113,7 +1113,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf122594, "tdf122594.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testLanguageInGroupShape)
|
||||
{
|
||||
createSwDoc("tdf131922_LanguageInGroupShape.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#131922: Check if good language is used in shape group texts
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXml,
|
||||
@@ -1172,7 +1172,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116883, "tdf116883.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf131420)
|
||||
{
|
||||
createSwDoc("tdf131420.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:pPr/w:pBdr/w:top");
|
||||
}
|
||||
@@ -1245,7 +1245,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf145720)
|
||||
{
|
||||
// check moveFromRangeStart/End and moveToRangeStart/End (to keep tracked text moving)
|
||||
createSwDoc("tdf104797.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// These were 0 (missing move*FromRange* elements)
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]//w:moveFromRangeStart", 1);
|
||||
@@ -1271,7 +1271,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150166)
|
||||
{
|
||||
// check moveFromRangeStart/End and moveToRangeStart/End (to keep tracked text moving)
|
||||
createSwDoc("tdf150166.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//w:moveFromRangeStart", 0);
|
||||
// This was 2 (missing RangeStart elements, but bad unpaired RangeEnds)
|
||||
@@ -1291,7 +1291,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143510)
|
||||
{
|
||||
// check moveFromRangeStart/End and moveToRangeStart/End for tracked table move by drag & drop
|
||||
createSwDoc("TC-table-DnD-move.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 0 (missing tracked table row deletion/insertion)
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:trPr/w:del", 2);
|
||||
@@ -1302,7 +1302,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143510_table_from_row)
|
||||
{
|
||||
// check moveFromRangeStart/End and moveToRangeStart/End for tracked table move by drag & drop
|
||||
createSwDoc("TC-table-Separate-Move.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 0 (missing tracked table row deletion/insertion)
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:trPr/w:del", 1);
|
||||
@@ -1315,7 +1315,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143510_within_table)
|
||||
{
|
||||
// check moveFromRangeStart/End and moveToRangeStart/End for tracked table row move by DnD
|
||||
createSwDoc("TC-table-rowDND.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 0 (missing tracked table row deletion/insertion)
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:trPr/w:del", 1);
|
||||
@@ -1326,7 +1326,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143510_within_table2)
|
||||
{
|
||||
// check moveFromRangeStart/End and moveToRangeStart/End for tracked table row move by DnD
|
||||
createSwDoc("TC-table-rowDND-front.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 0 (missing tracked table row deletion/insertion)
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:trPr/w:ins", 1);
|
||||
@@ -1337,7 +1337,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150824)
|
||||
{
|
||||
// check tracked table row insertion (stored in a single redline)
|
||||
createSwDoc("tdf150824.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 0 (missing tracked table row deletion/insertion)
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:trPr/w:ins", 1);
|
||||
@@ -1349,7 +1349,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157011)
|
||||
{
|
||||
// check tracked table column insertions and deletions with empty cells
|
||||
createSwDoc("tdf157011_ins_del_empty_cols.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// This was 1 (missing tracked table cell insertions)
|
||||
@@ -1413,7 +1413,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119188_list_margin_in_cell, "tdf119188_list_marg
|
||||
CPPUNIT_TEST_FIXTURE(Test, testChart_BorderLine_Style)
|
||||
{
|
||||
createSwDoc("Chart_BorderLine_Style.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
/* DOCX containing Chart with BorderLine Style as Dash Type should get preserved
|
||||
* inside an XML tag <a:prstDash> with value "dash", "sysDot, "lgDot", etc.
|
||||
*/
|
||||
@@ -1432,7 +1432,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChart_BorderLine_Style)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testChart_Plot_BorderLine_Style)
|
||||
{
|
||||
createSwDoc("Chart_Plot_BorderLine_Style.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
/* DOCX containing Chart wall (plot area) and Chart Page with BorderLine Style as Dash Type
|
||||
* should get preserved inside an XML tag <a:prstDash> with value "dash", "sysDot, "lgDot", etc.
|
||||
*/
|
||||
@@ -1445,7 +1445,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChart_Plot_BorderLine_Style)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTrackChangesDeletedEmptyParagraph)
|
||||
{
|
||||
createSwDoc("testTrackChangesDeletedEmptyParagraph.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:rPr/w:del");
|
||||
}
|
||||
@@ -1453,7 +1453,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTrackChangesDeletedEmptyParagraph)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTrackChangesEmptyParagraphsInADeletion)
|
||||
{
|
||||
createSwDoc("testTrackChangesEmptyParagraphsInADeletion.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
for (int i = 1; i < 12; ++i)
|
||||
assertXPath(pXmlDoc,
|
||||
@@ -1463,7 +1463,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTrackChangesEmptyParagraphsInADeletion)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf149708)
|
||||
{
|
||||
createSwDoc("tdf149708.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// keep tracked insertion of a list item
|
||||
// This was 0 (missing tracked insertion of the paragraph mark)
|
||||
@@ -1473,7 +1473,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149708)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf149707)
|
||||
{
|
||||
createSwDoc("tdf149711.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:moveFrom");
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:moveTo");
|
||||
@@ -1485,7 +1485,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149707)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf70234)
|
||||
{
|
||||
createSwDoc("tdf70234.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// import field with tracked deletion
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:del/w:r[1]/w:fldChar");
|
||||
@@ -1500,7 +1500,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf70234)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf115212)
|
||||
{
|
||||
createSwDoc("tdf115212.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// export field with tracked deletion
|
||||
assertXPath(pXmlDoc, "//w:p[2]/w:del[1]/w:r[1]/w:fldChar");
|
||||
@@ -1509,7 +1509,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf115212)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf126243)
|
||||
{
|
||||
createSwDoc("tdf120338.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// export change tracking rejection data for tracked paragraph style change
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:pPrChange/w:pPr/w:pStyle", "val",
|
||||
@@ -1519,7 +1519,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf126243)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf126245)
|
||||
{
|
||||
createSwDoc("tdf126245.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// export change tracking rejection data for tracked numbering change
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pPrChange/w:pPr/w:numPr/w:numId", "val",
|
||||
@@ -1529,7 +1529,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf126245)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf124491)
|
||||
{
|
||||
createSwDoc("tdf124491.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// import format change of empty lines, FIXME: change w:r with w:pPr in export
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/*/w:rPr/w:rPrChange");
|
||||
@@ -1541,7 +1541,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf124491)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf143911)
|
||||
{
|
||||
createSwDoc("tdf126206.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// export format change of text portions
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w:rPrChange");
|
||||
@@ -1552,7 +1552,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143911)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf105485)
|
||||
{
|
||||
createSwDoc("tdf105485.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// import change tracking of deleted comments
|
||||
assertXPath(pXmlDoc, "//w:del/w:r/w:commentReference");
|
||||
@@ -1561,7 +1561,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf105485)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf125894)
|
||||
{
|
||||
createSwDoc("tdf125894.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// import change tracking in frames
|
||||
assertXPath(pXmlDoc, "//w:del", 2);
|
||||
@@ -1572,7 +1572,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149388)
|
||||
{
|
||||
// see also testTdf132371
|
||||
createSwDoc("tdf132271.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// import change tracking in floating tables
|
||||
// (don't recognize tracked text moving during the import,
|
||||
@@ -1587,7 +1587,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132271)
|
||||
{
|
||||
// see also testTdf149388
|
||||
createSwDoc("tdf149388.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// import change tracking in floating tables
|
||||
assertXPath(pXmlDoc, "//w:del", 2);
|
||||
@@ -1600,7 +1600,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149388_fly)
|
||||
{
|
||||
// see also testTdf136667
|
||||
createSwDoc("tdf136667.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// import change tracking in floating tables
|
||||
assertXPath(pXmlDoc, "//w:del", 2);
|
||||
@@ -1613,7 +1613,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf136667)
|
||||
{
|
||||
// see also testTdf149388_fly
|
||||
createSwDoc("tdf149388_fly.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// import change tracking in floating tables
|
||||
assertXPath(pXmlDoc, "//w:del", 2);
|
||||
@@ -1625,7 +1625,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf136667)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf136850)
|
||||
{
|
||||
createSwDoc("tdf136850.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// import change tracking in floating tables
|
||||
assertXPath(pXmlDoc, "//w:del");
|
||||
@@ -1634,7 +1634,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf136850)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128156)
|
||||
{
|
||||
createSwDoc("tdf128156.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// keep tracked insertion of a paragraph
|
||||
// This was 0 before 350972a8bffc1a74b531e0336954bf54b1356025,
|
||||
@@ -1645,7 +1645,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf128156)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf165330)
|
||||
{
|
||||
createSwDoc("CT-with-frame.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// check that *both* tracked changes were round tripped
|
||||
@@ -1656,7 +1656,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165330)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf125546)
|
||||
{
|
||||
createSwDoc("tdf125546.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// compress redlines (it was 15)
|
||||
assertXPath(pXmlDoc, "//w:rPrChange", 3);
|
||||
@@ -1665,7 +1665,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf125546)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testLabelWidthAndPosition_Left_FirstLineIndent)
|
||||
{
|
||||
createSwDoc("Hau_min_list2.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// list is LABEL_WIDTH_AND_POSITION with SvxAdjust::Left
|
||||
// I) LTR
|
||||
@@ -1769,7 +1769,7 @@ CPPUNIT_TEST_FIXTURE(Test, testLabelWidthAndPosition_Left_FirstLineIndent)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf124604)
|
||||
{
|
||||
createSwDoc("tdf124604.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// If the numbering comes from a base style, indentation of the base style has also priority.
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind", "start", u"0");
|
||||
@@ -1778,7 +1778,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf124604)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf95374)
|
||||
{
|
||||
createSwDoc("tdf95374.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// Numbering disabled by non-existent numId=0, disabling also inheritance of indentation of parent styles
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind", "hanging", u"0");
|
||||
@@ -1854,7 +1854,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf81100)
|
||||
};
|
||||
createSwDoc("tdf81100.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/styles.xml"_ustr);
|
||||
@@ -1866,7 +1866,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf81100)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf88496)
|
||||
{
|
||||
createSwDoc("tdf88496.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Switch off repeating header, there is no place for it.
|
||||
// Now there are only 3 pages with complete table content
|
||||
// instead of a 51-page long table only with header.
|
||||
@@ -1884,7 +1884,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf88496)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf77417)
|
||||
{
|
||||
createSwDoc("tdf77417.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// MSO 2010 compatibility mode: terminating white spaces are ignored in tables.
|
||||
// This was 3 pages with the first invisible blank page.
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
@@ -1893,7 +1893,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf77417)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf130494)
|
||||
{
|
||||
createSwDoc("tdf130494.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:highlight", "val",
|
||||
u"yellow");
|
||||
@@ -1904,7 +1904,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf130494)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf130690)
|
||||
{
|
||||
createSwDoc("tdf130690.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:highlight", "val",
|
||||
u"yellow");
|
||||
@@ -1916,7 +1916,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf130690)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf105215)
|
||||
{
|
||||
createSwDoc("tdf105215.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:pPr/w:rPr/w:rFonts", "ascii",
|
||||
u"Linux Libertine G");
|
||||
@@ -1938,7 +1938,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf105215)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf135187)
|
||||
{
|
||||
createSwDoc("tdf135187.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p/w:pPr/w:rPr/w:b", 0);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:p/w:pPr/w:rPr/w:b", 1);
|
||||
@@ -1959,7 +1959,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf135187)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf136617)
|
||||
{
|
||||
createSwDoc("tdf136617.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// This was 2
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
@@ -1972,7 +1972,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf136617)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121597TrackedDeletionOfMultipleParagraphs)
|
||||
{
|
||||
createSwDoc("tdf121597.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -1988,7 +1988,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121597TrackedDeletionOfMultipleParagraphs)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf141660)
|
||||
{
|
||||
createSwDoc("tdf141660.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -2001,7 +2001,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf141660)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133643)
|
||||
{
|
||||
createSwDoc("tdf133643.doc");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -2054,7 +2054,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116084, "tdf116084.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf116084_anonymized)
|
||||
{
|
||||
createSwDoc("tdf116084.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// w:del in w:ins is exported correctly
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del/w:r/w:delText", u"must");
|
||||
@@ -2081,7 +2081,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121176, "tdf121176.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121176_anonymized)
|
||||
{
|
||||
createSwDoc("tdf121176.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// w:del in w:ins is exported correctly
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del/w:r/w:delText", u"must");
|
||||
@@ -2100,7 +2100,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121176_anonymized)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128913)
|
||||
{
|
||||
createSwDoc("tdf128913.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// w:ins and w:del are imported correctly, if they contain only inline images
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:r/w:drawing/wp:inline/a:graphic");
|
||||
@@ -2110,7 +2110,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf128913)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf142700)
|
||||
{
|
||||
createSwDoc("tdf142700.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// w:ins and w:del are imported correctly, if they contain only images anchored to character
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:r/w:drawing/wp:anchor/a:graphic");
|
||||
@@ -2120,7 +2120,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142700)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf142387)
|
||||
{
|
||||
createSwDoc("tdf142387.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// w:del in w:ins is exported correctly (only w:del was exported)
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del/w:r/w:delText", u"inserts ");
|
||||
@@ -2129,7 +2129,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142387)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf147892)
|
||||
{
|
||||
createSwDoc("tdf147892.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// w:del in w:ins is exported correctly
|
||||
// (both w:del and w:ins were exported for para marker)
|
||||
@@ -2181,7 +2181,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf67207_MERGEFIELD_DATABASE, "tdf67207.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf101122_noFillForCustomShape)
|
||||
{
|
||||
createSwDoc("tdf101122_noFillForCustomShape.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// tdf#101122 check whether the "F" (noFill) option has been exported to docx
|
||||
@@ -2205,7 +2205,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf101122_noFillForCustomShape)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf124678_case1)
|
||||
{
|
||||
createSwDoc("tdf124678_no_leading_paragraph.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("First page header text", u""_ustr,
|
||||
@@ -2222,7 +2222,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf124678_case1)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf124678_case2)
|
||||
{
|
||||
createSwDoc("tdf124678_with_leading_paragraph.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("First page header text", u""_ustr,
|
||||
@@ -2357,7 +2357,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf119952_negativeMargins)
|
||||
|
||||
createSwDoc("tdf119952_negativeMargins.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFlyInFly)
|
||||
{
|
||||
createSwDoc("ooo39250-1-min.rtf");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// check that anchor of text frame is in other text frame
|
||||
uno::Reference<text::XTextContent> const xAnchored(getShape(3), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xAnchored.is());
|
||||
@@ -110,7 +110,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf155690, "tdf155690.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF)
|
||||
{
|
||||
createSwDoc("tdf121374_sectionHF.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<beans::XPropertySet> xPageStyle(getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xFooterText = getProperty< uno::Reference<text::XTextRange> >(xPageStyle, u"FooterText"_ustr);
|
||||
CPPUNIT_ASSERT_EQUAL( u"footer"_ustr, xFooterText->getString() );
|
||||
@@ -122,7 +122,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF2)
|
||||
{
|
||||
createSwDoc("tdf121374_sectionHF2.doc");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<beans::XPropertySet> xPageStyle(getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xHeaderText = getProperty< uno::Reference<text::XTextRange> >(xPageStyle, u"HeaderText"_ustr);
|
||||
CPPUNIT_ASSERT( xHeaderText->getString().startsWith("virkamatka-anomus") );
|
||||
@@ -131,7 +131,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF2)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121666_lostPage)
|
||||
{
|
||||
createSwDoc("tdf121666_lostPage.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br", "type", u"page");
|
||||
// The second page break is exported too.
|
||||
@@ -154,13 +154,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf140182_extraPagebreak, "tdf140182_extraPagebreak
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121659_loseColumnBrNextToShape)
|
||||
{
|
||||
createSwDoc("tdf121659_loseColumnBrNextToShape.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The third paragraph contains a manual column break and a shape.
|
||||
// The column break was moved into the shape during the first import
|
||||
// (messing also the shape position), and eliminated during the second import,
|
||||
// losing the 2-column text layout. As a workaround, split the paragraph
|
||||
// moving the column break into the fourth paragraph instead of losing it.
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
bool bBreakOnPara3 = getProperty<style::BreakType>(getParagraph(3), u"BreakType"_ustr) == style::BreakType_COLUMN_BEFORE;
|
||||
bool bBreakOnPara4 = getProperty<style::BreakType>(getParagraph(4), u"BreakType"_ustr) == style::BreakType_COLUMN_BEFORE;
|
||||
CPPUNIT_ASSERT(bBreakOnPara3 || bBreakOnPara4);
|
||||
@@ -374,7 +374,7 @@ DECLARE_OOXMLEXPORT_TEST(testBtlrShape, "btlr-textbox.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127316_autoEscapement)
|
||||
{
|
||||
createSwDoc("tdf127316_autoEscapement.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// This should be roughly .8*35% of the ORIGINAL(non-reduced) size. However, during export the
|
||||
// proportional height has to be changed into direct formatting, which then changes the relative percent.
|
||||
@@ -418,7 +418,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99602_charStyleSubscript, "tdf99602_charStyleSub
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf99602_charStyleSubscript2)
|
||||
{
|
||||
createSwDoc("tdf99602_charStyleSubscript2.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// *_In styles_*, don't let the proportionality/escapement affect the fontsize - otherwise it starts doubling up,
|
||||
// so instead just throw away the values and use the default settings instead - meaning fontsize is unaffected.
|
||||
@@ -531,7 +531,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf118947_tableStyle2, "tdf118947_tableStyle2.docx"
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf123912_protectedForm)
|
||||
{
|
||||
createSwDoc("tdf123912_protectedForm.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Compatibility: Protect form", true,
|
||||
@@ -556,7 +556,7 @@ DECLARE_OOXMLEXPORT_TEST(tdf124600b, "tdf124600b.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testDateControl)
|
||||
{
|
||||
createSwDoc("empty-date-control.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Check that we exported the empty date control correctly
|
||||
// Date form field is converted to date content control.
|
||||
@@ -589,7 +589,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDateControl)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121867)
|
||||
{
|
||||
createSwDoc("tdf121867.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
SwEditShell* pEditShell = getSwDocShell()->GetEditShell();
|
||||
CPPUNIT_ASSERT(pEditShell);
|
||||
@@ -629,7 +629,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInputListExport)
|
||||
uno::Reference<lang::XServiceInfo> xServiceInfo(aField, uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xServiceInfo->supportsService(u"com.sun.star.text.textfield.DropDown"_ustr));
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<beans::XPropertySet> xTextPortion(getRun(getParagraph(1), 1), uno::UNO_QUERY);
|
||||
OUString aPortionType;
|
||||
@@ -666,7 +666,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123435, "tdf123435.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf116371)
|
||||
{
|
||||
createSwDoc("tdf116371.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Make sure the rotation is exported correctly, and size not distorted
|
||||
@@ -680,7 +680,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf116371)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFrameSizeExport)
|
||||
{
|
||||
createSwDoc("floating-tables-anchor.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Make sure the table width is 4000
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tblPr/w:tblW", "w", u"4000");
|
||||
@@ -727,7 +727,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTextInput)
|
||||
{
|
||||
createSwDoc("textinput.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -828,14 +828,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123460)
|
||||
|
||||
createSwDoc("tdf123460.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf146140)
|
||||
{
|
||||
createSwDoc("tdf123460.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
@@ -852,7 +852,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146140)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf125298)
|
||||
{
|
||||
createSwDoc("tdf125298_crossreflink_nonascii_charlimit.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// check whether test file keeps non-ascii values or not
|
||||
OUString bookmarkName1 = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:bookmarkStart[1]", "name");
|
||||
@@ -898,7 +898,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTbrlFrameVml)
|
||||
// 4', i.e. writing direction was inherited from page, instead of explicit tbrl.
|
||||
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL, nActual);
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xTextFrame.set(getShape(1), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xTextFrame.is());
|
||||
|
||||
@@ -910,7 +910,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTbrlFrameVml)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf119037)
|
||||
{
|
||||
createSwDoc("tdf119037.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
@@ -969,7 +969,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf119037)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf125657)
|
||||
{
|
||||
createSwDoc("tdf125657.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
auto checkAttrIsInt = [&](const char* sAttrName) {
|
||||
@@ -1004,7 +1004,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf125324, "tdf125324.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf78657)
|
||||
{
|
||||
createSwDoc("tdf78657_picture_hyperlink.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
xmlDocUniquePtr pXmlRels = parseExport(u"word/_rels/document.xml.rels"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/wp:docPr/a:hlinkClick", 1);
|
||||
@@ -1015,7 +1015,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf78657)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testBtlrFrame)
|
||||
{
|
||||
createSwDoc("btlr-frame.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
|
||||
@@ -1029,7 +1029,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBtlrFrame)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf125518)
|
||||
{
|
||||
createSwDoc("tdf125518.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(4, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1072,7 +1072,7 @@ DECLARE_OOXMLEXPORT_TEST(testImageCommentAtChar, "image-comment-at-char.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf131594)
|
||||
{
|
||||
createSwDoc("tdf131594.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// lnNumType should not be exported if w:countBy="0"
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:lnNumType", 0);
|
||||
@@ -1081,7 +1081,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131594)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121663)
|
||||
{
|
||||
createSwDoc("tdf121663.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// auto distance of line numbering is 0.5 cm
|
||||
assertXPath(pXmlDoc, "//w:lnNumType", "distance", u"283");
|
||||
@@ -1197,7 +1197,7 @@ DECLARE_OOXMLEXPORT_TEST(tdf118169, "tdf118169.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127116)
|
||||
{
|
||||
createSwDoc("tdf127116.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -1210,7 +1210,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127116)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127339)
|
||||
{
|
||||
createSwDoc("tdf127339.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlRels = parseExport(u"word/_rels/document.xml.rels"_ustr);
|
||||
|
||||
assertXPathNoAttribute(pXmlRels, "/rels:Relationships/rels:Relationship[@Target='#bookmark']", "TargetMode");
|
||||
@@ -1219,7 +1219,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127339)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127362)
|
||||
{
|
||||
createSwDoc("tdf127362.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1234,7 +1234,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127362)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127605)
|
||||
{
|
||||
createSwDoc("tdf127605.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1247,7 +1247,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127605)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127732)
|
||||
{
|
||||
createSwDoc("internal_hyperlink_frame.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1260,7 +1260,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127732)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127733)
|
||||
{
|
||||
createSwDoc("internal_hyperlink_ole.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1274,7 +1274,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127733)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127734)
|
||||
{
|
||||
createSwDoc("internal_hyperlink_region.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -1286,7 +1286,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127734)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127735)
|
||||
{
|
||||
createSwDoc("internal_hyperlink_table.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -1298,7 +1298,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127735)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123628)
|
||||
{
|
||||
createSwDoc("tdf123628.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -1321,7 +1321,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127741, "tdf127741.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf142693_hugePaperSizeImport)
|
||||
{
|
||||
createSwDoc("tdf142693_hugePaperSizeImport.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgSz", "w", u"90369");
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgSz", "h", u"104372");
|
||||
@@ -1330,7 +1330,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142693_hugePaperSizeImport)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127925)
|
||||
{
|
||||
createSwDoc("tdf127925.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlStyles = parseExport(u"word/styles.xml"_ustr);
|
||||
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='FollowedHyperlink']/w:name", "val", u"FollowedHyperlink");
|
||||
@@ -1339,7 +1339,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127925)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf127579)
|
||||
{
|
||||
createSwDoc("tdf127579.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:r/w:rPr/w:rStyle", "val", u"Hyperlink");
|
||||
@@ -1348,7 +1348,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127579)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128304)
|
||||
{
|
||||
createSwDoc("tdf128304.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(4, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
css::text::WritingMode eMode;
|
||||
|
||||
@@ -84,7 +84,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf128197)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf135595_HFtableWrap)
|
||||
{
|
||||
createSwDoc("tdf135595_HFtableWrap.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
sal_Int32 nRowHeight = getXPath(pXmlDoc, "//page[1]/header/tab/row/infos/bounds", "height").toInt32();
|
||||
// tdf#77794: always force bLayoutInCell from false to true for MSO2013+
|
||||
@@ -161,7 +161,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123622, "tdf123622.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf78749)
|
||||
{
|
||||
createSwDoc("tdf78749.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
//Shape lost the background image before, now check if it still has...
|
||||
auto xShape = getShape(1);
|
||||
uno::Reference<beans::XPropertySet> xShpProps(xShape, uno::UNO_QUERY);
|
||||
@@ -173,7 +173,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf78749)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128207)
|
||||
{
|
||||
createSwDoc("tdf128207.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
//There was the charts on each other, because their horizontal and vertical position was 0!
|
||||
xmlDocUniquePtr p_XmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(p_XmlDoc);
|
||||
@@ -183,7 +183,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf128207)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123873)
|
||||
{
|
||||
createSwDoc("tdf123873.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
//OLE Object were overlapped due to missing wrap import
|
||||
xmlDocUniquePtr p_XmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(p_XmlDoc);
|
||||
@@ -194,7 +194,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123873)
|
||||
CPPUNIT_TEST_FIXTURE(Test, Tdf133065)
|
||||
{
|
||||
createSwDoc("tdf133065.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(7, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
auto pxmldoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -235,7 +235,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf130814model, "tdf130814.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf107020)
|
||||
{
|
||||
createSwDoc("tdf107020.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
if (!IsDefaultDPI())
|
||||
return;
|
||||
xmlDocUniquePtr p_XmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -253,7 +253,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf107020)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf130814ooxml)
|
||||
{
|
||||
createSwDoc("tdf130814.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr p_XmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(p_XmlDoc);
|
||||
assertXPath(
|
||||
@@ -303,7 +303,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129888dml, "tdf129888dml.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf130120)
|
||||
{
|
||||
createSwDoc("tdf130120.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Text for exporting the allowincell attribute:
|
||||
xmlDocUniquePtr p_XmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(p_XmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r/mc:AlternateContent/"
|
||||
@@ -313,7 +313,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf130120)
|
||||
CPPUNIT_TEST_FIXTURE(Test, Tdf133030)
|
||||
{
|
||||
createSwDoc("tdf133030.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
auto pExport = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pExport);
|
||||
|
||||
@@ -393,7 +393,7 @@ CPPUNIT_TEST_FIXTURE(Test, testArabicZeroNumberingFootnote)
|
||||
uno::UNO_QUERY);
|
||||
xTextContentAppend->appendTextContent(xFootnote, {});
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
@@ -421,7 +421,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChicagoNumberingFootnote)
|
||||
uno::UNO_QUERY);
|
||||
xTextContentAppend->appendTextContent(xFootnote, {});
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
@@ -433,7 +433,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChicagoNumberingFootnote)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testListNotCountedIndent)
|
||||
{
|
||||
createSwDoc("list_notcounted_indent.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:numPr/w:numId", "val", u"0");
|
||||
// wrong: 720
|
||||
@@ -471,7 +471,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87569d, "tdf87569_drawingml.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf130610)
|
||||
{
|
||||
createSwDoc("tdf130610_bold_in_2_styles.ott");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// check character properties
|
||||
{
|
||||
@@ -497,7 +497,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf130610)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121045)
|
||||
{
|
||||
createSwDoc("tdf121045.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:sz", "val", u"20");
|
||||
@@ -530,7 +530,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf78352, "tdf78352.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf81567)
|
||||
{
|
||||
createSwDoc("tdf81567.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
|
||||
@@ -561,7 +561,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf81567)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf92472)
|
||||
{
|
||||
createSwDoc("tdf92472.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:sz", "val", u"20");
|
||||
@@ -584,7 +584,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf92472)
|
||||
CPPUNIT_TEST_FIXTURE(Test, Tdf133035)
|
||||
{
|
||||
createSwDoc("tdf133035.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
auto pxml = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pxml);
|
||||
OUString aXmlVal = getXPath(pxml, "/w:document/w:body/w:p[1]/w:r[1]/w:object/v:shape", "style");
|
||||
@@ -629,7 +629,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf108350_noFontdefaults, "tdf108350_noFontdefaults
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123116_oversizedRowSplit)
|
||||
{
|
||||
createSwDoc("tdf123116_oversizedRowSplit.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Intentionally require a very non-backward-compatible, natural continuation of the table
|
||||
// instead of an ugly "page break" like MS Word does (and LO used to do).
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Row splits over 4 pages", 4, getPages());
|
||||
@@ -649,7 +649,7 @@ DECLARE_OOXMLEXPORT_TEST(testPageContentBottom, "page-content-bottom.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf129522_removeShadowStyle)
|
||||
{
|
||||
createSwDoc("tdf129522_removeShadowStyle.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference< container::XNameAccess > paragraphStyles = getStyles(u"ParagraphStyles"_ustr);
|
||||
uno::Reference< beans::XPropertySet > xStyleProps(paragraphStyles->getByName(u"Shadow"_ustr), uno::UNO_QUERY_THROW);
|
||||
@@ -724,7 +724,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf83309, "tdf83309.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121661)
|
||||
{
|
||||
createSwDoc("tdf121661.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlSettings, "/w:settings/w:hyphenationZone", "val", u"851");
|
||||
|
||||
@@ -757,7 +757,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149421)
|
||||
|
||||
createSwDoc("tdf121661.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -778,7 +778,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf161628, "tdf132599_frames_on_right_pages_no_hyph
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf155707)
|
||||
{
|
||||
createSwDoc("tdf155707.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
@@ -791,7 +791,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf155707)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf161643)
|
||||
{
|
||||
createSwDoc("fdo76163.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlSettings, "/w:settings/w:consecutiveHyphenLimit", "val", u"1");
|
||||
|
||||
@@ -803,7 +803,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf161643)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121658)
|
||||
{
|
||||
createSwDoc("tdf121658.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlSettings, "/w:settings/w:doNotHyphenateCaps");
|
||||
}
|
||||
@@ -811,7 +811,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121658)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTableStyleConfNested)
|
||||
{
|
||||
createSwDoc("table-style-conf-nested.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Without the accompanying fix in place, this test would have failed, as the custom table cell
|
||||
@@ -830,7 +830,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133771)
|
||||
// Without the fix in place, this test would have failed with
|
||||
// "An uncaught exception of type com.sun.star.io.IOException"
|
||||
// exporting to docx
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
assertXPathContent(pXmlDoc, "//w:body/w:p/w:r/w:t", u"Password Protected");
|
||||
@@ -847,7 +847,7 @@ CPPUNIT_TEST_FIXTURE(Test, testZeroLineSpacing)
|
||||
xParagraph->setPropertyValue(u"ParaLineSpacing"_ustr, uno::Any(aSpacing));
|
||||
|
||||
// Export to docx.
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -874,7 +874,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSemiTransparentText)
|
||||
xTextRange->setString(u"x"_ustr);
|
||||
|
||||
// Export to docx.
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
double fValue = getXPath(
|
||||
@@ -929,7 +929,7 @@ CPPUNIT_TEST_FIXTURE(Test, testUserField)
|
||||
xText->insertTextContent(xCursor, xUnnamedField, /*bAbsorb=*/false);
|
||||
|
||||
// Export to docx.
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123621)
|
||||
{
|
||||
createSwDoc("tdf123621.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
assertXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
|
||||
@@ -40,7 +40,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123621)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf131540)
|
||||
{
|
||||
createSwDoc("tdf131540.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// There are 2 OLEs test if one of them moved on save:
|
||||
@@ -84,7 +84,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131801)
|
||||
|
||||
createSwDoc("tdf131801.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -110,7 +110,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131801)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133334_followPgStyle)
|
||||
{
|
||||
createSwDoc("tdf133334_followPgStyle.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf137850_compat15ZOrder, "tdf137850_compat15ZOrder
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf118701)
|
||||
{
|
||||
createSwDoc("tdf118701.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// This was 6, related to moving inline images after the page breaks
|
||||
CPPUNIT_ASSERT_EQUAL(4, getPages());
|
||||
|
||||
@@ -183,7 +183,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123381, "tdf123381.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123401)
|
||||
{
|
||||
createSwDoc("tdf123401.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
|
||||
@@ -221,7 +221,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf116394)
|
||||
|
||||
createSwDoc("tdf116394.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", u" MERGEFIELD ab=cd ");
|
||||
@@ -230,7 +230,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf116394)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123356)
|
||||
{
|
||||
createSwDoc("tdf123356.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
|
||||
@@ -248,7 +248,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123356)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf136404)
|
||||
{
|
||||
createSwDoc("tdf136404.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
|
||||
@@ -303,7 +303,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166436)
|
||||
{
|
||||
// Without the fix in place, this test would have crashed at import time
|
||||
createSwDoc("tdf166436.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
CPPUNIT_ASSERT(xFieldsAccess->hasElements());
|
||||
@@ -312,7 +312,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166436)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123390)
|
||||
{
|
||||
createSwDoc("tdf123390.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
|
||||
@@ -334,7 +334,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123390)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123354)
|
||||
{
|
||||
createSwDoc("tdf123354.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
|
||||
@@ -356,7 +356,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123354)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123384)
|
||||
{
|
||||
createSwDoc("tdf123384.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
|
||||
@@ -413,7 +413,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123355)
|
||||
|
||||
createSwDoc("tdf123355.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -469,7 +469,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123382)
|
||||
|
||||
createSwDoc("tdf123382.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -512,7 +512,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf122648)
|
||||
|
||||
createSwDoc("tdf122648.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -527,7 +527,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf122648)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf98000_changePageStyle)
|
||||
{
|
||||
createSwDoc("tdf98000_changePageStyle.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
|
||||
|
||||
@@ -542,7 +542,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf98000_changePageStyle)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf145998_unnecessaryPageStyles)
|
||||
{
|
||||
createSwDoc("tdf145998_unnecessaryPageStyles.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// Sanity check - always good to test when dealing with page styles and breaks.
|
||||
CPPUNIT_ASSERT_EQUAL(5, getPages());
|
||||
@@ -575,7 +575,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf145998_unnecessaryPageStyles)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf136929_framesOfParagraph)
|
||||
{
|
||||
createSwDoc("tdf136929_framesOfParagraph.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Before this fix, the image was placed in the footer instead of in the text body - messing everything up.
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 5, getPages() );
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
@@ -595,7 +595,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf136589_paraHadField, "tdf136589_paraHadField.doc
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133370_columnBreak)
|
||||
{
|
||||
createSwDoc("tdf133370_columnBreak.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Since non-DOCX formats ignores column breaks in non-column situations, don't export to docx.
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
}
|
||||
@@ -603,7 +603,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133370_columnBreak)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf134649_pageBreak)
|
||||
{
|
||||
createSwDoc("tdf134649_pageBreak.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// This was 1 (missing page break between tables).
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
@@ -624,7 +624,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c14, "tdf135343_column
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf135973)
|
||||
{
|
||||
createSwDoc("tdf135973.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
|
||||
@@ -688,7 +688,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121669_equalColumns, "tdf121669_equalColumns.doc
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreak)
|
||||
{
|
||||
createSwDoc("tdf132149_pgBreak.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// This 5 page document is designed to visually exaggerate the problems
|
||||
// of emulating LO's followed-by-page-style into MSWord's sections.
|
||||
// While much has been improved, there are extra pages present, which still need fixing.
|
||||
@@ -718,7 +718,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreak)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreakB)
|
||||
{
|
||||
createSwDoc("tdf132149_pgBreakB.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// This 5 page document is designed to visually exaggerate the problems
|
||||
// of emulating LO's followed-by-page-style into MSWord's sections.
|
||||
xmlDocUniquePtr pDump = parseLayoutDump();
|
||||
@@ -732,7 +732,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreakB)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreak2)
|
||||
{
|
||||
createSwDoc("tdf132149_pgBreak2.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// This 3 page document is designed to visually exaggerate the problems
|
||||
// of emulating LO's followed-by-page-style into MSWord's sections.
|
||||
|
||||
@@ -748,7 +748,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreak2)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf136952_pgBreak3B)
|
||||
{
|
||||
createSwDoc("tdf136952_pgBreak3B.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// This 4 page document is designed to visually exaggerate the problems
|
||||
// of emulating LO's followed-by-page-style into MSWord's sections.
|
||||
xmlDocUniquePtr pDump = parseLayoutDump();
|
||||
@@ -826,7 +826,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf131561_necessaryBorder, "tdf131561_necessaryBord
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf135655)
|
||||
{
|
||||
createSwDoc("tdf135655.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
const xmlDocUniquePtr pExpDoc = parseExport(u"word/document.xml"_ustr);
|
||||
const OUString sXFillColVal = getXPath(pExpDoc, "/w:document/w:body/w:p/w:r/w:object/v:shape", "fillcolor");
|
||||
CPPUNIT_ASSERT_EQUAL(u"#00A933"_ustr, sXFillColVal);
|
||||
@@ -835,7 +835,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf135655)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf138374)
|
||||
{
|
||||
createSwDoc("tdf138374.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape", "fillcolor", u"#ffd320");
|
||||
assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape", "coordsize", u"1315,6116");
|
||||
@@ -868,7 +868,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf134609_gridAfter, "tdf134609_gridAfter.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf135329_lostImage)
|
||||
{
|
||||
createSwDoc("tdf135329_lostImage.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// the character-anchored image was being skipped, since searchNext didn't notice it.
|
||||
uno::Reference<beans::XPropertySet> xImageProps(getShape(2), uno::UNO_QUERY_THROW);
|
||||
}
|
||||
@@ -876,7 +876,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf135329_lostImage)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf136441_commentInFootnote)
|
||||
{
|
||||
createSwDoc("tdf136441_commentInFootnote.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// failed to load without error if footnote contained a comment.
|
||||
// (MS Word's UI doesn't allow adding comments to a footnote.)
|
||||
}
|
||||
@@ -892,7 +892,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf137683_charHighlightTests)
|
||||
// Don't export unnecessary w:highlight="none" (Unnecessary one intentionally hand-added to original .docx)
|
||||
createSwDoc("tdf137683_charHighlightTests.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlStyles = parseExport(u"word/styles.xml"_ustr);
|
||||
@@ -911,7 +911,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138345_charStyleHighlight, "tdf138345_charStyleH
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf125268)
|
||||
{
|
||||
createSwDoc("tdf125268.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
const uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1), 1, u"Hello"_ustr), uno::UNO_QUERY);
|
||||
// Without the fix in place, this test would have failed with
|
||||
@@ -924,7 +924,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf125268)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf138345_numberingHighlight)
|
||||
{
|
||||
createSwDoc("tdf138345_numberingHighlight.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Before the fix, the highlight was completely lost.
|
||||
xmlDocUniquePtr pXmlStyles = parseExport(u"word/numbering.xml"_ustr);
|
||||
if (pXmlStyles)
|
||||
@@ -976,7 +976,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135665, "tdf135665.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testAtPageShapeRelOrientation)
|
||||
{
|
||||
createSwDoc("rotated_shape.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// invalid combination of at-page anchor and horizontal-rel="paragraph"
|
||||
// caused relativeFrom="column" instead of relativeFrom="page"
|
||||
|
||||
@@ -1013,7 +1013,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAtPageShapeRelOrientation)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testVMLallowincell)
|
||||
{
|
||||
createSwDoc("shape-atpage-in-table.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// VML o:allowincell, apparently the default is "t"
|
||||
@@ -1026,7 +1026,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLallowincell)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromBottomMarginHasFooter)
|
||||
{
|
||||
createSwDoc("tdf133070_testRelativeAnchorHeightFromBottomMarginHasFooter.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#133070 The height was set relative to page print area bottom,
|
||||
// but this was handled relative to page height.
|
||||
// Note: page print area bottom = margin + footer height.
|
||||
@@ -1051,7 +1051,7 @@ DECLARE_OOXMLEXPORT_TEST(TestTdf132483, "tdf132483.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, TestTdf143028)
|
||||
{
|
||||
createSwDoc("fail_bracePair.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
auto pExportXml = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1064,7 +1064,7 @@ CPPUNIT_TEST_FIXTURE(Test, TestTdf143028)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromBottomMarginNoFooter)
|
||||
{
|
||||
createSwDoc("tdf133070_testRelativeAnchorHeightFromBottomMarginNoFooter.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#133070 The height was set relative to page print area bottom,
|
||||
// but this was handled relative to page height.
|
||||
// Note: page print area bottom = margin + footer height.
|
||||
@@ -1076,7 +1076,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromBottomMarginNoFooter)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133702)
|
||||
{
|
||||
createSwDoc("tdf133702.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr");
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133702)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf135667)
|
||||
{
|
||||
createSwDoc("tdf135667.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// This was missing.
|
||||
@@ -1103,7 +1103,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf135667)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testImageSpaceSettings)
|
||||
{
|
||||
createSwDoc("tdf135047_ImageSpaceSettings.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#135047 The spaces of image were not saved.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:drawing/wp:anchor", "distT", u"90170");
|
||||
@@ -1115,7 +1115,7 @@ CPPUNIT_TEST_FIXTURE(Test, testImageSpaceSettings)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf137295)
|
||||
{
|
||||
createSwDoc("tdf137295.doc");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
|
||||
// Without the fix in place, the test would have failed with
|
||||
@@ -1146,7 +1146,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135660, "tdf135660.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf136814)
|
||||
{
|
||||
createSwDoc("tdf136814.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Padding in this document is 0.10 cm which should translate to 3 pt (approx. 1.0583mm)
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf143860NonPrimitiveCustomShape)
|
||||
{
|
||||
createSwDoc("tdf143860_NonPrimitiveCustomShape.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// The document has a custom shape of type non-primitive without handles. Make sure that the shape
|
||||
@@ -55,7 +55,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143860NonPrimitiveCustomShape)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonCurve)
|
||||
{
|
||||
createSwDoc("tdf136386_WrapPolygonCurve.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Document has a curve with contour wrap and 'outside only'. Error was, that type 'square' was
|
||||
@@ -74,7 +74,7 @@ CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonCurve)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonLineShape)
|
||||
{
|
||||
createSwDoc("tdf136386_WrapPolygonLineShape.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Document has a sloping line with contour wrap. Error was, that type 'square' was written and
|
||||
@@ -92,7 +92,7 @@ CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonLineShape)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonCustomShape)
|
||||
{
|
||||
createSwDoc("tdf142433_WrapPolygonCustomShape.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Document has 4-point star with contour wrap. Error was, that the enhanced path was written
|
||||
@@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonCustomShape)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFrameWrapTextMode)
|
||||
{
|
||||
createSwDoc("tdf143432_Frame_WrapTextMode.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -146,7 +146,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134219ContourWrap_glow_rotate)
|
||||
// Test fails on reload without fix with left: expected 1461 actual 2455; right: expected 1302
|
||||
// actual 4177; top: expected 1522 actual 2457; bottom: expected 1296, actual 4179
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -170,14 +170,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134219ContourWrap_stroke_shadow)
|
||||
// Test after reload would fail without fix with
|
||||
// left, top: expected 318 actual 635; right, bottom: expected 1164 actual 2434
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123569_rotWriterImage)
|
||||
{
|
||||
createSwDoc("tdf123569_rotWriterImage_46deg.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
|
||||
@@ -203,7 +203,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf142486_LeftMarginShadowLeft, "tdf142486_LeftMarg
|
||||
DECLARE_OOXMLEXPORT_TEST(testTdf151384Hyperlink, "151384Hyperlink.odt")
|
||||
{
|
||||
createSwDoc("151384Hyperlink.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
xmlDocUniquePtr pXmlStyles = parseExport(u"word/styles.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:r/w:rPr/w:rStyle", "val", u"Hyperlink");
|
||||
@@ -225,7 +225,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf66039, "tdf66039.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf142486_FrameShadow)
|
||||
{
|
||||
createSwDoc("tdf142486_FrameShadow.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
|
||||
@@ -247,7 +247,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142486_FrameShadow)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf136059)
|
||||
{
|
||||
createSwDoc("tdf136059.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Contour has not been exported!", true,
|
||||
@@ -429,7 +429,7 @@ DECLARE_OOXMLEXPORT_TEST(testGutterLeft, "gutter-left.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testGutterTop)
|
||||
{
|
||||
createSwDoc("gutter-top.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlSettings);
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
@@ -442,7 +442,7 @@ CPPUNIT_TEST_FIXTURE(Test, testGutterTop)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testCustomShapePresetExport)
|
||||
{
|
||||
createSwDoc("testCustomShapePresetExport.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Check if the load failed.
|
||||
CPPUNIT_ASSERT(getPages());
|
||||
|
||||
@@ -475,7 +475,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomShapePresetExport)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf148671)
|
||||
{
|
||||
createSwDoc("tdf148671.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Don't assert with 'pFieldMark' failed when document is opened
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
|
||||
@@ -516,7 +516,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf125936_numberingSuperscript, "tdf125936_numberin
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf134619_numberingProps)
|
||||
{
|
||||
createSwDoc("tdf134619_numberingProps.doc");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Get the third paragraph's numbering style's 1st level's bullet size
|
||||
uno::Reference<text::XTextRange> xParagraph = getParagraph(3);
|
||||
auto xLevels = getProperty< uno::Reference<container::XIndexAccess> >(xParagraph, u"NumberingRules"_ustr);
|
||||
@@ -532,7 +532,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134619_numberingProps)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf134951_duplicates)
|
||||
{
|
||||
createSwDoc("tdf134951_duplicates.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(3, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
@@ -561,7 +561,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf135773_numberingShading)
|
||||
batch->commit();
|
||||
|
||||
createSwDoc("tdf135774_numberingShading.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// This test uses a custom setting to export CharBackground as Highlight instead of the 7.0 default of Shading.
|
||||
|
||||
// Before the fix, the imported shading was converted into a red highlight.
|
||||
@@ -572,7 +572,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf135773_numberingShading)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf140336_paraNoneShading)
|
||||
{
|
||||
createSwDoc("tdf140336_paraNoneShading.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Before the fix, the background from a style was exported to dis-inheriting paragraphs/styles.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(COL_AUTO), getProperty<sal_uInt32>(getParagraph(1), u"ParaBackColor"_ustr));
|
||||
@@ -586,7 +586,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf140336_paraNoneShading)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf141173_missingFrames)
|
||||
{
|
||||
createSwDoc("tdf141173_missingFrames.rtf");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Without the fix in place, almost all of the text and textboxes were missing.
|
||||
// Without the fix, there were only 2 shapes (mostly unseen).
|
||||
CPPUNIT_ASSERT_EQUAL(14, getShapes());
|
||||
@@ -609,7 +609,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf142404_tabOverMarginC15, "tdf142404_tabOverMargi
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf142404_tabOverSpacingC15)
|
||||
{
|
||||
createSwDoc("tdf142404_tabOverSpacingC15.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Although TabOverMargin no longer applies to compatibilityMode 15 DOCX files,
|
||||
// it still applies to a tab over the paragraph end (inside text boundaries).
|
||||
// The original 3-page ODT saved as DOCX would fit on one page in MS Word 2010, but 3 in Word 2013.
|
||||
@@ -670,7 +670,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTextframeHyperlink)
|
||||
|
||||
// FIXME: After save&reload, the text frame should still be a text frame, and the above test should still work.
|
||||
// (Currently the Writer text frame becomes a text box (shape based)). See tdf#140961
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// DML
|
||||
@@ -687,7 +687,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146171_invalid_change_date)
|
||||
// disable and check only the conversion of the invalid (zeroed) change date
|
||||
// 0000-00-00T00:00:00Z, resulting loss of change tracking during ODF roundtrip
|
||||
// reload("writer8", "tdf146171.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 0
|
||||
@@ -703,7 +703,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146171_invalid_change_date)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf139580)
|
||||
{
|
||||
createSwDoc("tdf139580.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Without the fix in place, this test would have crashed at export time
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
@@ -719,7 +719,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf149198, "tdf149198.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFooterMarginLost)
|
||||
{
|
||||
createSwDoc("footer-margin-lost.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - Expected: 709
|
||||
@@ -745,7 +745,7 @@ CPPUNIT_TEST_FIXTURE(Test, testEffectExtentLineWidth)
|
||||
// - Actual : 561
|
||||
// i.e. the upper spacing was too large, the last line of the text moved below the shape.
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -758,7 +758,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRtlGutter)
|
||||
CPPUNIT_ASSERT(getProperty<bool>(xStandard, u"RtlGutter"_ustr));
|
||||
|
||||
// When saving back to DOCX:
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// Then make sure the section's gutter is still RTL:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -770,7 +770,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRtlGutter)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf140572_docDefault_superscript)
|
||||
{
|
||||
createSwDoc("tdf140572_docDefault_superscript.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// A round-trip was crashing.
|
||||
|
||||
// Without the fix, everything was DFLT_ESC_AUTO_SUPER (default superscript)
|
||||
@@ -805,7 +805,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf136841, "tdf136841.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf138953)
|
||||
{
|
||||
createSwDoc("croppedAndRotated.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Make sure the rotation is exported correctly, and size not distorted
|
||||
@@ -821,7 +821,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf138953)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf118535)
|
||||
{
|
||||
createSwDoc("tdf118535.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
|
||||
@@ -919,7 +919,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf105688, "tdf105688.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testCommentReply)
|
||||
{
|
||||
createSwDoc("CommentReply.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlComm = parseExport(u"word/comments.xml"_ustr);
|
||||
xmlDocUniquePtr pXmlCommExt = parseExport(u"word/commentsExtended.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlComm);
|
||||
@@ -938,7 +938,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCommentReply)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testCommentDone)
|
||||
{
|
||||
createSwDoc("CommentDone.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlComm = parseExport(u"word/comments.xml"_ustr);
|
||||
assertXPath(pXmlComm, "/w:comments/w:comment[1]/w:p", 2);
|
||||
OUString idLastPara = getXPath(pXmlComm, "/w:comments/w:comment[1]/w:p[2]", "paraId");
|
||||
@@ -1007,14 +1007,14 @@ CPPUNIT_TEST_FIXTURE(Test, testCommentDoneModel)
|
||||
|
||||
createSwDoc("CommentDone.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, Test_ShadowDirection)
|
||||
{
|
||||
createSwDoc("tdf142361ShadowDirection.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// The attribute 'rotWithShape' has the default value 'true' in OOXML, so Words interprets a
|
||||
@@ -1031,7 +1031,7 @@ CPPUNIT_TEST_FIXTURE(Test, Test_ShadowDirection)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf150542)
|
||||
{
|
||||
createSwDoc("tdf150542.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pSettingsDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
// Ensure that all docvars from input are written back and with correct values.
|
||||
@@ -1053,7 +1053,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150542)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf139549)
|
||||
{
|
||||
createSwDoc("tdf139549.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Document contains a VML textbox, the position of the textbox was incorrect.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
OUString aStyle = getXPath(pXmlDoc, "//w:pict/v:shape", "style");
|
||||
@@ -1095,7 +1095,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf139549)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf143726)
|
||||
{
|
||||
createSwDoc("Simple-TOC.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlStyles = parseExport(u"word/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlStyles);
|
||||
@@ -1107,7 +1107,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143726)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf152153)
|
||||
{
|
||||
createSwDoc("embedded_images.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
|
||||
@@ -1128,7 +1128,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf152153)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf152152)
|
||||
{
|
||||
createSwDoc("artistic_effects.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
|
||||
|
||||
@@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148380_fldLocked)
|
||||
xField.set(xFields->nextElement(), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(u"1/23/4567 8:9:10 PM"_ustr, xField->getPresentation(false));
|
||||
CPPUNIT_ASSERT_EQUAL(u"DocInformation:Last printed (fixed)"_ustr, xField->getPresentation(true));
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
getParagraph(2, u"4/5/2022 4:29:00 PM"_ustr);
|
||||
getParagraph(4, u"1/23/4567 8:9:10 PM"_ustr);
|
||||
@@ -210,7 +210,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf139759_commentHighlightBackground, "tdf139759_co
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf135906)
|
||||
{
|
||||
createSwDoc("tdf135906.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// just test round-tripping. The document was exported as corrupt and didn't re-load.
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf146802, "tdf146802.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testParaStyleNumLevel)
|
||||
{
|
||||
createSwDoc("para-style-num-level.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/styles.xml"_ustr);
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - Expected: 1
|
||||
@@ -238,7 +238,7 @@ CPPUNIT_TEST_FIXTURE(Test, testClearingBreak)
|
||||
{
|
||||
// Given a document with a clearing break, when saving to DOCX:
|
||||
createSwDoc("clearing-break.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure that the clearing break is not lost:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -266,7 +266,7 @@ CPPUNIT_TEST_FIXTURE(Test, testContentControlExport)
|
||||
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
|
||||
|
||||
// When exporting to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure the expected markup is used:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -300,7 +300,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCheckboxContentControlExport)
|
||||
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
|
||||
|
||||
// When exporting to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure the expected markup is used:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -349,7 +349,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDropdownContentControlExport)
|
||||
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
|
||||
|
||||
// When exporting to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure the expected markup is used:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -389,7 +389,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPictureContentControlExport)
|
||||
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
|
||||
|
||||
// When exporting to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure the expected markup is used:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -433,7 +433,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDateContentControlExport)
|
||||
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
|
||||
|
||||
// When exporting to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure the expected markup is used:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -476,7 +476,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorder)
|
||||
xPageStyle->setPropertyValue(u"TopBorderDistance"_ustr, uno::Any(nTopBorderDistance));
|
||||
|
||||
// When exporting to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure that the page edge -> border space is correct:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -492,7 +492,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorder)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf148494)
|
||||
{
|
||||
createSwDoc("tdf148494.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -505,7 +505,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148494)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf137466)
|
||||
{
|
||||
createSwDoc("tdf137466.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Ensure that we have <w:placeholder><w:docPart v:val="xxxx"/></w:placeholder>
|
||||
@@ -543,7 +543,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDontAddNewStyles)
|
||||
|
||||
// When saving that document:
|
||||
createSwDoc("dont-add-new-styles.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure that export doesn't have additional styles, Caption was one of them:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/styles.xml"_ustr);
|
||||
@@ -601,7 +601,7 @@ DECLARE_OOXMLEXPORT_TEST(TestWPGZOrder, "testWPGZOrder.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf148720)
|
||||
{
|
||||
createSwDoc("tdf148720.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pLayout = parseLayoutDump();
|
||||
|
||||
const char* sShapeXPaths[] =
|
||||
@@ -679,7 +679,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123642_BookmarkAtDocEnd)
|
||||
|
||||
createSwDoc("tdf123642.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -877,7 +877,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148111)
|
||||
|
||||
createSwDoc("tdf148111.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -914,7 +914,7 @@ DECLARE_OOXMLEXPORT_TEST(TestTdf73499, "tdf73499.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf81507)
|
||||
{
|
||||
createSwDoc("tdf81507.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Ensure that we have <w:text w:multiLine="1"/>
|
||||
@@ -984,12 +984,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf144563, "tdf144563.docx")
|
||||
#if !defined(_WIN32)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf146955)
|
||||
{
|
||||
auto const url{createFileURL(u"tdf146955.odt")};
|
||||
std::cout << url << ":\n";
|
||||
loadFromURL(url, nullptr);
|
||||
save(u"Office Open XML Text"_ustr, nullptr);
|
||||
std::cout << maTempFile.GetURL() << ":\n";
|
||||
loadFromURL(maTempFile.GetURL(), nullptr);
|
||||
createSwDoc("tdf146955.odt");
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// import of a (broken?) DOCX export with dozens of frames raised a SAX exception,
|
||||
// when the code tried to access to a non-existent footnote
|
||||
uno::Reference<text::XFootnotesSupplier> xNotes(mxComponent, uno::UNO_QUERY);
|
||||
@@ -1000,7 +996,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146955)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf144668)
|
||||
{
|
||||
createSwDoc("tdf144668.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<beans::XPropertySet> xPara1(getParagraph(1, u"level1"_ustr), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(u"[0001]"_ustr, getProperty<OUString>(xPara1, u"ListLabelString"_ustr));
|
||||
|
||||
@@ -1017,7 +1013,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf148455_1, "tdf148455_1.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf148455_2)
|
||||
{
|
||||
createSwDoc("tdf148455_2.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Find list id for restarted list
|
||||
@@ -1035,7 +1031,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148455_2)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf147978enhancedPathABVW)
|
||||
{
|
||||
createSwDoc("tdf147978_enhancedPath_commandABVW.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Make sure the new implemented export for commands A,B,V and W use the correct arc between
|
||||
// the given two points, here the short one.
|
||||
for (sal_Int16 i = 1 ; i <= 4; ++i)
|
||||
@@ -1082,7 +1078,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf154481, "tdf154481.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf149200)
|
||||
{
|
||||
createSwDoc("tdf149200.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -1155,7 +1151,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf149089, "tdf149089.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf139128)
|
||||
{
|
||||
createSwDoc("tdf139128.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
|
||||
@@ -56,7 +56,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150197_predefinedNumbering)
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(u"1."_ustr, getProperty<OUString>(getParagraph(1), u"ListLabelString"_ustr));
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(u"1."_ustr, getProperty<OUString>(getParagraph(1), u"ListLabelString"_ustr));
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineSdtHeader)
|
||||
// Without the accompanying fix in place, this test would have failed with an assertion failure,
|
||||
// we produced not-well-formed XML on save.
|
||||
createSwDoc("inline-sdt-header.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testCellSdtRedline)
|
||||
@@ -73,7 +73,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCellSdtRedline)
|
||||
// Without the accompanying fix in place, this test would have failed with an assertion failure,
|
||||
// we produced not-well-formed XML on save.
|
||||
createSwDoc("cell-sdt-redline.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf148956_directEndFormatting)
|
||||
@@ -107,7 +107,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148956_directEndFormatting)
|
||||
};
|
||||
createSwDoc("tdf148956_directEndFormatting.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf154751_dualStrikethrough, "tdf154751_dualStriket
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf154478)
|
||||
{
|
||||
createSwDoc("tdf154478.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/comments.xml"_ustr);
|
||||
|
||||
OUString aValues[5] = { u"Comment1 seen."_ustr, u"Comment2 seen."_ustr, u"Comment3 NOTseen."_ustr, u"Comment4 NOTseen."_ustr, u"Comment5 NOTseen."_ustr };
|
||||
@@ -183,7 +183,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154478)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf153592_columnBreaks)
|
||||
{
|
||||
createSwDoc("tdf153592_columnBreaks.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// The two column breaks were lost on import. (I wouldn't complain if they were at 3,5)
|
||||
@@ -301,7 +301,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154703_framePr2)
|
||||
|
||||
createSwDoc("tdf154703_framePr2.rtf");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
|
||||
// exported: framed paragraphs without a background should now have a red background
|
||||
@@ -316,7 +316,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154703_framePr2)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf154703_framePrWrapSpacing)
|
||||
{
|
||||
createSwDoc("tdf154703_framePrWrapSpacing.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -328,7 +328,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154703_framePrTextDirection)
|
||||
{
|
||||
createSwDoc("tdf154703_framePrTextDirection.docx");
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int16(text::WritingMode2::TB_RL), getProperty<sal_Int16>(getShape(1), u"WritingMode"_ustr));
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int16(text::WritingMode2::TB_RL), getProperty<sal_Int16>(getShape(1), u"WritingMode"_ustr));
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -528,7 +528,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf153964_firstIndentAfterBreak14, "tdf153964_first
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf148834_lineNumbering)
|
||||
{
|
||||
createSwDoc("tdf148834_lineNumbering.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pStylesXml = parseExport(u"word/styles.xml"_ustr);
|
||||
// user specified: do not include in line numbering
|
||||
@@ -542,7 +542,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148834_lineNumbering)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf157598)
|
||||
{
|
||||
createSwDoc("tdf157598.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pStylesXml = parseExport(u"word/styles.xml"_ustr);
|
||||
|
||||
@@ -559,7 +559,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf76022_textboxWrap)
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Did you make wrapping sane/interoperable?", 1, getPages());
|
||||
|
||||
// When saving to DOCX, the table should obey the fly wrapping
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// The fly takes up the whole page, so the table needs to shift down to the next page.
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
@@ -590,7 +590,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149551_mongolianVert)
|
||||
|
||||
// Such shape must have vert="mongolianVert" again after saving.
|
||||
// Without fix the orientation was vert="vert".
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//wps:bodyPr", "vert", u"mongolianVert");
|
||||
}
|
||||
@@ -598,7 +598,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149551_mongolianVert)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf151912)
|
||||
{
|
||||
createSwDoc("tdf151912.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// For now just ensure roundtrip is successful
|
||||
|
||||
//tdf#151548 - ensure block SDT preserves id (instead of random re-assignment)
|
||||
@@ -639,7 +639,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNumberPortionFormatFromODT)
|
||||
createSwDoc("number-portion-format.odt");
|
||||
|
||||
// When saving to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure that the paragraph marker's char format has that custom font size:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -657,7 +657,7 @@ CPPUNIT_TEST_FIXTURE(Test, testParaStyleCharPosition)
|
||||
createSwDoc("para-style-char-position.docx");
|
||||
|
||||
// When saving it back to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure that is not turned into a normal subscript text:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/styles.xml"_ustr);
|
||||
@@ -681,7 +681,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150966_regularInset)
|
||||
|
||||
// Without fix the insets were tIns="359280" and bIns="539640". The text area had 1080Emu height
|
||||
// and Word displays no text at all.
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPathAttrs(pXmlDoc, "//wps:bodyPr", { { "tIns", u"179640" }, { "bIns", u"360000" } });
|
||||
}
|
||||
@@ -689,7 +689,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150966_regularInset)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf152636_lostPageBreak)
|
||||
{
|
||||
createSwDoc("tdf152636_lostPageBreak.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
@@ -697,7 +697,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf152636_lostPageBreak)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf152636_lostPageBreak2)
|
||||
{
|
||||
createSwDoc("tdf152636_lostPageBreak2.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
@@ -708,7 +708,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtDuplicatedId)
|
||||
createSwDoc("sdt-duplicated-id.docx");
|
||||
|
||||
// When exporting that back to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure we write 2 <w:sdt> and no duplicates:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -722,7 +722,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtDuplicatedId)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testImageCropping)
|
||||
{
|
||||
createSwDoc("crop-roundtrip.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// the image has no cropping after roundtrip, because it has been physically cropped
|
||||
// NB: this test should be fixed when the core feature to show image cropped when it
|
||||
@@ -740,7 +740,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf152200)
|
||||
createSwDoc("tdf152200-field+textbox.docx");
|
||||
|
||||
// When exporting that back to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure that fldChar with type 'end' goes prior to the at-char anchored fly.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -762,7 +762,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf152200)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf126477)
|
||||
{
|
||||
createSwDoc("embedded_chart.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects());
|
||||
@@ -788,7 +788,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf126477)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf152425)
|
||||
{
|
||||
createSwDoc("tdf152425.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// Check that "List Number" and "List 5" styles don't get merged
|
||||
const OUString Para3Style = getProperty<OUString>(getParagraph(3), u"ParaStyleName"_ustr);
|
||||
@@ -803,7 +803,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf152425)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf153104)
|
||||
{
|
||||
createSwDoc("tdf153104.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
OUString numId = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:numPr/w:numId", "val");
|
||||
@@ -826,7 +826,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf153104)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf153128)
|
||||
{
|
||||
createSwDoc("tdf153128.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
calcLayout();
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
sal_Int32 nFirstLineHeight
|
||||
@@ -844,7 +844,7 @@ CPPUNIT_TEST_FIXTURE(Test, testExportingUnknownStyleInRedline)
|
||||
{
|
||||
// This must not fail assertions
|
||||
createSwDoc("UnknownStyleInRedline.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Check that the original unknown style name "UnknownStyle" is roundtripped
|
||||
// (maybe this is wrong, because Word does not do this).
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -855,7 +855,7 @@ CPPUNIT_TEST_FIXTURE(Test, testExportingUnknownStyleInRedline)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf148026)
|
||||
{
|
||||
createSwDoc("tdf148026.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - Expected: 1
|
||||
@@ -868,7 +868,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148026)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf153664)
|
||||
{
|
||||
createSwDoc("Table-of-Figures.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlStyles = parseExport(u"word/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlStyles);
|
||||
@@ -1011,7 +1011,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159158_zOrder_zIndexMax)
|
||||
|
||||
createSwDoc("tdf159158_zOrder_zIndexMax.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -1034,7 +1034,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159158_zOrder_zIndexDuplicate_compat15)
|
||||
|
||||
createSwDoc("tdf159158_zOrder_zIndexDuplicate_compat15.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -1063,7 +1063,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159158_zOrder_zIndexWins)
|
||||
};
|
||||
createSwDoc("tdf159158_zOrder_zIndexWins.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -1084,7 +1084,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159158_zOrder_behindDocA)
|
||||
|
||||
createSwDoc("tdf159158_zOrder_behindDocA.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -1107,7 +1107,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159158_zOrder_behindDocB)
|
||||
|
||||
createSwDoc("tdf159158_zOrder_behindDocB.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo80555, "fdo80555.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf104418)
|
||||
{
|
||||
createSwDoc("tdf104418.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Problem was that <w:hideMark> cell property was ignored.
|
||||
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
|
||||
@@ -219,7 +219,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo85542, "fdo85542.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf65955)
|
||||
{
|
||||
createSwDoc("tdf65955.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
|
||||
@@ -243,7 +243,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf65955)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf65955_2)
|
||||
{
|
||||
createSwDoc("tdf65955_2.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
|
||||
@@ -292,7 +292,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf8255)
|
||||
};
|
||||
createSwDoc("tdf8255.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
@@ -659,14 +659,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf99140)
|
||||
};
|
||||
createSwDoc("tdf99140.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTableMarginAdjustment)
|
||||
{
|
||||
createSwDoc("table.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Writer, (new) Word: margin 0 means table border starts at 0
|
||||
// (old) Word: margin 0 means paragraph in table starts at 0
|
||||
|
||||
@@ -700,7 +700,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf119760_tableInTablePosition)
|
||||
};
|
||||
createSwDoc("tdf119760_tableInTablePosition.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -755,7 +755,7 @@ DECLARE_OOXMLEXPORT_TEST(testTableCellMargin, "table-cell-margin.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, TestPuzzleExport)
|
||||
{
|
||||
createSwDoc("TestPuzzleExport.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// See tdf#148342 for details
|
||||
// Create a metafile
|
||||
auto pMeta = getSwDocShell()->GetPreviewMetaFile();
|
||||
@@ -861,7 +861,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107359, "tdf107359-char-pitch.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf77236_MissingSolidFill)
|
||||
{
|
||||
createSwDoc("tdf77236_MissingSolidFill.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#77236: solidFill of VML shape was not exported if the colors of line and style were the same
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(
|
||||
@@ -914,7 +914,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf105875_VmlShapeRotationWithFlip)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133363)
|
||||
{
|
||||
createSwDoc("tdf133363.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// tdf#133363: remove extra auto space between first and second list elements
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p[2]/w:pPr/w:spacing", "before",
|
||||
@@ -977,7 +977,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf138093)
|
||||
|
||||
createSwDoc("tdf138093.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -987,7 +987,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf138093)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf138093B)
|
||||
{
|
||||
createSwDoc("tdf138093B.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//w:sdt", 3);
|
||||
@@ -1080,7 +1080,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131722)
|
||||
|
||||
createSwDoc("tdf131722.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1113,7 +1113,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133560)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf150408_isLvl_RoundTrip)
|
||||
{
|
||||
createSwDoc("listWithLgl.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Second level's numbering should use Arabic numbers for first level reference
|
||||
auto xPara = getParagraph(1);
|
||||
@@ -1148,7 +1148,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156548)
|
||||
{
|
||||
// Given a document using two bookmarks with similar names longer than 40 characters
|
||||
createSwDoc("longBookmarkName.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// After the export, the names must be no longer than 40 characters; they must be unique;
|
||||
// and the hyperlinks must use the same names, to still point to the correct targets:
|
||||
@@ -1209,7 +1209,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157136)
|
||||
}
|
||||
|
||||
// Test the same after round-trip
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
{
|
||||
// 1st paragraph - becomes inline content control after roundtrip
|
||||
@@ -1240,14 +1240,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148952_2007)
|
||||
//Given a document with 1 image (with name, alt title and description field populated) in odt format
|
||||
createSwDoc("tdf148952.odt");
|
||||
|
||||
OUString rFilterName = u"MS Word 2007 XML"_ustr;
|
||||
|
||||
//Export it to MS word 2007(.docx) format
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(TestFilter::DOCX_2007);
|
||||
|
||||
// Checks the number of images in the docx file
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
|
||||
uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
|
||||
|
||||
@@ -1268,14 +1265,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148952_2010)
|
||||
//Given a document with 1 image (with name, alt title and description field populated) in odt format
|
||||
createSwDoc("tdf148952.odt");
|
||||
|
||||
OUString rFilterName = u"Office Open XML Text"_ustr;
|
||||
|
||||
//Export it to MS word 2010-365 (.docx) format
|
||||
saveAndReload(rFilterName);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// Checks the number of images in the docx file
|
||||
const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
|
||||
uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPageGraphicBackground)
|
||||
{
|
||||
createSwDoc("page-graphic-background.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
validate(maTempFile.GetFileName(), u"Office Open XML Text");
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// No idea how the graphic background should be exported (seems there is no
|
||||
@@ -58,7 +58,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageGraphicBackground)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testCustomProperties)
|
||||
{
|
||||
createSwDoc("custom-properties.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#133377 tdf#103987 FILESAVE XLSX: Make sure the custom/core/application
|
||||
// file properties are stored correctly after roundtrip to .docx
|
||||
|
||||
@@ -163,7 +163,7 @@ CPPUNIT_TEST_FIXTURE(Test, testZoom)
|
||||
|
||||
createSwDoc("zoom.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
// Validation test: order of elements were wrong.
|
||||
@@ -183,7 +183,7 @@ CPPUNIT_TEST_FIXTURE(Test, testZoom)
|
||||
CPPUNIT_TEST_FIXTURE(Test, defaultTabStopNotInStyles)
|
||||
{
|
||||
createSwDoc("empty.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
validate(maTempFile.GetFileName(), u"Office Open XML Text");
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// The default tab stop was mistakenly exported to a style.
|
||||
@@ -254,7 +254,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo38244)
|
||||
|
||||
createSwDoc("fdo38244.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
validate(maTempFile.GetFileName(), u"Office Open XML Text");
|
||||
}
|
||||
@@ -262,7 +262,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo38244)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testCommentsNested)
|
||||
{
|
||||
createSwDoc("comments-nested.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
validate(maTempFile.GetFileName(), u"Office Open XML Text");
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<beans::XPropertySet> xOuter = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 2), u"TextField"_ustr);
|
||||
@@ -275,7 +275,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCommentsNested)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testMathEscape)
|
||||
{
|
||||
createSwDoc("math-escape.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(u"\\{ \\[ \\] \\( \\) \\}"_ustr, getFormula(getRun(getParagraph(1), 1)));
|
||||
}
|
||||
|
||||
@@ -283,14 +283,14 @@ CPPUNIT_TEST_FIXTURE(Test, testMathEscape)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf158023Export)
|
||||
{
|
||||
createSwDoc("tdf158023_export.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(u"left [ right ] left ( right ) left lbrace right rbrace"_ustr, getFormula(getRun(getParagraph(1), 1)));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo51034)
|
||||
{
|
||||
createSwDoc("fdo51034.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// The problem was that the 'l' param of the HYPERLINK field was parsed with = "#", not += "#".
|
||||
CPPUNIT_ASSERT_EQUAL(u"http://Www.google.com/#a"_ustr, getProperty<OUString>(getRun(getParagraph(1), 1), u"HyperLinkURL"_ustr));
|
||||
@@ -344,7 +344,7 @@ DECLARE_OOXMLEXPORT_TEST(testMathMatrix, "math-matrix.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testMathMso2k7)
|
||||
{
|
||||
createSwDoc("math-mso2k7.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CHECK_FORMULA(u"A \"=\" \u03C0 {r} ^ {2}"_ustr, getFormula(getRun(getParagraph(1), 1)));
|
||||
// TODO check the stack/binom difference
|
||||
// CHECK_FORMULA( "{left (x+a right )} ^ {n} = sum from {k=0} to {n} {left (binom {n} {k} right ) {x} ^ {k} {a} ^ {n-k}}",
|
||||
@@ -443,7 +443,7 @@ DECLARE_OOXMLEXPORT_TEST(testMathVerticalStacks, "math-vertical_stacks.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTable)
|
||||
{
|
||||
createSwDoc("table.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Make sure we write qFormat for well-known style names.
|
||||
xmlDocUniquePtr pXmlDocCT = parseExport(u"word/styles.xml"_ustr);
|
||||
@@ -527,7 +527,7 @@ DECLARE_OOXMLEXPORT_TEST(testTableBorders, "table-borders.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo51550)
|
||||
{
|
||||
createSwDoc("fdo51550.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// The problem was that we lacked the fallback to export the replacement
|
||||
@@ -569,7 +569,7 @@ DECLARE_OOXMLEXPORT_TEST(test1Table1Page, "1-table-1-page.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTextFrames)
|
||||
{
|
||||
createSwDoc("textframes.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// The frames were simply missing, so let's check if all 3 frames were imported back.
|
||||
CPPUNIT_ASSERT_EQUAL(3, getShapes());
|
||||
@@ -636,7 +636,7 @@ DECLARE_OOXMLEXPORT_TEST(testTextframeGradient, "textframe-gradient.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testCellBtlr)
|
||||
{
|
||||
createSwDoc("cell-btlr.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
/*
|
||||
* The problem was that the exporter didn't mirror the workaround of the
|
||||
* importer, regarding the btLr text direction: the <w:textDirection
|
||||
@@ -678,7 +678,7 @@ DECLARE_OOXMLEXPORT_TEST(testMathLiteral, "math-literal.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo48557)
|
||||
{
|
||||
createSwDoc("fdo48557.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Inner margins of the textframe wasn't exported.
|
||||
@@ -719,7 +719,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo64826)
|
||||
// 'Track-Changes' (Track Revisions) wasn't exported.
|
||||
createSwDoc("fdo64826.docx");
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(mxComponent, u"RecordChanges"_ustr));
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(mxComponent, u"RecordChanges"_ustr));
|
||||
// 'Show-Changes' should not be exported - default is true.
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
@@ -860,7 +860,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo66543)
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2),
|
||||
getProperty<sal_Int32>(getParagraph( 1 ), u"ParaLineNumberStartValue"_ustr));
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2),
|
||||
getProperty<sal_Int32>(getParagraph( 1 ), u"ParaLineNumberStartValue"_ustr));
|
||||
|
||||
@@ -872,7 +872,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo66543)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testN822175)
|
||||
{
|
||||
createSwDoc("n822175.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
|
||||
@@ -906,7 +906,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo66773, "fdo66773.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo58577)
|
||||
{
|
||||
createSwDoc("fdo58577.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// The second frame was simply missing, so let's check if both frames were imported back.
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
@@ -915,7 +915,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo58577)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testBnc581614)
|
||||
{
|
||||
createSwDoc("bnc581614.doc");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xFrame, u"FillStyle"_ustr));
|
||||
}
|
||||
@@ -950,7 +950,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo66929, "fdo66929.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testPageBorderSpacingExportCase2)
|
||||
{
|
||||
createSwDoc("page-borders-export-case-2.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that the exporter didn't mirror the workaround of the
|
||||
// importer, regarding the page border's spacing : the <w:pgBorders w:offsetFrom="page">
|
||||
// and the inner nodes like <w:top w:space="24" ... />
|
||||
@@ -973,7 +973,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageBorderSpacingExportCase2)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testGrabBag)
|
||||
{
|
||||
createSwDoc("grabbag.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// w:mirrorIndents was lost on roundtrip, now should be handled as a grab bag property
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:mirrorIndents");
|
||||
@@ -1004,7 +1004,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo66781, "fdo66781.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo60990)
|
||||
{
|
||||
createSwDoc("fdo60990.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// The shape had no background, no paragraph adjust and no font color.
|
||||
@@ -1161,7 +1161,7 @@ DECLARE_OOXMLEXPORT_TEST(testTransparentShadow, "transparent-shadow.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, NoFillAttrInImagedata)
|
||||
{
|
||||
createSwDoc("NoFillAttrInImagedata.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
//problem was that type and color2 which are v:fill attributes were written in 'v:imagedata'. The
|
||||
//source file has v:fill and no v:imagedata. Same should be in the file written by LO.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -1189,7 +1189,7 @@ DECLARE_OOXMLEXPORT_TEST(testBnc837302, "bnc837302.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf162070Export)
|
||||
{
|
||||
createSwDoc("tdf162070_export.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(u"{P} rsub {\"abs\"} \"~\" {B} rsub {0} \u00B2"_ustr,
|
||||
getFormula(getRun(getParagraph(1), 1)));
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo79969_xlsb)
|
||||
{
|
||||
createSwDoc("fdo79969_xlsb.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// This UT for DOCX embedded with binary excel work sheet.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr);
|
||||
|
||||
@@ -59,7 +59,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo79969_xlsb)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo80097)
|
||||
{
|
||||
createSwDoc("fdo80097.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
//fdo#76635 : Table borders are not getting preserved.
|
||||
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -112,7 +112,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo80097)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf95033)
|
||||
{
|
||||
createSwDoc("tdf95033.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
//tdf#95033 : Table borders defined by row-level tblPrEx are not getting preserved.
|
||||
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -141,7 +141,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf95033)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf133455)
|
||||
{
|
||||
createSwDoc("tdf133455.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
//Not disabled table cell borders
|
||||
@@ -174,7 +174,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf133455)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf138612)
|
||||
{
|
||||
createSwDoc("tdf138612.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Row 5 Col 1 - vertically merged cell
|
||||
@@ -198,7 +198,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf138612)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf140597)
|
||||
{
|
||||
createSwDoc("tdf140597.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// There were missing tblPrEx table exception borders
|
||||
@@ -216,7 +216,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf140597)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128646)
|
||||
{
|
||||
createSwDoc("tdf128646.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -254,7 +254,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf128646)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf119800)
|
||||
{
|
||||
createSwDoc("tdf119800.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden.
|
||||
// (tdf#128646 solved the same only for table paragraphs)
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -267,7 +267,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf119800)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf131728)
|
||||
{
|
||||
createSwDoc("tdf131728.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Inline paragraphs specified by w:specVanish were loaded as not
|
||||
// inline paragraphs, breaking the paragraph layout. Use ODF text
|
||||
// frame to keep the paragraph layout, where the frame contains the
|
||||
@@ -281,7 +281,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131728)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf48459)
|
||||
{
|
||||
createSwDoc("tdf48459.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// export Inline Heading frame style as style separator
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -293,7 +293,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf48459)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf164901)
|
||||
{
|
||||
createSwDoc("tdf164901.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// This was 0 (lost floating table because of containing a style separator)
|
||||
@@ -303,7 +303,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf164901)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFdo77129)
|
||||
{
|
||||
createSwDoc("fdo77129.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// The problem was that text after TOC field was missing if footer reference comes in field.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -341,7 +341,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129402, "fdo77129.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo79969_xlsm)
|
||||
{
|
||||
createSwDoc("fdo79969_xlsm.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// This UT for DOCX embedded with excel work sheet.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr);
|
||||
|
||||
@@ -364,7 +364,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo79969_xlsm)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo80522)
|
||||
{
|
||||
createSwDoc("fdo80522.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc,
|
||||
@@ -386,7 +386,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo80522)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo80523_pptm)
|
||||
{
|
||||
createSwDoc("fdo80523_pptm.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc,
|
||||
@@ -408,7 +408,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo80523_pptm)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo80523_sldm)
|
||||
{
|
||||
createSwDoc("fdo80523_sldm.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc,
|
||||
@@ -430,7 +430,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo80523_sldm)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo80898)
|
||||
{
|
||||
createSwDoc("fdo80898.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// This UT for DOCX embedded with binary excel work sheet.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr);
|
||||
|
||||
@@ -452,7 +452,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo80898)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOleIconDrawAspect)
|
||||
{
|
||||
createSwDoc("tdf131537.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object/o:OLEObject", "DrawAspect",
|
||||
u"Icon");
|
||||
@@ -461,7 +461,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOleIconDrawAspect)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTableCellWithDirectFormatting)
|
||||
{
|
||||
createSwDoc("fdo80800.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Issue was Direct Formatting for non-first Table cells was not getting preserved.
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -557,7 +557,7 @@ DECLARE_OOXMLEXPORT_TEST(test2colHeader, "2col-header.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf148035)
|
||||
{
|
||||
createSwDoc("tdf148035.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[2]/w:t",
|
||||
@@ -576,7 +576,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148035)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testfdo83048)
|
||||
{
|
||||
createSwDoc("fdo83048.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Issue was wrong SDT properties were getting exported for Date SDT
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/footer2.xml"_ustr);
|
||||
|
||||
@@ -589,7 +589,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo83048)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSdt2Run)
|
||||
{
|
||||
createSwDoc("sdt-2-run.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// The problem was that <w:sdt> was closed after "first", not after "second", so the second assert failed.
|
||||
@@ -602,7 +602,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdt2Run)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testFD083057)
|
||||
{
|
||||
createSwDoc("fdo83057.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/header2.xml"_ustr);
|
||||
|
||||
// A fly frame was attached to a para which started with a hint (run) containing an SDT.
|
||||
@@ -618,7 +618,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFD083057)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testHeaderBorder)
|
||||
{
|
||||
createSwDoc("header-border.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 0, as header margin was lost during import.
|
||||
assertXPath(pXmlDoc, "//w:pgMar", "header", u"720");
|
||||
@@ -648,7 +648,7 @@ DECLARE_OOXMLEXPORT_TEST(testImageNoborder, "image-noborder.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf89774)
|
||||
{
|
||||
createSwDoc("tdf89774.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"docProps/app.xml"_ustr);
|
||||
// This was 65, as unit was seconds instead of minutes.
|
||||
assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:TotalTime",
|
||||
@@ -658,7 +658,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf89774)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSectionProtection)
|
||||
{
|
||||
createSwDoc("sectionprot.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:sectPr/w:formProt", "val", u"true");
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:formProt", "val", u"false");
|
||||
@@ -681,7 +681,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSectionProtection)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSectionProtection2)
|
||||
{
|
||||
createSwDoc("sectionprot2.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "enforcement", u"true");
|
||||
@@ -714,7 +714,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf66398_permissions)
|
||||
|
||||
createSwDoc("tdf66398_permissions.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
// check document permission settings for the whole document
|
||||
@@ -737,7 +737,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf66398_permissions)
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf166173_enforcement)
|
||||
{
|
||||
createSwDoc("tdf166173_enforcement.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
|
||||
// check if attribute 'enforcement' of 'documentProtection' has still '0' value.
|
||||
@@ -747,7 +747,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf166173_enforcement)
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf106843)
|
||||
{
|
||||
createSwDoc("tdf106843.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// check Track Changes permission set in Writer/OpenDocument (password: "test", encoded by default encoding of Writer)
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "edit", u"trackedChanges");
|
||||
@@ -766,7 +766,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf106843)
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf89991_revisionView)
|
||||
{
|
||||
createSwDoc("tdf89991.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// check revisionView (Show Changes) import and export
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlSettings, "/w:settings/w:revisionView", "insDel", u"0");
|
||||
@@ -784,7 +784,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf89991_revisionView)
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf122201_editUnprotectedText)
|
||||
{
|
||||
createSwDoc("tdf122201_editUnprotectedText.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// get the document
|
||||
|
||||
@@ -806,7 +806,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf122201_editUnprotectedText)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSectionHeader)
|
||||
{
|
||||
createSwDoc("sectionprot.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// this test must not be zero
|
||||
@@ -816,7 +816,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSectionHeader)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf146491)
|
||||
{
|
||||
createSwDoc("tdf146491.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 12 - a page style was unnecessarily created for every section.
|
||||
assertXPath(pXmlDoc, "//w:footerReference", 1);
|
||||
@@ -825,7 +825,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146491)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOO47778_1)
|
||||
{
|
||||
createSwDoc("ooo47778-3.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(5, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -835,7 +835,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOO47778_1)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOO47778_2)
|
||||
{
|
||||
createSwDoc("ooo47778-4.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -853,7 +853,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOO47778_2)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOO67471)
|
||||
{
|
||||
createSwDoc("ooo67471-2.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPathContent(pXmlDoc, "(//w:t)[2]", u"B");
|
||||
@@ -862,7 +862,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOO67471)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testKDE302504)
|
||||
{
|
||||
createSwDoc("kde302504-1.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -872,7 +872,7 @@ CPPUNIT_TEST_FIXTURE(Test, testKDE302504)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testKDE216114)
|
||||
{
|
||||
createSwDoc("kde216114-1.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -882,7 +882,7 @@ CPPUNIT_TEST_FIXTURE(Test, testKDE216114)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOO72950)
|
||||
{
|
||||
createSwDoc("ooo72950-1.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//w:tbl", 1);
|
||||
@@ -894,7 +894,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOO72950)
|
||||
CPPUNIT_TEST_FIXTURE(Test, fdo60957)
|
||||
{
|
||||
createSwDoc("fdo60957-2.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//w:tbl", 2);
|
||||
|
||||
@@ -913,7 +913,7 @@ CPPUNIT_TEST_FIXTURE(Test, fdo60957)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testOO106020)
|
||||
{
|
||||
createSwDoc("ooo106020-1.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
assertXPath(pXmlDoc, "//w:tbl", 1);
|
||||
}
|
||||
@@ -928,7 +928,7 @@ DECLARE_OOXMLEXPORT_TEST(testNonBMPChar, "nonbmpchar.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSpacingGroupShapeText)
|
||||
{
|
||||
createSwDoc("tdf131775_SpacingGroupShapeText.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#131775: Check if correct spacing.
|
||||
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -943,7 +943,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSpacingGroupShapeText)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf100581)
|
||||
{
|
||||
createSwDoc("tdf100581.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -974,7 +974,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf100581)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf112287)
|
||||
{
|
||||
createSwDoc("tdf112287.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#131775: Check if correct spacing.
|
||||
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -988,7 +988,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf112287)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf157572_defaultVAnchor)
|
||||
{
|
||||
createSwDoc("tdf157572_defaultVAnchor.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// vAnchor wasn't defined on import. It should default to 'margin' when w:y=non-zero
|
||||
@@ -1000,7 +1000,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157572_defaultVAnchor)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf157572_insidiousCombination)
|
||||
{
|
||||
createSwDoc("tdf157572_insidiousCombination.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// This is a NASTY example. In MS Word, it IMPORTS yAlign=bottom, but positions it as y=0.
|
||||
@@ -1019,7 +1019,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157572_insidiousCombination)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf157572_noVAlignAsText)
|
||||
{
|
||||
createSwDoc("tdf157572_noVAlignAsText.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr", "vAnchor", u"text");
|
||||
@@ -1030,7 +1030,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157572_noVAlignAsText)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf112287B)
|
||||
{
|
||||
createSwDoc("tdf112287B.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr", "vAnchor", u"text");
|
||||
@@ -1040,7 +1040,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf112287B)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testZOrderInHeader)
|
||||
{
|
||||
createSwDoc("tdf120760_ZOrderInHeader.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#120760 Check that the Z-Order of the background is smaller than the front shape's.
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/header2.xml"_ustr);
|
||||
|
||||
@@ -1060,7 +1060,7 @@ CPPUNIT_TEST_FIXTURE(Test, testZOrderInHeader)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testSvgExtensionsSupport)
|
||||
{
|
||||
createSwDoc("SvgImageTest.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"word/_rels/document.xml.rels"_ustr);
|
||||
|
||||
@@ -1086,7 +1086,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSvgExtensionsSupport)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testtdf158044)
|
||||
{
|
||||
createSwDoc("tdf158044.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// write hard attributes to prevent multiple toggle attributes from vanishing
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -1134,7 +1134,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158855)
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Office Open XML Text"),
|
||||
getSwDocShell()->GetMedium()->GetFilter()->GetFilterName());
|
||||
|
||||
saveAndReload(getSwDocShell()->GetMedium()->GetFilter()->GetFilterName());
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
|
||||
@@ -1177,7 +1177,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158971)
|
||||
}
|
||||
|
||||
// Saving must not fail assertions
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// Check again
|
||||
CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
|
||||
@@ -1202,7 +1202,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158451)
|
||||
{
|
||||
//Without the test, crash occurs when document loads
|
||||
createSwDoc("tdf158451.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
//Asserts document contains grouped shapes with Anchor = "As Character"
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
@@ -1221,7 +1221,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159110)
|
||||
{
|
||||
// Given a text with an URL with multiple spaces
|
||||
createSwDoc("multi_space_url.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
static constexpr OUString sExpectedURL
|
||||
= u"http://www.example.org/path%20%20with%20%20spaces"_ustr;
|
||||
|
||||
@@ -63,7 +63,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf161631)
|
||||
|
||||
createSwDoc("tdf161631.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf43767_caseMapNumbering)
|
||||
|
||||
createSwDoc("tdf43767_caseMapNumbering.odt");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156105_percentSuffix)
|
||||
|
||||
createSwDoc("tdf156105_percentSuffix.odt");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlNum = parseExport(u"word/numbering.xml"_ustr);
|
||||
@@ -769,7 +769,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160814_commentOrder)
|
||||
{
|
||||
// given a document with a comment and 5 replies
|
||||
createSwDoc("tdf160814_commentOrder.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// make sure the order of the comments is imported and exported correctly
|
||||
xmlDocUniquePtr pXmlComments = parseExport(u"word/comments.xml"_ustr);
|
||||
@@ -787,7 +787,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPersonalMetaData)
|
||||
officecfg::Office::Common::Security::Scripting::RemovePersonalInfoOnSaving::set(true, pBatch);
|
||||
pBatch->commit();
|
||||
createSwDoc("personalmetadata.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pAppDoc = parseExport(u"docProps/app.xml"_ustr);
|
||||
assertXPath(pAppDoc, "/extended-properties:Properties/extended-properties:Template", 0);
|
||||
@@ -804,7 +804,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPersonalMetaData)
|
||||
officecfg::Office::Common::Security::Scripting::KeepDocUserInfoOnSaving::set(true, pBatch);
|
||||
pBatch->commit();
|
||||
createSwDoc("personalmetadata.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
pAppDoc = parseExport(u"docProps/app.xml"_ustr);
|
||||
assertXPath(pAppDoc, "/extended-properties:Properties/extended-properties:Template", 0);
|
||||
@@ -827,7 +827,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf169072_illegalDates)
|
||||
{
|
||||
// Given a document that MS Word reports as corrupt
|
||||
createSwDoc("tdf169072_illegalDates.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Date Years MUST be greater than 1600 and less than 10,000
|
||||
// so by dropping invalid entries, we have a document that MS Word can now cleanly open
|
||||
@@ -841,7 +841,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRemoveOnlyEditTimeMetaData)
|
||||
{
|
||||
// 1. Check we have the original edit time info
|
||||
createSwDoc("personalmetadata.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pAppDoc = parseExport(u"docProps/app.xml"_ustr);
|
||||
assertXPath(pAppDoc, "/extended-properties:Properties/extended-properties:TotalTime", 1);
|
||||
|
||||
@@ -852,7 +852,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRemoveOnlyEditTimeMetaData)
|
||||
|
||||
// 2. Check edit time info is removed
|
||||
createSwDoc("personalmetadata.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
pAppDoc = parseExport(u"docProps/app.xml"_ustr);
|
||||
assertXPath(pAppDoc, "/extended-properties:Properties/extended-properties:TotalTime", 0);
|
||||
|
||||
@@ -901,7 +901,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf126533_pageBitmap)
|
||||
|
||||
createSwDoc("tdf126533_pageBitmap.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
|
||||
xmlDocUniquePtr pXmlDocRels = parseExport(u"word/_rels/document.xml.rels"_ustr);
|
||||
@@ -941,7 +941,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf154369, "tdf154369.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testScreenTip)
|
||||
{
|
||||
createSwDoc("tdf159897.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -956,13 +956,13 @@ CPPUNIT_TEST_FIXTURE(Test, testEmptyObjectRange)
|
||||
// Assertion failed: isBetween(n, (SAL_MIN_INT64 + d / 2) / m, (SAL_MAX_INT64 - d / 2) / m),
|
||||
// file C:\lo\core\include\o3tl/unit_conversion.hxx, line 75
|
||||
createSwDoc("cloud.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf161509)
|
||||
{
|
||||
createSwDoc("special_styles.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlStyles = parseExport(u"word/styles.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlStyles);
|
||||
|
||||
@@ -1112,7 +1112,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf162370)
|
||||
// This must not crash on save; without the fix, it would fail with
|
||||
// "Assertion failed: vector subscript out of range"
|
||||
createSwDoc("too_many_styles.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128460)
|
||||
@@ -1135,7 +1135,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf128460)
|
||||
createSwDoc("tdf128460.odt");
|
||||
verify();
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// Without the fix in place, the third ASSERT fails with
|
||||
// Expected: text
|
||||
// Actual:
|
||||
@@ -1154,7 +1154,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131288)
|
||||
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
|
||||
|
||||
xText->insertString(xCursor, u"test"_ustr, false);
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
|
||||
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
|
||||
@@ -1169,7 +1169,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131288)
|
||||
xText->insertString(xCursor, u"more testing"_ustr, false);
|
||||
|
||||
// Save again
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xNameAccess = packages::zip::ZipFileAccess::createWithURL(
|
||||
comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
|
||||
@@ -1187,14 +1187,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf89731)
|
||||
{
|
||||
// Without the fix in place this crashes on opening
|
||||
createSwDoc("tdf89731.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf61309)
|
||||
{
|
||||
// Don't crash on import
|
||||
createSwDoc("tdf61309.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
}
|
||||
|
||||
@@ -1202,7 +1202,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf162746)
|
||||
{
|
||||
// Without the fix in place this hangs (and eventually OOMs) on opening
|
||||
createSwDoc("tdf162746.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#162781: test the page body table vertical offset and width
|
||||
xmlDocUniquePtr pDump = parseLayoutDump();
|
||||
// Without the fix, this would be 0 - i.e., the page body table didn't shift down
|
||||
@@ -1217,7 +1217,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf61000)
|
||||
{
|
||||
// Without the fix in place this crashes on opening
|
||||
createSwDoc("tdf61000.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/numbering.xml"_ustr);
|
||||
assertXPath(pXmlDoc,
|
||||
"//w:numbering/w:abstractNum[@w:abstractNumId='1']/w:lvl[@w:ilvl='0']/w:numFmt",
|
||||
@@ -1233,7 +1233,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf61000)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testCommentWithChildrenTdf163092)
|
||||
{
|
||||
createSwDoc("comment_with_children.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// commentsExtended should exist
|
||||
xmlDocUniquePtr pXmlCommExt = parseExport("word/commentsExtended.xml");
|
||||
CPPUNIT_ASSERT(pXmlCommExt);
|
||||
@@ -1264,7 +1264,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146269)
|
||||
}
|
||||
|
||||
// Test also after save-and-reload:
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
{
|
||||
auto xModifiable = mxComponent.queryThrow<util::XModifiable>();
|
||||
CPPUNIT_ASSERT(!xModifiable->isModified());
|
||||
@@ -1274,7 +1274,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146269)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf164065)
|
||||
{
|
||||
createSwDoc("tdf164065.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
|
||||
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
@@ -1302,7 +1302,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf164474)
|
||||
}
|
||||
|
||||
// Test also after save-and-reload:
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
{
|
||||
auto xTextTablesSupplier(mxComponent.queryThrow<text::XTextTablesSupplier>());
|
||||
auto xTables(xTextTablesSupplier->getTextTables().queryThrow<container::XIndexAccess>());
|
||||
@@ -1335,7 +1335,7 @@ CPPUNIT_TEST_FIXTURE(Test, testMsWordUlTrailSpace)
|
||||
}
|
||||
|
||||
// Test also after save-and-reload:
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
{
|
||||
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY_THROW);
|
||||
uno::Reference<beans::XPropertySet> xSettings(
|
||||
@@ -1352,7 +1352,7 @@ CPPUNIT_TEST_FIXTURE(Test, testMsWordUlTrailSpace)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf165059_moveFromTo)
|
||||
{
|
||||
createSwDoc("tdf165059_broken.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Without the fix, exported contains w:move* outside of move ranges
|
||||
// Outside move range tags ins/del are valid
|
||||
xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf165642_glossaryFootnote)
|
||||
{
|
||||
createSwDoc("tdf165642_glossaryFootnote.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// round-trip'ing the settings.xml file as is, it contains footnote/endnote references
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/glossary/settings.xml"_ustr);
|
||||
assertXPath(pXmlSettings, "//w:endnotePr", 1);
|
||||
@@ -56,7 +56,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166201_simplePos)
|
||||
// Given a document with an image at the bottom-right placed there by simplePos
|
||||
|
||||
createSwDoc("tdf166201_simplePos.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(css::text::RelOrientation::PAGE_FRAME,
|
||||
getProperty<sal_Int16>(getShape(1), u"HoriOrientRelation"_ustr));
|
||||
@@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166201_simplePosCM)
|
||||
// Given a document with an image at the bottom-right placed there by simplePos - in cm
|
||||
|
||||
createSwDoc("tdf166201_simplePosCM.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(css::text::RelOrientation::PAGE_FRAME,
|
||||
getProperty<sal_Int16>(getShape(1), u"VertOrientRelation"_ustr));
|
||||
@@ -161,7 +161,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166975)
|
||||
CPPUNIT_ASSERT_EQUAL(u"ccc)"_ustr,
|
||||
getProperty<OUString>(getParagraph(6), u"ListLabelString"_ustr));
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(u"a)"_ustr,
|
||||
getProperty<OUString>(getParagraph(2), u"ListLabelString"_ustr));
|
||||
@@ -183,7 +183,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165492_exactWithBottomSpacing)
|
||||
// and table bottom border padding of 1.5cm...
|
||||
|
||||
createSwDoc("tdf165492_exactWithBottomSpacing.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// When laying out that document:
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
@@ -205,7 +205,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165492_atLeastWithBottomSpacing)
|
||||
// and table bottom border padding of 1.5cm...
|
||||
|
||||
createSwDoc("tdf165492_atLeastWithBottomSpacing.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// When laying out that document:
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
@@ -227,7 +227,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165047_consolidatedTopMargin)
|
||||
// which is preceded by a paragraph with a lot of lower spacing
|
||||
// and followed by a paragraph with even more upper spacing...
|
||||
createSwDoc("tdf165047_consolidatedTopMargin.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// the upper spacing is mostly "absorbed" by the preceding lower spacing, and is barely noticed
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
@@ -247,7 +247,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165047_contextualSpacingTopMargin)
|
||||
// and followed by a paragraph with a lot of upper spacing,
|
||||
// but that paragraph says "don't add space between identical paragraph styles...
|
||||
createSwDoc("tdf165047_contextualSpacingTopMargin.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// the upper spacing is ignored since the paragraph styles are the same
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
@@ -264,7 +264,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166553_paraStyleAfterBreak)
|
||||
{
|
||||
// Given a distinctively styled paragraph containing a (column) break in the middle of the para
|
||||
createSwDoc("tdf166553_paraStyleAfterBreak.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// Note: we emulate this by creating two real paragraphs.
|
||||
// The paragraph style/formatting after the break must be (almost) the same as before the break
|
||||
@@ -337,7 +337,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf167721_chUnits2)
|
||||
// <w:ind w:firstLineChars="0"/>
|
||||
|
||||
createSwDoc("tdf167721_chUnits2.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
// Test the parent style ######################################################################
|
||||
uno::Reference<beans::XPropertySet> xStyle(
|
||||
@@ -466,7 +466,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf167721_chUnits4, "tdf167721_chUnits4.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf167721_zeroCh)
|
||||
{
|
||||
createSwDoc("tdf167721_zeroCh.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
xmlDocUniquePtr pXmlStyles = parseExport(u"word/styles.xml"_ustr);
|
||||
|
||||
@@ -492,7 +492,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf83844)
|
||||
};
|
||||
|
||||
fnVerify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
fnVerify();
|
||||
}
|
||||
|
||||
@@ -514,7 +514,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf83844Hanging)
|
||||
};
|
||||
|
||||
fnVerify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
fnVerify();
|
||||
}
|
||||
|
||||
@@ -528,7 +528,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf88908)
|
||||
CPPUNIT_ASSERT(!rIDSA.get(DocumentSettingId::BALANCE_SPACES_AND_IDEOGRAPHIC_SPACES));
|
||||
}
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
{
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
@@ -538,7 +538,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf88908)
|
||||
rIDSA.set(DocumentSettingId::BALANCE_SPACES_AND_IDEOGRAPHIC_SPACES, true);
|
||||
}
|
||||
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
|
||||
{
|
||||
SwDoc* pDoc = getSwDoc();
|
||||
@@ -550,7 +550,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf88908)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf165933_noDelTextOnMove)
|
||||
{
|
||||
createSwDoc("tdf165933.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
// Without the fix it fails with
|
||||
@@ -565,7 +565,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDelThenFormatDocxExport)
|
||||
// Given a document with <del>A<format>B</format>C</del> style redlines:
|
||||
// When exporting that document:
|
||||
createSwDoc("del-then-format.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure delete "under" format uses the <w:delText> markup:
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
@@ -607,7 +607,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf139418, "tdf139418.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testAnnotationRef)
|
||||
{
|
||||
createSwDoc("comment-annotationref.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Check that the exported comment also has annotationRef
|
||||
xmlDocUniquePtr pXmlComments = parseExport(u"word/comments.xml"_ustr);
|
||||
@@ -629,7 +629,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBadFormulaResult)
|
||||
"com.sun.star.text.TextDocument", aFilterOptions);
|
||||
|
||||
// When saving to DOCX:
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Then make sure that the field result in the last row's last run is not empty:
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -644,7 +644,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBadFormulaResult)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf166511)
|
||||
{
|
||||
createSwDoc("tdf166511.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// The reproducer for tdf#166511 depends on result having footer2 and footer3.xml
|
||||
// Original bugdoc only has footer1.xml, and the result only started having multiples
|
||||
@@ -701,7 +701,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf166511)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testLineBreakInRef)
|
||||
{
|
||||
createSwDoc("line-break-in-ref.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Without the fix if fails with
|
||||
|
||||
@@ -72,7 +72,7 @@ CPPUNIT_TEST_FIXTURE(Test, testHighlightEdit_numbering)
|
||||
properties->setPropertyValue(u"ListAutoFormat"_ustr, uno::Any(aListAutoFormat));
|
||||
|
||||
// Export to docx.
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
|
||||
// Paragraph 2 should have only one w:highlight written per w:rPr. Without the fix, there were two.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -96,7 +96,7 @@ CPPUNIT_TEST_FIXTURE(Test, testHighlightEdit_numbering)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132766)
|
||||
{
|
||||
createSwDoc("tdf132766.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/numbering.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -121,7 +121,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132766)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128245)
|
||||
{
|
||||
createSwDoc("tdf128245.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/numbering.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@@ -151,7 +151,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124367, "tdf124367.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf95189)
|
||||
{
|
||||
createSwDoc("tdf95189.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(u"1"_ustr, getProperty<OUString>(xPara, u"ListLabelString"_ustr));
|
||||
@@ -185,7 +185,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf95189)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128820)
|
||||
{
|
||||
createSwDoc("tdf128820.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Import of exported DOCX failed because of wrong namespace used for wsp element
|
||||
// Now test the exported XML, in case we stop failing opening invalid files
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/document.xml"_ustr);
|
||||
@@ -212,7 +212,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf128820)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128889)
|
||||
{
|
||||
createSwDoc("tdf128889.fodt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
// There was an w:r (with w:br) as an invalid child of first paragraph's w:pPr
|
||||
@@ -225,7 +225,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf128889)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf132754)
|
||||
{
|
||||
createSwDoc("tdf132754.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(u"0.0.0."_ustr, getProperty<OUString>(xPara, u"ListLabelString"_ustr));
|
||||
@@ -270,7 +270,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129353, "tdf129353.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf77796)
|
||||
{
|
||||
createSwDoc("tdf77796.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
// cell paddings from table style
|
||||
@@ -284,7 +284,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf77796)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf128290)
|
||||
{
|
||||
createSwDoc("tdf128290.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
@@ -386,7 +386,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf133605_2, "tdf133605_2.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf123757)
|
||||
{
|
||||
createSwDoc("tdf123757.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/document.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
assertXPath(pXml, "/w:document/w:body/w:tbl", 2);
|
||||
@@ -395,7 +395,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123757)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf141172)
|
||||
{
|
||||
createSwDoc("tdf141172.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/endnotes.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
// This was 1 (lost table during copying endnote content)
|
||||
@@ -405,7 +405,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf141172)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf141548)
|
||||
{
|
||||
createSwDoc("tdf141548.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/endnotes.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
// This was 0 (lost text content of the run with endnoteRef)
|
||||
@@ -417,7 +417,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf141548)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf143399)
|
||||
{
|
||||
createSwDoc("tdf143399.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/footnotes.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
// These were 0 (lost text content of documents both with footnotes and endnotes)
|
||||
@@ -436,7 +436,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143399)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf143583)
|
||||
{
|
||||
createSwDoc("tdf143583_emptyParaAtEndOfFootnote.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/footnotes.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
assertXPath(pXml, "/w:footnotes/w:footnote[3]/w:p", 2);
|
||||
@@ -451,7 +451,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143583)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf152203)
|
||||
{
|
||||
createSwDoc("tdf152203.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/footnotes.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
|
||||
@@ -469,7 +469,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf152203)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf152506)
|
||||
{
|
||||
createSwDoc("tdf152506.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/footnotes.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
|
||||
@@ -487,7 +487,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf152506)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf153255)
|
||||
{
|
||||
createSwDoc("tdf153255.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/footnotes.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
|
||||
@@ -523,7 +523,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf153255)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf153804)
|
||||
{
|
||||
createSwDoc("tdf153804.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/footnotes.xml"_ustr);
|
||||
CPPUNIT_ASSERT(pXml);
|
||||
|
||||
@@ -568,7 +568,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf130088, "tdf130088.docx")
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
|
||||
// check compatibility option in ODT export/import, too
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
}
|
||||
@@ -615,7 +615,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf160518_ODT, "tdf160518_useWord2013TrackBottomHyp
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
|
||||
// check compatibility option in ODT export/import, too
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(3, getPages());
|
||||
}
|
||||
@@ -631,7 +631,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf160518_ODT_compatible,
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
|
||||
// check compatibility option in ODT export/import, too
|
||||
saveAndReload(u"writer8"_ustr);
|
||||
saveAndReload(TestFilter::ODT);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(2, getPages());
|
||||
}
|
||||
@@ -640,7 +640,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_page_in_default_paragraph_style)
|
||||
{
|
||||
// default paragraph style contains hyphenation settings
|
||||
createSwDoc("tdf160518_page_in_default_paragraph_style.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlDoc,
|
||||
"/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']",
|
||||
@@ -653,7 +653,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_auto_in_default_paragraph_style)
|
||||
{
|
||||
// default paragraph style contains hyphenation settings
|
||||
createSwDoc("tdf160518_auto_in_default_paragraph_style.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlDoc,
|
||||
"/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']",
|
||||
@@ -667,7 +667,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_page_in_text_body_style)
|
||||
{
|
||||
// text body style contains hyphenation settings
|
||||
createSwDoc("tdf160518_page_in_text_body_style.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlDoc,
|
||||
"/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']",
|
||||
@@ -680,7 +680,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_auto_in_text_body_style)
|
||||
{
|
||||
// text body style contains hyphenation settings
|
||||
createSwDoc("tdf160518_auto_in_text_body_style.fodt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr);
|
||||
assertXPath(pXmlDoc,
|
||||
"/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']",
|
||||
@@ -697,7 +697,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165354)
|
||||
return;
|
||||
|
||||
createSwDoc("tdf165354.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
// This was "except that it has an at" (hyphenation at the end of the page)
|
||||
assertXPath(pXmlDoc, "//page[1]/body/txt[2]/SwParaPortion/SwLineLayout[9]", "portion",
|
||||
@@ -713,7 +713,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165354)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testHyphenationAuto)
|
||||
{
|
||||
createSwDoc("hyphenation.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Explicitly set hyphenation=auto on document level
|
||||
xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr);
|
||||
@@ -735,7 +735,7 @@ CPPUNIT_TEST_FIXTURE(Test, testHyphenationAuto)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testStrikeoutGroupShapeText)
|
||||
{
|
||||
createSwDoc("tdf131776_StrikeoutGroupShapeText.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#131776: Check if strikeout is used in shape group texts
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -797,7 +797,7 @@ CPPUNIT_TEST_FIXTURE(Test, testStrikeoutGroupShapeText)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf131539)
|
||||
{
|
||||
createSwDoc("tdf131539.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
//The positions of OLE objects were not exported, check if now it is exported correctly
|
||||
@@ -812,7 +812,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf131539)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testLineWidthRounding)
|
||||
{
|
||||
createSwDoc("tdf126363_LineWidthRounding.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#126363: check if line with stays the same after export
|
||||
xmlDocUniquePtr pXml = parseExport(u"word/document.xml"_ustr);
|
||||
// this was 57240 (it differs from the original 57150, losing the preset line width)
|
||||
@@ -825,7 +825,7 @@ CPPUNIT_TEST_FIXTURE(Test, testLineWidthRounding)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf108505)
|
||||
{
|
||||
createSwDoc("tdf108505.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
uno::Reference<text::XTextRange> xParagraph = getParagraph(3);
|
||||
uno::Reference<text::XTextRange> xText
|
||||
= getRun(xParagraph, 1, u"Wrong font when alone on the line"_ustr);
|
||||
@@ -837,7 +837,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf108505)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromTopMarginHasHeader)
|
||||
{
|
||||
createSwDoc("tdf123324_testRelativeAnchorHeightFromTopMarginHasHeader.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// tdf#123324 The height was set relative to page print area top,
|
||||
// but this was handled relative to page height.
|
||||
// Note: page print area top = margin + header height.
|
||||
@@ -849,7 +849,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromTopMarginHasHeader)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromTopMarginNoHeader)
|
||||
{
|
||||
createSwDoc("tdf123324_testRelativeAnchorHeightFromTopMarginNoHeader.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// tdf#123324 The height was set relative from top margin, but this was handled relative from page height.
|
||||
// Note: the MSO Word margin = LO margin + LO header height.
|
||||
// In this case the header does not exist, so MSO Word margin and LO Writer margin are the same.
|
||||
@@ -865,7 +865,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromTopMarginNoHeader)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf64531)
|
||||
{
|
||||
createSwDoc("tdf64531.docx");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
OString sPathToTabs = "/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:pPr/w:tabs/"_ostr;
|
||||
assertXPath(pXmlDoc, sPathToTabs + "w:tab[1]", "pos", u"720");
|
||||
@@ -889,7 +889,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVmlLineShapeMirroredX)
|
||||
{
|
||||
// tdf#97517 The "flip:x" was not handled for VML line shapes.
|
||||
createSwDoc("tdf97517_testVmlLineShapeMirroredX.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
OUString sStyle = getXPath(
|
||||
pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:line",
|
||||
@@ -901,7 +901,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVmlLineShapeMirroredY)
|
||||
{
|
||||
// tdf#137678 The "flip:y" was not handled for VML line shapes.
|
||||
createSwDoc("tdf137678_testVmlLineShapeMirroredY.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
OUString sStyle = getXPath(
|
||||
pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:line",
|
||||
@@ -912,7 +912,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVmlLineShapeMirroredY)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testVmlLineShapeRotated)
|
||||
{
|
||||
createSwDoc("tdf137765_testVmlLineShapeRotated.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// tdf#137765 The "rotation" (in style attribute) was not handled correctly for VML line shapes.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// it was 1.55pt,279.5pt
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf104115)
|
||||
{
|
||||
createSwDoc("tdf104115.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This found 0 nodes: the custom geometry was not written for the Bezier
|
||||
// curve -> Word refused to open the document.
|
||||
@@ -72,7 +72,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103651, "tdf103651.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf99227)
|
||||
{
|
||||
createSwDoc("tdf99227.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// A drawing anchored as character to a footnote caused write past end of document.xml at export to docx.
|
||||
// After that, importing after export failed with
|
||||
// SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word / document.xml',
|
||||
@@ -261,7 +261,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf55427_footnote2endnote)
|
||||
};
|
||||
createSwDoc("tdf55427_footnote2endnote.odt");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify(/*bIsExport*/ true);
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106001, "tdf106001.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf106001_2)
|
||||
{
|
||||
createSwDoc("tdf106001-2.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// In test ODT CharScaleWidth = 900, this was not changed upon OOXML export to stay in [1..600], now it's clamped to 600
|
||||
// Note: we disregard what's set in pPr / rPr and only care about r / rPr
|
||||
@@ -407,7 +407,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121670_columnsInSectionsOnly,
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf106492)
|
||||
{
|
||||
createSwDoc("tdf106492.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// This was 4: an additional sectPr was added to the document.
|
||||
assertXPath(pXmlDoc, "//w:sectPr", 3);
|
||||
@@ -440,7 +440,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf107889)
|
||||
};
|
||||
createSwDoc("tdf107889.docx");
|
||||
verify();
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
verify();
|
||||
}
|
||||
#endif
|
||||
@@ -448,7 +448,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf107889)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf107837)
|
||||
{
|
||||
createSwDoc("tdf107837.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(),
|
||||
@@ -461,7 +461,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf107837)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf107684)
|
||||
{
|
||||
createSwDoc("tdf107684.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/styles.xml"_ustr);
|
||||
// This was 1, <w:outlineLvl> was duplicated for Heading1.
|
||||
@@ -471,7 +471,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf107684)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf107618)
|
||||
{
|
||||
createSwDoc("tdf107618.doc");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
// This was false, header was lost on export.
|
||||
uno::Reference<beans::XPropertySet> xPageStyle(
|
||||
getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY);
|
||||
@@ -519,7 +519,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf105095, "tdf105095.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf106062_nonHangingFootnote)
|
||||
{
|
||||
createSwDoc("tdf106062_nonHangingFootnote.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
|
||||
@@ -596,7 +596,7 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXCheckbox, "activex_checkbox.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testActiveXControlAlign)
|
||||
{
|
||||
createSwDoc("activex_control_align.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// First check box aligned as a floating object
|
||||
@@ -689,7 +689,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf109184, "tdf109184.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf111964)
|
||||
{
|
||||
createSwDoc("tdf111964.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
// Unicode spaces that are not XML whitespace must not be trimmed
|
||||
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:t", vEnSpaces);
|
||||
@@ -712,7 +712,7 @@ DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark-shapetype.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testActiveXControlAtRunEnd)
|
||||
{
|
||||
createSwDoc("activex_control_at_run_end.odt");
|
||||
saveAndReload(u"Office Open XML Text"_ustr);
|
||||
saveAndReload(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(2, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
// Two issues were here:
|
||||
@@ -775,7 +775,7 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_gr
|
||||
CPPUNIT_TEST_FIXTURE(Test, tdf112169)
|
||||
{
|
||||
createSwDoc("tdf112169.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getShapes());
|
||||
CPPUNIT_ASSERT_EQUAL(6, getPages());
|
||||
// LO crashed while export because of character background color handling
|
||||
@@ -790,7 +790,7 @@ CPPUNIT_TEST_FIXTURE(Test, tdf112169)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf103090)
|
||||
{
|
||||
createSwDoc("tdf103090.odt");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -811,7 +811,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf103090)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf107111)
|
||||
{
|
||||
createSwDoc("tdf107111.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// Ensure that hyperlink and its properties are in place.
|
||||
@@ -937,7 +937,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104354_2, "tdf104354-2.docx")
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf137593)
|
||||
{
|
||||
createSwDoc("tdf137593.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
// zero auto spacing, if the first paragraph contains text boxes
|
||||
@@ -949,7 +949,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf137593)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf115557)
|
||||
{
|
||||
createSwDoc("tdf115557.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// A chart anchored to a footnote multiplied during import
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/footnotes.xml"_ustr);
|
||||
|
||||
@@ -959,7 +959,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf115557)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testAlignmentRelativeFromTopMarginDML)
|
||||
{
|
||||
createSwDoc("tdf137641_RelativeFromTopMargin.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Import as DML.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -992,7 +992,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAlignmentRelativeFromTopMarginDML)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testAlignmentRelativeFromTopMarginVML)
|
||||
{
|
||||
createSwDoc("tdf137642_Vertical_Alignment_toppage.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Import as VML.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
@@ -1025,7 +1025,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAlignmentRelativeFromTopMarginVML)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testVmlShapeWithTextbox)
|
||||
{
|
||||
createSwDoc("tdf41466_testVmlShapeWithTextbox.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// Import as VML.
|
||||
// tdf#41466: check whether VML DOCX shape with text is imported as shape with a text frame
|
||||
// (text box). These kind of shapes were imported only as text frames previously, losing the
|
||||
@@ -1043,7 +1043,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVmlShapeWithTextbox)
|
||||
CPPUNIT_TEST_FIXTURE(Test, testLayoutFlowAltAlone)
|
||||
{
|
||||
createSwDoc("layout-flow-alt-alone.docx");
|
||||
save(u"Office Open XML Text"_ustr);
|
||||
save(TestFilter::DOCX);
|
||||
// moved from oox/qa/unit/vml.cxx
|
||||
// FIXME: now the DML part is checked, but we should check VML part in Fallback (too)
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user