diff options
author | Christian Lippka ORACLE <christian.lippka@oracle.com> | 2011-12-06 02:35:07 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2011-12-06 09:39:12 +0100 |
commit | 15aeab6cbd0b50b1d78646f03588237b8473285c (patch) | |
tree | af5a839f1cd22452fb9196d9173c819af044cf22 /xmloff | |
parent | b7540a2bfe424ff761f6bfd1e7264349c83e3f59 (diff) |
impress210: #i41995# fixed distinct shape and page id
# HG changeset patch
# User Christian Lippka ORACLE <christian.lippka@oracle.com>
# Date 1299691906 -3600
# Node ID 0b9b11216b0d3401f8824542dd5f2794eb141035
# Parent 69091b8fc77c9951fcdc52b800a37a92dc70bf84
impress210: #i41995# fixed distinct shape and page id
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/transform/ActionMapTypesOOo.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/transform/AttrTransformerAction.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/transform/OOo2Oasis.cxx | 24 | ||||
-rw-r--r-- | xmloff/source/transform/TransformerBase.cxx | 11 |
4 files changed, 37 insertions, 0 deletions
diff --git a/xmloff/source/transform/ActionMapTypesOOo.hxx b/xmloff/source/transform/ActionMapTypesOOo.hxx index 18c92ebbc8a8..a036d6c8a652 100644 --- a/xmloff/source/transform/ActionMapTypesOOo.hxx +++ b/xmloff/source/transform/ActionMapTypesOOo.hxx @@ -87,6 +87,7 @@ enum ActionMapTypesOOo OOO_SOURCE_SERVICE_ACTIONS, OOO_DRAW_AREA_POLYGON_ACTIONS, OOO_SCRIPT_ACTIONS, + OOO_ANIMATION_ACTIONS, MAX_OOO_ACTIONS }; diff --git a/xmloff/source/transform/AttrTransformerAction.hxx b/xmloff/source/transform/AttrTransformerAction.hxx index 8dc28f2d8915..e10e7f506632 100644 --- a/xmloff/source/transform/AttrTransformerAction.hxx +++ b/xmloff/source/transform/AttrTransformerAction.hxx @@ -135,6 +135,7 @@ enum XMLAttrTransformerAction XML_ATACTION_GAMMA_OOO, // converts double value to percentage XML_ATACTION_DECODE_ID, // converts strings with non numeric characters to only numeric character ids XML_ATACTION_OPACITY_FIX, // converts transparency to opacity and back + XML_ATACTION_SHAPEID, // convert shape id XML_ATACTION_USER_DEFINED=0x40000000,// user defined actions start here XML_ATACTION_END=XML_TACTION_END }; diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index d343bdba71cf..264b062d141c 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -567,6 +567,14 @@ static XMLTransformerActionInit aActionTable[] = ENTRY1( TABLE, SOURCE_SERVICE, XML_ETACTION_PROC_ATTRS, OOO_SOURCE_SERVICE_ACTIONS ), + // fix id strings in old animation elements + ENTRY1( PRESENTATION, DIM, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ), + ENTRY1( PRESENTATION, PLAY, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ), + ENTRY1( PRESENTATION, SHOW_TEXT, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ), + ENTRY1( PRESENTATION, SHOW_SHAPE, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ), + ENTRY1( PRESENTATION, HIDE_TEXT, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ), + ENTRY1( PRESENTATION, HIDE_SHAPE, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ), + ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT ) }; @@ -749,6 +757,9 @@ static XMLTransformerActionInit aShapeActionTable[] = ENTRY2( CHART, LEGEND_POSITION, XML_ATACTION_RENAME_ATTRIBUTE, RENAME_ENTRY( XML_LEFT, XML_START ), RENAME_ENTRY( XML_RIGHT, XML_END )), + ENTRY0( DRAW, ID, XML_ATACTION_SHAPEID ), + ENTRY0( DRAW, START_SHAPE, XML_ATACTION_SHAPEID ), + ENTRY0( DRAW, END_SHAPE, XML_ATACTION_SHAPEID ), ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; @@ -772,6 +783,7 @@ static XMLTransformerActionInit aConnectorActionTable[] = ENTRY1Q( FORM, ID, XML_ATACTION_RENAME, XML_NAMESPACE_DRAW, XML_CONTROL ), ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_True ), + ENTRY0( DRAW, ID, XML_ATACTION_SHAPEID ), ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; @@ -1029,6 +1041,14 @@ static XMLTransformerActionInit aSourceServiceActionTable[] = ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; +// OOO_ANIMATION_ACTIONS +static XMLTransformerActionInit aAnimationsActionTable[] = +{ + ENTRY0( DRAW, SHAPE_ID, XML_ATACTION_SHAPEID ), + ENTRY0( PRESENTATION, PATH_ID, XML_ATACTION_SHAPEID ), + ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) +}; + // OOO_DRAW_AREA_POLYGON_ACTIONS (to be added to OOO_SHAPE_ACTIONS) static XMLTransformerActionInit aDrawAreaPolygonActionTable[] = { @@ -1767,6 +1787,10 @@ XMLTransformerActions *OOo2OasisTransformer::GetUserDefinedActions( m_aActions[OOO_SCRIPT_ACTIONS] = new XMLTransformerActions( aScriptActionTable ); break; + case OOO_ANIMATION_ACTIONS: + m_aActions[OOO_ANIMATION_ACTIONS] = + new XMLTransformerActions( aAnimationsActionTable ); + break; } } pActions = m_aActions[n]; diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index c7253e7af694..cc859733a444 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -239,6 +239,9 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName, { SvXMLNamespaceMap *pRewindMap = 0; + bool bRect = rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "presentation:show-shape" ) ); + (void)bRect; + // Process namespace attributes. This must happen before creating the // context, because namespace decaration apply to the element name itself. XMLMutableAttributeList *pMutableAttrList = 0; @@ -882,6 +885,14 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( bRename = sal_True; } break; + case XML_ATACTION_SHAPEID: + { + OUString sNewValue( RTL_CONSTASCII_USTRINGPARAM( "shape" ) ); + sNewValue += rAttrValue; + pMutableAttrList->SetValueByIndex( i, sNewValue ); + break; + } + default: OSL_ENSURE( !this, "unknown action" ); break; |