diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-04-11 16:43:40 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-12 17:11:37 +0200 |
commit | b950cf552f794a154f4576ec534513fe696d6e65 (patch) | |
tree | d246d88f141ac25c511cb0a02930af9bbb00c5ce /sw | |
parent | 1820f9f272bc478f79819767ddeb34644e334405 (diff) |
write out unique id for wp:docPr
"If multiple objects within the same document share the same id attribute value, then the
document shall be considered non-conformant." . Although it apparently does not matter
much in practice.
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.hxx | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 32773cc519c2..4b918fd9d0a7 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2104,7 +2104,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size } // picture description ::sax_fastparser::FastAttributeList* attrList = m_pSerializer->createAttrList(); - attrList->add( XML_id, "1" ); + attrList->add( XML_id, OString::valueOf( m_anchorId++ ).getStr()); attrList->add( XML_name, "Picture" ); attrList->add( XML_descr, OUStringToOString( rGrfNode.GetDescription(), RTL_TEXTENCODING_UTF8 ).getStr()); if( GetExport().GetFilter().getVersion( ) != oox::core::ECMA_DIALECT ) @@ -4369,7 +4369,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri m_closeHyperlinkInPreviousRun( false ), m_postponedGraphic( NULL ), m_postponedMath( NULL ), - m_postitFieldsMaxId( 0 ) + m_postitFieldsMaxId( 0 ), + m_anchorId( 0 ) { } diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 79c8b026ae42..11b8ceed818d 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -601,6 +601,7 @@ private: const SwOLENode* m_postponedMath; std::vector< const SwPostItField* > m_postitFields; unsigned int m_postitFieldsMaxId; + int m_anchorId; public: DocxAttributeOutput( DocxExport &rExport, ::sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML* pDrawingML ); |