Re: [Libreoffice-commits] .: 9 commits - boost/boost_1_44_0-logical-op-parentheses.patch boost/boost_1_44_0-unused-parameters.patch boost/makefile.mk cppcanvas/source framework/source sc/qa sc/source

2012-04-04 Thread Lubos Lunak
On Wednesday 04 of April 2012, Tor Lillqvist wrote:
 commit 2b00b0e0a1a47c3d174ee9e86826b60a356f3dbf
 Author: Tor Lillqvist t...@iki.fi
 Date:   Tue Apr 3 23:45:26 2012 +0300

 WaE: call to pure virtual member function

 diff --git a/framework/source/classes/menumanager.cxx
 b/framework/source/classes/menumanager.cxx index 4b0af60..202b7eb 100644
 --- a/framework/source/classes/menumanager.cxx
 +++ b/framework/source/classes/menumanager.cxx
 @@ -146,8 +146,14 @@ MenuManager::MenuManager(
  m_xFrame= rFrame;
  m_bInitialized  = sal_False;
  m_bIsBookmarkMenu   = sal_False;
 +#ifdef LIBO_WERROR
 +// Wtf? Clang says: call to pure virtual member function
 +// 'acquire'; overrides of 'acquire' in subclasses are not
 +// available in the constructor of 'XInterface'

 This is 
http://stackoverflow.com/questions/496440/c-virtual-function-from-constructor 
(or http://www.artima.com/cppsource/nevercall.html if you want it in more 
detail, although the 'never' is a bit far-fetched, it is well-defined what 
happens).

 +assert(!Call to pure virtual member function);
 +#else
  SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*,
 (OWeakObject*)this )-acquire(); -
 +#endif

 However this appears to a Clang bug, in that it reports an incorrect warning, 
probably it gets confused by the casts. I cannot actually trigger this code 
to run, but in my small testcase, code like this generated the warning, but 
worked normally. So I expect that whenever somebody actually reaches this 
code, this will assert needlessly.

 I'm not sure what the proper fix would be though, as the class apparently 
inherits from XInterface in 3 different ways, and I wonder what the point of 
the explicit casts is. I'll go with thinking the casts are pointless historic 
garbage and try plain call to acquire(), it shouldn't make it worse.

-- 
 Lubos Lunak
 l.lu...@suse.cz
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] .: 9 commits - boost/boost_1_44_0-logical-op-parentheses.patch boost/boost_1_44_0-unused-parameters.patch boost/makefile.mk cppcanvas/source framework/source sc/qa sc/source

2012-04-04 Thread Tor Lillqvist
  However this appears to a Clang bug, in that it reports an incorrect warning,
 probably it gets confused by the casts. I cannot actually trigger this code
 to run, but in my small testcase, code like this generated the warning, but
 worked normally. So I expect that whenever somebody actually reaches this
 code, this will assert needlessly.

OK. I was afraid of that (and secretly hoped the assert would be
triggered soon enough and thus force the issue to be investigated by
some expert). But even better that you investigated it voluntarily,
thanks a million!

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: 9 commits - boost/boost_1_44_0-logical-op-parentheses.patch boost/boost_1_44_0-unused-parameters.patch boost/makefile.mk cppcanvas/source framework/source sc/qa sc/source vcl/

2012-04-03 Thread Tor Lillqvist
 boost/boost_1_44_0-logical-op-parentheses.patch  |   12 +
 boost/boost_1_44_0-unused-parameters.patch   |   77 
 boost/makefile.mk|1 
 cppcanvas/source/mtfrenderer/bitmapaction.cxx|2 
 cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx |2 
 cppcanvas/source/mtfrenderer/polypolyaction.cxx  |6 
 cppcanvas/source/mtfrenderer/rendergraphicaction.cxx |2 
 framework/source/classes/menumanager.cxx |8 
 sc/qa/unit/helper/debughelper.hxx|3 
 sc/source/core/data/dpgroup.cxx  |9 
 sc/source/filter/oox/worksheetfragment.cxx   |   20 --
 vcl/inc/ios/salframeview.h   |5 
 vcl/ios/source/gdi/salcoretextfontutils.cxx  |  177 ---
 vcl/ios/source/gdi/salcoretextlayout.cxx |   26 ++
 vcl/ios/source/gdi/salnativewidgets.cxx  |   18 +
 vcl/ios/source/window/salframeview.mm|   16 +
 16 files changed, 168 insertions(+), 216 deletions(-)

New commits:
commit 86b99ab408c7235604a1a02d7bc531fe5d5f97f6
Author: Tor Lillqvist t...@iki.fi
Date:   Wed Apr 4 00:57:00 2012 +0300

Clang WaE: -Woverloaded-virtual weirdness, this seems to help

diff --git a/cppcanvas/source/mtfrenderer/bitmapaction.cxx 
b/cppcanvas/source/mtfrenderer/bitmapaction.cxx
index 2129ca5..39f240a 100644
--- a/cppcanvas/source/mtfrenderer/bitmapaction.cxx
+++ b/cppcanvas/source/mtfrenderer/bitmapaction.cxx
@@ -60,6 +60,8 @@ namespace cppcanvas
 class BitmapAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 BitmapAction( const ::BitmapEx,
   const ::basegfx::B2DPoint rDstPoint,
   const CanvasSharedPtr,
diff --git a/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx 
b/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx
index 8cef77f..4e72cae 100644
--- a/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx
+++ b/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx
@@ -79,11 +79,11 @@ namespace cppcanvas
 protected:
 using Action::render;
 
-private:
 virtual bool render( ::com::sun::star::uno::Reference
  
::com::sun::star::rendering::XCachedPrimitive  rCachedPrimitive,
  const ::basegfx::B2DHomMatrix
   rTransformation ) const = 0;
 
+private:
 CanvasSharedPtr 
mpCanvas;
 mutable ::com::sun::star::uno::Reference
 ::com::sun::star::rendering::XCachedPrimitive  
mxCachedPrimitive;
diff --git a/cppcanvas/source/mtfrenderer/polypolyaction.cxx 
b/cppcanvas/source/mtfrenderer/polypolyaction.cxx
index dcfe33c..2ff5316 100644
--- a/cppcanvas/source/mtfrenderer/polypolyaction.cxx
+++ b/cppcanvas/source/mtfrenderer/polypolyaction.cxx
@@ -61,6 +61,8 @@ namespace cppcanvas
 class PolyPolyAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 PolyPolyAction( const ::basegfx::B2DPolyPolygon,
 const CanvasSharedPtr,
 const OutDevState,
@@ -245,6 +247,8 @@ namespace cppcanvas
 class TexturedPolyPolyAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 TexturedPolyPolyAction( const ::basegfx::B2DPolyPolygon rPoly,
 const CanvasSharedPtr   
rCanvas,
 const OutDevState   
rState,
@@ -359,6 +363,8 @@ namespace cppcanvas
 class StrokedPolyPolyAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 StrokedPolyPolyAction( const ::basegfx::B2DPolyPolygon 
rPoly,
const CanvasSharedPtr   
rCanvas,
const OutDevState   
rState,
diff --git a/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx 
b/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx
index f5ce0ee..237f781 100644
--- a/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx
+++ b/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx
@@ -60,6 +60,8 @@ namespace cppcanvas
 class RenderGraphicAction : public CachedPrimitiveBase
 {
 public:
+using CachedPrimitiveBase::render;
+
 RenderGraphicAction( const ::vcl::RenderGraphic 
rRenderGraphic,
   const ::basegfx::B2DPoint rDstPoint,
   const ::basegfx::B2DVector