[Libreoffice-commits] core.git: compilerplugins/clang include/svtools svtools/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Sun Aug 20 16:47:36 UTC 2017


 compilerplugins/clang/unusedmethods.unused-returns.results |    2 --
 include/svtools/treelistbox.hxx                            |    2 --
 svtools/source/contnr/svimpbox.cxx                         |    3 +--
 svtools/source/contnr/treelistbox.cxx                      |   12 +-----------
 4 files changed, 2 insertions(+), 17 deletions(-)

New commits:
commit 5704bc5578aea2ff3295ada9e4b61b8a9247c8e7
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sat Aug 19 02:31:40 2017 +0200

    svtools: remove function with unused return value
    
    and inline only functionality
    
    Change-Id: I79b0ec29dcc35e9dc92aaac9fb191c882a9b0621
    Reviewed-on: https://gerrit.libreoffice.org/41362
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unusedmethods.unused-returns.results b/compilerplugins/clang/unusedmethods.unused-returns.results
index 33bc2828d8a3..754ce021d86c 100644
--- a/compilerplugins/clang/unusedmethods.unused-returns.results
+++ b/compilerplugins/clang/unusedmethods.unused-returns.results
@@ -246,8 +246,6 @@ include/sax/fshelper.hxx:206
     class sax_fastparser::FastSerializerHelper * sax_fastparser::FastSerializerHelper::write(long)
 include/sax/fshelper.hxx:209
     class sax_fastparser::FastSerializerHelper * sax_fastparser::FastSerializerHelper::writeEscaped(const char *)
-include/svtools/treelistbox.hxx:536
-    short SvTreeListBox::GetHeightOffset(const class Image &,class Size &)
 include/test/sheet/xnamedrange.hxx:22
     class com::sun::star::uno::Reference<class com::sun::star::uno::XInterface> apitest::XNamedRange::init()
 include/test/sheet/xsheetannotation.hxx:36
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 936837a9da7d..72f98265fc4b 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -526,8 +526,6 @@ public:
 protected:
     using SvListView::SelectAll;
 
-    SVT_DLLPRIVATE short        GetHeightOffset( const Image& rBmp, Size& rLogicSize);
-
     SVT_DLLPRIVATE void         SetEntryHeight( SvTreeListEntry const * pEntry );
     SVT_DLLPRIVATE void         AdjustEntryHeight( const Image& rBmp );
     SVT_DLLPRIVATE void         AdjustEntryHeight();
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index de8a49889e5c..1a13a08dfbed 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -1567,8 +1567,7 @@ void SvImpLBox::CollapsingEntry( SvTreeListEntry* pEntry )
 
 void SvImpLBox::SetNodeBmpYOffset( const Image& rBmp )
 {
-    Size aSize;
-    pView->GetHeightOffset( rBmp, aSize );
+    const Size aSize( rBmp.GetSizePixel() );
     nNodeBmpWidth = aSize.Width();
 }
 
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 2ca55b745920..06b1def0df44 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -2129,15 +2129,6 @@ void SvTreeListBox::SetDragDropMode( DragDropMode nDDMode )
     pImpl->SetDragDropMode( nDDMode );
 }
 
-short SvTreeListBox::GetHeightOffset(const Image& rBmp, Size& aSizeLogic )
-{
-    short nOffset = 0;
-    aSizeLogic = rBmp.GetSizePixel();
-    if( GetEntryHeight() > aSizeLogic.Height() )
-        nOffset = ( GetEntryHeight() - (short)aSizeLogic.Height()) / 2;
-    return nOffset;
-}
-
 void SvTreeListBox::SetEntryHeight( SvTreeListEntry const * pEntry )
 {
     short nHeightMax=0;
@@ -2181,8 +2172,7 @@ void SvTreeListBox::SetEntryWidth( short nWidth )
 
 void SvTreeListBox::AdjustEntryHeight( const Image& rBmp )
 {
-    Size aSize;
-    GetHeightOffset( rBmp, aSize );
+    const Size aSize( rBmp.GetSizePixel() );
     if( aSize.Height() > nEntryHeight )
     {
         nEntryHeight = (short)aSize.Height() + nEntryHeightOffs;


More information about the Libreoffice-commits mailing list