diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-11 16:31:47 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-12 08:07:47 +0100 |
commit | 7fb6ae28ae7bebd67c2b9bf2cf517f1f7bb2777e (patch) | |
tree | 5f77555d87931ff5ad91674804b7cac9061ae9db | |
parent | fa2045807a5dce837bf9392528fcf88ceccd356f (diff) |
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
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index b483d617865e..d92b6aaad9be 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; |