[Libreoffice-commits] core.git: cui/source include/vcl vcl/inc vcl/source vcl/unx

Noel Grandin noel at peralex.com
Fri Apr 1 12:20:21 UTC 2016


 cui/source/dialogs/cuigrfflt.cxx     |    2 +-
 include/vcl/bitmapex.hxx             |    9 ++-------
 include/vcl/builder.hxx              |    4 ++--
 include/vcl/button.hxx               |    6 +++---
 include/vcl/window.hxx               |    2 +-
 vcl/inc/listbox.hxx                  |    2 +-
 vcl/inc/salsession.hxx               |    6 ++----
 vcl/inc/unx/salbmp.h                 |    2 +-
 vcl/source/app/session.cxx           |    2 +-
 vcl/source/control/button.cxx        |   26 +++++++++++---------------
 vcl/source/control/imp_listbox.cxx   |    6 +++---
 vcl/source/control/listbox.cxx       |    2 +-
 vcl/source/edit/textdoc.cxx          |    6 +++---
 vcl/source/edit/textdoc.hxx          |    2 +-
 vcl/source/gdi/animate.cxx           |    4 ++--
 vcl/source/gdi/bitmapex.cxx          |    4 ++--
 vcl/source/gdi/impvect.cxx           |   21 +++++++++------------
 vcl/source/gdi/pdfwriter.cxx         |    2 +-
 vcl/source/gdi/pdfwriter_impl.cxx    |    4 ++--
 vcl/source/gdi/pdfwriter_impl.hxx    |    2 +-
 vcl/source/window/window.cxx         |   33 ++++++++-------------------------
 vcl/unx/generic/app/sm.cxx           |    2 +-
 vcl/unx/generic/gdi/gdiimpl.cxx      |    2 +-
 vcl/unx/generic/gdi/salbmp.cxx       |    6 +++---
 vcl/unx/generic/gdi/xrender_peer.hxx |    6 +++---
 25 files changed, 66 insertions(+), 97 deletions(-)

New commits:
commit 64a06ba4bd35e91acd1d9743f9851904eebd1add
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Apr 1 13:31:59 2016 +0200

    loplugin:constantparam in vcl
    
    Change-Id: I5af0906ced6d0e917b54dee22577fa40d134464c
    Reviewed-on: https://gerrit.libreoffice.org/23719
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 58aa725..3723f81 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -511,7 +511,7 @@ Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, double
     {
         BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
 
-        if( aBmpEx.ReduceColors( nPosterCount, BMP_REDUCE_POPULAR ) )
+        if( aBmpEx.ReduceColors( nPosterCount ) )
             aRet = aBmpEx;
     }
 
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index cdf1414..28e1d89 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -104,19 +104,14 @@ public:
      */
     bool                Convert( BmpConversion eConversion );
 
-    /** Reduce number of colors for the bitmap
+    /** Reduce number of colors for the bitmap using the POPULAR algorithm
 
         @param nNewColorCount
         Maximal number of bitmap colors after the reduce operation
 
-        @param eReduce
-        Algorithm to use for color reduction
-
         @return true, if the color reduction operation was completed successfully.
      */
