To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=110408
                 Issue #|110408
                 Summary|sw: dubious use of static_cast
               Component|Word processor
                 Version|DEV300m75
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|mst
             Reported by|dtardon





------- Additional comments from [email protected] Fri Mar 26 09:35:38 
+0000 2010 -------
The following construct is used twice in implementation of 
SwXFlatParagraphIterator:

text::XFlatParagraph* pFP = xPara.get();
SwXFlatParagraph* pFlatParagraph = static_cast<SwXFlatParagraph*>(pFP);

if ( !pFlatParagraph )
    return xRet;

If the xPara impl. is ensured to be SwXFlatParagraph, then the static_cast is
all right, but the test is pointless, as static_cast will always return a
non-null pointer.

If it's not, then static_cast may return nonsense. I think css::lang::XUnoTunnel
should be used in this case, like the following patch does.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to