summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r--sw/source/uibase/app/appenv.cxx3
-rw-r--r--sw/source/uibase/app/apphdl.cxx2
-rw-r--r--sw/source/uibase/app/applab.cxx3
-rw-r--r--sw/source/uibase/app/docsh.cxx1
-rw-r--r--sw/source/uibase/app/docsh2.cxx10
-rw-r--r--sw/source/uibase/app/docshini.cxx1
-rw-r--r--sw/source/uibase/app/docstyle.cxx1
-rw-r--r--sw/source/uibase/app/mainwn.cxx9
-rw-r--r--sw/source/uibase/app/swdll.cxx2
-rw-r--r--sw/source/uibase/app/swmodul1.cxx1
-rw-r--r--sw/source/uibase/app/swmodule.cxx27
11 files changed, 33 insertions, 27 deletions
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;
}