From 270b7efe92751a46c3d85e856b932a365c5f5b73 Mon Sep 17 00:00:00 2001 From: Regina Henschel Date: Thu, 16 Nov 2023 15:19:08 +0100 Subject: Add getUnicodeTokenName() to StaticTokenMap and use... it in several places. Currently these places get a Sequence by call of StaticTokenMap().getUtf8TokenName() and immediately after that generate an OUString from it using reinterpret_cast and the OUString ctor with 8-Bit character buffer array. The patch moves this conversion to StaticTokenMap. Change-Id: Ia2af110e2a0f1708e0685115d325c1c12cab3857 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159514 Tested-by: Jenkins Reviewed-by: Regina Henschel --- oox/inc/drawingml/connectorhelper.hxx | 8 -------- oox/inc/drawingml/customshapeproperties.hxx | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'oox/inc') diff --git a/oox/inc/drawingml/connectorhelper.hxx b/oox/inc/drawingml/connectorhelper.hxx index 1e875ab8ee95..f5409d635270 100644 --- a/oox/inc/drawingml/connectorhelper.hxx +++ b/oox/inc/drawingml/connectorhelper.hxx @@ -24,14 +24,6 @@ namespace ConnectorHelper { -/* ToDo: Other place? It uses getShapePresetTypeName() and that is only used in shape.cxx in - Shape::createAndInsert() for "mso-orig-shape-type" property in GrabBag and for msConnectorName. - In both cases it is immediately converted to OUString. So perhaps let - getShapePresetTypeName() return an OUString directly? -*/ -rtl::OUString getShapePresetTypeNameOUString( - const oox::drawingml::CustomShapePropertiesPtr& pCustomShapePropertiesPtr); - /** * Some preset shapes use the default connector site but in order right, bottom, left, top. * The function detects this. diff --git a/oox/inc/drawingml/customshapeproperties.hxx b/oox/inc/drawingml/customshapeproperties.hxx index 61a151d9aa09..c699ffddcce7 100644 --- a/oox/inc/drawingml/customshapeproperties.hxx +++ b/oox/inc/drawingml/customshapeproperties.hxx @@ -101,7 +101,7 @@ public: const css::awt::Size &aSize ); sal_Int32 getShapePresetType() const { return mnShapePresetType; } - css::uno::Sequence< sal_Int8 > const & getShapePresetTypeName() const; + OUString getShapePresetTypeName() const; void setShapePresetType( sal_Int32 nShapePresetType ){ mnShapePresetType = nShapePresetType; }; bool getShapeTypeOverride() const { return mbShapeTypeOverride; }; void setShapeTypeOverride( bool bShapeTypeOverride ) { mbShapeTypeOverride = bShapeTypeOverride; }; -- cgit