Kaydet (Commit) 82b5ded6 authored tarafından gdm.manmeet's avatar gdm.manmeet Kaydeden (comit) Jan Holesovsky

fdo#64290 ui:count selected rows and columns

Change-Id: Ie6443fd9b1ac6332b4937c4b6b5d565cca1fe612
üst 5b3c9314
......@@ -687,7 +687,9 @@
#define STR_CTRLCLICKHYPERLINK 526
#define STR_CLICKHYPERLINK 527
#define SC_GLOBSTR_STR_COUNT 528 /**< the count of permanently resident strings */
#define STR_ROWCOL_SELCOUNT 528
#define SC_GLOBSTR_STR_COUNT 529 /**< the count of permanently resident strings */
#endif
......
......@@ -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)
......
......@@ -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; ]
......
......@@ -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
......
......@@ -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" ;
......
......@@ -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 together
// #i34458# The SfxStringItem belongs only into SID_TABLE_CELL. It no longer has to be
......
......@@ -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);
......
......@@ -355,6 +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
......@@ -385,6 +386,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 +1750,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
......
......@@ -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 );
......
......@@ -19,6 +19,7 @@
-->
<statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
<statusbar:statusbaritem xlink:href=".uno:StatusDocPos" statusbar:align="left" statusbar:autosize="true" statusbar:width="58"/>
<statusbar:statusbaritem xlink:href=".uno:RowColSelCount" statusbar:align="left" statusbar:autosize="true" statusbar:width="58"/>
<statusbar:statusbaritem xlink:href=".uno:StatusPageStyle" statusbar:align="left" statusbar:autosize="true" statusbar:width="83"/>
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="55"/>
<statusbar:statusbaritem xlink:href=".uno:StatusSelectionMode" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16"/>
......
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