summaryrefslogtreecommitdiff
path: root/sw/source/core/text
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text')
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/text/atrhndl.hxx2
-rw-r--r--sw/source/core/text/atrstck.cxx33
-rw-r--r--sw/source/core/text/guess.cxx6
-rw-r--r--sw/source/core/text/inftxt.cxx3
-rw-r--r--sw/source/core/text/itratr.cxx23
-rw-r--r--sw/source/core/text/itrcrsr.cxx24
-rw-r--r--sw/source/core/text/itrform2.cxx53
-rw-r--r--sw/source/core/text/itrform2.hxx2
-rw-r--r--sw/source/core/text/itrpaint.cxx1
-rw-r--r--sw/source/core/text/makefile.mk3
-rw-r--r--sw/source/core/text/porfld.cxx19
-rw-r--r--sw/source/core/text/porfld.hxx4
-rw-r--r--sw/source/core/text/porlay.cxx51
-rw-r--r--sw/source/core/text/pormulti.cxx24
-rw-r--r--sw/source/core/text/portxt.cxx10
-rw-r--r--sw/source/core/text/redlnitr.cxx11
-rw-r--r--sw/source/core/text/txtdrop.cxx18
-rw-r--r--sw/source/core/text/txtfld.cxx71
-rw-r--r--sw/source/core/text/txtfrm.cxx26
-rw-r--r--sw/source/core/text/txthyph.cxx4
21 files changed, 249 insertions, 141 deletions
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 617c764dca..d6241c775f 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -698,7 +698,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
const SwNoTxtFrm* pNoTxtFrm = static_cast<const SwNoTxtFrm*>(pFly->Lower());
const SwNoTxtNode* pNoTxtNode = static_cast<const SwNoTxtNode*>(pNoTxtFrm->GetNode());
- const String aAlternateTxt( pNoTxtNode->GetAlternateText() );
+ const String aAlternateTxt( pNoTxtNode->GetTitle() );
mpPDFExtOutDevData->SetAlternateText( aAlternateTxt );
}
}
diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index 35fb80bde2..4d9a2909d2 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -32,7 +32,7 @@
#define _ATRHNDL_HXX
#define INITIAL_NUM_ATTR 3
-#define NUM_ATTRIBUTE_STACKS 39
+#define NUM_ATTRIBUTE_STACKS 40
#include <txatbase.hxx>
#include <swfntcch.hxx>
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index b63cd8776d..4ac576d66a 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -86,7 +86,7 @@
const BYTE StackPos[ static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
static_cast<USHORT>(RES_CHRATR_BEGIN) + 1 ] =
-{
+{
0, // // 0
1, // RES_CHRATR_CASEMAP = RES_CHRATR_BEGIN // 1
0, // RES_CHRATR_CHARSETCOLOR, // 2
@@ -128,16 +128,16 @@ const BYTE StackPos[ static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
35, // RES_CHRATR_OVERLINE, // 38
0, // RES_CHRATR_DUMMY1, // 39
0, // RES_CHRATR_DUMMY2, // 40
- 0, // RES_TXTATR_AUTOFMT, // 41
- 0, // RES_TXTATR_INETFMT // 42
- 36, // RES_TXTATR_REFMARK, // 43
- 37, // RES_TXTATR_TOXMARK, // 44
- 0, // RES_TXTATR_CHARFMT, // 45
- 0, // RES_TXTATR_DUMMY5 // 46
- 38, // RES_TXTATR_CJK_RUBY, // 47
- 0, // RES_TXTATR_UNKNOWN_CONTAINER, // 48
- 0, // RES_TXTATR_DUMMY6, // 49
- 0 // RES_TXTATR_DUMMY7, // 50
+ 36, // RES_TXTATR_REFMARK, // 41
+ 37, // RES_TXTATR_TOXMARK, // 42
+ 38, // RES_TXTATR_META, // 43
+ 38, // RES_TXTATR_METAFIELD, // 44
+ 0, // RES_TXTATR_AUTOFMT, // 45
+ 0, // RES_TXTATR_INETFMT // 46
+ 0, // RES_TXTATR_CHARFMT, // 47
+ 39, // RES_TXTATR_CJK_RUBY, // 48
+ 0, // RES_TXTATR_UNKNOWN_CONTAINER, // 49
+ 0, // RES_TXTATR_DUMMY5 // 50
};
/*************************************************************************
@@ -650,6 +650,10 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const USHORT nAttr )
rFnt.GetRef()--;
else if ( RES_TXTATR_TOXMARK == nAttr )
rFnt.GetTox()--;
+ else if ( (RES_TXTATR_META == nAttr) || (RES_TXTATR_METAFIELD == nAttr) )
+ {
+ rFnt.GetMeta()--;
+ }
else if ( RES_TXTATR_CJK_RUBY == nAttr )
{
// ruby stack has no more attributes
@@ -928,6 +932,13 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
else
rFnt.GetTox()--;
break;
+ case RES_TXTATR_META:
+ case RES_TXTATR_METAFIELD:
+ if ( bPush )
+ rFnt.GetMeta()++;
+ else
+ rFnt.GetMeta()--;
+ break;
}
}
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 5d7b28cdea..049ea79078 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/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 13a05d1295..b27a551ff7 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1277,7 +1277,8 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
case POR_URL:
case POR_HIDDEN:
case POR_TOX:
- case POR_REF :
+ case POR_REF:
+ case POR_META:
case POR_CONTROLCHAR:
if ( !GetOpt().IsPagePreview() &&
!GetOpt().IsReadonly() &&
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 44ab83e9cd..09be2bd798 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -45,7 +45,6 @@
#include <fmtflcnt.hxx>
#include <fmtcntnt.hxx>
#include <fmtftn.hxx>
-#include <fmthbsh.hxx>
#include <frmatr.hxx>
#include <frmfmt.hxx>
#include <fmtfld.hxx>
@@ -126,19 +125,7 @@ SwAttrIter::~SwAttrIter()
SwTxtAttr *SwAttrIter::GetAttr( const xub_StrLen nPosition ) const
{
- if ( pHints )
- {
- for ( USHORT i = 0; i < pHints->Count(); ++i )
- {
- SwTxtAttr *pPos = pHints->GetTextHint(i);
- xub_StrLen nStart = *pPos->GetStart();
- if( nPosition < nStart )
- return 0;
- if( nPosition == nStart && !pPos->GetEnd() )
- return pPos;
- }
- }
- return 0;
+ return (m_pTxtNode) ? m_pTxtNode->GetTxtAttrForCharAt(nPosition) : 0;
}
/*************************************************************************
@@ -400,10 +387,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 +857,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 +865,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/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 25ad1a25ca..7fbb6bae55 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -157,8 +157,10 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
GetInfo().SetFont( GetFnt() );
const SwTxtNode *pNode = pFrm->GetTxtNode();
- const SvxLRSpaceItem &rSpace =
- pFrm->GetTxtNode()->GetSwAttrSet().GetLRSpace();
+ const SvxLRSpaceItem &rSpace = pFrm->GetTxtNode()->GetSwAttrSet().GetLRSpace();
+ // --> OD 2009-09-02 #i95907#
+ const bool bListLevelIndentsApplicable = pFrm->GetTxtNode()->AreListLevelIndentsApplicable();
+ // <--
//
// Carefully adjust the text formatting ranges.
@@ -181,8 +183,13 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
pFrm->Prt().Left() +
nLMWithNum -
pNode->GetLeftMarginWithNum( sal_False ) -
- rSpace.GetLeft() +
- rSpace.GetTxtLeft();
+ // --> OD 2009-09-02 #i95907#
+// rSpace.GetLeft() +
+// rSpace.GetTxtLeft();
+ ( bListLevelIndentsApplicable
+ ? 0
+ : ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) );
+ // <--
}
else
{
@@ -193,8 +200,13 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
pFrm->Prt().Left() +
nLMWithNum -
pNode->GetLeftMarginWithNum( sal_False ) -
- rSpace.GetLeft() +
- rSpace.GetTxtLeft();
+ // --> OD 2009-09-02 #i95907#
+// rSpace.GetLeft() +
+// rSpace.GetTxtLeft();
+ ( bListLevelIndentsApplicable
+ ? 0
+ : ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) );
+ // <--
}
else
{
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index d9d69343b0..57dacd703a 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -107,6 +107,7 @@ void SwTxtFormatter::CtorInitTxtFormatter( SwTxtFrm *pNewFrm, SwTxtFormatInfo *p
nCntMidHyph = 0;
nLeftScanIdx = STRING_LEN;
nRightScanIdx = 0;
+ m_nHintEndIndex = 0;
if( nStart > GetInfo().GetTxt().Len() )
{
@@ -313,7 +314,14 @@ SwLinePortion *SwTxtFormatter::UnderFlow( SwTxtFormatInfo &rInf )
}
}
pPor->Truncate();
- delete rInf.GetRest();
+ SwLinePortion *const pRest( rInf.GetRest() );
+ if (pRest && pRest->InFldGrp() &&
+ static_cast<SwFldPortion*>(pRest)->IsNoLength())
+ {
+ // HACK: decrement again, so we pick up the suffix in next line!
+ --m_nHintEndIndex;
+ }
+ delete pRest;
rInf.SetRest(0);
return pPor;
}
@@ -820,6 +828,34 @@ void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
}
/*************************************************************************
+ * class SwMetaPortion
+ *************************************************************************/
+
+class SwMetaPortion : public SwTxtPortion
+{
+public:
+ inline SwMetaPortion() { SetWhichPor( POR_META ); }
+ virtual void Paint( const SwTxtPaintInfo &rInf ) const;
+// OUTPUT_OPERATOR
+};
+
+//CLASSIO( SwMetaPortion )
+
+/*************************************************************************
+ * virtual SwMetaPortion::Paint()
+ *************************************************************************/
+
+void SwMetaPortion::Paint( const SwTxtPaintInfo &rInf ) const
+{
+ if ( Width() )
+ {
+ rInf.DrawViewOpt( *this, POR_META );
+ SwTxtPortion::Paint( rInf );
+ }
+}
+
+
+/*************************************************************************
* SwTxtFormatter::WhichTxtPor()
*************************************************************************/
@@ -832,6 +868,10 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
{
if( GetFnt()->IsRef() )
pPor = new SwRefPortion;
+ else if (GetFnt()->IsMeta())
+ {
+ pPor = new SwMetaPortion;
+ }
else
{
// Erst zum Schluss !
@@ -1068,6 +1108,12 @@ SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
pPor = NewTabPortion( rInf, true );
}
+ // 11) suffix of meta-field
+ if (!pPor)
+ {
+ pPor = TryNewNoLengthPortion(rInf);
+ }
+
return pPor;
}
@@ -1973,6 +2019,7 @@ long SwTxtFormatter::CalcOptRepaint( xub_StrLen nOldLineEnd,
nReformat -= 2;
#ifndef QUARTZ
+#ifndef ENABLE_GRAPHITE
// --> FME 2004-09-27 #i28795#, #i34607#, #i38388#
// step back six(!) more characters for complex scripts
// this is required e.g., for Khmer (thank you, Javier!)
@@ -1981,6 +2028,10 @@ long SwTxtFormatter::CalcOptRepaint( xub_StrLen nOldLineEnd,
if( ::i18n::ScriptType::COMPLEX == rSI.ScriptType( nReformat ) )
nMaxContext = 6;
#else
+ // Some Graphite fonts need context for scripts not marked as complex
+ static const xub_StrLen nMaxContext = 10;
+#endif
+#else
// some fonts like Quartz's Zapfino need more context
// TODO: query FontInfo for maximum unicode context
static const xub_StrLen nMaxContext = 8;
diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
index f5732ced0b..ec6fce1958 100644
--- a/sw/source/core/text/itrform2.hxx
+++ b/sw/source/core/text/itrform2.hxx
@@ -60,6 +60,7 @@ class SwTxtFormatter : public SwTxtPainter
sal_Bool bChanges : 1; // Flag, fuer die Berechnung des Repaint-Rechtecks
sal_Bool bTruncLines : 1; // Flag, Repaint-Rechtecks ggf. erweitern
sal_Bool bUnclipped : 1; // Flag, ob Repaint groesser als feste Zeilenhoehe
+ USHORT m_nHintEndIndex; // HACK for TryNewNoLengthPortion
SwLinePortion *NewPortion( SwTxtFormatInfo &rInf );
SwTxtPortion *NewTxtPortion( SwTxtFormatInfo &rInf );
SwLinePortion *NewExtraPortion( SwTxtFormatInfo &rInf );
@@ -75,6 +76,7 @@ class SwTxtFormatter : public SwTxtPainter
SwTxtAttr *pHt ) const;
SwLinePortion *WhichFirstPortion( SwTxtFormatInfo &rInf );
SwTxtPortion *WhichTxtPor( SwTxtFormatInfo &rInf ) const;
+ SwExpandPortion * TryNewNoLengthPortion( SwTxtFormatInfo & rInfo );
// Das Herzstueck der Formatierung
void BuildPortions( SwTxtFormatInfo &rInf );
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index fc5ebbf16c..550b8fb291 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -48,7 +48,6 @@
#include <fmtftn.hxx>
#include <fmtfld.hxx>
#include <fldbas.hxx> // SwField
-#include <fmthbsh.hxx>
#include <rootfrm.hxx>
#include <pagefrm.hxx>
#include <pagedesc.hxx> // SwPageDesc
diff --git a/sw/source/core/text/makefile.mk b/sw/source/core/text/makefile.mk
index 5cb00b9588..fbc000002e 100644
--- a/sw/source/core/text/makefile.mk
+++ b/sw/source/core/text/makefile.mk
@@ -45,6 +45,9 @@ AUTOSEG=true
CDEFS+=-Dmydebug
.ENDIF
+.IF "$(ENABLE_GRAPHITE)" == "TRUE"
+CFLAGS+=-DENABLE_GRAPHITE
+.ENDIF
# --- Files --------------------------------------------------------
.IF "$(product)$(cap)" == ""
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 096d863194..8fcdbca8e7 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -85,6 +85,7 @@ SwFldPortion *SwFldPortion::Clone( const XubString &rExpand ) const
pNewFnt = new SwFont( *pFnt );
SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt );
pClone->SetNextOffset( nNextOffset );
+ pClone->m_bNoLength = this->m_bNoLength;
return pClone;
}
@@ -99,6 +100,7 @@ void SwFldPortion::TakeNextOffset( const SwFldPortion* pFld )
SwFldPortion::SwFldPortion( const XubString &rExpand, SwFont *pFont, sal_Bool bPlaceHold )
: aExpand(rExpand), pFnt(pFont), nNextOffset(0), nNextScriptChg(STRING_LEN), nViewWidth(0),
bFollow( sal_False ), bHasFollow( sal_False ), bPlaceHolder( bPlaceHold )
+ , m_bNoLength( sal_False )
{
SetWhichPor( POR_FLD );
}
@@ -114,6 +116,7 @@ SwFldPortion::SwFldPortion( const SwFldPortion& rFld )
bCenter( rFld.IsCenter() ),
bHasFollow( rFld.HasFollow() ),
bPlaceHolder( rFld.bPlaceHolder )
+ , m_bNoLength( rFld.m_bNoLength )
{
if ( rFld.HasFont() )
pFnt = new SwFont( *rFld.GetFont() );
@@ -215,25 +218,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();
@@ -378,7 +381,7 @@ sal_Bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
// Das Zeichen wird in der ersten Portion gehalten.
// Unbedingt nach Format!
- SetLen( nFollow );
+ SetLen( (m_bNoLength) ? 0 : nFollow );
if( nRest )
{
@@ -1127,12 +1130,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/porfld.hxx b/sw/source/core/text/porfld.hxx
index 084b020672..2292a27b78 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -61,8 +61,12 @@ protected:
sal_Bool bNoPaint : 1; // wird von SwGrfNumPortion benutzt
sal_Bool bReplace : 1; // wird von SwGrfNumPortion benutzt
sal_Bool bPlaceHolder : 1;
+ sal_Bool m_bNoLength : 1; // HACK for meta suffix (no CH_TXTATR)
inline void SetFont( SwFont *pNew ) { pFnt = pNew; }
+ inline bool IsNoLength() const { return m_bNoLength; }
+ inline void SetNoLength() { m_bNoLength = sal_True; }
+
public:
SwFldPortion( const SwFldPortion& rFld );
SwFldPortion( const XubString &rExpand, SwFont *pFnt = 0, sal_Bool bPlaceHolder = sal_False );
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index b8d3de066a..b0e331db47 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: porlay.cxx,v $
- * $Revision: 1.67.190.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -45,6 +42,7 @@
#include <porrst.hxx> // SwHangingPortion
#include <pormulti.hxx> // SwMultiPortion
#include <breakit.hxx>
+#include <unicode/uchar.h>
#include <com/sun/star/i18n/ScriptType.hdl>
#include <com/sun/star/i18n/CTLScriptType.hdl>
#include <com/sun/star/i18n/WordType.hdl>
@@ -800,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();
@@ -909,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:
@@ -961,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();
@@ -983,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 )
@@ -1005,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();
@@ -1013,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;
}
@@ -1030,7 +1028,26 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
}
// <--
- aScriptChg.Insert( nChg, nCnt );
+ // 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)))
+ {
+ int8_t nType = u_charType(rTxt.GetChar(nChg) );
+ if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
+ nType == U_COMBINING_SPACING_MARK )
+ {
+ aScriptChg.Insert( nChg - 1, nCnt );
+ }
+ else
+ {
+ aScriptChg.Insert( nChg, nCnt );
+ }
+ }
+ else
+ {
+ aScriptChg.Insert( nChg, nCnt );
+ }
aScriptType.Insert( nScript, nCnt++ );
// if current script is asian, we search for compressable characters
@@ -1270,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;
@@ -1549,7 +1566,7 @@ void SwScriptInfo::DeleteHiddenRanges( SwTxtNode& rNode )
nHiddenStart = *(rFirst++);
SwPaM aPam( rNode, nHiddenStart, rNode, nHiddenEnd );
- rNode.getIDocumentContentOperations()->Delete( aPam );
+ rNode.getIDocumentContentOperations()->DeleteRange( aPam );
}
}
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 6ff2c0ff7a..ea8b756212 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -34,9 +34,7 @@
#include <hintids.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <svx/twolinesitem.hxx>
#include <svx/charrotateitem.hxx>
#include <vcl/outdev.hxx>
@@ -194,13 +192,11 @@ SwRotatedPortion::SwRotatedPortion( const SwMultiCreator& rCreate,
if( !pRot )
{
const SwTxtAttr& rAttr = *rCreate.pAttr;
- if( RES_CHRATR_ROTATE == rAttr.Which() )
- pRot = &rAttr.GetCharRotate();
- else
+ const SfxPoolItem *const pItem =
+ CharFmt::GetItem(rAttr, RES_CHRATR_ROTATE);
+ if ( pItem )
{
- const SfxPoolItem* pItem = CharFmt::GetItem( rAttr, RES_CHRATR_ROTATE );
- if ( pItem )
- pRot = (SvxCharRotateItem*)pItem;
+ pRot = static_cast<const SvxCharRotateItem*>(pItem);
}
}
if( pRot )
@@ -319,13 +315,11 @@ SwDoubleLinePortion::SwDoubleLinePortion( const SwMultiCreator& rCreate,
const SwTxtAttr& rAttr = *rCreate.pAttr;
pBracket->nStart = *rAttr.GetStart();
- if( RES_CHRATR_TWO_LINES == rAttr.Which() )
- pTwo = &rAttr.Get2Lines();
- else
+ const SfxPoolItem * const pItem =
+ CharFmt::GetItem( rAttr, RES_CHRATR_TWO_LINES );
+ if ( pItem )
{
- const SfxPoolItem* pItem = CharFmt::GetItem( rAttr, RES_CHRATR_TWO_LINES );
- if ( pItem )
- pTwo = (SvxTwoLinesItem*)pItem;
+ pTwo = static_cast<const SvxTwoLinesItem*>(pItem);
}
}
if( pTwo )
@@ -916,7 +910,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 1c482fc30e..6eeb5492e2 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 9ae6b7a74a..3a9a7a1072 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 ) );
@@ -263,7 +263,8 @@ short SwRedlineItr::_Seek( SwFont& rFnt, xub_StrLen nNew, xub_StrLen nOld )
pSet->ClearItem();
else
{
- SwAttrPool& rPool = (SwAttrPool& )rDoc.GetAttrPool();
+ SwAttrPool& rPool =
+ const_cast<SwDoc&>(rDoc).GetAttrPool();
pSet = new SfxItemSet(rPool, RES_CHRATR_BEGIN, RES_CHRATR_END-1);
}
@@ -279,7 +280,9 @@ short SwRedlineItr::_Seek( SwFont& rFnt, xub_StrLen nNew, xub_StrLen nOld )
if( ( nWhich < RES_CHRATR_END ) &&
( SFX_ITEM_SET == pSet->GetItemState( nWhich, sal_True, &pItem ) ) )
{
- SwTxtAttr* pAttr = ((SwTxtNode&)rNd).MakeRedlineTxtAttr( *pItem );
+ SwTxtAttr* pAttr = MakeRedlineTxtAttr(
+ const_cast<SwDoc&>(rDoc),
+ *const_cast<SfxPoolItem*>(pItem) );
pAttr->SetPriorityAttr( sal_True );
aHints.C40_INSERT( SwTxtAttr, pAttr, aHints.Count());
rAttrHandler.PushAndChg( *pAttr, rFnt );
@@ -352,7 +355,7 @@ void SwRedlineItr::_Clear( SwFont* pFnt )
rAttrHandler.PopAndChg( *pPos, *pFnt );
else
rAttrHandler.Pop( *pPos );
- delete pPos;
+ SwTxtAttr::Destroy(pPos, const_cast<SwDoc&>(rDoc).GetAttrPool() );
}
if( pFnt )
pFnt->SetNoCol( sal_False );
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 89e519bcd2..475beaecb3 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -152,19 +152,7 @@ SwDropPortion::~SwDropPortion()
sal_Bool SwTxtSizeInfo::_HasHint( const SwTxtNode* pTxtNode, xub_StrLen nPos )
{
- const SwpHints *pHints = pTxtNode->GetpSwpHints();
- if( !pHints )
- return sal_False;
- for ( USHORT i = 0; i < pHints->Count(); ++i )
- {
- const SwTxtAttr *pPos = (*pHints)[i];
- xub_StrLen nStart = *pPos->GetStart();
- if( nPos < nStart )
- return sal_False;
- if( nPos == nStart && !pPos->GetEnd() )
- return sal_True;
- }
- return sal_False;
+ return 0 != pTxtNode->GetTxtAttrForCharAt(nPos);
}
/*************************************************************************
@@ -179,7 +167,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 +189,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/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 202cbb886a..4eae178d3e 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -63,6 +63,7 @@
#include "docufld.hxx"
#include "pagedesc.hxx" // NewFldPortion, GetNum()
#include <pormulti.hxx> // SwMultiPortion
+#include "fmtmeta.hxx" // lcl_NewMetaPortion
/*************************************************************************
@@ -257,12 +258,65 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
return pRet;
}
+/*************************************************************************
+ * SwTxtFormatter::TryNewNoLengthPortion()
+ *************************************************************************/
+
+SwFldPortion * lcl_NewMetaPortion(SwTxtAttr & rHint, const bool bPrefix)
+{
+ ::sw::Meta *const pMeta(
+ static_cast<SwFmtMeta &>(rHint.GetAttr()).GetMeta() );
+ ::rtl::OUString fix;
+ ::sw::MetaField *const pField( dynamic_cast< ::sw::MetaField * >(pMeta) );
+ OSL_ENSURE(pField, "lcl_NewMetaPortion: no meta field?");
+ if (pField)
+ {
+ pField->GetPrefixAndSuffix((bPrefix) ? &fix : 0, (bPrefix) ? 0 : &fix);
+ }
+ return new SwFldPortion( fix );
+}
+
+/** Try to create a new portion with zero length, for an end of a hint
+ (where there is no CH_TXTATR). Because there may be multiple hint ends at a
+ given index, m_nHintEndIndex is used to keep track of the already created
+ portions. But the portions created here may actually be deleted again,
+ due to UnderFlow. In that case, m_nHintEndIndex must be decremented,
+ so the portion will be created again on the next line.
+ */
+SwExpandPortion *
+SwTxtFormatter::TryNewNoLengthPortion(SwTxtFormatInfo & rInfo)
+{
+ if (pHints)
+ {
+ const xub_StrLen nIdx(rInfo.GetIdx());
+ while (m_nHintEndIndex < pHints->GetEndCount())
+ {
+ SwTxtAttr & rHint( *pHints->GetEnd(m_nHintEndIndex) );
+ xub_StrLen const nEnd( *rHint.GetAnyEnd() );
+ if (nEnd > nIdx)
+ {
+ break;
+ }
+ ++m_nHintEndIndex;
+ if (nEnd == nIdx)
+ {
+ if (RES_TXTATR_METAFIELD == rHint.Which())
+ {
+ SwFldPortion *const pPortion(
+ lcl_NewMetaPortion(rHint, false));
+ pPortion->SetNoLength(); // no CH_TXTATR at hint end!
+ return pPortion;
+ }
+ }
+ }
+ }
+ return 0;
+}
/*************************************************************************
* SwTxtFormatter::NewExtraPortion()
*************************************************************************/
-
SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
{
SwTxtAttr *pHint = GetAttr( rInf.GetIdx() );
@@ -290,16 +344,6 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
pRet = NewFtnPortion( rInf, pHint );
break;
}
- case RES_TXTATR_SOFTHYPH :
- {
- pRet = new SwSoftHyphPortion;
- break;
- }
- case RES_TXTATR_HARDBLANK :
- {
- pRet = new SwBlankPortion( ((SwTxtHardBlank*)pHint)->GetChar() );
- break;
- }
case RES_TXTATR_FIELD :
{
pRet = NewFldPortion( rInf, pHint );
@@ -315,6 +359,11 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
pRet = new SwIsoToxPortion;
break;
}
+ case RES_TXTATR_METAFIELD:
+ {
+ pRet = lcl_NewMetaPortion( *pHint, true );
+ break;
+ }
default: ;
}
if( !pRet )
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 64f9fd1c7f..8da2cbf4fb 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -500,26 +500,10 @@ bool lcl_HideObj( const SwTxtFrm& _rFrm,
_rFrm.GetTxtNode()->GetTxt().GetChar( _nObjAnchorPos );
if ( cAnchorChar == CH_TXTATR_BREAKWORD )
{
- SwpHints* pHints =
- const_cast<SwTxtFrm&>(_rFrm).GetTxtNode()->GetpSwpHints();
- const SwTxtAttr* pHint( 0 );
- if( pHints )
- {
- for ( USHORT i = 0; i < pHints->Count(); ++i )
- {
- SwTxtAttr* pPos = pHints->GetTextHint(i);
- xub_StrLen nStart = *pPos->GetStart();
- if ( _nObjAnchorPos < nStart )
- break;
- if ( _nObjAnchorPos == nStart && !pPos->GetEnd() )
- {
- pHint = pPos;
- break;
- }
- }
- }
- if ( pHint &&
- pHint->Which() == RES_TXTATR_FLYCNT )
+ const SwTxtAttr* const pHint(
+ _rFrm.GetTxtNode()->GetTxtAttrForCharAt(_nObjAnchorPos,
+ RES_TXTATR_FLYCNT) );
+ if ( pHint )
{
const SwFrmFmt* pFrmFmt =
static_cast<const SwTxtFlyCnt*>(pHint)->GetFlyCnt().GetFrmFmt();
@@ -1040,7 +1024,7 @@ void SwTxtFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
_InvalidateRange( SwCharRange( nPos, nLen) );
MSHORT nTmp = ((SwUpdateAttr*)pNew)->nWhichAttr;
- if( ! nTmp || RES_TXTATR_CHARFMT == nTmp || RES_TXTATR_AUTOFMT ||
+ if( ! nTmp || RES_TXTATR_CHARFMT == nTmp || RES_TXTATR_AUTOFMT == nTmp ||
RES_FMT_CHG == nTmp || RES_ATTRSET_CHG == nTmp )
{
SET_WRONG( nPos, nPos + nLen, false )
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index a92b77b11e..602cc4803d 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);