23 #include <svx/strings.hrc>
30 #include <osl/diagnose.h>
31 #include <fmstring.hrc>
106 OSL_FAIL(
"OSystemParseContext::getIntlKeywordAscii: illegal argument!" );
110 OSL_ENSURE( nIndex <
m_aLocalizedKeywords.size(),
"OSystemParseContext::getIntlKeywordAscii: invalid index!" );
121 static const IParseContext::InternationalKeyCode Intl_TokenID[] =
133 for (sal_uInt32
i = 0;
i < nCount;
i++)
136 if (rToken.equalsIgnoreAsciiCase(aKey))
137 return Intl_TokenID[i];
147 std::mutex& getSafetyMutex()
149 static ::std::mutex s_aSafety;
158 if ( _pContext && !s_pSharedContext )
160 s_pSharedContext = _pContext;
161 return s_pSharedContext;
166 s_pSharedContext = _pContext;
169 return s_pSharedContext;
176 std::scoped_lock aGuard( getSafetyMutex() );
178 if ( 1 == s_nCounter )
187 std::scoped_lock aGuard( getSafetyMutex() );
189 if ( 0 == s_nCounter )
190 delete getSharedContext(
nullptr,
true);
195 return getSharedContext(
nullptr,
false);
virtual SVXCORE_DLLPUBLIC ~OSystemParseContext()
virtual OUString getErrorMessage(ErrorCode _eCodes) const override
::std::vector< OUString > m_aLocalizedKeywords
const OSystemParseContext * getParseContext() const
SVXCORE_DLLPUBLIC OSystemParseContext()
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
OUString SvxResId(TranslateId aId)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
#define SAL_N_ELEMENTS(arr)
virtual OString getIntlKeywordAscii(InternationalKeyCode _eKey) const override
virtual InternationalKeyCode getIntlKeyCode(const OString &rToken) const override
const LanguageTag & GetLanguageTag() const
virtual SVXCORE_DLLPUBLIC css::lang::Locale getPreferredLocale() const override
gets a locale instance which should be used when parsing in the context specified by this instance ...
virtual ~OParseContextClient()