-    bool                ReduceColors(
-                            sal_uInt16 nNewColorCount,
-                            BmpReduce eReduce = BMP_REDUCE_SIMPLE );
+    bool                ReduceColors( sal_uInt16 nNewColorCount );
 
     /** Apply a dither algorithm to the bitmap
 
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index a1db0f6..1af5bc5 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -130,9 +130,9 @@ private:
     {
         bool m_bVerticalOrient;
         sal_Int32 m_nPosition;
-        PackingData(bool bVerticalOrient = false, sal_Int32 nPosition = -1)
+        PackingData(bool bVerticalOrient = false)
             : m_bVerticalOrient(bVerticalOrient)
-            , m_nPosition(nPosition)
+            , m_nPosition(-1)
         {
         }
     };
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index e6eb446..5f33899 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -54,7 +54,7 @@ public:
     SAL_DLLPRIVATE DrawButtonFlags& ImplGetButtonState();
     SAL_DLLPRIVATE DrawTextFlags    ImplGetTextStyle( OUString& rText, WinBits nWinStyle, DrawFlags nDrawFlags );
     SAL_DLLPRIVATE void             ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize,
-                                              bool bLayout, sal_uLong nImageSep, DrawFlags nDrawFlags,
+                                              sal_uLong nImageSep, DrawFlags nDrawFlags,
                                               DrawTextFlags nTextStyle, Rectangle *pSymbolRect=nullptr, bool bAddImageSep = false );
     SAL_DLLPRIVATE void             ImplSetFocusRect( const Rectangle &rFocusRect );
     SAL_DLLPRIVATE const Rectangle& ImplGetFocusRect() const;
@@ -523,7 +523,7 @@ class VCL_DLLPUBLIC ImageRadioButton : public RadioButton
                     ImageRadioButton & operator= ( const ImageRadioButton & ) = delete;
 
 public:
-    explicit        ImageRadioButton( vcl::Window* pParent, WinBits nStyle = 0 );
+    explicit        ImageRadioButton( vcl::Window* pParent );
 };
 
 
@@ -543,7 +543,7 @@ protected:
     SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext) override;
 
 public:
-    explicit DisclosureButton( vcl::Window* pParent, WinBits nStyle = 0 );
+    explicit DisclosureButton( vcl::Window* pParent );
 
     virtual void    KeyInput( const KeyEvent& rKEvt ) override;
 };
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 2cb6701..5b0fd16 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1187,7 +1187,7 @@ public:
     // transparent background for selected or checked items in toolboxes etc.
     void                                DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder );
     // support rounded edges in the selection rect
-    void                                DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, Color* pSelectionTextColor, Color* pPaintColor );
+    void                                DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, Color* pSelectionTextColor, Color* pPaintColor );
 
     void                                ShowTracking( const Rectangle& rRect,
                                                       sal_uInt16 nFlags = SHOWTRACK_SMALL );
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 25c37f5..863bef6 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -570,7 +570,7 @@ public:
     void            EnableUserDraw( bool bUserDraw )    { mbUserDrawEnabled = bUserDraw; }
     bool            IsUserDrawEnabled() const           { return mbUserDrawEnabled; }
 
-    void DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, bool bDrawText,
+    void DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage,
                    bool bDrawTextAtImagePos = false, bool bLayout = false);
 
     bool GetEdgeBlending() const { return mbEdgeBlending; }
diff --git a/vcl/inc/salsession.hxx b/vcl/inc/salsession.hxx
index 868ad1e..fb9763b 100644
--- a/vcl/inc/salsession.hxx
+++ b/vcl/inc/salsession.hxx
@@ -52,12 +52,10 @@ struct SalSessionInteractionEvent : public SalSessionEvent
 struct SalSessionSaveRequestEvent : public SalSessionEvent
 {
     bool                        m_bShutdown;
-    bool                        m_bCancelable;
 
-    SalSessionSaveRequestEvent( bool bShutdown, bool bCancelable )
+    SalSessionSaveRequestEvent( bool bShutdown )
             : SalSessionEvent( SaveRequest ),
-              m_bShutdown( bShutdown ),
-              m_bCancelable( bCancelable )
+              m_bShutdown( bShutdown )
     {}
 };
 
diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h
index 4239ec6..71823ca 100644
--- a/vcl/inc/unx/salbmp.h
+++ b/vcl/inc/unx/salbmp.h
@@ -229,7 +229,7 @@ public:
                     ImplSalBitmapCache();
                     ~ImplSalBitmapCache();
 
-    void            ImplAdd( X11SalBitmap* pBmp, sal_uIntPtr nMemSize = 0UL, sal_uIntPtr nFlags = 0UL );
+    void            ImplAdd( X11SalBitmap* pBmp, sal_uIntPtr nMemSize = 0UL );
     void            ImplRemove( X11SalBitmap* pBmp );
     void            ImplClear();
 };
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index 96d243e..32917ca 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -218,7 +218,7 @@ void VCLSession::SalSessionEventProc( void* pData, SalSessionEvent* pEvent )
         case SaveRequest:
         {
             SalSessionSaveRequestEvent* pSEv = static_cast<SalSessionSaveRequestEvent*>(pEvent);
-            pThis->callSaveRequested( pSEv->m_bShutdown, pSEv->m_bCancelable );
+            pThis->callSaveRequested( pSEv->m_bShutdown, false );
         }
         break;
         case ShutdownCancel:
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 22e325c..46d9f19 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -248,7 +248,7 @@ DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, DrawF
 }
 
 void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
-                                  Size& rSize, bool bLayout,
+                                  Size& rSize,
                                   sal_uLong nImageSep, DrawFlags nDrawFlags,
                                   DrawTextFlags nTextStyle, Rectangle *pSymbolRect,
                                   bool bAddImageSep)
@@ -264,8 +264,6 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
 
     WinBits nWinStyle = GetStyle();
     Rectangle aOutRect( rPos, rSize );
-    MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
-    OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
     ImageAlign eImageAlign = mpButtonData->meImageAlign;
     Size aImageSize = mpButtonData->maImage.GetSizePixel();
 
@@ -287,7 +285,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
     }
     else if (bDrawText && !bDrawImage && !bHasSymbol)
     {
-        DrawControlText(*pDev, aOutRect, aText, nTextStyle, pVector, pDisplayText);
+        DrawControlText(*pDev, aOutRect, aText, nTextStyle, nullptr, nullptr);
 
         ImplSetFocusRect(aOutRect);
         rSize = aOutRect.GetSize();
@@ -514,7 +512,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
     {
         Rectangle       aTOutRect( aTextPos, aTextSize );
         ImplSetFocusRect( aTOutRect );
-        DrawControlText( *pDev, aTOutRect, aText, nTextStyle, pVector, pDisplayText );
+        DrawControlText( *pDev, aTOutRect, aText, nTextStyle, nullptr, nullptr );
     }
     else
     {
@@ -880,7 +878,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
             aSymbolRect.Right() -= nSymbolSize/2;
             aSymbolRect.Left()  = aSymbolRect.Right() - nSymbolSize;
 
-            ImplDrawAlignedImage( pDev, aPos, aSize, false/*bLayout*/, nImageSep,
+            ImplDrawAlignedImage( pDev, aPos, aSize, nImageSep,
                                   nDrawFlags, nTextStyle, nullptr, true );
         }
         else
@@ -902,7 +900,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
     else
     {
         Rectangle aSymbolRect;
-        ImplDrawAlignedImage( pDev, aPos, aSize, false/*bLayout*/, nImageSep, nDrawFlags,
+        ImplDrawAlignedImage( pDev, aPos, aSize, nImageSep, nDrawFlags,
                               nTextStyle, IsSymbol() ? &aSymbolRect : nullptr, true );
 
         if ( IsSymbol() )
@@ -2046,8 +2044,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
                 aSize.Height() = rImageSize.Height();
             }
 
-            ImplDrawAlignedImage( pDev, aPos, aSize, false/*bLayout*/, 1,
-                                  nDrawFlags, nTextStyle );
+            ImplDrawAlignedImage( pDev, aPos, aSize, 1, nDrawFlags, nTextStyle );
 
             rMouseRect          = Rectangle( aPos, aSize );
             rMouseRect.Left()   = rPos.X();
@@ -3101,8 +3098,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
             aSize.Height() = rImageSize.Height();
         }
 
-        ImplDrawAlignedImage( pDev, aPos, aSize, false/*bLayout*/, 1,
-                              nDrawFlags, nTextStyle );
+        ImplDrawAlignedImage( pDev, aPos, aSize, 1, nDrawFlags, nTextStyle );
         nLineY = aPos.Y() + aSize.Height()/2;
 
         rMouseRect          = Rectangle( aPos, aSize );
@@ -3834,8 +3830,8 @@ void ImageButton::ImplInitStyle()
     SetStyle( nStyle );
 }
 
-ImageRadioButton::ImageRadioButton( vcl::Window* pParent, WinBits nStyle ) :
-    RadioButton( pParent, nStyle )
+ImageRadioButton::ImageRadioButton( vcl::Window* pParent ) :
+    RadioButton( pParent, 0 )
 {
 }
 
@@ -3845,8 +3841,8 @@ TriStateBox::TriStateBox( vcl::Window* pParent, WinBits nStyle ) :
     EnableTriState();
 }
 
-DisclosureButton::DisclosureButton( vcl::Window* pParent, WinBits nStyle ) :
-    CheckBox( pParent, nStyle )
+DisclosureButton::DisclosureButton( vcl::Window* pParent ) :
+    CheckBox( pParent, 0 )
 {
 }
 
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 65a359a..61b9373 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -2738,7 +2738,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
     }
     else
     {
-        DrawEntry(rRenderContext, true, true, false, bLayout);
+        DrawEntry(rRenderContext, true, false, bLayout);
     }
 }
 
@@ -2767,7 +2767,7 @@ void ImplWin::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
     ImplDraw(rRenderContext);
 }
 
-void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos, bool bLayout)
+void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, bool bDrawTextAtImagePos, bool bLayout)
 {
     long nBorder = 1;
     Size aOutSz(GetOutputSizePixel());
@@ -2810,7 +2810,7 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, boo
         }
     }
 
-    if( bDrawText && !maString.isEmpty() )
+    if( !maString.isEmpty() )
     {
         DrawTextFlags nTextStyle = DrawTextFlags::VCenter;
 
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index c2f50bc..3602232 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -1391,7 +1391,7 @@ void ListBox::DrawEntry(const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawTe
     if (rEvt.GetWindow() == mpImplLB->GetMainWindow())
         mpImplLB->GetMainWindow()->DrawEntry(*rEvt.GetRenderContext(), rEvt.GetItemId(), bDrawImage, true/*bDrawText*/, bDrawTextAtImagePos );
     else if (rEvt.GetWindow() == mpImplWin)
-        mpImplWin->DrawEntry(*rEvt.GetRenderContext(), bDrawImage, true/*bDrawText*/, bDrawTextAtImagePos);
+        mpImplWin->DrawEntry(*rEvt.GetRenderContext(), bDrawImage, bDrawTextAtImagePos);
 }
 
 void ListBox::SetUserItemSize( const Size& rSz )
diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx
index eee0acc..866c267 100644
--- a/vcl/source/edit/textdoc.cxx
+++ b/vcl/source/edit/textdoc.cxx
@@ -309,7 +309,7 @@ void TextNode::RemoveText( sal_Int32 nPos, sal_Int32 nChars )
     CollapsAttribs( nPos, nChars );
 }
 
-TextNode* TextNode::Split( sal_Int32 nPos, bool bKeepEndingAttribs )
+TextNode* TextNode::Split( sal_Int32 nPos )
 {
     OUString aNewText;
     if ( nPos < maText.getLength() )
@@ -331,7 +331,7 @@ TextNode* TextNode::Split( sal_Int32 nPos, bool bKeepEndingAttribs )
         {
             // must be copied as an empty attribute
             // !FindAttrib only sensible if traversing backwards through the list!
-            if ( bKeepEndingAttribs && !pNew->maCharAttribs.FindAttrib( rAttrib.Which(), 0 ) )
+            if ( !pNew->maCharAttribs.FindAttrib( rAttrib.Which(), 0 ) )
             {
                 TextCharAttrib* pNewAttrib = new TextCharAttrib( rAttrib );
                 pNewAttrib->GetStart() = 0;
@@ -517,7 +517,7 @@ TextPaM TextDoc::InsertText( const TextPaM& rPaM, const OUString& rStr )
 TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM )
 {
     TextNode* pNode = maTextNodes[ rPaM.GetPara() ];
-    TextNode* pNew = pNode->Split( rPaM.GetIndex(), true/*bKeepEndingAttribs*/ );
+    TextNode* pNew = pNode->Split( rPaM.GetIndex() );
 
     DBG_ASSERT( maTextNodes.size()<SAL_MAX_UINT32, "InsertParaBreak: more than 4Gi paragraphs!" );
     maTextNodes.insert( maTextNodes.begin() + rPaM.GetPara() + 1, pNew );
diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx
index 7ab215d..4e7097c 100644
--- a/vcl/source/edit/textdoc.hxx
+++ b/vcl/source/edit/textdoc.hxx
@@ -85,7 +85,7 @@ public:
     void                InsertText( sal_Int32 nPos, sal_Unicode c );
     void                RemoveText( sal_Int32 nPos, sal_Int32 nChars );
 
-    TextNode*           Split( sal_Int32 nPos, bool bKeepEndigAttribs );
+    TextNode*           Split( sal_Int32 nPos );
     void                Append( const TextNode& rNode );
 };
 
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index fd9260f..f540d5a 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -569,9 +569,9 @@ bool Animation::ReduceColors( sal_uInt16 nNewColorCount )
         bRet = true;
 
         for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i )
-            bRet = maList[ i ]->aBmpEx.ReduceColors( nNewColorCount, BMP_REDUCE_POPULAR );
+            bRet = maList[ i ]->aBmpEx.ReduceColors( nNewColorCount );
 
-        maBitmapEx.ReduceColors( nNewColorCount, BMP_REDUCE_POPULAR );
+        maBitmapEx.ReduceColors( nNewColorCount );
     }
     else
         bRet = false;
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index cef43f7..e12eabd 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -474,9 +474,9 @@ bool BitmapEx::Convert( BmpConversion eConversion )
     return !!aBitmap && aBitmap.Convert( eConversion );
 }
 
-bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce )
+bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount )
 {
-    return !!aBitmap && aBitmap.ReduceColors( nNewColorCount, eReduce );
+    return !!aBitmap && aBitmap.ReduceColors( nNewColorCount, BMP_REDUCE_POPULAR );
 }
 
 bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor, bool bExpandTransparent )
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 4e496f7..dc70e05 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -264,12 +264,11 @@ class ImplChain
 {
 private:
 
-    tools::Polygon maPoly;
+    tools::Polygon  maPoly;
     Point           maStartPt;
-    sal_uLong           mnArraySize;
-    sal_uLong           mnCount;
-    long            mnResize;
-    sal_uInt8*          mpCodes;
+    sal_uLong       mnArraySize;
+    sal_uLong       mnCount;
+    sal_uInt8*      mpCodes;
 
     void            ImplGetSpace();
 
@@ -277,7 +276,7 @@ private:
 
 public:
 
-                    ImplChain( sal_uLong nInitCount = 1024UL, long nResize = -1L );
+                    ImplChain();
                     ~ImplChain();
 
     void            ImplBeginAdd( const Point& rStartPt );
@@ -287,12 +286,10 @@ public:
     const tools::Polygon& ImplGetPoly() const { return maPoly; }
 };
 
-ImplChain::ImplChain( sal_uLong nInitCount, long nResize ) :
-    mnArraySize ( nInitCount ),
-    mnCount     ( 0UL ),
-    mnResize    ( nResize )
+ImplChain::ImplChain() :
+    mnArraySize ( 1024UL ),
+    mnCount     ( 0UL )
 {
-    DBG_ASSERT( nInitCount && nResize, "ImplChain::ImplChain(): invalid parameters!" );
     mpCodes = new sal_uInt8[ mnArraySize ];
 }
 
@@ -306,7 +303,7 @@ void ImplChain::ImplGetSpace()
     const sal_uLong nOldArraySize = mnArraySize;
     sal_uInt8*      pNewCodes;
 
-    mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (sal_uLong) mnResize );
+    mnArraySize = mnArraySize << 1UL;
     pNewCodes = new sal_uInt8[ mnArraySize ];
     memcpy( pNewCodes, mpCodes, nOldArraySize );
     delete[] mpCodes;
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 5bf4bb2..4ea9170 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -447,7 +447,7 @@ PDFOutputStream::~PDFOutputStream()
 
 void PDFWriter::AddStream( const OUString& rMimeType, PDFOutputStream* pStream )
 {
-    xImplementation->addStream( rMimeType, pStream, false/*bCompress*/ );
+    xImplementation->addStream( rMimeType, pStream );
 }
 
 std::set< PDFWriter::ErrorCode > PDFWriter::GetErrors()
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 5989355..8f82437 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -13405,7 +13405,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
     return nNewWidget;
 }
 
-void PDFWriterImpl::addStream( const OUString& rMimeType, PDFOutputStream* pStream, bool bCompress )
+void PDFWriterImpl::addStream( const OUString& rMimeType, PDFOutputStream* pStream )
 {
     if( pStream )
     {
@@ -13415,7 +13415,7 @@ void PDFWriterImpl::addStream( const OUString& rMimeType, PDFOutputStream* pStre
                               ? OUString( rMimeType )
                               : OUString( "application/octet-stream"  );
         rStream.m_pStream = pStream;
-        rStream.m_bCompress = bCompress;
+        rStream.m_bCompress = false;
     }
 }
 
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 12b0379..118f9c9 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -1233,7 +1233,7 @@ public:
     sal_Int32 createControl( const PDFWriter::AnyWidget& rControl, sal_Int32 nPageNr = -1 );
 
     // additional streams
-    void addStream( const OUString& rMimeType, PDFOutputStream* pStream, bool bCompress );
+    void addStream( const OUString& rMimeType, PDFOutputStream* pStream );
 
     // helper: eventually begin marked content sequence and
     // emit a comment in debug case
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a5acdaf..1092c4e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3318,14 +3318,13 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle&
 
 void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder )
 {
-    DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, false/*bDrawExtBorderOnly*/, nullptr, nullptr );
+    DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, nullptr, nullptr );
 }
 
 void Window::DrawSelectionBackground( const Rectangle& rRect,
                                       sal_uInt16 highlight,
                                       bool bChecked,
                                       bool bDrawBorder,
-                                      bool bDrawExtBorderOnly,
                                       Color* pSelectionTextColor,
                                       Color* pPaintColor
                                       )
@@ -3357,13 +3356,6 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
     }
 
     Rectangle aRect( rRect );
-    if( bDrawExtBorderOnly )
-    {
-        --aRect.Left();
-        --aRect.Top();
-        ++aRect.Right();
-        ++aRect.Bottom();
-    }
     Color oldFillCol = GetFillColor();
     Color oldLineCol = GetLineColor();
 
@@ -3426,23 +3418,14 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
         }
     }
 
