ucb/source/ucp/cmis/cmis_content.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit be9919f4719aee2154fe2cbaef70b3537e49fe8b
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Apr 3 14:15:59 2023 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Apr 3 16:50:24 2023 +0200

    Optimize a bit
    
    Change-Id: I5a2c37e4ff1e19cfbc29e1e61b025f44d067b95a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149893
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 0bd38ea31f65..a9781c233054 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -67,8 +67,8 @@
 #include "std_inputstream.hxx"
 #include "std_outputstream.hxx"
 
-#define OUSTR_TO_STDSTR(s) std::string( OUStringToOString( s, 
RTL_TEXTENCODING_UTF8 ).getStr() )
-#define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), 
RTL_TEXTENCODING_UTF8 )
+#define OUSTR_TO_STDSTR(s) std::string( OUStringToOString( s, 
RTL_TEXTENCODING_UTF8 ) )
+#define STD_TO_OUSTR( str ) OStringToOUString( str, RTL_TEXTENCODING_UTF8 )
 
 using namespace com::sun::star;
 
@@ -191,7 +191,7 @@ namespace
             uno::Sequence< sal_Bool > seqValue;
             value >>= seqValue;
             std::transform(std::cbegin(seqValue), std::cend(seqValue), 
std::back_inserter(values),
-                [](const bool nValue) -> std::string { return OUSTR_TO_STDSTR( 
OUString::boolean( nValue ) ); });
+                [](const bool nValue) -> std::string { return std::string( 
OString::boolean( nValue ) ); });
             type = libcmis::PropertyType::Bool;
         }
         else if ( prop.Type == CMIS_TYPE_INTEGER )
@@ -199,7 +199,7 @@ namespace
             uno::Sequence< sal_Int64 > seqValue;
             value >>= seqValue;
             std::transform(std::cbegin(seqValue), std::cend(seqValue), 
std::back_inserter(values),
-                [](const sal_Int64 nValue) -> std::string { return 
OUSTR_TO_STDSTR( OUString::number( nValue ) ); });
+                [](const sal_Int64 nValue) -> std::string { return 
std::string( OString::number( nValue ) ); });
             type = libcmis::PropertyType::Integer;
         }
         else if ( prop.Type == CMIS_TYPE_DECIMAL )
@@ -207,7 +207,7 @@ namespace
             uno::Sequence< double > seqValue;
             value >>= seqValue;
             std::transform(std::cbegin(seqValue), std::cend(seqValue), 
std::back_inserter(values),
-                [](const double fValue) -> std::string { return 
OUSTR_TO_STDSTR( OUString::number( fValue ) ); });
+                [](const double fValue) -> std::string { return std::string( 
OString::number( fValue ) ); });
             type = libcmis::PropertyType::Decimal;
         }
         else if ( prop.Type == CMIS_TYPE_DATETIME )

Reply via email to