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

2021-01-29 Thread Pranam Lashkari (via logerrit)
 sc/inc/sc.hrc |2 +-
 sc/sdi/cellsh.sdi |1 +
 sc/sdi/scalc.sdi  |   17 +
 sc/source/ui/view/cellsh1.cxx |   34 ++
 4 files changed, 53 insertions(+), 1 deletion(-)

New commits:
commit 163fbf7231b26ec645365020cbef829a027e020a
Author: Pranam Lashkari 
AuthorDate: Tue Jan 5 20:43:57 2021 +0530
Commit: Pranam Lashkari 
CommitDate: Sat Jan 30 08:05:54 2021 +0100

Added uno command for formula range selection

Change-Id: I01cd06ed51197ffe21102fb1fd0fcdce88ab333b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108810
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit e8a9157878f156e599e66349d7fb60ca39e62514)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109746
Reviewed-by: Pranam Lashkari 
(cherry picked from commit 820984cdd2bc8f1bd8675606ec92eb42e01fff75)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109796
Tested-by: Jenkins

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index bb8652429b27..4f7ed6980636 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -603,7 +603,7 @@
 #define FID_DELETE_ALL_NOTES(SID_NEW_SLOTS+104)
 #define SID_SCATTR_CELLPROTECTION(SID_NEW_SLOTS+105)
 #define SID_SELECT_UNPROTECTED_CELLS (SID_NEW_SLOTS+106)
-
+#define SID_CURRENT_FORMULA_RANGE  (SID_NEW_SLOTS+107)
 // idl parameter
 
 #define SID_SORT_BYROW  (SC_PARAM_START)
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 902cf8a639e9..de9f537de767 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -230,6 +230,7 @@ interface CellSelection
 SID_DEC_INDENT  [ ExecMethod = ExecuteEdit; 
StateMethod = GetState; ]
 SID_INC_INDENT  [ ExecMethod = ExecuteEdit; 
StateMethod = GetState; ]
 SID_SELECT_UNPROTECTED_CELLS[ ExecMethod = ExecuteEdit;]
+SID_CURRENT_FORMULA_RANGE   [ ExecMethod = ExecuteEdit;]
 
 SID_THESAURUS   [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
 SID_SPELL_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index a85957b245e7..47b429465197 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -4453,6 +4453,23 @@ SfxVoidItem SelectUnprotectedCells 
SID_SELECT_UNPROTECTED_CELLS
 GroupId = SfxGroupId::Edit;
 ]
 
+SfxVoidItem CurrentFormulaRange SID_CURRENT_FORMULA_RANGE
+(SfxInt32Item StartCol FN_PARAM_1,SfxInt32Item StartRow 
FN_PARAM_2,SfxInt32Item EndCol FN_PARAM_3,SfxInt32Item EndRow FN_PARAM_4, 
SfxInt32Item Table FN_PARAM_5)
+[
+AutoUpdate = FALSE,
+FastCall = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = SfxGroupId::Edit;
+]
+
 SfxVoidItem SelectOLE SID_OLE_SELECT
 ()
 [
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 209172fc731b..a8940d2495ac 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2768,6 +2768,40 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 }
 break;
 
+case SID_CURRENT_FORMULA_RANGE:
+{
+const SfxInt32Item* param1 = 
rReq.GetArg(FN_PARAM_1);
+SCCOL colStart = param1 ? param1->GetValue() : 0;
+
+const SfxInt32Item* param2 = 
rReq.GetArg(FN_PARAM_2);
+SCROW rowStart = param2 ? param2->GetValue() : 0;
+
+const SfxInt32Item* param3 = 
rReq.GetArg(FN_PARAM_3);
+SCCOL colEnd = param3 ? param3->GetValue() : 0;
+
+const SfxInt32Item* param4 = 
rReq.GetArg(FN_PARAM_4);
+SCROW rowEnd = param4 ? param4->GetValue() : 0;
+
+const SfxInt32Item* param5 = 
rReq.GetArg(FN_PARAM_5);
+SCROW table = param5 ? param5->GetValue() : 0;
+
+ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
+
+if(param3 && param4 && pInputHdl && pTabViewShell)
+{
+ScViewData& rData = pTabViewShell->GetViewData();
+ScTabView* pTabView = dynamic_cast< ScTabView* >( 
rData.GetView() );
+
+if (param1 && param2)
+rData.SetRefStart(colStart, rowStart, table);
+
+pTabView->UpdateRef( colEnd, rowEnd, table ); // setup the 
end & refresh formula
+
+pInputHdl->UpdateLokReferenceMarks();
+}
+}
+break;
+
 default:
 OSL_FAIL("incorrect slot in ExecuteEdit");
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-04-02 Thread Samuel Mehrbrodt (via logerrit)
 sc/inc/unonames.hxx   |1 -
 sc/sdi/drawsh.sdi |1 -
 sc/sdi/scalc.sdi  |2 --
 sc/source/filter/xml/xmlexprt.cxx |1 -
 sc/source/ui/unoobj/shapeuno.cxx  |2 --
 5 files changed, 7 deletions(-)

