[Libreoffice-commits] core.git: sdext/source sd/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Oct 31 11:30:19 UTC 2017


 sd/source/ui/inc/SlideSorter.hxx                                |    1 
 sd/source/ui/slidesorter/controller/SlsClipboard.cxx            |    2 
 sd/source/ui/slidesorter/controller/SlsTransferableData.cxx     |    4 -
 sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx |    2 
 sd/source/ui/slidesorter/shell/SlideSorter.cxx                  |    3 
 sd/source/ui/slidesorter/shell/SlideSorterService.cxx           |    1 
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx           |   35 ++++------
 7 files changed, 17 insertions(+), 31 deletions(-)

New commits:
commit c0cf07d3da5245e594f8f1ad11479e85bd15b88f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Oct 30 13:41:01 2017 +0200

    loplugin:constantparam in sd
    
    Change-Id: I1c5e5a26d343ac3aa244d7b053f2ec6922edbb21
    Reviewed-on: https://gerrit.libreoffice.org/44085
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx
index 83f949fa91d3..fae76ff19fdd 100644
--- a/sd/source/ui/inc/SlideSorter.hxx
+++ b/sd/source/ui/inc/SlideSorter.hxx
@@ -115,7 +115,6 @@ public:
     */
     static std::shared_ptr<SlideSorter> CreateSlideSorter (
         ViewShellBase& rBase,
-        ViewShell* pViewShell,
         vcl::Window& rParentWindow);
 
     /** Return the control of the vertical scroll bar.
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 42f91e1a3ce1..b65926d52844 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -436,8 +436,6 @@ void Clipboard::CreateSlideTransferable (
         mrSlideSorter.GetView().BrkAction();
         SdTransferable* pTransferable = TransferableData::CreateTransferable (
             pDocument,
-            nullptr,
-            false,
             dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell()),
             aRepresentatives);
 
diff --git a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
index 946e54bf86af..e02d8363dcaa 100644
--- a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
@@ -26,12 +26,10 @@ namespace sd { namespace slidesorter { namespace controller {
 
 SdTransferable* TransferableData::CreateTransferable (
     SdDrawDocument* pSrcDoc,
-    ::sd::View* pWorkView,
-    bool bInitOnGetData,
     SlideSorterViewShell* pViewShell,
     const ::std::vector<Representative>& rRepresentatives)
 {
-    SdTransferable* pTransferable = new SdTransferable (pSrcDoc, pWorkView, bInitOnGetData);
+    SdTransferable* pTransferable = new SdTransferable (pSrcDoc, nullptr, false/*bInitOnGetData*/);
     std::shared_ptr<TransferableData> pData (new TransferableData(pViewShell, rRepresentatives));
     pTransferable->AddUserData(pData);
     return pTransferable;
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
index bfc0be13bb71..ae4c84f7c55e 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
@@ -58,8 +58,6 @@ public:
 
     static SdTransferable* CreateTransferable (
         SdDrawDocument* pSrcDoc,
-        ::sd::View* pWorkView,
-        bool bInitOnGetData,
         SlideSorterViewShell* pViewShell,
         const ::std::vector<TransferableData::Representative>& rRepresentatives);
 
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index af850c64b6ff..398cc2a0edc3 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -89,13 +89,12 @@ std::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter(
 
 std::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter (
     ViewShellBase& rBase,
-    ViewShell* pViewShell,
     vcl::Window& rParentWindow)
 {
     std::shared_ptr<SlideSorter> pSlideSorter(
         new SlideSorter(
             rBase,
-            pViewShell,
+            nullptr,
             rParentWindow));
     pSlideSorter->Init();
     return pSlideSorter;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index afe884dde902..df1b20bcc53c 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -96,7 +96,6 @@ void SAL_CALL SlideSorterService::initialize (const Sequence<Any>& rArguments)
     if (pBase != nullptr && pParentWindow)
         mpSlideSorter = SlideSorter::CreateSlideSorter(
             *pBase,
-            nullptr,
             *pParentWindow);
 
     Resize();
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index fb8728bca212..fa763df01918 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -356,8 +356,7 @@ void writePng_( OutputBuffer& o_rOutputBuf,
                 Stream* str,
                 int width, int height, GfxImageColorMap* colorMap,
                 Stream* maskStr,
-                int maskWidth, int maskHeight, GfxImageColorMap* maskColorMap,
-                bool bWithLinefeed )
+                int maskWidth, int maskHeight, GfxImageColorMap* maskColorMap )
 {
     o_rOutputBuf.clear();
 
@@ -365,16 +364,14 @@ void writePng_( OutputBuffer& o_rOutputBuf,
     PngHelper::createPng( o_rOutputBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskColorMap );
 
     printf( " PNG %d", (int)o_rOutputBuf.size() );
-    if( bWithLinefeed )
-        printf("\n");
+    printf("\n");
 }
 
 void writePng_( OutputBuffer& o_rOutputBuf,
                 Stream* str,
                 int width, int height, GfxImageColorMap* colorMap,
                 Stream* maskStr,
-                int maskWidth, int maskHeight, bool maskInvert,
-                bool bWithLinefeed )
+                int maskWidth, int maskHeight, bool maskInvert )
 {
     o_rOutputBuf.clear();
 
@@ -382,32 +379,30 @@ void writePng_( OutputBuffer& o_rOutputBuf,
     PngHelper::createPng( o_rOutputBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskInvert );
 
     printf( " PNG %d", (int)o_rOutputBuf.size() );
-    if( bWithLinefeed )
-        printf("\n");
+    printf("\n");
 }
 
 // stolen from ImageOutputDev.cc
-void writeMask_( OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, bool bWithLinefeed, bool bInvert )
+void writeMask_( OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, bool bInvert )
 {
     if( str->getKind() == strDCT )
-        writeJpeg_(o_rOutputBuf, str, bWithLinefeed);
+        writeJpeg_(o_rOutputBuf, str, true/*bWithLinefeed*/);
     else
-        writePbm_(o_rOutputBuf, str, width, height, bWithLinefeed, bInvert );
+        writePbm_(o_rOutputBuf, str, width, height, true/*bWithLinefeed*/, bInvert );
 }
 
 void writeImage_( OutputBuffer&     o_rOutputBuf,
                   Stream*           str,
                   int               width,
                   int               height,
-                  GfxImageColorMap* colorMap,
-                  bool              bWithLinefeed )
+                  GfxImageColorMap* colorMap )
 {
     // dump JPEG file
     if( str->getKind() == strDCT &&
         (colorMap->getNumPixelComps() == 1 ||
          colorMap->getNumPixelComps() == 3) )
     {
-        writeJpeg_(o_rOutputBuf, str, bWithLinefeed);
+        writeJpeg_(o_rOutputBuf, str, true/*bWithLinefeed*/);
     }
     else if (colorMap->getNumPixelComps() == 1 &&
              colorMap->getBits() == 1)
@@ -423,10 +418,10 @@ void writeImage_( OutputBuffer&     o_rOutputBuf,
             nIndex = 1;
             colorMap->getRGB( &nIndex, &oneColor );
         }
-        writePng_( o_rOutputBuf, str, width, height, zeroColor, oneColor, false, bWithLinefeed );
+        writePng_( o_rOutputBuf, str, width, height, zeroColor, oneColor, false, true/*bWithLinefeed*/ );
     }
     else
-        writePpm_( o_rOutputBuf, str, width, height, colorMap, bWithLinefeed );
+        writePpm_( o_rOutputBuf, str, width, height, colorMap, true/*bWithLinefeed*/ );
 }
 
 // forwarders
