diff options
Diffstat (limited to 'sw/source')
317 files changed, 2195 insertions, 8838 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 5bd02d5966ca..3d80e18e7476 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -1407,16 +1407,11 @@ bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj, return bRet; } -OUString SwAccessibleContext::GetResource( sal_uInt16 nResId, - const OUString *pArg1, - const OUString *pArg2 ) +OUString SwAccessibleContext::GetResource(const char* pResId, + const OUString *pArg1, + const OUString *pArg2) { - OUString sStr; - { - SolarMutexGuard aGuard; - - sStr = SwResId( nResId ); - } + OUString sStr = SwResId(pResId); if( pArg1 ) { diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index 4f19e24f7f78..2995cc192c3a 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -351,9 +351,9 @@ public: virtual bool SetSelectedState(bool bSeleted); bool IsSeletedInDoc() { return m_isSelectedInDoc; } - static OUString GetResource( sal_uInt16 nResId, - const OUString *pArg1 = nullptr, - const OUString *pArg2 = nullptr ); + static OUString GetResource(const char* pResId, + const OUString *pArg1 = nullptr, + const OUString *pArg2 = nullptr); }; #endif diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 2f0ec4f42d16..5d1e5fccb111 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -32,7 +32,7 @@ #include <doc.hxx> #include <accmap.hxx> #include <accdoc.hxx> -#include "access.hrc" +#include "strings.hrc" #include <pagefrm.hxx> #include <editeng/brushitem.hxx> diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx index 0d6e4bb02414..c01f6b0e902f 100644 --- a/sw/source/core/access/accfootnote.cxx +++ b/sw/source/core/access/accfootnote.cxx @@ -28,7 +28,7 @@ #include <viewsh.hxx> #include <accmap.hxx> #include "accfootnote.hxx" -#include "access.hrc" +#include "strings.hrc" using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -46,7 +46,7 @@ SwAccessibleFootnote::SwAccessibleFootnote( bIsEndnote ? AccessibleRole::END_NOTE : AccessibleRole::FOOTNOTE, pFootnoteFrame ) { - sal_uInt16 nResId = bIsEndnote ? STR_ACCESS_ENDNOTE_NAME + const char* pResId = bIsEndnote ? STR_ACCESS_ENDNOTE_NAME : STR_ACCESS_FOOTNOTE_NAME; OUString sArg; @@ -58,7 +58,7 @@ SwAccessibleFootnote::SwAccessibleFootnote( sArg = pTextFootnote->GetFootnote().GetViewNumStr( *pDoc ); } - SetName( GetResource( nResId, &sArg ) ); + SetName(GetResource(pResId, &sArg)); } SwAccessibleFootnote::~SwAccessibleFootnote() @@ -71,7 +71,7 @@ OUString SAL_CALL SwAccessibleFootnote::getAccessibleDescription() ThrowIfDisposed(); - sal_uInt16 nResId = AccessibleRole::END_NOTE == GetRole() + const char* pResId = AccessibleRole::END_NOTE == GetRole() ? STR_ACCESS_ENDNOTE_DESC : STR_ACCESS_FOOTNOTE_DESC ; @@ -84,7 +84,7 @@ OUString SAL_CALL SwAccessibleFootnote::getAccessibleDescription() sArg = pTextFootnote->GetFootnote().GetViewNumStr( *pDoc ); } - return GetResource( nResId, &sArg ); + return GetResource(pResId, &sArg); } OUString SAL_CALL SwAccessibleFootnote::getImplementationName() diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx index 714045be234c..24050ecfe622 100644 --- a/sw/source/core/access/accheaderfooter.cxx +++ b/sw/source/core/access/accheaderfooter.cxx @@ -24,7 +24,7 @@ #include <vcl/svapp.hxx> #include <hffrm.hxx> #include "accheaderfooter.hxx" -#include "access.hrc" +#include "strings.hrc" using namespace ::com::sun::star; using namespace ::com::sun::star::lang; @@ -62,13 +62,13 @@ OUString SAL_CALL SwAccessibleHeaderFooter::getAccessibleDescription() ThrowIfDisposed(); - sal_uInt16 nResId = AccessibleRole::HEADER == GetRole() + const char* pResId = AccessibleRole::HEADER == GetRole() ? STR_ACCESS_HEADER_DESC : STR_ACCESS_FOOTER_DESC ; OUString sArg( GetFormattedPageNumber() ); - return GetResource( nResId, &sArg ); + return GetResource(pResId, &sArg); } OUString SAL_CALL SwAccessibleHeaderFooter::getImplementationName() diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 0a0337929ab4..1fa0503c6450 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -30,7 +30,7 @@ #include <accmap.hxx> #include <acccontext.hxx> #include <accdoc.hxx> -#include <access.hrc> +#include <strings.hrc> #include <accpreview.hxx> #include <accpage.hxx> #include <accpara.hxx> diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx index c53078f23359..c1ec931b9a51 100644 --- a/sw/source/core/access/accpage.cxx +++ b/sw/source/core/access/accpage.cxx @@ -26,7 +26,7 @@ #include <cppuhelper/supportsservice.hxx> #include "accpage.hxx" -#include "access.hrc" +#include "strings.hrc" #include <pagefrm.hxx> using namespace ::com::sun::star; diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 3bba2d24c3a6..e687bca7a6f3 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -42,7 +42,7 @@ #include <com/sun/star/beans/UnknownPropertyException.hpp> #include <breakit.hxx> #include <accpara.hxx> -#include <access.hrc> +#include <strings.hrc> #include <accportions.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/viewfrm.hxx> diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index d66dbfb2216d..60169becadc7 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -23,8 +23,7 @@ #include <txttypes.hxx> // for portion replacement in Special() -#include "access.hrc" -#include <tools/resid.hxx> +#include "strings.hrc" #include "viewopt.hxx" // for GetWordBoundary(...), GetSentenceBoundary(...): diff --git a/sw/source/core/access/accpreview.cxx b/sw/source/core/access/accpreview.cxx index 3b449d18d9b4..a3d74f730831 100644 --- a/sw/source/core/access/accpreview.cxx +++ b/sw/source/core/access/accpreview.cxx @@ -21,7 +21,7 @@ #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <comphelper/servicehelper.hxx> #include <cppuhelper/supportsservice.hxx> -#include "access.hrc" +#include "strings.hrc" #include <accpreview.hxx> const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentPageView"; diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 8b9f6e7886b9..792ea4a41dcc 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -40,7 +40,7 @@ #include <fesh.hxx> #include <accfrmobjslist.hxx> #include <accmap.hxx> -#include <access.hrc> +#include <strings.hrc> #include <acctable.hxx> #include <layfrm.hxx> diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 951867b33f24..22bd71a54191 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -108,9 +108,10 @@ #include <pam.hxx> #include <paratr.hxx> #include <proofreadingiterator.hxx> +#include <editeng/editids.hrc> +#include <svx/svxids.hrc> #include <rtl/instance.hxx> #include <svl/macitem.hxx> -#include <svx/dialogs.hrc> #include <svx/xfillit0.hxx> #include <svx/xflgrit.hxx> #include <svx/sdtaitm.hxx> diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 05b1d54010b1..e8960beab045 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -60,7 +60,7 @@ #include <IGrammarContact.hxx> #include <comphelper/flagguard.hxx> #include <globals.hrc> -#include <comcore.hrc> +#include <strings.hrc> #include <IDocumentLayoutAccess.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/lok.hxx> diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx index d4ffd65bed88..6f59f3148750 100644 --- a/sw/source/core/crsr/findcoll.cxx +++ b/sw/source/core/crsr/findcoll.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <tools/resid.hxx> #include <swcrsr.hxx> #include <doc.hxx> #include <IDocumentUndoRedo.hxx> @@ -25,7 +24,7 @@ #include <pamtyp.hxx> #include <swundo.hxx> #include <SwRewriter.hxx> -#include <comcore.hrc> +#include <strings.hrc> /// parameters for a search for FormatCollections struct SwFindParaFormatColl : public SwFindParas diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 23e6a6b59f61..5f3a74c47e83 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -46,7 +46,7 @@ #include <breakit.hxx> #include <vcl/msgbox.hxx> #include <mdiexp.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <redline.hxx> #include <txatbase.hxx> #include <memory> diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index def58efd718b..9df69a4ee19a 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -40,7 +40,7 @@ #include <scriptinfo.hxx> #include <mdiexp.hxx> #include <wrtsh.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <view.hxx> #include <IDocumentLayoutAccess.hxx> diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 37455f42a410..4dafcf02ff62 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -27,7 +27,7 @@ #include <dbfld.hxx> #include <reffld.hxx> #include <flddropdown.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <SwUndoField.hxx> #include <flddat.hxx> #include <cntfrm.hxx> diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 601a57db22fe..0baf6586c449 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -26,7 +26,7 @@ #include <UndoRedline.hxx> #include <docary.hxx> #include <ndtxt.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <swmodule.hxx> #include <editsh.hxx> #include <vcl/layout.hxx> diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index f29114005681..8b73457738dd 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include <DocumentStylePoolManager.hxx> +#include <SwStyleNameMapper.hxx> #include <doc.hxx> #include <DocumentSettingManager.hxx> #include <IDocumentState.hxx> @@ -58,6 +59,7 @@ #include <editeng/emphasismarkitem.hxx> #include <editeng/scriptspaceitem.hxx> #include <rcid.hrc> +#include <strings.hrc> #include <com/sun/star/table/BorderLineStyle.hpp> #include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/RelOrientation.hpp> @@ -270,6 +272,271 @@ namespace } } +static const char* STR_POOLCOLL_TEXT_ARY[] = +{ + // Category Text + STR_POOLCOLL_STANDARD, + STR_POOLCOLL_TEXT, + STR_POOLCOLL_TEXT_IDENT, + STR_POOLCOLL_TEXT_NEGIDENT, + STR_POOLCOLL_TEXT_MOVE, + STR_POOLCOLL_GREETING, + STR_POOLCOLL_SIGNATURE, + STR_POOLCOLL_CONFRONTATION, + STR_POOLCOLL_MARGINAL, + // Subcategory Headlines + STR_POOLCOLL_HEADLINE_BASE, + STR_POOLCOLL_HEADLINE1, + STR_POOLCOLL_HEADLINE2, + STR_POOLCOLL_HEADLINE3, + STR_POOLCOLL_HEADLINE4, + STR_POOLCOLL_HEADLINE5, + STR_POOLCOLL_HEADLINE6, + STR_POOLCOLL_HEADLINE7, + STR_POOLCOLL_HEADLINE8, + STR_POOLCOLL_HEADLINE9, + STR_POOLCOLL_HEADLINE10 +}; + +static const char* STR_POOLCOLL_LISTS_ARY[] +{ + // Category Lists + STR_POOLCOLL_NUMBUL_BASE, + // Subcategory Numbering + STR_POOLCOLL_NUM_LEVEL1S, + STR_POOLCOLL_NUM_LEVEL1, + STR_POOLCOLL_NUM_LEVEL1E, + STR_POOLCOLL_NUM_NONUM1, + STR_POOLCOLL_NUM_LEVEL2S, + STR_POOLCOLL_NUM_LEVEL2, + STR_POOLCOLL_NUM_LEVEL2E, + STR_POOLCOLL_NUM_NONUM2, + STR_POOLCOLL_NUM_LEVEL3S, + STR_POOLCOLL_NUM_LEVEL3, + STR_POOLCOLL_NUM_LEVEL3E, + STR_POOLCOLL_NUM_NONUM3, + STR_POOLCOLL_NUM_LEVEL4S, + STR_POOLCOLL_NUM_LEVEL4, + STR_POOLCOLL_NUM_LEVEL4E, + STR_POOLCOLL_NUM_NONUM4, + STR_POOLCOLL_NUM_LEVEL5S, + STR_POOLCOLL_NUM_LEVEL5, + STR_POOLCOLL_NUM_LEVEL5E, + STR_POOLCOLL_NUM_NONUM5, + + // Subcategory Enumeration + STR_POOLCOLL_BUL_LEVEL1S, + STR_POOLCOLL_BUL_LEVEL1, + STR_POOLCOLL_BUL_LEVEL1E, + STR_POOLCOLL_BUL_NONUM1, + STR_POOLCOLL_BUL_LEVEL2S, + STR_POOLCOLL_BUL_LEVEL2, + STR_POOLCOLL_BUL_LEVEL2E, + STR_POOLCOLL_BUL_NONUM2, + STR_POOLCOLL_BUL_LEVEL3S, + STR_POOLCOLL_BUL_LEVEL3, + STR_POOLCOLL_BUL_LEVEL3E, + STR_POOLCOLL_BUL_NONUM3, + STR_POOLCOLL_BUL_LEVEL4S, + STR_POOLCOLL_BUL_LEVEL4, + STR_POOLCOLL_BUL_LEVEL4E, + STR_POOLCOLL_BUL_NONUM4, + STR_POOLCOLL_BUL_LEVEL5S, + STR_POOLCOLL_BUL_LEVEL5, + STR_POOLCOLL_BUL_LEVEL5E, + STR_POOLCOLL_BUL_NONUM5 +}; + +// Special Areas +static const char* STR_POOLCOLL_EXTRA_ARY[] +{ + // Subcategory Header + STR_POOLCOLL_HEADER, + STR_POOLCOLL_HEADERL, + STR_POOLCOLL_HEADERR, + // Subcategroy Footer + STR_POOLCOLL_FOOTER, + STR_POOLCOLL_FOOTERL, + STR_POOLCOLL_FOOTERR, + // Subcategroy Table + STR_POOLCOLL_TABLE, + STR_POOLCOLL_TABLE_HDLN, + // Subcategroy Labels + STR_POOLCOLL_LABEL, + STR_POOLCOLL_LABEL_ABB, + STR_POOLCOLL_LABEL_TABLE, + STR_POOLCOLL_LABEL_FRAME, + // Miscellaneous + STR_POOLCOLL_FRAME, + STR_POOLCOLL_FOOTNOTE, + STR_POOLCOLL_JAKETADRESS, + STR_POOLCOLL_SENDADRESS, + STR_POOLCOLL_ENDNOTE, + STR_POOLCOLL_LABEL_DRAWING +}; + +static const char* STR_POOLCOLL_REGISTER_ARY[] = +{ + // Category Directories + STR_POOLCOLL_REGISTER_BASE, + // Subcategory Index-Directories + STR_POOLCOLL_TOX_IDXH, + STR_POOLCOLL_TOX_IDX1, + STR_POOLCOLL_TOX_IDX2, + STR_POOLCOLL_TOX_IDX3, + STR_POOLCOLL_TOX_IDXBREAK, + // Subcategory Tables of Contents + STR_POOLCOLL_TOX_CNTNTH, + STR_POOLCOLL_TOX_CNTNT1, + STR_POOLCOLL_TOX_CNTNT2, + STR_POOLCOLL_TOX_CNTNT3, + STR_POOLCOLL_TOX_CNTNT4, + STR_POOLCOLL_TOX_CNTNT5, + // Subcategory User-Directories: + STR_POOLCOLL_TOX_USERH, + STR_POOLCOLL_TOX_USER1, + STR_POOLCOLL_TOX_USER2, + STR_POOLCOLL_TOX_USER3, + STR_POOLCOLL_TOX_USER4, + STR_POOLCOLL_TOX_USER5, + // Subcategory Table of Contents more Levels 5 - 10 + STR_POOLCOLL_TOX_CNTNT6, + STR_POOLCOLL_TOX_CNTNT7, + STR_POOLCOLL_TOX_CNTNT8, + STR_POOLCOLL_TOX_CNTNT9, + STR_POOLCOLL_TOX_CNTNT10, + // Illustrations Index + STR_POOLCOLL_TOX_ILLUSH, + STR_POOLCOLL_TOX_ILLUS1, + // Object Index + STR_POOLCOLL_TOX_OBJECTH, + STR_POOLCOLL_TOX_OBJECT1, + // Tables Index + STR_POOLCOLL_TOX_TABLESH, + STR_POOLCOLL_TOX_TABLES1, + // Index of Authorities + STR_POOLCOLL_TOX_AUTHORITIESH, + STR_POOLCOLL_TOX_AUTHORITIES1, + // Subcategory User-Directories more Levels 5 - 10 + STR_POOLCOLL_TOX_USER6, + STR_POOLCOLL_TOX_USER7, + STR_POOLCOLL_TOX_USER8, + STR_POOLCOLL_TOX_USER9, + STR_POOLCOLL_TOX_USER10 +}; + +static const char* STR_POOLCOLL_DOC_ARY[] = +{ + // Category Chapter/Document + STR_POOLCOLL_DOC_TITEL, + STR_POOLCOLL_DOC_SUBTITEL +}; + +static const char* STR_POOLCOLL_HTML_ARY[] = +{ + // Category HTML-Templates + STR_POOLCOLL_HTML_BLOCKQUOTE, + STR_POOLCOLL_HTML_PRE, + STR_POOLCOLL_HTML_HR, + STR_POOLCOLL_HTML_DD, + STR_POOLCOLL_HTML_DT +}; + +static const char* STR_POOLCHR_ARY[] = +{ + STR_POOLCHR_FOOTNOTE, + STR_POOLCHR_PAGENO, + STR_POOLCHR_LABEL, + STR_POOLCHR_DROPCAPS, + STR_POOLCHR_NUM_LEVEL, + STR_POOLCHR_BUL_LEVEL, + STR_POOLCHR_INET_NORMAL, + STR_POOLCHR_INET_VISIT, + STR_POOLCHR_JUMPEDIT, + STR_POOLCHR_TOXJUMP, + STR_POOLCHR_ENDNOTE, + STR_POOLCHR_LINENUM, + STR_POOLCHR_IDX_MAIN_ENTRY, + STR_POOLCHR_FOOTNOTE_ANCHOR, + STR_POOLCHR_ENDNOTE_ANCHOR, + STR_POOLCHR_RUBYTEXT, + STR_POOLCHR_VERT_NUM +}; + +static const char* STR_POOLCHR_HTML_ARY[] = +{ + STR_POOLCHR_HTML_EMPHASIS, + STR_POOLCHR_HTML_CITIATION, + STR_POOLCHR_HTML_STRONG, + STR_POOLCHR_HTML_CODE, + STR_POOLCHR_HTML_SAMPLE, + STR_POOLCHR_HTML_KEYBOARD, + STR_POOLCHR_HTML_VARIABLE, + STR_POOLCHR_HTML_DEFINSTANCE, + STR_POOLCHR_HTML_TELETYPE +}; + +static const char* STR_POOLFRM_ARY[] = +{ + STR_POOLFRM_FRAME, + STR_POOLFRM_GRAPHIC, + STR_POOLFRM_OLE, + STR_POOLFRM_FORMEL, + STR_POOLFRM_MARGINAL, + STR_POOLFRM_WATERSIGN, + STR_POOLFRM_LABEL +}; + +static const char* STR_POOLPAGE_ARY[] = +{ + // Page styles + STR_POOLPAGE_STANDARD, + STR_POOLPAGE_FIRST, + STR_POOLPAGE_LEFT, + STR_POOLPAGE_RIGHT, + STR_POOLPAGE_JAKET, + STR_POOLPAGE_REGISTER, + STR_POOLPAGE_HTML, + STR_POOLPAGE_FOOTNOTE, + STR_POOLPAGE_ENDNOTE, + STR_POOLPAGE_LANDSCAPE +}; + +static const char* STR_POOLNUMRULE_NUM_ARY[] = +{ + // Numbering styles + STR_POOLNUMRULE_NUM1, + STR_POOLNUMRULE_NUM2, + STR_POOLNUMRULE_NUM3, + STR_POOLNUMRULE_NUM4, + STR_POOLNUMRULE_NUM5, + STR_POOLNUMRULE_BUL1, + STR_POOLNUMRULE_BUL2, + STR_POOLNUMRULE_BUL3, + STR_POOLNUMRULE_BUL4, + STR_POOLNUMRULE_BUL5 +}; + +static const char* STR_TABSTYLE_ARY[] = +{ + STR_TABSTYLE_DEFAULT, + STR_TABSTYLE_3D, + STR_TABSTYLE_BLACK1, + STR_TABSTYLE_BLACK2, + STR_TABSTYLE_BLUE, + STR_TABSTYLE_BROWN, + STR_TABSTYLE_CURRENCY, + STR_TABSTYLE_CURRENCY_3D, + STR_TABSTYLE_CURRENCY_GRAY, + STR_TABSTYLE_CURRENCY_LAVENDER, + STR_TABSTYLE_CURRENCY_TURQUOISE, + STR_TABSTYLE_GRAY, + STR_TABSTYLE_GREEN, + STR_TABSTYLE_LAVENDER, + STR_TABSTYLE_RED, + STR_TABSTYLE_TURQUOISE, + STR_TABSTYLE_YELLOW +}; namespace sw { @@ -303,26 +570,43 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId, } // Didn't find it until here -> create anew - sal_uInt16 nResId = 0; - if( RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END ) - nResId = RC_POOLCOLL_TEXT_BEGIN - RES_POOLCOLL_TEXT_BEGIN; + const char* pResId = nullptr; + if (RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END) + { + static_assert(SAL_N_ELEMENTS(STR_POOLCOLL_TEXT_ARY) == RES_POOLCOLL_TEXT_END - RES_POOLCOLL_TEXT_BEGIN, "### unexpected size!"); + pResId = STR_POOLCOLL_TEXT_ARY[nId - RES_POOLCOLL_TEXT_BEGIN]; + } else if (RES_POOLCOLL_LISTS_BEGIN <= nId && nId < RES_POOLCOLL_LISTS_END) - nResId = RC_POOLCOLL_LISTS_BEGIN - RES_POOLCOLL_LISTS_BEGIN; + { + static_assert(SAL_N_ELEMENTS(STR_POOLCOLL_LISTS_ARY) == RES_POOLCOLL_LISTS_END - RES_POOLCOLL_LISTS_BEGIN, "### unexpected size!"); + pResId = STR_POOLCOLL_LISTS_ARY[nId - RES_POOLCOLL_LISTS_BEGIN]; + } else if (RES_POOLCOLL_EXTRA_BEGIN <= nId && nId < RES_POOLCOLL_EXTRA_END) - nResId = RC_POOLCOLL_EXTRA_BEGIN - RES_POOLCOLL_EXTRA_BEGIN; + { + static_assert(SAL_N_ELEMENTS(STR_POOLCOLL_EXTRA_ARY) == RES_POOLCOLL_EXTRA_END - RES_POOLCOLL_EXTRA_BEGIN, "### unexpected size!"); + pResId = STR_POOLCOLL_EXTRA_ARY[nId - RES_POOLCOLL_EXTRA_BEGIN]; + } else if (RES_POOLCOLL_REGISTER_BEGIN <= nId && nId < RES_POOLCOLL_REGISTER_END) - nResId = RC_POOLCOLL_REGISTER_BEGIN - RES_POOLCOLL_REGISTER_BEGIN; + { + static_assert(SAL_N_ELEMENTS(STR_POOLCOLL_REGISTER_ARY) == RES_POOLCOLL_REGISTER_END - RES_POOLCOLL_REGISTER_BEGIN, "### unexpected size!"); + pResId = STR_POOLCOLL_REGISTER_ARY[nId - RES_POOLCOLL_REGISTER_BEGIN]; + } else if (RES_POOLCOLL_DOC_BEGIN <= nId && nId < RES_POOLCOLL_DOC_END) - nResId = RC_POOLCOLL_DOC_BEGIN - RES_POOLCOLL_DOC_BEGIN; + { + static_assert(SAL_N_ELEMENTS(STR_POOLCOLL_DOC_ARY) == RES_POOLCOLL_DOC_END - RES_POOLCOLL_DOC_BEGIN, "### unexpected size!"); + pResId = STR_POOLCOLL_DOC_ARY[nId - RES_POOLCOLL_DOC_BEGIN]; + } else if (RES_POOLCOLL_HTML_BEGIN <= nId && nId < RES_POOLCOLL_HTML_END) - nResId = RC_POOLCOLL_HTML_BEGIN - RES_POOLCOLL_HTML_BEGIN; + { + static_assert(SAL_N_ELEMENTS(STR_POOLCOLL_HTML_ARY) == RES_POOLCOLL_HTML_END - RES_POOLCOLL_HTML_BEGIN, "### unexpected size!"); + pResId = STR_POOLCOLL_HTML_ARY[nId - RES_POOLCOLL_HTML_BEGIN]; + } - OSL_ENSURE( nResId, "Invalid Pool ID" ); - if( !nResId ) - return GetTextCollFromPool( RES_POOLCOLL_STANDARD ); + OSL_ENSURE(pResId, "Invalid Pool ID"); + if (!pResId) + return GetTextCollFromPool(RES_POOLCOLL_STANDARD); - ResId aResId( nResId + nId, *pSwResMgr ); - OUString aNm( aResId ); + OUString aNm(SwResId(pResId)); // A Set for all to-be-set Attributes SwAttrSet aSet( m_rDoc.GetAttrPool(), aTextFormatCollSetRange ); @@ -1085,7 +1369,8 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) SwFormat *pDeriveFormat = nullptr; SwFormatsBase* pArray[ 2 ]; - sal_uInt16 nArrCnt = 1, nRCId = 0; + sal_uInt16 nArrCnt = 1; + const char* pRCId = nullptr; sal_uInt16* pWhichRange = nullptr; switch( nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) ) @@ -1094,12 +1379,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) { pArray[0] = m_rDoc.GetCharFormats(); pDeriveFormat = m_rDoc.GetDfltCharFormat(); - - if( nId > RES_POOLCHR_NORMAL_END ) - nRCId = RC_POOLCHRFMT_HTML_BEGIN - RES_POOLCHR_HTML_BEGIN; - else - nRCId = RC_POOLCHRFMT_BEGIN - RES_POOLCHR_BEGIN; - pWhichRange = aCharFormatSetRange; + pWhichRange = aCharFormatSetRange; // Fault: unknown Format, but a CharFormat // -> return the first one @@ -1108,6 +1388,11 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) OSL_ENSURE( false, "invalid Id" ); nId = RES_POOLCHR_BEGIN; } + + if (nId > RES_POOLCHR_NORMAL_END) + pRCId = STR_POOLCHR_HTML_ARY[nId - RES_POOLCHR_HTML_BEGIN]; + else + pRCId = STR_POOLCHR_ARY[nId - RES_POOLCHR_BEGIN]; } break; case POOLGRP_FRAMEFMT: @@ -1116,7 +1401,6 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) pArray[1] = m_rDoc.GetSpzFrameFormats(); pDeriveFormat = m_rDoc.GetDfltFrameFormat(); nArrCnt = 2; - nRCId = RC_POOLFRMFMT_BEGIN - RES_POOLFRM_BEGIN; pWhichRange = aFrameFormatSetRange; // Fault: unknown Format, but a FrameFormat @@ -1126,6 +1410,8 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) OSL_ENSURE( false, "invalid Id" ); nId = RES_POOLFRM_BEGIN; } + + pRCId = STR_POOLFRM_ARY[nId - RES_POOLFRM_BEGIN]; } break; @@ -1134,7 +1420,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) OSL_ENSURE( nId, "invalid Id" ); return nullptr; } - OSL_ENSURE( nRCId, "invalid Id" ); + OSL_ENSURE(pRCId, "invalid Id"); while( nArrCnt-- ) for( size_t n = 0; n < (*pArray[nArrCnt]).GetFormatCount(); ++n ) @@ -1144,8 +1430,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) return pNewFormat; } - ResId aResId( nRCId + nId, *pSwResMgr ); - OUString aNm( aResId ); + OUString aNm(SwResId(pRCId)); SwAttrSet aSet( m_rDoc.GetAttrPool(), pWhichRange ); { @@ -1391,8 +1676,8 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool SwPageDesc* pNewPgDsc = nullptr; { - const ResId aResId( sal_uInt32(RC_POOLPAGEDESC_BEGIN + nId - RES_POOLPAGE_BEGIN), *pSwResMgr ); - const OUString aNm( aResId ); + static_assert(SAL_N_ELEMENTS(STR_POOLPAGE_ARY) == RES_POOLPAGE_END - RES_POOLPAGE_BEGIN, "### unexpected size!"); + const OUString aNm(SwResId(STR_POOLPAGE_ARY[nId - RES_POOLPAGE_BEGIN])); const bool bIsModified = m_rDoc.getIDocumentState().IsModified(); { @@ -1564,8 +1849,8 @@ SwNumRule* DocumentStylePoolManager::GetNumRuleFromPool( sal_uInt16 nId ) nId = RES_POOLNUMRULE_BEGIN; } - ResId aResId( sal_uInt32(RC_POOLNUMRULE_BEGIN + nId - RES_POOLNUMRULE_BEGIN), *pSwResMgr ); - OUString aNm( aResId ); + static_assert(SAL_N_ELEMENTS(STR_POOLNUMRULE_NUM_ARY) == RES_POOLNUMRULE_END - RES_POOLNUMRULE_BEGIN, "### unexpected size!"); + OUString aNm(SwResId(STR_POOLNUMRULE_NUM_ARY[nId - RES_POOLNUMRULE_BEGIN])); SwCharFormat *pNumCFormat = nullptr, *pBullCFormat = nullptr; @@ -2218,5 +2503,113 @@ DocumentStylePoolManager::~DocumentStylePoolManager() } +// Initialise UI names to 0 +std::vector<OUString> *SwStyleNameMapper::s_pTextUINameArray = nullptr, + *SwStyleNameMapper::s_pListsUINameArray = nullptr, + *SwStyleNameMapper::s_pExtraUINameArray = nullptr, + *SwStyleNameMapper::s_pRegisterUINameArray = nullptr, + *SwStyleNameMapper::s_pDocUINameArray = nullptr, + *SwStyleNameMapper::s_pHTMLUINameArray = nullptr, + *SwStyleNameMapper::s_pFrameFormatUINameArray = nullptr, + *SwStyleNameMapper::s_pChrFormatUINameArray = nullptr, + *SwStyleNameMapper::s_pHTMLChrFormatUINameArray = nullptr, + *SwStyleNameMapper::s_pPageDescUINameArray = nullptr, + *SwStyleNameMapper::s_pNumRuleUINameArray = nullptr, + *SwStyleNameMapper::s_pTableStyleUINameArray = nullptr, + *SwStyleNameMapper::s_pCellStyleUINameArray = nullptr; + +std::vector<OUString>* +lcl_NewUINameArray(const char** pIds, const size_t nLen) +{ + std::vector<OUString> *const pNameArray = new std::vector<OUString>; + pNameArray->reserve(nLen); + for (size_t i = 0; i < nLen; ++i) + pNameArray->push_back(SwResId(pIds[i])); + return pNameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetTextUINameArray() +{ + if (!s_pTextUINameArray) + s_pTextUINameArray = lcl_NewUINameArray(STR_POOLCOLL_TEXT_ARY, SAL_N_ELEMENTS(STR_POOLCOLL_TEXT_ARY)); + return *s_pTextUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetListsUINameArray() +{ + if (!s_pListsUINameArray) + s_pListsUINameArray = lcl_NewUINameArray(STR_POOLCOLL_LISTS_ARY, SAL_N_ELEMENTS(STR_POOLCOLL_LISTS_ARY)); + return *s_pListsUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetExtraUINameArray() +{ + if (!s_pExtraUINameArray) + s_pExtraUINameArray = lcl_NewUINameArray(STR_POOLCOLL_EXTRA_ARY, SAL_N_ELEMENTS(STR_POOLCOLL_EXTRA_ARY)); + return *s_pExtraUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetRegisterUINameArray() +{ + if (!s_pRegisterUINameArray) + s_pRegisterUINameArray = lcl_NewUINameArray(STR_POOLCOLL_REGISTER_ARY, SAL_N_ELEMENTS(STR_POOLCOLL_REGISTER_ARY)); + return *s_pRegisterUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetDocUINameArray() +{ + if (!s_pDocUINameArray) + s_pDocUINameArray = lcl_NewUINameArray(STR_POOLCOLL_DOC_ARY, SAL_N_ELEMENTS(STR_POOLCOLL_DOC_ARY)); + return *s_pDocUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetHTMLUINameArray() +{ + if (!s_pHTMLUINameArray) + s_pHTMLUINameArray = lcl_NewUINameArray(STR_POOLCOLL_HTML_ARY, SAL_N_ELEMENTS(STR_POOLCOLL_HTML_ARY)); + return *s_pHTMLUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetFrameFormatUINameArray() +{ + if (!s_pFrameFormatUINameArray) + s_pFrameFormatUINameArray = lcl_NewUINameArray(STR_POOLFRM_ARY, SAL_N_ELEMENTS(STR_POOLFRM_ARY)); + return *s_pFrameFormatUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetChrFormatUINameArray() +{ + if (!s_pChrFormatUINameArray) + s_pChrFormatUINameArray = lcl_NewUINameArray(STR_POOLCHR_ARY, SAL_N_ELEMENTS(STR_POOLCHR_ARY)); + return *s_pChrFormatUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetHTMLChrFormatUINameArray() +{ + if (!s_pHTMLChrFormatUINameArray) + s_pHTMLChrFormatUINameArray = lcl_NewUINameArray(STR_POOLCHR_HTML_ARY, SAL_N_ELEMENTS(STR_POOLCHR_HTML_ARY)); + return *s_pHTMLChrFormatUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetPageDescUINameArray() +{ + if (!s_pPageDescUINameArray) + s_pPageDescUINameArray = lcl_NewUINameArray(STR_POOLPAGE_ARY, SAL_N_ELEMENTS(STR_POOLPAGE_ARY)); + return *s_pPageDescUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetNumRuleUINameArray() +{ + if (!s_pNumRuleUINameArray) + s_pNumRuleUINameArray = lcl_NewUINameArray(STR_POOLNUMRULE_NUM_ARY, SAL_N_ELEMENTS(STR_POOLNUMRULE_NUM_ARY)); + return *s_pNumRuleUINameArray; +} + +const std::vector<OUString>& SwStyleNameMapper::GetTableStyleUINameArray() +{ + if (!s_pTableStyleUINameArray) + s_pTableStyleUINameArray = lcl_NewUINameArray(STR_TABSTYLE_ARY, SAL_N_ELEMENTS(STR_TABSTYLE_ARY)); + return *s_pTableStyleUINameArray; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index 6d3ae176c6fc..b430460b2c8e 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -21,7 +21,6 @@ #include <tuple> #include <SwStyleNameMapper.hxx> -#include <tools/resmgr.hxx> #include <poolfmt.hxx> #include <rcid.hrc> @@ -29,23 +28,8 @@ #include <stdlib.h> #endif -extern ResMgr* pSwResMgr; -// Initialise UI names to 0 -std::vector<OUString> *SwStyleNameMapper::s_pTextUINameArray = nullptr, - *SwStyleNameMapper::s_pListsUINameArray = nullptr, - *SwStyleNameMapper::s_pExtraUINameArray = nullptr, - *SwStyleNameMapper::s_pRegisterUINameArray = nullptr, - *SwStyleNameMapper::s_pDocUINameArray = nullptr, - *SwStyleNameMapper::s_pHTMLUINameArray = nullptr, - *SwStyleNameMapper::s_pFrameFormatUINameArray = nullptr, - *SwStyleNameMapper::s_pChrFormatUINameArray = nullptr, - *SwStyleNameMapper::s_pHTMLChrFormatUINameArray = nullptr, - *SwStyleNameMapper::s_pPageDescUINameArray = nullptr, - *SwStyleNameMapper::s_pNumRuleUINameArray = nullptr, - *SwStyleNameMapper::s_pTableStyleUINameArray = nullptr, - *SwStyleNameMapper::s_pCellStyleUINameArray = nullptr, - // Initialise programmatic names to 0 +std::vector<OUString> *SwStyleNameMapper::s_pTextProgNameArray = nullptr, *SwStyleNameMapper::s_pListsProgNameArray = nullptr, *SwStyleNameMapper::s_pExtraProgNameArray = nullptr, @@ -343,20 +327,6 @@ const struct SwTableEntry TableStyleProgNameTable [] = #undef ENTRY std::vector<OUString>* -lcl_NewUINameArray(sal_uInt16 nStt, sal_uInt16 const nEnd) -{ - std::vector<OUString> *const pNameArray = new std::vector<OUString>; - pNameArray->reserve(nEnd - nStt); - while( nStt < nEnd ) - { - const ResId aRId( nStt, *pSwResMgr ); - pNameArray->push_back(aRId); - ++nStt; - } - return pNameArray; -} - -std::vector<OUString>* lcl_NewProgNameArray(const SwTableEntry *pTable, sal_uInt8 const nCount) { std::vector<OUString> *const pProgNameArray = new std::vector<OUString>; @@ -769,102 +739,6 @@ sal_uInt16 SwStyleNameMapper::GetPoolIdFromProgName( return aIter != rHashMap.end() ? (*aIter).second : USHRT_MAX; } -const std::vector<OUString>& SwStyleNameMapper::GetTextUINameArray() -{ - if (!s_pTextUINameArray) - s_pTextUINameArray = lcl_NewUINameArray( RC_POOLCOLL_TEXT_BEGIN, - RC_POOLCOLL_TEXT_BEGIN + (RES_POOLCOLL_TEXT_END - RES_POOLCOLL_TEXT_BEGIN) ); - return *s_pTextUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetListsUINameArray() -{ - if (!s_pListsUINameArray) - s_pListsUINameArray = lcl_NewUINameArray( RC_POOLCOLL_LISTS_BEGIN, - RC_POOLCOLL_LISTS_BEGIN + (RES_POOLCOLL_LISTS_END - RES_POOLCOLL_LISTS_BEGIN) ); - return *s_pListsUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetExtraUINameArray() -{ - if (!s_pExtraUINameArray) - s_pExtraUINameArray = lcl_NewUINameArray( RC_POOLCOLL_EXTRA_BEGIN, - RC_POOLCOLL_EXTRA_BEGIN + (RES_POOLCOLL_EXTRA_END - RES_POOLCOLL_EXTRA_BEGIN) ); - return *s_pExtraUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetRegisterUINameArray() -{ - if (!s_pRegisterUINameArray) - s_pRegisterUINameArray = lcl_NewUINameArray( RC_POOLCOLL_REGISTER_BEGIN, - RC_POOLCOLL_REGISTER_BEGIN + (RES_POOLCOLL_REGISTER_END - RES_POOLCOLL_REGISTER_BEGIN) ); - return *s_pRegisterUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetDocUINameArray() -{ - if (!s_pDocUINameArray) - s_pDocUINameArray = lcl_NewUINameArray( RC_POOLCOLL_DOC_BEGIN, - RC_POOLCOLL_DOC_BEGIN + (RES_POOLCOLL_DOC_END - RES_POOLCOLL_DOC_BEGIN) ); - return *s_pDocUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetHTMLUINameArray() -{ - if (!s_pHTMLUINameArray) - s_pHTMLUINameArray = lcl_NewUINameArray( RC_POOLCOLL_HTML_BEGIN, - RC_POOLCOLL_HTML_BEGIN + (RES_POOLCOLL_HTML_END - RES_POOLCOLL_HTML_BEGIN) ); - return *s_pHTMLUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetFrameFormatUINameArray() -{ - if (!s_pFrameFormatUINameArray) - s_pFrameFormatUINameArray = lcl_NewUINameArray( RC_POOLFRMFMT_BEGIN, - RC_POOLFRMFMT_BEGIN + (RES_POOLFRM_END - RES_POOLFRM_BEGIN) ); - return *s_pFrameFormatUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetChrFormatUINameArray() -{ - if (!s_pChrFormatUINameArray) - s_pChrFormatUINameArray = lcl_NewUINameArray( RC_POOLCHRFMT_BEGIN, - RC_POOLCHRFMT_BEGIN + (RES_POOLCHR_NORMAL_END - RES_POOLCHR_NORMAL_BEGIN) ); - return *s_pChrFormatUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetHTMLChrFormatUINameArray() -{ - if (!s_pHTMLChrFormatUINameArray) - s_pHTMLChrFormatUINameArray = lcl_NewUINameArray( RC_POOLCHRFMT_HTML_BEGIN, - RC_POOLCHRFMT_HTML_BEGIN + (RES_POOLCHR_HTML_END - RES_POOLCHR_HTML_BEGIN) ); - return *s_pHTMLChrFormatUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetPageDescUINameArray() -{ - if (!s_pPageDescUINameArray) - s_pPageDescUINameArray = lcl_NewUINameArray( RC_POOLPAGEDESC_BEGIN, - RC_POOLPAGEDESC_BEGIN + (RES_POOLPAGE_END - RES_POOLPAGE_BEGIN) ); - return *s_pPageDescUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetNumRuleUINameArray() -{ - if (!s_pNumRuleUINameArray) - s_pNumRuleUINameArray = lcl_NewUINameArray( RC_POOLNUMRULE_BEGIN, - RC_POOLNUMRULE_BEGIN + (RES_POOLNUMRULE_END - RES_POOLNUMRULE_BEGIN) ); - return *s_pNumRuleUINameArray; -} - -const std::vector<OUString>& SwStyleNameMapper::GetTableStyleUINameArray() -{ - if (!s_pTableStyleUINameArray) - s_pTableStyleUINameArray = lcl_NewUINameArray( RC_POOLTABSTYLE_BEGIN, - RC_POOLTABSTYLE_BEGIN + (RES_POOLTABSTYLE_END - RES_POOLTABSTYLE_BEGIN) ); - return *s_pTableStyleUINameArray; -} - /// returns an empty array because Cell Names aren't translated const std::vector<OUString>& SwStyleNameMapper::GetCellStyleUINameArray() { diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 8ad76e78e847..12cc89584753 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -105,8 +105,8 @@ #include <swbaslnk.hxx> #include <printdata.hxx> #include <cmdid.h> -#include <statstr.hrc> -#include <comcore.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <SwUndoTOXChange.hxx> #include <unocrsr.hxx> #include <docsh.hxx> diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 0f84d04324c3..baf6abfabcbd 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -53,7 +53,7 @@ #include <fldbas.hxx> #include <swwait.hxx> #include <GetMetricVal.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <hints.hxx> #include <SwUndoPageDesc.hxx> #include <pagedeschint.hxx> diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 80c96313eb31..1b4c1db454db 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -37,7 +37,7 @@ #include <txtfrm.hxx> #include <breakit.hxx> #include <vcl/layout.hxx> -#include "comcore.hrc" +#include "strings.hrc" #include "editsh.hxx" #include <fmtfld.hxx> #include <docufld.hxx> diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index d27d6c9fce19..68e04619202a 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -59,7 +59,7 @@ #include <authfld.hxx> #include <txtinet.hxx> #include <fmtcntnt.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <SwUndoField.hxx> #include <calbck.hxx> diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 963b0aec3f56..574c30c9d76d 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -91,7 +91,7 @@ #include <ftninfo.hxx> #include <pagedesc.hxx> #include <PostItMgr.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <tools/datetimeutils.hxx> #include <unoframe.hxx> @@ -1276,7 +1276,7 @@ SwFlyFrameFormat* SwDoc::InsertDrawLabel( return pNewFormat; } -static OUString lcl_GetUniqueFlyName(const SwDoc* pDoc, sal_uInt16 nDefStrId, RES_FMT eType) +static OUString lcl_GetUniqueFlyName(const SwDoc* pDoc, const char* pDefStrId, RES_FMT eType) { if( pDoc->IsInMailMerge()) { @@ -1286,8 +1286,7 @@ static OUString lcl_GetUniqueFlyName(const SwDoc* pDoc, sal_uInt16 nDefStrId, RE return newName; } - ResId aId( nDefStrId, *pSwResMgr ); - OUString aName( aId ); + OUString aName(SwResId(pDefStrId)); sal_Int32 nNmLen = aName.getLength(); const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats(); @@ -1392,22 +1391,22 @@ void SwDoc::SetFlyName( SwFlyFrameFormat& rFormat, const OUString& rName ) OUString sName( rName ); if( sName.isEmpty() || FindFlyByName( sName ) ) { - sal_uInt16 nTyp = STR_FRAME_DEFNAME; + const char* pTyp = STR_FRAME_DEFNAME; const SwNodeIndex* pIdx = rFormat.GetContent().GetContentIdx(); if( pIdx && pIdx->GetNode().GetNodes().IsDocNodes() ) { switch( GetNodes()[ pIdx->GetIndex() + 1 ]->GetNodeType() ) { case SwNodeType::Grf: - nTyp = STR_GRAPHIC_DEFNAME; + pTyp = STR_GRAPHIC_DEFNAME; break; case SwNodeType::Ole: - nTyp = STR_OBJECT_DEFNAME; + pTyp = STR_OBJECT_DEFNAME; break; default: break; } } - sName = lcl_GetUniqueFlyName(this, nTyp, RES_FLYFRMFMT); + sName = lcl_GetUniqueFlyName(this, pTyp, RES_FLYFRMFMT); } rFormat.SetName( sName, true ); getIDocumentState().SetModified(); @@ -1417,12 +1416,9 @@ void SwDoc::SetAllUniqueFlyNames() { sal_Int32 n, nFlyNum = 0, nGrfNum = 0, nOLENum = 0; - ResId nFrameId( STR_FRAME_DEFNAME, *pSwResMgr ), - nGrfId( STR_GRAPHIC_DEFNAME, *pSwResMgr ), - nOLEId( STR_OBJECT_DEFNAME, *pSwResMgr ); - const OUString sFlyNm( nFrameId ); - const OUString sGrfNm( nGrfId ); - const OUString sOLENm( nOLEId ); + const OUString sFlyNm(SwResId(STR_FRAME_DEFNAME)); + const OUString sGrfNm(SwResId(STR_GRAPHIC_DEFNAME)); + const OUString sOLENm(SwResId(STR_OBJECT_DEFNAME)); if( 255 < ( n = GetSpzFrameFormats()->size() )) n = 255; diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index dd833bb1af85..f2ef5223918e 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -18,7 +18,6 @@ */ #include <hintids.hxx> -#include <tools/resid.hxx> #include <editeng/lrspitem.hxx> #include <ftninfo.hxx> #include <ftnidx.hxx> @@ -45,7 +44,7 @@ #include <txtfrm.hxx> #include <pamtyp.hxx> #include <redline.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <editeng/adjustitem.hxx> #include <editeng/frmdiritem.hxx> #include <frmatr.hxx> diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 25ef47cb20bf..e5cf85c91a7b 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -54,7 +54,7 @@ #include <viewsh.hxx> #include <viscrs.hxx> #include <rootfrm.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <unoport.hxx> #include <wrtsh.hxx> @@ -974,9 +974,23 @@ void SwRedlineData::SetExtraData( const SwRedlineExtraData* pData ) pExtraData = nullptr; } +static const char* STR_REDLINE_ARY[] = +{ + STR_UNDO_REDLINE_INSERT, + STR_UNDO_REDLINE_DELETE, + STR_UNDO_REDLINE_FORMAT, + STR_UNDO_REDLINE_TABLE, + STR_UNDO_REDLINE_FMTCOLL, + STR_UNDO_REDLINE_PARAGRAPH_FORMAT, + STR_UNDO_REDLINE_TABLE_ROW_INSERT, + STR_UNDO_REDLINE_TABLE_ROW_DELETE, + STR_UNDO_REDLINE_TABLE_CELL_INSERT, + STR_UNDO_REDLINE_TABLE_CELL_DELETE +}; + OUString SwRedlineData::GetDescr() const { - return SwResId(STR_UNDO_REDLINE_INSERT + GetType()); + return SwResId(STR_REDLINE_ARY[GetType()]); } sal_uInt32 SwRangeRedline::m_nLastId = 1; diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 811b0ceb1c7e..2b35ede3754c 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -64,7 +64,7 @@ #include <poolfmt.hxx> #include <mdiexp.hxx> #include <swwait.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <accessibilityoptions.hxx> #include <com/sun/star/embed/EmbedMisc.hpp> #include <com/sun/star/embed/EmbedStates.hpp> @@ -961,22 +961,22 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr } else { - sal_uInt16 nResId = 0; + const char* pResId = nullptr; if( GraphicType::NONE == rGrfObj.GetType() ) - nResId = STR_COMCORE_READERROR; + pResId = STR_COMCORE_READERROR; else if ( !rGrfObj.GetGraphic().IsSupportedGraphic() ) - nResId = STR_COMCORE_CANT_SHOW; + pResId = STR_COMCORE_CANT_SHOW; OUString aText; - if ( !nResId && + if ( !pResId && (aText = pGrfNd->GetTitle()).isEmpty() && (!GetRealURL( *pGrfNd, aText ) || aText.isEmpty())) { - nResId = STR_COMCORE_READERROR; + pResId = STR_COMCORE_READERROR; } - if ( nResId ) - aText = SwResId( nResId ); + if (pResId) + aText = SwResId(pResId); ::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, true ); } diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index 2a4485934f6c..78f14fc3c912 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -63,7 +63,7 @@ #include <fmtcol.hxx> #include <ndtxt.hxx> #include <fmtline.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <GetMetricVal.hxx> #include <numrule.hxx> #include <swtable.hxx> diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index c256f7599211..aa28328107fc 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -18,7 +18,6 @@ */ #include <o3tl/make_unique.hxx> -#include <tools/resid.hxx> #include <tools/stream.hxx> #include <vcl/svapp.hxx> #include <sfx2/docfile.hxx> diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 403ccc69cdb6..6272761c0a17 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -20,7 +20,6 @@ #include <hintids.hxx> #include <sfx2/linkmgr.hxx> #include <svl/itemiter.hxx> -#include <tools/resid.hxx> #include <fmtcntnt.hxx> #include <fmtanchr.hxx> #include <txtftn.hxx> @@ -52,7 +51,7 @@ #include <node2lay.hxx> #include <doctxm.hxx> #include <fmtftntx.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <viewsh.hxx> #include <txtfrm.hxx> #include <memory> @@ -1359,7 +1358,7 @@ OUString SwDoc::GetUniqueSectionName( const OUString* pChkStr ) const return newName; } - const OUString aName( ResId( STR_REGION_DEFNAME, *pSwResMgr ) ); + const OUString aName(SwResId(STR_REGION_DEFNAME)); SwSectionFormats::size_type nNum = 0; const SwSectionFormats::size_type nFlagSize = ( mpSectionFormatTable->size() / 8 ) + 2; diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index efed71ca8367..2ad58d1081be 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -81,7 +81,7 @@ #include <section.hxx> #include <frmtool.hxx> #include <node2lay.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include "docsh.hxx" #include <unochart.hxx> #include <node.hxx> @@ -3914,8 +3914,7 @@ OUString SwDoc::GetUniqueTableName() const return newName; } - ResId aId( STR_TABLE_DEFNAME, *pSwResMgr ); - const OUString aName( aId ); + const OUString aName(SwResId(STR_TABLE_DEFNAME)); const size_t nFlagSize = ( mpTableFrameFormatTable->size() / 8 ) + 2; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 9e5a8e11bf20..54d8a5265d31 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -62,7 +62,7 @@ #include <frmatr.hxx> #include <charatr.hxx> #include <mdiexp.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <comcore.hrc> #include <numrule.hxx> diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 2c235a30628b..0254f2633681 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -32,7 +32,7 @@ #include <SwRewriter.hxx> #include <globals.hrc> -#include <comcore.hrc> +#include <strings.hrc> #include <list> void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo ) diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index cf20c8cb4ed0..e703b6725875 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -26,7 +26,7 @@ #include <unoflatpara.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <hintids.hxx> #include <linguistic/lngprops.hxx> #include <vcl/msgbox.hxx> @@ -49,7 +49,7 @@ #include <viscrs.hxx> #include <SwGrammarMarkUp.hxx> #include <mdiexp.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <cntfrm.hxx> #include <splargs.hxx> #include <redline.hxx> diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 07bb4e869449..fd0fab3b7700 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -47,7 +47,7 @@ #include <doctxm.hxx> #include <docary.hxx> #include <mdiexp.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <bookmrk.hxx> using namespace ::com::sun::star; diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 498a5a1d44d9..2945f4d93fd8 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -25,8 +25,7 @@ #include <o3tl/any.hxx> #include <o3tl/make_unique.hxx> #include <swtypes.hxx> -#include <tools/resid.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <authfld.hxx> #include <expfld.hxx> #include <pam.hxx> diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index aae7cacee181..e228308cd205 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -83,7 +83,7 @@ #include <docsh.hxx> #include <unofldmid.h> #include <swunohelper.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <editeng/outliner.hxx> #include <editeng/outlobj.hxx> diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 0eca840c2311..0fa69f428aec 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -44,7 +44,7 @@ #include <expfld.hxx> #include <shellres.hxx> #include <calc.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <docary.hxx> #include <authfld.hxx> #include <calbck.hxx> diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 41471f1a5204..cf64f41f7a43 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -51,8 +51,8 @@ #include <SwStyleNameMapper.hxx> #include <shellres.hxx> #include <poolfmt.hxx> -#include <poolfmt.hrc> -#include <comcore.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <numrule.hxx> #include <SwNodeNum.hxx> #include <calbck.hxx> @@ -756,24 +756,24 @@ void SwGetRefField::ConvertProgrammaticToUIName() if(!pDoc->getIDocumentFieldsAccess().GetFieldType(SwFieldIds::SetExp, rPar1, false)) { sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromProgName( rPar1, SwGetPoolIdFromName::TxtColl ); - sal_uInt16 nResId = USHRT_MAX; + const char* pResId = nullptr; switch( nPoolId ) { case RES_POOLCOLL_LABEL_ABB: - nResId = STR_POOLCOLL_LABEL_ABB; + pResId = STR_POOLCOLL_LABEL_ABB; break; case RES_POOLCOLL_LABEL_TABLE: - nResId = STR_POOLCOLL_LABEL_TABLE; + pResId = STR_POOLCOLL_LABEL_TABLE; break; case RES_POOLCOLL_LABEL_FRAME: - nResId = STR_POOLCOLL_LABEL_FRAME; + pResId = STR_POOLCOLL_LABEL_FRAME; break; case RES_POOLCOLL_LABEL_DRAWING: - nResId = STR_POOLCOLL_LABEL_DRAWING; + pResId = STR_POOLCOLL_LABEL_DRAWING; break; } - if( nResId != USHRT_MAX ) - SetPar1(SwResId( nResId )); + if (pResId) + SetPar1(SwResId(pResId)); } } } diff --git a/sw/source/core/fields/scrptfld.cxx b/sw/source/core/fields/scrptfld.cxx index b31e2705d9bc..fd9d89c5625b 100644 --- a/sw/source/core/fields/scrptfld.cxx +++ b/sw/source/core/fields/scrptfld.cxx @@ -19,9 +19,8 @@ #include <docufld.hxx> #include <unofldmid.h> -#include <comcore.hrc> +#include <strings.hrc> #include <o3tl/any.hxx> -#include <tools/resid.hxx> using namespace ::com::sun::star; diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index c0967895e97c..27786a816da9 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -18,6 +18,7 @@ */ #include "hintids.hxx" +#include <svx/strings.hrc> #include <svx/sdrobjectfilter.hxx> #include <svx/svddrgmt.hxx> #include <svx/svditer.hxx> @@ -30,7 +31,6 @@ #include <svx/sxciaitm.hxx> #include <svx/xfillit.hxx> #include <svx/svdocapt.hxx> -#include <svx/dialogs.hrc> #include <svx/xlnwtit.hxx> #include <svx/xlnstwit.hxx> #include <svx/xlnedwit.hxx> @@ -52,7 +52,7 @@ #include <cmdid.h> #include <drawdoc.hxx> #include <textboxhelper.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <frmfmt.hxx> #include <frmatr.hxx> #include <fmtfsize.hxx> @@ -110,14 +110,14 @@ using namespace com::sun::star; namespace { -::basegfx::B2DPolyPolygon getPolygon( sal_uInt16 nResId, SdrModel* pDoc ) +::basegfx::B2DPolyPolygon getPolygon(const char* pResId, SdrModel* pDoc) { ::basegfx::B2DPolyPolygon aRetval; XLineEndListRef pLineEndList = pDoc->GetLineEndList(); if( pLineEndList.is() ) { - OUString aArrowName( SvxResId(nResId) ); + OUString aArrowName( SvxResId(pResId) ); long nCount = pLineEndList->Count(); long nIndex; for( nIndex = 0L; nIndex < nCount; nIndex++ ) diff --git a/sw/source/core/inc/pagefrm.hrc b/sw/source/core/inc/pagefrm.hrc deleted file mode 100644 index 09f5dc3fe147..000000000000 --- a/sw/source/core/inc/pagefrm.hrc +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_SW_SOURCE_CORE_INC_PAGEFRM_HRC -#define INCLUDED_SW_SOURCE_CORE_INC_PAGEFRM_HRC - -#include "rcid.hrc" - -#define STR_COLUMN_BREAK RC_PAGEFRM_BEGIN + 2 - -// If you add resources, don't forget to update this -#define PAGEFRM_ACT_END STR_COLUMN_BREAK - -// Sanity check -#if PAGEFRM_ACT_END > RC_PAGEFRM_END -#error Not enough room for pagefrm resource in #file:#line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 27a36f4522af..2fc3dfcac906 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -71,7 +71,7 @@ #include <editeng/brushitem.hxx> #include <svtools/grfmgr.hxx> #include <unomid.h> -#include <comcore.hrc> +#include <strings.hrc> #include <svx/svdundo.hxx> #include <sortedobjs.hxx> #include <HandleAnchorNodeChg.hxx> diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index a122bd5958d1..f49e8f8d6e74 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -30,7 +30,7 @@ #include <swtable.hxx> #include <frmtool.hxx> #include <doc.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <IDocumentLayoutAccess.hxx> #include <IDocumentStylePoolAccess.hxx> #include <poolfmt.hxx> @@ -349,6 +349,21 @@ void SwPageDesc::ChgFirstShare( bool bNew ) m_eUse &= UseOnPage::NoFirstShare; } +// Page styles +static const char* STR_POOLPAGE[] = +{ + STR_POOLPAGE_STANDARD, + STR_POOLPAGE_FIRST, + STR_POOLPAGE_LEFT, + STR_POOLPAGE_RIGHT, + STR_POOLPAGE_JAKET, + STR_POOLPAGE_REGISTER, + STR_POOLPAGE_HTML, + STR_POOLPAGE_FOOTNOTE, + STR_POOLPAGE_ENDNOTE, + STR_POOLPAGE_LANDSCAPE +}; + SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName) { const size_t nDCount = rDoc.GetPageDescCnt(); @@ -362,12 +377,12 @@ SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName) } } - for( sal_Int32 i = RC_POOLPAGEDESC_BEGIN; i <= STR_POOLPAGE_LANDSCAPE; ++i) + for (size_t i = 0; i <= SAL_N_ELEMENTS(STR_POOLPAGE); ++i) { - if (rName==SwResId(i)) + if (rName == SwResId(STR_POOLPAGE[i])) { return rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( static_cast< sal_uInt16 >( - i - RC_POOLPAGEDESC_BEGIN + RES_POOLPAGE_BEGIN) ); + i + RES_POOLPAGE_BEGIN) ); } } diff --git a/sw/source/core/layout/pagefrm.src b/sw/source/core/layout/pagefrm.src deleted file mode 100644 index 16b6d4ade8fb..000000000000 --- a/sw/source/core/layout/pagefrm.src +++ /dev/null @@ -1,17 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include "pagefrm.hrc" - -String STR_COLUMN_BREAK -{ - Text [ en-US ] = "Manual Column Break" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 2b45cba8fb22..a18a473467e0 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -30,7 +30,7 @@ #include <calbck.hxx> #include <fmtsrnd.hxx> #include <fmtclds.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <swmodule.hxx> #include <rootfrm.hxx> #include <pagefrm.hxx> @@ -78,7 +78,6 @@ #include <svtools/borderhelper.hxx> -#include "pagefrm.hrc" #include "bitmaps.hlst" #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 5f32ed3f6da0..d4299386f45c 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -51,7 +51,7 @@ #include <sot/formats.hxx> #include <unotools/ucbstreamhelper.hxx> #include <vcl/graphicfilter.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <svx/charthelper.hxx> #include <comphelper/threadpool.hxx> #include <atomic> diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index dfdfd9e5232b..6e133f1d0d54 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -37,7 +37,7 @@ #include <docsh.hxx> #include <swunohelper.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <swerror.h> /** diff --git a/sw/source/core/tox/ToxLinkProcessor.cxx b/sw/source/core/tox/ToxLinkProcessor.cxx index 674008bb165c..b30d8a41ebca 100644 --- a/sw/source/core/tox/ToxLinkProcessor.cxx +++ b/sw/source/core/tox/ToxLinkProcessor.cxx @@ -13,7 +13,7 @@ #include "SwStyleNameMapper.hxx" #include "ndtxt.hxx" #include <o3tl/make_unique.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <stdexcept> diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index b6baa1366d96..f35d49fd9799 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -17,14 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <tools/resid.hxx> #include <hintids.hxx> #include <swtypes.hxx> #include <txtatr.hxx> #include <ndtxt.hxx> #include <txttxmrk.hxx> #include <tox.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <doc.hxx> #include <docary.hxx> #include <paratr.hxx> @@ -211,6 +210,91 @@ SwTOXType::SwTOXType(const SwTOXType& rCopy) { } +static const char* STR_POOLCOLL_TOX_ARY[] = +{ + // Subcategory Index-Directories + STR_POOLCOLL_TOX_IDXH, + STR_POOLCOLL_TOX_IDX1, + STR_POOLCOLL_TOX_IDX2, + STR_POOLCOLL_TOX_IDX3, + STR_POOLCOLL_TOX_IDXBREAK +}; + +static const char* STR_POOLCOLL_TOX_CNTNT_ARY[] = +{ + // Subcategory Tables of Contents + STR_POOLCOLL_TOX_CNTNTH, + STR_POOLCOLL_TOX_CNTNT1, + STR_POOLCOLL_TOX_CNTNT2, + STR_POOLCOLL_TOX_CNTNT3, + STR_POOLCOLL_TOX_CNTNT4, + STR_POOLCOLL_TOX_CNTNT5 +}; + +static const char* STR_POOLCOLL_TOX_CNTNT_EXTRA_ARY[] = +{ + // Subcategory Table of Contents more Levels 5 - 10 + STR_POOLCOLL_TOX_CNTNT6, + STR_POOLCOLL_TOX_CNTNT7, + STR_POOLCOLL_TOX_CNTNT8, + STR_POOLCOLL_TOX_CNTNT9, + STR_POOLCOLL_TOX_CNTNT10 +}; + +static const char* STR_POOLCOLL_TOX_USER_ARY[] = +{ + // Subcategory User-Directories: + STR_POOLCOLL_TOX_USERH, + STR_POOLCOLL_TOX_USER1, + STR_POOLCOLL_TOX_USER2, + STR_POOLCOLL_TOX_USER3, + STR_POOLCOLL_TOX_USER4, + STR_POOLCOLL_TOX_USER5 +}; + +static const char* STR_POOLCOLL_TOX_USER_EXTRA_ARY[] = +{ + // Subcategory User-Directories more Levels 5 - 10 + STR_POOLCOLL_TOX_USER6, + STR_POOLCOLL_TOX_USER7, + STR_POOLCOLL_TOX_USER8, + STR_POOLCOLL_TOX_USER9, + STR_POOLCOLL_TOX_USER10 +}; + +static const char* STR_POOLCOLL_TOX_ILLUS_ARY[] = +{ + // Illustrations Index + STR_POOLCOLL_TOX_ILLUSH, + STR_POOLCOLL_TOX_ILLUS1 +}; + +static const char* STR_POOLCOLL_TOX_OBJECT_ARY[] = +{ + // Object Index + STR_POOLCOLL_TOX_OBJECTH, + STR_POOLCOLL_TOX_OBJECT1 +}; + +static const char* STR_POOLCOLL_TOX_TABLES_ARY[] = +{ + // Tables Index + STR_POOLCOLL_TOX_TABLESH, + STR_POOLCOLL_TOX_TABLES1 +}; + +static const char* STR_POOLCOLL_TOX_AUTHORITIES_ARY[] = +{ + // Index of Authorities + STR_POOLCOLL_TOX_AUTHORITIESH, + STR_POOLCOLL_TOX_AUTHORITIES1 +}; + +static const char* STR_POOLCOLL_TOX_CITATION_ARY[] = +{ + STR_POOLCOLL_TOX_CITATION +}; + // Edit forms SwForm::SwForm( TOXTypes eTyp ) // #i21237# : m_eType( eTyp ), m_nFormMaxLevel( SwForm::GetFormMaxLevel( eTyp )), @@ -225,17 +309,17 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# // Keyword has 3 levels + headings+ separator // Indexes of tables, object illustrations and authorities consist of a heading and one level - sal_uInt16 nPoolId; + const char** pPoolId; switch( m_eType ) { - case TOX_INDEX: nPoolId = STR_POOLCOLL_TOX_IDXH; break; - case TOX_USER: nPoolId = STR_POOLCOLL_TOX_USERH; break; - case TOX_CONTENT: nPoolId = STR_POOLCOLL_TOX_CNTNTH; break; - case TOX_ILLUSTRATIONS: nPoolId = STR_POOLCOLL_TOX_ILLUSH; break; - case TOX_OBJECTS : nPoolId = STR_POOLCOLL_TOX_OBJECTH; break; - case TOX_TABLES : nPoolId = STR_POOLCOLL_TOX_TABLESH; break; - case TOX_AUTHORITIES : nPoolId = STR_POOLCOLL_TOX_AUTHORITIESH; break; - case TOX_CITATION : nPoolId = STR_POOLCOLL_TOX_CITATION; break; + case TOX_INDEX: pPoolId = STR_POOLCOLL_TOX_ARY; break; + case TOX_USER: pPoolId = STR_POOLCOLL_TOX_USER_ARY; break; + case TOX_CONTENT: pPoolId = STR_POOLCOLL_TOX_CNTNT_ARY; break; + case TOX_ILLUSTRATIONS: pPoolId = STR_POOLCOLL_TOX_ILLUS_ARY; break; + case TOX_OBJECTS : pPoolId = STR_POOLCOLL_TOX_OBJECT_ARY; break; + case TOX_TABLES : pPoolId = STR_POOLCOLL_TOX_TABLES_ARY; break; + case TOX_AUTHORITIES : pPoolId = STR_POOLCOLL_TOX_AUTHORITIES_ARY; break; + case TOX_CITATION : pPoolId = STR_POOLCOLL_TOX_CITATION_ARY; break; default: OSL_ENSURE( false, "invalid TOXTyp"); return ; @@ -273,7 +357,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# if (TOX_CONTENT == m_eType || TOX_ILLUSTRATIONS == m_eType) aTokens.push_back(SwFormToken(TOKEN_LINK_END)); - SetTemplate( 0, SwResId( nPoolId++ )); + SetTemplate(0, SwResId(*pPoolId++)); if(TOX_INDEX == m_eType) { @@ -286,19 +370,20 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# aTmpTokens.push_back(aTmpToken); SetPattern( i, aTmpTokens ); - SetTemplate( i, SwResId( STR_POOLCOLL_TOX_IDXBREAK )); + SetTemplate(i, SwResId(STR_POOLCOLL_TOX_IDXBREAK)); } else { SetPattern( i, aTokens ); - SetTemplate( i, SwResId( STR_POOLCOLL_TOX_IDX1 + i - 2 )); + SetTemplate(i, SwResId(STR_POOLCOLL_TOX_ARY[i - 1])); } } } else - for( sal_uInt16 i = 1; i < GetFormMax(); ++i, ++nPoolId ) // Number 0 is the title + { + for (sal_uInt16 i = 1; i < GetFormMax(); ++i, ++pPoolId) // Number 0 is the title { - if(TOX_AUTHORITIES == m_eType) + if (TOX_AUTHORITIES == m_eType) { SwFormTokens aAuthTokens; lcl_FillAuthPattern(aAuthTokens, i); @@ -308,13 +393,14 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# SetPattern( i, aTokens ); if( TOX_CONTENT == m_eType && 6 == i ) - nPoolId = STR_POOLCOLL_TOX_CNTNT6; + pPoolId = STR_POOLCOLL_TOX_CNTNT_EXTRA_ARY; else if( TOX_USER == m_eType && 6 == i ) - nPoolId = STR_POOLCOLL_TOX_USER6; - else if( TOX_AUTHORITIES == m_eType ) - nPoolId = STR_POOLCOLL_TOX_AUTHORITIES1; - SetTemplate( i, SwResId( nPoolId ) ); + pPoolId = STR_POOLCOLL_TOX_USER_EXTRA_ARY; + else if( TOX_AUTHORITIES == m_eType ) //reuse the same STR_POOLCOLL_TOX_AUTHORITIES1 id each time + pPoolId = STR_POOLCOLL_TOX_AUTHORITIES_ARY + 1; + SetTemplate(i, SwResId(*pPoolId)); } + } } SwForm::SwForm(const SwForm& rForm) diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index e304e1092b49..14600c68af1b 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <tools/resid.hxx> #include <unotools/charclass.hxx> #include <com/sun/star/i18n/CollatorOptions.hpp> #include <editeng/unolingu.hxx> @@ -40,7 +39,7 @@ #include <authfld.hxx> #include <toxwrap.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <numrule.hxx> #include <reffld.hxx> @@ -517,12 +516,12 @@ TextAndReading SwTOXPara::GetText_Impl() const return TextAndReading(pFly->GetName(), OUString()); OSL_ENSURE( false, "Graphic/object without name" ); - sal_uInt16 nId = SwTOXElement::Ole == eType + const char* pId = SwTOXElement::Ole == eType ? STR_OBJECT_DEFNAME : SwTOXElement::Graphic == eType ? STR_GRAPHIC_DEFNAME : STR_FRAME_DEFNAME; - return TextAndReading(SwResId( nId ), OUString()); + return TextAndReading(SwResId(pId), OUString()); } break; default: break; diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 6b64fdc367f8..97f2ad1c8c39 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -54,7 +54,7 @@ #include <doc.hxx> #include <editeng/fhgtitem.hxx> #include <docsh.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <fntcap.hxx> using namespace ::com::sun::star; diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx index aa599a7258cc..7464330bc407 100644 --- a/sw/source/core/undo/SwUndoFmt.cxx +++ b/sw/source/core/undo/SwUndoFmt.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <tools/resid.hxx> - #include <poolfmt.hxx> #include <charfmt.hxx> #include <frmfmt.hxx> @@ -29,7 +27,7 @@ #include <fmtcol.hxx> #include <doc.hxx> #include <IDocumentUndoRedo.hxx> -#include <comcore.hrc> +#include <strings.hrc> SwUndoFormatCreate::SwUndoFormatCreate (SwUndoId nUndoId, SwFormat * _pNew, SwFormat * _pDerivedFrom, SwDoc * _pDoc) diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx index 1b847bd2a336..7b86ffac2c15 100644 --- a/sw/source/core/undo/SwUndoPageDesc.cxx +++ b/sw/source/core/undo/SwUndoPageDesc.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <tools/resid.hxx> #include <doc.hxx> #include <IDocumentUndoRedo.hxx> #include <swundo.hxx> @@ -25,7 +24,7 @@ #include <SwUndoPageDesc.hxx> #include <SwRewriter.hxx> #include <undobj.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <fmtcntnt.hxx> #include <fmthdft.hxx> diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index 4c09fa2b1048..14dc0db77dd7 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -276,7 +276,7 @@ UndoManager::StartUndo(SwUndoId const i_eUndoId, assert(SwUndoId::END != eUndoId); OUString comment( (SwUndoId::START == eUndoId) ? OUString("??") - : SwResId(UNDO_BASE + (int)eUndoId) ); + : GetUndoComment(eUndoId) ); if (pRewriter) { assert(SwUndoId::START != eUndoId); @@ -324,7 +324,7 @@ UndoManager::EndUndo(SwUndoId eUndoId, SwRewriter const*const pRewriter) OSL_ENSURE((SwUndoId)pListAction->GetId() == eUndoId, "EndUndo(): given ID different from StartUndo()"); // comment set by caller of EndUndo - OUString comment = SwResId(UNDO_BASE + (int)eUndoId); + OUString comment = GetUndoComment(eUndoId); if (pRewriter) { comment = pRewriter->Apply(comment); diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index f5cc213155a2..8a905217738c 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -18,7 +18,6 @@ */ #include <rolbck.hxx> -#include <tools/resid.hxx> #include <svl/itemiter.hxx> #include <editeng/formatbreakitem.hxx> #include <hints.hxx> @@ -53,7 +52,7 @@ #include <UndoCore.hxx> #include <IMark.hxx> #include <charfmt.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <undo.hrc> #include <bookmrk.hxx> #include <memory> diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx index 7308e998070b..a6245b5db1a9 100644 --- a/sw/source/core/undo/unbkmk.cxx +++ b/sw/source/core/undo/unbkmk.cxx @@ -19,7 +19,7 @@ #include <UndoBookmark.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include "doc.hxx" #include "docary.hxx" #include "swundo.hxx" diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index dcde4a7fc246..fefa7469c949 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -41,7 +41,7 @@ #include <sfx2/app.hxx> #include <fldbas.hxx> #include <fmtfld.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <undo.hrc> #include <vector> diff --git a/sw/source/core/undo/undo.hrc b/sw/source/core/undo/undo.hrc index 7e134d3491e7..bad7c896ce53 100644 --- a/sw/source/core/undo/undo.hrc +++ b/sw/source/core/undo/undo.hrc @@ -20,156 +20,5 @@ #include <rcid.hrc> // Undo #define UNDO_BASE (RC_WRTSH_BEGIN + 8) -#define STR_CANT_UNDO (UNDO_BASE + 0) - -// im enun folgen hier START & END fuer die Klammerungen, - -// Id's fuer die Undo/Redo/Repeat faehigen "Funktionen" -#define STR_DELETE_UNDO (UNDO_BASE + 3) -#define STR_INSERT_UNDO (UNDO_BASE + 4) -#define STR_OVR_UNDO (UNDO_BASE + 5) -#define STR_SPLITNODE_UNDO (UNDO_BASE + 6) -#define STR_INSATTR_UNDO (UNDO_BASE + 7) -#define STR_SETFMTCOLL_UNDO (UNDO_BASE + 8) -#define STR_RESET_ATTR_UNDO (UNDO_BASE + 9) -#define STR_INSFMT_ATTR_UNDO (UNDO_BASE +10) -#define STR_INSERT_DOC_UNDO (UNDO_BASE +11) -#define STR_COPY_UNDO (UNDO_BASE +12) -#define STR_INSTABLE_UNDO (UNDO_BASE +13) -#define STR_TABLETOTEXT_UNDO (UNDO_BASE +14) -#define STR_TEXTTOTABLE_UNDO (UNDO_BASE +15) -#define STR_SORT_TXT (UNDO_BASE +16) -#define STR_INSERTFLY (UNDO_BASE +17) -#define STR_TABLEHEADLINE (UNDO_BASE +18) -#define STR_INSERTSECTION (UNDO_BASE +19) -#define STR_OUTLINE_LR (UNDO_BASE +20) -#define STR_OUTLINE_UD (UNDO_BASE +21) -#define STR_INSNUM (UNDO_BASE +22) -#define STR_NUMUP (UNDO_BASE +23) -#define STR_MOVENUM (UNDO_BASE +24) -#define STR_INSERTDRAW (UNDO_BASE +25) -#define STR_NUMORNONUM (UNDO_BASE +26) -#define STR_INC_LEFTMARGIN (UNDO_BASE +27) -#define STR_DEC_LEFTMARGIN (UNDO_BASE +28) -#define STR_INSERTLABEL (UNDO_BASE +29) -#define STR_SETNUMRULESTART (UNDO_BASE +30) -#define STR_CHANGEFTN (UNDO_BASE +31) -#define STR_REDLINE (UNDO_BASE +32) -#define STR_ACCEPT_REDLINE (UNDO_BASE +33) -#define STR_REJECT_REDLINE (UNDO_BASE +34) -#define STR_SPLIT_TABLE (UNDO_BASE +35) -#define STR_DONTEXPAND (UNDO_BASE +36) -#define STR_AUTOCORRECT (UNDO_BASE +37) -#define STR_MERGE_TABLE (UNDO_BASE +38) -#define STR_TRANSLITERATE (UNDO_BASE +39) -#define STR_PASTE_CLIPBOARD_UNDO (UNDO_BASE +40) -#define STR_TYPING_UNDO (UNDO_BASE +41) - -#define STR_REPEAT_DUMMY_9 (UNDO_BASE +45) -// !!!!!! umsetzen !!!!!!!!!!! umsetzen !!!!!!!!!!! umsetzen !!!! -#define CORE_REPEAT_END STR_REPEAT_DUMMY_9// !!!! umsetzen !!! - -// Id's nur fuer die Undo/Redo faehigen "Funktionen" -#define STR_MOVE_UNDO (CORE_REPEAT_END + 1) -#define STR_INSERT_GLOSSARY (CORE_REPEAT_END + 2) -#define STR_DELBOOKMARK (CORE_REPEAT_END + 3) -#define STR_INSBOOKMARK (CORE_REPEAT_END + 4) -#define STR_SORT_TBL (CORE_REPEAT_END + 5) -#define STR_DELETEFLY (CORE_REPEAT_END + 6) -#define STR_AUTOFORMAT (CORE_REPEAT_END + 7) -#define STR_REPLACE (CORE_REPEAT_END + 8) -#define STR_DELETESECTION (CORE_REPEAT_END + 9) -#define STR_CHANGESECTION (CORE_REPEAT_END +10) -#define STR_CHANGESECTPASSWD (CORE_REPEAT_END +11) -#define STR_CHANGEDEFATTR (CORE_REPEAT_END +12) -#define STR_DELNUM (CORE_REPEAT_END +13) -#define STR_DRAWUNDO (CORE_REPEAT_END +14) -#define STR_DRAWGROUP (CORE_REPEAT_END +15) -#define STR_DRAWUNGROUP (CORE_REPEAT_END +16) -#define STR_DRAWDELETE (CORE_REPEAT_END +17) -#define STR_REREAD (CORE_REPEAT_END +18) -#define STR_DELGRF (CORE_REPEAT_END +19) -#define STR_DELOLE (CORE_REPEAT_END +20) -#define STR_TABLE_ATTR (CORE_REPEAT_END +21) -#define STR_TABLE_AUTOFMT (CORE_REPEAT_END +22) -#define STR_TABLE_INSCOL (CORE_REPEAT_END +23) -#define STR_TABLE_INSROW (CORE_REPEAT_END +24) -#define STR_TABLE_DELBOX (CORE_REPEAT_END +25) -#define STR_TABLE_SPLIT (CORE_REPEAT_END +26) -#define STR_TABLE_MERGE (CORE_REPEAT_END +27) -#define STR_TABLE_NUMFORMAT (CORE_REPEAT_END +28) -#define STR_INSERT_TOX (CORE_REPEAT_END +29) -#define STR_CLEAR_TOX_RANGE (CORE_REPEAT_END +30) -#define STR_TABLE_TBLCPYTBL (CORE_REPEAT_END +31) -#define STR_TABLE_CPYTBL (CORE_REPEAT_END +32) -#define STR_INS_FROM_SHADOWCRSR (CORE_REPEAT_END +33) -#define STR_UNDO_CHAIN (CORE_REPEAT_END +34) -#define STR_UNDO_UNCHAIN (CORE_REPEAT_END +35) -#define STR_UNDO_FTNINFO (CORE_REPEAT_END +36) -#define STR_UNDO_ENDNOTEINFO (CORE_REPEAT_END +37) -#define STR_UNDO_COMPAREDOC (CORE_REPEAT_END +38) -#define STR_UNDO_SETFLYFRMFMT (CORE_REPEAT_END +39) -#define STR_UNDO_SETRUBYATTR (CORE_REPEAT_END +40) -#define STR_UNDO_TMPAUTOCORR (CORE_REPEAT_END +41) -#define STR_TOXCHANGE (CORE_REPEAT_END +42) -#define STR_UNDO_PAGEDESC_CREATE (CORE_REPEAT_END +43) -#define STR_UNDO_PAGEDESC (CORE_REPEAT_END +44) -#define STR_UNDO_PAGEDESC_DELETE (CORE_REPEAT_END +45) -#define STR_UNDO_HEADER_FOOTER (CORE_REPEAT_END +46) // #i7983# -#define STR_UNDO_FIELD (CORE_REPEAT_END +47) -#define STR_UNDO_TXTFMTCOL_CREATE (CORE_REPEAT_END +48) -#define STR_UNDO_TXTFMTCOL_DELETE (CORE_REPEAT_END +49) -#define STR_UNDO_TXTFMTCOL_RENAME (CORE_REPEAT_END +50) -#define STR_UNDO_CHARFMT_CREATE (CORE_REPEAT_END +51) -#define STR_UNDO_CHARFMT_DELETE (CORE_REPEAT_END +52) -#define STR_UNDO_CHARFMT_RENAME (CORE_REPEAT_END +53) -#define STR_UNDO_FRMFMT_CREATE (CORE_REPEAT_END +54) -#define STR_UNDO_FRMFMT_DELETE (CORE_REPEAT_END +55) -#define STR_UNDO_FRMFMT_RENAME (CORE_REPEAT_END +56) -#define STR_UNDO_NUMRULE_CREATE (CORE_REPEAT_END +57) -#define STR_UNDO_NUMRULE_DELETE (CORE_REPEAT_END +58) -#define STR_UNDO_NUMRULE_RENAME (CORE_REPEAT_END +59) -#define STR_UNDO_BOOKMARK_RENAME (CORE_REPEAT_END +60) -#define STR_UNDO_INDEX_ENTRY_INSERT (CORE_REPEAT_END +61) -#define STR_UNDO_INDEX_ENTRY_DELETE (CORE_REPEAT_END +62) -#define STR_UNDO_COL_DELETE (CORE_REPEAT_END +63) -#define STR_UNDO_ROW_DELETE (CORE_REPEAT_END +64) -#define STR_UNDO_PAGEDESC_RENAME (CORE_REPEAT_END +65) -#define STR_NUMDOWN (CORE_REPEAT_END +66) -#define STR_UNDO_FLYFRMFMT_TITLE (CORE_REPEAT_END +67) -#define STR_UNDO_FLYFRMFMT_DESCRITPTION (CORE_REPEAT_END +68) -#define STR_UNDO_TBLSTYLE_CREATE (CORE_REPEAT_END +69) -#define STR_UNDO_TBLSTYLE_DELETE (CORE_REPEAT_END +70) -#define STR_UNDO_TBLSTYLE_UPDATE (CORE_REPEAT_END +71) - -// !!!!!! umsetzen !!!!!!!!!!! umsetzen !!!!!!!!!!! umsetzen !!!! -#define CORE_UNDO_END STR_UNDO_TBLSTYLE_UPDATE// !!!! umsetzen !!! - -// UI-Undo Klammerungen -#define UI_UNDO_BEGIN (CORE_UNDO_END + 1) -#define STR_REPLACE_UNDO (UI_UNDO_BEGIN) -#define STR_INSERT_PAGE_BREAK_UNDO (UI_UNDO_BEGIN + 1) -#define STR_INSERT_COLUMN_BREAK_UNDO (UI_UNDO_BEGIN + 2) -#define STR_PLAY_MACRO_UNDO (UI_UNDO_BEGIN + 3) -#define STR_INSERT_ENV_UNDO (UI_UNDO_BEGIN + 4) -#define STR_DRAG_AND_COPY (UI_UNDO_BEGIN + 5) -#define STR_DRAG_AND_MOVE (UI_UNDO_BEGIN + 6) -#define STR_INSERT_CHART (UI_UNDO_BEGIN + 7) -#define STR_INSERT_FOOTNOTE (UI_UNDO_BEGIN + 8) -#define STR_INSERT_URLBTN (UI_UNDO_BEGIN + 9) -#define STR_INSERT_URLTXT (UI_UNDO_BEGIN + 10) -#define STR_DELETE_INVISIBLECNTNT (UI_UNDO_BEGIN + 11) -#define STR_REPLACE_STYLE (UI_UNDO_BEGIN + 12) -#define STR_DELETE_PAGE_BREAK (UI_UNDO_BEGIN + 13) -#define STR_TEXT_CORRECTION (UI_UNDO_BEGIN + 14) -#define STR_UNDO_TABLE_DELETE (UI_UNDO_BEGIN + 15) -#define UI_UNDO_END STR_UNDO_TABLE_DELETE - -#define UNDO_MORE_STRINGS_BEGIN (UI_UNDO_END + 1) -#define STR_OCCURRENCES_OF (UNDO_MORE_STRINGS_BEGIN) -#define STR_UNDO_TABS (UNDO_MORE_STRINGS_BEGIN + 1) -#define STR_UNDO_NLS (UNDO_MORE_STRINGS_BEGIN + 2) -#define STR_UNDO_PAGEBREAKS (UNDO_MORE_STRINGS_BEGIN + 3) -#define STR_UNDO_COLBRKS (UNDO_MORE_STRINGS_BEGIN + 4) /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/undo/undo.src b/sw/source/core/undo/undo.src deleted file mode 100644 index 7c63b86af15f..000000000000 --- a/sw/source/core/undo/undo.src +++ /dev/null @@ -1,681 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <comcore.hrc> -#include <undo.hrc> - - // Undo -String STR_CANT_UNDO -{ - Text [ en-US ] = "not possible" ; -}; -String STR_DELETE_UNDO -{ - Text [ en-US ] = "Delete $1" ; -}; -String STR_INSERT_UNDO -{ - Text [ en-US ] = "Insert $1" ; -}; -String STR_OVR_UNDO -{ - Text [ en-US ] = "Overwrite: $1" ; -}; -String STR_SPLITNODE_UNDO -{ - Text [ en-US ] = "New Paragraph" ; -}; -String STR_MOVE_UNDO -{ - Text [ en-US ] = "Move" ; -}; -String STR_INSATTR_UNDO -{ - Text [ en-US ] = "Apply attributes" ; -}; -String STR_SETFMTCOLL_UNDO -{ - Text [ en-US ] = "Apply Styles: $1" ; -}; -String STR_RESET_ATTR_UNDO -{ - Text [ en-US ] = "Reset attributes" ; -}; -String STR_INSFMT_ATTR_UNDO -{ - Text [ en-US ] = "Change style: $1" ; -}; -String STR_INSERT_DOC_UNDO -{ - Text [ en-US ] = "Insert file" ; -}; -String STR_INSERT_GLOSSARY -{ - Text [ en-US ] = "Insert AutoText" ; -}; -String STR_DELBOOKMARK -{ - Text [ en-US ] = "Delete bookmark: $1" ; -}; -String STR_INSBOOKMARK -{ - Text [ en-US ] = "Insert bookmark: $1" ; -}; -String STR_SORT_TBL -{ - Text [ en-US ] = "Sort table" ; -}; -String STR_SORT_TXT -{ - Text [ en-US ] = "Sort text" ; -}; -String STR_INSTABLE_UNDO -{ - Text [ en-US ] = "Insert table: $1$2$3" ; -}; -String STR_TEXTTOTABLE_UNDO -{ - Text [ en-US ] = "Convert text -> table" ; -}; -String STR_TABLETOTEXT_UNDO -{ - Text [ en-US ] = "Convert table -> text" ; -}; -String STR_COPY_UNDO -{ - Text [ en-US ] = "Copy: $1" ; -}; -String STR_REPLACE_UNDO -{ - Text [ en-US ] = "Replace $1 $2 $3" ; -}; -String STR_INSERT_PAGE_BREAK_UNDO -{ - Text [ en-US ] = "Insert page break" ; -}; -String STR_INSERT_COLUMN_BREAK_UNDO -{ - Text [ en-US ] = "Insert column break" ; -}; -String STR_PLAY_MACRO_UNDO -{ - Text [ en-US ] = "Run macro" ; -}; -String STR_INSERT_ENV_UNDO -{ - Text [ en-US ] = "Insert Envelope" ; -}; -String STR_DRAG_AND_COPY -{ - Text [ en-US ] = "Copy: $1" ; -}; -String STR_DRAG_AND_MOVE -{ - Text [ en-US ] = "Move: $1" ; -}; -String STR_INSERT_CHART -{ - Text [ en-US ] = "Insert %PRODUCTNAME Chart" ; -}; -String STR_INSERTFLY -{ - Text [ en-US ] = "Insert frame" ; -}; -String STR_DELETEFLY -{ - Text [ en-US ] = "Delete frame" ; -}; -String STR_AUTOFORMAT -{ - Text [ en-US ] = "AutoFormat" ; -}; -String STR_TABLEHEADLINE -{ - Text [ en-US ] = "Table heading" ; -}; -String STR_REPLACE -{ - Text [ en-US ] = "Replace: $1 $2 $3" ; -}; -String STR_INSERTSECTION -{ - Text [ en-US ] = "Insert section" ; -}; -String STR_DELETESECTION -{ - Text [ en-US ] = "Delete section" ; -}; -String STR_CHANGESECTION -{ - Text [ en-US ] = "Modify section" ; -}; -String STR_CHANGESECTPASSWD -{ - Text [ en-US ] = "Change password protection" ; -}; -String STR_CHANGEDEFATTR -{ - Text [ en-US ] = "Modify default values" ; -}; -String STR_REPLACE_STYLE -{ - Text [ en-US ] = "Replace style: $1 $2 $3" ; -}; -String STR_DELETE_PAGE_BREAK -{ - Text [ en-US ] = "Delete page break" ; -}; -String STR_TEXT_CORRECTION -{ - Text [ en-US ] = "Text Correction" ; -}; -String STR_OUTLINE_LR -{ - Text [ en-US ] = "Promote/demote outline" ; -}; -String STR_OUTLINE_UD -{ - Text [ en-US ] = "Move outline" ; -}; -String STR_INSNUM -{ - Text [ en-US ] = "Insert numbering" ; -}; -String STR_NUMUP -{ - Text [ en-US ] = "Promote level" ; -}; -String STR_NUMDOWN -{ - Text [ en-US ] = "Demote level" ; -}; -String STR_MOVENUM -{ - Text [ en-US ] = "Move paragraphs" ; -}; -String STR_INSERTDRAW -{ - Text [ en-US ] = "Insert drawing object: $1" ; -}; -String STR_NUMORNONUM -{ - Text [ en-US ] = "Number On/Off" ; -}; -String STR_INC_LEFTMARGIN -{ - Text [ en-US ] = "Increase Indent" ; -}; -String STR_DEC_LEFTMARGIN -{ - Text [ en-US ] = "Decrease indent" ; -}; -String STR_INSERTLABEL -{ - Text [ en-US ] = "Insert caption: $1" ; -}; -String STR_SETNUMRULESTART -{ - Text [ en-US ] = "Restart numbering" ; -}; -String STR_CHANGEFTN -{ - Text [ en-US ] = "Modify footnote" ; -}; -String STR_REDLINE -{ - /* !! sollte NIE gebraucht/uebersetzt werden !! */ -}; -String STR_ACCEPT_REDLINE -{ - Text [ en-US ] = "Accept change: $1" ; -}; -String STR_REJECT_REDLINE -{ - Text [ en-US ] = "Reject change: $1" ; -}; -String STR_SPLIT_TABLE -{ - Text [ en-US ] = "Split Table" ; -}; -String STR_DONTEXPAND -{ - Text [ en-US ] = "Stop attribute" ; -}; -String STR_AUTOCORRECT -{ - Text [ en-US ] = "AutoCorrect" ; -}; -String STR_MERGE_TABLE -{ - Text [ en-US ] = "Merge table"; -}; - -String STR_TRANSLITERATE -{ - Text [ en-US ] = "Change Case"; -}; - -String STR_DELNUM -{ - Text [ en-US ] = "Delete numbering" ; -}; -String STR_DRAWUNDO -{ - Text [ en-US ] = "Drawing objects: $1" ; -}; -String STR_DRAWGROUP -{ - Text [ en-US ] = "Group draw objects" ; -}; -String STR_DRAWUNGROUP -{ - Text [ en-US ] = "Ungroup drawing objects" ; -}; -String STR_DRAWDELETE -{ - Text [ en-US ] = "Delete drawing objects" ; -}; -String STR_REREAD -{ - Text [ en-US ] = "Replace Image" ; -}; -String STR_DELGRF -{ - Text [ en-US ] = "Delete Image" ; -}; -String STR_DELOLE -{ - Text [ en-US ] = "Delete object" ; -}; -String STR_TABLE_ATTR -{ - Text [ en-US ] = "Apply table attributes" ; -}; -String STR_TABLE_AUTOFMT -{ - Text [ en-US ] = "AutoFormat Table" ; -}; -String STR_TABLE_INSCOL -{ - Text [ en-US ] = "Insert Column" ; -}; -String STR_TABLE_INSROW -{ - Text [ en-US ] = "Insert Row" ; -}; -String STR_TABLE_DELBOX -{ - Text [ en-US ] = "Delete row/column" ; -}; -String STR_UNDO_COL_DELETE -{ - Text [ en-US ] = "Delete column" ; -}; -String STR_UNDO_ROW_DELETE -{ - Text [ en-US ] = "Delete row" ; -}; -String STR_TABLE_SPLIT -{ - Text [ en-US ] = "Split Cells" ; -}; -String STR_TABLE_MERGE -{ - Text [ en-US ] = "Merge Cells" ; -}; -String STR_TABLE_NUMFORMAT -{ - Text [ en-US ] = "Format cell" ; -}; -String STR_INSERT_TOX -{ - Text [ en-US ] = "Insert index/table" ; -}; -String STR_CLEAR_TOX_RANGE -{ - Text [ en-US ] = "Remove index/table" ; -}; -String STR_TABLE_TBLCPYTBL{ - Text [ en-US ] = "Copy table" ; -}; -String STR_TABLE_CPYTBL -{ - Text [ en-US ] = "Copy table" ; -}; -String STR_INS_FROM_SHADOWCRSR -{ - Text [ en-US ] = "Set cursor" ; -}; -String STR_UNDO_CHAIN -{ - Text [ en-US ] = "Link text frames" ; -}; -String STR_UNDO_UNCHAIN -{ - Text [ en-US ] = "Unlink text frames" ; -}; -String STR_UNDO_FTNINFO -{ - Text [ en-US ] = "Modify footnote options" ; -}; -String STR_UNDO_ENDNOTEINFO -{ - Text [ en-US ] = "Modify endnote settings" ; -}; -String STR_UNDO_COMPAREDOC -{ - Text [ en-US ] = "Compare Document" ; -}; -String STR_UNDO_SETFLYFRMFMT -{ - Text [ en-US ] = "Apply frame style: $1" ; -}; -String STR_UNDO_SETRUBYATTR -{ - Text [ en-US ] = "Ruby Setting"; -}; -String STR_UNDO_TMPAUTOCORR -{ - Text [ en-US ] = "AutoCorrect" ; -}; -String STR_INSERT_FOOTNOTE -{ - Text [ en-US ] = "Insert footnote" ; -}; -String STR_INSERT_URLBTN -{ - Text [ en-US ] = "insert URL button"; -}; -String STR_INSERT_URLTXT -{ - Text [ en-US ] = "Insert Hyperlink"; -}; -String STR_DELETE_INVISIBLECNTNT -{ - Text [ en-US ] = "remove invisible content"; -}; -String STR_TOXCHANGE -{ - Text [ en-US ] = "Table/index changed"; -}; -String STR_START_QUOTE -{ - Text [ en-US ] = "“"; -}; -String STR_END_QUOTE -{ - Text [ en-US ] = "”"; -}; -String STR_LDOTS -{ - Text [ en-US ] = "..."; -}; -String STR_MULTISEL -{ - Text [ en-US ] = "multiple selection"; -}; -String STR_TYPING_UNDO -{ - Text [ en-US ] = "Typing: $1"; -}; -String STR_PASTE_CLIPBOARD_UNDO -{ - Text [ en-US ] = "Paste clipboard"; -}; -String STR_YIELDS -{ - Text [ en-US ] = "→"; -}; -String STR_OCCURRENCES_OF -{ - Text [ en-US ] = "occurrences of"; -}; -String STR_UNDO_TABS -{ - Text [ en-US ] = "$1 tab(s)"; -}; -String STR_UNDO_NLS -{ - Text[ en-US ] = "$1 line break(s)"; -}; -String STR_UNDO_PAGEBREAKS -{ - Text[ en-US ] = "page break"; -}; -String STR_UNDO_COLBRKS -{ - Text[ en-US ] = "column break"; -}; -String STR_UNDO_REDLINE_INSERT -{ - Text [ en-US ] = "Insert $1"; -}; -String STR_UNDO_REDLINE_DELETE -{ - Text [ en-US ] = "Delete $1"; -}; -String STR_UNDO_REDLINE_FORMAT -{ - Text [ en-US ] = "Attributes changed"; -}; -String STR_UNDO_REDLINE_TABLE -{ - Text [ en-US ] = "Table changed"; -}; -String STR_UNDO_REDLINE_FMTCOLL -{ - Text [ en-US ] = "Style changed"; -}; -String STR_UNDO_REDLINE_PARAGRAPH_FORMAT -{ - Text [ en-US ] = "Paragraph formatting changed"; -}; -String STR_UNDO_REDLINE_TABLE_ROW_INSERT -{ - Text [ en-US ] = "Insert Row"; -}; -String STR_UNDO_REDLINE_TABLE_ROW_DELETE -{ - Text [ en-US ] = "Delete Row"; -}; -String STR_UNDO_REDLINE_TABLE_CELL_INSERT -{ - Text [ en-US ] = "Insert Cell"; -}; -String STR_UNDO_REDLINE_TABLE_CELL_DELETE -{ - Text [ en-US ] = "Delete Cell"; -}; -String STR_N_REDLINES -{ - Text [ en-US ] = "$1 changes"; -}; -String STR_UNDO_PAGEDESC -{ - Text [ en-US ] = "Change page style: $1"; -}; -String STR_UNDO_PAGEDESC_CREATE -{ - Text [ en-US ] = "Create page style: $1"; -}; -String STR_UNDO_PAGEDESC_DELETE -{ - Text [ en-US ] = "Delete page style: $1"; -}; -String STR_UNDO_PAGEDESC_RENAME -{ - Text [ en-US ] = "Rename page style: $1 $2 $3"; -}; -String STR_UNDO_HEADER_FOOTER -{ - Text [ en-US ] = "Header/footer changed"; -}; -String STR_UNDO_FIELD -{ - Text [ en-US ] = "Field changed"; -}; -String STR_UNDO_TXTFMTCOL_CREATE -{ - Text [ en-US ] = "Create paragraph style: $1"; -}; -String STR_UNDO_TXTFMTCOL_DELETE -{ - Text [ en-US ] = "Delete paragraph style: $1"; -}; -String STR_UNDO_TXTFMTCOL_RENAME -{ - Text [ en-US ] = "Rename paragraph style: $1 $2 $3"; -}; -String STR_UNDO_CHARFMT_CREATE -{ - Text [ en-US ] = "Create character style: $1"; -}; -String STR_UNDO_CHARFMT_DELETE -{ - Text [ en-US ] = "Delete character style: $1"; -}; -String STR_UNDO_CHARFMT_RENAME -{ - Text [ en-US ] = "Rename character style: $1 $2 $3"; -}; -String STR_UNDO_FRMFMT_CREATE -{ - Text [ en-US ] = "Create frame style: $1"; -}; -String STR_UNDO_FRMFMT_DELETE -{ - Text [ en-US ] = "Delete frame style: $1"; -}; -String STR_UNDO_FRMFMT_RENAME -{ - Text [ en-US ] = "Rename frame style: $1 $2 $3"; -}; -String STR_UNDO_NUMRULE_CREATE -{ - Text [ en-US ] = "Create numbering style: $1"; -}; -String STR_UNDO_NUMRULE_DELETE -{ - Text [ en-US ] = "Delete numbering style: $1"; -}; -String STR_UNDO_NUMRULE_RENAME -{ - Text [ en-US ] = "Rename numbering style: $1 $2 $3"; -}; -String STR_UNDO_BOOKMARK_RENAME -{ - Text[ en-US ] = "Rename bookmark: $1 $2 $3"; -}; -String STR_UNDO_INDEX_ENTRY_INSERT -{ - Text[ en-US ] = "Insert index entry"; -}; -String STR_UNDO_INDEX_ENTRY_DELETE -{ - Text[ en-US ] = "Delete index entry"; -}; -String STR_FIELD -{ - Text [ en-US ] = "field"; -}; -String STR_PARAGRAPHS -{ - Text [ en-US ] = "Paragraphs" ; -}; -String STR_FRAME -{ - Text [ en-US ] = "frame"; -}; -String STR_OLE -{ - Text [ en-US ] = "OLE-object"; -}; -String STR_MATH_FORMULA -{ - Text [ en-US ] = "formula"; -}; -String STR_CHART -{ - Text [ en-US ] = "chart"; -}; -String STR_NOTE -{ - Text [ en-US ] = "comment"; -}; -String STR_REFERENCE -{ - Text [ en-US ] = "cross-reference"; -}; -String STR_SCRIPT -{ - Text [ en-US ] = "script"; -}; -String STR_AUTHORITY_ENTRY -{ - Text[ en-US ] = "bibliography entry"; -}; -String STR_SPECIALCHAR -{ - Text[ en-US ] = "special character"; -}; -String STR_FOOTNOTE -{ - Text[ en-US ] = "footnote"; -}; -String STR_GRAPHIC -{ - Text[ en-US ] = "image"; -}; -String STR_DRAWING_OBJECTS -{ - Text[ en-US ] = "drawing object(s)"; -}; -String STR_TABLE_NAME -{ - Text[ en-US ] = "table: $1$2$3"; -}; -String STR_PARAGRAPH_UNDO -{ - Text[ en-US ] = "paragraph"; -}; -String STR_UNDO_FLYFRMFMT_TITLE -{ - Text[ en-US ] = "Change object title of $1"; -}; -String STR_UNDO_FLYFRMFMT_DESCRITPTION -{ - Text[ en-US ] = "Change object description of $1"; -}; -String STR_UNDO_TBLSTYLE_CREATE -{ - Text[ en-US ] = "Create table style: $1"; -}; -String STR_UNDO_TBLSTYLE_DELETE -{ - Text[ en-US ] = "Delete table style: $1"; -}; -String STR_UNDO_TBLSTYLE_UPDATE -{ - Text[ en-US ] = "Update table style: $1"; -}; -String STR_UNDO_TABLE_DELETE -{ - Text [ en-US ] = "Delete table" ; -}; -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 9ad7a4d69748..cae440a08055 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -38,7 +38,7 @@ #include <redline.hxx> #include <crossrefbookmark.hxx> #include <undo.hrc> -#include <comcore.hrc> +#include <strings.hrc> #include <docsh.hxx> #include <view.hxx> #include <o3tl/make_unique.hxx> @@ -263,6 +263,174 @@ void SwUndo::RepeatImpl( ::sw::RepeatContext & ) { } +OUString GetUndoComment(SwUndoId eId) +{ + // Undo + const char* STR_UNDO_ARY[] = + { + STR_CANT_UNDO, + STR_DELETE_UNDO, + STR_INSERT_UNDO, + STR_OVR_UNDO, + STR_SPLITNODE_UNDO, + STR_MOVE_UNDO, + STR_INSATTR_UNDO, + STR_SETFMTCOLL_UNDO, + STR_RESET_ATTR_UNDO, + STR_INSFMT_ATTR_UNDO, + STR_INSERT_DOC_UNDO, + STR_INSERT_GLOSSARY, + STR_DELBOOKMARK, + STR_INSBOOKMARK, + STR_SORT_TBL, + STR_SORT_TXT, + STR_INSTABLE_UNDO, + STR_TEXTTOTABLE_UNDO, + STR_TABLETOTEXT_UNDO, + STR_COPY_UNDO, + STR_REPLACE_UNDO, + STR_INSERT_PAGE_BREAK_UNDO, + STR_INSERT_COLUMN_BREAK_UNDO, + STR_PLAY_MACRO_UNDO, + STR_INSERT_ENV_UNDO, + STR_DRAG_AND_COPY, + STR_DRAG_AND_MOVE, + STR_INSERT_CHART, + STR_INSERTFLY, + STR_DELETEFLY, + STR_AUTOFORMAT, + STR_TABLEHEADLINE, + STR_REPLACE, + STR_INSERTSECTION, + STR_DELETESECTION, + STR_CHANGESECTION, + STR_CHANGESECTPASSWD, + STR_CHANGEDEFATTR, + STR_REPLACE_STYLE, + STR_DELETE_PAGE_BREAK, + STR_TEXT_CORRECTION, + STR_OUTLINE_LR, + STR_OUTLINE_UD, + STR_INSNUM, + STR_NUMUP, + STR_NUMDOWN, + STR_MOVENUM, + STR_INSERTDRAW, + STR_NUMORNONUM, + STR_INC_LEFTMARGIN, + STR_DEC_LEFTMARGIN, + STR_INSERTLABEL, + STR_SETNUMRULESTART, + STR_CHANGEFTN, + nullptr, /* !! sollte NIE gebraucht/uebersetzt werden !! */ + STR_ACCEPT_REDLINE, + STR_REJECT_REDLINE, + STR_SPLIT_TABLE, + STR_DONTEXPAND, + STR_AUTOCORRECT, + STR_MERGE_TABLE, + STR_TRANSLITERATE, + STR_DELNUM, + STR_DRAWUNDO, + STR_DRAWGROUP, + STR_DRAWUNGROUP, + STR_DRAWDELETE, + STR_REREAD, + STR_DELGRF, + STR_DELOLE, + STR_TABLE_ATTR, + STR_UNDO_TABLE_AUTOFMT, + STR_UNDO_TABLE_INSCOL, + STR_UNDO_TABLE_INSROW, + STR_UNDO_TABLE_DELBOX, + STR_UNDO_COL_DELETE, + STR_UNDO_ROW_DELETE, + STR_UNDO_TABLE_SPLIT, + STR_UNDO_TABLE_MERGE, + STR_TABLE_NUMFORMAT, + STR_INSERT_TOX, + STR_CLEAR_TOX_RANGE, + STR_TABLE_TBLCPYTBL, + STR_TABLE_CPYTBL, + STR_INS_FROM_SHADOWCRSR, + STR_UNDO_CHAIN, + STR_UNDO_UNCHAIN, + STR_UNDO_FTNINFO, + STR_UNDO_ENDNOTEINFO, + STR_UNDO_COMPAREDOC, + STR_UNDO_SETFLYFRMFMT, + STR_UNDO_SETRUBYATTR, + STR_UNDO_TMPAUTOCORR, + STR_INSERT_FOOTNOTE, + STR_INSERT_URLBTN, + STR_INSERT_URLTXT, + STR_DELETE_INVISIBLECNTNT, + STR_TOXCHANGE, + STR_START_QUOTE, + STR_END_QUOTE, + STR_LDOTS, + STR_MULTISEL, + STR_TYPING_UNDO, + STR_PASTE_CLIPBOARD_UNDO, + STR_YIELDS, + STR_OCCURRENCES_OF, + STR_UNDO_TABS, + STR_UNDO_NLS, + STR_UNDO_PAGEBREAKS, + STR_UNDO_COLBRKS, + STR_UNDO_REDLINE_INSERT, + STR_UNDO_REDLINE_DELETE, + STR_UNDO_REDLINE_FORMAT, + STR_UNDO_REDLINE_TABLE, + STR_UNDO_REDLINE_FMTCOLL, + STR_N_REDLINES, + STR_UNDO_PAGEDESC, + STR_UNDO_PAGEDESC_CREATE, + STR_UNDO_PAGEDESC_DELETE, + STR_UNDO_PAGEDESC_RENAME, + STR_UNDO_HEADER_FOOTER, + STR_UNDO_FIELD, + STR_UNDO_TXTFMTCOL_CREATE, + STR_UNDO_TXTFMTCOL_DELETE, + STR_UNDO_TXTFMTCOL_RENAME, + STR_UNDO_CHARFMT_CREATE, + STR_UNDO_CHARFMT_DELETE, + STR_UNDO_CHARFMT_RENAME, + STR_UNDO_FRMFMT_CREATE, + STR_UNDO_FRMFMT_DELETE, + STR_UNDO_FRMFMT_RENAME, + STR_UNDO_NUMRULE_CREATE, + STR_UNDO_NUMRULE_DELETE, + STR_UNDO_NUMRULE_RENAME, + STR_UNDO_BOOKMARK_RENAME, + STR_UNDO_INDEX_ENTRY_INSERT, + STR_UNDO_INDEX_ENTRY_DELETE, + STR_FIELD, + STR_PARAGRAPHS, + STR_FRAME, + STR_OLE, + STR_MATH_FORMULA, + STR_CHART, + STR_NOTE, + STR_REFERENCE, + STR_SCRIPT, + STR_AUTHORITY_ENTRY, + STR_SPECIALCHAR, + STR_FOOTNOTE, + STR_GRAPHIC, + STR_DRAWING_OBJECTS, + STR_TABLE_NAME, + STR_PARAGRAPH_UNDO, + STR_UNDO_FLYFRMFMT_TITLE, + STR_UNDO_FLYFRMFMT_DESCRITPTION, + STR_UNDO_TBLSTYLE_CREATE, + STR_UNDO_TBLSTYLE_DELETE, + STR_UNDO_TBLSTYLE_UPDATE, + STR_UNDO_TABLE_DELETE + }; + return SwResId(STR_UNDO_ARY[(int)eId]); +} + OUString SwUndo::GetComment() const { OUString aResult; @@ -271,7 +439,7 @@ OUString SwUndo::GetComment() const { if (! pComment) { - pComment.reset( new OUString(SwResId(UNDO_BASE + (int)GetId())) ); + pComment.reset(new OUString(GetUndoComment(GetId()))); SwRewriter aRewriter = GetRewriter(); @@ -282,7 +450,7 @@ OUString SwUndo::GetComment() const } else { - aResult = SwResId(UNDO_BASE + (int)GetId()); + aResult = GetUndoComment(GetId()); SwRewriter aRewriter = GetRewriter(); diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index c9d311a3d782..bee8eafb76ed 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -54,7 +54,7 @@ #include <acorrect.hxx> #include <dcontact.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <undo.hrc> using namespace ::com::sun::star; diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index fe420faec1f6..d9db5e57d456 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -18,7 +18,6 @@ */ #include <UndoOverwrite.hxx> -#include <tools/resid.hxx> #include <unotools/charclass.hxx> #include <unotools/transliterationwrapper.hxx> #include <comphelper/processfactory.hxx> @@ -33,7 +32,7 @@ #include <rolbck.hxx> #include <acorrect.hxx> #include <docary.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <undo.hrc> using namespace ::com::sun::star; diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx index 2f08ed55d893..e4f23da63968 100644 --- a/sw/source/core/undo/unredln.cxx +++ b/sw/source/core/undo/unredln.cxx @@ -27,7 +27,7 @@ #include <ndtxt.hxx> #include <UndoCore.hxx> #include <UndoDelete.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <rolbck.hxx> #include <redline.hxx> #include <docary.hxx> diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index a4e2df354c86..7c16abe9b9b3 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -60,7 +60,7 @@ #include <node2lay.hxx> #include <tblrwcl.hxx> #include <fmtanchr.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <unochart.hxx> #include <calbck.hxx> diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 1d0c0200708b..841a0b0667c4 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -42,7 +42,7 @@ #include <docsh.hxx> #include <ndole.hxx> #include <swtypes.hxx> -#include <unocore.hrc> +#include <strings.hrc> #include <docary.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/string.hxx> diff --git a/sw/source/core/unocore/unocore.src b/sw/source/core/unocore/unocore.src deleted file mode 100644 index adb0cd87e7b6..000000000000 --- a/sw/source/core/unocore/unocore.src +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <unocore.hrc> - -String STR_CHART2_ROW_LABEL_TEXT -{ - Text [ en-US ] = "Row %ROWNUMBER" ; -}; - -String STR_CHART2_COL_LABEL_TEXT -{ - Text [ en-US ] = "Column %COLUMNLETTER" ; -}; - -String STR_STYLE_FAMILY_CHARACTER -{ - Text [ en-US ] = "Character" ; -}; - -String STR_STYLE_FAMILY_PARAGRAPH -{ - Text [ en-US ] = "Paragraph" ; -}; - -String STR_STYLE_FAMILY_FRAME -{ - Text [ en-US ] = "Frame" ; -}; - -String STR_STYLE_FAMILY_PAGE -{ - Text [ en-US ] = "Pages" ; -}; - -String STR_STYLE_FAMILY_NUMBERING -{ - Text [ en-US ] = "Numbering" ; -}; - -String STR_STYLE_FAMILY_TABLE -{ - Text [ en-US ] = "Table" ; -}; - -String STR_STYLE_FAMILY_CELL -{ - Text [ en-US ] = "Cell" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 92258723e11a..77f56b435dd1 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -76,7 +76,7 @@ #include <chpfld.hxx> #include <flddropdown.hxx> #include <poolfmt.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <pagedesc.hxx> #include <docary.hxx> #include <reffld.hxx> diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 1d6b2d362409..59a6b9f93041 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -45,7 +45,7 @@ #include <IDocumentLayoutAccess.hxx> #include <docary.hxx> #include <poolfmt.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <pagedesc.hxx> #include <fmtcntnt.hxx> #include <unomap.hxx> diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index ce721dc05659..92248fc1c1f3 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -54,7 +54,7 @@ #include <fmtfld.hxx> #include <fmtpdsc.hxx> #include <pagedesc.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <poolfmt.hxx> #include <edimp.hxx> #include <fchrfmt.hxx> diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 0de40a487554..f48471ced40b 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -22,7 +22,7 @@ #include <swtypes.hxx> #include <cmdid.h> #include <hintids.hxx> -#include "poolfmt.hrc" +#include "strings.hrc" #include "poolfmt.hxx" #include <fmtcol.hxx> #include <unomap.hxx> @@ -1270,6 +1270,20 @@ sal_Bool SwXNumberingRules::hasElements() return true; } +static const char* STR_POOLCOLL_HEADLINE_ARY[] +{ + STR_POOLCOLL_HEADLINE1, + STR_POOLCOLL_HEADLINE2, + STR_POOLCOLL_HEADLINE3, + STR_POOLCOLL_HEADLINE4, + STR_POOLCOLL_HEADLINE5, + STR_POOLCOLL_HEADLINE6, + STR_POOLCOLL_HEADLINE7, + STR_POOLCOLL_HEADLINE8, + STR_POOLCOLL_HEADLINE9, + STR_POOLCOLL_HEADLINE10 +}; + uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex( const SwNumRule& rNumRule, sal_Int32 nIndex) const { @@ -1294,7 +1308,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex( if (pDocShell) // -> Chapter Numbering { // template name - OUString sValue(SwResId(STR_POOLCOLL_HEADLINE1 + nIndex)); + OUString sValue(SwResId(STR_POOLCOLL_HEADLINE_ARY[nIndex])); const SwTextFormatColls* pColls = pDocShell->GetDoc()->GetTextFormatColls(); const size_t nCount = pColls->size(); for(size_t i = 0; i < nCount; ++i) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index e9a666bd7102..9be31a4c80ea 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -54,7 +54,7 @@ #include <unotextbodyhf.hxx> #include <fmthdft.hxx> #include <fmtpdsc.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <poolfmt.hxx> #include "unoevent.hxx" #include <fmtruby.hxx> @@ -89,7 +89,6 @@ #include <svx/xbtmpit.hxx> #include "ccoll.hxx" -#include "unocore.hrc" #include <cassert> #include <memory> @@ -108,17 +107,17 @@ namespace uno::Reference<beans::XPropertySetInfo> m_xPSInfo; SwGetPoolIdFromName m_aPoolId; OUString m_sName; - sal_uInt32 m_nResId; + const char* m_pResId; GetCountOrName_t m_fGetCountOrName; CreateStyle_t m_fCreateStyle; TranslateIndex_t m_fTranslateIndex; - StyleFamilyEntry(SfxStyleFamily eFamily, sal_uInt16 nPropMapType, SwGetPoolIdFromName aPoolId, OUString const& sName, sal_uInt32 nResId, GetCountOrName_t const & fGetCountOrName, CreateStyle_t const & fCreateStyle, TranslateIndex_t const & fTranslateIndex) + StyleFamilyEntry(SfxStyleFamily eFamily, sal_uInt16 nPropMapType, SwGetPoolIdFromName aPoolId, OUString const& sName, const char* pResId, GetCountOrName_t const & fGetCountOrName, CreateStyle_t const & fCreateStyle, TranslateIndex_t const & fTranslateIndex) : m_eFamily(eFamily) , m_nPropMapType(nPropMapType) , m_xPSInfo(aSwMapProvider.GetPropertySet(nPropMapType)->getPropertySetInfo()) , m_aPoolId(aPoolId) , m_sName(sName) - , m_nResId(nResId) + , m_pResId(pResId) , m_fGetCountOrName(fGetCountOrName) , m_fCreateStyle(fCreateStyle) , m_fTranslateIndex(fTranslateIndex) @@ -1044,7 +1043,7 @@ uno::Any SAL_CALL XStyleFamily::getPropertyValue( const OUString& sPropertyName if(sPropertyName != "DisplayName") throw beans::UnknownPropertyException( "unknown property: " + sPropertyName, static_cast<OWeakObject *>(this) ); SolarMutexGuard aGuard; - return uno::makeAny(SwResId(m_rEntry.m_nResId)); + return uno::makeAny(SwResId(m_rEntry.m_pResId)); } @@ -1514,6 +1513,24 @@ public: }; }; +namespace +{ + const char* STR_POOLPAGE_ARY[] = + { + // Page styles + STR_POOLPAGE_STANDARD, + STR_POOLPAGE_FIRST, + STR_POOLPAGE_LEFT, + STR_POOLPAGE_RIGHT, + STR_POOLPAGE_JAKET, + STR_POOLPAGE_REGISTER, + STR_POOLPAGE_HTML, + STR_POOLPAGE_FOOTNOTE, + STR_POOLPAGE_ENDNOTE, + STR_POOLPAGE_LANDSCAPE + }; +} + const SwPageDesc* SwStyleBase_Impl::GetOldPageDesc() { if(!m_pOldPageDesc) @@ -1524,11 +1541,11 @@ const SwPageDesc* SwStyleBase_Impl::GetOldPageDesc() if(!m_pOldPageDesc) { - for(sal_uInt16 i = RC_POOLPAGEDESC_BEGIN; i <= STR_POOLPAGE_LANDSCAPE; ++i) + for (size_t i = 0; i < SAL_N_ELEMENTS(STR_POOLPAGE_ARY); ++i) { - if(SwResId(i) == m_rStyleName) + if (SwResId(STR_POOLPAGE_ARY[i]) == m_rStyleName) { - m_pOldPageDesc = m_rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( static_cast<sal_uInt16>(RES_POOLPAGE_BEGIN + i - RC_POOLPAGEDESC_BEGIN)); + m_pOldPageDesc = m_rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_BEGIN + i); break; } } diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 0cc1ac469443..e02246ec403d 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -33,7 +33,7 @@ #include <viewimp.hxx> #include <viewopt.hxx> #include <swregion.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <frmtool.hxx> #include <sfx2/zoomitem.hxx> #include <printdata.hxx> diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 9155d7dccf3c..c795e73f2d8f 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -20,6 +20,7 @@ #include <printdata.hxx> #include <globals.hrc> +#include <strings.hrc> #include <doc.hxx> #include <IDocumentDeviceAccess.hxx> #include <unotxdoc.hxx> @@ -29,7 +30,6 @@ #include <svl/languageoptions.hxx> #include <toolkit/awt/vclxdevice.hxx> -#include <tools/resary.hxx> #include <unotools/moduleoptions.hxx> #include <vcl/outdev.hxx> diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 6baeba639baa..22141173012b 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -33,7 +33,7 @@ #include <accmap.hxx> #include <pagepreviewlayout.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <svx/svdundo.hxx> #include <comphelper/lok.hxx> #include <IDocumentLayoutAccess.hxx> diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 079f764ea2b2..131ad107f67f 100644 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -36,8 +36,8 @@ #include <hints.hxx> #include <fntcache.hxx> -#include <statstr.hrc> -#include <comcore.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <IDocumentFieldsAccess.hxx> #include <IDocumentDeviceAccess.hxx> diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index a763e979ff88..74f43b47ca74 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -64,8 +64,8 @@ #include <vcl/alpha.hxx> #include <svtools/accessibilityoptions.hxx> #include <accessibilityoptions.hxx> -#include <statstr.hrc> -#include <comcore.hrc> +#include <strings.hrc> +#include <strings.hrc> #include "bitmaps.hlst" #include <pagepreviewlayout.hxx> #include <sortedobjs.hxx> diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 21ab2083f50c..97a437cda14d 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -61,7 +61,7 @@ #include <pagedesc.hxx> #include <poolfmt.hxx> #include <mdiexp.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <ptqueue.hxx> #include <tabfrm.hxx> #include <txtfrm.hxx> diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index aee455a34a31..9ae7f924fb19 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -40,7 +40,7 @@ #include <pagedesc.hxx> #include <breakit.hxx> #include <swerror.h> -#include <statstr.hrc> +#include <strings.hrc> #include <mdiexp.hxx> #include <poolfmt.hxx> diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index 7a23d1970fba..99567ff29172 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -29,7 +29,7 @@ #include <frmfmt.hxx> #include <wrtasc.hxx> -#include <statstr.hrc> +#include <strings.hrc> SwASCWriter::SwASCWriter( const OUString& rFltNm ) { diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 93b6d5b609bf..7d86e4234a60 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -110,7 +110,7 @@ #include <sfx2/viewfrm.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <swerror.h> #include <css1atr.hxx> diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 155a8f6784ad..bc5759fb030d 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -69,7 +69,7 @@ #include <htmlnum.hxx> #include <htmlfly.hxx> #include <swmodule.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <swerror.h> #include <rtl/strbuf.hxx> #include <IDocumentSettingAccess.hxx> diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 987a060820cc..e20400036e23 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -87,7 +87,7 @@ #include <svtools/imapobj.hxx> #include <tools/urlobj.hxx> #include <mdiexp.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <fmtline.hxx> #include <fmtfsize.hxx> #include <comphelper/extract.hxx> diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index d7889c17f366..e5ed1e137ce3 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -85,7 +85,7 @@ #include <viewopt.hxx> #include <shellres.hxx> #include <mdiexp.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <swerror.h> #include <swtable.hxx> #include <fchrfmt.hxx> diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 216284b09160..4513028f9765 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <rsc/rscsfx.hxx> +#include <svl/style.hxx> #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/embed/ElementModes.hpp> #include <comphelper/processfactory.hxx> @@ -59,7 +59,7 @@ #include <unotextrange.hxx> #include <swmodule.hxx> #include <SwXMLSectionList.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <SwStyleNameMapper.hxx> #include <poolfmt.hxx> @@ -73,6 +73,7 @@ #include <svx/svdoole2.hxx> #include <svx/svdograf.hxx> #include <sfx2/docfilt.hxx> +#include <sfx2/sfxsids.hrc> #include <istyleaccess.hxx> #include <sfx2/DocumentMetadataAccess.hxx> diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 61a7cddece3a..651b47a00c7d 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -36,6 +36,7 @@ #include <svl/stritem.hxx> #include <sfx2/frame.hxx> #include <sfx2/docfile.hxx> +#include <sfx2/sfxsids.hrc> #include <pam.hxx> #include <doc.hxx> #include <docfunc.hxx> @@ -48,7 +49,7 @@ #include <unotools/ucbstreamhelper.hxx> #include <swerror.h> #include <wrtxml.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <comphelper/documentconstants.hxx> #include <com/sun/star/rdf/XDocumentMetadataAccess.hpp> diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index d05820fa1115..34fc6afeaa54 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -50,7 +50,7 @@ #include <poolfmt.hxx> #include <ndtxt.hxx> #include <editsh.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include "xmlimp.hxx" #include "xmltexti.hxx" #include <xmloff/DocumentSettingsContext.hxx> diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx index 1c43e5c4bffc..984d6177023a 100644 --- a/sw/source/filter/xml/xmlitemi.cxx +++ b/sw/source/filter/xml/xmlitemi.cxx @@ -21,7 +21,7 @@ #include <com/sun/star/util/MeasureUnit.hpp> -#include <rsc/rscsfx.hxx> +#include <svl/style.hxx> #include <xmloff/i18nmap.hxx> #include <xmloff/xmluconv.hxx> diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src deleted file mode 100644 index ab383e24ec29..000000000000 --- a/sw/source/ui/app/app.src +++ /dev/null @@ -1,577 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <svl/style.hrc> -#include <sfx2/sfx.hrc> -#include <svx/dialogs.hrc> -#include "cmdid.h" -#include "access.hrc" -#include "globals.hrc" -#include "app.hrc" -#include "statstr.hrc" -#include "swstyle.h" -#include "comcore.hrc" -#include "shells.hrc" -#include "helpid.h" - -String STR_PARAGRAPHSTYLEFAMILY -{ - Text [ en-US ] = "Paragraph Styles" ; -}; - -String STR_CHARACTERSTYLEFAMILY -{ - Text [ en-US ] = "Character Styles" ; -}; - -String STR_FRAMESTYLEFAMILY -{ - Text [ en-US ] = "Frame Styles" ; -}; - -String STR_PAGESTYLEFAMILY -{ - Text [ en-US ] = "Page Styles" ; -}; - -String STR_LISTSTYLEFAMILY -{ - Text [ en-US ] = "List Styles" ; -}; - -String STR_TABLESTYLEFAMILY -{ - Text [ en-US ] = "Table Styles" ; -}; - -StringArray RID_PARAGRAPHSTYLEFAMILY -{ - ItemList [ en-US ] = - { - < "All Styles" ; SFXSTYLEBIT_ALL_VISIBLE ; > ; - < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ; - < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; - < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; - < "Automatic" ; SFXSTYLEBIT_AUTO ; > ; - < "Text Styles" ; SWSTYLEBIT_TEXT ; > ; - < "Chapter Styles" ; SWSTYLEBIT_CHAPTER ; > ; - < "List Styles" ; SWSTYLEBIT_LIST ; > ; - < "Index Styles" ; SWSTYLEBIT_IDX ; > ; - < "Special Styles" ; SWSTYLEBIT_EXTRA ; > ; - < "HTML Styles" ; SWSTYLEBIT_HTML ; > ; - < "Conditional Styles" ; SWSTYLEBIT_CONDCOLL ; > ; - }; -}; - -StringArray RID_CHARACTERSTYLEFAMILY -{ - ItemList [ en-US ] = - { - < "All" ; SFXSTYLEBIT_ALL_VISIBLE ; > ; - < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ; - < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; - < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; - }; -}; - -StringArray RID_FRAMESTYLEFAMILY -{ - ItemList [ en-US ] = - { - < "All" ; SFXSTYLEBIT_ALL_VISIBLE ; > ; - < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ; - < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; - < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; - }; -}; - -StringArray RID_PAGESTYLEFAMILY -{ - ItemList [ en-US ] = - { - < "All" ; SFXSTYLEBIT_ALL_VISIBLE ; > ; - < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ; - < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; - < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; - }; -}; - -StringArray RID_LISTSTYLEFAMILY -{ - ItemList [ en-US ] = - { - < "All" ; SFXSTYLEBIT_ALL_VISIBLE ; > ; - < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ; - < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; - < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; - }; -}; - -StringArray RID_TABLESTYLEFAMILY -{ - ItemList [ en-US ] = - { - < "All" ; SFXSTYLEBIT_ALL_VISIBLE ; > ; - < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ; - < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; - < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; - }; -}; - -String STR_ENV_TITLE -{ - Text [ en-US ] = "Envelope" ; -}; - -String STR_LAB_TITLE -{ - Text [ en-US ] = "Labels" ; -}; - - // ShortName!!! -String STR_HUMAN_SWDOC_NAME -{ - Text [ en-US ] = "Text" ; -}; - -String STR_WRITER_DOCUMENT_FULLTYPE -{ - Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION Text Document"; -}; - -String STR_CANTOPEN -{ - Text [ en-US ] = "Cannot open document." ; -}; - -String STR_CANTCREATE -{ - Text [ en-US ] = "Can't create document."; -}; - -String STR_DLLNOTFOUND -{ - Text [ en-US ] = "Filter not found." ; -}; - -String STR_LOAD_GLOBAL_DOC -{ - Text [ en-US ] = "Name and Path of Master Document" ; -}; - -String STR_LOAD_HTML_DOC -{ - Text [ en-US ] = "Name and Path of the HTML Document" ; -}; - -String STR_JAVA_EDIT -{ - Text [ en-US ] = "Edit Script" ; -}; - -String STR_REMOVE_WARNING -{ - Text [ en-US ] = "The following characters are not valid and have been removed: "; -}; - -String STR_BOOKMARK_DEF_NAME -{ - Text [ en-US ] = "Bookmark"; -}; - -String STR_BOOKMARK_NAME -{ - Text [ en-US ] = "Name"; -}; - -String STR_BOOKMARK_TEXT -{ - Text [ en-US ] = "Text"; -}; - -String SW_STR_NONE -{ - Text [ en-US ] = "[None]" ; -}; - -String STR_CAPTION_BEGINNING -{ - Text [ en-US ] = "Start" ; -}; - -String STR_CAPTION_END -{ - Text [ en-US ] = "End" ; -}; - -String STR_CAPTION_ABOVE -{ - Text [ en-US ] = "Above" ; -}; - -String STR_CAPTION_BELOW -{ - Text [ en-US ] = "Below" ; -}; - -String SW_STR_READONLY -{ - Text [ en-US ] = "read-only" ; -}; - -String STR_READONLY_PATH -{ - Text [ en-US ] = "The 'AutoText' directories are read-only. Do you want to call the path settings dialog?"; -}; - -String STR_DOC_STAT -{ - Text [ en-US ] = "Statistics" ; -}; - - // Statusbar-titles - -String STR_STATSTR_W4WREAD -{ - Text [ en-US ] = "Importing document..." ; -}; - -String STR_STATSTR_W4WWRITE -{ - Text [ en-US ] = "Exporting document..." ; -}; - -String STR_STATSTR_SWGREAD -{ - Text [ en-US ] = "Loading document..." ; -}; - -String STR_STATSTR_SWGWRITE -{ - Text [ en-US ] = "Saving document..." ; -}; - -String STR_STATSTR_REFORMAT -{ - Text [ en-US ] = "Repagination..." ; -}; - -String STR_STATSTR_AUTOFORMAT -{ - Text [ en-US ] = "Formatting document automatically..." ; -}; - -String STR_STATSTR_SEARCH -{ - Text [ en-US ] = "Search..." ; -}; - -String STR_STATSTR_LETTER -{ - Text [ en-US ] = "Letter" ; -}; - -String STR_STATSTR_SPELL -{ - Text [ en-US ] = "Spellcheck..." ; -}; - -String STR_STATSTR_HYPHEN -{ - Text [ en-US ] = "Hyphenation..." ; -}; - -String STR_STATSTR_TOX_INSERT -{ - Text [ en-US ] = "Inserting Index..." ; -}; - -String STR_STATSTR_TOX_UPDATE -{ - Text [ en-US ] = "Updating Index..." ; -}; - -String STR_STATSTR_SUMMARY -{ - Text [ en-US ] = "Creating abstract..." ; -}; - -String STR_STATSTR_SWGPRTOLENOTIFY -{ - Text [ en-US ] = "Adapt Objects..."; -}; - -String STR_TABLE_DEFNAME -{ - Text [ en-US ] = "Table" ; -}; - -String STR_GRAPHIC_DEFNAME -{ - Text[ en-US ] = "Image" ; -}; - -String STR_OBJECT_DEFNAME -{ - Text [ en-US ] = "Object" ; -}; - -String STR_FRAME_DEFNAME -{ - Text [ en-US ] = "Frame" ; -}; - -String STR_SHAPE_DEFNAME -{ - Text [ en-US ] = "Shape" ; -}; - -String STR_REGION_DEFNAME -{ - Text [ en-US ] = "Section" ; -}; - -String STR_NUMRULE_DEFNAME -{ - Text [ en-US ] = "Numbering" ; -}; - -String STR_EMPTYPAGE -{ - Text [ en-US ] = "blank page" ; -}; - -String STR_ABSTRACT_TITLE -{ - Text [ en-US ] = "Abstract: " ; -}; - -String STR_FDLG_TEMPLATE_NAME -{ - Text [ en-US ] = "separated by: " ; -}; - -String STR_FDLG_OUTLINE_LEVEL -{ - Text [ en-US ] = "Outline: Level "; -}; - -String STR_FDLG_STYLE -{ - Text [ en-US ] = "Style: "; -}; - -String STR_PAGEOFFSET -{ - Text [ en-US ] = "Page number: " ; -}; - -String STR_PAGEBREAK -{ - Text [ en-US ] = "Break before new page" ; -}; - -String STR_WESTERN_FONT -{ - Text [ en-US ] = "Western text: "; -}; - -String STR_CJK_FONT -{ - Text [ en-US ] = "Asian text: "; -}; - -String STR_REDLINE_UNKNOWN_AUTHOR -{ - Text [ en-US ] = "Unknown Author"; -}; - -String STR_DELETE_NOTE_AUTHOR -{ - Text [ en-US ] = "Delete ~All Comments by $1"; -}; - -String STR_HIDE_NOTE_AUTHOR -{ - Text [ en-US ] = "H~ide All Comments by $1"; -}; - -String STR_OUTLINE_NUMBERING -{ - Text [ en-US ] = "Outline Numbering"; -}; - -String STR_STATUSBAR_WORDCOUNT_NO_SELECTION -{ - Text [ en-US ] = "%1 words, %2 characters"; -}; - -String STR_STATUSBAR_WORDCOUNT -{ - Text [ en-US ] = "%1 words, %2 characters selected"; -}; - -String STR_CONVERT_TEXT_TABLE -{ - Text [ en-US ] = "Convert Text to Table" ; -}; - -String STR_ADD_AUTOFORMAT_TITLE -{ - Text [ en-US ] = "Add AutoFormat" ; -}; - -String STR_ADD_AUTOFORMAT_LABEL -{ - Text [ en-US ] = "Name" ; -}; - -String STR_DEL_AUTOFORMAT_TITLE -{ - Text [ en-US ] = "Delete AutoFormat" ; -}; - -String STR_DEL_AUTOFORMAT_MSG -{ - Text [ en-US ] = "The following AutoFormat entry will be deleted:" ; -}; - -String STR_RENAME_AUTOFORMAT_TITLE -{ - Text [ en-US ] = "Rename AutoFormat" ; -}; - -String STR_BTN_AUTOFORMAT_CLOSE -{ - Text [ en-US ] = "~Close" ; -}; - -String STR_JAN -{ - Text [ en-US ] = "Jan" ; -}; - -String STR_FEB -{ - Text [ en-US ] = "Feb" ; -}; - -String STR_MAR -{ - Text [ en-US ] = "Mar" ; -}; - -String STR_NORTH -{ - Text [ en-US ] = "North" ; -}; - -String STR_MID -{ - Text [ en-US ] = "Mid" ; -}; - -String STR_SOUTH -{ - Text [ en-US ] = "South" ; -}; - -String STR_SUM -{ - Text [ en-US ] = "Sum" ; -}; - -String STR_INVALID_AUTOFORMAT_NAME -{ - Text [ en-US ] = "You have entered an invalid name.\nThe desired AutoFormat could not be created. \nTry again using a different name." ; -}; - -String STR_NUMERIC -{ - Text [ en-US ] = "Numeric"; -}; - -String STR_ROW -{ - Text [ en-US ] = "Rows" ; -}; - -String STR_COL -{ - Text [ en-US ] = "Column" ; -}; - -String STR_AUTHMRK_EDIT -{ - - Text [ en-US ] = "Edit Bibliography Entry"; -}; - -String STR_AUTHMRK_INSERT -{ - - Text [ en-US ] = "Insert Bibliography Entry"; -}; - -String STR_ACCESS_PAGESETUP_SPACING -{ - Text [ en-US ] = "Spacing between %1 and %2"; -}; - -String STR_ACCESS_COLUMN_WIDTH -{ - Text [ en-US ] = "Column %1 Width"; -}; - -String STR_CAPTION_TABLE -{ - Text [ en-US ] = "%PRODUCTNAME Writer Table"; -}; - -String STR_CAPTION_FRAME -{ - Text [ en-US ] = "%PRODUCTNAME Writer Frame"; -}; - -String STR_CAPTION_GRAPHIC -{ - Text [ en-US ] = "%PRODUCTNAME Writer Image"; -}; - -String STR_CAPTION_OLE -{ - Text [ en-US ] = "Other OLE Objects"; -}; - -String STR_WRONG_TABLENAME -{ - Text [ en-US ] = "The name of the table must not contain spaces." ; -}; - -String STR_ERR_TABLE_MERGE -{ - Text [ en-US ] = "Selected table cells are too complex to merge." ; -}; - -String STR_SRTERR -{ - Text [ en-US ] = "Cannot sort selection" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/app/error.src b/sw/source/ui/app/error.src deleted file mode 100644 index 35d774455b5f..000000000000 --- a/sw/source/ui/app/error.src +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "globals.hrc" -#include "app.hrc" -#include "swerror.h" -#include "comcore.hrc" - -String STR_COMCORE_READERROR -{ - Text [ en-US ] = "Read Error" ; -}; -String STR_COMCORE_CANT_SHOW -{ - Text [ en-US ] = "Image cannot be displayed." ; -}; - -String STR_ERROR_CLPBRD_READ -{ - Text [ en-US ] = "Error reading from the clipboard." ; -}; - -#define ERR_CODE( class, err ) (class | (err - ERRCODE_AREA_SW)) -#define WARN_CODE( class, err ) (class | ( err - WARN_SW_BASE)) - -StringArray RID_SW_ERRHDL -{ - ItemList [ en-US ] = - { - // Import-Errors - < "File format error found." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_SWG_FILE_FORMAT_ERROR ) ; >; - < "Error reading file." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_SWG_READ_ERROR ) ; >; - < "Input file error." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_SW6_INPUT_FILE ) ; >; - < "This is not a %PRODUCTNAME Writer file." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_SW6_NOWRITER_FILE ) ; >; - < "Unexpected end of file." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_SW6_UNEXPECTED_EOF ) ; >; - < "Password-protected files cannot be opened." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_SW6_PASSWD ) ; >; - < "This is not a valid WinWord6 file." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_WW6_NO_WW6_FILE_ERR ) ; >; - < "This file was saved with WinWord in 'Fast Save' mode. Please unmark the WinWord option 'Allow Fast Saves' and save the file again." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_WW6_FASTSAVE_ERR ) ; >; - < "File format error found at $(ARG1)(row,col)." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_FORMAT_ROWCOL ) ; >; - < "File has been written in a newer version." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_SWG_NEW_VERSION ) ; >; - < "This is not a valid WinWord97 file."; ERR_CODE ( ERRCODE_CLASS_READ , ERR_WW8_NO_WW8_FILE_ERR ) ; >; - < "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)."; ERR_CODE ( ERRCODE_CLASS_READ , ERR_FORMAT_FILE_ROWCOL ) ; >; - // Export-Errors - < "Error writing file." ; ERR_CODE ( ERRCODE_CLASS_WRITE , ERR_SWG_WRITE_ERROR ) ; >; - < "Wrong AutoText document version." ; ERR_CODE ( ERRCODE_CLASS_WRITE , ERR_SWG_OLD_GLOSSARY ) ; >; - < "Error in writing sub-document $(ARG1)."; ERR_CODE ( ERRCODE_CLASS_WRITE , ERR_WRITE_ERROR_FILE ) ; >; - // Import-/Export-Errors - < "Internal error in %PRODUCTNAME Writer file format." ; ERR_CODE ( ERRCODE_CLASS_READ , ERR_SWG_INTERNAL_ERROR ) ; >; - < "Internal error in %PRODUCTNAME Writer file format." ; ERR_CODE ( ERRCODE_CLASS_WRITE , ERR_SWG_INTERNAL_ERROR ) ; >; - < "$(ARG1) has changed." ; ERR_CODE ( ERRCODE_CLASS_LOCKING , ERR_TXTBLOCK_NEWFILE_ERROR ) ; >; - < "$(ARG1) does not exist." ; ERR_CODE ( ERRCODE_CLASS_PATH , ERR_AUTOPATH_ERROR ) ; >; - < "Cells cannot be further split." ; ERR_CODE ( ERRCODE_CLASS_NONE , ERR_TBLSPLIT_ERROR ) ; >; - < "Additional columns cannot be inserted." ; ERR_CODE ( ERRCODE_CLASS_NONE , ERR_TBLINSCOL_ERROR ) ; >; - < "The structure of a linked table cannot be modified." ; ERR_CODE ( ERRCODE_CLASS_NONE , ERR_TBLDDECHG_ERROR ) ; >; - - < "No drawings could be read." ; WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_NO_DRAWINGS ) ; >; - < "This file was saved with WinWord in 'Fast Save' mode. Please unmark the WinWord option 'Allow Fast Saves' and save the file again." ; WARN_CODE ( ERRCODE_CLASS_READ , WARN_WW6_FASTSAVE_ERR ) ; >; - < "Not all attributes could be read." ; WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_FEATURES_LOST ) ; >; - < "Not all attributes could be recorded." ; WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_FEATURES_LOST ) ; >; - < "Some OLE objects could only be loaded as images." ; WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_OLE ) ; >; - < "Some OLE objects could only be saved as images." ; WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_OLE ) ; >; - < "Document could not be completely loaded." ; WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_POOR_LOAD ) ; >; - < "Document could not be completely saved." ; WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_POOR_LOAD ) ; >; - < "This HTML document contains %PRODUCTNAME Basic macros.\nThey were not saved with the current export settings."; WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_HTML_NO_MACROS) ; >; - < "Error in writing sub-document $(ARG1)."; ERR_CODE ( ERRCODE_CLASS_WRITE , WARN_WRITE_ERROR_FILE ) ; >; - < "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)."; ERR_CODE ( ERRCODE_CLASS_WRITE , WARN_FORMAT_FILE_ROWCOL ) ; >; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 446524cbac0e..7ab97a220950 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -34,6 +34,7 @@ #include <poolfmt.hxx> #include <chrdlg.hrc> +#include <strings.hrc> #include <SwStyleNameMapper.hxx> void SwBreakDlg::Apply() diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 85e5155d4525..e2206072ed32 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -43,6 +43,7 @@ #include <globals.hrc> #include <chrdlg.hrc> +#include <strings.hrc> #include <chrdlgmodes.hxx> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/XFilePicker2.hpp> diff --git a/sw/source/ui/chrdlg/chrdlg.src b/sw/source/ui/chrdlg/chrdlg.src deleted file mode 100644 index 1e7a66c672d9..000000000000 --- a/sw/source/ui/chrdlg/chrdlg.src +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "chrdlg.hrc" - -String STR_TEXTCOLL_HEADER -{ - Text [ en-US ] = "(Paragraph Style: " ; -}; -String STR_ILLEGAL_PAGENUM -{ - Text [ en-US ] = "Page numbers cannot be applied to the current page. Even numbers can be used on left pages, odd numbers on right pages." ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index e7a92eb8d293..0359fea82d63 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -25,6 +25,7 @@ #include "view.hxx" #include "wrtsh.hxx" #include "globals.hrc" +#include "strings.hrc" #include <vcl/metric.hxx> #include <vcl/settings.hxx> diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 19cb6729e59e..14605445d377 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -21,6 +21,7 @@ #include "swtypes.hxx" #include "hintids.hxx" #include "globals.hrc" +#include "strings.hrc" #include "helpid.h" #include <sfx2/objsh.hxx> #include <sfx2/htmlmode.hxx> diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index bd57bdd2d30c..33b14a55b291 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -36,7 +36,7 @@ #include "viewopt.hxx" #include <numpara.hxx> #include "chrdlg.hrc" -#include "poolfmt.hrc" +#include "strings.hrc" #include <svx/svxids.hrc> #include <svl/eitem.hxx> #include <svl/intitem.hxx> diff --git a/sw/source/ui/config/config.hrc b/sw/source/ui/config/config.hrc deleted file mode 100644 index 2de8d4218158..000000000000 --- a/sw/source/ui/config/config.hrc +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SW_SOURCE_UI_CONFIG_HRC -#define INCLUDED_SW_SOURCE_UI_CONFIG_HRC - -#include "rcid.hrc" - -// strings for configuration - -#define STR_ARR_METRIC (RC_CONFIG_BEGIN + 26) -#define CONFIG_ACT_END STR_ARR_METRIC - -#if CONFIG_ACT_END > RC_CONFIG_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index a5d2c436776e..3652ca979edf 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -33,7 +33,6 @@ #include <com/sun/star/mail/MailServiceProvider.hpp> #include <vcl/msgbox.hxx> #include <globals.hrc> -#include <config.hrc> #include <dbui.hrc> #include "bitmaps.hlst" #include <helpid.h> diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src deleted file mode 100644 index 9f4173a9f8b6..000000000000 --- a/sw/source/ui/config/optdlg.src +++ /dev/null @@ -1,167 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -/* StarView resource file */ -#include <sfx2/sfx.hrc> -#include <svx/dialogs.hrc> -#include "globals.hrc" -#include "config.hrc" -#include "helpid.h" - -String ST_SCRIPT_ASIAN -{ - Text [ en-US ] = "Asian"; -}; -String ST_SCRIPT_CTL -{ - Text [ en-US ] = "CTL"; -}; -String ST_SCRIPT_WESTERN -{ - Text [ en-US ] = "Western"; -}; - -String STR_PRINTOPTUI_PRODUCTNAME -{ - Text [ en-US ] = "%PRODUCTNAME %s"; -}; -String STR_PRINTOPTUI_CONTENTS -{ - Text [ en-US ] = "Contents"; -}; -String STR_PRINTOPTUI_PAGE_BACKGROUND -{ - Text [ en-US ] = "Page ba~ckground"; -}; -String STR_PRINTOPTUI_PICTURES -{ - Text [ en-US ] = "P~ictures and other graphic objects"; -}; -String STR_PRINTOPTUI_HIDDEN -{ - Text [ en-US ] = "Hidden te~xt"; -}; -String STR_PRINTOPTUI_TEXT_PLACEHOLDERS -{ - Text [ en-US ] = "~Text placeholders"; -}; -String STR_PRINTOPTUI_FORM_CONTROLS -{ - Text [ en-US ] = "Form control~s"; -}; -String STR_PRINTOPTUI_COLOR -{ - Text [ en-US ] = "Color"; -}; -String STR_PRINTOPTUI_PRINT_BLACK -{ - Text [ en-US ] = "Print text in blac~k"; -}; -String STR_PRINTOPTUI_PAGES_TEXT -{ - Text [ en-US ] = "Pages"; -}; -String STR_PRINTOPTUI_PRINT_BLANK -{ - Text [ en-US ] = "Print ~automatically inserted blank pages"; -}; -String STR_PRINTOPTUI_ONLY_PAPER -{ - Text [ en-US ] = "~Use only paper tray from printer preferences"; -}; -String STR_PRINTOPTUI_PRINT -{ - Text [ en-US ] = "Print"; -}; -String STR_PRINTOPTUI_NONE -{ - Text [ en-US ] = "None (document only)"; -}; -String STR_PRINTOPTUI_COMMENTS_ONLY -{ - Text [ en-US ] = "Comments only"; -}; -String STR_PRINTOPTUI_PLACE_END -{ - Text [ en-US ] = "Place at end of document"; -}; -String STR_PRINTOPTUI_PLACE_PAGE -{ - Text [ en-US ] = "Place at end of page"; -}; -String STR_PRINTOPTUI_COMMENTS -{ - Text [ en-US ] = "~Comments"; -}; -String STR_PRINTOPTUI_PAGE_SIDES -{ - Text [ en-US ] = "Page sides"; -}; -String STR_PRINTOPTUI_ALL_PAGES -{ - Text [ en-US ] = "All pages"; -}; -String STR_PRINTOPTUI_BACK_PAGES -{ - Text [ en-US ] = "Back sides / left pages"; -}; -String STR_PRINTOPTUI_FONT_PAGES -{ - Text [ en-US ] = "Front sides / right pages"; -}; -String STR_PRINTOPTUI_INCLUDE -{ - Text [ en-US ] = "Include"; -}; -String STR_PRINTOPTUI_BROCHURE -{ - Text [ en-US ] = "Broch~ure"; -}; -String STR_PRINTOPTUI_LEFT_SCRIPT -{ - Text [ en-US ] = "Left-to-right script"; -}; -String STR_PRINTOPTUI_RIGHT_SCRIPT -{ - Text [ en-US ] = "Right-to-left script"; -}; -String STR_PRINTOPTUI_RANGE_COPIES -{ - Text [ en-US ] = "Range and copies"; -}; -String STR_PRINTOPTUI_ALLPAGES -{ - Text [ en-US ] = "~All pages"; -}; -String STR_PRINTOPTUI_SOMEPAGES -{ - Text [ en-US ] = "Pa~ges"; -}; -String STR_PRINTOPTUI_SELECTION -{ - Text [ en-US ] = "~Selection"; -}; -String STR_PRINTOPTUI_PLACE_MARGINS -{ - Text [ en-US ] = "Place in margins"; -}; - - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index a994ee54484d..e22191afa640 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -31,6 +31,8 @@ #include <view.hxx> #include "globals.hrc" +#include "strings.hrc" +#include "optload.hrc" #include "cmdid.h" #include "optload.hxx" @@ -43,6 +45,7 @@ #include <svtools/insdlg.hxx> #include <svtools/treelistentry.hxx> +#include <tools/resary.hxx> #include <vcl/builderfactory.hxx> #include <vcl/settings.hxx> @@ -50,7 +53,6 @@ #include <unotools/configmgr.hxx> #include <docsh.hxx> #include <app.hrc> -#include <config.hrc> #include <SwStyleNameMapper.hxx> #include <numrule.hxx> #include <SwNodeNum.hxx> @@ -62,6 +64,25 @@ using namespace ::com::sun::star; #include <svl/eitem.hxx> +sal_uInt32 SwFieldUnitTable::Count() +{ + return SAL_N_ELEMENTS(STR_ARR_METRIC); +} + +OUString SwFieldUnitTable::GetString(sal_uInt32 nPos) +{ + if (RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count()) + return SwResId(STR_ARR_METRIC[nPos].first); + return OUString(); +} + +FieldUnit SwFieldUnitTable::GetValue(sal_uInt32 nPos) +{ + if (RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count()) + return STR_ARR_METRIC[nPos].second; + return FUNIT_NONE; +} + SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "OptGeneralPage", "modules/swriter/ui/optgeneralpage.ui", &rSet) , m_pWrtShell(nullptr) @@ -82,11 +103,10 @@ SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet) get(m_pShowStandardizedPageCount, "standardizedpageshow"); get(m_pStandardizedPageSizeNF, "standardpagesize"); - SvxStringArray aMetricArr(ResId(STR_ARR_METRIC, *pSwResMgr)); - for ( sal_uInt32 i = 0; i < aMetricArr.Count(); ++i ) + for (sal_uInt32 i = 0; i < SwFieldUnitTable::Count(); ++i) { - const OUString sMetric = aMetricArr.GetStringByPos( i ); - FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i ); + const OUString sMetric = SwFieldUnitTable::GetString(i); + FieldUnit eFUnit = SwFieldUnitTable::GetValue(i); switch ( eFUnit ) { diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src deleted file mode 100644 index 855acbb809bb..000000000000 --- a/sw/source/ui/config/optload.src +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "config.hrc" - -StringArray STR_ARR_METRIC -{ - ItemList [ en-US ] = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Centimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Inch" ; FUNIT_INCH ; > ; - < "Foot" ; FUNIT_FOOT ; > ; - < "Miles" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Point" ; FUNIT_POINT ; > ; - < "Char" ; FUNIT_CHAR ; >; - < "Line" ; FUNIT_LINE ; >; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index d608139bfee6..bc51b37bd194 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -45,7 +45,7 @@ #include <crstate.hxx> #include <viewopt.hxx> #include <globals.hrc> -#include <config.hrc> +#include <strings.hrc> #include <swwrtshitem.hxx> #include <unomid.h> @@ -73,6 +73,8 @@ #include <vcl/builderfactory.hxx> #include <vcl/svapp.hxx> +#include "optload.hxx" + using namespace ::com::sun::star; namespace { @@ -128,11 +130,10 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent, m_pVRulerRightCBox->Hide(); m_pVRulerCBox->SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl )); - SvxStringArray aMetricArr(ResId(STR_ARR_METRIC, *pSwResMgr)); - for ( size_t i = 0; i < aMetricArr.Count(); ++i ) + for (size_t i = 0; i < SwFieldUnitTable::Count(); ++i) { - const OUString sMetric = aMetricArr.GetStringByPos( i ); - FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i ); + const OUString sMetric = SwFieldUnitTable::GetString(i); + FieldUnit eFUnit = SwFieldUnitTable::GetValue(i); switch ( eFUnit ) { diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index b5ca4fc4aabc..0fc38dd56497 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -29,7 +29,7 @@ #include <vcl/scrbar.hxx> #include <vcl/msgbox.hxx> #include <vcl/builderfactory.hxx> -#include <svtools/controldims.hrc> +#include <svtools/controldims.hxx> #include <unotools/pathoptions.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/docfilt.hxx> @@ -42,6 +42,7 @@ #include <com/sun/star/ui/dialogs/XFilterManager.hpp> #include <tools/urlobj.hxx> #include <dbui.hrc> +#include <strings.hrc> #include <helpid.h> #include <unomid.h> @@ -479,10 +480,10 @@ SwCreateAddressListDialog::SwCreateAddressListDialog( else { //database has to be created - const ResStringArray& rAddressHeader = rConfig.GetDefaultAddressHeaders(); - const sal_uInt32 nCount = rAddressHeader.Count(); + const std::vector<std::pair<OUString, int>>& rAddressHeader = rConfig.GetDefaultAddressHeaders(); + const sal_uInt32 nCount = rAddressHeader.size(); for(sal_uInt32 nHeader = 0; nHeader < nCount; ++nHeader) - m_pCSVData->aDBColumnHeaders.push_back( rAddressHeader.GetString(nHeader)); + m_pCSVData->aDBColumnHeaders.push_back(rAddressHeader[nHeader].first); std::vector<OUString> aNewData; aNewData.insert(aNewData.begin(), nCount, OUString()); m_pCSVData->aDBData.push_back(aNewData); diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 207da08081b4..1d2ce52cfe64 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -86,6 +86,7 @@ #include <comphelper/uno3.hxx> #include "tabsh.hxx" #include "swabstdlg.hxx" +#include "strings.hrc" #include "table.hrc" #include <unomid.h> #include <IDocumentMarkAccess.hxx> diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src deleted file mode 100644 index 019177e0f337..000000000000 --- a/sw/source/ui/dbui/dbui.src +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "dbui.hrc" -#include "helpid.h" - -StringArray SA_ADDRESS_HEADER -{ - ItemList [en-US]= - { - < "Title" ; MM_PART_TITLE ;> ; - < "First Name" ; MM_PART_FIRSTNAME ;> ; - < "Last Name" ; MM_PART_LASTNAME ;> ; - < "Company Name" ; MM_PART_COMPANY ;> ; - < "Address Line 1" ; MM_PART_ADDRESS_1 ;> ; - < "Address Line 2" ; MM_PART_ADDRESS_2 ;> ; - < "City" ; MM_PART_CITY ;> ; - < "State" ; MM_PART_REGION ;> ; - < "ZIP" ; MM_PART_ZIP ;> ; - < "Country" ; MM_PART_COUNTRY ;> ; - < "Telephone private" ; MM_PART_PHONE_PRIVATE ;> ; - < "Telephone business" ; MM_PART_PHONE_BUSINESS ;> ; - < "E-mail Address" ; MM_PART_E_MAIL ;> ; - < "Gender"; MM_PART_GENDER ;> ; - }; -}; -String STR_NOTASSIGNED -{ - Text[ en-US ] = " not yet matched "; -}; -String STR_FILTER_ALL -{ - Text [ en-US ] = "All files" ; -}; -String STR_FILTER_ALL_DATA -{ - Text [ en-US ] = "Address lists(*.*)" ; -}; -String STR_FILTER_SXB -{ - Text [ en-US ] = "%PRODUCTNAME Base (*.odb)" ; -}; -String STR_FILTER_SXC -{ - Text [ en-US ] = "%PRODUCTNAME Calc (*.ods;*.sxc)" ; -}; -String STR_FILTER_SXW -{ - Text [ en-US ] = "%PRODUCTNAME Writer (*.odt;*.sxw)" ; -}; -String STR_FILTER_DBF -{ - Text [ en-US ] = "dBase (*.dbf)" ; -}; -String STR_FILTER_XLS -{ - Text [ en-US ] = "Microsoft Excel (*.xls;*.xlsx)" ; -}; -String STR_FILTER_DOC -{ - Text [ en-US ] = "Microsoft Word (*.doc;*.docx)" ; -}; -String STR_FILTER_TXT -{ - Text [ en-US ] = "Plain text (*.txt)" ; -}; -String STR_FILTER_CSV -{ - Text [ en-US ] = "Text Comma Separated (*.csv)" ; -}; -String STR_FILTER_MDB -{ - Text [ en-US ] = "Microsoft Access (*.mdb;*.mde)" ; -}; -String STR_FILTER_ACCDB -{ - Text [ en-US ] = "Microsoft Access 2007 (*.accdb,*.accde)" ; -}; - -String ST_CONFIGUREMAIL -{ - Text[ en-US ] = "In order to be able to send mail merge documents by e-mail, %PRODUCTNAME requires information about the e-mail account to be used.\n\nDo you want to enter e-mail account information now?"; -}; - -String ST_FILTERNAME -{ - Text [ en-US ] = "%PRODUCTNAME Address List (.csv)"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index cc6ba7230bf7..84820c20826f 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -26,6 +26,7 @@ #include <mmconfigitem.hxx> #include <swabstdlg.hxx> #include <dbui.hrc> +#include <strings.hrc> #include <view.hxx> #include <dbmgr.hxx> #include <sfx2/viewfrm.hxx> diff --git a/sw/source/ui/dbui/mailmergewizard.src b/sw/source/ui/dbui/mailmergewizard.src deleted file mode 100644 index 20651fd67962..000000000000 --- a/sw/source/ui/dbui/mailmergewizard.src +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <dbui.hrc> - -String ST_STARTING -{ - Text [ en-US ] = "Select starting document"; -}; - -String ST_DOCUMENTTYPE -{ - Text [ en-US ] = "Select document type"; -}; - -String ST_ADDRESSBLOCK -{ - Text [ en-US ] = "Insert address block"; -}; - -String ST_ADDRESSLIST -{ - Text [ en-US ] = "Select address list"; -}; - -String ST_GREETINGSLINE -{ - Text [ en-US ] = "Create salutation"; -}; - -String ST_LAYOUT -{ - Text [ en-US ] = "Adjust layout"; -}; - -String ST_EXCLUDE -{ - Text [ en-US ] = "Exclude recipient"; -}; - -String ST_FINISH -{ - Text [ en-US ] = "~Finish"; -}; - -String ST_MMWTITLE -{ - Text [ en-US ] = "Mail Merge Wizard"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 16a57ee05c80..b704f9d8c49f 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -35,7 +35,9 @@ #include <vector> #include <globals.hrc> +#include <strings.hrc> #include <dbui.hrc> +#include "mmaddressblockpage.hrc" #include <helpid.h> using namespace svt; @@ -518,12 +520,10 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( pEntry->SetUserData(reinterpret_cast<void*>((sal_Int32)USER_DATA_PUNCTUATION) ); pEntry = m_pAddressElementsLB->InsertEntry(SwResId(ST_TEXT)); pEntry->SetUserData(reinterpret_cast<void*>((sal_Int32)USER_DATA_TEXT) ); - ResStringArray aSalutArr(ResId(RA_SALUTATION, *pSwResMgr)); - for(sal_uInt32 i = 0; i < aSalutArr.Count(); ++i) - m_aSalutations.push_back(aSalutArr.GetString(i)); - ResStringArray aPunctArr(ResId(RA_PUNCTUATION, *pSwResMgr)); - for(sal_uInt32 i = 0; i < aPunctArr.Count(); ++i) - m_aPunctuations.push_back(aPunctArr.GetString(i)); + for (size_t i = 0; i < SAL_N_ELEMENTS(RA_SALUTATION); ++i) + m_aSalutations.push_back(SwResId(RA_SALUTATION[i])); + for (size_t i = 0; i < SAL_N_ELEMENTS(RA_PUNCTUATION); ++i) + m_aPunctuations.push_back(SwResId(RA_PUNCTUATION[i])); m_pDragED->SetText(" "); SetText(SwResId(eType == GREETING_MALE ? ST_TITLE_MALE : ST_TITLE_FEMALE)); m_pAddressElementsFT->SetText(SwResId(ST_SALUTATIONELEMENTS)); @@ -548,10 +548,10 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( m_pUpIB->SetHelpId( HID_MM_ADDBLOCK_MOVEBUTTONS ); } - const ResStringArray& rHeaders = m_rConfigItem.GetDefaultAddressHeaders(); - for(sal_uInt32 i = 0; i < rHeaders.Count(); ++i) + const std::vector<std::pair<OUString, int>>& rHeaders = m_rConfigItem.GetDefaultAddressHeaders(); + for (size_t i = 0; i < rHeaders.size(); ++i) { - SvTreeListEntry* pEntry = m_pAddressElementsLB->InsertEntry(rHeaders.GetString( i )); + SvTreeListEntry* pEntry = m_pAddressElementsLB->InsertEntry(rHeaders[i].first); pEntry->SetUserData(reinterpret_cast<void*>((sal_IntPtr)i)); } m_pOK->SetClickHdl(LINK(this, SwCustomizeAddressBlockDialog, OKHdl_Impl)); @@ -878,7 +878,7 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem) long nHBHeight = m_aHeaderHB->CalcWindowSizePixel().Height(); //get the name of the default headers - const ResStringArray& rHeaders = rConfigItem.GetDefaultAddressHeaders(); + const std::vector<std::pair<OUString, int>>& rHeaders = rConfigItem.GetDefaultAddressHeaders(); //get the actual data uno::Reference< XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), uno::UNO_QUERY); //get the name of the actual columns @@ -898,9 +898,9 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem) //fill the controls long nControlWidth = aOutputSize.Width() / 3; long nControlHeight = -1; - for(sal_uInt32 i = 0; i < rHeaders.Count(); ++i) + for (size_t i = 0; i < rHeaders.size(); ++i) { - const OUString rHeader = rHeaders.GetString( i ); + const OUString rHeader = rHeaders[i].first; VclPtr<FixedText> pNewText = VclPtr<FixedText>::Create(m_aWindow.get(), WB_VCENTER); pNewText->SetText("<" + rHeader + ">"); VclPtr<ListBox> pNewLB = VclPtr<ListBox>::Create(m_aWindow.get(), WB_DROPDOWN | WB_VCENTER | WB_TABSTOP); @@ -967,7 +967,7 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem) pNewPreview->Show(); pNewPreview->SetPosPixel(Point(2 * nControlWidth + 6, nMove)); } - m_aVScroll->SetRange(Range(0, rHeaders.Count())); + m_aVScroll->SetRange(Range(0, rHeaders.size())); m_aVScroll->SetPageSize((aOutputSize.Height() - nHBHeight - m_nLBStartTopPos)/ m_nYOffset); m_aVScroll->EnableDrag(); m_aVScroll->SetVisibleSize(m_aVScroll->GetPageSize()); @@ -1223,7 +1223,7 @@ void SwAssignFieldsDialog::dispose() uno::Sequence< OUString > SwAssignFieldsDialog::CreateAssignments() { uno::Sequence< OUString > aAssignments( - m_rConfigItem.GetDefaultAddressHeaders().Count()); + m_rConfigItem.GetDefaultAddressHeaders().size()); OUString* pAssignments = aAssignments.getArray(); sal_Int32 nIndex = 0; for(auto aLBIter = m_pFieldsControl->m_aMatches.begin(); diff --git a/sw/source/ui/dbui/mmaddressblockpage.src b/sw/source/ui/dbui/mmaddressblockpage.src deleted file mode 100644 index aa2f3555e811..000000000000 --- a/sw/source/ui/dbui/mmaddressblockpage.src +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include <dbui.hrc> -#include <helpid.h> - -String ST_TITLE_EDIT -{ - Text [ en-US ] = "Edit Address Block"; -}; - -String ST_TITLE_MALE -{ - Text [ en-US ] = "Custom Salutation (Male Recipients)"; -}; -String ST_TITLE_FEMALE -{ - Text [ en-US ] = "Custom Salutation (Female Recipients)"; -}; -String ST_SALUTATIONELEMENTS -{ - Text[ en-US ] = "Salutation e~lements" ; -}; -String ST_INSERTSALUTATIONFIELD -{ - Text[ en-US ] = "Add to salutation"; -}; -String ST_REMOVESALUTATIONFIELD -{ - Text[ en-US ] = "Remove from salutation"; -}; -String ST_DRAGSALUTATION -{ - Text[ en-US ] = "1. ~Drag salutation elements into the box below" ; -}; -String ST_SALUTATION -{ - Text[ en-US ] = "Salutation"; -}; -String ST_PUNCTUATION -{ - Text[ en-US ] = "Punctuation Mark"; -}; -String ST_TEXT -{ - Text[ en-US ] = "Text"; -}; -StringArray RA_SALUTATION -{ - ItemList [en-US]= - { - < "Dear" ; > ; - < "Hello" ; > ; - < "Hi" ; > ; - }; -}; -StringArray RA_PUNCTUATION -{ - ItemList [en-US]= - { - < "," ; > ; - < ":" ; > ; - < "!" ; > ; - < "(none)" ; > ; - }; -}; - -String ST_SALUTATIONMATCHING -{ - Text[ en-US ] = "Assign the fields from your data source to match the salutation elements." ; -}; - -String ST_SALUTATIONPREVIEW -{ - Text[ en-US ] = "Salutation preview"; -}; - -String ST_ADDRESSELEMENT -{ - Text[ en-US ] = "Address elements" ; -}; - -String ST_SALUTATIONELEMENT -{ - Text[ en-US ] = "Salutation elements" ; -}; - -String ST_MATCHESTO -{ - Text[ en-US ] = "Matches to field:" ; -}; - -String ST_PREVIEW -{ - Text[ en-US ] = "Preview" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 1edd167e825c..a7e7f47fc9f3 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -331,14 +331,14 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame( const OUString rExcludeCountry = rConfigItem.GetExcludeCountry(); bool bSpecialReplacementForCountry = (!bIncludeCountry || !rExcludeCountry.isEmpty()); - const ResStringArray& rHeaders = rConfigItem.GetDefaultAddressHeaders(); + const std::vector<std::pair<OUString, int>>& rHeaders = rConfigItem.GetDefaultAddressHeaders(); Sequence< OUString> aAssignment = rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() ); const OUString* pAssignment = aAssignment.getConstArray(); const OUString sCountryColumn( (aAssignment.getLength() > MM_PART_COUNTRY && !aAssignment[MM_PART_COUNTRY].isEmpty()) ? aAssignment[MM_PART_COUNTRY] - : rHeaders.GetString(MM_PART_COUNTRY)); + : rHeaders[MM_PART_COUNTRY].first); OUString sHideParagraphsExpression; SwAddressIterator aIter(aBlocks[0]); @@ -349,11 +349,11 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame( { OUString sConvertedColumn = aItem.sText; for(sal_uInt32 nColumn = 0; - nColumn < rHeaders.Count() && + nColumn < rHeaders.size() && nColumn < static_cast<sal_uInt32>(aAssignment.getLength()); ++nColumn) { - if (rHeaders.GetString(nColumn) == aItem.sText && + if (rHeaders[nColumn].first == aItem.sText && !pAssignment[nColumn].isEmpty()) { sConvertedColumn = pAssignment[nColumn]; @@ -557,7 +557,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig aFieldMgr.InsertField( aData ); } //now the text has to be inserted - const ResStringArray& rHeaders = rConfigItem.GetDefaultAddressHeaders(); + const std::vector<std::pair<OUString, int>>& rHeaders = rConfigItem.GetDefaultAddressHeaders(); Sequence< OUString> aAssignment = rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() ); const OUString* pAssignment = aAssignment.getConstArray(); @@ -569,11 +569,11 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig { OUString sConvertedColumn = aItem.sText; for(sal_uInt32 nColumn = 0; - nColumn < rHeaders.Count() && + nColumn < rHeaders.size() && nColumn < static_cast<sal_uInt32>(aAssignment.getLength()); ++nColumn) { - if (rHeaders.GetString(nColumn) == aItem.sText && + if (rHeaders[nColumn].first == aItem.sText && !pAssignment[nColumn].isEmpty()) { sConvertedColumn = pAssignment[nColumn]; diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index 03eaa93efb4b..6903eb6bfba0 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -22,6 +22,7 @@ #include <mmconfigitem.hxx> #include <vcl/msgbox.hxx> #include <dbui.hrc> +#include <strings.hrc> #include "bitmaps.hlst" #include <swtypes.hxx> diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 70770c5e98f2..ea064a57ef42 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -69,7 +69,7 @@ #include <helpid.h> #include <doc.hxx> #include <sfx2/app.hxx> -#include <statstr.hrc> +#include <strings.hrc> #include <unomid.h> #include <comphelper/string.hxx> @@ -458,8 +458,8 @@ void SwMMResultEmailDialog::FillInEmailSettings() m_pMailToLB->SelectEntryPos(0); // then select the right one - may not be available - const ResStringArray& rHeaders = xConfigItem->GetDefaultAddressHeaders(); - OUString sEMailColumn = rHeaders.GetString( MM_PART_E_MAIL ); + const std::vector<std::pair<OUString, int>>& rHeaders = xConfigItem->GetDefaultAddressHeaders(); + OUString sEMailColumn = rHeaders[MM_PART_E_MAIL].first; Sequence< OUString> aAssignment = xConfigItem->GetColumnAssignment(xConfigItem->GetCurrentDBData()); if (aAssignment.getLength() > MM_PART_E_MAIL && !aAssignment[MM_PART_E_MAIL].isEmpty()) sEMailColumn = aAssignment[MM_PART_E_MAIL]; diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 7da94798041f..f0e3f3a7c86e 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -32,6 +32,7 @@ #include <unomid.h> #include <dbui.hrc> +#include <strings.hrc> #include <helpid.h> using namespace ::com::sun::star; diff --git a/sw/source/ui/dbui/selectdbtabledialog.src b/sw/source/ui/dbui/selectdbtabledialog.src deleted file mode 100644 index a5c7e403c162..000000000000 --- a/sw/source/ui/dbui/selectdbtabledialog.src +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <dbui.hrc> -#include <helpid.h> - -String ST_NAME -{ - Text [ en-US ] = "Name"; -}; - -String ST_TYPE -{ - Text [ en-US ] = "Type"; -}; - -String ST_TABLE -{ - Text [ en-US ] = "Table"; -}; - -String ST_QUERY -{ - Text [ en-US ] = "Query"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dialog/dialog.src b/sw/source/ui/dialog/dialog.src deleted file mode 100644 index d30bcf8d73fb..000000000000 --- a/sw/source/ui/dialog/dialog.src +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "dialog.hrc" - -String STR_QUERY_SPELL_CONTINUE -{ - Text [ en-US ] = "Continue checking at beginning of document?" ; -}; -String STR_SPELLING_COMPLETED -{ - Text [ en-US ] = "The spellcheck is complete." ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 0a38fa43b0b9..ebfcae266a42 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -31,6 +31,7 @@ #include "swevent.hxx" #include "docsh.hxx" #include "globals.hrc" +#include "strings.hrc" #include "view.hxx" #include <sfx2/viewfrm.hxx> diff --git a/sw/source/ui/dialog/swdialmgr.cxx b/sw/source/ui/dialog/swdialmgr.cxx deleted file mode 100644 index d9c86575cb6e..000000000000 --- a/sw/source/ui/dialog/swdialmgr.cxx +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "dialmgr.hxx" -#include "swtypes.hxx" -#include <tools/resmgr.hxx> - -#ifndef DISABLE_DYNLOADING -ResMgr* pSwResMgr=nullptr; -#else -static ResMgr *pSwResMgr; -#endif - -ResMgr* SwDialogsResMgr::GetResMgr() -{ - if ( !pSwResMgr ) - { - pSwResMgr = ResMgr::CreateResMgr( "sw" ); - } - - return pSwResMgr; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 0840530fe608..06572ad3df92 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -28,10 +28,8 @@ #include "dbui.hrc" #include "globals.hrc" #include "fldui.hrc" -#include "envelp.hrc" -#include "dochdl.hrc" +#include "strings.hrc" #include <index.hrc> -#include <../../uibase/dialog/regionsw.hrc> #include <wordcountdialog.hxx> #include "abstract.hxx" diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx index b53ee82b5921..a54748b0c9ef 100644 --- a/sw/source/ui/dialog/swuiexp.cxx +++ b/sw/source/ui/dialog/swuiexp.cxx @@ -23,7 +23,6 @@ #include "ascfldlg.hxx" #include "break.hxx" #include "convert.hxx" -#include "dialmgr.hxx" #include "dbinsdlg.hxx" #include "DropDownFieldDialog.hxx" #include "fldtdlg.hxx" @@ -53,8 +52,6 @@ namespace swui { if ( !pFactory ) pFactory = new SwAbstractDialogFactory_Impl; - if ( !pSwResMgr) - SwDialogsResMgr::GetResMgr(); return pFactory; } } diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index e04571585bd9..1aa953548264 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -54,8 +54,7 @@ #include <helpid.h> #include <cmdid.h> -#include <../../uibase/dialog/regionsw.hrc> -#include <comcore.hrc> +#include <strings.hrc> #include <globals.hrc> #include "bitmaps.hlst" #include <sfx2/bindings.hxx> diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src deleted file mode 100644 index e2de36634542..000000000000 --- a/sw/source/ui/dochdl/dochdl.src +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "dochdl.hrc" -#include "globals.hrc" - -String STR_NOGLOS -{ - Text [ en-US ] = "AutoText for Shortcut '%1' not found." ; -}; - -String STR_NO_TABLE -{ - Text [ en-US ] = "A table with no rows or no cells cannot be inserted"; -}; - -String STR_TABLE_TOO_LARGE -{ - Text [ en-US ] = "The table cannot be inserted because it is too large"; -}; - -String STR_ERR_INSERT_GLOS -{ - Text [ en-US ] = "AutoText could not be created." ; -}; - -String STR_CLPBRD_FORMAT_ERROR -{ - Text [ en-US ] = "Requested clipboard format is not available." ; -}; - -String STR_PRIVATETEXT -{ - Text [ en-US ] = "%PRODUCTNAME Writer" ; -}; -String STR_PRIVATEGRAPHIC -{ - Text [ en-US ] = "Image [%PRODUCTNAME Writer]" ; -}; -String STR_PRIVATEOLE -{ - Text [ en-US ] = "Object [%PRODUCTNAME Writer]" ; -}; -String STR_DDEFORMAT -{ - Text [ en-US ] = "DDE link" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dochdl/selglos.cxx b/sw/source/ui/dochdl/selglos.cxx index 2332d2a7e2aa..dd70fbdada59 100644 --- a/sw/source/ui/dochdl/selglos.cxx +++ b/sw/source/ui/dochdl/selglos.cxx @@ -21,7 +21,7 @@ #include "selglos.hxx" -#include "dochdl.hrc" +#include "strings.hrc" #include <vcl/layout.hxx> SwSelGlossaryDlg::SwSelGlossaryDlg(vcl::Window * pParent, const OUString &rShortName) diff --git a/sw/source/ui/docvw/access.src b/sw/source/ui/docvw/access.src deleted file mode 100644 index 39cfd246a52d..000000000000 --- a/sw/source/ui/docvw/access.src +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "access.hrc" - -String STR_ACCESS_DOC_NAME -{ - Text [ en-US ] = "Document view"; -}; -String STR_ACCESS_DOC_DESC -{ - Text [ en-US ] = "Document view"; -}; -String STR_ACCESS_HEADER_NAME -{ - Text [ en-US ] = "Header $(ARG1)"; -}; -String STR_ACCESS_HEADER_DESC -{ - Text [ en-US ] = "Header page $(ARG1)"; -}; -String STR_ACCESS_FOOTER_NAME -{ - Text [ en-US ] = "Footer $(ARG1)"; -}; -String STR_ACCESS_FOOTER_DESC -{ - Text [ en-US ] = "Footer page $(ARG1)"; -}; -String STR_ACCESS_FOOTNOTE_NAME -{ - Text [ en-US ] = "Footnote $(ARG1)"; -}; -String STR_ACCESS_FOOTNOTE_DESC -{ - Text [ en-US ] = "Footnote $(ARG1)"; -}; -String STR_ACCESS_ENDNOTE_NAME -{ - Text [ en-US ] = "Endnote $(ARG1)"; -}; -String STR_ACCESS_ENDNOTE_DESC -{ - Text [ en-US ] = "Endnote $(ARG1)"; -}; -String STR_ACCESS_TABLE_DESC -{ - Text [ en-US ] = "$(ARG1) on page $(ARG2)"; -}; -String STR_ACCESS_PAGE_NAME -{ - Text [ en-US ] = "Page $(ARG1)"; -}; -String STR_ACCESS_PAGE_DESC -{ - Text [ en-US ] = "Page: $(ARG1)"; -}; -String STR_ACCESS_ANNOTATION_AUTHOR_NAME -{ - Text [ en-US ] = "Author"; -}; -String STR_ACCESS_ANNOTATION_DATE_NAME -{ - Text [ en-US ] = "Date"; -}; -String STR_ACCESS_ANNOTATION_BUTTON_NAME -{ - Text [ en-US ] = "Actions"; -}; -String STR_ACCESS_ANNOTATION_BUTTON_DESC -{ - Text [ en-US ] = "Activate this button to open a list of actions which can be performed on this comment and other comments"; -}; - -String STR_ACCESS_PREVIEW_DOC_NAME -{ - Text [ en-US ] = "Document preview"; -}; -String STR_ACCESS_PREVIEW_DOC_SUFFIX -{ - Text [ en-US ] = "(Preview mode)"; -}; -String STR_ACCESS_DOC_WORDPROCESSING -{ - Text [ en-US ] = "%PRODUCTNAME Document"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/docvw/annotation.src b/sw/source/ui/docvw/annotation.src deleted file mode 100644 index c47afa14f364..000000000000 --- a/sw/source/ui/docvw/annotation.src +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "annotation.hrc" -#include "cmdid.h" - -String STR_DELETE_ALL_NOTES -{ - Text [ en-US ] = "All Comments" ; -}; - -String STR_FORMAT_ALL_NOTES -{ - Text [ en-US ] = "All Comments" ; -}; - -String STR_DELETE_AUTHOR_NOTES -{ - Text [ en-US ] = "Comments by " ; -}; - -String STR_NODATE -{ - Text [ en-US ] = "(no date)" ; -}; - -String STR_NOAUTHOR -{ - Text [ en-US ] = "(no author)" ; -}; - -String STR_REPLY -{ - Text [ en-US ] = "Reply to $1" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/envelp/envelp.src b/sw/source/ui/envelp/envelp.src deleted file mode 100644 index c24421399c75..000000000000 --- a/sw/source/ui/envelp/envelp.src +++ /dev/null @@ -1,28 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "envelp.hrc" -#include "globals.hrc" - -String STR_SENDER_TOKENS -{ - Text [ en-US ] = "COMPANY;CR;FIRSTNAME; ;LASTNAME;CR;ADDRESS;CR;CITY; ;STATEPROV; ;POSTALCODE;CR;COUNTRY;CR;"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src deleted file mode 100644 index b7123b1f4380..000000000000 --- a/sw/source/ui/envelp/label.src +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "label.hrc" -#include "globals.hrc" -#include "helpid.h" - -String STR_CUSTOM -{ - Text [ en-US ] = "[User]"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index eee6e2302ddb..804292b1749c 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -34,7 +34,7 @@ #include <cmdid.h> #include <helpid.h> #include <globals.hrc> -#include <../../uibase/envelp/label.hrc> +#include <strings.hrc> #include <envimg.hxx> void SwLabRec::SetFromItem( const SwLabItem& rItem ) @@ -130,7 +130,7 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet, // Read user label from writer.cfg SwLabItem aItem(static_cast<const SwLabItem&>(rSet.Get( FN_LABEL ))); std::unique_ptr<SwLabRec> pRec(new SwLabRec); - pRec->aMake = pRec->aType = SwResId( STR_CUSTOM ); + pRec->aMake = pRec->aType = SwResId(STR_CUSTOM_LABEL); pRec->SetFromItem( aItem ); bool bDouble = false; @@ -201,7 +201,7 @@ SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, bool bCont) { SwLabRec* pRec = nullptr; bool bFound = false; - const OUString sCustom(SwResId(STR_CUSTOM)); + const OUString sCustom(SwResId(STR_CUSTOM_LABEL)); const size_t nCount = Recs().size(); for (size_t i = 0; i < nCount; ++i) @@ -377,7 +377,7 @@ IMPL_LINK_NOARG(SwLabPage, MakeHdl, ListBox&, void) const size_t nCount = GetParentSwLabDlg()->Recs().size(); size_t nLstType = 0; - const OUString sCustom(SwResId(STR_CUSTOM)); + const OUString sCustom(SwResId(STR_CUSTOM_LABEL)); //insert the entries into the sorted list box for ( size_t i = 0; i < nCount; ++i ) { diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index b9ff4bb54257..6474089ffd3b 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -32,8 +32,7 @@ #include "labfmt.hxx" #include "uitool.hxx" -#include "../../uibase/envelp/label.hrc" -#include "labfmt.hrc" +#include "strings.hrc" #include <unomid.h> using namespace utl; @@ -503,7 +502,7 @@ void SwLabFormatPage::FillItem(SwLabItem& rItem) { if (bModified) { - rItem.m_aMake = rItem.m_aType = SwResId(STR_CUSTOM); + rItem.m_aMake = rItem.m_aType = SwResId(STR_CUSTOM_LABEL); SwLabRec& rRec = *GetParentSwLabDlg()->Recs()[0]; rItem.m_lHDist = rRec.lHDist = static_cast< long >(GETFLDVAL(*m_pHDistField )); diff --git a/sw/source/ui/envelp/labfmt.hrc b/sw/source/ui/envelp/labfmt.hrc deleted file mode 100644 index 2aa9340b41a0..000000000000 --- a/sw/source/ui/envelp/labfmt.hrc +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UI_ENVELP_LABFMT_HRC -#define INCLUDED_SW_SOURCE_UI_ENVELP_LABFMT_HRC - -#include "envelp.hrc" - -// global resources ******************************************************** - -#define STR_HDIST (RC_LABFMT_BEGIN + 1) -#define STR_VDIST (RC_LABFMT_BEGIN + 2) -#define STR_WIDTH (RC_LABFMT_BEGIN + 3) -#define STR_HEIGHT (RC_LABFMT_BEGIN + 4) -#define STR_LEFT (RC_LABFMT_BEGIN + 5) -#define STR_UPPER (RC_LABFMT_BEGIN + 6) -#define STR_COLS (RC_LABFMT_BEGIN + 7) -#define STR_ROWS (RC_LABFMT_BEGIN + 8) - -// overflow check ******************************************************** - -#define LABFMT_ACT_END STR_ROWS - -#if LABFMT_ACT_END > RC_LABFMT_END -#error Resource overflow in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src deleted file mode 100644 index d72efc34ab7c..000000000000 --- a/sw/source/ui/envelp/labfmt.src +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "labfmt.hrc" -#include "helpid.h" - -String STR_HDIST -{ - Text [ en-US ] = "H. Pitch" ; -}; -String STR_VDIST -{ - Text [ en-US ] = "V. Pitch" ; -}; -String STR_WIDTH -{ - Text [ en-US ] = "Width" ; -}; -String STR_HEIGHT -{ - Text [ en-US ] = "Height" ; -}; -String STR_LEFT -{ - Text [ en-US ] = "Left margin" ; -}; -String STR_UPPER -{ - Text [ en-US ] = "Top margin" ; -}; -String STR_COLS -{ - Text [ en-US ] = "Columns" ; -}; -String STR_ROWS -{ - Text [ en-US ] = "Rows" ; -}; -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index ac5c6b6b128c..3d694efd76f5 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -37,7 +37,6 @@ #include <swmodule.hxx> #include <modcfg.hxx> #include <mailmergehelper.hxx> -#include <envelp.hrc> #include <mailmrge.hxx> #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index c72019ece137..3f57f26562d5 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -40,7 +40,7 @@ #include <fldui.hrc> #include <globals.hrc> -#include <utlui.hrc> +#include <strings.hrc> #include "bitmaps.hlst" #include <unomid.h> diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 0295644857f3..8e587a072ada 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -27,6 +27,7 @@ #include <helpid.h> #include <swtypes.hxx> #include <globals.hrc> +#include <strings.hrc> #include <fldbas.hxx> #include <docufld.hxx> #include <wrtsh.hxx> @@ -160,7 +161,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* ) if( rProperties.getLength() ) { - pInfo = m_pTypeTLB->InsertEntry( SwResId( STR_CUSTOM ) ); + pInfo = m_pTypeTLB->InsertEntry(SwResId(STR_CUSTOM_FIELD)); pInfo->SetUserData(reinterpret_cast<void*>(USHRT_MAX)); for (sal_Int32 n=0; n < rProperties.getLength(); n++) diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 35c7df610a71..282103b90e12 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -21,6 +21,7 @@ #include <flddat.hxx> #include <docufld.hxx> #include <globals.hrc> +#include <strings.hrc> #include <chpfld.hxx> #include <fldui.hrc> #include <flddok.hxx> @@ -467,27 +468,27 @@ IMPL_LINK_NOARG(SwFieldDokPage, SubTypeHdl, ListBox&, void) const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pSelectionLB->GetEntryData(nPos)); FillFormatLB(nTypeId); - sal_uInt32 nTextRes = 0; + const char* pTextRes = nullptr; switch (nTypeId) { case TYP_CHAPTERFLD: - nTextRes = STR_LEVEL; + pTextRes = STR_LEVEL; break; case TYP_PREVPAGEFLD: case TYP_NEXTPAGEFLD: - nTextRes = SVX_NUM_CHAR_SPECIAL == (sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatLB->GetEntryData( + pTextRes = SVX_NUM_CHAR_SPECIAL == (sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatLB->GetEntryData( m_pFormatLB->GetSelectEntryPos() )) ? STR_VALUE : STR_OFFSET; break; case TYP_PAGENUMBERFLD: - nTextRes = STR_OFFSET; + pTextRes = STR_OFFSET; break; } - if( nTextRes ) - m_pValueFT->SetText( SwResId( nTextRes )); + if (pTextRes) + m_pValueFT->SetText(SwResId(pTextRes)); } sal_Int32 SwFieldDokPage::FillFormatLB(sal_uInt16 nTypeId) diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 5b5a1a3b280f..10843305d963 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -23,6 +23,7 @@ #include <docsh.hxx> #include <swtypes.hxx> #include <globals.hrc> +#include <strings.hrc> #include <fldbas.hxx> #include <docufld.hxx> #include <view.hxx> @@ -210,6 +211,15 @@ void SwFieldFuncPage::Reset(const SfxItemSet* ) } } +static const char* FMT_MARK_ARY[] = +{ + FMT_MARK_TEXT, + FMT_MARK_TABLE, + FMT_MARK_FRAME, + FMT_MARK_GRAFIC, + FMT_MARK_OLE +}; + IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, ListBox&, void) { // save old ListBoxPos @@ -245,7 +255,7 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, ListBox&, void) if (nSize) { if (IsFieldEdit() && nTypeId == TYP_JUMPEDITFLD) - m_pFormatLB->SelectEntry(SwResId(FMT_MARK_BEGIN + GetCurField()->GetFormat())); + m_pFormatLB->SelectEntry(SwResId(FMT_MARK_ARY[GetCurField()->GetFormat()])); if (!m_pFormatLB->GetSelectEntryCount()) m_pFormatLB->SelectEntryPos(0); diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index bf4e837362ad..9813ad78930f 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -28,6 +28,7 @@ #include <fldui.hrc> #include <globals.hrc> +#include <strings.hrc> #include <SwNodeNum.hxx> #include <IDocumentMarkAccess.hxx> #include <ndtxt.hxx> @@ -739,6 +740,36 @@ bool SwFieldRefPage::MatchSubstring( const OUString& rListString, const OUString return aListString.indexOf(aSubstr) >= 0; } +enum FMT_REF_IDX +{ + FMT_REF_PAGE_IDX = 0, + FMT_REF_CHAPTER_IDX = 1, + FMT_REF_TEXT_IDX = 2, + FMT_REF_UPDOWN_IDX = 3, + FMT_REF_PAGE_PGDSC_IDX = 4, + FMT_REF_ONLYNUMBER_IDX = 5, + FMT_REF_ONLYCAPTION_IDX = 6, + FMT_REF_ONLYSEQNO_IDX = 7, + FMT_REF_NUMBER_IDX = 8, + FMT_REF_NUMBER_NO_CONTEXT_IDX = 9, + FMT_REF_NUMBER_FULL_CONTEXT_IDX = 10 +}; + +static const char* FMT_REF_ARY[] = +{ + FMT_REF_PAGE, + FMT_REF_CHAPTER, + FMT_REF_TEXT, + FMT_REF_UPDOWN, + FMT_REF_PAGE_PGDSC, + FMT_REF_ONLYNUMBER, + FMT_REF_ONLYCAPTION, + FMT_REF_ONLYSEQNO, + FMT_REF_NUMBER, + FMT_REF_NUMBER_NO_CONTEXT, + FMT_REF_NUMBER_FULL_CONTEXT +}; + sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId) { OUString sOldSel; @@ -765,7 +796,7 @@ sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId) case REFFLDFLAG_BOOKMARK: case REFFLDFLAG_FOOTNOTE: case REFFLDFLAG_ENDNOTE: - nSize = FMT_REF_PAGE_PGDSC - FMT_REF_BEGIN + 1; + nSize = FMT_REF_PAGE_PGDSC_IDX + 1; break; default: @@ -773,7 +804,7 @@ sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId) if ( REFFLDFLAG & nTypeId ) { - nSize = FMT_REF_ONLYSEQNO - FMT_REF_BEGIN + 1; + nSize = FMT_REF_ONLYSEQNO_IDX + 1; } else { @@ -793,13 +824,13 @@ sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId) // #i83479# if ( bAddCrossRefFormats ) { - sal_uInt16 nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN; + sal_uInt16 nFormat = FMT_REF_NUMBER_IDX; sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr( nTypeId, nFormat )); m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFieldMgr().GetFormatId( nTypeId, nFormat ))); - nFormat = FMT_REF_NUMBER_NO_CONTEXT - FMT_REF_BEGIN; + nFormat = FMT_REF_NUMBER_NO_CONTEXT_IDX; nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr( nTypeId, nFormat )); m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFieldMgr().GetFormatId( nTypeId, nFormat ))); - nFormat = FMT_REF_NUMBER_FULL_CONTEXT - FMT_REF_BEGIN; + nFormat = FMT_REF_NUMBER_FULL_CONTEXT_IDX; nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr( nTypeId, nFormat )); m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFieldMgr().GetFormatId( nTypeId, nFormat ))); nSize += 3; @@ -811,7 +842,7 @@ sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId) if (!IsFieldEdit()) m_pFormatLB->SelectEntry(sOldSel); else - m_pFormatLB->SelectEntry(SwResId(FMT_REF_BEGIN + GetCurField()->GetFormat())); + m_pFormatLB->SelectEntry(SwResId(FMT_REF_ARY[GetCurField()->GetFormat()])); if (!m_pFormatLB->GetSelectEntryCount()) { diff --git a/sw/source/ui/fldui/fldui.src b/sw/source/ui/fldui/fldui.src deleted file mode 100644 index a3642cd4f9e7..000000000000 --- a/sw/source/ui/fldui/fldui.src +++ /dev/null @@ -1,609 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "index.hrc" -#include "fldui.hrc" -#include "helpid.h" - -/*-------------------------------------------------------------------- - Description: strings for the types - --------------------------------------------------------------------*/ - - // range document - -String STR_DATEFLD -{ - Text [ en-US ] = "Date" ; -}; -String STR_TIMEFLD -{ - Text [ en-US ] = "Time" ; -}; -String STR_FILENAMEFLD -{ - Text [ en-US ] = "File name" ; -}; -String STR_DBNAMEFLD -{ - Text [ en-US ] = "Database Name" ; -}; -String STR_CHAPTERFLD -{ - Text [ en-US ] = "Chapter" ; -}; -String STR_PAGENUMBERFLD -{ - Text [ en-US ] = "Page numbers" ; -}; -String STR_DOCSTATFLD -{ - Text [ en-US ] = "Statistics" ; -}; -String STR_AUTHORFLD -{ - Text [ en-US ] = "Author" ; -}; -String STR_TEMPLNAMEFLD -{ - Text [ en-US ] = "Templates" ; -}; -String STR_EXTUSERFLD -{ - Text [ en-US ] = "Sender" ; -}; - - // range functions - -String STR_SETFLD -{ - Text [ en-US ] = "Set variable" ; -}; -String STR_GETFLD -{ - Text [ en-US ] = "Show variable" ; -}; -String STR_FORMELFLD -{ - Text [ en-US ] = "Insert Formula" ; -}; -String STR_INPUTFLD -{ - Text [ en-US ] = "Input field" ; -}; -String STR_SETINPUTFLD -{ - Text [ en-US ] = "Input field (variable)" ; -}; -String STR_USRINPUTFLD -{ - Text [ en-US ] = "Input field (user)" ; -}; -String STR_CONDTXTFLD -{ - Text [ en-US ] = "Conditional text" ; -}; -String STR_DDEFLD -{ - Text [ en-US ] = "DDE field" ; -}; -String STR_MACROFLD -{ - Text [ en-US ] = "Execute macro" ; -}; -String STR_SEQFLD -{ - Text [ en-US ] = "Number range" ; -}; -String STR_SETREFPAGEFLD -{ - Text [ en-US ] = "Set page variable" ; -}; -String STR_GETREFPAGEFLD -{ - Text [ en-US ] = "Show page variable" ; -}; -String STR_INTERNETFLD -{ - Text [ en-US ] = "Load URL" ; -}; -String STR_JUMPEDITFLD -{ - Text [ en-US ] = "Placeholder" ; -}; -String STR_COMBINED_CHARS -{ - Text [ en-US ] = "Combine characters"; -}; -String STR_DROPDOWN -{ - Text [ en-US ] = "Input list" ; -}; - - // range references - -String STR_SETREFFLD -{ - Text [ en-US ] = "Set Reference" ; -}; -String STR_GETREFFLD -{ - Text [ en-US ] = "Insert Reference" ; -}; - - // range database - -String STR_DBFLD -{ - Text [ en-US ] = "Mail merge fields" ; -}; -String STR_DBNEXTSETFLD -{ - Text [ en-US ] = "Next record" ; -}; -String STR_DBNUMSETFLD -{ - Text [ en-US ] = "Any record" ; -}; -String STR_DBSETNUMBERFLD -{ - Text [ en-US ] = "Record number" ; -}; -String STR_PREVPAGEFLD -{ - Text [ en-US ] = "Previous page" ; -}; -String STR_NEXTPAGEFLD -{ - Text [ en-US ] = "Next page" ; -}; -String STR_HIDDENTXTFLD -{ - Text [ en-US ] = "Hidden text" ; -}; - - // range user fields - -String STR_USERFLD -{ - Text [ en-US ] = "User Field" ; -}; -String STR_POSTITFLD -{ - Text [ en-US ] = "Note" ; -}; -String STR_SCRIPTFLD -{ - Text [ en-US ] = "Script" ; -}; -String STR_AUTHORITY -{ - Text [ en-US ] = "Bibliography entry"; -}; -String STR_HIDDENPARAFLD -{ - Text [ en-US ] = "Hidden Paragraph" ; -}; - - // range DocumentInfo - -String STR_DOCINFOFLD -{ - Text [ en-US ] = "DocInformation" ; -}; -/*-------------------------------------------------------------------- - Description: SubCmd-Strings - --------------------------------------------------------------------*/ -String FLD_DATE_STD -{ - Text [ en-US ] = "Date"; -}; -String FLD_DATE_FIX -{ - Text [ en-US ] = "Date (fixed)" ; -}; -String FLD_TIME_STD -{ - Text [ en-US ] = "Time"; -}; -String FLD_TIME_FIX -{ - Text [ en-US ] = "Time (fixed)" ; -}; - - // SubCmd Statistic - -String FLD_STAT_TABLE -{ - Text [ en-US ] = "Tables" ; -}; -String FLD_STAT_CHAR -{ - Text [ en-US ] = "Characters" ; -}; -String FLD_STAT_WORD -{ - Text [ en-US ] = "Words" ; -}; -String FLD_STAT_PARA -{ - Text [ en-US ] = "Paragraphs" ; -}; -String FLD_STAT_GRF -{ - Text [ en-US ] = "Image" ; -}; -String FLD_STAT_OBJ -{ - Text [ en-US ] = "Objects" ; -}; -String FLD_STAT_PAGE -{ - Text [ en-US ] = "Pages" ; -}; - // SubCmd DDETypes - -String FMT_DDE_HOT -{ - Text [ en-US ] = "DDE automatic" ; -}; -String FMT_DDE_NORMAL -{ - Text [ en-US ] = "DDE manual" ; -}; -String FLD_INPUT_TEXT -{ - Text = "[Text]" ; -}; -/*-------------------------------------------------------------------- - Description: SubType Extuser - --------------------------------------------------------------------*/ -String FLD_EU_FIRMA -{ - Text [ en-US ] = "Company" ; -}; -String FLD_EU_VORNAME -{ - Text [ en-US ] = "First Name" ; -}; -String FLD_EU_NAME -{ - Text [ en-US ] = "Last Name" ; -}; -String FLD_EU_ABK -{ - Text [ en-US ] = "Initials" ; -}; -String FLD_EU_STRASSE -{ - Text [ en-US ] = "Street" ; -}; -String FLD_EU_LAND -{ - Text [ en-US ] = "Country" ; -}; -String FLD_EU_PLZ -{ - Text [ en-US ] = "Zip code" ; -}; -String FLD_EU_ORT -{ - Text [ en-US ] = "City" ; -}; -String FLD_EU_TITEL -{ - Text [ en-US ] = "Title" ; -}; -String FLD_EU_POS -{ - Text [ en-US ] = "Position" ; -}; -String FLD_EU_TELPRIV -{ - Text [ en-US ] = "Tel. (Home)" ; -}; -String FLD_EU_TELFIRMA -{ - Text [ en-US ] = "Tel. (Work)" ; -}; -String FLD_EU_FAX -{ - Text [ en-US ] = "FAX" ; -}; -String FLD_EU_EMAIL -{ - Text [ en-US ] = "E-mail" ; -}; -String FLD_EU_STATE -{ - Text [ en-US ] = "State" ; -}; -String FLD_PAGEREF_OFF -{ - Text [ en-US ] = "off" ; -}; -String FLD_PAGEREF_ON -{ - Text [ en-US ] = "on" ; -}; -/*-------------------------------------------------------------------- - Description: path name - --------------------------------------------------------------------*/ - // Formate FileName -String FMT_FF_NAME -{ - Text [ en-US ] = "File name" ; -}; -String FMT_FF_NAME_NOEXT -{ - Text [ en-US ] = "File name without extension" ; -}; -String FMT_FF_PATHNAME -{ - Text [ en-US ] = "Path/File name" ; -}; -String FMT_FF_PATH -{ - Text [ en-US ] = "Path" ; -}; -String FMT_FF_UI_NAME -{ - Text [ en-US ] = "Style" ; -}; -String FMT_FF_UI_RANGE -{ - Text [ en-US ] = "Category" ; -}; -/*-------------------------------------------------------------------- - Description: format chapter - --------------------------------------------------------------------*/ -String FMT_CHAPTER_NAME -{ - Text [ en-US ] = "Chapter name" ; -}; -String FMT_CHAPTER_NO -{ - Text [ en-US ] = "Chapter number" ; -}; -String FMT_CHAPTER_NO_NOSEPARATOR -{ - Text [ en-US ] = "Chapter number without separator" ; -}; -String FMT_CHAPTER_NAMENO -{ - Text [ en-US ] = "Chapter number and name" ; -}; -/*-------------------------------------------------------------------- - Description: formats - --------------------------------------------------------------------*/ -String FMT_NUM_ABC -{ - Text = "A B C" ; -}; -String FMT_NUM_SABC -{ - Text = "a b c" ; -}; -String FMT_NUM_ABC_N -{ - Text = "A .. AA .. AAA" ; -}; -String FMT_NUM_SABC_N -{ - Text = "a .. aa .. aaa" ; -}; -String FMT_NUM_ROMAN -{ - Text [ en-US ] = "Roman (I II III)" ; -}; -String FMT_NUM_SROMAN -{ - Text [ en-US ] = "Roman (i ii iii)" ; -}; -String FMT_NUM_ARABIC -{ - Text [ en-US ] = "Arabic (1 2 3)" ; -}; -String FMT_NUM_PAGEDESC -{ - Text [ en-US ] = "As Page Style" ; -}; -String FMT_NUM_PAGESPECIAL -{ - Text [ en-US ] = "Text" ; -}; -/*-------------------------------------------------------------------- - Description: Author - --------------------------------------------------------------------*/ -String FMT_AUTHOR_NAME -{ - Text [ en-US ] = "Name" ; -}; -String FMT_AUTHOR_SCUT -{ - Text [ en-US ] = "Initials" ; -}; -/*-------------------------------------------------------------------- - Description: set variable - --------------------------------------------------------------------*/ -String FMT_SETVAR_SYS -{ - Text [ en-US ] = "System" ; -}; -String FMT_SETVAR_TEXT -{ - Text [ en-US ] = "Text" ; -}; -String FMT_GETVAR_NAME -{ - Text [ en-US ] = "Name" ; -}; -String FMT_GETVAR_TEXT -{ - Text [ en-US ] = "Text" ; -}; -String FMT_USERVAR_CMD -{ - Text [ en-US ] = "Formula" ; -}; -String FMT_USERVAR_TEXT -{ - Text [ en-US ] = "Text" ; -}; -String FMT_DBFLD_DB -{ - Text [ en-US ] = "Database" ; -}; -String FMT_DBFLD_SYS -{ - Text [ en-US ] = "System" ; -}; -/*-------------------------------------------------------------------- - Description: storage fields - --------------------------------------------------------------------*/ -String FMT_REG_AUTHOR -{ - Text [ en-US ] = "Author" ; -}; -String FMT_REG_TIME -{ - Text [ en-US ] = "Time" ; -}; -String FMT_REG_DATE -{ - Text [ en-US ] = "Date" ; -}; -/*-------------------------------------------------------------------- - Description: formats references - --------------------------------------------------------------------*/ -String FMT_REF_TEXT -{ - Text [ en-US ] = "Reference" ; -}; -String FMT_REF_PAGE -{ - Text [ en-US ] = "Page" ; -}; -String FMT_REF_CHAPTER -{ - Text [ en-US ] = "Chapter" ; -}; -String FMT_REF_UPDOWN -{ - Text [ en-US ] = "Above/Below" ; -}; -String FMT_REF_PAGE_PGDSC -{ - Text [ en-US ] = "As Page Style" ; -}; -String FMT_REF_ONLYNUMBER -{ - Text [ en-US ] = "Category and Number" ; -}; -String FMT_REF_ONLYCAPTION -{ - Text [ en-US ] = "Caption Text" ; -}; -String FMT_REF_ONLYSEQNO -{ - Text [ en-US ] = "Numbering"; -}; -String FMT_REF_NUMBER -{ - Text [ en-US ] = "Number"; -}; -String FMT_REF_NUMBER_NO_CONTEXT -{ - Text [ en-US ] = "Number (no context)"; -}; -String FMT_REF_NUMBER_FULL_CONTEXT -{ - Text [ en-US ] = "Number (full context)"; -}; -/*-------------------------------------------------------------------- - Description: placeholder - --------------------------------------------------------------------*/ -String FMT_MARK_TEXT -{ - Text [ en-US ] = "Text" ; -}; -String FMT_MARK_TABLE -{ - Text [ en-US ] = "Table" ; -}; -String FMT_MARK_FRAME -{ - Text [ en-US ] = "Frame" ; -}; -String FMT_MARK_GRAFIC -{ - Text [ en-US ] = "Image" ; -}; -String FMT_MARK_OLE -{ - Text [ en-US ] = "Object" ; -}; -/*-------------------------------------------------------------------- - Description: ExchangeStrings for Edit/NameFT - --------------------------------------------------------------------*/ -String STR_COND -{ - Text [ en-US ] = "~Condition" ; -}; -String STR_TEXT -{ - Text [ en-US ] = "Then, Else" ; -}; -String STR_DDE_CMD -{ - Text [ en-US ] = "DDE Statement" ; -}; -String STR_INSTEXT -{ - Text [ en-US ] = "Hidden t~ext" ; -}; -String STR_MACNAME -{ - Text [ en-US ] = "~Macro name" ; -}; -String STR_PROMPT -{ - Text [ en-US ] = "~Reference" ; -}; -String STR_COMBCHRS_FT -{ - Text [ en-US ] = "Ch~aracters"; -}; -String STR_OFFSET -{ - Text [ en-US ] = "O~ffset" ; -}; -String STR_VALUE -{ - Text [ en-US ] = "Value" ; -}; -String STR_FORMULA -{ - Text [ en-US ] = "Formula" ; -}; -String STR_CUSTOM -{ - Text [ en-US ] = "Custom" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index a421c24d6e93..f6fe754e0e65 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -34,6 +34,7 @@ #include <calc.hxx> #include <svl/zformat.hxx> #include <globals.hrc> +#include <strings.hrc> #include <fldui.hrc> #define USER_DATA_VERSION_1 "1" diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index 6f0076ded866..c71cdbcb13a7 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -35,6 +35,7 @@ #include <fldui.hrc> #include <globals.hrc> +#include <strings.hrc> using namespace ::com::sun::star; diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 84431a85e5e6..7d6c16e23b02 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -24,6 +24,7 @@ #include "hintids.hxx" #include <svx/dialogs.hrc> #include <svx/dialmgr.hxx> +#include <svx/strings.hrc> #include <sfx2/htmlmode.hxx> #include <svx/colorbox.hxx> #include <svx/xtable.hxx> @@ -58,12 +59,12 @@ #include "prcntfld.hxx" #include "paratr.hxx" #include "frmui.hrc" -#include "poolfmt.hrc" +#include "strings.hrc" #include <section.hxx> #include <docary.hxx> #include <pagedesc.hxx> -#include "access.hrc" +#include "strings.hrc" //to match associated data in ColumnPage.ui #define LISTBOX_SELECTION 0 diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 424cdf7d5c58..4a80bfb85f5b 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -44,6 +44,7 @@ #include "initui.hxx" #include <frmui.hrc> #include <globals.hrc> +#include <strings.hrc> #include <SwStyleNameMapper.hxx> using namespace ::com::sun::star; diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 19d81ef64a44..1a7906ce2b4b 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -35,6 +35,7 @@ #include <frmui.hrc> #include <globals.hrc> +#include <strings.hrc> #include <svx/svxids.hrc> #include <svx/flagsdef.hxx> #include <svx/svxdlg.hxx> @@ -78,7 +79,7 @@ SwFrameDlg::SwFrameDlg( SfxViewFrame* pViewFrame, if(pStr) { - SetText(GetText() + SwResId(STR_COLL_HEADER) + *pStr + ")"); + SetText(GetText() + SwResId(STR_FRMUI_COLL_HEADER) + *pStr + ")"); } m_nStdId = AddTabPage("type", SwFramePage::Create, nullptr); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index b6ffbe1dd6ab..4c914dd67a63 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -62,6 +62,7 @@ #include <sal/macros.h> #include <frmui.hrc> +#include <strings.hrc> #include <sfx2/filedlghelper.hxx> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/XFilePicker2.hpp> @@ -814,7 +815,7 @@ void SwFramePage::setOptimalFrameWidth() for (std::vector<SvxSwFramePosString::StringId>::const_iterator aI = aFrames.begin(), aEnd = aFrames.end(); aI != aEnd; ++aI) { - m_pHorizontalDLB->InsertEntry(m_aFramePosString.GetString(*aI)); + m_pHorizontalDLB->InsertEntry(SvxSwFramePosString::GetString(*aI)); } Size aBiggest(m_pHorizontalDLB->GetOptimalSize()); @@ -855,7 +856,7 @@ void SwFramePage::setOptimalRelWidth() for (std::vector<SvxSwFramePosString::StringId>::const_iterator aI = aRels.begin(), aEnd = aRels.end(); aI != aEnd; ++aI) { - m_pHoriRelationLB->InsertEntry(m_aFramePosString.GetString(*aI)); + m_pHoriRelationLB->InsertEntry(SvxSwFramePosString::GetString(*aI)); } Size aBiggest(m_pHoriRelationLB->GetOptimalSize()); @@ -956,9 +957,9 @@ void SwFramePage::Reset( const SfxItemSet *rSet ) else { if ( m_bNew ) - SetText( SwResId(STR_OLE_INSERT)); + SetText(SwResId(STR_FRMUI_OLE_INSERT)); else - SetText( SwResId(STR_OLE_EDIT)); + SetText(SwResId(STR_FRMUI_OLE_EDIT)); } } else @@ -974,8 +975,8 @@ void SwFramePage::Reset( const SfxItemSet *rSet ) const SwFormatFrameSize& rFrameSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE)); - m_pRelWidthRelationLB->InsertEntry(m_aFramePosString.GetString(SwFPos::FRAME)); - m_pRelWidthRelationLB->InsertEntry(m_aFramePosString.GetString(SwFPos::REL_PG_FRAME)); + m_pRelWidthRelationLB->InsertEntry(SvxSwFramePosString::GetString(SwFPos::FRAME)); + m_pRelWidthRelationLB->InsertEntry(SvxSwFramePosString::GetString(SwFPos::REL_PG_FRAME)); if (rFrameSize.GetWidthPercent() != SwFormatFrameSize::SYNCED && rFrameSize.GetWidthPercent() != 0) { //calculate the rerference value from the with and relative width values @@ -987,8 +988,8 @@ void SwFramePage::Reset( const SfxItemSet *rSet ) else m_pRelWidthRelationLB->Disable(); - m_pRelHeightRelationLB->InsertEntry(m_aFramePosString.GetString(SwFPos::FRAME)); - m_pRelHeightRelationLB->InsertEntry(m_aFramePosString.GetString(SwFPos::REL_PG_FRAME)); + m_pRelHeightRelationLB->InsertEntry(SvxSwFramePosString::GetString(SwFPos::FRAME)); + m_pRelHeightRelationLB->InsertEntry(SvxSwFramePosString::GetString(SwFPos::REL_PG_FRAME)); if (rFrameSize.GetHeightPercent() != SwFormatFrameSize::SYNCED && rFrameSize.GetHeightPercent() != 0) { //calculate the rerference value from the with and relative width values @@ -1425,7 +1426,7 @@ sal_Int32 SwFramePage::FillPosLB(const FrameMap* _pMap, m_bIsVerticalFrame, m_bIsVerticalL2R, m_bIsInRightToLeft); - OUString sEntry(m_aFramePosString.GetString(eStrId)); + OUString sEntry(SvxSwFramePosString::GetString(eStrId)); if (_rLB.GetEntryPos(sEntry) == LISTBOX_ENTRY_NOTFOUND) { // don't insert entries when frames are character bound @@ -1490,7 +1491,7 @@ void SwFramePage::FillRelLB( const FrameMap* _pMap, m_bIsVerticalFrame, m_bIsVerticalL2R, m_bIsInRightToLeft); - const OUString sEntry = m_aFramePosString.GetString(sStrId1); + const OUString sEntry = SvxSwFramePosString::GetString(sStrId1); sal_Int32 nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &rCharMap); if (_pMap[nMapPos].nAlign == _nAlign) @@ -1553,7 +1554,7 @@ void SwFramePage::FillRelLB( const FrameMap* _pMap, m_bIsVerticalFrame, m_bIsVerticalL2R, m_bIsInRightToLeft); - const OUString sEntry = m_aFramePosString.GetString(eStrId1); + const OUString sEntry = SvxSwFramePosString::GetString(eStrId1); sal_Int32 nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &rMap); if (sSelEntry.isEmpty() && rMap.nRelation == _nRel) @@ -1690,7 +1691,7 @@ sal_Int32 SwFramePage::GetMapPos( const FrameMap *pMap, ListBox &rAlignLB ) { SvxSwFramePosString::StringId eResId = pMap[i].eStrId; - OUString sEntry = m_aFramePosString.GetString(eResId); + OUString sEntry = SvxSwFramePosString::GetString(eResId); sEntry = MnemonicGenerator::EraseAllMnemonicChars( sEntry ); if (sEntry == sSelEntry) diff --git a/sw/source/ui/frmdlg/frmui.src b/sw/source/ui/frmdlg/frmui.src deleted file mode 100644 index 1943fd85262a..000000000000 --- a/sw/source/ui/frmdlg/frmui.src +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "frmui.hrc" - -/*----------------------------------------------------------------------- - Description: character alignment for frmsh.cxx - context menu - -----------------------------------------------------------------------*/ -String STR_TOP_BASE -{ - Text [ en-US ] = "Base line at ~top" ; -}; -String STR_BOTTOM_BASE -{ - Text [ en-US ] = "~Base line at bottom" ; -}; -String STR_CENTER_BASE -{ - Text [ en-US ] = "Base line ~centered" ; -}; -String STR_LINE_TOP -{ - Text [ en-US ] = "Top of line" ; -}; -String STR_LINE_BOTTOM -{ - Text [ en-US ] = "Bottom of line" ; -}; -String STR_LINE_CENTER -{ - Text [ en-US ] = "Center of line" ; -}; -String STR_OLE_INSERT -{ - Text [ en-US ] = "Insert object" ; -}; -String STR_OLE_EDIT -{ - Text [ en-US ] = "Edit object" ; -}; -String STR_COLL_HEADER -{ - Text [ en-US ] = " (Template: " ; -}; -String STR_FRMUI_BORDER -{ - Text [ en-US ] = "Borders" ; -}; -String STR_FRMUI_PATTERN -{ - Text [ en-US ] = "Background" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/frmdlg/pattern.cxx b/sw/source/ui/frmdlg/pattern.cxx index ca2e467ff638..d7be56794271 100644 --- a/sw/source/ui/frmdlg/pattern.cxx +++ b/sw/source/ui/frmdlg/pattern.cxx @@ -22,6 +22,7 @@ #include "swtypes.hxx" #include "pattern.hxx" #include "frmui.hrc" +#include "strings.hrc" SwBackgroundDlg::SwBackgroundDlg(vcl::Window* pParent, const SfxItemSet& rSet) : SfxSingleTabDialog(pParent, rSet) diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx index f0e95a46cd28..4e34b1b940ab 100644 --- a/sw/source/ui/frmdlg/uiborder.cxx +++ b/sw/source/ui/frmdlg/uiborder.cxx @@ -28,6 +28,7 @@ #include "swtypes.hxx" #include "uiborder.hxx" #include "frmui.hrc" +#include "strings.hrc" SwBorderDlg::SwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType) : SfxSingleTabDialog(pParent, rSet) diff --git a/sw/source/ui/globdoc/globdoc.src b/sw/source/ui/globdoc/globdoc.src deleted file mode 100644 index 73039f72507d..000000000000 --- a/sw/source/ui/globdoc/globdoc.src +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "globdoc.hrc" - -String STR_HUMAN_SWGLOBDOC_NAME -{ - Text [ en-US ] = "Master Document" ; -}; -String STR_WRITER_GLOBALDOC_FULLTYPE -{ - Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION Master Document"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 205be4835b8e..8b0ed87d09c2 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <rsc/rscsfx.hxx> +#include <svl/style.hxx> #include <com/sun/star/text/XDocumentIndexesSupplier.hpp> #include <com/sun/star/text/XTextSectionsSupplier.hpp> #include <com/sun/star/style/BreakType.hpp> @@ -45,7 +45,7 @@ #include <swmodule.hxx> #include <cmdid.h> -#include <utlui.hrc> +#include <strings.hrc> #include <index.hrc> #include <globals.hrc> #include <SwStyleNameMapper.hxx> diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index e1ff6605bb51..19490c9551db 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -20,7 +20,7 @@ #include <config_folders.h> #include <comphelper/string.hxx> -#include <rsc/rscsfx.hxx> +#include <svl/style.hxx> #include <vcl/msgbox.hxx> #include <vcl/help.hxx> #include <vcl/builderfactory.hxx> @@ -53,7 +53,7 @@ #include <cnttab.hxx> #include <swuicnttab.hxx> #include <poolfmt.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <uitool.hxx> #include <fmtcol.hxx> #include <fldbas.hxx> @@ -66,9 +66,10 @@ #include <cmdid.h> #include <helpid.h> -#include <utlui.hrc> +#include <strings.hrc> #include <index.hrc> #include <globals.hrc> +#include <cnttab.hrc> #include <SwStyleNameMapper.hxx> #include <sfx2/filedlghelper.hxx> #include <toxwrap.hxx> @@ -779,7 +780,6 @@ IMPL_LINK(SwAddStylesDlg_Impl, LeftRightHdl, Button*, pBtn, void) SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet) : SfxTabPage(pParent, "TocIndexPage", "modules/swriter/ui/tocindexpage.ui", &rAttrSet) - , aFromNames(ResId(RES_SRCTYPES, *pSwResMgr)) , pIndexRes(nullptr) , sAutoMarkType(SwResId(STR_AUTOMARK_TYPE)) , m_bWaitingInitialSettings(true) @@ -848,11 +848,10 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r sAddStyleContent = m_pAddStylesCB->GetText(); - ResStringArray& rNames = aFromNames.GetNames(); - for(sal_uInt32 i = 0; i < rNames.Count(); i++) + for (size_t i = 0; i < SAL_N_ELEMENTS(RES_SRCTYPES); i++) { - m_pFromObjCLB->InsertEntry(rNames.GetString(i)); - m_pFromObjCLB->SetEntryData( i, reinterpret_cast<void*>(rNames.GetValue(i)) ); + m_pFromObjCLB->InsertEntry(SwResId(RES_SRCTYPES[i].first)); + m_pFromObjCLB->SetEntryData(i, reinterpret_cast<void*>(RES_SRCTYPES[i].second)); } SetExchangeSupport(); @@ -1790,6 +1789,44 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt ) SvTreeListBox::RequestHelp(rHEvt); } +namespace +{ + const char* STR_AUTH_FIELD_ARY[] = + { + STR_AUTH_FIELD_IDENTIFIER, + STR_AUTH_FIELD_AUTHORITY_TYPE, + STR_AUTH_FIELD_ADDRESS, + STR_AUTH_FIELD_ANNOTE, + STR_AUTH_FIELD_AUTHOR, + STR_AUTH_FIELD_BOOKTITLE, + STR_AUTH_FIELD_CHAPTER, + STR_AUTH_FIELD_EDITION, + STR_AUTH_FIELD_EDITOR, + STR_AUTH_FIELD_HOWPUBLISHED, + STR_AUTH_FIELD_INSTITUTION, + STR_AUTH_FIELD_JOURNAL, + STR_AUTH_FIELD_MONTH, + STR_AUTH_FIELD_NOTE, + STR_AUTH_FIELD_NUMBER, + STR_AUTH_FIELD_ORGANIZATIONS, + STR_AUTH_FIELD_PAGES, + STR_AUTH_FIELD_PUBLISHER, + STR_AUTH_FIELD_SCHOOL, + STR_AUTH_FIELD_SERIES, + STR_AUTH_FIELD_TITLE, + STR_AUTH_FIELD_TYPE, + STR_AUTH_FIELD_VOLUME, + STR_AUTH_FIELD_YEAR, + STR_AUTH_FIELD_URL, + STR_AUTH_FIELD_CUSTOM1, + STR_AUTH_FIELD_CUSTOM2, + STR_AUTH_FIELD_CUSTOM3, + STR_AUTH_FIELD_CUSTOM4, + STR_AUTH_FIELD_CUSTOM5, + STR_AUTH_FIELD_ISBN + }; +} + SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet) : SfxTabPage(pParent, "TocEntriesPage", "modules/swriter/ui/tocentriespage.ui", &rAttrSet) @@ -1919,7 +1956,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAt //fill the types in for (sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i) { - sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SwResId(STR_AUTH_FIELD_START + i)); + sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SwResId(STR_AUTH_FIELD_ARY[i])); m_pAuthFieldsLB->SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(i))); } sal_Int32 nPos = m_pFirstKeyLB->InsertEntry(sNoCharSortKey); @@ -2255,7 +2292,7 @@ void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken) { //fill it into the ListBox sal_uInt32 nData = rToken.nAuthorityField; - sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SwResId(STR_AUTH_FIELD_START + nData)); + sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SwResId(STR_AUTH_FIELD_ARY[nData])); m_pAuthFieldsLB->SetEntryData(nPos, reinterpret_cast<void*>((sal_uIntPtr)nData)); } @@ -2380,7 +2417,7 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox, void) m_pAuthFieldsLB->Clear(); for( sal_uInt32 i = 0; i < AUTH_FIELD_END; i++) { - sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SwResId(STR_AUTH_FIELD_START + i)); + sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SwResId(STR_AUTH_FIELD_ARY[i])); m_pAuthFieldsLB->SetEntryData(nPos, reinterpret_cast<void*>((sal_uIntPtr)i)); } @@ -2675,6 +2712,34 @@ OUString SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const return sRet; } +static const char* STR_TOKEN_ARY[] = +{ + STR_TOKEN_ENTRY_NO, + STR_TOKEN_ENTRY, //mapped from original STR_TOKEN_ENTRY_TEXT, + STR_TOKEN_ENTRY, + STR_TOKEN_TAB_STOP, + nullptr, + STR_TOKEN_PAGE_NUMS, + STR_TOKEN_CHAPTER_INFO, + STR_TOKEN_LINK_START, + STR_TOKEN_LINK_END, + STR_TOKEN_AUTHORITY +}; + +static const char* STR_TOKEN_HELP_ARY[] = +{ + STR_TOKEN_HELP_ENTRY_NO, + STR_TOKEN_HELP_ENTRY, // mapped from original STR_TOKEN_HELP_ENTRY_TEXT, + STR_TOKEN_HELP_ENTRY, + STR_TOKEN_HELP_TAB_STOP, + STR_TOKEN_HELP_TEXT, + STR_TOKEN_HELP_PAGE_NUMS, + STR_TOKEN_HELP_CHAPTER_INFO, + STR_TOKEN_HELP_LINK_START, + STR_TOKEN_HELP_LINK_END, + STR_TOKEN_HELP_AUTHORITY +}; + SwTokenWindow::SwTokenWindow(vcl::Window* pParent) : VclHBox(pParent) , m_pForm(nullptr) @@ -2693,15 +2758,12 @@ SwTokenWindow::SwTokenWindow(vcl::Window* pParent) for (sal_uInt32 i = 0; i < TOKEN_END; ++i) { - sal_uInt32 nTextId = STR_BUTTON_TEXT_START + i; - if( STR_TOKEN_ENTRY_TEXT == nTextId ) - nTextId = STR_TOKEN_ENTRY; - m_aButtonTexts[i] = SwResId(nTextId); + const char* pTextId = STR_TOKEN_ARY[i]; + if (pTextId) + m_aButtonTexts[i] = SwResId(pTextId); - sal_uInt32 nHelpId = STR_BUTTON_HELP_TEXT_START + i; - if(STR_TOKEN_HELP_ENTRY_TEXT == nHelpId) - nHelpId = STR_TOKEN_HELP_ENTRY; - m_aButtonHelpTexts[i] = SwResId(nHelpId); + const char* pHelpId = STR_TOKEN_HELP_ARY[i]; + m_aButtonHelpTexts[i] = SwResId(pHelpId); } m_sAccessibleName = SwResId(STR_STRUCTURE); diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src deleted file mode 100644 index 82f561abb841..000000000000 --- a/sw/source/ui/index/cnttab.src +++ /dev/null @@ -1,186 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "index.hrc" -#include "globals.hrc" -#include "cmdid.h" -#include "helpid.h" - -String STR_TITLE -{ - Text [ en-US ] = "Title" ; -}; -String STR_ALPHA -{ - Text [ en-US ] = "Separator" ; -}; -String STR_LEVEL -{ - Text [ en-US ] = "Level " ; -}; -String STR_FILE_NOT_FOUND -{ - Text [ en-US ] = "The file, \"%1\" in the \"%2\" path could not be found."; -}; - -String STR_USER_DEFINED_INDEX -{ - Text [ en-US ] = "User-Defined Index"; -}; - -String STR_NOSORTKEY -{ - Text [ en-US ] = "<None>"; -}; - -String STR_NO_CHAR_STYLE -{ - Text [ en-US ] = "<None>"; -}; - -String STR_DELIM -{ - Text [ en-US ] = "S"; -}; - -String STR_TOKEN_ENTRY_NO -{ - Text [ en-US ] = "E#"; -}; -String STR_TOKEN_ENTRY -{ - Text [ en-US ] = "E"; -}; -String STR_TOKEN_TAB_STOP -{ - Text [ en-US ] = "T"; -}; -String STR_TOKEN_TEXT -{ - Text = ""; - //unused -}; -String STR_TOKEN_PAGE_NUMS -{ - Text [ en-US ] = "#"; -}; -String STR_TOKEN_CHAPTER_INFO -{ - Text [ en-US ] = "CI"; -}; -String STR_TOKEN_LINK_START -{ - Text [ en-US ] = "LS"; -}; -String STR_TOKEN_LINK_END -{ - Text [ en-US ] = "LE"; -}; -String STR_TOKEN_AUTHORITY -{ - Text [ en-US ] = "A"; -}; -String STR_TOKEN_HELP_ENTRY_NO -{ - Text [ en-US ] = "Chapter number"; -}; -String STR_TOKEN_HELP_ENTRY -{ - Text [ en-US ] = "Entry"; -}; -String STR_TOKEN_HELP_TAB_STOP -{ - Text [ en-US ] = "Tab stop"; -}; -String STR_TOKEN_HELP_TEXT -{ - Text [ en-US ] = "Text"; -}; -String STR_TOKEN_HELP_PAGE_NUMS -{ - Text [ en-US ] = "Page number"; -}; -String STR_TOKEN_HELP_CHAPTER_INFO -{ - Text [ en-US ] = "Chapter info"; -}; -String STR_TOKEN_HELP_LINK_START -{ - Text [ en-US ] = "Hyperlink start"; -}; -String STR_TOKEN_HELP_LINK_END -{ - Text [ en-US ] = "Hyperlink end"; -}; -String STR_TOKEN_HELP_AUTHORITY -{ - Text [ en-US ] = "Bibliography entry: "; -}; - -String STR_CHARSTYLE -{ - Text [ en-US ] = "Character Style: "; -}; - -StringArray RES_SRCTYPES -{ - /* ids from tox.hxx - SwTOOElements::Math = 0x01, - SwTOOElements::Chart = 0x02, - TOO_IMAGE = 0x04, - SwTOOElements::Calc = 0x08, - SwTOOElements::DrawImpress= 0x10, - SwTOOElements::Other = 0x80 - */ - ItemList [ en-US ] = - { - < "%PRODUCTNAME Math" ; 1;> ; - < "%PRODUCTNAME Chart" ; 2;> ; - < "%PRODUCTNAME Calc" ; 8;> ; - < "%PRODUCTNAME Draw/%PRODUCTNAME Impress" ; 16;> ; - < "Other OLE Objects"; 128;> ; - }; -}; - -String STR_STRUCTURE -{ - Text [ en-US ] = "Structure text"; -}; - -String STR_ADDITIONAL_ACCNAME_STRING1 -{ - Text [ en-US ] = "Press Ctrl+Alt+A to move focus for more operations"; -}; - -String STR_ADDITIONAL_ACCNAME_STRING2 -{ - Text [ en-US ] = "Press left or right arrow to choose the structure controls"; -}; - -String STR_ADDITIONAL_ACCNAME_STRING3 -{ - Text [ en-US ] = "Press Ctrl+Alt+B to move focus back to the current structure control"; -}; - -String STR_AUTOMARK_TYPE -{ - Text [ en-US ] = "Selection file for the alphabetical index (*.sdi)"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src deleted file mode 100644 index 0519dbecc979..000000000000 --- a/sw/source/ui/index/idxmrk.src +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <svtools/controldims.hrc> -#include "index.hrc" -#include "helpid.h" -#include "cmdid.h" - -String STR_IDXMRK_EDIT -{ - Text [ en-US ] = "Edit Index Entry" ; -}; - -String STR_IDXMRK_INSERT -{ - Text [ en-US ] = "Insert Index Entry" ; -}; - -String STR_QUERY_CHANGE_AUTH_ENTRY -{ - Text [ en-US ] = "The document already contains the bibliography entry but with different data. Do you want to adjust the existing entries?"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 91b2a360ead5..7e133a3d0217 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -51,7 +51,7 @@ #include <swmodule.hxx> #include <fldmgr.hxx> #include <fldbas.hxx> -#include <utlui.hrc> +#include <strings.hrc> #include <swcont.hxx> #include <svl/cjkoptions.hxx> #include <ndtxt.hxx> @@ -1428,6 +1428,44 @@ void SwAuthorMarkPane::Activate() m_pActionBT->Enable(!pSh->HasReadonlySel()); } +namespace +{ + const char* STR_AUTH_FIELD_ARY[] = + { + STR_AUTH_FIELD_IDENTIFIER, + STR_AUTH_FIELD_AUTHORITY_TYPE, + STR_AUTH_FIELD_ADDRESS, + STR_AUTH_FIELD_ANNOTE, + STR_AUTH_FIELD_AUTHOR, + STR_AUTH_FIELD_BOOKTITLE, + STR_AUTH_FIELD_CHAPTER, + STR_AUTH_FIELD_EDITION, + STR_AUTH_FIELD_EDITOR, + STR_AUTH_FIELD_HOWPUBLISHED, + STR_AUTH_FIELD_INSTITUTION, + STR_AUTH_FIELD_JOURNAL, + STR_AUTH_FIELD_MONTH, + STR_AUTH_FIELD_NOTE, + STR_AUTH_FIELD_NUMBER, + STR_AUTH_FIELD_ORGANIZATIONS, + STR_AUTH_FIELD_PAGES, + STR_AUTH_FIELD_PUBLISHER, + STR_AUTH_FIELD_SCHOOL, + STR_AUTH_FIELD_SERIES, + STR_AUTH_FIELD_TITLE, + STR_AUTH_FIELD_TYPE, + STR_AUTH_FIELD_VOLUME, + STR_AUTH_FIELD_YEAR, + STR_AUTH_FIELD_URL, + STR_AUTH_FIELD_CUSTOM1, + STR_AUTH_FIELD_CUSTOM2, + STR_AUTH_FIELD_CUSTOM3, + STR_AUTH_FIELD_CUSTOM4, + STR_AUTH_FIELD_CUSTOM5, + STR_AUTH_FIELD_ISBN + }; +} + SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent, const OUString pFields[], SwWrtShell& rSh, @@ -1458,14 +1496,14 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent, pFixedTexts[nIndex]->set_grid_left_attach(0); pFixedTexts[nIndex]->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); - pFixedTexts[nIndex]->SetText(SwResId(STR_AUTH_FIELD_START + aCurInfo.nToxField)); + pFixedTexts[nIndex]->SetText(SwResId(STR_AUTH_FIELD_ARY[aCurInfo.nToxField])); pFixedTexts[nIndex]->Show(); pEdits[nIndex] = nullptr; if( AUTH_FIELD_AUTHORITY_TYPE == aCurInfo.nToxField ) { pTypeListBox = VclPtr<ListBox>::Create(bLeft ? pLeft : pRight, WB_DROPDOWN|WB_BORDER|WB_VCENTER); - for(int j = 0; j < AUTH_TYPE_END; j++) - pTypeListBox->InsertEntry(SwResId(STR_AUTH_TYPE_START + j)); + for (int j = 0; j < AUTH_TYPE_END; j++) + pTypeListBox->InsertEntry(SwResId(STR_AUTH_FIELD_ARY[j])); if(!pFields[aCurInfo.nToxField].isEmpty()) { pTypeListBox->SelectEntryPos(pFields[aCurInfo.nToxField].toInt32()); diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index cf6e0786de28..2680d6f3bf5d 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -35,6 +35,7 @@ #include "bookmark.hxx" #include "docsh.hxx" #include "globals.hrc" +#include "strings.hrc" using namespace ::com::sun::star; diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 7eaa028790ff..13a78ef7bc4b 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -36,6 +36,7 @@ #include <swunohelper.hxx> #include <misc.hrc> +#include <strings.hrc> #define PATH_CASE_SENSITIVE 0x01 #define PATH_READONLY 0x02 diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index f1379fe97251..9976982ea2e8 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -71,7 +71,7 @@ #include <memory> -#include "access.hrc" +#include "strings.hrc" using namespace ::com::sun::star; using namespace ::com::sun::star::lang; diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src deleted file mode 100644 index 7d44cdfebc6b..000000000000 --- a/sw/source/ui/misc/glossary.src +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "misc.hrc" -#include "cmdid.h" -#include "helpid.h" -#include "access.hrc" - -String STR_DOUBLE_SHORTNAME -{ - Text [ en-US ] = "Shortcut name already exists. Please choose another name." ; -}; -String STR_QUERY_DELETE -{ - Text[ en-US ] = "Delete AutoText?" ; -}; -String STR_QUERY_DELETE_GROUP1 -{ - Text [ en-US ] = "Delete the category " ; -}; -String STR_QUERY_DELETE_GROUP2 -{ - Text [ en-US ] = "?" ; -}; -String STR_GLOSSARY -{ - Text [ en-US ] = "AutoText :" ; -}; -String STR_SAVE_GLOSSARY -{ - Text[ en-US ] = "Save AutoText"; -}; -String STR_NO_GLOSSARIES -{ - Text [ en-US ] = "There is no AutoText in this file."; -}; - -String STR_MY_AUTOTEXT -{ - Text[ en-US ] = "My AutoText"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index a8020dd42ff5..cad31b1e29cf 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -32,7 +32,7 @@ #include "linenum.hxx" #include "uitool.hxx" #include <fmtline.hxx> -#include "poolfmt.hrc" +#include "strings.hrc" #include <IDocumentStylePoolAccess.hxx> diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index d3032c298a4c..1599249cc243 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -45,6 +45,7 @@ #include <svtools/ctrlbox.hxx> #include <helpid.h> #include <globals.hrc> +#include <strings.hrc> #include <misc.hrc> #include <paratr.hxx> diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index f23964aa1378..bd2742abbb8c 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -41,6 +41,7 @@ #include <sfx2/objsh.hxx> #include <globals.hrc> +#include <strings.hrc> #include <misc.hrc> #include <memory> diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index b33fedc9f169..470972e06429 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -38,6 +38,7 @@ #include <wrtsh.hxx> #include <misc.hrc> #include <app.hrc> +#include <strings.hrc> #include <swtable.hxx> #include <node.hxx> #include <tblsel.hxx> diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx index bfe7bdfdf8e1..f1a017cc97ff 100644 --- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx +++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx @@ -35,7 +35,7 @@ #include <helpid.h> #include <cmdid.h> #include <misc.hrc> -#include <shells.hrc> +#include <strings.hrc> #include <vector> #include <redlndlg.hxx> diff --git a/sw/source/ui/misc/swruler.src b/sw/source/ui/misc/swruler.src deleted file mode 100644 index 5299309ef58f..000000000000 --- a/sw/source/ui/misc/swruler.src +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include "misc.hrc" - -String STR_COMMENTS_LABEL -{ - Text [ en-US ] = "Comments" ; -}; - -String STR_SHOW_COMMENTS -{ - Text [ en-US ] = "Show comments" ; -}; - -String STR_HIDE_COMMENTS -{ - Text [ en-US ] = "Hide comments" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src deleted file mode 100644 index b573c47c5960..000000000000 --- a/sw/source/ui/shells/shells.src +++ /dev/null @@ -1,157 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include <svx/svxids.hrc> -#include "helpid.h" -#include "shells.hrc" -#include "globals.hrc" -#include "cmdid.h" - -String STR_GRFILTER_OPENERROR -{ - Text [ en-US ] = "Image file cannot be opened" ; -}; -String STR_GRFILTER_IOERROR -{ - Text [ en-US ] = "Image file cannot be read" ; -}; -String STR_GRFILTER_FORMATERROR -{ - Text [ en-US ] = "Unknown image format" ; -}; -String STR_GRFILTER_VERSIONERROR -{ - Text [ en-US ] = "This image file version is not supported" ; -}; -String STR_GRFILTER_FILTERERROR -{ - Text [ en-US ] = "Image filter not found" ; -}; -String STR_GRFILTER_TOOBIG -{ - Text [ en-US ] = "Not enough memory to insert the image." ; -}; -String STR_INSERT_GRAPHIC -{ - Text [ en-US ] = "Insert Image" ; -}; -String STR_REDLINE_COMMENT -{ - Text [ en-US ] = "Comment: " ; -}; -String STR_REDLINE_INSERTED -{ - Text [ en-US ] = "Insertion" ; -}; -String STR_REDLINE_DELETED -{ - Text [ en-US ] = "Deletion" ; -}; -String STR_REDLINE_AUTOFMT -{ - Text [ en-US ] = "AutoCorrect"; -}; - -String STR_REDLINE_FORMATED -{ - Text [ en-US ] = "Formats" ; -}; -String STR_REDLINE_TABLECHG -{ - Text [ en-US ] = "Table Changes" ; -}; -String STR_REDLINE_FMTCOLLSET -{ - Text [ en-US ] = "Applied Paragraph Styles"; -}; -String STR_REDLINE_TITLE -{ - Text [ en-US ] = "AutoCorrect"; -}; -String STR_REDLINE_MSG -{ - Text [ en-US ] = "AutoCorrect completed.\nYou can accept or reject all changes,\nor accept or reject particular changes."; -}; -String STR_REDLINE_ACCEPT_ALL -{ - Text [ en-US ] = "Accept All"; -}; -String STR_REDLINE_REJECT_ALL -{ - Text [ en-US ] = "Reject All"; -}; -String STR_REDLINE_EDIT -{ - Text [ en-US ] = "Edit Changes"; -}; -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)" ; -}; - //Strings for gallery/background -String STR_SWBG_PARAGRAPH -{ - Text [ en-US ] = "Paragraph" ; -}; -String STR_SWBG_GRAPHIC -{ - Text [ en-US ] = "Image" ; -}; -String STR_SWBG_OLE -{ - Text [ en-US ] = "OLE object" ; -}; -String STR_SWBG_FRAME -{ - Text [ en-US ] = "Frame" ; -}; -String STR_SWBG_TABLE -{ - Text [ en-US ] = "Table" ; -}; -String STR_SWBG_TABLE_ROW -{ - Text [ en-US ] = "Table row" ; -}; -String STR_SWBG_TABLE_CELL -{ - Text [ en-US ] = "Table cell" ; -}; -String STR_SWBG_PAGE -{ - Text [ en-US ] = "Page" ; -}; -String STR_SWBG_HEADER -{ - Text [ en-US ] = "Header" ; -}; -String STR_SWBG_FOOTER -{ - Text [ en-US ] = "Footer" ; -}; - //End: strings for gallery/background - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/sidebar/PagePropertyPanel.src b/sw/source/ui/sidebar/PagePropertyPanel.src deleted file mode 100644 index f1e244e3a4b6..000000000000 --- a/sw/source/ui/sidebar/PagePropertyPanel.src +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "PropertyPanel.hrc" -#include "helpid.h" - -String STR_MARGIN_TOOLTIP_LEFT -{ - Text [ en-US ] = "Left: "; -}; -String STR_MARGIN_TOOLTIP_RIGHT -{ - Text [ en-US ] = ". Right: "; -}; -String STR_MARGIN_TOOLTIP_INNER -{ - Text [ en-US ] = "Inner: "; -}; -String STR_MARGIN_TOOLTIP_OUTER -{ - Text [ en-US ] = ". Outer: "; -}; -String STR_MARGIN_TOOLTIP_TOP -{ - Text [ en-US ] = ". Top: "; -}; -String STR_MARGIN_TOOLTIP_BOT -{ - Text [ en-US ] = ". Bottom: "; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index d37c808cce8a..75d53c645107 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -32,6 +32,7 @@ #include "tblafmt.hxx" #include "app.hrc" +#include "strings.hrc" #include "table.hrc" #include "swabstdlg.hxx" #include <swuiexp.hxx> diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index b1f9298fd594..e4204208ce56 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -37,7 +37,7 @@ #include <fmtrowsplt.hxx> #include <sfx2/htmlmode.hxx> -#include "access.hrc" +#include "strings.hrc" #include <docsh.hxx> #include <wrtsh.hxx> diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 5e5701f3ce80..0bb614d7d79a 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -33,6 +33,7 @@ #include <svtools/accessibilityoptions.hxx> #include <svx/framelinkarray.hxx> #include "app.hrc" +#include "strings.hrc" #include "swmodule.hxx" #include "swtypes.hxx" #include "view.hxx" diff --git a/sw/source/ui/utlui/poolfmt.src b/sw/source/ui/utlui/poolfmt.src deleted file mode 100644 index c0a876b64797..000000000000 --- a/sw/source/ui/utlui/poolfmt.src +++ /dev/null @@ -1,834 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "poolfmt.hrc" - - // Format names - -String STR_POOLCHR_FOOTNOTE -{ - Text [ en-US ] = "Footnote Characters" ; -}; -String STR_POOLCHR_PAGENO -{ - Text [ en-US ] = "Page Number" ; -}; -String STR_POOLCHR_LABEL -{ - Text [ en-US ] = "Caption Characters" ; -}; -String STR_POOLCHR_DROPCAPS -{ - Text [ en-US ] = "Drop Caps" ; -}; -String STR_POOLCHR_NUM_LEVEL -{ - Text [ en-US ] = "Numbering Symbols" ; -}; -String STR_POOLCHR_BUL_LEVEL -{ - Text [ en-US ] = "Bullets" ; -}; -String STR_POOLCHR_INET_NORMAL -{ - Text [ en-US ] = "Internet Link" ; -}; -String STR_POOLCHR_INET_VISIT -{ - Text [ en-US ] = "Visited Internet Link" ; -}; -String STR_POOLCHR_JUMPEDIT -{ - Text [ en-US ] = "Placeholder" ; -}; -String STR_POOLCHR_TOXJUMP -{ - Text [ en-US ] = "Index Link" ; -}; -String STR_POOLCHR_ENDNOTE -{ - Text [ en-US ] = "Endnote Characters" ; -}; -String STR_POOLPAGE_LANDSCAPE -{ - Text [ en-US ] = "Landscape" ; -}; -String STR_POOLCHR_LINENUM -{ - Text [ en-US ] = "Line Numbering" ; -}; -String STR_POOLCHR_IDX_MAIN_ENTRY -{ - Text [ en-US ] = "Main Index Entry"; -}; -String STR_POOLCHR_FOOTNOTE_ANCHOR -{ - Text [ en-US ] = "Footnote Anchor"; -}; -String STR_POOLCHR_ENDNOTE_ANCHOR -{ - Text [ en-US ] = "Endnote Anchor"; -}; - - // Drawing templates for HTML -String STR_POOLCHR_HTML_EMPHASIS -{ - Text [ en-US ] = "Emphasis" ; -}; -String STR_POOLCHR_HTML_CITIATION -{ - Text [ en-US ] = "Quotation" ; -}; -String STR_POOLCHR_HTML_STRONG -{ - Text [ en-US ] = "Strong Emphasis" ; -}; -String STR_POOLCHR_HTML_CODE -{ - Text [ en-US ] = "Source Text" ; -}; -String STR_POOLCHR_HTML_SAMPLE -{ - Text [ en-US ] = "Example" ; -}; -String STR_POOLCHR_HTML_KEYBOARD -{ - Text [ en-US ] = "User Entry" ; -}; -String STR_POOLCHR_HTML_VARIABLE -{ - Text [ en-US ] = "Variable" ; -}; -String STR_POOLCHR_HTML_DEFINSTANCE -{ - Text [ en-US ] = "Definition" ; -}; -String STR_POOLCHR_HTML_TELETYPE -{ - Text [ en-US ] = "Teletype" ; -}; - -// Border templates -String STR_POOLFRM_FRAME -{ - Text [ en-US ] = "Frame" ; -}; -String STR_POOLFRM_GRAPHIC -{ - Text [ en-US ] = "Graphics" ; -}; -String STR_POOLFRM_OLE -{ - Text [ en-US ] = "OLE" ; -}; -String STR_POOLFRM_FORMEL -{ - Text [ en-US ] = "Formula" ; -}; -String STR_POOLFRM_MARGINAL -{ - Text [ en-US ] = "Marginalia" ; -}; -String STR_POOLFRM_WATERSIGN -{ - Text [ en-US ] = "Watermark" ; -}; -String STR_POOLFRM_LABEL -{ - Text [ en-US ] = "Labels" ; -}; - - // Template names - -// tdf#107211 please don't change STANDARD, except back to "Default" -String STR_POOLCOLL_STANDARD -{ - Text [ en-US ] = "Default Style" ; -}; -String STR_POOLCOLL_TEXT -{ - Text [ en-US ] = "Text Body" ; -}; -String STR_POOLCOLL_TEXT_IDENT -{ - Text [ en-US ] = "First Line Indent" ; -}; -String STR_POOLCOLL_TEXT_NEGIDENT -{ - Text [ en-US ] = "Hanging Indent" ; -}; -String STR_POOLCOLL_TEXT_MOVE -{ - Text [ en-US ] = "Text Body Indent" ; -}; -String STR_POOLCOLL_GREETING -{ - Text [ en-US ] = "Complimentary Close" ; -}; -String STR_POOLCOLL_SIGNATURE -{ - Text [ en-US ] = "Signature" ; -}; -String STR_POOLCOLL_HEADLINE_BASE -{ - Text [ en-US ] = "Heading" ; -}; -String STR_POOLCOLL_NUMBUL_BASE -{ - Text [ en-US ] = "List" ; -}; -String STR_POOLCOLL_REGISTER_BASE -{ - Text [ en-US ] = "Index" ; -}; -String STR_POOLCOLL_CONFRONTATION -{ - Text [ en-US ] = "List Indent" ; -}; -String STR_POOLCOLL_MARGINAL -{ - Text [ en-US ] = "Marginalia" ; -}; -String STR_POOLCOLL_HEADLINE1 -{ - Text [ en-US ] = "Heading 1" ; -}; -String STR_POOLCOLL_HEADLINE2 -{ - Text [ en-US ] = "Heading 2" ; -}; -String STR_POOLCOLL_HEADLINE3 -{ - Text [ en-US ] = "Heading 3" ; -}; -String STR_POOLCOLL_HEADLINE4 -{ - Text [ en-US ] = "Heading 4" ; -}; -String STR_POOLCOLL_HEADLINE5 -{ - Text [ en-US ] = "Heading 5" ; -}; -String STR_POOLCOLL_HEADLINE6 -{ - Text [ en-US ] = "Heading 6" ; -}; -String STR_POOLCOLL_HEADLINE7 -{ - Text [ en-US ] = "Heading 7" ; -}; -String STR_POOLCOLL_HEADLINE8 -{ - Text [ en-US ] = "Heading 8" ; -}; -String STR_POOLCOLL_HEADLINE9 -{ - Text [ en-US ] = "Heading 9" ; -}; -String STR_POOLCOLL_HEADLINE10 -{ - Text [ en-US ] = "Heading 10" ; -}; -String STR_POOLCOLL_NUM_LEVEL1S -{ - Text [ en-US ] = "Numbering 1 Start" ; -}; -String STR_POOLCOLL_NUM_LEVEL1 -{ - Text [ en-US ] = "Numbering 1" ; -}; -String STR_POOLCOLL_NUM_LEVEL1E -{ - Text [ en-US ] = "Numbering 1 End" ; -}; -String STR_POOLCOLL_NUM_NONUM1 -{ - Text [ en-US ] = "Numbering 1 Cont." ; -}; -String STR_POOLCOLL_NUM_LEVEL2S -{ - Text [ en-US ] = "Numbering 2 Start" ; -}; -String STR_POOLCOLL_NUM_LEVEL2 -{ - Text [ en-US ] = "Numbering 2" ; -}; -String STR_POOLCOLL_NUM_LEVEL2E -{ - Text [ en-US ] = "Numbering 2 End" ; -}; -String STR_POOLCOLL_NUM_NONUM2 -{ - Text [ en-US ] = "Numbering 2 Cont." ; -}; -String STR_POOLCOLL_NUM_LEVEL3S -{ - Text [ en-US ] = "Numbering 3 Start" ; -}; -String STR_POOLCOLL_NUM_LEVEL3 -{ - Text [ en-US ] = "Numbering 3" ; -}; -String STR_POOLCOLL_NUM_LEVEL3E -{ - Text [ en-US ] = "Numbering 3 End" ; -}; -String STR_POOLCOLL_NUM_NONUM3 -{ - Text [ en-US ] = "Numbering 3 Cont." ; -}; -String STR_POOLCOLL_NUM_LEVEL4S -{ - Text [ en-US ] = "Numbering 4 Start" ; -}; -String STR_POOLCOLL_NUM_LEVEL4 -{ - Text [ en-US ] = "Numbering 4" ; -}; -String STR_POOLCOLL_NUM_LEVEL4E -{ - Text [ en-US ] = "Numbering 4 End" ; -}; -String STR_POOLCOLL_NUM_NONUM4 -{ - Text [ en-US ] = "Numbering 4 Cont." ; -}; -String STR_POOLCOLL_NUM_LEVEL5S -{ - Text [ en-US ] = "Numbering 5 Start" ; -}; -String STR_POOLCOLL_NUM_LEVEL5 -{ - Text [ en-US ] = "Numbering 5" ; -}; -String STR_POOLCOLL_NUM_LEVEL5E -{ - Text [ en-US ] = "Numbering 5 End" ; -}; -String STR_POOLCOLL_NUM_NONUM5 -{ - Text [ en-US ] = "Numbering 5 Cont." ; -}; -String STR_POOLCOLL_BUL_LEVEL1S -{ - Text [ en-US ] = "List 1 Start" ; -}; -String STR_POOLCOLL_BUL_LEVEL1 -{ - Text [ en-US ] = "List 1" ; -}; -String STR_POOLCOLL_BUL_LEVEL1E -{ - Text [ en-US ] = "List 1 End" ; -}; -String STR_POOLCOLL_BUL_NONUM1 -{ - Text [ en-US ] = "List 1 Cont." ; -}; -String STR_POOLCOLL_BUL_LEVEL2S -{ - Text [ en-US ] = "List 2 Start" ; -}; -String STR_POOLCOLL_BUL_LEVEL2 -{ - Text [ en-US ] = "List 2" ; -}; -String STR_POOLCOLL_BUL_LEVEL2E -{ - Text [ en-US ] = "List 2 End" ; -}; -String STR_POOLCOLL_BUL_NONUM2 -{ - Text [ en-US ] = "List 2 Cont." ; -}; -String STR_POOLCOLL_BUL_LEVEL3S -{ - Text [ en-US ] = "List 3 Start" ; -}; -String STR_POOLCOLL_BUL_LEVEL3 -{ - Text [ en-US ] = "List 3" ; -}; -String STR_POOLCOLL_BUL_LEVEL3E -{ - Text [ en-US ] = "List 3 End" ; -}; -String STR_POOLCOLL_BUL_NONUM3 -{ - Text [ en-US ] = "List 3 Cont." ; -}; -String STR_POOLCOLL_BUL_LEVEL4S -{ - Text [ en-US ] = "List 4 Start" ; -}; -String STR_POOLCOLL_BUL_LEVEL4 -{ - Text [ en-US ] = "List 4" ; -}; -String STR_POOLCOLL_BUL_LEVEL4E -{ - Text [ en-US ] = "List 4 End" ; -}; -String STR_POOLCOLL_BUL_NONUM4 -{ - Text [ en-US ] = "List 4 Cont." ; -}; -String STR_POOLCOLL_BUL_LEVEL5S -{ - Text [ en-US ] = "List 5 Start" ; -}; -String STR_POOLCOLL_BUL_LEVEL5 -{ - Text [ en-US ] = "List 5" ; -}; -String STR_POOLCOLL_BUL_LEVEL5E -{ - Text [ en-US ] = "List 5 End" ; -}; -String STR_POOLCOLL_BUL_NONUM5 -{ - Text [ en-US ] = "List 5 Cont." ; -}; -String STR_POOLCOLL_HEADER -{ - Text [ en-US ] = "Header" ; -}; -String STR_POOLCOLL_HEADERL -{ - Text [ en-US ] = "Header Left" ; -}; -String STR_POOLCOLL_HEADERR -{ - Text [ en-US ] = "Header Right" ; -}; -String STR_POOLCOLL_FOOTER -{ - Text [ en-US ] = "Footer" ; -}; -String STR_POOLCOLL_FOOTERL -{ - Text [ en-US ] = "Footer Left" ; -}; -String STR_POOLCOLL_FOOTERR -{ - Text [ en-US ] = "Footer Right" ; -}; -String STR_POOLCOLL_TABLE -{ - Text [ en-US ] = "Table Contents" ; -}; -String STR_POOLCOLL_TABLE_HDLN -{ - Text [ en-US ] = "Table Heading" ; -}; -String STR_POOLCOLL_FRAME -{ - Text [ en-US ] = "Frame Contents" ; -}; -String STR_POOLCOLL_FOOTNOTE -{ - Text [ en-US ] = "Footnote" ; -}; -String STR_POOLCOLL_ENDNOTE -{ - Text [ en-US ] = "Endnote" ; -}; -String STR_POOLCOLL_LABEL -{ - Text [ en-US ] = "Caption" ; -}; -String STR_POOLCOLL_LABEL_ABB -{ - Text [ en-US ] = "Illustration" ; -}; -String STR_POOLCOLL_LABEL_TABLE -{ - Text [ en-US ] = "Table" ; -}; -String STR_POOLCOLL_LABEL_FRAME -{ - Text [ en-US ] = "Text" ; -}; -String STR_POOLCOLL_LABEL_DRAWING -{ - Text [ en-US ] = "Drawing"; -}; -String STR_POOLCOLL_JAKETADRESS -{ - Text [ en-US ] = "Addressee" ; -}; -String STR_POOLCOLL_SENDADRESS -{ - Text [ en-US ] = "Sender" ; -}; -String STR_POOLCOLL_TOX_IDXH -{ - Text [ en-US ] = "Index Heading" ; -}; -String STR_POOLCOLL_TOX_IDX1 -{ - Text [ en-US ] = "Index 1" ; -}; -String STR_POOLCOLL_TOX_IDX2 -{ - Text [ en-US ] = "Index 2" ; -}; -String STR_POOLCOLL_TOX_IDX3 -{ - Text [ en-US ] = "Index 3" ; -}; -String STR_POOLCOLL_TOX_IDXBREAK -{ - Text [ en-US ] = "Index Separator" ; -}; -String STR_POOLCOLL_TOX_CNTNTH -{ - Text [ en-US ] = "Contents Heading" ; -}; -String STR_POOLCOLL_TOX_CNTNT1 -{ - Text [ en-US ] = "Contents 1" ; -}; -String STR_POOLCOLL_TOX_CNTNT2 -{ - Text [ en-US ] = "Contents 2" ; -}; -String STR_POOLCOLL_TOX_CNTNT3 -{ - Text [ en-US ] = "Contents 3" ; -}; -String STR_POOLCOLL_TOX_CNTNT4 -{ - Text [ en-US ] = "Contents 4" ; -}; -String STR_POOLCOLL_TOX_CNTNT5 -{ - Text [ en-US ] = "Contents 5" ; -}; -String STR_POOLCOLL_TOX_CNTNT6 -{ - Text [ en-US ] = "Contents 6" ; -}; -String STR_POOLCOLL_TOX_CNTNT7 -{ - Text [ en-US ] = "Contents 7" ; -}; -String STR_POOLCOLL_TOX_CNTNT8 -{ - Text [ en-US ] = "Contents 8" ; -}; -String STR_POOLCOLL_TOX_CNTNT9 -{ - Text [ en-US ] = "Contents 9" ; -}; -String STR_POOLCOLL_TOX_CNTNT10 -{ - Text [ en-US ] = "Contents 10" ; -}; -String STR_POOLCOLL_TOX_USERH -{ - Text [ en-US ] = "User Index Heading" ; -}; -String STR_POOLCOLL_TOX_USER1 -{ - Text [ en-US ] = "User Index 1" ; -}; -String STR_POOLCOLL_TOX_USER2 -{ - Text [ en-US ] = "User Index 2" ; -}; -String STR_POOLCOLL_TOX_USER3 -{ - Text [ en-US ] = "User Index 3" ; -}; -String STR_POOLCOLL_TOX_USER4 -{ - Text [ en-US ] = "User Index 4" ; -}; -String STR_POOLCOLL_TOX_USER5 -{ - Text [ en-US ] = "User Index 5" ; -}; -String STR_POOLCOLL_TOX_USER6 -{ - Text [ en-US ] = "User Index 6" ; -}; -String STR_POOLCOLL_TOX_USER7 -{ - Text [ en-US ] = "User Index 7" ; -}; -String STR_POOLCOLL_TOX_USER8 -{ - Text [ en-US ] = "User Index 8" ; -}; -String STR_POOLCOLL_TOX_USER9 -{ - Text [ en-US ] = "User Index 9" ; -}; -String STR_POOLCOLL_TOX_USER10 -{ - Text [ en-US ] = "User Index 10" ; -}; -String STR_POOLCOLL_TOX_CITATION -{ - Text [ en-US ] = "Citation" ; -}; -String STR_POOLCOLL_TOX_ILLUSH -{ - Text [ en-US ] = "Illustration Index Heading"; -}; -String STR_POOLCOLL_TOX_ILLUS1 -{ - Text [ en-US ] = "Illustration Index 1"; -}; -String STR_POOLCOLL_TOX_OBJECTH -{ - Text [ en-US ] = "Object Index Heading"; -}; -String STR_POOLCOLL_TOX_OBJECT1 -{ - Text [ en-US ] = "Object Index 1"; -}; -String STR_POOLCOLL_TOX_TABLESH -{ - Text [ en-US ] = "Table Index Heading"; -}; -String STR_POOLCOLL_TOX_TABLES1 -{ - Text [ en-US ] = "Table Index 1"; -}; -String STR_POOLCOLL_TOX_AUTHORITIESH -{ - Text [ en-US ] = "Bibliography Heading"; -}; -String STR_POOLCOLL_TOX_AUTHORITIES1 -{ - Text [ en-US ] = "Bibliography 1"; -}; - -String STR_POOLCOLL_DOC_TITEL -{ - Text [ en-US ] = "Title" ; - Text [ x-comment ] = "Document title style, not to be confused with Heading style" ; -}; -String STR_POOLCOLL_DOC_SUBTITEL -{ - Text [ en-US ] = "Subtitle" ; -}; -String STR_POOLCOLL_HTML_BLOCKQUOTE -{ - Text [ en-US ] = "Quotations" ; -}; -String STR_POOLCOLL_HTML_PRE -{ - Text [ en-US ] = "Preformatted Text" ; -}; -String STR_POOLCOLL_HTML_HR -{ - Text [ en-US ] = "Horizontal Line" ; -}; -String STR_POOLCOLL_HTML_DD -{ - Text [ en-US ] = "List Contents" ; -}; -String STR_POOLCOLL_HTML_DT -{ - Text [ en-US ] = "List Heading" ; -}; -//page style names -String STR_POOLPAGE_STANDARD -{ - Text [ en-US ] = "Default Style" ; -}; -String STR_POOLPAGE_FIRST -{ - Text [ en-US ] = "First Page" ; -}; -String STR_POOLPAGE_LEFT -{ - Text [ en-US ] = "Left Page" ; -}; -String STR_POOLPAGE_RIGHT -{ - Text [ en-US ] = "Right Page" ; -}; -String STR_POOLPAGE_JAKET -{ - Text [ en-US ] = "Envelope" ; -}; -String STR_POOLPAGE_REGISTER -{ - Text [ en-US ] = "Index" ; -}; -String STR_POOLPAGE_HTML -{ - Text [ en-US ] = "HTML" ; -}; -String STR_POOLPAGE_FOOTNOTE -{ - Text [ en-US ] = "Footnote" ; -}; -String STR_POOLPAGE_ENDNOTE -{ - Text [ en-US ] = "Endnote" ; -}; - -// Numbering rules - -String STR_POOLNUMRULE_NUM1 -{ - Text [ en-US ] = "Numbering 1" ; -}; -String STR_POOLNUMRULE_NUM2 -{ - Text [ en-US ] = "Numbering 2" ; -}; -String STR_POOLNUMRULE_NUM3 -{ - Text [ en-US ] = "Numbering 3" ; -}; -String STR_POOLNUMRULE_NUM4 -{ - Text [ en-US ] = "Numbering 4" ; -}; -String STR_POOLNUMRULE_NUM5 -{ - Text [ en-US ] = "Numbering 5" ; -}; -String STR_POOLNUMRULE_BUL1 -{ - Text [ en-US ] = "List 1" ; -}; -String STR_POOLNUMRULE_BUL2 -{ - Text [ en-US ] = "List 2" ; -}; -String STR_POOLNUMRULE_BUL3 -{ - Text [ en-US ] = "List 3" ; -}; -String STR_POOLNUMRULE_BUL4 -{ - Text [ en-US ] = "List 4" ; -}; -String STR_POOLNUMRULE_BUL5 -{ - Text [ en-US ] = "List 5" ; -}; - -String STR_POOLCHR_RUBYTEXT -{ - Text [ en-US ] = "Rubies"; -}; -String STR_COLUMN_VALUESET_ITEM0 -{ - Text [ en-US ] = "1 column"; -}; -String STR_COLUMN_VALUESET_ITEM1 -{ - Text [ en-US ] = "2 columns with equal size"; -}; -String STR_COLUMN_VALUESET_ITEM2 -{ - Text [ en-US ] = "3 columns with equal size"; -}; -String STR_COLUMN_VALUESET_ITEM3 -{ - Text [ en-US ] = "2 columns with different size (left > right)"; -}; -String STR_COLUMN_VALUESET_ITEM4 -{ - Text [ en-US ] = "2 columns with different size (left < right)"; -}; -String STR_POOLCHR_VERT_NUM -{ - Text [ en-US ] = "Vertical Numbering Symbols"; -}; - -// Table styles - -String STR_TABSTYLE_DEFAULT -{ - Text [ en-US ] = "Default Style"; -}; -String STR_TABSTYLE_3D -{ - Text [ en-US ] = "3D"; -}; -String STR_TABSTYLE_BLACK1 -{ - Text [ en-US ] = "Black 1"; -}; -String STR_TABSTYLE_BLACK2 -{ - Text [ en-US ] = "Black 2"; -}; -String STR_TABSTYLE_BLUE -{ - Text [ en-US ] = "Blue"; -}; -String STR_TABSTYLE_BROWN -{ - Text [ en-US ] = "Brown"; -}; -String STR_TABSTYLE_CURRENCY -{ - Text [ en-US ] = "Currency"; -}; -String STR_TABSTYLE_CURRENCY_3D -{ - Text [ en-US ] = "Currency 3D"; -}; -String STR_TABSTYLE_CURRENCY_GRAY -{ - Text [ en-US ] = "Currency Gray"; -}; -String STR_TABSTYLE_CURRENCY_LAVENDER -{ - Text [ en-US ] = "Currency Lavender"; -}; -String STR_TABSTYLE_CURRENCY_TURQUOISE -{ - Text [ en-US ] = "Currency Turquoise"; -}; -String STR_TABSTYLE_GRAY -{ - Text [ en-US ] = "Gray"; -}; -String STR_TABSTYLE_GREEN -{ - Text [ en-US ] = "Green"; -}; -String STR_TABSTYLE_LAVENDER -{ - Text [ en-US ] = "Lavender"; -}; -String STR_TABSTYLE_RED -{ - Text [ en-US ] = "Red"; -}; -String STR_TABSTYLE_TURQUOISE -{ - Text [ en-US ] = "Turquoise"; -}; -String STR_TABSTYLE_YELLOW -{ - Text [ en-US ] = "Yellow"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx index c5002b382f33..e9b4fbb226de 100644 --- a/sw/source/ui/utlui/swrenamexnameddlg.cxx +++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx @@ -20,8 +20,7 @@ #include <swtypes.hxx> #include <globals.hrc> -#include <utlui.hrc> -#include <../../uibase/utlui/unotools.hrc> +#include <strings.hrc> #include <unoprnms.hxx> #include <osl/diagnose.h> #include <vcl/msgbox.hxx> diff --git a/sw/source/ui/utlui/utlui.src b/sw/source/ui/utlui/utlui.src deleted file mode 100644 index c8d54c7a109d..000000000000 --- a/sw/source/ui/utlui/utlui.src +++ /dev/null @@ -1,253 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "globals.hrc" -#include "utlui.hrc" -#include "helpid.h" -#include "comcore.hrc" - -StringArray RID_SHELLRES_AUTOFMTSTRS -{ - ItemList [ en-US ] = - { - < "Remove empty paragraphs" ; > ; - < "Use replacement table" ; > ; - < "Correct TWo INitial CApitals" ; > ; - < "Capitalize first letter of sentences" ; > ; - < "Replace \"standard\" quotes with %1 \bcustom%2 quotes" ; > ; - < "Replace Custom Styles" ; > ; - < "Bullets replaced"; > ; - < "Automatic _underline_"; > ; - < "Automatic *bold*"; > ; - < "Replace 1/2 ... with ½ ..." ; > ; - < "URL recognition" ; > ; - < "Replace dashes" ; > ; - < "Replace 1st... with 1^st..." ; > ; - < "Combine single line paragraphs"; > ; - < "Set \"Text body\" Style"; > ; - < "Set \"Text body indent\" Style"; > ; - < "Set \"Hanging indent\" Style"; > ; - < "Set \"Text body indent\" Style"; > ; - < "Set \"Heading $(ARG1)\" Style"; > ; - < "Set \"Bullet\" or \"Numbering\" Style"; > ; - < "Combine paragraphs"; > ; - < "Add non breaking space"; > ; - }; -}; - -// Miscellaneous - -String STR_EVENT_OBJECT_SELECT -{ - Text [ en-US ] = "Click object" ; -}; -String STR_EVENT_START_INS_GLOSSARY -{ - Text [ en-US ] = "Before inserting AutoText"; -}; -String STR_EVENT_END_INS_GLOSSARY -{ - Text [ en-US ] = "After inserting AutoText"; -}; -String STR_EVENT_MOUSEOVER_OBJECT -{ - Text [ en-US ] = "Mouse over object" ; -}; -String STR_EVENT_MOUSECLICK_OBJECT -{ - Text [ en-US ] = "Trigger hyperlink" ; -}; -String STR_EVENT_MOUSEOUT_OBJECT -{ - Text [ en-US ] = "Mouse leaves object" ; -}; -String STR_EVENT_IMAGE_LOAD -{ - Text [ en-US ] = "Image loaded successfully" ; -}; -String STR_EVENT_IMAGE_ABORT -{ - Text [ en-US ] = "Image loading terminated" ; -}; -String STR_EVENT_IMAGE_ERROR -{ - Text [ en-US ] = "Could not load image" ; -}; -String STR_EVENT_FRM_KEYINPUT_A -{ - Text [ en-US ] = "Input of alphanumeric characters" ; -}; -String STR_EVENT_FRM_KEYINPUT_NOA -{ - Text [ en-US ] = "Input of non-alphanumeric characters" ; -}; -String STR_EVENT_FRM_RESIZE -{ - Text [ en-US ] = "Resize frame" ; -}; -String STR_EVENT_FRM_MOVE -{ - Text [ en-US ] = "Move frame" ; -}; -String STR_CONTENT_TYPE_OUTLINE -{ - Text [ en-US ] = "Headings" ; -}; -String STR_CONTENT_TYPE_TABLE -{ - Text [ en-US ] = "Tables" ; -}; -String STR_CONTENT_TYPE_FRAME -{ - Text [ en-US ] = "Text frames" ; -}; -String STR_CONTENT_TYPE_GRAPHIC -{ - Text [ en-US ] = "Images" ; -}; -String STR_CONTENT_TYPE_OLE -{ - Text [ en-US ] = "OLE objects" ; -}; -String STR_CONTENT_TYPE_BOOKMARK -{ - Text [ en-US ] = "Bookmarks" ; -}; -String STR_CONTENT_TYPE_REGION -{ - Text [ en-US ] = "Sections" ; -}; -String STR_CONTENT_TYPE_URLFIELD -{ - Text [ en-US ] = "Hyperlinks" ; -}; -String STR_CONTENT_TYPE_REFERENCE -{ - Text [ en-US ] = "References" ; -}; -String STR_CONTENT_TYPE_INDEX -{ - Text [ en-US ] = "Indexes" ; -}; -String STR_CONTENT_TYPE_DRAWOBJECT -{ - Text [ en-US ] = "Drawing objects" ; -}; -String STR_CONTENT_TYPE_POSTIT -{ - Text [ en-US ] = "Comments" ; -}; -String STR_IDXEXAMPLE_IDXTXT_HEADING1 -{ - Text [ en-US ] = "Heading 1" ; -}; -String STR_IDXEXAMPLE_IDXTXT_ENTRY1 -{ - Text [ en-US ] = "This is the content from the first chapter. This is a user directory entry." ; -}; -String STR_IDXEXAMPLE_IDXTXT_HEADING11 -{ - Text [ en-US ] = "Heading 1.1" ; -}; -String STR_IDXEXAMPLE_IDXTXT_ENTRY11 -{ - Text [ en-US ] = "This is the content from chapter 1.1. This is the entry for the table of contents." ; -}; -String STR_IDXEXAMPLE_IDXTXT_HEADING12 -{ - Text [ en-US ] = "Heading 1.2" ; -}; -String STR_IDXEXAMPLE_IDXTXT_ENTRY12 -{ - Text [ en-US ] = "This is the content from chapter 1.2. This keyword is a main entry." ; -}; -String STR_IDXEXAMPLE_IDXTXT_TABLE1 -{ - Text [ en-US ] = "Table 1: This is table 1" ; -}; -String STR_IDXEXAMPLE_IDXTXT_IMAGE1 -{ - Text [ en-US ] = "Image 1: This is image 1" ; -}; -String STR_CONTENT_TYPE_SINGLE_OUTLINE -{ - Text [ en-US ] = "Heading" ; -}; -String STR_CONTENT_TYPE_SINGLE_TABLE -{ - Text [ en-US ] = "Table" ; -}; -String STR_CONTENT_TYPE_SINGLE_FRAME -{ - Text [ en-US ] = "Text frame" ; -}; -String STR_CONTENT_TYPE_SINGLE_GRAPHIC -{ - Text [ en-US ] = "Image" ; -}; -String STR_CONTENT_TYPE_SINGLE_OLE -{ - Text [ en-US ] = "OLE object" ; -}; -String STR_CONTENT_TYPE_SINGLE_BOOKMARK -{ - Text [ en-US ] = "Bookmark" ; -}; -String STR_CONTENT_TYPE_SINGLE_REGION -{ - Text [ en-US ] = "Section" ; -}; -String STR_CONTENT_TYPE_SINGLE_URLFIELD -{ - Text [ en-US ] = "Hyperlink" ; -}; -String STR_CONTENT_TYPE_SINGLE_REFERENCE -{ - Text [ en-US ] = "Reference" ; -}; -String STR_CONTENT_TYPE_SINGLE_INDEX -{ - Text [ en-US ] = "Index" ; -}; -String STR_CONTENT_TYPE_SINGLE_POSTIT -{ - Text [ en-US ] = "Comment" ; -}; -String STR_CONTENT_TYPE_SINGLE_DRAWOBJECT -{ - Text [ en-US ] = "Draw object" ; -}; -String STR_DEFINE_NUMBERFORMAT -{ - Text [ en-US ] = "Additional formats..." ; -}; -String RID_STR_SYSTEM -{ - Text [ en-US ] = "[System]"; -}; -String STR_MULT_INTERACT_HYPH_WARN -{ - Text [ en-US ] = "The interactive hyphenation is already active\nin a different document"; -}; -String STR_HYPH_TITLE -{ - Text [ en-US ] = "Hyphenation"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src deleted file mode 100644 index 9e3730b94d4a..000000000000 --- a/sw/source/ui/web/web.src +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <svx/svxids.hrc> -#include "globals.hrc" -#include "cmdid.h" -#include "web.hrc" -#include "helpid.h" -#include "cfgid.h" - -String STR_HUMAN_SWWEBDOC_NAME -{ - Text [ en-US ] = "HTML" ; -}; -String STR_WRITER_WEBDOC_FULLTYPE -{ - Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION HTML Document"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index de15a21570a6..0f863537e58b 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -63,9 +63,8 @@ #include <cmdid.h> #include <globals.hrc> #include <app.hrc> -#include <poolfmt.hrc> +#include <strings.hrc> #include "swabstdlg.hxx" -#include "envelp.hrc" #include "envimg.hxx" #include <appenv.hxx> diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 7df4f04e4677..40982c913be0 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -113,7 +113,7 @@ using namespace ::com::sun::star; #include "swslots.hxx" #include <cfgid.h> -#include <shells.hrc> +#include <strings.hrc> SFX_IMPL_INTERFACE(SwModule, SfxModule) diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index e463f6fef4db..1c4baa115dd9 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -66,9 +66,8 @@ #include <poolfmt.hxx> #include <app.hrc> -#include <poolfmt.hrc> +#include <strings.hrc> #include "swabstdlg.hxx" -#include "envelp.hrc" #include <misc.hrc> #include <IDocumentDeviceAccess.hxx> diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 714b20cac102..9a5304e6cf48 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -99,6 +99,7 @@ #include <helpid.h> #include <cmdid.h> #include <globals.hrc> +#include <strings.hrc> #include <app.hrc> #include <cfgid.h> diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index ab2e1f490ccc..0f33a225b974 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -105,7 +105,7 @@ #include <globals.h> #include <helpid.h> #include <app.hrc> -#include <poolfmt.hrc> +#include <strings.hrc> #include <globals.hrc> #include <com/sun/star/ui/dialogs/XFilePicker2.hpp> #include <com/sun/star/ui/dialogs/XFilterManager.hpp> @@ -916,7 +916,7 @@ void SwDocShell::Execute(SfxRequest& rReq) uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker(); std::shared_ptr<const SfxFilter> pFlt; - sal_uInt16 nStrId; + const char* pStrId; if( bCreateHtml ) { @@ -924,14 +924,14 @@ void SwDocShell::Execute(SfxRequest& rReq) pFlt = SwIoSystem::GetFilterOfFormat( "HTML", SwWebDocShell::Factory().GetFilterContainer() ); - nStrId = STR_LOAD_HTML_DOC; + pStrId = STR_LOAD_HTML_DOC; } else { // for Global-documents we now only offer the current one. pFlt = SwGlobalDocShell::Factory().GetFilterContainer()-> GetFilter4Extension( "odm" ); - nStrId = STR_LOAD_GLOBAL_DOC; + pStrId = STR_LOAD_GLOBAL_DOC; } if( pFlt ) @@ -1008,7 +1008,7 @@ void SwDocShell::Execute(SfxRequest& rReq) OSL_FAIL("control access failed"); } - xFP->setTitle( SwResId( nStrId )); + xFP->setTitle(SwResId(pStrId)); SvtPathOptions aPathOpt; xFP->setDisplayDirectory( aPathOpt.GetWorkPath() ); if( ERRCODE_NONE == aDlgHelper.Execute()) diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index 4419abf03cf2..abb574054460 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -19,7 +19,6 @@ #include <hintids.hxx> -#include <svx/dialogs.hrc> #include <i18nlangtag/mslangid.hxx> #include <sot/storinfo.hxx> #include <sot/storage.hxx> diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index fb1a4328b12d..2d27a10a433f 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -52,6 +52,7 @@ #include <cmdid.h> #include <swstyle.h> #include <app.hrc> +#include <strings.hrc> #include <paratr.hxx> #include <SwStyleNameMapper.hxx> #include <svl/cjkoptions.hxx> diff --git a/sw/source/uibase/app/mainwn.cxx b/sw/source/uibase/app/mainwn.cxx index 44e4b9b1c036..fbc3340990ff 100644 --- a/sw/source/uibase/app/mainwn.cxx +++ b/sw/source/uibase/app/mainwn.cxx @@ -19,7 +19,6 @@ #include <mdiexp.hxx> #include <sfx2/progress.hxx> -#include <tools/resid.hxx> #include <docsh.hxx> #include <swmodule.hxx> #include "swtypes.hxx" @@ -46,7 +45,7 @@ static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell ) return nullptr; } -void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue, +void StartProgress( const char* pMessResId, long nStartValue, long nEndValue, SwDocShell *pDocShell ) { if( !SW_MOD()->IsEmbeddedLoadSave() ) @@ -64,7 +63,7 @@ void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue, { pProgress = new SwProgress; pProgress->pProgress = new SfxProgress( pDocShell, - SwResId(nMessResId), + SwResId(pMessResId), nEndValue - nStartValue ); pProgress->nStartCount = 1; pProgress->pDocShell = pDocShell; @@ -117,13 +116,13 @@ void EndProgress( SwDocShell *pDocShell ) } } -void SetProgressText( sal_uInt16 nId, SwDocShell *pDocShell ) +void SetProgressText(const char* pId, SwDocShell *pDocShell) { if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() ) { SwProgress *pProgress = lcl_SwFindProgress( pDocShell ); if ( pProgress ) - pProgress->pProgress->SetStateText( 0, SwResId(nId) ); + pProgress->pProgress->SetStateText(0, SwResId(pId)); } } diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx index af1e91322a80..6017d3e17d90 100644 --- a/sw/source/uibase/app/swdll.cxx +++ b/sw/source/uibase/app/swdll.cxx @@ -22,7 +22,7 @@ #include <svx/svdobj.hxx> -#include "globdoc.hrc" +#include "strings.hrc" #include <swdll.hxx> #include <wdocsh.hxx> diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index 4d03053de05e..2c6e0bc5d856 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -58,6 +58,7 @@ #include <doc.hxx> #include <cmdid.h> #include <app.hrc> +#include <strings.hrc> #include "helpid.h" #include <IDocumentLayoutAccess.hxx> diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 41b2712d87fb..0da9c3a8bff0 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -24,6 +24,7 @@ #include <vcl/wrkwin.hxx> #include <vcl/graph.hxx> #include <svtools/ehdl.hxx> +#include <tools/resmgr.hxx> #include <svx/ParaLineSpacingPopup.hxx> #include <svx/TextCharacterSpacingPopup.hxx> #include <svx/TextUnderlinePopup.hxx> @@ -125,9 +126,10 @@ #include <navsh.hxx> #include <app.hrc> +#include <error.hrc> +#include <strings.hrc> #include "bitmaps.hlst" #include <svx/xmlsecctrl.hxx> -ResMgr *pSwResMgr = nullptr; bool g_bNoInterrupt = false; #include <sfx2/app.hxx> @@ -144,7 +146,7 @@ using namespace ::com::sun::star::uno; SwModule::SwModule( SfxObjectFactory* pWebFact, SfxObjectFactory* pFact, SfxObjectFactory* pGlobalFact ) - : SfxModule( ResMgr::CreateResMgr( "sw" ), {pWebFact, pFact, pGlobalFact} ), + : SfxModule( Translate::Create("sw", Application::GetSettings().GetUILanguageTag()), {pWebFact, pFact, pGlobalFact} ), m_pModuleConfig(nullptr), m_pUsrPref(nullptr), m_pWebUsrPref(nullptr), @@ -168,12 +170,11 @@ SwModule::SwModule( SfxObjectFactory* pWebFact, m_pXSelection( nullptr ) { SetName( "StarWriter" ); - pSwResMgr = GetResMgr(); SvxErrorHandler::ensure(); m_pErrorHandler = new SfxErrorHandler( RID_SW_ERRHDL, ErrCode(ERRCODE_AREA_SW), ErrCode(ERRCODE_AREA_SW_END), - pSwResMgr ); + &GetResLocale() ); m_pModuleConfig = new SwModuleOptions; @@ -193,6 +194,12 @@ SwModule::SwModule( SfxObjectFactory* pWebFact, GetColorConfig(); } } + +OUString SwResId(const char* pId) +{ + return Translate::get(pId, SW_MOD()->GetResLocale()); +} + uno::Reference< scanner::XScannerManager2 > const & SwModule::GetScannerManager() { @@ -405,32 +412,32 @@ SfxStyleFamilies* SwModule::CreateStyleFamilies() pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Para, SwResId(STR_PARAGRAPHSTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_PARA)), - ResId(RID_PARAGRAPHSTYLEFAMILY, *pSwResMgr))); + RID_PARAGRAPHSTYLEFAMILY, GetResLocale())); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Char, SwResId(STR_CHARACTERSTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_CHAR)), - ResId(RID_CHARACTERSTYLEFAMILY, *pSwResMgr))); + RID_CHARACTERSTYLEFAMILY, GetResLocale())); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Frame, SwResId(STR_FRAMESTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_FRAME)), - ResId(RID_FRAMESTYLEFAMILY, *pSwResMgr))); + RID_FRAMESTYLEFAMILY, GetResLocale())); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Page, SwResId(STR_PAGESTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_PAGE)), - ResId(RID_PAGESTYLEFAMILY, *pSwResMgr))); + RID_PAGESTYLEFAMILY, GetResLocale())); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Pseudo, SwResId(STR_LISTSTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_LIST)), - ResId(RID_LISTSTYLEFAMILY, *pSwResMgr))); + RID_LISTSTYLEFAMILY, GetResLocale())); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Table, SwResId(STR_TABLESTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_TABLE)), - ResId(RID_TABLESTYLEFAMILY, *pSwResMgr))); + RID_TABLESTYLEFAMILY, GetResLocale())); return pStyleFamilies; } diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index 3b78f4d064ae..24c79ddc2c79 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -27,7 +27,6 @@ #include <sfx2/docfile.hxx> #include <svl/itemiter.hxx> -#include <tools/resid.hxx> #include <swtypes.hxx> #include <wrtsh.hxx> #include <poolfmt.hxx> diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index fc71c762dc18..60aeb83f28b5 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -81,7 +81,7 @@ #include <swunohelper.hxx> #include <dbui.hrc> #include <globals.hrc> -#include <statstr.hrc> +#include <strings.hrc> #include <mmconfigitem.hxx> #include <sfx2/request.hxx> #include <hintids.hxx> @@ -123,7 +123,6 @@ #include <sal/log.hxx> #include <swabstdlg.hxx> #include <fmthdft.hxx> -#include <envelp.hrc> #include <vector> #include <unomid.h> #include <section.hxx> diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 7b7ce0362c0b..2641bfb9bd03 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -41,7 +41,7 @@ #include <svtools/treelistentry.hxx> #include <helpid.h> -#include <utlui.hrc> +#include <strings.hrc> #include "bitmaps.hlst" #include <unomid.h> diff --git a/sw/source/uibase/dbui/mailmergechildwindow.src b/sw/source/uibase/dbui/mailmergechildwindow.src deleted file mode 100644 index 067a85b5c932..000000000000 --- a/sw/source/uibase/dbui/mailmergechildwindow.src +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "dbui.hrc" -#include "helpid.h" -#include <cmdid.h> - -String ST_CONTINUE -{ - Text[ en-US ] = "~Continue"; -}; - -String ST_TASK -{ - Text[ en-US ] = "Task"; -}; - -String ST_STATUS -{ - Text[ en-US ] = "Status"; -}; - -String ST_SENDINGTO -{ - Text[ en-US ] = "Sending to: %1"; -}; - -String ST_COMPLETED -{ - Text[ en-US ] = "Successfully sent"; -}; - -String ST_FAILED -{ - Text[ en-US ] = "Sending failed"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 006ef49eabac..000e76a3a76b 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -41,6 +41,7 @@ #include <sfx2/passwd.hxx> #include <dbui.hrc> +#include <strings.hrc> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -463,7 +464,7 @@ OUString SwAddressPreview::FillData( rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() ); const OUString* pAssignment = aAssignment.getConstArray(); - const ResStringArray& rDefHeaders = rConfigItem.GetDefaultAddressHeaders(); + const std::vector<std::pair<OUString, int>>& rDefHeaders = rConfigItem.GetDefaultAddressHeaders(); OUString sAddress(rAddress); OUString sNotAssigned = "<" + SwResId(STR_NOTASSIGNED) + ">"; @@ -473,7 +474,7 @@ OUString SwAddressPreview::FillData( OUString sCountryColumn; if( bSpecialReplacementForCountry ) { - sCountryColumn = rDefHeaders.GetString(MM_PART_COUNTRY); + sCountryColumn = rDefHeaders[MM_PART_COUNTRY].first; Sequence< OUString> aSpecialAssignment = rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() ); if(aSpecialAssignment.getLength() > MM_PART_COUNTRY && aSpecialAssignment[MM_PART_COUNTRY].getLength()) @@ -492,10 +493,10 @@ OUString SwAddressPreview::FillData( //find the appropriate assignment OUString sConvertedColumn = aItem.sText; for(sal_uInt32 nColumn = 0; - nColumn < rDefHeaders.Count() && nColumn < sal_uInt32(aAssignment.getLength()); + nColumn < rDefHeaders.size() && nColumn < sal_uInt32(aAssignment.getLength()); ++nColumn) { - if (rDefHeaders.GetString(nColumn) == aItem.sText && + if (rDefHeaders[nColumn].first == aItem.sText && !pAssignment[nColumn].isEmpty()) { sConvertedColumn = pAssignment[nColumn]; diff --git a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx index 8a4a10f7a2eb..e1ad415c34db 100644 --- a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx +++ b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <dbui.hrc> +#include <strings.hrc> #include <mmconfigitem.hxx> #include <swmodule.hxx> #include <view.hxx> diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 2adab839408d..2f66526a67b0 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -135,7 +135,7 @@ class SwMailMergeConfigItem_Impl : public utl::ConfigItem bool m_bIsEMailSupported; - ResStringArray m_AddressHeaderSA; + std::vector<std::pair<OUString, int>> m_AddressHeaderSA; //these addresses are not stored in the configuration std::vector< SwDocMergeInfo > m_aMergeInfos; @@ -200,12 +200,16 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() : m_bIsAuthentication(false), m_bIsEMailSupported(false), - m_AddressHeaderSA(ResId(SA_ADDRESS_HEADER, *pSwResMgr)), m_bUserSettingWereOverwritten(false), m_bIsAddressBlock_LastUserSetting(false), m_bIsGreetingLineInMail_LastUserSetting(false), m_bIsGreetingLine_LastUserSetting(false) { + for (size_t i = 0; i < SAL_N_ELEMENTS(SA_ADDRESS_HEADER); ++i) + { + m_AddressHeaderSA.push_back(std::make_pair(SwResId(SA_ADDRESS_HEADER[i].first), SA_ADDRESS_HEADER[i].second)); + } + const Sequence<OUString>& rNames = GetPropertyNames(); Sequence<Any> aValues = GetProperties(rNames); const Any* pValues = aValues.getConstArray(); @@ -378,20 +382,20 @@ static OUString lcl_CreateNodeName(Sequence<OUString>& rAssignments ) return sNewName; } -static void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeaders ) +static void lcl_ConvertToNumbers(OUString& rBlock, const std::vector<std::pair<OUString, int>>& rHeaders ) { //convert the strings used for UI to numbers used for the configuration OUString sBlock(rBlock.replaceAll("\n", "\\n")); - for(sal_uInt32 i = 0; i < rHeaders.Count(); ++i) + for (size_t i = 0; i < rHeaders.size(); ++i) { - OUString sHeader = "<" + rHeaders.GetString( i ) + ">"; + OUString sHeader = "<" + rHeaders[i].first + ">"; OUString sReplace = "<" + OUStringLiteral1('0' + i) + ">"; sBlock = sBlock.replaceAll(sHeader, sReplace); } rBlock = sBlock; } -static void lcl_ConvertFromNumbers(OUString& rBlock, const ResStringArray& rHeaders) +static void lcl_ConvertFromNumbers(OUString& rBlock, const std::vector<std::pair<OUString, int>>& rHeaders) { //convert the numbers used for the configuration to strings used for UI to numbers //doesn't use ReplaceAll to prevent expansion of numbers inside of the headers @@ -409,8 +413,8 @@ static void lcl_ConvertFromNumbers(OUString& rBlock, const ResStringArray& rHead { sBlock += "<"; sal_uInt16 nHeader = cChar - '0'; - if(nHeader < rHeaders.Count()) - sBlock += rHeaders.GetString( nHeader ); + if(nHeader < rHeaders.size()) + sBlock += rHeaders[nHeader].first; sBlock += ">"; } else @@ -737,7 +741,7 @@ void SwMailMergeConfigItem::Commit() m_pImpl->Commit(); } -const ResStringArray& SwMailMergeConfigItem::GetDefaultAddressHeaders() const +const std::vector<std::pair<OUString, int>>& SwMailMergeConfigItem::GetDefaultAddressHeaders() const { return m_pImpl->m_AddressHeaderSA; } @@ -1162,8 +1166,8 @@ OUString SwMailMergeConfigItem::GetAssignedColumn(sal_uInt32 nColumn) const Sequence< OUString> aAssignment = GetColumnAssignment( m_pImpl->m_aDBData ); if(aAssignment.getLength() > sal::static_int_cast< sal_Int32, sal_uInt32>(nColumn) && !aAssignment[nColumn].isEmpty()) sRet = aAssignment[nColumn]; - else if(nColumn < m_pImpl->m_AddressHeaderSA.Count()) - sRet = m_pImpl->m_AddressHeaderSA.GetString(nColumn); + else if(nColumn < m_pImpl->m_AddressHeaderSA.size()) + sRet = m_pImpl->m_AddressHeaderSA[nColumn].first; return sRet; } @@ -1206,7 +1210,7 @@ bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const return false; uno::Reference<container::XNameAccess> xCols = xColsSupp->getColumns(); - const ResStringArray& rHeaders = GetDefaultAddressHeaders(); + const std::vector<std::pair<OUString, int>>& rHeaders = GetDefaultAddressHeaders(); Sequence< OUString> aAssignment = GetColumnAssignment( GetCurrentDBData() ); const OUString* pAssignment = aAssignment.getConstArray(); @@ -1222,10 +1226,10 @@ bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const { OUString sConvertedColumn = aItem.sText; for(sal_uInt32 nColumn = 0; - nColumn < rHeaders.Count() && nColumn < sal_uInt32(aAssignment.getLength()); + nColumn < rHeaders.size() && nColumn < sal_uInt32(aAssignment.getLength()); ++nColumn) { - if (rHeaders.GetString(nColumn) == aItem.sText && + if (rHeaders[nColumn].first == aItem.sText && !pAssignment[nColumn].isEmpty()) { sConvertedColumn = pAssignment[nColumn]; @@ -1254,7 +1258,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const uno::Reference< XColumnsSupplier > xColsSupp( xResultSet, UNO_QUERY ); if(!xColsSupp.is()) return false; - const ResStringArray& rHeaders = GetDefaultAddressHeaders(); + const std::vector<std::pair<OUString, int>>& rHeaders = GetDefaultAddressHeaders(); uno::Reference<container::XNameAccess> xCols = xColsSupp->getColumns(); Sequence< OUString> aAssignment = @@ -1281,10 +1285,10 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const { OUString sConvertedColumn = aItem.sText; for(sal_uInt32 nColumn = 0; - nColumn < rHeaders.Count() && nColumn < sal_uInt32(aAssignment.getLength()); + nColumn < rHeaders.size() && nColumn < sal_uInt32(aAssignment.getLength()); ++nColumn) { - if (rHeaders.GetString(nColumn) == aItem.sText && + if (rHeaders[nColumn].first == aItem.sText && !pAssignment[nColumn].isEmpty()) { sConvertedColumn = pAssignment[nColumn]; diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index f04020dabfbb..df1c4368a893 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -50,6 +50,7 @@ #include <drawbase.hxx> #include <unotextrange.hxx> #include <dialog.hrc> +#include <strings.hrc> #include <cmdid.h> using namespace ::com::sun::star; diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index 6335665e2881..fd6777ab77b5 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -47,8 +47,7 @@ #include <shellio.hxx> #include <helpid.h> #include <cmdid.h> -#include <regionsw.hrc> -#include <comcore.hrc> +#include <strings.hrc> #include <globals.hrc> #include <sfx2/bindings.hxx> #include <sfx2/htmlmode.hxx> diff --git a/sw/source/uibase/dialog/regionsw.hrc b/sw/source/uibase/dialog/regionsw.hrc deleted file mode 100644 index fba4caf793c2..000000000000 --- a/sw/source/uibase/dialog/regionsw.hrc +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SW_SOURCE_UIBASE_DIALOG_REGIONSW_HRC -#define INCLUDED_SW_SOURCE_UIBASE_DIALOG_REGIONSW_HRC - -#include "dialog.hrc" - -/* global resources */ - -#define STR_QUERY_CONNECT (RC_REGIONSW_BEGIN+10) -#define STR_WRONG_PASSWORD (RC_REGIONSW_BEGIN+11) -#define STR_WRONG_PASSWD_REPEAT (RC_REGIONSW_BEGIN+12) - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/dialog/regionsw.src b/sw/source/uibase/dialog/regionsw.src deleted file mode 100644 index 5692e71cb70a..000000000000 --- a/sw/source/uibase/dialog/regionsw.src +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "regionsw.hrc" -#include "cmdid.h" -#include "globals.hrc" -#include "helpid.h" - -String STR_QUERY_CONNECT -{ - Text[ en-US ] = "A file connection will delete the contents of the current section. Connect anyway?" ; -}; - -String STR_WRONG_PASSWORD -{ - Text [ en-US ] = "The password entered is invalid." ; -}; - -String STR_WRONG_PASSWD_REPEAT -{ - Text [ en-US ] = "The password has not been set." ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 71b5c12b1a66..c674f397b1c3 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -44,7 +44,7 @@ #include <swdtflvr.hxx> #include <docsh.hxx> -#include <dochdl.hrc> +#include <strings.hrc> #include <swerror.h> #include <frmmgr.hxx> #include <vcl/layout.hxx> diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index be48f76e0df7..47ef669f8012 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -107,8 +107,7 @@ #include <swerror.h> #include <SwCapObjType.hxx> #include <cmdid.h> -#include <dochdl.hrc> -#include <comcore.hrc> +#include <strings.hrc> #include <sot/stg.hxx> #include <svx/svditer.hxx> #include <editeng/eeitem.hxx> @@ -1613,7 +1612,7 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh ) bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bMsg ) { - sal_uInt16 nResId = STR_CLPBRD_FORMAT_ERROR; + const char* pResId = STR_CLPBRD_FORMAT_ERROR; bool bRet = false; MSE40HTMLClipFormatObj aMSE40ClpObj; @@ -1684,10 +1683,10 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, SwReader aReader( *pStream, aEmptyOUStr, OUString(), *rSh.GetCursor() ); rSh.SaveTableBoxContent( &rInsPos ); if( aReader.Read( *pRead ).IsError() ) - nResId = STR_ERROR_CLPBRD_READ; + pResId = STR_ERROR_CLPBRD_READ; else { - nResId = 0; + pResId = nullptr; bRet = true; } @@ -1696,15 +1695,15 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, rSh.CallChgLnk(); } else - nResId = STR_CLPBRD_FORMAT_ERROR; + pResId = STR_CLPBRD_FORMAT_ERROR; // Exist a SvMemoryStream? (data in the OUString and xStrm is empty) if( pStream && !xStrm.is() ) delete pStream; - if( bMsg && nResId ) + if (bMsg && pResId) { - ScopedVclPtrInstance<MessageDialog>(nullptr, SwResId(nResId), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SwResId(pResId), VclMessageType::Info)->Execute(); } return bRet; } @@ -2895,19 +2894,19 @@ bool SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rDat if( pClipboard ) { aDesc = pClipboard->m_aObjDesc; - sal_uInt16 nResId; + const char* pResId; if( pClipboard->m_eBufferType & TransferBufferType::Document ) - nResId = STR_PRIVATETEXT; + pResId = STR_PRIVATETEXT; else if( pClipboard->m_eBufferType & TransferBufferType::Graphic ) - nResId = STR_PRIVATEGRAPHIC; + pResId = STR_PRIVATEGRAPHIC; else if( pClipboard->m_eBufferType == TransferBufferType::Ole ) - nResId = STR_PRIVATEOLE; + pResId = STR_PRIVATEOLE; else - nResId = 0; + pResId = nullptr; - if( nResId ) + if (pResId) { - if( STR_PRIVATEOLE == nResId || STR_PRIVATEGRAPHIC == nResId ) + if (strcmp(STR_PRIVATEOLE, pResId) == 0 || strcmp(STR_PRIVATEGRAPHIC, pResId) == 0) { // add SotClipboardFormatId::EMBED_SOURCE to the formats. This // format display then the private format name. @@ -2916,7 +2915,7 @@ bool SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rDat aFormats.insert( aFormats.begin(), aFlavorEx ); } pDlg->SetObjName( pClipboard->m_aObjDesc.maClassName, - SwResId( nResId ) ); + SwResId(pResId) ); pDlg->Insert( SotClipboardFormatId::EMBED_SOURCE, aEmptyOUStr ); } } @@ -2961,19 +2960,19 @@ void SwTransferable::FillClipFormatItem( const SwWrtShell& rSh, SwTransferable *pClipboard = GetSwTransferable( rData ); if( pClipboard ) { - sal_uInt16 nResId; + const char* pResId; if( pClipboard->m_eBufferType & TransferBufferType::Document ) - nResId = STR_PRIVATETEXT; + pResId = STR_PRIVATETEXT; else if( pClipboard->m_eBufferType & TransferBufferType::Graphic ) - nResId = STR_PRIVATEGRAPHIC; + pResId = STR_PRIVATEGRAPHIC; else if( pClipboard->m_eBufferType == TransferBufferType::Ole ) - nResId = STR_PRIVATEOLE; + pResId = STR_PRIVATEOLE; else - nResId = 0; + pResId = nullptr; - if( nResId ) - rToFill.AddClipbrdFormat( SotClipboardFormatId::EMBED_SOURCE, - SwResId( nResId ) ); + if (pResId) + rToFill.AddClipbrdFormat(SotClipboardFormatId::EMBED_SOURCE, + SwResId(pResId)); } else { diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx index 1969ce7f9128..c3cc960961c2 100644 --- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx +++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx @@ -19,9 +19,8 @@ #include <AnnotationMenuButton.hxx> -#include <annotation.hrc> #include <app.hrc> -#include <access.hrc> +#include <strings.hrc> #include <unotools/useroptions.hxx> diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index f20db12ab9a9..63b5c9e26296 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -22,7 +22,7 @@ #include <AnnotationMenuButton.hxx> #include <PostItMgr.hxx> -#include <annotation.hrc> +#include <strings.hrc> #include <cmdid.h> #include <vcl/menu.hxx> diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 0738fccd92d8..a43d402e3add 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -33,10 +33,9 @@ #include <ShadowOverlayObject.hxx> #include <OverlayRanges.hxx> -#include <annotation.hrc> -#include <docvw.hrc> +#include <strings.hrc> #include <app.hrc> -#include <access.hrc> +#include <strings.hrc> #include <viewopt.hxx> #include <cmdid.h> diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 9d567d207236..38c0df3a7077 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -8,9 +8,9 @@ */ #include <app.hrc> -#include <docvw.hrc> +#include <strings.hrc> #include <globals.hrc> -#include <svtools/svtools.hrc> +#include <svtools/strings.hrc> #include <cmdid.h> #include <DashedLine.hxx> diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index fa1c78afe3af..02b5cfcf349f 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -8,7 +8,7 @@ */ #include <globals.hrc> -#include <utlui.hrc> +#include <strings.hrc> #include "bitmaps.hlst" #include <cmdid.h> diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 1c23d54cb857..e55c14a343db 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -57,8 +57,8 @@ #include <unotools/datetime.hxx> #include <swmodule.hxx> -#include <annotation.hrc> -#include <utlui.hrc> +#include <strings.hrc> +#include <strings.hrc> #include "cmdid.h" #include <sfx2/request.hxx> diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index c38b243a5880..6f518ffaa2c8 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -27,7 +27,7 @@ #include <edtwin.hxx> #include <cmdid.h> -#include <docvw.hrc> +#include <strings.hrc> #include <unotools/securityoptions.hxx> @@ -111,19 +111,19 @@ void SidebarTextControl::LoseFocus() void SidebarTextControl::RequestHelp(const HelpEvent &rEvt) { - sal_uInt16 nResId = 0; + const char* pResId = nullptr; switch( mrSidebarWin.GetLayoutStatus() ) { - case SwPostItHelper::INSERTED: nResId = STR_REDLINE_INSERT; break; - case SwPostItHelper::DELETED: nResId = STR_REDLINE_DELETE; break; - default: nResId = 0; + case SwPostItHelper::INSERTED: pResId = STR_REDLINE_INSERT; break; + case SwPostItHelper::DELETED: pResId = STR_REDLINE_DELETE; break; + default: pResId = nullptr; } SwContentAtPos aContentAtPos( IsAttrAtPos::Redline ); - if ( nResId && + if ( pResId && mrDocView.GetWrtShell().GetContentAtPos( mrSidebarWin.GetAnchorPos(), aContentAtPos ) ) { - OUString sText = SwResId( nResId ) + ": " + + OUString sText = SwResId(pResId) + ": " + aContentAtPos.aFnd.pRedl->GetAuthorString() + " - " + GetAppLangDateTimeString( aContentAtPos.aFnd.pRedl->GetTimeStamp() ); Help::ShowQuickHelp( this,PixelToLogic(tools::Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sText); diff --git a/sw/source/uibase/docvw/annotation.hrc b/sw/source/uibase/docvw/annotation.hrc deleted file mode 100644 index 9e1b8265c756..000000000000 --- a/sw/source/uibase/docvw/annotation.hrc +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UIBASE_DOCVW_ANNOTATION_HRC -#define INCLUDED_SW_SOURCE_UIBASE_DOCVW_ANNOTATION_HRC - -#include "rcid.hrc" - -#define STR_DELETE_ALL_NOTES (RC_ANNOTATION_BEGIN + 3) -#define STR_DELETE_AUTHOR_NOTES (RC_ANNOTATION_BEGIN + 4) - -#define STR_NODATE (RC_ANNOTATION_BEGIN + 5) -#define STR_NOAUTHOR (RC_ANNOTATION_BEGIN + 6) - -#define STR_REPLY (RC_ANNOTATION_BEGIN + 7) -#define STR_FORMAT_ALL_NOTES (RC_ANNOTATION_BEGIN + 8) - -#define ANNOTATION_ACT_END STR_REPLY -#if ANNOTATION_ACT_END > RC_ANNOTATION_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/docvw/docvw.hrc b/sw/source/uibase/docvw/docvw.hrc deleted file mode 100644 index f98e300356fa..000000000000 --- a/sw/source/uibase/docvw/docvw.hrc +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UIBASE_DOCVW_DOCVW_HRC -#define INCLUDED_SW_SOURCE_UIBASE_DOCVW_DOCVW_HRC - -#include "rcid.hrc" - -#define STR_REDLINE_INSERT (RC_DOCVW_BEGIN + 9) -#define STR_REDLINE_DELETE (RC_DOCVW_BEGIN + 10) -#define STR_REDLINE_FORMAT (RC_DOCVW_BEGIN + 11) -#define STR_REDLINE_TABLE (RC_DOCVW_BEGIN + 12) -#define STR_REDLINE_FMTCOLL (RC_DOCVW_BEGIN + 13) -#define STR_REDLINE_PARAGRAPH_FORMAT (RC_DOCVW_BEGIN + 14) -#define STR_REDLINE_TABLE_ROW_INSERT (RC_DOCVW_BEGIN + 15) -#define STR_REDLINE_TABLE_ROW_DELETE (RC_DOCVW_BEGIN + 16) -#define STR_REDLINE_TABLE_CELL_INSERT (RC_DOCVW_BEGIN + 17) -#define STR_REDLINE_TABLE_CELL_DELETE (RC_DOCVW_BEGIN + 18) -#define STR_ENDNOTE (RC_DOCVW_BEGIN + 19) -#define STR_FTNNOTE (RC_DOCVW_BEGIN + 20) - -#define STR_TABLE_COL_ADJUST (RC_DOCVW_BEGIN + 21) -#define STR_TABLE_ROW_ADJUST (RC_DOCVW_BEGIN + 22) -#define STR_TABLE_SELECT_ALL (RC_DOCVW_BEGIN + 23) -#define STR_TABLE_SELECT_ROW (RC_DOCVW_BEGIN + 24) -#define STR_TABLE_SELECT_COL (RC_DOCVW_BEGIN + 25) - -#define STR_SMARTTAG_CLICK (RC_DOCVW_BEGIN + 26) - -#define STR_HEADER_TITLE (RC_DOCVW_BEGIN + 27) -#define STR_FOOTER_TITLE (RC_DOCVW_BEGIN + 28) -#define STR_DELETE_HEADER (RC_DOCVW_BEGIN + 29) -#define STR_FORMAT_HEADER (RC_DOCVW_BEGIN + 30) -#define STR_DELETE_FOOTER (RC_DOCVW_BEGIN + 31) -#define STR_FORMAT_FOOTER (RC_DOCVW_BEGIN + 32) -#define STR_FIRST_HEADER_TITLE (RC_DOCVW_BEGIN + 33) -#define STR_LEFT_HEADER_TITLE (RC_DOCVW_BEGIN + 34) -#define STR_RIGHT_HEADER_TITLE (RC_DOCVW_BEGIN + 35) -#define STR_FIRST_FOOTER_TITLE (RC_DOCVW_BEGIN + 36) -#define STR_LEFT_FOOTER_TITLE (RC_DOCVW_BEGIN + 37) -#define STR_RIGHT_FOOTER_TITLE (RC_DOCVW_BEGIN + 38) - -#define DOCVW_ACT_END STR_RIGHT_FOOTER_TITLE - -#if DOCVW_ACT_END > RC_DOCVW_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/docvw/docvw.src b/sw/source/uibase/docvw/docvw.src deleted file mode 100644 index 75f8738ac6c3..000000000000 --- a/sw/source/uibase/docvw/docvw.src +++ /dev/null @@ -1,159 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "docvw.hrc" -#include "cmdid.h" -#include "helpid.h" - -String STR_REDLINE_INSERT -{ - Text [ en-US ] = "Inserted" ; -}; -String STR_REDLINE_DELETE -{ - Text [ en-US ] = "Deleted" ; -}; -String STR_REDLINE_FORMAT -{ - Text [ en-US ] = "Formatted" ; -}; -String STR_REDLINE_TABLE -{ - Text [ en-US ] = "Table changed" ; -}; -String STR_REDLINE_FMTCOLL -{ - Text [ en-US ] = "Applied Paragraph Styles"; -}; -String STR_REDLINE_PARAGRAPH_FORMAT -{ - Text [ en-US ] = "Paragraph formatting changed"; -}; -String STR_REDLINE_TABLE_ROW_INSERT -{ - Text [ en-US ] = "Row Inserted"; -}; -String STR_REDLINE_TABLE_ROW_DELETE -{ - Text [ en-US ] = "Row Deleted"; -}; -String STR_REDLINE_TABLE_CELL_INSERT -{ - Text [ en-US ] = "Cell Inserted"; -}; -String STR_REDLINE_TABLE_CELL_DELETE -{ - Text [ en-US ] = "Cell Deleted"; -}; -String STR_ENDNOTE -{ - Text [ en-US ] = "Endnote: " ; -}; -String STR_FTNNOTE -{ - Text [ en-US ] = "Footnote: " ; -}; - -String STR_TABLE_COL_ADJUST -{ - Text [ en-US ] = "Adjust table column" ; -}; -String STR_TABLE_ROW_ADJUST -{ - Text [ en-US ] = "Adjust table row" ; -}; -String STR_TABLE_SELECT_ALL -{ - Text [ en-US ] = "Select whole table" ; -}; -String STR_TABLE_SELECT_ROW -{ - Text [ en-US ] = "Select table row" ; -}; -String STR_TABLE_SELECT_COL -{ - Text [ en-US ] = "Select table column" ; -}; - -String STR_SMARTTAG_CLICK -{ - Text [ en-US ] = "%s-click to open Smart Tag menu" ; -}; - -String STR_HEADER_TITLE -{ - Text [ en-US ] = "Header (%1)" ; -}; - -String STR_FIRST_HEADER_TITLE -{ - Text [ en-US ] = "First Page Header (%1)" ; -}; - -String STR_LEFT_HEADER_TITLE -{ - Text [ en-US ] = "Left Page Header (%1)" ; -}; - -String STR_RIGHT_HEADER_TITLE -{ - Text [ en-US ] = "Right Page Header (%1)" ; -}; - -String STR_FOOTER_TITLE -{ - Text [ en-US ] = "Footer (%1)" ; -}; - -String STR_FIRST_FOOTER_TITLE -{ - Text [ en-US ] = "First Page Footer (%1)" ; -}; - -String STR_LEFT_FOOTER_TITLE -{ - Text [ en-US ] = "Left Page Footer (%1)" ; -}; - -String STR_RIGHT_FOOTER_TITLE -{ - Text [ en-US ] = "Right Page Footer (%1)" ; -}; - -String STR_DELETE_HEADER -{ - Text [ en-US ] = "Delete Header..." ; -}; - -String STR_FORMAT_HEADER -{ - Text [ en-US ] = "Format Header..." ; -}; - -String STR_DELETE_FOOTER -{ - Text [ en-US ] = "Delete Footer..." ; -}; - -String STR_FORMAT_FOOTER -{ - Text [ en-US ] = "Format Footer..." ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 7a6dc4ab5bce..33a7ddeba68b 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -125,7 +125,7 @@ #include <helpid.h> #include <cmdid.h> -#include <docvw.hrc> +#include <strings.hrc> #include <uitool.hxx> #include <fmtfollowtextflow.hxx> #include <toolkit/helper/vclunohelper.hxx> diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 04152ea8efce..276c27441d35 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -56,8 +56,8 @@ #include <txttxmrk.hxx> #include <uitool.hxx> #include <viewopt.hxx> -#include <docvw.hrc> -#include <utlui.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <PostItMgr.hxx> #include <fmtfld.hxx> @@ -67,25 +67,25 @@ static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon ) { - sal_uInt16 nResId = 0; + const char* pResId = nullptr; switch( rRedl.GetType() ) { - case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERT; break; - case nsRedlineType_t::REDLINE_DELETE: nResId = STR_REDLINE_DELETE; break; - case nsRedlineType_t::REDLINE_FORMAT: nResId = STR_REDLINE_FORMAT; break; - case nsRedlineType_t::REDLINE_TABLE: nResId = STR_REDLINE_TABLE; break; - case nsRedlineType_t::REDLINE_FMTCOLL: nResId = STR_REDLINE_FMTCOLL; break; - case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: nResId = STR_REDLINE_PARAGRAPH_FORMAT; break; - case nsRedlineType_t::REDLINE_TABLE_ROW_INSERT: nResId = STR_REDLINE_TABLE_ROW_INSERT; break; - case nsRedlineType_t::REDLINE_TABLE_ROW_DELETE: nResId = STR_REDLINE_TABLE_ROW_DELETE; break; - case nsRedlineType_t::REDLINE_TABLE_CELL_INSERT: nResId = STR_REDLINE_TABLE_CELL_INSERT; break; - case nsRedlineType_t::REDLINE_TABLE_CELL_DELETE: nResId = STR_REDLINE_TABLE_CELL_DELETE; break; + case nsRedlineType_t::REDLINE_INSERT: pResId = STR_REDLINE_INSERT; break; + case nsRedlineType_t::REDLINE_DELETE: pResId = STR_REDLINE_DELETE; break; + case nsRedlineType_t::REDLINE_FORMAT: pResId = STR_REDLINE_FORMAT; break; + case nsRedlineType_t::REDLINE_TABLE: pResId = STR_REDLINE_TABLE; break; + case nsRedlineType_t::REDLINE_FMTCOLL: pResId = STR_REDLINE_FMTCOLL; break; + case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: pResId = STR_REDLINE_PARAGRAPH_FORMAT; break; + case nsRedlineType_t::REDLINE_TABLE_ROW_INSERT: pResId = STR_REDLINE_TABLE_ROW_INSERT; break; + case nsRedlineType_t::REDLINE_TABLE_ROW_DELETE: pResId = STR_REDLINE_TABLE_ROW_DELETE; break; + case nsRedlineType_t::REDLINE_TABLE_CELL_INSERT: pResId = STR_REDLINE_TABLE_CELL_INSERT; break; + case nsRedlineType_t::REDLINE_TABLE_CELL_DELETE: pResId = STR_REDLINE_TABLE_CELL_DELETE; break; } OUStringBuffer sBuf; - if( nResId ) + if (pResId) { - sBuf.append(SwResId(nResId)); + sBuf.append(SwResId(pResId)); sBuf.append(": "); sBuf.append(rRedl.GetAuthorString()); sBuf.append(" - "); @@ -393,37 +393,37 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) if( bContinue ) { SwTab nTabCols = rSh.WhichMouseTabCol(aPos); - sal_uInt16 nTabRes = 0; + const char* pTabRes = nullptr; switch(nTabCols) { case SwTab::COL_HORI: case SwTab::COL_VERT: - nTabRes = STR_TABLE_COL_ADJUST; + pTabRes = STR_TABLE_COL_ADJUST; break; case SwTab::ROW_HORI: case SwTab::ROW_VERT: - nTabRes = STR_TABLE_ROW_ADJUST; + pTabRes = STR_TABLE_ROW_ADJUST; break; // #i32329# Enhanced table selection case SwTab::SEL_HORI: case SwTab::SEL_HORI_RTL: case SwTab::SEL_VERT: - nTabRes = STR_TABLE_SELECT_ALL; + pTabRes = STR_TABLE_SELECT_ALL; break; case SwTab::ROWSEL_HORI: case SwTab::ROWSEL_HORI_RTL: case SwTab::ROWSEL_VERT: - nTabRes = STR_TABLE_SELECT_ROW; + pTabRes = STR_TABLE_SELECT_ROW; break; case SwTab::COLSEL_HORI: case SwTab::COLSEL_VERT: - nTabRes = STR_TABLE_SELECT_COL; + pTabRes = STR_TABLE_SELECT_COL; break; case SwTab::COL_NONE: break; // prevent compiler warning } - if(nTabRes) + if (pTabRes) { - sText = SwResId(nTabRes); + sText = SwResId(pTabRes); Size aTextSize( GetTextWidth(sText), GetTextHeight()); tools::Rectangle aRect(rEvt.GetMousePosPixel(), aTextSize); OUString sDisplayText(ClipLongToolTip(sText)); diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 64f90004230e..591e655f6d7c 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -45,7 +45,7 @@ #include <cmdid.h> #include <helpid.h> -#include <docvw.hrc> +#include <strings.hrc> using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx index 56fbc75cae0e..0ee6d59a50ef 100644 --- a/sw/source/uibase/envelp/envimg.cxx +++ b/sw/source/uibase/envelp/envimg.cxx @@ -21,7 +21,6 @@ #include <comphelper/string.hxx> #include <o3tl/any.hxx> #include <tools/stream.hxx> -#include <tools/resid.hxx> #include <sfx2/app.hxx> #include <editeng/paperinf.hxx> #include <com/sun/star/uno/Sequence.hxx> @@ -29,9 +28,9 @@ #include <swmodule.hxx> #include <swtypes.hxx> #include <envimg.hxx> +#include "strings.hrc" #include <cmdid.h> -#include <envelp.hrc> #include <unomid.h> diff --git a/sw/source/uibase/envelp/label.hrc b/sw/source/uibase/envelp/label.hrc deleted file mode 100644 index d91422e73a6e..000000000000 --- a/sw/source/uibase/envelp/label.hrc +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UIBASE_ENVELP_LABEL_HRC -#define INCLUDED_SW_SOURCE_UIBASE_ENVELP_LABEL_HRC - -#include "envelp.hrc" - -// global resources ******************************************************** -#define STR_CUSTOM (RC_LABEL_BEGIN + 1) - -// overflow check ******************************************************** - -#define LABEL_ACT_END STR_CUSTOM - -#if LABEL_ACT_END > RC_LABEL_END -#error Resource-Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/envelp/labimg.cxx b/sw/source/uibase/envelp/labimg.cxx index ceeb44caf3d8..b95ff4100e23 100644 --- a/sw/source/uibase/envelp/labimg.cxx +++ b/sw/source/uibase/envelp/labimg.cxx @@ -21,7 +21,6 @@ #include <o3tl/any.hxx> #include <tools/stream.hxx> -#include <tools/resid.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <unotools/useroptions.hxx> #include <swmodule.hxx> diff --git a/sw/source/uibase/envelp/syncbtn.cxx b/sw/source/uibase/envelp/syncbtn.cxx index 1237d50a3076..51b3f157e3b2 100644 --- a/sw/source/uibase/envelp/syncbtn.cxx +++ b/sw/source/uibase/envelp/syncbtn.cxx @@ -24,7 +24,7 @@ #include "swmodule.hxx" #include "view.hxx" #include "edtwin.hxx" -#include "label.hrc" +#include "strings.hrc" #include "syncbtn.hxx" #include "swtypes.hxx" diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index f540d076c1a1..729d3c9cbcf5 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -35,12 +35,15 @@ #include <comphelper/string.hxx> #include <editeng/unolingu.hxx> #include <unotools/localedatawrapper.hxx> +#include <tools/resary.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> #include <sfx2/linkmgr.hxx> #include <sfx2/app.hxx> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> +#include <svx/strings.hrc> +#include <svx/strarray.hxx> #include <basic/basmgr.hxx> #include <editeng/langitem.hxx> #include <svl/macitem.hxx> @@ -74,6 +77,7 @@ #include <fldmgr.hxx> #include <flddropdown.hxx> #include <fldui.hrc> +#include <strings.hrc> #include <tox.hxx> #include <misc.hrc> #include <cnttab.hxx> @@ -136,70 +140,214 @@ static const sal_uInt16 VF_COUNT = 1; // { 0 } static const sal_uInt16 VF_USR_COUNT = 2; // { 0, nsSwExtendedSubType::SUB_CMD } static const sal_uInt16 VF_DB_COUNT = 1; // { nsSwExtendedSubType::SUB_OWN_FMT } +static const char* FLD_EU_ARY[] = +{ + FLD_EU_FIRMA, + FLD_EU_VORNAME, + FLD_EU_NAME, + FLD_EU_ABK, + FLD_EU_STRASSE, + FLD_EU_LAND, + FLD_EU_PLZ, + FLD_EU_ORT, + FLD_EU_TITEL, + FLD_EU_POS, + FLD_EU_TELPRIV, + FLD_EU_TELFIRMA, + FLD_EU_FAX, + FLD_EU_EMAIL, + FLD_EU_STATE +}; + +static const char* FMT_AUTHOR_ARY[] = +{ + FMT_AUTHOR_NAME, + FMT_AUTHOR_SCUT +}; + +static const char* FLD_DATE_ARY[] = +{ + FLD_DATE_FIX, + FLD_DATE_STD, +}; + +static const char* FLD_TIME_ARY[] = +{ + FLD_TIME_FIX, + FLD_TIME_STD +}; + +static const char* FMT_NUM_ARY[] = +{ + FMT_NUM_ABC, + FMT_NUM_SABC, + FMT_NUM_ABC_N, + FMT_NUM_SABC_N, + FMT_NUM_ROMAN, + FMT_NUM_SROMAN, + FMT_NUM_ARABIC, + FMT_NUM_PAGEDESC, + FMT_NUM_PAGESPECIAL +}; + +static const char* FMT_FF_ARY[] = +{ + FMT_FF_NAME, + FMT_FF_PATHNAME, + FMT_FF_PATH, + FMT_FF_NAME_NOEXT, + FMT_FF_UI_NAME, + FMT_FF_UI_RANGE +}; + +static const char* FLD_STAT_ARY[] = +{ + FLD_STAT_PAGE, + FLD_STAT_PARA, + FLD_STAT_WORD, + FLD_STAT_CHAR, + FLD_STAT_TABLE, + FLD_STAT_GRF, + FLD_STAT_OBJ +}; + +static const char* FMT_CHAPTER_ARY[] = +{ + FMT_CHAPTER_NO, + FMT_CHAPTER_NAME, + FMT_CHAPTER_NAMENO, + FMT_CHAPTER_NO_NOSEPARATOR +}; + +static const char* FLD_INPUT_ARY[] = +{ + FLD_INPUT_TEXT +}; + +static const char* FMT_MARK_ARY[] = +{ + FMT_MARK_TEXT, + FMT_MARK_TABLE, + FMT_MARK_FRAME, + FMT_MARK_GRAFIC, + FMT_MARK_OLE +}; + +static const char* FMT_REF_ARY[] = +{ + FMT_REF_PAGE, + FMT_REF_CHAPTER, + FMT_REF_TEXT, + FMT_REF_UPDOWN, + FMT_REF_PAGE_PGDSC, + FMT_REF_ONLYNUMBER, + FMT_REF_ONLYCAPTION, + FMT_REF_ONLYSEQNO, + FMT_REF_NUMBER, + FMT_REF_NUMBER_NO_CONTEXT, + FMT_REF_NUMBER_FULL_CONTEXT +}; + +static const char* FMT_DBFLD_ARY[] = +{ + FMT_DBFLD_DB, + FMT_DBFLD_SYS +}; + +static const char* FMT_SETVAR_ARY[] = +{ + FMT_SETVAR_SYS, + FMT_SETVAR_TEXT +}; + +static const char* FMT_GETVAR_ARY[] = +{ + FMT_GETVAR_TEXT, + FMT_GETVAR_NAME +}; + +static const char* FMT_DDE_ARY[] = +{ + FMT_DDE_NORMAL, + FMT_DDE_HOT +}; + +static const char* FLD_PAGEREF_ARY[] = +{ + FLD_PAGEREF_OFF, + FLD_PAGEREF_ON +}; + +static const char* FMT_USERVAR_ARY[] = +{ + FMT_USERVAR_TEXT, + FMT_USERVAR_CMD +}; + // field types and subtypes struct SwFieldPack { - sal_uInt16 nTypeId; + sal_uInt16 nTypeId; - sal_uInt16 nSubTypeStart; - sal_uInt16 nSubTypeEnd; + const char** pSubTypeResIds; + size_t nSubTypeLength; - sal_uLong nFormatBegin; - sal_uLong nFormatEnd; + const char** pFormatResIds; + size_t nFormatLength; }; // strings and formats static const SwFieldPack aSwFields[] = { // Document - { TYP_EXTUSERFLD, FLD_EU_BEGIN, FLD_EU_END, 0, 0 }, - { TYP_AUTHORFLD, 0, 0, FMT_AUTHOR_BEGIN, FMT_AUTHOR_END }, - { TYP_DATEFLD, FLD_DATE_BEGIN, FLD_DATE_END, 0, 0 }, - { TYP_TIMEFLD, FLD_TIME_BEGIN, FLD_TIME_END, 0, 0 }, - { TYP_PAGENUMBERFLD, 0, 0, FMT_NUM_BEGIN, FMT_NUM_END-1 }, - { TYP_NEXTPAGEFLD, 0, 0, FMT_NUM_BEGIN, FMT_NUM_END }, - { TYP_PREVPAGEFLD, 0, 0, FMT_NUM_BEGIN, FMT_NUM_END }, - { TYP_FILENAMEFLD, 0, 0, FMT_FF_BEGIN, FMT_FF_END }, - { TYP_DOCSTATFLD, FLD_STAT_BEGIN, FLD_STAT_END, FMT_NUM_BEGIN, FMT_NUM_END-1 }, - - { TYP_CHAPTERFLD, 0, 0, FMT_CHAPTER_BEGIN, FMT_CHAPTER_END }, - { TYP_TEMPLNAMEFLD, 0, 0, FMT_FF_BEGIN, FMT_FF_END }, + { TYP_EXTUSERFLD, FLD_EU_ARY, SAL_N_ELEMENTS(FLD_EU_ARY), nullptr, 0 }, + { TYP_AUTHORFLD, nullptr, 0, FMT_AUTHOR_ARY, SAL_N_ELEMENTS(FMT_AUTHOR_ARY) }, + { TYP_DATEFLD, FLD_DATE_ARY, SAL_N_ELEMENTS(FLD_DATE_ARY), nullptr, 0 }, + { TYP_TIMEFLD, FLD_TIME_ARY, SAL_N_ELEMENTS(FLD_TIME_ARY), nullptr, 0 }, + { TYP_PAGENUMBERFLD, nullptr, 0, FMT_NUM_ARY, SAL_N_ELEMENTS(FMT_NUM_ARY) -1 }, + { TYP_NEXTPAGEFLD, nullptr, 0, FMT_NUM_ARY, SAL_N_ELEMENTS(FMT_NUM_ARY) }, + { TYP_PREVPAGEFLD, nullptr, 0, FMT_NUM_ARY, SAL_N_ELEMENTS(FMT_NUM_ARY) }, + { TYP_FILENAMEFLD, nullptr, 0, FMT_FF_ARY, SAL_N_ELEMENTS(FMT_FF_ARY) }, + { TYP_DOCSTATFLD, FLD_STAT_ARY, SAL_N_ELEMENTS(FLD_STAT_ARY), FMT_NUM_ARY, SAL_N_ELEMENTS(FMT_NUM_ARY) -1 }, + + { TYP_CHAPTERFLD, nullptr, 0, FMT_CHAPTER_ARY, SAL_N_ELEMENTS(FMT_CHAPTER_ARY) }, + { TYP_TEMPLNAMEFLD, nullptr, 0, FMT_FF_ARY, SAL_N_ELEMENTS(FMT_FF_ARY) }, // Functions - { TYP_CONDTXTFLD, 0, 0, 0, 0 }, - { TYP_DROPDOWN, 0, 0, 0, 0 }, - { TYP_INPUTFLD, FLD_INPUT_BEGIN, FLD_INPUT_END, 0, 0 }, - { TYP_MACROFLD, 0, 0, 0, 0 }, - { TYP_JUMPEDITFLD, 0, 0, FMT_MARK_BEGIN, FMT_MARK_END }, - { TYP_COMBINED_CHARS, 0, 0, 0, 0 }, - { TYP_HIDDENTXTFLD, 0, 0, 0, 0 }, - { TYP_HIDDENPARAFLD, 0, 0, 0, 0 }, + { TYP_CONDTXTFLD, nullptr, 0, nullptr, 0 }, + { TYP_DROPDOWN, nullptr, 0, nullptr, 0 }, + { TYP_INPUTFLD, FLD_INPUT_ARY, SAL_N_ELEMENTS(FLD_INPUT_ARY), nullptr, 0 }, + { TYP_MACROFLD, nullptr, 0, nullptr, 0 }, + { TYP_JUMPEDITFLD, nullptr, 0, FMT_MARK_ARY, SAL_N_ELEMENTS(FMT_MARK_ARY) }, + { TYP_COMBINED_CHARS, nullptr, 0, nullptr, 0 }, + { TYP_HIDDENTXTFLD, nullptr, 0, nullptr, 0 }, + { TYP_HIDDENPARAFLD, nullptr, 0, nullptr, 0 }, // Cross-References - { TYP_SETREFFLD, 0, 0, 0, 0 }, - { TYP_GETREFFLD, 0, 0, FMT_REF_BEGIN, FMT_REF_END }, + { TYP_SETREFFLD, nullptr, 0, nullptr, 0 }, + { TYP_GETREFFLD, nullptr, 0, FMT_REF_ARY, SAL_N_ELEMENTS(FMT_REF_ARY) }, // DocInformation - { TYP_DOCINFOFLD, 0, 0, FMT_REG_BEGIN, FMT_REG_END }, + { TYP_DOCINFOFLD, nullptr, 0, FMT_REF_ARY, SAL_N_ELEMENTS(FMT_REF_ARY) }, // Database - { TYP_DBFLD, 0, 0, FMT_DBFLD_BEGIN, FMT_DBFLD_END }, - { TYP_DBNEXTSETFLD, 0, 0, 0, 0 }, - { TYP_DBNUMSETFLD, 0, 0, 0, 0 }, - { TYP_DBSETNUMBERFLD, 0, 0, FMT_NUM_BEGIN, FMT_NUM_END-2 }, - { TYP_DBNAMEFLD, 0, 0, 0, 0 }, + { TYP_DBFLD, nullptr, 0, FMT_DBFLD_ARY, SAL_N_ELEMENTS(FMT_DBFLD_ARY) }, + { TYP_DBNEXTSETFLD, nullptr, 0, nullptr, 0 }, + { TYP_DBNUMSETFLD, nullptr, 0, nullptr, 0 }, + { TYP_DBSETNUMBERFLD, nullptr, 0, FMT_NUM_ARY, SAL_N_ELEMENTS(FMT_NUM_ARY) - 2 }, + { TYP_DBNAMEFLD, nullptr, 0, nullptr, 0 }, // Variables - { TYP_SETFLD, 0, 0, FMT_SETVAR_BEGIN, FMT_SETVAR_END }, - - { TYP_GETFLD, 0, 0, FMT_GETVAR_BEGIN, FMT_GETVAR_END }, - { TYP_DDEFLD, 0, 0, FMT_DDE_BEGIN, FMT_DDE_END }, - { TYP_FORMELFLD, 0, 0, FMT_GETVAR_BEGIN, FMT_GETVAR_END }, - { TYP_INPUTFLD, FLD_INPUT_BEGIN, FLD_INPUT_END, 0, 0 }, - { TYP_SEQFLD, 0, 0, FMT_NUM_BEGIN, FMT_NUM_END-2 }, - { TYP_SETREFPAGEFLD, FLD_PAGEREF_BEGIN, FLD_PAGEREF_END,0, 0 }, - { TYP_GETREFPAGEFLD, 0, 0, FMT_NUM_BEGIN, FMT_NUM_END-1 }, - { TYP_USERFLD, 0, 0, FMT_USERVAR_BEGIN, FMT_USERVAR_END } + { TYP_SETFLD, nullptr, 0, FMT_SETVAR_ARY, SAL_N_ELEMENTS(FMT_SETVAR_ARY) }, + + { TYP_GETFLD, nullptr, 0, FMT_GETVAR_ARY, SAL_N_ELEMENTS(FMT_GETVAR_ARY) }, + { TYP_DDEFLD, nullptr, 0, FMT_DDE_ARY, SAL_N_ELEMENTS(FMT_DDE_ARY) }, + { TYP_FORMELFLD, nullptr, 0, FMT_GETVAR_ARY, SAL_N_ELEMENTS(FMT_GETVAR_ARY) }, + { TYP_INPUTFLD, FLD_INPUT_ARY, SAL_N_ELEMENTS(FLD_INPUT_ARY), nullptr, 0 }, + { TYP_SEQFLD, nullptr, 0, FMT_NUM_ARY, SAL_N_ELEMENTS(FMT_NUM_ARY) - 2 }, + { TYP_SETREFPAGEFLD, FLD_PAGEREF_ARY, SAL_N_ELEMENTS(FLD_PAGEREF_ARY),nullptr, 0 }, + { TYP_GETREFPAGEFLD, nullptr, 0, FMT_NUM_ARY, SAL_N_ELEMENTS(FMT_NUM_ARY) - 1 }, + { TYP_USERFLD, nullptr, 0, FMT_USERVAR_ARY, SAL_N_ELEMENTS(FMT_USERVAR_ARY) } }; // access to the shell @@ -442,7 +590,7 @@ void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) } case TYP_INPUTFLD: { - rToFill.push_back(SwResId(aSwFields[nPos].nSubTypeStart)); + rToFill.push_back(SwResId(aSwFields[nPos].pSubTypeResIds[0])); SAL_FALLTHROUGH; // move on at generic types } case TYP_DDEFLD: @@ -497,7 +645,7 @@ void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) if (nTypeId == TYP_DOCINFOFLD) nCount = DI_SUBTYPE_END - DI_SUBTYPE_BEGIN; else - nCount = aSwFields[nPos].nSubTypeEnd - aSwFields[nPos].nSubTypeStart; + nCount = aSwFields[nPos].nSubTypeLength; for(sal_uInt16 i = 0; i < nCount; ++i) { @@ -505,12 +653,12 @@ void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) if (nTypeId == TYP_DOCINFOFLD) { if ( i == DI_CUSTOM ) - sNew = SwResId( STR_CUSTOM ); + sNew = SwResId(STR_CUSTOM_FIELD); else sNew = SwViewShell::GetShellRes()->aDocInfoLst[i]; } else - sNew = SwResId(aSwFields[nPos].nSubTypeStart + i); + sNew = SwResId(aSwFields[nPos].pSubTypeResIds[i]); rToFill.push_back(sNew); } @@ -528,45 +676,46 @@ sal_uInt16 SwFieldMgr::GetFormatCount(sal_uInt16 nTypeId, bool bHtmlMode) const { const sal_uInt16 nPos = GetPos(nTypeId); - if(nPos == USHRT_MAX || (bHtmlMode && nTypeId == TYP_SETFLD)) + if (nPos == USHRT_MAX || (bHtmlMode && nTypeId == TYP_SETFLD)) return 0; - sal_uLong nStart = aSwFields[nPos].nFormatBegin; - sal_uLong nEnd = aSwFields[nPos].nFormatEnd; + sal_uInt16 nCount = aSwFields[nPos].nFormatLength; if (nTypeId == TYP_FILENAMEFLD) - nEnd -= 2; // no range or template - - switch(nStart) + nCount -= 2; // no range or template + + const char** pStart = aSwFields[nPos].pFormatResIds; + if (!pStart) + return nCount; + + if (strcmp(*pStart, FMT_GETVAR_ARY[0]) == 0 || strcmp(*pStart, FMT_SETVAR_ARY[0]) == 0) + return VF_COUNT; + else if (strcmp(*pStart, FMT_USERVAR_ARY[0]) == 0) + return VF_USR_COUNT; + else if (strcmp(*pStart, FMT_DBFLD_ARY[0]) == 0) + return VF_DB_COUNT; + else if (strcmp(*pStart, FMT_NUM_ARY[0]) == 0) { - case FMT_GETVAR_BEGIN: - case FMT_SETVAR_BEGIN: return VF_COUNT; - case FMT_USERVAR_BEGIN: return VF_USR_COUNT; - case FMT_DBFLD_BEGIN: return VF_DB_COUNT; - case FMT_NUM_BEGIN: + GetNumberingInfo(); + if(xNumberingInfo.is()) { - sal_uInt16 nCount = (sal_uInt16)(nEnd - nStart); - GetNumberingInfo(); - if(xNumberingInfo.is()) + Sequence<sal_Int16> aTypes = xNumberingInfo->getSupportedNumberingTypes(); + const sal_Int16* pTypes = aTypes.getConstArray(); + for(sal_Int32 nType = 0; nType < aTypes.getLength(); nType++) { - Sequence<sal_Int16> aTypes = xNumberingInfo->getSupportedNumberingTypes(); - const sal_Int16* pTypes = aTypes.getConstArray(); - for(sal_Int32 nType = 0; nType < aTypes.getLength(); nType++) + sal_Int16 nCurrent = pTypes[nType]; + //skip all values below or equal to CHARS_LOWER_LETTER_N + if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N) { - sal_Int16 nCurrent = pTypes[nType]; - //skip all values below or equal to CHARS_LOWER_LETTER_N - if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N) - { - // #i28073# it's not necessarily a sorted sequence - ++nCount; - } + // #i28073# it's not necessarily a sorted sequence + ++nCount; } } - return nCount; } - + return nCount; } - return (sal_uInt16)(nEnd - nStart); + + return nCount; } } @@ -576,42 +725,39 @@ OUString SwFieldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const OSL_ENSURE(nTypeId < TYP_END, "forbidden TypeId"); const sal_uInt16 nPos = GetPos(nTypeId); - if(nPos == USHRT_MAX) + if (nPos == USHRT_MAX) return OUString(); - sal_uLong nStart; - - nStart = aSwFields[nPos].nFormatBegin; + const char** pStart = aSwFields[nPos].pFormatResIds; + if (!pStart) + return OUString(); if (TYP_AUTHORFLD == nTypeId|| TYP_FILENAMEFLD == nTypeId) nFormatId &= ~FF_FIXED; // mask out Fixed-Flag - if((nStart + nFormatId) < aSwFields[nPos].nFormatEnd) - return SwResId((sal_uInt16)(nStart + nFormatId)); + if (nFormatId < aSwFields[nPos].nFormatLength) + return SwResId(pStart[nFormatId]); OUString aRet; - if( FMT_NUM_BEGIN == nStart) + if (strcmp(*pStart, FMT_NUM_ARY[0])) { - if(xNumberingInfo.is()) + if (xNumberingInfo.is()) { - ResStringArray aNames(ResId(RID_SVXSTRARY_NUMBERINGTYPE, DIALOG_MGR())); - Sequence<sal_Int16> aTypes = xNumberingInfo->getSupportedNumberingTypes(); const sal_Int16* pTypes = aTypes.getConstArray(); - sal_Int32 nOffset = aSwFields[nPos].nFormatEnd - nStart; sal_Int32 nValidEntry = 0; - for(sal_Int32 nType = 0; nType < aTypes.getLength(); nType++) + for (sal_Int32 nType = 0; nType < aTypes.getLength(); nType++) { sal_Int16 nCurrent = pTypes[nType]; if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N && (nCurrent != (NumberingType::BITMAP | LINK_TOKEN))) { - if(nValidEntry == ((sal_Int32)nFormatId) - nOffset) + if (nValidEntry == ((sal_Int32)nFormatId)) { - sal_uInt32 n = aNames.FindIndex(pTypes[nType]); + sal_uInt32 n = SvxNumberingTypeTable::FindIndex(pTypes[nType]); if (n != RESARRAY_INDEX_NOTFOUND) { - aRet = aNames.GetString(n); + aRet = SvxNumberingTypeTable::GetString(n); } else { @@ -634,74 +780,80 @@ sal_uInt16 SwFieldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) cons sal_uInt16 nId = (sal_uInt16)nFormatId; switch( nTypeId ) { - case TYP_DOCINFOFLD: - switch( aSwFields[ GetPos( nTypeId ) ].nFormatBegin + nFormatId ) + case TYP_DOCINFOFLD: { - case FMT_REG_AUTHOR: nId = DI_SUB_AUTHOR; break; - case FMT_REG_TIME: nId = DI_SUB_TIME; break; - case FMT_REG_DATE: nId = DI_SUB_DATE; break; + const OString sId(aSwFields[GetPos(nTypeId)].pFormatResIds[nFormatId]); + if (sId == FMT_REG_AUTHOR) + nId = DI_SUB_AUTHOR; + else if (sId == FMT_REG_TIME) + nId = DI_SUB_TIME; + else if (sId == FMT_REG_DATE) + nId = DI_SUB_DATE; + break; } - break; - - case TYP_PAGENUMBERFLD: - case TYP_NEXTPAGEFLD: - case TYP_PREVPAGEFLD: - case TYP_DOCSTATFLD: - case TYP_DBSETNUMBERFLD: - case TYP_SEQFLD: - case TYP_GETREFPAGEFLD: - { - sal_uInt16 nPos = GetPos( nTypeId ); - sal_uLong nBegin = aSwFields[ nPos ].nFormatBegin; - sal_uLong nEnd = aSwFields[nPos].nFormatEnd; - if((nBegin + nFormatId) < nEnd) + case TYP_PAGENUMBERFLD: + case TYP_NEXTPAGEFLD: + case TYP_PREVPAGEFLD: + case TYP_DOCSTATFLD: + case TYP_DBSETNUMBERFLD: + case TYP_SEQFLD: + case TYP_GETREFPAGEFLD: { - switch( nBegin + nFormatId ) + sal_uInt16 nPos = GetPos(nTypeId); + if (nFormatId < aSwFields[nPos].nFormatLength) { - case FMT_NUM_ABC: nId = SVX_NUM_CHARS_UPPER_LETTER; break; - case FMT_NUM_SABC: nId = SVX_NUM_CHARS_LOWER_LETTER; break; - case FMT_NUM_ROMAN: nId = SVX_NUM_ROMAN_UPPER; break; - case FMT_NUM_SROMAN: nId = SVX_NUM_ROMAN_LOWER; break; - case FMT_NUM_ARABIC: nId = SVX_NUM_ARABIC; break; - case FMT_NUM_PAGEDESC: nId = SVX_NUM_PAGEDESC; break; - case FMT_NUM_PAGESPECIAL: nId = SVX_NUM_CHAR_SPECIAL; break; - case FMT_NUM_ABC_N: nId = SVX_NUM_CHARS_UPPER_LETTER_N; break; - case FMT_NUM_SABC_N: nId = SVX_NUM_CHARS_LOWER_LETTER_N; break; + const OString sId(aSwFields[nPos].pFormatResIds[nFormatId]); + if (sId == FMT_NUM_ABC) + nId = SVX_NUM_CHARS_UPPER_LETTER; + else if (sId == FMT_NUM_SABC) + nId = SVX_NUM_CHARS_LOWER_LETTER; + else if (sId == FMT_NUM_ROMAN) + nId = SVX_NUM_ROMAN_UPPER; + else if (sId == FMT_NUM_SROMAN) + nId = SVX_NUM_ROMAN_LOWER; + else if (sId == FMT_NUM_ARABIC) + nId = SVX_NUM_ARABIC; + else if (sId == FMT_NUM_PAGEDESC) + nId = SVX_NUM_PAGEDESC; + else if (sId == FMT_NUM_PAGESPECIAL) + nId = SVX_NUM_CHAR_SPECIAL; + else if (sId == FMT_NUM_ABC_N) + nId = SVX_NUM_CHARS_UPPER_LETTER_N; + else if (sId == FMT_NUM_SABC_N) + nId = SVX_NUM_CHARS_LOWER_LETTER_N; } - } - else if(xNumberingInfo.is()) - { - Sequence<sal_Int16> aTypes = xNumberingInfo->getSupportedNumberingTypes(); - const sal_Int16* pTypes = aTypes.getConstArray(); - sal_Int32 nOffset = nEnd - nBegin; - sal_Int32 nValidEntry = 0; - for(sal_Int32 nType = 0; nType < aTypes.getLength(); nType++) + else if (xNumberingInfo.is()) { - sal_Int16 nCurrent = pTypes[nType]; - if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N) + Sequence<sal_Int16> aTypes = xNumberingInfo->getSupportedNumberingTypes(); + const sal_Int16* pTypes = aTypes.getConstArray(); + sal_Int32 nValidEntry = 0; + for (sal_Int32 nType = 0; nType < aTypes.getLength(); nType++) { - if(nValidEntry == ((sal_Int32)nFormatId) - nOffset) + sal_Int16 nCurrent = pTypes[nType]; + if (nCurrent > NumberingType::CHARS_LOWER_LETTER_N) { - nId = pTypes[nType]; - break; + if (nValidEntry == ((sal_Int32)nFormatId)) + { + nId = pTypes[nType]; + break; + } + ++nValidEntry; } - ++nValidEntry; } } + break; } - } - break; - case TYP_DDEFLD: - switch ( aSwFields[ GetPos( nTypeId ) ].nFormatBegin + nFormatId ) + case TYP_DDEFLD: { - case FMT_DDE_NORMAL: nId = static_cast<sal_uInt16>(SfxLinkUpdateMode::ONCALL); break; - case FMT_DDE_HOT: nId = static_cast<sal_uInt16>(SfxLinkUpdateMode::ALWAYS); break; + const OString sId(aSwFields[GetPos(nTypeId)].pFormatResIds[nFormatId]); + if (sId == FMT_DDE_NORMAL) + nId = static_cast<sal_uInt16>(SfxLinkUpdateMode::ONCALL); + else if (sId == FMT_DDE_HOT) + nId = static_cast<sal_uInt16>(SfxLinkUpdateMode::ALWAYS); + break; } - break; } - return nId; - } // Traveling @@ -1558,7 +1710,8 @@ LanguageType SwFieldMgr::GetCurrLanguage() const void SwFieldType::GetFieldName_() { - static const sal_uInt16 coFieldNms[] = { + static const char* coFieldNms[] = + { FLD_DATE_STD, FLD_TIME_STD, STR_FILENAMEFLD, @@ -1602,15 +1755,15 @@ void SwFieldType::GetFieldName_() STR_AUTHORITY, STR_COMBINED_CHARS, STR_DROPDOWN, - STR_CUSTOM + STR_CUSTOM_FIELD }; // insert infos for fields SwFieldType::s_pFieldNames = new std::vector<OUString>; SwFieldType::s_pFieldNames->reserve(SAL_N_ELEMENTS(coFieldNms)); - for(sal_uInt16 i : coFieldNms) + for (const char* id : coFieldNms) { - const OUString aTmp(SwResId( i )); + const OUString aTmp(SwResId(id)); SwFieldType::s_pFieldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp )); } } diff --git a/sw/source/uibase/globdoc/globdoc.cxx b/sw/source/uibase/globdoc/globdoc.cxx index f18c6c367e99..2eca08044016 100644 --- a/sw/source/uibase/globdoc/globdoc.cxx +++ b/sw/source/uibase/globdoc/globdoc.cxx @@ -25,7 +25,7 @@ #include "swtypes.hxx" #include "shellio.hxx" #include "globdoc.hxx" -#include "globdoc.hrc" +#include "strings.hrc" #include "cfgid.h" // Description: Register all filters diff --git a/sw/source/uibase/inc/app.hrc b/sw/source/uibase/inc/app.hrc deleted file mode 100644 index c337f0f63191..000000000000 --- a/sw/source/uibase/inc/app.hrc +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_APP_HRC -#define INCLUDED_SW_SOURCE_UIBASE_INC_APP_HRC - -#include "rcid.hrc" - -#define STR_CANTCREATE (RC_APP_BEGIN + 4) -#define STR_CANTOPEN (RC_APP_BEGIN + 5) - -#define STR_VERSION (RC_APP_BEGIN + 14) - -// Strings for regions in the configuration -#define STR_PAGEOFFSET (RC_APP_BEGIN + 74) -#define STR_PAGEBREAK (RC_APP_BEGIN + 75) -#define STR_REDLINE_UNKNOWN_AUTHOR (RC_APP_BEGIN + 76) -#define STR_WESTERN_FONT (RC_APP_BEGIN + 77) -#define STR_CJK_FONT (RC_APP_BEGIN + 78) -#define STR_DELETE_NOTE_AUTHOR (RC_APP_BEGIN + 79) -#define STR_HIDE_NOTE_AUTHOR (RC_APP_BEGIN + 80) - -#define STR_ENV_TITLE (RC_APP_BEGIN + 91) -#define STR_LAB_TITLE (RC_APP_BEGIN + 92) - -#define STR_HUMAN_SWDOC_NAME (RC_APP_BEGIN + 93) - -#define RID_SW_ERRHDL (RC_APP_BEGIN + 95) - -#define STR_FDLG_TEMPLATE_NAME (RC_APP_BEGIN + 2) - -#define STR_WRITER_DOCUMENT_FULLTYPE (RC_APP_BEGIN + 100) -#define STR_CONVERT_TEXT_TABLE (RC_APP_BEGIN + 101) -#define STR_ABSTRACT_TITLE (RC_APP_BEGIN + 102) -#define STR_OUTLINE_NUMBERING (RC_APP_BEGIN + 104) -#define STR_FDLG_OUTLINE_LEVEL (RC_APP_BEGIN + 105) -#define STR_FDLG_STYLE (RC_APP_BEGIN + 106) - -// Status bar strings -#define STR_STATUSBAR_WORDCOUNT_NO_SELECTION (RC_APP_BEGIN + 110) -#define STR_STATUSBAR_WORDCOUNT (RC_APP_BEGIN + 111) - -#define STR_ADD_AUTOFORMAT_TITLE (RC_APP_BEGIN + 112) -#define STR_ADD_AUTOFORMAT_LABEL (RC_APP_BEGIN + 113) -#define STR_DEL_AUTOFORMAT_TITLE (RC_APP_BEGIN + 114) -#define STR_DEL_AUTOFORMAT_MSG (RC_APP_BEGIN + 115) -#define STR_RENAME_AUTOFORMAT_TITLE (RC_APP_BEGIN + 116) -#define STR_BTN_AUTOFORMAT_CLOSE (RC_APP_BEGIN + 117) -#define STR_INVALID_AUTOFORMAT_NAME (RC_APP_BEGIN + 118) -#define STR_JAN (RC_APP_BEGIN + 119) -#define STR_FEB (RC_APP_BEGIN + 120) -#define STR_MAR (RC_APP_BEGIN + 121) -#define STR_NORTH (RC_APP_BEGIN + 122) -#define STR_MID (RC_APP_BEGIN + 123) -#define STR_SOUTH (RC_APP_BEGIN + 124) -#define STR_SUM (RC_APP_BEGIN + 125) -#define STR_NUMERIC (RC_APP_BEGIN + 126) -#define STR_COL (RC_APP_BEGIN + 127) -#define STR_ROW (RC_APP_BEGIN + 128) -#define STR_AUTHMRK_EDIT (RC_APP_BEGIN + 130) -#define STR_AUTHMRK_INSERT (RC_APP_BEGIN + 131) -#define STR_CAPTION_TABLE (RC_APP_BEGIN + 133) -#define STR_CAPTION_FRAME (RC_APP_BEGIN + 134) -#define STR_CAPTION_GRAPHIC (RC_APP_BEGIN + 135) -#define STR_CAPTION_OLE (RC_APP_BEGIN + 136) -#define STR_ERR_TABLE_MERGE (RC_APP_BEGIN + 137) -#define STR_WRONG_TABLENAME (RC_APP_BEGIN + 138) -#define STR_SRTERR (RC_APP_BEGIN + 139) - -#define STR_PARAGRAPHSTYLEFAMILY (RC_APP_BEGIN + 140) -#define STR_CHARACTERSTYLEFAMILY (RC_APP_BEGIN + 141) -#define STR_FRAMESTYLEFAMILY (RC_APP_BEGIN + 142) -#define STR_PAGESTYLEFAMILY (RC_APP_BEGIN + 143) -#define STR_LISTSTYLEFAMILY (RC_APP_BEGIN + 144) -#define STR_TABLESTYLEFAMILY (RC_APP_BEGIN + 145) -#define RID_PARAGRAPHSTYLEFAMILY (RC_APP_BEGIN + 146) -#define RID_CHARACTERSTYLEFAMILY (RC_APP_BEGIN + 147) -#define RID_FRAMESTYLEFAMILY (RC_APP_BEGIN + 148) -#define RID_PAGESTYLEFAMILY (RC_APP_BEGIN + 149) -#define RID_LISTSTYLEFAMILY (RC_APP_BEGIN + 150) -#define RID_TABLESTYLEFAMILY (RC_APP_BEGIN + 151) - -#define APP_ACT_END RID_TABLESTYLEFAMILY - -#if APP_ACT_END > RC_APP_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/cnttab.hxx b/sw/source/uibase/inc/cnttab.hxx index d9c63a78ba03..504edf633605 100644 --- a/sw/source/uibase/inc/cnttab.hxx +++ b/sw/source/uibase/inc/cnttab.hxx @@ -30,7 +30,6 @@ #include "tox.hxx" #include <toxmgr.hxx> #include <svx/checklbx.hxx> -#include <tools/resary.hxx> #include <svtools/treelistbox.hxx> #include <vcl/menubtn.hxx> #include <svx/langbox.hxx> @@ -64,18 +63,6 @@ struct CurTOXType CurTOXType (TOXTypes t) : eType (t), nIndex (0) {}; }; -class SwOLENames -{ - ResStringArray aNamesAry; -public: - SwOLENames(const ResId& rResId) - : aNamesAry(rResId) - { - } - - ResStringArray& GetNames() { return aNamesAry;} -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/dialmgr.hxx b/sw/source/uibase/inc/dialmgr.hxx deleted file mode 100644 index 91695bdeb4a7..000000000000 --- a/sw/source/uibase/inc/dialmgr.hxx +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_DIALMGR_HXX -#define INCLUDED_SW_SOURCE_UIBASE_INC_DIALMGR_HXX - -#include <tools/resid.hxx> - -struct SwDialogsResMgr -{ - static ResMgr* GetResMgr(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 9aa04255aab4..aa7d0916a047 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -89,9 +89,6 @@ class SwFramePage: public SfxTabPage // example VclPtr<SvxSwFrameExample> m_pExampleWN; - //'string provider' - SvxSwFramePosString m_aFramePosString; - bool m_bAtHorzPosModified; bool m_bAtVertPosModified; @@ -166,7 +163,7 @@ class SwFramePage: public SfxTabPage const sal_Int16 _nRel, ListBox& _rLB, FixedText& _rFT ); - sal_Int32 GetMapPos( const FrameMap *pMap, ListBox &rAlignLB ); + static sal_Int32 GetMapPos(const FrameMap *pMap, ListBox &rAlignLB); static sal_Int16 GetAlignment(FrameMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); static sal_Int16 GetRelation(FrameMap *pMap, ListBox &rRelationLB); RndStdIds GetAnchor(); diff --git a/sw/source/uibase/inc/frmui.hrc b/sw/source/uibase/inc/frmui.hrc index 22fff4967fd8..6d8fbf133db1 100644 --- a/sw/source/uibase/inc/frmui.hrc +++ b/sw/source/uibase/inc/frmui.hrc @@ -25,29 +25,8 @@ #define DLG_COLUMN (RC_FRMDLG_BEGIN + 4) -#define STR_FRMUI_BORDER (RC_FRMDLG_BEGIN + 16) -#define STR_FRMUI_PATTERN (RC_FRMDLG_BEGIN + 17) - #define MN_BACKGROUND (RC_FRMDLG_BEGIN + 27) -#define STR_FRMDLG_BEGIN (RC_FRMDLG_BEGIN + 31) - -#define STR_COLUMN (STR_FRMDLG_BEGIN + 17) - -#define STR_OLE_INSERT (STR_FRMDLG_BEGIN + 45) -#define STR_OLE_EDIT (STR_FRMDLG_BEGIN + 46) -#define STR_COLL_HEADER (STR_FRMDLG_BEGIN + 47) - -#define STR_LINE_TOP (STR_FRMDLG_BEGIN + 50) -#define STR_LINE_BOTTOM (STR_FRMDLG_BEGIN + 51) -#define STR_LINE_CENTER (STR_FRMDLG_BEGIN + 52) - -#define FRMDLG_ACT_END STR_LINE_CENTER - -#if FRMDLG_ACT_END > RC_FRMDLG_END -#error Resource-Id Ueberlauf in #file, #line -#endif - #endif // FRMUI_HRC /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/globdoc.hrc b/sw/source/uibase/inc/globdoc.hrc deleted file mode 100644 index 7be2d6b210a5..000000000000 --- a/sw/source/uibase/inc/globdoc.hrc +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_GLOBDOC_HRC -#define INCLUDED_SW_SOURCE_UIBASE_INC_GLOBDOC_HRC - -#include "rcid.hrc" - -#define STR_HUMAN_SWGLOBDOC_NAME (RC_GLOBDOC_BEGIN + 2) -#define STR_WRITER_GLOBALDOC_FULLTYPE (RC_GLOBDOC_BEGIN + 5) - -#define GLOBDOC_ACT_END STR_WRITER_GLOBALDOC_FULLTYPE - -#if GLOBDOC_ACT_END > RC_GLOBDOC_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/misc.hrc b/sw/source/uibase/inc/misc.hrc index cfa41471db6f..c9189e5ac191 100644 --- a/sw/source/uibase/inc/misc.hrc +++ b/sw/source/uibase/inc/misc.hrc @@ -26,29 +26,6 @@ #define DLG_TAB_OUTLINE (RC_MISC_BEGIN + 29) -#define STR_DOUBLE_SHORTNAME (RC_MISC_BEGIN + 30) -#define STR_QUERY_DELETE (RC_MISC_BEGIN + 31) -#define STR_QUERY_DELETE_GROUP1 (RC_MISC_BEGIN + 32) -#define STR_QUERY_DELETE_GROUP2 (RC_MISC_BEGIN + 33) -#define STR_NO_GLOSSARIES (RC_MISC_BEGIN + 34) - -#define STR_GLOSSARY (RC_MISC_BEGIN + 43) -#define STR_CHANGE_START (RC_MISC_BEGIN + 44) -#define STR_CHANGE_END (RC_MISC_BEGIN + 45) -#define STR_SAVE_GLOSSARY (RC_MISC_BEGIN + 46) - -#define STR_MY_AUTOTEXT (RC_MISC_BEGIN + 64) - -#define STR_COMMENTS_LABEL (RC_MISC_BEGIN + 65) -#define STR_SHOW_COMMENTS (RC_MISC_BEGIN + 66) -#define STR_HIDE_COMMENTS (RC_MISC_BEGIN + 67) - -#define MISC_ACT_END STR_HIDE_COMMENTS - -#if MISC_ACT_END > RC_MISC_END -#error Resource-Id Ueberlauf in #file, #line -#endif - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/mmconfigitem.hxx b/sw/source/uibase/inc/mmconfigitem.hxx index 84b78faa9323..0e86af95eed2 100644 --- a/sw/source/uibase/inc/mmconfigitem.hxx +++ b/sw/source/uibase/inc/mmconfigitem.hxx @@ -22,9 +22,9 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/view/XSelectionChangeListener.hpp> -#include <tools/resary.hxx> #include <memory> #include <set> +#include <vector> #include <swdbdata.hxx> #include "swdllapi.h" #include "sharedconnection.hxx" @@ -77,7 +77,7 @@ public: void Commit(); - const ResStringArray& GetDefaultAddressHeaders() const; + const std::vector<std::pair<OUString, int>>& GetDefaultAddressHeaders() const; void SetCurrentConnection( css::uno::Reference< css::sdbc::XDataSource> const & xSource, diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index 484c7f6318f0..b530f4557a30 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -35,6 +35,14 @@ class SwFieldMgr; class SvTreeListEntry; class SwWrtShell; +class SwFieldUnitTable +{ +public: + static OUString GetString(sal_uInt32 i); + static sal_uInt32 Count(); + static FieldUnit GetValue(sal_uInt32 i); +}; + class SwLoadOptPage : public SfxTabPage { private: diff --git a/sw/source/uibase/inc/ribbar.hrc b/sw/source/uibase/inc/ribbar.hrc deleted file mode 100644 index 5a51a490e99e..000000000000 --- a/sw/source/uibase/inc/ribbar.hrc +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_RIBBAR_HRC -#define INCLUDED_SW_SOURCE_UIBASE_INC_RIBBAR_HRC - -#include "rcid.hrc" - -#define STR_TBL_FORMULA (RC_RIBBAR_BEGIN +8) - -#define ST_TBL (RC_RIBBAR_BEGIN + 14) -#define ST_FRM (RC_RIBBAR_BEGIN + 15) -#define ST_PGE (RC_RIBBAR_BEGIN + 16) -#define ST_DRW (RC_RIBBAR_BEGIN + 17) -#define ST_CTRL (RC_RIBBAR_BEGIN + 18) -#define ST_REG (RC_RIBBAR_BEGIN + 19) -#define ST_BKM (RC_RIBBAR_BEGIN + 20) -#define ST_GRF (RC_RIBBAR_BEGIN + 21) -#define ST_OLE (RC_RIBBAR_BEGIN + 22) -#define ST_OUTL (RC_RIBBAR_BEGIN + 23) -#define ST_SEL (RC_RIBBAR_BEGIN + 24) -#define ST_FTN (RC_RIBBAR_BEGIN + 25) -#define ST_MARK (RC_RIBBAR_BEGIN + 26) -#define ST_POSTIT (RC_RIBBAR_BEGIN + 27) -#define ST_SRCH_REP (RC_RIBBAR_BEGIN + 28) -#define ST_INDEX_ENTRY (RC_RIBBAR_BEGIN + 29) -#define ST_TABLE_FORMULA (RC_RIBBAR_BEGIN + 30) -#define ST_TABLE_FORMULA_ERROR (RC_RIBBAR_BEGIN + 31) -#define STR_FORMULA_CALC (RC_RIBBAR_BEGIN + 32) -#define STR_FORMULA_CANCEL (RC_RIBBAR_BEGIN + 33) -#define STR_FORMULA_APPLY (RC_RIBBAR_BEGIN + 34) - -#define STR_IMGBTN_START (RC_RIBBAR_BEGIN + 35) - -#define STR_IMGBTN_NEXT_DOWN (STR_IMGBTN_START + 0) -#define STR_IMGBTN_PREV_DOWN (STR_IMGBTN_START + 1) -#define STR_IMGBTN_TBL_DOWN (STR_IMGBTN_START + 2) -#define STR_IMGBTN_FRM_DOWN (STR_IMGBTN_START + 3) -#define STR_IMGBTN_PGE_DOWN (STR_IMGBTN_START + 4) -#define STR_IMGBTN_DRW_DOWN (STR_IMGBTN_START + 5) -#define STR_IMGBTN_CTRL_DOWN (STR_IMGBTN_START + 6) -#define STR_IMGBTN_REG_DOWN (STR_IMGBTN_START + 7) -#define STR_IMGBTN_BKM_DOWN (STR_IMGBTN_START + 8) -#define STR_IMGBTN_GRF_DOWN (STR_IMGBTN_START + 9) -#define STR_IMGBTN_OLE_DOWN (STR_IMGBTN_START +10) -#define STR_IMGBTN_OUTL_DOWN (STR_IMGBTN_START +11) -#define STR_IMGBTN_SEL_DOWN (STR_IMGBTN_START +12) -#define STR_IMGBTN_FTN_DOWN (STR_IMGBTN_START +13) -#define STR_IMGBTN_MARK_DOWN (STR_IMGBTN_START +14) -#define STR_IMGBTN_POSTIT_DOWN (STR_IMGBTN_START +15) -#define STR_IMGBTN_SRCH_REP_DOWN (STR_IMGBTN_START +16) -#define STR_IMGBTN_INDEX_ENTRY_DOWN (STR_IMGBTN_START +17) -#define STR_IMGBTN_TBLFML_DOWN (STR_IMGBTN_START +18) -#define STR_IMGBTN_TBLFML_ERR_DOWN (STR_IMGBTN_START +19) - -#define STR_IMGBTN_NEXT_UP (STR_IMGBTN_START +20) -#define STR_IMGBTN_PREV_UP (STR_IMGBTN_START +21) -#define STR_IMGBTN_TBL_UP (STR_IMGBTN_START +22) -#define STR_IMGBTN_FRM_UP (STR_IMGBTN_START +23) -#define STR_IMGBTN_PGE_UP (STR_IMGBTN_START +24) -#define STR_IMGBTN_DRW_UP (STR_IMGBTN_START +25) -#define STR_IMGBTN_CTRL_UP (STR_IMGBTN_START +26) -#define STR_IMGBTN_REG_UP (STR_IMGBTN_START +27) -#define STR_IMGBTN_BKM_UP (STR_IMGBTN_START +28) -#define STR_IMGBTN_GRF_UP (STR_IMGBTN_START +29) -#define STR_IMGBTN_OLE_UP (STR_IMGBTN_START +30) -#define STR_IMGBTN_OUTL_UP (STR_IMGBTN_START +31) -#define STR_IMGBTN_SEL_UP (STR_IMGBTN_START +32) -#define STR_IMGBTN_FTN_UP (STR_IMGBTN_START +33) -#define STR_IMGBTN_MARK_UP (STR_IMGBTN_START +34) -#define STR_IMGBTN_POSTIT_UP (STR_IMGBTN_START +35) -#define STR_IMGBTN_SRCH_REP_UP (STR_IMGBTN_START +36) -#define STR_IMGBTN_INDEX_ENTRY_UP (STR_IMGBTN_START +37) -#define STR_IMGBTN_TBLFML_UP (STR_IMGBTN_START +38) -#define STR_IMGBTN_TBLFML_ERR_UP (STR_IMGBTN_START +39) - -#define RC_RIBBAR_ACT_END STR_IMGBTN_TBLFML_ERR_UP - -#if RC_RIBBAR_ACT_END > RC_RIBBAR_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/shells.hrc b/sw/source/uibase/inc/shells.hrc deleted file mode 100644 index 80a4b0118a01..000000000000 --- a/sw/source/uibase/inc/shells.hrc +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SHELLS_HRC -#define INCLUDED_SW_SOURCE_UIBASE_INC_SHELLS_HRC - -#include "rcid.hrc" - -#define STR_GRFILTER_OPENERROR (RC_SHELLS_BEGIN + 1) -#define STR_GRFILTER_IOERROR (RC_SHELLS_BEGIN + 2) -#define STR_GRFILTER_FORMATERROR (RC_SHELLS_BEGIN + 3) -#define STR_GRFILTER_VERSIONERROR (RC_SHELLS_BEGIN + 4) -#define STR_GRFILTER_FILTERERROR (RC_SHELLS_BEGIN + 5) -#define STR_GRFILTER_TOOBIG (RC_SHELLS_BEGIN + 6) -#define STR_INSERT_GRAPHIC (RC_SHELLS_BEGIN + 7) -#define STR_REDLINE_COMMENT (RC_SHELLS_BEGIN + 11) -#define STR_REDLINE_INSERTED (RC_SHELLS_BEGIN + 12) -#define STR_REDLINE_DELETED (RC_SHELLS_BEGIN + 13) -#define STR_REDLINE_FMTCOLLSET (RC_SHELLS_BEGIN + 14) - -#define STR_SWBG_PARAGRAPH (RC_SHELLS_BEGIN + 37) -#define STR_SWBG_GRAPHIC (RC_SHELLS_BEGIN + 38) -#define STR_SWBG_OLE (RC_SHELLS_BEGIN + 39) -#define STR_SWBG_FRAME (RC_SHELLS_BEGIN + 40) -#define STR_SWBG_TABLE (RC_SHELLS_BEGIN + 41) -#define STR_SWBG_TABLE_ROW (RC_SHELLS_BEGIN + 42) -#define STR_SWBG_TABLE_CELL (RC_SHELLS_BEGIN + 43) -#define STR_SWBG_PAGE (RC_SHELLS_BEGIN + 44) -#define STR_SWBG_HEADER (RC_SHELLS_BEGIN + 45) -#define STR_SWBG_FOOTER (RC_SHELLS_BEGIN + 46) - - -#define STR_REDLINE_FORMATED (RC_SHELLS_BEGIN + 50) -#define STR_REDLINE_TABLECHG (RC_SHELLS_BEGIN + 51) - -#define STR_REDLINE_TITLE (RC_SHELLS_BEGIN + 52) -#define STR_REDLINE_MSG (RC_SHELLS_BEGIN + 53) -#define STR_REDLINE_ACCEPT_ALL (RC_SHELLS_BEGIN + 54) -#define STR_REDLINE_REJECT_ALL (RC_SHELLS_BEGIN + 55) -#define STR_REDLINE_EDIT (RC_SHELLS_BEGIN + 56) -#define STR_REDLINE_AUTOFMT (RC_SHELLS_BEGIN + 57) - -#define SHELLS_ACT_END STR_REDLINE_AUTOFMT - -#if SHELLS_ACT_END > RC_SHELLS_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx index a74362bf8135..e3a9f29e3729 100644 --- a/sw/source/uibase/inc/swuiccoll.hxx +++ b/sw/source/uibase/inc/swuiccoll.hxx @@ -19,8 +19,6 @@ #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SWUICCOLL_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_SWUICCOLL_HXX -#include <tools/resary.hxx> - class SwWrtShell; class SwFormat; diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 632520ac0b0b..248985073902 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -175,7 +175,6 @@ class SwTOXSelectTabPage : public SfxTabPage VclPtr<MenuButton> m_pAutoMarkPB; // object only - SwOLENames aFromNames; VclPtr<SvxCheckListBox> m_pFromObjCLB; VclPtr<VclContainer> m_pFromObjFrame; diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx index f6bd26548917..adface937008 100644 --- a/sw/source/uibase/inc/unotools.hxx +++ b/sw/source/uibase/inc/unotools.hxx @@ -29,7 +29,6 @@ #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/text/XTextCursor.hpp> #include <com/sun/star/awt/XControl.hpp> -#include <tools/resary.hxx> #include "swdllapi.h" class SwOneExampleFrame; @@ -65,7 +64,6 @@ class SW_DLLPUBLIC SwOneExampleFrame Idle m_aLoadedIdle; Link<SwOneExampleFrame&,void> m_aInitializedLink; - ResStringArray m_aMenuRes; OUString m_sArgumentURL; SwView* m_pModuleView; diff --git a/sw/source/uibase/inc/utlui.hrc b/sw/source/uibase/inc/utlui.hrc deleted file mode 100644 index 45b611814616..000000000000 --- a/sw/source/uibase/inc/utlui.hrc +++ /dev/null @@ -1,200 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_UTLUI_HRC -#define INCLUDED_SW_SOURCE_UIBASE_INC_UTLUI_HRC - -#include "rcid.hrc" - -#define RID_STR_SYSTEM (RC_UTLUI_BEGIN + 2) - -// Strings in NumberFormatter-Listbox -#define STR_DEFINE_NUMBERFORMAT (RC_UTLUI_BEGIN + 4) - -// names of content types (RC_UTLUI_BEGIN + 7) -#define STR_CONTENT_TYPE_FIRST (RC_UTLUI_BEGIN + 8) -#define STR_CONTENT_TYPE_OUTLINE STR_CONTENT_TYPE_FIRST -#define STR_CONTENT_TYPE_TABLE (RC_UTLUI_BEGIN + 9) -#define STR_CONTENT_TYPE_FRAME (RC_UTLUI_BEGIN + 10) -#define STR_CONTENT_TYPE_GRAPHIC (RC_UTLUI_BEGIN + 11) -#define STR_CONTENT_TYPE_OLE (RC_UTLUI_BEGIN + 12) -#define STR_CONTENT_TYPE_BOOKMARK (RC_UTLUI_BEGIN + 13) -#define STR_CONTENT_TYPE_REGION (RC_UTLUI_BEGIN + 14) -#define STR_CONTENT_TYPE_URLFIELD (RC_UTLUI_BEGIN + 15) -#define STR_CONTENT_TYPE_REFERENCE (RC_UTLUI_BEGIN + 16) -#define STR_CONTENT_TYPE_INDEX (RC_UTLUI_BEGIN + 17) -#define STR_CONTENT_TYPE_POSTIT (RC_UTLUI_BEGIN + 18) -#define STR_CONTENT_TYPE_DRAWOBJECT (RC_UTLUI_BEGIN + 19) -// Statusbar: Word count/Viewlayout/Page count -#define STR_WORDCOUNT_HINT (RC_UTLUI_BEGIN + 20) -#define STR_VIEWLAYOUT_ONE (RC_UTLUI_BEGIN + 21) -#define STR_VIEWLAYOUT_MULTI (RC_UTLUI_BEGIN + 22) -#define STR_VIEWLAYOUT_BOOK (RC_UTLUI_BEGIN + 23) -#define STR_BOOKCTRL_HINT (RC_UTLUI_BEGIN + 24) -#define STR_BOOKCTRL_HINT_EXTENDED (RC_UTLUI_BEGIN + 25) -#define STR_TMPLCTRL_HINT (RC_UTLUI_BEGIN + 26) -#define STR_CONTENT_END (RC_UTLUI_BEGIN + 26) - -#define STR_CONTENT_TYPE_SINGLE_FIRST (STR_CONTENT_END + 1) -#define STR_CONTENT_TYPE_SINGLE_OUTLINE (STR_CONTENT_TYPE_SINGLE_FIRST + 0) -#define STR_CONTENT_TYPE_SINGLE_TABLE (STR_CONTENT_TYPE_SINGLE_FIRST + 1) -#define STR_CONTENT_TYPE_SINGLE_FRAME (STR_CONTENT_TYPE_SINGLE_FIRST + 2) -#define STR_CONTENT_TYPE_SINGLE_GRAPHIC (STR_CONTENT_TYPE_SINGLE_FIRST + 3) -#define STR_CONTENT_TYPE_SINGLE_OLE (STR_CONTENT_TYPE_SINGLE_FIRST + 4) -#define STR_CONTENT_TYPE_SINGLE_BOOKMARK (STR_CONTENT_TYPE_SINGLE_FIRST + 5) -#define STR_CONTENT_TYPE_SINGLE_REGION (STR_CONTENT_TYPE_SINGLE_FIRST + 6) -#define STR_CONTENT_TYPE_SINGLE_URLFIELD (STR_CONTENT_TYPE_SINGLE_FIRST + 7) -#define STR_CONTENT_TYPE_SINGLE_REFERENCE (STR_CONTENT_TYPE_SINGLE_FIRST + 8) -#define STR_CONTENT_TYPE_SINGLE_INDEX (STR_CONTENT_TYPE_SINGLE_FIRST + 9) -#define STR_CONTENT_TYPE_SINGLE_POSTIT (STR_CONTENT_TYPE_SINGLE_FIRST + 10) -#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_TITEL FLD_DOCINFO_BEGIN -#define FLD_DOCINFO_THEMA (FLD_DOCINFO_BEGIN + 1) -#define FLD_DOCINFO_KEYS (FLD_DOCINFO_BEGIN + 2) -#define FLD_DOCINFO_COMMENT (FLD_DOCINFO_BEGIN + 3) -#define FLD_DOCINFO_CREATE (FLD_DOCINFO_BEGIN + 4) -#define FLD_DOCINFO_CHANGE (FLD_DOCINFO_BEGIN + 5) -#define FLD_DOCINFO_PRINT (FLD_DOCINFO_BEGIN + 6) -#define FLD_DOCINFO_DOCNO (FLD_DOCINFO_BEGIN + 7) -#define FLD_DOCINFO_EDIT (FLD_DOCINFO_BEGIN + 8) -#define FLD_DOCINFO_END (FLD_DOCINFO_BEGIN + 9) - -#define STR_SERVICE_UNAVAILABLE (FLD_DOCINFO_END + 1) - -#define STR_AUTH_TYPE_START (FLD_DOCINFO_END + 2) -#define STR_AUTH_TYPE_ARTICLE (STR_AUTH_TYPE_START + 0) -#define STR_AUTH_TYPE_BOOK (STR_AUTH_TYPE_START + 1) -#define STR_AUTH_TYPE_BOOKLET (STR_AUTH_TYPE_START + 2) -#define STR_AUTH_TYPE_CONFERENCE (STR_AUTH_TYPE_START + 3) -#define STR_AUTH_TYPE_INBOOK (STR_AUTH_TYPE_START + 4) -#define STR_AUTH_TYPE_INCOLLECTION (STR_AUTH_TYPE_START + 5) -#define STR_AUTH_TYPE_INPROCEEDINGS (STR_AUTH_TYPE_START + 6) -#define STR_AUTH_TYPE_JOURNAL (STR_AUTH_TYPE_START + 7) -#define STR_AUTH_TYPE_MANUAL (STR_AUTH_TYPE_START + 8) -#define STR_AUTH_TYPE_MASTERSTHESIS (STR_AUTH_TYPE_START + 9) -#define STR_AUTH_TYPE_MISC (STR_AUTH_TYPE_START + 10) -#define STR_AUTH_TYPE_PHDTHESIS (STR_AUTH_TYPE_START + 11) -#define STR_AUTH_TYPE_PROCEEDINGS (STR_AUTH_TYPE_START + 12) -#define STR_AUTH_TYPE_TECHREPORT (STR_AUTH_TYPE_START + 13) -#define STR_AUTH_TYPE_UNPUBLISHED (STR_AUTH_TYPE_START + 14) -#define STR_AUTH_TYPE_EMAIL (STR_AUTH_TYPE_START + 15) -#define STR_AUTH_TYPE_WWW (STR_AUTH_TYPE_START + 16) -#define STR_AUTH_TYPE_CUSTOM1 (STR_AUTH_TYPE_START + 17) -#define STR_AUTH_TYPE_CUSTOM2 (STR_AUTH_TYPE_START + 18) -#define STR_AUTH_TYPE_CUSTOM3 (STR_AUTH_TYPE_START + 19) -#define STR_AUTH_TYPE_CUSTOM4 (STR_AUTH_TYPE_START + 20) -#define STR_AUTH_TYPE_CUSTOM5 (STR_AUTH_TYPE_START + 21) -#define STR_AUTH_TYPE_END (STR_AUTH_TYPE_CUSTOM5) - -#define STR_AUTH_FIELD_START (STR_AUTH_TYPE_END + 1) -#define STR_AUTH_FIELD_IDENTIFIER (STR_AUTH_FIELD_START + 0) -#define STR_AUTH_FIELD_AUTHORITY_TYPE (STR_AUTH_FIELD_START + 1) -#define STR_AUTH_FIELD_ADDRESS (STR_AUTH_FIELD_START + 2) -#define STR_AUTH_FIELD_ANNOTE (STR_AUTH_FIELD_START + 3) -#define STR_AUTH_FIELD_AUTHOR (STR_AUTH_FIELD_START + 4) -#define STR_AUTH_FIELD_BOOKTITLE (STR_AUTH_FIELD_START + 5) -#define STR_AUTH_FIELD_CHAPTER (STR_AUTH_FIELD_START + 6) -#define STR_AUTH_FIELD_EDITION (STR_AUTH_FIELD_START + 7) -#define STR_AUTH_FIELD_EDITOR (STR_AUTH_FIELD_START + 8) -#define STR_AUTH_FIELD_HOWPUBLISHED (STR_AUTH_FIELD_START + 9) -#define STR_AUTH_FIELD_INSTITUTION (STR_AUTH_FIELD_START + 10) -#define STR_AUTH_FIELD_JOURNAL (STR_AUTH_FIELD_START + 11) -#define STR_AUTH_FIELD_MONTH (STR_AUTH_FIELD_START + 12) -#define STR_AUTH_FIELD_NOTE (STR_AUTH_FIELD_START + 13) -#define STR_AUTH_FIELD_NUMBER (STR_AUTH_FIELD_START + 14) -#define STR_AUTH_FIELD_ORGANIZATIONS (STR_AUTH_FIELD_START + 15) -#define STR_AUTH_FIELD_PAGES (STR_AUTH_FIELD_START + 16) -#define STR_AUTH_FIELD_PUBLISHER (STR_AUTH_FIELD_START + 17) -#define STR_AUTH_FIELD_SCHOOL (STR_AUTH_FIELD_START + 18) -#define STR_AUTH_FIELD_SERIES (STR_AUTH_FIELD_START + 19) -#define STR_AUTH_FIELD_TITLE (STR_AUTH_FIELD_START + 20) -#define STR_AUTH_FIELD_TYPE (STR_AUTH_FIELD_START + 21) -#define STR_AUTH_FIELD_VOLUME (STR_AUTH_FIELD_START + 22) -#define STR_AUTH_FIELD_YEAR (STR_AUTH_FIELD_START + 23) -#define STR_AUTH_FIELD_URL (STR_AUTH_FIELD_START + 24) -#define STR_AUTH_FIELD_CUSTOM1 (STR_AUTH_FIELD_START + 25) -#define STR_AUTH_FIELD_CUSTOM2 (STR_AUTH_FIELD_START + 26) -#define STR_AUTH_FIELD_CUSTOM3 (STR_AUTH_FIELD_START + 27) -#define STR_AUTH_FIELD_CUSTOM4 (STR_AUTH_FIELD_START + 28) -#define STR_AUTH_FIELD_CUSTOM5 (STR_AUTH_FIELD_START + 29) -#define STR_AUTH_FIELD_ISBN (STR_AUTH_FIELD_START + 30) -#define STR_AUTH_FIELD_END (STR_AUTH_FIELD_ISBN) - -#define RES_FRMEX_MENU (STR_AUTH_FIELD_END + 1) - -#define UTLUI_ACT_END RES_FRMEX_MENU - -#if UTLUI_ACT_END > RC_UTLUI_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#define STR_IDXEXAMPLE_IDXTXT_BEGIN RC_IDXTXT_BEGIN -#define STR_IDXEXAMPLE_IDXTXT_HEADING1 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 1) -#define STR_IDXEXAMPLE_IDXTXT_ENTRY1 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 2) -#define STR_IDXEXAMPLE_IDXTXT_HEADING11 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 3) -#define STR_IDXEXAMPLE_IDXTXT_ENTRY11 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 4) -#define STR_IDXEXAMPLE_IDXTXT_HEADING12 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 5) -#define STR_IDXEXAMPLE_IDXTXT_ENTRY12 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 6) -#define STR_IDXEXAMPLE_IDXTXT_TABLE1 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 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) -// empty -#define STR_CALC_OVERFLOW (RID_SW_SHELLRES_BEGIN + 8) -// empty -#define STR_CALC_DEFAULT (RID_SW_SHELLRES_BEGIN + 10) -#define STR_CALC_ERROR (RID_SW_SHELLRES_BEGIN + 11) -// empty -#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 -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/web.hrc b/sw/source/uibase/inc/web.hrc deleted file mode 100644 index 7f8b46f90f93..000000000000 --- a/sw/source/uibase/inc/web.hrc +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_WEB_HRC -#define INCLUDED_SW_SOURCE_UIBASE_INC_WEB_HRC - -#include "rcid.hrc" - -#define STR_HUMAN_SWWEBDOC_NAME (RC_WEB_BEGIN + 4) -#define STR_WRITER_WEBDOC_FULLTYPE (RC_WEB_BEGIN + 12) - -#define WEB_ACT_END STR_WRITER_WEBDOC_FULLTYPE - -#if WEB_ACT_END > RC_WEB_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/index/idxmrk.cxx b/sw/source/uibase/index/idxmrk.cxx index c8c2a8adde65..da4506b7e53d 100644 --- a/sw/source/uibase/index/idxmrk.cxx +++ b/sw/source/uibase/index/idxmrk.cxx @@ -39,7 +39,7 @@ #include <swmodule.hxx> #include <fldmgr.hxx> #include <fldbas.hxx> -#include <utlui.hrc> +#include <strings.hrc> #include <swcont.hxx> #include <svl/cjkoptions.hxx> #include <ndtxt.hxx> diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx index a86628f57d44..ea1b73e65a12 100644 --- a/sw/source/uibase/lingu/hyp.cxx +++ b/sw/source/uibase/lingu/hyp.cxx @@ -31,6 +31,7 @@ #include "hyp.hxx" #include "mdiexp.hxx" #include "olmenu.hrc" +#include "strings.hrc" #include <unomid.h> diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 629a89e5b4b5..8c5afcad5918 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -20,7 +20,7 @@ #include "SwRewriter.hxx" #include "chrdlg.hrc" #include "cmdid.h" -#include "comcore.hrc" +#include "strings.hrc" #include "doc.hxx" #include "docsh.hxx" #include "edtwin.hxx" diff --git a/sw/source/uibase/lingu/olmenu.hrc b/sw/source/uibase/lingu/olmenu.hrc index 79f8373c897f..03581e402b72 100644 --- a/sw/source/uibase/lingu/olmenu.hrc +++ b/sw/source/uibase/lingu/olmenu.hrc @@ -22,13 +22,6 @@ #include "rcid.hrc" -#define STR_HYP_OK (RC_LINGU_BEGIN + 3) -#define STR_LANGSTATUS_NONE (RC_LINGU_BEGIN + 6) -#define STR_LANGSTATUS_MORE (RC_LINGU_BEGIN + 7) -#define STR_IGNORE_SELECTION (RC_LINGU_BEGIN + 8) -#define STR_RESET_TO_DEFAULT_LANGUAGE (RC_LINGU_BEGIN + 9) -#define STR_EXPLANATION_LINK (RC_LINGU_BEGIN + 10) - //! Don't change these values. You may break context menu modifying extensions! #define MN_IGNORE_SELECTION 201 #define MN_SHORT_COMMENT 208 diff --git a/sw/source/uibase/lingu/olmenu.src b/sw/source/uibase/lingu/olmenu.src deleted file mode 100644 index ab73066c88e9..000000000000 --- a/sw/source/uibase/lingu/olmenu.src +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -/* StarView resource file */ - -#include "olmenu.hrc" -#include "cmdid.h" -#include "helpid.h" - -String STR_HYP_OK -{ - Text [ en-US ] = "Hyphenation completed" ; -}; -String STR_LANGSTATUS_NONE -{ - Text [ en-US ] = "None (Do not check spelling)" ; -}; -String STR_RESET_TO_DEFAULT_LANGUAGE -{ - Text [ en-US ] = "Reset to Default Language" ; -}; -String STR_LANGSTATUS_MORE -{ - Text [ en-US ] = "More..." ; -}; -String STR_IGNORE_SELECTION -{ - Text [ en-US ] = "~Ignore" ; -}; -String STR_EXPLANATION_LINK -{ - Text [ en-US ] = "Explanations..." ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx index 6e678dd00bab..256afaa29a01 100644 --- a/sw/source/uibase/misc/glshell.cxx +++ b/sw/source/uibase/misc/glshell.cxx @@ -46,6 +46,7 @@ #include <cmdid.h> #include <swerror.h> #include <misc.hrc> +#include <strings.hrc> #define SwWebGlosDocShell #define SwGlosDocShell diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx index 38f836e9ea88..58ada01cda4d 100644 --- a/sw/source/uibase/misc/numberingtypelistbox.cxx +++ b/sw/source/uibase/misc/numberingtypelistbox.cxx @@ -29,6 +29,7 @@ #include <editeng/numitem.hxx> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> +#include <svx/strarray.hxx> #include <unomid.h> @@ -89,10 +90,10 @@ void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags) pTypes = aTypes.getConstArray(); } } - ResStringArray aNames(ResId(RID_SVXSTRARY_NUMBERINGTYPE, DIALOG_MGR())); - for(size_t i = 0; i < aNames.Count(); i++) + + for(size_t i = 0; i < SvxNumberingTypeTable::Count(); i++) { - sal_IntPtr nValue = aNames.GetValue(i); + sal_IntPtr nValue = SvxNumberingTypeTable::GetValue(i); bool bInsert = true; sal_Int32 nPos = LISTBOX_APPEND; switch(nValue) @@ -138,7 +139,7 @@ void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags) } if(bInsert) { - sal_Int32 nEntry = InsertEntry(aNames.GetString(i), nPos); + sal_Int32 nEntry = InsertEntry(SvxNumberingTypeTable::GetString(i), nPos); SetEntryData( nEntry, reinterpret_cast<void*>(nValue) ); } } diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 71306a2d9432..350b5f0e6ebf 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -36,10 +36,10 @@ #include <helpid.h> #include <cmdid.h> #include <misc.hrc> -#include <shells.hrc> +#include <strings.hrc> // -> #111827# -#include <comcore.hrc> +#include <strings.hrc> #include <swundo.hxx> #include <SwRewriter.hxx> // <- #111827# @@ -1093,27 +1093,27 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void) pDlg->HideAuthor(); - sal_uInt16 nResId = 0; + const char* pResId = nullptr; switch( rRedline.GetType() ) { case nsRedlineType_t::REDLINE_INSERT: - nResId = STR_REDLINE_INSERTED; + pResId = STR_REDLINE_INSERTED; break; case nsRedlineType_t::REDLINE_DELETE: - nResId = STR_REDLINE_DELETED; + pResId = STR_REDLINE_DELETED; break; case nsRedlineType_t::REDLINE_FORMAT: case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: - nResId = STR_REDLINE_FORMATED; + pResId = STR_REDLINE_FORMATED; break; case nsRedlineType_t::REDLINE_TABLE: - nResId = STR_REDLINE_TABLECHG; + pResId = STR_REDLINE_TABLECHG; break; default:;//prevent warning } OUString sTitle(SwResId(STR_REDLINE_COMMENT)); - if( nResId ) - sTitle += SwResId( nResId ); + if (pResId) + sTitle += SwResId(pResId); pDlg->SetText(sTitle); SwViewShell::SetCareWin(pDlg->GetWindow()); diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index 83d49b785c2e..6f1f6f3190ec 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -24,6 +24,7 @@ #include <vcl/window.hxx> #include <vcl/settings.hxx> #include "misc.hrc" +#include "strings.hrc" #define CONTROL_BORDER_WIDTH 1 @@ -256,12 +257,12 @@ void SwCommentRuler::Update() void SwCommentRuler::UpdateCommentHelpText() { - int nTooltipResId; + const char* pTooltipResId; if ( mpViewShell->GetPostItMgr()->ShowNotes() ) - nTooltipResId = STR_HIDE_COMMENTS; + pTooltipResId = STR_HIDE_COMMENTS; else - nTooltipResId = STR_SHOW_COMMENTS; - SetQuickHelpText( SwResId( nTooltipResId ) ); + pTooltipResId = STR_SHOW_COMMENTS; + SetQuickHelpText(SwResId(pTooltipResId)); } // TODO Make Ruler return its central rectangle instead of margins. diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index f4a1078a6b99..1831acac18d1 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -36,7 +36,7 @@ #include "swmodule.hxx" #include "swundo.hxx" #include <SwRewriter.hxx> -#include "comcore.hrc" +#include "strings.hrc" using namespace ::com::sun::star; diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 36df87eac29d..b7b89547aba9 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -42,14 +42,13 @@ #include "cellatr.hxx" #include "edtwin.hxx" #include "helpid.h" -#include "access.hrc" +#include "strings.hrc" #include "bitmaps.hlst" // Only for the UpdateRange: Delete the box in which the stacked cursor is positioned. #include "pam.hxx" #include "swundo.hxx" -#include "ribbar.hrc" #include "dbui.hrc" #include <IDocumentContentOperations.hxx> diff --git a/sw/source/uibase/ribbar/inputwin.src b/sw/source/uibase/ribbar/inputwin.src deleted file mode 100644 index 8f57dfb894d3..000000000000 --- a/sw/source/uibase/ribbar/inputwin.src +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -/* HelpID resource file */ -/* HelpID resource file */ - -#include "cmdid.h" -#include "helpid.h" -#include "globals.hrc" -#include "ribbar.hrc" -#include "access.hrc" - -String STR_FORMULA_CALC -{ - Text [ en-US ] = "Functions" ; -}; - -String STR_FORMULA_CANCEL -{ - Text [ en-US ] = "Cancel" ; -}; - -String STR_FORMULA_APPLY -{ - Text [ en-US ] = "Apply" ; -}; - -String STR_ACCESS_FORMULA_TOOLBAR -{ - Text [ en-US ] = "Formula Tool Bar" ; -}; - -String STR_ACCESS_FORMULA_TYPE -{ - Text [ en-US ] = "Formula Type" ; -}; - -String STR_ACCESS_FORMULA_TEXT -{ - Text [ en-US ] = "Formula Text" ; -}; - -String STR_TBL_FORMULA -{ - Text [ en-US ] = "Text Formula" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index c9090674893b..d6c7d3c8643d 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -34,7 +34,7 @@ #include <glosdoc.hxx> #include <gloslst.hxx> #include <workctrl.hxx> -#include <ribbar.hrc> +#include <strings.hrc> #include <cmdid.h> #include <helpid.h> #include <wrtsh.hxx> @@ -48,6 +48,7 @@ #include <vcl/svapp.hxx> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> +#include <svx/strings.hrc> #include "bitmaps.hlst" // Size check @@ -234,6 +235,77 @@ static const char* aNavigationHelpIds[ NAVI_ENTRIES ] = HID_NID_NEXT }; +static const char* aNavigationStrIds[ NAVI_ENTRIES ] = +{ + // -- first line + ST_TBL, + ST_FRM, + ST_GRF, + ST_OLE, + ST_PGE, + ST_OUTL, + ST_MARK, + ST_DRW, + ST_CTRL, + STR_IMGBTN_PGE_UP, + // -- second line + ST_REG, + ST_BKM, + ST_SEL, + ST_FTN, + ST_POSTIT, + ST_SRCH_REP, + ST_INDEX_ENTRY, + ST_TABLE_FORMULA, + ST_TABLE_FORMULA_ERROR, + STR_IMGBTN_PGE_DOWN +}; + +// these are global strings +static const char* STR_IMGBTN_ARY[] = +{ + nullptr, + nullptr, + STR_IMGBTN_TBL_DOWN, + STR_IMGBTN_FRM_DOWN, + STR_IMGBTN_PGE_DOWN, + STR_IMGBTN_DRW_DOWN, + STR_IMGBTN_CTRL_DOWN, + STR_IMGBTN_REG_DOWN, + STR_IMGBTN_BKM_DOWN, + STR_IMGBTN_GRF_DOWN, + STR_IMGBTN_OLE_DOWN, + STR_IMGBTN_OUTL_DOWN, + STR_IMGBTN_SEL_DOWN, + STR_IMGBTN_FTN_DOWN, + STR_IMGBTN_MARK_DOWN, + STR_IMGBTN_POSTIT_DOWN, + STR_IMGBTN_SRCH_REP_DOWN, + STR_IMGBTN_INDEX_ENTRY_DOWN, + STR_IMGBTN_TBLFML_DOWN, + STR_IMGBTN_TBLFML_ERR_DOWN, + nullptr, + nullptr, + STR_IMGBTN_TBL_UP, + STR_IMGBTN_FRM_UP, + STR_IMGBTN_PGE_UP, + STR_IMGBTN_DRW_UP, + STR_IMGBTN_CTRL_UP, + STR_IMGBTN_REG_UP, + STR_IMGBTN_BKM_UP, + STR_IMGBTN_GRF_UP, + STR_IMGBTN_OLE_UP, + STR_IMGBTN_OUTL_UP, + STR_IMGBTN_SEL_UP, + STR_IMGBTN_FTN_UP, + STR_IMGBTN_MARK_UP, + STR_IMGBTN_POSTIT_UP, + STR_IMGBTN_SRCH_REP_UP, + STR_IMGBTN_INDEX_ENTRY_UP, + STR_IMGBTN_TBLFML_UP, + STR_IMGBTN_TBLFML_ERR_UP +}; + SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window *pParent) : SfxPopupWindow(nId, pParent, "FloatingNavigation", "modules/swriter/ui/floatingnavigation.ui", rFrame) @@ -249,34 +321,22 @@ SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame >& for( i = 0; i < NID_COUNT; i++) { sal_uInt16 nNaviId = aNavigationInsertIds[i]; - OUString sText; - ToolBoxItemBits nTbxBits = ToolBoxItemBits::NONE; - if((NID_PREV != nNaviId) && (NID_NEXT != nNaviId)) - { - // -2, there's no string for Next/Prev - sal_uInt16 nResStr = ST_TBL - 2 + nNaviId - NID_START; - sText = SwResId(nResStr); + ToolBoxItemBits nTbxBits = ToolBoxItemBits::NONE; + if ((NID_PREV != nNaviId) && (NID_NEXT != nNaviId)) nTbxBits = ToolBoxItemBits::CHECKABLE; - } - else - { - if (nNaviId == NID_PREV) - sText = SwResId(STR_IMGBTN_PGE_UP); - else if (nNaviId == NID_NEXT) - sText = SwResId(STR_IMGBTN_PGE_DOWN); - } - m_pToolBox->InsertItem(nNaviId, Image(BitmapEx(aNavigationImgIds[i])), - sText, nTbxBits); + SwResId(aNavigationStrIds[i]), nTbxBits); m_pToolBox->SetHelpId(nNaviId, aNavigationHelpIds[i]); } m_pToolBox->InsertBreak(NID_COUNT/2); - // these are global strings - for( i = 0; i < 2 * NID_COUNT; i++) + for (i = 0; i < SAL_N_ELEMENTS(STR_IMGBTN_ARY); ++i) { - sQuickHelp[i] = SwResId(STR_IMGBTN_START + i); + const char* id = STR_IMGBTN_ARY[i]; + if (!id) + continue; + sQuickHelp[i] = SwResId(id); } sal_uInt16 nItemId = SwView::GetMoveType(); @@ -354,11 +414,11 @@ void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt ) OUString SwScrollNaviPopup::GetToolTip(bool bNext) { - sal_uInt16 nResId = STR_IMGBTN_START; - nResId += SwView::GetMoveType() - NID_START; - if(!bNext) + sal_uInt16 nResId = SwView::GetMoveType(); + if (!bNext) nResId += NID_COUNT; - return SwResId(nResId); + const char* id = STR_IMGBTN_ARY[nResId]; + return id ? SwResId(id): OUString(); } class SwZoomBox_Impl : public ComboBox @@ -387,18 +447,17 @@ SwZoomBox_Impl::SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot) SetHelpId(HID_PVIEW_ZOOM_LB); SetSizePixel(LogicToPixel(Size(30, 86), MapUnit::MapAppFont)); EnableAutocomplete( false ); - sal_uInt16 aZoomValues[] = + const char* aZoomValues[] = { RID_SVXSTR_ZOOM_25 , RID_SVXSTR_ZOOM_50 , RID_SVXSTR_ZOOM_75 , RID_SVXSTR_ZOOM_100 , RID_SVXSTR_ZOOM_150 , RID_SVXSTR_ZOOM_200 , RID_SVXSTR_ZOOM_WHOLE_PAGE, RID_SVXSTR_ZOOM_PAGE_WIDTH , RID_SVXSTR_ZOOM_OPTIMAL_VIEW }; - for(sal_uInt16 aZoomValue : aZoomValues) + for(const char* pZoomValue : aZoomValues) { - OUString sEntry = SvxResId( aZoomValue ); + OUString sEntry = SvxResId(pZoomValue); InsertEntry(sEntry); } - } void SwZoomBox_Impl::Select() diff --git a/sw/source/uibase/ribbar/workctrl.src b/sw/source/uibase/ribbar/workctrl.src deleted file mode 100644 index 3e1d2236db26..000000000000 --- a/sw/source/uibase/ribbar/workctrl.src +++ /dev/null @@ -1,261 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <svx/svxids.hrc> -#include "globals.hrc" -#include "ribbar.hrc" -#include "helpid.h" -#include "cmdid.h" - -String ST_TBL -{ - Text [ en-US ] = "Table" ; -}; -String ST_FRM -{ - Text [ en-US ] = "Text Frame" ; -}; -String ST_PGE -{ - Text [ en-US ] = "Page" ; -}; -String ST_DRW -{ - Text [ en-US ] = "Drawing" ; -}; -String ST_CTRL -{ - Text [ en-US ] = "Control" ; -}; -String ST_REG -{ - Text [ en-US ] = "Section" ; -}; -String ST_BKM -{ - Text [ en-US ] = "Bookmark" ; -}; -String ST_GRF -{ - Text [ en-US ] = "Graphics" ; -}; -String ST_OLE -{ - Text [ en-US ] = "OLE object" ; -}; -String ST_OUTL -{ - Text [ en-US ] = "Headings" ; -}; -String ST_SEL -{ - Text [ en-US ] = "Selection" ; -}; -String ST_FTN -{ - Text [ en-US ] = "Footnote" ; -}; -String ST_MARK -{ - Text [ en-US ] = "Reminder" ; -}; -String ST_POSTIT -{ - Text [ en-US ] = "Comment" ; -}; -String ST_SRCH_REP -{ - Text [ en-US ] = "Repeat search" ; -}; -String ST_INDEX_ENTRY -{ - Text [ en-US ] = "Index entry"; -}; -String ST_TABLE_FORMULA -{ - Text [ en-US ] = "Table formula"; -}; -String ST_TABLE_FORMULA_ERROR -{ - Text [ en-US ] = "Wrong table formula"; -}; - -// Strings for the quickhelp of the View-PgUp/Down-Buttons - -String STR_IMGBTN_NEXT_DOWN -{ - Text = "" ; -}; -String STR_IMGBTN_PREV_DOWN -{ - Text = "" ; -}; -String STR_IMGBTN_TBL_DOWN -{ - Text [ en-US ] = "Next table" ; -}; -String STR_IMGBTN_FRM_DOWN -{ - Text [ en-US ] = "Next text frame" ; -}; -String STR_IMGBTN_PGE_DOWN -{ - Text [ en-US ] = "Next page" ; -}; -String STR_IMGBTN_DRW_DOWN -{ - Text [ en-US ] = "Next drawing" ; -}; -String STR_IMGBTN_CTRL_DOWN -{ - Text [ en-US ] = "Next control" ; -}; -String STR_IMGBTN_REG_DOWN -{ - Text [ en-US ] = "Next section" ; -}; -String STR_IMGBTN_BKM_DOWN -{ - Text [ en-US ] = "Next bookmark" ; -}; -String STR_IMGBTN_GRF_DOWN -{ - Text [ en-US ] = "Next graphic" ; -}; -String STR_IMGBTN_OLE_DOWN -{ - Text [ en-US ] = "Next OLE object" ; -}; -String STR_IMGBTN_OUTL_DOWN -{ - Text [ en-US ] = "Next heading" ; -}; -String STR_IMGBTN_SEL_DOWN -{ - Text [ en-US ] = "Next selection" ; -}; -String STR_IMGBTN_FTN_DOWN -{ - Text [ en-US ] = "Next footnote" ; -}; -String STR_IMGBTN_MARK_DOWN -{ - Text [ en-US ] = "Next Reminder" ; -}; -String STR_IMGBTN_POSTIT_DOWN -{ - Text [ en-US ] = "Next Comment" ; -}; -String STR_IMGBTN_SRCH_REP_DOWN -{ - Text [ en-US ] = "Continue search forward" ; -}; -String STR_IMGBTN_INDEX_ENTRY_DOWN -{ - Text [ en-US ] = "Next index entry"; -}; -String STR_IMGBTN_NEXT_UP -{ - Text = "" ; -}; -String STR_IMGBTN_PREV_UP -{ - Text = "" ; -}; -String STR_IMGBTN_TBL_UP -{ - Text [ en-US ] = "Previous table" ; -}; -String STR_IMGBTN_FRM_UP -{ - Text [ en-US ] = "Previous text frame" ; -}; -String STR_IMGBTN_PGE_UP -{ - Text [ en-US ] = "Previous page" ; -}; -String STR_IMGBTN_DRW_UP -{ - Text [ en-US ] = "Previous drawing" ; -}; -String STR_IMGBTN_CTRL_UP -{ - Text [ en-US ] = "Previous control" ; -}; -String STR_IMGBTN_REG_UP -{ - Text [ en-US ] = "Previous section" ; -}; -String STR_IMGBTN_BKM_UP -{ - Text [ en-US ] = "Previous bookmark" ; -}; -String STR_IMGBTN_GRF_UP -{ - Text [ en-US ] = "Previous graphic" ; -}; -String STR_IMGBTN_OLE_UP -{ - Text [ en-US ] = "Previous OLE object" ; -}; -String STR_IMGBTN_OUTL_UP -{ - Text [ en-US ] = "Previous heading" ; -}; -String STR_IMGBTN_SEL_UP -{ - Text [ en-US ] = "Previous selection" ; -}; -String STR_IMGBTN_FTN_UP -{ - Text [ en-US ] = "Previous footnote" ; -}; -String STR_IMGBTN_MARK_UP -{ - Text [ en-US ] = "Previous Reminder" ; -}; -String STR_IMGBTN_POSTIT_UP -{ - Text [ en-US ] = "Previous Comment" ; -}; -String STR_IMGBTN_SRCH_REP_UP -{ - Text [ en-US ] = "Continue search backwards" ; -}; -String STR_IMGBTN_INDEX_ENTRY_UP -{ - Text [ en-US ] = "Previous index entry"; -}; -String STR_IMGBTN_TBLFML_UP -{ - Text [ en-US ] = "Previous table formula"; -}; -String STR_IMGBTN_TBLFML_DOWN -{ - Text [ en-US ] = "Next table formula"; -}; -String STR_IMGBTN_TBLFML_ERR_UP -{ - Text [ en-US ] = "Previous faulty table formula"; -}; -String STR_IMGBTN_TBLFML_ERR_DOWN -{ - Text [ en-US ] = "Next faulty table formula"; -}; -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 2b432510ae08..bd55da92d18d 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -88,7 +88,7 @@ #include <cmdid.h> #include <globals.hrc> -#include <shells.hrc> +#include <strings.hrc> #include <breakit.hxx> #include "annotsh.hxx" #include "view.hxx" diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 5ef7c73dd101..e5196985f47f 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -87,8 +87,8 @@ #include <swwait.hxx> #include <cmdid.h> #include <globals.hrc> -#include <shells.hrc> -#include <statstr.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <globals.h> #include <unotxdoc.hxx> #include <fmtinfmt.hxx> @@ -103,7 +103,7 @@ #include <instable.hxx> #include <svx/fmshell.hxx> #include <SwRewriter.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <unomid.h> #include <svx/galleryitem.hxx> #include <com/sun/star/gallery/GalleryItemType.hpp> diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx index 5be7208b3383..a3ef6109fece 100644 --- a/sw/source/uibase/shells/beziersh.cxx +++ b/sw/source/uibase/shells/beziersh.cxx @@ -35,7 +35,7 @@ #include "globals.hrc" #include "drawbase.hxx" #include "beziersh.hxx" -#include "shells.hrc" +#include "strings.hrc" #define SwBezierShell #include <sfx2/msg.hxx> #include "swslots.hxx" diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index 8a9b33502201..41c3e0627c0d 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -55,7 +55,7 @@ #include "cmdid.h" #include "globals.hrc" #include "helpid.h" -#include "shells.hrc" +#include "strings.hrc" #include "drwbassh.hxx" #include "drawsh.hxx" diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx index e56af623a61d..f9eeee21e137 100644 --- a/sw/source/uibase/shells/drformsh.cxx +++ b/sw/source/uibase/shells/drformsh.cxx @@ -40,7 +40,7 @@ #include "cmdid.h" #include "globals.hrc" #include "helpid.h" -#include "shells.hrc" +#include "strings.hrc" #include "drwbassh.hxx" #include "drformsh.hxx" #include <svl/urihelper.hxx> diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 4c31ff70f659..b9a0b3bf3bdb 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -49,7 +49,7 @@ #include <svx/svdogrp.hxx> #include <svx/svdpage.hxx> #include <svx/svditer.hxx> -#include <shells.hrc> +#include <strings.hrc> #define SwDrawBaseShell #include <sfx2/msg.hxx> #include <swslots.hxx> diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index aaf8c256861d..6744d94b2494 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -84,7 +84,7 @@ #include <langhelper.hxx> #include <chrdlgmodes.hxx> #include <pardlg.hxx> -#include <shells.hrc> +#include <strings.hrc> #include <string.h> #include <swdtflvr.hxx> #include <swmodule.hxx> diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index 9117bb622cf8..b7ae1f342e66 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -56,7 +56,7 @@ #include <cmdid.h> #include <helpid.h> #include <globals.hrc> -#include <shells.hrc> +#include <strings.hrc> #define SwDrawTextShell #include <sfx2/msg.hxx> diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 81ef6cf89e75..1e5bab8a6c78 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -73,7 +73,7 @@ #include <cmdid.h> #include <cfgitems.hxx> #include <globals.hrc> -#include <shells.hrc> +#include <strings.hrc> #include "swabstdlg.hxx" #include "misc.hrc" @@ -771,16 +771,16 @@ void SwFrameShell::GetState(SfxItemSet& rSet) { case SID_OBJECT_ALIGN_UP : case FN_FRAME_ALIGN_VERT_TOP: - sNewLabel = SwResId(STR_TOP_BASE); + sNewLabel = SwResId(STR_FRMUI_TOP_BASE); break; case SID_OBJECT_ALIGN_MIDDLE : case FN_FRAME_ALIGN_VERT_CENTER: - sNewLabel = SwResId(STR_CENTER_BASE); + sNewLabel = SwResId(STR_FRMUI_CENTER_BASE); break; case SID_OBJECT_ALIGN_DOWN : case FN_FRAME_ALIGN_VERT_BOTTOM: if(!bHtmlMode) - sNewLabel = SwResId(STR_BOTTOM_BASE); + sNewLabel = SwResId(STR_FRMUI_BOTTOM_BASE); else rSet.DisableItem( nWhich ); break; diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 5a7fa6afcc82..d52e03d489bd 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -63,7 +63,7 @@ #include <usrpref.hxx> #include <edtwin.hxx> #include <swwait.hxx> -#include <shells.hrc> +#include <strings.hrc> #include <svx/extedit.hxx> #include <svx/graphichelper.hxx> #include <doc.hxx> diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx index 9c96068e8290..c5eec11bec03 100644 --- a/sw/source/uibase/shells/grfshex.cxx +++ b/sw/source/uibase/shells/grfshex.cxx @@ -24,7 +24,7 @@ #include <textsh.hxx> #include <viewopt.hxx> #include <swundo.hxx> -#include <shells.hrc> +#include <strings.hrc> #include <caption.hxx> #include <vcl/graphicfilter.hxx> #include <sfx2/htmlmode.hxx> @@ -40,7 +40,7 @@ #include <svx/svdpagv.hxx> #include <SwStyleNameMapper.hxx> #include <sfx2/filedlghelper.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> @@ -50,7 +50,7 @@ // -> #111827# #include <SwRewriter.hxx> -#include <comcore.hrc> +#include <strings.hrc> // <- #111827# using namespace ::com::sun::star; diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx index e0020792b613..2e6127ba6522 100644 --- a/sw/source/uibase/shells/listsh.cxx +++ b/sw/source/uibase/shells/listsh.cxx @@ -38,7 +38,7 @@ #include "frmatr.hxx" #include "helpid.h" #include "globals.hrc" -#include "shells.hrc" +#include "strings.hrc" #include "uinums.hxx" #include "listsh.hxx" #include "poolfmt.hxx" diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx index f040a234db90..1e67a043dd40 100644 --- a/sw/source/uibase/shells/mediash.cxx +++ b/sw/source/uibase/shells/mediash.cxx @@ -54,7 +54,7 @@ #include <usrpref.hxx> #include <edtwin.hxx> #include <swwait.hxx> -#include <shells.hrc> +#include <strings.hrc> #include <sfx2/objface.hxx> #include <vcl/EnumContext.hxx> diff --git a/sw/source/uibase/shells/navsh.cxx b/sw/source/uibase/shells/navsh.cxx index 073f22a7820c..abba5d41c97b 100644 --- a/sw/source/uibase/shells/navsh.cxx +++ b/sw/source/uibase/shells/navsh.cxx @@ -22,7 +22,7 @@ #include "helpid.h" #include "globals.hrc" #include "navsh.hxx" -#include "shells.hrc" +#include "strings.hrc" #define SwNavigationShell #include "swslots.hxx" #include <unomid.h> diff --git a/sw/source/uibase/shells/olesh.cxx b/sw/source/uibase/shells/olesh.cxx index 9fe17add5af6..5fec60d3f947 100644 --- a/sw/source/uibase/shells/olesh.cxx +++ b/sw/source/uibase/shells/olesh.cxx @@ -30,7 +30,7 @@ #include <olesh.hxx> #include <cmdid.h> -#include <shells.hrc> +#include <strings.hrc> #define SwOleShell #include <sfx2/msg.hxx> diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index b39292ede61c..4c7046985101 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -73,7 +73,7 @@ #include <app.hrc> #include <dialog.hrc> -#include <shells.hrc> +#include <strings.hrc> #include <cmdid.h> #include <globals.hrc> #include <helpid.h> diff --git a/sw/source/uibase/shells/textdrw.cxx b/sw/source/uibase/shells/textdrw.cxx index 73da9c9b145f..da6a3621576c 100644 --- a/sw/source/uibase/shells/textdrw.cxx +++ b/sw/source/uibase/shells/textdrw.cxx @@ -32,7 +32,7 @@ #include <swundo.hxx> #include <basesh.hxx> -#include <poolfmt.hrc> +#include <strings.hrc> #include <docsh.hxx> #include <sfx2/docfile.hxx> diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 40fbf5a0b5dc..16408fe5e708 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -59,7 +59,7 @@ #include <fldmgr.hxx> #include <uitool.hxx> #include <cmdid.h> -#include <shells.hrc> +#include <strings.hrc> #include <sfx2/app.hxx> #include <svx/dialogs.hrc> #include "swabstdlg.hxx" @@ -80,30 +80,30 @@ static OUString lcl_BuildTitleWithRedline( const SwRangeRedline *pRedline ) { const OUString sTitle(SwResId(STR_REDLINE_COMMENT)); - sal_uInt16 nResId = 0; + const char* pResId = nullptr; switch( pRedline->GetType() ) { case nsRedlineType_t::REDLINE_INSERT: - nResId = STR_REDLINE_INSERTED; + pResId = STR_REDLINE_INSERTED; break; case nsRedlineType_t::REDLINE_DELETE: - nResId = STR_REDLINE_DELETED; + pResId = STR_REDLINE_DELETED; break; case nsRedlineType_t::REDLINE_FORMAT: case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: - nResId = STR_REDLINE_FORMATED; + pResId = STR_REDLINE_FORMATED; break; case nsRedlineType_t::REDLINE_TABLE: - nResId = STR_REDLINE_TABLECHG; + pResId = STR_REDLINE_TABLECHG; break; case nsRedlineType_t::REDLINE_FMTCOLL: - nResId = STR_REDLINE_FMTCOLLSET; + pResId = STR_REDLINE_FMTCOLLSET; break; default: return sTitle; } - return sTitle + SwResId( nResId ); + return sTitle + SwResId(pResId); } void SwTextShell::ExecField(SfxRequest &rReq) diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 2fb8186ac545..cea962a2408e 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -87,7 +87,7 @@ #include <modcfg.hxx> #include <column.hxx> #include <edtwin.hxx> -#include <shells.hrc> +#include <strings.hrc> #include <swerror.h> #include <unochart.hxx> @@ -98,7 +98,7 @@ #include <vcl/EnumContext.hxx> #include <swslots.hxx> #include <SwRewriter.hxx> -#include <comcore.hrc> +#include <strings.hrc> using namespace ::com::sun::star; diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 508c50232003..84f5aff3bb62 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -82,9 +82,9 @@ #include <redlndlg.hxx> #include "fldmgr.hxx" #include <globals.hrc> -#include <shells.hrc> +#include <strings.hrc> #include <app.hrc> -#include <web.hrc> +#include <strings.hrc> #include "paratr.hxx" #include <vcl/svapp.hxx> #include <sfx2/app.hxx> @@ -112,7 +112,7 @@ #include <svx/nbdtmgfact.hxx> #include <svx/nbdtmg.hxx> #include <SwRewriter.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <svx/svdmodel.hxx> #include <svx/drawitem.hxx> #include <numrule.hxx> diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx index e3200b5e6890..3e76669345a1 100644 --- a/sw/source/uibase/shells/textsh2.cxx +++ b/sw/source/uibase/shells/textsh2.cxx @@ -47,7 +47,7 @@ #include "swtypes.hxx" #include "cmdid.h" #include "swevent.hxx" -#include "shells.hrc" +#include "strings.hrc" #include "textsh.hxx" #include "swabstdlg.hxx" #include "dbui.hrc" diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index 647a733d93cd..9dd36e3a21e0 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -53,7 +53,7 @@ #include <cmdid.h> #include <globals.h> -#include <shells.hrc> +#include <strings.hrc> #include <SwStyleNameMapper.hxx> #include "swabstdlg.hxx" #include "outline.hxx" diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index ec6a18a66948..b5c2930463fc 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -23,7 +23,7 @@ #include <cstdlib> #include "PageMarginControl.hxx" -#include "PropertyPanel.hrc" +#include "strings.hrc" #include <editeng/sizeitem.hxx> #include <sfx2/dispatch.hxx> diff --git a/sw/source/uibase/sidebar/PropertyPanel.hrc b/sw/source/uibase/sidebar/PropertyPanel.hrc deleted file mode 100644 index c705574d2051..000000000000 --- a/sw/source/uibase/sidebar/PropertyPanel.hrc +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PROPERTYPANEL_HRC -#define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PROPERTYPANEL_HRC - -#include "rcid.hrc" - -#define STR_MARGIN_TOOLTIP_LEFT (RC_PROPERTYPANEL_BEGIN + 1) -#define STR_MARGIN_TOOLTIP_RIGHT (RC_PROPERTYPANEL_BEGIN + 2) -#define STR_MARGIN_TOOLTIP_INNER (RC_PROPERTYPANEL_BEGIN + 3) -#define STR_MARGIN_TOOLTIP_OUTER (RC_PROPERTYPANEL_BEGIN + 4) -#define STR_MARGIN_TOOLTIP_TOP (RC_PROPERTYPANEL_BEGIN + 5) -#define STR_MARGIN_TOOLTIP_BOT (RC_PROPERTYPANEL_BEGIN + 6) - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 588fce60b723..101ef4ab5606 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -67,7 +67,7 @@ #include <helpid.h> #include <cmdid.h> #include <globals.hrc> -#include <view.hrc> +#include <strings.hrc> #define SwPagePreview #include <sfx2/msg.hxx> diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 0dd88e045083..531fa4a25640 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -38,7 +38,7 @@ #include <svl/whiter.hxx> #include <unotools/saveopt.hxx> #include <svtools/transfer.hxx> -#include <svtools/svtools.hrc> +#include <svtools/strings.hrc> #include <svtools/svtresid.hxx> #include <svx/svxids.hrc> #include <svtools/htmlcfg.hxx> @@ -73,9 +73,9 @@ #include <cmdid.h> #include <helpid.h> #include <globals.hrc> -#include <shells.hrc> -#include <web.hrc> -#include <view.hrc> +#include <strings.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <com/sun/star/ui/dialogs/XFilePicker2.hpp> #include <com/sun/star/ui/dialogs/XFilterManager.hpp> #include <sfx2/filedlghelper.hxx> diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index f3f951669ca9..df09349063b0 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -43,7 +43,7 @@ #include <edtwin.hxx> #include <mmconfigitem.hxx> -#include <view.hrc> +#include <strings.hrc> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index da2bf45e39f5..400a14d4d1ff 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -86,8 +86,8 @@ #include <barcfg.hxx> #include <pview.hxx> #include <swdtflvr.hxx> -#include <view.hrc> -#include <globdoc.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <frmui.hrc> #include <cfgitems.hxx> #include <prtopt.hxx> diff --git a/sw/source/uibase/uiview/view.hrc b/sw/source/uibase/uiview/view.hrc deleted file mode 100644 index a79adcc9aaf4..000000000000 --- a/sw/source/uibase/uiview/view.hrc +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SW_SOURCE_UIBASE_UIVIEW_VIEW_HRC -#define INCLUDED_SW_SOURCE_UIBASE_UIVIEW_VIEW_HRC - -#include "rcid.hrc" - -// STR - -#define STR_NUM_LEVEL (RC_VIEW_BEGIN + 3) -#define STR_NUM_OUTLINE (RC_VIEW_BEGIN + 4) - -#define STR_EDIT_FOOTNOTE (RC_VIEW_BEGIN + 14) - -#define STR_NB_REPLACED (RC_VIEW_BEGIN + 20) -#define STR_SCAN_NOSOURCE (RC_VIEW_BEGIN + 21) - -#define STR_SRCVIEW_ROW (RC_VIEW_BEGIN + 22) -#define STR_SRCVIEW_COL (RC_VIEW_BEGIN + 23) -#define STR_SAVEAS_SRC (RC_VIEW_BEGIN + 24) - -#define STR_NO_MERGE_ENTRY (RC_VIEW_BEGIN + 25) - -#define STR_WEBOPTIONS (RC_VIEW_BEGIN + 32) -#define STR_TEXTOPTIONS (RC_VIEW_BEGIN + 33) - -#define STR_SAVEACOPY_SRC (RC_VIEW_BEGIN + 34) - -#define STR_ERR_NO_FAX (RC_VIEW_BEGIN + 36) -#define STR_ERR_SRCSTREAM (RC_VIEW_BEGIN + 37) - -#define STR_QUERY_SPECIAL_FORCED (RC_VIEW_BEGIN + 38) - -// Overflow checking - -#define VIEW_ACT_END STR_EDIT_FOOTNOTE - -#if VIEW_ACT_END > RC_VIEW_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/view.src b/sw/source/uibase/uiview/view.src deleted file mode 100644 index 165f5898c1af..000000000000 --- a/sw/source/uibase/uiview/view.src +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <svx/svxids.hrc> -#include "view.hrc" -#include "shells.hrc" -#include "globals.hrc" -#include "helpid.h" -#include "cmdid.h" - -String STR_QUERY_SPECIAL_FORCED -{ - Text [ en-US ] = "Check special regions is deactivated. Check anyway?" ; -}; -String STR_NO_MERGE_ENTRY -{ - Text [ en-US ] = "Could not merge documents." ; -}; -String STR_ERR_SRCSTREAM -{ - Text [ en-US ] = "The source cannot be loaded." ; -}; -String STR_ERR_NO_FAX -{ - Text [ en-US ] = "No fax printer has been set under Tools/Options/%1/Print." ; -}; -String STR_WEBOPTIONS -{ - Text [ en-US ] = "HTML document"; -}; -String STR_TEXTOPTIONS -{ - Text [ en-US ] = "Text document"; -}; -String STR_SCAN_NOSOURCE -{ - Text [ en-US ] = "Source not specified." ; -}; -String STR_NUM_LEVEL -{ - Text [ en-US ] = "Level " ; -}; -String STR_NUM_OUTLINE -{ - Text [ en-US ] = "Outline "; -}; -String STR_EDIT_FOOTNOTE -{ - Text [ en-US ] = "Edit Footnote/Endnote" ; -}; -String STR_NB_REPLACED -{ - Text [ en-US ] = "Search key replaced XX times." ; -}; -String STR_SRCVIEW_ROW -{ - Text [ en-US ] = "Row " ; -}; -String STR_SRCVIEW_COL -{ - Text [ en-US ] = "Column " ; -}; -String STR_SAVEAS_SRC -{ - Text [ en-US ] = "~Export source..." ; -}; -String STR_SAVEACOPY_SRC -{ - Text [ en-US ] = "~Export copy of source..." ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 18cdea0f2c0a..4ee436e9e47f 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -54,7 +54,7 @@ #include "cmdid.h" #include "globdoc.hxx" #include "wview.hxx" -#include "shells.hrc" +#include "strings.hrc" #define SwView #define Text diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 654716b85172..b663f884c55a 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -106,14 +106,14 @@ #include <tabsh.hxx> #include <listsh.hxx> #include <cmdid.h> -#include <comcore.hrc> -#include <poolfmt.hrc> -#include <statstr.hrc> +#include <strings.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <swerror.h> #include <globals.hrc> -#include <shells.hrc> -#include <web.hrc> -#include <view.hrc> +#include <strings.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <app.hrc> #include <fmtclds.hxx> #include <helpid.h> @@ -132,7 +132,6 @@ #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> #include "swabstdlg.hxx" -#include <envelp.hrc> #include <fmthdft.hxx> #include <svx/ofaitem.hxx> #include <unomid.h> @@ -467,27 +466,27 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) rSh.SetFrameFormat( pFormat ); } - sal_uInt32 nResId(0); + const char* pResId(nullptr); if( nError == ERRCODE_GRFILTER_OPENERROR ) - nResId = STR_GRFILTER_OPENERROR; + pResId = STR_GRFILTER_OPENERROR; else if( nError == ERRCODE_GRFILTER_IOERROR ) - nResId = STR_GRFILTER_IOERROR; + pResId = STR_GRFILTER_IOERROR; else if( nError ==ERRCODE_GRFILTER_FORMATERROR ) - nResId = STR_GRFILTER_FORMATERROR; + pResId = STR_GRFILTER_FORMATERROR; else if( nError ==ERRCODE_GRFILTER_VERSIONERROR ) - nResId = STR_GRFILTER_VERSIONERROR; + pResId = STR_GRFILTER_VERSIONERROR; else if( nError ==ERRCODE_GRFILTER_FILTERERROR ) - nResId = STR_GRFILTER_FILTERERROR; + pResId = STR_GRFILTER_FILTERERROR; else if( nError ==ERRCODE_GRFILTER_TOOBIG ) - nResId = STR_GRFILTER_TOOBIG; + pResId = STR_GRFILTER_TOOBIG; rSh.EndAction(); rSh.UnlockPaint(); - if( nResId ) + if (pResId) { if( bShowError ) { - ScopedVclPtrInstance< MessageDialog > aInfoBox( GetWindow(), SwResId( nResId ), VclMessageType::Info); + ScopedVclPtrInstance< MessageDialog > aInfoBox( GetWindow(), SwResId(pResId), VclMessageType::Info); aInfoBox->Execute(); } rReq.Ignore(); diff --git a/sw/source/uibase/uiview/viewcoll.cxx b/sw/source/uibase/uiview/viewcoll.cxx index 4380835251e5..0269604c6b97 100644 --- a/sw/source/uibase/uiview/viewcoll.cxx +++ b/sw/source/uibase/uiview/viewcoll.cxx @@ -24,7 +24,7 @@ #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> #include <svl/stritem.hxx> -#include <rsc/rscsfx.hxx> +#include <svl/style.hxx> #include "view.hxx" #include "wrtsh.hxx" diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index 1c632ad6793a..77a528e20498 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -39,7 +39,7 @@ #include "frmui.hrc" #include "misc.hrc" -#include "view.hrc" +#include "strings.hrc" #include <memory> diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 35a6e34e765b..6f320809d07e 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -59,8 +59,8 @@ #include <vcl/lstbox.hxx> #include <cmdid.h> #include <globals.hrc> -#include <comcore.hrc> -#include <view.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <hhcwrp.hxx> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> @@ -426,7 +426,7 @@ void SwView::HyphenateDocument() } SfxErrorContext aContext( ERRCTX_SVX_LINGU_HYPHENATION, OUString(), m_pEditWin, - RID_SVXERRCTX, &DIALOG_MGR() ); + getRID_SVXERRCTX(), &SvxResLocale() ); Reference< XHyphenator > xHyph( ::GetHyphenator() ); if (!xHyph.is()) @@ -548,7 +548,7 @@ void SwView::StartThesaurus() return; SfxErrorContext aContext( ERRCTX_SVX_LINGU_THESAURUS, OUString(), m_pEditWin, - RID_SVXERRCTX, &DIALOG_MGR() ); + getRID_SVXERRCTX(), &SvxResLocale() ); // Determine language LanguageType eLang = m_pWrtShell->GetCurLang(); diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index 82b2369df284..a141815d6cc7 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -45,8 +45,8 @@ #include <wview.hxx> #include <cmdid.h> -#include <view.hrc> -#include <ribbar.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <helpid.h> #include <globals.hrc> diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index f73ea02ddca5..7be7a7aae6f4 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -57,7 +57,7 @@ #include <IDocumentDeviceAccess.hxx> #include <globals.hrc> -#include <view.hrc> +#include <strings.hrc> #include <app.hrc> #include <swwrtshitem.hxx> #include "swabstdlg.hxx" @@ -177,8 +177,8 @@ void SwView::ExecutePrint(SfxRequest& rReq) else { ScopedVclPtrInstance< MessageDialog > aInfoBox(&GetEditWin(), SwResId(STR_ERR_NO_FAX), VclMessageType::Info); - sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS; - aInfoBox->set_primary_text(aInfoBox->get_primary_text().replaceFirst("%1", SwResId(nResNo))); + const char* pResId = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS; + aInfoBox->set_primary_text(aInfoBox->get_primary_text().replaceFirst("%1", SwResId(pResId))); aInfoBox->Execute(); SfxUInt16Item aDefPage(SID_SW_EDITOPTIONS, TP_OPTPRINT_PAGE); GetViewFrame()->GetDispatcher()->ExecuteList(SID_SW_EDITOPTIONS, diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 0c08d996dd27..f27f9bfa6f28 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -61,9 +61,9 @@ #include <comphelper/lok.hxx> #include <comphelper/string.hxx> -#include <view.hrc> +#include <strings.hrc> #include <SwRewriter.hxx> -#include <comcore.hrc> +#include <strings.hrc> #include <IDocumentDrawModelAccess.hxx> #include <drawdoc.hxx> diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 83fd4ba778ba..aca79a13c678 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -102,7 +102,7 @@ #include <docstat.hxx> #include <modcfg.hxx> #include <ndtxt.hxx> -#include <utlui.hrc> +#include <strings.hrc> #include "bitmaps.hlst" #include <swcont.hxx> #include <unodefaults.hxx> diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index 0d6ba76eb06f..f2077c883be9 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -52,7 +52,7 @@ #include <charfmt.hxx> #include <fmtcol.hxx> #include <tox.hxx> -#include <attrdesc.hrc> +#include <strings.hrc> #include <fmtftntx.hxx> #include <fmtfollowtextflow.hxx> #include <libxml/xmlwriter.h> @@ -182,8 +182,8 @@ bool SwRegisterItem::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - const sal_uInt16 nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF; - rText = SwResId( nId ); + const char* pId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF; + rText = SwResId(pId); return true; } @@ -213,8 +213,8 @@ bool SwParaConnectBorderItem::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - const sal_uInt16 nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF; - rText = SwResId( nId ); + const char* pId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF; + rText = SwResId(pId); return true; } @@ -242,9 +242,9 @@ bool SwFormatFrameSize::GetPresentation } if ( ATT_VAR_SIZE != GetHeightSizeType() ) { - const sal_uInt16 nId = ATT_FIX_SIZE == m_eFrameHeightType ? + const char* pId = ATT_FIX_SIZE == m_eFrameHeightType ? STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT; - rText = rText + ", " + SwResId( nId ) + " "; + rText = rText + ", " + SwResId(pId) + " "; if ( GetHeightPercent() ) { rText = rText + unicode::formatPercent(GetHeightPercent(), @@ -271,8 +271,8 @@ bool SwFormatHeader::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - const sal_uInt16 nId = GetHeaderFormat() ? STR_HEADER : STR_NO_HEADER; - rText = SwResId( nId ); + const char* pId = GetHeaderFormat() ? STR_HEADER : STR_NO_HEADER; + rText = SwResId(pId); return true; } @@ -288,8 +288,8 @@ bool SwFormatFooter::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - const sal_uInt16 nId = GetFooterFormat() ? STR_FOOTER : STR_NO_FOOTER; - rText = SwResId( nId ); + const char* pId = GetFooterFormat() ? STR_FOOTER : STR_NO_FOOTER; + rText = SwResId(pId); return true; } @@ -302,31 +302,31 @@ bool SwFormatSurround::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - sal_uInt16 nId = 0; + const char* pId = nullptr; switch ( (css::text::WrapTextMode)GetValue() ) { case css::text::WrapTextMode_NONE: - nId = STR_SURROUND_NONE; + pId = STR_SURROUND_NONE; break; case css::text::WrapTextMode_THROUGH: - nId = STR_SURROUND_THROUGH; + pId = STR_SURROUND_THROUGH; break; case css::text::WrapTextMode_PARALLEL: - nId = STR_SURROUND_PARALLEL; + pId = STR_SURROUND_PARALLEL; break; case css::text::WrapTextMode_DYNAMIC: - nId = STR_SURROUND_IDEAL; + pId = STR_SURROUND_IDEAL; break; case css::text::WrapTextMode_LEFT: - nId = STR_SURROUND_LEFT; + pId = STR_SURROUND_LEFT; break; case css::text::WrapTextMode_RIGHT: - nId = STR_SURROUND_RIGHT; + pId = STR_SURROUND_RIGHT; break; default:;//prevent warning } - if ( nId ) - rText = SwResId( nId ); + if (pId) + rText = SwResId(pId); if ( IsAnchorOnly() ) { @@ -346,7 +346,7 @@ bool SwFormatVertOrient::GetPresentation const IntlWrapper* pIntl ) const { - sal_uInt16 nId = 0; + const char* pId = nullptr; switch ( GetVertOrient() ) { case text::VertOrientation::NONE: @@ -357,27 +357,27 @@ bool SwFormatVertOrient::GetPresentation } break; case text::VertOrientation::TOP: - nId = STR_VERT_TOP; + pId = STR_VERT_TOP; break; case text::VertOrientation::CENTER: - nId = STR_VERT_CENTER; + pId = STR_VERT_CENTER; break; case text::VertOrientation::BOTTOM: - nId = STR_VERT_BOTTOM; + pId = STR_VERT_BOTTOM; break; case text::VertOrientation::LINE_TOP: - nId = STR_LINE_TOP; + pId = STR_LINE_TOP; break; case text::VertOrientation::LINE_CENTER: - nId = STR_LINE_CENTER; + pId = STR_LINE_CENTER; break; case text::VertOrientation::LINE_BOTTOM: - nId = STR_LINE_BOTTOM; + pId = STR_LINE_BOTTOM; break; default:;//prevent warning } - if ( nId ) - rText += SwResId( nId ); + if (pId) + rText += SwResId(pId); return true; } @@ -392,7 +392,7 @@ bool SwFormatHoriOrient::GetPresentation const IntlWrapper* pIntl ) const { - sal_uInt16 nId = 0; + const char* pId = nullptr; switch ( GetHoriOrient() ) { case text::HoriOrientation::NONE: @@ -403,27 +403,27 @@ bool SwFormatHoriOrient::GetPresentation } break; case text::HoriOrientation::RIGHT: - nId = STR_HORI_RIGHT; + pId = STR_HORI_RIGHT; break; case text::HoriOrientation::CENTER: - nId = STR_HORI_CENTER; + pId = STR_HORI_CENTER; break; case text::HoriOrientation::LEFT: - nId = STR_HORI_LEFT; + pId = STR_HORI_LEFT; break; case text::HoriOrientation::INSIDE: - nId = STR_HORI_INSIDE; + pId = STR_HORI_INSIDE; break; case text::HoriOrientation::OUTSIDE: - nId = STR_HORI_OUTSIDE; + pId = STR_HORI_OUTSIDE; break; case text::HoriOrientation::FULL: - nId = STR_HORI_FULL; + pId = STR_HORI_FULL; break; default:;//prevent warning } - if ( nId ) - rText += SwResId( nId ); + if (pId) + rText += SwResId(pId); return true; } @@ -438,22 +438,22 @@ bool SwFormatAnchor::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - sal_uInt16 nId = 0; + const char* pId = nullptr; switch ( GetAnchorId() ) { case RndStdIds::FLY_AT_PARA: - nId = STR_FLY_AT_PARA; + pId = STR_FLY_AT_PARA; break; case RndStdIds::FLY_AS_CHAR: - nId = STR_FLY_AS_CHAR; + pId = STR_FLY_AS_CHAR; break; case RndStdIds::FLY_AT_PAGE: - nId = STR_FLY_AT_PAGE; + pId = STR_FLY_AT_PAGE; break; default:;//prevent warning } - if ( nId ) - rText += SwResId( nId ); + if (pId) + rText += SwResId(pId); return true; } @@ -646,22 +646,22 @@ bool SwTextGridItem::GetPresentation const IntlWrapper* /*pIntl*/ ) const { - sal_uInt16 nId = 0; + const char* pId = nullptr; switch ( GetGridType() ) { case GRID_NONE : - nId = STR_GRID_NONE; + pId = STR_GRID_NONE; break; case GRID_LINES_ONLY : - nId = STR_GRID_LINES_ONLY; + pId = STR_GRID_LINES_ONLY; break; case GRID_LINES_CHARS : - nId = STR_GRID_LINES_CHARS; + pId = STR_GRID_LINES_CHARS; break; } - if ( nId ) - rText += SwResId( nId ); + if (pId) + rText += SwResId(pId); return true; } @@ -683,18 +683,18 @@ bool SwMirrorGrf::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const { - sal_uInt16 nId; + const char* pId; switch( GetValue() ) { - case MirrorGraph::Dont: nId = STR_NO_MIRROR; break; - case MirrorGraph::Vertical: nId = STR_VERT_MIRROR; break; - case MirrorGraph::Horizontal: nId = STR_HORI_MIRROR; break; - case MirrorGraph::Both: nId = STR_BOTH_MIRROR; break; - default: nId = 0; break; + case MirrorGraph::Dont: pId = STR_NO_MIRROR; break; + case MirrorGraph::Vertical: pId = STR_VERT_MIRROR; break; + case MirrorGraph::Horizontal: pId = STR_HORI_MIRROR; break; + case MirrorGraph::Both: pId = STR_BOTH_MIRROR; break; + default: pId = nullptr; break; } - if ( nId ) + if (pId) { - rText = SwResId( nId ); + rText = SwResId(pId); if (bGrfToggle) rText += SwResId( STR_MIRROR_TOGGLE ); } @@ -745,16 +745,16 @@ bool SwChannelGrf::GetPresentation( { if( SfxItemPresentation::Complete == ePres ) { - sal_uInt16 nId; + const char* pId; switch ( Which() ) { - case RES_GRFATR_CHANNELR: nId = STR_CHANNELR; break; - case RES_GRFATR_CHANNELG: nId = STR_CHANNELG; break; - case RES_GRFATR_CHANNELB: nId = STR_CHANNELB; break; - default: nId = 0; break; + case RES_GRFATR_CHANNELR: pId = STR_CHANNELR; break; + case RES_GRFATR_CHANNELG: pId = STR_CHANNELG; break; + case RES_GRFATR_CHANNELB: pId = STR_CHANNELB; break; + default: pId = nullptr; break; } - if( nId ) - rText = SwResId( nId ); + if (pId) + rText = SwResId(pId); else if( rText.getLength() ) rText.clear(); } @@ -785,8 +785,8 @@ bool SwInvertGrf::GetPresentation( rText.clear(); if( SfxItemPresentation::Complete == ePres ) { - const sal_uInt16 nId = GetValue() ? STR_INVERT : STR_INVERT_NOT; - rText = SwResId( nId ); + const char* pId = GetValue() ? STR_INVERT : STR_INVERT_NOT; + rText = SwResId(pId); } return true; } @@ -811,16 +811,16 @@ bool SwDrawModeGrf::GetPresentation( rText.clear(); if( SfxItemPresentation::Complete == ePres ) { - sal_uInt16 nId; + const char* pId; switch ( GetValue() ) { - case GraphicDrawMode::Greys: nId = STR_DRAWMODE_GREY; break; - case GraphicDrawMode::Mono: nId = STR_DRAWMODE_BLACKWHITE; break; - case GraphicDrawMode::Watermark: nId = STR_DRAWMODE_WATERMARK; break; - default: nId = STR_DRAWMODE_STD; break; + case GraphicDrawMode::Greys: pId = STR_DRAWMODE_GREY; break; + case GraphicDrawMode::Mono: pId = STR_DRAWMODE_BLACKWHITE; break; + case GraphicDrawMode::Watermark: pId = STR_DRAWMODE_WATERMARK; break; + default: pId = STR_DRAWMODE_STD; break; } - rText = SwResId( STR_DRAWMODE ) + SwResId( nId ); + rText = SwResId( STR_DRAWMODE ) + SwResId(pId); } return true; } @@ -834,8 +834,8 @@ bool SwFormatFollowTextFlow::GetPresentation( SfxItemPresentation ePres, rText.clear(); if( SfxItemPresentation::Complete == ePres ) { - const sal_uInt16 nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW; - rText = SwResId( nId ); + const char* pId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW; + rText = SwResId(pId); } return true; } diff --git a/sw/source/uibase/utlui/attrdesc.hrc b/sw/source/uibase/utlui/attrdesc.hrc deleted file mode 100644 index 861f8215adb4..000000000000 --- a/sw/source/uibase/utlui/attrdesc.hrc +++ /dev/null @@ -1,112 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_SOURCE_UIBASE_UTLUI_ATTRDESC_HRC -#define INCLUDED_SW_SOURCE_UIBASE_UTLUI_ATTRDESC_HRC - -#include "rcid.hrc" - -#define STR_DROP_OVER (RC_ATTR_BEGIN + 1) -#define STR_DROP_LINES (RC_ATTR_BEGIN + 2) -#define STR_NO_DROP_LINES (RC_ATTR_BEGIN + 3) -#define STR_NO_PAGEDESC (RC_ATTR_BEGIN + 4) -#define STR_NO_MIRROR (RC_ATTR_BEGIN + 5) -#define STR_VERT_MIRROR (RC_ATTR_BEGIN + 6) -#define STR_HORI_MIRROR (RC_ATTR_BEGIN + 7) -#define STR_BOTH_MIRROR (RC_ATTR_BEGIN + 8) -#define STR_CHARFMT (RC_ATTR_BEGIN + 9) -#define STR_NO_CHARFMT (RC_ATTR_BEGIN + 10) -#define STR_FOOTER (RC_ATTR_BEGIN + 11) -#define STR_NO_FOOTER (RC_ATTR_BEGIN + 12) -#define STR_HEADER (RC_ATTR_BEGIN + 13) -#define STR_NO_HEADER (RC_ATTR_BEGIN + 14) -#define STR_SURROUND_NONE (RC_ATTR_BEGIN + 15) -#define STR_SURROUND_THROUGH (RC_ATTR_BEGIN + 16) -#define STR_SURROUND_PARALLEL (RC_ATTR_BEGIN + 17) -#define STR_SURROUND_LEFT (RC_ATTR_BEGIN + 19) -#define STR_SURROUND_RIGHT (RC_ATTR_BEGIN + 20) -#define STR_FRM_WIDTH (RC_ATTR_BEGIN + 23) -#define STR_FRM_FIXEDHEIGHT (RC_ATTR_BEGIN + 24) -#define STR_FRM_MINHEIGHT (RC_ATTR_BEGIN + 25) -#define STR_FLY_AT_PARA (RC_ATTR_BEGIN + 26) -#define STR_FLY_AS_CHAR (RC_ATTR_BEGIN + 27) -#define STR_FLY_AT_PAGE (RC_ATTR_BEGIN + 28) -#define STR_POS_X (RC_ATTR_BEGIN + 29) -#define STR_POS_Y (RC_ATTR_BEGIN + 30) -#define STR_VERT_TOP (RC_ATTR_BEGIN + 31) -#define STR_VERT_CENTER (RC_ATTR_BEGIN + 32) -#define STR_VERT_BOTTOM (RC_ATTR_BEGIN + 33) -#define STR_HORI_RIGHT (RC_ATTR_BEGIN + 34) -#define STR_HORI_CENTER (RC_ATTR_BEGIN + 35) -#define STR_HORI_LEFT (RC_ATTR_BEGIN + 36) -#define STR_HORI_INSIDE (RC_ATTR_BEGIN + 37) -#define STR_HORI_OUTSIDE (RC_ATTR_BEGIN + 38) -#define STR_HORI_FULL (RC_ATTR_BEGIN + 39) -#define STR_COLUMNS (RC_ATTR_BEGIN + 40) -#define STR_LINE_WIDTH (RC_ATTR_BEGIN + 41) -#define STR_MAX_FTN_HEIGHT (RC_ATTR_BEGIN + 42) -#define STR_SURROUND_IDEAL (RC_ATTR_BEGIN + 43) -#define STR_LINE_TOP (RC_ATTR_BEGIN + 44) -#define STR_LINE_CENTER (RC_ATTR_BEGIN + 45) -#define STR_LINE_BOTTOM (RC_ATTR_BEGIN + 46) -#define STR_REGISTER_ON (RC_ATTR_BEGIN + 47) -#define STR_REGISTER_OFF (RC_ATTR_BEGIN + 48) -#define STR_SURROUND_ANCHORONLY (RC_ATTR_BEGIN + 49) -#define STR_EDIT_IN_READONLY (RC_ATTR_BEGIN + 50) -#define STR_LAYOUT_SPLIT (RC_ATTR_BEGIN + 51) -#define STR_NUMRULE_ON (RC_ATTR_BEGIN + 52) -#define STR_NUMRULE_OFF (RC_ATTR_BEGIN + 53) -#define STR_CONNECT1 (RC_ATTR_BEGIN + 54) -#define STR_CONNECT2 (RC_ATTR_BEGIN + 55) -#define STR_MIRROR_TOGGLE (RC_ATTR_BEGIN + 56) -#define STR_LINECOUNT (RC_ATTR_BEGIN + 57) -#define STR_DONTLINECOUNT (RC_ATTR_BEGIN + 58) -#define STR_LINCOUNT_START (RC_ATTR_BEGIN + 59) -#define STR_LUMINANCE (RC_ATTR_BEGIN + 60) -#define STR_CHANNELR (RC_ATTR_BEGIN + 61) -#define STR_CHANNELG (RC_ATTR_BEGIN + 62) -#define STR_CHANNELB (RC_ATTR_BEGIN + 63) -#define STR_CONTRAST (RC_ATTR_BEGIN + 64) -#define STR_GAMMA (RC_ATTR_BEGIN + 65) -#define STR_TRANSPARENCY (RC_ATTR_BEGIN + 66) -#define STR_INVERT (RC_ATTR_BEGIN + 67) -#define STR_INVERT_NOT (RC_ATTR_BEGIN + 68) -#define STR_DRAWMODE (RC_ATTR_BEGIN + 69) -#define STR_DRAWMODE_STD (RC_ATTR_BEGIN + 70) -#define STR_DRAWMODE_GREY (RC_ATTR_BEGIN + 71) -#define STR_DRAWMODE_BLACKWHITE (RC_ATTR_BEGIN + 72) -#define STR_DRAWMODE_WATERMARK (RC_ATTR_BEGIN + 73) -#define STR_ROTATION (RC_ATTR_BEGIN + 74) -#define STR_GRID_NONE (RC_ATTR_BEGIN + 75) -#define STR_GRID_LINES_ONLY (RC_ATTR_BEGIN + 76) -#define STR_GRID_LINES_CHARS (RC_ATTR_BEGIN + 77) -#define STR_FOLLOW_TEXT_FLOW (RC_ATTR_BEGIN + 78) -#define STR_DONT_FOLLOW_TEXT_FLOW (RC_ATTR_BEGIN + 79) -#define STR_CONNECT_BORDER_ON (RC_ATTR_BEGIN + 80) -#define STR_CONNECT_BORDER_OFF (RC_ATTR_BEGIN + 81) - -#define ATTR_ACT_END STR_CONNECT_BORDER_OFF - -#if ATTR_ACT_END > RC_ATTR_END -#error Resource-Id overflow in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/utlui/attrdesc.src b/sw/source/uibase/utlui/attrdesc.src deleted file mode 100644 index 3bc55fa38e37..000000000000 --- a/sw/source/uibase/utlui/attrdesc.src +++ /dev/null @@ -1,351 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "globals.hrc" -#include "attrdesc.hrc" - -// Strings for textual attributes. - -String STR_DROP_OVER -{ - Text [ en-US ] = "Drop Caps over" ; -}; -String STR_DROP_LINES -{ - Text [ en-US ] = "rows" ; -}; -String STR_NO_DROP_LINES -{ - Text [ en-US ] = "No Drop Caps" ; -}; -String STR_NO_PAGEDESC -{ - Text [ en-US ] = "No page break" ; -}; -String STR_NO_MIRROR -{ - Text [ en-US ] = "Don't mirror" ; -}; -String STR_VERT_MIRROR -{ - Text [ en-US ] = "Flip vertically" ; -}; -String STR_HORI_MIRROR -{ - Text [ en-US ] = "Flip horizontal" ; -}; -String STR_BOTH_MIRROR -{ - Text [ en-US ] = "Horizontal and Vertical Flip" ; -}; -String STR_MIRROR_TOGGLE -{ - Text [ en-US ] = "+ mirror horizontal on even pages" ; -}; -String STR_CHARFMT -{ - Text [ en-US ] = "Character Style" ; -}; -String STR_NO_CHARFMT -{ - Text [ en-US ] = "No Character Style" ; -}; -String STR_FOOTER -{ - Text [ en-US ] = "Footer" ; -}; -String STR_NO_FOOTER -{ - Text [ en-US ] = "No footer" ; -}; -String STR_HEADER -{ - Text [ en-US ] = "Header" ; -}; -String STR_NO_HEADER -{ - Text [ en-US ] = "No header" ; -}; -String STR_SURROUND_IDEAL -{ - Text [ en-US ] = "Optimal wrap" ; -}; -String STR_SURROUND_NONE -{ - Text [ en-US ] = "No wrap" ; -}; -String STR_SURROUND_THROUGH -{ - Text [ en-US ] = "Through" ; -}; -String STR_SURROUND_PARALLEL -{ - Text [ en-US ] = "Parallel wrap" ; -}; -String STR_SURROUND_LEFT -{ - Text [ en-US ] = "Left wrap" ; -}; -String STR_SURROUND_RIGHT -{ - Text [ en-US ] = "Right wrap" ; -}; -String STR_SURROUND_ANCHORONLY -{ - Text [ en-US ] = "(Anchor only)" ; -}; -String STR_FRM_WIDTH -{ - Text [ en-US ] = "Width:" ; -}; -String STR_FRM_FIXEDHEIGHT -{ - Text [ en-US ] = "Fixed height:" ; -}; -String STR_FRM_MINHEIGHT -{ - Text [ en-US ] = "Min. height:" ; -}; -String STR_FLY_AT_PARA -{ - Text [ en-US ] = "to paragraph" ; -}; -String STR_FLY_AS_CHAR -{ - Text [ en-US ] = "to character" ; -}; -String STR_FLY_AT_PAGE -{ - Text [ en-US ] = "to page" ; -}; -String STR_POS_X -{ - Text [ en-US ] = "X Coordinate:" ; -}; -String STR_POS_Y -{ - Text [ en-US ] = "Y Coordinate:" ; -}; -String STR_VERT_TOP -{ - Text [ en-US ] = "at top" ; -}; -String STR_VERT_CENTER -{ - Text [ en-US ] = "Centered vertically" ; -}; -String STR_VERT_BOTTOM -{ - Text [ en-US ] = "at bottom" ; -}; -String STR_LINE_TOP -{ - Text [ en-US ] = "Top of line" ; -}; -String STR_LINE_CENTER -{ - Text [ en-US ] = "Line centered" ; -}; -String STR_LINE_BOTTOM -{ - Text [ en-US ] = "Bottom of line" ; -}; -String STR_REGISTER_ON -{ - Text [ en-US ] = "Register-true" ; -}; -String STR_REGISTER_OFF -{ - Text [ en-US ] = "Not register-true" ; -}; -String STR_HORI_RIGHT -{ - Text [ en-US ] = "at the right" ; -}; -String STR_HORI_CENTER -{ - Text [ en-US ] = "Centered horizontally" ; -}; -String STR_HORI_LEFT -{ - Text [ en-US ] = "at the left" ; -}; -String STR_HORI_INSIDE -{ - Text [ en-US ] = "inside" ; -}; -String STR_HORI_OUTSIDE -{ - Text [ en-US ] = "outside" ; -}; -String STR_HORI_FULL -{ - Text [ en-US ] = "Full width" ; -}; -String STR_COLUMNS -{ - Text [ en-US ] = "Columns" ; -}; -String STR_LINE_WIDTH -{ - Text [ en-US ] = "Separator Width:" ; -}; -String STR_MAX_FTN_HEIGHT -{ - Text [ en-US ] = "Max. footnote area:" ; -}; -String STR_EDIT_IN_READONLY -{ - Text [ en-US ] = "Editable in read-only document" ; -}; -String STR_LAYOUT_SPLIT -{ - Text [ en-US ] = "Split" ; -}; -String STR_NUMRULE_ON -{ - Text [ en-US ] = "Numbering" ; -}; -String STR_NUMRULE_OFF -{ - Text [ en-US ] = "no numbering" ; -}; -String STR_CONNECT1 -{ - Text [ en-US ] = "linked to " ; -}; -String STR_CONNECT2 -{ - Text [ en-US ] = "and " ; -}; -String STR_LINECOUNT -{ - Text [ en-US ] = "Count lines" ; -}; -String STR_DONTLINECOUNT -{ - Text [ en-US ] = "don't count lines" ; -}; -String STR_LINCOUNT_START -{ - Text [ en-US ] = "restart line count with: " ; -}; - -String STR_LUMINANCE -{ - Text [ en-US ] = "Brightness: "; -}; - -String STR_CHANNELR -{ - Text [ en-US ] = "Red: "; -}; - -String STR_CHANNELG -{ - Text [ en-US ] = "Green: "; -}; - -String STR_CHANNELB -{ - Text [ en-US ] = "Blue: "; -}; - -String STR_CONTRAST -{ - Text [ en-US ] = "Contrast: "; -}; - -String STR_GAMMA -{ - Text [ en-US ] = "Gamma: "; -}; - -String STR_TRANSPARENCY -{ - Text [ en-US ] = "Transparency: "; -}; - -String STR_INVERT -{ - Text [ en-US ] = "Invert"; -}; -String STR_INVERT_NOT -{ - Text [ en-US ] = "do not invert"; -}; - -String STR_DRAWMODE -{ - Text [ en-US ] = "Graphics mode: "; -}; - -String STR_DRAWMODE_STD -{ - Text [ en-US ] = "Standard"; -}; -String STR_DRAWMODE_GREY -{ - Text [ en-US ] = "Grayscales"; -}; -String STR_DRAWMODE_BLACKWHITE -{ - Text [ en-US ] = "Black & White"; -}; -String STR_DRAWMODE_WATERMARK -{ - Text [ en-US ] = "Watermark"; -}; -String STR_ROTATION -{ - Text [ en-US ] = "Rotation"; -}; - -String STR_GRID_NONE -{ - Text [ en-US ] = "No grid"; -}; - -String STR_GRID_LINES_ONLY -{ - Text [ en-US ] = "Grid (lines only)"; -}; - -String STR_GRID_LINES_CHARS -{ - Text [ en-US ] = "Grid (lines and characters)"; -}; -String STR_FOLLOW_TEXT_FLOW -{ - Text [ en-US ] = "Follow text flow"; -}; -String STR_DONT_FOLLOW_TEXT_FLOW -{ - Text [ en-US ] = "Do not follow text flow"; -}; -String STR_CONNECT_BORDER_ON -{ - Text [ en-US ] = "Merge borders"; -}; -String STR_CONNECT_BORDER_OFF -{ - Text [ en-US ] = "Do not merge borders"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx index 620bd42a8d3b..98d5de5488be 100644 --- a/sw/source/uibase/utlui/bookctrl.cxx +++ b/sw/source/uibase/utlui/bookctrl.cxx @@ -19,7 +19,7 @@ #include "hintids.hxx" #include <swtypes.hxx> -#include <utlui.hrc> +#include <strings.hrc> #include <svl/intitem.hxx> #include <svl/stritem.hxx> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 20c6ee6c028b..9d369a8eabe8 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -57,9 +57,9 @@ #include <unotxvw.hxx> #include <cmdid.h> #include <helpid.h> -#include <utlui.hrc> +#include <strings.hrc> #include <misc.hrc> -#include <comcore.hrc> +#include <strings.hrc> #include <com/sun/star/text/XTextSectionsSupplier.hpp> #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp> #include <com/sun/star/text/XTextTablesSupplier.hpp> @@ -215,12 +215,44 @@ SwTOXBaseContent::~SwTOXBaseContent() { } +static const char* STR_CONTENT_TYPE_ARY[] = +{ + STR_CONTENT_TYPE_OUTLINE, + STR_CONTENT_TYPE_TABLE, + STR_CONTENT_TYPE_FRAME, + STR_CONTENT_TYPE_GRAPHIC, + STR_CONTENT_TYPE_OLE, + STR_CONTENT_TYPE_BOOKMARK, + STR_CONTENT_TYPE_REGION, + STR_CONTENT_TYPE_URLFIELD, + STR_CONTENT_TYPE_REFERENCE, + STR_CONTENT_TYPE_INDEX, + STR_CONTENT_TYPE_POSTIT, + STR_CONTENT_TYPE_DRAWOBJECT +}; + +static const char* STR_CONTENT_TYPE_SINGLE_ARY[] = +{ + STR_CONTENT_TYPE_SINGLE_OUTLINE, + STR_CONTENT_TYPE_SINGLE_TABLE, + STR_CONTENT_TYPE_SINGLE_FRAME, + STR_CONTENT_TYPE_SINGLE_GRAPHIC, + STR_CONTENT_TYPE_SINGLE_OLE, + STR_CONTENT_TYPE_SINGLE_BOOKMARK, + STR_CONTENT_TYPE_SINGLE_REGION, + STR_CONTENT_TYPE_SINGLE_URLFIELD, + STR_CONTENT_TYPE_SINGLE_REFERENCE, + STR_CONTENT_TYPE_SINGLE_INDEX, + STR_CONTENT_TYPE_SINGLE_POSTIT, + STR_CONTENT_TYPE_SINGLE_DRAWOBJECT +}; + SwContentType::SwContentType(SwWrtShell* pShell, ContentTypeId nType, sal_uInt8 nLevel) : SwTypeNumber(CTYPE_CTT), pWrtShell(pShell), pMember(nullptr), - sContentTypeName(SwResId(STR_CONTENT_TYPE_FIRST + (int)nType)), - sSingleContentTypeName(SwResId(STR_CONTENT_TYPE_SINGLE_FIRST + (int)nType)), + sContentTypeName(SwResId(STR_CONTENT_TYPE_ARY[(int)nType])), + sSingleContentTypeName(SwResId(STR_CONTENT_TYPE_SINGLE_ARY[(int)nType])), nMemberCount(0), nContentType(nType), nOutlineLevel(nLevel), @@ -767,6 +799,38 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) } +enum STR_CONTEXT_IDX +{ + IDX_STR_OUTLINE_LEVEL = 0, + IDX_STR_DRAGMODE = 1, + IDX_STR_HYPERLINK = 2, + IDX_STR_LINK_REGION = 3, + IDX_STR_COPY_REGION = 4, + IDX_STR_DISPLAY = 5, + IDX_STR_ACTIVE_VIEW = 6, + IDX_STR_HIDDEN = 7, + IDX_STR_ACTIVE = 8, + IDX_STR_INACTIVE = 9, + IDX_STR_EDIT_ENTRY = 10, + IDX_STR_DELETE_ENTRY = 11 +}; + +static const char* STR_CONTEXT_ARY[] = +{ + STR_OUTLINE_LEVEL, + STR_DRAGMODE, + STR_HYPERLINK, + STR_LINK_REGION, + STR_COPY_REGION, + STR_DISPLAY, + STR_ACTIVE_VIEW, + STR_HIDDEN, + STR_ACTIVE, + STR_INACTIVE, + STR_EDIT_ENTRY, + STR_DELETE_ENTRY +}; + SwContentTree::SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog) : SvTreeListBox(pParent) , m_xDialog(pDialog) @@ -810,7 +874,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog) } for (int i = 0; i < CONTEXT_COUNT; ++i) { - m_aContextStrings[i] = SwResId(i+STR_CONTEXT_FIRST); + m_aContextStrings[i] = SwResId(STR_CONTEXT_ARY[i]); } m_nActiveBlock = m_pConfig->GetActiveBlock(); m_aUpdTimer.SetInvokeHandler(LINK(this, SwContentTree, TimerUpdate)); @@ -1110,7 +1174,7 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu() for(int i=0; i < 3; ++i) { pSubPop2->InsertItem(i + 201, m_aContextStrings[ - STR_HYPERLINK - STR_CONTEXT_FIRST + i], MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); + IDX_STR_HYPERLINK + i], MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); } pSubPop2->CheckItem(201 + static_cast<int>(GetParentWindow()->GetRegionDropMode())); // Insert the list of the open files @@ -1123,7 +1187,7 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu() if(pView == pActiveView) { sInsert += "("; - sInsert += m_aContextStrings[ STR_ACTIVE - STR_CONTEXT_FIRST]; + sInsert += m_aContextStrings[IDX_STR_ACTIVE]; sInsert += ")"; } pSubPop3->InsertItem(nId, sInsert, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); @@ -1132,12 +1196,12 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu() pView = SwModule::GetNextView(pView); nId++; } - pSubPop3->InsertItem(nId++, m_aContextStrings[STR_ACTIVE_VIEW - STR_CONTEXT_FIRST], MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); + pSubPop3->InsertItem(nId++, m_aContextStrings[IDX_STR_ACTIVE_VIEW], MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); if(m_pHiddenShell) { OUString sHiddenEntry = m_pHiddenShell->GetView().GetDocShell()->GetTitle(); sHiddenEntry += " ( "; - sHiddenEntry += m_aContextStrings[ STR_HIDDEN - STR_CONTEXT_FIRST]; + sHiddenEntry += m_aContextStrings[IDX_STR_HIDDEN]; sHiddenEntry += " )"; pSubPop3->InsertItem(nId, sHiddenEntry, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); } @@ -1147,9 +1211,9 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu() else if (State::HIDDEN == m_eState) pSubPop3->CheckItem( nId ); - pPop->InsertItem( 1, m_aContextStrings[STR_OUTLINE_LEVEL - STR_CONTEXT_FIRST]); - pPop->InsertItem(2, m_aContextStrings[STR_DRAGMODE - STR_CONTEXT_FIRST]); - pPop->InsertItem(3, m_aContextStrings[STR_DISPLAY - STR_CONTEXT_FIRST]); + pPop->InsertItem( 1, m_aContextStrings[IDX_STR_OUTLINE_LEVEL]); + pPop->InsertItem(2, m_aContextStrings[IDX_STR_DRAGMODE]); + pPop->InsertItem(3, m_aContextStrings[IDX_STR_DISPLAY]); // Now edit SvTreeListEntry* pEntry = nullptr; // Edit only if the shown content is coming from the current view. @@ -1185,38 +1249,38 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu() const SwTOXBase* pBase = static_cast<SwTOXBaseContent*>(pEntry->GetUserData())->GetTOXBase(); if(!pBase->IsTOXBaseInReadonly()) - pSubPop4->InsertItem(403, m_aContextStrings[STR_EDIT_ENTRY - STR_CONTEXT_FIRST]); + pSubPop4->InsertItem(403, m_aContextStrings[IDX_STR_EDIT_ENTRY]); pSubPop4->InsertItem(405, m_sReadonlyIdx); pSubPop4->CheckItem( 405, SwEditShell::IsTOXBaseReadonly(*pBase)); - pSubPop4->InsertItem(501, m_aContextStrings[STR_DELETE_ENTRY - STR_CONTEXT_FIRST]); + pSubPop4->InsertItem(501, m_aContextStrings[IDX_STR_DELETE_ENTRY]); } else if(ContentTypeId::TABLE == nContentType && !bReadonly) { bSubPop4 = true; - pSubPop4->InsertItem(403, m_aContextStrings[STR_EDIT_ENTRY - STR_CONTEXT_FIRST]); + pSubPop4->InsertItem(403, m_aContextStrings[IDX_STR_EDIT_ENTRY]); pSubPop4->InsertItem(404, m_sUnprotTable); bool bFull = false; OUString sTableName = static_cast<SwContent*>(pEntry->GetUserData())->GetName(); bool bProt = m_pActiveShell->HasTableAnyProtection( &sTableName, &bFull ); pSubPop4->EnableItem(403, !bFull ); pSubPop4->EnableItem(404, bProt ); - pSubPop4->InsertItem(501, m_aContextStrings[STR_DELETE_ENTRY - STR_CONTEXT_FIRST]); + pSubPop4->InsertItem(501, m_aContextStrings[IDX_STR_DELETE_ENTRY]); } else if(bEditable || bDeletable) { if(bEditable && bDeletable) { - pSubPop4->InsertItem(403, m_aContextStrings[STR_EDIT_ENTRY - STR_CONTEXT_FIRST]); - pSubPop4->InsertItem(501, m_aContextStrings[STR_DELETE_ENTRY - STR_CONTEXT_FIRST]); + pSubPop4->InsertItem(403, m_aContextStrings[IDX_STR_EDIT_ENTRY]); + pSubPop4->InsertItem(501, m_aContextStrings[IDX_STR_DELETE_ENTRY]); bSubPop4 = true; } else if(bEditable) - pPop->InsertItem(403, m_aContextStrings[STR_EDIT_ENTRY - STR_CONTEXT_FIRST]); + pPop->InsertItem(403, m_aContextStrings[IDX_STR_EDIT_ENTRY]); else if(bDeletable) { - pSubPop4->InsertItem(501, m_aContextStrings[STR_DELETE_ENTRY - STR_CONTEXT_FIRST]); + pSubPop4->InsertItem(501, m_aContextStrings[IDX_STR_DELETE_ENTRY]); } } //Rename object diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 8e750f9cb53e..0413ec2e0fb0 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -53,8 +53,8 @@ #include <cmdid.h> #include <helpid.h> -#include <utlui.hrc> -#include <comcore.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <globals.hrc> #include "bitmaps.hlst" #include "swabstdlg.hxx" @@ -134,6 +134,42 @@ void SwGlobalFrameListener_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& bValid = false; } +enum GLOBAL_CONTEXT_IDX +{ + IDX_STR_UPDATE = 0, + IDX_STR_EDIT_CONTENT = 1, + IDX_STR_EDIT_INSERT = 2, + IDX_STR_INDEX = 3, + IDX_STR_FILE = 4, + IDX_STR_NEW_FILE = 5, + IDX_STR_INSERT_TEXT = 6, + IDX_STR_DELETE = 7, + IDX_STR_UPDATE_SEL = 8, + IDX_STR_UPDATE_INDEX = 9, + IDX_STR_UPDATE_LINK = 10, + IDX_STR_UPDATE_ALL = 11, + IDX_STR_BROKEN_LINK = 12, + IDX_STR_EDIT_LINK = 13 +}; + +static const char* GLOBAL_CONTEXT_ARY[] = +{ + STR_UPDATE, + STR_EDIT_CONTENT, + STR_EDIT_INSERT, + STR_INDEX, + STR_FILE, + STR_NEW_FILE, + STR_INSERT_TEXT, + STR_DELETE, + STR_UPDATE_SEL, + STR_UPDATE_INDEX, + STR_UPDATE_LINK, + STR_UPDATE_ALL, + STR_BROKEN_LINK, + STR_EDIT_LINK +}; + SwGlobalTree::SwGlobalTree(vcl::Window* pParent, SwNavigationPI* pDialog) : SvTreeListBox(pParent) , m_xDialog(pDialog) @@ -153,9 +189,9 @@ SwGlobalTree::SwGlobalTree(vcl::Window* pParent, SwNavigationPI* pDialog) m_aUpdateTimer.SetTimeout(GLOBAL_UPDATE_TIMEOUT); m_aUpdateTimer.SetInvokeHandler(LINK(this, SwGlobalTree, Timeout)); m_aUpdateTimer.Start(); - for(sal_uInt16 i = 0; i < GLOBAL_CONTEXT_COUNT; i++) + for (sal_uInt16 i = 0; i < GLOBAL_CONTEXT_COUNT; i++) { - m_aContextStrings[i] = SwResId(i+ STR_GLOBAL_CONTEXT_FIRST); + m_aContextStrings[i] = SwResId(GLOBAL_CONTEXT_ARY[i]); } SetHelpId(HID_NAVIGATOR_GLOB_TREELIST); SelectHdl(); @@ -334,33 +370,33 @@ VclPtr<PopupMenu> SwGlobalTree::CreateContextMenu() for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) { - pSubPop2->InsertItem( i, m_aContextStrings[STR_UPDATE_SEL - STR_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] ); + pSubPop2->InsertItem( i, m_aContextStrings[IDX_STR_UPDATE_SEL + i - CTX_UPDATE_SEL] ); pSubPop2->SetHelpId(i, aHelpForMenu[i]); } pSubPop2->EnableItem(CTX_UPDATE_SEL, bool(nEnableFlags & MenuEnableFlags::UpdateSel)); - pSubPop1->InsertItem(CTX_INSERT_ANY_INDEX, m_aContextStrings[STR_INDEX - STR_GLOBAL_CONTEXT_FIRST]); + pSubPop1->InsertItem(CTX_INSERT_ANY_INDEX, m_aContextStrings[IDX_STR_INDEX]); pSubPop1->SetHelpId(CTX_INSERT_ANY_INDEX, aHelpForMenu[CTX_INSERT_ANY_INDEX]); - pSubPop1->InsertItem(CTX_INSERT_FILE, m_aContextStrings[STR_FILE - STR_GLOBAL_CONTEXT_FIRST]); + pSubPop1->InsertItem(CTX_INSERT_FILE, m_aContextStrings[IDX_STR_FILE]); pSubPop1->SetHelpId(CTX_INSERT_FILE, aHelpForMenu[CTX_INSERT_FILE]); - pSubPop1->InsertItem(CTX_INSERT_NEW_FILE, m_aContextStrings[STR_NEW_FILE - STR_GLOBAL_CONTEXT_FIRST]); + pSubPop1->InsertItem(CTX_INSERT_NEW_FILE, m_aContextStrings[IDX_STR_NEW_FILE]); pSubPop1->SetHelpId(CTX_INSERT_NEW_FILE, aHelpForMenu[CTX_INSERT_NEW_FILE]); - pSubPop1->InsertItem(CTX_INSERT_TEXT, m_aContextStrings[STR_INSERT_TEXT - STR_GLOBAL_CONTEXT_FIRST]); + pSubPop1->InsertItem(CTX_INSERT_TEXT, m_aContextStrings[IDX_STR_INSERT_TEXT]); pSubPop1->SetHelpId(CTX_INSERT_TEXT, aHelpForMenu[CTX_INSERT_TEXT]); - pPop->InsertItem(CTX_UPDATE, m_aContextStrings[STR_UPDATE - STR_GLOBAL_CONTEXT_FIRST]); + pPop->InsertItem(CTX_UPDATE, m_aContextStrings[IDX_STR_UPDATE]); pPop->SetHelpId(CTX_UPDATE, aHelpForMenu[CTX_UPDATE]); - pPop->InsertItem(CTX_EDIT, m_aContextStrings[STR_EDIT_CONTENT - STR_GLOBAL_CONTEXT_FIRST]); + pPop->InsertItem(CTX_EDIT, m_aContextStrings[IDX_STR_EDIT_CONTENT]); pPop->SetHelpId(CTX_EDIT, aHelpForMenu[CTX_EDIT]); if(nEnableFlags&MenuEnableFlags::EditLink) { - pPop->InsertItem(CTX_EDIT_LINK, m_aContextStrings[STR_EDIT_LINK - STR_GLOBAL_CONTEXT_FIRST]); + pPop->InsertItem(CTX_EDIT_LINK, m_aContextStrings[IDX_STR_EDIT_LINK]); pPop->SetHelpId(CTX_EDIT_LINK, aHelpForMenu[CTX_EDIT_LINK]); } - pPop->InsertItem(CTX_INSERT, m_aContextStrings[STR_EDIT_INSERT - STR_GLOBAL_CONTEXT_FIRST]); + pPop->InsertItem(CTX_INSERT, m_aContextStrings[IDX_STR_EDIT_INSERT]); pPop->SetHelpId(CTX_INSERT, aHelpForMenu[CTX_INSERT]); pPop->InsertSeparator() ; - pPop->InsertItem(CTX_DELETE, m_aContextStrings[STR_DELETE - STR_GLOBAL_CONTEXT_FIRST]); + pPop->InsertItem(CTX_DELETE, m_aContextStrings[IDX_STR_DELETE]); pPop->SetHelpId(CTX_DELETE, aHelpForMenu[CTX_DELETE]); //disabling if applicable @@ -389,7 +425,7 @@ void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox) ScopedVclPtrInstance<PopupMenu> pMenu; for (sal_uInt16 i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; ++i) { - pMenu->InsertItem( i, m_aContextStrings[STR_INDEX - STR_GLOBAL_CONTEXT_FIRST - CTX_INSERT_ANY_INDEX + i] ); + pMenu->InsertItem( i, m_aContextStrings[IDX_STR_INDEX + i - CTX_INSERT_ANY_INDEX] ); pMenu->SetHelpId(i, aHelpForMenu[i] ); } pMenu->EnableItem(CTX_INSERT_ANY_INDEX, bool(nEnableFlags & MenuEnableFlags::InsertIdx )); @@ -407,7 +443,7 @@ void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox) ScopedVclPtrInstance<PopupMenu> pMenu; for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) { - pMenu->InsertItem( i, m_aContextStrings[STR_UPDATE_SEL - STR_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] ); + pMenu->InsertItem( i, m_aContextStrings[IDX_STR_UPDATE_SEL + i - CTX_UPDATE_SEL] ); pMenu->SetHelpId(i, aHelpForMenu[i] ); } pMenu->EnableItem(CTX_UPDATE_SEL, bool(nEnableFlags & MenuEnableFlags::UpdateSel)); @@ -470,7 +506,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt ) const SwSection* pSect = pCont->GetSection(); OUString sEntry = pSect->GetLinkFileName().getToken(0, sfx2::cTokenSeparator); if(!pSect->IsConnectFlag()) - sEntry = m_aContextStrings[STR_BROKEN_LINK - STR_GLOBAL_CONTEXT_FIRST] + sEntry; + sEntry = m_aContextStrings[IDX_STR_BROKEN_LINK] + sEntry; Point aEntryPos = GetEntryPosition( pEntry ); aEntryPos.X() = GetTabPos( pEntry, pTab ); @@ -660,7 +696,7 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData) { case GLBLDOC_UNKNOWN: { - sEntry = m_aContextStrings[STR_INSERT_TEXT - STR_GLOBAL_CONTEXT_FIRST]; + sEntry = m_aContextStrings[IDX_STR_INSERT_TEXT]; } break; case GLBLDOC_TOXBASE: diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index 6f4f39f5c5b7..ea1d0205a67d 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -36,7 +36,7 @@ #include <vector> -#include <utlui.hrc> +#include <strings.hrc> #define STRING_DELIM (char)0x0A #define GLOS_TIMEOUT 30000 // update every 30 seconds diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx index a64892fea6bf..97be35568e0c 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> @@ -28,9 +27,9 @@ #include <fldbas.hxx> #include <glosdoc.hxx> #include <gloslst.hxx> - -#include <utlui.hrc> #include <comcore.hrc> +#include <strings.hrc> +#include <utlui.hrc> #include <authfld.hxx> #include <dbmgr.hxx> #include <unotools/syslocale.hxx> @@ -173,6 +172,19 @@ void InitUI() SwEditWin::InitStaticData(); } +static const char* FLD_DOCINFO_ARY[] = +{ + FLD_DOCINFO_TITEL, + FLD_DOCINFO_THEMA, + FLD_DOCINFO_KEYS, + FLD_DOCINFO_COMMENT, + FLD_DOCINFO_CREATE, + FLD_DOCINFO_CHANGE, + FLD_DOCINFO_PRINT, + FLD_DOCINFO_DOCNO, + FLD_DOCINFO_EDIT +}; + ShellResource::ShellResource() : aPostItAuthor( SwResId( STR_POSTIT_AUTHOR ) ), aPostItPage( SwResId( STR_POSTIT_PAGE ) ), @@ -207,8 +219,6 @@ ShellResource::ShellResource() sPageDescFollowName( SwResId(STR_PAGEDESC_FOLLOWNAME)), sPageDescName( SwResId(STR_PAGEDESC_NAME)) { - const sal_uInt16 nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN; - vcl::KeyCode aCode( KEY_SPACE ); vcl::KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 ); OUString aModStr( aModifiedCode.GetName() ); @@ -216,8 +226,8 @@ ShellResource::ShellResource() aModStr = aModStr.replaceAll("+", ""); aLinkCtrlClick = aLinkCtrlClick.replaceAll("%s", aModStr); - for(sal_uInt16 i = 0; i < nCount; ++i) - aDocInfoLst.push_back(SwResId(FLD_DOCINFO_BEGIN + i)); + for (size_t i = 0; i < SAL_N_ELEMENTS(FLD_DOCINFO_ARY); ++i) + aDocInfoLst.push_back(SwResId(FLD_DOCINFO_ARY[i])); } OUString ShellResource::GetPageDescName(sal_uInt16 nNo, PageNameMode eMode) @@ -266,11 +276,10 @@ void ShellResource::GetAutoFormatNameLst_() const pAutoFormatNameLst.reset( new std::vector<OUString> ); pAutoFormatNameLst->reserve(STR_AUTOFMTREDL_END); - ResStringArray aStringArray(ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr)); - assert(aStringArray.Count() == STR_AUTOFMTREDL_END); + assert(SAL_N_ELEMENTS(RID_SHELLRES_AUTOFMTSTRS) == STR_AUTOFMTREDL_END); for (sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n) { - OUString p(aStringArray.GetString(n)); + OUString p(SwResId(RID_SHELLRES_AUTOFMTSTRS[n])); if (STR_AUTOFMTREDL_TYPO == n) { const SvtSysLocale aSysLocale; @@ -282,26 +291,90 @@ void ShellResource::GetAutoFormatNameLst_() const } } +namespace +{ + const char* STR_AUTH_FIELD_ARY[] = + { + STR_AUTH_FIELD_IDENTIFIER, + STR_AUTH_FIELD_AUTHORITY_TYPE, + STR_AUTH_FIELD_ADDRESS, + STR_AUTH_FIELD_ANNOTE, + STR_AUTH_FIELD_AUTHOR, + STR_AUTH_FIELD_BOOKTITLE, + STR_AUTH_FIELD_CHAPTER, + STR_AUTH_FIELD_EDITION, + STR_AUTH_FIELD_EDITOR, + STR_AUTH_FIELD_HOWPUBLISHED, + STR_AUTH_FIELD_INSTITUTION, + STR_AUTH_FIELD_JOURNAL, + STR_AUTH_FIELD_MONTH, + STR_AUTH_FIELD_NOTE, + STR_AUTH_FIELD_NUMBER, + STR_AUTH_FIELD_ORGANIZATIONS, + STR_AUTH_FIELD_PAGES, + STR_AUTH_FIELD_PUBLISHER, + STR_AUTH_FIELD_SCHOOL, + STR_AUTH_FIELD_SERIES, + STR_AUTH_FIELD_TITLE, + STR_AUTH_FIELD_TYPE, + STR_AUTH_FIELD_VOLUME, + STR_AUTH_FIELD_YEAR, + STR_AUTH_FIELD_URL, + STR_AUTH_FIELD_CUSTOM1, + STR_AUTH_FIELD_CUSTOM2, + STR_AUTH_FIELD_CUSTOM3, + STR_AUTH_FIELD_CUSTOM4, + STR_AUTH_FIELD_CUSTOM5, + STR_AUTH_FIELD_ISBN + }; +} + OUString SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType) { if(!pAuthFieldNameList) { pAuthFieldNameList = new std::vector<OUString>; pAuthFieldNameList->reserve(AUTH_FIELD_END); - for(sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i) - pAuthFieldNameList->push_back(SwResId(STR_AUTH_FIELD_START + i)); + for (sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i) + pAuthFieldNameList->push_back(SwResId(STR_AUTH_FIELD_ARY[i])); } return (*pAuthFieldNameList)[static_cast< sal_uInt16 >(eType)]; } +static const char* STR_AUTH_TYPE_ARY[] = +{ + STR_AUTH_TYPE_ARTICLE, + STR_AUTH_TYPE_BOOK, + STR_AUTH_TYPE_BOOKLET, + STR_AUTH_TYPE_CONFERENCE, + STR_AUTH_TYPE_INBOOK, + STR_AUTH_TYPE_INCOLLECTION, + STR_AUTH_TYPE_INPROCEEDINGS, + STR_AUTH_TYPE_JOURNAL, + STR_AUTH_TYPE_MANUAL, + STR_AUTH_TYPE_MASTERSTHESIS, + STR_AUTH_TYPE_MISC, + STR_AUTH_TYPE_PHDTHESIS, + STR_AUTH_TYPE_PROCEEDINGS, + STR_AUTH_TYPE_TECHREPORT, + STR_AUTH_TYPE_UNPUBLISHED, + STR_AUTH_TYPE_EMAIL, + STR_AUTH_TYPE_WWW, + STR_AUTH_TYPE_CUSTOM1, + STR_AUTH_TYPE_CUSTOM2, + STR_AUTH_TYPE_CUSTOM3, + STR_AUTH_TYPE_CUSTOM4, + STR_AUTH_TYPE_CUSTOM5 +}; + OUString SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType) { if(!pAuthFieldTypeList) { pAuthFieldTypeList = new std::vector<OUString>; pAuthFieldTypeList->reserve(AUTH_TYPE_END); - for(sal_uInt16 i = 0; i < AUTH_TYPE_END; ++i) - pAuthFieldTypeList->push_back(SwResId(STR_AUTH_TYPE_START + i)); + for (sal_uInt16 i = 0; i < AUTH_TYPE_END; ++i) + pAuthFieldTypeList->push_back(SwResId(STR_AUTH_TYPE_ARY[i])); } return (*pAuthFieldTypeList)[static_cast< sal_uInt16 >(eType)]; } diff --git a/sw/source/uibase/utlui/initui.src b/sw/source/uibase/utlui/initui.src deleted file mode 100644 index 05899f35bb92..000000000000 --- a/sw/source/uibase/utlui/initui.src +++ /dev/null @@ -1,394 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "globals.hrc" -#include "utlui.hrc" -#include "helpid.h" - -// 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_OVERFLOW -{ - Text [ en-US ] = "** Overflow **" ; -}; -String STR_CALC_DEFAULT -{ - Text [ en-US ] = "** Error **" ; -}; -String STR_CALC_ERROR -{ - Text [ en-US ] = "** Expression is faulty **" ; -}; -String STR_GETREFFLD_REFITEMNOTFOUND -{ - Text [ en-US ] = "Error: Reference source not found" ; -}; -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_TOC -{ - Text [ en-US ] = "Table of Contents" ; -}; - -String STR_TOX_AUTH -{ - Text [ en-US ] = "Bibliography"; -}; - -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"; -}; - - // 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 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 -{ - Text [ en-US ] = "Article"; -}; -String STR_AUTH_TYPE_BOOK -{ - Text [ en-US ] = "Book"; -}; -String STR_AUTH_TYPE_BOOKLET -{ - Text [ en-US ] = "Brochures"; -}; -String STR_AUTH_TYPE_CONFERENCE -{ - Text [ en-US ] = "Conference proceedings"; -}; -String STR_AUTH_TYPE_INBOOK -{ - Text [ en-US ] = "Book excerpt"; -}; -String STR_AUTH_TYPE_INCOLLECTION -{ - Text [ en-US ] = "Book excerpt with title"; -}; -String STR_AUTH_TYPE_INPROCEEDINGS -{ - Text [ en-US ] = "Conference proceedings"; -}; -String STR_AUTH_TYPE_JOURNAL -{ - Text [ en-US ] = "Journal"; -}; -String STR_AUTH_TYPE_MANUAL -{ - Text [ en-US ] = "Techn. documentation"; -}; -String STR_AUTH_TYPE_MASTERSTHESIS -{ - Text [ en-US ] = "Thesis"; -}; -String STR_AUTH_TYPE_MISC -{ - Text [ en-US ] = "Miscellaneous"; -}; -String STR_AUTH_TYPE_PHDTHESIS -{ - Text [ en-US ] = "Dissertation"; -}; -String STR_AUTH_TYPE_PROCEEDINGS -{ - Text [ en-US ] = "Conference proceedings"; -}; -String STR_AUTH_TYPE_TECHREPORT -{ - Text [ en-US ] = "Research report"; -}; -String STR_AUTH_TYPE_UNPUBLISHED -{ - Text [ en-US ] = "Unpublished"; -}; -String STR_AUTH_TYPE_EMAIL -{ - Text [ en-US ] = "E-mail"; -}; -String STR_AUTH_TYPE_WWW -{ - Text [ en-US ] = "WWW document"; -}; -String STR_AUTH_TYPE_CUSTOM1 -{ - Text [ en-US ] = "User-defined1"; -}; -String STR_AUTH_TYPE_CUSTOM2 -{ - Text [ en-US ] = "User-defined2"; -}; -String STR_AUTH_TYPE_CUSTOM3 -{ - Text [ en-US ] = "User-defined3"; -}; -String STR_AUTH_TYPE_CUSTOM4 -{ - Text [ en-US ] = "User-defined4"; -}; -String STR_AUTH_TYPE_CUSTOM5 -{ - Text [ en-US ] = "User-defined5"; -}; - -String STR_AUTH_FIELD_IDENTIFIER -{ - Text [ en-US ] = "Short name"; -}; -String STR_AUTH_FIELD_AUTHORITY_TYPE -{ - Text [ en-US ] = "Type"; -}; -String STR_AUTH_FIELD_ADDRESS -{ - Text [ en-US ] = "Address"; -}; -String STR_AUTH_FIELD_ANNOTE -{ - Text [ en-US ] = "Annotation"; -}; -String STR_AUTH_FIELD_AUTHOR -{ - Text [ en-US ] = "Author(s)"; -}; -String STR_AUTH_FIELD_BOOKTITLE -{ - Text [ en-US ] = "Book title"; -}; -String STR_AUTH_FIELD_CHAPTER -{ - Text [ en-US ] = "Chapter"; -}; -String STR_AUTH_FIELD_EDITION -{ - Text [ en-US ] = "Edition"; -}; -String STR_AUTH_FIELD_EDITOR -{ - Text [ en-US ] = "Editor"; -}; -String STR_AUTH_FIELD_HOWPUBLISHED -{ - Text [ en-US ] = "Publication type"; -}; -String STR_AUTH_FIELD_INSTITUTION -{ - Text [ en-US ] = "Institution"; -}; -String STR_AUTH_FIELD_JOURNAL -{ - Text [ en-US ] = "Journal"; -}; -String STR_AUTH_FIELD_MONTH -{ - Text [ en-US ] = "Month"; -}; -String STR_AUTH_FIELD_NOTE -{ - Text [ en-US ] = "Note"; -}; -String STR_AUTH_FIELD_NUMBER -{ - Text [ en-US ] = "Number"; -}; -String STR_AUTH_FIELD_ORGANIZATIONS -{ - Text [ en-US ] = "Organization"; -}; -String STR_AUTH_FIELD_PAGES -{ - Text [ en-US ] = "Page(s)"; -}; -String STR_AUTH_FIELD_PUBLISHER -{ - Text [ en-US ] = "Publisher"; -}; -String STR_AUTH_FIELD_SCHOOL -{ - Text [ en-US ] = "University"; -}; -String STR_AUTH_FIELD_SERIES -{ - Text [ en-US ] = "Series"; -}; -String STR_AUTH_FIELD_TITLE -{ - Text [ en-US ] = "Title"; -}; -String STR_AUTH_FIELD_TYPE -{ - Text [ en-US ] = "Type of report"; -}; -String STR_AUTH_FIELD_VOLUME -{ - Text [ en-US ] = "Volume"; -}; -String STR_AUTH_FIELD_YEAR -{ - Text [ en-US ] = "Year"; -}; -String STR_AUTH_FIELD_URL -{ - Text [ en-US ] = "URL"; -}; -String STR_AUTH_FIELD_CUSTOM1 -{ - Text [ en-US ] = "User-defined1"; -}; -String STR_AUTH_FIELD_CUSTOM2 -{ - Text [ en-US ] = "User-defined2"; -}; -String STR_AUTH_FIELD_CUSTOM3 -{ - Text [ en-US ] = "User-defined3"; -}; -String STR_AUTH_FIELD_CUSTOM4 -{ - Text [ en-US ] = "User-defined4"; -}; -String STR_AUTH_FIELD_CUSTOM5 -{ - Text [ en-US ] = "User-defined5"; -}; -String STR_AUTH_FIELD_ISBN -{ - Text [ en-US ] = "ISBN"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 8675c490610e..63ba6dd99860 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -49,10 +49,8 @@ #include <sfx2/app.hxx> #include <cmdid.h> #include <helpid.h> -#include <ribbar.hrc> -#include <utlui.hrc> -#include "access.hrc" +#include "strings.hrc" #include "globals.hrc" #include "bitmaps.hlst" @@ -582,6 +580,13 @@ void SwNavigationPI::ZoomIn() m_aContentToolBox->CheckItem(m_aContentToolBox->GetItemId("listbox"), false); } +enum StatusIndex +{ + IDX_STR_HIDDEN = 0, + IDX_STR_ACTIVE = 1, + IDX_STR_INACTIVE = 2 +}; + SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings, vcl::Window* pParent) : PanelLayout(pParent, "NavigatorPanel", "modules/swriter/ui/navigatorpanel.ui", nullptr) @@ -651,10 +656,27 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings, m_aContentToolBox->HideItem(m_aContentToolBox->GetItemId("toggle")); } + const char* REGIONNAME_ARY[] = + { + STR_HYPERLINK, + STR_LINK_REGION, + STR_COPY_REGION + }; + + const char* REGIONMODE_ARY[] = + { + STR_HIDDEN, + STR_ACTIVE, + STR_INACTIVE + }; + + static_assert(SAL_N_ELEMENTS(REGIONNAME_ARY) == SAL_N_ELEMENTS(REGIONMODE_ARY), "### unexpected size!"); + static_assert(SAL_N_ELEMENTS(REGIONNAME_ARY) == static_cast<sal_uInt16>(RegionMode::EMBEDDED) + 1, "### unexpected size!"); + for (sal_uInt16 i = 0; i <= static_cast<sal_uInt16>(RegionMode::EMBEDDED); ++i) { - m_aContextArr[i] = SwResId(STR_HYPERLINK + i); - m_aStatusArr[i] = SwResId(STR_STATUS_FIRST + i); + m_aContextArr[i] = SwResId(REGIONNAME_ARY[i]); + m_aStatusArr[i] = SwResId(REGIONMODE_ARY[i]); } m_aStatusArr[3] = SwResId(STR_ACTIVE_VIEW); @@ -931,10 +953,10 @@ void SwNavigationPI::UpdateListBox() if (pView == pActView) { nAct = nCount; - sEntry += m_aStatusArr[STR_ACTIVE - STR_STATUS_FIRST]; + sEntry += m_aStatusArr[IDX_STR_ACTIVE]; } else - sEntry += m_aStatusArr[STR_INACTIVE - STR_STATUS_FIRST]; + sEntry += m_aStatusArr[IDX_STR_INACTIVE]; sEntry += ")"; m_aDocListBox->InsertEntry(sEntry); @@ -953,7 +975,7 @@ void SwNavigationPI::UpdateListBox() OUString sEntry = m_aContentTree->GetHiddenWrtShell()->GetView(). GetDocShell()->GetTitle(); sEntry += " ("; - sEntry += m_aStatusArr[STR_HIDDEN - STR_STATUS_FIRST]; + sEntry += m_aStatusArr[IDX_STR_HIDDEN]; sEntry += ")"; m_aDocListBox->InsertEntry(sEntry); bDisable = false; diff --git a/sw/source/uibase/utlui/navipi.src b/sw/source/uibase/utlui/navipi.src deleted file mode 100644 index 29d820afd1ec..000000000000 --- a/sw/source/uibase/utlui/navipi.src +++ /dev/null @@ -1,171 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "cmdid.h" -#include "globals.hrc" -#include "utlui.hrc" -#include "helpid.h" -#include "access.hrc" - -String STR_ACCESS_TL_GLOBAL -{ - Text [ en-US ] = "Global View"; -}; -String STR_ACCESS_TL_CONTENT -{ - Text [ en-US ] = "Content Navigation View"; -}; -String STR_OUTLINE_LEVEL -{ - Text [ en-US ] = "Outline Level" ; -}; -String STR_DRAGMODE -{ - Text [ en-US ] = "Drag Mode" ; -}; -String STR_HYPERLINK -{ - Text [ en-US ] = "Insert as Hyperlink" ; -}; -String STR_LINK_REGION -{ - Text [ en-US ] = "Insert as Link" ; -}; -String STR_COPY_REGION -{ - Text [ en-US ] = "Insert as Copy" ; -}; -String STR_DISPLAY -{ - Text [ en-US ] = "Display" ; -}; -String STR_ACTIVE_VIEW -{ - Text [ en-US ] = "Active Window" ; -}; -String STR_HIDDEN -{ - Text [ en-US ] = "hidden" ; -}; -String STR_ACTIVE -{ - Text [ en-US ] = "active" ; -}; -String STR_INACTIVE -{ - Text [ en-US ] = "inactive" ; -}; -String STR_EDIT_ENTRY -{ - Text [ en-US ] = "Edit..." ; -}; -String STR_UPDATE -{ - Text [ en-US ] = "~Update" ; -}; -String STR_EDIT_CONTENT -{ - Text [ en-US ] = "Edit" ; -}; -String STR_EDIT_LINK -{ - Text [ en-US ] = "Edit link"; -}; -String STR_EDIT_INSERT -{ - Text [ en-US ] = "Insert" ; -}; -String STR_INDEX -{ - Text [ en-US ] = "~Index"; -}; -String STR_FILE -{ - Text [ en-US ] = "File" ; -}; -String STR_NEW_FILE -{ - Text [ en-US ] = "New Document" ; -}; -String STR_INSERT_TEXT -{ - Text [ en-US ] = "Text" ; -}; -String STR_DELETE -{ - Text [ en-US ] = "Delete" ; -}; -String STR_DELETE_ENTRY -{ - Text [ en-US ] = "~Delete" ; -}; -String STR_UPDATE_SEL -{ - Text [ en-US ] = "Selection" ; -}; -String STR_UPDATE_INDEX -{ - Text [ en-US ] = "Indexes" ; -}; -String STR_UPDATE_LINK -{ - Text [ en-US ] = "Links" ; -}; -String STR_UPDATE_ALL -{ - Text [ en-US ] = "All" ; -}; -String STR_REMOVE_INDEX -{ - Text [ en-US ] = "~Remove Index" ; -}; -String STR_REMOVE_TBL_PROTECTION -{ - Text [ en-US ] = "~Unprotect" ; -}; -String STR_INVISIBLE -{ - Text [ en-US ] = "hidden"; -}; -String STR_BROKEN_LINK -{ - Text [ en-US ] = "File not found: "; -}; -String STR_RENAME -{ - Text [ en-US ] = "~Rename"; -}; -String STR_READONLY_IDX -{ - Text [ en-US ] = "Read-~only"; -}; -String STR_POSTIT_SHOW -{ - Text [ en-US ] = "Show All"; -}; -String STR_POSTIT_HIDE -{ - Text [ en-US ] = "Hide All"; -}; -String STR_POSTIT_DELETE -{ - Text [ en-US ] = "Delete All"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index 47aaa7b5fa7e..0d70c3498b4d 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -36,7 +36,7 @@ #include <view.hxx> #include <wrtsh.hxx> #include <numfmtlb.hxx> -#include <utlui.hrc> +#include <strings.hrc> #include "swabstdlg.hxx" #include "dialog.hrc" #include <unomid.h> diff --git a/sw/source/uibase/utlui/statusbar.src b/sw/source/uibase/utlui/statusbar.src deleted file mode 100644 index 558da31c838a..000000000000 --- a/sw/source/uibase/utlui/statusbar.src +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include <utlui.hrc> - -String STR_WORDCOUNT_HINT -{ - Text [ en-US ] = "Word and character count. Click to open Word Count dialog."; -}; -String STR_VIEWLAYOUT_ONE -{ - Text [ en-US ] = "Single-page view"; -}; - -String STR_VIEWLAYOUT_MULTI -{ - Text [ en-US ] = "Multiple-page view"; -}; - -String STR_VIEWLAYOUT_BOOK -{ - Text [ en-US ] = "Book view"; -}; -String STR_BOOKCTRL_HINT -{ - Text [ en-US ] = "Page number in document. Click to open Navigator window or right-click for bookmark list."; -}; -String STR_BOOKCTRL_HINT_EXTENDED -{ - Text [ en-US ] = "Page number in document (Page number on printed document). Click to open Navigator window."; -}; -String STR_TMPLCTRL_HINT -{ - Text [ en-US ] = "Page Style. Right-click to change style or click to open Style dialog."; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index f0ba0f192bd6..eadc0895fe41 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -24,7 +24,7 @@ #include <vcl/status.hxx> #include <swtypes.hxx> -#include <utlui.hrc> +#include <strings.hrc> #include "wrtsh.hxx" #include "view.hxx" diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx index e7656572ed60..ad4fefb2167c 100644 --- a/sw/source/uibase/utlui/uiitems.cxx +++ b/sw/source/uibase/utlui/uiitems.cxx @@ -24,8 +24,7 @@ #include "cmdid.h" #include "uiitems.hxx" -#include "utlui.hrc" -#include "attrdesc.hrc" +#include "strings.hrc" #include <unomid.h> #include <numrule.hxx> diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 5202958bb997..425ac1e75609 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -69,7 +69,7 @@ #include <cmdid.h> #include <globals.hrc> -#include <utlui.hrc> +#include <strings.hrc> #include <doc.hxx> #include <docary.hxx> #include <charfmt.hxx> diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index 92660f8c2fc8..852211444930 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -21,8 +21,7 @@ #include <globals.hrc> #include <misc.hrc> -#include <utlui.hrc> -#include <unotools.hrc> +#include <strings.hrc> #include <unotools.hxx> #include <unoprnms.hxx> #include <i18nutil/unicode.hxx> @@ -67,7 +66,6 @@ SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin, const OUString* pURL ) : m_aTopWindow(VclPtr<SwFrameCtrlWindow>::Create(&rWin, this)), m_aLoadedIdle("sw uibase SwOneExampleFrame Loaded"), - m_aMenuRes(ResId(RES_FRMEX_MENU, *pSwResMgr)), m_pModuleView(SW_MOD()->GetView()), m_nStyleFlags(nFlags), m_bIsInitialized(false), @@ -448,14 +446,14 @@ void SwOneExampleFrame::CreatePopup(const Point& rPt) { ScopedVclPtrInstance<PopupMenu> aPop; - aPop->InsertItem(ITEM_UP, m_aMenuRes.GetString(m_aMenuRes.FindIndex(ST_MENU_UP))); - aPop->InsertItem(ITEM_DOWN, m_aMenuRes.GetString(m_aMenuRes.FindIndex(ST_MENU_DOWN))); + aPop->InsertItem(ITEM_UP, SwResId(STR_MENU_UP)); + aPop->InsertItem(ITEM_DOWN, SwResId(STR_MENU_DOWN)); Link<Menu*,bool> aSelLk = LINK(this, SwOneExampleFrame, PopupHdl ); aPop->SetSelectHdl(aSelLk); if(EX_SHOW_ONLINE_LAYOUT == m_nStyleFlags) { - aPop->InsertItem(ITEM_ZOOM, m_aMenuRes.GetString(m_aMenuRes.FindIndex(ST_MENU_ZOOM))); + aPop->InsertItem(ITEM_ZOOM, SwResId(STR_MENU_ZOOM)); uno::Reference< view::XViewSettingsSupplier > xSettings(m_xController, uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings(); diff --git a/sw/source/uibase/utlui/unotools.hrc b/sw/source/uibase/utlui/unotools.hrc deleted file mode 100644 index a4caaab0a186..000000000000 --- a/sw/source/uibase/utlui/unotools.hrc +++ /dev/null @@ -1,28 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SW_SOURCE_UIBASE_UTLUI_UNOTOOLS_HRC -#define INCLUDED_SW_SOURCE_UIBASE_UTLUI_UNOTOOLS_HRC - -#define ST_MENU_ZOOM 1 -#define ST_MENU_UP 2 -#define ST_MENU_DOWN 3 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/utlui/unotools.src b/sw/source/uibase/utlui/unotools.src deleted file mode 100644 index 0ae74dd0b6da..000000000000 --- a/sw/source/uibase/utlui/unotools.src +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "unotools.hrc" -#include <utlui.hrc> -#include <globals.hrc> -#include <helpid.h> - -String STR_SERVICE_UNAVAILABLE -{ - Text [ en-US ] = "The following service is not available: "; -}; - -StringArray RES_FRMEX_MENU -{ - ItemList [ en-US ] = - { - < "~Zoom" ; ST_MENU_ZOOM; > ; - < "~Upwards" ; ST_MENU_UP; > ; - < "Do~wnwards" ; ST_MENU_DOWN; > ; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx index abda424dbf8f..106a7083f5d3 100644 --- a/sw/source/uibase/utlui/viewlayoutctrl.cxx +++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx @@ -23,7 +23,7 @@ #include <vcl/image.hxx> #include <svl/eitem.hxx> #include <svx/viewlayoutitem.hxx> -#include <utlui.hrc> +#include <strings.hrc> #include "bitmaps.hlst" #include <swtypes.hxx> diff --git a/sw/source/uibase/utlui/wordcountctrl.cxx b/sw/source/uibase/utlui/wordcountctrl.cxx index 559fded1dcfa..9d59c7dc5c13 100644 --- a/sw/source/uibase/utlui/wordcountctrl.cxx +++ b/sw/source/uibase/utlui/wordcountctrl.cxx @@ -8,7 +8,7 @@ */ #include <swtypes.hxx> -#include <utlui.hrc> +#include <strings.hrc> #include "wordcountctrl.hxx" #include <svl/stritem.hxx> diff --git a/sw/source/uibase/web/wdocsh.cxx b/sw/source/uibase/web/wdocsh.cxx index c0574d174213..c03fd4d6c22a 100644 --- a/sw/source/uibase/web/wdocsh.cxx +++ b/sw/source/uibase/web/wdocsh.cxx @@ -31,7 +31,7 @@ #include "shellio.hxx" #include "wdocsh.hxx" -#include "web.hrc" +#include "strings.hrc" #include <sfx2/request.hxx> // needed for -fsanitize=function visibility of typeinfo for functions of diff --git a/sw/source/uibase/web/wformsh.cxx b/sw/source/uibase/web/wformsh.cxx index 6c6d883c6610..5e7451f5eb80 100644 --- a/sw/source/uibase/web/wformsh.cxx +++ b/sw/source/uibase/web/wformsh.cxx @@ -29,8 +29,8 @@ #include "cmdid.h" #include "wformsh.hxx" #include "globals.hrc" -#include "web.hrc" -#include "shells.hrc" +#include "strings.hrc" +#include "strings.hrc" #include <sfx2/request.hxx> // needed for -fsanitize=function visibility of typeinfo for functions of diff --git a/sw/source/uibase/web/wfrmsh.cxx b/sw/source/uibase/web/wfrmsh.cxx index 05b84404f8d0..16f78c3bf234 100644 --- a/sw/source/uibase/web/wfrmsh.cxx +++ b/sw/source/uibase/web/wfrmsh.cxx @@ -26,8 +26,8 @@ #include "view.hxx" #include "wfrmsh.hxx" #include "globals.hrc" -#include "shells.hrc" -#include "web.hrc" +#include "strings.hrc" +#include "strings.hrc" #include <sfx2/request.hxx> // needed for -fsanitize=function visibility of typeinfo for functions of diff --git a/sw/source/uibase/web/wgrfsh.cxx b/sw/source/uibase/web/wgrfsh.cxx index 6959a2599dab..7db82aae2457 100644 --- a/sw/source/uibase/web/wgrfsh.cxx +++ b/sw/source/uibase/web/wgrfsh.cxx @@ -29,9 +29,9 @@ #include "swmodule.hxx" #include "uitool.hxx" #include "docsh.hxx" -#include "shells.hrc" +#include "strings.hrc" #include "globals.hrc" -#include "web.hrc" +#include "strings.hrc" #include "wgrfsh.hxx" #include <sfx2/request.hxx> diff --git a/sw/source/uibase/web/wlistsh.cxx b/sw/source/uibase/web/wlistsh.cxx index 57a698ba949f..7e4c4c2fffd1 100644 --- a/sw/source/uibase/web/wlistsh.cxx +++ b/sw/source/uibase/web/wlistsh.cxx @@ -27,7 +27,7 @@ #include "wrtsh.hxx" #include "swmodule.hxx" #include "globals.hrc" -#include "shells.hrc" +#include "strings.hrc" #include "uinums.hxx" #include "wlistsh.hxx" diff --git a/sw/source/uibase/web/wolesh.cxx b/sw/source/uibase/web/wolesh.cxx index 6e4b7a44a58c..0382a898e6d6 100644 --- a/sw/source/uibase/web/wolesh.cxx +++ b/sw/source/uibase/web/wolesh.cxx @@ -26,8 +26,8 @@ #include "view.hxx" #include "helpid.h" #include "globals.hrc" -#include "web.hrc" -#include "shells.hrc" +#include "strings.hrc" +#include "strings.hrc" #include "wolesh.hxx" #include "cmdid.h" diff --git a/sw/source/uibase/web/wtabsh.cxx b/sw/source/uibase/web/wtabsh.cxx index feae57da5d2d..499fd907244a 100644 --- a/sw/source/uibase/web/wtabsh.cxx +++ b/sw/source/uibase/web/wtabsh.cxx @@ -27,7 +27,7 @@ #include "globals.hrc" #include "uitool.hxx" #include "helpid.h" -#include "shells.hrc" +#include "strings.hrc" #include "table.hrc" #include "wrtsh.hxx" #include "wtabsh.hxx" diff --git a/sw/source/uibase/web/wtextsh.cxx b/sw/source/uibase/web/wtextsh.cxx index 5a5e47a963ea..c7c102811907 100644 --- a/sw/source/uibase/web/wtextsh.cxx +++ b/sw/source/uibase/web/wtextsh.cxx @@ -30,8 +30,8 @@ #include "wtextsh.hxx" #include "basesh.hxx" #include "globals.hrc" -#include "shells.hrc" -#include "web.hrc" +#include "strings.hrc" +#include "strings.hrc" #include <unomid.h> diff --git a/sw/source/uibase/web/wview.cxx b/sw/source/uibase/web/wview.cxx index 869f2e5ae82f..a1297d62bde4 100644 --- a/sw/source/uibase/web/wview.cxx +++ b/sw/source/uibase/web/wview.cxx @@ -57,8 +57,8 @@ #include <wview.hxx> #include <wdocsh.hxx> -#include <web.hrc> -#include <shells.hrc> +#include <strings.hrc> +#include <strings.hrc> #include <sfx2/request.hxx> // needed for -fsanitize=function visibility of typeinfo for functions of diff --git a/sw/source/uibase/wrtsh/wrtsh.src b/sw/source/uibase/wrtsh/wrtsh.src deleted file mode 100644 index 3b605ff7f224..000000000000 --- a/sw/source/uibase/wrtsh/wrtsh.src +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "wrtsh.hrc" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 42cf14b8385c..9be63a7ca364 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -93,7 +93,7 @@ // -> #111827# #include <SwRewriter.hxx> -#include <comcore.hrc> +#include <strings.hrc> // <- #111827# #include <toolkit/helper/vclunohelper.hxx> diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx index 2b904b5858f0..dec13a188e5c 100644 --- a/sw/source/uibase/wrtsh/wrtundo.cxx +++ b/sw/source/uibase/wrtsh/wrtundo.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <tools/resid.hxx> #include <sfx2/app.hxx> #include <svl/slstitm.hxx> #include <wrtsh.hxx> @@ -25,7 +24,7 @@ #include <IDocumentUndoRedo.hxx> #include <swdtflvr.hxx> #include <svtools/svtresid.hxx> -#include <svtools/svtools.hrc> +#include <svtools/strings.hrc> #include <wrtsh.hrc> #include <sfx2/sfx.hrc> @@ -97,21 +96,21 @@ void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt ) OUString SwWrtShell::GetDoString( DoType eDoType ) const { OUString aUndoStr; - sal_uInt16 nResStr = STR_UNDO; + const char* pResStr = STR_UNDO; switch( eDoType ) { case UNDO: - nResStr = STR_UNDO; + pResStr = STR_UNDO; (void)GetLastUndoInfo(&aUndoStr, nullptr, &m_rView); break; case REDO: - nResStr = STR_REDO; + pResStr = STR_REDO; (void)GetFirstRedoInfo(&aUndoStr, nullptr, &m_rView); break; default:;//prevent warning } - return SvtResId(nResStr) + aUndoStr; + return SvtResId(pResStr) + aUndoStr; } void SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const |