diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-07-23 21:30:21 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-07-26 14:25:26 +0200 |
commit | 673c8f2eae06e906ce8b6d1d634e72d22b44ea17 (patch) | |
tree | 7bfdc218985519a7ce4b475cf6488b775031c920 /sw/source/uibase/dochdl/gloshdl.cxx | |
parent | 5592ac29309e954d32a55ab3f6e54ff5ef2e9cf6 (diff) |
Avoid unnecessary offset
Change-Id: Id46ddd3990ecd6177614cf54fb5307ec457cfbe8
Diffstat (limited to 'sw/source/uibase/dochdl/gloshdl.cxx')
-rw-r--r-- | sw/source/uibase/dochdl/gloshdl.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 9509fe3a35bb..23aea788cd02 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -410,20 +410,20 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); SwGlossaryList* pGlossaryList = ::GetGlossaryList(); const size_t nGroupCount = pGlossaryList->GetGroupCount(); - for(size_t i = 1; i <= nGroupCount; ++i) + for(size_t i = 0; i < nGroupCount; ++i) { - OUString sTitle = pGlossaryList->GetGroupTitle(i - 1); + OUString sTitle = pGlossaryList->GetGroupTitle(i); // get group name with path-extension - OUString sGroupName = pGlossaryList->GetGroupName(i - 1, false); + OUString sGroupName = pGlossaryList->GetGroupName(i, false); if(sGroupName == pGlossary->GetName()) continue; - const sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1); + const sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i); if(nBlockCount) { for(sal_uInt16 j = 0; j < nBlockCount; j++) { - OUString sLongName(pGlossaryList->GetBlockLongName(i - 1, j)); - OUString sShortName(pGlossaryList->GetBlockShortName(i - 1, j)); + OUString sLongName(pGlossaryList->GetBlockLongName(i, j)); + OUString sShortName(pGlossaryList->GetBlockShortName(i, j)); if( rSCmp.isEqual( rShortName, sShortName )) { TextBlockInfo_Impl* pData = new TextBlockInfo_Impl; |