Repository.mk | 2 connectivity/Module_connectivity.mk | 4 oox/source/drawingml/chart/seriescontext.cxx | 4 oox/source/drawingml/chart/seriesconverter.cxx | 4 sw/source/filter/ww8/docxattributeoutput.cxx | 131 ++++++++++++------------- sw/source/filter/ww8/docxattributeoutput.hxx | 3 6 files changed, 77 insertions(+), 71 deletions(-)
New commits: commit 14a91d625118eadffda4c0a102ad43d7f26d74b5 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> AuthorDate: Sun Nov 18 22:00:23 2018 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Nov 20 19:12:27 2018 +0100 tdf#108022, don't overwrite chart export information Change-Id: I47d8a817022829c8cada614469303e440f377299 Reviewed-on: https://gerrit.libreoffice.org/63536 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 9ccdf4d8abf6ec6612c88ab65be25eb6be89b455) Reviewed-on: https://gerrit.libreoffice.org/63540 Tested-by: Xisco Faulí <xiscofa...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 21467c1c0fea676a33c7b7e75648947efea18fcb) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 3afa61c66d6b..915075964cf5 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4795,8 +4795,7 @@ bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size& r if (!SotExchange::IsChart(aClassID)) return false; - m_postponedChart = pSdrObj; - m_postponedChartSize = rSize; + m_aPostponedCharts.push_back(std::pair<const SdrObject*, Size>(pSdrObj, rSize)); return true; } @@ -4805,81 +4804,86 @@ bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size& r */ void DocxAttributeOutput::WritePostponedChart() { - if(m_postponedChart == nullptr) + if (m_aPostponedCharts.empty()) return; - uno::Reference< chart2::XChartDocument > xChartDoc; - uno::Reference< drawing::XShape > xShape( const_cast<SdrObject*>(m_postponedChart)->getUnoShape(), uno::UNO_QUERY ); - if( xShape.is() ) - { - uno::Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY ); - if( xPropSet.is() ) - xChartDoc.set( xPropSet->getPropertyValue( "Model" ), uno::UNO_QUERY ); - } - if( xChartDoc.is() ) + for (const auto& itr : m_aPostponedCharts) { - SAL_INFO("sw.ww8", "DocxAttributeOutput::WriteOLE2Obj: export chart "); - m_pSerializer->startElementNS( XML_w, XML_drawing, - FSEND ); - m_pSerializer->startElementNS( XML_wp, XML_inline, - XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0", - FSEND ); + uno::Reference< chart2::XChartDocument > xChartDoc; + uno::Reference< drawing::XShape > xShape( const_cast<SdrObject*>(itr.first)->getUnoShape(), uno::UNO_QUERY ); + if( xShape.is() ) + { + uno::Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY ); + if( xPropSet.is() ) + xChartDoc.set( xPropSet->getPropertyValue( "Model" ), uno::UNO_QUERY ); + } - OString aWidth( OString::number( TwipsToEMU( m_postponedChartSize.Width() ) ) ); - OString aHeight( OString::number( TwipsToEMU( m_postponedChartSize.Height() ) ) ); - m_pSerializer->singleElementNS( XML_wp, XML_extent, - XML_cx, aWidth.getStr(), - XML_cy, aHeight.getStr(), - FSEND ); - // TODO - the right effectExtent, extent including the effect - m_pSerializer->singleElementNS( XML_wp, XML_effectExtent, - XML_l, "0", XML_t, "0", XML_r, "0", XML_b, "0", - FSEND ); + if( xChartDoc.is() ) + { + SAL_INFO("sw.ww8", "DocxAttributeOutput::WriteOLE2Obj: export chart "); + m_pSerializer->startElementNS( XML_w, XML_drawing, + FSEND ); + m_pSerializer->startElementNS( XML_wp, XML_inline, + XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0", + FSEND ); - OUString sName("Object 1"); - uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY ); - if( xNamed.is() ) - sName = xNamed->getName(); + OString aWidth( OString::number( TwipsToEMU( itr.second.Width() ) ) ); + OString aHeight( OString::number( TwipsToEMU( itr.second.Height() ) ) ); + m_pSerializer->singleElementNS( XML_wp, XML_extent, + XML_cx, aWidth.getStr(), + XML_cy, aHeight.getStr(), + FSEND ); + // TODO - the right effectExtent, extent including the effect + m_pSerializer->singleElementNS( XML_wp, XML_effectExtent, + XML_l, "0", XML_t, "0", XML_r, "0", XML_b, "0", + FSEND ); - /* If there is a scenario where a chart is followed by a shape - which is being exported as an alternate content then, the - docPr Id is being repeated, ECMA 20.4.2.5 says that the - docPr Id should be unique, ensuring the same here. - */ - m_pSerializer->singleElementNS( XML_wp, XML_docPr, - XML_id, I32S( m_anchorId++ ), - XML_name, USS( sName ), - FSEND ); + OUString sName("Object 1"); + uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY ); + if( xNamed.is() ) + sName = xNamed->getName(); + + /* If there is a scenario where a chart is followed by a shape + which is being exported as an alternate content then, the + docPr Id is being repeated, ECMA 20.4.2.5 says that the + docPr Id should be unique, ensuring the same here. + */ + m_pSerializer->singleElementNS( XML_wp, XML_docPr, + XML_id, I32S( m_anchorId++ ), + XML_name, USS( sName ), + FSEND ); - m_pSerializer->singleElementNS( XML_wp, XML_cNvGraphicFramePr, - FSEND ); + m_pSerializer->singleElementNS( XML_wp, XML_cNvGraphicFramePr, + FSEND ); - m_pSerializer->startElementNS( XML_a, XML_graphic, - FSNS( XML_xmlns, XML_a ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)), RTL_TEXTENCODING_UTF8).getStr(), - FSEND ); + m_pSerializer->startElementNS( XML_a, XML_graphic, + FSNS( XML_xmlns, XML_a ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)), RTL_TEXTENCODING_UTF8).getStr(), + FSEND ); - m_pSerializer->startElementNS( XML_a, XML_graphicData, - XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart", - FSEND ); + m_pSerializer->startElementNS( XML_a, XML_graphicData, + XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart", + FSEND ); - OString aRelId; - m_nChartCount++; - uno::Reference< frame::XModel > xModel( xChartDoc, uno::UNO_QUERY ); - aRelId = m_rExport.OutputChart( xModel, m_nChartCount, m_pSerializer ); + OString aRelId; + m_nChartCount++; + uno::Reference< frame::XModel > xModel( xChartDoc, uno::UNO_QUERY ); + aRelId = m_rExport.OutputChart( xModel, m_nChartCount, m_pSerializer ); - m_pSerializer->singleElementNS( XML_c, XML_chart, - FSNS( XML_xmlns, XML_c ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlChart)), RTL_TEXTENCODING_UTF8).getStr(), - FSNS( XML_xmlns, XML_r ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(officeRel)), RTL_TEXTENCODING_UTF8).getStr(), - FSNS( XML_r, XML_id ), aRelId.getStr(), - FSEND ); + m_pSerializer->singleElementNS( XML_c, XML_chart, + FSNS( XML_xmlns, XML_c ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlChart)), RTL_TEXTENCODING_UTF8).getStr(), + FSNS( XML_xmlns, XML_r ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(officeRel)), RTL_TEXTENCODING_UTF8).getStr(), + FSNS( XML_r, XML_id ), aRelId.getStr(), + FSEND ); - m_pSerializer->endElementNS( XML_a, XML_graphicData ); - m_pSerializer->endElementNS( XML_a, XML_graphic ); - m_pSerializer->endElementNS( XML_wp, XML_inline ); - m_pSerializer->endElementNS( XML_w, XML_drawing ); + m_pSerializer->endElementNS( XML_a, XML_graphicData ); + m_pSerializer->endElementNS( XML_a, XML_graphic ); + m_pSerializer->endElementNS( XML_wp, XML_inline ); + m_pSerializer->endElementNS( XML_w, XML_drawing ); + } } - m_postponedChart = nullptr; + + m_aPostponedCharts.clear(); } bool DocxAttributeOutput::WriteOLEMath( const SwOLENode& rOLENode ) @@ -9091,7 +9095,6 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, const FSHelperPtr m_nFieldsInHyperlink( 0 ), m_bExportingOutline(false), m_nChartCount(0), - m_postponedChart( nullptr ), pendingPlaceholder( nullptr ), m_postitFieldsMaxId( 0 ), m_anchorId( 1 ), diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 4d5ef5c3768d..0ce1b61c5e1e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -886,8 +886,7 @@ private: std::vector<const SwOLENode*> m_aPostponedMaths; /// count charts consistently for unit tests unsigned int m_nChartCount; - const SdrObject* m_postponedChart; - Size m_postponedChartSize; + std::vector<std::pair<const SdrObject*, Size>> m_aPostponedCharts; std::vector<const SdrObject*> m_aPostponedFormControls; std::vector<PostponedDrawing> m_aPostponedActiveXControls; const SwField* pendingPlaceholder; commit fd26fc870051f1d97e6d01668b0f140caf2b6590 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> AuthorDate: Mon Nov 19 00:13:36 2018 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Nov 20 19:11:57 2018 +0100 tdf#104579, if no data point shape props are set take the series props Change-Id: Ia2c0d6b05385a0f3900e20ef807b869e4098654c Reviewed-on: https://gerrit.libreoffice.org/63541 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit afe5e1f8de0a25364c8c98b453cfe831330c4eed) Reviewed-on: https://gerrit.libreoffice.org/63544 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 3633414c485b39a1eb824bae0dd2002976a4dc6e) diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 7633e6958777..4d5f2dadfe59 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -639,6 +639,10 @@ void DataPointConverter::convertFromModel( const Reference< XDataSeries >& rxDat else getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, rTypeGroup.getSeriesObjectType(), rSeries.mnIndex ); } + else if (rSeries.mxShapeProp.is()) + { + getFormatter().convertFrameFormatting( aPropSet, rSeries.mxShapeProp, rTypeGroup.getSeriesObjectType(), rSeries.mnIndex ); + } } catch( Exception& ) { commit 00d776e360fafae22b4314117371520c74743138 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> AuthorDate: Sun Nov 18 04:37:02 2018 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Nov 20 19:08:57 2018 +0100 tdf#102186, don't overwrite the deleted flag Change-Id: I3cc69a0baebc55ad52b64960657e9daa4be8f39d Reviewed-on: https://gerrit.libreoffice.org/63510 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 4bd2e57653ce22044ab984b06c84f22ef287cecf) Reviewed-on: https://gerrit.libreoffice.org/63513 Tested-by: Xisco Faulí <xiscofa...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 47c05f6e1bb4ec77f242001e4c2d297af48f511e) diff --git a/oox/source/drawingml/chart/seriescontext.cxx b/oox/source/drawingml/chart/seriescontext.cxx index a6763ad2fb74..10e3af70108f 100644 --- a/oox/source/drawingml/chart/seriescontext.cxx +++ b/oox/source/drawingml/chart/seriescontext.cxx @@ -93,6 +93,7 @@ void lclDataLabelSharedCharacters( ContextHandler2 const & rContext, const OUStr DataLabelContext::DataLabelContext( ContextHandler2Helper& rParent, DataLabelModel& rModel ) : ContextBase< DataLabelModel >( rParent, rModel ) { + mrModel.mbDeleted = false; } DataLabelContext::~DataLabelContext() @@ -101,7 +102,6 @@ DataLabelContext::~DataLabelContext() ContextHandlerRef DataLabelContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) { - mrModel.mbDeleted = false; if( isRootElement() ) switch( nElement ) { case C_TOKEN( idx ): @@ -124,6 +124,7 @@ void DataLabelContext::onCharacters( const OUString& rChars ) DataLabelsContext::DataLabelsContext( ContextHandler2Helper& rParent, DataLabelsModel& rModel ) : ContextBase< DataLabelsModel >( rParent, rModel ) { + mrModel.mbDeleted = false; } DataLabelsContext::~DataLabelsContext() @@ -132,7 +133,6 @@ DataLabelsContext::~DataLabelsContext() ContextHandlerRef DataLabelsContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) { - mrModel.mbDeleted = false; bool bMSO2007Doc = getFilter().isMSO2007Document(); if( isRootElement() ) switch( nElement ) { commit 6c032e7946544d612a8c5d669797c41554419976 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Tue Nov 20 18:58:46 2018 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Nov 20 19:05:29 2018 +0100 Building of Library_mysql does not depend on Java Change-Id: Ic29caca84e18122da86940d518a2cb9457ebe007 diff --git a/Repository.mk b/Repository.mk index 2adacbe520f1..6c617dd2843b 100644 --- a/Repository.mk +++ b/Repository.mk @@ -390,7 +390,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ $(call gb_Helper_optional,SCRIPTING,msforms) \ mtfrenderer \ $(call gb_Helper_optional,DBCONNECTIVITY,mysqlc) \ - $(if $(ENABLE_JAVA),$(call gb_Helper_optional,DBCONNECTIVITY,mysql)) \ + $(call gb_Helper_optional,DBCONNECTIVITY,mysql) \ odbc \ odfflatxml \ offacc \ diff --git a/connectivity/Module_connectivity.mk b/connectivity/Module_connectivity.mk index af017e1f90ca..f15e0ccae8a9 100644 --- a/connectivity/Module_connectivity.mk +++ b/connectivity/Module_connectivity.mk @@ -20,6 +20,7 @@ $(eval $(call gb_Module_add_targets,connectivity,\ Configuration_calc \ Configuration_dbase \ Configuration_flat \ + Configuration_mysql \ Configuration_odbc \ Configuration_writer \ Library_calc \ @@ -27,6 +28,7 @@ $(eval $(call gb_Module_add_targets,connectivity,\ Library_dbpool2 \ Library_file \ Library_flat \ + Library_mysql \ $(if $(filter ANDROID IOS,$(OS)),,Library_odbc) \ Library_sdbc2 \ Library_writer \ @@ -40,8 +42,6 @@ ifneq ($(ENABLE_JAVA),) $(eval $(call gb_Module_add_targets,connectivity,\ Configuration_hsqldb \ Configuration_jdbc \ - Configuration_mysql \ - Library_mysql \ Jar_sdbc_hsqldb \ Library_hsqldb \ Library_jdbc \ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits