summaryrefslogtreecommitdiff
path: root/embeddedobj/Makefile
blob: 0997e628485b15db1ce05c94758f56e1174fb221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))

include $(module_directory)/../solenv/gbuild/partial_build.mk

# vim: set noet sw=4 ts=4:
summary='commit info' class='commit-info'> authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-14 14:27:57 +0200 committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-15 14:33:57 +0200 commitf13c6ad5f020a196a0e3aa6f28bda3dc185d465b (patch) treef9aaab122974d36c134fb1723ec3c1c8df51eeef /pyuno parent9270f74466d0eb841babaa24997f608631c70341 (diff)
new loplugin:bufferadd
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno.cxx42
-rw-r--r--pyuno/source/module/pyuno_except.cxx10
-rw-r--r--pyuno/source/module/pyuno_module.cxx110
-rw-r--r--pyuno/source/module/pyuno_struct.cxx4
-rw-r--r--pyuno/source/module/pyuno_type.cxx4
-rw-r--r--pyuno/source/module/pyuno_util.cxx12
6 files changed, 74 insertions, 108 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index d9c9dacbb3fd..d554f5ca769c 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -93,16 +93,14 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
return "void";
OUStringBuffer buf( 64 );
- buf.append( '(' );
- buf.append( pTypeRef->pTypeName );
- buf.append( ')' );
+ buf.append( "(" + OUString::unacquired(&pTypeRef->pTypeName) + ")" );
switch (pTypeRef->eTypeClass)
{
case typelib_TypeClass_INTERFACE:
{
- buf.append( "0x" );
- buf.append( reinterpret_cast< sal_IntPtr >(*static_cast<void * const *>(pVal)), 16 );
+ buf.append( "0x" +
+ OUString::number( reinterpret_cast< sal_IntPtr >(*static_cast<void * const *>(pVal)), 16 ));
if( VAL2STR_MODE_DEEP == mode )
{
buf.append( "{" ); Reference< XInterface > r = *static_cast<Reference< XInterface > const *>(pVal);
@@ -164,8 +162,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
for ( sal_Int32 nPos = 0; nPos < nDescr; ++nPos )
{
- buf.append( ppMemberNames[nPos] );
- buf.append( " = " );
+ buf.append( OUString::unacquired(&ppMemberNames[nPos]) + " = " );
typelib_TypeDescription * pMemberType = nullptr;
TYPELIB_DANGER_GET( &pMemberType, ppTypeRefs[nPos] );
buf.append( val2str( static_cast<char const *>(pVal) + pMemberOffsets[nPos], pMemberType->pWeakRef, mode ) );
@@ -222,9 +219,9 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
buf.append( (*static_cast<typelib_TypeDescriptionReference * const *>(pVal))->pTypeName );
break;
case typelib_TypeClass_STRING:
- buf.append( '\"' );
- buf.append( *static_cast<rtl_uString * const *>(pVal) );
- buf.append( '\"' );
+ buf.append( "\"" +
+ OUString::unacquired(&*static_cast<rtl_uString * const *>(pVal)) +
+ "\"" );
break;
case typelib_TypeClass_ENUM:
{
@@ -264,24 +261,24 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
buf.append( *static_cast<double const *>(pVal) );
break;
case typelib_TypeClass_BYTE:
- buf.append( "0x" );
- buf.append( static_cast<sal_Int32>(*static_cast<sal_Int8 const *>(pVal)), 16 );
+ buf.append( "0x" +
+ OUString::number( static_cast<sal_Int32>(*static_cast<sal_Int8 const *>(pVal)), 16 ));
break;
case typelib_TypeClass_SHORT:
- buf.append( "0x" );
- buf.append( static_cast<sal_Int32>(*static_cast<sal_Int16 const *>(pVal)), 16 );