summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorYogeshBharate <yogesh.bharate@synerzip.com>2014-01-24 18:27:25 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-31 09:39:35 +0000
commitac177e3919362deb6e46257a2787384620ca9a5e (patch)
tree595e816d567ab9a0dca8f94660b740bc6dcb1a02 /sw
parent9d5024a46e12dc91f75a964d87a1d53385c1a521 (diff)
fdo#73872: File Corruption - Issue with w:footerReference in document.xml
Problem Description : - In case if the header/footer had a chart in it then the associated relation Id was getting added to document.xml.rels instead of adding it to the relevent item*.xml.rels file. - Due to this the MS office was unable to read the round tripped file. Implementation : - Added the relation id's to relevant rels files. Change-Id: I412178222400e98ab2ef46d930c1e1fdfebf9799 Reviewed-on: https://gerrit.libreoffice.org/7630 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/docxexport.cxx5
-rw-r--r--sw/source/filter/ww8/docxexport.hxx2
3 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index c5c2febe61a4..6e0b428896a1 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3131,7 +3131,7 @@ void DocxAttributeOutput::WritePostponedChart()
static sal_Int32 nChartCount = 0;
nChartCount++;
uno::Reference< frame::XModel > xModel( xChartDoc, uno::UNO_QUERY );
- aRelId = m_rExport.OutputChart( xModel, nChartCount );
+ aRelId = m_rExport.OutputChart( xModel, nChartCount, m_pSerializer );
m_pSerializer->singleElementNS( XML_c, XML_chart,
FSNS( XML_xmlns, XML_c ), "http://schemas.openxmlformats.org/drawingml/2006/chart",
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index e67b538cf1e0..e8342c490cc6 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -341,13 +341,12 @@ void DocxExport::DoFormText(const SwInputField* /*pFld*/)
OSL_TRACE( "TODO DocxExport::ForFormText()" );
}
-OString DocxExport::OutputChart( uno::Reference< frame::XModel >& xModel, sal_Int32 nCount )
+OString DocxExport::OutputChart( uno::Reference< frame::XModel >& xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr m_pSerializer )
{
OUString aFileName = "charts/chart" + OUString::number(nCount) + ".xml";
- OUString sId = m_pFilter->addRelation( m_pDocumentFS->getOutputStream(),
+ OUString sId = m_pFilter->addRelation( m_pSerializer->getOutputStream(),
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
aFileName );
-
aFileName = "word/charts/chart" + OUString::number(nCount) + ".xml";
::sax_fastparser::FSHelperPtr pChartFS =
m_pFilter->openFragmentStreamWithSerializer( aFileName,
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index d371fa19042f..5d370954a1c9 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -154,7 +154,7 @@ public:
virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
/// Returns the relationd id
- OString OutputChart( com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, sal_Int32 nCount );
+ OString OutputChart( com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr m_pSerializer );
/// Writes the shape using drawingML syntax.
void OutputDML( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );