include/oox/token/tokenmap.hxx | 3 --- oox/inc/drawingml/customshapeproperties.hxx | 2 +- oox/source/drawingml/customshapeproperties.cxx | 6 +++--- oox/source/drawingml/shape.cxx | 6 +++++- oox/source/mathml/importutils.cxx | 11 ++++++----- oox/source/token/tokenmap.cxx | 12 ------------ sax/source/tools/fastserializer.hxx | 1 - 7 files changed, 15 insertions(+), 26 deletions(-)
New commits: commit b697e5a8feb0b6ca7a7066528cd7e56ceaf39c5f Author: Matúš Kukan <matus.ku...@collabora.com> Date: Wed Sep 24 08:45:13 2014 +0200 Unused FastSaxSerializer::maSavedMarkStack member Change-Id: Ib665b3870f3d4b00c70d3f928452639464adca69 diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx index da8c527..a88e3ca 100644 --- a/sax/source/tools/fastserializer.hxx +++ b/sax/source/tools/fastserializer.hxx @@ -204,7 +204,6 @@ private: }; ::std::stack< boost::shared_ptr< ForMerge > > maMarkStack; - ::std::stack< boost::shared_ptr< ForMerge > > maSavedMarkStack; #ifdef DBG_UTIL ::std::stack<sal_Int32> m_DebugStartedElements; commit c566814e0411f1357f63b503e76aa51a396d82d0 Author: Matúš Kukan <matus.ku...@collabora.com> Date: Wed Sep 24 00:13:11 2014 +0200 Remove TokenMap::getUnicodeTokenName() Change-Id: I778dc43085b6afbb6456cbf53fe8c95b624b75b3 diff --git a/include/oox/token/tokenmap.hxx b/include/oox/token/tokenmap.hxx index a00475f..6298773 100644 --- a/include/oox/token/tokenmap.hxx +++ b/include/oox/token/tokenmap.hxx @@ -35,9 +35,6 @@ public: explicit TokenMap(); ~TokenMap(); - /** Returns the Unicode name of the passed token identifier. */ - OUString getUnicodeTokenName( sal_Int32 nToken ) const; - /** Returns the token identifier for the passed Unicode token name. */ sal_Int32 getTokenFromUnicode( const OUString& rUnicodeName ) const; diff --git a/oox/inc/drawingml/customshapeproperties.hxx b/oox/inc/drawingml/customshapeproperties.hxx index d27fc66..ff80b52 100644 --- a/oox/inc/drawingml/customshapeproperties.hxx +++ b/oox/inc/drawingml/customshapeproperties.hxx @@ -116,7 +116,7 @@ public: const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > & xShape, const ::com::sun::star::awt::Size &aSize ); sal_Int32 getShapePresetType() const { return mnShapePresetType; } - OUString getShapePresetTypeName() const; + css::uno::Sequence< sal_Int8 > getShapePresetTypeName() const; void setShapePresetType( sal_Int32 nShapePresetType ){ mnShapePresetType = nShapePresetType; }; bool getShapeTypeOverride(){ return mbShapeTypeOverride; }; void setShapeTypeOverride( bool bShapeTypeOverride ) { mbShapeTypeOverride = bShapeTypeOverride; }; diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 5758d79..64fe535 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -56,9 +56,9 @@ CustomShapeProperties::~CustomShapeProperties() { } -OUString CustomShapeProperties::getShapePresetTypeName() const +uno::Sequence< sal_Int8 > CustomShapeProperties::getShapePresetTypeName() const { - return StaticTokenMap::get().getUnicodeTokenName( mnShapePresetType ); + return StaticTokenMap::get().getUtf8TokenName( mnShapePresetType ); } sal_Int32 CustomShapeProperties::SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide ) @@ -136,7 +136,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi } else if (maPresetDataMap.find(mnShapePresetType) != maPresetDataMap.end()) { - OSL_TRACE("found property map for preset: %s (%d)", USS(getShapePresetTypeName()), mnShapePresetType); + OSL_TRACE("found property map for preset: %d", mnShapePresetType); aPropertyMap = maPresetDataMap[mnShapePresetType]; #ifdef DEBUG diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index dbd2aa7..1276c97 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -678,7 +678,11 @@ Reference< XShape > Shape::createAndInsert( sal_Int32 length = aGrabBag.getLength(); aGrabBag.realloc( length+1); aGrabBag[length].Name = "mso-orig-shape-type"; - aGrabBag[length].Value = uno::makeAny(mpCustomShapePropertiesPtr->getShapePresetTypeName()); + const uno::Sequence< sal_Int8 > aNameSeq = + mpCustomShapePropertiesPtr->getShapePresetTypeName(); + OUString sShapePresetTypeName(reinterpret_cast< const char* >( + aNameSeq.getConstArray()), aNameSeq.getLength(), RTL_TEXTENCODING_UTF8); + aGrabBag[length].Value = uno::makeAny(sShapePresetTypeName); propertySet->setPropertyValue("FrameInteropGrabBag",uno::makeAny(aGrabBag)); } //If the text box has links then save the link information so that diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx index 2b7eb11..2b5ad75 100644 --- a/oox/source/mathml/importutils.cxx +++ b/oox/source/mathml/importutils.cxx @@ -55,17 +55,18 @@ AttributeListBuilder::AttributeListBuilder( const uno::Reference< xml::sax::XFas } } -static OUString tokenToString( int token ) +static OString tokenToString( int token ) { - OUString tokenname = StaticTokenMap::get().getUnicodeTokenName( token & TOKEN_MASK ); + const uno::Sequence< sal_Int8 > aTokenNameSeq = StaticTokenMap::get().getUtf8TokenName( token & TOKEN_MASK ); + OString tokenname( reinterpret_cast< const char* >( aTokenNameSeq.getConstArray() ), aTokenNameSeq.getLength() ); if( tokenname.isEmpty()) tokenname = "???"; int nmsp = ( token & NMSP_MASK & ~( TAG_OPENING | TAG_CLOSING )); #if 0 // this is awfully long - OUString namespacename = StaticNamespaceMap::get().count( nmsp ) != 0 - ? StaticNamespaceMap::get()[ nmsp ] : OUString( "???" ); + OString namespacename = StaticNamespaceMap::get().count( nmsp ) != 0 + ? StaticNamespaceMap::get()[ nmsp ] : OString( "???" ); #else - OUString namespacename; + OString namespacename; // only few are needed actually switch( nmsp ) { diff --git a/oox/source/token/tokenmap.cxx b/oox/source/token/tokenmap.cxx index 79969df..880d5c6 100644 --- a/oox/source/token/tokenmap.cxx +++ b/oox/source/token/tokenmap.cxx @@ -73,18 +73,6 @@ TokenMap::~TokenMap() { } -OUString TokenMap::getUnicodeTokenName( sal_Int32 nToken ) const -{ - Sequence< sal_Int8 > rUtf8Name = getUtf8TokenName(nToken); - if (rUtf8Name.getLength() == 0) - return OUString(); - - return OUString(reinterpret_cast< const char * >( - rUtf8Name.getConstArray() ), - rUtf8Name.getLength(), - RTL_TEXTENCODING_UTF8); -} - sal_Int32 TokenMap::getTokenFromUnicode( const OUString& rUnicodeName ) const { OString aUtf8Name = OUStringToOString( rUnicodeName, RTL_TEXTENCODING_UTF8 );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits