Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello,

Cppchecks reports this :
core/sd/source/ui/view/outlview.cxx
1623    duplicateExpression     style   Same expression on both sides of '&&'.

Here are the lines :
   1622             case tools::EventMultiplexerEvent::EID_PAGE_ORDER:
   1623                 if (mpOutliner != NULL && mpDoc!=NULL && mpOutliner
!= NULL && dynamic_cast<Outliner*> ( mpOutliner
)->GetIgnoreCurrentPageChangesLevel()==0)
   1624                 {
   1625                     if (((mpDoc->GetPageCount()-1)%2) == 0)
   1626                     {
   1627                         mpOutliner->Clear();
   1628                         FillOutliner();
   1629                         ::sd::Window* pWindow =
mpOutlineViewShell->GetActiveWindow();
   1630                         if (pWindow != NULL)
   1631                             pWindow->Invalidate();
   1632                     }
   1633                 }
   1634                 break;

The commit is 6f1330b374d9b79acf986bdc779586b4faa36846 (27/06/2007)
and here's the change :
-                if (mpOutliner != NULL && mpDoc!=NULL &&
mnIgnoreCurrentPageChangesLevel==0)
+                if (mpOutliner != NULL && mpDoc!=NULL && mpOutliner != NULL
&& dynamic_cast<Outliner*> ( mpOutliner
)->GetIgnoreCurrentPageChangesLevel()==0)
                 {

So either the duplicated part (obviously "mpOutliner != NULL") could be
simply removed
or perhaps the author thought about this  :
 mpOutlineViewShell != NULL

Any idea ?

Julien.

--
View this message in context: 
http://nabble.documentfoundation.org/Duplicate-expression-in-sd-source-ui-view-outlview-cxx-tp3695400p3695400.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.