diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-07 13:09:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-07 13:09:31 +0000 |
commit | 19ea3db6d33e8e1de57104e42796454757facd45 (patch) | |
tree | e6baffa68f6cb5c4a8b1e234d3f98a82c827d580 /sw/source/uibase | |
parent | eee0206831f9682f1fa1806d08bbbeaf4783b4e9 (diff) |
revert unready stuff
Change-Id: I2b112a17a2bc70bfe4d5a6af7964a3c1d7eacf9b
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/inc/utlui.hrc | 40 | ||||
-rw-r--r-- | sw/source/uibase/utlui/initui.cxx | 32 | ||||
-rw-r--r-- | sw/source/uibase/utlui/initui.src | 332 |
3 files changed, 195 insertions, 209 deletions
diff --git a/sw/source/uibase/inc/utlui.hrc b/sw/source/uibase/inc/utlui.hrc index e8b9bd1f77fc..1711108494fd 100644 --- a/sw/source/uibase/inc/utlui.hrc +++ b/sw/source/uibase/inc/utlui.hrc @@ -22,6 +22,7 @@ #include "rcid.hrc" +#define RID_SW_SHELLRES (RC_UTLUI_BEGIN + 1) #define RID_STR_SYSTEM (RC_UTLUI_BEGIN + 2) // Strings in NumberFormatter-Listbox @@ -69,7 +70,7 @@ #define STR_CONTENT_TYPE_SINGLE_DRAWOBJECT (STR_CONTENT_TYPE_SINGLE_FIRST + 11) #define STR_CONTENT_SINGLE_END STR_CONTENT_TYPE_SINGLE_DRAWOBJECT -#define FLD_DOCINFO_BEGIN (STR_CONTENT_SINGLE_END + 1) +#define FLD_DOCINFO_BEGIN STR_CONTENT_SINGLE_END #define FLD_DOCINFO_TITEL FLD_DOCINFO_BEGIN #define FLD_DOCINFO_THEMA (FLD_DOCINFO_BEGIN + 1) #define FLD_DOCINFO_KEYS (FLD_DOCINFO_BEGIN + 2) @@ -189,42 +190,7 @@ #define STR_IDXEXAMPLE_IDXTXT_IMAGE1 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 8) #define STR_IDXEXAMPLE_IDXTXT_END STR_IDXEXAMPLE_IDXTXT_IMAGE1 -#define RID_SW_SHELLRES_BEGIN (STR_IDXEXAMPLE_IDXTXT_IMAGE1 + 1) -#define STR_POSTIT_PAGE (RID_SW_SHELLRES_BEGIN + 1) -#define STR_POSTIT_AUTHOR (RID_SW_SHELLRES_BEGIN + 2) -#define STR_CALC_SYNTAX (RID_SW_SHELLRES_BEGIN + 3) -#define STR_CALC_ZERODIV (RID_SW_SHELLRES_BEGIN + 4) -#define STR_CALC_BRACK (RID_SW_SHELLRES_BEGIN + 5) -#define STR_CALC_POW (RID_SW_SHELLRES_BEGIN + 6) -#define STR_CALC_VARNFND (RID_SW_SHELLRES_BEGIN + 7) -#define STR_CALC_OVERFLOW (RID_SW_SHELLRES_BEGIN + 8) -#define STR_CALC_WRONGTIME (RID_SW_SHELLRES_BEGIN + 9) -#define STR_CALC_DEFAULT (RID_SW_SHELLRES_BEGIN + 10) -#define STR_CALC_ERROR (RID_SW_SHELLRES_BEGIN + 11) -#define STR_GETREFFLD_UP (RID_SW_SHELLRES_BEGIN + 12) -#define STR_GETREFFLD_DOWN (RID_SW_SHELLRES_BEGIN + 13) -#define STR_ALLPAGE_HEADFOOT (RID_SW_SHELLRES_BEGIN + 14) -#define STR_TEMPLATE_NONE (RID_SW_SHELLRES_BEGIN + 15) -#define STR_POSTIT_LINE (RID_SW_SHELLRES_BEGIN + 16) -#define STR_FIELD_FIXED (RID_SW_SHELLRES_BEGIN + 17) -#define STR_TOI (RID_SW_SHELLRES_BEGIN + 18) -#define STR_TOU (RID_SW_SHELLRES_BEGIN + 19) -#define STR_TOC (RID_SW_SHELLRES_BEGIN + 20) -#define STR_TOX_ILL (RID_SW_SHELLRES_BEGIN + 21) -#define STR_TOX_OBJ (RID_SW_SHELLRES_BEGIN + 22) -#define STR_TOX_TBL (RID_SW_SHELLRES_BEGIN + 23) -#define STR_TOX_AUTH (RID_SW_SHELLRES_BEGIN + 24) -#define STR_PAGEDESC_NAME (RID_SW_SHELLRES_BEGIN + 25) -#define STR_PAGEDESC_FIRSTNAME (RID_SW_SHELLRES_BEGIN + 26) -#define STR_PAGEDESC_FOLLOWNAME (RID_SW_SHELLRES_BEGIN + 27) -#define STR_LINK_CTRL_CLICK (RID_SW_SHELLRES_BEGIN + 28) -#define STR_LINK_CLICK (RID_SW_SHELLRES_BEGIN + 29) -#define STR_GETREFFLD_REFITEMNOTFOUND (RID_SW_SHELLRES_BEGIN + 30) -#define STR_DURATION_FORMAT (RID_SW_SHELLRES_BEGIN + 31) -#define STR_TOX_CITATION (RID_SW_SHELLRES_BEGIN + 32) -#define RID_SW_SHELLRES_END STR_TOX_CITATION - -#if STR_IDXEXAMPLE_IDXTXT_END > RID_SW_SHELLRES_END +#if STR_IDXEXAMPLE_IDXTXT_END > RC_IDXTXT_END #error Resource-Id Ueberlauf in #file, #line #endif diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx index b2a1dad8e657..ab67b03b5c5d 100644 --- a/sw/source/uibase/utlui/initui.cxx +++ b/sw/source/uibase/utlui/initui.cxx @@ -19,7 +19,6 @@ #include <config_features.h> -#include <tools/resary.hxx> #include <unotools/localedatawrapper.hxx> #include <viewsh.hxx> #include <initui.hxx> @@ -30,6 +29,7 @@ #include <gloslst.hxx> #include <utlui.hrc> +#include <initui.hrc> #include <comcore.hrc> #include <authfld.hxx> #include <dbmgr.hxx> @@ -174,7 +174,8 @@ void InitUI() } ShellResource::ShellResource() - : aPostItAuthor( SW_RES( STR_POSTIT_AUTHOR ) ), + : Resource( SW_RES(RID_SW_SHELLRES) ), + aPostItAuthor( SW_RES( STR_POSTIT_AUTHOR ) ), aPostItPage( SW_RES( STR_POSTIT_PAGE ) ), aPostItLine( SW_RES( STR_POSTIT_LINE ) ), @@ -220,6 +221,12 @@ ShellResource::ShellResource() for(sal_uInt16 i = 0; i < nCount; ++i) aDocInfoLst.push_back(OUString(SW_RESSTR(FLD_DOCINFO_BEGIN + i))); + + FreeResource(); +} + +ShellResource::~ShellResource() +{ } OUString ShellResource::GetPageDescName(sal_uInt16 nNo, PageNameMode eMode) @@ -262,26 +269,35 @@ 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); +} - ResStringArray aStringArray(ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr)); - assert(aStringArray.Count() === STR_AUTOFMTREDL_END); - for (sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n) +ImpAutoFormatNameListLoader::ImpAutoFormatNameListLoader( std::vector<OUString>& rLst ) + : Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) ) +{ + for( sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n ) { - OUString p(aStringArray.GetString(n)); - if (STR_AUTOFMTREDL_TYPO == n) + OUString p(ResId(n + 1, *pSwResMgr)); + 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()); } - pAutoFormatNameLst->push_back(p); + rLst.insert(rLst.begin() + n, p); } + FreeResource(); } OUString SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType) diff --git a/sw/source/uibase/utlui/initui.src b/sw/source/uibase/utlui/initui.src index 676dc10c8b3a..faf968106932 100644 --- a/sw/source/uibase/utlui/initui.src +++ b/sw/source/uibase/utlui/initui.src @@ -20,181 +20,185 @@ #include "globals.hrc" #include "utlui.hrc" #include "helpid.h" +#include "initui.hrc" // Error calculator -String STR_POSTIT_PAGE -{ - Text [ en-US ] = "Page" ; -}; -String STR_POSTIT_LINE -{ - Text [ en-US ] = "Line" ; -}; -String STR_POSTIT_AUTHOR -{ - Text [ en-US ] = "Author" ; -}; -String STR_CALC_SYNTAX -{ - Text [ en-US ] = "** Syntax Error **" ; -}; -String STR_CALC_ZERODIV -{ - Text [ en-US ] = "** Division by zero **" ; -}; -String STR_CALC_BRACK -{ - Text [ en-US ] = "** Wrong use of brackets **" ; -}; -String STR_CALC_POW -{ - Text [ en-US ] = "** Square function overflow **" ; -}; -String STR_CALC_VARNFND -{ - Text [ en-US ] = "** Variable not found **" ; -}; -String STR_CALC_OVERFLOW -{ - Text [ en-US ] = "** Overflow **" ; -}; -String STR_CALC_WRONGTIME -{ - Text [ en-US ] = "** Wrong time format **" ; -}; -String STR_CALC_DEFAULT -{ - Text [ en-US ] = "** Error **" ; -}; -String STR_CALC_ERROR -{ - Text [ en-US ] = "** Expression is faulty **" ; -}; -String STR_GETREFFLD_UP -{ - Text [ en-US ] = "above" ; -}; -String STR_GETREFFLD_DOWN -{ - Text [ en-US ] = "below" ; -}; -String STR_GETREFFLD_REFITEMNOTFOUND -{ - Text [ en-US ] = "Error: Reference source not found" ; -}; -String STR_ALLPAGE_HEADFOOT -{ - Text [ en-US ] = "All" ; -}; -String STR_TEMPLATE_NONE -{ - Text [ en-US ] = "None" ; -}; -String STR_FIELD_FIXED -{ - Text [ en-US ] = "(fixed)" ; -}; -String STR_DURATION_FORMAT -{ - Text [en-US] = " Y: %1 M: %2 D: %3 H: %4 M: %5 S: %6"; -}; -String STR_TOI -{ - Text [ en-US ] = "Alphabetical Index" ; -}; +Resource RID_SW_SHELLRES +{ + String STR_POSTIT_PAGE + { + Text [ en-US ] = "Page" ; + }; + String STR_POSTIT_LINE + { + Text [ en-US ] = "Line" ; + }; + String STR_POSTIT_AUTHOR + { + Text [ en-US ] = "Author" ; + }; + String STR_CALC_SYNTAX + { + Text [ en-US ] = "** Syntax Error **" ; + }; + String STR_CALC_ZERODIV + { + Text [ en-US ] = "** Division by zero **" ; + }; + String STR_CALC_BRACK + { + Text [ en-US ] = "** Wrong use of brackets **" ; + }; + String STR_CALC_POW + { + Text [ en-US ] = "** Square function overflow **" ; + }; + String STR_CALC_VARNFND + { + Text [ en-US ] = "** Variable not found **" ; + }; + String STR_CALC_OVERFLOW + { + Text [ en-US ] = "** Overflow **" ; + }; + String STR_CALC_WRONGTIME + { + Text [ en-US ] = "** Wrong time format **" ; + }; + String STR_CALC_DEFAULT + { + Text [ en-US ] = "** Error **" ; + }; + String STR_CALC_ERROR + { + Text [ en-US ] = "** Expression is faulty **" ; + }; + String STR_GETREFFLD_UP + { + Text [ en-US ] = "above" ; + }; + String STR_GETREFFLD_DOWN + { + Text [ en-US ] = "below" ; + }; + String STR_GETREFFLD_REFITEMNOTFOUND + { + Text [ en-US ] = "Error: Reference source not found" ; + }; + String STR_ALLPAGE_HEADFOOT + { + Text [ en-US ] = "All" ; + }; + String STR_TEMPLATE_NONE + { + Text [ en-US ] = "None" ; + }; + String STR_FIELD_FIXED + { + Text [ en-US ] = "(fixed)" ; + }; + String STR_DURATION_FORMAT + { + Text [en-US] = " Y: %1 M: %2 D: %3 H: %4 M: %5 S: %6"; + }; + String STR_TOI + { + Text [ en-US ] = "Alphabetical Index" ; + }; -String STR_TOU -{ - Text [ en-US ] = "User-Defined" ; -}; + String STR_TOU + { + Text [ en-US ] = "User-Defined" ; + }; -String STR_TOC -{ - Text [ en-US ] = "Table of Contents" ; -}; + String STR_TOC + { + Text [ en-US ] = "Table of Contents" ; + }; -String STR_TOX_AUTH -{ - Text [ en-US ] = "Bibliography"; -}; + String STR_TOX_AUTH + { + Text [ en-US ] = "Bibliography"; + }; -String STR_TOX_CITATION -{ - Text [ en-US ] = "Citation"; -}; + String STR_TOX_CITATION + { + Text [ en-US ] = "Citation"; + }; -String STR_TOX_TBL -{ - Text [ en-US ] = "Index of Tables"; -}; -String STR_TOX_OBJ -{ - Text [ en-US ] = "Table of Objects"; -}; -String STR_TOX_ILL -{ - Text [ en-US ] = "Illustration Index"; -}; -String STR_LINK_CTRL_CLICK -{ - Text [ en-US ] = "%s-Click to follow link"; -}; -String STR_LINK_CLICK -{ - Text [ en-US ] = "Click to follow link"; -}; + String STR_TOX_TBL + { + Text [ en-US ] = "Index of Tables"; + }; + String STR_TOX_OBJ + { + Text [ en-US ] = "Table of Objects"; + }; + String STR_TOX_ILL + { + Text [ en-US ] = "Illustration Index"; + }; + String STR_LINK_CTRL_CLICK + { + Text [ en-US ] = "%s-Click to follow link"; + }; + String STR_LINK_CLICK + { + Text [ en-US ] = "Click to follow link"; + }; - // SubType DocInfo + // SubType DocInfo -String FLD_DOCINFO_TITEL -{ - Text [ en-US ] = "Title" ; -}; -String FLD_DOCINFO_THEMA -{ - Text [ en-US ] = "Subject" ; -}; -String FLD_DOCINFO_KEYS -{ - Text [ en-US ] = "Keywords" ; -}; -String FLD_DOCINFO_COMMENT -{ - Text [ en-US ] = "Comments" ; -}; -String FLD_DOCINFO_CREATE -{ - Text [ en-US ] = "Created" ; -}; -String FLD_DOCINFO_CHANGE -{ - Text [ en-US ] = "Modified" ; -}; -String FLD_DOCINFO_PRINT -{ - Text [ en-US ] = "Last printed" ; -}; -String FLD_DOCINFO_DOCNO -{ - Text [ en-US ] = "Revision number" ; -}; -String FLD_DOCINFO_EDIT -{ - Text [ en-US ] = "Total editing time" ; -}; + String FLD_DOCINFO_TITEL + { + Text [ en-US ] = "Title" ; + }; + String FLD_DOCINFO_THEMA + { + Text [ en-US ] = "Subject" ; + }; + String FLD_DOCINFO_KEYS + { + Text [ en-US ] = "Keywords" ; + }; + String FLD_DOCINFO_COMMENT + { + Text [ en-US ] = "Comments" ; + }; + String FLD_DOCINFO_CREATE + { + Text [ en-US ] = "Created" ; + }; + String FLD_DOCINFO_CHANGE + { + Text [ en-US ] = "Modified" ; + }; + String FLD_DOCINFO_PRINT + { + Text [ en-US ] = "Last printed" ; + }; + String FLD_DOCINFO_DOCNO + { + Text [ en-US ] = "Revision number" ; + }; + String FLD_DOCINFO_EDIT + { + Text [ en-US ] = "Total editing time" ; + }; -String STR_PAGEDESC_NAME -{ - Text [ en-US ] = "Convert $(ARG1)"; -}; -String STR_PAGEDESC_FIRSTNAME -{ - Text [ en-US ] = "First convert $(ARG1)"; -}; -String STR_PAGEDESC_FOLLOWNAME -{ - Text [ en-US ] = "Next convert $(ARG1)"; + String STR_PAGEDESC_NAME + { + Text [ en-US ] = "Convert $(ARG1)"; + }; + String STR_PAGEDESC_FIRSTNAME + { + Text [ en-US ] = "First convert $(ARG1)"; + }; + String STR_PAGEDESC_FOLLOWNAME + { + Text [ en-US ] = "Next convert $(ARG1)"; + }; }; String STR_AUTH_TYPE_ARTICLE |