diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-08-13 17:37:46 +0200 |
---|---|---|
committer | Bosdonnat Cedric <cedric.bosdonnat@free.fr> | 2012-09-11 08:42:21 +0000 |
commit | c3039612b838c68c00c4aaf993497c17d28163b3 (patch) | |
tree | eed5438e6a49179c3cffe6d7e9572b0e10393628 /sw/source/filter/ww8/docxattributeoutput.cxx | |
parent | 89e34ef5e4ff5efc202656bd9a2122745fdc6530 (diff) |
fdo#53113 various docx shape export fixes
- docx export: initial shape text support
- vml export: handle custom segment types
- docx: export fillBlip shape property
Change-Id: I8453d76cfb91386c8beaedc874e09a291234babb
Reviewed-on: https://gerrit.libreoffice.org/411
Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.cxx')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7ad5a1ee90fc..179c2f62204e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -45,7 +45,6 @@ #include <oox/token/tokens.hxx> #include <oox/export/drawingml.hxx> #include <oox/export/utils.hxx> -#include <oox/export/vmlexport.hxx> #include <oox/mathml/export.hxx> #include <i18npool/mslangid.hxx> @@ -94,6 +93,7 @@ #include <editeng/blnkitem.hxx> #include <editeng/charhiddenitem.hxx> #include <editeng/opaqitem.hxx> +#include <editeng/editobj.hxx> #include <svx/svdmodel.hxx> #include <svx/svdobj.hxx> #include <sfx2/sfxbasemodel.hxx> @@ -2423,6 +2423,55 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_POSTPONE ); } +void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj) +{ + const EditTextObject& rEditObj = rParaObj.GetTextObject(); + MSWord_SdrAttrIter aAttrIter( m_rExport, rEditObj, TXT_HFTXTBOX ); + + sal_uInt16 nPara = rEditObj.GetParagraphCount(); + + m_pSerializer->startElementNS( XML_w, XML_textbox, FSEND ); + m_pSerializer->startElementNS( XML_w, XML_txbxContent, FSEND ); + for (sal_uInt16 n = 0; n < nPara; ++n) + { + if( n ) + aAttrIter.NextPara( n ); + + String aStr( rEditObj.GetText( n )); + xub_StrLen nAktPos = 0; + xub_StrLen nEnd = aStr.Len(); + + m_pSerializer->startElementNS( XML_w, XML_p, FSEND ); + do { + xub_StrLen nNextAttr = aAttrIter.WhereNext(); + if( nNextAttr > nEnd ) + nNextAttr = nEnd; + + m_pSerializer->startElementNS( XML_w, XML_r, FSEND ); + bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos ); + if( !bTxtAtr ) + { + String aOut( aStr.Copy( nAktPos, nNextAttr - nAktPos ) ); + RunText(aOut); + } + + m_pSerializer->endElementNS( XML_w, XML_r ); + + nAktPos = nNextAttr; + aAttrIter.NextPos(); + } + while( nAktPos < nEnd ); + m_pSerializer->endElementNS( XML_w, XML_p ); + } + m_pSerializer->endElementNS( XML_w, XML_txbxContent ); + m_pSerializer->endElementNS( XML_w, XML_textbox ); +} + +oox::drawingml::DrawingML& DocxAttributeOutput::GetDrawingML() +{ + return m_rDrawingML; +} + void DocxAttributeOutput::StartStyle( const String& rName, bool bPapFmt, sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId, bool bAutoUpdate ) { |