sd/source/core/stlsheet.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 0a6029ba428269e75b67c0861bd9bd1f804dfc79 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Oct 14 12:23:37 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Oct 17 09:29:28 2024 +0200 we don't need to copy the Name here, a reference is sufficient 48s -> 47.8s Change-Id: Ib95b701d424b0b92aa3848b75f81c41eff0af2ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175029 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index bf1598098a12..60ae6f2588b7 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -935,7 +935,7 @@ void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName ) if( !rParentName.isEmpty() ) { - OUString const name(GetName()); + OUString const& name(GetName()); sal_Int32 const sep(name.indexOf(SD_LT_SEPARATOR)); OUString const master((sep == -1) ? OUString() : name.copy(0, sep)); std::shared_ptr<SfxStyleSheetIterator> aSSSI = std::make_shared<SfxStyleSheetIterator>(mxPool.get(), nFamily); @@ -949,7 +949,7 @@ void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName ) if (pSdStyleSheet->msApiName != rParentName) continue; - OUString const curName(pStyle->GetName()); + OUString const& curName(pStyle->GetName()); sal_Int32 const curSep(curName.indexOf(SD_LT_SEPARATOR)); OUString const curMaster((curSep == -1) ? OUString() : curName.copy(0, curSep));
