summaryrefslogtreecommitdiff
path: root/sw/source/core/text
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-07 23:50:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-08 12:02:37 +0000
commit5b395625901b1f9c2314a0b9a13f4876a3ae17ce (patch)
tree42f91df0ee35f2a55bac7da11442a4273c32b445 /sw/source/core/text
parent14c4c26cea838b3fffb0b17ba440c29a6066fad1 (diff)
de-uno-ize ScriptTypeDetector
leave a UnoScriptTypeDetector implementation that points to the trivial ScriptTypeDetector for external consumers, e.g. sdext
Diffstat (limited to 'sw/source/core/text')
-rw-r--r--sw/source/core/text/porlay.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index ac773c5758a1..7f0e3874d01b 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -64,7 +64,8 @@ using namespace ::com::sun::star;
using namespace i18n::ScriptType;
#include <unicode/ubidi.h>
-#include <i18nutil/unicode.hxx> //unicode::getUnicodeScriptType
+#include <i18nutil/scripttypedetector.hxx>
+#include <i18nutil/unicode.hxx>
#define IS_JOINING_GROUP(c, g) ( u_getIntPropertyValue( (c), UCHAR_JOINING_GROUP ) == U_JG_##g )
#define isAinChar(c) IS_JOINING_GROUP((c), AIN)
@@ -904,16 +905,16 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// #i28203#
// for 'complex' portions, we make sure that a portion does not contain more
// than one script:
- if( i18n::ScriptType::COMPLEX == nScript && pBreakIt->GetScriptTypeDetector().is() )
+ if( i18n::ScriptType::COMPLEX == nScript )
{
- const short nScriptType = pBreakIt->GetScriptTypeDetector()->getCTLScriptType( rTxt, nSearchStt );
+ const short nScriptType = ScriptTypeDetector::getCTLScriptType( rTxt, nSearchStt );
xub_StrLen nNextCTLScriptStart = nSearchStt;
short nCurrentScriptType = nScriptType;
while( com::sun::star::i18n::CTLScriptType::CTL_UNKNOWN == nCurrentScriptType || nScriptType == nCurrentScriptType )
{
- nNextCTLScriptStart = (xub_StrLen)pBreakIt->GetScriptTypeDetector()->endOfCTLScriptType( rTxt, nNextCTLScriptStart );
+ nNextCTLScriptStart = (xub_StrLen)ScriptTypeDetector::endOfCTLScriptType( rTxt, nNextCTLScriptStart );
if( nNextCTLScriptStart < rTxt.Len() && nNextCTLScriptStart < nChg )
- nCurrentScriptType = pBreakIt->GetScriptTypeDetector()->getCTLScriptType( rTxt, nNextCTLScriptStart );
+ nCurrentScriptType = ScriptTypeDetector::getCTLScriptType( rTxt, nNextCTLScriptStart );
else
break;
}