[Libreoffice-commits] core.git: 48 commits - chart2/source comphelper/source extensions/source framework/source include/comphelper include/vcl registry/tools sc/qa sc/source sd/source svx/source sw/source unusedcode.easy vcl/generic vcl/source vcl/win

Caolán McNamara caolanm at redhat.com
Thu Feb 27 04:59:59 PST 2014


 chart2/source/view/main/OpenGLRender.hxx                      |    8 
 comphelper/source/misc/docpasswordrequest.cxx                 |   14 
 extensions/source/propctrlr/browserlistbox.cxx                |    9 
 framework/source/uiconfiguration/windowstateconfiguration.cxx |   25 
 include/comphelper/docpasswordrequest.hxx                     |    2 
 include/vcl/gfxlink.hxx                                       |    1 
 include/vcl/settings.hxx                                      |   61 -
 include/vcl/sysdata.hxx                                       |   24 
 registry/tools/regcompare.cxx                                 |    2 
 sc/qa/unit/ucalc_sharedformula.cxx                            |    1 
 sc/source/core/data/colorscale.cxx                            |   12 
 sc/source/core/data/conditio.cxx                              |    2 
 sc/source/core/tool/cellform.cxx                              |    2 
 sc/source/core/tool/chartarr.cxx                              |    2 
 sc/source/filter/xml/xmlcelli.cxx                             |   31 
 sc/source/ui/Accessibility/AccessibleCell.cxx                 |    5 
 sc/source/ui/app/scmod.cxx                                    |    3 
 sc/source/ui/cctrl/checklistmenu.cxx                          |    8 
 sc/source/ui/inc/rfindlst.hxx                                 |    4 
 sc/source/ui/miscdlgs/redcom.cxx                              |    3 
 sc/source/ui/unoobj/cellsuno.cxx                              |    2 
 sc/source/ui/unoobj/chart2uno.cxx                             |    2 
 sc/source/ui/view/select.cxx                                  |    3 
 sc/source/ui/view/viewfun7.cxx                                |   17 
 sd/source/ui/inc/optsitem.hxx                                 |    2 
 sd/source/ui/unoidl/unoobj.cxx                                |    4 
 svx/source/dialog/connctrl.cxx                                |   10 
 svx/source/unodraw/recoveryui.cxx                             |    4 
 sw/source/core/attr/calbck.cxx                                |    2 
 sw/source/core/frmedt/fecopy.cxx                              |    2 
 sw/source/core/layout/trvlfrm.cxx                             |    2 
 sw/source/core/text/inftxt.cxx                                |   19 
 sw/source/core/text/inftxt.hxx                                |    2 
 sw/source/core/text/pormulti.cxx                              |    8 
 sw/source/core/text/porrst.cxx                                |    2 
 sw/source/core/text/txtfly.cxx                                |   10 
 sw/source/filter/ww8/docxattributeoutput.cxx                  |   11 
 sw/source/ui/uno/unomailmerge.cxx                             |   14 
 unusedcode.easy                                               |   11 
 vcl/generic/fontmanager/fontmanager.cxx                       |   18 
 vcl/source/app/settings.cxx                                   |  343 ----------
 vcl/source/control/button.cxx                                 |   14 
 vcl/source/window/printdlg.cxx                                |   22 
 vcl/source/window/splitwin.cxx                                |   40 -
 vcl/source/window/toolbox.cxx                                 |    1 
 vcl/source/window/window.cxx                                  |    9 
 vcl/source/window/winproc.cxx                                 |    6 
 vcl/win/source/window/salframe.cxx                            |    2 
 48 files changed, 239 insertions(+), 562 deletions(-)

New commits:
commit 95ab91d0fb172f8c7692cb043dfd6b079f319601
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:56:16 2014 +0000

    coverity#1103661 Division or modulo by zero
    
    Change-Id: Iebcd567b79b77c456b347d5fae6331072ad38a9f

diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index 050ac45..ef36f72 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -78,12 +78,10 @@ void SvxXConnectionPreview::AdaptSize()
     // Adapt size
     if( pObjList )
     {
-        Rectangle aRect = pObjList->GetAllObjBoundRect();
-        if (aRect.GetHeight() == 0 || aRect.GetHeight() == 0)
-            return;
-
         SetMapMode( MAP_100TH_MM );
+
         OutputDevice* pOD = pView->GetFirstOutputDevice(); // GetWin( 0 );
+        Rectangle aRect = pObjList->GetAllObjBoundRect();
 
         MapMode aMapMode = GetMapMode();
         aMapMode.SetMapUnit( pOD->GetMapMode().GetMapUnit() );
@@ -95,7 +93,11 @@ void SvxXConnectionPreview::AdaptSize()
         const Size      aWinSize = PixelToLogic( GetOutputSizePixel(), aDisplayMap );
         const long      nWidth = aWinSize.Width();
         const long      nHeight = aWinSize.Height();
+        if (aRect.GetHeight() == 0)
+            return;
         double          fRectWH = (double) aRect.GetWidth() / aRect.GetHeight();
+        if (nHeight == 0)
+            return;
         double          fWinWH = (double) nWidth / nHeight;
 
         // Adapt bitmap to Thumb size (not here!)
commit 1f8c2a2e5c8bda6e6e35a868e5ac7afdc7d32317
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:46:39 2014 +0000

    coverity#1187868 Uninitialized pointer field
    
    Change-Id: I6fa813b983d217eb8ce028f9ae13a0cc764e29da

diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index 2328cbe..59aaaa0 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -68,6 +68,30 @@ struct SystemEnvData
     long                aShellWindow;   // the window of the frame's shell
     void*               pShellWidget;   // the frame's shell widget
 #endif
+
+    SystemEnvData()
+        : nSize(0)
+#if defined( WNT )
+        , hWnd(0)
+#elif defined( MACOSX )
+        , mpNSView(NULL)
+#elif defined( ANDROID )
+#elif defined( IOS )
+#elif defined( UNX )
+        , pDisplay(NULL)
+        , aWindow(0)
+        , pSalFrame(NULL)
+        , pWidget(NULL)
+        , pVisual(NULL)
+        , nScreen(0)
+        , nDepth(0)
+        , aColormap(0)
+        , pAppContext(NULL)
+        , aShellWindow(0)
+        , pShellWidget(NULL)
+#endif
+    {
+    }
 };
 
 struct SystemParentData
commit a5b57622f9610d90e54adf6a2cf114f43b063c17
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:42:30 2014 +0000

    coverity#1187865 Uninitialized scalar field
    
    Change-Id: I69026472ac720f0dd41710033b3ec3b5f14ccb2c

diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index 96ec158..bd05474 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -169,13 +169,24 @@ class ConfigurationAccess_WindowState : public  ::cppu::WeakImplHelper2< XNameCo
         // provided to outside code!
         struct WindowStateInfo
         {
-            WindowStateInfo() : aDockingArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ),
-                                aDockPos( 0, 0 ),
-                                aPos( 0, 0 ),
-                                aSize( 0, 0 ),
-                                nInternalState( 0 ),
-                                nStyle( 0 ),
-                                nMask( 0 ) {}
+            WindowStateInfo()
+                : bLocked(false)
+                , bDocked(false)
+                , bVisible(false)
+                , bContext(false)
+                , bHideFromMenu(false)
+                , bNoClose(false)
+                , bSoftClose(false)
+                , bContextActive(false)
+                , aDockingArea(::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP)
+                , aDockPos(0, 0)
+                , aPos(0, 0)
+                , aSize(0, 0)
+                , nInternalState(0)
+                , nStyle(0)
+                , nMask(0)
+            {
+            }
 
             bool                                    bLocked : 1,
                                                     bDocked : 1,
commit 0564c1c2ddb3d457252aac26d75b3fe4e374888d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:35:02 2014 +0000

    coverity#1187691 don't smoke crack and code
    
    Change-Id: Id38ce22671ecf24fde1b828a5da94b7b19c27e60

diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 0cc5cff..56a6b38 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -794,13 +794,13 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
  * Draws a special portion, e.g., line break portion, tab portion.
  * rPor     - The portion
  * rRect    - The rectangle surrounding the character
- * pCol     - Specify a color for the character
+ * rCol     - Specify a color for the character
  * bCenter  - Draw the character centered, otherwise left aligned
  * bRotate  - Rotate the character if character rotation is set
  *************************************************************************/
 
 static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rPor,
-                      SwRect& rRect, const Color* pCol, sal_Unicode cChar,
+                      SwRect& rRect, const Color& rCol, sal_Unicode cChar,
                       sal_uInt8 nOptions )
 {
     bool bCenter = 0 != ( nOptions & DRAW_SPECIAL_OPTIONS_CENTER );
@@ -831,10 +831,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
     else
         m_pFnt->SetVertical( pOldFnt->GetOrientation() );
 
-    if ( pCol )
-        m_pFnt->SetColor( *pCol );
-    else
-        m_pFnt->SetColor( pOldFnt->GetColor() );
+    m_pFnt->SetColor(rCol);
 
     Size aFontSize( 0, SPECIAL_FONT_HEIGHT );
     m_pFnt->SetSize( aFontSize, m_pFnt->GetActual() );
@@ -934,7 +931,7 @@ void SwTxtPaintInfo::DrawRect( const SwRect &rRect, bool bNoGraphic,
     }
 }
 
-void SwTxtPaintInfo::DrawSpecial( const SwLinePortion &rPor, sal_Unicode cChar, Color* pColor ) const
+void SwTxtPaintInfo::DrawSpecial(const SwLinePortion &rPor, sal_Unicode cChar, const Color& rColor) const
 {
     if( OnWin() )
     {
@@ -950,7 +947,7 @@ void SwTxtPaintInfo::DrawSpecial( const SwLinePortion &rPor, sal_Unicode cChar,
         if( aRect.HasArea() )
         {
             const sal_uInt8 nOptions = 0;
-            lcl_DrawSpecial( *this, rPor, aRect, pColor, cChar, nOptions );
+            lcl_DrawSpecial( *this, rPor, aRect, rColor, cChar, nOptions );
         }
 
         ((SwLinePortion&)rPor).Width( nOldWidth );
@@ -970,7 +967,7 @@ void SwTxtPaintInfo::DrawTab( const SwLinePortion &rPor ) const
         const sal_Unicode cChar = GetTxtFrm()->IsRightToLeft() ? CHAR_TAB_RTL : CHAR_TAB;
         const sal_uInt8 nOptions = DRAW_SPECIAL_OPTIONS_CENTER | DRAW_SPECIAL_OPTIONS_ROTATE;
 
-        lcl_DrawSpecial( *this, rPor, aRect, new Color(0x6a, 0xbe, 0xd3), cChar, nOptions );
+        lcl_DrawSpecial( *this, rPor, aRect, Color(0x6a, 0xbe, 0xd3), cChar, nOptions );
     }
 }
 
@@ -990,7 +987,7 @@ void SwTxtPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
                                       CHAR_LINEBREAK_RTL : CHAR_LINEBREAK;
             const sal_uInt8 nOptions = 0;
 
-            lcl_DrawSpecial( *this, rPor, aRect, new Color(NON_PRINTING_CHARACTER_COLOR), cChar, nOptions );
+            lcl_DrawSpecial( *this, rPor, aRect, Color(NON_PRINTING_CHARACTER_COLOR), cChar, nOptions );
         }
 
         ((SwLinePortion&)rPor).Width( nOldWidth );
@@ -1027,7 +1024,7 @@ void SwTxtPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
     if( aRect.HasArea() )
     {
         const sal_uInt8 nOptions = 0;
-        lcl_DrawSpecial( *this, rPor, aRect, &aCol, cChar, nOptions );
+        lcl_DrawSpecial( *this, rPor, aRect, aCol, cChar, nOptions );
     }
 }
 
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 145dde5..aab623e 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -472,7 +472,7 @@ public:
     void DrawRect( const SwRect &rRect, bool bNoGraphic = false,
                    bool bRetouche = true ) const;
 
-    void DrawSpecial( const SwLinePortion &rPor, sal_Unicode cChar, Color* pColor ) const;
+    void DrawSpecial(const SwLinePortion &rPor, sal_Unicode cChar, const Color& rColor) const;
     void DrawTab( const SwLinePortion &rPor ) const;
     void DrawLineBreak( const SwLinePortion &rPor ) const;
     void DrawRedArrow( const SwLinePortion &rPor ) const;
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 4595dd5..681d050 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -69,7 +69,7 @@ void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const
 {
     if( rInf.OnWin() && rInf.GetOpt().IsParagraph() )
     {
-        rInf.DrawSpecial( *this, CH_PAR, new Color(NON_PRINTING_CHARACTER_COLOR) );
+        rInf.DrawSpecial( *this, CH_PAR, Color(NON_PRINTING_CHARACTER_COLOR) );
     }
 }
 
