[Libreoffice-commits] .: 11 commits - sw/source vcl/inc vcl/ios writerfilter/source

Tor Lillqvist tml at kemper.freedesktop.org
Thu Mar 1 06:10:24 PST 2012


 sw/source/core/doc/tblrwcl.cxx                      |    2 +-
 sw/source/core/frmedt/fefly1.cxx                    |    2 +-
 sw/source/filter/ww8/ww8par3.cxx                    |    2 +-
 sw/source/ui/app/appopt.cxx                         |    2 +-
 vcl/inc/aqua/saldata.hxx                            |    4 ++--
 vcl/inc/aqua/salgdi.h                               |    2 +-
 vcl/inc/ios/iosvcltypes.h                           |    2 +-
 vcl/inc/ios/saldata.hxx                             |    4 ++--
 vcl/inc/ios/salgdi.h                                |    2 +-
 vcl/inc/ios/salprn.h                                |   12 ++++++------
 vcl/ios/source/gdi/salbmp.cxx                       |    1 +
 vcl/ios/source/window/salframe.cxx                  |    4 ++--
 writerfilter/source/doctok/WW8BinTableImpl.hxx      |    4 ++++
 writerfilter/source/doctok/WW8ResourceModelImpl.cxx |    2 ++
 writerfilter/source/resourcemodel/resourcemodel.cxx |    2 ++
 15 files changed, 28 insertions(+), 19 deletions(-)

New commits:
commit 51216852e0431d679d2bcfb428f2a2dd32fda3b0
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 10:22:17 2012 +0200

    WaE: use of logical '||' with constant operand
    
    Until now the code has by accident added a property with the attribute
    MAYBEVOID (which is that one which has the value 1), while the
    intention obviously was to use BOUND|REMOVABLE. Whether this has
    caused unintended consequences, or been harmless, and whether this fix
    now then will cause unintended consequences, no idea.

diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 5934524..3ac1645 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2466,7 +2466,7 @@ static void lcl_AddToPropertyContainer
         uno::Any aAny(C2U(""));
         xPropContainer->addProperty
             (rPropertyName,
-             static_cast<sal_Int16>(beans::PropertyAttribute::BOUND ||
+             static_cast<sal_Int16>(beans::PropertyAttribute::BOUND |
                                     beans::PropertyAttribute::REMOVABLE),
              aAny);
     }
commit f9883185a4acedfb074eba4ee0269e919c74c767
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 09:46:27 2012 +0200

    WaE: equality comparison with extraneous parentheses

diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index 76d33a3..3ffb065 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -258,7 +258,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
     {
         // the text dialog mustn't apply data to the web view and vice versa
         sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
-        if( (bWebView == bTextDialog))
+        if(bWebView == bTextDialog)
             pAppView = 0;
     }
 
commit baf0ba0798ef395880895d7ec1069c88e812613b
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 09:45:18 2012 +0200

    WaE: expression result unused

diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 4cce3c6..fbcccbd 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1943,7 +1943,7 @@ void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt,
     /* potential successors resp. predecessors */
     ::std::vector< const SwFrmFmt * > aTmpSpzArray;
 
-    (SwFrmFmt *) pDoc->FindFlyByName(rReference);
+    pDoc->FindFlyByName(rReference);
 
     for (sal_uInt16 n = 0; n < nCnt; n++)
     {
commit 2c3ad171e94d3b96cbab4e51bea2051f9fc40ca8
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 09:37:50 2012 +0200

    Fix what seems to be a copy/paste error: initialising a field with itself

diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 39397ae..197cb65 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -135,7 +135,7 @@ struct CR_SetBoxWidth
         nDiff( rCpy.nDiff ), nSide( rCpy.nSide ),
         nMaxSize( rCpy.nMaxSize ), nLowerDiff( 0 ),
         nMode( rCpy.nMode ), nTblWidth( rCpy.nTblWidth ),
-        nRemainWidth( rCpy.nRemainWidth ), nBoxWidth( nBoxWidth ),
+        nRemainWidth( rCpy.nRemainWidth ), nBoxWidth( rCpy.nBoxWidth ),
         bBigger( rCpy.bBigger ), bLeft( rCpy.bLeft ),
         bSplittBox( rCpy.bSplittBox ), bAnyBoxFnd( rCpy.bAnyBoxFnd )
     {
commit 3a08fd3b376506777169e21e21f3fce134af9def
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 09:33:23 2012 +0200

    WaE: unused variable

diff --git a/vcl/ios/source/window/salframe.cxx b/vcl/ios/source/window/salframe.cxx
index 0665fc9..ef0e680 100644
--- a/vcl/ios/source/window/salframe.cxx
+++ b/vcl/ios/source/window/salframe.cxx
@@ -502,8 +502,8 @@ sal_Bool IosSalFrame::GetWindowState( SalFrameState* pState )
                      SAL_FRAMESTATE_MASK_HEIGHT            |
                      SAL_FRAMESTATE_MASK_STATE;
 
-    CGRect aStateRect = [mpWindow frame];
 #if 0 // ???
+    CGRect aStateRect = [mpWindow frame];
     aStateRect = [UIWindow contentRectForFrameRect: aStateRect styleMask: mnStyleMask];
     CocoaTouchToVCL( aStateRect );
     pState->mnX         = long(aStateRect.origin.x);
@@ -805,8 +805,8 @@ void IosSalFrame::SetPosSize(long /*nX*/, long /*nY*/, long /*nWidth*/, long /*n
         nEvent = (nEvent == SALEVENT_MOVE) ? SALEVENT_MOVERESIZE : SALEVENT_RESIZE;
     }
 
-    CGRect aFrameRect = [mpWindow frame];
 #if 0 // ???
+    CGRect aFrameRect = [mpWindow frame];
     CGRect aContentRect = [NSWindow contentRectForFrameRect: aFrameRect styleMask: mnStyleMask];
 
     // position is always relative to parent frame
commit 8c99b935dbe8606e7c37bf7339c1fa906263db9a
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 09:31:45 2012 +0200

    WaE: is abstract but has non-virtual destructor

diff --git a/vcl/ios/source/gdi/salbmp.cxx b/vcl/ios/source/gdi/salbmp.cxx
index 5a7b145..55067d7 100644
--- a/vcl/ios/source/gdi/salbmp.cxx
+++ b/vcl/ios/source/gdi/salbmp.cxx
@@ -292,6 +292,7 @@ class ImplPixelFormat
 protected:
     sal_uInt8* pData;
 public:
+    virtual ~ImplPixelFormat() { }
     static ImplPixelFormat* GetFormat( sal_uInt16 nBits, const BitmapPalette& rPalette );
 
     virtual void StartLine( sal_uInt8* pLine ) { pData = pLine; }
commit fa4a1717b389dc565b4ee2e17a7d603ee6b4f1f5
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 09:24:04 2012 +0200

    String types have changed in base class

diff --git a/vcl/inc/ios/salprn.h b/vcl/inc/ios/salprn.h
index 869c2c3..51e4fba 100644
--- a/vcl/inc/ios/salprn.h
+++ b/vcl/inc/ios/salprn.h
@@ -135,17 +135,17 @@ class IosSalPrinter : public SalPrinter
     IosSalPrinter( IosSalInfoPrinter* i_pInfoPrinter );
     virtual ~IosSalPrinter();
 
-    virtual sal_Bool                    StartJob( const XubString* i_pFileName,
-                                              const XubString& i_rJobName,
-                                              const XubString& i_rAppName,
+    virtual sal_Bool                    StartJob( const rtl::OUString* pFileName,
+                                              const rtl::OUString& rJobName,
+                                              const rtl::OUString& rAppName,
                                               sal_uLong i_nCopies,
                                               bool i_bCollate,
                                               bool i_bDirect,
                                               ImplJobSetup* i_pSetupData );
     // implement pull model print system
-    virtual sal_Bool                    StartJob( const String* i_pFileName,
-                                              const String& rJobName,
-                                              const String& i_rAppName,
+    virtual sal_Bool                    StartJob( const const rtl::OUString* pFileName,
+                                              const rtl::OUString& rJobName,
+                                              const rtl::OUString& rAppName,
                                               ImplJobSetup* i_pSetupData,
                                               vcl::PrinterController& i_rListener );
 
commit 63f9ca85665baeeb3db9afbadced80fae7dcf186
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 08:36:11 2012 +0200

    WaE: class 'CGRect' was previously declared [in SDK headers] as a struct

diff --git a/vcl/inc/aqua/salgdi.h b/vcl/inc/aqua/salgdi.h
index 50c4ca1..271b63e 100644
--- a/vcl/inc/aqua/salgdi.h
+++ b/vcl/inc/aqua/salgdi.h
@@ -47,7 +47,7 @@ class AquaSalFrame;
 class AquaSalBitmap;
 class ImplDevFontAttributes;
 
-class CGRect;
+struct CGRect;
 
 // mac specific physically available font face
 class ImplMacFontData : public ImplFontData
diff --git a/vcl/inc/ios/salgdi.h b/vcl/inc/ios/salgdi.h
index 92cf620..576a8df 100644
--- a/vcl/inc/ios/salgdi.h
+++ b/vcl/inc/ios/salgdi.h
@@ -43,7 +43,7 @@ class IosSalFrame;
 class IosSalBitmap;
 class ImplDevFontAttributes;
 
-class CGRect;
+struct CGRect;
 
 // mac specific physically available font face
 class ImplIosFontData : public ImplFontData
commit cb1f5749c6e2512b8e42e40b62b0801a2f283d12
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 08:21:52 2012 +0200

    WaE: 'SalData' defined as a struct here but previously declared as a class

diff --git a/vcl/inc/aqua/saldata.hxx b/vcl/inc/aqua/saldata.hxx
index 5b75b92..7339d5c 100644
--- a/vcl/inc/aqua/saldata.hxx
+++ b/vcl/inc/aqua/saldata.hxx
@@ -79,9 +79,9 @@ struct FrameHash : public boost::hash<sal_IntPtr>
 
 #define INVALID_CURSOR_PTR (NSCursor*)0xdeadbeef
 
-struct SalData
+class SalData
 {
-
+public:
     SALTIMERPROC                                  mpTimerProc;      // timer callback proc
     AquaSalInstance                              *mpFirstInstance;  // pointer of first instance
     std::list<AquaSalFrame*>                      maFrames;         // list of all frames
diff --git a/vcl/inc/ios/saldata.hxx b/vcl/inc/ios/saldata.hxx
index 73a7081..a15d4e8 100644
--- a/vcl/inc/ios/saldata.hxx
+++ b/vcl/inc/ios/saldata.hxx
@@ -75,9 +75,9 @@ struct FrameHash : public boost::hash<sal_IntPtr>
     { return boost::hash<sal_IntPtr>::operator()( reinterpret_cast<const sal_IntPtr>(frame) ); }
 };
 
-struct SalData
+class SalData
 {
-
+public:
     SALTIMERPROC                                 mpTimerProc;       // timer callback proc
     IosSalInstance                              *mpFirstInstance;   // pointer of first instance
     std::list<IosSalFrame*>                      maFrames;          // pointer of first frame
commit 8ffef2fbae86fb509dd019b06565c91776e95378
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 08:19:01 2012 +0200

    WaE: extra tokens at end of #endif directive

diff --git a/vcl/inc/ios/iosvcltypes.h b/vcl/inc/ios/iosvcltypes.h
index d0ef03b..98d1227 100644
--- a/vcl/inc/ios/iosvcltypes.h
+++ b/vcl/inc/ios/iosvcltypes.h
@@ -33,6 +33,6 @@
 #import <UIKit/UIKit.h>
 #include "postmac.h"
 
-#endif _IOSVCLTYPES_H
+#endif /* _IOSVCLTYPES_H */
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 944abe0d9fc0f28d99024f6b1850208048ca3004
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 08:15:35 2012 +0200

    WaE: non-virtual destructor

diff --git a/writerfilter/source/doctok/WW8BinTableImpl.hxx b/writerfilter/source/doctok/WW8BinTableImpl.hxx
index fb9b710..5fdfd0c 100644
--- a/writerfilter/source/doctok/WW8BinTableImpl.hxx
+++ b/writerfilter/source/doctok/WW8BinTableImpl.hxx
@@ -61,6 +61,10 @@ public:
     {
     }
 
+    virtual ~PageNumber()
+    {
+    }
+
     /// Return the page number
     sal_uInt32 get() const { return mnPageNumber; }
 
diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
index cb3df83..9c33f52 100644
--- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
+++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
@@ -48,6 +48,8 @@ class WW8TableDataHandler : public TableDataHandler<string,
                             TablePropsPointer_t>
 {
 public:
+    virtual ~WW8TableDataHandler() {}
+
     typedef boost::shared_ptr<WW8TableDataHandler> Pointer_t;
     virtual void startTable(unsigned int nRows, unsigned int nDepth,
                             TablePropsPointer_t pProps);
diff --git a/writerfilter/source/resourcemodel/resourcemodel.cxx b/writerfilter/source/resourcemodel/resourcemodel.cxx
index 727296b..765806e 100644
--- a/writerfilter/source/resourcemodel/resourcemodel.cxx
+++ b/writerfilter/source/resourcemodel/resourcemodel.cxx
@@ -105,6 +105,8 @@ class WW8TableDataHandler : public TableDataHandler<string,
                             TablePropsRef_t>
 {
 public:
+    virtual ~WW8TableDataHandler() {}
+
     typedef boost::shared_ptr<WW8TableDataHandler> Pointer_t;
     virtual void startTable(unsigned int nRows, unsigned int nDepth,
                             TablePropsRef_t pProps);


More information about the Libreoffice-commits mailing list