summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-07-31 17:16:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-08-01 13:42:21 +0100
commitb1d829e52e826b6ea4ae884a64fdb68b66c74dd7 (patch)
treed6aa2ee59178ecf5ea78e80917df18149ae9bb66
parentf4e5940abbbaa3c2747108b0954e8912d164f3e5 (diff)
move resmgr to unotools
and the vast majority of translations is to the ui language so default ctor with that arg and now drop OModuleResourceClient Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
-rw-r--r--accessibility/inc/pch/precompiled_acc.hxx2
-rw-r--r--accessibility/source/helper/accresmgr.cxx7
-rw-r--r--avmedia/source/framework/mediamisc.cxx7
-rw-r--r--avmedia/source/inc/mediamisc.hxx2
-rw-r--r--basctl/inc/pch/precompiled_basctl.hxx2
-rw-r--r--basctl/source/basicide/iderdll.cxx4
-rw-r--r--basic/source/runtime/basrdll.cxx4
-rw-r--r--basic/source/sbx/sbxscan.cxx4
-rw-r--r--chart2/inc/pch/precompiled_chartcontroller.hxx2
-rw-r--r--chart2/source/tools/ResId.cxx2
-rw-r--r--chart2/source/tools/ResourceManager.cxx6
-rw-r--r--compilerplugins/clang/unusedenumconstants.writeonly.results8
-rw-r--r--connectivity/source/commontools/sqlerror.cxx6
-rw-r--r--connectivity/source/resource/sharedresources.cxx6
-rw-r--r--cppcanvas/inc/pch/precompiled_cppcanvas.hxx2
-rw-r--r--cui/inc/pch/precompiled_cui.hxx2
-rw-r--r--cui/source/factory/cuiresmgr.cxx16
-rw-r--r--dbaccess/inc/pch/precompiled_dba.hxx2
-rw-r--r--dbaccess/inc/pch/precompiled_dbmm.hxx2
-rw-r--r--dbaccess/source/core/resource/core_resource.cxx6
-rw-r--r--desktop/inc/app.hxx2
-rw-r--r--desktop/inc/dp_shared.hxx6
-rw-r--r--desktop/inc/pch/precompiled_sofficeapp.hxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_resource.cxx2
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_shared.h2
-rw-r--r--editeng/inc/pch/precompiled_editeng.hxx2
-rw-r--r--editeng/source/editeng/eerdll.cxx5
-rw-r--r--embeddedobj/source/general/docholder.cxx4
-rw-r--r--extensions/CppunitTest_extensions_test_update.mk2
-rw-r--r--extensions/Library_updatecheckui.mk1
-rw-r--r--extensions/Library_updchk.mk2
-rw-r--r--extensions/source/abpilot/unodialogabp.hxx7
-rw-r--r--extensions/source/bibliography/bibmod.cxx4
-rw-r--r--extensions/source/dbpilots/unoautopilot.hxx1
-rw-r--r--extensions/source/inc/componentmodule.cxx75
-rw-r--r--extensions/source/inc/componentmodule.hxx37
-rw-r--r--extensions/source/propctrlr/modulepcr.cxx6
-rw-r--r--extensions/source/propctrlr/modulepcr.hxx6
-rw-r--r--extensions/source/scanner/sanedlg.cxx4
-rw-r--r--extensions/source/update/check/updatehdl.cxx4
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx4
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx4
-rw-r--r--filter/source/pdf/impdialog.cxx4
-rw-r--r--filter/source/pdf/pdfexport.cxx4
-rw-r--r--filter/source/t602/t602filter.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx4
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx2
-rw-r--r--forms/source/resource/frm_resource.cxx7
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx2
-rw-r--r--formula/source/core/resource/core_resource.cxx6
-rw-r--r--formula/source/ui/inc/ModuleHelper.hxx2
-rw-r--r--formula/source/ui/resource/ModuleHelper.cxx2
-rw-r--r--fpicker/inc/fpsofficeResMgr.hxx4
-rw-r--r--fpicker/source/aqua/resourceprovider.mm2
-rw-r--r--fpicker/source/office/iodlgimp.cxx4
-rw-r--r--fpicker/source/win32/misc/resourceprovider.cxx2
-rw-r--r--framework/inc/pch/precompiled_fwe.hxx2
-rw-r--r--framework/inc/pch/precompiled_fwi.hxx2
-rw-r--r--framework/inc/pch/precompiled_fwk.hxx2
-rw-r--r--framework/inc/pch/precompiled_fwl.hxx2
-rw-r--r--framework/source/fwe/classes/fwkresid.cxx24
-rw-r--r--framework/source/uiconfiguration/ImageList.cxx1
-rw-r--r--include/unotools/componentresmodule.hxx57
-rw-r--r--include/unotools/resmgr.hxx (renamed from include/tools/resmgr.hxx)17
-rw-r--r--include/vcl/builder.hxx2
-rw-r--r--ios/CustomTarget_Lo_Xcconfig.mk2
-rw-r--r--reportdesign/inc/pch/precompiled_rpt.hxx2
-rw-r--r--reportdesign/inc/pch/precompiled_rptui.hxx2
-rw-r--r--reportdesign/source/core/resource/core_resource.cxx7
-rw-r--r--reportdesign/source/core/sdr/RptModel.cxx2
-rw-r--r--sc/inc/pch/precompiled_sc.hxx2
-rw-r--r--sc/source/core/data/funcdesc.cxx2
-rw-r--r--sc/source/ui/app/scdll.cxx2
-rw-r--r--sc/source/ui/app/scmod.cxx4
-rw-r--r--scaddins/Library_analysis.mk2
-rw-r--r--scaddins/Library_date.mk2
-rw-r--r--scaddins/Library_pricing.mk2
-rw-r--r--scaddins/source/analysis/analysis.cxx2
-rw-r--r--scaddins/source/datefunc/datefunc.cxx2
-rw-r--r--scaddins/source/pricing/pricing.cxx2
-rw-r--r--sccomp/Library_solver.mk3
-rw-r--r--sccomp/source/solver/SolverComponent.cxx4
-rw-r--r--sd/inc/pch/precompiled_sd.hxx2
-rw-r--r--sd/inc/pch/precompiled_sdui.hxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx2
-rw-r--r--sd/source/ui/app/sdmod.cxx4
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx2
-rw-r--r--sfx2/source/appl/appinit.cxx6
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx2
-rw-r--r--sfx2/source/bastyp/sfxresid.cxx7
-rw-r--r--sfx2/source/dialog/styfitem.cxx2
-rw-r--r--slideshow/inc/pch/precompiled_slideshow.hxx2
-rw-r--r--starmath/source/smmod.cxx4
-rw-r--r--svl/source/misc/getstringresource.cxx7
-rw-r--r--svtools/inc/pch/precompiled_svt.hxx2
-rw-r--r--svtools/source/graphic/provider.cxx2
-rw-r--r--svtools/source/misc/ehdl.cxx8
-rw-r--r--svtools/source/misc/svtresid.cxx7
-rw-r--r--svx/inc/pch/precompiled_svx.hxx2
-rw-r--r--svx/inc/pch/precompiled_svxcore.hxx2
-rw-r--r--svx/source/dialog/dialmgr.cxx6
-rw-r--r--svx/source/form/datanavi.cxx4
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--svx/source/gallery2/galobj.cxx2
-rw-r--r--sw/inc/pch/precompiled_msword.hxx2
-rw-r--r--sw/inc/pch/precompiled_sw.hxx2
-rw-r--r--sw/inc/pch/precompiled_swui.hxx2
-rw-r--r--sw/inc/pch/precompiled_vbaswobj.hxx2
-rw-r--r--sw/source/uibase/app/swmodule.cxx4
-rw-r--r--test/source/bootstrapfixture.cxx2
-rw-r--r--test/source/setupvcl.cxx2
-rw-r--r--tools/Library_tl.mk2
-rw-r--r--unotools/Library_utl.mk7
-rw-r--r--unotools/source/i18n/resmgr.cxx (renamed from tools/source/rc/resmgr.cxx)2
-rw-r--r--unotools/source/misc/componentresmodule.cxx87
-rw-r--r--uui/source/alreadyopen.cxx2
-rw-r--r--uui/source/filechanged.cxx2
-rw-r--r--uui/source/iahndl-authentication.cxx8
-rw-r--r--uui/source/iahndl-errorhandler.cxx4
-rw-r--r--uui/source/iahndl-locking.cxx8
-rw-r--r--uui/source/iahndl-ssl.cxx6
-rw-r--r--uui/source/iahndl.cxx8
-rw-r--r--uui/source/lockcorrupt.cxx2
-rw-r--r--uui/source/lockfailed.cxx2
-rw-r--r--uui/source/masterpasscrtdlg.cxx2
-rw-r--r--uui/source/masterpassworddlg.cxx2
-rw-r--r--uui/source/nameclashdlg.cxx2
-rw-r--r--uui/source/openlocked.cxx2
-rw-r--r--uui/source/passworddlg.cxx2
-rw-r--r--uui/source/trylater.cxx2
-rw-r--r--vbahelper/inc/pch/precompiled_msforms.hxx2
-rw-r--r--vcl/source/app/svdata.cxx4
-rw-r--r--vcl/source/app/svmain.cxx2
-rw-r--r--vcl/source/bitmap/BitmapTools.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx2
-rw-r--r--vcl/source/gdi/bitmapex.cxx2
-rw-r--r--vcl/source/image/Image.cxx2
-rw-r--r--vcl/source/window/builder.cxx4
-rw-r--r--vcl/unx/gtk/fpicker/resourceprovider.cxx2
-rw-r--r--writerfilter/source/dmapper/GraphicHelpers.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx2
-rw-r--r--writerfilter/source/rtftok/rtftokenizer.cxx2
-rw-r--r--writerperfect/inc/WPFTResMgr.hxx2
-rw-r--r--writerperfect/source/common/WPFTResMgr.cxx5
-rw-r--r--xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx2
-rw-r--r--xmlsecurity/inc/resourcemanager.hxx2
-rw-r--r--xmlsecurity/source/dialogs/resourcemanager.cxx2
150 files changed, 226 insertions, 542 deletions
diff --git a/accessibility/inc/pch/precompiled_acc.hxx b/accessibility/inc/pch/precompiled_acc.hxx
index 7377c61a4f1b..fcc0c6297ac3 100644
--- a/accessibility/inc/pch/precompiled_acc.hxx
+++ b/accessibility/inc/pch/precompiled_acc.hxx
@@ -316,7 +316,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
@@ -331,6 +330,7 @@
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/fontdefs.hxx>
#include <unotools/options.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/unotoolsdllapi.h>
#include <extended/AccessibleBrowseBox.hxx>
#include <extended/AccessibleBrowseBoxBase.hxx>
diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx
index a7d57156df95..7ffcafb3080f 100644
--- a/accessibility/source/helper/accresmgr.cxx
+++ b/accessibility/source/helper/accresmgr.cxx
@@ -18,10 +18,7 @@
*/
#include <helper/accresmgr.hxx>
-
-#include <tools/resmgr.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
+#include <unotools/resmgr.hxx>
using namespace accessibility;
@@ -39,7 +36,7 @@ void TkResMgr::ensureImplExists()
if (m_pImpl)
return;
- m_pImpl = new std::locale(Translate::Create("acc", Application::GetSettings().GetUILanguageTag()));
+ m_pImpl = new std::locale(Translate::Create("acc"));
if (m_pImpl)
{
diff --git a/avmedia/source/framework/mediamisc.cxx b/avmedia/source/framework/mediamisc.cxx
index 50dd7687a0c0..a8d627266596 100644
--- a/avmedia/source/framework/mediamisc.cxx
+++ b/avmedia/source/framework/mediamisc.cxx
@@ -17,17 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/resmgr.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-
+#include <unotools/resmgr.hxx>
#include <mediamisc.hxx>
namespace avmedia {
const std::locale& GetResLocale()
{
- static std::locale loc = Translate::Create("avmedia", Application::GetSettings().GetUILanguageTag());
+ static std::locale loc = Translate::Create("avmedia");
return loc;
}
diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index 0a75833d3f92..cdb640aa1575 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_AVMEDIA_SOURCE_INC_MEDIAMISC_HXX
#include <config_features.h>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#define AVMEDIA_MANAGER_SERVICE_PREFERRED "com.sun.star.comp.avmedia.Manager_VLC"
#ifdef _WIN32
diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx
index 69b2ecdd34c3..bdaaa6058bc6 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -543,7 +543,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/svborder.hxx>
@@ -565,6 +564,7 @@
#include <unotools/fontdefs.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/unotoolsdllapi.h>
#include <xmlscript/xmldlg_imexp.hxx>
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index 7a2b80ae4c78..2435b9b31901 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -33,7 +33,7 @@
#include <svx/svxids.hrc>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <o3tl/make_unique.hxx>
@@ -118,7 +118,7 @@ Dll::Dll () :
{
SfxObjectFactory& rFactory = DocShell::Factory();
- std::locale loc = Translate::Create("basctl", Application::GetSettings().GetUILanguageTag());
+ std::locale loc = Translate::Create("basctl");
auto pModule = o3tl::make_unique<Module>(loc, &rFactory);
SfxModule* pMod = pModule.get();
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index e7f228060293..da830b4e9e6c 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -26,7 +26,7 @@
#include <basic/sbstar.hxx>
#include <basic/basrdll.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include "strings.hrc"
#include <sbxbase.hxx>
@@ -41,7 +41,7 @@ struct BasicDLL::Impl
Impl()
: bDebugMode(false)
, bBreakEnabled(true)
- , aBasResLocale(Translate::Create("sb", Application::GetSettings().GetUILanguageTag()))
+ , aBasResLocale(Translate::Create("sb"))
, xSbxAppData(new SbxAppData)
{ }
};
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 8be89826439b..a2cb4f871621 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -20,7 +20,7 @@
#include <config_features.h>
#include <vcl/errcode.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <basic/sbx.hxx>
#include "sbxconv.hxx"
@@ -585,7 +585,7 @@ namespace
const std::locale& implGetResLocale()
{
- static std::locale loc(Translate::Create("sb", Application::GetSettings().GetUILanguageTag()));
+ static std::locale loc(Translate::Create("sb"));
return loc;
}
diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx
index f85aafda5899..df610d888408 100644
--- a/chart2/inc/pch/precompiled_chartcontroller.hxx
+++ b/chart2/inc/pch/precompiled_chartcontroller.hxx
@@ -496,7 +496,6 @@
#include <tools/multisel.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -520,6 +519,7 @@
#include <unotools/nativenumberwrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/unotoolsdllapi.h>
diff --git a/chart2/source/tools/ResId.cxx b/chart2/source/tools/ResId.cxx
index 68ea0df902f7..2a82b11aa48e 100644
--- a/chart2/source/tools/ResId.cxx
+++ b/chart2/source/tools/ResId.cxx
@@ -19,7 +19,7 @@
#include "ResId.hxx"
#include "ResourceManager.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
namespace chart
{
diff --git a/chart2/source/tools/ResourceManager.cxx b/chart2/source/tools/ResourceManager.cxx
index 3cd51d70c7a7..8449c6c44988 100644
--- a/chart2/source/tools/ResourceManager.cxx
+++ b/chart2/source/tools/ResourceManager.cxx
@@ -18,16 +18,14 @@
*/
#include "ResourceManager.hxx"
-#include <tools/resmgr.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/svapp.hxx>
+#include <unotools/resmgr.hxx>
namespace chart
{
const std::locale& ResourceManager::getResourceLocale()
{
- static std::locale loc = Translate::Create("chart", Application::GetSettings().GetUILanguageTag());
+ static std::locale loc = Translate::Create("chart");
return loc;
}
diff --git a/compilerplugins/clang/unusedenumconstants.writeonly.results b/compilerplugins/clang/unusedenumconstants.writeonly.results
index bee95c83b768..5658a30b5efa 100644
--- a/compilerplugins/clang/unusedenumconstants.writeonly.results
+++ b/compilerplugins/clang/unusedenumconstants.writeonly.results
@@ -3326,14 +3326,6 @@ include/tools/poly.hxx:36
enum PolyOptimizeFlags NO_SAME
include/tools/poly.hxx:37
enum PolyOptimizeFlags REDUCE
-include/tools/resmgr.hxx:55
- enum RCFlags AUTORELEASE
-include/tools/resmgr.hxx:56
- enum RCFlags NOTFOUND
-include/tools/resmgr.hxx:57
- enum RCFlags FALLBACK_DOWN
-include/tools/resmgr.hxx:58
- enum RCFlags FALLBACK_UP
include/tools/stream.hxx:49
enum StreamMode NOCREATE
include/tools/stream.hxx:51
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index 8efc72ceccfd..a2fcf1103683 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -26,9 +26,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <rtl/ustrbuf.hxx>
-#include <tools/resmgr.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/svapp.hxx>
+#include <unotools/resmgr.hxx>
#include <osl/diagnose.h>
#include <strings.hrc>
@@ -269,7 +267,7 @@ namespace connectivity
::osl::MutexGuard aGuard( m_aMutex );
m_bAttemptedInit = true;
- m_xResources.reset(new std::locale(Translate::Create("cnr", Application::GetSettings().GetUILanguageTag())));
+ m_xResources.reset(new std::locale(Translate::Create("cnr")));
return m_xResources.get() != nullptr;
}
diff --git a/connectivity/source/resource/sharedresources.cxx b/connectivity/source/resource/sharedresources.cxx
index 1767bfaec8a0..65090fd8d483 100644
--- a/connectivity/source/resource/sharedresources.cxx
+++ b/connectivity/source/resource/sharedresources.cxx
@@ -23,10 +23,8 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <tools/diagnose_ex.h>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <osl/diagnose.h>
-#include <vcl/settings.hxx>
-#include <vcl/svapp.hxx>
namespace connectivity
{
@@ -68,7 +66,7 @@ namespace connectivity
oslInterlockedCount SharedResources_Impl::s_nClients( 0 );
SharedResources_Impl::SharedResources_Impl()
- : m_aLocale(Translate::Create("cnr", Application::GetSettings().GetUILanguageTag()))
+ : m_aLocale(Translate::Create("cnr"))
{
}
diff --git a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
index 91a51cac250c..c0361cdf8da2 100644
--- a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
+++ b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
@@ -194,7 +194,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
@@ -209,6 +208,7 @@
#include <unotools/fontdefs.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
#include <cppcanvas/color.hxx>
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index 9fb83399de3f..26dc928a4f77 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -457,7 +457,6 @@
#include <tools/multisel.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -481,6 +480,7 @@
#include <unotools/options.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/unotoolsdllapi.h>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx
index c03d3dbbc476..7a3b82f25335 100644
--- a/cui/source/factory/cuiresmgr.cxx
+++ b/cui/source/factory/cuiresmgr.cxx
@@ -18,22 +18,12 @@
*/
#include <dialmgr.hxx>
-#include <tools/resmgr.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-
-namespace
-{
- const std::locale& GetResLocale()
- {
- static std::locale loc(Translate::Create("cui", Application::GetSettings().GetUILanguageTag()));
- return loc;
- }
-}
+#include <unotools/resmgr.hxx>
OUString CuiResId(const char *pKey)
{
- return Translate::get(pKey, GetResLocale());
+ static std::locale loc(Translate::Create("cui"));
+ return Translate::get(pKey, loc);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/pch/precompiled_dba.hxx b/dbaccess/inc/pch/precompiled_dba.hxx
index 592f0f7acb1e..d74fe1b1d2cd 100644
--- a/dbaccess/inc/pch/precompiled_dba.hxx
+++ b/dbaccess/inc/pch/precompiled_dba.hxx
@@ -276,7 +276,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
@@ -292,6 +291,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/saveopt.hxx>
#include <unotools/sharedunocomponent.hxx>
#include <unotools/syslocale.hxx>
diff --git a/dbaccess/inc/pch/precompiled_dbmm.hxx b/dbaccess/inc/pch/precompiled_dbmm.hxx
index 5280bb6c3ba2..dd65550f889e 100644
--- a/dbaccess/inc/pch/precompiled_dbmm.hxx
+++ b/dbaccess/inc/pch/precompiled_dbmm.hxx
@@ -202,7 +202,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
@@ -217,6 +216,7 @@
#include <unotools/fontdefs.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx
index ad52b1638f90..a82f56fec58d 100644
--- a/dbaccess/source/core/resource/core_resource.cxx
+++ b/dbaccess/source/core/resource/core_resource.cxx
@@ -19,11 +19,9 @@
#include "core_resource.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
// ---- needed as long as we have no contexts for components ---
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
#include <rtl/instance.hxx>
#include <svl/solar.hrc>
@@ -45,7 +43,7 @@ namespace dbaccess
if (m_pImpl)
return;
- m_pImpl = new std::locale(Translate::Create("dba", Application::GetSettings().GetUILanguageTag()));
+ m_pImpl = new std::locale(Translate::Create("dba"));
}
OUString ResourceManager::loadString(const char* pResId)
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index f4af4bcecc9d..50e3a0fa3811 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -25,8 +25,8 @@
#include <sal/log.hxx>
#include <vcl/svapp.hxx>
#include <vcl/timer.hxx>
-#include <tools/resmgr.hxx>
#include <unotools/bootstrap.hxx>
+#include <unotools/resmgr.hxx>
#include <com/sun/star/frame/XDesktop2.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/uno/Reference.h>
diff --git a/desktop/inc/dp_shared.hxx b/desktop/inc/dp_shared.hxx
index 425cda8ea906..8c38545ed7fa 100644
--- a/desktop/inc/dp_shared.hxx
+++ b/desktop/inc/dp_shared.hxx
@@ -22,16 +22,14 @@
#include <osl/diagnose.h>
#include <rtl/instance.hxx>
-#include <tools/resmgr.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/svapp.hxx>
+#include <unotools/resmgr.hxx>
namespace dp {
struct DeploymentLocale :
public ::rtl::StaticWithInit<std::locale, DeploymentLocale > {
std::locale operator () () {
- return Translate::Create("dkt", Application::GetSettings().GetUILanguageTag());
+ return Translate::Create("dkt");
}
};
diff --git a/desktop/inc/pch/precompiled_sofficeapp.hxx b/desktop/inc/pch/precompiled_sofficeapp.hxx
index 95e6c6fa7892..efc3a6dcc909 100644
--- a/desktop/inc/pch/precompiled_sofficeapp.hxx
+++ b/desktop/inc/pch/precompiled_sofficeapp.hxx
@@ -246,7 +246,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
@@ -262,6 +261,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index e80eb3c8ddcd..e85b7bbe3d95 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -95,7 +95,7 @@ struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles >
{
const OUString operator () () {
const SolarMutexGuard guard;
- std::locale loc = Translate::Create("fps", Application::GetSettings().GetUILanguageTag());
+ std::locale loc = Translate::Create("fps");
return Translate::get(STR_FILTERNAME_ALL, loc);
}
};
diff --git a/desktop/source/deployment/misc/dp_resource.cxx b/desktop/source/deployment/misc/dp_resource.cxx
index 2d37cd6685b5..9a70ab218083 100644
--- a/desktop/source/deployment/misc/dp_resource.cxx
+++ b/desktop/source/deployment/misc/dp_resource.cxx
@@ -22,7 +22,7 @@
#include "dp_resource.h"
#include <osl/module.hxx>
#include <osl/mutex.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <rtl/ustring.h>
#include <unotools/configmgr.hxx>
#include <i18nlangtag/languagetag.hxx>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d4e4d9c00b33..b76904e3885a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -68,7 +68,7 @@
#include <svx/svxids.hrc>
#include <svx/ucsubset.hxx>
#include <vcl/svapp.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/fract.hxx>
#include <svtools/ctrltool.hxx>
#include <vcl/fontcharmap.hxx>
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 923335bb3290..30f5573ad038 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -22,7 +22,7 @@
#include "dp_shared.hxx"
#include "unopkg_shared.h"
#include <osl/thread.h>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <comphelper/anytostring.hxx>
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index 20ade0b5e4fd..7a3e51f41e8f 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -23,7 +23,7 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/deployment/XPackage.hpp>
#include <osl/diagnose.h>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <rtl/ustring.hxx>
#include <unotools/configmgr.hxx>
#include <i18nlangtag/languagetag.hxx>
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index a30afe4d008c..a881347ca551 100644
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -273,7 +273,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/tenccvt.hxx>
@@ -290,6 +289,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/saveopt.hxx>
#include <unotools/unotoolsdllapi.h>
#include <xmloff/dllapi.h>
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index d23885ea1fec..ca66b2f55379 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -18,7 +18,7 @@
*/
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/dialog.hxx>
#include <vcl/msgbox.hxx>
@@ -209,11 +209,10 @@ EditDLL::~EditDLL()
std::locale& EditDLL::GetResLocale()
{
- static std::locale loc = Translate::Create("editeng", Application::GetSettings().GetUILanguageTag());
+ static std::locale loc = Translate::Create("editeng");
return loc;
}
-
editeng::SharedVclResources::SharedVclResources()
: m_pVirDev(VclPtr<VirtualDevice>::Create())
{
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index b774ab6aa479..a43ae65dddac 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -66,7 +66,7 @@
#include <rtl/process.h>
#include <vcl/svapp.hxx>
#include <svtools/embedhlp.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <sfx2/strings.hrc>
@@ -971,7 +971,7 @@ bool DocumentHolder::LoadDocToFrame( bool bInPlace )
css::uno::Reference< css::frame::XTitle > xModelTitle( xDoc, css::uno::UNO_QUERY );
if( xModelTitle.is() )
{
- std::locale aResLoc = Translate::Create("sfx", SvtSysLocale().GetUILanguageTag());
+ std::locale aResLoc = Translate::Create("sfx");
OUString sEmbedded = Translate::get(STR_EMBEDDED_TITLE, aResLoc);
xModelTitle->setTitle( m_pEmbedObj->getContainerName() + sEmbedded);
m_aContainerName = m_pEmbedObj->getContainerName();
diff --git a/extensions/CppunitTest_extensions_test_update.mk b/extensions/CppunitTest_extensions_test_update.mk
index 18d312a0d019..e2cdaf58c315 100644
--- a/extensions/CppunitTest_extensions_test_update.mk
+++ b/extensions/CppunitTest_extensions_test_update.mk
@@ -23,7 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,extensions_test_update, \
sal \
salhelper \
test \
- tl \
+ utl \
unotest \
vcl \
))
diff --git a/extensions/Library_updatecheckui.mk b/extensions/Library_updatecheckui.mk
index a98cf964645b..86c59b608389 100644
--- a/extensions/Library_updatecheckui.mk
+++ b/extensions/Library_updatecheckui.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_Library_use_sdk_api,updatecheckui))
$(eval $(call gb_Library_use_libraries,updatecheckui,\
vcl \
tl \
+ utl \
comphelper \
cppuhelper \
cppu \
diff --git a/extensions/Library_updchk.mk b/extensions/Library_updchk.mk
index 27928d1c94e2..269a0d4dd36b 100644
--- a/extensions/Library_updchk.mk
+++ b/extensions/Library_updchk.mk
@@ -23,7 +23,7 @@ $(eval $(call gb_Library_use_libraries,updchk,\
cppu \
sal \
salhelper \
- tl \
+ utl \
vcl \
))
diff --git a/extensions/source/abpilot/unodialogabp.hxx b/extensions/source/abpilot/unodialogabp.hxx
index b5532179b3ff..a2ab837a0bb4 100644
--- a/extensions/source/abpilot/unodialogabp.hxx
+++ b/extensions/source/abpilot/unodialogabp.hxx
@@ -33,10 +33,9 @@ namespace abp
typedef ::comphelper::OPropertyArrayUsageHelper< OABSPilotUno > OABSPilotUno_PBase;
/// the UNO wrapper for the address book source pilot
class OABSPilotUno
- :public compmodule::OModuleResourceClient
- ,public svt::OGenericUnoDialog
- ,public OABSPilotUno_JBase
- ,public OABSPilotUno_PBase
+ : public svt::OGenericUnoDialog
+ , public OABSPilotUno_JBase
+ , public OABSPilotUno_PBase
{
OUString m_sDataSourceName;
diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx
index c40b83b2ac68..661a10f9f5e9 100644
--- a/extensions/source/bibliography/bibmod.cxx
+++ b/extensions/source/bibliography/bibmod.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <svl/urihelper.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
@@ -70,7 +70,7 @@ OUString BibResId(const char* pId)
BibConfig* BibModul::pBibConfig = nullptr;
BibModul::BibModul()
- : m_aResLocale(Translate::Create("pcr", Application::GetSettings().GetUILanguageTag()))
+ : m_aResLocale(Translate::Create("pcr"))
{
}
diff --git a/extensions/source/dbpilots/unoautopilot.hxx b/extensions/source/dbpilots/unoautopilot.hxx
index 5b148ffdcaa7..68180d2bb486 100644
--- a/extensions/source/dbpilots/unoautopilot.hxx
+++ b/extensions/source/dbpilots/unoautopilot.hxx
@@ -36,7 +36,6 @@ namespace dbp
class OUnoAutoPilot
:public OUnoAutoPilot_Base
,public ::comphelper::OPropertyArrayUsageHelper< OUnoAutoPilot< TYPE, SERVICEINFO > >
- ,public compmodule::OModuleResourceClient
{
explicit OUnoAutoPilot(const css::uno::Reference< css::uno::XComponentContext >& _rxORB)
: OUnoAutoPilot_Base(_rxORB)
diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx
index 619c5472ab6d..40273cf879de 100644
--- a/extensions/source/inc/componentmodule.cxx
+++ b/extensions/source/inc/componentmodule.cxx
@@ -19,7 +19,7 @@
#include <memory>
#include "componentmodule.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <svl/solar.hrc>
@@ -27,89 +27,22 @@
#include <tools/debug.hxx>
#include <rtl/strbuf.hxx>
-#define ENTER_MOD_METHOD() \
- ::osl::MutexGuard aGuard(s_aMutex); \
- ensureImpl()
-
-
namespace compmodule
{
-
-
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::registry;
using namespace ::comphelper;
using namespace ::cppu;
- // implementation for <type>OModule</type>. not threadsafe, has to be guarded by its owner
- class OModuleImpl
- {
- std::locale m_aResLocale;
- bool m_bInitialized;
-
- public:
- /// ctor
- OModuleImpl();
-
- /// get the manager for the resources of the module
- const std::locale& getResLocale();
- };
-
-
- OModuleImpl::OModuleImpl()
- : m_bInitialized(false)
- {
- }
-
- const std::locale& OModuleImpl::getResLocale()
+ OUString ModuleRes(const char* pId)
{
- // note that this method is not threadsafe, which counts for the whole class !
- if (!m_bInitialized)
- {
- // create a manager with a fixed prefix
- m_aResLocale = Translate::Create("pcr", Application::GetSettings().GetUILanguageTag());
- m_bInitialized = true;
- }
- return m_aResLocale;
- }
-
- ::osl::Mutex OModule::s_aMutex;
- sal_Int32 OModule::s_nClients = 0;
- OModuleImpl* OModule::s_pImpl = nullptr;
-
- const std::locale& OModule::getResLocale()
- {
- ENTER_MOD_METHOD();
- return s_pImpl->getResLocale();
- }
-
- void OModule::registerClient()
- {
- ::osl::MutexGuard aGuard(s_aMutex);
- ++s_nClients;
- }
-
- void OModule::revokeClient()
- {
- ::osl::MutexGuard aGuard(s_aMutex);
- if (!--s_nClients && s_pImpl)
- {
- delete s_pImpl;
- s_pImpl = nullptr;
- }
- }
-
- void OModule::ensureImpl()
- {
- if (s_pImpl)
- return;
- s_pImpl = new OModuleImpl();
+ static std::locale loc = Translate::Create("pcr");
+ return Translate::get(pId, loc);
}
//- registration helper
-
std::vector< OUString >* OModule::s_pImplementationNames = nullptr;
std::vector< Sequence< OUString > >* OModule::s_pSupportedServices = nullptr;
std::vector< ComponentInstantiation >* OModule::s_pCreationFunctionPointers = nullptr;
diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx
index 163b394f7f15..92bb52d1de5a 100644
--- a/extensions/source/inc/componentmodule.hxx
+++ b/extensions/source/inc/componentmodule.hxx
@@ -26,7 +26,7 @@
*/
#include <osl/mutex.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/uno/Sequence.hxx>
@@ -47,20 +47,12 @@ typedef css::uno::Reference< css::lang::XSingleServiceFactory > (SAL_CALL *Facto
rtl_ModuleCount*
);
- class OModuleImpl;
class OModule
{
- friend class OModuleResourceClient;
-
private:
OModule() = delete; //TODO: get rid of this class
protected:
- // resource administration
- static ::osl::Mutex s_aMutex; /// access safety
- static sal_Int32 s_nClients; /// number of registered clients
- static OModuleImpl* s_pImpl; /// impl class. lives as long as at least one client for the module is registered
-
// auto registration administration
static std::vector< OUString >*
s_pImplementationNames;
@@ -112,35 +104,10 @@ typedef css::uno::Reference< css::lang::XSingleServiceFactory > (SAL_CALL *Facto
const OUString& _rImplementationName,
const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxServiceManager
);
-
- protected:
- /// register a client for the module
- static void registerClient();
- /// revoke a client for the module
- static void revokeClient();
-
- private:
- /** ensure that the impl class exists
- @precond m_aMutex is guarded when this method gets called
- */
- static void ensureImpl();
};
-
- // base class for objects which uses any global module-specific resources
- class OModuleResourceClient
- {
- public:
- OModuleResourceClient() { OModule::registerClient(); }
- ~OModuleResourceClient() { OModule::revokeClient(); }
- };
-
-
// specialized ResId, using the resource locale provided by the global module
- static inline OUString ModuleRes(const char* pId)
- {
- return Translate::get(pId, OModule::getResLocale());
- }
+ OUString ModuleRes(const char* pId);
template <class TYPE>
class OMultiInstanceAutoRegistration
diff --git a/extensions/source/propctrlr/modulepcr.cxx b/extensions/source/propctrlr/modulepcr.cxx
index 56931b21bc14..8fedf6499ad0 100644
--- a/extensions/source/propctrlr/modulepcr.cxx
+++ b/extensions/source/propctrlr/modulepcr.cxx
@@ -21,7 +21,7 @@
#include <rtl/instance.hxx>
#include <osl/getglobalmutex.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
@@ -44,7 +44,6 @@ namespace pcr
};
PcrModule::PcrModule()
- :BaseClass( OString( "pcr" ), Application::GetSettings().GetUILanguageTag() )
{
}
@@ -56,7 +55,8 @@ namespace pcr
OUString PcrRes(const char* pId)
{
- return Translate::get(pId, PcrModule::getInstance().getResLocale());
+ static std::locale loc = Translate::Create("pcr");
+ return Translate::get(pId, loc);
}
} // namespace pcr
diff --git a/extensions/source/propctrlr/modulepcr.hxx b/extensions/source/propctrlr/modulepcr.hxx
index 652ff0b93f8a..6fcbfef5100f 100644
--- a/extensions/source/propctrlr/modulepcr.hxx
+++ b/extensions/source/propctrlr/modulepcr.hxx
@@ -20,15 +20,15 @@
#ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_MODULEPCR_HXX
#define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_MODULEPCR_HXX
-#include <unotools/componentresmodule.hxx>
+#include <comphelper/componentmodule.hxx>
namespace pcr
{
/* -------------------------------------------------------------------- */
- class PcrModule : public ::utl::OComponentResourceModule
+ class PcrModule : public ::comphelper::OModule
{
friend struct CreateModuleClass;
- typedef ::utl::OComponentResourceModule BaseClass;
+ typedef ::comphelper::OModule BaseClass;
public:
static PcrModule& getInstance();
private:
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 5294357a30c2..8bf4fb01fdab 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <tools/config.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/dibtools.hxx>
#include <vcl/layout.hxx>
#include <vcl/settings.hxx>
@@ -321,7 +321,7 @@ namespace {
OUString SaneResId(const char *pID)
{
- static std::locale loc = Translate::Create("pcr", Application::GetSettings().GetUILanguageTag());
+ static std::locale loc = Translate::Create("pcr");
return Translate::get(pID, loc);
}
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 4c4eca89b045..81bdee096fa2 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -61,7 +61,7 @@
#include "com/sun/star/task/InteractionRequestStringResolver.hpp"
#include "strings.hrc"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/urlobj.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
@@ -614,7 +614,7 @@ void UpdateHandler::loadStrings()
else
mbStringsLoaded = true;
- std::locale loc = Translate::Create("pcr", Application::GetSettings().GetUILanguageTag());
+ std::locale loc = Translate::Create("pcr");
msChecking = loadString( loc, RID_UPDATE_STR_CHECKING );
msCheckingError = loadString( loc, RID_UPDATE_STR_CHECKING_ERR );
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index b271c8f4eea2..2e334fc2c361 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/task/XJob.hpp>
#include <comphelper/processfactory.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/window.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/timer.hxx>
@@ -196,7 +196,7 @@ UpdateCheckUI::UpdateCheckUI(const uno::Reference<uno::XComponentContext>& xCont
, mbBubbleChanged( false )
, mnIconID( 0 )
{
- maSfxLocale = Translate::Create("sfx", Application::GetSettings().GetUILanguageTag());
+ maSfxLocale = Translate::Create("sfx");
maBubbleImage = GetBubbleImage( maBubbleImageURL );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 93d216bc8cc9..51577eb31393 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -21,7 +21,7 @@
#include <tools/stream.hxx>
#include <tools/poly.hxx>
#include <tools/fract.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/svapp.hxx>
#include <vcl/metaact.hxx>
#include <vcl/graph.hxx>
@@ -437,7 +437,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
if ( mbStatus && mnLevelWarning && pFilterConfigItem )
{
- std::locale loc = Translate::Create("flt", Application::GetSettings().GetUILanguageTag());
+ std::locale loc = Translate::Create("flt");
ScopedVclPtrInstance< InfoBox > aInfoBox(nullptr, Translate::get(KEY_VERSION_CHECK, loc));
aInfoBox->Execute();
}
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 56e3370158e0..8419678e6564 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -28,7 +28,7 @@
#include <vcl/svapp.hxx>
#include "sfx2/passwd.hxx"
#include "svtools/miscopt.hxx"
-#include "tools/resmgr.hxx"
+#include "unotools/resmgr.hxx"
#include "comphelper/propertyvalue.hxx"
#include "comphelper/sequence.hxx"
@@ -44,7 +44,7 @@
static std::locale& getPDFFilterResLocale()
{
- static std::locale loc = Translate::Create("flt", Application::GetSettings().GetUILanguageTag());
+ static std::locale loc = Translate::Create("flt");
return loc;
}
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 611315c51d5f..818946bd69df 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -22,7 +22,7 @@
#include <tools/urlobj.hxx>
#include <tools/fract.hxx>
#include <tools/poly.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/virdev.hxx>
#include <vcl/metaact.hxx>
@@ -884,7 +884,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
if ( mxStatusIndicator.is() )
{
- std::locale loc(Translate::Create("flt", Application::GetSettings().GetUILanguageTag()));
+ std::locale loc(Translate::Create("flt"));
sal_Int32 nTotalPageCount = aRangeEnum.size();
if ( bExportPages && bExportNotesPages )
nTotalPageCount *= 2;
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index ea20785d4995..476d3b59cdae 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -38,7 +38,7 @@
#include <osl/diagnose.h>
#include <rtl/ref.hxx>
#include <rtl/character.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/streamwrap.hxx>
using namespace ::cppu;
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 9ff9d81a046e..7d6c81f6edae 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/urlobj.hxx>
#include <svtools/headbar.hxx>
#include <unotools/streamwrap.hxx>
@@ -71,7 +71,7 @@ EnsureResLocale::EnsureResLocale()
{
if (!pXSLTResLocale)
{
- m_xResLocale.reset(new std::locale(Translate::Create("flt", Application::GetSettings().GetUILanguageTag())));
+ m_xResLocale.reset(new std::locale(Translate::Create("flt")));
pXSLTResLocale = m_xResLocale.get();
}
}
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 2db0f6a08707..624fed6ef3a1 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <comphelper/fileurl.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/layout.hxx>
#include <osl/file.hxx>
diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx
index 4a3ff363abf6..aacea75a5811 100644
--- a/forms/source/resource/frm_resource.cxx
+++ b/forms/source/resource/frm_resource.cxx
@@ -18,10 +18,7 @@
*/
#include "frm_resource.hxx"
-#include <tools/resmgr.hxx>
-
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
+#include <unotools/resmgr.hxx>
namespace frm
{
@@ -29,7 +26,7 @@ namespace frm
{
OUString loadString(const char* pResId)
{
- static std::locale loc = Translate::Create("frm", Application::GetSettings().GetUILanguageTag());
+ static std::locale loc = Translate::Create("frm");
return Translate::get(pResId, loc);
}
}
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 8f778bde6b45..5ff5067505c6 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -27,7 +27,7 @@
#include "osl/mutex.hxx"
#include <svl/zforlist.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <com/sun/star/sheet/FormulaOpCodeMapEntry.hpp>
#include <com/sun/star/sheet/FormulaMapGroup.hpp>
#include <com/sun/star/sheet/FormulaMapGroupSpecialOffset.hpp>
diff --git a/formula/source/core/resource/core_resource.cxx b/formula/source/core/resource/core_resource.cxx
index b03668d3c783..5163d41b5ae7 100644
--- a/formula/source/core/resource/core_resource.cxx
+++ b/formula/source/core/resource/core_resource.cxx
@@ -19,11 +19,9 @@
#include "core_resource.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
// ---- needed as long as we have no contexts for components ---
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
#include <rtl/instance.hxx>
#include <svl/solar.hrc>
@@ -48,7 +46,7 @@ namespace formula
if (m_pImpl)
return;
- m_pImpl = new std::locale(Translate::Create("for", Application::GetSettings().GetUILanguageTag()));
+ m_pImpl = new std::locale(Translate::Create("for"));
}
void ResourceManager::registerClient()
diff --git a/formula/source/ui/inc/ModuleHelper.hxx b/formula/source/ui/inc/ModuleHelper.hxx
index c5e92847b701..91cbb88a0b29 100644
--- a/formula/source/ui/inc/ModuleHelper.hxx
+++ b/formula/source/ui/inc/ModuleHelper.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_FORMULA_SOURCE_UI_INC_MODULEHELPER_HXX
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
namespace formula
{
diff --git a/formula/source/ui/resource/ModuleHelper.cxx b/formula/source/ui/resource/ModuleHelper.cxx
index 80636792aa14..0b0ff18403b7 100644
--- a/formula/source/ui/resource/ModuleHelper.cxx
+++ b/formula/source/ui/resource/ModuleHelper.cxx
@@ -66,7 +66,7 @@ const std::locale& OModuleImpl::getResLocale()
if (!m_xResources)
{
// create a manager with a fixed prefix
- m_xResources.reset(new std::locale(Translate::Create("for", Application::GetSettings().GetUILanguageTag())));
+ m_xResources.reset(new std::locale(Translate::Create("for")));
}
return *m_xResources;
}
diff --git a/fpicker/inc/fpsofficeResMgr.hxx b/fpicker/inc/fpsofficeResMgr.hxx
index 1e7711d670b5..1d38ae7d4fa7 100644
--- a/fpicker/inc/fpsofficeResMgr.hxx
+++ b/fpicker/inc/fpsofficeResMgr.hxx
@@ -11,7 +11,7 @@
#include <rtl/instance.hxx>
#include <osl/getglobalmutex.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
@@ -21,7 +21,7 @@ namespace fpicker
{
std::locale* operator ()()
{
- return new std::locale(Translate::Create("fps", Application::GetSettings().GetUILanguageTag()));
+ return new std::locale(Translate::Create("fps"));
}
static std::locale* getOrCreate()
diff --git a/fpicker/source/aqua/resourceprovider.mm b/fpicker/source/aqua/resourceprovider.mm
index e924179f4f40..7543d322c295 100644
--- a/fpicker/source/aqua/resourceprovider.mm
+++ b/fpicker/source/aqua/resourceprovider.mm
@@ -25,7 +25,7 @@
#include <osl/mutex.hxx>
#include <fpicker/strings.hrc>
#include <vcl/svapp.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 9ee48838fc54..03bbfa2ab03a 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -20,7 +20,7 @@
#include "iodlgimp.hxx"
#include "svtools/headbar.hxx"
#include <tools/debug.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/urlobj.hxx>
#include <vcl/menu.hxx>
#include <vcl/msgbox.hxx>
@@ -144,7 +144,7 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu )
if ( nCount == 1 )
{
// adjust the title of the top level entry (the workspace)
- std::locale loc = Translate::Create("svl", Application::GetSettings().GetUILanguageTag());
+ std::locale loc = Translate::Create("svl");
_pMenu->SetItemText(--nItemId, Translate::get(STR_SVT_MIMETYPE_CNT_FSYSBOX, loc));
}
--nCount;
diff --git a/fpicker/source/win32/misc/resourceprovider.cxx b/fpicker/source/win32/misc/resourceprovider.cxx
index e2782b1a984e..7e055c5d8ce1 100644
--- a/fpicker/source/win32/misc/resourceprovider.cxx
+++ b/fpicker/source/win32/misc/resourceprovider.cxx
@@ -29,7 +29,7 @@
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include "fpsofficeResMgr.hxx"
diff --git a/framework/inc/pch/precompiled_fwe.hxx b/framework/inc/pch/precompiled_fwe.hxx
index 86fb2645b5ff..a27767744984 100644
--- a/framework/inc/pch/precompiled_fwe.hxx
+++ b/framework/inc/pch/precompiled_fwe.hxx
@@ -217,7 +217,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
@@ -232,6 +231,7 @@
#include <unotools/fontdefs.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
#include <framework/fwedllapi.h>
diff --git a/framework/inc/pch/precompiled_fwi.hxx b/framework/inc/pch/precompiled_fwi.hxx
index 724aa721cc42..5e771f75775a 100644
--- a/framework/inc/pch/precompiled_fwi.hxx
+++ b/framework/inc/pch/precompiled_fwi.hxx
@@ -156,7 +156,6 @@
#include <tools/link.hxx>
#include <tools/mapunit.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
@@ -166,6 +165,7 @@
#include <uno/any2.h>
#include <uno/data.h>
#include <uno/sequence2.h>
+#include <unotools/resmgr.hxx>
#include <unotools/unotoolsdllapi.h>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx
index 900e1b3c75da..cb285f5b48a4 100644
--- a/framework/inc/pch/precompiled_fwk.hxx
+++ b/framework/inc/pch/precompiled_fwk.hxx
@@ -342,7 +342,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -359,6 +358,7 @@
#include <unotools/configmgr.hxx>
#include <unotools/fontdefs.hxx>
#include <unotools/options.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/unotoolsdllapi.h>
#include <framework/addonsoptions.hxx>
#include <framework/fwedllapi.h>
diff --git a/framework/inc/pch/precompiled_fwl.hxx b/framework/inc/pch/precompiled_fwl.hxx
index 2f59e411a3f8..11b2e2a558dd 100644
--- a/framework/inc/pch/precompiled_fwl.hxx
+++ b/framework/inc/pch/precompiled_fwl.hxx
@@ -325,7 +325,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -339,6 +338,7 @@
#include <uno/sequence2.h>
#include <unotools/fontdefs.hxx>
#include <unotools/options.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/unotoolsdllapi.h>
#include <framework/fwedllapi.h>
diff --git a/framework/source/fwe/classes/fwkresid.cxx b/framework/source/fwe/classes/fwkresid.cxx
index 8ed6c1dbb5e5..4d421df5c4bd 100644
--- a/framework/source/fwe/classes/fwkresid.cxx
+++ b/framework/source/fwe/classes/fwkresid.cxx
@@ -18,30 +18,12 @@
*/
#include "classes/fwkresid.hxx"
-#include <tools/resmgr.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-
-#include <rtl/strbuf.hxx>
-
-namespace
-{
- const std::locale& GetResLocale()
- {
- static std::locale* pResLocale = nullptr;
- if (!pResLocale)
- {
- SolarMutexGuard aSolarGuard;
- static std::locale loc(Translate::Create("fwe", Application::GetSettings().GetUILanguageTag()));
- pResLocale = &loc;
- }
- return *pResLocale;
- }
-}
+#include <unotools/resmgr.hxx>
OUString FwkResId(const char* pId)
{
- return Translate::get(pId, GetResLocale());
+ static std::locale loc(Translate::Create("fwe"));
+ return Translate::get(pId, loc);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx
index 46202f8c8a38..f515e2997d24 100644
--- a/framework/source/uiconfiguration/ImageList.cxx
+++ b/framework/source/uiconfiguration/ImageList.cxx
@@ -20,7 +20,6 @@
#include <osl/file.hxx>
#include <tools/debug.hxx>
#include <tools/stream.hxx>
-#include <tools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/outdev.hxx>
#include <vcl/graph.hxx>
diff --git a/include/unotools/componentresmodule.hxx b/include/unotools/componentresmodule.hxx
deleted file mode 100644
index ee19e99f53b0..000000000000
--- a/include/unotools/componentresmodule.hxx
+++ /dev/null
@@ -1,57 +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_UNOTOOLS_COMPONENTRESMODULE_HXX
-#define INCLUDED_UNOTOOLS_COMPONENTRESMODULE_HXX
-
-#include <comphelper/componentmodule.hxx>
-#include <unotools/unotoolsdllapi.h>
-#include <osl/getglobalmutex.hxx>
-#include <memory>
-
-class LanguageTag;
-
-namespace utl
-{
-
- class OComponentResModuleImpl;
-
- /** extends the comphelper::OModule implementation with
- simply resource access
- */
- class UNOTOOLS_DLLPUBLIC OComponentResourceModule : public ::comphelper::OModule
- {
- private:
- typedef ::comphelper::OModule BaseClass;
-
- private:
- ::std::unique_ptr< OComponentResModuleImpl > m_pImpl;
-
- public:
- OComponentResourceModule(const OString& _rResFilePrefix, const LanguageTag& rLanguage);
- virtual ~OComponentResourceModule() override;
-
- /// get the resource locale of the module
- const std::locale& getResLocale();
- };
-
-} // namespace utl
-
-#endif // INCLUDED_UNOTOOLS_COMPONENTRESMODULE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/tools/resmgr.hxx b/include/unotools/resmgr.hxx
index fe5b68e6328e..65e730bd0021 100644
--- a/include/tools/resmgr.hxx
+++ b/include/unotools/resmgr.hxx
@@ -16,21 +16,22 @@
* 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_TOOLS_RESMGR_HXX
-#define INCLUDED_TOOLS_RESMGR_HXX
+#ifndef INCLUDED_UNOTOOLS_RESMGR_HXX
+#define INCLUDED_UNOTOOLS_RESMGR_HXX
-#include <tools/toolsdllapi.h>
+#include <unotools/unotoolsdllapi.h>
+#include <unotools/syslocale.hxx>
#include <i18nlangtag/languagetag.hxx>
typedef OUString (*ResHookProc)(const OUString& rStr);
namespace Translate
{
- TOOLS_DLLPUBLIC std::locale Create(const sal_Char* pPrefixName, const LanguageTag& rLocale);
- TOOLS_DLLPUBLIC OUString get(const char* pId, const std::locale &loc);
- TOOLS_DLLPUBLIC void SetReadStringHook( ResHookProc pProc );
- TOOLS_DLLPUBLIC ResHookProc GetReadStringHook();
- TOOLS_DLLPUBLIC OUString ExpandVariables(const OUString& rString);
+ UNOTOOLS_DLLPUBLIC std::locale Create(const sal_Char* pPrefixName, const LanguageTag& rLocale = SvtSysLocale().GetUILanguageTag());
+ UNOTOOLS_DLLPUBLIC OUString get(const char* pId, const std::locale &loc);
+ UNOTOOLS_DLLPUBLIC void SetReadStringHook( ResHookProc pProc );
+ UNOTOOLS_DLLPUBLIC ResHookProc GetReadStringHook();
+ UNOTOOLS_DLLPUBLIC OUString ExpandVariables(const OUString& rString);
}
#endif
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index a098ff15d31f..27a1f86a2d71 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -13,7 +13,7 @@
#include <typeinfo>
#include <osl/module.hxx>
#include <sal/log.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/fldunit.hxx>
#include <vcl/dllapi.h>
#include <vcl/window.hxx>
diff --git a/ios/CustomTarget_Lo_Xcconfig.mk b/ios/CustomTarget_Lo_Xcconfig.mk
index 75a6cb094a18..3e3be5eca4d1 100644
--- a/ios/CustomTarget_Lo_Xcconfig.mk
+++ b/ios/CustomTarget_Lo_Xcconfig.mk
@@ -60,7 +60,7 @@ $(LO_XCCONFIG) :
cp $(INSTDIR)/program/services.rdb $(IOSRESOURCE)
# copy .res files
- # program/resource is hardcoded in tools/source/rc/resmgr.cxx. Sure,
+ # program/resource is hardcoded in unotools/source/i18n/resmgr.cxx. Sure,
# we could set STAR_RESOURCE_PATH instead. sigh...
mkdir -p $(IOSRESOURCE)/program/resource
cp $(INSTDIR)/program/resource/*en-US.res $(IOSRESOURCE)/program/resource
diff --git a/reportdesign/inc/pch/precompiled_rpt.hxx b/reportdesign/inc/pch/precompiled_rpt.hxx
index 4e5e9da61abf..a449efc9b906 100644
--- a/reportdesign/inc/pch/precompiled_rpt.hxx
+++ b/reportdesign/inc/pch/precompiled_rpt.hxx
@@ -315,7 +315,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -335,6 +334,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
diff --git a/reportdesign/inc/pch/precompiled_rptui.hxx b/reportdesign/inc/pch/precompiled_rptui.hxx
index 75292c8b43d1..07c3c3d6819d 100644
--- a/reportdesign/inc/pch/precompiled_rptui.hxx
+++ b/reportdesign/inc/pch/precompiled_rptui.hxx
@@ -524,7 +524,6 @@
#include <tools/multisel.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -545,6 +544,7 @@
#include <unotools/fontcvt.hxx>
#include <unotools/fontdefs.hxx>
#include <unotools/options.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
diff --git a/reportdesign/source/core/resource/core_resource.cxx b/reportdesign/source/core/resource/core_resource.cxx
index 21718d124830..8f1a10f7bbeb 100644
--- a/reportdesign/source/core/resource/core_resource.cxx
+++ b/reportdesign/source/core/resource/core_resource.cxx
@@ -17,12 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "core_resource.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
// ---- needed as long as we have no contexts for components ---
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-
#include <osl/thread.h>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -33,7 +30,7 @@
OUString RptResId(const char* pId)
{
- static std::locale loc = Translate::Create("rpt", Application::GetSettings().GetUILanguageTag());
+ static std::locale loc = Translate::Create("rpt");
return Translate::get(pId, loc);
}
diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx
index 36a25e337294..60cf31e4d2fe 100644
--- a/reportdesign/source/core/sdr/RptModel.cxx
+++ b/reportdesign/source/core/sdr/RptModel.cxx
@@ -20,7 +20,7 @@
#include "RptModel.hxx"
#include "RptPage.hxx"
#include <dbaccess/dbsubcomponentcontroller.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/pathoptions.hxx>
#include <vcl/svapp.hxx>
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 869df6bbc266..40f1de0244d4 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -562,7 +562,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -583,6 +582,7 @@
#include <unotools/collatorwrapper.hxx>
#include <unotools/configitem.hxx>
#include <unotools/options.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/unotoolsdllapi.h>
#include <userdat.hxx>
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 3424e4abcc19..aae468ffd160 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -33,7 +33,7 @@
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/collatorwrapper.hxx>
#include <formula/funcvarargs.h>
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 8e7b3d6aaab1..daa0c7cf06ea 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -38,7 +38,7 @@
#include <NumberFormatControl.hxx>
#include <svtools/parhtml.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <sot/formats.hxx>
#include "scitems.hxx"
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 7b8a2cfd1f74..a92e1a86a610 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -62,7 +62,7 @@
#include <vcl/waitobj.hxx>
#include <svx/svxerr.hxx>
#include <tools/diagnose_ex.h>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <editeng/unolingu.hxx>
#include <unotools/lingucfg.hxx>
@@ -138,7 +138,7 @@ void ScModule::InitInterface_Impl()
}
ScModule::ScModule( SfxObjectFactory* pFact ) :
- SfxModule( Translate::Create("sc", Application::GetSettings().GetUILanguageTag()), {pFact} ),
+ SfxModule( Translate::Create("sc"), {pFact} ),
aIdleTimer("sc ScModule IdleTimer"),
aSpellIdle("sc ScModule SpellIdle"),
mpDragData(new ScDragData),
diff --git a/scaddins/Library_analysis.mk b/scaddins/Library_analysis.mk
index 2c56e9daa9ee..dc854a0fb56d 100644
--- a/scaddins/Library_analysis.mk
+++ b/scaddins/Library_analysis.mk
@@ -39,7 +39,7 @@ $(eval $(call gb_Library_use_libraries,analysis,\
cppu \
cppuhelper \
sal \
- tl \
+ utl \
i18nlangtag \
))
diff --git a/scaddins/Library_date.mk b/scaddins/Library_date.mk
index 71c3db9ccb5d..96b1e58430d5 100644
--- a/scaddins/Library_date.mk
+++ b/scaddins/Library_date.mk
@@ -38,7 +38,7 @@ $(eval $(call gb_Library_use_libraries,date,\
cppu \
cppuhelper \
sal \
- tl \
+ utl \
i18nlangtag \
))
diff --git a/scaddins/Library_pricing.mk b/scaddins/Library_pricing.mk
index 2f221c9964fd..1c5e43a22da3 100644
--- a/scaddins/Library_pricing.mk
+++ b/scaddins/Library_pricing.mk
@@ -38,7 +38,7 @@ $(eval $(call gb_Library_use_libraries,pricing,\
cppu \
cppuhelper \
sal \
- tl \
+ utl \
i18nlangtag \
))
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index 4d98db9a1ea3..b0f55f5af779 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -29,7 +29,7 @@
#include <rtl/math.hxx>
#include <sal/macros.h>
#include <string.h>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <algorithm>
#include <cmath>
diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx
index ef73390c854b..f061695dc1c9 100644
--- a/scaddins/source/datefunc/datefunc.cxx
+++ b/scaddins/source/datefunc/datefunc.cxx
@@ -24,7 +24,7 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/ustrbuf.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <algorithm>
#include "deffuncname.hxx"
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx
index 3df3fe78a061..d54055649538 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -33,7 +33,7 @@
#include <algorithm>
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
using namespace ::com::sun::star;
using namespace sca::pricing;
diff --git a/sccomp/Library_solver.mk b/sccomp/Library_solver.mk
index 2d30205fe4b0..3339c0ed70df 100644
--- a/sccomp/Library_solver.mk
+++ b/sccomp/Library_solver.mk
@@ -34,8 +34,7 @@ $(eval $(call gb_Library_use_libraries,solver,\
cppu \
cppuhelper \
sal \
- tl \
- vcl \
+ utl \
i18nlangtag \
))
diff --git a/sccomp/source/solver/SolverComponent.cxx b/sccomp/source/solver/SolverComponent.cxx
index 134226d02a55..6e52ebc8653a 100644
--- a/sccomp/source/solver/SolverComponent.cxx
+++ b/sccomp/source/solver/SolverComponent.cxx
@@ -28,7 +28,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <vector>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
@@ -46,7 +46,7 @@ using namespace com::sun::star;
OUString SolverComponent::GetResourceString(const char* pId)
{
- static std::locale loc = Translate::Create("scc", Application::GetSettings().GetUILanguageTag());
+ static std::locale loc = Translate::Create("scc");
return Translate::get(pId, loc);
}
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index b59e3b64638c..fec38b05e857 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -489,7 +489,6 @@
#include <tools/link.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/tenccvt.hxx>
@@ -508,6 +507,7 @@
#include <unotools/options.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/saveopt.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/ucbstreamhelper.hxx>
diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx
index 6b48d65e2659..0e51c502110c 100644
--- a/sd/inc/pch/precompiled_sdui.hxx
+++ b/sd/inc/pch/precompiled_sdui.hxx
@@ -498,7 +498,6 @@
#include <tools/multisel.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/svborder.hxx>
@@ -521,6 +520,7 @@
#include <unotools/options.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 334095989164..f72c6206b297 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -68,7 +68,7 @@
#include <vcl/bitmapaccess.hxx>
#include <svtools/sfxecode.hxx>
#include <com/sun/star/beans/PropertyState.hpp>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <comphelper/anytostring.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 0768dfc22fb2..aef1dddaebea 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -20,7 +20,7 @@
#include <unotools/pathoptions.hxx>
#include <svl/languageoptions.hxx>
#include <unotools/ucbstreamhelper.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/urlobj.hxx>
#include <vcl/virdev.hxx>
#include <vcl/status.hxx>
@@ -65,7 +65,7 @@ void SdModule::InitInterface_Impl()
// Ctor
SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
-: SfxModule( Translate::Create("sd", Application::GetSettings().GetUILanguageTag()), {pFact1, pFact2} ),
+: SfxModule( Translate::Create("sd"), {pFact1, pFact2} ),
pTransferClip(nullptr),
pTransferDrag(nullptr),
pTransferSelection(nullptr),
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index e381e7370484..cea43ef5b833 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -403,7 +403,6 @@
#include <tools/link.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/svborder.hxx>
@@ -428,6 +427,7 @@
#include <unotools/options.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/printwarningoptions.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/saveopt.hxx>
#include <unotools/securityoptions.hxx>
#include <unotools/streamwrap.hxx>
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2bc435a1da16..d163e80226dc 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -29,7 +29,7 @@
#include <basic/sbdef.hxx>
#include <svtools/soerr.hxx>
#include <svtools/strings.hrc>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/saveopt.hxx>
#include <svl/intitem.hxx>
@@ -215,9 +215,9 @@ void SfxApplication::Initialize_Impl()
getRID_ERRHDL(), ErrCode(ERRCODE_AREA_IO), ErrCode(ERRCODE_AREA_SVX));
#if HAVE_FEATURE_SCRIPTING
- pImpl->aBasicResLocale = Translate::Create("sb", Application::GetSettings().GetUILanguageTag());
+ pImpl->aBasicResLocale = Translate::Create("sb");
#endif
- pImpl->aSvtResLocale = Translate::Create("svt", Application::GetSettings().GetUILanguageTag());
+ pImpl->aSvtResLocale = Translate::Create("svt");
pImpl->m_pSoErrorHdl = new SfxErrorHandler(
getRID_SO_ERROR_HANDLER(), ErrCode(ERRCODE_AREA_SO), ErrCode(ERRCODE_AREA_SO_END), &(pImpl->aSvtResLocale));
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index f25562df5647..773f5c09bdf8 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -25,7 +25,7 @@
#include <svl/urihelper.hxx>
#include <tools/datetime.hxx>
#include <tools/stream.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <sfx2/frmhtmlw.hxx>
#include <sfx2/evntconf.hxx>
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
index 97c8f48a436d..3aa36da218f9 100644
--- a/sfx2/source/bastyp/sfxresid.cxx
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -19,9 +19,8 @@
#include <sfx2/sfxresid.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/svapp.hxx>
-#include "tools/resmgr.hxx"
+#include <tools/solar.h>
+#include "unotools/resmgr.hxx"
static std::locale* pResLocale = nullptr;
@@ -29,7 +28,7 @@ std::locale* SfxResLocale::GetResLocale()
{
if (!pResLocale)
{
- pResLocale = new std::locale(Translate::Create("sfx", Application::GetSettings().GetUILanguageTag()));
+ pResLocale = new std::locale(Translate::Create("sfx"));
}
return pResLocale;
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index 907b4ead60ef..6b4c453bfdd0 100644
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -18,7 +18,7 @@
*/
#include <sfx2/styfitem.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
SfxStyleFamilyItem::SfxStyleFamilyItem(SfxStyleFamily nFamily_, const OUString &rName, const Image& rImage, const std::pair<const char*, int>* pStringArray, const std::locale& rResLocale)
: nFamily(nFamily_)
diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx
index 9694010b291c..9bb3facc88eb 100644
--- a/slideshow/inc/pch/precompiled_slideshow.hxx
+++ b/slideshow/inc/pch/precompiled_slideshow.hxx
@@ -241,7 +241,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
@@ -256,6 +255,7 @@
#include <unotools/fontdefs.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index af4623c9bfcc..37548597e82b 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -24,7 +24,7 @@
#include <svl/whiter.hxx>
#include <sfx2/viewsh.hxx>
#include <svx/svxids.hrc>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/virdev.hxx>
#include <unotools/syslocale.hxx>
#include "smmod.hxx"
@@ -121,7 +121,7 @@ void SmModule::InitInterface_Impl()
}
SmModule::SmModule(SfxObjectFactory* pObjFact)
- : SfxModule(Translate::Create("sm", Application::GetSettings().GetUILanguageTag()), {pObjFact})
+ : SfxModule(Translate::Create("sm"), {pObjFact})
{
SetName("StarMath");
diff --git a/svl/source/misc/getstringresource.cxx b/svl/source/misc/getstringresource.cxx
index 59ee843391cb..ff95e7d2c22c 100644
--- a/svl/source/misc/getstringresource.cxx
+++ b/svl/source/misc/getstringresource.cxx
@@ -19,20 +19,17 @@
#include <sal/config.h>
-#include <map>
#include <memory>
#include <i18nlangtag/languagetag.hxx>
-#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
#include <sal/types.h>
-#include <tools/resmgr.hxx>
-#include <unotools/syslocale.hxx>
+#include <unotools/resmgr.hxx>
#include "getstringresource.hxx"
OUString SvlResId(const char* id)
{
- static std::locale loc = Translate::Create("svl", SvtSysLocale().GetUILanguageTag());
+ static std::locale loc = Translate::Create("svl");
return Translate::get(id, loc);
}
diff --git a/svtools/inc/pch/precompiled_svt.hxx b/svtools/inc/pch/precompiled_svt.hxx
index 189391a74379..d7e516d25daf 100644
--- a/svtools/inc/pch/precompiled_svt.hxx
+++ b/svtools/inc/pch/precompiled_svt.hxx
@@ -375,7 +375,6 @@
#include <tools/multisel.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -398,6 +397,7 @@
#include <unotools/nativenumberwrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/transliterationwrapper.hxx>
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 6c8f162da847..892f4299977f 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -22,7 +22,7 @@
#include <vcl/metaact.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/imagerepository.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/fract.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <vcl/graphicfilter.hxx>
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 6e38437f79ac..47a5689ec031 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/wintypes.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
@@ -145,7 +145,7 @@ SfxErrorHandler::SfxErrorHandler(const ErrMsgCode* pIdPs, ErrCode lStartP, ErrCo
ErrorRegistry::RegisterDisplay(&aWndFunc);
if (!pResLocale)
{
- xFreeLocale.reset(new std::locale(Translate::Create("svt", Application::GetSettings().GetUILanguageTag())));
+ xFreeLocale.reset(new std::locale(Translate::Create("svt")));
pResLocale = xFreeLocale.get();
}
}
@@ -197,7 +197,7 @@ void SfxErrorHandler::GetClassString(sal_uLong lClassId, OUString &rStr)
*/
{
- std::locale loc(Translate::Create("svt", Application::GetSettings().GetUILanguageTag()));
+ std::locale loc(Translate::Create("svt"));
for (const ErrMsgCode* pItem = getRID_ERRHDL(); pItem->second; ++pItem)
{
if (sal_uInt32(pItem->second) == lClassId)
@@ -277,7 +277,7 @@ bool SfxErrorContext::GetString(ErrCode nErrId, OUString &rStr)
std::locale* pFreeLocale = nullptr;
if (!pResLocale)
{
- pFreeLocale = new std::locale(Translate::Create("svt", Application::GetSettings().GetUILanguageTag()));
+ pFreeLocale = new std::locale(Translate::Create("svt"));
pResLocale = pFreeLocale;
}
if (pResLocale)
diff --git a/svtools/source/misc/svtresid.cxx b/svtools/source/misc/svtresid.cxx
index c3e5ecbd1239..e6cac0b9b981 100644
--- a/svtools/source/misc/svtresid.cxx
+++ b/svtools/source/misc/svtresid.cxx
@@ -17,17 +17,16 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
+#include <tools/solar.h>
#include <svtools/svtresid.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
static std::locale* pResLocale=nullptr;
std::locale* SvtResLocale::GetResLocale()
{
if (!pResLocale)
- pResLocale = new std::locale(Translate::Create("svt", SvtSysLocale().GetUILanguageTag()));
+ pResLocale = new std::locale(Translate::Create("svt"));
return pResLocale;
}
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 72422d06817c..f8e34c2d40b8 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -387,7 +387,6 @@
#include <tools/link.hxx>
#include <tools/poly.hxx>
#include <tools/resary.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -403,6 +402,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/pathoptions.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/unotoolsdllapi.h>
#include <unotools/viewoptions.hxx>
#include <svx/AccessibleShape.hxx>
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index 49ee27ea7a1c..e5c5833f6ab0 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -419,7 +419,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -438,6 +437,7 @@
#include <unotools/options.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/ucbstreamhelper.hxx>
diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx
index 145ef6bf0745..870cd05f295f 100644
--- a/svx/source/dialog/dialmgr.cxx
+++ b/svx/source/dialog/dialmgr.cxx
@@ -17,14 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <svx/dialmgr.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
const std::locale& SvxResLocale()
{
- static std::locale loc = Translate::Create("svx", Application::GetSettings().GetUILanguageTag());
+ static std::locale loc = Translate::Create("svx");
return loc;
}
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 80806697767e..da2303afc156 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -30,7 +30,7 @@
#include "fpicker/strings.hrc"
#include <svx/svxids.hrc>
#include <tools/diagnose_ex.h>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <svx/xmlexchg.hxx>
#include <svx/fmshell.hxx>
#include <svtools/miscopt.hxx>
@@ -3355,7 +3355,7 @@ namespace svxform
m_pFilePickerBtn->SetClickHdl( LINK( this, AddInstanceDialog, FilePickerHdl ) );
// load the filter name from fps resource
- m_sAllFilterName = Translate::get(STR_FILTERNAME_ALL, Translate::Create("fps", Application::GetSettings().GetUILanguageTag()));
+ m_sAllFilterName = Translate::get(STR_FILTERNAME_ALL, Translate::Create("fps"));
}
AddInstanceDialog::~AddInstanceDialog()
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index f87769814f7d..e77ed61a49fa 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -25,7 +25,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <ucbhelper/content.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/urlobj.hxx>
#include <svl/solar.hrc>
#include <svl/urihelper.hxx>
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 8efe25d6111f..cf712c30a116 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -24,7 +24,7 @@
#include <comphelper/classids.hxx>
#include <comphelper/string.hxx>
#include <unotools/pathoptions.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/vcompat.hxx>
#include <tools/helpers.hxx>
#include <vcl/virdev.hxx>
diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx
index 29e6f0b6d0d8..6a3ccf2b6a78 100644
--- a/sw/inc/pch/precompiled_msword.hxx
+++ b/sw/inc/pch/precompiled_msword.hxx
@@ -646,7 +646,6 @@
#include <tools/mempool.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -672,6 +671,7 @@
#include <unotools/fltrcfg.hxx>
#include <unotools/fontdefs.hxx>
#include <unotools/localedatawrapper.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/nativenumberwrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 27eb99b158c0..8e56844a6334 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -520,7 +520,6 @@
#include <tools/link.hxx>
#include <tools/mapunit.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -560,6 +559,7 @@
#include <unotools/moduleoptions.hxx>
#include <unotools/options.hxx>
#include <unotools/pathoptions.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/transliterationwrapper.hxx>
diff --git a/sw/inc/pch/precompiled_swui.hxx b/sw/inc/pch/precompiled_swui.hxx
index d0326823fa6d..44f69c1c9bbd 100644
--- a/sw/inc/pch/precompiled_swui.hxx
+++ b/sw/inc/pch/precompiled_swui.hxx
@@ -578,7 +578,6 @@
#include <tools/multisel.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -607,6 +606,7 @@
#include <unotools/nativenumberwrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/pathoptions.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/unotoolsdllapi.h>
diff --git a/sw/inc/pch/precompiled_vbaswobj.hxx b/sw/inc/pch/precompiled_vbaswobj.hxx
index 9cbc82468cb9..ff5c46d8b026 100644
--- a/sw/inc/pch/precompiled_vbaswobj.hxx
+++ b/sw/inc/pch/precompiled_vbaswobj.hxx
@@ -375,7 +375,6 @@
#include <tools/multisel.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -396,6 +395,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
#include <vbahelper/helperdecl.hxx>
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index 40cb9aa2135c..dfd1f6aa1912 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -24,7 +24,7 @@
#include <vcl/wrkwin.hxx>
#include <vcl/graph.hxx>
#include <svtools/ehdl.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <svx/ParaLineSpacingPopup.hxx>
#include <svx/TextCharacterSpacingPopup.hxx>
#include <svx/TextUnderlinePopup.hxx>
@@ -146,7 +146,7 @@ using namespace ::com::sun::star::uno;
SwModule::SwModule( SfxObjectFactory* pWebFact,
SfxObjectFactory* pFact,
SfxObjectFactory* pGlobalFact )
- : SfxModule( Translate::Create("sw", SvtSysLocale().GetUILanguageTag()), {pWebFact, pFact, pGlobalFact} ),
+ : SfxModule( Translate::Create("sw"), {pWebFact, pFact, pGlobalFact} ),
m_pModuleConfig(nullptr),
m_pUsrPref(nullptr),
m_pWebUsrPref(nullptr),
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index 7ae20567b393..415292bd2a26 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -25,7 +25,7 @@
#include <i18nlangtag/mslangid.hxx>
#include <vcl/svapp.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/link.hxx>
#include <vcl/graphicfilter.hxx>
#include <unotools/syslocaleoptions.hxx>
diff --git a/test/source/setupvcl.cxx b/test/source/setupvcl.cxx
index 8be40094d84c..de27c7acff48 100644
--- a/test/source/setupvcl.cxx
+++ b/test/source/setupvcl.cxx
@@ -17,7 +17,7 @@
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <test/setupvcl.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/syslocaleoptions.hxx>
#include <vcl/svapp.hxx>
diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk
index f24d4a5851a4..d0d9f4516c2b 100644
--- a/tools/Library_tl.mk
+++ b/tools/Library_tl.mk
@@ -69,7 +69,6 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
tools/source/memtools/unqidx \
tools/source/misc/cpuid \
tools/source/misc/extendapplicationenvironment \
- tools/source/rc/resmgr \
tools/source/ref/globname \
tools/source/ref/pstm \
tools/source/ref/ref \
@@ -94,7 +93,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,tl,\
$(eval $(call gb_Library_use_externals,tl,\
boost_headers \
- boost_locale \
zlib \
))
diff --git a/unotools/Library_utl.mk b/unotools/Library_utl.mk
index 8656ebbe594c..0bfcbad5e383 100644
--- a/unotools/Library_utl.mk
+++ b/unotools/Library_utl.mk
@@ -11,7 +11,10 @@
# utl is the name of the library as it is found in Repository.mk
$(eval $(call gb_Library_Library,utl))
-$(eval $(call gb_Library_use_external,utl,boost_headers))
+$(eval $(call gb_Library_use_externals,utl,\
+ boost_headers \
+ boost_locale \
+))
$(eval $(call gb_Library_use_custom_headers,utl,\
officecfg/registry \
@@ -92,10 +95,10 @@ $(eval $(call gb_Library_add_exception_objects,utl,\
unotools/source/i18n/localedatawrapper \
unotools/source/i18n/nativenumberwrapper \
unotools/source/i18n/readwritemutexguard \
+ unotools/source/i18n/resmgr \
unotools/source/i18n/textsearch \
unotools/source/i18n/transliterationwrapper \
unotools/source/misc/closeveto \
- unotools/source/misc/componentresmodule \
unotools/source/misc/datetime \
unotools/source/misc/desktopterminationobserver \
unotools/source/misc/eventlisteneradapter \
diff --git a/tools/source/rc/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
index 842e58cee3b9..492c7fcf8632 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/unotools/source/i18n/resmgr.cxx
@@ -29,7 +29,7 @@
#include <tools/debug.hxx>
#include <tools/stream.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <osl/endian.h>
#include <osl/process.h>
#include <osl/thread.h>
diff --git a/unotools/source/misc/componentresmodule.cxx b/unotools/source/misc/componentresmodule.cxx
deleted file mode 100644
index cb1f718fca44..000000000000
--- a/unotools/source/misc/componentresmodule.cxx
+++ /dev/null
@@ -1,87 +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/componentresmodule.hxx>
-#include <tools/resmgr.hxx>
-#include <osl/diagnose.h>
-#include <rtl/strbuf.hxx>
-
-namespace utl
-{
-
- //= OComponentResModuleImpl
-
- /** PIMPL-class for OComponentResourceModule
-
- not threadsafe!
- */
- class OComponentResModuleImpl
- {
- private:
- std::locale m_aLocale;
- bool m_bLocaleInitialized;
- OString m_sResFilePrefix;
- LanguageTag m_aLanguage;
-
- OComponentResModuleImpl(const OComponentResModuleImpl&) = delete;
- OComponentResModuleImpl& operator=(const OComponentResModuleImpl&) = delete;
-
- public:
- explicit OComponentResModuleImpl(const OString& _rResFilePrefix, const LanguageTag& rLanguage)
- : m_bLocaleInitialized( false )
- , m_sResFilePrefix( _rResFilePrefix )
- , m_aLanguage( rLanguage )
- {
- }
-
- /** retrieves our resource manager
- */
- const std::locale& getResLocale();
- };
-
- const std::locale& OComponentResModuleImpl::getResLocale()
- {
- if (!m_bLocaleInitialized)
- {
- m_aLocale = Translate::Create(m_sResFilePrefix.getStr(), m_aLanguage);
- m_bLocaleInitialized = true;
- }
- return m_aLocale;
- }
-
- //= OComponentResourceModule
- OComponentResourceModule::OComponentResourceModule(const OString& _rResFilePrefix, const LanguageTag& rLanguage)
- :BaseClass()
- ,m_pImpl( new OComponentResModuleImpl( _rResFilePrefix, rLanguage ) )
- {
- }
-
- OComponentResourceModule::~OComponentResourceModule()
- {
- }
-
- const std::locale& OComponentResourceModule::getResLocale()
- {
- ::osl::MutexGuard aGuard( m_aMutex );
- return m_pImpl->getResLocale();
- }
-
-} // namespace utl
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/alreadyopen.cxx b/uui/source/alreadyopen.cxx
index 9445fc4b0fa0..755d82171edc 100644
--- a/uui/source/alreadyopen.cxx
+++ b/uui/source/alreadyopen.cxx
@@ -19,7 +19,7 @@
#include "strings.hrc"
#include "alreadyopen.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
AlreadyOpenQueryBox::AlreadyOpenQueryBox( vcl::Window* pParent, const std::locale& rLocale, const OUString& aMessage, bool bIsStoring ) :
MessBox(pParent, 0,
diff --git a/uui/source/filechanged.cxx b/uui/source/filechanged.cxx
index 7fefdba84f08..97c98d216438 100644
--- a/uui/source/filechanged.cxx
+++ b/uui/source/filechanged.cxx
@@ -18,7 +18,7 @@
*/
#include "strings.hrc"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include "filechanged.hxx"
FileChangedQueryBox::FileChangedQueryBox( vcl::Window* pParent, const std::locale& rLocale ) :
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index bf1392e90f0f..a45cae432d1b 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -34,7 +34,7 @@
#include <osl/diagnose.h>
#include <rtl/digest.h>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/msgbox.hxx>
@@ -101,7 +101,7 @@ executeLoginDialog(
if (bSavePassword)
{
- std::locale aLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
+ std::locale aLocale(Translate::Create("uui"));
xDialog->SetSavePasswordText(
Translate::get(rInfo.GetIsRememberPersistent()
? RID_SAVE_PASSWORD
@@ -414,7 +414,7 @@ executeMasterPasswordDialog(
{
SolarMutexGuard aGuard;
- std::locale aResLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
+ std::locale aResLocale(Translate::Create("uui"));
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
ScopedVclPtrInstance< MasterPasswordCreateDialog > xDialog(
@@ -512,7 +512,7 @@ executePasswordDialog(
{
SolarMutexGuard aGuard;
- std::locale aResLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
+ std::locale aResLocale(Translate::Create("uui"));
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
if (bIsSimplePasswordRequest)
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index 5818b24220eb..260ad0b9aa01 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -29,7 +29,7 @@
#include <svtools/strings.hrc>
#include <svx/svxerr.hxx>
#include <svx/dialogs.hrc>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include "ids.hxx"
#include "ids.hrc"
@@ -167,7 +167,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
SOURCE_SVX :
SOURCE_UUI;
- std::locale aResLocale = Translate::Create(aManager[eSource], Application::GetSettings().GetUILanguageTag());
+ std::locale aResLocale = Translate::Create(aManager[eSource]);
ErrorResource aErrorResource(aId[eSource], aResLocale);
if (!aErrorResource.getString(nErrorCode, aMessage))
return;
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index 927351727129..1ea6cf3e9de4 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/task/XInteractionAbort.hpp>
#include <com/sun/star/task/XInteractionRequest.hpp>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
@@ -74,7 +74,7 @@ handleLockedDocumentRequest_(
try
{
SolarMutexGuard aGuard;
- std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
+ std::locale aResLocale = Translate::Create("uui");
OUString aMessage;
std::vector< OUString > aArguments;
@@ -153,7 +153,7 @@ handleChangedByOthersRequest_(
try
{
SolarMutexGuard aGuard;
- std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
+ std::locale aResLocale = Translate::Create("uui");
ScopedVclPtrInstance< FileChangedQueryBox > xDialog(pParent, aResLocale);
sal_Int32 nResult = xDialog->Execute();
@@ -189,7 +189,7 @@ handleLockFileProblemRequest_(
try
{
SolarMutexGuard aGuard;
- std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
+ std::locale aResLocale = Translate::Create("uui");
sal_Int32 nResult;
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index c835cdeb1f04..e27efb9ff10f 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -31,7 +31,7 @@
#include <comphelper/sequence.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <svl/zforlist.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
@@ -155,7 +155,7 @@ executeUnknownAuthDialog(
std::vector< OUString > aArguments;
aArguments.push_back( getContentPart( rXCert->getSubjectName()) );
- std::locale aResLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
+ std::locale aResLocale(Translate::Create("uui"));
ErrorResource aErrorResource(RID_UUI_ERRHDL, aResLocale);
if (aErrorResource.getString(ERRCODE_UUI_UNKNOWNAUTH_UNTRUSTED, aMessage))
@@ -213,7 +213,7 @@ executeSSLWarnDialog(
break;
}
- std::locale aResLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
+ std::locale aResLocale(Translate::Create("uui"));
ErrorResource aErrorResource(RID_UUI_ERRHDL, aResLocale);
if (aErrorResource.getString(
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index b397d52b7a97..5b4447bd83f2 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -61,7 +61,7 @@
#include <rtl/strbuf.hxx>
#include <osl/conditn.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/errinf.hxx>
#include <osl/thread.hxx>
#include <tools/diagnose_ex.h>
@@ -998,7 +998,7 @@ NameClashResolveDialogResult executeSimpleNameClashResolveDialog( vcl::Window *p
OUString & rProposedNewName,
bool bAllowOverwrite )
{
- std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
+ std::locale aResLocale = Translate::Create("uui");
ScopedVclPtrInstance<NameClashDialog> aDialog(pParent, aResLocale, rTargetFolderURL,
rClashingName, rProposedNewName, bAllowOverwrite);
@@ -1100,7 +1100,7 @@ UUIInteractionHelper::handleGenericErrorRequest(
OUString aErrorString;
ErrorHandler::GetErrorString( nErrorCode, aErrorString );
- std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
+ std::locale aResLocale = Translate::Create("uui");
OUString aTitle( utl::ConfigManager::getProductName() );
OUString aErrTitle = Translate::get(STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE, aResLocale);
@@ -1194,7 +1194,7 @@ UUIInteractionHelper::handleBrokenPackageRequest(
OUString aMessage;
{
- std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
+ std::locale aResLocale = Translate::Create("uui");
ErrorResource aErrorResource(RID_UUI_ERRHDL, aResLocale);
if (!aErrorResource.getString(nErrorCode, aMessage))
return;
diff --git a/uui/source/lockcorrupt.cxx b/uui/source/lockcorrupt.cxx
index 9230dc80e890..a101a6794332 100644
--- a/uui/source/lockcorrupt.cxx
+++ b/uui/source/lockcorrupt.cxx
@@ -20,7 +20,7 @@
#include "ids.hxx"
#include "strings.hrc"
#include "lockcorrupt.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/button.hxx>
LockCorruptQueryBox::LockCorruptQueryBox(vcl::Window* pParent, const std::locale& rResLocale)
diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx
index 4b829e9af568..e5d00b9a01a6 100644
--- a/uui/source/lockfailed.cxx
+++ b/uui/source/lockfailed.cxx
@@ -19,7 +19,7 @@
#include "strings.hrc"
#include "lockfailed.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/button.hxx>
LockFailedQueryBox::LockFailedQueryBox(vcl::Window* pParent, const std::locale& rResLocale)
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index 58e6a736a316..37e5c2a53116 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -18,7 +18,7 @@
*/
#include <sal/macros.h>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/layout.hxx>
#include "strings.hrc"
#include "masterpasscrtdlg.hxx"
diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx
index 3afe239cd039..2ee6308c6cbc 100644
--- a/uui/source/masterpassworddlg.cxx
+++ b/uui/source/masterpassworddlg.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/layout.hxx>
#include "strings.hrc"
#include "masterpassworddlg.hxx"
diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx
index 2d5f1f0ed24b..a2b8164a8eab 100644
--- a/uui/source/nameclashdlg.cxx
+++ b/uui/source/nameclashdlg.cxx
@@ -18,7 +18,7 @@
*/
#include <osl/file.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/layout.hxx>
#include "strings.hrc"
diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx
index 1808a405995d..cae6baa2b0c0 100644
--- a/uui/source/openlocked.cxx
+++ b/uui/source/openlocked.cxx
@@ -19,7 +19,7 @@
#include "strings.hrc"
#include "openlocked.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
OpenLockedQueryBox::OpenLockedQueryBox( vcl::Window* pParent, const std::locale& rResLocale, const OUString& aMessage ) :
MessBox(pParent, 0,
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index aa1fd0e53cb5..c4edd844b0d5 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -20,7 +20,7 @@
#include "passworddlg.hxx"
#include "strings.hrc"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/urlobj.hxx>
#include <vcl/layout.hxx>
diff --git a/uui/source/trylater.cxx b/uui/source/trylater.cxx
index de5ca390580d..a7eb623d1fc4 100644
--- a/uui/source/trylater.cxx
+++ b/uui/source/trylater.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include "strings.hrc"
#include "trylater.hxx"
diff --git a/vbahelper/inc/pch/precompiled_msforms.hxx b/vbahelper/inc/pch/precompiled_msforms.hxx
index ec5ebf2e2085..9ded5c254641 100644
--- a/vbahelper/inc/pch/precompiled_msforms.hxx
+++ b/vbahelper/inc/pch/precompiled_msforms.hxx
@@ -321,7 +321,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/svborder.hxx>
@@ -343,6 +342,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
#include <vbahelper/helperdecl.hxx>
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 9c1e119ded7a..57d536a5c90c 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -23,7 +23,7 @@
#include <comphelper/string.hxx>
#include <rtl/process.h>
#include <tools/gen.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <uno/current_context.hxx>
#include <vcl/button.hxx>
@@ -166,7 +166,7 @@ const std::locale& ImplGetResLocale()
ImplSVData* pSVData = ImplGetSVData();
if (!pSVData->mbResLocaleSet)
{
- pSVData->maResLocale = Translate::Create("vcl", Application::GetSettings().GetUILanguageTag());
+ pSVData->maResLocale = Translate::Create("vcl");
pSVData->mbResLocaleSet = true;
}
return pSVData->maResLocale;
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 58a5260d4e6b..61f589aaf93a 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -27,7 +27,7 @@
#include <desktop/exithelper.h>
#include <tools/debug.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/asyncnotification.hxx>
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index 39a7d2fb1a3e..554f16850c2c 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 23070eb10622..5fea84fed4e2 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -27,7 +27,7 @@
#include <ucbhelper/content.hxx>
#include <cppuhelper/implbase.hxx>
#include <tools/fract.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
#include <tools/zcodec.hxx>
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index b72d10882e22..31da4bbff58c 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -22,7 +22,7 @@
#include <o3tl/any.hxx>
#include <tools/debug.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/stream.hxx>
#include <vcl/ImageTree.hxx>
#include <vcl/salbtype.hxx>
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index 2a81e8a59f02..76400558fe27 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -19,7 +19,7 @@
#include <osl/file.hxx>
#include <tools/stream.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/outdev.hxx>
#include <vcl/graph.hxx>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 5a7faafb87a9..ac84840c29cf 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -13,7 +13,7 @@
#include <comphelper/processfactory.hxx>
#include <osl/module.hxx>
#include <sal/log.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/builder.hxx>
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
@@ -2078,7 +2078,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
{
name = reader.getAttributeValue(false);
sType = OString(name.begin, name.length);
- m_pParserState->m_aResLocale = Translate::Create(sType.getStr(), Application::GetSettings().GetUILanguageTag());
+ m_pParserState->m_aResLocale = Translate::Create(sType.getStr());
}
}
++nLevel;
diff --git a/vcl/unx/gtk/fpicker/resourceprovider.cxx b/vcl/unx/gtk/fpicker/resourceprovider.cxx
index 349247c9235a..152395d61463 100644
--- a/vcl/unx/gtk/fpicker/resourceprovider.cxx
+++ b/vcl/unx/gtk/fpicker/resourceprovider.cxx
@@ -18,7 +18,7 @@
*/
#include <vcl/svapp.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 0ba0b03dcb8f..62579dbaa864 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -28,7 +28,7 @@
#include <com/sun/star/text/RelOrientation.hpp>
#include <oox/drawingml/drawingmltypes.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <svx/dialmgr.hxx>
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 165299318016..119e6271d336 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -33,7 +33,7 @@
#include "OOXMLFastDocumentHandler.hxx"
#include "OOXMLPropertySet.hxx"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <svx/dialmgr.hxx>
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index f1d28a85e305..2c06c816e47f 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -8,7 +8,7 @@
*/
#include <rtftokenizer.hxx>
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <svx/dialmgr.hxx>
diff --git a/writerperfect/inc/WPFTResMgr.hxx b/writerperfect/inc/WPFTResMgr.hxx
index 4b7bbf3e2a19..17bfc872731a 100644
--- a/writerperfect/inc/WPFTResMgr.hxx
+++ b/writerperfect/inc/WPFTResMgr.hxx
@@ -5,7 +5,7 @@
#include "writerperfectdllapi.h"
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
struct WRITERPERFECT_DLLPUBLIC WPFTResLocale
{
diff --git a/writerperfect/source/common/WPFTResMgr.cxx b/writerperfect/source/common/WPFTResMgr.cxx
index c207d25ffca9..f61c470d8e17 100644
--- a/writerperfect/source/common/WPFTResMgr.cxx
+++ b/writerperfect/source/common/WPFTResMgr.cxx
@@ -2,12 +2,9 @@
#include "WPFTResMgr.hxx"
-#include <vcl/settings.hxx>
-#include <vcl/svapp.hxx>
-
std::locale &WPFTResLocale::GetResLocale()
{
- static std::locale loc(Translate::Create("wpt", Application::GetSettings().GetUILanguageTag()));
+ static std::locale loc(Translate::Create("wpt"));
return loc;
}
diff --git a/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx b/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx
index 3bfbe07dabc5..c234e5c2fd85 100644
--- a/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx
+++ b/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx
@@ -277,7 +277,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
@@ -298,6 +297,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/readwritemutexguard.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
diff --git a/xmlsecurity/inc/resourcemanager.hxx b/xmlsecurity/inc/resourcemanager.hxx
index cba9e7061f98..3516bcfa0db4 100644
--- a/xmlsecurity/inc/resourcemanager.hxx
+++ b/xmlsecurity/inc/resourcemanager.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_DIALOGS_RESOURCEMANAGER_HXX
#define INCLUDED_XMLSECURITY_SOURCE_DIALOGS_RESOURCEMANAGER_HXX
-#include <tools/resmgr.hxx>
+#include <unotools/resmgr.hxx>
#include <tools/datetime.hxx>
#include <com/sun/star/security/CertificateKind.hpp>
#include <com/sun/star/util/DateTime.hpp>
diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx
index 9296c02a89d4..4df58e9868d1 100644
--- a/xmlsecurity/source/dialogs/resourcemanager.cxx
+++ b/xmlsecurity/source/dialogs/resourcemanager.cxx
@@ -34,7 +34,7 @@ namespace XmlSec
{
const std::locale& GetResLocale()
{
- static const std::locale loc = Translate::Create("xsc", Application::GetSettings().GetUILanguageTag());
+ static const std::locale loc = Translate::Create("xsc");
return loc;
}