Kaydet (Commit) 6de84aea authored tarafından Matteo Casalin's avatar Matteo Casalin

Defer OUString computation and make some OUString const

Change-Id: I9aea8b4d33bc475c477318736cfba7c0bbce0bde
üst 673c8f2e
...@@ -412,18 +412,18 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, ...@@ -412,18 +412,18 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName,
const size_t nGroupCount = pGlossaryList->GetGroupCount(); const size_t nGroupCount = pGlossaryList->GetGroupCount();
for(size_t i = 0; i < nGroupCount; ++i) for(size_t i = 0; i < nGroupCount; ++i)
{ {
OUString sTitle = pGlossaryList->GetGroupTitle(i);
// get group name with path-extension // get group name with path-extension
OUString sGroupName = pGlossaryList->GetGroupName(i, false); const OUString sGroupName = pGlossaryList->GetGroupName(i, false);
if(sGroupName == pGlossary->GetName()) if(sGroupName == pGlossary->GetName())
continue; continue;
const sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i); const sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i);
if(nBlockCount) if(nBlockCount)
{ {
const OUString sTitle = pGlossaryList->GetGroupTitle(i);
for(sal_uInt16 j = 0; j < nBlockCount; j++) for(sal_uInt16 j = 0; j < nBlockCount; j++)
{ {
OUString sLongName(pGlossaryList->GetBlockLongName(i, j)); const OUString sLongName(pGlossaryList->GetBlockLongName(i, j));
OUString sShortName(pGlossaryList->GetBlockShortName(i, j)); const OUString sShortName(pGlossaryList->GetBlockShortName(i, j));
if( rSCmp.isEqual( rShortName, sShortName )) if( rSCmp.isEqual( rShortName, sShortName ))
{ {
TextBlockInfo_Impl* pData = new TextBlockInfo_Impl; TextBlockInfo_Impl* pData = new TextBlockInfo_Impl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment