diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-14 11:30:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-14 13:14:55 +0100 |
commit | d67017bfe251c71ac1345615d9a3080a7fefdf32 (patch) | |
tree | 116423364843e0ce229597e92178d5e522cc381f /oox | |
parent | c4c8146c9982313fd11f27894360ceaee3b3cbca (diff) |
simplify GetOOXMLPresetGeometry
all the call sites are using OUString, so push the utf8 conversion
into the function
Change-Id: I875249b8702cde63737fd42dc1d1592be059cc11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131525
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/DMLPresetShapeExport.cxx | 8 | ||||
-rw-r--r-- | oox/source/export/shapes.cxx | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/oox/source/export/DMLPresetShapeExport.cxx b/oox/source/export/DMLPresetShapeExport.cxx index b374eb6b6c1a..ad603bcd2bd2 100644 --- a/oox/source/export/DMLPresetShapeExport.cxx +++ b/oox/source/export/DMLPresetShapeExport.cxx @@ -223,8 +223,7 @@ bool DMLPresetShapeExporter::WriteShape() if (!m_bHasHandleValues) { OUString sShapeType = GetShapeType(); - const char* sPresetShape - = msfilter::util::GetOOXMLPresetGeometry(sShapeType.toUtf8().getStr()); + const char* sPresetShape = msfilter::util::GetOOXMLPresetGeometry(sShapeType); m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(), false, false); m_pDMLexporter->WritePresetShape(sPresetShape); @@ -255,8 +254,7 @@ bool DMLPresetShapeExporter::StartAVListWriting() { try { - const char* pShape - = msfilter::util::GetOOXMLPresetGeometry(GetShapeType().toUtf8().getStr()); + const char* pShape = msfilter::util::GetOOXMLPresetGeometry(GetShapeType()); m_pDMLexporter->GetFS()->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape); m_pDMLexporter->GetFS()->startElementNS(XML_a, XML_avLst); return true; @@ -287,7 +285,7 @@ bool DMLPresetShapeExporter::WriteShapeWithAVlist() // types which do not have pairs in LO, they are do not have to be mapped, because import // filter it does with GrabBag, this method only maps the SDR ones to OOXML shapes. - OString sShapeType(msfilter::util::GetOOXMLPresetGeometry(GetShapeType().toUtf8().getStr())); + OString sShapeType(msfilter::util::GetOOXMLPresetGeometry(GetShapeType())); // OOXML uses 60th of degree, so 360 degree is 21 600 000 60thdeg const tools::Long nConstOfMaxDegreeOf60th = 21600000; diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index a061d1306f99..51bf3b528eaf 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -768,7 +768,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape ) EscherPropertyContainer::IsDefaultObject( rSdrObjCustomShape, eShapeType)); - const char* sPresetShape = msfilter::util::GetOOXMLPresetGeometry(sShapeType.toUtf8().getStr()); + const char* sPresetShape = msfilter::util::GetOOXMLPresetGeometry(sShapeType); SAL_INFO("oox.shape", "custom shape type: " << sShapeType << " ==> " << sPresetShape); sal_Int32 nAdjustmentValuesIndex = -1; |