summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/globstr.hrc5
-rw-r--r--sc/source/ui/src/globstr.src4
-rw-r--r--sc/source/ui/view/gridwin4.cxx8
3 files changed, 10 insertions, 7 deletions
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 1f16de350..70f1c9a0b 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -595,7 +595,8 @@
#define STR_FORM_SPINNER 455
#define STR_FORM_SCROLLBAR 456
-#define STR_COUNT 457
+#define STR_PGNUM 457
-#endif
+#define STR_COUNT 458
+#endif
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index c18dd7240..a3fd6d5b7 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -619,6 +619,10 @@ Resource RID_GLOBSTR
{
Text [ en-US ] = "Page" ;
};
+ String STR_PGNUM
+ {
+ Text [ en-US ] = "Page %1" ;
+ };
String STR_LOAD_DOC
{
Text [ en-US ] = "Load document" ;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 4a1f18cba..e4760fb3f 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -962,15 +962,14 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
Color aManual( rColorCfg.GetColorValue(svtools::CALCPAGEBREAKMANUAL).nColor );
Color aAutomatic( rColorCfg.GetColorValue(svtools::CALCPAGEBREAK).nColor );
- String aPageText = ScGlobal::GetRscString( STR_PAGE );
+ String aPageStr = ScGlobal::GetRscString( STR_PGNUM );
if ( nPageScript == 0 )
{
// get script type of translated "Page" string only once
- nPageScript = pDoc->GetStringScriptType( aPageText );
+ nPageScript = pDoc->GetStringScriptType( aPageStr );
if (nPageScript == 0)
nPageScript = ScGlobal::GetDefaultScriptType();
}
- aPageText += ' ';
Font aFont;
ScEditEngineDefaulter* pEditEng = NULL;
@@ -1095,8 +1094,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
nPageNo += ((long)nColPos)*nRowBreaks+nRowPos;
else
nPageNo += ((long)nRowPos)*nColBreaks+nColPos;
- String aPageStr = aPageText;
- aPageStr += String::CreateFromInt32(nPageNo);
+ aPageStr.SearchAndReplaceAscii("%1", String::CreateFromInt32(nPageNo));
if ( pEditEng )
{