@@ -436,12 +431,12 @@ inline void writeImageLF( OutputBuffer&     o_rOutputBuf,
                           Stream*           str,
                           int               width,
                           int               height,
-                          GfxImageColorMap* colorMap ) { writeImage_(o_rOutputBuf,str,width,height,colorMap,true); }
+                          GfxImageColorMap* colorMap ) { writeImage_(o_rOutputBuf,str,width,height,colorMap); }
 inline void writeMaskLF( OutputBuffer&     o_rOutputBuf,
                          Stream*           str,
                          int               width,
                          int               height,
-                         bool              bInvert ) { writeMask_(o_rOutputBuf,str,width,height,true,bInvert); }
+                         bool              bInvert ) { writeMask_(o_rOutputBuf,str,width,height,bInvert); }
 
 
 int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state ) const
@@ -1040,7 +1035,7 @@ void PDFOutDev::drawMaskedImage(GfxState*, Object*, Stream* str,
         return;
     OutputBuffer aBuf;     initBuf(aBuf);
     printf( "drawImage %d %d 0", width, height );
-    writePng_( aBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskInvert, true );
+    writePng_( aBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskInvert );
     writeBinaryBuffer( aBuf );
 }
 
@@ -1062,7 +1057,7 @@ void PDFOutDev::drawSoftMaskedImage(GfxState*, Object*, Stream* str,
         return;
     OutputBuffer aBuf;     initBuf(aBuf);
     printf( "drawImage %d %d 0", width, height );
-    writePng_( aBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskColorMap, true );
+    writePng_( aBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskColorMap );
     writeBinaryBuffer( aBuf );
 }
 


More information about the Libreoffice-commits mailing list