summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accpara.cxx14
-rw-r--r--sw/source/core/access/accportions.cxx6
-rw-r--r--sw/source/core/bastyp/breakit.cxx37
-rw-r--r--sw/source/core/bastyp/calc.cxx12
-rw-r--r--sw/source/core/bastyp/init.cxx28
-rw-r--r--sw/source/core/crsr/callnk.cxx6
-rw-r--r--sw/source/core/crsr/findtxt.cxx2
-rw-r--r--sw/source/core/crsr/swcrsr.cxx44
-rw-r--r--sw/source/core/doc/docdesc.cxx4
-rw-r--r--sw/source/core/doc/docedt.cxx4
-rw-r--r--sw/source/core/doc/docfmt.cxx8
-rw-r--r--sw/source/core/doc/docruby.cxx6
-rw-r--r--sw/source/core/doc/doctxm.cxx2
-rw-r--r--sw/source/core/doc/poolfmt.cxx16
-rw-r--r--sw/source/core/docnode/node.cxx8
-rw-r--r--sw/source/core/edit/edattr.cxx16
-rw-r--r--sw/source/core/fields/docufld.cxx10
-rw-r--r--sw/source/core/fields/fldbas.cxx2
-rw-r--r--sw/source/core/inc/GetMetricVal.hxx2
-rw-r--r--sw/source/core/text/guess.cxx6
-rw-r--r--sw/source/core/text/itratr.cxx8
-rw-r--r--sw/source/core/text/porfld.cxx14
-rw-r--r--sw/source/core/text/porlay.cxx24
-rw-r--r--sw/source/core/text/pormulti.cxx2
-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.cxx4
-rw-r--r--sw/source/core/text/txthyph.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx8
-rw-r--r--sw/source/core/txtnode/fntcap.cxx10
-rw-r--r--sw/source/core/txtnode/txatritr.cxx22
-rw-r--r--sw/source/core/txtnode/txtedt.cxx24
-rw-r--r--sw/source/core/view/vprint.cxx3
-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/rtf/rtfatr.cxx12
-rw-r--r--sw/source/filter/rtf/rtffld.cxx4
-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.cxx26
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx4
-rw-r--r--sw/source/ui/app/docstyle.cxx3
-rw-r--r--sw/source/ui/config/usrpref.cxx4
-rw-r--r--sw/source/ui/config/viewopt.cxx3
-rw-r--r--sw/source/ui/docvw/edtwin.cxx7
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx2
-rw-r--r--sw/source/ui/misc/pgfnote.cxx3
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx20
-rw-r--r--sw/source/ui/utlui/initui.cxx3
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx2
-rw-r--r--sw/source/ui/utlui/uitool.cxx3
53 files changed, 275 insertions, 239 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 42b164185fbb..ced1e6261c7b 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -668,8 +668,8 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
// now ask the Break-Iterator for the word
DBG_ASSERT( pBreakIt != NULL, "We always need a break." );
- DBG_ASSERT( pBreakIt->xBreak.is(), "No break-iterator." );
- if( pBreakIt->xBreak.is() )
+ DBG_ASSERT( pBreakIt->GetBreakIter().is(), "No break-iterator." );
+ if( pBreakIt->GetBreakIter().is() )
{
// get locale for this position
USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
@@ -681,7 +681,7 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
const USHORT nWordType = WordType::ANY_WORD;
// get word boundary, as the Break-Iterator sees fit.
- rBound = pBreakIt->xBreak->getWordBoundary(
+ rBound = pBreakIt->GetBreakIter()->getWordBoundary(
rText, nPos, aLocale, nWordType, sal_True );
// It's a word if the first character is an alpha-numeric character.
@@ -748,8 +748,8 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
// ask the Break-Iterator for the glyph by moving one cell
// forward, and then one cell back
DBG_ASSERT( pBreakIt != NULL, "We always need a break." );
- DBG_ASSERT( pBreakIt->xBreak.is(), "No break-iterator." );
- if( pBreakIt->xBreak.is() )
+ DBG_ASSERT( pBreakIt->GetBreakIter().is(), "No break-iterator." );
+ if( pBreakIt->GetBreakIter().is() )
{
// get locale for this position
USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
@@ -759,9 +759,9 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
// get word boundary, as the Break-Iterator sees fit.
const USHORT nIterMode = CharacterIteratorMode::SKIPCELL;
sal_Int32 nDone = 0;
- rBound.endPos = pBreakIt->xBreak->nextCharacters(
+ rBound.endPos = pBreakIt->GetBreakIter()->nextCharacters(
rText, nPos, aLocale, nIterMode, 1, nDone );
- rBound.startPos = pBreakIt->xBreak->previousCharacters(
+ rBound.startPos = pBreakIt->GetBreakIter()->previousCharacters(
rText, rBound.endPos, aLocale, nIterMode, 1, nDone );
DBG_ASSERT( rBound.startPos <= nPos, "start pos too high" );
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index fb80f040bdd0..48f4b23136b9 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -489,8 +489,8 @@ void SwAccessiblePortionData::GetSentenceBoundary(
if( pSentences == NULL )
{
DBG_ASSERT( pBreakIt != NULL, "We always need a break." );
- DBG_ASSERT( pBreakIt->xBreak.is(), "No break-iterator." );
- if( pBreakIt->xBreak.is() )
+ DBG_ASSERT( pBreakIt->GetBreakIter().is(), "No break-iterator." );
+ if( pBreakIt->GetBreakIter().is() )
{
pSentences = new Positions_t();
pSentences->reserve(10);
@@ -505,7 +505,7 @@ void SwAccessiblePortionData::GetSentenceBoundary(
USHORT nModelPos = GetModelPosition( nCurrent );
- sal_Int32 nNew = pBreakIt->xBreak->endOfSentence(
+ sal_Int32 nNew = pBreakIt->GetBreakIter()->endOfSentence(
sAccessibleString, nCurrent,
pBreakIt->GetLocale(pTxtNode->GetLang(nModelPos)) ) + 1;
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index 1dd1616df3b7..4d51a36bfb5d 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -74,18 +74,18 @@ SwBreakIt::SwBreakIt(
aForbiddenLang( LANGUAGE_DONTKNOW)
{
DBG_ASSERT( m_xMSF.is(), "SwBreakIt: no MultiServiceFactory" );
- if ( m_xMSF.is() )
- {
- xBreak = uno::Reference< i18n::XBreakIterator >(
- m_xMSF->createInstance(
- rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ),
- uno::UNO_QUERY);
-
- xCTLDetect = uno::Reference< i18n::XScriptTypeDetector >(
- m_xMSF->createInstance(
- rtl::OUString::createFromAscii( "com.sun.star.i18n.ScriptTypeDetector" ) ),
- uno::UNO_QUERY);
- }
+ //if ( m_xMSF.is() )
+ //{
+ // xBreak = uno::Reference< i18n::XBreakIterator >(
+ // m_xMSF->createInstance(
+ // rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ),
+ // uno::UNO_QUERY);
+
+ // xCTLDetect = uno::Reference< i18n::XScriptTypeDetector >(
+ // m_xMSF->createInstance(
+ // rtl::OUString::createFromAscii( "com.sun.star.i18n.ScriptTypeDetector" ) ),
+ // uno::UNO_QUERY);
+ // }
}
SwBreakIt::~SwBreakIt()
@@ -93,7 +93,16 @@ SwBreakIt::~SwBreakIt()
delete m_pLocale;
delete m_pForbidden;
}
-
+void SwBreakIt::createBreakIterator() const
+{
+ if ( m_xMSF.is() && !xBreak.is() )
+ xBreak.set(m_xMSF->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator"))),uno::UNO_QUERY);
+}
+void SwBreakIt::createScriptTypeDetector()
+{
+ if ( m_xMSF.is() && !xCTLDetect.is() )
+ xCTLDetect.set(m_xMSF->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.ScriptTypeDetector" ))),uno::UNO_QUERY);
+}
void SwBreakIt::_GetLocale( const LanguageType aLang )
{
aLast = aLang;
@@ -113,6 +122,7 @@ void SwBreakIt::_GetForbidden( const LanguageType aLang )
USHORT SwBreakIt::GetRealScriptOfText( const String& rTxt,
xub_StrLen nPos ) const
{
+ createBreakIterator();
USHORT nScript = i18n::ScriptType::WEAK;
if( xBreak.is() && rTxt.Len() )
{
@@ -151,6 +161,7 @@ USHORT SwBreakIt::GetAllScriptsOfText( const String& rTxt ) const
const USHORT coAllScripts = ( SCRIPTTYPE_LATIN |
SCRIPTTYPE_ASIAN |
SCRIPTTYPE_COMPLEX );
+ createBreakIterator();
USHORT nRet = 0, nScript;
if( !xBreak.is() )
nRet = coAllScripts;
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 2e14358afc5f..aba5dbc74283 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -273,7 +273,7 @@ SwCalc::SwCalc( SwDoc& rD )
:
aErrExpr( aEmptyStr, SwSbxValue(), 0 ),
rDoc( rD ),
- pLclData( &GetAppLocaleData() ),
+ pLclData( &SvtSysLocale().GetLocaleData() ),
pCharClass( &GetAppCharClass() ),
nListPor( 0 ),
eError( CALC_NOERR )
@@ -422,7 +422,7 @@ SwCalc::~SwCalc()
{
for( USHORT n = 0; n < TBLSZ; ++n )
delete VarTable[n];
- if( pLclData != &GetAppLocaleData() )
+ if( pLclData != &SvtSysLocale().GetLocaleData() )
delete pLclData;
if( pCharClass != &GetAppCharClass() )
delete pCharClass;
@@ -1622,7 +1622,7 @@ BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
{
const LocaleDataWrapper* pLclD = pLclData;
if( !pLclD )
- pLclD = &GetAppLocaleData();
+ pLclD = &SvtSysLocale().GetLocaleData();
const xub_Unicode nCurrCmdPos = rCommandPos;
rtl_math_ConversionStatus eStatus;
@@ -1634,7 +1634,7 @@ BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
&eStatus, &pEnd );
rCommandPos = static_cast<xub_StrLen>(pEnd - rCommand.GetBuffer());
- if( !pLclData && pLclD != &GetAppLocaleData() )
+ if( !pLclData && pLclD != &SvtSysLocale().GetLocaleData() )
delete (LocaleDataWrapper*)pLclD;
return rtl_math_ConversionStatus_Ok == eStatus && nCurrCmdPos != rCommandPos;
@@ -1643,7 +1643,7 @@ BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
double& rVal, SwDoc* pDoc )
{
- const LocaleDataWrapper* pLclD = &GetAppLocaleData();
+ const LocaleDataWrapper* pLclD = &SvtSysLocale().GetLocaleData();
if( pDoc )
{
@@ -1664,7 +1664,7 @@ BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
&eStatus, &pEnd );
rCommandPos = static_cast<xub_StrLen>(pEnd - rCommand.GetBuffer());
- if( pLclD != &GetAppLocaleData() )
+ if( pLclD != &SvtSysLocale().GetLocaleData() )
delete (LocaleDataWrapper*)pLclD;
return rtl_math_ConversionStatus_Ok == eStatus && nCurrCmdPos != rCommandPos;
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 9563a51324bb..97ec66969d28 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -467,14 +467,18 @@ SwAutoCompleteWord* SwDoc::pACmpltWords = 0;
SwCheckIt* pCheckIt = 0;
CharClass* pAppCharClass = 0;
-SwCalendarWrapper* pCalendarWrapper = 0;
+
CollatorWrapper* pCollator = 0, *pCaseCollator = 0;
::utl::TransliterationWrapper* pTransWrp = 0;
/******************************************************************************
* void _InitCore()
******************************************************************************/
-
+salhelper::SingletonRef<SwCalendarWrapper>* s_getCalendarWrapper()
+{
+ static salhelper::SingletonRef<SwCalendarWrapper> aCalendarWrapper;
+ return &aCalendarWrapper;
+}
void _InitCore()
{
SfxPoolItem* pItem;
@@ -740,9 +744,9 @@ void _InitCore()
SwBreakIt::_Create( xMSF );
pCheckIt = NULL;
- pAppCharClass = new CharClass(
- xMSF, SwBreakIt::Get()->GetLocale( (LanguageType)GetAppLanguage() ));
- pCalendarWrapper = new SwCalendarWrapper( xMSF );
+ /*pAppCharClass = new CharClass(
+ xMSF, SwBreakIt::Get()->GetLocale( (LanguageType)GetAppLanguage() ));*/
+ //pCalendarWrapper = new SwCalendarWrapper( xMSF );
_FrmInit();
_TextInit();
@@ -773,7 +777,6 @@ void _FinitCore()
SwBreakIt::_Delete();
delete pCheckIt;
delete pAppCharClass;
- delete pCalendarWrapper;
delete pCollator;
delete pCaseCollator;
@@ -856,16 +859,15 @@ void _FinitCore()
// returns the APP - CharClass instance - used for all ToUpper/ToLower/...
CharClass& GetAppCharClass()
{
+ if ( !pAppCharClass )
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
+ pAppCharClass = new CharClass(
+ xMSF, SwBreakIt::Get()->GetLocale( (LanguageType)GetAppLanguage() ));
+ }
return *pAppCharClass;
}
-LocaleDataWrapper& GetAppLocaleData()
-{
- SvtSysLocale aSysLocale;
- return (LocaleDataWrapper&)aSysLocale.GetLocaleData();
-}
-
-
void SwCalendarWrapper::LoadDefaultCalendar( USHORT eLang )
{
sUniqueId.Erase();
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 49142a2a5107..bf0974e3e9b1 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -171,12 +171,12 @@ SwCallLink::~SwCallLink()
}
}
- if( pBreakIt->xBreak.is() )
+ if( pBreakIt->GetBreakIter().is() )
{
const String& rTxt = ((SwTxtNode*)pCNd)->GetTxt();
if( !nCmp ||
- pBreakIt->xBreak->getScriptType( rTxt, nCmp )
- != pBreakIt->xBreak->getScriptType( rTxt, nCmp - 1 ))
+ pBreakIt->GetBreakIter()->getScriptType( rTxt, nCmp )
+ != 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 89686a3673bc..4736127597d4 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -456,7 +456,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
USHORT nCurrScript = 0;
if ( SearchAlgorithms_APPROXIMATE == rSearchOpt.algorithmType &&
- pBreakIt->xBreak.is() )
+ pBreakIt->GetBreakIter().is() )
{
pScriptIter = new SwScriptIterator( sCleanStr, nStart, bSrchForward );
nSearchScript = pBreakIt->GetRealScriptOfText( rSearchOpt.searchString, 0 );
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index b7a336b5929c..ea5853916b8c 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1188,10 +1188,10 @@ BOOL SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
{
BOOL bRet = FALSE;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->xBreak.is() )
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- bRet = pBreakIt->xBreak->isBeginWord(
+ bRet = pBreakIt->GetBreakIter()->isBeginWord(
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos )),
nWordType );
@@ -1203,10 +1203,10 @@ BOOL SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
{
BOOL bRet = FALSE;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->xBreak.is() )
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- bRet = pBreakIt->xBreak->isEndWord(
+ bRet = pBreakIt->GetBreakIter()->isEndWord(
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType );
@@ -1219,10 +1219,10 @@ BOOL SwCursor::IsInWordWT( sal_Int16 nWordType ) const
{
BOOL bRet = FALSE;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->xBreak.is() )
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- Boundary aBoundary = pBreakIt->xBreak->getWordBoundary(
+ Boundary aBoundary = pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
@@ -1261,11 +1261,11 @@ BOOL SwCursor::GoStartWordWT( sal_Int16 nWordType )
{
BOOL bRet = FALSE;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->xBreak.is() )
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- nPtPos = (xub_StrLen)pBreakIt->xBreak->getWordBoundary(
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
@@ -1285,11 +1285,11 @@ BOOL SwCursor::GoEndWordWT( sal_Int16 nWordType )
{
BOOL bRet = FALSE;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->xBreak.is() )
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- nPtPos = (xub_StrLen)pBreakIt->xBreak->getWordBoundary(
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
@@ -1310,12 +1310,12 @@ BOOL SwCursor::GoNextWordWT( sal_Int16 nWordType )
{
BOOL bRet = FALSE;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->xBreak.is() )
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- nPtPos = (xub_StrLen)pBreakIt->xBreak->nextWord(
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->nextWord(
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
nWordType ).startPos;
@@ -1334,7 +1334,7 @@ BOOL SwCursor::GoPrevWordWT( sal_Int16 nWordType )
{
BOOL bRet = FALSE;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->xBreak.is() )
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
@@ -1342,7 +1342,7 @@ BOOL SwCursor::GoPrevWordWT( sal_Int16 nWordType )
if( nPtPos )
--nPtPos;
- nPtPos = (xub_StrLen)pBreakIt->xBreak->previousWord(
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->previousWord(
pTxtNd->GetTxt(), nPtStart,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
nWordType ).startPos;
@@ -1373,10 +1373,10 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
}
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->xBreak.is() )
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- Boundary aBndry( pBreakIt->xBreak->getWordBoundary(
+ Boundary aBndry( pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
@@ -1408,7 +1408,7 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
{
BOOL bRet = FALSE;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->xBreak.is() )
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
//mask deleted redlines
String sNodeText(pTxtNd->GetTxt());
@@ -1438,14 +1438,14 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
switch ( eMoveType )
{
case END_SENT:
- nPtPos = (xub_StrLen)pBreakIt->xBreak->endOfSentence(
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence(
sNodeText,
nPtPos, pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
break;
case NEXT_SENT:
{
- nPtPos = (xub_StrLen)pBreakIt->xBreak->endOfSentence(
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence(
sNodeText,
nPtPos, pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
@@ -1455,20 +1455,20 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
break;
}
case START_SENT:
- nPtPos = (xub_StrLen)pBreakIt->xBreak->beginOfSentence(
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
nPtPos, pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
break;
case PREV_SENT:
- nPtPos = (xub_StrLen)pBreakIt->xBreak->beginOfSentence(
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
nPtPos, pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
if (nPtPos == 0)
return FALSE; // the previous sentence is not in this paragraph
if (nPtPos > 0)
- nPtPos = (xub_StrLen)pBreakIt->xBreak->beginOfSentence(
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
nPtPos - 1, pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index d19a7bbbc09e..12e5d597a7c4 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -70,7 +70,7 @@
#include <fldbas.hxx>
#include <swwait.hxx>
#include <GetMetricVal.hxx>
-
+#include <svtools/syslocale.hxx>
#ifndef _STATSTR_HRC
#include <statstr.hrc>
#endif
@@ -111,7 +111,7 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId,
nMinRight = nMinTop = nMinBottom = GetMetricVal( CM_1 );
nMinLeft = nMinRight * 2;
}
- else if( MEASURE_METRIC == GetAppLocaleData().getMeasurementSystemEnum() )
+ else if( MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum() )
{
nMinTop = nMinBottom = nMinLeft = nMinRight = 1134; //2 Zentimeter
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 16ceedbeefc6..cf55334fadc1 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -2619,8 +2619,8 @@ void SwDoc::TransliterateText( const SwPaM& rPaM,
if( pStt == pEnd && pTNd ) // no region ?
{
Boundary aBndry;
- if( pBreakIt->xBreak.is() )
- aBndry = pBreakIt->xBreak->getWordBoundary(
+ if( pBreakIt->GetBreakIter().is() )
+ aBndry = pBreakIt->GetBreakIter()->getWordBoundary(
pTNd->GetTxt(), nSttCnt,
pBreakIt->GetLocale( pTNd->GetLang( nSttCnt ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 9db1c98685f3..f3c7fa2e4bf9 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -411,8 +411,8 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
else
{
Boundary aBndry;
- if( pBreakIt->xBreak.is() )
- aBndry = pBreakIt->xBreak->getWordBoundary(
+ if( pBreakIt->GetBreakIter().is() )
+ aBndry = pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
@@ -909,8 +909,8 @@ BOOL InsAttr( SwDoc *pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
else
{
Boundary aBndry;
- if( pBreakIt->xBreak.is() )
- aBndry = pBreakIt->xBreak->getWordBoundary(
+ if( pBreakIt->GetBreakIter().is() )
+ aBndry = pBreakIt->GetBreakIter()->getWordBoundary(
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 2c8f36e9f9b8..1237614825d3 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -246,7 +246,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
if( !bHasMark && nStart && ( !pAttr || nStart != *pAttr->GetStart()) )
{
// skip to the word begin!
- long nWordStt = pBreakIt->xBreak->getWordBoundary(
+ long nWordStt = pBreakIt->GetBreakIter()->getWordBoundary(
*pTxt, nStart,
pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
@@ -335,10 +335,10 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
{
rPam.SetMark();
bAlphaNum = bIsAlphaNum;
- if( bChkNxtWrd && pBreakIt->xBreak.is() )
+ if( bChkNxtWrd && pBreakIt->GetBreakIter().is() )
{
// search the end of this word
- nWordEnd = pBreakIt->xBreak->getWordBoundary(
+ nWordEnd = pBreakIt->GetBreakIter()->getWordBoundary(
*pTxt, nStart,
pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 0d9607b290c6..6cc034c572d8 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1245,7 +1245,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
{
// Stichwortverzeichnismarkierung
lang::Locale aLocale;
- if ( pBreakIt->xBreak.is() )
+ if ( pBreakIt->GetBreakIter().is() )
{
aLocale = pBreakIt->GetLocale(
pTOXSrc->GetLang( *pTxtMark->GetStart() ) );
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 065d0085de64..5e2b2fead999 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -1719,7 +1719,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
const USHORT* pArr = MEASURE_METRIC ==
- GetAppLocaleData().getMeasurementSystemEnum()
+ SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
@@ -1773,7 +1773,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
};
const USHORT* pArr = MEASURE_METRIC ==
- GetAppLocaleData().getMeasurementSystemEnum()
+ SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
@@ -1876,7 +1876,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
const USHORT* pArr = MEASURE_METRIC ==
- GetAppLocaleData().getMeasurementSystemEnum()
+ SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
@@ -1930,7 +1930,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
347, 1194
};
const USHORT* pArr0to2 = MEASURE_METRIC ==
- GetAppLocaleData().getMeasurementSystemEnum()
+ SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace0to2
: aAbsSpaceInch0to2;
#else
@@ -2070,7 +2070,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
const USHORT* pArr = MEASURE_METRIC ==
- GetAppLocaleData().getMeasurementSystemEnum()
+ SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
@@ -2131,7 +2131,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
170, 340, 510, 680, 850, 1020, 1191, 1361, 1531, 1701
};
const USHORT* pArr = MEASURE_METRIC ==
- GetAppLocaleData().getMeasurementSystemEnum()
+ SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
@@ -2236,7 +2236,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
const USHORT* pArr = MEASURE_METRIC ==
- GetAppLocaleData().getMeasurementSystemEnum()
+ SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
@@ -2303,7 +2303,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
const USHORT* pArr = MEASURE_METRIC ==
- GetAppLocaleData().getMeasurementSystemEnum()
+ SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index acd1ceabce9b..61dd90bc509c 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1249,13 +1249,13 @@ BOOL SwCntntNode::GoNext(SwIndex * pIdx, USHORT nMode ) const
{
const SwTxtNode& rTNd = *GetTxtNode();
xub_StrLen nPos = pIdx->GetIndex();
- if( pBreakIt->xBreak.is() )
+ if( pBreakIt->GetBreakIter().is() )
{
sal_Int32 nDone = 0;
sal_uInt16 nItrMode = ( CRSR_SKIP_CELLS & nMode ) ?
CharacterIteratorMode::SKIPCELL :
CharacterIteratorMode::SKIPCONTROLCHARACTER;
- nPos = (xub_StrLen)pBreakIt->xBreak->nextCharacters( rTNd.GetTxt(), nPos,
+ nPos = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharacters( rTNd.GetTxt(), nPos,
pBreakIt->GetLocale( rTNd.GetLang( nPos ) ),
nItrMode, 1, nDone );
@@ -1297,13 +1297,13 @@ BOOL SwCntntNode::GoPrevious(SwIndex * pIdx, USHORT nMode ) const
{
const SwTxtNode& rTNd = *GetTxtNode();
xub_StrLen nPos = pIdx->GetIndex();
- if( pBreakIt->xBreak.is() )
+ if( pBreakIt->GetBreakIter().is() )
{
sal_Int32 nDone = 0;
sal_uInt16 nItrMode = ( CRSR_SKIP_CELLS & nMode ) ?
CharacterIteratorMode::SKIPCELL :
CharacterIteratorMode::SKIPCONTROLCHARACTER;
- nPos = (xub_StrLen)pBreakIt->xBreak->previousCharacters( rTNd.GetTxt(), nPos,
+ nPos = (xub_StrLen)pBreakIt->GetBreakIter()->previousCharacters( rTNd.GetTxt(), nPos,
pBreakIt->GetLocale( rTNd.GetLang( nPos ) ),
nItrMode, 1, nDone );
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 2bf30449f33b..5d1b4fb43c94 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -474,14 +474,14 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
{
USHORT nScript;
for( n = 0; n < nEnd; n = (xub_StrLen)
- pBreakIt->xBreak->endOfScript( sExp, n, nScript ))
+ pBreakIt->GetBreakIter()->endOfScript( sExp, n, nScript ))
{
- nScript = pBreakIt->xBreak->getScriptType( sExp, n );
+ nScript = pBreakIt->GetBreakIter()->getScriptType( sExp, n );
rScrpt |= lcl_SetScriptFlags( nScript );
}
}
else
- rScrpt |= lcl_SetScriptFlags( pBreakIt->xBreak->
+ rScrpt |= lcl_SetScriptFlags( pBreakIt->GetBreakIter()->
getScriptType( sExp, nEnd-1 ));
}
@@ -493,7 +493,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
USHORT SwEditShell::GetScriptType() const
{
USHORT nRet = 0;
- if( pBreakIt->xBreak.is() )
+ //if( pBreakIt->GetBreakIter().is() )
{
FOREACHPAM_START(this)
@@ -525,7 +525,7 @@ USHORT SwEditShell::GetScriptType() const
{
nScript = pScriptInfo ?
pScriptInfo->ScriptType( nPos ) :
- pBreakIt->xBreak->getScriptType( pTNd->GetTxt(), nPos );
+ pBreakIt->GetBreakIter()->getScriptType( pTNd->GetTxt(), nPos );
}
else
nScript = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
@@ -534,7 +534,7 @@ USHORT SwEditShell::GetScriptType() const
nRet |= lcl_SetScriptFlags( nScript );
}
}
- else
+ else if ( pBreakIt->GetBreakIter().is() )
{
ULONG nEndIdx = pEnd->nNode.GetIndex();
SwNodeIndex aIdx( pStt->nNode );
@@ -563,7 +563,7 @@ USHORT SwEditShell::GetScriptType() const
{
nScript = pScriptInfo ?
pScriptInfo->ScriptType( nChg ) :
- pBreakIt->xBreak->getScriptType(
+ pBreakIt->GetBreakIter()->getScriptType(
rTxt, nChg );
if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, TRUE,
@@ -578,7 +578,7 @@ USHORT SwEditShell::GetScriptType() const
nChg = pScriptInfo ?
pScriptInfo->NextScriptChg( nChg ) :
- (xub_StrLen)pBreakIt->xBreak->endOfScript(
+ (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(
rTxt, nChg, nScript );
nFldPos = rTxt.Search(
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index cdb73706b3c2..6bb8ff4902ea 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -66,6 +66,7 @@
#endif
#include <svtools/urihelper.hxx>
#include <svtools/useroptions.hxx>
+#include <svtools/syslocale.hxx>
#include <tools/time.hxx>
#include <tools/datetime.hxx>
@@ -931,10 +932,11 @@ SwFieldType* SwDocInfoFieldType::Copy() const
}
void lcl_GetLocalDataWrapper( ULONG nLang,
- LocaleDataWrapper **ppAppLocalData,
- LocaleDataWrapper **ppLocalData )
+ const LocaleDataWrapper **ppAppLocalData,
+ const LocaleDataWrapper **ppLocalData )
{
- *ppAppLocalData = &GetAppLocaleData();
+ SvtSysLocale aLocale;
+ *ppAppLocalData = &aLocale.GetLocaleData();
*ppLocalData = *ppAppLocalData;
if( nLang != SvxLocaleToLanguage( (*ppLocalData)->getLocale() ) )
*ppLocalData = new LocaleDataWrapper(
@@ -949,7 +951,7 @@ String SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat,
sal_uInt16 nLang, const String& rName ) const
{
String aStr;
- LocaleDataWrapper *pAppLocalData = 0, *pLocalData = 0;
+ const LocaleDataWrapper *pAppLocalData = 0, *pLocalData = 0;
SwDocShell *pDocShell(GetDoc()->GetDocShell());
DBG_ASSERT(pDocShell, "no SwDocShell");
if (!pDocShell) { return aStr; }
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 3de792b4f0ac..a06f595293aa 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -611,7 +611,7 @@ SwFieldType* SwValueField::ChgTyp( SwFieldType* pNewType )
sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt)
{
const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt);
- USHORT nLng = SvxLocaleToLanguage( GetAppLocaleData().getLocale() );
+ USHORT nLng = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
if (pEntry && nLng != pEntry->GetLanguage())
{
diff --git a/sw/source/core/inc/GetMetricVal.hxx b/sw/source/core/inc/GetMetricVal.hxx
index 5d16d43fb1f9..9db99426dc03 100644
--- a/sw/source/core/inc/GetMetricVal.hxx
+++ b/sw/source/core/inc/GetMetricVal.hxx
@@ -39,7 +39,7 @@
inline USHORT GetMetricVal( int n )
{
#ifdef USE_MEASUREMENT
- USHORT nVal = MEASURE_METRIC == GetAppLocaleData().getMeasurementSystemEnum()
+ USHORT nVal = MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? 567 // 1 cm
: 770; // 1/2 Inch
#else
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 5a0a600370aa..a5eba7301052 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -243,7 +243,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
nBreakStart = nCutPos;
}
- else if( pBreakIt->xBreak.is() )
+ else if( 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
@@ -366,7 +366,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// determines first possible line break from nRightPos to
// start index of current line
- LineBreakResults aResult = pBreakIt->xBreak->getLineBreak(
+ LineBreakResults aResult = pBreakIt->GetBreakIter()->getLineBreak(
rInf.GetTxt(), nCutPos, aLocale,
rInf.GetLineStart(), aHyphOpt, aUserOpt );
@@ -534,7 +534,7 @@ sal_Bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
xub_StrLen nWordLen;
Boundary aBound =
- pBreakIt->xBreak->getWordBoundary( rInf.GetTxt(), nPos,
+ pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nPos,
pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
WordType::DICTIONARY_WORD, sal_True );
nBreakStart = (xub_StrLen)aBound.startPos;
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 82d88875090d..bf5e1b041d4e 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -400,10 +400,10 @@ sal_Bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const XubString &rT
xub_StrLen nStop = nIdx;
sal_Bool bClear;
LanguageType eLang = pFnt->GetLanguage();
- if( pBreakIt->xBreak.is() )
+ if( pBreakIt->GetBreakIter().is() )
{
bClear = CH_BLANK == rTxt.GetChar( nStop );
- Boundary aBndry( pBreakIt->xBreak->getWordBoundary( rTxt, nIdx,
+ Boundary aBndry( pBreakIt->GetBreakIter()->getWordBoundary( rTxt, nIdx,
pBreakIt->GetLocale( eLang ),
WordType::DICTIONARY_WORD, TRUE ) );
nStop = (xub_StrLen)aBndry.endPos;
@@ -870,7 +870,7 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
if ( nStt == nEnd )
{
- if ( !pBreakIt->xBreak.is() )
+ if ( !pBreakIt->GetBreakIter().is() )
return 100;
SwScriptInfo aScriptInfo;
@@ -878,7 +878,7 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
aIter.SeekAndChgAttrIter( nStt, pOut );
Boundary aBound =
- pBreakIt->xBreak->getWordBoundary( GetTxt(), nStt,
+ pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), nStt,
pBreakIt->GetLocale( aIter.GetFnt()->GetLanguage() ),
WordType::DICTIONARY_WORD, sal_True );
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 0a8597800aed..b9fdc5cfc2f7 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -215,25 +215,25 @@ SwFldSlot::~SwFldSlot()
void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
{
String aTxt;
- if( GetExpTxt( rInf, aTxt ) && aTxt.Len() && pBreakIt->xBreak.is() )
+ if( GetExpTxt( rInf, aTxt ) && aTxt.Len() && pBreakIt->GetBreakIter().is() )
{
BYTE nActual = pFnt ? pFnt->GetActual() : rInf.GetFont()->GetActual();
USHORT nScript;
{
- nScript = pBreakIt->xBreak->getScriptType( aTxt, 0 );
+ nScript = pBreakIt->GetBreakIter()->getScriptType( aTxt, 0 );
xub_StrLen nChg = 0;
if( i18n::ScriptType::WEAK == nScript )
{
- nChg =(xub_StrLen)pBreakIt->xBreak->endOfScript(aTxt,0,nScript);
+ nChg =(xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(aTxt,0,nScript);
if( nChg < aTxt.Len() )
- nScript = pBreakIt->xBreak->getScriptType( aTxt, nChg );
+ nScript = pBreakIt->GetBreakIter()->getScriptType( aTxt, nChg );
}
//
// nNextScriptChg will be evaluated during SwFldPortion::Format()
//
if ( nChg < aTxt.Len() )
- nNextScriptChg = (xub_StrLen)pBreakIt->xBreak->endOfScript( aTxt, nChg, nScript );
+ nNextScriptChg = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( aTxt, nChg, nScript );
else
nNextScriptChg = aTxt.Len();
@@ -1127,12 +1127,12 @@ SwCombinedPortion::SwCombinedPortion( const XubString &rTxt )
aExpand.Erase( 6 );
// Initialization of the scripttype array,
// the arrays of width and position are filled by the format function
- if( pBreakIt->xBreak.is() )
+ if( pBreakIt->GetBreakIter().is() )
{
BYTE nScr = SW_SCRIPTS;
for( USHORT i = 0; i < rTxt.Len(); ++i )
{
- USHORT nScript = pBreakIt->xBreak->getScriptType( rTxt, i );
+ USHORT nScript = 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 b4b739528cd7..72434f7af613 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -798,7 +798,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode )
void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
{
- if( !pBreakIt->xBreak.is() )
+ if( !pBreakIt->GetBreakIter().is() )
return;
const String& rTxt = rNode.GetTxt();
@@ -907,13 +907,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->xBreak->getScriptType( rTxt, nChg ) )
+ nScript != 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 = (BYTE)pBreakIt->xBreak->getScriptType( rTxt, nChg );
+ nScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
//
// INVALID DATA FROM THE SCRIPT INFO ARRAYS HAS TO BE DELETED:
@@ -959,14 +959,14 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// SCRIPT FOR WEAK CHARACTERS AT THE BEGINNING OF A PARAGRAPH
//
- if( WEAK == pBreakIt->xBreak->getScriptType( rTxt, nChg ) )
+ if( WEAK == 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->xBreak->endOfScript( rTxt, nChg, WEAK );
+ (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rTxt, nChg, WEAK );
if( nEnd > rTxt.Len() )
nEnd = rTxt.Len();
@@ -981,7 +981,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// Get next script type or set to weak in order to exit
BYTE nNextScript = ( nEnd < rTxt.Len() ) ?
- (BYTE)pBreakIt->xBreak->getScriptType( rTxt, nEnd ) :
+ (BYTE)pBreakIt->GetBreakIter()->getScriptType( rTxt, nEnd ) :
(BYTE)WEAK;
if ( nScript != nNextScript )
@@ -1003,7 +1003,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
ASSERT( STRING_LEN != nChg, "65K? Strange length of script section" );
xub_StrLen nSearchStt = nChg;
- nChg = (xub_StrLen)pBreakIt->xBreak->endOfScript( rTxt, nSearchStt, nScript );
+ nChg = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rTxt, nSearchStt, nScript );
if ( nChg > rTxt.Len() )
nChg = rTxt.Len();
@@ -1011,16 +1011,16 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// --> FME 2008-09-17 #i28203#
// for 'complex' portions, we make sure that a portion does not contain more
// than one script:
- if( pBreakIt->xCTLDetect.is() && i18n::ScriptType::COMPLEX == nScript )
+ if( i18n::ScriptType::COMPLEX == nScript && pBreakIt->GetScriptTypeDetector().is() )
{
- const short nScriptType = pBreakIt->xCTLDetect->getCTLScriptType( rTxt, nSearchStt );
+ const short nScriptType = pBreakIt->GetScriptTypeDetector()->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->xCTLDetect->endOfCTLScriptType( rTxt, nNextCTLScriptStart );
+ nNextCTLScriptStart = (xub_StrLen)pBreakIt->GetScriptTypeDetector()->endOfCTLScriptType( rTxt, nNextCTLScriptStart );
if( nNextCTLScriptStart < rTxt.Len() && nNextCTLScriptStart < nChg )
- nCurrentScriptType = pBreakIt->xCTLDetect->getCTLScriptType( rTxt, nNextCTLScriptStart );
+ nCurrentScriptType = pBreakIt->GetScriptTypeDetector()->getCTLScriptType( rTxt, nNextCTLScriptStart );
else
break;
}
@@ -1287,7 +1287,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
}
if ( nChg < rTxt.Len() )
- nScript = (BYTE)pBreakIt->xBreak->getScriptType( rTxt, nChg );
+ nScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
nLastCompression = nChg;
nLastKashida = nChg;
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 0776feeeb21d..4ea048f28aad 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -916,7 +916,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
// for 99% of all cases
XubString aTxt = GetTxtFrm()->GetTxtNode()->GetExpandTxt( rPos, 1 );
- if ( pBreakIt->xBreak.is() && aTxt.Len() )
+ if ( pBreakIt->GetBreakIter().is() && aTxt.Len() )
{
sal_Bool bFldDir = ( i18n::ScriptType::COMPLEX ==
pBreakIt->GetRealScriptOfText( aTxt, 0 ) );
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 17b4e6a5ec41..eec34ffe5b66 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -97,8 +97,8 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
// first we get the script type
if ( pSI )
nScript = pSI->ScriptType( nPos );
- else if ( pBreakIt->xBreak.is() )
- nScript = (BYTE)pBreakIt->xBreak->getScriptType( *pStr, nPos );
+ else if ( pBreakIt->GetBreakIter().is() )
+ nScript = (BYTE)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
@@ -198,7 +198,7 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
if ( pPor && pPor->IsKernPortion() )
pPor = pPor->GetPortion();
- if ( ! pBreakIt->xBreak.is() || ! pPor || pPor->InFixMargGrp() )
+ if ( ! pBreakIt->GetBreakIter().is() || ! pPor || pPor->InFixMargGrp() )
return nCnt;
// next character is inside a field?
@@ -211,10 +211,10 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
pPor->GetExpTxt( rInf, aStr );
((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
- nNextScript = (BYTE)pBreakIt->xBreak->getScriptType( aStr, 0 );
+ nNextScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( aStr, 0 );
}
else
- nNextScript = (BYTE)pBreakIt->xBreak->getScriptType( rInf.GetTxt(), nPos );
+ nNextScript = (BYTE)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 3962598c9f1c..1f7824c446f4 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -110,7 +110,7 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
if ( pScriptInfo->GetInvalidity() != STRING_LEN )
pScriptInfo->InitScriptInfo( rTxtNode, bRTL );
- if ( pBreakIt->xBreak.is() )
+ if ( 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 c6b100f1b746..ce269743f866 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -179,7 +179,7 @@ MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const
if( nWishLen && nWishLen < nEnd )
nEnd = nWishLen;
- if ( ! nWishLen && pBreakIt->xBreak.is() )
+ if ( ! nWishLen && pBreakIt->GetBreakIter().is() )
{
// find first word
const SwAttrSet& rAttrSet = GetSwAttrSet();
@@ -201,7 +201,7 @@ MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const
}
Boundary aBound =
- pBreakIt->xBreak->getWordBoundary( GetTxt(), 0,
+ pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), 0,
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 d00c29865b0b..81a5c98e1913 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -89,7 +89,7 @@ sal_Bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
{
ASSERT( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTxtFrm::Hyphenate" );
- if( !pBreakIt->xBreak.is() )
+ if( !pBreakIt->GetBreakIter().is() )
return sal_False;;
// Wir machen den Laden erstmal dicht:
ASSERT( !IsLocked(), "SwTxtFrm::Hyphenate: this is locked" );
@@ -254,7 +254,7 @@ sal_Bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
Reference< XHyphenatedWord > xHyphWord;
Boundary aBound =
- pBreakIt->xBreak->getWordBoundary( rInf.GetTxt(), nWrdStart,
+ pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nWrdStart,
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);
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 3f8c9914c10f..9952c50e678d 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2425,7 +2425,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
// skip character cells for complex scripts
if ( rInf.GetFont() && SW_CTL == rInf.GetFont()->GetActual() &&
- pBreakIt->xBreak.is() )
+ pBreakIt->GetBreakIter().is() )
{
aLang = rInf.GetFont()->GetLanguage();
bSkipCell = sal_True;
@@ -2441,7 +2441,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( bSkipCell )
{
- nIdx = (xub_StrLen)pBreakIt->xBreak->nextCharacters( rInf.GetText(),
+ nIdx = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharacters( rInf.GetText(),
nIdx, pBreakIt->GetLocale( aLang ), nItrMode, 1, nDone );
if ( nIdx <= nLastIdx )
break;
@@ -2704,13 +2704,13 @@ 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->xBreak.is();
+ 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->xBreak->isBeginWord(
+ if ( !pBreakIt->GetBreakIter()->isBeginWord(
rInf.GetText(), rInf.GetIdx(),
pBreakIt->GetLocale( aSub[nActual].GetLanguage() ),
i18n::WordType::ANYWORD_IGNOREWHITESPACES ) )
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index d9bd1bb44b03..160758d861b2 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -102,13 +102,13 @@ xub_StrLen lcl_CalcCaseMap( const SwFont& rFnt,
// special case for title case:
const bool bTitle = SVX_CASEMAP_TITEL == rFnt.GetCaseMap() &&
- pBreakIt->xBreak.is();
+ pBreakIt->GetBreakIter().is();
for ( xub_StrLen i = nOfst; i < nEnd; ++i )
{
XubString aTmp( rOrigString, i, 1 );
if ( !bTitle ||
- pBreakIt->xBreak->isBeginWord(
+ pBreakIt->GetBreakIter()->isBeginWord(
rOrigString, i,
pBreakIt->GetLocale( rFnt.GetLanguage() ),
WordType::ANYWORD_IGNOREWHITESPACES ) )
@@ -654,7 +654,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
if( nPos < nMaxPos )
{
- nPos = (xub_StrLen)pBreakIt->xBreak->endOfCharBlock( rOldText, nPos,
+ nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfCharBlock( rOldText, nPos,
pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
if( nPos == STRING_LEN )
nPos = nOldPos;
@@ -702,7 +702,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
rDo.Do();
nOldPos = nPos;
}
- nPos = (xub_StrLen)pBreakIt->xBreak->nextCharBlock( rOldText, nPos,
+ nPos = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharBlock( rOldText, nPos,
pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
if( nPos == STRING_LEN || nPos > nMaxPos )
nPos = nMaxPos;
@@ -816,7 +816,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
}
} while( nOldPos != nPos );
}
- nPos = (xub_StrLen)pBreakIt->xBreak->endOfCharBlock( rOldText, nPos,
+ nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfCharBlock( rOldText, nPos,
pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
if( nPos == STRING_LEN || nPos > nMaxPos )
nPos = nMaxPos;
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index b35c93bf8c89..7b83db43f5fa 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -55,50 +55,50 @@ SwScriptIterator::SwScriptIterator( const String& rStr, xub_StrLen nStt, sal_Boo
nCurScript( ScriptType::WEAK ),
bForward( bFrwrd )
{
- if( pBreakIt->xBreak.is() )
+ if( pBreakIt->GetBreakIter().is() )
{
if ( ! bFrwrd && nStt )
--nStt;
xub_StrLen nPos = nStt;
- nCurScript = pBreakIt->xBreak->getScriptType( rText, nPos );
+ nCurScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos );
if( ScriptType::WEAK == nCurScript )
{
if( nPos )
{
- nPos = (xub_StrLen)pBreakIt->xBreak->beginOfScript(
+ nPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfScript(
rText, nPos, nCurScript );
if( nPos && nPos < rText.Len() )
{
nStt = --nPos;
- nCurScript = pBreakIt->xBreak->getScriptType( rText,nPos);
+ nCurScript = pBreakIt->GetBreakIter()->getScriptType( rText,nPos);
}
}
}
nChgPos = bForward ?
- (xub_StrLen)pBreakIt->xBreak->endOfScript( rText, nStt, nCurScript ) :
- (xub_StrLen)pBreakIt->xBreak->beginOfScript( rText, nStt, nCurScript );
+ (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nStt, nCurScript ) :
+ (xub_StrLen)pBreakIt->GetBreakIter()->beginOfScript( rText, nStt, nCurScript );
}
}
sal_Bool SwScriptIterator::Next()
{
sal_Bool bRet = sal_False;
- if( pBreakIt->xBreak.is() )
+ if( pBreakIt->GetBreakIter().is() )
{
if ( bForward && nChgPos < rText.Len() )
{
- nCurScript = pBreakIt->xBreak->getScriptType( rText, nChgPos );
- nChgPos = (xub_StrLen)pBreakIt->xBreak->endOfScript(
+ nCurScript = pBreakIt->GetBreakIter()->getScriptType( rText, nChgPos );
+ nChgPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(
rText, nChgPos, nCurScript );
bRet = sal_True;
}
else if ( ! bForward && nChgPos )
{
--nChgPos;
- nCurScript = pBreakIt->xBreak->getScriptType( rText, nChgPos );
- nChgPos = (xub_StrLen)pBreakIt->xBreak->beginOfScript(
+ nCurScript = pBreakIt->GetBreakIter()->getScriptType( rText, nChgPos );
+ nChgPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfScript(
rText, nChgPos, nCurScript );
bRet = sal_True;
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 51e4963698a7..4080dc823a1e 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -682,7 +682,7 @@ XubString SwTxtNode::GetCurWord( xub_StrLen nPos ) const
return m_Text;
Boundary aBndry;
- const uno::Reference< XBreakIterator > &rxBreak = pBreakIt->xBreak;
+ const uno::Reference< XBreakIterator > &rxBreak = pBreakIt->GetBreakIter();
if (rxBreak.is())
{
sal_Int16 nWordType = WordType::DICTIONARY_WORD;
@@ -750,7 +750,7 @@ BOOL SwScanner::NextWord()
{
if ( !pLanguage )
{
- const USHORT nNextScriptType = pBreakIt->xBreak->getScriptType( rText, nBegin );
+ const USHORT nNextScriptType = pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
ModelToViewHelper::ModelPosition aModelBeginPos = ModelToViewHelper::ConvertToModelPosition( pConversionMap, nBegin );
const xub_StrLen nBeginModelPos = (xub_StrLen)aModelBeginPos.mnPos;
aCurrLang = rNode.GetLang( nBeginModelPos, 1, nNextScriptType );
@@ -772,7 +772,7 @@ BOOL SwScanner::NextWord()
return FALSE;
// get the word boundaries
- aBound = pBreakIt->xBreak->getWordBoundary( rText, nBegin,
+ aBound = pBreakIt->GetBreakIter()->getWordBoundary( rText, nBegin,
pBreakIt->GetLocale( aCurrLang ), nWordType, sal_True );
//no word boundaries could be found
@@ -795,11 +795,11 @@ BOOL SwScanner::NextWord()
// restrict boundaries to script boundaries and nEndPos
const USHORT nCurrScript =
- pBreakIt->xBreak->getScriptType( rText, nBegin );
+ pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
XubString aTmpWord = rText.Copy( nBegin, static_cast<xub_StrLen>(aBound.endPos - nBegin) );
const sal_Int32 nScriptEnd = nBegin +
- pBreakIt->xBreak->endOfScript( aTmpWord, 0, nCurrScript );
+ pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
const sal_Int32 nEnd = Min( aBound.endPos, nScriptEnd );
// restrict word start to last script change position
@@ -810,7 +810,7 @@ BOOL SwScanner::NextWord()
aTmpWord = rText.Copy( static_cast<xub_StrLen>(aBound.startPos),
static_cast<xub_StrLen>(nBegin - aBound.startPos + 1) );
nScriptBegin = aBound.startPos +
- pBreakIt->xBreak->beginOfScript( aTmpWord, nBegin - aBound.startPos,
+ pBreakIt->GetBreakIter()->beginOfScript( aTmpWord, nBegin - aBound.startPos,
nCurrScript );
}
@@ -820,11 +820,11 @@ BOOL SwScanner::NextWord()
else
{
const USHORT nCurrScript =
- pBreakIt->xBreak->getScriptType( rText, aBound.startPos );
+ pBreakIt->GetBreakIter()->getScriptType( rText, aBound.startPos );
XubString aTmpWord = rText.Copy( static_cast<xub_StrLen>(aBound.startPos),
static_cast<xub_StrLen>(aBound.endPos - aBound.startPos) );
const sal_Int32 nScriptEnd = aBound.startPos +
- pBreakIt->xBreak->endOfScript( aTmpWord, 0, nCurrScript );
+ pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
const sal_Int32 nEnd = Min( aBound.endPos, nScriptEnd );
nBegin = (xub_StrLen)aBound.startPos;
nLen = (xub_StrLen)(nEnd - nBegin);
@@ -1196,7 +1196,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
LanguageType eActLang = pNode->GetLang( nBegin );
Boundary aBound =
- pBreakIt->xBreak->getWordBoundary( pNode->GetTxt(), nBegin,
+ pBreakIt->GetBreakIter()->getWordBoundary( pNode->GetTxt(), nBegin,
pBreakIt->GetLocale( eActLang ),
WordType::DICTIONARY_WORD, TRUE );
nBegin = xub_StrLen(aBound.startPos);
@@ -1352,8 +1352,8 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
{
const LanguageType aCurrLang = pNode->GetLang( nBegin );
const com::sun::star::lang::Locale aCurrLocale = pBreakIt->GetLocale( aCurrLang );
- nBegin = static_cast< xub_StrLen >(pBreakIt->xBreak->beginOfSentence( rText, nBegin, aCurrLocale ));
- nEnd = static_cast< xub_StrLen >(Min( rText.getLength(), pBreakIt->xBreak->endOfSentence( rText, nEnd, aCurrLocale ) ));
+ 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 ) ));
}
}
}
@@ -1753,7 +1753,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
const bool bCount = aExpandText.getLength() > 0;
// count words in 'regular' text:
- if( bCount && pBreakIt->xBreak.is() )
+ if( bCount && pBreakIt->GetBreakIter().is() )
{
const String aScannerText( aExpandText );
SwScanner aScanner( *this, aScannerText, 0, pConversionMap,
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 6775bf213736..4a92f76f60fd 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -44,6 +44,7 @@
#include <svx/pbinitem.hxx>
#include <svx/svdview.hxx>
#include <unotools/localedatawrapper.hxx>
+#include <svtools/syslocale.hxx>
#include <txtfld.hxx>
#include <fmtfld.hxx>
#include <fmtfsize.hxx>
@@ -353,7 +354,7 @@ void lcl_FormatPostIt( IDocumentContentOperations* pIDCO, SwPaM& aPam, SwPostItF
aStr.AppendAscii(sTmp);
aStr += pField->GetPar1();
aStr += ' ';
- aStr += GetAppLocaleData().getDate( pField->GetDate() );
+ aStr += SvtSysLocale().GetLocaleData().getDate( pField->GetDate() );
pIDCO->Insert( aPam, aStr, true );
pIDCO->SplitNode( *aPam.GetPoint(), false );
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index c4608a4907f2..b6a5143e13d3 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1801,8 +1801,8 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl,
xub_StrLen nPos = 0;
while( nPos < nEndPos )
{
- sal_uInt16 nScript = pBreakIt->xBreak->getScriptType( rText, nPos );
- nPos = (xub_StrLen)pBreakIt->xBreak->endOfScript( rText, nPos, nScript );
+ sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos );
+ nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nPos, nScript );
aScriptChgLst.Insert( nPos, aScriptChgLst.Count() );
aScriptLst.Insert( nScript, aScriptLst.Count() );
}
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index b3ef7f67d75e..d9e7f92ec6a3 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -312,8 +312,8 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
sal_Bool bNeedsCJKProcessing = sal_False;
if( sExpand.Len() )
{
- sal_uInt16 nScriptType = pBreakIt->xBreak->getScriptType( sExpand, 0 );
- xub_StrLen nPos = (xub_StrLen)pBreakIt->xBreak->endOfScript( sExpand, 0,
+ sal_uInt16 nScriptType = pBreakIt->GetBreakIter()->getScriptType( sExpand, 0 );
+ xub_StrLen nPos = (xub_StrLen)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->xBreak->getScriptType( sExpand, nPos );
+ sal_uInt16 nScriptType = pBreakIt->GetBreakIter()->getScriptType( sExpand, nPos );
sal_uInt16 nScript =
SwHTMLWriter::GetCSS1ScriptForScriptType( nScriptType );
- xub_StrLen nEndPos = (xub_StrLen)pBreakIt->xBreak->endOfScript(
+ xub_StrLen nEndPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(
sExpand, nPos, nScriptType );
if( nScript != CSS1_OUTMODE_ANY_SCRIPT &&
/* #108791# */ nScript != rHTMLWrt.nCSS1Script )
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index aa42977d9a02..2e93323b66b1 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2190,9 +2190,9 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
{
const String& rText = pTxtNd->GetTxt();
sal_uInt16 nScriptTxt =
- pBreakIt->xBreak->getScriptType(
+ pBreakIt->GetBreakIter()->getScriptType(
rText, pAttr->GetSttCnt() );
- xub_StrLen nScriptEnd = (xub_StrLen)pBreakIt->xBreak
+ xub_StrLen nScriptEnd = (xub_StrLen)pBreakIt->GetBreakIter()
->endOfScript( rText, nStt, nScriptTxt );
while( nScriptEnd < nEndCnt )
{
@@ -2212,9 +2212,9 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
pNext->InsertPrev( pSetAttr );
}
nStt = nScriptEnd;
- nScriptTxt = pBreakIt->xBreak->getScriptType(
+ nScriptTxt = pBreakIt->GetBreakIter()->getScriptType(
rText, nStt );
- nScriptEnd = (xub_StrLen)pBreakIt->xBreak
+ nScriptEnd = (xub_StrLen)pBreakIt->GetBreakIter()
->endOfScript( rText, nStt, nScriptTxt );
}
bInsert = nScriptItem == nScriptTxt;
@@ -3007,9 +3007,9 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
.GetTxtNode();
ASSERT( pTxtNd, "No text node" );
const String& rText = pTxtNd->GetTxt();
- sal_uInt16 nScriptTxt = pBreakIt->xBreak->getScriptType(
+ sal_uInt16 nScriptTxt = pBreakIt->GetBreakIter()->getScriptType(
rText, pAttr->GetSttCnt() );
- xub_StrLen nScriptEnd = (xub_StrLen)pBreakIt->xBreak
+ xub_StrLen nScriptEnd = (xub_StrLen)pBreakIt->GetBreakIter()
->endOfScript( rText, pAttr->GetSttCnt(), nScriptTxt );
while( nScriptEnd < nEndCnt )
{
@@ -3027,9 +3027,9 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
}
}
pAttr->nSttCntnt = nScriptEnd;
- nScriptTxt = pBreakIt->xBreak->getScriptType(
+ nScriptTxt = pBreakIt->GetBreakIter()->getScriptType(
rText, nScriptEnd );
- nScriptEnd = (xub_StrLen)pBreakIt->xBreak
+ nScriptEnd = (xub_StrLen)pBreakIt->GetBreakIter()
->endOfScript( rText, nScriptEnd, nScriptTxt );
}
bInsert = nScriptItem == nScriptTxt;
diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx
index d1b0f0f7859c..ddb25947f2a1 100644
--- a/sw/source/filter/rtf/rtfatr.cxx
+++ b/sw/source/filter/rtf/rtfatr.cxx
@@ -2790,8 +2790,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt )
*/
const String& rFldPar1 = pFld->GetPar1();
USHORT nScript;
- if( pBreakIt->xBreak.is() )
- nScript = pBreakIt->xBreak->getScriptType( rFldPar1, 0);
+ if( pBreakIt->GetBreakIter().is() )
+ nScript = pBreakIt->GetBreakIter()->getScriptType( rFldPar1, 0);
else
nScript = i18n::ScriptType::ASIAN;
@@ -3110,8 +3110,8 @@ static Writer& OutRTF_SwTxtRuby( Writer& rWrt, const SfxPoolItem& rHt )
defaulting to asian.
*/
USHORT nScript;
- if( pBreakIt->xBreak.is() )
- nScript = pBreakIt->xBreak->getScriptType( rRuby.GetText(), 0);
+ if( pBreakIt->GetBreakIter().is() )
+ nScript = pBreakIt->GetBreakIter()->getScriptType( rRuby.GetText(), 0);
else
nScript = i18n::ScriptType::ASIAN;
@@ -3153,8 +3153,8 @@ static Writer& OutRTF_SwTxtRuby( Writer& rWrt, const SfxPoolItem& rHt )
rWrt.Strm() << "\\\\a" << cDirective;
rWrt.Strm() << "(\\\\s\\\\up ";
- if( pBreakIt->xBreak.is() )
- nScript = pBreakIt->xBreak->getScriptType( pNd->GetTxt(),
+ if( pBreakIt->GetBreakIter().is() )
+ nScript = pBreakIt->GetBreakIter()->getScriptType( pNd->GetTxt(),
*pRubyTxt->GetStart() );
else
nScript = i18n::ScriptType::ASIAN;
diff --git a/sw/source/filter/rtf/rtffld.cxx b/sw/source/filter/rtf/rtffld.cxx
index b608ad1b622e..23d0da5a90fa 100644
--- a/sw/source/filter/rtf/rtffld.cxx
+++ b/sw/source/filter/rtf/rtffld.cxx
@@ -708,8 +708,8 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
{
//Make a guess at which of asian of western we should be setting
USHORT nScript;
- if (pBreakIt->xBreak.is())
- nScript = pBreakIt->xBreak->getScriptType( aData.sUp, 0);
+ if (pBreakIt->GetBreakIter().is())
+ nScript = pBreakIt->GetBreakIter()->getScriptType( aData.sUp, 0);
else
nScript = i18n::ScriptType::ASIAN;
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index 17f854eaa1d6..fb197163e226 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -548,8 +548,8 @@ namespace sw
using namespace ::com::sun::star::i18n;
sal_uInt16 nScript = i18n::ScriptType::LATIN;
- if (rTxt.Len() && pBreakIt && pBreakIt->xBreak.is())
- nScript = pBreakIt->xBreak->getScriptType(rTxt, 0);
+ if (rTxt.Len() && pBreakIt && pBreakIt->GetBreakIter().is())
+ nScript = pBreakIt->GetBreakIter()->getScriptType(rTxt, 0);
rtl_TextEncoding eChrSet = ItemGet<SvxFontItem>(rTxtNd,
GetWhichOfScript(RES_CHRATR_FONT, nScript)).GetCharSet();
@@ -635,20 +635,20 @@ namespace sw
using sw::types::writer_cast;
- if (pBreakIt && pBreakIt->xBreak.is())
+ if (pBreakIt && pBreakIt->GetBreakIter().is())
{
xub_StrLen nLen = rTxt.Len();
xub_StrLen nPos = 0;
while (nPos < nLen)
{
- sal_Int32 nEnd2 = pBreakIt->xBreak->endOfScript(rTxt, nPos,
+ sal_Int32 nEnd2 = pBreakIt->GetBreakIter()->endOfScript(rTxt, nPos,
nScript);
if (nEnd2 < 0)
break;
// nPos = writer_cast<xub_StrLen>(nEnd2);
nPos = static_cast< xub_StrLen >(nEnd2);
aScripts.push_back(ScriptEntry(nPos, nScript));
- nScript = pBreakIt->xBreak->getScriptType(rTxt, nPos);
+ nScript = pBreakIt->GetBreakIter()->getScriptType(rTxt, nPos);
}
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 03b4e52c2c6f..5bb1ffc557b7 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -884,8 +884,8 @@ void WW8_SdrAttrIter::NextPara( USHORT nPar )
pEditPool = aSet.GetPool();
eNdChrSet = ItemGet<SvxFontItem>(aSet,EE_CHAR_FONTINFO).GetCharSet();
- if( pBreakIt->xBreak.is() )
- nScript = pBreakIt->xBreak->getScriptType( pEditObj->GetText(nPara), 0);
+ if( pBreakIt->GetBreakIter().is() )
+ nScript = 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 d42a389e3704..8b8e153e49fd 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -670,15 +670,15 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRu
aStr += String::CreateFromInt32( nJC );
/*
- MS needs to know the name and size of the font used in the ruby item,
- but we coud have written it in a mixture of asian and western
- scripts, and each of these can be a different font and size than the
- other, so we make a guess based upon the first character of the text,
- defaulting to asian.
- */
+ MS needs to know the name and size of the font used in the ruby item,
+ but we coud have written it in a mixture of asian and western
+ scripts, and each of these can be a different font and size than the
+ other, so we make a guess based upon the first character of the text,
+ defaulting to asian.
+ */
USHORT nRubyScript;
- if ( pBreakIt->xBreak.is() )
- nRubyScript = pBreakIt->xBreak->getScriptType( rRuby.GetText(), 0);
+ if( pBreakIt->GetBreakIter().is() )
+ nRubyScript = pBreakIt->GetBreakIter()->getScriptType( rRuby.GetText(), 0);
else
nRubyScript = i18n::ScriptType::ASIAN;
@@ -726,8 +726,8 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRu
aStr.APPEND_CONST_ASC( "(\\s\\up " );
- if ( pBreakIt->xBreak.is() )
- nRubyScript = pBreakIt->xBreak->getScriptType( rNode.GetTxt(),
+ if ( pBreakIt->GetBreakIter().is() )
+ nRubyScript = pBreakIt->GetBreakIter()->getScriptType( rNode.GetTxt(),
*( pRubyTxt->GetStart() ) );
else
nRubyScript = i18n::ScriptType::ASIAN;
@@ -1409,8 +1409,8 @@ String SwAttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
if (SVX_CASEMAP_TITEL == ((const SvxCaseMapItem&)rItem).GetValue())
{
sal_uInt16 nScriptType = i18n::ScriptType::LATIN;
- if (pBreakIt->xBreak.is())
- nScriptType = pBreakIt->xBreak->getScriptType(aSnippet, 0);
+ if (pBreakIt->GetBreakIter().is())
+ nScriptType = pBreakIt->GetBreakIter()->getScriptType(aSnippet, 0);
LanguageType nLanguage;
switch (nScriptType)
@@ -1435,7 +1435,7 @@ String SwAttrIter::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->xBreak.is() && !pBreakIt->xBreak->isBeginWord(
+ if (pBreakIt->GetBreakIter().is() && !pBreakIt->GetBreakIter()->isBeginWord(
rStr, nAktPos, pBreakIt->GetLocale(nLanguage),
i18n::WordType::ANYWORD_IGNOREWHITESPACES ) )
{
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index bf8e27b7b60a..41d0f2f3738c 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2961,8 +2961,8 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
font size of that script as our default.
*/
USHORT nScript;
- if( pBreakIt->xBreak.is() )
- nScript = pBreakIt->xBreak->getScriptType( pFld->GetPar1(), 0);
+ if( pBreakIt->GetBreakIter().is() )
+ nScript = pBreakIt->GetBreakIter()->getScriptType( pFld->GetPar1(), 0);
else
nScript = i18n::ScriptType::ASIAN;
@@ -4543,9 +4543,9 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
{
const SwTxtNode* pNd = (const SwTxtNode*)GetExport().pOutFmtNode;
pSet = &pNd->GetSwAttrSet();
- if ( pBreakIt->xBreak.is() )
+ if ( pBreakIt->GetBreakIter().is() )
{
- nScript = pBreakIt->xBreak->
+ nScript = pBreakIt->GetBreakIter()->
getScriptType(pNd->GetTxt(), 0);
}
}
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index b45aa575baf4..b21fb17bcd02 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2521,8 +2521,8 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
const SwCharFmt *pCharFmt=0;
//Make a guess at which of asian of western we should be setting
USHORT nScript;
- if (pBreakIt->xBreak.is())
- nScript = pBreakIt->xBreak->getScriptType(sRuby, 0);
+ if (pBreakIt->GetBreakIter().is())
+ nScript = pBreakIt->GetBreakIter()->getScriptType(sRuby, 0);
else
nScript = i18n::ScriptType::ASIAN;
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 41814d006339..7841176d47e1 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -37,6 +37,7 @@
#include <hintids.hxx>
#include <svtools/itemiter.hxx>
#include <svtools/eitem.hxx>
+#include <svtools/syslocale.hxx>
#include <svx/boxitem.hxx>
#include <svx/numitem.hxx>
// --> OD 2008-02-13 #newlistlevelattrs#
@@ -609,7 +610,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
{
IntlWrapper aIntlWrapper(
::comphelper::getProcessServiceFactory(),
- GetAppLocaleData().getLocale());
+ SvtSysLocale().GetLocaleData().getLocale());
String sPlus(String::CreateFromAscii(" + "));
if ( SFX_STYLE_FAMILY_PAGE == nFamily )
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index e4b232269cc5..1170f3506b31 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -33,7 +33,7 @@
#include <tools/stream.hxx>
-
+#include <svtools/syslocale.hxx>
#include "swtypes.hxx"
#include "hintids.hxx"
@@ -72,7 +72,7 @@ SwMasterUsrPref::SwMasterUsrPref(BOOL bWeb) :
aCursorConfig(*this),
pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : 0)
{
- MeasurementSystem eSystem = GetAppLocaleData().getMeasurementSystemEnum();
+ MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH;
eHScrollMetric = eUserMetric;
eVScrollMetric = eUserMetric;
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index af43528016f9..661a73f312ad 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -58,6 +58,7 @@
#include <crstate.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/accessibilityoptions.hxx>
+#include <svtools/syslocale.hxx>
#include <svx/acorrcfg.hxx>
@@ -237,7 +238,7 @@ SwViewOption::SwViewOption() :
nCore2Options = VIEWOPT_CORE2_BLACKFONT | VIEWOPT_CORE2_HIDDENPARA;
nUIOptions = VIEWOPT_2_MODIFIED | VIEWOPT_2_GRFKEEPZOOM |VIEWOPT_2_ANY_RULER;
- if(MEASURE_METRIC != GetAppLocaleData().getMeasurementSystemEnum())
+ if(MEASURE_METRIC != SvtSysLocale().GetLocaleData().getMeasurementSystemEnum())
aSnapSize.Width() = aSnapSize.Height() = 720; // 1/2"
else
aSnapSize.Width() = aSnapSize.Height() = 567; // 1 cm
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index e27e6eb477c2..7d8e38443ca0 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -5568,11 +5568,12 @@ void QuickHelpData::Stop( SwWrtShell& rSh )
void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
{
- pCalendarWrapper->LoadDefaultCalendar( rSh.GetCurLang() );
+ salhelper::SingletonRef<SwCalendarWrapper>* pCalendar = s_getCalendarWrapper();
+ (*pCalendar)->LoadDefaultCalendar( rSh.GetCurLang() );
{
uno::Sequence< i18n::CalendarItem > aNames(
- pCalendarWrapper->getMonths() );
+ (*pCalendar)->getMonths() );
for( int n = 0; n < 2; ++n )
{
for( long nPos = 0, nEnd = aNames.getLength(); nPos < nEnd; ++nPos )
@@ -5592,7 +5593,7 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
}
}
if( !n ) // get data for the second loop
- aNames = pCalendarWrapper->getDays();
+ aNames = (*pCalendar)->getDays();
}
}
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index f35efbe41253..dfb7823a1216 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -1615,7 +1615,7 @@ USHORT SwFldMgr::GetCurrLanguage() const
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if( pSh )
return pSh->GetCurLang();
- return SvxLocaleToLanguage( GetAppLocaleData().getLocale() );
+ return SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
}
void SwFieldType::_GetFldName()
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 5ea6c1012baf..3f0c634f2b24 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -48,6 +48,7 @@
#include <vcl/field.hxx>
#include <vcl/svapp.hxx>
#include <unotools/localedatawrapper.hxx>
+#include <svtools/syslocale.hxx>
#include <svx/sizeitem.hxx>
#include <svx/pageitem.hxx>
#include <svtools/eitem.hxx>
@@ -183,7 +184,7 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
SetMetric( aMaxHeightEdit, aMetric );
SetMetric( aDistEdit, aMetric );
SetMetric( aLineDistEdit, aMetric );
- MeasurementSystem eSys = GetAppLocaleData().getMeasurementSystemEnum();
+ MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134;
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(nHeightValue),FUNIT_TWIP);;
}
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 04a26d47b324..db81543fb883 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -81,7 +81,13 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/document/RedlineDisplayType.hpp>
+#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/script/XInvocation.hpp>
+#include <com/sun/star/reflection/XIdlClassProvider.hpp>
#include <svx/linkmgr.hxx>
#include <svx/unofill.hxx>
#include <svx/unolingu.hxx>
@@ -236,15 +242,23 @@ sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rI
Any SAL_CALL SwXTextDocument::queryInterface( const uno::Type& rType ) throw(RuntimeException)
{
Any aRet = SwXTextDocumentBaseClass::queryInterface(rType);
- if(aRet.getValueType() == getVoidCppuType())
+ if ( !aRet.hasValue() )
aRet = SfxBaseModel::queryInterface(rType);
- if(aRet.getValueType() == getVoidCppuType() &&
+ if ( !aRet.hasValue() &&
rType == ::getCppuType((Reference<lang::XMultiServiceFactory>*)0))
{
Reference<lang::XMultiServiceFactory> xTmp = this;
aRet <<= xTmp;
}
- if(aRet.getValueType() == getVoidCppuType())
+
+ if ( !aRet.hasValue()
+ && rType != ::getCppuType((Reference< com::sun::star::document::XDocumentEventBroadcaster>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::frame::XController>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::frame::XFrame>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::script::XInvocation>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::reflection::XIdlClassProvider>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::beans::XFastPropertySet>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::awt::XWindow>*)0))
{
GetNumberFormatter();
if(xNumFmtAgg.is())
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index 98224a81edde..275b49a4c9e4 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -54,6 +54,7 @@
#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
#endif
+#include <svtools/syslocale.hxx>
#include <unomid.h>
@@ -261,7 +262,7 @@ ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst )
p->SearchAndReplace(C2S("%1"), C2S(",,"));
p->SearchAndReplace(C2S("%2"), C2S("''"));
#else
- LocaleDataWrapper& rLclD = GetAppLocaleData();
+ const LocaleDataWrapper& rLclD = SvtSysLocale().GetLocaleData();
//unter richtigen Betriebssystemen funktioniert es auch so
p->SearchAndReplace(C2S("%1"), rLclD.getDoubleQuotationMarkStart());
p->SearchAndReplace(C2S("%2"), rLclD.getDoubleQuotationMarkEnd());
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index 38a4aa9a85e8..5a0030d9dd85 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -120,7 +120,7 @@ void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
if (pView)
eCurLanguage = pView->GetWrtShell().GetCurLang();
else
- eCurLanguage = SvxLocaleToLanguage( GetAppLocaleData().getLocale() );
+ eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
if (bUsrFmts == FALSE)
{
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index fb64e51c97f8..cb6a3888d45f 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -39,6 +39,7 @@
#include <unotools/collatorwrapper.hxx>
#include <svtools/urihelper.hxx>
#include <svtools/stritem.hxx>
+#include <svtools/syslocale.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
@@ -732,7 +733,7 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
String GetAppLangDateTimeString( const DateTime& rDT )
{
- LocaleDataWrapper& rAppLclData = GetAppLocaleData();
+ const LocaleDataWrapper& rAppLclData = SvtSysLocale().GetLocaleData();
String sRet( rAppLclData.getDate( rDT ));
( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE );
return sRet;