[Libreoffice-commits] core.git: include/sot include/svl sot/source

Noel Grandin noel.grandin at collabora.co.uk
Mon Nov 21 12:09:46 UTC 2016


 include/sot/stg.hxx           |   22 ++++++++++++++--------
 include/sot/storage.hxx       |    2 +-
 include/svl/cintitem.hxx      |    8 ++++----
 include/svl/custritm.hxx      |    2 +-
 include/svl/gridprinter.hxx   |    2 +-
 include/svl/int64item.hxx     |    2 +-
 include/svl/itempool.hxx      |    4 ++--
 include/svl/metitem.hxx       |    2 +-
 include/svl/visitem.hxx       |    2 +-
 include/svl/zformat.hxx       |    2 +-
 sot/source/sdstor/storage.cxx |    6 +++---
 11 files changed, 30 insertions(+), 24 deletions(-)

New commits:
commit 1617eef124e01ca3b3286e0ad5985c34dde7fadb
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Nov 21 13:05:56 2016 +0200

    loplugin:countusersofdefaultparams in include/sot..svl
    
    Change-Id: Idb022a4a6fb950f1b259abbba57daed9401732d9
    Reviewed-on: https://gerrit.libreoffice.org/31038
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx
index 29a7d12..3a11b4e 100644
--- a/include/sot/stg.hxx
+++ b/include/sot/stg.hxx
@@ -128,7 +128,7 @@ protected:
     StgDirEntry*    pEntry;                   // the dir entry
                     OLEStorageBase( StgIo*, StgDirEntry*, StreamMode& );
                     ~OLEStorageBase();
-    bool            Validate_Impl( bool=false ) const;
+    bool            Validate_Impl( bool ) const;
     static bool     ValidateMode_Impl( StreamMode, StgDirEntry* p = nullptr );
 };
 
@@ -165,9 +165,9 @@ class SOT_DLLPUBLIC Storage : public BaseStorage, public OLEStorageBase
 protected:
                                 virtual ~Storage() override;
 public:
-                                Storage( const OUString &, StreamMode = StreamMode::STD_READWRITE, bool bDirect = true );
-                                Storage( SvStream& rStrm, bool bDirect = true );
-                                Storage( UCBStorageStream& rStrm, bool bDirect = true );
+                                Storage( const OUString &, StreamMode, bool bDirect );
+                                Storage( SvStream& rStrm, bool bDirect );
+                                Storage( UCBStorageStream& rStrm, bool bDirect );
 
     static bool                 IsStorageFile( const OUString & rFileName );
     static bool                 IsStorageFile( SvStream* );
@@ -258,11 +258,16 @@ public:
     static bool                 IsStorageFile( SvStream* );
     static OUString             GetLinkedFile( SvStream& );
 
-                                UCBStorage( const ::ucbhelper::Content& rContent, const OUString& rName, StreamMode nMode, bool bDirect = true, bool bIsRoot = true );
+                                UCBStorage( const ::ucbhelper::Content& rContent,
+                                            const OUString& rName,
+                                            StreamMode nMode,
+                                            bool bDirect,
+                                            bool bIsRoot );
+
                                 UCBStorage( const OUString& rName,
                                             StreamMode nMode,
-                                            bool bDirect = true,
-                                            bool bIsRoot = true );
+                                            bool bDirect,
+                                            bool bIsRoot );
 
                                 UCBStorage( const OUString& rName,
                                             StreamMode nMode,
@@ -273,7 +278,8 @@ public:
                                             xProgressHandler );
 
                                 UCBStorage( UCBStorage_Impl* );
-                                UCBStorage( SvStream& rStrm, bool bDirect = true );
+
+                                UCBStorage( SvStream& rStrm, bool bDirect );
 
     virtual const OUString&     GetName() const override;
     virtual bool                IsRoot() const override;
diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index fc0d424..2365f13 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -112,7 +112,7 @@ public:
                                 m_nError = nErrorCode;
                         }
 