-    if( bDark && bDrawExtBorderOnly )
+    SetFillColor( aSelectionFillCol );
+    if( pSelectionTextColor )
     {
-        SetFillColor();
-        if( pSelectionTextColor )
-            *pSelectionTextColor = rStyles.GetHighlightTextColor();
-    }
-    else
-    {
-        SetFillColor( aSelectionFillCol );
-        if( pSelectionTextColor )
-        {
-            Color aTextColor = IsControlBackground() ? GetControlForeground() : rStyles.GetButtonTextColor();
-            Color aHLTextColor = rStyles.GetHighlightTextColor();
-            int nTextDiff = abs(aSelectionFillCol.GetLuminance() - aTextColor.GetLuminance());
-            int nHLDiff = abs(aSelectionFillCol.GetLuminance() - aHLTextColor.GetLuminance());
-            *pSelectionTextColor = (nHLDiff >= nTextDiff) ? aHLTextColor : aTextColor;
-        }
+        Color aTextColor = IsControlBackground() ? GetControlForeground() : rStyles.GetButtonTextColor();
+        Color aHLTextColor = rStyles.GetHighlightTextColor();
+        int nTextDiff = abs(aSelectionFillCol.GetLuminance() - aTextColor.GetLuminance());
+        int nHLDiff = abs(aSelectionFillCol.GetLuminance() - aHLTextColor.GetLuminance());
+        *pSelectionTextColor = (nHLDiff >= nTextDiff) ? aHLTextColor : aTextColor;
     }
 
     if( bDark )
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index 4781a1c..ddefa5a 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -272,7 +272,7 @@ IMPL_STATIC_LINK_TYPED( SessionManagerClient, SaveYourselfHdl, void*, pStateVal,
 
     if( m_pSession )
     {
-        SalSessionSaveRequestEvent aEvent( shutdown, false );
+        SalSessionSaveRequestEvent aEvent( shutdown );
         m_pSession->CallCallback( &aEvent );
     }
     else
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index ef48456..df5a779 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -916,7 +916,7 @@ bool X11SalGraphicsImpl::drawAlphaBitmap( const SalTwoRect& rTR,
 
     // paint source * mask over destination picture
     rPeer.CompositePicture( PictOpOver, aSrcPic, aAlphaPic, aDstPic,
-        rTR.mnSrcX, rTR.mnSrcY, 0, 0,
+        rTR.mnSrcX, rTR.mnSrcY,
         rTR.mnDestX, rTR.mnDestY, rTR.mnDestWidth, rTR.mnDestHeight );
 
     rPeer.FreePicture( aAlphaPic );
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index 537fa6d..da866c8 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -1083,7 +1083,7 @@ ImplSalBitmapCache::~ImplSalBitmapCache()
     ImplClear();
 }
 
-void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize, sal_uLong nFlags )
+void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize )
 {
     ImplBmpObj* pObj = nullptr;
     bool        bFound = false;
@@ -1104,10 +1104,10 @@ void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize, sal_uL
     {
         mnTotalSize -= pObj->mnMemSize;
         pObj->mnMemSize = nMemSize;
-        pObj->mnFlags = nFlags;
+        pObj->mnFlags = 0;
     }
     else
-        maBmpList.push_back( new ImplBmpObj( pBmp, nMemSize, nFlags ) );
+        maBmpList.push_back( new ImplBmpObj( pBmp, nMemSize, 0 ) );
 }
 
 void ImplSalBitmapCache::ImplRemove( X11SalBitmap* pBmp )
diff --git a/vcl/unx/generic/gdi/xrender_peer.hxx b/vcl/unx/generic/gdi/xrender_peer.hxx
index 1938792..1053bfd 100644
--- a/vcl/unx/generic/gdi/xrender_peer.hxx
+++ b/vcl/unx/generic/gdi/xrender_peer.hxx
@@ -55,7 +55,7 @@ public:
                     const XRenderPictureAttributes* ) const;
     void        SetPictureClipRegion( Picture, Region ) const;
     void        CompositePicture( int nOp, Picture aSrc, Picture aMask, Picture aDst,
-                    int nXSrc, int nYSrc, int nXMask, int nYMask,
+                    int nXSrc, int nYSrc,
                     int nXDst, int nYDst, unsigned nWidth, unsigned nHeight ) const;
     void        FreePicture( Picture ) const;
 
@@ -109,11 +109,11 @@ inline void XRenderPeer::SetPictureClipRegion( Picture aPicture,
 
 inline void XRenderPeer::CompositePicture( int nXRenderOp,
     Picture aSrcPic, Picture aMaskPic, Picture aDstPic,
-    int nSrcX, int nSrcY, int nMaskX, int nMaskY, int nDstX, int nDstY,
+    int nSrcX, int nSrcY, int nDstX, int nDstY,
     unsigned nWidth, unsigned nHeight ) const
 {
     XRenderComposite( mpDisplay, nXRenderOp, aSrcPic, aMaskPic, aDstPic,
-                      nSrcX, nSrcY, nMaskX, nMaskY, nDstX, nDstY, nWidth, nHeight );
+                      nSrcX, nSrcY, 0/*nMaskX*/, 0/*nMaskY*/, nDstX, nDstY, nWidth, nHeight );
 }
 
 inline void XRenderPeer::FreePicture( Picture aPicture ) const


More information about the Libreoffice-commits mailing list