summaryrefslogtreecommitdiff
path: root/include/unotools/componentresmodule.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/unotools/componentresmodule.hxx')
-rw-r--r--include/unotools/componentresmodule.hxx42
1 files changed, 6 insertions, 36 deletions
diff --git a/include/unotools/componentresmodule.hxx b/include/unotools/componentresmodule.hxx
index e363f658bac2..127954d7dfb9 100644
--- a/include/unotools/componentresmodule.hxx
+++ b/include/unotools/componentresmodule.hxx
@@ -21,14 +21,10 @@
#include <comphelper/componentmodule.hxx>
#include <unotools/unotoolsdllapi.h>
-
-#include <tools/resid.hxx>
-
#include <osl/getglobalmutex.hxx>
-
#include <memory>
-class ResMgr;
+class LanguageTag;
namespace utl
{
@@ -49,30 +45,16 @@ namespace utl
::std::unique_ptr< OComponentResModuleImpl > m_pImpl;
public:
- OComponentResourceModule( const OString& _rResFilePrefix );
+ OComponentResourceModule(const OString& _rResFilePrefix, const LanguageTag& rLanguage);
virtual ~OComponentResourceModule() override;
- /// get the vcl res manager of the module
- ResMgr* getResManager();
-
- protected:
- // OModule overridables
- virtual void onLastClient() override;
- };
-
- //= ModuleRes
-
- /** specialized ResId, using the resource manager provided by a given OModule
- */
- class UNOTOOLS_DLLPUBLIC ModuleRes : public ::ResId
- {
- public:
- ModuleRes( sal_uInt16 _nId, OComponentResourceModule& _rModule ) : ResId( _nId, *_rModule.getResManager() ) { }
+ /// get the resource locale of the module
+ const std::locale& getResLocale();
};
//= defining a concrete module
-#define DEFINE_MODULE( ModuleClass, ClientClass, ResClass ) \
+#define DEFINE_MODULE( ModuleClass, ClientClass ) \
/* -------------------------------------------------------------------- */ \
class ModuleClass : public ::utl::OComponentResourceModule \
{ \
@@ -99,18 +81,6 @@ namespace utl
}; \
\
/* -------------------------------------------------------------------- */ \
- class ResClass : public ::utl::ModuleRes \
- { \
- private: \
- typedef ::utl::ModuleRes BaseClass; \
- \
- public: \
- ResClass( sal_uInt16 _nId ) : BaseClass( _nId, ModuleClass::getInstance() ) \
- { \
- } \
- }; \
- \
- /* -------------------------------------------------------------------- */ \
template < class TYPE > \
class OAutoRegistration : public ::comphelper::OAutoRegistration< TYPE > \
{ \
@@ -143,7 +113,7 @@ namespace utl
}; \
\
ModuleClass::ModuleClass() \
- :BaseClass( OString( resprefix ) ) \
+ :BaseClass( OString( resprefix ), Application::GetSettings().GetUILanguageTag() ) \
{ \
} \
\