sw/source/core/unocore/unostyle.cxx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
New commits: commit 7885d938cb425df7b759c0a42871870921394eb6 Author: Stephan Bergmann <sberg...@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. Change-Id: I9b0f24231774eef7231eff4b053fd56c020c6e69 (cherry picked from commit 7fb6ae28ae7bebd67c2b9bf2cf517f1f7bb2777e) Reviewed-on: https://gerrit.libreoffice.org/8003 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index a1bc926..8ab87c1 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1588,14 +1588,12 @@ struct SwStyleBase_Impl SfxItemSet* pItemSet; const OUString& rStyleName; - sal_uInt16 nPDescPos; SwStyleBase_Impl(SwDoc& rSwDoc, const OUString& rName) : rDoc(rSwDoc), pOldPageDesc(0), pItemSet(0), - rStyleName(rName), - nPDescPos(0xffff) + rStyleName(rName) {} ~SwStyleBase_Impl(){ delete pItemSet; } @@ -1624,7 +1622,6 @@ const SwPageDesc& SwStyleBase_Impl::GetOldPageDesc() if(rDesc.GetName() == rStyleName) { pOldPageDesc = & rDesc; - nPDescPos = i; break; } } @@ -1639,15 +1636,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;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits