diff options
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/classes/sb.cxx | 1 | ||||
-rw-r--r-- | basic/source/runtime/basrdll.cxx | 9 | ||||
-rw-r--r-- | basic/source/sbx/sbxscan.cxx | 27 |
3 files changed, 13 insertions, 24 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 45b85dc6b83a..b810eb0c87ce 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -35,7 +35,6 @@ #include "stdobj.hxx" #include "filefmt.hxx" #include "basic.hrc" -#include <basrid.hxx> #include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/util/XCloseBroadcaster.hpp> diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index da830b4e9e6c..a8fadaa5a1af 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -35,13 +35,11 @@ struct BasicDLL::Impl bool bDebugMode; bool bBreakEnabled; - std::locale aBasResLocale; std::unique_ptr<SbxAppData> xSbxAppData; Impl() : bDebugMode(false) , bBreakEnabled(true) - , aBasResLocale(Translate::Create("sb")) , xSbxAppData(new SbxAppData) { } }; @@ -52,11 +50,6 @@ BasicDLL * BASIC_DLL; } -OUString BasResId(const char* pId) -{ - return Translate::get(pId, BASIC_DLL->GetBasResLocale()); -} - BasicDLL::BasicDLL() : m_xImpl(new Impl) { @@ -67,8 +60,6 @@ BasicDLL::~BasicDLL() { } -const std::locale& BasicDLL::GetBasResLocale() const { return m_xImpl->aBasResLocale; } - void BasicDLL::EnableBreak( bool bEnable ) { BasicDLL* pThis = BASIC_DLL; diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index a2cb4f871621..59b1c7b61e29 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -579,21 +579,20 @@ bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen ) } } - -namespace -{ - -const std::locale& implGetResLocale() +const std::locale& BasResLocale() { static std::locale loc(Translate::Create("sb")); return loc; } -OUString SbxValueFormatResId(const char *pId) +OUString BasResId(const char *pId) { - return Translate::get(pId, implGetResLocale()); + return Translate::get(pId, BasResLocale()); } +namespace +{ + enum class VbaFormatType { Offset, // standard number format @@ -820,13 +819,13 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const // initialize the Basic-formater help object: // get resources for predefined output // of the Format()-command, e. g. for "On/Off" - OUString aOnStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_ON); - OUString aOffStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_OFF); - OUString aYesStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_YES); - OUString aNoStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_NO); - OUString aTrueStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_TRUE); - OUString aFalseStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_FALSE); - OUString aCurrencyFormatStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_CURRENCY); + OUString aOnStrg = BasResId(STR_BASICKEY_FORMAT_ON); + OUString aOffStrg = BasResId(STR_BASICKEY_FORMAT_OFF); + OUString aYesStrg = BasResId(STR_BASICKEY_FORMAT_YES); + OUString aNoStrg = BasResId(STR_BASICKEY_FORMAT_NO); + OUString aTrueStrg = BasResId(STR_BASICKEY_FORMAT_TRUE); + OUString aFalseStrg = BasResId(STR_BASICKEY_FORMAT_FALSE); + OUString aCurrencyFormatStrg = BasResId(STR_BASICKEY_FORMAT_CURRENCY); rAppData.pBasicFormater = o3tl::make_unique<SbxBasicFormater>( cComma,c1000,aOnStrg,aOffStrg, |