[Libreoffice-commits] core.git: sc/inc sc/sdi sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 24 12:43:38 UTC 2018


 sc/inc/attrib.hxx              |   15 ---------------
 sc/inc/sc.hrc                  |    2 +-
 sc/sdi/cellsh.sdi              |    1 -
 sc/sdi/scalc.sdi               |   19 -------------------
 sc/sdi/scslots.sdi             |    1 -
 sc/source/core/data/attrib.cxx |   32 --------------------------------
 sc/source/ui/view/cellsh.cxx   |    8 --------
 7 files changed, 1 insertion(+), 77 deletions(-)

New commits:
commit 4e729de73f2947155248f8df5897380611b87917
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 23 13:14:58 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 24 14:43:09 2018 +0200

    ScDoubleItem is dead
    
    i.e. no way to get any useful information out of it, at least since
    
            commit 8b3fcb6a4f80e803586120535768745f6637b34d
        Date:   Fri Aug 11 10:01:25 2017 +0530
        Removing unused SfxItemPool serialisation from svx
    
    Which means that SID_RANGE_VALUE is also useless.
    
    Possibly the commit that added this had a bug, and it meant to use
    SvxDoubleItem, which implements the necessary QueryValue/PutValue
    methods to be able to interact with macro code.
    
    Change-Id: I6ffb0c46f6f0864f202d71f0e157d7e1d0f54f51
    Reviewed-on: https://gerrit.libreoffice.org/62232
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 08363b2ac681..5c0ce12a45c0 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -214,21 +214,6 @@ public:
                                   const IntlWrapper& rIntl ) const override;
 };
 
-class ScDoubleItem : public SfxPoolItem
-{
-public:
-                static SfxPoolItem* CreateDefault();
-                ScDoubleItem( sal_uInt16 nWhich, double nVal );
-                ScDoubleItem( const ScDoubleItem& rItem );
-                virtual ~ScDoubleItem() override;
-
-    virtual bool            operator==( const SfxPoolItem& ) const override;
-    virtual SfxPoolItem*    Clone( SfxItemPool *pPool = nullptr ) const override;
-
-private:
-    double  nValue;
-};
-
 /** Member ID for "page scale to width" value in QueryValue() and PutValue(). */
 const sal_uInt8 SC_MID_PAGE_SCALETO_WIDTH    = 1;
 /** Member ID for "page scale to height" value in QueryValue() and PutValue(). */
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 961b17979070..52b945ea9441 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -521,7 +521,7 @@
 #define SID_RANGE_ROW           (SID_NEW_SLOTS+20)
 #define SID_RANGE_COL           (SID_NEW_SLOTS+21)
 #define SID_RANGE_TABLE         (SID_NEW_SLOTS+22)
-#define SID_RANGE_VALUE         (SID_NEW_SLOTS+23)
+// empty, was SID_RANGE_VALUE
 #define SID_RANGE_FORMULA       (SID_NEW_SLOTS+24)
 #define SID_RANGE_TEXTVALUE     (SID_NEW_SLOTS+26)
 #define SID_TABLE_ACTIVATE      (SID_NEW_SLOTS+27)
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index f7610a9f854d..e58ef8de34a8 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -76,7 +76,6 @@ interface CellSelection
     SID_RANGE_ROW           [ StateMethod = GetState; ]
     SID_RANGE_COL           [ StateMethod = GetState; ]
     SID_RANGE_TABLE         [ StateMethod = GetState; ]
-    SID_RANGE_VALUE         [ StateMethod = GetState; ]
     SID_RANGE_FORMULA       [ StateMethod = GetState; ]
     SID_RANGE_TEXTVALUE     [ StateMethod = GetState; ]
     SID_RANGE_NOTETEXT      [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index c8283fd09ac0..3519242625bb 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -5725,25 +5725,6 @@ SfxVoidItem CurrentValidation FID_CURRENTVALIDATION
 ]
 
 
-ScDoubleItem Value SID_RANGE_VALUE
-
-[
-    AutoUpdate = FALSE,
-    FastCall = FALSE,
-    ReadOnlyDoc = TRUE,
-    Toggle = FALSE,
-    Container = FALSE,
-    RecordAbsolute = FALSE,
-    RecordPerSet;
-
-
-    AccelConfig = FALSE,
-    MenuConfig = FALSE,
-    ToolBoxConfig = FALSE,
-    GroupId = SfxGroupId::Intern;
-]
-
-
 SvxVerJustifyItem VerticalAlignment SID_V_ALIGNCELL
 
 [
diff --git a/sc/sdi/scslots.sdi b/sc/sdi/scslots.sdi
index e862c4ab6a12..8cf0aaddc0fe 100644
--- a/sc/sdi/scslots.sdi
+++ b/sc/sdi/scslots.sdi
@@ -30,7 +30,6 @@ module StarCalc
     };
     item ScProtection ScProtectionAttr;
 
-    item double ScDoubleItem;
     item INT32 SfxIntegerListItem;
 
 
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 769f9722725b..1e36bdc80177 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -45,7 +45,6 @@ using namespace com::sun::star;
 
 
 SfxPoolItem* ScProtectionAttr::CreateDefault() { return new ScProtectionAttr; }
-SfxPoolItem* ScDoubleItem::CreateDefault() { SAL_WARN( "sc", "No ScDoubleItem factory available"); return nullptr; }
 
 /**
  * General Help Function
@@ -570,37 +569,6 @@ sal_uInt16 ScViewObjectModeItem::GetVersion( sal_uInt16 /* nFileVersion */ ) con
     return 1;
 }
 
-/**
- * Double
- */
-ScDoubleItem::ScDoubleItem( sal_uInt16 nWhichP, double nVal )
-    :   SfxPoolItem ( nWhichP ),
-        nValue  ( nVal )
-{
-}
-
-ScDoubleItem::ScDoubleItem( const ScDoubleItem& rItem )
-    :   SfxPoolItem ( rItem )
-{
-        nValue = rItem.nValue;
-}
-
-bool ScDoubleItem::operator==( const SfxPoolItem& rItem ) const
-{
-    assert(SfxPoolItem::operator==(rItem));
-    const ScDoubleItem& _rItem = static_cast<const ScDoubleItem&>(rItem);
-    return nValue == _rItem.nValue;
-}
-
-SfxPoolItem* ScDoubleItem::Clone( SfxItemPool* ) const
-{
-    return new ScDoubleItem( *this );
-}
-
-ScDoubleItem::~ScDoubleItem()
-{
-}
-
 ScPageScaleToItem::ScPageScaleToItem() :
     SfxPoolItem( ATTR_PAGE_SCALETO ),
     mnWidth( 0 ),
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 77d8b29e6570..7800a0f7fac3 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -707,14 +707,6 @@ void ScCellShell::GetState(SfxItemSet &rSet)
                 rSet.Put( SfxInt16Item( nWhich, nTab+1 ) );
                 break;
 
-            case SID_RANGE_VALUE:
-                {
-                    double nValue;
-                    pDoc->GetValue( nPosX, nPosY, nTab, nValue );
-                    rSet.Put( ScDoubleItem( nWhich, nValue ) );
-                }
-                break;
-
             case SID_RANGE_FORMULA:
                 {
                     OUString aString;


More information about the Libreoffice-commits mailing list