clang-tidy: performance-unnecessary-copy-initialization in basctl
Change-Id: Icc609ffded11c78c7052356a0ecc8b138a11f13e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
842c32c33c
commit
f59d4e4e3e
3 changed files with 10 additions and 12 deletions
|
@ -801,10 +801,10 @@ bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const
|
||||||
Sequence< OUString > aPaths = xFP->getSelectedFiles();
|
Sequence< OUString > aPaths = xFP->getSelectedFiles();
|
||||||
|
|
||||||
OUString aBasePath;
|
OUString aBasePath;
|
||||||
OUString aOUCurPath( aPaths[0] );
|
const OUString& rOUCurPath( aPaths[0] );
|
||||||
sal_Int32 iSlash = aOUCurPath.lastIndexOf( '/' );
|
sal_Int32 iSlash = rOUCurPath.lastIndexOf( '/' );
|
||||||
if( iSlash != -1 )
|
if( iSlash != -1 )
|
||||||
aBasePath = aOUCurPath.copy( 0, iSlash + 1 );
|
aBasePath = rOUCurPath.copy( 0, iSlash + 1 );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -816,8 +816,8 @@ bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const
|
||||||
Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(xContext) );
|
Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(xContext) );
|
||||||
|
|
||||||
Reference< XInputStream > xInput;
|
Reference< XInputStream > xInput;
|
||||||
if( xSFI->exists( aOUCurPath ) )
|
if( xSFI->exists( rOUCurPath ) )
|
||||||
xInput = xSFI->openFileRead( aOUCurPath );
|
xInput = xSFI->openFileRead( rOUCurPath );
|
||||||
|
|
||||||
::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
|
::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ IMPL_STATIC_LINK(ExtraData, GlobalBasicBreakHdl, StarBASIC *, pBasic, BasicDebug
|
||||||
OSL_ENSURE( aDocument.isValid(), "basctl::ExtraData::GlobalBasicBreakHdl: no document for the basic manager!" );
|
OSL_ENSURE( aDocument.isValid(), "basctl::ExtraData::GlobalBasicBreakHdl: no document for the basic manager!" );
|
||||||
if ( aDocument.isValid() )
|
if ( aDocument.isValid() )
|
||||||
{
|
{
|
||||||
OUString aOULibName( pBasic->GetName() );
|
const OUString& aOULibName( pBasic->GetName() );
|
||||||
Reference< script::XLibraryContainer > xModLibContainer = aDocument.getLibraryContainer( E_SCRIPTS );
|
Reference< script::XLibraryContainer > xModLibContainer = aDocument.getLibraryContainer( E_SCRIPTS );
|
||||||
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
|
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -387,7 +387,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
|
||||||
sal_Int32 i;
|
sal_Int32 i;
|
||||||
for ( i = 0; i < nPropStringCount; ++i )
|
for ( i = 0; i < nPropStringCount; ++i )
|
||||||
{
|
{
|
||||||
OUString aPropStr = aPropStrings[i];
|
const OUString& aPropStr = aPropStrings[i];
|
||||||
bool bEscAlreadyExisting = aPropStr.startsWith("&");
|
bool bEscAlreadyExisting = aPropStr.startsWith("&");
|
||||||
if( bEscAlreadyExisting )
|
if( bEscAlreadyExisting )
|
||||||
{
|
{
|
||||||
|
@ -417,7 +417,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
|
||||||
|
|
||||||
for (sal_Int32 i = 0; i < nPropStringCount; ++i)
|
for (sal_Int32 i = 0; i < nPropStringCount; ++i)
|
||||||
{
|
{
|
||||||
OUString aIdStr = aPropStrings[i];
|
const OUString& aIdStr = aPropStrings[i];
|
||||||
OUString aNewPropStr = aIdStr;
|
OUString aNewPropStr = aIdStr;
|
||||||
if( aIdStr.getLength() > 1 )
|
if( aIdStr.getLength() > 1 )
|
||||||
{
|
{
|
||||||
|
@ -469,8 +469,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
|
||||||
|
|
||||||
for (sal_Int32 i = 0; i < nPropStringCount; ++i)
|
for (sal_Int32 i = 0; i < nPropStringCount; ++i)
|
||||||
{
|
{
|
||||||
OUString aSourceIdStr = aPropStrings[i];
|
OUString aPureSourceIdStr = aPropStrings[i].copy( 1 );
|
||||||
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
|
|
||||||
|
|
||||||
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
|
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
|
||||||
OUString aPureIdStr = OUString::number( nUniqueId )
|
OUString aPureIdStr = OUString::number( nUniqueId )
|
||||||
|
@ -509,8 +508,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
|
||||||
|
|
||||||
for (sal_Int32 i = 0; i < nPropStringCount; ++i)
|
for (sal_Int32 i = 0; i < nPropStringCount; ++i)
|
||||||
{
|
{
|
||||||
OUString aSourceIdStr = aPropStrings[i];
|
OUString aPureSourceIdStr = aPropStrings[i].copy( 1 );
|
||||||
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
|
|
||||||
|
|
||||||
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
|
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
|
||||||
OUString aPureIdStr = OUString::number( nUniqueId )
|
OUString aPureIdStr = OUString::number( nUniqueId )
|
||||||
|
|
Loading…
Reference in a new issue