summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authormatteocam <matteo.campanelli@gmail.com>2015-09-07 12:17:30 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-09-20 13:05:15 +0200
commit3efdb083bf50829fb8398eb9efa42664910341f3 (patch)
treec2c721d8b217df85e5487a7f2e2bd224ddf312be /xmloff
parentaa77b170cb8aee744aa207f5b1ecfdd0bc0e90e2 (diff)
chained editeng: Add Chaining-related UNO attribute
Definition and mechanisms for UNO API. Change-Id: I7fd3969804ca9b04881ced0b1e43ab6236cbefcc
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/sdpropls.cxx1
-rw-r--r--xmloff/source/draw/ximpshap.cxx27
-rw-r--r--xmloff/source/draw/ximpshap.hxx1
3 files changed, 28 insertions, 1 deletions
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 442e5db00457..5896cc8a82a0 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -146,6 +146,7 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
GMAP( "NumberingRules", XML_NAMESPACE_TEXT, XML_LIST_STYLE, XML_SD_TYPE_NUMBULLET|MID_FLAG_ELEMENT_ITEM, CTF_NUMBERINGRULES ),
GMAP( "NumberingRules", XML_NAMESPACE_TEXT, XML_LIST_STYLE_NAME, XML_TYPE_STRING, CTF_SD_NUMBERINGRULES_NAME ),
GMAP( "TextWordWrap", XML_NAMESPACE_FO, XML_WRAP_OPTION, XML_TYPE_WRAP_OPTION, 0 ),
+ GMAP( "TextChainNextName", XML_NAMESPACE_DRAW, XML_CHAIN_NEXT_NAME, XML_TYPE_STRING, 0 ),
// shadow attributes
GMAP( "Shadow", XML_NAMESPACE_DRAW, XML_SHADOW, XML_SD_TYPE_SHADOW, 0 ),
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index e5eb4a60078a..8a067f697553 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1600,7 +1600,8 @@ SdXMLTextBoxShapeContext::SdXMLTextBoxShapeContext(
uno::Reference< drawing::XShapes >& rShapes,
bool bTemporaryShape)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ),
- mnRadius(0)
+ mnRadius(0),
+ maChainNextName("")
{
}
@@ -1619,6 +1620,13 @@ void SdXMLTextBoxShapeContext::processAttribute( sal_uInt16 nPrefix, const OUStr
mnRadius, rValue);
return;
}
+
+ if( IsXMLToken( rLocalName, XML_CHAIN_NEXT_NAME ) )
+ {
+ maChainNextName = rValue;
+ return;
+ }
+
}
SdXMLShapeContext::processAttribute( nPrefix, rLocalName, rValue );
@@ -1752,6 +1760,23 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
}
}
+ if(maChainNextName != "")
+ {
+ uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ try
+ {
+ xPropSet->setPropertyValue("TextChainNextName",
+ uno::makeAny( maChainNextName ) );
+ }
+ catch(const uno::Exception&)
+ {
+ OSL_FAIL( "exception during setting of name of next chain link!");
+ }
+ }
+ }
+
SdXMLShapeContext::StartElement(mxAttrList);
}
}
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index 73c9d8c0e478..fdf1e7056da3 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -247,6 +247,7 @@ public:
class SdXMLTextBoxShapeContext : public SdXMLShapeContext
{
sal_Int32 mnRadius;
+ OUString maChainNextName;
public:
TYPEINFO_OVERRIDE();