Kaydet (Commit) c7d111b5 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Miklos Vajna

sw: DOCX export: eliminate chart numbering non-determinism

... that was causing test failures on some but not all platforms.

(cherry picked from commit c56e0858)
(cherry picked from commit 2263a59a)

Change-Id: I0d04cd6e540ea2693a3ec8511d615a9b0fecf456
Reviewed-on: https://gerrit.libreoffice.org/20757Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst a3eb2cfd
...@@ -4411,10 +4411,9 @@ void DocxAttributeOutput::WritePostponedChart() ...@@ -4411,10 +4411,9 @@ void DocxAttributeOutput::WritePostponedChart()
FSEND ); FSEND );
OString aRelId; OString aRelId;
static sal_Int32 nChartCount = 0; m_nChartCount++;
nChartCount++;
uno::Reference< frame::XModel > xModel( xChartDoc, uno::UNO_QUERY ); uno::Reference< frame::XModel > xModel( xChartDoc, uno::UNO_QUERY );
aRelId = m_rExport.OutputChart( xModel, nChartCount, m_pSerializer ); aRelId = m_rExport.OutputChart( xModel, m_nChartCount, m_pSerializer );
m_pSerializer->singleElementNS( XML_c, XML_chart, m_pSerializer->singleElementNS( XML_c, XML_chart,
FSNS( XML_xmlns, XML_c ), "http://schemas.openxmlformats.org/drawingml/2006/chart", FSNS( XML_xmlns, XML_c ), "http://schemas.openxmlformats.org/drawingml/2006/chart",
...@@ -8410,6 +8409,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri ...@@ -8410,6 +8409,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
m_startedHyperlink( false ), m_startedHyperlink( false ),
m_nHyperLinkCount(0), m_nHyperLinkCount(0),
m_nFieldsInHyperlink( 0 ), m_nFieldsInHyperlink( 0 ),
m_nChartCount(0),
m_postponedChart( NULL ), m_postponedChart( NULL ),
pendingPlaceholder( NULL ), pendingPlaceholder( NULL ),
m_postitFieldsMaxId( 0 ), m_postitFieldsMaxId( 0 ),
......
...@@ -861,6 +861,8 @@ private: ...@@ -861,6 +861,8 @@ private:
std::unique_ptr< std::list<PostponedOLE> > m_pPostponedOLEs; std::unique_ptr< std::list<PostponedOLE> > m_pPostponedOLEs;
std::vector<const SwOLENode*> m_aPostponedMaths; std::vector<const SwOLENode*> m_aPostponedMaths;
/// count charts consistently for unit tests
unsigned int m_nChartCount;
const SdrObject* m_postponedChart; const SdrObject* m_postponedChart;
Size m_postponedChartSize; Size m_postponedChartSize;
std::vector<const SdrObject*> m_aPostponedFormControls; std::vector<const SdrObject*> m_aPostponedFormControls;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment