Resolves: tdf#83128 translate row/col counts as separate n_gettext args

Change-Id: I2aadeb92bbe482c766b1debf6278928d38dcc5d0
Reviewed-on: https://gerrit.libreoffice.org/63202
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 88e059d..849db2c 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -156,7 +156,13 @@
#define STR_PIVOT_TOTAL                         NC_("STR_PIVOT_TOTAL", "Total")
#define STR_PIVOT_DATA                          NC_("STR_PIVOT_DATA", "Data")
#define STR_PIVOT_GROUP                         NC_("STR_PIVOT_GROUP", "Group")
#define STR_ROWCOL_SELCOUNT                     NC_("STR_ROWCOL_SELCOUNT", "$1 rows, $2 columns selected")
/* To translators: $1 == will be replaced by STR_SELCOUNT_ROWARG, and $2 by STR_SELCOUNT_COLARG
   e.g. Selected: 1 row, 2 columns */
#define STR_SELCOUNT                            NC_("STR_SELCOUNT", "Selected: $1, $2")
// To translators: STR_SELCOUNT_ROWARG is $1 of STR_SELCOUNT. $1 of STR_SELCOUNT_ROWARG is number of rows
#define STR_SELCOUNT_ROWARG                     NNC_("STR_SELCOUNT_ROWARG", "$1 row", "$1 rows")
// To translators: STR_SELCOUNT_COLARG is $1 of STR_SELCOUNT. $1 of STR_SELCOUNT_ROWARG is number of columns
#define STR_SELCOUNT_COLARG                     NNC_("STR_SELCOUNT_COLARG", "$1 column", "$1 columns")
#define STR_FILTER_SELCOUNT                     NC_("STR_FILTER_SELCOUNT", "$1 of $2 records found")
#define STR_COLUMN                              NC_("STR_COLUMN", "Column")
#define STR_ROW                                 NC_("STR_ROW", "Row")
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index d73fc4a..63228e8 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -769,9 +769,13 @@
                    nRow2 = aMarkRange.aEnd.Row();
                    if( nCol2 != nCol1 || nRow1 != nRow2 )
                    {
                        OUString aStr = ScResId( STR_ROWCOL_SELCOUNT );
                        aStr = aStr.replaceAll( "$1", OUString::number( nRow2 - nRow1 + 1 ));
                        aStr = aStr.replaceAll( "$2", OUString::number( nCol2 - nCol1 + 1 ));
                        const auto nRows = nRow2 - nRow1 + 1;
                        OUString aRowArg = ScResId(STR_SELCOUNT_ROWARG, nRows).replaceAll("$1", OUString::number(nRows));
                        const auto nCols = nCol2 - nCol1 + 1;
                        OUString aColArg = ScResId(STR_SELCOUNT_COLARG, nCols).replaceAll("$1", OUString::number(nCols));
                        OUString aStr = ScResId(STR_SELCOUNT);
                        aStr = aStr.replaceAll("$1", aRowArg);
                        aStr = aStr.replaceAll("$2", aColArg);
                        rSet.Put( SfxStringItem( nWhich, aStr ) );
                    }
                    else