[Libreoffice-commits] core.git: dbaccess/source editeng/source extensions/source include/svl svl/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Sun Sep 25 18:58:06 UTC 2016


 dbaccess/source/ui/dlg/dbadmin.cxx         |    2 +-
 editeng/source/uno/unotext.cxx             |    2 +-
 extensions/source/propctrlr/fontdialog.cxx |    2 +-
 include/svl/itemset.hxx                    |    2 +-
 svl/source/items/itemset.cxx               |   16 +---------------
 5 files changed, 5 insertions(+), 19 deletions(-)

New commits:
commit 4563921f23d79f6e3e431a314064c6dd201cfee2
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sat Sep 24 19:12:24 2016 +0200

    remove unused parameter
    
    bTotalRanges is never used.
    SFX_ITEMSET_NO_DEFAULT_CTOR is no where else used.
    
    Change-Id: Ia35ea875f16a8ca04c2173b01074113f1825f565
    Reviewed-on: https://gerrit.libreoffice.org/29248
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 75f1e40..4c499f2 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -440,7 +440,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
     _rpPool->FreezeIdRanges();
 
     // and, finally, the set
-    _rpSet = new SfxItemSet(*_rpPool, true);
+    _rpSet = new SfxItemSet(*_rpPool);
 
     return _rpSet;
 }
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 02d73e8..e100da2 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1224,7 +1224,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co
 {
     do
     {
-        SfxItemSet aSet( *pForwarder->GetPool(), true );
+        SfxItemSet aSet(*pForwarder->GetPool());
 
         if( pMap->nWID == WID_FONTDESC )
         {
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 89461f2..400739a 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -542,7 +542,7 @@ namespace pcr
         _rpPool->FreezeIdRanges();
 
         // and, finally, the set
-        _rpSet = new SfxItemSet(*_rpPool, true);
+        _rpSet = new SfxItemSet(*_rpPool);
 
         return _rpSet;
     }
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index 7651102..f327f92 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -64,7 +64,7 @@ protected:
 public:
                                 SfxItemSet( const SfxItemSet& );
 
-                                SfxItemSet( SfxItemPool&, bool bTotalPoolRanges = false );
+                                SfxItemSet( SfxItemPool&);
                                 SfxItemSet( SfxItemPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
                                 SfxItemSet( SfxItemPool&, int nWh1, int nWh2, int nNull, ... );
                                 SfxItemSet( SfxItemPool&, const sal_uInt16* nWhichPairTable );
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index ceb3f27..f8e953a 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -47,25 +47,11 @@ static const sal_uInt16 nInitCount = 10; // Single USHORTs => 5 pairs without '0
  * For Sfx programmers: an SfxItemSet constructed in this way cannot
  * contain any Items with SlotIds as Which values.
  */
-SfxItemSet::SfxItemSet
-(
-    SfxItemPool&    rPool,       /* Target Pool for the SfxPoolItems which are
-                                    added to this SfxItemSet */
-    bool        bTotalRanges    /* Take over complete pool ranges? */
-)
+SfxItemSet::SfxItemSet(SfxItemPool& rPool)
     : m_pPool( &rPool )
     , m_pParent(nullptr)
     , m_nCount(0)
 {
-//  DBG_ASSERT( bTotalRanges || abs( &bTotalRanges - this ) < 1000,
-//              "please use suitable ranges" );
-#if defined DBG_UTIL && defined SFX_ITEMSET_NO_DEFAULT_CTOR
-    if ( !bTotalRanges )
-        *(int*)0 = 0; // GPF
-#else
-    (void) bTotalRanges; // avoid warnings
-#endif
-
     m_pWhichRanges = const_cast<sal_uInt16*>(m_pPool->GetFrozenIdRanges());
     assert( m_pWhichRanges && "don't create ItemSets with full range before FreezeIdRanges()" );
     if (!m_pWhichRanges)


More information about the Libreoffice-commits mailing list