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/prevwsh.sdi b/sc/sdi/prevwsh.sdi index 5d92070..0df2a5e 100644 --- a/sc/sdi/prevwsh.sdi +++ b/sc/sdi/prevwsh.sdi @@ -25,6 +25,7 @@ interface TablePrintPreview SID_ATTR_ZOOM [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] FID_SCALE [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] SID_STATUS_DOCPOS [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] + SID_ROWCOL_SELCOUNT [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] SID_PREVIEW_NEXT [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] SID_PREVIEW_PREVIOUS [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] SID_PREVIEW_FIRST [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] 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/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index dfea350..9355c18 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -678,6 +678,25 @@ void ScCellShell::GetState(SfxItemSet &rSet) rSet.Put( SfxStringItem( nWhich, aStr ) ); } 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) // To ensure rectangular selection + + { + OUString aStr = OUString::number( nRow2 - nRow1 + 1) + " row : " + OUString::number( nCol2 - nCol1 + 1) + " col Selected "; + rSet.Put( SfxStringItem( nWhich, aStr ) ); + } + } + break; // calculations etc. with date/time/Fail/position&size together diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 013d92b..5d2b015 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -867,6 +867,7 @@ void ScPreview::StaticInvalidate() SfxBindings& rBindings = pViewFrm->GetBindings(); rBindings.Invalidate(SID_STATUS_DOCPOS); + rBindings.Invalidate(SID_ROWCOL_SELCOUNT); rBindings.Invalidate(SID_STATUS_PAGESTYLE); rBindings.Invalidate(SID_PREVIEW_PREVIOUS); rBindings.Invalidate(SID_PREVIEW_NEXT); diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 174520a..24ecb25 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -881,6 +881,9 @@ void ScPreviewShell::GetState( SfxItemSet& rSet ) case SID_STATUS_DOCPOS: rSet.Put( SfxStringItem( nWhich, pPreview->GetPosString() ) ); break; + case SID_ROWCOL_SELCOUNT: + rSet.Put( SfxStringItem( nWhich, pPreview->GetPosString() ) ); + break; case SID_PRINTPREVIEW: rSet.Put( SfxBoolItem( nWhich, true ) ); break; diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 255dfb9..ab6d633 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -355,7 +355,7 @@ void ScTabView::CellContentChanged() rBindings.Invalidate( SID_ATTR_SIZE ); // -> Fehlermeldungen anzeigen rBindings.Invalidate( SID_THESAURUS ); rBindings.Invalidate( SID_HYPERLINK_GETLINK ); - + rBindings.Invalidate( SID_ROWCOL_SELCOUNT ); InvalidateAttribs(); // Attribut-Updates aViewData.GetViewShell()->UpdateInputHandler(); @@ -385,6 +385,7 @@ void ScTabView::SelectionChanged() rBindings.Invalidate( FID_SHOW_NOTE ); rBindings.Invalidate( FID_HIDE_NOTE ); rBindings.Invalidate( SID_DELETE_NOTE ); + rBindings.Invalidate( SID_ROWCOL_SELCOUNT ); // Funktionen, die evtl disabled werden muessen @@ -1748,6 +1749,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa rBindings.Invalidate( FID_DEL_MANUALBREAKS ); rBindings.Invalidate( FID_RESET_PRINTZOOM ); rBindings.Invalidate( SID_STATUS_DOCPOS ); // Statusbar + rBindings.Invalidate( SID_ROWCOL_SELCOUNT ); //Statusbar rBindings.Invalidate( SID_STATUS_PAGESTYLE ); // Statusbar rBindings.Invalidate( SID_CURRENTTAB ); // Navigator rBindings.Invalidate( SID_STYLE_FAMILY2 ); // Gestalter diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 0ddaecf..2707df9 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1874,6 +1874,7 @@ void ScViewFunc::MakeScenario( const OUString& rName, const OUString& rComment, { SfxBindings& rBindings = GetViewData()->GetBindings(); rBindings.Invalidate( SID_STATUS_DOCPOS ); // Statusbar + rBindings.Invalidate( SID_ROWCOL_SELCOUNT); // Statusbar rBindings.Invalidate( SID_TABLES_COUNT ); rBindings.Invalidate( SID_SELECT_SCENARIO ); rBindings.Invalidate( FID_TABLE_SHOW ); diff --git a/sc/uiconfig/scalc/statusbar/statusbar.xml b/sc/uiconfig/scalc/statusbar/statusbar.xml index 55d2f13..79a746f 100644 --- a/sc/uiconfig/scalc/statusbar/statusbar.xml +++ b/sc/uiconfig/scalc/statusbar/statusbar.xml @@ -19,6 +19,7 @@ --> +