commit c2a5369e6a64fd58bf87679c02002e0cc219c74d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:30:15 2014 +0000

    coverity#1187688 Resource leak
    
    Change-Id: If7934080401af867282c1b54721134abcc157e53

diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index ddb1cd7..b7bb51d 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -1739,7 +1739,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
     }
 
     SeekAndChg( rInf );
-    SwFontSave *pFontSave;
+    boost::scoped_ptr<SwFontSave> xFontSave;
     if( rMulti.IsDouble() )
     {
         SwFont* pTmpFnt = new SwFont( *rInf.GetFont() );
@@ -1748,10 +1748,8 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
             SetPropFont( 50 );
             pTmpFnt->SetProportion( GetPropFont() );
         }
-        pFontSave = new SwFontSave( rInf, pTmpFnt, this );
+        xFontSave.reset(new SwFontSave(rInf, pTmpFnt, this));
     }
-    else
-        pFontSave = NULL;
 
     SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() );
     if ( rMulti.IsBidi() )
@@ -2164,7 +2162,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
     SeekAndChg( rInf );
     delete pFirstRest;
     delete pSecondRest;
-    delete pFontSave;
+    xFontSave.reset();
     return bRet;
 }
 
commit ec9e5a0f5d69fbd9abd551c2459c4f482dddc5b5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:28:29 2014 +0000

    coverity#1187647 try and help coverity out here
    
    Change-Id: I94a0dad8113b8b6ac06ddf5456ff8c35d7c64fc1

diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx
index a2d2119..3f0864b 100644
--- a/comphelper/source/misc/docpasswordrequest.cxx
+++ b/comphelper/source/misc/docpasswordrequest.cxx
@@ -90,7 +90,6 @@ private:
 
 
 SimplePasswordRequest::SimplePasswordRequest( PasswordRequestMode eMode )
-    : mpPassword( NULL )
 {
     PasswordRequest aRequest( OUString(), Reference< XInterface >(),
         InteractionClassification_QUERY, eMode );
@@ -98,7 +97,8 @@ SimplePasswordRequest::SimplePasswordRequest( PasswordRequestMode eMode )
 
     maContinuations.realloc( 2 );
     maContinuations[ 0 ].set( new AbortContinuation );
-    maContinuations[ 1 ].set( mpPassword = new PasswordContinuation );
+    mpPassword = new PasswordContinuation;
+    maContinuations[ 1 ].set( mpPassword );
 }
 
 SimplePasswordRequest::~SimplePasswordRequest()
@@ -129,7 +129,6 @@ Sequence< Reference< XInteractionContinuation > > SAL_CALL SimplePasswordRequest
 
 DocPasswordRequest::DocPasswordRequest( DocPasswordRequestType eType,
         PasswordRequestMode eMode, const OUString& rDocumentName, bool bPasswordToModify )
-    : mpPassword( NULL )
 {
     switch( eType )
     {
@@ -153,7 +152,8 @@ DocPasswordRequest::DocPasswordRequest( DocPasswordRequestType eType,
 
     maContinuations.realloc( 2 );
     maContinuations[ 0 ].set( new AbortContinuation );
-    maContinuations[ 1 ].set( mpPassword = new PasswordContinuation );
+    mpPassword = new PasswordContinuation;
+    maContinuations[ 1 ].set( mpPassword );
 }
 
 DocPasswordRequest::~DocPasswordRequest()
commit 697ec96e6118af3ceec953f6bec74dab526e548a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:25:47 2014 +0000

    coverity#1187646 unused mpAbort
    
    Change-Id: I1fc3f0253c2af4779ba59b5b85ea7fc400226177

diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx
index 380b082..a2d2119 100644
--- a/comphelper/source/misc/docpasswordrequest.cxx
+++ b/comphelper/source/misc/docpasswordrequest.cxx
@@ -90,15 +90,14 @@ private:
 
 
 SimplePasswordRequest::SimplePasswordRequest( PasswordRequestMode eMode )
-: mpAbort( NULL )
-, mpPassword( NULL )
+    : mpPassword( NULL )
 {
     PasswordRequest aRequest( OUString(), Reference< XInterface >(),
         InteractionClassification_QUERY, eMode );
     maRequest <<= aRequest;
 
     maContinuations.realloc( 2 );
-    maContinuations[ 0 ].set( mpAbort = new AbortContinuation );
+    maContinuations[ 0 ].set( new AbortContinuation );
     maContinuations[ 1 ].set( mpPassword = new PasswordContinuation );
 }
 
@@ -130,8 +129,7 @@ Sequence< Reference< XInteractionContinuation > > SAL_CALL SimplePasswordRequest
 
 DocPasswordRequest::DocPasswordRequest( DocPasswordRequestType eType,
         PasswordRequestMode eMode, const OUString& rDocumentName, bool bPasswordToModify )
-: mpAbort( NULL )
-, mpPassword( NULL )
+    : mpPassword( NULL )
 {
     switch( eType )
     {
@@ -154,7 +152,7 @@ DocPasswordRequest::DocPasswordRequest( DocPasswordRequestType eType,
     }
 
     maContinuations.realloc( 2 );
-    maContinuations[ 0 ].set( mpAbort = new AbortContinuation );
+    maContinuations[ 0 ].set( new AbortContinuation );
     maContinuations[ 1 ].set( mpPassword = new PasswordContinuation );
 }
 
diff --git a/include/comphelper/docpasswordrequest.hxx b/include/comphelper/docpasswordrequest.hxx
index 1538a7f..be1cf36 100644
--- a/include/comphelper/docpasswordrequest.hxx
+++ b/include/comphelper/docpasswordrequest.hxx
@@ -60,7 +60,6 @@ private:
 private:
     ::com::sun::star::uno::Any      maRequest;
     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > maContinuations;
-    AbortContinuation *             mpAbort;
     PasswordContinuation *          mpPassword;
 };
 
@@ -95,7 +94,6 @@ private:
 private:
     ::com::sun::star::uno::Any      maRequest;
     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > maContinuations;
-    AbortContinuation *             mpAbort;
     PasswordContinuation *          mpPassword;
 };
 
commit fd997b360f4b448d574c1efc5c8ad1c68f7dbdc2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:22:38 2014 +0000

    coverity#1187869 Uninitialized pointer field
    
    Change-Id: Ie516d7850b2d415c7d16a2f46f4d552bd14d546f

diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index c738ba3..50c8d0e 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -29,6 +29,9 @@
 
 ScRedComDialog::ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet,
                     ScDocShell *pShell, ScChangeAction *pAction, bool bPrevNext)
+    : pChangeAction(NULL)
+    , pDocShell(NULL)
+    , pDlg(NULL)
 {
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     if(pFact)
commit 2eeacdeb337811d207d40adfbda266f4c880a103
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:20:59 2014 +0000

    coverity#1187867 Uninitialized scalar field
    
    Change-Id: Ie8477a196eb31d173f96735aedc883cc9a7697ff

diff --git a/sc/source/ui/inc/rfindlst.hxx b/sc/source/ui/inc/rfindlst.hxx
index 43007c8..5ebeff1 100644
--- a/sc/source/ui/inc/rfindlst.hxx
+++ b/sc/source/ui/inc/rfindlst.hxx
@@ -32,10 +32,10 @@ struct ScRangeFindData
     sal_uInt16 nFlags;
     sal_Int32  nSelStart;
     sal_Int32  nSelEnd;
+    ColorData nColorData;
 
     ScRangeFindData( const ScRange& rR, sal_uInt16 nF, sal_Int32 nS, sal_Int32 nE ) :
-        aRef(rR), nFlags(nF), nSelStart(nS), nSelEnd(nE) {}
-    ColorData nColorData;
+        aRef(rR), nFlags(nF), nSelStart(nS), nSelEnd(nE), nColorData(0) {}
 };
 
 class ScRangeFindList
commit ba9562d6b4d3da2f6f4bfd96d6aebf35abaa5b51
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:20:04 2014 +0000

    coverity#1187866 unused bStartWithActualPage
    
    Change-Id: I62b44a640ab6f21d51613672f46cb2e612b300f3

diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx
index 2cf00f0..0766771 100644
--- a/sd/source/ui/inc/optsitem.hxx
+++ b/sd/source/ui/inc/optsitem.hxx
@@ -222,7 +222,6 @@ private:
     sal_Bool    bPickThrough            : 1;    // Misc/TextObject/Selectable
     sal_Bool    bDoubleClickTextEdit    : 1;    // Misc/DclickTextedit
     sal_Bool    bClickChangeRotation    : 1;    // Misc/RotateClick
-    sal_Bool    bStartWithActualPage    : 1;    // Misc/Start/CurrentPage
     sal_Bool    bEnableSdremote         : 1;    // Misc/Start/EnableSdremote
     sal_Bool    bEnablePresenterScreen : 1;    // Misc/Start/EnablePresenterDisplay
     sal_Bool    bSolidDragging          : 1;    // Misc/ModifyWithAttributes
@@ -311,7 +310,6 @@ public:
     void    SetPickThrough( sal_Bool bOn = sal_True ) { if( bPickThrough != bOn ) { OptionsChanged(); bPickThrough = bOn; } }
     void    SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { if( bDoubleClickTextEdit != bOn ) { OptionsChanged(); bDoubleClickTextEdit = bOn; } }
     void    SetClickChangeRotation( sal_Bool bOn = sal_True ) { if( bClickChangeRotation != bOn ) { OptionsChanged(); bClickChangeRotation = bOn; } }
-    void    SetStartWithActualPage( sal_Bool bOn = sal_True ) { if( bStartWithActualPage != bOn ) { OptionsChanged(); bStartWithActualPage = bOn; } }
     void    SetEnableSdremote( sal_Bool bOn = sal_True ) { if( bEnableSdremote != bOn ) { OptionsChanged(); bEnableSdremote = bOn; } }
     void    SetEnablePresenterScreen( sal_Bool bOn = sal_True ) { if( bEnablePresenterScreen != bOn ) { OptionsChanged(); bEnablePresenterScreen = bOn; } }
     void    SetSummationOfParagraphs( sal_Bool bOn = sal_True ){ if ( bOn != bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; } }
commit c5d3d26a370a25204deba3184e69a13d9f28200c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:18:44 2014 +0000

    coverity#1187864 Uninitialized pointer field
    
    Change-Id: I2802e7e8860dfcb011af1dab9a408ec46c95ce63

diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx
index 8bcfc87..09e0778 100755
--- a/chart2/source/view/main/OpenGLRender.hxx
+++ b/chart2/source/view/main/OpenGLRender.hxx
@@ -122,6 +122,14 @@ struct GLWindow
 #if defined( _WIN32 )
 #elif defined( MACOSX )
 #elif defined( UNX )
+        dpy(NULL),
+        screen(0),
+        win(0),
+#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+        fbc(0),
+#endif
+        vi(NULL),
+        ctx(0),
         GLXExtensions(NULL),
 #endif
         bpp(0),
commit 0aee68c3fc96485bafea9e3070d6a7c60a5c636b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:14:59 2014 +0000

    coverity#1187863 unused mnExtra2
    
    Change-Id: Ic6a55a3640d782ba95a5ba4681f447ee28ae163e

diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx
index 9ecde74..35ae2f5 100644
--- a/include/vcl/gfxlink.hxx
+++ b/include/vcl/gfxlink.hxx
@@ -129,7 +129,6 @@ private:
     sal_uInt32          mnBufSize;
     sal_uInt32          mnUserId;
     ImpGfxLink*         mpImpData;
-    sal_uLong               mnExtra2;
 
     SAL_DLLPRIVATE void ImplCopy( const GfxLink& rGfxLink );
 
commit ac44fc6bfdfd182c5997605d94dcade109df208a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:11:44 2014 +0000

    coverity#1187860 Uninitialized pointer field
    
    Change-Id: Ia68958ddb904cbb50969b3b184777ddd49ccb677

diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 7118d19..6d23b1b 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -415,20 +415,22 @@ SwXMailMerge::~SwXMailMerge()
 // Guarantee object consistence in case of an exception
 class MailMergeExecuteFinalizer {
 public:
-    MailMergeExecuteFinalizer(SwXMailMerge *mailmerge) {
-        OSL_ENSURE( mailmerge, "mailmerge object missing" );
-        this->m_aMailMerge = mailmerge;
+    MailMergeExecuteFinalizer(SwXMailMerge *mailmerge)
+        : m_pMailMerge(mailmerge)
+    {
+        assert(m_pMailMerge); //mailmerge object missing
     }
-    ~MailMergeExecuteFinalizer() {
+    ~MailMergeExecuteFinalizer()
+    {
         osl::MutexGuard pMgrGuard( GetMailMergeMutex() );
-        m_aMailMerge->m_pMgr = 0;
+        m_pMailMerge->m_pMgr = 0;
     }
 
 private:
     // Disallow copy
     MailMergeExecuteFinalizer(const MailMergeExecuteFinalizer&) {}
 
-    SwXMailMerge *m_aMailMerge;
+    SwXMailMerge *m_pMailMerge;
 };
 
 uno::Any SAL_CALL SwXMailMerge::execute(
commit cadddf16409999ea39a2f70cb92e39f1909a9ce6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:08:40 2014 +0000

    coverity#1187687 Dereference null return value
    
    Change-Id: Iaaa2f17382d83e864d7f14f3788e7f7476ac3212

diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index 7e9b2dc..3e15517 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -179,6 +179,8 @@ OUString ScCellFormat::GetString(
         case CELLTYPE_FORMULA:
         {
             ScFormulaCell* pFCell = rDoc.GetFormulaCell(rPos);
+            if (!pFCell)
+                return aString;
             if (bFormula)
             {
                 pFCell->GetFormula(aString);
commit 7004dae6b46aa74a3437c83aabff387827cb6a26
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:07:28 2014 +0000

    coverity#1187686 Dereference null return value
    
    Change-Id: I68884a762527a0a430771d26a3c84c8482751bcb

diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index 91885ea..d8974ae 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -164,6 +164,7 @@ void Test::testSharedFormulas()
     CPPUNIT_ASSERT_EQUAL(aCell.mpString->getString(), m_pDoc->GetString(aPos));
     aPos.SetRow(16);
     pFC = m_pDoc->GetFormulaCell(aPos);
+    CPPUNIT_ASSERT(pFC);
     // B17:B18 should be shared.
     CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(16), pFC->GetSharedTopRow());
     CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(2), pFC->GetSharedLength());
commit af3b804e19c7e29ec3f5ffb5e90f575934cff0d7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:06:46 2014 +0000

    coverity#1187685 Dereference null return value
    
    Change-Id: I7f34eae7eedfa067f0f8a360aa6ae8dc5b0381bd

diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 7a4e09d..16e06ab 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -2703,6 +2703,10 @@ void SplitWindow::RemoveItem( sal_uInt16 nId, bool bHide )
     // Set suchen
     sal_uInt16          nPos;
     ImplSplitSet*    pSet    = ImplFindItem( mpMainSet, nId, nPos );
+
+    if (!pSet)
+        return;
+
     ImplSplitItem*   pItem   = &(pSet->mpItems[nPos]);
     Window*         pWindow = pItem->mpWindow;
     Window*         pOrgParent = pItem->mpOrgParent;
@@ -2765,22 +2769,14 @@ void SplitWindow::Clear()
 void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
                              bool bPropSmall, bool bPropGreat )
 {
-    sal_uInt16          nItems;
-    sal_uInt16          nPos;
-    sal_uInt16          nMin;
-    sal_uInt16          nMax;
-    sal_uInt16          i;
-    sal_uInt16          n;
-    long            nDelta;
-    long            nTempDelta;
+    sal_uInt16      nPos;
     ImplSplitSet*   pSet = ImplFindItem( mpBaseSet, nId, nPos );
-    ImplSplitItem*  pItems;
 
-    if ( !pSet )
+    if (!pSet)
         return;
 
-    nItems = pSet->mnItems;
-    pItems = pSet->mpItems;
+    sal_uInt16 nItems = pSet->mnItems;
+    ImplSplitItem*  pItems = pSet->mpItems;
 
     // When there is an explicit minimum or maximum size then move nNewSize
     // into that range (when it is not yet already in it.)
@@ -2792,14 +2788,14 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
         return;
     }
 
-    nDelta = nNewSize-pItems[nPos].mnPixSize;
+    long nDelta = nNewSize-pItems[nPos].mnPixSize;
     if ( !nDelta )
         return;
 
     // Bereich berechnen, der beim Splitten betroffen sein kann
-    nMin = 0;
-    nMax = nItems;
-    for ( i = 0; i < nItems; i++ )
+    sal_uInt16 nMin = 0;
+    sal_uInt16 nMax = nItems;
+    for (sal_uInt16 i = 0; i < nItems; ++i)
     {
         if ( pItems[i].mbFixed )
         {
@@ -2849,6 +2845,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
         bPropGreat = bTemp;
     }
 
+    sal_uInt16          n;
     // Jetzt die Fenster splitten
     if ( nDelta < 0 )
     {
@@ -2856,7 +2853,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
         {
             if ( bPropGreat )
             {
-                nTempDelta = nDelta;
+                long nTempDelta = nDelta;
                 do
                 {
                     n = nPos+1;
@@ -2925,7 +2922,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
         {
             if ( bPropGreat )
             {
-                nTempDelta = nDelta;
+                long nTempDelta = nDelta;
                 do
                 {
                     n = nPos+1;
commit 602ca93561d9d6b12f110134a6341e24a560d7fe
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:02:22 2014 +0000

    coverity#1187684 Dereference null return value
    
    Change-Id: I3b8652b2a5f1a8cfcda46774890de4eac5c5583b

diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index ffb2c92..be0a75e 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1423,25 +1423,26 @@ void ScXMLTableRowCellContext::AddFormulaCell( const ScAddress& rCellPos )
                 // Set the value/text of the top-left matrix position in its
                 // cached result.  For import, we only need to set the correct
                 // matrix geometry and the value type of the top-left element.
-
                 ScFormulaCell* pFCell = rXMLImport.GetDocument()->GetFormulaCell(rCellPos);
-
-                ScMatrixRef pMat(new ScMatrix(nMatrixCols, nMatrixRows));
-                if (bFormulaTextResult && maStringValue)
+                if (pFCell)
                 {
-                    if (!IsPossibleErrorString())
+                    ScMatrixRef pMat(new ScMatrix(nMatrixCols, nMatrixRows));
+                    if (bFormulaTextResult && maStringValue)
+                    {
+                        if (!IsPossibleErrorString())
+                        {
+                            pFCell->SetResultMatrix(
+                                nMatrixCols, nMatrixRows, pMat, new formula::FormulaStringToken(*maStringValue));
+                            pFCell->ResetDirty();
+                        }
+                    }
+                    else if (!rtl::math::isNan(fValue))
                     {
                         pFCell->SetResultMatrix(
-                            nMatrixCols, nMatrixRows, pMat, new formula::FormulaStringToken(*maStringValue));
+                            nMatrixCols, nMatrixRows, pMat, new formula::FormulaDoubleToken(fValue));
                         pFCell->ResetDirty();
                     }
                 }
-                else if (!rtl::math::isNan(fValue))
-                {
-                    pFCell->SetResultMatrix(
-                        nMatrixCols, nMatrixRows, pMat, new formula::FormulaDoubleToken(fValue));
-                    pFCell->ResetDirty();
-                }
             }
         }
         else
commit 3a22310bd220e29489ccea9cbec764170528d2d4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:01:02 2014 +0000

    coverity#1187683 Dereference null return value
    
    Change-Id: I57f459ed5ca3634109e986988069bc485bdcb7cd

diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index cb284d5..ffb2c92 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1146,7 +1146,8 @@ void ScXMLTableRowCellContext::PutValueCell( const ScAddress& rCurrentPos )
         {
             ScFormulaCell* pFCell = rXMLImport.GetDocument()->GetFormulaCell(rCurrentPos);
             SetFormulaCell(pFCell);
-            pFCell->SetNeedNumberFormat( true );
+            if (pFCell)
+                pFCell->SetNeedNumberFormat( true );
         }
     }
     else  //regular value cell
commit 38c143c1d71ff82155ee38070feffd72b8ad6748
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 11:00:29 2014 +0000

    coverity#1187682 Dereference null return value
    
    Change-Id: I3395730a791417ddddfdcec9bca2ee7b9a3d4ec6

diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 17098bd..cb284d5 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1073,7 +1073,8 @@ void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos,
                     if(pFCell->GetMatrixOrigin(aTopLeftMatrixCell))
                     {
                         ScFormulaCell* pMatrixCell = rXMLImport.GetDocument()->GetFormulaCell(aTopLeftMatrixCell);
-                        pMatrixCell->SetDirty();
+                        if (pMatrixCell)
+                            pMatrixCell->SetDirty();
                     }
                     else
                         SAL_WARN("sc", "matrix cell without matrix");
commit ab110f1c5c8820cbac4df545d9c782f799c3d790
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:59:38 2014 +0000

    coverity#1187681 Dereference null return value
    
    Change-Id: I8043f4c2abe6b63162eb79eb64809223a9846b21

diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 5b3af7b..540960e 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -434,7 +434,10 @@ void ScAccessibleCell::FillPrecedents(utl::AccessibleRelationSetHelper* pRelatio
 {
     if (mpDoc && mpDoc->GetCellType(maCellAddress) == CELLTYPE_FORMULA)
     {
-        ScDetectiveRefIter aIter(mpDoc->GetFormulaCell(maCellAddress));
+        ScFormulaCell* pCell = mpDoc->GetFormulaCell(maCellAddress);
+        if (!pCell)
+            return;
+        ScDetectiveRefIter aIter(pCell);
         ScRange aRef;
         while ( aIter.GetNextRef( aRef ) )
         {
commit 7f44e3a4eab74652cd72db9da5b8d316ac127eb1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:58:29 2014 +0000

    coverity#1187680 Dereference null return value
    
    Change-Id: I84a87700b0c21461dfedfdfdfc098dfd6db6c4b6

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 1feb405..4fc7c08 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1522,7 +1522,11 @@ void ScCheckListMenuWindow::initMembers()
         maChecks.CheckEntry( maMembers[i].maName, maMembers[i].mpParent, maMembers[i].mbVisible);
         // Expand first node of checked dates
         if ( maMembers[ i ].mpParent == NULL && maChecks.IsChecked( maMembers[i].maName,  maMembers[i].mpParent ) )
-            maChecks.Expand( maChecks.FindEntry( NULL, maMembers[ i ].maName ) );
+        {
+            SvTreeListEntry* pEntry = maChecks.FindEntry( NULL, maMembers[ i ].maName );
+            if (pEntry)
+                maChecks.Expand( pEntry );
+        }
 
         if (maMembers[i].mbVisible)
             ++nVisMemCount;
commit 6fdd21e4bc9f779a7ae77eb4612fdf0dcef76b9d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:57:01 2014 +0000

    coverity#1187679 Dereference null return value
    
    Change-Id: I58c0974d02f1f9e5617476182ed9ce5c50debd70

diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 7fe2727..ac2c96d 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -6548,6 +6548,8 @@ void SAL_CALL ScCellObj::setFormulaResult( double nValue ) throw(uno::RuntimeExc
     if ( pDocSh && pDocSh->GetDocument()->GetCellType( aCellPos ) == CELLTYPE_FORMULA )
     {
         ScFormulaCell* pCell = pDocSh->GetDocument()->GetFormulaCell(aCellPos);
+        if (!pCell)
+            return;
         pCell->SetHybridDouble( nValue );
         pCell->ResetDirty();
         pCell->SetChanged(false);
commit 1cbe667d3e205f02d39d73267f2d4fbdf94b639f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:50:25 2014 +0000

    coverity#1187678 Dereference null return value
    
    Change-Id: I01d2e758581c3893bbbd823029668acc257f4534

diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 510a0ac..2a3873b 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2633,6 +2633,8 @@ void ScChart2DataSequence::BuildDataCache()
                             case CELLTYPE_FORMULA:
                             {
                                 ScFormulaCell* pFCell = m_pDocument->GetFormulaCell(aAdr);
+                                if (!pFCell)
+                                    break;
                                 sal_uInt16 nErr = pFCell->GetErrCode();
                                 if (nErr)
                                     break;
commit 7848b15c23d41e58b9b3eeb0eb26a6219d38857e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:48:57 2014 +0000

    coverity#1187677 Dereference null return value
    
    Change-Id: Ia09c80cc2cf6a35843b0794143febdb19d0eb717

diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index f12bb5e..8541d9e 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -399,6 +399,9 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
             return false;
 
         ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
+        if (!pProtect)
+            return false;
+
         bool bSkipProtected   = !pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS);
         bool bSkipUnprotected = !pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS);
 
commit 581ffdd2864c2c0c9c4011fd3221d54c363f2452
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:47:01 2014 +0000

    coverity#1187675 Dereference null return value
    
    Change-Id: I313772d7382c303990f7333990e340803678be79

diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index d976ad1..e5854a3 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1719,12 +1719,10 @@ const OUString& PrintFontManager::getPSName( fontID nFontID ) const
     return m_pAtoms->getString( ATOM_PSNAME, pFont ? pFont->m_nPSName : INVALID_ATOM );
 }
 
-
-
 int PrintFontManager::getFontAscend( fontID nFontID ) const
 {
     PrintFont* pFont = getFont( nFontID );
-    if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 )
+    if (pFont && pFont->m_nAscend == 0 && pFont->m_nDescend == 0)
     {
         // might be a truetype font not yet analyzed
         if( pFont->m_eType == fonttype::TrueType )
@@ -1732,15 +1730,13 @@ int PrintFontManager::getFontAscend( fontID nFontID ) const
         else if( pFont->m_eType == fonttype::Type1 )
             pFont->readAfmMetrics( m_pAtoms, false, true );
     }
-    return pFont->m_nAscend;
+    return pFont ? pFont->m_nAscend : 0;
 }
 
-
-
 int PrintFontManager::getFontDescend( fontID nFontID ) const
 {
     PrintFont* pFont = getFont( nFontID );
-    if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 )
+    if (pFont && pFont->m_nAscend == 0 && pFont->m_nDescend == 0)
     {
         // might be a truetype font not yet analyzed
         if( pFont->m_eType == fonttype::TrueType )
@@ -1748,11 +1744,9 @@ int PrintFontManager::getFontDescend( fontID nFontID ) const
         else if( pFont->m_eType == fonttype::Type1 )
             pFont->readAfmMetrics( m_pAtoms, false, true );
     }
-    return pFont->m_nDescend;
+    return pFont ? pFont->m_nDescend : 0;
 }
 
-
-
 void PrintFontManager::hasVerticalSubstitutions( fontID nFontID,
     const sal_Unicode* pCharacters, int nCharacters, bool* pHasSubst ) const
 {
commit 3a1671b35198316af21f8f2d62233aa66e4b30f0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:45:36 2014 +0000

    coverity#1187674 Dereference null return value
    
    Change-Id: I4fdf0e324463285d086c1503214e2aee0c0537e8

diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index ae82903..d976ad1 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1757,14 +1757,14 @@ void PrintFontManager::hasVerticalSubstitutions( fontID nFontID,
     const sal_Unicode* pCharacters, int nCharacters, bool* pHasSubst ) const
 {
     PrintFont* pFont = getFont( nFontID );
-    if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 )
+    if (pFont && pFont->m_nAscend == 0 && pFont->m_nDescend == 0)
     {
         // might be a truetype font not yet analyzed
         if( pFont->m_eType == fonttype::TrueType )
             analyzeTrueTypeFile( pFont );
     }
 
-    if( ! pFont->m_bHaveVerticalSubstitutedGlyphs )
+    if (!pFont || !pFont->m_bHaveVerticalSubstitutedGlyphs)
         memset( pHasSubst, 0, sizeof(bool)*nCharacters );
     else
     {
commit 8a21d42426ad37cd06a7aac98aa2fa59403a5a97
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:43:07 2014 +0000

    coverity#1187670 Dereference null return value
    
    Change-Id: Ib1b2616e48d1fed7ae1557f60af04920025a9ae5

diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 7016c16..50e52ed 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -420,7 +420,8 @@ std::vector<double>& ScColorFormat::getValues() const
                     }
                     else if(eType == CELLTYPE_FORMULA)
                     {
-                        if (mpDoc->GetFormulaCell(aAddr)->IsValue())
+                        ScFormulaCell *pCell = mpDoc->GetFormulaCell(aAddr);
+                        if (pCell && pCell->IsValue())
                         {
                             double aVal = mpDoc->GetValue(nCol, nRow, nTab);
                             rValues.push_back(aVal);
@@ -544,7 +545,8 @@ Color* ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
 
     if (eCellType == CELLTYPE_FORMULA)
     {
-        if (!mpDoc->GetFormulaCell(rAddr)->IsValue())
+        ScFormulaCell *pCell = mpDoc->GetFormulaCell(rAddr);
+        if (!pCell || !pCell->IsValue())
             return NULL;
     }
 
@@ -834,7 +836,8 @@ ScDataBarInfo* ScDataBarFormat::GetDataBarInfo(const ScAddress& rAddr) const
 
     if (eCellType == CELLTYPE_FORMULA)
     {
-        if (!mpDoc->GetFormulaCell(rAddr)->IsValue())
+        ScFormulaCell *pCell = mpDoc->GetFormulaCell(rAddr);
+        if (!pCell || !pCell->IsValue())
             return NULL;
     }
 
@@ -972,7 +975,8 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const ScAddress& rAddr) const
 
     if (eCellType == CELLTYPE_FORMULA)
     {
-        if (!mpDoc->GetFormulaCell(rAddr)->IsValue())
+        ScFormulaCell *pCell = mpDoc->GetFormulaCell(rAddr);
+        if (!pCell || !pCell->IsValue())
             return NULL;
     }
 
commit 467a4d5f41af3de5c992ea7618d51a881c4c020a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:40:41 2014 +0000

    coverity#1187669 Dereference null return value
    
    Change-Id: Ic77fc2d436bf70ee166e4732f19f2067907f7c53

diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index d70b43f..aed6fdb 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -950,7 +950,7 @@ bool ScConditionEntry::IsError( const ScAddress& rPos ) const
         case CELLTYPE_FORMULA:
         {
             ScFormulaCell* pFormulaCell = const_cast<ScFormulaCell*>(mpDoc->GetFormulaCell(rPos));
-            if(pFormulaCell->GetErrCode())
+            if (pFormulaCell && pFormulaCell->GetErrCode())
                 return true;
         }
         case CELLTYPE_STRING:
commit 37a543e8d5f11b86f27e3556d2f420815352af5d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:39:41 2014 +0000

    coverity#1187668 Dereference null return value
    
    Change-Id: Ie0022c868484a9aed2d0efe2d95182d0094c6734

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3268665..dea9e5b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6298,10 +6298,13 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
             if (m_oFillStyle && *m_oFillStyle == XFILL_BITMAP)
             {
                 const SdrObject* pSdrObj = m_rExport.mpParentFrame->GetFrmFmt().FindRealSdrObject();
-                uno::Reference< drawing::XShape > xShape( ((SdrObject*)pSdrObj)->getUnoShape(), uno::UNO_QUERY );
-                uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY );
-                m_rDrawingML.SetFS(m_pSerializer);
-                m_rDrawingML.WriteBlipFill( xPropertySet, "BackGraphicURL" );
+                if (pSdrObj)
+                {
+                    uno::Reference< drawing::XShape > xShape( ((SdrObject*)pSdrObj)->getUnoShape(), uno::UNO_QUERY );
+                    uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY );
+                    m_rDrawingML.SetFS(m_pSerializer);
+                    m_rDrawingML.WriteBlipFill( xPropertySet, "BackGraphicURL" );
+                }
             }
         }
 
commit 6cccfffa084d9e0226566cf09aac532c3e4f517d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:38:26 2014 +0000

    coverity#1187667 Dereference null return value
    
    Change-Id: Ibc7f840f984ce12e9dae998085f42168d7819dc8

diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 627068a..40a6d91 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -130,7 +130,7 @@ double getCellValue( ScDocument& rDoc, const ScAddress& rPos, double fDefault, b
         case CELLTYPE_FORMULA:
         {
             ScFormulaCell* pFCell = rDoc.GetFormulaCell(rPos);
-            if (!pFCell->GetErrCode() && pFCell->IsValue())
+            if (pFCell && !pFCell->GetErrCode() && pFCell->IsValue())
                 fRet = pFCell->GetValue();
         }
         break;
commit e1a4e44d08cf13ad7dca3d267f54f3bc38476e08
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:37:12 2014 +0000

    coverity#1187666 Mixing enum types
    
    they both have the same value, so it doesn't matter much
    
    Change-Id: Ic001cd2824248db8577dc69e240c46ec09d023ae

diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx
index 6d22d611..bf6ebfa 100644
--- a/registry/tools/regcompare.cxx
+++ b/registry/tools/regcompare.cxx
@@ -467,7 +467,7 @@ static sal_uInt32 checkConstValue(Options_Impl const & options,
 {
     switch (constValue1.m_type)
     {
-        case RT_TYPE_INVALID:
+        case RT_TYPE_NONE:
             break;
         case RT_TYPE_BOOL:
             if (constValue1.m_value.aBool != constValue2.m_value.aBool)
commit 3bf6cd8a54239bbb67a98475a7f82eac9447958e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:35:15 2014 +0000

    coverity#1187665 Missing break in switch
    
    Change-Id: I672e38d37e385b458db97293dcc02f10513a7cfd

diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index d622198..d5b390319a 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -319,7 +319,7 @@ void SwModify::CheckCaching( const sal_uInt16 nWhich )
         case RES_FMT_CHG:
         case RES_ATTRSET_CHG:
             SetInSwFntCache( sal_False );
-
+            // fall through
         case RES_UL_SPACE:
         case RES_LR_SPACE:
         case RES_BOX:
commit f10c365f8812379fac104245a1c7ad638d493fb8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:32:12 2014 +0000

    coverity#1187663 Dereference after null check
    
    Change-Id: Icd652f0d1e24a22bb4cc42f6ea6b9409f6807a1a

diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 9c4fa20..4748211 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -379,32 +379,31 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
     MakeDrawLayer();
     ScDrawView* pScDrawView = GetScDrawView();
 
+    if (!pScDrawView)
+        return false;
+
     // #i123922# check if the drop was over an existing object; if yes, evtl. replace
     // the graphic for a SdrGraphObj (including link state updates) or adapt the fill
     // style for other objects
-    if(pScDrawView)
+    SdrPageView* pPageView = pScDrawView->GetSdrPageView();
+    if (pPageView)
     {
-        SdrPageView* pPageView = pScDrawView->GetSdrPageView();
-
-        if(pPageView)
+        SdrObject* pPickObj = 0;
+        if (pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPickObj, pPageView))
         {
-            SdrObject* pPickObj = 0;
-            if (pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPickObj, pPageView))
+            const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP));
+            SdrObject* pResult = pScDrawView->ApplyGraphicToObject(
+                *pPickObj,
+                rGraphic,
+                aBeginUndo,
+                rFile,
+                rFilter);
+
+            if (pResult)
             {
-                const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP));
-                SdrObject* pResult = pScDrawView->ApplyGraphicToObject(
-                    *pPickObj,
-                    rGraphic,
-                    aBeginUndo,
-                    rFile,
-                    rFilter);
-
-                if (pResult)
-                {
-                    // we are done; mark the modified/new object
-                    pScDrawView->MarkObj(pResult, pScDrawView->GetSdrPageView());
-                    return true;
-                }
+                // we are done; mark the modified/new object
+                pScDrawView->MarkObj(pResult, pScDrawView->GetSdrPageView());
+                return true;
             }
         }
     }
commit 3c095024dc9e6a72759d44038dbc4a67fb4f4bc9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:30:20 2014 +0000

    coverity#1187662 Unchecked dynamic_cast
    
    Change-Id: Iefe4021d6140614e73f2626f5da7a75a7beea979

diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index ef3b9f7..d8aa419 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -597,8 +597,12 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
         {
             // #i68520#
             const SwAnchoredObject* pAnchoredObjTmp = (*mpAnchoredObjList)[i];
-            if( mpCurrAnchoredObj != pAnchoredObjTmp &&
-                dynamic_cast<const SwFlyFrm*>(pAnchoredObjTmp) )
+            if (mpCurrAnchoredObj == pAnchoredObjTmp)
+                continue;
+
+            // #i68520#
+            const SwFlyFrm* pFly = dynamic_cast<const SwFlyFrm*>(pAnchoredObjTmp);
+            if (pFly)
             {
                 // #i68520#
                 const SwFmtSurround& rSur = pAnchoredObjTmp->GetFrmFmt().GetSurround();
@@ -606,8 +610,6 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
                 // OD 24.01.2003 #106593# - correct clipping of fly frame area.
                 // Consider that fly frame background/shadow can be transparent
                 // and <SwAlignRect(..)> fly frame area
-                // #i68520#
-                const SwFlyFrm* pFly = dynamic_cast<const SwFlyFrm*>(pAnchoredObjTmp);
                 // #i47804# - consider transparent graphics
                 // and OLE objects.
                 bool bClipFlyArea =
commit d9404f150d9389eead85498a12e1f20dcccb6d5e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:26:54 2014 +0000

    coverity#1187661 Unchecked dynamic_cast
    
    Change-Id: I66f8382c7dd7ab8d115204fe45d6a33ff77adb78

diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 75c997f..bfd6b4a 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -544,9 +544,9 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const :
                     if(bIsAnimation)
                     {
                         SdrObjGroup* pGroup = dynamic_cast< SdrObjGroup* >(pObj);
-                        SdPage* pPage = dynamic_cast< SdPage* >(pGroup->GetPage());
+                        SdPage* pPage = pGroup ? dynamic_cast< SdPage* >(pGroup->GetPage()) : NULL;
 
-                        if(pGroup && pPage)
+                        if (pPage)
                         {
                             // #i42894# Animated Group object, migrate that effect
                             EffectMigration::CreateAnimatedGroup(*pGroup, *pPage);
commit 583c0ee3e114a91548a229ef6a50932577f40133
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:24:56 2014 +0000

    coverity#1187660 Dereference after null check
    
    Change-Id: I41a05e34c9b1dd312602f2c499793a4568473394

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index fa061d7..e45874d 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -605,9 +605,17 @@ void PushButton::ImplInitPushButtonData()
     mbInUserDraw    = false;
 }
 
+<<<namespace
+{
+    Window* getPreviousSibling(Window *pParent)
+    {
+        return pParent ? pParent->GetWindow(WINDOW_LASTCHILD) : NULL;
+    }
+}
+
 void PushButton::ImplInit( Window* pParent, WinBits nStyle )
 {
-    nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
+    nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
     Button::ImplInit( pParent, nStyle, NULL );
 
     if ( nStyle & WB_NOLIGHTBORDER )
@@ -1808,7 +1816,7 @@ void RadioButton::ImplInitRadioButtonData()
 
 void RadioButton::ImplInit( Window* pParent, WinBits nStyle )
 {
-    nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
+    nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
     Button::ImplInit( pParent, nStyle, NULL );
 
     ImplInitSettings( true, true, true );
@@ -2930,7 +2938,7 @@ void CheckBox::ImplInitCheckBoxData()
 
 void CheckBox::ImplInit( Window* pParent, WinBits nStyle )
 {
-    nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
+    nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
     Button::ImplInit( pParent, nStyle, NULL );
 
     ImplInitSettings( true, true, true );
commit 43d42775cb9e1d1c4a9abb415321963916b76db3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:21:10 2014 +0000

    coverity#1187659 Dereference after null check
    
    Change-Id: I31b1a55a72be7fac80cd7bbac52b723d7e33a13a

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 9ec2a83..8abf77f 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -944,6 +944,10 @@ void PrintDialog::setupOptionalUI()
             TabPage *pPage = get<TabPage>(aID);
             if (!pPage && mpCustomOptionsUIBuilder)
                 pPage = mpCustomOptionsUIBuilder->get<TabPage>(aID);
+
+            if (!pPage)
+                continue;
+
             sal_uInt16 nPageId = mpTabCtrl->GetPageId(*pPage);
 
             mpTabCtrl->SetPageText(nPageId, aText);
@@ -964,6 +968,9 @@ void PrintDialog::setupOptionalUI()
             if (!pFrame && mpCustomOptionsUIBuilder)
                 pFrame = mpCustomOptionsUIBuilder->get<Window>(aID);
 
+            if (!pFrame)
+                continue;
+
             pFrame->SetText(aText);
 
             // set help id
@@ -1002,6 +1009,9 @@ void PrintDialog::setupOptionalUI()
             if (!pNewBox && mpCustomOptionsUIBuilder)
                 pNewBox = mpCustomOptionsUIBuilder->get<CheckBox>(aID);
 
+            if (!pNewBox)
+                continue;
+
             pNewBox->SetText( aText );
             pNewBox->Show();
 
@@ -1036,6 +1046,9 @@ void PrintDialog::setupOptionalUI()
                 if (!pBtn && mpCustomOptionsUIBuilder)
                     pBtn = mpCustomOptionsUIBuilder->get<RadioButton>(aID);
 
+                if (!pBtn)
+                    continue;
+
                 pBtn->SetText( aChoices[m] );
                 pBtn->Check( m == nSelectVal );
                 pBtn->SetToggleHdl( LINK( this, PrintDialog, UIOption_RadioHdl ) );
@@ -1059,6 +1072,9 @@ void PrintDialog::setupOptionalUI()
             if (!pList && mpCustomOptionsUIBuilder)
                 pList = mpCustomOptionsUIBuilder->get<ListBox>(aID);
 
+            if (!pList)
+                continue;
+
             // iterate options
             for( sal_Int32 m = 0; m < aChoices.getLength(); m++ )
             {
@@ -1087,6 +1103,9 @@ void PrintDialog::setupOptionalUI()
             if (!pField && mpCustomOptionsUIBuilder)
                 pField = mpCustomOptionsUIBuilder->get<NumericField>(aID);
 
+            if (!pField)
+                continue;
+
             // set min/max and current value
             if( nMinValue != nMaxValue )
             {
@@ -1115,6 +1134,9 @@ void PrintDialog::setupOptionalUI()
             if (!pField && mpCustomOptionsUIBuilder)
                 pField = mpCustomOptionsUIBuilder->get<Edit>(aID);
 
+            if (!pField)
+                continue;
+
             OUString aCurVal;
             PropertyValue* pVal = maPController->getValue( aPropertyName );
             if( pVal && pVal->Value.hasValue() )
commit 3ed04054d3b10a932e0a74d765bc7575ebcc4e85
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:17:48 2014 +0000

    coverity#1187658 Dereference after null check
    
    Change-Id: I4924903f1763c6afc975efb45e43223ee3829951

diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index d5fc03b..7a4e09d 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1758,7 +1758,7 @@ void SplitWindow::ImplDrawAutoHide( bool bInPaint )
                     pSVData->maCtrlData.mpSplitHPinImgList->InsertFromHorizontalBitmap
                         ( ResId( SV_RESID_BITMAP_SPLITHPIN, *pResMgr ), 4, &aNonAlphaMask );
                 }
-                }
+            }
             pImageList = pSVData->maCtrlData.mpSplitHPinImgList;
         }
         else
@@ -1775,7 +1775,10 @@ void SplitWindow::ImplDrawAutoHide( bool bInPaint )
                 }
             }
             pImageList = pSVData->maCtrlData.mpSplitVPinImgList;
-                }
+        }
+
+        if (!pImageList)
+            return;
 
         // Image ermitteln und zurueckgeben
         sal_uInt16 nId;
commit 88a7724f6d10cdb49234e4ef298d9b5ca10d06a2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:12:38 2014 +0000

    coverity#1187650 Logically dead code
    
    Change-Id: I463c8db50f3547d257779177459e0b6c1950e1c6

diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index a1ce9aa..aed47b5 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -307,8 +307,6 @@ void RecoveryUI::impl_doRecovery()
     // and bind it to the used core service
     boost::scoped_ptr<svxdr::TabDialog4Recovery> xWizard(new svxdr::TabDialog4Recovery(m_pParentWindow));
     svxdr::IExtendedTabPage*   pPage1  = new svxdr::RecoveryDialog(xWizard.get(), pCore );
-    svxdr::IExtendedTabPage*   pPage2  = 0;
-    svxdr::IExtendedTabPage*   pPage3  = 0;
 
     xWizard->addTabPage(pPage1);
 
@@ -317,8 +315,6 @@ void RecoveryUI::impl_doRecovery()
 
     impl_showAllRecoveredDocs();
 
-    delete pPage3 ;
-    delete pPage2 ;
     delete pPage1 ;
 
     delete_pending_crash();
commit 002726d897946117d982d36435859423b52b5b6d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:11:27 2014 +0000

    coverity#1187648 Logically dead code
    
    Change-Id: I9d5425383600fa7c621f58ded52a211f4424575a

diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 6cc0f67..0a3d6d8 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -884,7 +884,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
                             nX += pTab->Frm().Left() - pTable->Frm().Left();
                         pTable = pTab;
                     }
-                    const SwLayoutFrm *pCell = pTable ? pCnt->GetUpper() : 0;
+                    const SwLayoutFrm *pCell = pCnt->GetUpper();
                     while ( pCell && !pCell->IsCellFrm() )
                         pCell = pCell->GetUpper();
 
commit e0e61322778ca76bd0a8b16e2a3763e430a2c07e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:05:41 2014 +0000

    coverity#1187641 Unchecked return value
    
    Change-Id: I6aa43041c503f2a897733d1f0ac8e013a96029dd

diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 0328023..9c4fa20 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -384,29 +384,27 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
     // style for other objects
     if(pScDrawView)
     {
-        SdrObject* pPickObj = 0;
         SdrPageView* pPageView = pScDrawView->GetSdrPageView();
 
         if(pPageView)
         {
-            pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPickObj, pPageView);
-        }
-
-        if(pPickObj)
-        {
-            const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP));
-            SdrObject* pResult = pScDrawView->ApplyGraphicToObject(
-                *pPickObj,
-                rGraphic,
-                aBeginUndo,
-                rFile,
-                rFilter);
-
-            if(pResult)
+            SdrObject* pPickObj = 0;
+            if (pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPickObj, pPageView))
             {
-                // we are done; mark the modified/new object
-                pScDrawView->MarkObj(pResult, pScDrawView->GetSdrPageView());
-                return true;
+                const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP));
+                SdrObject* pResult = pScDrawView->ApplyGraphicToObject(
+                    *pPickObj,
+                    rGraphic,
+                    aBeginUndo,
+                    rFile,
+                    rFilter);
+
+                if (pResult)
+                {
+                    // we are done; mark the modified/new object
+                    pScDrawView->MarkObj(pResult, pScDrawView->GetSdrPageView());
+                    return true;
+                }
             }
         }
     }