New commits:
commit 7ac53984d7749e50cf2f6f2dcc19e3d53d7ff603
Author: Samuel Mehrbrodt 
AuthorDate: Tue Apr 2 09:07:34 2019 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Apr 2 09:29:45 2019 +0200

Remove unnecessary comments

Change-Id: Ie6dfdc87d209686955ae4b758cd020f2587e7dac
Reviewed-on: https://gerrit.libreoffice.org/70117
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 79f2189e1835..1a89feb1d6ac 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -194,7 +194,6 @@
 #define SC_UNONAME_ANCHOR   "Anchor"
 #define SC_UNONAME_HORIPOS  "HoriOrientPosition"
 #define SC_UNONAME_VERTPOS  "VertOrientPosition"
-// #i66550 HLINK_FOR_SHAPES
 #define SC_UNONAME_HYPERLINK"Hyperlink"
 #define SC_UNONAME_MOVEPROTECT  "MoveProtect"
 
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 53916eca91a2..6b28aea9dfbe 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -221,7 +221,6 @@ interface TableDraw
 SID_FONTWORK_KERN_CHARACTER_PAIRS   [ ExecMethod = ExecDrawFunc ; 
StateMethod = GetDrawFuncState ; ]
 SID_FONTWORK_CHARACTER_SPACING_DIALOG   [ ExecMethod = ExecDrawFunc ; 
StateMethod = GetDrawFuncState ; ]
 
-// ISSUE66550_HLINK_FOR_SHAPES
 SID_DRAW_HLINK_EDIT [ ExecMethod = ExecDrawAttr; StateMethod = 
GetDrawFuncState; Export = FALSE; ]
 SID_DRAW_HLINK_DELETE   [ ExecMethod = ExecDrawAttr; StateMethod = 
GetDrawFuncState; Export = FALSE; ]
 SID_OPEN_HYPERLINK  [ ExecMethod = ExecDrawAttr; StateMethod = 
GetDrawFuncState; Export = FALSE; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 05b43341fe8e..b3b1d3258492 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -5039,7 +5039,6 @@ SfxVoidItem SplitWindow SID_WINDOW_SPLIT
 ]
 
 
-// ISSUE66550_HLINK_FOR_SHAPES
 SfxVoidItem EditShapeHyperlink SID_DRAW_HLINK_EDIT
 ()
 [
@@ -5058,7 +5057,6 @@ SfxVoidItem EditShapeHyperlink SID_DRAW_HLINK_EDIT
 ]
 
 