-    void                SignAsRoot( bool b = true ) { m_bIsRoot = b; }
+    void                SignAsRoot( bool b ) { m_bIsRoot = b; }
 
                         // own data sector
     void                SetClass( const SvGlobalName & rClass,
diff --git a/include/svl/cintitem.hxx b/include/svl/cintitem.hxx
index 2c8afc8..e6b404c 100644
--- a/include/svl/cintitem.hxx
+++ b/include/svl/cintitem.hxx
@@ -30,7 +30,7 @@ class SVL_DLLPUBLIC CntByteItem: public SfxPoolItem
 
 public:
 
-    CntByteItem(sal_uInt16 which = 0, sal_uInt8 nTheValue = 0):
+    CntByteItem(sal_uInt16 which, sal_uInt8 nTheValue):
         SfxPoolItem(which), m_nValue(nTheValue) {}
 
     CntByteItem(const CntByteItem & rItem):
@@ -76,7 +76,7 @@ class SVL_DLLPUBLIC CntUInt16Item: public SfxPoolItem
 
 public:
 
-    CntUInt16Item(sal_uInt16 which = 0, sal_uInt16 nTheValue = 0):
+    CntUInt16Item(sal_uInt16 which, sal_uInt16 nTheValue):
         SfxPoolItem(which), m_nValue(nTheValue)
     {}
 
@@ -125,7 +125,7 @@ class SVL_DLLPUBLIC CntInt32Item: public SfxPoolItem
 
 public:
 
-    CntInt32Item(sal_uInt16 which = 0, sal_Int32 nTheValue = 0):
+    CntInt32Item(sal_uInt16 which, sal_Int32 nTheValue):
         SfxPoolItem(which), m_nValue(nTheValue)
     {}
 
@@ -174,7 +174,7 @@ class SVL_DLLPUBLIC CntUInt32Item: public SfxPoolItem
 
 public:
 
-    CntUInt32Item(sal_uInt16 which = 0, sal_uInt32 nTheValue = 0):
+    CntUInt32Item(sal_uInt16 which, sal_uInt32 nTheValue):
         SfxPoolItem(which), m_nValue(nTheValue)
     {}
 
diff --git a/include/svl/custritm.hxx b/include/svl/custritm.hxx
index 5693ceb..84b2db1 100644
--- a/include/svl/custritm.hxx
+++ b/include/svl/custritm.hxx
@@ -30,7 +30,7 @@ class SVL_DLLPUBLIC CntUnencodedStringItem: public SfxPoolItem
 
 public:
 
-    CntUnencodedStringItem(sal_uInt16 which = 0): SfxPoolItem(which)
+    CntUnencodedStringItem(sal_uInt16 which): SfxPoolItem(which)
     {}
 
     CntUnencodedStringItem(sal_uInt16 which, const OUString & rTheValue):
diff --git a/include/svl/gridprinter.hxx b/include/svl/gridprinter.hxx
index 6f3f61b..52a01e3 100644
--- a/include/svl/gridprinter.hxx
+++ b/include/svl/gridprinter.hxx
@@ -26,7 +26,7 @@ class SVL_DLLPUBLIC GridPrinter
     std::unique_ptr<Impl> mpImpl;
 
 public:
-    GridPrinter( size_t nRows, size_t nCols, bool bPrint = true );
+    GridPrinter( size_t nRows, size_t nCols, bool bPrint );
     ~GridPrinter();
     void set( size_t nRow, size_t nCol, const OUString& rStr );
     void print( const char* pHeader ) const;
diff --git a/include/svl/int64item.hxx b/include/svl/int64item.hxx
index 4245ab1..46a3325 100644
--- a/include/svl/int64item.hxx
+++ b/include/svl/int64item.hxx
@@ -18,7 +18,7 @@ class SVL_DLLPUBLIC SfxInt64Item : public SfxPoolItem
     sal_Int64 mnValue;
 
 public:
-    SfxInt64Item( sal_uInt16 nWhich = 0, sal_Int64 nVal = 0 );
+    SfxInt64Item( sal_uInt16 nWhich, sal_Int64 nVal );
     SfxInt64Item( sal_uInt16 nWhich, SvStream & rStream );
     SfxInt64Item( const SfxInt64Item& rItem );
 
diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index e15bf82..7255bc7 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -150,10 +150,10 @@ public:
     const SfxPoolItem&              GetDefaultItem( sal_uInt16 nWhich ) const;
 
     const SfxPoolItem*              LoadItem( SvStream &rStream,
-                                              const SfxItemPool *pRefPool = nullptr );
+                                              const SfxItemPool *pRefPool );
     bool                            StoreItem( SvStream &rStream,
                                                const SfxPoolItem &rItem,
-                                               bool bDirect = false ) const;
+                                               bool bDirect ) const;
 
     sal_uInt32                      GetSurrogate(const SfxPoolItem *) const;
     const SfxPoolItem *             GetItem2(sal_uInt16 nWhich, sal_uInt32 nSurrogate) const;
diff --git a/include/svl/metitem.hxx b/include/svl/metitem.hxx
index df11f83..5fcd3ce 100644
--- a/include/svl/metitem.hxx
+++ b/include/svl/metitem.hxx
@@ -25,7 +25,7 @@
 class SVL_DLLPUBLIC SfxMetricItem: public SfxInt32Item
 {
 public:
-    explicit                 SfxMetricItem( sal_uInt16 nWhich = 0, sal_uInt32 nValue = 0 );
+    explicit                 SfxMetricItem( sal_uInt16 nWhich, sal_uInt32 nValue );
                              SfxMetricItem( sal_uInt16 nWhich, SvStream & );
                              SfxMetricItem( const SfxMetricItem& );
                              virtual ~SfxMetricItem() override {}
diff --git a/include/svl/visitem.hxx b/include/svl/visitem.hxx
index b661c37..e6e054e 100644
--- a/include/svl/visitem.hxx
+++ b/include/svl/visitem.hxx
@@ -30,7 +30,7 @@ class SVL_DLLPUBLIC SfxVisibilityItem: public SfxPoolItem
 
 public:
 
-    explicit SfxVisibilityItem(sal_uInt16 which = 0, bool bVisible = true):
+    explicit SfxVisibilityItem(sal_uInt16 which, bool bVisible = true):
         SfxPoolItem(which)
     {
         m_nValue.bVisible = bVisible;
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 50be721..ce632ae 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -618,7 +618,7 @@ private:
     // normal digits or other digits, depending on ImpSvNumFor.aNatNum,
     // [NatNum1], [NatNum2], ...
     SVL_DLLPRIVATE OUString ImpGetNatNumString( const SvNumberNatNum& rNum, sal_Int32 nVal,
-                                              sal_uInt16 nMinDigits = 0  ) const;
+                                              sal_uInt16 nMinDigits  ) const;
 
     OUString ImpIntToString( sal_uInt16 nIx, sal_Int32 nVal, sal_uInt16 nMinDigits = 0 ) const
     {
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 36dca8f..ac672ef 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -333,7 +333,7 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode )
                 {
                     // UCBStorage always works directly on the UCB content, so discard the stream first
                     DELETEZ( m_pStorStm );
-                    m_pOwnStg = new UCBStorage( m_aName, nMode, true );
+                    m_pOwnStg = new UCBStorage( m_aName, nMode, true, true/*bIsRoot*/ );
                 }
             }
             else
@@ -345,7 +345,7 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode )
         }
         else if ( bForceUCBStorage )
         {
-            m_pOwnStg = new UCBStorage( m_aName, nMode, true );
+            m_pOwnStg = new UCBStorage( m_aName, nMode, true, true/*bIsRoot*/ );
             SetError( ERRCODE_IO_NOTSUPPORTED );
         }
         else
@@ -358,7 +358,7 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode )
     {
         // temporary storage
         if ( bForceUCBStorage )
-            m_pOwnStg = new UCBStorage( m_aName, nMode, true );
+            m_pOwnStg = new UCBStorage( m_aName, nMode, true, true/*bIsRoot*/ );
         else
             m_pOwnStg = new Storage( m_aName, nMode, true );
         m_aName = m_pOwnStg->GetName();


More information about the Libreoffice-commits mailing list