Kaydet (Commit) 4b4e4ccf authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt Kaydeden (comit) Thomas Arnhold

fdo#80617 Use complete string to allow translation for page number info

Change-Id: I8cc899f70ee4dcd65495b8ccc153a8fc3a2cc413
Reviewed-on: https://gerrit.libreoffice.org/11157Reviewed-by: 's avatarAdolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst 90c38d99
......@@ -31,7 +31,9 @@
#define STR_DOC_STAT (RC_GLOBALS_BEGIN + 10)
#define STR_PAGE (RC_GLOBALS_BEGIN + 14)
#define STR_PRINTOPTUI (RC_GLOBALS_BEGIN + 15)
#define STR_PAGE_COUNT (RC_GLOBALS_BEGIN + 15)
#define STR_PAGE_COUNT_CUSTOM (RC_GLOBALS_BEGIN + 16)
#define STR_PRINTOPTUI (RC_GLOBALS_BEGIN + 17)
#define ST_SCRIPT_WESTERN (RC_GLOBALS_BEGIN + 105)
#define ST_SCRIPT_ASIAN (RC_GLOBALS_BEGIN + 106)
......@@ -39,32 +41,32 @@
//EventStrings
#define STR_EVENT_OBJECT_SELECT ( RC_GLOBALS_BEGIN + 17 )
#define STR_EVENT_START_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 18 )
#define STR_EVENT_END_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 19 )
#define STR_EVENT_MOUSEOVER_OBJECT ( RC_GLOBALS_BEGIN + 20 )
#define STR_EVENT_MOUSECLICK_OBJECT ( RC_GLOBALS_BEGIN + 21 )
#define STR_EVENT_MOUSEOUT_OBJECT ( RC_GLOBALS_BEGIN + 22 )
#define STR_EVENT_IMAGE_LOAD ( RC_GLOBALS_BEGIN + 23 )
#define STR_EVENT_IMAGE_ABORT ( RC_GLOBALS_BEGIN + 24 )
#define STR_EVENT_IMAGE_ERROR ( RC_GLOBALS_BEGIN + 25 )
#define STR_EVENT_FRM_KEYINPUT_A ( RC_GLOBALS_BEGIN + 26 )
#define STR_EVENT_FRM_KEYINPUT_NOA ( RC_GLOBALS_BEGIN + 27 )
#define STR_EVENT_FRM_RESIZE ( RC_GLOBALS_BEGIN + 28 )
#define STR_EVENT_FRM_MOVE ( RC_GLOBALS_BEGIN + 29 )
#define STR_EVENT_OBJECT_SELECT ( RC_GLOBALS_BEGIN + 18 )
#define STR_EVENT_START_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 19 )
#define STR_EVENT_END_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 20 )
#define STR_EVENT_MOUSEOVER_OBJECT ( RC_GLOBALS_BEGIN + 21 )
#define STR_EVENT_MOUSECLICK_OBJECT ( RC_GLOBALS_BEGIN + 22 )
#define STR_EVENT_MOUSEOUT_OBJECT ( RC_GLOBALS_BEGIN + 23 )
#define STR_EVENT_IMAGE_LOAD ( RC_GLOBALS_BEGIN + 24 )
#define STR_EVENT_IMAGE_ABORT ( RC_GLOBALS_BEGIN + 25 )
#define STR_EVENT_IMAGE_ERROR ( RC_GLOBALS_BEGIN + 26 )
#define STR_EVENT_FRM_KEYINPUT_A ( RC_GLOBALS_BEGIN + 27 )
#define STR_EVENT_FRM_KEYINPUT_NOA ( RC_GLOBALS_BEGIN + 28 )
#define STR_EVENT_FRM_RESIZE ( RC_GLOBALS_BEGIN + 29 )
#define STR_EVENT_FRM_MOVE ( RC_GLOBALS_BEGIN + 30 )
// Strings for frame alignment in Popup
#define STR_TOP_BASE (RC_GLOBALS_BEGIN + 30)
#define STR_BOTTOM_BASE (RC_GLOBALS_BEGIN + 31)
#define STR_CENTER_BASE (RC_GLOBALS_BEGIN + 32)
#define STR_TOP (RC_GLOBALS_BEGIN + 33)
#define STR_BOTTOM (RC_GLOBALS_BEGIN + 34)
#define STR_CENTER_HORI (RC_GLOBALS_BEGIN + 35)
#define STR_CENTER_VERT (RC_GLOBALS_BEGIN + 36)
#define STR_TOP_BASE (RC_GLOBALS_BEGIN + 31)
#define STR_BOTTOM_BASE (RC_GLOBALS_BEGIN + 32)
#define STR_CENTER_BASE (RC_GLOBALS_BEGIN + 33)
#define STR_TOP (RC_GLOBALS_BEGIN + 34)
#define STR_BOTTOM (RC_GLOBALS_BEGIN + 35)
#define STR_CENTER_HORI (RC_GLOBALS_BEGIN + 36)
#define STR_CENTER_VERT (RC_GLOBALS_BEGIN + 37)
#define STR_LOAD_HTML_DOC (RC_GLOBALS_BEGIN + 37)
#define STR_LOAD_HTML_DOC (RC_GLOBALS_BEGIN + 38)
#define STR_JAVA_EDIT (RC_GLOBALS_BEGIN + 38)
#define STR_JAVA_EDIT (RC_GLOBALS_BEGIN + 39)
#define STR_REMOVE_WARNING (RC_GLOBALS_BEGIN + 40)
......
......@@ -107,6 +107,14 @@ String STR_PAGE
{
Text [ en-US ] = "Page " ;
};
String STR_PAGE_COUNT
{
Text [ en-US ] = "Page %1 of %2" ;
};
String STR_PAGE_COUNT_CUSTOM
{
Text [ en-US ] = "Page %1 of %2 (Page %3)" ;
};
String RID_TEXT_TOOLBOX
{
Text [ en-US ] = "Text Object Bar" ;
......
......@@ -170,7 +170,6 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SvxHtmlOptions m_aHTMLOpt;
Timer m_aTimer; // for delayed ChgLnks during an action
OUString m_aPageStr; // status view, current page
OUString m_sSwViewData,
//and the new cursor position if the user double click in the PagePreview
m_sNewCrsrPos;
......
......@@ -693,7 +693,6 @@ void SwView::_CheckReadonlySelection()
SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
: SfxViewShell( _pFrame, SWVIEWFLAGS ),
m_aPageStr( SW_RES( STR_PAGE )),
m_nNewPage(USHRT_MAX),
m_nOldPageNum(0),
m_pNumRuleNodeFromDoc(0),
......
......@@ -193,30 +193,23 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhi
*
* @param nPhyNum The physical page number
* @param nVirtNum The logical page number (user-assigned)
* @param rPgStr User-defined page name (will be used instead of nVirtNum)
* @param rPgStr User-defined page name (will be shown if different from logical page number)
*
* @return OUString Formatted string: Page 1/10 (rPgStr/logical page number)
* @return OUString Formatted string: Page 1/10 (Page nVirtNumv/rPgStr)
**/
OUString SwView::GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUString& rPgStr)
{
OUString aStr(m_aPageStr);
aStr += OUString::number(nPhyNum);
aStr += "/";
aStr += OUString::number(GetWrtShell().GetPageCnt());
// Show user-defined page number in brackets if any.
OUString extra;
if (!rPgStr.isEmpty() && OUString::number(nPhyNum) != rPgStr)
extra = rPgStr;
else if (nPhyNum != nVirtNum)
extra = OUString::number(nVirtNum);
if (!extra.isEmpty())
{
aStr += " (";
aStr += m_aPageStr;
aStr += extra;
aStr += ")";
}
OUString aStr(extra.isEmpty() ? SW_RES(STR_PAGE_COUNT) : SW_RES(STR_PAGE_COUNT_CUSTOM));
aStr = aStr.replaceFirst("%1", OUString::number(nPhyNum));
aStr = aStr.replaceFirst("%2", OUString::number(GetWrtShell().GetPageCnt()));
aStr = aStr.replaceFirst("%3", extra);
return aStr;
}
......
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