From 3cf58da99ef152db31fa8378045d4bff041f7ff4 Mon Sep 17 00:00:00 2001 From: Nikhil Walvekar Date: Fri, 10 Jan 2014 20:21:45 +0530 Subject: [PATCH] fdo#70942 Preserve original shape type, if shape contains text. Currently we change shape type to textframe if a shape contains text. Due to this shape information is not preserved when file is saved. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7372 Change-Id: I7af3ce29f857d6fa2ceab0350937d91638361e7c --- .../oox/drawingml/customshapeproperties.hxx | 3 +++ .../drawingml/customshapeproperties.cxx | 1 + oox/source/drawingml/shape.cxx | 12 +++++++++ oox/source/shape/WpsContext.cxx | 1 + sw/qa/extras/ooxmlexport/data/fdo70942.docx | Bin 0 -> 15520 bytes sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 9 +++++++ sw/source/filter/ww8/docxattributeoutput.cxx | 23 +++++++++++++++--- 7 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 sw/qa/extras/ooxmlexport/data/fdo70942.docx diff --git a/include/oox/drawingml/customshapeproperties.hxx b/include/oox/drawingml/customshapeproperties.hxx index e6df846c7fa2..fdf8d49196eb 100644 --- a/include/oox/drawingml/customshapeproperties.hxx +++ b/include/oox/drawingml/customshapeproperties.hxx @@ -135,6 +135,8 @@ public: sal_Int32 getShapePresetType() const { return mnShapePresetType; } OUString getShapePresetTypeName() const; void setShapePresetType( sal_Int32 nShapePresetType ){ mnShapePresetType = nShapePresetType; }; + sal_Bool getShapeTypeOverride(){ return mbShapeTypeOverride; }; + void setShapeTypeOverride( sal_Bool bShapeTypeOverride ) { mbShapeTypeOverride = bShapeTypeOverride; }; std::vector< CustomShapeGuide >& getAdjustmentGuideList(){ return maAdjustmentGuideList; }; std::vector< CustomShapeGuide >& getGuideList(){ return maGuideList; }; @@ -155,6 +157,7 @@ public: private: sal_Int32 mnShapePresetType; + sal_Bool mbShapeTypeOverride; std::vector< CustomShapeGuide > maAdjustmentGuideList; std::vector< CustomShapeGuide > maGuideList; std::vector< AdjustHandle > maAdjustHandleList; diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 247e8cf9880e..cdc69741ec05 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -44,6 +44,7 @@ namespace oox { namespace drawingml { CustomShapeProperties::CustomShapeProperties() : mnShapePresetType ( -1 ) +, mbShapeTypeOverride(sal_False) , mbMirroredX ( sal_False ) , mbMirroredY ( sal_False ) , mnTextRotateAngle ( 0 ) diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 9437f0252499..eff9ad408424 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -621,6 +621,18 @@ Reference< XShape > Shape::createAndInsert( { if (aServiceName == "com.sun.star.text.TextFrame") { + if (mpCustomShapePropertiesPtr != NULL && mpCustomShapePropertiesPtr->getShapeTypeOverride()) + { + uno::Reference propertySet (mxShape, uno::UNO_QUERY); + uno::Sequence aGrabBag; + propertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag; + sal_Int32 length = aGrabBag.getLength(); + aGrabBag.realloc( length+1); + aGrabBag[length].Name = "mso-orig-shape-type"; + aGrabBag[length].Value = uno::makeAny(mpCustomShapePropertiesPtr->getShapePresetTypeName()); + propertySet->setPropertyValue("FrameInteropGrabBag",uno::makeAny(aGrabBag)); + } + // TextFrames have BackColor, not FillColor if (aShapeProps.hasProperty(PROP_FillColor)) { diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index e2bbb0eda362..04e8a232332c 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -101,6 +101,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken } break; case XML_txbx: + mpShape->getCustomShapeProperties()->setShapeTypeOverride(true); mpShape->setServiceName("com.sun.star.text.TextFrame"); break; default: diff --git a/sw/qa/extras/ooxmlexport/data/fdo70942.docx b/sw/qa/extras/ooxmlexport/data/fdo70942.docx new file mode 100644 index 0000000000000000000000000000000000000000..a04a78437c14e8aa96639aa8574713b7a6a2bb12 GIT binary patch literal 15520 zcmeHubzEH8vTh^6-QC?GxI+kT!GgO6cX!v|1a}GU?gV#&ySuyddd``-Gm|s-z4!mU zyMNugx_j5x)wS1J^{rK_cP>m1PRt`p1 z4mwJ%Hb(YZ3@(-yL^SS$+pL=+ znbM0^h7St^UWO)5H)r^gQpMT%>TS`TEN4$6ucD#3@_m0k6x$vGD^{-z`zE+{EX_fwA%CMsiWH_>=WW*fDxgP*Nocxif z@)V`pU;S)9?>8!+il}x!4R?Gx4t4h1X2nsw(C&r~ePfCcZAK-TXa!r-d@`}OFpN^0 zGL&w06o2Y@%Q;!`D=Id?;ezC+GF1^-3So$wCmI1N|8<|qs7n6SW}t7B(mVb93$+w1@K*#E)Z^e=xsB6djNHOwFGPi&+Dz7bs;=0Y zxr=2(IHbJVfJTa+3B1@?rJ0rWEF*7Bd^T?cb4ku-O^^^7KZ)`C%3RIBfp(?lXgmpM z#ji0VxHl0c&F%fypTSa+3l`Pj%}mY&>-tsMb!HK?IB>jRjL+tWL(vBy^{f{d^l2<4 z`s^aVP~XtuSTK!~r^o1*!mzKK<;>iOyy=8T1=2xhLx+xEc{rwlscR!TEabTMSMU%L ztI=V2x<7sJuVFOh2gb1f>?0mLNn9krZ<@dW06YK`h_khwA>+S0ilMcEqa`rV{TAW= z=rka}FbBN)fA&!tCnFcY^zUJQss&9&D{`S4lWn1-{9>72(KH~@p%3x34ZQ|tChO9?)B$f3p0Y?k^TG`CN>;yhD3J|gES7vmAMhpT&Go_i#_mlYVas^ueb(Ngndi7y zp*Ae-2+}(A_1x@BQFHm}{Qm-2H(zA%`0@FD}ZAZdhMyx6hYWGKF|! zdkzz0Q!1y$8U3HlB{wZ(LqE^2ytyT`?P>=g@@w8A{8JlygE?nDga-h|@c;m1VAJ_m z8~bb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^!ru$*8usa@(Jtj%6|)&zv};ewEa^X09a@Li|xOUz4B7;fXxg5fCE0D Mfi2aS>$i9R2Q=~M!vFvP literal 0 HcmV?d00001 diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index d4f5e3fb471b..95b2cb248ce9 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2413,6 +2413,15 @@ DECLARE_OOXMLEXPORT_TEST(testFdo73247, "fdo73247.docx") "rot", "1969698"); } +DECLARE_OOXMLEXPORT_TEST(testFdo70942, "fdo70942.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + 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:prstGeom", + "prst", "ellipse"); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index e498c096b4ad..841655439594 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -309,13 +309,12 @@ void DocxAttributeOutput::WriteDMLTextFrame(sw::Frame* pParentFrame) uno::Reference< drawing::XShape > xShape( ((SdrObject*)pSdrObj)->getUnoShape(), uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY ); uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropertySet->getPropertySetInfo(); - OUString pName = "FrameInteropGrabBag"; sal_Int32 nRotation = 0; - if ( xPropSetInfo->hasPropertyByName( pName ) ) + if ( xPropSetInfo->hasPropertyByName( "FrameInteropGrabBag" ) ) { uno::Sequence< beans::PropertyValue > propList; - xPropertySet->getPropertyValue( pName ) >>= propList; + xPropertySet->getPropertyValue( "FrameInteropGrabBag" ) >>= propList; for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp ) { OUString propName = propList[nProp].Name; @@ -352,8 +351,24 @@ void DocxAttributeOutput::WriteDMLTextFrame(sw::Frame* pParentFrame) XML_cy, aHeight.getStr(), FSEND); m_pSerializer->endElementNS(XML_a, XML_xfrm); + OUString shapeType = "rect"; + if ( xPropSetInfo->hasPropertyByName( "FrameInteropGrabBag" ) ) + { + uno::Sequence< beans::PropertyValue > propList; + xPropertySet->getPropertyValue( "FrameInteropGrabBag" ) >>= propList; + for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp ) + { + OUString propName = propList[nProp].Name; + if ( propName == "mso-orig-shape-type") + { + propList[nProp].Value >>= shapeType; + break; + } + } + } + m_pSerializer->singleElementNS(XML_a, XML_prstGeom, - XML_prst, "rect", + XML_prst, OUStringToOString( shapeType, RTL_TEXTENCODING_UTF8 ).getStr(), FSEND); m_bDMLTextFrameSyntax = true; m_pBodyPrAttrList = m_pSerializer->createAttrList();