-// ISSUE66550_HLINK_FOR_SHAPES
 SfxVoidItem DeleteShapeHyperlink SID_DRAW_HLINK_DELETE
 ()
 [
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 189d0a707ede..914a3b728a7a 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3435,7 +3435,6 @@ void ScXMLExport::ExportShape(const uno::Reference < 
drawing::XShape >& xShape,
 }
 if (!bIsChart)
 {
-// #i66550 HLINK_FOR_SHAPES
 OUString sHlink;
 try
 {
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 1468ef39e831..fe05f5155192 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -57,7 +57,6 @@ static const SfxItemPropertyMapEntry* lcl_GetShapeMap()
 {OUString(SC_UNONAME_IMAGEMAP), 0, 
cppu::UnoType::get(), 0, 0 },
 {OUString(SC_UNONAME_VERTPOS), 0, cppu::UnoType::get(), 0, 
0 },
 {OUString(SC_UNONAME_MOVEPROTECT), 0, cppu::UnoType::get(), 
0, 0 },
-// #i66550 HLINK_FOR_SHAPES
 {OUString(SC_UNONAME_HYPERLINK), 0, cppu::UnoType::get(), 0, 
0 },
 {OUString(SC_UNONAME_URL), 0, cppu::UnoType::get(), 0, 0 },
 { OUString(), 0, css::uno::Type(), 0, 0 }
@@ -73,7 +72,6 @@ const SvEventDescription* ScShapeObj::GetSupportedMacroItems()
 };
 return aMacroDescriptionsImpl;
 }
-// #i66550 HLINK_FOR_SHAPES
 ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( const ScShapeObj* pShape, bool 
bCreate = false )
 {
 if( pShape )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2018-10-24 Thread Libreoffice Gerrit user
 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 
AuthorDate: Tue Oct 23 13:14:58 2018 +0200
Commit: Noel Grandin 
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 

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 booloperator==( 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

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

2018-01-26 Thread Samuel Mehrbrodt
 sc/inc/sc.hrc   |1 
 sc/inc/sortparam.hxx|1 
 sc/sdi/scalc.sdi|2 -
 sc/source/core/data/sortparam.cxx   |   11 ++--
 sc/source/ui/dbgui/tpsort.cxx   |4 +++
 sc/source/ui/docshell/dbdocfun.cxx  |2 -
 sc/source/ui/inc/tpsort.hxx |1 
 sc/source/ui/view/cellsh2.cxx   |5 
 sc/source/ui/view/gridwin.cxx   |1 
 sc/uiconfig/scalc/ui/sortoptionspage.ui |   40 
 10 files changed, 53 insertions(+), 15 deletions(-)

New commits:
commit b5f8b046008a27f1da58b934dbe61c0decf36612
Author: Samuel Mehrbrodt 
Date:   Mon Jan 22 17:47:04 2018 +0100

tdf#98931 Add option to sort boundary image-only columns

A similiar option exists for comments-only columns.
If enabled, image-only columns are considered when sorting (and selected).

This is the default behavior, but can now be disabled.

Change-Id: Ie9dfdf913ea5904480c96375beb4e25bcb880785
Reviewed-on: https://gerrit.libreoffice.org/48351
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index e4823e58ff44..71be34add605 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -625,6 +625,7 @@
 #define SID_SORT_USERDEF(SC_PARAM_START+4)
 #define SID_SORT_NATURALSORT(SC_PARAM_START+5)
 #define SID_SORT_INCCOMMENTS(SC_PARAM_START+6)
+#define SID_SORT_INCIMAGES  (SC_PARAM_START+7)
 
 // Sidebar -
 
diff --git a/sc/inc/sortparam.hxx b/sc/inc/sortparam.hxx
index d0cd0204d518..6eba07e64487 100644
--- a/sc/inc/sortparam.hxx
+++ b/sc/inc/sortparam.hxx
@@ -50,6 +50,7 @@ struct SC_DLLPUBLIC ScSortParam
 boolbCaseSens;
 boolbNaturalSort;
 boolbIncludeComments;
+boolbIncludeGraphicObjects;
 boolbUserDef;
 boolbIncludePattern;
 boolbInplace;
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index f238b4633721..216aeebc7bc9 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -1094,7 +1094,7 @@ SfxVoidItem DataSelect SID_DATA_SELECT
 
 
 SfxVoidItem DataSort SID_SORT
-(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader 
SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem 
NaturalSort SID_SORT_NATURALSORT,SfxBoolItem IncludeAttribs 
SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 
FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 
FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 
FN_PARAM_5,SfxBoolItem Ascending3 FN_PARAM_6,SfxBoolItem IncludeComments 
SID_SORT_INCCOMMENTS)
+(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader 
SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem 
NaturalSort SID_SORT_NATURALSORT,SfxBoolItem IncludeAttribs 
SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 
FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 
FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 
FN_PARAM_5,SfxBoolItem Ascending3 FN_PARAM_6,SfxBoolItem IncludeComments 
SID_SORT_INCCOMMENTS, SfxBoolItem IncludeImages SID_SORT_INCIMAGES)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/core/data/sortparam.cxx 
b/sc/source/core/data/sortparam.cxx
index 98033816ece5..cd98dd07a982 100644
--- a/sc/source/core/data/sortparam.cxx
+++ b/sc/source/core/data/sortparam.cxx
@@ -35,7 +35,8 @@ ScSortParam::ScSortParam()
 ScSortParam::ScSortParam( const ScSortParam& r ) :
 
nCol1(r.nCol1),nRow1(r.nRow1),nCol2(r.nCol2),nRow2(r.nRow2),nUserIndex(r.nUserIndex),
 bHasHeader(r.bHasHeader),bByRow(r.bByRow),bCaseSens(r.bCaseSens),
-
bNaturalSort(r.bNaturalSort),bIncludeComments(r.bIncludeComments),bUserDef(r.bUserDef),
+bNaturalSort(r.bNaturalSort),bIncludeComments(r.bIncludeComments),
+bIncludeGraphicObjects(r.bIncludeGraphicObjects),bUserDef(r.bUserDef),
 bIncludePattern(r.bIncludePattern),bInplace(r.bInplace),
 nDestTab(r.nDestTab),nDestCol(r.nDestCol),nDestRow(r.nDestRow),
 maKeyState( r.maKeyState ),
@@ -57,6 +58,7 @@ void ScSortParam::Clear()
 nUserIndex = 0;
 bHasHeader=bCaseSens=bUserDef=bNaturalSort = false;
 bIncludeComments = false;
+bIncludeGraphicObjects = true;
 bByRow=bIncludePattern=bInplace = true;
 aCollatorLocale = css::lang::Locale();
 aCollatorAlgorithm.clear();
@@ -81,6 +83,7 @@ ScSortParam& ScSortParam::operator=( const ScSortParam& r )
 bCaseSens   = r.bCaseSens;
 bNaturalSort= r.bNaturalSort;
 bIncludeComments= r.bIncludeComments;
+bIncludeGraphicObjects = r.bIncludeGraphicObjects;
 bUserDef= r.bUserDef;
 bIncludePattern = r.bIncludePattern;
 bInplace= r.bInplace;
@@ -125,6 +128,7 @@ bool ScSortParam::operator==( const ScSortParam& rOther ) 
const

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

2017-12-22 Thread Noel Grandin
 sc/inc/sc.hrc|   23 ++
 sc/sdi/cellsh.sdi|9 +
 sc/sdi/docsh.sdi |4 
 sc/sdi/scalc.sdi |  349 +++
 sc/sdi/tabvwsh.sdi   |8 
 sc/source/ui/docshell/docsh4.cxx |   49 +
 sc/source/ui/view/cellsh.cxx |   52 +
 sc/source/ui/view/cellsh1.cxx|   12 +
 sc/source/ui/view/cellsh3.cxx|   18 ++
 sc/source/ui/view/tabvwsh3.cxx   |7 
 sc/source/ui/view/tabvwshh.cxx   |  161 +
 11 files changed, 690 insertions(+), 2 deletions(-)

New commits:
commit f90139cc60116c28140f1bfb1d88076d1591
Author: Noel Grandin 
Date:   Fri Dec 22 13:19:27 2017 +0200

Revert "unused SID commands in sc"

This reverts commit 9c4350441191ccfd6af3d73e13b4eb59af7ed6d1.

Eike Rathke:

Odd, I don't even remember what these slots were used for..
Ugh.. now I think I know.. (very) old recorded Basic macros used 
slot:number with the dispatcher instead of the .uno:... commands, so 
removing/renumbering slots may actually break those.

I'm not sure if we already deprecated the slot number thing in an earlier 
release or maybe it was already done back in OOo times, I simply don't 
remember. Must be at least 1.5 decades since slot numbers were replaced with 
.uno commands, but old recorded macros are still supported.

However, our qaDevOOo tests and some other tests (in Java) still use 
slot: notation, git grep 'slot:[0-9]'

I think best is to revert this change and abandon the other SID removals.

Change-Id: I091cf71dd38772dac7491afd6f28951b54510eaf
Reviewed-on: https://gerrit.libreoffice.org/46963
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 91f29cbaadd4..ee3caa1d7e7c 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -194,6 +194,8 @@
 #define SID_CHART_NAME  (SC_MESSAGE_START + 26)
 #define SID_CHART_ADDSOURCE (SC_MESSAGE_START + 27)
 
+#define SID_AUTO_STYLE  (SC_MESSAGE_START + 28)
+
 #define FID_INPUTLINE_BLOCK (SC_MESSAGE_START + 29)
 
 #define SID_STATUS_SUM  (SC_MESSAGE_START + 30)
@@ -436,6 +438,7 @@
 #define DETECTIVE_END   (DETECTIVE_START+20)
 
 #define SID_API_SLOTS   (DETECTIVE_END)
+#define SID_INSERT_MATRIX   (SID_API_SLOTS+1)
 
 #define SID_DELETE_NOTE (SID_API_SLOTS+2)
 
@@ -491,6 +494,8 @@
 #define SID_SETINPUTMODE(SID_KEYFUNC_START + 31)
 #define SID_DELETE_CONTENTS (SID_KEYFUNC_START + 32)
 
+#define SID_MARKAREA(SID_KEYFUNC_START + 33)
+
 #define FID_FILL_AUTO   (SID_KEYFUNC_START + 35)
 #define SID_CANCEL  (SID_KEYFUNC_START + 36)
 
@@ -513,12 +518,20 @@
 
 #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)
+#define SID_RANGE_FORMULA   (SID_NEW_SLOTS+24)
+#define SID_RANGE_TEXTVALUE (SID_NEW_SLOTS+26)
+#define SID_TABLE_ACTIVATE  (SID_NEW_SLOTS+27)
 
 #define SID_DEFINE_PRINTAREA(SID_NEW_SLOTS+31)
 #define SID_DELETE_PRINTAREA(SID_NEW_SLOTS+32)
 #define SID_CHANGE_PRINTAREA(SID_NEW_SLOTS+33)
 #define SID_OPENDLG_EDIT_PRINTAREA  (SID_NEW_SLOTS+34)
 
+#define SID_OLE_ACTIVATE(SID_NEW_SLOTS+36)
+#define SID_OLE_DEACTIVATE  (SID_NEW_SLOTS+37)
+
 #define SID_TOGGLE_REL  (SID_NEW_SLOTS+38)
 #define SID_DATA_SELECT (SID_NEW_SLOTS+39)
 
@@ -530,8 +543,13 @@
 #define FID_REPLACE_ALL (SID_NEW_SLOTS+44)
 #define FID_SEARCH_COUNT(SID_NEW_SLOTS+45)
 
+#define SID_SC_SETTEXT  (SID_NEW_SLOTS+46)
+#define SID_RANGE_ADDRESS   (SID_NEW_SLOTS+47)
 #define SID_NUMBER_FORMAT   (SID_NEW_SLOTS+49)
 
+#define SID_OLE_SELECT  (SID_NEW_SLOTS+50)
+
+#define SID_RANGE_NOTETEXT  (SID_NEW_SLOTS+52)
 #define FID_INSERT_FILE (SID_NEW_SLOTS+53)
 
 #define FID_VALIDATION  (SID_NEW_SLOTS+54)
@@ -574,6 +592,11 @@
 #define FID_RESET_PRINTZOOM (SID_NEW_SLOTS+82)
 
 #define SID_TABLES_COUNT(SID_NEW_SLOTS+83)
+#define SID_ACTIVE_OBJ_NAME (SID_NEW_SLOTS+84)
+#define SID_OBJECT_LEFT (SID_NEW_SLOTS+85)
+#define SID_OBJECT_TOP  (SID_NEW_SLOTS+86)
+#define SID_OBJECT_WIDTH(SID_NEW_SLOTS+87)
+#define SID_OBJECT_HEIGHT   (SID_NEW_SLOTS+88)
 
 #define SID_DELETE_SCENARIO (SID_NEW_SLOTS+95)
 #define SID_EDIT_SCENARIO   (SID_NEW_SLOTS+96)
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index ece262c3e276..decb76cfc659 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -65,14 +65,23 @@ interface CellSelection
 // } database operations
 
 
+SID_RANGE_ADDRESS   [ StateMethod = GetState; ]
+
 SID_HYPERLINK_SETLINK   [ ExecMethod = ExecuteEdit; ]
 SID_HYPERLINK_GETLINK   [ StateMethod = GetHLinkState; ]
 SID_UPDATECHART [ E

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

2016-10-24 Thread Dennis Francis
 sc/inc/document.hxx |5 -
 sc/inc/sc.hrc   |1 +
 sc/inc/sortparam.hxx|1 +
 sc/inc/table.hxx|2 +-
 sc/sdi/scalc.sdi|2 +-
 sc/source/core/data/document.cxx|4 ++--
 sc/source/core/data/sortparam.cxx   |9 ++---
 sc/source/core/data/table1.cxx  |8 +++-
 sc/source/ui/dbgui/tpsort.cxx   |4 
 sc/source/ui/docshell/dbdocfun.cxx  |3 ++-
 sc/source/ui/inc/tpsort.hxx |2 ++
 sc/source/ui/view/cellsh2.cxx   |5 +
 sc/source/ui/view/gridwin.cxx   |1 +
 sc/uiconfig/scalc/ui/sortoptionspage.ui |   32 +++-
 14 files changed, 60 insertions(+), 19 deletions(-)

New commits:
commit 258d039798b9ca4cc95a14d62e30bb725ad2c8ec
Author: Dennis Francis 
Date:   Fri Oct 7 20:50:43 2016 +0530

tdf#100517 : Optionally include comment-only columns when sorting

Change-Id: I6b8d4cceda276bef95b28706fb15cb040e07f4c6
Reviewed-on: https://gerrit.libreoffice.org/29593
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3a53e66..ed7bdab 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1253,13 +1253,16 @@ public:
 If TRUE, do not adjust the top row.
 @param  bStickyLeftCol
 If TRUE, do not adjust the left column.
+@param  bConsiderCellNotes
+If TRUE, consider the presence of cell notes 
besides data.
 
 @returns true if there is any data, false if not.
  */
 boolShrinkToUsedDataArea( bool& o_bShrunk,
   SCTAB nTab, SCCOL& rStartCol, SCROW& 
rStartRow,
   SCCOL& rEndCol, SCROW& rEndRow, bool 
bColumnsOnly,
-  bool bStickyTopRow = false, bool 
bStickyLeftCol = false ) const;
+  bool bStickyTopRow = false, bool 
bStickyLeftCol = false,
+  bool bConsiderCellNotes = false ) 
const;
 
 /**
  * Return the last non-empty row position in given columns that's no
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 31bd7d6..0966da0 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -687,6 +687,7 @@
 #define SID_SORT_ATTRIBS(SC_PARAM_START+3)
 #define SID_SORT_USERDEF(SC_PARAM_START+4)
 #define SID_SORT_NATURALSORT(SC_PARAM_START+5)
+#define SID_SORT_INCCOMMENTS(SC_PARAM_START+6)
 
 // Sidebar -
 
diff --git a/sc/inc/sortparam.hxx b/sc/inc/sortparam.hxx
index 268b14c..3351249 100644
--- a/sc/inc/sortparam.hxx
+++ b/sc/inc/sortparam.hxx
@@ -49,6 +49,7 @@ struct SC_DLLPUBLIC ScSortParam
 boolbByRow;
 boolbCaseSens;
 boolbNaturalSort;
+boolbIncludeComments;
 boolbUserDef;
 boolbIncludePattern;
 boolbInplace;
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index e163233..350dcbd 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -504,7 +504,7 @@ public:
 
 boolShrinkToUsedDataArea( bool& o_bShrunk, SCCOL& rStartCol, 
SCROW& rStartRow,
   SCCOL& rEndCol, SCROW& rEndRow, bool 
bColumnsOnly,
-  bool bStickyTopRow, bool bStickyLeftCol 
) const;
+  bool bStickyTopRow, bool bStickyLeftCol, 
bool bConsiderCellNotes=false ) const;
 
 SCROW GetLastDataRow( SCCOL nCol1, SCCOL nCol2, SCROW nLastRow ) const;
 
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index fee950c..aff8050 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -1259,7 +1259,7 @@ SfxVoidItem DataSelect SID_DATA_SELECT
 
 
 SfxVoidItem DataSort SID_SORT
-(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader 
SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem 
NaturalSort SID_SORT_NATURALSORT,SfxBoolItem IncludeAttribs 
SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 
FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 
FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 
FN_PARAM_5,SfxBoolItem Ascending3 FN_PARAM_6)
+(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader 
SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem 
NaturalSort SID_SORT_NATURALSORT,SfxBoolItem IncludeAttribs 
SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 
FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 
FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 
FN_PARAM_5,SfxBoolItem Ascending3

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

2014-05-23 Thread Kohei Yoshida
 sc/inc/sc.hrc  |1 
 sc/sdi/cellsh.sdi  |1 
 sc/sdi/scalc.sdi   |   23 +++
 sc/source/ui/app/scdll.cxx |2 
 sc/source/ui/dialogs/searchresults.cxx |   68 +++--
 sc/source/ui/inc/searchresults.hxx |   34 ++--
 sc/source/ui/view/cellsh1.cxx  |   15 +++
 sc/source/ui/view/tabvwsh.cxx  |5 +-
 sc/source/ui/view/viewfun2.cxx |   14 +-
 9 files changed, 144 insertions(+), 19 deletions(-)

New commits:
commit 81c492ef18b04cc283561018d69818cbca7f83ef
Author: Kohei Yoshida 
Date:   Fri May 23 11:24:24 2014 -0400

fdo#79011: Properly implement the search results dialog as modeless.

It's unfortunate that adding a modeless dialog is such a pain.  But we
still need to implemenet this properly else we'll leak at best, or end
up with tons of weird bugs at worst.

Change-Id: Ie03260f288fad76f994d0ca6a8b1feeade299ffd

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 2253aac..5204efb 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -270,6 +270,7 @@
 #define SID_MOVING_AVERAGE_DIALOG   (SC_MESSAGE_START + 77)
 #define SID_TTEST_DIALOG(SC_MESSAGE_START + 78)
 #define SID_FTEST_DIALOG(SC_MESSAGE_START + 79)
+#define SID_SEARCH_RESULTS_DIALOG   (SC_MESSAGE_START + 80)
 
 // functions
 
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 62ce485..8447768 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -161,6 +161,7 @@ interface CellSelection
 SID_MOVING_AVERAGE_DIALOG   [ ExecMethod = ExecuteEdit; 
StateMethod = GetBlockState; ]
 SID_TTEST_DIALOG[ ExecMethod = ExecuteEdit; 
StateMethod = GetBlockState; ]
 SID_FTEST_DIALOG[ ExecMethod = ExecuteEdit; 
StateMethod = GetBlockState; ]
+SID_SEARCH_RESULTS_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = 
GetBlockState; ]
 SID_MARKDATAAREA[ ExecMethod = ExecuteMove; StateMethod = 
GetStateCursor; ]
 SID_MARKARRAYFORMULA [ ExecMethod = ExecuteMove; StateMethod = 
GetStateCursor; ]
 SID_SETINPUTMODE[ ExecMethod = ExecuteMove; StateMethod = 
GetStateCursor; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index fe3d780..1835459 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3231,6 +3231,29 @@ SfxVoidItem SolverDialog SID_OPENDLG_OPTSOLVER
 GroupId = GID_OPTIONS;
 ]
 
+SfxVoidItem SearchResultsDialog SID_SEARCH_RESULTS_DIALOG
+()
+[
+/* flags: */
+AutoUpdate = FALSE,
+Cachable = Cachable,
+FastCall = FALSE,
+HasCoreId = FALSE,
+HasDialog = TRUE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+Synchron;
+
+/* config: */
+AccelConfig = TRUE,
+MenuConfig = TRUE,
+StatusBarConfig = FALSE,
+ToolBoxConfig = TRUE,
+GroupId = GID_OPTIONS;
+]
 
 SfxVoidItem ValidityReference SID_VALIDITY_REFERENCE
 ()
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index d4cf759..9f9f839 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -72,6 +72,7 @@
 
 #include "docpool.hxx"
 #include "appoptio.hxx"
+#include 
 
 // Controls
 
@@ -285,6 +286,7 @@ void ScDLL::Init()
 ScSpellDialogChildWindow::RegisterChildWindow(false, pMod);
 
 ScValidityRefChildWin::RegisterChildWindow(false, pMod);
+sc::SearchResultsDlgWrapper::RegisterChildWindow(false, pMod);
 
 // EditEngine Field; insofar not already defined in OfficeApplication::Init
 SvClassManager& rClassManager = SvxFieldItem::GetClassManager();
diff --git a/sc/source/ui/dialogs/searchresults.cxx 
b/sc/source/ui/dialogs/searchresults.cxx
index 3b27a2a..51c5ece 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -11,14 +11,19 @@
 
 #include 
 #include 
+#include 
+#include 
 #include "dociter.hxx"
 #include "document.hxx"
 #include "rangeutl.hxx"
 #include "tabvwsh.hxx"
+#include 
 
-SearchResults::SearchResults(ScDocument *pDoc) :
-ModelessDialog(NULL, "SearchResultsDialog", 
"modules/scalc/ui/searchresults.ui")
-, mpDoc(pDoc)
+namespace sc {
+
+SearchResultsDlg::SearchResultsDlg( SfxBindings* _pBindings, Window* pParent, 
sal_uInt16 nId ) :
+ModelessDialog(pParent, "SearchResultsDialog", 
"modules/scalc/ui/searchresults.ui"),
+mpBindings(_pBindings), mnId(nId), mpDoc(NULL)
 {
 SvSimpleTableContainer *pContainer = 
get("results");
 Size aControlSize(150, 120);
@@ -30,36 +35,56 @@ SearchResults::SearchResults(ScDocument *pDoc) :
 long nTabs[] = {3, 0, 40, 60};
 mpList->SetTabs(&nTabs[0]);
 mpList->InsertHeaderEntry("Sheet\tCell\tContent");
-mpList->SetSelectHdl( LINK(this, SearchResults, ListSelectHdl) );
+mpList->SetSelectHdl( LINK(this, SearchResultsDlg, ListSelectHdl) );
 }
 
-SearchResults::~SearchResults()
+SearchRes

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

2014-03-19 Thread gdm . manmeet
 sc/inc/globstr.hrc|4 +++-
 sc/inc/sc.hrc |1 +
 sc/sdi/cellsh.sdi |1 +
 sc/sdi/scalc.sdi  |   26 ++
 sc/source/ui/src/globstr.src  |4 
 sc/source/ui/view/cellsh.cxx  |   20 
 sc/source/ui/view/preview.cxx |1 +
 sc/source/ui/view/tabview3.cxx|3 +++
 sc/source/ui/view/viewfun2.cxx|1 +
 sc/uiconfig/scalc/statusbar/statusbar.xml |1 +
 10 files changed, 61 insertions(+), 1 deletion(-)

New commits:
commit 82b5ded699fcc03a09b0930213da204a332285e6
Author: gdm.manmeet 
Date:   Tue Mar 18 13:21:39 2014 +0530

fdo#64290 ui:count selected rows and columns

Change-Id: Ie6443fd9b1ac6332b4937c4b6b5d565cca1fe612

diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index c402de2..3dfb79b 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -687,7 +687,9 @@
 #define STR_CTRLCLICKHYPERLINK  526
 #define STR_CLICKHYPERLINK  527
 
-#define SC_GLOBSTR_STR_COUNT528 /**< the count of permanently 
resident strings */
+#define STR_ROWCOL_SELCOUNT 528
+
+#define SC_GLOBSTR_STR_COUNT529 /**< the count of permanently 
resident strings */
 
 #endif
 
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index c776750..507255b 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -242,6 +242,7 @@
 #define SC_HINT_DOC_SAVED   (SC_MESSAGE_START + 35)
 #define SC_HINT_FORCESETTAB (SC_MESSAGE_START + 36)
 #define SID_ENTER_STRING(SC_MESSAGE_START + 37)
+#define SID_ROWCOL_SELCOUNT (SC_MESSAGE_START + 38)
 
 // messages for opening dialogs:
 #define SID_OPENDLG_CONSOLIDATE (SC_MESSAGE_START + 50)
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 3e18a13..65ff899 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -404,6 +404,7 @@ interface CellMovement
 SID_SELECTALL   [ ExecMethod = Execute; StateMethod = GetState;   ]
 SID_STATUS_SUM  [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_STATUS_DOCPOS   [ ExecMethod = Execute; StateMethod = GetState; ]
+SID_ROWCOL_SELCOUNT [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_STATUS_SELMODE  [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_STATUS_SELMODE_ERG  [ ExecMethod = Execute; ]
 SID_STATUS_SELMODE_ERW  [ ExecMethod = Execute; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index ca7b225..fac4558 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -7003,6 +7003,32 @@ SfxStringItem StatusDocPos SID_STATUS_DOCPOS
 GroupId = GID_VIEW;
 ]
 
+SfxStringItem RowColSelCount SID_ROWCOL_SELCOUNT
+
+[
+/* flags: */
+AutoUpdate = FALSE,
+Cachable = Cachable,
+FastCall = FALSE,
+HasCoreId = FALSE,
+HasDialog = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+Synchron;
+
+Readonly = TRUE,
+
+/* config: */
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+StatusBarConfig = TRUE,
+ToolBoxConfig = FALSE,
+GroupId = GID_VIEW;
+]
+
 
 SfxStringItem StatusFunction SID_STATUS_SUM
 
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index 47c5d94..82eb914 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -585,6 +585,10 @@ Resource RID_GLOBSTR
 {
 Text [ en-US ] = "Sheet" ;
 };
+String STR_ROWCOL_SELCOUNT
+{
+Text [ en-US ] = "Selected $1 rows, $2 columns";
+};
 String STR_COLUMN
 {
 Text [ en-US ] = "Column" ;
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index dfea350..3cd823c 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -679,6 +679,26 @@ void ScCellShell::GetState(SfxItemSet &rSet)
 }
 break;
 
+case SID_ROWCOL_SELCOUNT:
+{
+ScRange aMarkRange;
+GetViewData()->GetSimpleArea( aMarkRange );
+SCCOL nCol1, nCol2;
+SCROW nRow1, nRow2;
+nCol1 = aMarkRange.aStart.Col();
+nRow1 = aMarkRange.aStart.Row();
+nCol2 = aMarkRange.aEnd.Col();
+nRow2 = aMarkRange.aEnd.Row();
+if( nCol2 != nCol1 || nRow1 != nRow2 )
+{
+OUString aStr = ScGlobal::GetRscString( 
STR_ROWCOL_SELCOUNT );
+aStr = aStr.replaceAll( "$1", OUString::number( nRow2 
- nRow1 + 1 ));
+aStr = aStr.replaceAll( "$2", OUString::number( nCol2 
- nCol1 + 1 ));
+rSet.Put( SfxStringItem( nWhich, aStr ) );
+}
+}
+break;
+
 //  calculations etc. with date/time/Fail/position&size toge