summaryrefslogtreecommitdiff
path: root/sc/source/ui/condformat
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-05-11 15:38:02 +0200
committerJulien Nabet <serval2412@yahoo.fr>2018-05-12 13:58:53 +0200
commit4145a857791df2100d5df9defb79e1160f89249f (patch)
treea6f762df254394a15e46634b5c71b63e84de8e4d /sc/source/ui/condformat
parentaa0cd609d3f7eee02a5f05a93cba060bb82184d5 (diff)
Replace ScGlobal::GetRscString with simple ScResId calls
After the gettext migration there is no point to have two APIs for reading the same .mo file. This patch is for sc/source/ui/[a-d]* for easier review. Change-Id: If268fb87ab09ca430a5bdb5cdd53a233e9158bfe Reviewed-on: https://gerrit.libreoffice.org/54134 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sc/source/ui/condformat')
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx8
-rw-r--r--sc/source/ui/condformat/condformathelper.cxx55
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx5
3 files changed, 35 insertions, 33 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index d4bc1bc3bcdd..e8651496c864 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -305,7 +305,7 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void)
if( aFormula.isEmpty() )
{
- maFtVal->SetText(ScGlobal::GetRscString(STR_ENTER_VALUE));
+ maFtVal->SetText(ScResId(STR_ENTER_VALUE));
return;
}
@@ -316,7 +316,7 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void)
if( ta->GetCodeError() != FormulaError::NONE || ( ta->GetLen() == 0 ) )
{
rEdit.SetControlBackground(COL_LIGHTRED);
- maFtVal->SetText(ScGlobal::GetRscString(STR_VALID_DEFERROR));
+ maFtVal->SetText(ScResId(STR_VALID_DEFERROR));
return;
}
@@ -329,7 +329,7 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void)
)
{
rEdit.SetControlBackground(COL_YELLOW);
- maFtVal->SetText(ScGlobal::GetRscString(STR_UNQUOTED_STRING));
+ maFtVal->SetText(ScResId(STR_UNQUOTED_STRING));
return;
}
@@ -480,7 +480,7 @@ void StyleSelect( ListBox& rLbStyle, const ScDocument* pDoc, SvxFontPrevWindow&
{
// call new style dialog
SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, sal_uInt16(SfxStyleFamily::Para) );
- SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
+ SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScResId(STR_STYLENAME_STANDARD) );
// unlock the dispatcher so SID_STYLE_NEW can be executed
// (SetDispatcherLock would affect all Calc documents)
diff --git a/sc/source/ui/condformat/condformathelper.cxx b/sc/source/ui/condformat/condformathelper.cxx
index 804811b0a925..5b8e192ba044 100644
--- a/sc/source/ui/condformat/condformathelper.cxx
+++ b/sc/source/ui/condformat/condformathelper.cxx
@@ -10,6 +10,7 @@
#include <rtl/ustrbuf.hxx>
#include <condformathelper.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
namespace {
@@ -18,17 +19,17 @@ OUString getTextForType(ScCondFormatEntryType eType)
switch(eType)
{
case CONDITION:
- return ScGlobal::GetRscString(STR_COND_CONDITION);
+ return ScResId(STR_COND_CONDITION);
case COLORSCALE:
- return ScGlobal::GetRscString(STR_COND_COLORSCALE);
+ return ScResId(STR_COND_COLORSCALE);
case DATABAR:
- return ScGlobal::GetRscString(STR_COND_DATABAR);
+ return ScResId(STR_COND_DATABAR);
case FORMULA:
- return ScGlobal::GetRscString(STR_COND_FORMULA);
+ return ScResId(STR_COND_FORMULA);
case ICONSET:
- return ScGlobal::GetRscString(STR_COND_ICONSET);
+ return ScResId(STR_COND_ICONSET);
case DATE:
- return ScGlobal::GetRscString(STR_COND_DATE);
+ return ScResId(STR_COND_DATE);
default:
break;
}
@@ -53,42 +54,42 @@ OUString getExpression(sal_Int32 nIndex)
case 5:
return OUString("!=");
case 6:
- return ScGlobal::GetRscString(STR_COND_BETWEEN);
+ return ScResId(STR_COND_BETWEEN);
case 7:
- return ScGlobal::GetRscString(STR_COND_NOTBETWEEN);
+ return ScResId(STR_COND_NOTBETWEEN);
case 8:
- return ScGlobal::GetRscString(STR_COND_DUPLICATE);
+ return ScResId(STR_COND_DUPLICATE);
case 9:
- return ScGlobal::GetRscString(STR_COND_UNIQUE);
+ return ScResId(STR_COND_UNIQUE);
case 11:
- return ScGlobal::GetRscString(STR_COND_TOP10);
+ return ScResId(STR_COND_TOP10);
case 12:
- return ScGlobal::GetRscString(STR_COND_BOTTOM10);
+ return ScResId(STR_COND_BOTTOM10);
case 13:
- return ScGlobal::GetRscString(STR_COND_TOP_PERCENT);
+ return ScResId(STR_COND_TOP_PERCENT);
case 14:
- return ScGlobal::GetRscString(STR_COND_BOTTOM_PERCENT);
+ return ScResId(STR_COND_BOTTOM_PERCENT);
case 15:
- return ScGlobal::GetRscString(STR_COND_ABOVE_AVERAGE);
+ return ScResId(STR_COND_ABOVE_AVERAGE);
case 16:
- return ScGlobal::GetRscString(STR_COND_BELOW_AVERAGE);
+ return ScResId(STR_COND_BELOW_AVERAGE);
case 17:
- return ScGlobal::GetRscString(STR_COND_ABOVE_EQUAL_AVERAGE);
+ return ScResId(STR_COND_ABOVE_EQUAL_AVERAGE);
case 18:
- return ScGlobal::GetRscString(STR_COND_BELOW_EQUAL_AVERAGE);
+ return ScResId(STR_COND_BELOW_EQUAL_AVERAGE);
case 19:
- return ScGlobal::GetRscString(STR_COND_ERROR);
+ return ScResId(STR_COND_ERROR);
case 20:
- return ScGlobal::GetRscString(STR_COND_NOERROR);
+ return ScResId(STR_COND_NOERROR);
case 21:
- return ScGlobal::GetRscString(STR_COND_BEGINS_WITH);
+ return ScResId(STR_COND_BEGINS_WITH);
case 22:
- return ScGlobal::GetRscString(STR_COND_ENDS_WITH);
+ return ScResId(STR_COND_ENDS_WITH);
case 23:
- return ScGlobal::GetRscString(STR_COND_CONTAINS);
+ return ScResId(STR_COND_CONTAINS);
case 24:
- return ScGlobal::GetRscString(STR_COND_NOT_CONTAINS);
+ return ScResId(STR_COND_NOT_CONTAINS);
case 10:
assert(false);
@@ -116,7 +117,7 @@ OUString getDateString(sal_Int32 nIndex)
};
if (nIndex >= 0 && static_cast<sal_uInt32>(nIndex) < SAL_N_ELEMENTS(aCondStrs))
- return ScGlobal::GetRscString(aCondStrs[nIndex]);
+ return ScResId(aCondStrs[nIndex]);
assert(false);
return OUString();
}
@@ -150,7 +151,7 @@ OUString ScCondFormatHelper::GetExpression(const ScConditionalFormat& rFormat, c
{
aBuffer.append(pEntry->GetExpression(rPos, 0));
aBuffer.append(" ");
- aBuffer.append(ScGlobal::GetRscString(STR_COND_AND));
+ aBuffer.append(ScResId(STR_COND_AND));
aBuffer.append(" ");
aBuffer.append(pEntry->GetExpression(rPos, 1));
}
@@ -202,7 +203,7 @@ OUString ScCondFormatHelper::GetExpression( ScCondFormatEntryType eType, sal_Int
if(nIndex == 6 || nIndex == 7)
{
aBuffer.append(" ");
- aBuffer.append(ScGlobal::GetRscString(STR_COND_AND));
+ aBuffer.append(ScResId(STR_COND_AND));
aBuffer.append(" ");
aBuffer.append(aStr2);
}
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index d6370799ac06..db83d606220e 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -9,6 +9,7 @@
#include <condformatmgr.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <condformatdlg.hxx>
#include <document.hxx>
@@ -18,8 +19,8 @@ ScCondFormatManagerWindow::ScCondFormatManagerWindow(SvSimpleTableContainer& rPa
, mpDoc(pDoc)
, mpFormatList(pFormatList)
{
- OUString aConditionStr(ScGlobal::GetRscString(STR_HEADER_COND));
- OUString aRangeStr(ScGlobal::GetRscString(STR_HEADER_RANGE));
+ OUString aConditionStr(ScResId(STR_HEADER_COND));
+ OUString aRangeStr(ScResId(STR_HEADER_RANGE));
OUStringBuffer sHeader;
sHeader.append(aRangeStr).append("\t").append(aConditionStr);