summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-10-09 20:29:09 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-10-09 20:36:51 +0200
commitf62a0ed0bfdab62efe259119589be04bcb313a7e (patch)
treeb0013453387287c420000709f95f46415cf81e6d /sw
parent1a09af69f484f275f7d8012e88678514db81d831 (diff)
DOCX export: handle name of Writer pictures
Change-Id: I1863da23fc25bd271494d48863ff4bf0554d0439
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index d636f9d437df..62e9df063128 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -636,7 +636,7 @@ DECLARE_OOXMLEXPORT_TEST(testSmartArtAnchoredInline, "fdo73227.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr","name","10-Point Star 3");
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing[2]/wp:anchor/wp:docPr","id","3");
- assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing[2]/wp:anchor/wp:docPr","name","Picture");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing[2]/wp:anchor/wp:docPr","name","Picture 1");
}
DECLARE_OOXMLEXPORT_TEST(testFdo65833, "fdo65833.docx")
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3b144fdab5b8..015531e065e4 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4164,7 +4164,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
// picture description (used for pic:cNvPr later too)
::sax_fastparser::FastAttributeList* docPrattrList = m_pSerializer->createAttrList();
docPrattrList->add( XML_id, OString::number( m_anchorId++).getStr());
- docPrattrList->add( XML_name, "Picture" );
+ docPrattrList->add( XML_name, OUStringToOString( pFrmFmt->GetName(), RTL_TEXTENCODING_UTF8 ) );
docPrattrList->add( XML_descr, OUStringToOString( pGrfNode ? pGrfNode->GetDescription() : pOLEFrmFmt->GetObjDescription(), RTL_TEXTENCODING_UTF8 ).getStr());
if( GetExport().GetFilter().getVersion( ) != oox::core::ECMA_DIALECT )
docPrattrList->add( XML_title, OUStringToOString( pGrfNode ? pGrfNode->GetTitle() : pOLEFrmFmt->GetObjTitle(), RTL_TEXTENCODING_UTF8 ).getStr());