chart2/qa/extras/PivotChartTest.cxx | 1 - sc/source/ui/unoobj/PivotChartDataSource.cxx | 2 +- xmloff/source/chart/SchXMLChartContext.cxx | 4 ---- xmloff/source/chart/SchXMLImport.cxx | 13 +++++++++++++ 4 files changed, 14 insertions(+), 6 deletions(-)
New commits: commit abfaae8bf10b3bd18fe2155474cc861e934d7925 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Fri Mar 31 17:56:35 2017 +0200 xmloff: assign the number format supplier at construction Change-Id: Ieb6af6351312a15bb71bbd8534d021a805b194a7 diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 88420d62cdc0..aaddc433b8a7 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -257,10 +257,6 @@ void lcl_setDataProvider(uno::Reference<chart2::XChartDocument> xChartDoc, OUStr Reference<lang::XMultiServiceFactory> xFact(xChild->getParent(), uno::UNO_QUERY); if (xFact.is()) { - //if the parent has a number formatter we will use the numberformatter of the parent - Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(xFact, uno::UNO_QUERY); - xDataReceiver->attachNumberFormatsSupplier(xNumberFormatsSupplier); - if (!xChartDoc->getDataProvider().is()) { bool bHasDataPilotSource = !sDataPilotSource.isEmpty(); diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index a240a9344989..10d8fc105b39 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -591,6 +591,19 @@ void SAL_CALL SchXMLImport::setTargetDocument(const uno::Reference<lang::XCompon // prevent rebuild of view during load (necesarry especially if loaded not // via load api, which is the case for example if binary files are loaded) xChartDoc->lockControllers(); + + uno::Reference<container::XChild> xChild(xChartDoc, uno::UNO_QUERY); + uno::Reference<chart2::data::XDataReceiver> xDataReceiver(xChartDoc, uno::UNO_QUERY); + if (xChild.is() && xDataReceiver.is()) + { + Reference<lang::XMultiServiceFactory> xFact(xChild->getParent(), uno::UNO_QUERY); + if (xFact.is()) + { + //if the parent has a number formatter we will use the numberformatter of the parent + Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(xFact, uno::UNO_QUERY); + xDataReceiver->attachNumberFormatsSupplier(xNumberFormatsSupplier); + } + } } catch (const uno::Exception & rEx) { commit 841dad721392acab01e1b679dee5bb62014c6ed8 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Fri Mar 31 17:56:06 2017 +0200 compile fixes Change-Id: Ic1f67280b21c4b5343dee7f09e840f6e651daea8 diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx index ad98c60869da..b54888ef2a2f 100644 --- a/chart2/qa/extras/PivotChartTest.cxx +++ b/chart2/qa/extras/PivotChartTest.cxx @@ -188,7 +188,6 @@ void PivotChartTest::testChangePivotTable() uno::Reference<sheet::XDataPilotTables> xDataPilotTables = xDataPilotTablesSupplier->getDataPilotTables(); uno::Reference<sheet::XDataPilotTable> xDataPilotTable(xDataPilotTables->getByName("DataPilot1"), UNO_QUERY_THROW); uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor(xDataPilotTable, UNO_QUERY_THROW); - uno::Reference<container::XIndexAccess> xPilotIndexAccess(xDataPilotDescriptor->getDataPilotFields(), UNO_QUERY_THROW); lclModifyOrientation(xDataPilotDescriptor, "Service Month", sheet::DataPilotFieldOrientation_ROW); lclModifyOrientation(xDataPilotDescriptor, "Group Segment", sheet::DataPilotFieldOrientation_COLUMN); diff --git a/sc/source/ui/unoobj/PivotChartDataSource.cxx b/sc/source/ui/unoobj/PivotChartDataSource.cxx index 2f95e2a4d329..00949a6b2e89 100644 --- a/sc/source/ui/unoobj/PivotChartDataSource.cxx +++ b/sc/source/ui/unoobj/PivotChartDataSource.cxx @@ -35,7 +35,7 @@ PivotChartDataSource::~PivotChartDataSource() { } -void PivotChartDataSource::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) +void PivotChartDataSource::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/) { }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits