[Libreoffice-commits] .: 2 commits - sw/source vcl/unx

Stephan Bergmann sbergmann at kemper.freedesktop.org
Wed Oct 26 07:22:23 PDT 2011


 sw/source/core/unocore/unobkm.cxx |    1 +
 vcl/unx/generic/app/saldata.cxx   |    6 +-----
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 267aa59dfe918f97c32b0ba8f9a54b548c89b4c9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Oct 26 16:21:28 2011 +0200

    Reverted GetX11SalData to always use dynamic_cast.

diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 93d5ea6..8eb6602 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -94,14 +94,10 @@
 X11SalData* GetX11SalData()
 {
     SalData * p1 = ImplGetSVData()->mpSalData;
-
-#if OSL_DEBUG_LEVEL > 0
+    OSL_ASSERT(p1 != 0);
     X11SalData * p2 = dynamic_cast< X11SalData * >(p1);
     OSL_ASSERT(p2 != 0);
     return p2;
-#else
-    return (X11SalData *) p1;
-#endif
 }
 
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
commit 3afa389d61f6d06ecefe59f201465783bda4b969
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Oct 26 16:20:04 2011 +0200

    Added clarifying comment.

diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index 45b22f7..fa23374 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -689,6 +689,7 @@ SwXFieldmark::getCheckboxFieldmark()
         // evil #TODO #FIXME casting away the const-ness
         pCheckboxFm = const_cast<sw::mark::ICheckboxFieldmark*>(dynamic_cast< const ::sw::mark::ICheckboxFieldmark* >( GetBookmark()));
         OSL_ASSERT( GetBookmark() == 0 || pCheckboxFm != 0 );
+            // unclear to me whether GetBookmark() can be null here
     }
     return  pCheckboxFm;
 


More information about the Libreoffice-commits mailing list