[Libreoffice-commits] core.git: include/sfx2 include/vcl sfx2/source svtools/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Feb 23 06:19:32 UTC 2017


 include/sfx2/childwin.hxx          |    2 --
 include/vcl/salbtype.hxx           |   17 -----------------
 sfx2/source/appl/childwin.cxx      |    5 -----
 svtools/source/contnr/imivctl.hxx  |    7 -------
 svtools/source/contnr/imivctl1.cxx |   33 ---------------------------------
 svtools/source/contnr/imivctl2.cxx |   24 ------------------------
 6 files changed, 88 deletions(-)

New commits:
commit 6776fdc63bd4407ebec9267fb492cba9c1a40af2
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Feb 22 12:07:14 2017 +0200

    loplugin:unusedmethods
    
    Change-Id: I5a72ee666e71b4c5c8f43d327aa7e8eb62d1e51b
    Reviewed-on: https://gerrit.libreoffice.org/34537
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 10aa39a..c170611 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -135,8 +135,6 @@ public:
     sal_uInt16          GetContextId() const
                         { return nContextId; }
 
-    FloatingWindow*     GetFloatingWindow() const;
-
     static FloatingWindow* GetFloatingWindow(vcl::Window *pParent);
 
     static void         RegisterChildWindowContext(SfxModule*, sal_uInt16, SfxChildWinContextFactory*);
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx
index d0d71b1..7aa075a 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -320,9 +320,6 @@ public:
     inline void         GetColorFor16BitLSB( BitmapColor& rColor, const sal_uInt8* pPixel ) const;
     inline void         SetColorFor16BitLSB( const BitmapColor& rColor, sal_uInt8* pPixel ) const;
 
-    inline void         GetColorFor24Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const;
-    inline void         SetColorFor24Bit( const BitmapColor& rColor, sal_uInt8* pPixel ) const;
-
     inline void         GetColorFor32Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const;
     inline void         GetColorAndAlphaFor32Bit( BitmapColor& rColor, sal_uInt8& rAlpha, const sal_uInt8* pPixel ) const;
     inline void         SetColorFor32Bit( const BitmapColor& rColor, sal_uInt8* pPixel ) const;
@@ -555,20 +552,6 @@ inline void ColorMask::SetColorFor16BitLSB( const BitmapColor& rColor, sal_uInt8
     pPixel[ 1 ] = (sal_uInt8)(nVal >> 8U);
 }
 
-inline void ColorMask::GetColorFor24Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const
-{
-    const sal_uInt32 nVal = pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ) | ( (sal_uInt32) pPixel[ 2 ] << 16UL );
-    MASK_TO_COLOR( nVal, maR.mnMask, maG.mnMask, maB.mnMask, maR.mnShift, maG.mnShift, maB.mnShift, rColor );
-}
-
-inline void ColorMask::SetColorFor24Bit( const BitmapColor& rColor, sal_uInt8* pPixel ) const
-{
-    const sal_uInt32 nVal = COLOR_TO_MASK( rColor, maR.mnMask, maG.mnMask, maB.mnMask, maR.mnShift, maG.mnShift, maB.mnShift, 0/*nAlphaChannel*/ );
-    pPixel[ 0 ] = (sal_uInt8) nVal;
-    pPixel[ 1 ] = (sal_uInt8) ( nVal >> 8UL );
-    pPixel[ 2 ] = (sal_uInt8) ( nVal >> 16UL );
-}
-
 inline void ColorMask::GetColorFor32Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const
 {
     const sal_uInt32 nVal = (sal_uInt32) pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ) |
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 9116876..ceebfae 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -531,11 +531,6 @@ FloatingWindow* SfxChildWindowContext::GetFloatingWindow(vcl::Window *pParent)
     return nullptr;
 }
 
-FloatingWindow* SfxChildWindowContext::GetFloatingWindow() const
-{
-    return SfxChildWindowContext::GetFloatingWindow(pWindow->GetParent());
-}
-
 void SfxChildWindow::SetFactory_Impl( SfxChildWinFactory *pF )
 {
     pImpl->pFact = pF;
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index f787bda..68cdeec 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -271,7 +271,6 @@ class SvxIconChoiceCtrl_Impl
     Rectangle           CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const;
 
     void                ClipAtVirtOutRect( Rectangle& rRect ) const;
-    void                AdjustAtGrid( const SvxIconChoiceCtrlEntryPtrVec& rRow );
     Point               AdjustAtGrid(
                             const Rectangle& rCenterRect, // balance point of object (typically Bmp-Rect)
                             const Rectangle& rBoundRect
@@ -533,12 +532,6 @@ public:
     SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, bool bRight );
     SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, bool bDown );
     SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, bool bDown );
-
-    // Creates a list of entries for every row (height = nGridDY) sorted by
-    // BoundRect.Left(). A list may be empty. The lists become the property of
-    // the caller and have to be deleted with DestroyGridAdjustData.
-    void                    CreateGridAjustData( IconChoiceMap& pLists );
-    static void             DestroyGridAdjustData( IconChoiceMap& rLists );
 };
 
 
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index e5301fd..40933e2 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2691,39 +2691,6 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, EditTimeoutHdl, Timer *, void)
     }
 }
 
-// align a row, might expand width, doesn't break the line
-void SvxIconChoiceCtrl_Impl::AdjustAtGrid( const SvxIconChoiceCtrlEntryPtrVec& rRow )
-{
-    if( rRow.empty() )
-        return;
-
-    long nCurRight = 0;
-    for(SvxIconChoiceCtrlEntry* pCur : rRow)
-    {
-        // Decisive (for our eye) is the bitmap, else, the entry might jump too
-        // much within long texts.
-        const Rectangle& rBoundRect = GetEntryBoundRect( pCur );
-        Rectangle aCenterRect( CalcBmpRect( pCur ));
-        if( !pCur->IsPosLocked() )
-        {
-            long nWidth = aCenterRect.GetSize().Width();
-            Point aNewPos( AdjustAtGrid( aCenterRect, rBoundRect ) );
-            while( aNewPos.X() < nCurRight )
-                aNewPos.X() += nGridDX;
-            if( aNewPos != rBoundRect.TopLeft() )
-            {
-                SetEntryPos( pCur, aNewPos );
-                pCur->SetFlags( SvxIconViewFlags::POS_MOVED );
-            }
-            nCurRight = aNewPos.X() + nWidth;
-        }
-        else
-        {
-            nCurRight = rBoundRect.Right();
-        }
-    }
-}
-
 // Aligns a rectangle to the grid, but doesn't guarantee that the new position
 // is vacant. The position can be used for SetEntryPos. The CenterRect describes
 // a part of the bounding rectangle that is used for calculating the target
diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx
index 0730f7a..ec4dd39 100644
--- a/svtools/source/contnr/imivctl2.cxx
+++ b/svtools/source/contnr/imivctl2.cxx
@@ -473,30 +473,6 @@ void IcnCursor_Impl::SetDeltas()
     }
 }
 
-void IcnCursor_Impl::CreateGridAjustData( IconChoiceMap& rLists )
-{
-    sal_uInt16 nGridRows = (sal_uInt16)(pView->aVirtOutputSize.Height() / pView->nGridDY);
-    nGridRows++; // because we round down later!
-
-    if( !nGridRows )
-        return;
-    const size_t nCount = pView->aEntries.size();
-    for( size_t nCur = 0; nCur < nCount; nCur++ )
-    {
-        SvxIconChoiceCtrlEntry* pEntry = pView->aEntries[ nCur ];
-        const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
-        short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
-        sal_uInt16 nIns = GetSortListPos( rLists[nY], rRect.Left(), false );
-        rLists[ nY ].insert( rLists[ nY ].begin() + nIns, pEntry );
-    }
-}
-
-//static
-void IcnCursor_Impl::DestroyGridAdjustData( IconChoiceMap& rLists )
-{
-    rLists.clear();
-}
-
 IcnGridMap_Impl::IcnGridMap_Impl(SvxIconChoiceCtrl_Impl* pView)
 {
     _pView = pView;


More information about the Libreoffice-commits mailing list