summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorSarper Akdemir <sarper.akdemir@collabora.com>2021-04-25 15:59:39 +0300
committerMiklos Vajna <vmiklos@collabora.com>2021-06-16 14:32:41 +0200
commit166671f4aa19deec47c10a220ae1d29fa57faa93 (patch)
tree58d54267c405ae50e66f452d52dd074d561606ef /chart2
parent3c46fd3d727e4885fedef7c9f3fcd6f4c9a9ebb9 (diff)
tdf#59323: pptx import: import footer fields as properties
Makes footer, slidenum and datetime placeholders that are inserted to the slides themselves on pptx files imported as slide properties if it is possible to do so without losing information (style, position etc.) If that is not the case and the footers have some special style applied to them that isn't inherited from master slides, fallbacks to the current implementation importing them as shapes. Also since the default way of displaying slide footers in LO use the respective text fields on master slides, information in master/layout slide datetime and footer placeholders respectively get replaced with <date/time> text fields and <footer> text fields. Change-Id: Ib2f7d18103b62c0c9a8453e01cfd2fd1aa1d39af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117008 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2import.cxx4
-rw-r--r--chart2/qa/extras/xshape/chart2xshape.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 41d55297a336..383e4524468a 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -764,7 +764,7 @@ void Chart2ImportTest::testBnc864396()
void Chart2ImportTest::testBnc889755()
{
load(u"/chart2/qa/extras/data/pptx/", "bnc889755.pptx");
- uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 6), uno::UNO_QUERY_THROW);
+ uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 5), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
uno::Reference< chart2::XInternalDataProvider > xDataProvider( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
@@ -792,7 +792,7 @@ void Chart2ImportTest::testBnc889755()
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW);
// Shape "Title 3"
- uno::Reference<beans::XPropertySet> xShapeProps(xPage->getByIndex(5), uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xShapeProps(xPage->getByIndex(4), uno::UNO_QUERY_THROW);
awt::Gradient aTransparence;
xShapeProps->getPropertyValue("FillTransparenceGradient") >>= aTransparence;
CPPUNIT_ASSERT(aTransparence.StartColor != aTransparence.EndColor);
diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx
index 895f84bb62a4..4964bfc455ee 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -177,7 +177,7 @@ void Chart2XShapeTest::testTdf76649TrendLineBug()
void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
{
load(u"chart2/qa/extras/xshape/data/pptx/", "tdf88154_LabelRotatedLayout.pptx");
- uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 6);
+ uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 5);
uno::Reference<qa::XDumper> xDumper(xChartDoc, UNO_QUERY_THROW);
OUString rDump = xDumper->dump();
OString aXmlDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8);