commit e874ace32b6cce60de8becca5bd5d137f3996fc8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 10:02:22 2014 +0000

    coverity#1187640 this code has no effect
    
    Change-Id: I526e636fe80001f4cd5c94f0ba1df27134895d83

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 992cbf3..439b3df6 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2699,7 +2699,6 @@ void ToolBox::ImplFormat( bool bResize )
         while ( it != mpData->m_aItems.end() )
         {
             it->maRect = it->maCalcRect;
-            it->maRect.IsOver(aVisibleRect);
             ++it;
         }
     }
commit 71667fe1f2d53552e8f256c21f20e5ba7049516b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 09:58:13 2014 +0000

    coverity#704694 Dereference after null check
    
    Change-Id: I37abe0241080d6ad1094589426d66a5bd2a4f3df

diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 97b5e88..b6773b4 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1110,7 +1110,8 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
             {
                 pViewData->SetOptions( rNewOpt );   // veraendert rOldOpt
                 pViewData->GetDocument()->SetViewOptions( rNewOpt );
-                pDocSh->SetDocumentModified();
+                if (pDocSh)
+                    pDocSh->SetDocumentModified();
                 bRepaint = true;
             }
             if ( bAnchorList )
commit ccf0f7ef03bf98831a3e21b4b1327673a590b918
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 09:55:18 2014 +0000

    coverity#704633 Dereference after null check
    
    Change-Id: I4985249110da93ba67881dcd1c8cd1dc66ae08e2

diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index 631a35b..b0a3c01 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -1196,11 +1196,12 @@ namespace pcr
                 // So, we manually switch this to read-only.
                 if ( xControl.is() && ( xControl->getControlType() == PropertyControlType::Unknown ) )
                 {
-                    Edit* pControlWindowAsEdit = dynamic_cast< Edit* >( rLine.pLine->getControlWindow() );
-                    if ( pControlWindowAsEdit )
-                        pControlWindowAsEdit->SetReadOnly( sal_True );
+                    Window *pWindow = rLine.pLine->getControlWindow();
+                    Edit* pControlWindowAsEdit = dynamic_cast<Edit*>(pWindow);
+                    if (pControlWindowAsEdit)
+                        pControlWindowAsEdit->SetReadOnly(sal_True);
                     else
-                        pControlWindowAsEdit->Enable( false );
+                        pWindow->Enable(false);
                 }
             }
         }
commit 2f52414ec21278fa430d6a3c9f32d1d539833f3a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 09:52:28 2014 +0000

    coverity#1187871 Unused pointer value
    
    Change-Id: I0bb45512b0ad24444e7032f075d8fd6eb1529643

diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 15da21c..9c3e5a6 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1439,7 +1439,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
 
                     DelSelectedObj();
 
-                    pFmt = GetDoc()->InsertDrawObj( *GetCrsr(), *pNewObj, aFrmSet );
+                    GetDoc()->InsertDrawObj( *GetCrsr(), *pNewObj, aFrmSet );
                 }
                 else
                 {
commit 1abc60a5959d64fce5d85a5d9545b7f7bd071d19
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 09:51:28 2014 +0000

    coverity#1187870 Unused pointer value
    
    Change-Id: I53c49e4d91821419978ea068c26090b3072c4319

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 30c98ec..1feb405 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1334,7 +1334,7 @@ void ScCheckListMenuWindow::addDateMember(const OUString& rsName, double nVal, b
     SvTreeListEntry* pDayEntry = maChecks.FindEntry(pMonthEntry, aDayName);
     if (!pDayEntry)
     {
-        pDayEntry = maChecks.InsertEntry(aDayName, pMonthEntry, false);
+        maChecks.InsertEntry(aDayName, pMonthEntry, false);
         Member aMemDay;
         aMemDay.maName = aDayName;
         aMemDay.maRealName = rsName;
commit f61b6894ef8d953b03307c7b27c3a67b9a41bea9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 09:45:04 2014 +0000

    GetContextMenuDown is always true
    
    Change-Id: Ib2ce1dd91cc7bfaf38feca7b056874a2508869e6

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index ba2aae2..588a1b9 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -101,8 +101,6 @@ public:
 
     sal_uInt16                      GetContextMenuClicks() const;
 
-    bool                            GetContextMenuDown() const;
-
     sal_uLong                       GetScrollRepeat() const;
 
     sal_uLong                       GetButtonStartRepeat() const;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index b5b3b60..49a0691 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -68,7 +68,6 @@ struct ImplMouseData
     sal_uInt16                          mnStartDragCode;
     sal_uInt16                          mnContextMenuCode;
     sal_uInt16                          mnContextMenuClicks;
-    bool                                mbContextMenuDown;
     sal_uLong                           mnScrollRepeat;
     sal_uLong                           mnButtonStartRepeat;
     sal_uLong                           mnButtonRepeat;
@@ -260,7 +259,6 @@ ImplMouseData::ImplMouseData()
     mnStartDragCode             = MOUSE_LEFT;
     mnContextMenuCode           = MOUSE_RIGHT;
     mnContextMenuClicks         = 1;
-    mbContextMenuDown           = true;
     mnMiddleButtonAction        = MOUSE_MIDDLE_AUTOSCROLL;
     mnScrollRepeat              = 100;
     mnButtonStartRepeat         = 370;
@@ -282,7 +280,6 @@ ImplMouseData::ImplMouseData( const ImplMouseData& rData )
     mnStartDragCode             = rData.mnStartDragCode;
     mnContextMenuCode           = rData.mnContextMenuCode;
     mnContextMenuClicks         = rData.mnContextMenuClicks;
-    mbContextMenuDown           = rData.mbContextMenuDown;
     mnMiddleButtonAction        = rData.mnMiddleButtonAction;
     mnScrollRepeat              = rData.mnScrollRepeat;
     mnButtonStartRepeat         = rData.mnButtonStartRepeat;
@@ -389,12 +386,6 @@ MouseSettings::GetContextMenuClicks() const
     return mpData->mnContextMenuClicks;
 }
 
-bool
-MouseSettings::GetContextMenuDown() const
-{
-    return mpData->mbContextMenuDown;
-}
-
 sal_uLong
 MouseSettings::GetScrollRepeat() const
 {
@@ -519,7 +510,6 @@ bool MouseSettings::operator ==( const MouseSettings& rSet ) const
          (mpData->mnStartDragCode       == rSet.mpData->mnStartDragCode)        &&
          (mpData->mnContextMenuCode     == rSet.mpData->mnContextMenuCode)      &&
          (mpData->mnContextMenuClicks   == rSet.mpData->mnContextMenuClicks)    &&
-         (mpData->mbContextMenuDown     == rSet.mpData->mbContextMenuDown)      &&
          (mpData->mnMiddleButtonAction  == rSet.mpData->mnMiddleButtonAction)   &&
          (mpData->mnScrollRepeat        == rSet.mpData->mnScrollRepeat)         &&
          (mpData->mnButtonStartRepeat   == rSet.mpData->mnButtonStartRepeat)    &&
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index b81fb9d..003795a 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -820,11 +820,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeav
                 if ( (nCode == rMSettings.GetContextMenuCode()) &&
                      (nClicks == rMSettings.GetContextMenuClicks()) )
                 {
-                    bool bContextMenu;
-                    if ( rMSettings.GetContextMenuDown() )
-                        bContextMenu = (nSVEvent == EVENT_MOUSEBUTTONDOWN);
-                    else
-                        bContextMenu = (nSVEvent == EVENT_MOUSEBUTTONUP);
+                    bool bContextMenu = (nSVEvent == EVENT_MOUSEBUTTONDOWN);
                     if ( bContextMenu )
                     {
                         if( pSVData->maAppData.mpActivePopupMenu )
commit cb40b7d2f9902b5fbe89333c4107d72c156b9a15
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 27 09:42:05 2014 +0000

    callcatcher: update unused code
    
    Change-Id: I560471a3c2ac9d8ccf759fca1d8c30ae00d73484

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 981c02f..ba2aae2 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -95,37 +95,21 @@ public:
     void                            SetStartDragHeight( long nDragHeight );
     long                            GetStartDragHeight() const;
 
-    void                            SetStartDragCode( sal_uInt16 nCode );
     sal_uInt16                      GetStartDragCode() const;
 
-    void                            SetDragMoveCode( sal_uInt16 nCode );
-    sal_uInt16                      GetDragMoveCode() const;
-
-    void                            SetDragCopyCode( sal_uInt16 nCode );
-    sal_uInt16                      GetDragCopyCode() const;
-
-    void                            SetDragLinkCode( sal_uInt16 nCode );
-    sal_uInt16                      GetDragLinkCode() const;
-
-    void                            SetContextMenuCode( sal_uInt16 nCode );
     sal_uInt16                      GetContextMenuCode() const;
 
-    void                            SetContextMenuClicks( sal_uInt16 nClicks );
     sal_uInt16                      GetContextMenuClicks() const;
 
-    void                            SetContextMenuDown( bool bDown );
     bool                            GetContextMenuDown() const;
 
-    void                            SetScrollRepeat( sal_uLong nRepeat );
     sal_uLong                       GetScrollRepeat() const;
 
-    void                            SetButtonStartRepeat( sal_uLong nRepeat );
     sal_uLong                       GetButtonStartRepeat() const;
 
     void                            SetButtonRepeat( sal_uLong nRepeat );
     sal_uLong                       GetButtonRepeat() const;
 
-    void                            SetActionDelay( sal_uLong nDelay );
     sal_uLong                       GetActionDelay() const;
 
     void                            SetMenuDelay( sal_uLong nDelay );
@@ -200,8 +184,6 @@ struct FrameStyle
     | DRAGFULL_OPTION_DOCKING     | DRAGFULL_OPTION_SPLIT      \
     | DRAGFULL_OPTION_SCROLL )
 
-#define LOGO_DISPLAYTIME_STARTTIME  ((sal_uLong)0xFFFFFFFF)
-
 #define SELECTION_OPTION_WORD       ((sal_uLong)0x00000001)
 #define SELECTION_OPTION_FOCUS      ((sal_uLong)0x00000002)
 #define SELECTION_OPTION_INVERT     ((sal_uLong)0x00000004)
@@ -368,7 +350,6 @@ public:
     void                            SetVisitedLinkColor( const Color& rColor );
     const Color&                    GetVisitedLinkColor() const;
 
-    void                            SetHighlightLinkColor( const Color& rColor );
     const Color&                    GetHighlightLinkColor() const;
 
     void                            SetMonoColor( const Color& rColor );
@@ -452,7 +433,6 @@ public:
     void                            SetIconFont( const Font& rFont );
     const Font&                     GetIconFont() const;
 
-    void                            SetBorderSize( long nSize );
     long                            GetBorderSize() const;
 
     void                            SetTitleHeight( long nSize );
@@ -461,12 +441,8 @@ public:
     void                            SetFloatTitleHeight( long nSize );
     long                            GetFloatTitleHeight() const;
 
-    void                            SetTearOffTitleHeight( long nSize );
     long                            GetTearOffTitleHeight() const;
 
-    void                            SetMenuBarHeight( long nSize );
-    long                            GetMenuBarHeight() const;
-
     void                            SetScrollBarSize( long nSize );
     long                            GetScrollBarSize() const;
 
@@ -476,15 +452,8 @@ public:
     void                            SetSpinSize( long nSize );
     long                            GetSpinSize() const;
 
-    void                            SetSplitSize( long nSize );
     long                            GetSplitSize() const;
 
-    void                            SetIconHorzSpace( long nSpace );
-    long                            GetIconHorzSpace() const;
-
-    void                            SetIconVertSpace( long nSpace );
-    long                            GetIconVertSpace() const;
-
     void                            SetCursorSize( long nSize );
     long                            GetCursorSize() const;
 
@@ -497,15 +466,9 @@ public:
     void                            SetScreenFontZoom( sal_uInt16 nPercent );
     sal_uInt16                      GetScreenFontZoom() const;
 
-    void                            SetLogoDisplayTime( sal_uLong nDisplayTime );
-    sal_uLong                       GetLogoDisplayTime() const;
-
     void                            SetDragFullOptions( sal_uLong nOptions );
     sal_uLong                       GetDragFullOptions() const;
 
-    void                            SetAnimationOptions( sal_uLong nOptions );
-    sal_uLong                       GetAnimationOptions() const;
-
     void                            SetSelectionOptions( sal_uLong nOptions );
     sal_uLong                       GetSelectionOptions() const;
 
@@ -554,9 +517,6 @@ public:
      */
     void                            SetPreferredIconTheme(const OUString&);
 
-    const Wallpaper&                GetWorkspaceGradient() const;
-    void                            SetWorkspaceGradient( const Wallpaper& rWall );
-
     const DialogStyle&              GetDialogStyle() const;
     void                            SetDialogStyle( const DialogStyle& rStyle );
 
@@ -572,9 +532,7 @@ public:
 
     // TopLeft (default RGB_COLORDATA(0xC0, 0xC0, 0xC0)) and BottomRight (default RGB_COLORDATA(0x40, 0x40, 0x40))
     // default colors for EdgeBlending
-    void                            SetEdgeBlendingTopLeftColor(const Color& rTopLeft);
     const Color&                    GetEdgeBlendingTopLeftColor() const;
-    void                            SetEdgeBlendingBottomRightColor(const Color& rBottomRight);
     const Color&                    GetEdgeBlendingBottomRightColor() const;
 
     // maximum line count for ListBox control; to use this, call AdaptDropDownLineCountToMaximum() at the
@@ -591,21 +549,11 @@ public:
 
     // maximum row/line count for the ColorValueSet control. If more lines would be needed, a scrollbar will
     // be used. Default is 40.
-    void                            SetColorValueSetMaximumRowCount(sal_uInt16 nCount);
     sal_uInt16                      GetColorValueSetMaximumRowCount() const;
 
-    // the logical size for preview graphics in the ListBoxes (e.g. FillColor, FillGradient, FillHatch, FillGraphic, ..). The
-    // default defines a UI-Scale independent setting which will be scaled using MAP_APPFONT. This ensures that the size will
-    // fit independent from the used SystemFont (as all the ressources for UI elements). The default is Size(15, 7) which gives
-    // the correct height and a decent width. Do not change the height, but you may adapt the width to change the preview width.
-    // GetListBoxPreviewDefaultPixelSize() is for convenience so that not everyone has to do the scaling itself and contains
-    // the logical size scaled by MAP_APPFONT.
-    void                            SetListBoxPreviewDefaultLogicSize(const Size& rSize);
-    const Size&                     GetListBoxPreviewDefaultLogicSize() const;
     const Size&                     GetListBoxPreviewDefaultPixelSize() const;
 
     // the default LineWidth for ListBox UI previews (LineStyle, LineDash, LineStartEnd). Default is 1.
-    void                            SetListBoxPreviewDefaultLineWidth(sal_uInt16 nWidth);
     sal_uInt16                      GetListBoxPreviewDefaultLineWidth() const;
 
     // defines if previews which containn potentially transparent objects (e.g. the dash/line/LineStartEnd previews and others)
@@ -660,13 +608,9 @@ public:
                                     HelpSettings();
                                     ~HelpSettings();
 
-    void                            SetOptions( sal_uLong nOptions );
-    sal_uLong                       GetOptions() const;
-    void                            SetTipDelay( sal_uLong nTipDelay );
     sal_uLong                       GetTipDelay() const;
     void                            SetTipTimeout( sal_uLong nTipTimeout );
     sal_uLong                       GetTipTimeout() const;
-    void                            SetBalloonDelay( sal_uLong nBalloonDelay );
     sal_uLong                       GetBalloonDelay() const;
 
     bool                            operator ==( const HelpSettings& rSet ) const;
@@ -729,9 +673,6 @@ public:
     const vcl::I18nHelper&                  GetLocaleI18nHelper() const;
     const vcl::I18nHelper&                  GetUILocaleI18nHelper() const;
 
-    void                                    SetSystemUpdate( sal_uLong nUpdate );
-    sal_uLong                               GetSystemUpdate() const;
-    void                                    SetWindowUpdate( sal_uLong nUpdate );
     sal_uLong                               GetWindowUpdate() const;
 
     sal_uLong                               Update( sal_uLong nFlags, const AllSettings& rSettings );
diff --git a/unusedcode.easy b/unusedcode.easy
index 495c4ec..c3a47d0 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -8,6 +8,8 @@ CodeCompleteDataCache::SetVars(boost::unordered::unordered_map<rtl::OUString, bo
 CodeCompleteDataCache::print() const
 ComboBox::GetMRUCount() const
 ConfigurationAccess::getPath(rtl::OUString const&)
+DocxSdrExport::getFlyFrameGraphic()
+DocxSdrExport::setFlyFrameGraphic(bool)
 DocxSdrExport::setFrameBtLr(bool)
 EditEngine::IsIdleFormatterActive() const
 EditSelection::IsInvalid() const
@@ -75,6 +77,14 @@ SimpleErrorHandler::SimpleErrorHandler()
 SmFontPickList::Contains(Font const&) const
 SmParser::Insert(rtl::OUString const&, int)
 SotFactory::Find(SvGlobalName const&)
+StyleSettings::SetActiveColor2(Color const&)
+StyleSettings::SetDeactiveColor2(Color const&)
+StyleSettings::SetFloatTitleHeight(long)
+StyleSettings::SetHideDisabledMenuItems(bool)
+StyleSettings::SetSpinSize(long)
+StyleSettings::SetTitleHeight(long)
+StyleSettings::SetUseFlatBorders(bool)
+StyleSettings::SetUseFlatMenus(bool)
 SvdProgressInfo::ReportError()
 SvpSalInstance::PostedEventsInQueue()
 SvtAccessibilityOptions::GetColorValueSetColumnCount() const
@@ -286,6 +296,7 @@ sdr::table::Cell::getName()
 sdr::table::SdrTableObj::getRowCount() const
 sfx2::sidebar::ContextList::IsEmpty()
 sfx2::sidebar::Deck::PrintWindowTree(std::vector<sfx2::sidebar::Panel*, std::allocator<sfx2::sidebar::Panel*> > const&)
+sfx2::sidebar::EnumContext::EvaluateMatch(sfx2::sidebar::EnumContext const&) const
 sfx2::sidebar::EnumContext::GetContext() const
 sfx2::sidebar::Paint::Set(sfx2::sidebar::Paint const&)
 sfx2::sidebar::Panel::PrintWindowTree()
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 6831400..b5b3b60 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -66,9 +66,6 @@ struct ImplMouseData
     long                            mnStartDragWidth;
     long                            mnStartDragHeight;
     sal_uInt16                          mnStartDragCode;
-    sal_uInt16                          mnDragMoveCode;
-    sal_uInt16                          mnDragCopyCode;
-    sal_uInt16                          mnDragLinkCode;
     sal_uInt16                          mnContextMenuCode;
     sal_uInt16                          mnContextMenuClicks;
     bool                                mbContextMenuDown;
@@ -160,15 +157,10 @@ struct ImplStyleData
     long                            mnSplitSize;
     long                            mnSpinSize;
     long                            mnCursorSize;
-    long                            mnMenuBarHeight;
-    long                            mnIconHorzSpace;
-    long                            mnIconVertSpace;
     long                            mnAntialiasedMin;
     sal_uLong                       mnCursorBlinkTime;
     sal_uLong                       mnDragFullOptions;
-    sal_uLong                       mnAnimationOptions;
     sal_uLong                       mnSelectionOptions;
-    sal_uLong                       mnLogoDisplayTime;
     sal_uLong                       mnDisplayOptions;
     sal_uLong                       mnToolbarIconSize;
     bool                            mnUseFlatMenus;
@@ -194,7 +186,6 @@ struct ImplStyleData
     //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
     //primary means scroll by single page. Secondary button takes the alternative behaviour
     bool                            mbPrimaryButtonWarpsSlider;
-    Wallpaper                       maWorkspaceGradient;
     DialogStyle                     maDialogStyle;
     FrameStyle                      maFrameStyle;
     const void*                     mpFontOptions;
@@ -249,7 +240,6 @@ struct ImplAllSettingsData
     MiscSettings                            maMiscSettings;
     HelpSettings                            maHelpSettings;
     LanguageTag                             maLocale;
-    sal_uLong                               mnSystemUpdate;
     sal_uLong                               mnWindowUpdate;
     LanguageTag                             maUILocale;
     LocaleDataWrapper*                      mpLocaleDataWrapper;
@@ -268,9 +258,6 @@ ImplMouseData::ImplMouseData()
     mnStartDragWidth            = 2;
     mnStartDragHeight           = 2;
     mnStartDragCode             = MOUSE_LEFT;
-    mnDragMoveCode              = 0;
-    mnDragCopyCode              = KEY_MOD1;
-    mnDragLinkCode              = KEY_SHIFT | KEY_MOD1;
     mnContextMenuCode           = MOUSE_RIGHT;
     mnContextMenuClicks         = 1;
     mbContextMenuDown           = true;
@@ -293,9 +280,6 @@ ImplMouseData::ImplMouseData( const ImplMouseData& rData )
     mnStartDragWidth            = rData.mnStartDragWidth;
     mnStartDragHeight           = rData.mnStartDragHeight;
     mnStartDragCode             = rData.mnStartDragCode;
-    mnDragMoveCode              = rData.mnDragMoveCode;
-    mnDragCopyCode              = rData.mnDragCopyCode;
-    mnDragLinkCode              = rData.mnDragLinkCode;
     mnContextMenuCode           = rData.mnContextMenuCode;
     mnContextMenuClicks         = rData.mnContextMenuClicks;
     mbContextMenuDown           = rData.mbContextMenuDown;
@@ -387,117 +371,36 @@ MouseSettings::GetStartDragHeight() const
     return mpData->mnStartDragHeight;
 }
 
-
-void
-MouseSettings::SetStartDragCode( sal_uInt16 nCode )
-{
-    CopyData(); mpData->mnStartDragCode = nCode;
-}
-
 sal_uInt16
 MouseSettings::GetStartDragCode() const
 {
     return mpData->mnStartDragCode;
 }
 
-void
-MouseSettings::SetDragMoveCode( sal_uInt16 nCode )
-{
-    CopyData();
-    mpData->mnDragMoveCode = nCode;
-}
-
-sal_uInt16
-MouseSettings::GetDragMoveCode() const
-{
-    return mpData->mnDragMoveCode;
-}
-
-void
-MouseSettings::SetDragCopyCode( sal_uInt16 nCode )
-{
-    CopyData();
-    mpData->mnDragCopyCode = nCode;
-}
-
-sal_uInt16
-MouseSettings::GetDragCopyCode() const
-{
-    return mpData->mnDragCopyCode;
-}
-
-void
-MouseSettings::SetDragLinkCode( sal_uInt16 nCode )
-{
-    CopyData();
-    mpData->mnDragLinkCode = nCode;
-}
-
-sal_uInt16
-MouseSettings::GetDragLinkCode() const
-{
-    return mpData->mnDragLinkCode;
-}
-
-void
-MouseSettings::SetContextMenuCode( sal_uInt16 nCode )
-{
-    CopyData();
-    mpData->mnContextMenuCode = nCode;
-}
-
 sal_uInt16
 MouseSettings::GetContextMenuCode() const
 {
     return mpData->mnContextMenuCode;
 }
 
-void
-MouseSettings::SetContextMenuClicks( sal_uInt16 nClicks )
-{
-    CopyData();
-    mpData->mnContextMenuClicks = nClicks;
-}
-
 sal_uInt16
 MouseSettings::GetContextMenuClicks() const
 {
     return mpData->mnContextMenuClicks;
 }
 
-void
-MouseSettings::SetContextMenuDown( bool bDown )
-{
-    CopyData();
-    mpData->mbContextMenuDown = bDown;
-}
-
 bool
 MouseSettings::GetContextMenuDown() const
 {
     return mpData->mbContextMenuDown;
 }
 
-void
-MouseSettings::SetScrollRepeat( sal_uLong nRepeat )
-{
-    CopyData();
-    mpData->mnScrollRepeat = nRepeat;
-}
-
 sal_uLong
 MouseSettings::GetScrollRepeat() const
 {
     return mpData->mnScrollRepeat;
 }
 
-void
-MouseSettings::SetButtonStartRepeat( sal_uLong nRepeat )
-{
-    CopyData();
-    mpData->mnButtonStartRepeat = nRepeat;
-}
-
 sal_uLong
 MouseSettings::GetButtonStartRepeat() const
 {
@@ -517,13 +420,6 @@ MouseSettings::GetButtonRepeat() const
     return mpData->mnButtonRepeat;
 }
 
-void
-MouseSettings::SetActionDelay( sal_uLong nDelay )
-{
-    CopyData();
-    mpData->mnActionDelay = nDelay;
-}
-
 sal_uLong
 MouseSettings::GetActionDelay() const
 {
@@ -621,9 +517,6 @@ bool MouseSettings::operator ==( const MouseSettings& rSet ) const
          (mpData->mnStartDragWidth      == rSet.mpData->mnStartDragWidth)       &&
          (mpData->mnStartDragHeight     == rSet.mpData->mnStartDragHeight)      &&
          (mpData->mnStartDragCode       == rSet.mpData->mnStartDragCode)        &&
-         (mpData->mnDragMoveCode        == rSet.mpData->mnDragMoveCode)         &&
-         (mpData->mnDragCopyCode        == rSet.mpData->mnDragCopyCode)         &&
-         (mpData->mnDragLinkCode        == rSet.mpData->mnDragLinkCode)         &&
          (mpData->mnContextMenuCode     == rSet.mpData->mnContextMenuCode)      &&
          (mpData->mnContextMenuClicks   == rSet.mpData->mnContextMenuClicks)    &&
          (mpData->mbContextMenuDown     == rSet.mpData->mbContextMenuDown)      &&
@@ -651,16 +544,12 @@ ImplStyleData::ImplStyleData() :
     mnMinThumbSize              = 16;
     mnSplitSize                 = 3;
     mnSpinSize                  = 16;
-    mnIconHorzSpace             = 50;
-    mnIconVertSpace             = 40;
     mnAntialiasedMin            = 0;
     mnCursorSize                = 2;
     mnCursorBlinkTime           = STYLE_CURSOR_NOBLINKTIME;
     mnScreenZoom                = 100;
     mnScreenFontZoom            = 100;
-    mnLogoDisplayTime           = LOGO_DISPLAYTIME_STARTTIME;
     mnDragFullOptions           = DRAGFULL_OPTION_ALL;
-    mnAnimationOptions          = 0;
     mnSelectionOptions          = 0;
     mnDisplayOptions            = 0;
     mnOptions                   = 0;
@@ -746,7 +635,6 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
     maIconFont( rData.maIconFont ),
     maGroupFont( rData.maGroupFont ),
     mIconTheme(rData.mIconTheme),
-    maWorkspaceGradient( rData.maWorkspaceGradient ),
     maDialogStyle( rData.maDialogStyle ),
     maFrameStyle( rData.maFrameStyle ),
     maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
@@ -757,21 +645,16 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
     mnTitleHeight               = rData.mnTitleHeight;
     mnFloatTitleHeight          = rData.mnFloatTitleHeight;
     mnTearOffTitleHeight        = rData.mnTearOffTitleHeight;
-    mnMenuBarHeight             = rData.mnMenuBarHeight;
     mnScrollBarSize             = rData.mnScrollBarSize;
     mnMinThumbSize              = rData.mnMinThumbSize;
     mnSplitSize                 = rData.mnSplitSize;
     mnSpinSize                  = rData.mnSpinSize;
-    mnIconHorzSpace             = rData.mnIconHorzSpace;
-    mnIconVertSpace             = rData.mnIconVertSpace;
     mnAntialiasedMin            = rData.mnAntialiasedMin;
     mnCursorSize                = rData.mnCursorSize;
     mnCursorBlinkTime           = rData.mnCursorBlinkTime;
     mnScreenZoom                = rData.mnScreenZoom;
     mnScreenFontZoom            = rData.mnScreenFontZoom;
-    mnLogoDisplayTime           = rData.mnLogoDisplayTime;
     mnDragFullOptions           = rData.mnDragFullOptions;
-    mnAnimationOptions          = rData.mnAnimationOptions;
     mnSelectionOptions          = rData.mnSelectionOptions;
     mnDisplayOptions            = rData.mnDisplayOptions;
     mnOptions                   = rData.mnOptions;
@@ -877,7 +760,6 @@ void ImplStyleData::SetStandardStyles()
     mnTitleHeight               = 18;
     mnFloatTitleHeight          = 13;
     mnTearOffTitleHeight        = 8;
-    mnMenuBarHeight             = 14;
     mbHighContrast              = false;
     mbUseSystemUIFonts          = true;
     mnUseFlatBorders            = false;
@@ -887,9 +769,6 @@ void ImplStyleData::SetStandardStyles()
     mbHideDisabledMenuItems     = false;
     mbAcceleratorsInContextMenus = true;
     mbPrimaryButtonWarpsSlider = false;
-
-    Gradient aGrad( GradientStyle_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
-    maWorkspaceGradient = Wallpaper( aGrad );
 }
 
 StyleSettings::StyleSettings()
@@ -1473,20 +1352,12 @@ StyleSettings::GetVisitedLinkColor() const
     return mpData->maVisitedLinkColor;
 }
 
-void
-StyleSettings::SetHighlightLinkColor( const Color& rColor )
-{
-    CopyData();
-    mpData->maHighlightLinkColor = rColor;
-}
-
 const Color&
 StyleSettings::GetHighlightLinkColor() const
 {
     return mpData->maHighlightLinkColor;
 }
 
-
 void
 StyleSettings::SetMonoColor( const Color& rColor )
 {
@@ -1822,14 +1693,6 @@ StyleSettings::GetIconFont() const
     return mpData->maIconFont;
 }
 
-
-void
-StyleSettings::SetBorderSize( long nSize )
-{
-    CopyData();
-    mpData->mnBorderSize = nSize;
-}
-
 long
 StyleSettings::GetBorderSize() const
 {
@@ -1862,13 +1725,6 @@ StyleSettings::GetFloatTitleHeight() const
     return mpData->mnFloatTitleHeight;
 }
 
-void
-StyleSettings::SetTearOffTitleHeight( long nSize )
-{
-    CopyData();
-    mpData->mnTearOffTitleHeight = nSize;
-}
-
 long
 StyleSettings::GetTearOffTitleHeight() const
 {
@@ -1876,19 +1732,6 @@ StyleSettings::GetTearOffTitleHeight() const
 }
 
 void
-StyleSettings::SetMenuBarHeight( long nSize )
-{
-    CopyData();
-    mpData->mnMenuBarHeight = nSize;
-}
-
-long
-StyleSettings::GetMenuBarHeight() const
-{
-    return mpData->mnMenuBarHeight;
-}
-
-void
 StyleSettings::SetScrollBarSize( long nSize )
 {
     CopyData();
@@ -1927,47 +1770,12 @@ StyleSettings::GetSpinSize() const
     return mpData->mnSpinSize;
 }
 
-void
-StyleSettings::SetSplitSize( long nSize )
-{
-    CopyData();
-    mpData->mnSplitSize = nSize;
-}
-
 long
 StyleSettings::GetSplitSize() const
 {
     return mpData->mnSplitSize;
 }
 
-
-void
-StyleSettings::SetIconHorzSpace( long nSpace )
-{
-    CopyData();
-    mpData->mnIconHorzSpace = nSpace;
-}
-
-long
-StyleSettings::GetIconHorzSpace() const
-{
-    return mpData->mnIconHorzSpace;
-}
-
-void
-StyleSettings::SetIconVertSpace( long nSpace )
-{
-    CopyData();
-    mpData->mnIconVertSpace = nSpace;
-}
-
-long
-StyleSettings::GetIconVertSpace() const
-{
-    return mpData->mnIconVertSpace;
-}
-
-
 void
 StyleSettings::SetCursorSize( long nSize )
 {
@@ -2021,21 +1829,6 @@ StyleSettings::GetScreenFontZoom() const
     return mpData->mnScreenFontZoom;
 }
 
-
-void
-StyleSettings::SetLogoDisplayTime( sal_uLong nDisplayTime )
-{
-    CopyData();
-    mpData->mnLogoDisplayTime = nDisplayTime;
-}
-
-sal_uLong
-StyleSettings::GetLogoDisplayTime() const
-{
-    return mpData->mnLogoDisplayTime;
-}
-
-
 void
 StyleSettings::SetDragFullOptions( sal_uLong nOptions )
 {
@@ -2049,21 +1842,6 @@ StyleSettings::GetDragFullOptions() const
     return mpData->mnDragFullOptions;
 }
 
-
-void
-StyleSettings::SetAnimationOptions( sal_uLong nOptions )
-{
-    CopyData();
-    mpData->mnAnimationOptions = nOptions;
-}
-
-sal_uLong
-StyleSettings::GetAnimationOptions() const
-{
-    return mpData->mnAnimationOptions;
-}
-
-
 void
 StyleSettings::SetSelectionOptions( sal_uLong nOptions )
 {
@@ -2153,20 +1931,6 @@ StyleSettings::GetToolbarIconSize() const
     return mpData->mnToolbarIconSize;
 }
 
-const Wallpaper&
-StyleSettings::GetWorkspaceGradient() const
-{
-    return mpData->maWorkspaceGradient;
-}
-
-void
-StyleSettings::SetWorkspaceGradient( const Wallpaper& rWall )
-{
-    CopyData();
-    mpData->maWorkspaceGradient = rWall;
-}
-
-
 const DialogStyle&
 StyleSettings::GetDialogStyle() const
 {
@@ -2207,26 +1971,12 @@ StyleSettings::GetEdgeBlending() const
     return mpData->mnEdgeBlending;
 }
 
-void
-StyleSettings::SetEdgeBlendingTopLeftColor(const Color& rTopLeft)
-{
-    CopyData();
-    mpData->maEdgeBlendingTopLeftColor = rTopLeft;
-}
-
 const Color&
 StyleSettings::GetEdgeBlendingTopLeftColor() const
 {
     return mpData->maEdgeBlendingTopLeftColor;
 }
 
-void
-StyleSettings::SetEdgeBlendingBottomRightColor(const Color& rBottomRight)
-{
-    CopyData();
-    mpData->maEdgeBlendingBottomRightColor = rBottomRight;
-}
-
 const Color&
 StyleSettings::GetEdgeBlendingBottomRightColor() const
 {
@@ -2259,39 +2009,12 @@ StyleSettings::GetColorValueSetColumnCount() const
     return mpData->mnColorValueSetColumnCount;
 }
 
-void
-StyleSettings::SetColorValueSetMaximumRowCount(sal_uInt16 nCount)
-{
-    CopyData();
-    mpData->mnColorValueSetMaximumRowCount = nCount;
-}
-
 sal_uInt16
 StyleSettings::GetColorValueSetMaximumRowCount() const
 {
     return mpData->mnColorValueSetMaximumRowCount;
 }
 
-void
-StyleSettings::SetListBoxPreviewDefaultLogicSize(const Size& rSize)
-{
-    CopyData();
-    mpData->maListBoxPreviewDefaultLogicSize = rSize; mpData->maListBoxPreviewDefaultPixelSize = Size(0, 0);
-}
-
-const Size&
-StyleSettings::GetListBoxPreviewDefaultLogicSize() const
-{
-    return mpData->maListBoxPreviewDefaultLogicSize;
-}
-
-void
-StyleSettings::SetListBoxPreviewDefaultLineWidth(sal_uInt16 nWidth)
-{
-    CopyData();
-    mpData->mnListBoxPreviewDefaultLineWidth = nWidth;
-}
-
 sal_uInt16
 StyleSettings::GetListBoxPreviewDefaultLineWidth() const
 {
@@ -2528,9 +2251,7 @@ bool StyleSettings::operator ==( const StyleSettings& rSet ) const
 
     if ( (mpData->mnOptions                 == rSet.mpData->mnOptions)                  &&
          (mpData->mbAutoMnemonic            == rSet.mpData->mbAutoMnemonic)             &&
-         (mpData->mnLogoDisplayTime         == rSet.mpData->mnLogoDisplayTime)          &&
          (mpData->mnDragFullOptions         == rSet.mpData->mnDragFullOptions)          &&
-         (mpData->mnAnimationOptions        == rSet.mpData->mnAnimationOptions)         &&
          (mpData->mnSelectionOptions        == rSet.mpData->mnSelectionOptions)         &&
          (mpData->mnDisplayOptions          == rSet.mpData->mnDisplayOptions)           &&
          (mpData->mnCursorSize              == rSet.mpData->mnCursorSize)               &&
@@ -2539,13 +2260,10 @@ bool StyleSettings::operator ==( const StyleSettings& rSet ) const
          (mpData->mnTitleHeight             == rSet.mpData->mnTitleHeight)              &&
          (mpData->mnFloatTitleHeight        == rSet.mpData->mnFloatTitleHeight)         &&
          (mpData->mnTearOffTitleHeight      == rSet.mpData->mnTearOffTitleHeight)       &&
-         (mpData->mnMenuBarHeight           == rSet.mpData->mnMenuBarHeight)            &&
          (mpData->mnScrollBarSize           == rSet.mpData->mnScrollBarSize)            &&
          (mpData->mnMinThumbSize            == rSet.mpData->mnMinThumbSize)             &&
          (mpData->mnSplitSize               == rSet.mpData->mnSplitSize)                &&
          (mpData->mnSpinSize                == rSet.mpData->mnSpinSize)                 &&
-         (mpData->mnIconHorzSpace           == rSet.mpData->mnIconHorzSpace)            &&
-         (mpData->mnIconVertSpace           == rSet.mpData->mnIconVertSpace)            &&
          (mpData->mnAntialiasedMin          == rSet.mpData->mnAntialiasedMin)           &&
          (mpData->mnScreenZoom              == rSet.mpData->mnScreenZoom)               &&
          (mpData->mnScreenFontZoom          == rSet.mpData->mnScreenFontZoom)           &&
@@ -2836,7 +2554,6 @@ bool MiscSettings::GetEnableLocalizedDecimalSep() const
 
 ImplHelpData::ImplHelpData()
 {
-    mnOptions                   = 0;
     mnTipDelay                  = 500;
     mnTipTimeout                = 3000;
     mnBalloonDelay              = 1500;
@@ -2844,7 +2561,6 @@ ImplHelpData::ImplHelpData()
 
 ImplHelpData::ImplHelpData( const ImplHelpData& rData )
 {
-    mnOptions                   = rData.mnOptions;
     mnTipDelay                  = rData.mnTipDelay;
     mnTipTimeout                = rData.mnTipTimeout;
     mnBalloonDelay              = rData.mnBalloonDelay;
@@ -2881,26 +2597,6 @@ bool HelpSettings::operator ==( const HelpSettings& rSet ) const
         return false;
 }
 
-void
-HelpSettings::SetOptions( sal_uLong nOptions )
-{
-    CopyData();
-    mpData->mnOptions = nOptions;
-}
-
-sal_uLong
-HelpSettings::GetOptions() const
-{
-    return mpData->mnOptions;
-}
-
-void
-HelpSettings::SetTipDelay( sal_uLong nTipDelay )
-{
-    CopyData();
-    mpData->mnTipDelay = nTipDelay;
-}
-
 sal_uLong
 HelpSettings::GetTipDelay() const
 {
@@ -2920,13 +2616,6 @@ HelpSettings::GetTipTimeout() const
     return mpData->mnTipTimeout;
 }
 
-void
-HelpSettings::SetBalloonDelay( sal_uLong nBalloonDelay )
-{
-    CopyData();
-    mpData->mnBalloonDelay = nBalloonDelay;
-}
-
 sal_uLong
 HelpSettings::GetBalloonDelay() const
 {
@@ -2944,7 +2633,6 @@ ImplAllSettingsData::ImplAllSettingsData()
         maLocale( LANGUAGE_SYSTEM ),
         maUILocale( LANGUAGE_SYSTEM )
 {
-    mnSystemUpdate              = SETTINGS_ALLSETTINGS;
     mnWindowUpdate              = SETTINGS_ALLSETTINGS;
     mpLocaleDataWrapper         = NULL;
     mpUILocaleDataWrapper       = NULL;
@@ -2961,7 +2649,6 @@ ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData& rData ) :
     maLocale( rData.maLocale ),
     maUILocale( rData.maUILocale )
 {
-    mnSystemUpdate              = rData.mnSystemUpdate;
     mnWindowUpdate              = rData.mnWindowUpdate;
     // Pointer couldn't shared and objects haven't a copy ctor
     // So we create the cache objects new, if the GetFunction is
@@ -3100,7 +2787,6 @@ bool AllSettings::operator ==( const AllSettings& rSet ) const
          (mpData->maStyleSettings           == rSet.mpData->maStyleSettings)        &&
          (mpData->maMiscSettings            == rSet.mpData->maMiscSettings)         &&
          (mpData->maHelpSettings            == rSet.mpData->maHelpSettings)         &&
-         (mpData->mnSystemUpdate            == rSet.mpData->mnSystemUpdate)         &&
          (mpData->maLocale                  == rSet.mpData->maLocale)               &&
          (mpData->mnWindowUpdate            == rSet.mpData->mnWindowUpdate) )
     {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list