summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-06 11:51:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-07 13:07:57 +0000
commit1c48275a28fa3bccdeb6bc12e4f0bcea6c05a81b (patch)
treeab2355dba87b8a59efa0c8c90f4a3f384ad8a19c /sw/source/uibase/utlui
parent7863798f2ab420fdb91ba3dcda6cea2ab2aded9d (diff)
convert resources containing strings to stringarray resources
Change-Id: I8a306b417dcf533a148e34a6314e37589dcdda12
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r--sw/source/uibase/utlui/initui.cxx22
1 files changed, 7 insertions, 15 deletions
diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx
index ab67b03b5c5d..8e641e358fa4 100644
--- a/sw/source/uibase/utlui/initui.cxx
+++ b/sw/source/uibase/utlui/initui.cxx
@@ -19,6 +19,7 @@
#include <config_features.h>
+#include <tools/resary.hxx>
#include <unotools/localedatawrapper.hxx>
#include <viewsh.hxx>
#include <initui.hxx>
@@ -269,35 +270,26 @@ SwGlossaryList* GetGlossaryList()
return pGlossaryList;
}
-struct ImpAutoFormatNameListLoader : public Resource
-{
- explicit ImpAutoFormatNameListLoader( std::vector<OUString>& rLst );
-};
-
void ShellResource::GetAutoFormatNameLst_() const
{
assert(!pAutoFormatNameLst);
pAutoFormatNameLst.reset( new std::vector<OUString> );
pAutoFormatNameLst->reserve(STR_AUTOFMTREDL_END);
- ImpAutoFormatNameListLoader aTmp(*pAutoFormatNameLst);
-}
-ImpAutoFormatNameListLoader::ImpAutoFormatNameListLoader( std::vector<OUString>& rLst )
- : Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) )
-{
- for( sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n )
+ ResStringArray aStringArray(ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr));
+ assert(aStringArray.Count() === STR_AUTOFMTREDL_END);
+ for (sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n)
{
- OUString p(ResId(n + 1, *pSwResMgr));
- if(STR_AUTOFMTREDL_TYPO == n)
+ OUString p(aStringArray.GetString(n));
+ if (STR_AUTOFMTREDL_TYPO == n)
{
const SvtSysLocale aSysLocale;
const LocaleDataWrapper& rLclD = aSysLocale.GetLocaleData();
p = p.replaceFirst("%1", rLclD.getDoubleQuotationMarkStart());
p = p.replaceFirst("%2", rLclD.getDoubleQuotationMarkEnd());
}
- rLst.insert(rLst.begin() + n, p);
+ pAutoFormatNameLst->push_back(p);
}
- FreeResource();
}
OUString SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)