summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-03-14 18:27:43 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-03-15 06:19:53 +0100
commitd65c8b37595a4775fd766b2b7becbc01fe21a04e (patch)
treefa238de0cde01f3a977c9f5cad928a200aba5fe3 /include
parent055fcef3fe3c3f74ed485a35451c48f6723991b6 (diff)
Simplify GetOOXMLPresetGeometry and GETVMLShapeType
Let them use types that know string lengths, don't require conversion, and are convenient at call sites. Also inline the maps initialization, instead of having separate arrays and initialization loops. Change-Id: Id4469f3f99f3f0eb2cd83f0671cf892df4e420a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131550 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/filter/msfilter/util.hxx4
-rw-r--r--include/oox/export/drawingml.hxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/include/filter/msfilter/util.hxx b/include/filter/msfilter/util.hxx
index 3e7610c28a4f..d540da35bae7 100644
--- a/include/filter/msfilter/util.hxx
+++ b/include/filter/msfilter/util.hxx
@@ -115,10 +115,10 @@ struct MSFILTER_DLLPUBLIC EquationResult
MSFILTER_DLLPUBLIC EquationResult ParseCombinedChars(const OUString& rStr);
/// Similar to EnhancedCustomShapeTypeNames::Get(), but it also supports OOXML types and returns a drawingML string.
-MSFILTER_DLLPUBLIC const char* GetOOXMLPresetGeometry( const OUString& rShapeType );
+MSFILTER_DLLPUBLIC OString GetOOXMLPresetGeometry( std::u16string_view rShapeType );
/// Similar to EnhancedCustomShapeTypeNames::Get(), but returns an MSO_SPT (binary / VML type).
-MSFILTER_DLLPUBLIC MSO_SPT GETVMLShapeType(const OUString& aType);
+MSFILTER_DLLPUBLIC MSO_SPT GETVMLShapeType(std::u16string_view aType);
/**
* The following function checks if a MSO shapetype is allowed to have textboxcontent.
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 774881022901..e1aaca0c4386 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -303,9 +303,9 @@ public:
sal_Int16 nScriptType = css::i18n::ScriptType::LATIN,
const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet = {});
- void WritePresetShape( const char* pShape , std::vector< std::pair<sal_Int32,sal_Int32>> & rAvList );
- void WritePresetShape( const char* pShape );
- void WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, const css::beans::PropertyValue& rProp );
+ void WritePresetShape( const OString& pShape , std::vector< std::pair<sal_Int32,sal_Int32>> & rAvList );
+ void WritePresetShape( const OString& pShape );
+ void WritePresetShape( const OString& pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, const css::beans::PropertyValue& rProp );
bool WriteCustomGeometry(
const css::uno::Reference<css::drawing::XShape>& rXShape,
const SdrObjCustomShape& rSdrObjCustomShape);