diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-06-22 13:27:08 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2018-06-26 11:58:47 +0200 |
commit | e9430571c41367625110cdcde168da178b8b30a9 (patch) | |
tree | 4fc083a81d97087aedfb2a2e0dbd7814a3875d39 /i18npool/inc/transliteration_OneToOne.hxx | |
parent | 364af18d7394c113dc8624c0c84de28c2747a927 (diff) |
remove the useOffset thread-unsafe hack from transliteration
And instead pass it as an argument to an implementation function.
Otherwise this is thread-unsafe for Calc's threaded calculation,
and transliteration is used in various places in Calc code.
Change-Id: Ibdf95e4b6867ec251618f6ff91e605acb69667c0
Reviewed-on: https://gerrit.libreoffice.org/56290
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'i18npool/inc/transliteration_OneToOne.hxx')
-rw-r--r-- | i18npool/inc/transliteration_OneToOne.hxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/i18npool/inc/transliteration_OneToOne.hxx b/i18npool/inc/transliteration_OneToOne.hxx index e87ef1ed93df..ae594e754377 100644 --- a/i18npool/inc/transliteration_OneToOne.hxx +++ b/i18npool/inc/transliteration_OneToOne.hxx @@ -29,8 +29,8 @@ typedef sal_Unicode (*TransFunc)(const sal_Unicode); class transliteration_OneToOne : public transliteration_commonclass { public: - OUString SAL_CALL - transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset ) override; + OUString + transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset ) override; sal_Unicode SAL_CALL transliterateChar2Char( sal_Unicode inChar) override; @@ -38,8 +38,8 @@ public: // Methods which are shared. sal_Int16 SAL_CALL getType() override; - OUString SAL_CALL - folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset) override; + OUString + foldingImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset ) override; sal_Bool SAL_CALL equals( const OUString& str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32& nMatch1, @@ -58,8 +58,8 @@ class name : public transliteration_OneToOne \ { \ public: \ name (); \ - OUString SAL_CALL \ - transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset ) \ + OUString \ + transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset ) \ override; \ sal_Unicode SAL_CALL \ transliterateChar2Char( sal_Unicode inChar) \ @@ -74,22 +74,22 @@ class halfwidthToFullwidth : public transliteration_OneToOne { public: halfwidthToFullwidth(); - OUString SAL_CALL - transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset ) override; + OUString + transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset ) override; }; class halfwidthKatakanaToFullwidthKatakana : public transliteration_OneToOne { public: halfwidthKatakanaToFullwidthKatakana(); - OUString SAL_CALL - transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset ) override; + OUString + transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset ) override; }; class halfwidthToFullwidthLikeJIS : public transliteration_OneToOne { public: halfwidthToFullwidthLikeJIS(); - OUString SAL_CALL - transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset ) override; + OUString + transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset ) override; }; #undef TRANSLITERATION_ONETOONE |