Kaydet (Commit) 4e729de7 authored tarafından Noel Grandin's avatar Noel Grandin

ScDoubleItem is dead

i.e. no way to get any useful information out of it, at least since

	commit 8b3fcb6a
    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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 6217cfd4
...@@ -214,21 +214,6 @@ public: ...@@ -214,21 +214,6 @@ public:
const IntlWrapper& rIntl ) const override; 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(). */ /** Member ID for "page scale to width" value in QueryValue() and PutValue(). */
const sal_uInt8 SC_MID_PAGE_SCALETO_WIDTH = 1; const sal_uInt8 SC_MID_PAGE_SCALETO_WIDTH = 1;
/** Member ID for "page scale to height" value in QueryValue() and PutValue(). */ /** Member ID for "page scale to height" value in QueryValue() and PutValue(). */
......
...@@ -521,7 +521,7 @@ ...@@ -521,7 +521,7 @@
#define SID_RANGE_ROW (SID_NEW_SLOTS+20) #define SID_RANGE_ROW (SID_NEW_SLOTS+20)
#define SID_RANGE_COL (SID_NEW_SLOTS+21) #define SID_RANGE_COL (SID_NEW_SLOTS+21)
#define SID_RANGE_TABLE (SID_NEW_SLOTS+22) #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_FORMULA (SID_NEW_SLOTS+24)
#define SID_RANGE_TEXTVALUE (SID_NEW_SLOTS+26) #define SID_RANGE_TEXTVALUE (SID_NEW_SLOTS+26)
#define SID_TABLE_ACTIVATE (SID_NEW_SLOTS+27) #define SID_TABLE_ACTIVATE (SID_NEW_SLOTS+27)
......
...@@ -76,7 +76,6 @@ interface CellSelection ...@@ -76,7 +76,6 @@ interface CellSelection
SID_RANGE_ROW [ StateMethod = GetState; ] SID_RANGE_ROW [ StateMethod = GetState; ]
SID_RANGE_COL [ StateMethod = GetState; ] SID_RANGE_COL [ StateMethod = GetState; ]
SID_RANGE_TABLE [ StateMethod = GetState; ] SID_RANGE_TABLE [ StateMethod = GetState; ]
SID_RANGE_VALUE [ StateMethod = GetState; ]
SID_RANGE_FORMULA [ StateMethod = GetState; ] SID_RANGE_FORMULA [ StateMethod = GetState; ]
SID_RANGE_TEXTVALUE [ StateMethod = GetState; ] SID_RANGE_TEXTVALUE [ StateMethod = GetState; ]
SID_RANGE_NOTETEXT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] SID_RANGE_NOTETEXT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
......
...@@ -5725,25 +5725,6 @@ SfxVoidItem CurrentValidation FID_CURRENTVALIDATION ...@@ -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 SvxVerJustifyItem VerticalAlignment SID_V_ALIGNCELL
[ [
......
...@@ -30,7 +30,6 @@ module StarCalc ...@@ -30,7 +30,6 @@ module StarCalc
}; };
item ScProtection ScProtectionAttr; item ScProtection ScProtectionAttr;
item double ScDoubleItem;
item INT32 SfxIntegerListItem; item INT32 SfxIntegerListItem;
......
...@@ -45,7 +45,6 @@ using namespace com::sun::star; ...@@ -45,7 +45,6 @@ using namespace com::sun::star;
SfxPoolItem* ScProtectionAttr::CreateDefault() { return new ScProtectionAttr; } SfxPoolItem* ScProtectionAttr::CreateDefault() { return new ScProtectionAttr; }
SfxPoolItem* ScDoubleItem::CreateDefault() { SAL_WARN( "sc", "No ScDoubleItem factory available"); return nullptr; }
/** /**
* General Help Function * General Help Function
...@@ -570,37 +569,6 @@ sal_uInt16 ScViewObjectModeItem::GetVersion( sal_uInt16 /* nFileVersion */ ) con ...@@ -570,37 +569,6 @@ sal_uInt16 ScViewObjectModeItem::GetVersion( sal_uInt16 /* nFileVersion */ ) con
return 1; 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() : ScPageScaleToItem::ScPageScaleToItem() :
SfxPoolItem( ATTR_PAGE_SCALETO ), SfxPoolItem( ATTR_PAGE_SCALETO ),
mnWidth( 0 ), mnWidth( 0 ),
......
...@@ -707,14 +707,6 @@ void ScCellShell::GetState(SfxItemSet &rSet) ...@@ -707,14 +707,6 @@ void ScCellShell::GetState(SfxItemSet &rSet)
rSet.Put( SfxInt16Item( nWhich, nTab+1 ) ); rSet.Put( SfxInt16Item( nWhich, nTab+1 ) );
break; break;
case SID_RANGE_VALUE:
{
double nValue;
pDoc->GetValue( nPosX, nPosY, nTab, nValue );
rSet.Put( ScDoubleItem( nWhich, nValue ) );
}
break;
case SID_RANGE_FORMULA: case SID_RANGE_FORMULA:
{ {
OUString aString; OUString aString;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment