summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-09-24 00:13:11 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-09-24 15:35:19 +0200
commitc566814e0411f1357f63b503e76aa51a396d82d0 (patch)
treef03217c6adbbad1132388578bab6461750c787a2 /oox
parent9703cc63cea3c47d13afe5f9b0eb22c631000958 (diff)
Remove TokenMap::getUnicodeTokenName()
Change-Id: I778dc43085b6afbb6456cbf53fe8c95b624b75b3
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/drawingml/customshapeproperties.hxx2
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx6
-rw-r--r--oox/source/drawingml/shape.cxx6
-rw-r--r--oox/source/mathml/importutils.cxx11
-rw-r--r--oox/source/token/tokenmap.cxx12
5 files changed, 15 insertions, 22 deletions
diff --git a/oox/inc/drawingml/customshapeproperties.hxx b/oox/inc/drawingml/customshapeproperties.hxx
index d27fc661c0a2..ff80b5265589 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 5758d7996592..64fe53529e92 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 dbd2aa702c2c..1276c9743a33 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 2b7eb1124852..2b5ad75ea105 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 79969df70636..880d5c6fae6e 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 );