diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 21:14:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-19 15:40:40 +0200 |
commit | 2155e04d6343638ca9815d394cbc4f78c2b17c3a (patch) | |
tree | 0378142f6ce9edb63074291aed45527568e7b254 /sw/source/ui/fldui/fldvar.cxx | |
parent | cee02e81cd3b55fb46eacf5db5713e8bf4363bcd (diff) |
make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to
functions that return a OUString
drop various defines
drop unnecessary toString calls
Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui/fldui/fldvar.cxx')
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 409c484e0090..b9dbc7541054 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -326,7 +326,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) else { m_pNumFormatLB->Clear(); - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_SETVAR_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); m_pNumFormatLB->SelectEntryPos(0); } @@ -370,7 +370,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) { bValue = true; bNumFormat = true; - m_pValueFT->SetText(SW_RESSTR(STR_FORMULA)); + m_pValueFT->SetText(SwResId(STR_FORMULA)); m_pValueED->SetDropEnable(true); } break; @@ -415,7 +415,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) break; case TYP_INPUTFLD: - m_pValueFT->SetText(SW_RESSTR(STR_PROMPT)); + m_pValueFT->SetText(SwResId(STR_PROMPT)); if (nSelPos != LISTBOX_ENTRY_NOTFOUND) { @@ -442,7 +442,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) { m_pNumFormatLB->Clear(); - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_USERVAR_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); m_pNumFormatLB->SelectEntryPos(0); } @@ -456,7 +456,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) break; case TYP_DDEFLD: - m_pValueFT->SetText(SW_RESSTR(STR_DDE_CMD)); + m_pValueFT->SetText(SwResId(STR_DDE_CMD)); if (IsFieldEdit() || pBox) // only when interacting via mouse { @@ -525,7 +525,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) case TYP_SETREFPAGEFLD: { bValue = false; - m_pValueFT->SetText( SW_RESSTR( STR_OFFSET )); + m_pValueFT->SetText( SwResId( STR_OFFSET )); if (IsFieldEdit() || pBox) // only when interacting via mouse m_pNameED->SetText(OUString()); @@ -752,9 +752,9 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) { if (!IsFieldEdit() || bSpecialFormat) { - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_MARK_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); - nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_USERVAR_CMD), 1); + nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_USERVAR_CMD), 1); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); } } @@ -764,7 +764,7 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) { if (!IsFieldEdit() || bSpecialFormat) { - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_SETVAR_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); } } @@ -772,14 +772,14 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) case TYP_FORMELFLD: { - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_GETVAR_NAME), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); } break; case TYP_GETFLD: { - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_GETVAR_NAME), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); } break; @@ -817,10 +817,10 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) if (!m_pFormatLB->GetSelectEntryCount()) { - m_pFormatLB->SelectEntry(SW_RESSTR(FMT_NUM_PAGEDESC)); + m_pFormatLB->SelectEntry(SwResId(FMT_NUM_PAGEDESC)); if (!m_pFormatLB->GetSelectEntryCount()) { - m_pFormatLB->SelectEntry(SW_RESSTR(FMT_NUM_ARABIC)); + m_pFormatLB->SelectEntry(SwResId(FMT_NUM_ARABIC)); if (!m_pFormatLB->GetSelectEntryCount()) m_pFormatLB->SelectEntryPos(0); } @@ -1159,7 +1159,7 @@ bool SwFieldVarPage::FillItemSet(SfxItemSet* ) { nSubType = (nFormat == ULONG_MAX) ? nsSwGetSetExpType::GSE_STRING : nsSwGetSetExpType::GSE_EXPR; - if (nFormat == ULONG_MAX && m_pNumFormatLB->GetSelectEntry() == SW_RESSTR(FMT_USERVAR_CMD)) + if (nFormat == ULONG_MAX && m_pNumFormatLB->GetSelectEntry() == SwResId(FMT_USERVAR_CMD)) nSubType |= nsSwExtendedSubType::SUB_CMD; if (m_pInvisibleCB->IsChecked()) |