summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/basic/basrdll.hxx2
-rw-r--r--include/basic/sbdef.hxx2
-rw-r--r--include/formula/formula.hxx3
-rw-r--r--include/formula/omoduleclient.hxx44
-rw-r--r--include/sfx2/sfxresid.hxx6
-rw-r--r--include/svl/svlresid.hxx21
-rw-r--r--include/svtools/ehdl.hxx13
-rw-r--r--include/svtools/svtresid.hxx10
8 files changed, 33 insertions, 68 deletions
diff --git a/include/basic/basrdll.hxx b/include/basic/basrdll.hxx
index 6c2fc4655122..e4e97ae65dbc 100644
--- a/include/basic/basrdll.hxx
+++ b/include/basic/basrdll.hxx
@@ -33,8 +33,6 @@ public:
BasicDLL();
~BasicDLL();
- const std::locale& GetBasResLocale() const;
-
static void BasicBreak();
static void EnableBreak( bool bEnable );
diff --git a/include/basic/sbdef.hxx b/include/basic/sbdef.hxx
index 8df50e07678a..80513323f308 100644
--- a/include/basic/sbdef.hxx
+++ b/include/basic/sbdef.hxx
@@ -69,6 +69,8 @@ enum class PropertyMode
};
BASIC_DLLPUBLIC const ErrMsgCode* getRID_BASIC_START();
+BASIC_DLLPUBLIC const std::locale& BasResLocale();
+BASIC_DLLPUBLIC OUString BasResId(const char* pId);
#endif
diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx
index 199056ea7b99..82e8246bc9b0 100644
--- a/include/formula/formula.hxx
+++ b/include/formula/formula.hxx
@@ -24,7 +24,6 @@
#include <utility>
#include <formula/formuladllapi.h>
-#include <formula/omoduleclient.hxx>
#include <formula/IFunctionDescription.hxx>
#include <rtl/ustring.hxx>
#include <sal/types.h>
@@ -88,7 +87,7 @@ protected:
};
class FORMULA_DLLPUBLIC FormulaDlg:
- private OModuleClient, public SfxModelessDialog, public IFormulaEditorHelper
+ public SfxModelessDialog, public IFormulaEditorHelper
{
friend class FormulaDlg_Impl;
public:
diff --git a/include/formula/omoduleclient.hxx b/include/formula/omoduleclient.hxx
deleted file mode 100644
index 3af3399bed8d..000000000000
--- a/include/formula/omoduleclient.hxx
+++ /dev/null
@@ -1,44 +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_FORMULA_OMODULECLIENT_HXX
-#define INCLUDED_FORMULA_OMODULECLIENT_HXX
-
-#include <sal/config.h>
-
-#include <formula/formuladllapi.h>
-
-namespace formula {
-
-/** Base class for objects which use any global module-specific resources.
-*/
-class FORMULA_DLLPUBLIC OModuleClient
-{
- OModuleClient(const OModuleClient&) = delete;
- OModuleClient& operator=( const OModuleClient& ) = delete;
-public:
- OModuleClient();
- ~OModuleClient();
-};
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/sfxresid.hxx b/include/sfx2/sfxresid.hxx
index b7b7f553c4ef..5557f652c57b 100644
--- a/include/sfx2/sfxresid.hxx
+++ b/include/sfx2/sfxresid.hxx
@@ -23,12 +23,6 @@
#include <rtl/ustring.hxx>
#include <locale>
-struct SFX2_DLLPUBLIC SfxResLocale
-{
- static std::locale* GetResLocale();
- static void DeleteResLocale();
-};
-
SFX2_DLLPUBLIC OUString SfxResId(const char* pId);
#endif
diff --git a/include/svl/svlresid.hxx b/include/svl/svlresid.hxx
new file mode 100644
index 000000000000..bc62e3cb7241
--- /dev/null
+++ b/include/svl/svlresid.hxx
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SVL_SVTRESID_HXX
+#define INCLUDED_SVL_SVTRESID_HXX
+
+#include <svl/svldllapi.h>
+#include <rtl/ustring.hxx>
+#include <locale>
+
+SVL_DLLPUBLIC OUString SvlResId(const char* pId);
+
+#endif // INCLUDED_SVL_SVTRESID_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svtools/ehdl.hxx b/include/svtools/ehdl.hxx
index b858f2b31d37..102bf115d4ab 100644
--- a/include/svtools/ehdl.hxx
+++ b/include/svtools/ehdl.hxx
@@ -22,7 +22,7 @@
#include <memory>
#include <svtools/svtdllapi.h>
-
+#include <svtools/svtresid.hxx>
#include <vcl/errinf.hxx>
typedef std::pair<const char*, ErrCode> ErrMsgCode;
@@ -36,23 +36,23 @@ class SVT_DLLPUBLIC SfxErrorContext : private ErrorContext
public:
SfxErrorContext(
sal_uInt16 nCtxIdP, vcl::Window *pWin=nullptr,
- const ErrMsgCode* pIds = nullptr, const std::locale* pResLocaleP = nullptr);
+ const ErrMsgCode* pIds = nullptr, const std::locale& rResLocaleP = SvtResLocale());
SfxErrorContext(
sal_uInt16 nCtxIdP, const OUString &aArg1, vcl::Window *pWin=nullptr,
- const ErrMsgCode* pIds = nullptr, const std::locale* pResLocaleP = nullptr);
+ const ErrMsgCode* pIds = nullptr, const std::locale& rResLocaleP = SvtResLocale());
bool GetString(ErrCode nErrId, OUString &rStr) override;
private:
sal_uInt16 nCtxId;
const ErrMsgCode* pIds;
- const std::locale *pResLocale;
+ const std::locale& rResLocale;
OUString aArg1;
};
class SVT_DLLPUBLIC SfxErrorHandler : private ErrorHandler
{
public:
- SfxErrorHandler(const ErrMsgCode* pIds, ErrCode lStart, ErrCode lEnd, const std::locale* pResLocale = nullptr);
+ SfxErrorHandler(const ErrMsgCode* pIds, ErrCode lStart, ErrCode lEnd, const std::locale& rResLocale = SvtResLocale());
virtual ~SfxErrorHandler() override;
protected:
@@ -63,8 +63,7 @@ private:
ErrCode lStart;
ErrCode lEnd;
const ErrMsgCode* pIds;
- const std::locale* pResLocale;
- std::unique_ptr<std::locale> xFreeLocale;
+ const std::locale& rResLocale;
SVT_DLLPRIVATE static void GetClassString(sal_uLong lErrId, OUString &);
virtual bool CreateString(const ErrorInfo *, OUString &) const override;
diff --git a/include/svtools/svtresid.hxx b/include/svtools/svtresid.hxx
index 8f6cfc8b43f0..cae5861a4df9 100644
--- a/include/svtools/svtresid.hxx
+++ b/include/svtools/svtresid.hxx
@@ -21,14 +21,10 @@
#define INCLUDED_SVTOOLS_SVTRESID_HXX
#include <svtools/svtdllapi.h>
-#include <com/sun/star/lang/Locale.hpp>
-
-struct SVT_DLLPUBLIC SvtResLocale
-{
- static std::locale* GetResLocale();
- static void DeleteResLocale();
-};
+#include <rtl/ustring.hxx>
+#include <locale>
+SVT_DLLPUBLIC const std::locale& SvtResLocale();
SVT_DLLPUBLIC OUString SvtResId(const char* pId);
#endif // INCLUDED_SVTOOLS_SVTRESID_HXX