Change in core[master]: Replaced deprecated tools/String with OUString in ScAddInCol

Gerrit gerrit at gerrit.libreoffice.org
Sun Jul 8 13:41:11 PDT 2012


>From Markus Mohrhard <markus.mohrhard at googlemail.com>:

Markus Mohrhard has posted comments on this change.

Change subject: Replaced deprecated tools/String with OUString in ScAddInCol
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(7 inline comments)

Sorry for more nitpicking. There are some more places that we should change to prevent unnecessary temporary objects.

....................................................
File sc/inc/addincol.hxx
Line 56: typedef ::boost::unordered_map< ::rtl::OUString, const ScUnoAddInFuncData*, ScStringHashCode, ::std::equal_to< ::rtl::OUString > > ScAddInHashMap;
We should use rtl::OUStringHash for rtl::OUString to prevent temporary copies.

std::equal_to< rtl::OUString > is the default parameter in this case so we can leave it out.

....................................................
File sc/source/core/tool/addincol.cxx
Line 892:                                     ::rtl::OUString aFuncName = aServiceName;
using rtl::OUStringBuffere here looks like a good idea

Line 1108:                         ::rtl::OUString aFuncName = rServiceName;
another place for OUStringBuffer

Line 1743:                                 xMatrix->PutString( ::rtl::OUString( pColArr[nCol] ),
no need for a temporary object in this case

....................................................
File sc/source/core/tool/compiler.cxx
Line 169:                 xMap->putExternalSoftly( String(aName), pFuncData->GetOriginalName());
no need for a temporary object in this case, will be automatically generated

Line 5245:                     aEntry.Name = String(aName);
no need for a temporary object in this case, just use aEntry.Name = aName;

....................................................
File sc/source/filter/excel/xeformula.cxx
Line 2346:         if( mxData->mpLinkMgr->InsertAddIn( nExtSheet, nExtName, String(aXclFuncName) ) )
No need for the temporary object in this case, will be generated automatically.

--
To view, visit https://gerrit.libreoffice.org/258
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7059f10617b9a33ba63690c980b96d95d9023c55
Gerrit-PatchSet: 2
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Sören Möller <soerenmoeller2001 at gmail.com>
Gerrit-Reviewer: Eike Rathke <erack at redhat.com>
Gerrit-Reviewer: Markus Mohrhard <markus.mohrhard at googlemail.com>
Gerrit-Reviewer: Sören Möller <soerenmoeller2001 at gmail.com>



More information about the LibreOffice mailing list