include/oox/export/drawingml.hxx  |    4 ++--
 oox/source/export/chartexport.cxx |    4 ++--
 oox/source/export/drawingml.cxx   |   10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit f1ad6834e1c08ea59e85bfa8a1e47d81e2a92533
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Apr 11 11:39:21 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Apr 11 17:19:01 2023 +0200

    avoid some OString<->OUString back and forth conversion
    
    Change-Id: I20d2611ca88df7daca7c56e7475fb85f98fbf888
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150226
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 2a72225680fb..9179625bd6b7 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -380,8 +380,8 @@ public:
                                         const OUString& sFullStream,
                                         std::u16string_view sRelativeStream,
                                         const css::uno::Reference< 
css::io::XOutputStream >& xParentRelation,
-                                        const char* sContentType,
-                                        const char* sRelationshipType,
+                                        const OUString& sContentType,
+                                        const OUString& sRelationshipType,
                                         OUString* pRelationshipId );
 
 };
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index b60e84590ae9..e4031e6b2b0a 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -859,7 +859,7 @@ void ChartExport::WriteChartObj( const Reference< XShape >& 
xShape, sal_Int32 nI
             sRelativeStream,
             pFS->getOutputStream(),
             
"application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
-            OUStringToOString(oox::getRelationship(Relationship::CHART), 
RTL_TEXTENCODING_UTF8).getStr(),
+            oox::getRelationship(Relationship::CHART),
             &sId );
 
     XmlFilterBase* pFB = GetFB();
@@ -1081,7 +1081,7 @@ void ChartExport::exportAdditionalShapes( const 
Reference< css::chart::XChartDoc
                 sRelativeStream,
                 GetFS()->getOutputStream(),
                 
"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml",
-                
OUStringToOString(oox::getRelationship(Relationship::CHARTUSERSHAPES), 
RTL_TEXTENCODING_UTF8).getStr(),
+                oox::getRelationship(Relationship::CHARTUSERSHAPES),
                 &sId);
 
             GetFS()->singleElementNS(XML_c, XML_userShapes, FSNS(XML_r, 
XML_id), sId);
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 3700d93f78fc..5560a41bf86a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -5129,20 +5129,20 @@ sax_fastparser::FSHelperPtr 
DrawingML::CreateOutputStream (
     const OUString& sFullStream,
     std::u16string_view sRelativeStream,
     const Reference< XOutputStream >& xParentRelation,
-    const char* sContentType,
-    const char* sRelationshipType,
+    const OUString& sContentType,
+    const OUString& sRelationshipType,
     OUString* pRelationshipId )
 {
     OUString sRelationshipId;
     if (xParentRelation.is())
-        sRelationshipId = GetFB()->addRelation( xParentRelation, 
OUString::createFromAscii( sRelationshipType), sRelativeStream );
+        sRelationshipId = GetFB()->addRelation( xParentRelation, 
sRelationshipType, sRelativeStream );
     else
-        sRelationshipId = GetFB()->addRelation( OUString::createFromAscii( 
sRelationshipType ), sRelativeStream );
+        sRelationshipId = GetFB()->addRelation( sRelationshipType, 
sRelativeStream );
 
     if( pRelationshipId )
         *pRelationshipId = sRelationshipId;
 
-    sax_fastparser::FSHelperPtr p = GetFB()->openFragmentStreamWithSerializer( 
sFullStream, OUString::createFromAscii( sContentType ) );
+    sax_fastparser::FSHelperPtr p = GetFB()->openFragmentStreamWithSerializer( 
sFullStream, sContentType );
 
     return p;
 }

Reply via email to