sd/qa/unit/ShapeImportExportTest.cxx | 8 - sd/qa/unit/activex-controls-tests.cxx | 26 ++--- sd/qa/unit/export-tests-ooxml1.cxx | 142 +++++++++++++-------------- sd/qa/unit/export-tests-ooxml2.cxx | 140 +++++++++++++-------------- sd/qa/unit/export-tests-ooxml3.cxx | 174 +++++++++++++++++----------------- sd/qa/unit/export-tests.cxx | 96 +++++++++--------- sd/qa/unit/import-tests-smartart.cxx | 98 +++++++++---------- sd/qa/unit/import-tests.cxx | 134 +++++++++++++------------- sd/qa/unit/import-tests2.cxx | 146 ++++++++++++++-------------- sd/qa/unit/misc-tests.cxx | 45 ++++---- sd/qa/unit/sdmodeltestbase.hxx | 23 ++++ sd/qa/unit/uiimpress.cxx | 85 ++++++---------- 12 files changed, 562 insertions(+), 555 deletions(-)
New commits: commit 9022e69b4ceb3c8986a3b8637a661baeebef587a Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue Nov 29 11:54:25 2022 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Nov 29 13:48:29 2022 +0100 SdModelTestBase: introduce createSdImpressDoc and createSdDrawDoc it turned out shadow-blur.odg is instead a presentation file Change-Id: Ifcf3f7a76dd823bea4937927888648008ef6206d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143457 Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/qa/unit/ShapeImportExportTest.cxx b/sd/qa/unit/ShapeImportExportTest.cxx index fa18a184f384..4810cb2ab134 100644 --- a/sd/qa/unit/ShapeImportExportTest.cxx +++ b/sd/qa/unit/ShapeImportExportTest.cxx @@ -63,7 +63,7 @@ SdrObject* searchObject(SdrPage const* pPage, std::u16string_view rName) /* Test text distances (insets) */ void ShapeImportExportTest::testTextDistancesOOXML() { - loadFromURL(u"TextDistancesInsets1.pptx"); + createSdImpressDoc("TextDistancesInsets1.pptx"); SdrPage const* pPage = GetPage(1); // Bottom Margin = 4cm @@ -172,7 +172,7 @@ void ShapeImportExportTest::testTextDistancesOOXML() /* Test text distances (insets) variants where top+bottom margin > text area*/ void ShapeImportExportTest::testTextDistancesOOXML_LargerThanTextAreaSpecialCase() { - loadFromURL(u"TextDistancesInsets2.pptx"); + createSdImpressDoc("TextDistancesInsets2.pptx"); SdrPage const* pPage = GetPage(1); @@ -260,7 +260,7 @@ void ShapeImportExportTest::testTextDistancesOOXML_LargerThanTextAreaSpecialCase /* Test export of text distances (insets) - conversion back of special case */ void ShapeImportExportTest::testTextDistancesOOXML_Export() { - loadFromURL(u"TextDistancesInsets3.pptx"); + createSdImpressDoc("TextDistancesInsets3.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -373,7 +373,7 @@ void ShapeImportExportTest::testTextDistancesOOXML_Export() void ShapeImportExportTest::testTextDistancesODP_OOXML_Export() { - loadFromURL(u"odp/tdf150966_hugeInset.odp"); + createSdImpressDoc("odp/tdf150966_hugeInset.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); CPPUNIT_ASSERT(pXmlDoc); diff --git a/sd/qa/unit/activex-controls-tests.cxx b/sd/qa/unit/activex-controls-tests.cxx index 20f1025bf4a2..ec40a5981f80 100644 --- a/sd/qa/unit/activex-controls-tests.cxx +++ b/sd/qa/unit/activex-controls-tests.cxx @@ -68,7 +68,7 @@ public: void SdActiveXControlsTest::testBackgroundColor() { // Check whether all system colors are imported correctly - loadFromURL(u"pptx/control_background_color.pptx"); + createSdImpressDoc("pptx/control_background_color.pptx"); const std::vector<Color> vBackgroundColors = { @@ -114,7 +114,7 @@ void SdActiveXControlsTest::testBackgroundColor() void SdActiveXControlsTest::testLabelProperties() { - loadFromURL(u"pptx/activex_label.pptx"); + createSdImpressDoc("pptx/activex_label.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -192,7 +192,7 @@ void SdActiveXControlsTest::testLabelProperties() void SdActiveXControlsTest::testTextBoxProperties() { - loadFromURL(u"pptx/activex_textbox.pptx"); + createSdImpressDoc("pptx/activex_textbox.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -327,7 +327,7 @@ void SdActiveXControlsTest::testTextBoxProperties() void SdActiveXControlsTest::testSpinButtonProperties() { - loadFromURL(u"pptx/activex_spinbutton.pptx"); + createSdImpressDoc("pptx/activex_spinbutton.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -417,7 +417,7 @@ void SdActiveXControlsTest::testSpinButtonProperties() void SdActiveXControlsTest::testCommandButtonProperties() { - loadFromURL(u"pptx/activex_commandbutton.pptx"); + createSdImpressDoc("pptx/activex_commandbutton.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -486,7 +486,7 @@ void SdActiveXControlsTest::testCommandButtonProperties() void SdActiveXControlsTest::testScrollBarProperties() { - loadFromURL(u"pptx/activex_scrollbar.pptx"); + createSdImpressDoc("pptx/activex_scrollbar.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -592,7 +592,7 @@ void SdActiveXControlsTest::testScrollBarProperties() void SdActiveXControlsTest::testCheckBoxProperties() { - loadFromURL(u"pptx/activex_checkbox.pptx"); + createSdImpressDoc("pptx/activex_checkbox.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -683,7 +683,7 @@ void SdActiveXControlsTest::testCheckBoxProperties() void SdActiveXControlsTest::testOptionButtonProperties() { - loadFromURL(u"pptx/activex_optionbutton.pptx"); + createSdImpressDoc("pptx/activex_optionbutton.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -764,7 +764,7 @@ void SdActiveXControlsTest::testOptionButtonProperties() void SdActiveXControlsTest::testComboBoxProperties() { - loadFromURL(u"pptx/activex_combobox.pptx"); + createSdImpressDoc("pptx/activex_combobox.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -876,7 +876,7 @@ void SdActiveXControlsTest::testComboBoxProperties() void SdActiveXControlsTest::testListBoxProperties() { - loadFromURL(u"pptx/activex_listbox.pptx"); + createSdImpressDoc("pptx/activex_listbox.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -962,7 +962,7 @@ void SdActiveXControlsTest::testListBoxProperties() void SdActiveXControlsTest::testToggleButtonProperties() { - loadFromURL(u"pptx/activex_togglebutton.pptx"); + createSdImpressDoc("pptx/activex_togglebutton.pptx"); // First control has default properties uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0), uno::UNO_QUERY_THROW); @@ -1044,7 +1044,7 @@ void SdActiveXControlsTest::testToggleButtonProperties() void SdActiveXControlsTest::testPictureProperties() { - loadFromURL(u"pptx/activex_picture.pptx"); + createSdImpressDoc("pptx/activex_picture.pptx"); // Different controls has different image positioning @@ -1112,7 +1112,7 @@ void SdActiveXControlsTest::testPictureProperties() void SdActiveXControlsTest::testFontProperties() { - loadFromURL(u"pptx/activex_fontproperties.pptx"); + createSdImpressDoc("pptx/activex_fontproperties.pptx"); // Different controls has different font properties diff --git a/sd/qa/unit/data/odg/shadow-blur.odg b/sd/qa/unit/data/odp/shadow-blur.odp similarity index 100% rename from sd/qa/unit/data/odg/shadow-blur.odg rename to sd/qa/unit/data/odp/shadow-blur.odp diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 4d764eede9ce..3345ca9aac68 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -229,7 +229,7 @@ void checkFontAttributes(const SdrTextObj* pObj, ItemValue nVal, sal_uInt32 nId) void SdOOXMLExportTest1::testTdf149803() { - loadFromURL(u"pptx/tdf149803.pptx"); + createSdImpressDoc("pptx/tdf149803.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -238,7 +238,7 @@ void SdOOXMLExportTest1::testTdf149803() void SdOOXMLExportTest1::testTdf149311() { - loadFromURL(u"odp/tdf149311.odp"); + createSdImpressDoc("odp/tdf149311.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pRelsDoc = parseExport("ppt/slides/_rels/slide1.xml.rels"); @@ -249,7 +249,7 @@ void SdOOXMLExportTest1::testTdf149311() void SdOOXMLExportTest1::testTdf149128() { - loadFromURL(u"odp/tdf149128.odp"); + createSdImpressDoc("odp/tdf149128.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -265,7 +265,7 @@ void SdOOXMLExportTest1::testTdf149128() void SdOOXMLExportTest1::testTdf66228() { - loadFromURL(u"odp/tdf66228.odp"); + createSdImpressDoc("odp/tdf66228.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -275,7 +275,7 @@ void SdOOXMLExportTest1::testTdf66228() void SdOOXMLExportTest1::testTdf147919() { - loadFromURL(u"odp/tdf147919.odp"); + createSdImpressDoc("odp/tdf147919.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -344,7 +344,7 @@ void SdOOXMLExportTest1::testTdf147919() void SdOOXMLExportTest1::testTdf130165() { - loadFromURL(u"pptx/tdf146223.pptx"); + createSdImpressDoc("pptx/tdf146223.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -353,7 +353,7 @@ void SdOOXMLExportTest1::testTdf130165() void SdOOXMLExportTest1::testTdf124781() { - loadFromURL(u"odp/tdf124781.odp"); + createSdImpressDoc("odp/tdf124781.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml"); @@ -367,7 +367,7 @@ void SdOOXMLExportTest1::testTdf124781() void SdOOXMLExportTest1::testTdf144914() { - loadFromURL(u"pptx/tdf144616.pptx"); + createSdImpressDoc("pptx/tdf144616.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml"); @@ -407,7 +407,7 @@ void SdOOXMLExportTest1::testTdf144914() void SdOOXMLExportTest1::testTdf124232() { - loadFromURL(u"pptx/tdf141704.pptx"); + createSdImpressDoc("pptx/tdf141704.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml"); @@ -447,7 +447,7 @@ void SdOOXMLExportTest1::testTdf124232() void SdOOXMLExportTest1::testTdf143624() { - loadFromURL(u"pptx/tdf143624.pptx"); + createSdImpressDoc("pptx/tdf143624.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/presProps.xml"); @@ -459,7 +459,7 @@ void SdOOXMLExportTest1::testTdf143624() void SdOOXMLExportTest1::testTdf142648() { - loadFromURL(u"pptx/tdf142648.pptx"); + createSdImpressDoc("pptx/tdf142648.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDPS(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<drawing::XDrawPages> xDrawPages(xDPS->getDrawPages(), uno::UNO_SET_THROW); @@ -478,7 +478,7 @@ void SdOOXMLExportTest1::testTdf142648() void SdOOXMLExportTest1::testTdf47365() { - loadFromURL(u"pptx/loopNoPause.pptx"); + createSdImpressDoc("pptx/loopNoPause.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/presProps.xml"); @@ -490,7 +490,7 @@ void SdOOXMLExportTest1::testTdf47365() void SdOOXMLExportTest1::testTdf125071() { - loadFromURL(u"pptx/tdf125071.pptx"); + createSdImpressDoc("pptx/tdf125071.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/presentation.xml"); @@ -501,7 +501,7 @@ void SdOOXMLExportTest1::testTdf125071() void SdOOXMLExportTest1::testTdf54037() { - loadFromURL(u"pptx/tdf54037.pptx"); + createSdImpressDoc("pptx/tdf54037.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -519,7 +519,7 @@ void SdOOXMLExportTest1::testTdf54037() void SdOOXMLExportTest1::testTdf127237() { - loadFromURL(u"pptx/tdf127237.pptx"); + createSdImpressDoc("pptx/tdf127237.pptx"); saveAndReload("impress8"); const SdrPage* pPage = GetPage(1); @@ -538,7 +538,7 @@ void SdOOXMLExportTest1::testTdf127237() void SdOOXMLExportTest1::testBnc887230() { - loadFromURL(u"pptx/bnc887230.pptx"); + createSdImpressDoc("pptx/bnc887230.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -552,7 +552,7 @@ void SdOOXMLExportTest1::testBnc887230() void SdOOXMLExportTest1::testBnc870233_1() { - loadFromURL(u"pptx/bnc870233_1.pptx"); + createSdImpressDoc("pptx/bnc870233_1.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -576,7 +576,7 @@ void SdOOXMLExportTest1::testBnc870233_1() void SdOOXMLExportTest1::testBnc870233_2() { - loadFromURL(u"pptx/bnc870233_2.pptx"); + createSdImpressDoc("pptx/bnc870233_2.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -611,7 +611,7 @@ void SdOOXMLExportTest1::testBnc870233_2() void SdOOXMLExportTest1::testN828390_4() { bool bPassed = false; - loadFromURL(u"n828390_4.odp"); + createSdImpressDoc("n828390_4.odp"); saveAndReload("Impress Office Open XML"); @@ -649,7 +649,7 @@ void SdOOXMLExportTest1::testN828390_4() void SdOOXMLExportTest1::testN828390_5() { - loadFromURL(u"n828390_5.odp"); + createSdImpressDoc("n828390_5.odp"); saveAndReload("Impress Office Open XML"); @@ -667,7 +667,7 @@ void SdOOXMLExportTest1::testN828390_5() void SdOOXMLExportTest1::testLostPlaceholders() { - loadFromURL(u"pptx/LostPlaceholder.odp"); + createSdImpressDoc("pptx/LostPlaceholder.odp"); SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); CPPUNIT_ASSERT(pXImpressDocument); @@ -697,7 +697,7 @@ void SdOOXMLExportTest1::testLostPlaceholders() void SdOOXMLExportTest1::testPlaceholderFillAndOutlineExport() { - loadFromURL(u"pptx/LostPlaceholderFill.odp"); + createSdImpressDoc("pptx/LostPlaceholderFill.odp"); uno::Any aFillStyle; uno::Any aFillColor; @@ -756,7 +756,7 @@ void SdOOXMLExportTest1::testPlaceholderFillAndOutlineExport() void SdOOXMLExportTest1::testFdo71961() { - loadFromURL(u"fdo71961.odp"); + createSdImpressDoc("fdo71961.odp"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -785,7 +785,7 @@ void SdOOXMLExportTest1::testFdo71961() void SdOOXMLExportTest1::testN828390() { bool bPassed = false; - loadFromURL(u"pptx/n828390.pptx"); + createSdImpressDoc("pptx/n828390.pptx"); saveAndReload("Impress Office Open XML"); @@ -809,7 +809,7 @@ void SdOOXMLExportTest1::testN828390() void SdOOXMLExportTest1::testBnc880763() { - loadFromURL(u"pptx/bnc880763.pptx"); + createSdImpressDoc("pptx/bnc880763.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -834,7 +834,7 @@ void SdOOXMLExportTest1::testBnc880763() void SdOOXMLExportTest1::testBnc862510_5() { - loadFromURL(u"pptx/bnc862510_5.pptx"); + createSdImpressDoc("pptx/bnc862510_5.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -855,7 +855,7 @@ void SdOOXMLExportTest1::testBnc862510_5() // not written into the file. void SdOOXMLExportTest1::testBnc822347_EmptyBullet() { - loadFromURL(u"bnc822347_EmptyBullet.odp"); + createSdImpressDoc("bnc822347_EmptyBullet.odp"); saveAndReload("Impress Office Open XML"); SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); @@ -885,7 +885,7 @@ void SdOOXMLExportTest1::testBnc822347_EmptyBullet() //Bullets not having any text following them are not getting exported to pptx correctly. void SdOOXMLExportTest1::testFdo90607() { - loadFromURL(u"fdo90607.pptx"); + createSdImpressDoc("fdo90607.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -898,7 +898,7 @@ void SdOOXMLExportTest1::testFdo90607() void SdOOXMLExportTest1::testFdo83751() { - loadFromURL(u"pptx/fdo83751.pptx"); + createSdImpressDoc("pptx/fdo83751.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier( @@ -914,7 +914,7 @@ void SdOOXMLExportTest1::testFdo83751() void SdOOXMLExportTest1::testFdo79731() { - loadFromURL(u"fdo79731.odp"); + createSdImpressDoc("fdo79731.odp"); saveAndReload("Impress Office Open XML"); SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); CPPUNIT_ASSERT(pXImpressDocument); @@ -930,7 +930,7 @@ void SdOOXMLExportTest1::testTableCellFillProperties() batch->commit(); // Load the original file - loadFromURL(u"odp/Table_with_Cell_Fill.odp"); + createSdImpressDoc("odp/Table_with_Cell_Fill.odp"); // Export the document and import again for a check saveAndReload("Impress Office Open XML"); @@ -962,7 +962,7 @@ void SdOOXMLExportTest1::testTableCellFillProperties() void SdOOXMLExportTest1::testBulletStartNumber() { - loadFromURL(u"pptx/n90255.pptx"); + createSdImpressDoc("pptx/n90255.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -977,7 +977,7 @@ void SdOOXMLExportTest1::testBulletStartNumber() void SdOOXMLExportTest1::testLineStyle() { - loadFromURL(u"pptx/lineStyle.pptx"); + createSdImpressDoc("pptx/lineStyle.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -991,7 +991,7 @@ void SdOOXMLExportTest1::testLineStyle() void SdOOXMLExportTest1::testRightToLeftParaghraph() { - loadFromURL(u"pptx/rightToLeftParagraph.pptx"); + createSdImpressDoc("pptx/rightToLeftParagraph.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1008,7 +1008,7 @@ void SdOOXMLExportTest1::testRightToLeftParaghraph() void SdOOXMLExportTest1::testTextboxWithHyperlink() { - loadFromURL(u"pptx/hyperlinktest.pptx"); + createSdImpressDoc("pptx/hyperlinktest.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1032,7 +1032,7 @@ void SdOOXMLExportTest1::testTextboxWithHyperlink() void SdOOXMLExportTest1::testTdf136911() { - loadFromURL(u"ppt/tdf136911.ppt"); + createSdImpressDoc("ppt/tdf136911.ppt"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1056,7 +1056,7 @@ void SdOOXMLExportTest1::testTdf136911() void SdOOXMLExportTest1::testBulletColor() { - loadFromURL(u"pptx/bulletColor.pptx"); + createSdImpressDoc("pptx/bulletColor.pptx"); saveAndReload("Impress Office Open XML"); @@ -1074,7 +1074,7 @@ void SdOOXMLExportTest1::testBulletColor() void SdOOXMLExportTest1::testBulletCharAndFont() { - loadFromURL(u"odp/bulletCharAndFont.odp"); + createSdImpressDoc("odp/bulletCharAndFont.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1103,7 +1103,7 @@ void SdOOXMLExportTest1::testBulletCharAndFont() void SdOOXMLExportTest1::testBulletMarginAndIndentation() { - loadFromURL(u"pptx/bulletMarginAndIndent.pptx"); + createSdImpressDoc("pptx/bulletMarginAndIndent.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -1124,7 +1124,7 @@ void SdOOXMLExportTest1::testBulletMarginAndIndentation() void SdOOXMLExportTest1::testParaMarginAndindentation() { - loadFromURL(u"pptx/paraMarginAndIndentation.pptx"); + createSdImpressDoc("pptx/paraMarginAndIndentation.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1144,7 +1144,7 @@ void SdOOXMLExportTest1::testParaMarginAndindentation() void SdOOXMLExportTest1::testCellLeftAndRightMargin() { - loadFromURL(u"pptx/n90223.pptx"); + createSdImpressDoc("pptx/n90223.pptx"); saveAndReload("Impress Office Open XML"); sal_Int32 nLeftMargin, nRightMargin; @@ -1174,7 +1174,7 @@ void SdOOXMLExportTest1::testCellLeftAndRightMargin() void SdOOXMLExportTest1::testMergedCells() { - loadFromURL(u"odp/cellspan.odp"); + createSdImpressDoc("odp/cellspan.odp"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -1191,7 +1191,7 @@ void SdOOXMLExportTest1::testMergedCells() void SdOOXMLExportTest1::testTableCellBorder() { - loadFromURL(u"pptx/n90190.pptx"); + createSdImpressDoc("pptx/n90190.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -1235,7 +1235,7 @@ void SdOOXMLExportTest1::testTableCellBorder() void SdOOXMLExportTest1::testTdf111884() { - loadFromURL(u"pptx/tdf111884.pptx"); + createSdImpressDoc("pptx/tdf111884.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -1249,7 +1249,7 @@ void SdOOXMLExportTest1::testTdf111884() void SdOOXMLExportTest1::testTdf112633() { // Load document and export it to a temporary file - loadFromURL(u"pptx/tdf112633.pptx"); + createSdImpressDoc("pptx/tdf112633.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1279,7 +1279,7 @@ void SdOOXMLExportTest1::testTdf112633() void SdOOXMLExportTest1::testTdf128952() { - loadFromURL(u"pptx/tdf128952.pptx"); + createSdImpressDoc("pptx/tdf128952.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1292,7 +1292,7 @@ void SdOOXMLExportTest1::testTdf128952() void SdOOXMLExportTest1::testTdf127090() { - loadFromURL(u"pptx/tdf127090.odp"); + createSdImpressDoc("pptx/tdf127090.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1303,7 +1303,7 @@ void SdOOXMLExportTest1::testTdf127090() void SdOOXMLExportTest1::testCustomXml() { // Load document and export it to a temporary file - loadFromURL(u"pptx/customxml.pptx"); + createSdImpressDoc("pptx/customxml.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("customXml/item1.xml"); @@ -1323,7 +1323,7 @@ void SdOOXMLExportTest1::testCustomXml() void SdOOXMLExportTest1::testTdf94238() { // Load document and export it to a temporary file. - loadFromURL(u"pptx/tdf94238.pptx"); + createSdImpressDoc("pptx/tdf94238.pptx"); save("Impress Office Open XML"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(xDoc.is()); @@ -1356,7 +1356,7 @@ void SdOOXMLExportTest1::testTdf94238() void SdOOXMLExportTest1::testPictureTransparency() { // Load document and export it to a temporary file. - loadFromURL(u"odp/image_transparency.odp"); + createSdImpressDoc("odp/image_transparency.odp"); save("Impress Office Open XML"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(xDoc.is()); @@ -1374,7 +1374,7 @@ void SdOOXMLExportTest1::testPictureTransparency() void SdOOXMLExportTest1::testTdf125554() { - loadFromURL(u"pptx/tdf125554.pptx"); + createSdImpressDoc("pptx/tdf125554.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape = getShapeFromPage(0, 0); @@ -1389,7 +1389,7 @@ void SdOOXMLExportTest1::testTdf125554() void SdOOXMLExportTest1::testRoundtripOwnLineStyles() { // Load odp document and read the LineDash values. - loadFromURL(u"odp/LineStylesOwn.odp"); + createSdImpressDoc("odp/LineStylesOwn.odp"); uno::Reference<drawing::XDrawPagesSupplier> xDocodp(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(xDocodp.is()); uno::Reference<drawing::XDrawPage> xPageodp(xDocodp->getDrawPages()->getByIndex(0), @@ -1430,7 +1430,7 @@ void SdOOXMLExportTest1::testRoundtripOwnLineStyles() void SdOOXMLExportTest1::testRoundtripPrstDash() { // load and save document, compare prstDash values in saved document with original. - loadFromURL(u"pptx/presetDashDot.pptx"); + createSdImpressDoc("pptx/presetDashDot.pptx"); save("Impress Office Open XML"); const OUString sOriginal[] @@ -1467,7 +1467,7 @@ void SdOOXMLExportTest1::testRoundtripPrstDash() void SdOOXMLExportTest1::testDashOnHairline() { // load and save document, make sure the custDash has 11 child elements. - loadFromURL(u"odp/tdf127267DashOnHairline.odp"); + createSdImpressDoc("odp/tdf127267DashOnHairline.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1476,7 +1476,7 @@ void SdOOXMLExportTest1::testDashOnHairline() void SdOOXMLExportTest1::testNarrationNonMediaShape() { - loadFromURL(u"pptx/narration-non-media-shape.pptx"); + createSdImpressDoc("pptx/narration-non-media-shape.pptx"); // Without the accompanying fix in place, this test would have failed, // beans::UnknownPropertyException was thrown. saveAndReload("Impress Office Open XML"); @@ -1484,7 +1484,7 @@ void SdOOXMLExportTest1::testNarrationNonMediaShape() void SdOOXMLExportTest1::testCustomshapeBitmapfillSrcrect() { - loadFromURL(u"pptx/customshape-bitmapfill-srcrect.pptx"); + createSdImpressDoc("pptx/customshape-bitmapfill-srcrect.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1515,7 +1515,7 @@ void SdOOXMLExportTest1::testCustomshapeBitmapfillSrcrect() void SdOOXMLExportTest1::testTdf100348FontworkBitmapFill() { - loadFromURL(u"odp/tdf100348_FontworkBitmapFill.odp"); + createSdImpressDoc("odp/tdf100348_FontworkBitmapFill.odp"); save("Impress Office Open XML"); // Make sure the fontwork shape has a blip bitmap fill and a colored outline. @@ -1528,7 +1528,7 @@ void SdOOXMLExportTest1::testTdf100348FontworkBitmapFill() void SdOOXMLExportTest1::testTdf100348FontworkGradientGlow() { - loadFromURL(u"odp/tdf100348_FontworkGradientGlow.odp"); + createSdImpressDoc("odp/tdf100348_FontworkGradientGlow.odp"); save("Impress Office Open XML"); // Make sure the fontwork shape has a gradient fill and a colored glow. @@ -1542,7 +1542,7 @@ void SdOOXMLExportTest1::testTdf100348FontworkGradientGlow() void SdOOXMLExportTest1::testTdf128345FullTransparentGradient() { - loadFromURL(u"odp/tdf128345_FullTransparentGradient.odp"); + createSdImpressDoc("odp/tdf128345_FullTransparentGradient.odp"); save("Impress Office Open XML"); // Make sure the shape has no fill. Without the patch, fill was solid red. @@ -1552,7 +1552,7 @@ void SdOOXMLExportTest1::testTdf128345FullTransparentGradient() void SdOOXMLExportTest1::testTdf128345GradientLinear() { - loadFromURL(u"odp/tdf128345_GradientLinear.odp"); + createSdImpressDoc("odp/tdf128345_GradientLinear.odp"); save("Impress Office Open XML"); // Make sure the shape has a lin fill. Without the patch, fill was solid red. @@ -1570,7 +1570,7 @@ void SdOOXMLExportTest1::testTdf128345GradientLinear() void SdOOXMLExportTest1::testTdf128345GradientRadial() { - loadFromURL(u"odp/tdf128345_GradientRadial.odp"); + createSdImpressDoc("odp/tdf128345_GradientRadial.odp"); save("Impress Office Open XML"); // Make sure the shape has transparency. In OOXML alpha means 'opacity' with default @@ -1588,7 +1588,7 @@ void SdOOXMLExportTest1::testTdf128345GradientAxial() { // Without the patch, symmetric linear gradient with full transparence outside and // full opak in the middle were imported as full transparent. - loadFromURL(u"odp/tdf128345_GradientAxial.odp"); + createSdImpressDoc("odp/tdf128345_GradientAxial.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShapePropSet(getShapeFromPage(0, 0)); @@ -1601,7 +1601,7 @@ void SdOOXMLExportTest1::testTdf128345GradientAxial() void SdOOXMLExportTest1::testTdf134969TransparencyOnColorGradient() { - loadFromURL(u"odp/tdf134969_TransparencyOnColorGradient.odp"); + createSdImpressDoc("odp/tdf134969_TransparencyOnColorGradient.odp"); save("Impress Office Open XML"); // Make sure the shape has a transparency in gradient stops. @@ -1614,7 +1614,7 @@ void SdOOXMLExportTest1::testTdf134969TransparencyOnColorGradient() void SdOOXMLExportTest1::testArcTo() { - loadFromURL(u"pptx/arc-validiert.pptx"); + createSdImpressDoc("pptx/arc-validiert.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1627,7 +1627,7 @@ void SdOOXMLExportTest1::testArcTo() void SdOOXMLExportTest1::testNarrationMimeType() { - loadFromURL(u"pptx/narration.pptx"); + createSdImpressDoc("pptx/narration.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml"); // Without the accompanying fix in place, this test would have failed with: @@ -1689,7 +1689,7 @@ void SdOOXMLExportTest1::testNarrationMimeType() void SdOOXMLExportTest1::testTdf140865Wordart3D() { - loadFromURL(u"pptx/tdf140865Wordart3D.pptx"); + createSdImpressDoc("pptx/tdf140865Wordart3D.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1707,7 +1707,7 @@ void SdOOXMLExportTest1::testTdf140865Wordart3D() void SdOOXMLExportTest1::testTdf124457() { - loadFromURL(u"pptx/tdf124457.pptx"); + createSdImpressDoc("pptx/tdf124457.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1725,7 +1725,7 @@ void SdOOXMLExportTest1::testTdf124457() void SdOOXMLExportTest1::testTdf143126() { - loadFromURL(u"pptx/tdf143126.pptx"); + createSdImpressDoc("pptx/tdf143126.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/presProps.xml"); @@ -1737,7 +1737,7 @@ void SdOOXMLExportTest1::testTdf143126() void SdOOXMLExportTest1::testTdf143129() { - loadFromURL(u"pptx/tdf143129.pptx"); + createSdImpressDoc("pptx/tdf143129.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/presProps.xml"); @@ -1748,7 +1748,7 @@ void SdOOXMLExportTest1::testTdf143129() void SdOOXMLExportTest1::testTdf118045() { - loadFromURL(u"odp/tdf118045.odp"); + createSdImpressDoc("odp/tdf118045.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml"); @@ -1758,7 +1758,7 @@ void SdOOXMLExportTest1::testTdf118045() void SdOOXMLExportTest1::testTdf137675() { - loadFromURL(u"pptx/tdf137675.pptx"); + createSdImpressDoc("pptx/tdf137675.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 4e01e9ed82fd..7636af9f0079 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -228,7 +228,7 @@ public: void SdOOXMLExportTest2::testRepeatBitmapMode() { - loadFromURL(u"odp/repeatBitmapMode.odp"); + createSdImpressDoc("odp/repeatBitmapMode.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml"); @@ -249,7 +249,7 @@ void SdOOXMLExportTest2::testRepeatBitmapMode() void SdOOXMLExportTest2::testTdf142291() { - loadFromURL(u"pptx/tdt142291.pptx"); + createSdImpressDoc("pptx/tdt142291.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -277,7 +277,7 @@ void SdOOXMLExportTest2::testTdf142291() void SdOOXMLExportTest2::testTdf151492() { - loadFromURL(u"odp/tdf151492.odp"); + createSdImpressDoc("odp/tdf151492.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -287,7 +287,7 @@ void SdOOXMLExportTest2::testTdf151492() void SdOOXMLExportTest2::testTdf149697() { - loadFromURL(u"pptx/tdf149697.pptx"); + createSdImpressDoc("pptx/tdf149697.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -305,7 +305,7 @@ void SdOOXMLExportTest2::testTdf149697() void SdOOXMLExportTest2::testTdf149126() { - loadFromURL(u"odp/tdf149126.odp"); + createSdImpressDoc("odp/tdf149126.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -315,7 +315,7 @@ void SdOOXMLExportTest2::testTdf149126() void SdOOXMLExportTest2::testTdf131905() { - loadFromURL(u"pptx/tdf131905.pptx"); + createSdImpressDoc("pptx/tdf131905.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -337,7 +337,7 @@ void SdOOXMLExportTest2::testTdf131905() void SdOOXMLExportTest2::testTdf93883() { - loadFromURL(u"odp/tdf93883.odp"); + createSdImpressDoc("odp/tdf93883.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape)); @@ -348,7 +348,7 @@ void SdOOXMLExportTest2::testTdf93883() void SdOOXMLExportTest2::testBnc822341() { // Check import / export of embedded text document - loadFromURL(u"odp/bnc822341.odp"); + createSdImpressDoc("odp/bnc822341.odp"); save("Impress Office Open XML"); // Export an LO specific ole object (imported from an ODP document) @@ -409,7 +409,7 @@ void SdOOXMLExportTest2::testBnc822341() void SdOOXMLExportTest2::testMathObject() { // Check import / export of math object - loadFromURL(u"odp/math.odp"); + createSdImpressDoc("odp/math.odp"); save("Impress Office Open XML"); // Export an LO specific ole object (imported from an ODP document) @@ -450,7 +450,7 @@ void SdOOXMLExportTest2::testMathObject() void SdOOXMLExportTest2::testMathObjectPPT2010() { // Check import / export of math object - loadFromURL(u"pptx/Math.pptx"); + createSdImpressDoc("pptx/Math.pptx"); save("Impress Office Open XML"); // Export an MS specific ole object (imported from a PPTX document) @@ -472,7 +472,7 @@ void SdOOXMLExportTest2::testMathObjectPPT2010() void SdOOXMLExportTest2::testTdf119015() { - loadFromURL(u"pptx/tdf119015.pptx"); + createSdImpressDoc("pptx/tdf119015.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -492,7 +492,7 @@ void SdOOXMLExportTest2::testTdf119015() void SdOOXMLExportTest2::testTdf123090() { - loadFromURL(u"pptx/tdf123090.pptx"); + createSdImpressDoc("pptx/tdf123090.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -516,7 +516,7 @@ void SdOOXMLExportTest2::testTdf123090() void SdOOXMLExportTest2::testTdf126324() { - loadFromURL(u"pptx/tdf126324.pptx"); + createSdImpressDoc("pptx/tdf126324.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -531,7 +531,7 @@ void SdOOXMLExportTest2::testTdf126324() void SdOOXMLExportTest2::testTdf119187() { // load document - loadFromURL(u"pptx/tdf119187.pptx"); + createSdImpressDoc("pptx/tdf119187.pptx"); //Check For Import and Export Both for (sal_uInt32 i = 0; i < 2; i++) @@ -554,7 +554,7 @@ void SdOOXMLExportTest2::testTdf119187() void SdOOXMLExportTest2::testTdf132472() { - loadFromURL(u"pptx/tdf132472.pptx"); + createSdImpressDoc("pptx/tdf132472.pptx"); const SdrPage* pPage = GetPage(1); sdr::table::SdrTableObj* pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0)); @@ -581,7 +581,7 @@ void SdOOXMLExportTest2::testTdf132472() void SdOOXMLExportTest2::testTdf80224() { - loadFromURL(u"odp/tdf80224.odp"); + createSdImpressDoc("odp/tdf80224.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -596,7 +596,7 @@ void SdOOXMLExportTest2::testTdf80224() void SdOOXMLExportTest2::testTdf91378() { //Check For Import and Export Both - loadFromURL(u"pptx/tdf91378.pptx"); + createSdImpressDoc("pptx/tdf91378.pptx"); for (sal_uInt32 i = 0; i < 2; i++) { uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier( @@ -660,7 +660,7 @@ static bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> co void SdOOXMLExportTest2::testExportTransitionsPPTX() { - loadFromURL(u"AllTransitions.odp"); + createSdImpressDoc("AllTransitions.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW); @@ -723,7 +723,7 @@ void SdOOXMLExportTest2::testExportTransitionsPPTX() void SdOOXMLExportTest2::testPresetShapesExport() { - loadFromURL(u"odp/preset-shapes-export.odp"); + createSdImpressDoc("odp/preset-shapes-export.odp"); const char* sShapeTypeAndValues[] = { "wedgeEllipseCallout", "adj1", @@ -845,7 +845,7 @@ void SdOOXMLExportTest2::testTdf92527() { // We draw a diamond in an empty document. // If custom shape has name and preset information in OOXML, should be export as preset shape. - loadFromURL(u"empty.fodp"); + createSdImpressDoc("empty.fodp"); uno::Reference<drawing::XDrawPage> xPage1(getPage(0)); uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XShape> xShape1( @@ -937,7 +937,7 @@ void matchNumberFormat(int nPage, uno::Reference<text::XTextField> const& xField void SdOOXMLExportTest2::testDatetimeFieldNumberFormat() { - loadFromURL(u"odp/numfmt.odp"); + createSdImpressDoc("odp/numfmt.odp"); saveAndReload("Impress Office Open XML"); @@ -949,7 +949,7 @@ void SdOOXMLExportTest2::testDatetimeFieldNumberFormat() void SdOOXMLExportTest2::testDatetimeFieldNumberFormatPPTX() { - loadFromURL(u"pptx/numfmt.pptx"); + createSdImpressDoc("pptx/numfmt.pptx"); saveAndReload("Impress Office Open XML"); @@ -961,7 +961,7 @@ void SdOOXMLExportTest2::testDatetimeFieldNumberFormatPPTX() void SdOOXMLExportTest2::testSlideNumberField() { - loadFromURL(u"odp/slidenum_field.odp"); + createSdImpressDoc("odp/slidenum_field.odp"); saveAndReload("Impress Office Open XML"); @@ -971,7 +971,7 @@ void SdOOXMLExportTest2::testSlideNumberField() void SdOOXMLExportTest2::testSlideNumberFieldPPTX() { - loadFromURL(u"pptx/slidenum_field.pptx"); + createSdImpressDoc("pptx/slidenum_field.pptx"); saveAndReload("Impress Office Open XML"); @@ -981,7 +981,7 @@ void SdOOXMLExportTest2::testSlideNumberFieldPPTX() void SdOOXMLExportTest2::testSlideCountField() { - loadFromURL(u"odp/slidecount_field.odp"); + createSdImpressDoc("odp/slidecount_field.odp"); saveAndReload("Impress Office Open XML"); @@ -991,7 +991,7 @@ void SdOOXMLExportTest2::testSlideCountField() void SdOOXMLExportTest2::testSlideNameField() { - loadFromURL(u"odp/slidename_field.odp"); + createSdImpressDoc("odp/slidename_field.odp"); saveAndReload("Impress Office Open XML"); @@ -1001,7 +1001,7 @@ void SdOOXMLExportTest2::testSlideNameField() void SdOOXMLExportTest2::testExtFileField() { - loadFromURL(u"odp/extfile_field.odp"); + createSdImpressDoc("odp/extfile_field.odp"); saveAndReload("Impress Office Open XML"); @@ -1032,7 +1032,7 @@ void SdOOXMLExportTest2::testExtFileField() void SdOOXMLExportTest2::testAuthorField() { - loadFromURL(u"odp/author_field.odp"); + createSdImpressDoc("odp/author_field.odp"); saveAndReload("Impress Office Open XML"); @@ -1042,7 +1042,7 @@ void SdOOXMLExportTest2::testAuthorField() void SdOOXMLExportTest2::testTdf99224() { - loadFromURL(u"odp/tdf99224.odp"); + createSdImpressDoc("odp/tdf99224.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XDrawPage> xPage = getPage(0); // This was 0: the image with text was lost on export. @@ -1051,7 +1051,7 @@ void SdOOXMLExportTest2::testTdf99224() void SdOOXMLExportTest2::testTdf92076() { - loadFromURL(u"odp/tdf92076.odp"); + createSdImpressDoc("odp/tdf92076.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XDrawPage> xPage = getPage(0); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xPage->getCount()); @@ -1059,7 +1059,7 @@ void SdOOXMLExportTest2::testTdf92076() void SdOOXMLExportTest2::testTdf59046() { - loadFromURL(u"odp/tdf59046.odp"); + createSdImpressDoc("odp/tdf59046.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml"); assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path", 1); @@ -1067,7 +1067,7 @@ void SdOOXMLExportTest2::testTdf59046() void SdOOXMLExportTest2::testTdf133502() { - loadFromURL(u"odp/tdf133502.odp"); + createSdImpressDoc("odp/tdf133502.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocRels = parseExport("ppt/comments/comment1.xml"); @@ -1081,7 +1081,7 @@ void SdOOXMLExportTest2::testTdf133502() void SdOOXMLExportTest2::testTdf105739() { // Gradient was lost during saving to ODP - loadFromURL(u"pptx/tdf105739.pptx"); + createSdImpressDoc("pptx/tdf105739.pptx"); save("impress8"); uno::Reference<drawing::XDrawPage> xPage = getPage(0); uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY); @@ -1108,7 +1108,7 @@ void SdOOXMLExportTest2::testTdf105739() void SdOOXMLExportTest2::testPageBitmapWithTransparency() { - loadFromURL(u"pptx/page_transparent_bitmap.pptx"); + createSdImpressDoc("pptx/page_transparent_bitmap.pptx"); saveAndReload("impress8"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY); @@ -1132,7 +1132,7 @@ void SdOOXMLExportTest2::testPageBitmapWithTransparency() void SdOOXMLExportTest2::testPptmContentType() { - loadFromURL(u"pptm/macro.pptm"); + createSdImpressDoc("pptm/macro.pptm"); save("Impress MS PowerPoint 2007 XML VBA"); // Assert that the content type is the one of PPTM @@ -1144,7 +1144,7 @@ void SdOOXMLExportTest2::testPptmContentType() void SdOOXMLExportTest2::testTdf111798() { - loadFromURL(u"odp/tdf111798.odp"); + createSdImpressDoc("odp/tdf111798.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1180,7 +1180,7 @@ void SdOOXMLExportTest2::testTdf111798() void SdOOXMLExportTest2::testPptmVBAStream() { - loadFromURL(u"pptm/macro.pptm"); + createSdImpressDoc("pptm/macro.pptm"); save("Impress MS PowerPoint 2007 XML VBA"); uno::Reference<packages::zip::XZipFileAccess2> xNameAccess @@ -1192,7 +1192,7 @@ void SdOOXMLExportTest2::testPptmVBAStream() void SdOOXMLExportTest2::testTdf111863() { - loadFromURL(u"pptx/tdf111863.pptx"); + createSdImpressDoc("pptx/tdf111863.pptx"); save("Impress Office Open XML"); // check that transition attribute didn't change from 'out' to 'in' @@ -1205,7 +1205,7 @@ void SdOOXMLExportTest2::testTdf111863() void SdOOXMLExportTest2::testTdf111518() { - loadFromURL(u"pptx/tdf111518.pptx"); + createSdImpressDoc("pptx/tdf111518.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml"); @@ -1219,7 +1219,7 @@ void SdOOXMLExportTest2::testTdf111518() void SdOOXMLExportTest2::testTdf100387() { - loadFromURL(u"odp/tdf100387.odp"); + createSdImpressDoc("odp/tdf100387.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1271,7 +1271,7 @@ void SdOOXMLExportTest2::testTdf100387() // tdf#126746 Add support for Line Caps import and export void SdOOXMLExportTest2::testClosingShapesAndLineCaps() { - loadFromURL(u"odp/closed-shapes.odp"); + createSdImpressDoc("odp/closed-shapes.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); assertXPath(pXmlDocContent, @@ -1318,7 +1318,7 @@ void SdOOXMLExportTest2::testClosingShapesAndLineCaps() void SdOOXMLExportTest2::testRotateFlip() { - loadFromURL(u"odp/rotate_flip.odp"); + createSdImpressDoc("odp/rotate_flip.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1365,7 +1365,7 @@ void SdOOXMLExportTest2::testRotateFlip() void SdOOXMLExportTest2::testTdf106867() { - loadFromURL(u"pptx/tdf106867.pptx"); + createSdImpressDoc("pptx/tdf106867.pptx"); save("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -1399,7 +1399,7 @@ void SdOOXMLExportTest2::testTdf106867() void SdOOXMLExportTest2::testTdf112280() { - loadFromURL(u"pptx/tdf112280.pptx"); + createSdImpressDoc("pptx/tdf112280.pptx"); save("Impress Office Open XML"); // check the animRot value @@ -1412,7 +1412,7 @@ void SdOOXMLExportTest2::testTdf112280() void SdOOXMLExportTest2::testTdf112088() { - loadFromURL(u"pptx/tdf112088.pptx"); + createSdImpressDoc("pptx/tdf112088.pptx"); save("Impress Office Open XML"); // check gradient stops @@ -1423,7 +1423,7 @@ void SdOOXMLExportTest2::testTdf112088() void SdOOXMLExportTest2::testTdf112333() { - loadFromURL(u"pptx/tdf112333.pptx"); + createSdImpressDoc("pptx/tdf112333.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1471,7 +1471,7 @@ void SdOOXMLExportTest2::testTdf112333() void SdOOXMLExportTest2::testTdf112552() { // Background fill was not displayed, but it was because of the wrong geometry - loadFromURL(u"odp/tdf112552.odp"); + createSdImpressDoc("odp/tdf112552.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1490,7 +1490,7 @@ void SdOOXMLExportTest2::testTdf112552() void SdOOXMLExportTest2::testTdf112557() { // Subtitle shape should be skipped by export. - loadFromURL(u"odp/tdf112557.odp"); + createSdImpressDoc("odp/tdf112557.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slideMasters/slideMaster1.xml"); @@ -1499,7 +1499,7 @@ void SdOOXMLExportTest2::testTdf112557() void SdOOXMLExportTest2::testTdf128049() { - loadFromURL(u"odp/tdf128049.odp"); + createSdImpressDoc("odp/tdf128049.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1514,7 +1514,7 @@ void SdOOXMLExportTest2::testTdf128049() void SdOOXMLExportTest2::testTdf106026() { - loadFromURL(u"odp/tdf106026.odp"); + createSdImpressDoc("odp/tdf106026.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlMasterContent = parseExport("ppt/slideMasters/slideMaster1.xml"); @@ -1554,7 +1554,7 @@ void SdOOXMLExportTest2::testTdf106026() void SdOOXMLExportTest2::testTdf112334() { - loadFromURL(u"pptx/tdf112334.pptx"); + createSdImpressDoc("pptx/tdf112334.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1568,7 +1568,7 @@ void SdOOXMLExportTest2::testTdf112334() void SdOOXMLExportTest2::testTdf112089() { - loadFromURL(u"pptx/tdf112089.pptx"); + createSdImpressDoc("pptx/tdf112089.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1585,7 +1585,7 @@ void SdOOXMLExportTest2::testTdf112089() void SdOOXMLExportTest2::testTdf112086() { - loadFromURL(u"pptx/tdf112086.pptx"); + createSdImpressDoc("pptx/tdf112086.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1619,7 +1619,7 @@ void SdOOXMLExportTest2::testTdf112086() void SdOOXMLExportTest2::testTdf112647() { - loadFromURL(u"odp/tdf112647.odp"); + createSdImpressDoc("odp/tdf112647.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xShape)); @@ -1633,7 +1633,7 @@ void SdOOXMLExportTest2::testTdf112647() void SdOOXMLExportTest2::testGroupRotation() { - loadFromURL(u"odp/group_rotation.odp"); + createSdImpressDoc("odp/group_rotation.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1647,7 +1647,7 @@ void SdOOXMLExportTest2::testGroupRotation() void SdOOXMLExportTest2::testTdf104788() { - loadFromURL(u"pptx/tdf104788.pptx"); + createSdImpressDoc("pptx/tdf104788.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide6.xml"); @@ -1668,7 +1668,7 @@ void SdOOXMLExportTest2::testTdf104788() void SdOOXMLExportTest2::testSmartartRotation2() { - loadFromURL(u"pptx/smartart-rotation2.pptx"); + createSdImpressDoc("pptx/smartart-rotation2.pptx"); // clear SmartArt data to check how group shapes with double-rotated children are exported, not smartart // NOTE: Resetting the GrabBag data is a *very* indirect way to reset the SmartArt functionality. @@ -1697,7 +1697,7 @@ void SdOOXMLExportTest2::testSmartartRotation2() void SdOOXMLExportTest2::testTdf91999_rotateShape() { - loadFromURL(u"pptx/tdf91999_rotateShape.pptx"); + createSdImpressDoc("pptx/tdf91999_rotateShape.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1714,7 +1714,7 @@ void SdOOXMLExportTest2::testTdf91999_rotateShape() void SdOOXMLExportTest2::testTdf114845_rotateShape() { - loadFromURL(u"pptx/tdf114845_rotateShape.pptx"); + createSdImpressDoc("pptx/tdf114845_rotateShape.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1733,7 +1733,7 @@ void SdOOXMLExportTest2::testTdf114845_rotateShape() void SdOOXMLExportTest2::testGroupsPosition() { - loadFromURL(u"pptx/group.pptx"); + createSdImpressDoc("pptx/group.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1749,7 +1749,7 @@ void SdOOXMLExportTest2::testGroupsPosition() void SdOOXMLExportTest2::testGroupsRotatedPosition() { - loadFromURL(u"pptx/group-rot.pptx"); + createSdImpressDoc("pptx/group-rot.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1761,7 +1761,7 @@ void SdOOXMLExportTest2::testGroupsRotatedPosition() void SdOOXMLExportTest2::testAccentColor() { - loadFromURL(u"pptx/accent-color.pptx"); + createSdImpressDoc("pptx/accent-color.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml"); @@ -1787,7 +1787,7 @@ void SdOOXMLExportTest2::testAccentColor() void SdOOXMLExportTest2::testThemeColors() { - loadFromURL(u"pptx/tdf84205.pptx"); + createSdImpressDoc("pptx/tdf84205.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocTheme2 = parseExport("ppt/theme/theme2.xml"); @@ -1799,7 +1799,7 @@ void SdOOXMLExportTest2::testThemeColors() void SdOOXMLExportTest2::testTdf111785() { - loadFromURL(u"odp/tdf111785.odp"); + createSdImpressDoc("odp/tdf111785.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml"); @@ -1813,7 +1813,7 @@ void SdOOXMLExportTest2::testTdf111785() void SdOOXMLExportTest2::testTdf118825() { - loadFromURL(u"odp/tdf118825-motionpath.odp"); + createSdImpressDoc("odp/tdf118825-motionpath.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1857,7 +1857,7 @@ void SdOOXMLExportTest2::testTextColumns_tdf140852() // The document defines two columns in slideLayout12.xml, but explicitly redefines // in slide1.xml. Here we check that the redefinition in the slide takes precedence. - loadFromURL(u"pptx/tdf140852.pptx"); + createSdImpressDoc("pptx/tdf140852.pptx"); { uno::Reference<drawing::XDrawPage> xPage(getPage(0)); uno::Reference<container::XIndexAccess> xIndexAccess(xPage, uno::UNO_QUERY_THROW); @@ -1901,7 +1901,7 @@ void SdOOXMLExportTest2::testTextColumns_tdf140852() void SdOOXMLExportTest2::testTextColumns_3columns() { - loadFromURL(u"pptx/3columns.pptx"); + createSdImpressDoc("pptx/3columns.pptx"); { uno::Reference<drawing::XDrawPage> xPage(getPage(0)); uno::Reference<container::XIndexAccess> xIndexAccess(xPage, uno::UNO_QUERY_THROW); @@ -1948,7 +1948,7 @@ void SdOOXMLExportTest2::testTextColumns_3columns() void SdOOXMLExportTest2::testTdf59323_slideFooters() { - loadFromURL(u"pptx/tdf59323.pptx"); + createSdImpressDoc("pptx/tdf59323.pptx"); save("Impress Office Open XML"); @@ -1989,7 +1989,7 @@ void SdOOXMLExportTest2::testTdf53970() { // Embedded media file { - loadFromURL(u"odp/tdf53970.odp"); + createSdImpressDoc("odp/tdf53970.odp"); saveAndReload("Impress Office Open XML"); // Without fix in place, the media shape was lost on export. @@ -1998,7 +1998,7 @@ void SdOOXMLExportTest2::testTdf53970() // Linked media file { - loadFromURL(u"odp/tdf53970_linked.odp"); + createSdImpressDoc("odp/tdf53970_linked.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlRels = parseExport("ppt/slides/_rels/slide1.xml.rels"); diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index bc47f1936316..c58b40b02b78 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -233,7 +233,7 @@ public: void SdOOXMLExportTest3::testTdf92222() { - loadFromURL(u"pptx/tdf92222.pptx"); + createSdImpressDoc("pptx/tdf92222.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocTheme = parseExport("ppt/theme/theme1.xml"); @@ -247,7 +247,7 @@ void SdOOXMLExportTest3::testTdf92222() void SdOOXMLExportTest3::testTdf129430() { - loadFromURL(u"odp/tdf129430.odp"); + createSdImpressDoc("odp/tdf129430.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml"); @@ -257,7 +257,7 @@ void SdOOXMLExportTest3::testTdf129430() void SdOOXMLExportTest3::testTdf114848() { - loadFromURL(u"pptx/tdf114848.pptx"); + createSdImpressDoc("pptx/tdf114848.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocTheme1 = parseExport("ppt/theme/theme1.xml"); @@ -271,7 +271,7 @@ void SdOOXMLExportTest3::testTdf114848() void SdOOXMLExportTest3::testTdf147586() { - loadFromURL(u"pptx/tdf147586.pptx"); + createSdImpressDoc("pptx/tdf147586.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -288,7 +288,7 @@ void SdOOXMLExportTest3::testTdf147586() void SdOOXMLExportTest3::testTdf68759() { - loadFromURL(u"odp/tdf68759.odp"); + createSdImpressDoc("odp/tdf68759.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -311,7 +311,7 @@ void SdOOXMLExportTest3::testTdf68759() void SdOOXMLExportTest3::testTdf127901() { - loadFromURL(u"odp/tdf127901.odp"); + createSdImpressDoc("odp/tdf127901.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml"); @@ -330,7 +330,7 @@ void SdOOXMLExportTest3::testTdf127901() void SdOOXMLExportTest3::testTdf48735() { - loadFromURL(u"odp/tdf48735.odp"); + createSdImpressDoc("odp/tdf48735.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml"); @@ -342,7 +342,7 @@ void SdOOXMLExportTest3::testTdf48735() void SdOOXMLExportTest3::testTdf90626() { - loadFromURL(u"odp/tdf90626.odp"); + createSdImpressDoc("odp/tdf90626.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -358,7 +358,7 @@ void SdOOXMLExportTest3::testTdf90626() void SdOOXMLExportTest3::testTdf107608() { - loadFromURL(u"pptx/tdf107608.pptx"); + createSdImpressDoc("pptx/tdf107608.pptx"); save("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -381,7 +381,7 @@ void SdOOXMLExportTest3::testTdf111786() { // Export line transparency with the color - loadFromURL(u"pptx/tdf111786.pptx"); + createSdImpressDoc("pptx/tdf111786.pptx"); save("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -398,7 +398,7 @@ void SdOOXMLExportTest3::testTdf111786() void SdOOXMLExportTest3::testFontScale() { - loadFromURL(u"pptx/font-scale.pptx"); + createSdImpressDoc("pptx/font-scale.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -410,7 +410,7 @@ void SdOOXMLExportTest3::testFontScale() void SdOOXMLExportTest3::testShapeAutofitPPTX() { - loadFromURL(u"pptx/testShapeAutofit.pptx"); + createSdImpressDoc("pptx/testShapeAutofit.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); CPPUNIT_ASSERT(pXmlDocContent); @@ -423,7 +423,7 @@ void SdOOXMLExportTest3::testShapeAutofitPPTX() void SdOOXMLExportTest3::testLegacyShapeAutofitPPTX() { - loadFromURL(u"odp/testLegacyShapeAutofit.odp"); + createSdImpressDoc("odp/testLegacyShapeAutofit.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); CPPUNIT_ASSERT(pXmlDocContent); @@ -438,7 +438,7 @@ void SdOOXMLExportTest3::testLegacyShapeAutofitPPTX() void SdOOXMLExportTest3::testTdf115394() { - loadFromURL(u"pptx/tdf115394.pptx"); + createSdImpressDoc("pptx/tdf115394.pptx"); save("Impress Office Open XML"); SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); @@ -474,7 +474,7 @@ void SdOOXMLExportTest3::testTdf115394() void SdOOXMLExportTest3::testTdf115394Zero() { - loadFromURL(u"pptx/tdf115394-zero.pptx"); + createSdImpressDoc("pptx/tdf115394-zero.pptx"); save("Impress Office Open XML"); double fTransitionDuration; @@ -488,7 +488,7 @@ void SdOOXMLExportTest3::testTdf115394Zero() void SdOOXMLExportTest3::testTdf115005() { - loadFromURL(u"odp/tdf115005.odp"); + createSdImpressDoc("odp/tdf115005.odp"); save("impress8"); // additional checks of the output file @@ -508,7 +508,7 @@ void SdOOXMLExportTest3::testTdf115005() int SdOOXMLExportTest3::testTdf115005_FallBack_Images(bool bAddReplacementImages) { - loadFromURL(u"odp/tdf115005_no_fallback_images.odp"); + createSdImpressDoc("odp/tdf115005_no_fallback_images.odp"); // check if fallback images were not created if AddReplacementImages=true/false // set AddReplacementImages @@ -559,7 +559,7 @@ void SdOOXMLExportTest3::testTdf115005_FallBack_Images_Off() void SdOOXMLExportTest3::testTdf118806() { - loadFromURL(u"odp/tdf118806.odp"); + createSdImpressDoc("odp/tdf118806.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -568,7 +568,7 @@ void SdOOXMLExportTest3::testTdf118806() void SdOOXMLExportTest3::testTdf130058() { - loadFromURL(u"pptx/tdf130058.pptx"); + createSdImpressDoc("pptx/tdf130058.pptx"); save("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -598,7 +598,7 @@ void SdOOXMLExportTest3::testTdf111789() { // Shadow properties were not exported for text shapes. - loadFromURL(u"pptx/tdf111789.pptx"); + createSdImpressDoc("pptx/tdf111789.pptx"); save("Impress Office Open XML"); // First text shape has some shadow @@ -637,7 +637,7 @@ void SdOOXMLExportTest3::testTdf111789() void SdOOXMLExportTest3::testTdf145162() { - loadFromURL(u"pptx/tdf145162.pptx"); + createSdImpressDoc("pptx/tdf145162.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -649,7 +649,7 @@ void SdOOXMLExportTest3::testZeroIndentExport() { // Load the bugdoc and save to pptx then. - loadFromURL(u"odp/testZeroIndent.odp"); + createSdImpressDoc("odp/testZeroIndent.odp"); save("Impress Office Open XML"); // There are 3 slides, get them xmlDocUniquePtr pSlide1 = parseExport("ppt/slides/slide1.xml"); @@ -680,7 +680,7 @@ void SdOOXMLExportTest3::testZeroIndentExport() void SdOOXMLExportTest3::testTdf100348_convert_Fontwork2TextWarp() { - loadFromURL(u"odp/tdf100348_Fontwork2TextWarp.odp"); + createSdImpressDoc("odp/tdf100348_Fontwork2TextWarp.odp"); save("Impress Office Open XML"); // Resulting pptx has to contain the TextWarp shape @@ -732,7 +732,7 @@ void SdOOXMLExportTest3::testTdf100348_convert_Fontwork2TextWarp() void SdOOXMLExportTest3::testTdf125573_FontWorkScaleX() { - loadFromURL(u"pptx/tdf125573_FontWorkScaleX.pptx"); + createSdImpressDoc("pptx/tdf125573_FontWorkScaleX.pptx"); save("Impress Office Open XML"); // Error was, that attribute 'fromWordArt' was ignored @@ -764,7 +764,7 @@ void SdOOXMLExportTest3::testTdf99497_keepAppearanceOfCircleKind() // slide 1 ARC -> arc, slide 2 CUT -> chord, slide 3 SECTION -> pie // Adjustment values need to exist and their values need to correspond to the // original angles. Shape 'arc' needs to be unfilled. - loadFromURL(u"odp/tdf99497_CircleKind.odp"); + createSdImpressDoc("odp/tdf99497_CircleKind.odp"); save("Impress Office Open XML"); // slide 1 45° -> adj1 = 20493903, 270° -> adj2 = 5400000, <a:noFill/> exists @@ -795,7 +795,7 @@ void SdOOXMLExportTest3::testTdf99497_keepAppearanceOfCircleKind() void SdOOXMLExportTest3::testTdf104792() { - loadFromURL(u"pptx/tdf104792-smart-art-animation.pptx"); + createSdImpressDoc("pptx/tdf104792-smart-art-animation.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -808,7 +808,7 @@ void SdOOXMLExportTest3::testTdf104792() void SdOOXMLExportTest3::testTdf90627() { - loadFromURL(u"odp/tdf90627.odp"); + createSdImpressDoc("odp/tdf90627.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -822,7 +822,7 @@ void SdOOXMLExportTest3::testTdf90627() void SdOOXMLExportTest3::testTdf104786() { - loadFromURL(u"pptx/tdf104786.pptx"); + createSdImpressDoc("pptx/tdf104786.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide2.xml"); @@ -836,7 +836,7 @@ void SdOOXMLExportTest3::testTdf104786() void SdOOXMLExportTest3::testTdf118783() { - loadFromURL(u"odp/tdf118783.odp"); + createSdImpressDoc("odp/tdf118783.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -847,7 +847,7 @@ void SdOOXMLExportTest3::testTdf118783() void SdOOXMLExportTest3::testTdf104789() { - loadFromURL(u"pptx/tdf104789.pptx"); + createSdImpressDoc("pptx/tdf104789.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -860,7 +860,7 @@ void SdOOXMLExportTest3::testTdf104789() void SdOOXMLExportTest3::testOpenDocumentAsReadOnly() { - loadFromURL(u"pptx/open-as-read-only.pptx"); + createSdImpressDoc("pptx/open-as-read-only.pptx"); SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); CPPUNIT_ASSERT(pXImpressDocument); sd::DrawDocShell* pDocShell = pXImpressDocument->GetDocShell(); @@ -874,7 +874,7 @@ void SdOOXMLExportTest3::testOpenDocumentAsReadOnly() void SdOOXMLExportTest3::testTdf118835() { - loadFromURL(u"odp/tdf118835.odp"); + createSdImpressDoc("odp/tdf118835.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -899,7 +899,7 @@ void SdOOXMLExportTest3::testTdf118835() void SdOOXMLExportTest3::testTdf118768() { - loadFromURL(u"odp/tdf118768-brake.odp"); + createSdImpressDoc("odp/tdf118768-brake.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -916,7 +916,7 @@ void SdOOXMLExportTest3::testTdf118768() void SdOOXMLExportTest3::testTdf118836() { - loadFromURL(u"odp/tdf118836.odp"); + createSdImpressDoc("odp/tdf118836.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -979,7 +979,7 @@ static bool getScaleXValue(const uno::Reference<beans::XPropertySet>& xSet) void SdOOXMLExportTest3::testTdf116350TextEffects() { - loadFromURL(u"pptx/tdf116350-texteffects.pptx"); + createSdImpressDoc("pptx/tdf116350-texteffects.pptx"); // Default angle for ArchUp uno::Reference<beans::XPropertySet> xShape0(getShapeFromPage(0, 0)); @@ -1016,7 +1016,7 @@ void SdOOXMLExportTest3::testTdf116350TextEffects() void SdOOXMLExportTest3::testTdf128096() { - loadFromURL(u"odp/tdf128096.odp"); + createSdImpressDoc("odp/tdf128096.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml"); @@ -1032,7 +1032,7 @@ void SdOOXMLExportTest3::testTdf128096() } void SdOOXMLExportTest3::testTdf120573() { - loadFromURL(u"pptx/tdf120573.pptx"); + createSdImpressDoc("pptx/tdf120573.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1052,7 +1052,7 @@ void SdOOXMLExportTest3::testTdf120573() void SdOOXMLExportTest3::testTdf119118() { - loadFromURL(u"pptx/tdf119118.pptx"); + createSdImpressDoc("pptx/tdf119118.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); assertXPath(pXmlDocContent, "//p:iterate", "type", "lt"); @@ -1061,7 +1061,7 @@ void SdOOXMLExportTest3::testTdf119118() void SdOOXMLExportTest3::testTdf99213() { - loadFromURL(u"odp/tdf99213-target-missing.odp"); + createSdImpressDoc("odp/tdf99213-target-missing.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); // Number of nodes with p:attrNameLst was 3, including one that missed tgtEl @@ -1073,7 +1073,7 @@ void SdOOXMLExportTest3::testTdf99213() void SdOOXMLExportTest3::testPotxExport() { // Create new document - mxComponent = loadFromDesktop("private:factory/simpress"); + createSdImpressDoc(); // Export as a POTM template save("Impress Office Open XML Template"); @@ -1089,7 +1089,7 @@ void SdOOXMLExportTest3::testPotxExport() void SdOOXMLExportTest3::testTdf44223() { - loadFromURL(u"pptx/tdf44223.pptx"); + createSdImpressDoc("pptx/tdf44223.pptx"); save("Impress Office Open XML"); std::unique_ptr<SvStream> const pStream1( @@ -1127,7 +1127,7 @@ void SdOOXMLExportTest3::testTdf44223() void SdOOXMLExportTest3::testTdf135843() { - loadFromURL(u"pptx/tdf135843_export.pptx"); + createSdImpressDoc("pptx/tdf135843_export.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1150,7 +1150,7 @@ void SdOOXMLExportTest3::testTdf135843() void SdOOXMLExportTest3::testSmartArtPreserve() { - loadFromURL(u"pptx/smartart-preserve.pptx"); + createSdImpressDoc("pptx/smartart-preserve.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1203,7 +1203,7 @@ void SdOOXMLExportTest3::testTdf125346() { // There are two themes in the test document, make sure we use the right theme - loadFromURL(u"pptx/tdf125346.pptx"); + createSdImpressDoc("pptx/tdf125346.pptx"); save("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1223,7 +1223,7 @@ void SdOOXMLExportTest3::testTdf125346_2() // There are two themes in the test document, make sure we use the right theme // Test more slides with different themes - loadFromURL(u"pptx/tdf125346_2.pptx"); + createSdImpressDoc("pptx/tdf125346_2.pptx"); save("Impress Office Open XML"); { @@ -1271,7 +1271,7 @@ void SdOOXMLExportTest3::testTdf125360() // Check whether the changed fill transparency is exported correctly. // Color is defined by shape style - loadFromURL(u"pptx/tdf125360.pptx"); + createSdImpressDoc("pptx/tdf125360.pptx"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1291,7 +1291,7 @@ void SdOOXMLExportTest3::testTdf125360_1() // Check whether the changed fill transparency is exported correctly. // Color is defined by color scheme - loadFromURL(u"pptx/tdf125360_1.pptx"); + createSdImpressDoc("pptx/tdf125360_1.pptx"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1311,7 +1311,7 @@ void SdOOXMLExportTest3::testTdf125360_2() // Check whether the changed fill transparency is exported correctly. // Color is defined by color scheme with a transparency - loadFromURL(u"pptx/tdf125360_2.pptx"); + createSdImpressDoc("pptx/tdf125360_2.pptx"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1332,7 +1332,7 @@ void SdOOXMLExportTest3::testTdf125360_2() void SdOOXMLExportTest3::testTdf125551() { - loadFromURL(u"pptx/tdf125551.pptx"); + createSdImpressDoc("pptx/tdf125551.pptx"); save("Impress Office Open XML"); uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY); @@ -1346,7 +1346,7 @@ void SdOOXMLExportTest3::testTdf125551() void SdOOXMLExportTest3::testTdf136830() { - loadFromURL(u"pptx/tdf136830.pptx"); + createSdImpressDoc("pptx/tdf136830.pptx"); save("Impress Office Open XML"); // Without the fix in place, the X position of the shapes would have been 0 @@ -1367,7 +1367,7 @@ void SdOOXMLExportTest3::testTdf136830() void SdOOXMLExportTest3::testTdf126234() { - loadFromURL(u"pptx/tdf126234.pptx"); + createSdImpressDoc("pptx/tdf126234.pptx"); save("Impress Office Open XML"); // check relative size of the bullet, 400% is a legitimate value for MS Office document @@ -1383,7 +1383,7 @@ void SdOOXMLExportTest3::testTdf126234() void SdOOXMLExportTest3::testTdf126741() { - loadFromURL(u"pptx/tdf126741.pptx"); + createSdImpressDoc("pptx/tdf126741.pptx"); save("Impress Office Open XML"); // dash dot dot line style import fix @@ -1406,7 +1406,7 @@ void SdOOXMLExportTest3::testTdf126741() void SdOOXMLExportTest3::testTdf127372() { - loadFromURL(u"odp/tdf127372.odp"); + createSdImpressDoc("odp/tdf127372.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); awt::Gradient aTransparenceGradient; @@ -1417,7 +1417,7 @@ void SdOOXMLExportTest3::testTdf127372() void SdOOXMLExportTest3::testTdf127379() { - loadFromURL(u"odp/tdf127379.odp"); + createSdImpressDoc("odp/tdf127379.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDoc->getDrawPages()->getCount()); @@ -1442,7 +1442,7 @@ void SdOOXMLExportTest3::testTdf127379() void SdOOXMLExportTest3::testTdf98603() { - loadFromURL(u"pptx/tdf98603.pptx"); + createSdImpressDoc("pptx/tdf98603.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape)); @@ -1456,7 +1456,7 @@ void SdOOXMLExportTest3::testTdf98603() void SdOOXMLExportTest3::testTdf128213() { - loadFromURL(u"pptx/tdf128213.pptx"); + createSdImpressDoc("pptx/tdf128213.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1465,7 +1465,7 @@ void SdOOXMLExportTest3::testTdf128213() void SdOOXMLExportTest3::testTdf79082() { - loadFromURL(u"pptx/tdf79082.pptx"); + createSdImpressDoc("pptx/tdf79082.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); @@ -1506,7 +1506,7 @@ void SdOOXMLExportTest3::testTdf129372() { //Without the fix in place, it would crash at import time - loadFromURL(u"pptx/tdf129372.pptx"); + createSdImpressDoc("pptx/tdf129372.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -1517,7 +1517,7 @@ void SdOOXMLExportTest3::testTdf129372() void SdOOXMLExportTest3::testShapeGlowEffect() { - loadFromURL(u"pptx/shape-glow-effect.pptx"); + createSdImpressDoc("pptx/shape-glow-effect.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); sal_Int32 nRadius = -1; @@ -1533,7 +1533,7 @@ void SdOOXMLExportTest3::testShapeGlowEffect() void SdOOXMLExportTest3::testUnderline() { - loadFromURL(u"underline.fodp"); + createSdImpressDoc("underline.fodp"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xShape)); @@ -1570,7 +1570,7 @@ void SdOOXMLExportTest3::testUnderline() void SdOOXMLExportTest3::testTdf119087() { - loadFromURL(u"pptx/tdf119087.pptx"); + createSdImpressDoc("pptx/tdf119087.pptx"); saveAndReload("Impress Office Open XML"); // This would fail both on export validation, and reloading the saved pptx file. @@ -1588,7 +1588,7 @@ void SdOOXMLExportTest3::testTdf119087() void SdOOXMLExportTest3::testTdf131554() { - loadFromURL(u"pptx/tdf131554.pptx"); + createSdImpressDoc("pptx/tdf131554.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XShape> xShape(getShapeFromPage(1, 0), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5622), xShape->getPosition().X); @@ -1597,7 +1597,7 @@ void SdOOXMLExportTest3::testTdf131554() void SdOOXMLExportTest3::testTdf132282() { - loadFromURL(u"pptx/tdf132282.pptx"); + createSdImpressDoc("pptx/tdf132282.pptx"); saveAndReload("Impress Office Open XML"); 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 @@ -1609,7 +1609,7 @@ void SdOOXMLExportTest3::testTdf132282() void SdOOXMLExportTest3::testTdf132201EffectOrder() { - loadFromURL(u"pptx/effectOrder.pptx"); + createSdImpressDoc("pptx/effectOrder.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml"); assertXPathChildren(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:effectLst", 2); @@ -1624,7 +1624,7 @@ void SdOOXMLExportTest3::testTdf132201EffectOrder() void SdOOXMLExportTest3::testShapeSoftEdgeEffect() { - loadFromURL(u"pptx/shape-soft-edges.pptx"); + createSdImpressDoc("pptx/shape-soft-edges.pptx"); saveAndReload("Impress Office Open XML"); auto xShapeProps(getShapeFromPage(0, 0)); sal_Int32 nRadius = -1; @@ -1634,7 +1634,7 @@ void SdOOXMLExportTest3::testShapeSoftEdgeEffect() void SdOOXMLExportTest3::testShapeShadowBlurEffect() { - loadFromURL(u"pptx/shape-blur-effect.pptx"); + createSdImpressDoc("pptx/shape-blur-effect.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); bool bHasShadow = false; @@ -1647,7 +1647,7 @@ void SdOOXMLExportTest3::testShapeShadowBlurEffect() void SdOOXMLExportTest3::testTdf119223() { - loadFromURL(u"odp/tdf119223.odp"); + createSdImpressDoc("odp/tdf119223.odp"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml"); @@ -1668,7 +1668,7 @@ void SdOOXMLExportTest3::testTdf119223() void SdOOXMLExportTest3::testTdf128213ShapeRot() { - loadFromURL(u"pptx/tdf128213-shaperot.pptx"); + createSdImpressDoc("pptx/tdf128213-shaperot.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml"); @@ -1681,7 +1681,7 @@ void SdOOXMLExportTest3::testTdf128213ShapeRot() void SdOOXMLExportTest3::testTdf125560_textDeflate() { - loadFromURL(u"pptx/ShapePlusImage.pptx"); + createSdImpressDoc("pptx/ShapePlusImage.pptx"); // This problem did not affect the pptx export, only the ODP so assert that save("impress8"); @@ -1695,7 +1695,7 @@ void SdOOXMLExportTest3::testTdf125560_textDeflate() void SdOOXMLExportTest3::testTdf125560_textInflateTop() { - loadFromURL(u"pptx/ShapeTextInflateTop.pptx"); + createSdImpressDoc("pptx/ShapeTextInflateTop.pptx"); // This problem did not affect the pptx export, only the ODP so assert that save("impress8"); @@ -1709,7 +1709,7 @@ void SdOOXMLExportTest3::testTdf125560_textInflateTop() void SdOOXMLExportTest3::testTdf142235_TestPlaceholderTextAlignment() { - loadFromURL(u"odp/placeholder-box-textalignment.odp"); + createSdImpressDoc("odp/placeholder-box-textalignment.odp"); save("Impress Office Open XML"); @@ -1724,7 +1724,7 @@ void SdOOXMLExportTest3::testTdf142235_TestPlaceholderTextAlignment() void SdOOXMLExportTest3::testTdf96061_textHighlight() { - loadFromURL(u"pptx/tdf96061.pptx"); + createSdImpressDoc("pptx/tdf96061.pptx"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); uno::Reference<text::XTextRange> const xParagraph1(getParagraphFromShape(0, xShape)); @@ -1761,7 +1761,7 @@ void SdOOXMLExportTest3::testTdf143222_embeddedWorksheet() { // Check import of embedded worksheet in slide. - loadFromURL(u"pptx/tdf143222.pptx"); + createSdImpressDoc("pptx/tdf143222.pptx"); const SdrPage* pPage = GetPage(1); const SdrOle2Obj* pOleObj = static_cast<SdrOle2Obj*>(pPage->GetObj(0)); @@ -1784,7 +1784,7 @@ void SdOOXMLExportTest3::testTdf143222_embeddedWorksheet() void SdOOXMLExportTest3::testTdf143315() { - loadFromURL(u"ppt/tdf143315-WordartWithoutBullet.ppt"); + createSdImpressDoc("ppt/tdf143315-WordartWithoutBullet.ppt"); save("Impress Office Open XML"); @@ -1806,7 +1806,7 @@ void SdOOXMLExportTest3::testTdf143315() void SdOOXMLExportTest3::testTdf147121() { // Get the bugdoc - loadFromURL(u"pptx/tdf147121.pptx"); + createSdImpressDoc("pptx/tdf147121.pptx"); // Get the second line props of the placeholder uno::Reference<drawing::XDrawPage> xPage(getPage(0)); @@ -1836,7 +1836,7 @@ void SdOOXMLExportTest3::testTdf140912_PicturePlaceholder() if (!IsDefaultDPI()) return; - loadFromURL(u"pptx/tdfpictureplaceholder.pptx"); + createSdImpressDoc("pptx/tdfpictureplaceholder.pptx"); uno::Reference<beans::XPropertySet> xShapeProps(getShapeFromPage(0, 0)); bool bTextContourFrame = true; @@ -1850,7 +1850,7 @@ void SdOOXMLExportTest3::testTdf140912_PicturePlaceholder() void SdOOXMLExportTest3::testEnhancedPathViewBox() { - loadFromURL(u"odp/tdf147978_enhancedPath_viewBox.odp"); + createSdImpressDoc("odp/tdf147978_enhancedPath_viewBox.odp"); saveAndReload("Impress Office Open XML"); auto xShapeProps(getShapeFromPage(0, 0)); awt::Rectangle aBoundRectangle; @@ -1862,7 +1862,7 @@ void SdOOXMLExportTest3::testEnhancedPathViewBox() void SdOOXMLExportTest3::testTdf74670() { - loadFromURL(u"odp/tdf74670.odp"); + createSdImpressDoc("odp/tdf74670.odp"); save("Impress Office Open XML"); uno::Reference<packages::zip::XZipFileAccess2> xNameAccess @@ -1887,7 +1887,7 @@ void SdOOXMLExportTest3::testTdf109169_OctagonBevel() // facets with 4 points each, total 8+8*4=40 points. Without the patch it was exported as // rectangle and thus had 4 points. - loadFromURL(u"odp/tdf109169_Octagon.odp"); + createSdImpressDoc("odp/tdf109169_Octagon.odp"); saveAndReload("Impress Office Open XML"); auto xPropSet(getShapeFromPage(0, 0)); @@ -1907,7 +1907,7 @@ void SdOOXMLExportTest3::testTdf109169_DiamondBevel() // facets with 4 points each, total 4+4*4=20 points. Without the patch it was exported as // rectangle and thus had 4 points. - loadFromURL(u"odp/tdf109169_Diamond.odp"); + createSdImpressDoc("odp/tdf109169_Diamond.odp"); saveAndReload("Impress Office Open XML"); auto xPropSet(getShapeFromPage(0, 0)); @@ -1926,7 +1926,7 @@ void SdOOXMLExportTest3::testTdf144092_emptyShapeTextProps() // Document contains one shape and one table. Both without any text but with // text properties contained inside endParaRPr - The import and export // of endParaRPr for empty cells and shapes are tested here - loadFromURL(u"pptx/tdf144092-emptyShapeTextProps.pptx"); + createSdImpressDoc("pptx/tdf144092-emptyShapeTextProps.pptx"); saveAndReload("Impress Office Open XML"); Color aColor; @@ -1960,7 +1960,7 @@ void SdOOXMLExportTest3::testTdf149551_tbrl90() // The document contains a shape with writing mode TB_RL90. That is the same as vert="vert" in // OOXML. Without the patch it was not possible to use this writing mode at all. - loadFromURL(u"odp/tdf149551_tbrl90.odp"); + createSdImpressDoc("odp/tdf149551_tbrl90.odp"); // Test, that the shape has writing mode TB_RL90. uno::Reference<beans::XPropertySet> xShapeProps(getShapeFromPage(0, 0)); @@ -1992,7 +1992,7 @@ void SdOOXMLExportTest3::testTdf149551_btlr() // The document contains a shape with writing mode BT_LR. That is the same as vert="vert270" in // OOXML. Without the patch it was not possible to use this writing mode at all for shapes. - loadFromURL(u"odp/tdf149551_btlr.odp"); + createSdImpressDoc("odp/tdf149551_btlr.odp"); // Test, that the shape has writing mode BT_LR. uno::Reference<beans::XPropertySet> xShapeProps(getShapeFromPage(0, 0)); @@ -2028,7 +2028,7 @@ void SdOOXMLExportTest3::testTdf94122_autoColor() // - Third page: Page background light, automatic colored text on a dark colored fill // and another automatic colored text on a light colored fill - loadFromURL(u"odp/tdf94122_autocolor.odp"); + createSdImpressDoc("odp/tdf94122_autocolor.odp"); save("Impress Office Open XML"); @@ -2061,7 +2061,7 @@ void SdOOXMLExportTest3::testTdf124333() { // Document contains one rectangle and one embedded OLE object. - loadFromURL(u"pptx/ole.pptx"); + createSdImpressDoc("pptx/ole.pptx"); // Without the fix in place, the number of shapes was 3. CPPUNIT_ASSERT_EQUAL_MESSAGE("number of shapes is incorrect", sal_Int32(2), @@ -2076,7 +2076,7 @@ void SdOOXMLExportTest3::testTdf124333() void SdOOXMLExportTest3::testAutofittedTextboxIndent() { - loadFromURL(u"odp/autofitted-textbox-indent.odp"); + createSdImpressDoc("odp/autofitted-textbox-indent.odp"); save("Impress Office Open XML"); @@ -2093,7 +2093,7 @@ void SdOOXMLExportTest3::testAutofittedTextboxIndent() void SdOOXMLExportTest3::testTdf151622_oleIcon() { - loadFromURL(u"odp/ole_icon.odp"); + createSdImpressDoc("odp/ole_icon.odp"); save("Impress Office Open XML"); diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 7d7f5c747cf9..a6efbee97477 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -194,7 +194,7 @@ void SdExportTest::testBackgroundImage() // Check if Slide background image is imported from PPTX and exported to PPTX, PPT and ODP correctly OUString bgImageName; - loadFromURL(u"pptx/n821567.pptx"); + createSdImpressDoc("pptx/n821567.pptx"); // Check that imported background image from PPTX exists { @@ -294,7 +294,7 @@ void checkFontAttributes(const SdrTextObj* pObj, ItemValue nVal, sal_uInt32 nId) void SdExportTest::testTransparentBackground() { - loadFromURL(u"odp/transparent_background.odp"); + createSdImpressDoc("odp/transparent_background.odp"); saveAndReload("impress8"); const SdrPage* pPage = GetPage(1); @@ -308,7 +308,7 @@ void SdExportTest::testTransparentBackground() void SdExportTest::testTdf142716() { - loadFromURL(u"pptx/tdf142716.pptx"); + createSdImpressDoc("pptx/tdf142716.pptx"); saveAndReload("Impress Office Open XML"); const SdrPage* pPage = GetPage(1); @@ -322,7 +322,7 @@ void SdExportTest::testTdf142716() void SdExportTest::testMediaEmbedding() { - loadFromURL(u"media_embedding.odp"); + createSdImpressDoc("media_embedding.odp"); const SdrPage* pPage = GetPage(1); @@ -337,7 +337,7 @@ void SdExportTest::testMediaEmbedding() void SdExportTest::testFillBitmapUnused() { - loadFromURL(u"odp/fillbitmap2.odp"); + createSdImpressDoc("odp/fillbitmap2.odp"); save("impress8"); xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); @@ -414,7 +414,7 @@ void SdExportTest::testFillBitmapUnused() void SdExportTest::testFdo84043() { - loadFromURL(u"fdo84043.odp"); + createSdImpressDoc("fdo84043.odp"); saveAndReload("impress8"); // the bug was duplicate attributes, causing crash in a build with asserts @@ -425,7 +425,7 @@ void SdExportTest::testFdo84043() void SdExportTest::testTdf97630() { - loadFromURL(u"fit-to-size.fodp"); + createSdImpressDoc("fit-to-size.fodp"); { uno::Reference<drawing::XDrawPage> xDP(getPage(0)); @@ -527,7 +527,7 @@ void SdExportTest::testSwappedOutImageExport() for (size_t i = 0; i < vFormat.size(); i++) { // Load the original file with one image - loadFromURL(u"odp/document_with_two_images.odp"); + createSdImpressDoc("odp/document_with_two_images.odp"); const OString sFailedMessage = "Failed on filter: " + vFormat[i].toUtf8(); // Export the document and import again for a check @@ -583,7 +583,7 @@ void SdExportTest::testSwappedOutImageExport() void SdExportTest::testOOoXMLAnimations() { - loadFromURL(u"sxi/ooo41061-1.sxi"); + createSdImpressDoc("sxi/ooo41061-1.sxi"); // FIXME: Error: unexpected attribute "presentation:preset-property" skipValidation(); @@ -600,7 +600,7 @@ void SdExportTest::testOOoXMLAnimations() void SdExportTest::testBnc480256() { - loadFromURL(u"pptx/bnc480256.pptx"); + createSdImpressDoc("pptx/bnc480256.pptx"); // In the document, there are two tables with table background properties. // Make sure colors are set properly for individual cells. @@ -653,7 +653,7 @@ void SdExportTest::testBnc480256() void SdExportTest::testUnknownAttributes() { - loadFromURL(u"unknown-attribute.fodp"); + createSdImpressDoc("unknown-attribute.fodp"); // FIXME: Error: unexpected attribute "foo:non-existent-att" skipValidation(); @@ -672,7 +672,7 @@ void SdExportTest::testUnknownAttributes() void SdExportTest::testTdf80020() { - loadFromURL(u"odp/tdf80020.odp"); + createSdImpressDoc("odp/tdf80020.odp"); { uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent, uno::UNO_QUERY); @@ -696,7 +696,7 @@ void SdExportTest::testTdf80020() void SdExportTest::testTdf128985() { - loadFromURL(u"odp/tdf128985.odp"); + createSdImpressDoc("odp/tdf128985.odp"); { uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent, uno::UNO_QUERY); @@ -740,7 +740,7 @@ void SdExportTest::testLinkedGraphicRT() for (size_t i = 0; i < vFormat.size(); i++) { // Load the original file with one image - loadFromURL(u"odp/document_with_linked_graphic.odp"); + createSdImpressDoc("odp/document_with_linked_graphic.odp"); // Check if the graphic has been imported correctly (before doing the export/import run) { @@ -792,7 +792,7 @@ void SdExportTest::testLinkedGraphicRT() void SdExportTest::testTdf79082() { - loadFromURL(u"ppt/tdf79082.ppt"); + createSdImpressDoc("ppt/tdf79082.ppt"); save("impress8"); xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); @@ -840,7 +840,7 @@ void SdExportTest::testImageWithSpecialID() for (size_t i = 0; i < vFormat.size(); i++) { // Load the original file - loadFromURL(u"odp/images_with_special_IDs.odp"); + createSdImpressDoc("odp/images_with_special_IDs.odp"); const OString sFailedMessage = "Failed on filter: " + vFormat[i].toUtf8(); saveAndReload(vFormat[i]); @@ -894,7 +894,7 @@ void SdExportTest::testImageWithSpecialID() void SdExportTest::testTdf62176() { - loadFromURL(u"odp/Tdf62176.odp"); + createSdImpressDoc("odp/Tdf62176.odp"); uno::Reference<drawing::XDrawPage> xPage(getPage(0)); //there should be only *one* shape @@ -943,7 +943,7 @@ void SdExportTest::testEmbeddedPdf() return; } - loadFromURL(u"odp/embedded-pdf.odp"); + createSdImpressDoc("odp/embedded-pdf.odp"); saveAndReload("impress8"); uno::Reference<drawing::XDrawPage> xPage = getPage(0); uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY); @@ -954,7 +954,7 @@ void SdExportTest::testEmbeddedPdf() void SdExportTest::testEmbeddedText() { - loadFromURL(u"objectwithtext.fodg"); + createSdDrawDoc("objectwithtext.fodg"); saveAndReload("draw8"); uno::Reference<drawing::XDrawPage> xPage = getPage(0); @@ -982,7 +982,7 @@ void SdExportTest::testEmbeddedText() void SdExportTest::testTransparenText() { - loadFromURL(u"transparent-text.fodg"); + createSdDrawDoc("transparent-text.fodg"); saveAndReload("draw8"); uno::Reference<drawing::XDrawPage> xPage = getPage(0); @@ -999,7 +999,7 @@ void SdExportTest::testTransparenText() void SdExportTest::testDefaultSubscripts() { - loadFromURL(u"tdf80194_defaultSubscripts.fodg"); + createSdDrawDoc("tdf80194_defaultSubscripts.fodg"); saveAndReload("draw8"); uno::Reference<drawing::XDrawPage> xPage = getPage(0); @@ -1011,7 +1011,7 @@ void SdExportTest::testDefaultSubscripts() void SdExportTest::testTdf98477() { - loadFromURL(u"pptx/tdf98477grow.pptx"); + createSdImpressDoc("pptx/tdf98477grow.pptx"); save("impress8"); xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); @@ -1020,7 +1020,7 @@ void SdExportTest::testTdf98477() void SdExportTest::testAuthorField() { - loadFromURL(u"odp/author_fixed.odp"); + createSdImpressDoc("odp/author_fixed.odp"); saveAndReload("impress8"); @@ -1035,7 +1035,7 @@ void SdExportTest::testAuthorField() void SdExportTest::testTdf50499() { - loadFromURL(u"pptx/tdf50499.pptx"); + createSdImpressDoc("pptx/tdf50499.pptx"); save("impress8"); @@ -1047,7 +1047,7 @@ void SdExportTest::testTdf50499() void SdExportTest::testTdf100926() { - loadFromURL(u"pptx/tdf100926_ODP.pptx"); + createSdImpressDoc("pptx/tdf100926_ODP.pptx"); saveAndReload("impress8"); @@ -1075,7 +1075,7 @@ void SdExportTest::testTdf100926() void SdExportTest::testPageWithTransparentBackground() { - loadFromURL(u"odp/page_transparent_background.odp"); + createSdImpressDoc("odp/page_transparent_background.odp"); saveAndReload("impress8"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW); @@ -1118,7 +1118,7 @@ void SdExportTest::testTextRotation() officecfg::Office::Common::Save::ODF::DefaultVersion::set(3, pBatch); pBatch->commit(); - loadFromURL(u"pptx/shape-text-rotate.pptx"); + createSdImpressDoc("pptx/shape-text-rotate.pptx"); saveAndReload("impress8"); uno::Reference<drawing::XDrawPage> xPage(getPage(0)); @@ -1135,7 +1135,7 @@ void SdExportTest::testTextRotation() officecfg::Office::Common::Save::ODF::DefaultVersion::set(10, pBatch); pBatch->commit(); - loadFromURL(u"pptx/shape-text-rotate.pptx"); + createSdImpressDoc("pptx/shape-text-rotate.pptx"); saveAndReload("impress8"); uno::Reference<drawing::XDrawPage> xPage(getPage(0)); @@ -1155,7 +1155,7 @@ void SdExportTest::testTextRotation() void SdExportTest::testTdf115394PPT() { - loadFromURL(u"ppt/tdf115394.ppt"); + createSdImpressDoc("ppt/tdf115394.ppt"); // Export the document and import again for a check saveAndReload("MS PowerPoint 97"); @@ -1187,7 +1187,7 @@ void SdExportTest::testBulletsAsImage() for (size_t i = 0; i < vFormat.size(); i++) { OUString sExportFormat = vFormat[i]; - loadFromURL(u"odp/BulletsAsImage.odp"); + createSdImpressDoc("odp/BulletsAsImage.odp"); const OString sFailedMessageBase = "Failed on filter " + sExportFormat.toUtf8(); saveAndReload(sExportFormat); @@ -1268,7 +1268,7 @@ void SdExportTest::testBulletsAsImage() void SdExportTest::testTdf113822() { - loadFromURL(u"pptx/tdf113822underline.pptx"); + createSdImpressDoc("pptx/tdf113822underline.pptx"); // Was unable to export iterate container (tdf#99213). saveAndReload("Impress Office Open XML"); @@ -1288,7 +1288,7 @@ void SdExportTest::testTdf113822() void SdExportTest::testTdf113818() { - loadFromURL(u"pptx/tdf113818-swivel.pptx"); + createSdImpressDoc("pptx/tdf113818-swivel.pptx"); saveAndReload("MS PowerPoint 97"); saveAndReload("Impress Office Open XML"); save("impress8"); @@ -1300,7 +1300,7 @@ void SdExportTest::testTdf113818() void SdExportTest::testTdf119629() { - loadFromURL(u"ppt/tdf119629.ppt"); + createSdImpressDoc("ppt/tdf119629.ppt"); saveAndReload("MS PowerPoint 97"); save("impress8"); @@ -1321,7 +1321,7 @@ void SdExportTest::testTdf119629() void SdExportTest::testTdf141269() { - loadFromURL(u"odp/tdf141269.odp"); + createSdImpressDoc("odp/tdf141269.odp"); saveAndReload("MS PowerPoint 97"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0), uno::UNO_SET_THROW); @@ -1347,7 +1347,7 @@ void SdExportTest::testTdf141269() void SdExportTest::testTdf123557() { - loadFromURL(u"pptx/trigger.pptx"); + createSdImpressDoc("pptx/trigger.pptx"); saveAndReload("Impress Office Open XML"); save("impress8"); xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); @@ -1370,7 +1370,7 @@ void SdExportTest::testTdf123557() void SdExportTest::testTdf126761() { - loadFromURL(u"ppt/tdf126761.ppt"); + createSdImpressDoc("ppt/tdf126761.ppt"); saveAndReload("impress8"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1389,7 +1389,7 @@ void SdExportTest::testTdf126761() void SdExportTest::testGlow() { - loadFromURL(u"odg/glow.odg"); + createSdDrawDoc("odg/glow.odg"); saveAndReload("draw8"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1427,7 +1427,7 @@ void SdExportTest::testGlow() void SdExportTest::testSoftEdges() { - loadFromURL(u"odg/softedges.odg"); + createSdDrawDoc("odg/softedges.odg"); saveAndReload("draw8"); auto xShapeProps(getShapeFromPage(0, 0)); @@ -1451,7 +1451,7 @@ void SdExportTest::testSoftEdges() void SdExportTest::testShadowBlur() { - loadFromURL(u"odg/shadow-blur.odg"); + createSdImpressDoc("odp/shadow-blur.odp"); saveAndReload("draw8"); uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); @@ -1472,20 +1472,20 @@ void SdExportTest::testShadowBlur() void SdExportTest::testRhbz1870501() { //Without the fix in place, it would crash at export time - loadFromURL(u"odg/rhbz1870501.odg"); + createSdDrawDoc("odg/rhbz1870501.odg"); saveAndReload("draw8"); } void SdExportTest::testTdf91060() { //Without the fix in place, it would crash at import time - loadFromURL(u"pptx/tdf91060.pptx"); + createSdImpressDoc("pptx/tdf91060.pptx"); saveAndReload("Impress Office Open XML"); } void SdExportTest::testTdf128550() { - loadFromURL(u"pptx/tdf128550.pptx"); + createSdImpressDoc("pptx/tdf128550.pptx"); save("impress8"); xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); assertXPath(pXmlDoc, "//anim:iterate[@anim:sub-item='background']", 1); @@ -1496,7 +1496,7 @@ void SdExportTest::testTdf140714() { //Without the fix in place, shape will be imported as GraphicObjectShape instead of CustomShape. - loadFromURL(u"pptx/tdf140714.pptx"); + createSdImpressDoc("pptx/tdf140714.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XShape> xShape(getShapeFromPage(0, 0), uno::UNO_QUERY); @@ -1505,7 +1505,7 @@ void SdExportTest::testTdf140714() void SdExportTest::testMasterPageBackgroundFullSize() { - loadFromURL(u"odp/background.odp"); + createSdImpressDoc("odp/background.odp"); // BackgroundFullSize exists on master pages only // (note: this document can't be created with the UI because UI keeps @@ -1692,7 +1692,7 @@ void SdExportTest::testMasterPageBackgroundFullSize() void SdExportTest::testColumnsODG() { - loadFromURL(u"odg/two_columns.odg"); + createSdDrawDoc("odg/two_columns.odg"); { ... etc. - the rest is truncated