summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-04-19 10:34:21 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-04-19 10:38:24 +0200
commit0fdd75805101ef387f00cbc203eb748e3354da58 (patch)
treeaf4a7a2426a41c7a6e5a1be7ad00af970aa0d846 /sw
parent3ce89a2149d3495ff63827b39c33a79cb9abacab (diff)
sw: missing prefix for global pBreakIt
Change-Id: I7fa8e697537ce8eb915da00920bf6882603b115a
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/breakit.hxx2
-rw-r--r--sw/source/core/access/accpara.cxx24
-rw-r--r--sw/source/core/access/accportions.cxx10
-rw-r--r--sw/source/core/bastyp/breakit.cxx8
-rw-r--r--sw/source/core/bastyp/init.cxx4
-rw-r--r--sw/source/core/crsr/callnk.cxx6
-rw-r--r--sw/source/core/crsr/findtxt.cxx6
-rw-r--r--sw/source/core/crsr/swcrsr.cxx80
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/doc/docedt.cxx6
-rw-r--r--sw/source/core/doc/docfmt.cxx12
-rw-r--r--sw/source/core/doc/docruby.cxx10
-rw-r--r--sw/source/core/doc/doctxm.cxx4
-rw-r--r--sw/source/core/docnode/node.cxx12
-rw-r--r--sw/source/core/edit/edattr.cxx14
-rw-r--r--sw/source/core/fields/expfld.cxx2
-rw-r--r--sw/source/core/text/guess.cxx14
-rw-r--r--sw/source/core/text/inftxt.cxx2
-rw-r--r--sw/source/core/text/itratr.cxx12
-rw-r--r--sw/source/core/text/porfld.cxx14
-rw-r--r--sw/source/core/text/porlay.cxx20
-rw-r--r--sw/source/core/text/portxt.cxx10
-rw-r--r--sw/source/core/text/redlnitr.cxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx8
-rw-r--r--sw/source/core/text/txthyph.cxx8
-rw-r--r--sw/source/core/txtnode/fntcache.cxx12
-rw-r--r--sw/source/core/txtnode/fntcap.cxx18
-rw-r--r--sw/source/core/txtnode/thints.cxx2
-rw-r--r--sw/source/core/txtnode/txatritr.cxx22
-rw-r--r--sw/source/core/txtnode/txtedt.cxx116
-rw-r--r--sw/source/filter/ascii/parasc.cxx4
-rw-r--r--sw/source/filter/html/htmlatr.cxx4
-rw-r--r--sw/source/filter/html/htmlfldw.cxx8
-rw-r--r--sw/source/filter/html/swhtml.cxx16
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx10
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx16
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx4
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx4
-rw-r--r--sw/source/ui/shells/annotsh.cxx2
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx2
-rw-r--r--sw/source/ui/shells/textsh.cxx2
44 files changed, 275 insertions, 275 deletions
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
index ff3d86d71948..0776ae648cb2 100644
--- a/sw/inc/breakit.hxx
+++ b/sw/inc/breakit.hxx
@@ -127,7 +127,7 @@ public:
#define SW_BREAKITER() SwBreakIt::Get()
// @@@ backward compatibility @@@
-SW_DLLPUBLIC extern SwBreakIt* pBreakIt;
+SW_DLLPUBLIC extern SwBreakIt* g_pBreakIt;
#endif
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 1efdd525f887..5dba314cf271 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -623,13 +623,13 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
sal_Bool bRet = sal_False;
// now ask the Break-Iterator for the word
- OSL_ENSURE( pBreakIt != NULL, "We always need a break." );
- OSL_ENSURE( pBreakIt->GetBreakIter().is(), "No break-iterator." );
- if( pBreakIt->GetBreakIter().is() )
+ OSL_ENSURE( g_pBreakIt != NULL, "We always need a break." );
+ OSL_ENSURE( g_pBreakIt->GetBreakIter().is(), "No break-iterator." );
+ if( g_pBreakIt->GetBreakIter().is() )
{
// get locale for this position
sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos );
- lang::Locale aLocale = pBreakIt->GetLocale(
+ lang::Locale aLocale = g_pBreakIt->GetLocale(
GetTxtNode()->GetLang( nModelPos ) );
// which type of word are we interested in?
@@ -637,7 +637,7 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
const sal_uInt16 nWordType = i18n::WordType::ANY_WORD;
// get word boundary, as the Break-Iterator sees fit.
- rBound = pBreakIt->GetBreakIter()->getWordBoundary(
+ rBound = g_pBreakIt->GetBreakIter()->getWordBoundary(
rText, nPos, aLocale, nWordType, sal_True );
// It's a word if the first character is an alpha-numeric character.
@@ -703,21 +703,21 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
// ask the Break-Iterator for the glyph by moving one cell
// forward, and then one cell back
- OSL_ENSURE( pBreakIt != NULL, "We always need a break." );
- OSL_ENSURE( pBreakIt->GetBreakIter().is(), "No break-iterator." );
- if( pBreakIt->GetBreakIter().is() )
+ OSL_ENSURE( g_pBreakIt != NULL, "We always need a break." );
+ OSL_ENSURE( g_pBreakIt->GetBreakIter().is(), "No break-iterator." );
+ if( g_pBreakIt->GetBreakIter().is() )
{
// get locale for this position
sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos );
- lang::Locale aLocale = pBreakIt->GetLocale(
+ lang::Locale aLocale = g_pBreakIt->GetLocale(
GetTxtNode()->GetLang( nModelPos ) );
// get word boundary, as the Break-Iterator sees fit.
const sal_uInt16 nIterMode = i18n::CharacterIteratorMode::SKIPCELL;
sal_Int32 nDone = 0;
- rBound.endPos = pBreakIt->GetBreakIter()->nextCharacters(
+ rBound.endPos = g_pBreakIt->GetBreakIter()->nextCharacters(
rText, nPos, aLocale, nIterMode, 1, nDone );
- rBound.startPos = pBreakIt->GetBreakIter()->previousCharacters(
+ rBound.startPos = g_pBreakIt->GetBreakIter()->previousCharacters(
rText, rBound.endPos, aLocale, nIterMode, 1, nDone );
bRet = ((rBound.startPos <= nPos) && (nPos <= rBound.endPos));
OSL_ENSURE( rBound.startPos <= nPos, "start pos too high" );
@@ -815,7 +815,7 @@ lang::Locale SAL_CALL SwAccessibleParagraph::getLocale (void)
}
const SwTxtNode *pTxtNd = pTxtFrm->GetTxtNode();
- lang::Locale aLoc( pBreakIt->GetLocale( pTxtNd->GetLang( 0 ) ) );
+ lang::Locale aLoc( g_pBreakIt->GetLocale( pTxtNd->GetLang( 0 ) ) );
return aLoc;
}
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index ecda713ac17f..590d03cf11b6 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -457,9 +457,9 @@ void SwAccessiblePortionData::GetSentenceBoundary(
if( pSentences == NULL )
{
- OSL_ENSURE( pBreakIt != NULL, "We always need a break." );
- OSL_ENSURE( pBreakIt->GetBreakIter().is(), "No break-iterator." );
- if( pBreakIt->GetBreakIter().is() )
+ OSL_ENSURE( g_pBreakIt != NULL, "We always need a break." );
+ OSL_ENSURE( g_pBreakIt->GetBreakIter().is(), "No break-iterator." );
+ if( g_pBreakIt->GetBreakIter().is() )
{
pSentences = new Positions_t();
pSentences->reserve(10);
@@ -474,9 +474,9 @@ void SwAccessiblePortionData::GetSentenceBoundary(
sal_uInt16 nModelPos = GetModelPosition( nCurrent );
- sal_Int32 nNew = pBreakIt->GetBreakIter()->endOfSentence(
+ sal_Int32 nNew = g_pBreakIt->GetBreakIter()->endOfSentence(
sAccessibleString, nCurrent,
- pBreakIt->GetLocale(pTxtNode->GetLang(nModelPos)) ) + 1;
+ g_pBreakIt->GetLocale(pTxtNode->GetLang(nModelPos)) ) + 1;
if( (nNew < 0) && (nNew > nLength) )
nNew = nLength;
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index 4dc6242326f5..b4caeb35249b 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -32,21 +32,21 @@
using namespace com::sun::star;
-SwBreakIt* pBreakIt = 0;
+SwBreakIt* g_pBreakIt = 0;
void SwBreakIt::_Create( const uno::Reference<uno::XComponentContext> & rxContext )
{
- delete pBreakIt, pBreakIt = new SwBreakIt( rxContext );
+ delete g_pBreakIt, g_pBreakIt = new SwBreakIt( rxContext );
}
void SwBreakIt::_Delete()
{
- delete pBreakIt, pBreakIt = 0;
+ delete g_pBreakIt, g_pBreakIt = 0;
}
SwBreakIt * SwBreakIt::Get()
{
- return pBreakIt;
+ return g_pBreakIt;
}
SwBreakIt::SwBreakIt( const uno::Reference<uno::XComponentContext> & rxContext )
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index c8ab4d8a043d..e69e57f3b151 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -833,7 +833,7 @@ CollatorWrapper& GetAppCollator()
{
if( !pCollator )
{
- const lang::Locale& rLcl = pBreakIt->GetLocale( GetAppLanguage() );
+ const lang::Locale& rLcl = g_pBreakIt->GetLocale( GetAppLanguage() );
pCollator = new CollatorWrapper( ::comphelper::getProcessComponentContext() );
pCollator->loadDefaultCollator( rLcl, SW_COLLATOR_IGNORES );
@@ -844,7 +844,7 @@ CollatorWrapper& GetAppCaseCollator()
{
if( !pCaseCollator )
{
- const lang::Locale& rLcl = pBreakIt->GetLocale( GetAppLanguage() );
+ const lang::Locale& rLcl = g_pBreakIt->GetLocale( GetAppLanguage() );
pCaseCollator = new CollatorWrapper( ::comphelper::getProcessComponentContext() );
pCaseCollator->loadDefaultCollator( rLcl, 0 );
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 536a22ea3d04..bc18dd14ca3a 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -201,12 +201,12 @@ SwCallLink::~SwCallLink()
}
}
- if( pBreakIt->GetBreakIter().is() )
+ if( g_pBreakIt->GetBreakIter().is() )
{
const String& rTxt = ((SwTxtNode*)pCNd)->GetTxt();
if( !nCmp ||
- pBreakIt->GetBreakIter()->getScriptType( rTxt, nCmp )
- != pBreakIt->GetBreakIter()->getScriptType( rTxt, nCmp - 1 ))
+ g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nCmp )
+ != g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nCmp - 1 ))
{
rShell.CallChgLnk();
return;
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 537292e83a50..8ebcd45d7622 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -443,10 +443,10 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
sal_uInt16 nCurrScript = 0;
if ( SearchAlgorithms_APPROXIMATE == rSearchOpt.algorithmType &&
- pBreakIt->GetBreakIter().is() )
+ g_pBreakIt->GetBreakIter().is() )
{
pScriptIter = new SwScriptIterator( sCleanStr, nStart, bSrchForward );
- nSearchScript = pBreakIt->GetRealScriptOfText( rSearchOpt.searchString, 0 );
+ nSearchScript = g_pBreakIt->GetRealScriptOfText( rSearchOpt.searchString, 0 );
}
xub_StrLen nStringEnd = nEnd;
@@ -471,7 +471,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
if ( eCurrLang != eLastLang )
{
const lang::Locale aLocale(
- pBreakIt->GetLocale( eCurrLang ) );
+ g_pBreakIt->GetLocale( eCurrLang ) );
rSTxt.SetLocale( rSearchOpt, aLocale );
eLastLang = eCurrLang;
}
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 0ee9974d0365..e6fb6e431519 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1144,12 +1144,12 @@ sal_Bool SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
{
sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- bRet = pBreakIt->GetBreakIter()->isBeginWord(
+ bRet = g_pBreakIt->GetBreakIter()->isBeginWord(
pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos )),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos )),
nWordType );
}
return bRet;
@@ -1159,12 +1159,12 @@ sal_Bool SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
{
sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- bRet = pBreakIt->GetBreakIter()->isEndWord(
+ bRet = g_pBreakIt->GetBreakIter()->isEndWord(
pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType );
}
@@ -1175,12 +1175,12 @@ sal_Bool SwCursor::IsInWordWT( sal_Int16 nWordType ) const
{
sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- Boundary aBoundary = pBreakIt->GetBreakIter()->getWordBoundary(
+ Boundary aBoundary = g_pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
sal_True );
@@ -1217,13 +1217,13 @@ sal_Bool SwCursor::GoStartWordWT( sal_Int16 nWordType )
{
sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->getWordBoundary(
+ nPtPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
sal_False ).startPos;
@@ -1241,13 +1241,13 @@ sal_Bool SwCursor::GoEndWordWT( sal_Int16 nWordType )
{
sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->getWordBoundary(
+ nPtPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
sal_True ).endPos;
@@ -1266,14 +1266,14 @@ sal_Bool SwCursor::GoNextWordWT( sal_Int16 nWordType )
{
sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->nextWord(
+ nPtPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->nextWord(
pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
nWordType ).startPos;
if (nPtPos < pTxtNd->GetTxt().getLength())
@@ -1290,7 +1290,7 @@ sal_Bool SwCursor::GoPrevWordWT( sal_Int16 nWordType )
{
sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
@@ -1298,9 +1298,9 @@ sal_Bool SwCursor::GoPrevWordWT( sal_Int16 nWordType )
if( nPtPos )
--nPtPos;
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->previousWord(
+ nPtPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->previousWord(
pTxtNd->GetTxt(), nPtStart,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
nWordType ).startPos;
if (nPtPos < pTxtNd->GetTxt().getLength())
@@ -1329,7 +1329,7 @@ sal_Bool SwCursor::SelectWordWT( ViewShell* pViewShell, sal_Int16 nWordType, con
} //swmod 071107 //swmod 071225
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
// Should we select the whole fieldmark?
const IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( );
@@ -1355,9 +1355,9 @@ sal_Bool SwCursor::SelectWordWT( ViewShell* pViewShell, sal_Int16 nWordType, con
else
{
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- Boundary aBndry( pBreakIt->GetBreakIter()->getWordBoundary(
+ Boundary aBndry( g_pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
bForward ));
@@ -1421,7 +1421,7 @@ sal_Bool SwCursor::GoSentence( SentenceMoveType eMoveType )
{
sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
String sNodeText( lcl_MaskDeletedRedlines( pTxtNd ) );
@@ -1430,22 +1430,22 @@ sal_Bool SwCursor::GoSentence( SentenceMoveType eMoveType )
switch ( eMoveType )
{
case START_SENT: /* when modifying: see also ExpandToSentenceBorders below! */
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
+ nPtPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
- nPtPos, pBreakIt->GetLocale(
+ nPtPos, g_pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
break;
case END_SENT: /* when modifying: see also ExpandToSentenceBorders below! */
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence(
+ nPtPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfSentence(
sNodeText,
- nPtPos, pBreakIt->GetLocale(
+ nPtPos, g_pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
break;
case NEXT_SENT:
{
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence(
+ nPtPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfSentence(
sNodeText,
- nPtPos, pBreakIt->GetLocale(
+ nPtPos, g_pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
while (nPtPos != (sal_uInt16) -1 && ++nPtPos < sNodeText.Len()
&& sNodeText.GetChar(nPtPos)== ' ' /*isWhiteSpace( aTxt.GetChar(nPtPos)*/ )
@@ -1453,16 +1453,16 @@ sal_Bool SwCursor::GoSentence( SentenceMoveType eMoveType )
break;
}
case PREV_SENT:
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
+ nPtPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
- nPtPos, pBreakIt->GetLocale(
+ nPtPos, g_pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
if (nPtPos == 0)
return sal_False; // the previous sentence is not in this paragraph
if (nPtPos > 0)
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
+ nPtPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
- nPtPos - 1, pBreakIt->GetLocale(
+ nPtPos - 1, g_pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
break;
}
@@ -1485,7 +1485,7 @@ sal_Bool SwCursor::ExpandToSentenceBorders()
sal_Bool bRes = sal_False;
const SwTxtNode* pStartNd = Start()->nNode.GetNode().GetTxtNode();
const SwTxtNode* pEndNd = End()->nNode.GetNode().GetTxtNode();
- if (pStartNd && pEndNd && pBreakIt->GetBreakIter().is())
+ if (pStartNd && pEndNd && g_pBreakIt->GetBreakIter().is())
{
if (!HasMark())
SetMark();
@@ -1497,12 +1497,12 @@ sal_Bool SwCursor::ExpandToSentenceBorders()
xub_StrLen nStartPos = Start()->nContent.GetIndex();
xub_StrLen nEndPos = End()->nContent.GetIndex();
- nStartPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
+ nStartPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->beginOfSentence(
sStartText, nStartPos,
- pBreakIt->GetLocale( pStartNd->GetLang( nStartPos ) ) );
- nEndPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence(
+ g_pBreakIt->GetLocale( pStartNd->GetLang( nStartPos ) ) );
+ nEndPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfSentence(
sEndText, nEndPos,
- pBreakIt->GetLocale( pEndNd->GetLang( nEndPos ) ) );
+ g_pBreakIt->GetLocale( pEndNd->GetLang( nEndPos ) ) );
// it is allowed to place the PaM just behind the last
// character in the text thus <= ...Len
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 1ec553dd4650..c8e6c90f3413 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -412,8 +412,8 @@ const i18n::ForbiddenCharacters*
const i18n::ForbiddenCharacters* pRet = 0;
if( mxForbiddenCharsTable.is() )
pRet = mxForbiddenCharsTable->GetForbiddenCharacters( nLang, sal_False );
- if( bLocaleData && !pRet && pBreakIt )
- pRet = &pBreakIt->GetForbidden( (LanguageType)nLang );
+ if( bLocaleData && !pRet && g_pBreakIt )
+ pRet = &g_pBreakIt->GetForbidden( (LanguageType)nLang );
return pRet;
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 39d895d5b0f8..883332327f14 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -2635,10 +2635,10 @@ void SwDoc::TransliterateText(
// set current word as 'area of effect'
Boundary aBndry;
- if( pBreakIt->GetBreakIter().is() )
- aBndry = pBreakIt->GetBreakIter()->getWordBoundary(
+ if( g_pBreakIt->GetBreakIter().is() )
+ aBndry = g_pBreakIt->GetBreakIter()->getWordBoundary(
pTNd->GetTxt(), nSttCnt,
- pBreakIt->GetLocale( pTNd->GetLang( nSttCnt ) ),
+ g_pBreakIt->GetLocale( pTNd->GetLang( nSttCnt ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
sal_True );
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 0eeee942ce37..332c44a9ce08 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -349,10 +349,10 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
else
{
Boundary aBndry;
- if( pBreakIt->GetBreakIter().is() )
- aBndry = pBreakIt->GetBreakIter()->getWordBoundary(
+ if( g_pBreakIt->GetBreakIter().is() )
+ aBndry = g_pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
sal_True );
@@ -796,10 +796,10 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
else
{
Boundary aBndry;
- if( pBreakIt->GetBreakIter().is() )
- aBndry = pBreakIt->GetBreakIter()->getWordBoundary(
+ if( g_pBreakIt->GetBreakIter().is() )
+ aBndry = g_pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
sal_True );
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 0a5e70356cbc..10fdd14a421e 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -231,9 +231,9 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
if( !bHasMark && nStart && ( !pAttr || nStart != *pAttr->GetStart()) )
{
// skip to the word begin!
- long nWordStt = pBreakIt->GetBreakIter()->getWordBoundary(
+ long nWordStt = g_pBreakIt->GetBreakIter()->getWordBoundary(
rTxt, nStart,
- pBreakIt->GetLocale( pTNd->GetLang( nStart )),
+ g_pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
sal_True ).startPos;
if( nWordStt < nStart && -1 != nWordStt )
@@ -299,12 +299,12 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
{
rPam.SetMark();
bAlphaNum = bIsAlphaNum;
- if( bChkNxtWrd && pBreakIt->GetBreakIter().is() )
+ if( bChkNxtWrd && g_pBreakIt->GetBreakIter().is() )
{
// search the end of this word
- nWordEnd = pBreakIt->GetBreakIter()->getWordBoundary(
+ nWordEnd = g_pBreakIt->GetBreakIter()->getWordBoundary(
rTxt, nStart,
- pBreakIt->GetLocale( pTNd->GetLang( nStart )),
+ g_pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
sal_True ).endPos;
if( 0 > nWordEnd || nWordEnd > nEnd || nWordEnd == nStart )
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index b5379c38052d..dd710f5e8617 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1138,9 +1138,9 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
{
// index entry mark
lang::Locale aLocale;
- if ( pBreakIt->GetBreakIter().is() )
+ if ( g_pBreakIt->GetBreakIter().is() )
{
- aLocale = pBreakIt->GetLocale(
+ aLocale = g_pBreakIt->GetLocale(
pTOXSrc->GetLang( *pTxtMark->GetStart() ) );
}
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index e126cde1d193..b6f27f068fca 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1131,14 +1131,14 @@ sal_Bool SwCntntNode::GoNext(SwIndex * pIdx, sal_uInt16 nMode ) const
{
const SwTxtNode& rTNd = *GetTxtNode();
xub_StrLen nPos = pIdx->GetIndex();
- if( pBreakIt->GetBreakIter().is() )
+ if( g_pBreakIt->GetBreakIter().is() )
{
sal_Int32 nDone = 0;
sal_uInt16 nItrMode = ( CRSR_SKIP_CELLS & nMode ) ?
CharacterIteratorMode::SKIPCELL :
CharacterIteratorMode::SKIPCONTROLCHARACTER;
- nPos = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharacters( rTNd.GetTxt(), nPos,
- pBreakIt->GetLocale( rTNd.GetLang( nPos ) ),
+ nPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->nextCharacters( rTNd.GetTxt(), nPos,
+ g_pBreakIt->GetLocale( rTNd.GetLang( nPos ) ),
nItrMode, 1, nDone );
// Check if nPos is inside hidden text range:
@@ -1179,14 +1179,14 @@ sal_Bool SwCntntNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const
{
const SwTxtNode& rTNd = *GetTxtNode();
xub_StrLen nPos = pIdx->GetIndex();
- if( pBreakIt->GetBreakIter().is() )
+ if( g_pBreakIt->GetBreakIter().is() )
{
sal_Int32 nDone = 0;
sal_uInt16 nItrMode = ( CRSR_SKIP_CELLS & nMode ) ?
CharacterIteratorMode::SKIPCELL :
CharacterIteratorMode::SKIPCONTROLCHARACTER;
- nPos = (xub_StrLen)pBreakIt->GetBreakIter()->previousCharacters( rTNd.GetTxt(), nPos,
- pBreakIt->GetLocale( rTNd.GetLang( nPos ) ),
+ nPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->previousCharacters( rTNd.GetTxt(), nPos,
+ g_pBreakIt->GetLocale( rTNd.GetLang( nPos ) ),
nItrMode, 1, nDone );
// Check if nPos is inside hidden text range:
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index bce5a6d266c0..740c9c4a5489 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -510,14 +510,14 @@ static bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
{
sal_uInt16 nScript;
for( n = 0; n < nEnd; n = (xub_StrLen)
- pBreakIt->GetBreakIter()->endOfScript( sExp, n, nScript ))
+ g_pBreakIt->GetBreakIter()->endOfScript( sExp, n, nScript ))
{
- nScript = pBreakIt->GetBreakIter()->getScriptType( sExp, n );
+ nScript = g_pBreakIt->GetBreakIter()->getScriptType( sExp, n );
rScrpt |= lcl_SetScriptFlags( nScript );
}
}
else
- rScrpt |= lcl_SetScriptFlags( pBreakIt->GetBreakIter()->
+ rScrpt |= lcl_SetScriptFlags( g_pBreakIt->GetBreakIter()->
getScriptType( sExp, nEnd-1 ));
}
@@ -561,7 +561,7 @@ sal_uInt16 SwEditShell::GetScriptType() const
{
nScript = pScriptInfo ?
pScriptInfo->ScriptType( nPos ) :
- pBreakIt->GetBreakIter()->getScriptType( pTNd->GetTxt(), nPos );
+ g_pBreakIt->GetBreakIter()->getScriptType( pTNd->GetTxt(), nPos );
}
else
nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
@@ -570,7 +570,7 @@ sal_uInt16 SwEditShell::GetScriptType() const
nRet |= lcl_SetScriptFlags( nScript );
}
}
- else if ( pBreakIt->GetBreakIter().is() )
+ else if ( g_pBreakIt->GetBreakIter().is() )
{
sal_uLong nEndIdx = pEnd->nNode.GetIndex();
SwNodeIndex aIdx( pStt->nNode );
@@ -600,7 +600,7 @@ sal_uInt16 SwEditShell::GetScriptType() const
{
nScript = pScriptInfo ?
pScriptInfo->ScriptType( nChg ) :
- pBreakIt->GetBreakIter()->getScriptType(
+ g_pBreakIt->GetBreakIter()->getScriptType(
rTxt, nChg );
if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, true,
@@ -615,7 +615,7 @@ sal_uInt16 SwEditShell::GetScriptType() const
nChg = pScriptInfo ?
pScriptInfo->NextScriptChg( nChg ) :
- (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(
+ (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript(
rTxt, nChg, nScript );
nFldPos = rTxt.indexOf(
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index fd7e96a12000..eac69cfff189 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -897,7 +897,7 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc
if(sNodeText.Len())
{
// now check if sNodeText starts with a non-alphanumeric character plus blanks
- sal_uInt16 nSrcpt = pBreakIt->GetRealScriptOfText( sNodeText, 0 );
+ sal_uInt16 nSrcpt = g_pBreakIt->GetRealScriptOfText( sNodeText, 0 );
static sal_uInt16 nIds[] =
{
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 11698e4dd603..637372fc35bb 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -239,7 +239,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
nBreakStart = nCutPos;
}
- else if( pBreakIt->GetBreakIter().is() )
+ else if( g_pBreakIt->GetBreakIter().is() )
{
// New: We should have a look into the last portion, if it was a
// field portion. For this, we expand the text of the field portion
@@ -325,7 +325,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// we have to check the script type of the last "real" character
if ( nLangIndex < rInf.GetIdx() )
{
- sal_uInt16 nScript = pBreakIt->GetRealScriptOfText( rInf.GetTxt(),
+ sal_uInt16 nScript = g_pBreakIt->GetRealScriptOfText( rInf.GetTxt(),
nLangIndex );
OSL_ENSURE( nScript, "Script is not between 1 and 4" );
@@ -357,11 +357,11 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// !!! We must have a local copy of the locale, because inside
// getLineBreak the LinguEventListener can trigger a new formatting,
// which can corrupt the locale pointer inside pBreakIt.
- const lang::Locale aLocale = pBreakIt->GetLocale( aLang );
+ const lang::Locale aLocale = g_pBreakIt->GetLocale( aLang );
// determines first possible line break from nRightPos to
// start index of current line
- LineBreakResults aResult = pBreakIt->GetBreakIter()->getLineBreak(
+ LineBreakResults aResult = g_pBreakIt->GetBreakIter()->getLineBreak(
rInf.GetTxt(), nCutPos, aLocale,
rInf.GetLineStart(), aHyphOpt, aUserOpt );
@@ -533,8 +533,8 @@ bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
xub_StrLen nWordLen;
Boundary aBound =
- pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nPos,
- pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
+ g_pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nPos,
+ g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
WordType::DICTIONARY_WORD, sal_True );
nBreakStart = (xub_StrLen)aBound.startPos;
nWordLen = static_cast<xub_StrLen>(aBound.endPos - nBreakStart);
@@ -549,7 +549,7 @@ bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
OSL_ENSURE( xHyph.is(), "Hyphenator is missing");
//! subtract 1 since the UNO-interface is 0 based
xHyphWord = xHyph->queryAlternativeSpelling( OUString(aTxt),
- pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
+ g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
nPos - nBreakStart, rInf.GetHyphValues() );
return xHyphWord.is() && xHyphWord->isAlternativeSpelling();
}
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 7fa3a8841eb9..489ef87d7caa 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1322,7 +1322,7 @@ sal_Bool SwTxtFormatInfo::IsHyphenate() const
if (bInterHyph && xHyph.is())
SvxSpellWrapper::CheckHyphLang( xHyph, eTmp );
- if( !xHyph.is() || !xHyph->hasLocale( pBreakIt->GetLocale(eTmp) ) )
+ if( !xHyph.is() || !xHyph->hasLocale( g_pBreakIt->GetLocale(eTmp) ) )
return sal_False;
return sal_True;
}
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index c6aa8c98c443..cd011028cf6f 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -367,11 +367,11 @@ static sal_Bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const XubStr
xub_StrLen nStop = nIdx;
sal_Bool bClear;
LanguageType eLang = pFnt->GetLanguage();
- if( pBreakIt->GetBreakIter().is() )
+ if( g_pBreakIt->GetBreakIter().is() )
{
bClear = CH_BLANK == rTxt.GetChar( nStop );
- Boundary aBndry( pBreakIt->GetBreakIter()->getWordBoundary( rTxt, nIdx,
- pBreakIt->GetLocale( eLang ),
+ Boundary aBndry( g_pBreakIt->GetBreakIter()->getWordBoundary( rTxt, nIdx,
+ g_pBreakIt->GetLocale( eLang ),
WordType::DICTIONARY_WORD, sal_True ) );
nStop = (xub_StrLen)aBndry.endPos;
if( nIdx <= aBndry.startPos && nIdx && nIdx-1 != rArg.nNoLineBreak )
@@ -828,7 +828,7 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd
if ( nStt == nEnd )
{
- if ( !pBreakIt->GetBreakIter().is() )
+ if ( !g_pBreakIt->GetBreakIter().is() )
return 100;
SwScriptInfo aScriptInfo;
@@ -836,8 +836,8 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd
aIter.SeekAndChgAttrIter( nStt, pOut );
Boundary aBound =
- pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), nStt,
- pBreakIt->GetLocale( aIter.GetFnt()->GetLanguage() ),
+ g_pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), nStt,
+ g_pBreakIt->GetLocale( aIter.GetFnt()->GetLanguage() ),
WordType::DICTIONARY_WORD, sal_True );
if ( nStt == aBound.startPos )
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 20846b3138df..496b07b5ed86 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -193,25 +193,25 @@ SwFldSlot::~SwFldSlot()
void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
{
OUString aTxt;
- if( GetExpTxt( rInf, aTxt ) && !aTxt.isEmpty() && pBreakIt->GetBreakIter().is() )
+ if( GetExpTxt( rInf, aTxt ) && !aTxt.isEmpty() && g_pBreakIt->GetBreakIter().is() )
{
sal_uInt8 nActual = pFnt ? pFnt->GetActual() : rInf.GetFont()->GetActual();
sal_uInt16 nScript;
{
- nScript = pBreakIt->GetBreakIter()->getScriptType( aTxt, 0 );
+ nScript = g_pBreakIt->GetBreakIter()->getScriptType( aTxt, 0 );
xub_StrLen nChg = 0;
if( i18n::ScriptType::WEAK == nScript )
{
- nChg =(xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(aTxt,0,nScript);
+ nChg =(xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript(aTxt,0,nScript);
if( nChg < aTxt.getLength() )
- nScript = pBreakIt->GetBreakIter()->getScriptType( aTxt, nChg );
+ nScript = g_pBreakIt->GetBreakIter()->getScriptType( aTxt, nChg );
}
//
// nNextScriptChg will be evaluated during SwFldPortion::Format()
//
if ( nChg < aTxt.getLength() )
- nNextScriptChg = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( aTxt, nChg, nScript );
+ nNextScriptChg = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript( aTxt, nChg, nScript );
else
nNextScriptChg = aTxt.getLength();
@@ -1097,12 +1097,12 @@ SwCombinedPortion::SwCombinedPortion( const XubString &rTxt )
aExpand = aExpand.copy( 0, 6 );
// Initialization of the scripttype array,
// the arrays of width and position are filled by the format function
- if( pBreakIt->GetBreakIter().is() )
+ if( g_pBreakIt->GetBreakIter().is() )
{
sal_uInt8 nScr = SW_SCRIPTS;
for( sal_uInt16 i = 0; i < rTxt.Len(); ++i )
{
- sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rTxt, i );
+ sal_uInt16 nScript = g_pBreakIt->GetBreakIter()->getScriptType( rTxt, i );
switch ( nScript ) {
case i18n::ScriptType::LATIN : nScr = SW_LATIN; break;
case i18n::ScriptType::ASIAN : nScr = SW_CJK; break;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index e61adebbd46e..3cd2b6bc054c 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -638,7 +638,7 @@ sal_uInt8 SwScriptInfo::WhichFont( xub_StrLen nIdx, const OUString* pTxt, const
nScript = pSI->ScriptType( nIdx );
else
// Ok, we have to ask the break iterator
- nScript = pBreakIt->GetRealScriptOfText( *pTxt, nIdx );
+ nScript = g_pBreakIt->GetRealScriptOfText( *pTxt, nIdx );
switch ( nScript ) {
case i18n::ScriptType::LATIN : return SW_LATIN;
@@ -663,7 +663,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode )
void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
{
- if( !pBreakIt->GetBreakIter().is() )
+ if( !g_pBreakIt->GetBreakIter().is() )
return;
const String& rTxt = rNode.GetTxt();
@@ -771,13 +771,13 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// we go back in our group until we reach the first character of
// type nScript
while ( nChg > nGrpStart &&
- nScript != pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg ) )
+ nScript != g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg ) )
--nChg;
// If we are at the start of a group, we do not trust nScript,
// we better get nScript from the breakiterator:
if ( nChg == nGrpStart )
- nScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
+ nScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
//
// INVALID DATA FROM THE SCRIPT INFO ARRAYS HAS TO BE DELETED:
@@ -818,14 +818,14 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// SCRIPT FOR WEAK CHARACTERS AT THE BEGINNING OF A PARAGRAPH
//
- if( WEAK == pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg ) )
+ if( WEAK == g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg ) )
{
// If the beginning of the current group is weak, this means that
// all of the characters in this grounp are weak. We have to assign
// the scripts to these characters depending on the fonts which are
// set for these characters to display them.
xub_StrLen nEnd =
- (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rTxt, nChg, WEAK );
+ (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript( rTxt, nChg, WEAK );
if( nEnd > rTxt.Len() )
nEnd = rTxt.Len();
@@ -840,7 +840,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// Get next script type or set to weak in order to exit
sal_uInt8 nNextScript = ( nEnd < rTxt.Len() ) ?
- (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rTxt, nEnd ) :
+ (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nEnd ) :
(sal_uInt8)WEAK;
if ( nScript != nNextScript )
@@ -862,7 +862,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
SAL_WARN_IF( STRING_LEN == nChg, "sw.core", "65K? Strange length of script section" );
xub_StrLen nSearchStt = nChg;
- nChg = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rTxt, nSearchStt, nScript );
+ nChg = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript( rTxt, nSearchStt, nScript );
if ( nChg > rTxt.Len() )
nChg = rTxt.Len();
@@ -889,7 +889,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// special case for dotted circle since it can be used with complex
// before a mark, so we want it associated with the mark's script
if (nChg < rTxt.Len() && nChg > 0 && (i18n::ScriptType::WEAK ==
- pBreakIt->GetBreakIter()->getScriptType(rTxt,nChg - 1)))
+ g_pBreakIt->GetBreakIter()->getScriptType(rTxt,nChg - 1)))
{
int8_t nType = u_charType(rTxt.GetChar(nChg) );
if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
@@ -1142,7 +1142,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
}
if ( nChg < rTxt.Len() )
- nScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
+ nScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
nLastCompression = nChg;
nLastKashida = nChg;
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 73528edcdfc7..09e68deeccd9 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -78,8 +78,8 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
// first we get the script type
if ( pSI )
nScript = pSI->ScriptType( nPos );
- else if ( pBreakIt->GetBreakIter().is() )
- nScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( *pStr, nPos );
+ else if ( g_pBreakIt->GetBreakIter().is() )
+ nScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( *pStr, nPos );
// Note: rInf.GetIdx() can differ from nPos,
// e.g., when rPor is a field portion. nPos referes to the string passed
@@ -179,7 +179,7 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
if ( pPor && pPor->IsKernPortion() )
pPor = pPor->GetPortion();
- if ( ! pBreakIt->GetBreakIter().is() || ! pPor || pPor->InFixMargGrp() )
+ if ( ! g_pBreakIt->GetBreakIter().is() || ! pPor || pPor->InFixMargGrp() )
return nCnt;
// next character is inside a field?
@@ -192,10 +192,10 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
pPor->GetExpTxt( rInf, aStr );
((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
- nNextScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( aStr, 0 );
+ nNextScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( aStr, 0 );
}
else
- nNextScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rInf.GetTxt(), nPos );
+ nNextScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rInf.GetTxt(), nPos );
if( ASIAN == nNextScript )
{
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index f738c78db482..d31ab8d617c1 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -91,7 +91,7 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
if ( pScriptInfo->GetInvalidity() != STRING_LEN )
pScriptInfo->InitScriptInfo( rTxtNode, bRTL );
- if ( pBreakIt->GetBreakIter().is() )
+ if ( g_pBreakIt->GetBreakIter().is() )
{
pFnt->SetActual( SwScriptInfo::WhichFont( 0, 0, pScriptInfo ) );
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 3eaa84a8b8b7..f8c41ba641b7 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -150,11 +150,11 @@ MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const
if( nWishLen && nWishLen < nEnd )
nEnd = nWishLen;
- if ( ! nWishLen && pBreakIt->GetBreakIter().is() )
+ if ( ! nWishLen && g_pBreakIt->GetBreakIter().is() )
{
// find first word
const SwAttrSet& rAttrSet = GetSwAttrSet();
- const sal_uInt16 nTxtScript = pBreakIt->GetRealScriptOfText( GetTxt(), 0 );
+ const sal_uInt16 nTxtScript = g_pBreakIt->GetRealScriptOfText( GetTxt(), 0 );
LanguageType eLanguage;
@@ -172,8 +172,8 @@ MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const
}
Boundary aBound =
- pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), 0,
- pBreakIt->GetLocale( eLanguage ), WordType::DICTIONARY_WORD, sal_True );
+ g_pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), 0,
+ g_pBreakIt->GetLocale( eLanguage ), WordType::DICTIONARY_WORD, sal_True );
nEnd = (xub_StrLen)aBound.endPos;
}
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index a30aa48f4d54..2a02e0213e54 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -50,7 +50,7 @@ Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
if( xHyph.is() )
xHyphWord = xHyph->hyphenate( OUString(rTxt),
- pBreakIt->GetLocale( pFnt->GetLanguage() ),
+ g_pBreakIt->GetLocale( pFnt->GetLanguage() ),
rTxt.Len() - nMinTrail, GetHyphValues() );
return xHyphWord;
@@ -66,7 +66,7 @@ sal_Bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTxtFrm::Hyphenate" );
- if( !pBreakIt->GetBreakIter().is() )
+ if( !g_pBreakIt->GetBreakIter().is() )
return sal_False;
// Wir machen den Laden erstmal dicht:
OSL_ENSURE( !IsLocked(), "SwTxtFrm::Hyphenate: this is locked" );
@@ -230,8 +230,8 @@ sal_Bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
Reference< XHyphenatedWord > xHyphWord;
Boundary aBound =
- pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nWrdStart,
- pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ), WordType::DICTIONARY_WORD, sal_True );
+ g_pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nWrdStart,
+ g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ), WordType::DICTIONARY_WORD, sal_True );
nWrdStart = static_cast<xub_StrLen>(aBound.startPos);
nLen = static_cast<xub_StrLen>(aBound.endPos - nWrdStart);
bRet = 0 != nLen;
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 84d18b9b8cc0..612d7d011709 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2135,7 +2135,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
// #i105901#
// skip character cells for all script types
- if ( pBreakIt->GetBreakIter().is() )
+ if ( g_pBreakIt->GetBreakIter().is() )
{
aLang = rInf.GetFont()->GetLanguage();
bSkipCharacterCells = true;
@@ -2151,8 +2151,8 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( bSkipCharacterCells )
{
- nIdx = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharacters( rInf.GetText(),
- nIdx, pBreakIt->GetLocale( aLang ), nItrMode, 1, nDone );
+ nIdx = (xub_StrLen)g_pBreakIt->GetBreakIter()->nextCharacters( rInf.GetText(),
+ nIdx, g_pBreakIt->GetLocale( aLang ), nItrMode, 1, nDone );
if ( nIdx <= nLastIdx )
break;
}
@@ -2412,15 +2412,15 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
const XubString aSnippet( rInf.GetText(), rInf.GetIdx(), nLn );
aTmpText = aSub[nActual].CalcCaseMap( aSnippet );
const bool bTitle = SVX_CASEMAP_TITEL == aSub[nActual].GetCaseMap() &&
- pBreakIt->GetBreakIter().is();
+ g_pBreakIt->GetBreakIter().is();
// Uaaaaahhhh!!! In title case mode, we would get wrong results
if ( bTitle && nLn )
{
// check if rInf.GetIdx() is begin of word
- if ( !pBreakIt->GetBreakIter()->isBeginWord(
+ if ( !g_pBreakIt->GetBreakIter()->isBeginWord(
rInf.GetText(), rInf.GetIdx(),
- pBreakIt->GetLocale( aSub[nActual].GetLanguage() ),
+ g_pBreakIt->GetLocale( aSub[nActual].GetLanguage() ),
i18n::WordType::ANYWORD_IGNOREWHITESPACES ) )
{
// In this case, the beginning of aTmpText is wrong.
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index f99916cdeec1..58512953a093 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -76,15 +76,15 @@ xub_StrLen sw_CalcCaseMap( const SwFont& rFnt,
// special case for title case:
const bool bTitle = SVX_CASEMAP_TITEL == rFnt.GetCaseMap() &&
- pBreakIt->GetBreakIter().is();
+ g_pBreakIt->GetBreakIter().is();
for ( xub_StrLen i = nOfst; i < nEnd; ++i )
{
XubString aTmp( rOrigString, i, 1 );
if ( !bTitle ||
- pBreakIt->GetBreakIter()->isBeginWord(
+ g_pBreakIt->GetBreakIter()->isBeginWord(
rOrigString, i,
- pBreakIt->GetLocale( rFnt.GetLanguage() ),
+ g_pBreakIt->GetLocale( rFnt.GetLanguage() ),
WordType::ANYWORD_IGNOREWHITESPACES ) )
aTmp = rFnt.GetActualFont().CalcCaseMap( aTmp );
@@ -646,8 +646,8 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
if( nPos < nMaxPos )
{
- nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfCharBlock( rOldText, nPos,
- pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
+ nPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfCharBlock( rOldText, nPos,
+ g_pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
if( nPos == STRING_LEN )
nPos = nOldPos;
else if( nPos > nMaxPos )
@@ -694,8 +694,8 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
rDo.Do();
nOldPos = nPos;
}
- nPos = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharBlock( rOldText, nPos,
- pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
+ nPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->nextCharBlock( rOldText, nPos,
+ g_pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
if( nPos == STRING_LEN || nPos > nMaxPos )
nPos = nMaxPos;
OSL_ENSURE( nPos, "nextCharBlock not implemented?" );
@@ -808,8 +808,8 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
}
} while( nOldPos != nPos );
}
- nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfCharBlock( rOldText, nPos,
- pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
+ nPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfCharBlock( rOldText, nPos,
+ g_pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
if( nPos == STRING_LEN || nPos > nMaxPos )
nPos = nMaxPos;
OSL_ENSURE( nPos, "endOfCharBlock not implemented?" );
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 0c767c22bc28..71da72eb18c2 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -3031,7 +3031,7 @@ sal_uInt16 SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
if ( ! nScript )
{
- nScript = pBreakIt->GetRealScriptOfText( m_Text, nBegin );
+ nScript = g_pBreakIt->GetRealScriptOfText( m_Text, nBegin );
}
// #i91465# Consider nScript if pSwpHints == 0
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 818fed84eeb3..00e007afe99d 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -36,50 +36,50 @@ SwScriptIterator::SwScriptIterator( const String& rStr, xub_StrLen nStt, bool bF
nCurScript( i18n::ScriptType::WEAK ),
bForward( bFrwrd )
{
- if( pBreakIt->GetBreakIter().is() )
+ if( g_pBreakIt->GetBreakIter().is() )
{
if ( ! bFrwrd && nStt )
--nStt;
xub_StrLen nPos = nStt;
- nCurScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos );
+ nCurScript = g_pBreakIt->GetBreakIter()->getScriptType( rText, nPos );
if( i18n::ScriptType::WEAK == nCurScript )
{
if( nPos )
{
- nPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfScript(
+ nPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->beginOfScript(
rText, nPos, nCurScript );
if( nPos && nPos < rText.Len() )
{
nStt = --nPos;
- nCurScript = pBreakIt->GetBreakIter()->getScriptType( rText,nPos);
+ nCurScript = g_pBreakIt->GetBreakIter()->getScriptType( rText,nPos);
}
}
}
nChgPos = bForward ?
- (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nStt, nCurScript ) :
- (xub_StrLen)pBreakIt->GetBreakIter()->beginOfScript( rText, nStt, nCurScript );
+ (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript( rText, nStt, nCurScript ) :
+ (xub_StrLen)g_pBreakIt->GetBreakIter()->beginOfScript( rText, nStt, nCurScript );
}
}
bool SwScriptIterator::Next()
{
bool bRet = false;
- if( pBreakIt->GetBreakIter().is() )
+ if( g_pBreakIt->GetBreakIter().is() )
{
if ( bForward && nChgPos < rText.Len() )
{
- nCurScript = pBreakIt->GetBreakIter()->getScriptType( rText, nChgPos );
- nChgPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(
+ nCurScript = g_pBreakIt->GetBreakIter()->getScriptType( rText, nChgPos );
+ nChgPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript(
rText, nChgPos, nCurScript );
bRet = true;
}
else if ( ! bForward && nChgPos )
{
--nChgPos;
- nCurScript = pBreakIt->GetBreakIter()->getScriptType( rText, nChgPos );
- nChgPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfScript(
+ nCurScript = g_pBreakIt->GetBreakIter()->getScriptType( rText, nChgPos );
+ nChgPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->beginOfScript(
rText, nChgPos, nCurScript );
bRet = true;
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index fac69fec4810..a493996f9dce 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -612,11 +612,11 @@ XubString SwTxtNode::GetCurWord( xub_StrLen nPos ) const
return m_Text;
Boundary aBndry;
- const uno::Reference< XBreakIterator > &rxBreak = pBreakIt->GetBreakIter();
+ const uno::Reference< XBreakIterator > &rxBreak = g_pBreakIt->GetBreakIter();
if (rxBreak.is())
{
sal_Int16 nWordType = WordType::DICTIONARY_WORD;
- lang::Locale aLocale( pBreakIt->GetLocale( GetLang( nPos ) ) );
+ lang::Locale aLocale( g_pBreakIt->GetLocale( GetLang( nPos ) ) );
#if OSL_DEBUG_LEVEL > 1
sal_Bool bBegin = rxBreak->isBeginWord( m_Text, nPos, aLocale, nWordType );
sal_Bool bEnd = rxBreak->isEndWord ( m_Text, nPos, aLocale, nWordType );
@@ -702,7 +702,7 @@ namespace
{
if (nLen > 1)
{
- const uno::Reference< XBreakIterator > &rxBreak = pBreakIt->GetBreakIter();
+ const uno::Reference< XBreakIterator > &rxBreak = g_pBreakIt->GetBreakIter();
sal_uInt16 nCurrScript = rxBreak->getScriptType( rText, nBegin );
@@ -750,7 +750,7 @@ sal_Bool SwScanner::NextWord()
{
if ( !pLanguage )
{
- const sal_uInt16 nNextScriptType = pBreakIt->GetBreakIter()->getScriptType( aText, nBegin );
+ const sal_uInt16 nNextScriptType = g_pBreakIt->GetBreakIter()->getScriptType( aText, nBegin );
ModelToViewHelper::ModelPosition aModelBeginPos = rConversionMap.ConvertToModelPosition( nBegin );
const sal_Int32 nBeginModelPos = aModelBeginPos.mnPos;
aCurrLang = rNode.GetLang( nBeginModelPos, 1, nNextScriptType );
@@ -758,7 +758,7 @@ sal_Bool SwScanner::NextWord()
if ( nWordType != i18n::WordType::WORD_COUNT )
{
- rCC.setLanguageTag( LanguageTag( pBreakIt->GetLocale( aCurrLang )) );
+ rCC.setLanguageTag( LanguageTag( g_pBreakIt->GetLocale( aCurrLang )) );
if ( rCC.isLetterNumeric(OUString(aText[nBegin])) )
break;
}
@@ -772,8 +772,8 @@ sal_Bool SwScanner::NextWord()
return sal_False;
// get the word boundaries
- aBound = pBreakIt->GetBreakIter()->getWordBoundary( aText, nBegin,
- pBreakIt->GetLocale( aCurrLang ), nWordType, sal_True );
+ aBound = g_pBreakIt->GetBreakIter()->getWordBoundary( aText, nBegin,
+ g_pBreakIt->GetLocale( aCurrLang ), nWordType, sal_True );
OSL_ENSURE( aBound.endPos >= aBound.startPos, "broken aBound result" );
// we don't want to include preceeding text
@@ -812,10 +812,10 @@ sal_Bool SwScanner::NextWord()
OSL_ENSURE( aBound.endPos >= nBegin, "Unexpected aBound result" );
// restrict boundaries to script boundaries and nEndPos
- const sal_uInt16 nCurrScript = pBreakIt->GetBreakIter()->getScriptType( aText, nBegin );
+ const sal_uInt16 nCurrScript = g_pBreakIt->GetBreakIter()->getScriptType( aText, nBegin );
OUString aTmpWord = aText.copy( nBegin, aBound.endPos - nBegin );
const sal_Int32 nScriptEnd = nBegin +
- pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
+ g_pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
const sal_Int32 nEnd = Min( aBound.endPos, nScriptEnd );
// restrict word start to last script change position
@@ -826,7 +826,7 @@ sal_Bool SwScanner::NextWord()
aTmpWord = aText.copy( aBound.startPos,
nBegin - aBound.startPos + 1 );
nScriptBegin = aBound.startPos +
- pBreakIt->GetBreakIter()->beginOfScript( aTmpWord, nBegin - aBound.startPos,
+ g_pBreakIt->GetBreakIter()->beginOfScript( aTmpWord, nBegin - aBound.startPos,
nCurrScript );
}
@@ -835,11 +835,11 @@ sal_Bool SwScanner::NextWord()
}
else
{
- const sal_uInt16 nCurrScript = pBreakIt->GetBreakIter()->getScriptType( aText, aBound.startPos );
+ const sal_uInt16 nCurrScript = g_pBreakIt->GetBreakIter()->getScriptType( aText, aBound.startPos );
OUString aTmpWord = aText.copy( aBound.startPos,
aBound.endPos - aBound.startPos );
const sal_Int32 nScriptEnd = aBound.startPos +
- pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
+ g_pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
const sal_Int32 nEnd = Min( aBound.endPos, nScriptEnd );
nBegin = aBound.startPos;
nLen = nEnd - nBegin;
@@ -1239,8 +1239,8 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
LanguageType eActLang = pNode->GetLang( nBegin );
Boundary aBound =
- pBreakIt->GetBreakIter()->getWordBoundary( pNode->GetTxt(), nBegin,
- pBreakIt->GetLocale( eActLang ),
+ g_pBreakIt->GetBreakIter()->getWordBoundary( pNode->GetTxt(), nBegin,
+ g_pBreakIt->GetLocale( eActLang ),
WordType::DICTIONARY_WORD, sal_True );
nBegin = xub_StrLen(aBound.startPos);
}
@@ -1393,9 +1393,9 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
if ( nBegin < nEnd )
{
const LanguageType aCurrLang = pNode->GetLang( nBegin );
- const com::sun::star::lang::Locale aCurrLocale = pBreakIt->GetLocale( aCurrLang );
- nBegin = static_cast< xub_StrLen >(pBreakIt->GetBreakIter()->beginOfSentence( rText, nBegin, aCurrLocale ));
- nEnd = static_cast< xub_StrLen >(Min( rText.getLength(), pBreakIt->GetBreakIter()->endOfSentence( rText, nEnd, aCurrLocale ) ));
+ const com::sun::star::lang::Locale aCurrLocale = g_pBreakIt->GetLocale( aCurrLang );
+ nBegin = static_cast< xub_StrLen >(g_pBreakIt->GetBreakIter()->beginOfSentence( rText, nBegin, aCurrLocale ));
+ nEnd = static_cast< xub_StrLen >(Min( rText.getLength(), g_pBreakIt->GetBreakIter()->endOfSentence( rText, nEnd, aCurrLocale ) ));
}
}
}
@@ -1435,7 +1435,7 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
do
{
const LanguageType nLang = aIter.GetLanguage();
- const com::sun::star::lang::Locale aLocale = pBreakIt->GetLocale( nLang );
+ const com::sun::star::lang::Locale aLocale = g_pBreakIt->GetLocale( nLang );
nLangEnd = Min( nEnd, aIter.GetChgPos() );
const sal_uInt32 nExpandBegin = aConversionMap.ConvertToViewPosition( nLangBegin );
@@ -1603,7 +1603,7 @@ void SwTxtNode::TransliterateText(
xub_StrLen nStt, xub_StrLen nEnd,
SwUndoTransliterate* pUndo )
{
- if (nStt < nEnd && pBreakIt->GetBreakIter().is())
+ if (nStt < nEnd && g_pBreakIt->GetBreakIter().is())
{
// since we don't use Hiragana/Katakana or half-width/full-width transliterations here
// it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will
@@ -1627,31 +1627,31 @@ void SwTxtNode::TransliterateText(
Boundary aSttBndry;
Boundary aEndBndry;
- aSttBndry = pBreakIt->GetBreakIter()->getWordBoundary(
+ aSttBndry = g_pBreakIt->GetBreakIter()->getWordBoundary(
GetTxt(), nStt,
- pBreakIt->GetLocale( GetLang( nStt ) ),
+ g_pBreakIt->GetLocale( GetLang( nStt ) ),
nWordType,
sal_True /*prefer forward direction*/);
- aEndBndry = pBreakIt->GetBreakIter()->getWordBoundary(
+ aEndBndry = g_pBreakIt->GetBreakIter()->getWordBoundary(
GetTxt(), nEnd,
- pBreakIt->GetLocale( GetLang( nEnd ) ),
+ g_pBreakIt->GetLocale( GetLang( nEnd ) ),
nWordType,
sal_False /*prefer backward direction*/);
// prevent backtracking to the previous word if selection is at word boundary
if (aSttBndry.endPos <= nStt)
{
- aSttBndry = pBreakIt->GetBreakIter()->nextWord(
+ aSttBndry = g_pBreakIt->GetBreakIter()->nextWord(
GetTxt(), aSttBndry.endPos,
- pBreakIt->GetLocale( GetLang( aSttBndry.endPos ) ),
+ g_pBreakIt->GetLocale( GetLang( aSttBndry.endPos ) ),
nWordType);
}
// prevent advancing to the next word if selection is at word boundary
if (aEndBndry.startPos >= nEnd)
{
- aEndBndry = pBreakIt->GetBreakIter()->previousWord(
+ aEndBndry = g_pBreakIt->GetBreakIter()->previousWord(
GetTxt(), aEndBndry.startPos,
- pBreakIt->GetLocale( GetLang( aEndBndry.startPos ) ),
+ g_pBreakIt->GetLocale( GetLang( aEndBndry.startPos ) ),
nWordType);
}
@@ -1679,9 +1679,9 @@ void SwTxtNode::TransliterateText(
aChanges.push_back( aChgData );
}
- aCurWordBndry = pBreakIt->GetBreakIter()->nextWord(
+ aCurWordBndry = g_pBreakIt->GetBreakIter()->nextWord(
GetTxt(), nEnd,
- pBreakIt->GetLocale( GetLang( nEnd ) ),
+ g_pBreakIt->GetLocale( GetLang( nEnd ) ),
nWordType);
}
}
@@ -1689,20 +1689,20 @@ void SwTxtNode::TransliterateText(
{
// for 'sentence case' we need to iterate sentence by sentence
- sal_Int32 nLastStart = pBreakIt->GetBreakIter()->beginOfSentence(
+ sal_Int32 nLastStart = g_pBreakIt->GetBreakIter()->beginOfSentence(
GetTxt(), nEnd,
- pBreakIt->GetLocale( GetLang( nEnd ) ) );
- sal_Int32 nLastEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ g_pBreakIt->GetLocale( GetLang( nEnd ) ) );
+ sal_Int32 nLastEnd = g_pBreakIt->GetBreakIter()->endOfSentence(
GetTxt(), nLastStart,
- pBreakIt->GetLocale( GetLang( nLastStart ) ) );
+ g_pBreakIt->GetLocale( GetLang( nLastStart ) ) );
// extend nStt, nEnd to the current sentence boundaries
- sal_Int32 nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence(
+ sal_Int32 nCurrentStart = g_pBreakIt->GetBreakIter()->beginOfSentence(
GetTxt(), nStt,
- pBreakIt->GetLocale( GetLang( nStt ) ) );
- sal_Int32 nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ g_pBreakIt->GetLocale( GetLang( nStt ) ) );
+ sal_Int32 nCurrentEnd = g_pBreakIt->GetBreakIter()->endOfSentence(
GetTxt(), nCurrentStart,
- pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
+ g_pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
// prevent backtracking to the previous sentence if selection starts at end of a sentence
if (nCurrentEnd <= nStt)
@@ -1711,18 +1711,18 @@ void SwTxtNode::TransliterateText(
// are in Asian text with no spaces...)
// Thus to get the real sentence start we should locate the next real word,
// that is one found by DICTIONARY_WORD
- i18n::Boundary aBndry = pBreakIt->GetBreakIter()->nextWord(
+ i18n::Boundary aBndry = g_pBreakIt->GetBreakIter()->nextWord(
GetTxt(), nCurrentEnd,
- pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
+ g_pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
i18n::WordType::DICTIONARY_WORD);
// now get new current sentence boundaries
- nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence(
+ nCurrentStart = g_pBreakIt->GetBreakIter()->beginOfSentence(
GetTxt(), aBndry.startPos,
- pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
- nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ g_pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
+ nCurrentEnd = g_pBreakIt->GetBreakIter()->endOfSentence(
GetTxt(), nCurrentStart,
- pBreakIt->GetLocale( GetLang( nCurrentStart) ) );
+ g_pBreakIt->GetLocale( GetLang( nCurrentStart) ) );
}
// prevent advancing to the next sentence if selection ends at start of a sentence
if (nLastStart >= nEnd)
@@ -1731,13 +1731,13 @@ void SwTxtNode::TransliterateText(
// are in Asian text with no spaces...)
// Thus to get the real sentence start we should locate the previous real word,
// that is one found by DICTIONARY_WORD
- i18n::Boundary aBndry = pBreakIt->GetBreakIter()->previousWord(
+ i18n::Boundary aBndry = g_pBreakIt->GetBreakIter()->previousWord(
GetTxt(), nLastStart,
- pBreakIt->GetLocale( GetLang( nLastStart) ),
+ g_pBreakIt->GetLocale( GetLang( nLastStart) ),
i18n::WordType::DICTIONARY_WORD);
- nLastEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ nLastEnd = g_pBreakIt->GetBreakIter()->endOfSentence(
GetTxt(), aBndry.startPos,
- pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
+ g_pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
if (nCurrentEnd > nLastEnd)
nCurrentEnd = nLastEnd;
}
@@ -1764,14 +1764,14 @@ void SwTxtNode::TransliterateText(
}
Boundary aFirstWordBndry;
- aFirstWordBndry = pBreakIt->GetBreakIter()->nextWord(
+ aFirstWordBndry = g_pBreakIt->GetBreakIter()->nextWord(
GetTxt(), nCurrentEnd,
- pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
+ g_pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
nWordType);
nCurrentStart = aFirstWordBndry.startPos;
- nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ nCurrentEnd = g_pBreakIt->GetBreakIter()->endOfSentence(
GetTxt(), nCurrentStart,
- pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
+ g_pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
}
}
else
@@ -1970,7 +1970,7 @@ bool SwTxtNode::CountWords( SwDocStat& rStat,
// count words in masked and expanded text:
if (!aExpandText.isEmpty())
{
- if (pBreakIt->GetBreakIter().is())
+ if (g_pBreakIt->GetBreakIter().is())
{
// zero is NULL for pLanguage -----------v last param = true for clipping
SwScanner aScanner( *this, aExpandText, 0, aConversionMap, i18n::WordType::WORD_COUNT,
@@ -1986,16 +1986,16 @@ bool SwTxtNode::CountWords( SwDocStat& rStat,
{
++nTmpWords;
const OUString &rWord = aScanner.GetWord();
- if (pBreakIt->GetBreakIter()->getScriptType(rWord, 0) == i18n::ScriptType::ASIAN)
+ if (g_pBreakIt->GetBreakIter()->getScriptType(rWord, 0) == i18n::ScriptType::ASIAN)
++nTmpAsianWords;
- nTmpCharsExcludingSpaces += pBreakIt->getGraphemeCount(rWord);
+ nTmpCharsExcludingSpaces += g_pBreakIt->getGraphemeCount(rWord);
}
}
nTmpCharsExcludingSpaces += aScanner.getOverriddenDashCount();
}
- nTmpChars = pBreakIt->getGraphemeCount(aExpandText, nExpandBegin, nExpandEnd);
+ nTmpChars = g_pBreakIt->getGraphemeCount(aExpandText, nExpandBegin, nExpandEnd);
}
// no nTmpCharsExcludingSpaces adjust needed neither for blanked out MaskedChars
@@ -2014,13 +2014,13 @@ bool SwTxtNode::CountWords( SwDocStat& rStat,
{
++nTmpWords;
const OUString &rWord = aScanner.GetWord();
- if (pBreakIt->GetBreakIter()->getScriptType(rWord, 0) == i18n::ScriptType::ASIAN)
+ if (g_pBreakIt->GetBreakIter()->getScriptType(rWord, 0) == i18n::ScriptType::ASIAN)
++nTmpAsianWords;
- nTmpCharsExcludingSpaces += pBreakIt->getGraphemeCount(rWord);
+ nTmpCharsExcludingSpaces += g_pBreakIt->getGraphemeCount(rWord);
}
nTmpCharsExcludingSpaces += aScanner.getOverriddenDashCount();
- nTmpChars += pBreakIt->getGraphemeCount(sNumString);
+ nTmpChars += g_pBreakIt->getGraphemeCount(sNumString);
}
else if ( bHasBullet )
{
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index bb8b9a5627d2..a6800fdc8e36 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -491,10 +491,10 @@ void SwASCIIParser::InsertText( const String& rStr )
pDoc->UpdateRsid( *pPam, rStr.Len() );
pDoc->UpdateParRsid( pPam->GetPoint()->nNode.GetNode().GetTxtNode() );
- if( pItemSet && pBreakIt && nScript != ( SCRIPTTYPE_LATIN |
+ if( pItemSet && g_pBreakIt && nScript != ( SCRIPTTYPE_LATIN |
SCRIPTTYPE_ASIAN |
SCRIPTTYPE_COMPLEX ) )
- nScript |= pBreakIt->GetAllScriptsOfText( rStr );
+ nScript |= g_pBreakIt->GetAllScriptsOfText( rStr );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index aa49869d68a8..63df9da03d2f 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1652,8 +1652,8 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl,
xub_StrLen nPos = 0;
while( nPos < nEndPos )
{
- sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos );
- nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nPos, nScript );
+ sal_uInt16 nScript = g_pBreakIt->GetBreakIter()->getScriptType( rText, nPos );
+ nPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript( rText, nPos, nScript );
aScriptChgLst.push_back( nPos );
aScriptLst.push_back( nScript );
}
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 688ce4335fde..7984064d3d47 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -310,8 +310,8 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
sal_Bool bNeedsCJKProcessing = sal_False;
if( sExpand.Len() )
{
- sal_uInt16 nScriptType = pBreakIt->GetBreakIter()->getScriptType( sExpand, 0 );
- xub_StrLen nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( sExpand, 0,
+ sal_uInt16 nScriptType = g_pBreakIt->GetBreakIter()->getScriptType( sExpand, 0 );
+ xub_StrLen nPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript( sExpand, 0,
nScriptType );
sal_uInt16 nScript =
@@ -361,10 +361,10 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
xub_StrLen nPos = 0;
do
{
- sal_uInt16 nScriptType = pBreakIt->GetBreakIter()->getScriptType( sExpand, nPos );
+ sal_uInt16 nScriptType = g_pBreakIt->GetBreakIter()->getScriptType( sExpand, nPos );
sal_uInt16 nScript =
SwHTMLWriter::GetCSS1ScriptForScriptType( nScriptType );
- xub_StrLen nEndPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(
+ xub_StrLen nEndPos = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript(
sExpand, nPos, nScriptType );
xub_StrLen nChunkLen = nEndPos - nPos;
if( nScript != CSS1_OUTMODE_ANY_SCRIPT &&
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 9c929b2e791e..dc08ad5eb424 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2177,9 +2177,9 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
{
const String& rText = pTxtNd->GetTxt();
sal_uInt16 nScriptTxt =
- pBreakIt->GetBreakIter()->getScriptType(
+ g_pBreakIt->GetBreakIter()->getScriptType(
rText, pAttr->GetSttCnt() );
- xub_StrLen nScriptEnd = (xub_StrLen)pBreakIt->GetBreakIter()
+ xub_StrLen nScriptEnd = (xub_StrLen)g_pBreakIt->GetBreakIter()
->endOfScript( rText, nStt, nScriptTxt );
while( nScriptEnd < nEndCnt )
{
@@ -2200,9 +2200,9 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
pNext->InsertPrev( pSetAttr );
}
nStt = nScriptEnd;
- nScriptTxt = pBreakIt->GetBreakIter()->getScriptType(
+ nScriptTxt = g_pBreakIt->GetBreakIter()->getScriptType(
rText, nStt );
- nScriptEnd = (xub_StrLen)pBreakIt->GetBreakIter()
+ nScriptEnd = (xub_StrLen)g_pBreakIt->GetBreakIter()
->endOfScript( rText, nStt, nScriptTxt );
}
bInsert = nScriptItem == nScriptTxt;
@@ -3065,9 +3065,9 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
.GetTxtNode();
OSL_ENSURE( pTxtNd, "No text node" );
const String& rText = pTxtNd->GetTxt();
- sal_uInt16 nScriptTxt = pBreakIt->GetBreakIter()->getScriptType(
+ sal_uInt16 nScriptTxt = g_pBreakIt->GetBreakIter()->getScriptType(
rText, pAttr->GetSttCnt() );
- xub_StrLen nScriptEnd = (xub_StrLen)pBreakIt->GetBreakIter()
+ xub_StrLen nScriptEnd = (xub_StrLen)g_pBreakIt->GetBreakIter()
->endOfScript( rText, pAttr->GetSttCnt(), nScriptTxt );
while( nScriptEnd < nEndCnt )
{
@@ -3086,9 +3086,9 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
}
}
pAttr->nSttCntnt = nScriptEnd;
- nScriptTxt = pBreakIt->GetBreakIter()->getScriptType(
+ nScriptTxt = g_pBreakIt->GetBreakIter()->getScriptType(
rText, nScriptEnd );
- nScriptEnd = (xub_StrLen)pBreakIt->GetBreakIter()
+ nScriptEnd = (xub_StrLen)g_pBreakIt->GetBreakIter()
->endOfScript( rText, nScriptEnd, nScriptTxt );
}
bInsert = nScriptItem == nScriptTxt;
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index f606030ece64..c245eac3cd89 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -500,8 +500,8 @@ namespace sw
using namespace ::com::sun::star::i18n;
sal_uInt16 nScript = i18n::ScriptType::LATIN;
- if (rTxt.Len() && pBreakIt && pBreakIt->GetBreakIter().is())
- nScript = pBreakIt->GetBreakIter()->getScriptType(rTxt, 0);
+ if (rTxt.Len() && g_pBreakIt && g_pBreakIt->GetBreakIter().is())
+ nScript = g_pBreakIt->GetBreakIter()->getScriptType(rTxt, 0);
rtl_TextEncoding eChrSet = ItemGet<SvxFontItem>(rTxtNd,
GetWhichOfScript(RES_CHRATR_FONT, nScript)).GetCharSet();
@@ -587,19 +587,19 @@ namespace sw
using sw::types::writer_cast;
- if (pBreakIt && pBreakIt->GetBreakIter().is())
+ if (g_pBreakIt && g_pBreakIt->GetBreakIter().is())
{
xub_StrLen nLen = rTxt.Len();
xub_StrLen nPos = 0;
while (nPos < nLen)
{
- sal_Int32 nEnd2 = pBreakIt->GetBreakIter()->endOfScript(rTxt, nPos,
+ sal_Int32 nEnd2 = g_pBreakIt->GetBreakIter()->endOfScript(rTxt, nPos,
nScript);
if (nEnd2 < 0)
break;
nPos = static_cast< xub_StrLen >(nEnd2);
aScripts.push_back(ScriptEntry(nPos, nScript));
- nScript = pBreakIt->GetBreakIter()->getScriptType(rTxt, nPos);
+ nScript = g_pBreakIt->GetBreakIter()->getScriptType(rTxt, nPos);
}
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index f0c655d05f0e..2e0ad109b163 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -857,8 +857,8 @@ void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar )
pEditPool = aSet.GetPool();
eNdChrSet = ItemGet<SvxFontItem>(aSet,EE_CHAR_FONTINFO).GetCharSet();
- if( pBreakIt->GetBreakIter().is() )
- nScript = pBreakIt->GetBreakIter()->getScriptType( pEditObj->GetText(nPara), 0);
+ if( g_pBreakIt->GetBreakIter().is() )
+ nScript = g_pBreakIt->GetBreakIter()->getScriptType( pEditObj->GetText(nPara), 0);
else
nScript = i18n::ScriptType::LATIN;
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index eeaab4845dca..c042bfe1bc2d 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -662,8 +662,8 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen /*nPos*/,
defaulting to asian.
*/
sal_uInt16 nRubyScript;
- if( pBreakIt->GetBreakIter().is() )
- nRubyScript = pBreakIt->GetBreakIter()->getScriptType( rRuby.GetText(), 0);
+ if( g_pBreakIt->GetBreakIter().is() )
+ nRubyScript = g_pBreakIt->GetBreakIter()->getScriptType( rRuby.GetText(), 0);
else
nRubyScript = i18n::ScriptType::ASIAN;
@@ -711,8 +711,8 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen /*nPos*/,
aStr.AppendAscii( "(\\s\\up " );
- if ( pBreakIt->GetBreakIter().is() )
- nRubyScript = pBreakIt->GetBreakIter()->getScriptType( rNode.GetTxt(),
+ if ( g_pBreakIt->GetBreakIter().is() )
+ nRubyScript = g_pBreakIt->GetBreakIter()->getScriptType( rNode.GetTxt(),
*( pRubyTxt->GetStart() ) );
else
nRubyScript = i18n::ScriptType::ASIAN;
@@ -1414,8 +1414,8 @@ String SwWW8AttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
if (SVX_CASEMAP_TITEL == ((const SvxCaseMapItem&)rItem).GetValue())
{
sal_uInt16 nScriptType = i18n::ScriptType::LATIN;
- if (pBreakIt->GetBreakIter().is())
- nScriptType = pBreakIt->GetBreakIter()->getScriptType(aSnippet, 0);
+ if (g_pBreakIt->GetBreakIter().is())
+ nScriptType = g_pBreakIt->GetBreakIter()->getScriptType(aSnippet, 0);
LanguageType nLanguage;
switch (nScriptType)
@@ -1440,8 +1440,8 @@ String SwWW8AttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
//If we weren't at the begin of a word undo the case change.
//not done before doing the casemap because the sequence might start
//with whitespace
- if (pBreakIt->GetBreakIter().is() && !pBreakIt->GetBreakIter()->isBeginWord(
- rStr, nAktPos, pBreakIt->GetLocale(nLanguage),
+ if (g_pBreakIt->GetBreakIter().is() && !g_pBreakIt->GetBreakIter()->isBeginWord(
+ rStr, nAktPos, g_pBreakIt->GetLocale(nLanguage),
i18n::WordType::ANYWORD_IGNOREWHITESPACES ) )
{
aSnippet.SetChar(0, rStr.GetChar(nAktPos));
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 92116b2c655e..9bd6af93ee84 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2882,8 +2882,8 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
font size of that script as our default.
*/
sal_uInt16 nScript;
- if( pBreakIt->GetBreakIter().is() )
- nScript = pBreakIt->GetBreakIter()->getScriptType( pFld->GetPar1(), 0);
+ if( g_pBreakIt->GetBreakIter().is() )
+ nScript = g_pBreakIt->GetBreakIter()->getScriptType( pFld->GetPar1(), 0);
else
nScript = i18n::ScriptType::ASIAN;
@@ -4528,9 +4528,9 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
{
const SwTxtNode* pNd = (const SwTxtNode*)GetExport().pOutFmtNode;
pSet = &pNd->GetSwAttrSet();
- if ( pBreakIt->GetBreakIter().is() )
+ if ( g_pBreakIt->GetBreakIter().is() )
{
- nScript = pBreakIt->GetBreakIter()->
+ nScript = g_pBreakIt->GetBreakIter()->
getScriptType(pNd->GetTxt(), 0);
}
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 627f5aa6448f..9a42e208e40a 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2846,7 +2846,7 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString
if (rAddString.isEmpty())
return;
- uno::Reference<i18n::XBreakIterator> xBI(pBreakIt->GetBreakIter());
+ uno::Reference<i18n::XBreakIterator> xBI(g_pBreakIt->GetBreakIter());
if (!xBI.is())
{
simpleAddTextToParagraph(rAddString);
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index d4bba55b6cf8..7650a0dd58d1 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2742,8 +2742,8 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
const SwCharFmt *pCharFmt=0;
//Make a guess at which of asian of western we should be setting
sal_uInt16 nScript;
- if (pBreakIt->GetBreakIter().is())
- nScript = pBreakIt->GetBreakIter()->getScriptType(sRuby, 0);
+ if (g_pBreakIt->GetBreakIter().is())
+ nScript = g_pBreakIt->GetBreakIter()->getScriptType(sRuby, 0);
else
nScript = i18n::ScriptType::ASIAN;
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 94439852579b..6daf340d03f9 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -610,8 +610,8 @@ void SwHHCWrapper::Convert()
{
OUString aText( m_pConvArgs->pStartNode->GetTxt() );
long nPos = m_pConvArgs->pStartIdx->GetIndex();
- Boundary aBoundary( pBreakIt->GetBreakIter()->
- getWordBoundary( aText, nPos, pBreakIt->GetLocale( m_pConvArgs->nConvSrcLang ),
+ Boundary aBoundary( g_pBreakIt->GetBreakIter()->
+ getWordBoundary( aText, nPos, g_pBreakIt->GetLocale( m_pConvArgs->nConvSrcLang ),
WordType::DICTIONARY_WORD, sal_True ) );
// valid result found?
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 8dd405e82ab0..55cda295dd94 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -1632,7 +1632,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(),
EE_CHAR_FONTINFO );
- sal_uInt16 nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym );
+ sal_uInt16 nScriptBreak = g_pBreakIt->GetAllScriptsOfText( sSym );
if( SCRIPTTYPE_LATIN & nScriptBreak )
aSetFont.Put( aFontItem, EE_CHAR_FONTINFO );
if( SCRIPTTYPE_ASIAN & nScriptBreak )
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 5601cc940b5f..e60e5ffc9478 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -794,7 +794,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(),
EE_CHAR_FONTINFO );
- nScript = pBreakIt->GetAllScriptsOfText( sSym );
+ nScript = g_pBreakIt->GetAllScriptsOfText( sSym );
if( SCRIPTTYPE_LATIN & nScript )
aFontAttribSet.Put( aFontItem, EE_CHAR_FONTINFO );
if( SCRIPTTYPE_ASIAN & nScript )
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index e41a40b04275..894528bb5a41 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -1042,7 +1042,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT, 0 );
- nScript = pBreakIt->GetAllScriptsOfText( aChars );
+ nScript = g_pBreakIt->GetAllScriptsOfText( aChars );
if( SCRIPTTYPE_LATIN & nScript )
{
aRestoreSet.Put( aSet.Get( RES_CHRATR_FONT, sal_True ) );