sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 11 ----------- sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx | 11 +++++++++++ sw/source/filter/ww8/docxsdrexport.cxx | 20 +++++++++++--------- sw/source/filter/ww8/docxsdrexport.hxx | 2 -- 4 files changed, 22 insertions(+), 22 deletions(-)
New commits: commit 461e46904ffa29820be1ccb64cdb9cb6d4469b6c Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Jul 17 09:48:18 2014 +0200 DocxSdrExport: move member to impl class Change-Id: I37aef651cf6424e7935ea3584b8f493f6f24c484 diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 363b5b9..da9dc23 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -164,6 +164,8 @@ struct DocxSdrExport::Impl bool m_bDMLAndVMLDrawingOpen; /// List of TextBoxes in this document: they are exported as part of their shape, never alone. std::set<SwFrmFmt*> m_aTextBoxes; + /// Preserved rotation for TextFrames. + sal_Int32 m_nDMLandVMLTextFrameRotation; Impl(DocxSdrExport& rSdrExport, DocxExport& rExport, sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML* pDrawingML) : m_rSdrExport(rSdrExport), @@ -186,7 +188,8 @@ struct DocxSdrExport::Impl m_nId(0), m_nSeq(0), m_bDMLAndVMLDrawingOpen(false), - m_aTextBoxes(SwTextBoxHelper::findTextBoxes(m_rExport.pDoc)) + m_aTextBoxes(SwTextBoxHelper::findTextBoxes(m_rExport.pDoc)), + m_nDMLandVMLTextFrameRotation(0) { } @@ -203,8 +206,7 @@ struct DocxSdrExport::Impl }; DocxSdrExport::DocxSdrExport(DocxExport& rExport, sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML* pDrawingML) - : m_pImpl(new Impl(*this, rExport, pSerializer, pDrawingML)), - DMLandVMLTextFrameRotation(0) + : m_pImpl(new Impl(*this, rExport, pSerializer, pDrawingML)) { } @@ -1273,7 +1275,7 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo FSEND); uno::Any aRotation ; - DMLandVMLTextFrameRotation = 0; + m_pImpl->m_nDMLandVMLTextFrameRotation = 0; if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("FrameInteropGrabBag")) { uno::Sequence< beans::PropertyValue > propList; @@ -1288,11 +1290,11 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo } } } - aRotation >>= DMLandVMLTextFrameRotation ; - OString sRotation(OString::number((OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(DMLandVMLTextFrameRotation)))); + aRotation >>= m_pImpl->m_nDMLandVMLTextFrameRotation ; + OString sRotation(OString::number((OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(m_pImpl->m_nDMLandVMLTextFrameRotation)))); // Shape properties pFS->startElementNS(XML_wps, XML_spPr, FSEND); - if (DMLandVMLTextFrameRotation) + if (m_pImpl->m_nDMLandVMLTextFrameRotation) { pFS->startElementNS(XML_a, XML_xfrm, XML_rot, sRotation.getStr(), @@ -1466,9 +1468,9 @@ void DocxSdrExport::writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly m_pImpl->m_pFlyAttrList = pFS->createAttrList(); m_pImpl->m_pTextboxAttrList = pFS->createAttrList(); m_pImpl->m_aTextFrameStyle = "position:absolute"; - if(!bTextBoxOnly) + if (!bTextBoxOnly) { - OString sRotation(OString::number(DMLandVMLTextFrameRotation / -100)); + OString sRotation(OString::number(m_pImpl->m_nDMLandVMLTextFrameRotation / -100)); m_pImpl->m_rExport.SdrExporter().getTextFrameStyle().append(";rotation:").append(sRotation); } m_pImpl->m_rExport.OutputFormat(pParentFrame->GetFrmFmt(), false, false, true); diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx index 1b8954d..5c98a42 100644 --- a/sw/source/filter/ww8/docxsdrexport.hxx +++ b/sw/source/filter/ww8/docxsdrexport.hxx @@ -101,8 +101,6 @@ public: bool isTextBox(const SwFrmFmt& rFrmFmt); /// Writes text from Textbox for <w:framePr> void writeOnlyTextOfFrame(sw::Frame* pParentFrame); - - sal_Int32 DMLandVMLTextFrameRotation; }; #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX commit c9227b26683ae960a79d60725caf70ac2515a4d0 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Jul 17 09:44:35 2014 +0200 sw: move testcase to the right suite Change-Id: Ieb89836facb28ef1432b48810532f6f0b4b00a89 diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index afc8242..a5aa50d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -3741,17 +3741,6 @@ DECLARE_OOXMLEXPORT_TEST(testfdo80898, "fdo80898.docx") "/word/embeddings/oleObject1.doc"); } -DECLARE_OOXMLEXPORT_TEST(testFdo80894, "TextFrameRotation.docx") -{ - xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; - - // Rotation value was not roundtripped for textframe. - assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:xfrm", - "rot","16200000"); -} - DECLARE_OOXMLEXPORT_TEST(test2colHeader, "2col-header.docx") { // Header was lost on export when the document had multiple columns. diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx index f887d54..92dc825 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx @@ -1729,6 +1729,17 @@ DECLARE_OOXMLEXPORT_TEST(testBnc884615, "bnc884615.docx") CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<sal_Bool>(getShape(1), "Opaque"))); } +DECLARE_OOXMLEXPORT_TEST(testFdo80894, "TextFrameRotation.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + + // Rotation value was not roundtripped for textframe. + assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:xfrm", + "rot","16200000"); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits