[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sw/source
Stephan Bergmann
sbergman at redhat.com
Wed Feb 12 02:55:55 PST 2014
sw/source/core/unocore/unostyle.cxx | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
New commits:
commit 3e17c731cbe11c79c3283ffefecf4401bd8cb08e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Feb 11 16:31:47 2014 +0100
nPDescPos is never read
...since b48f4e99e1d2935f84bc2fac1e6670dd83939673 "#86296# use page descriptor
only if necessary", and this nicely removes the odd
for(i = 0; i < nPDescCount + 1; i++)
loop that read past the end of the maPageDescs vector.
(cherry picked from commit 7fb6ae28ae7bebd67c2b9bf2cf517f1f7bb2777e)
Conflicts:
sw/source/core/unocore/unostyle.cxx
Change-Id: I9b0f24231774eef7231eff4b053fd56c020c6e69
Reviewed-on: https://gerrit.libreoffice.org/8007
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 0e090be..1631a49 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1589,14 +1589,12 @@ struct SwStyleBase_Impl
SfxItemSet* pItemSet;
const String& rStyleName;
- sal_uInt16 nPDescPos;
SwStyleBase_Impl(SwDoc& rSwDoc, const String& rName) :
rDoc(rSwDoc),
pOldPageDesc(0),
pItemSet(0),
- rStyleName(rName),
- nPDescPos(0xffff)
+ rStyleName(rName)
{}
~SwStyleBase_Impl(){ delete pItemSet; }
@@ -1625,7 +1623,6 @@ const SwPageDesc& SwStyleBase_Impl::GetOldPageDesc()
if(rDesc.GetName() == rStyleName)
{
pOldPageDesc = & rDesc;
- nPDescPos = i;
break;
}
}
@@ -1640,15 +1637,6 @@ const SwPageDesc& SwStyleBase_Impl::GetOldPageDesc()
break;
}
}
- for(i = 0; i < nPDescCount + 1; i++)
- {
- const SwPageDesc& rDesc = rDoc.GetPageDesc( i );
- if(rDesc.GetName() == rStyleName)
- {
- nPDescPos = i;
- break;
- }
- }
}
}
return *pOldPageDesc;
More information about the Libreoffice-commits
mailing list