include/oox/drawingml/shape.hxx | 2 ++ oox/source/drawingml/shape.cxx | 12 ++++++++++++ oox/source/shape/WpsContext.cxx | 1 + oox/source/token/properties.txt | 1 + 4 files changed, 16 insertions(+)
New commits: commit f0d6137c4e61bea3bed2b201a83a8e7a66065114 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue May 6 17:00:40 2014 +0200 oox: prepare for importing a TextBox property on shapes Writer's SwXShape doesn't have that property yet, though. Change-Id: I997eb188574fab93d35595972fdc2eaebabc015b diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index 926f223..fcb4999 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -180,6 +180,7 @@ public: bool getLockedCanvas(); void setWps(bool bWps); bool getWps(); + void setTextBox(bool bTextBox); const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & getDiagramDoms() { return maDiagramDoms; } void setDiagramDoms(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rDiagramDoms) { maDiagramDoms = rDiagramDoms; } @@ -293,6 +294,7 @@ private: // to propagate it when applying reference shape bool mbLockedCanvas; ///< Is this shape part of a locked canvas? bool mbWps; ///< Is this a wps shape? + bool mbTextBox; ///< This shape has a textbox. LinkedTxbxAttr maLinkedTxbxAttr; bool mbHasLinkedTxbx; // this text box has linked text box ? diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 72a7920..a83fe49 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -105,6 +105,7 @@ Shape::Shape( const sal_Char* pServiceName, bool bDefaultHeight ) , mbHiddenMasterShape( false ) , mbLockedCanvas( false ) , mbWps( false ) +, mbTextBox( false ) , mbHasLinkedTxbx( false ) , maDiagramDoms( 0 ) { @@ -143,6 +144,7 @@ Shape::Shape( const ShapePtr& pSourceShape ) , mbHiddenMasterShape( pSourceShape->mbHiddenMasterShape ) , mbLockedCanvas( pSourceShape->mbLockedCanvas ) , mbWps( pSourceShape->mbWps ) +, mbTextBox( pSourceShape->mbTextBox ) , maLinkedTxbxAttr() , mbHasLinkedTxbx(false) , maDiagramDoms( pSourceShape->maDiagramDoms ) @@ -283,6 +285,11 @@ bool Shape::getWps() return mbWps; } +void Shape::setTextBox(bool bTextBox) +{ + mbTextBox = bTextBox; +} + void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText ) { SAL_INFO("oox", OSL_THIS_FUNC << "apply shape reference: " << rReferencedShape.msId << " to shape id: " << msId); @@ -815,6 +822,11 @@ Reference< XShape > Shape::createAndInsert( aShapeProps.setProperty(PROP_ShadowFormat, uno::makeAny(aFormat)); } } + else if (mbTextBox) + { + //No such property yet + //aShapeProps.setProperty(PROP_TextBox, uno::makeAny(true)); + } PropertySet( xSet ).setProperties( aShapeProps ); if (mbLockedCanvas) diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index fa17304..ed2b1de 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -117,6 +117,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken { mpShape->getCustomShapeProperties()->setShapeTypeOverride(true); mpShape->setServiceName("com.sun.star.text.TextFrame"); + mpShape->setTextBox(true); //in case if the textbox is linked, save the attributes //for further processing. if (rAttribs.hasAttribute(XML_id)) diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index e6b824e..0ad6d7a 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -496,6 +496,7 @@ Tag TargetFrame Text TextAutoGrowHeight +TextBox TextBreak TextColor TextFitToSize _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits