You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/11/27 18:25:54 UTC
svn commit: r1546124 [26/33] - in /openoffice/branches/alg/aw080: ./ main/
main/accessibility/inc/accessibility/extended/
main/accessibility/inc/accessibility/helper/
main/accessibility/inc/accessibility/standard/
main/accessibility/source/extended/ ma...
Modified: openoffice/branches/alg/aw080/main/sw/source/core/layout/tabfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/layout/tabfrm.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/layout/tabfrm.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/layout/tabfrm.cxx Wed Nov 27 17:25:40 2013
@@ -95,10 +95,9 @@ SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm
bComplete = bCalcLowers = bONECalcLowers = bLowersFormatted = bLockBackMove =
bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
bRestrictTableGrowth = bRemoveFollowFlowLinePending = sal_False;
- // --> OD 2004-10-04 #i26945#
bConsiderObjsForMinCellHeight = sal_True;
bObjsDoesFit = sal_True;
- // <--
+ mbInRecalcLowerRow = false;
bFixSize = sal_False; //Nicht nochmal auf die Importfilter hereinfallen.
nType = FRMC_TAB;
@@ -128,10 +127,9 @@ SwTabFrm::SwTabFrm( SwTabFrm &rTab ) :
bLockJoin = bComplete = bONECalcLowers = bCalcLowers = bLowersFormatted = bLockBackMove =
bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
bRestrictTableGrowth = bRemoveFollowFlowLinePending = sal_False;
- // --> OD 2004-10-04 #i26945#
bConsiderObjsForMinCellHeight = sal_True;
bObjsDoesFit = sal_True;
- // <--
+ mbInRecalcLowerRow = false;
bFixSize = sal_False; //Nicht nochmal auf die Importfilter hereinfallen.
nType = FRMC_TAB;
@@ -2040,182 +2038,160 @@ void SwTabFrm::MakeAll()
int nUnSplitted = 5; // Just another loop control :-(
SWRECTFN( this )
- while ( !bValidPos || !bValidSize || !bValidPrtArea )
- {
- if ( sal_True == (bMoveable = IsMoveable()) )
- if ( CheckMoveFwd( bMakePage, bKeep && KEEPTAB, bMovedBwd ) )
- {
- bMovedFwd = sal_True;
- bCalcLowers = sal_True;
+ while ( !bValidPos || !bValidSize || !bValidPrtArea )
+ {
+ if ( sal_True == (bMoveable = IsMoveable()) )
+ if ( CheckMoveFwd( bMakePage, bKeep && KEEPTAB, bMovedBwd ) )
+ {
+ bMovedFwd = sal_True;
+ bCalcLowers = sal_True;
// --> OD 2009-08-12 #i99267#
// reset <bSplit> after forward move to assure that follows
// can be joined, if further space is available.
bSplit = sal_False;
// <--
- }
+ }
Point aOldPos( (Frm().*fnRect->fnGetPos)() );
- MakePos();
+ MakePos();
if ( aOldPos != (Frm().*fnRect->fnGetPos)() )
- {
+ {
if ( aOldPos.Y() != (Frm().*fnRect->fnGetTop)() )
- {
- SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
- if( pLayout )
- {
- delete pAccess;
- bCalcLowers |= pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
+ {
+ SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
+ if( pLayout )
+ {
+ delete pAccess;
+ bCalcLowers |= pLayout->Resize(
+ pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
pAccess = new SwBorderAttrAccess( SwFrm::GetCache(), this );
- pAttrs = pAccess->Get();
- }
+ pAttrs = pAccess->Get();
+ }
- bValidPrtArea = sal_False;
- aNotify.SetLowersComplete( sal_False );
- }
- SwFrm *pPre;
- if ( bKeep || (0 != (pPre = FindPrev()) &&
- pPre->GetAttrSet()->GetKeep().GetValue()) )
- {
- bCalcLowers = sal_True;
- }
- }
+ bValidPrtArea = sal_False;
+ aNotify.SetLowersComplete( sal_False );
+ }
+ SwFrm *pPre;
+ if ( bKeep || (0 != (pPre = FindPrev()) &&
+ pPre->GetAttrSet()->GetKeep().GetValue()) )
+ {
+ bCalcLowers = sal_True;
+ }
+ }
- //Wir muessen die Hoehe der ersten Zeile kennen, denn nur wenn diese
- //kleiner wird muss ggf. der Master angestossen werden um noetigenfalls
- //die Zeile aufzunehmen.
- long n1StLineHeight = 0;
- if ( IsFollow() )
- {
+ //Wir muessen die Hoehe der ersten Zeile kennen, denn nur wenn diese
+ //kleiner wird muss ggf. der Master angestossen werden um noetigenfalls
+ //die Zeile aufzunehmen.
+ long n1StLineHeight = 0;
+ if ( IsFollow() )
+ {
SwFrm* pFrm = GetFirstNonHeadlineRow();
if ( pFrm )
n1StLineHeight = (pFrm->Frm().*fnRect->fnGetHeight)();
- }
+ }
- if ( !bValidSize || !bValidPrtArea )
- {
+ if ( !bValidSize || !bValidPrtArea )
+ {
const long nOldPrtWidth = (Prt().*fnRect->fnGetWidth)();
const long nOldFrmWidth = (Frm().*fnRect->fnGetWidth)();
const Point aOldPrtPos = (Prt().*fnRect->fnGetPos)();
- Format( pAttrs );
+ Format( pAttrs );
- SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
- if ( pLayout &&
- ((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth ||
- (Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) )
- {
- delete pAccess;
- bCalcLowers |= pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
-// GetFmt()->GetDoc()->GetDocShell()->IsReadOnly() ? sal_False : sal_True );
- pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
- pAttrs = pAccess->Get();
- }
+ SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
+ if ( pLayout &&
+ ((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth ||
+ (Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) )
+ {
+ delete pAccess;
+ bCalcLowers |= pLayout->Resize(
+ pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
+ pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
+ pAttrs = pAccess->Get();
+ }
if ( aOldPrtPos != (Prt().*fnRect->fnGetPos)() )
- aNotify.SetLowersComplete( sal_False );
- }
+ aNotify.SetLowersComplete( sal_False );
+ }
- //Wenn ich der erste einer Kette bin koennte ich mal sehen ob
- //ich zurueckfliessen kann (wenn ich mich ueberhaupt bewegen soll).
- //Damit es keine Oszillation gibt, darf ich nicht gerade vorwaerts
- //geflosssen sein.
+ //Wenn ich der erste einer Kette bin koennte ich mal sehen ob
+ //ich zurueckfliessen kann (wenn ich mich ueberhaupt bewegen soll).
+ //Damit es keine Oszillation gibt, darf ich nicht gerade vorwaerts
+ //geflosssen sein.
if ( !bMovedFwd && (bMoveable || bFly) && lcl_NoPrev( *this ) )
- {
- //Bei Follows muss der Master benachrichtigt
- //werden. Der Follow muss nur dann Moven, wenn er leere Blaetter
- //ueberspringen muss.
- if ( IsFollow() )
- {
- //Nur wenn die Hoehe der ersten Zeile kleiner geworder ist.
+ {
+ //Bei Follows muss der Master benachrichtigt
+ //werden. Der Follow muss nur dann Moven, wenn er leere Blaetter
+ //ueberspringen muss.
+ if ( IsFollow() )
+ {
+ //Nur wenn die Hoehe der ersten Zeile kleiner geworder ist.
SwFrm *pFrm = GetFirstNonHeadlineRow();
if( pFrm && n1StLineHeight >(pFrm->Frm().*fnRect->fnGetHeight )() )
- {
- SwTabFrm *pMaster = (SwTabFrm*)FindMaster();
- sal_Bool bDummy;
- if ( ShouldBwdMoved( pMaster->GetUpper(), sal_False, bDummy ) )
- pMaster->InvalidatePos();
- }
- }
- SwFtnBossFrm *pOldBoss = bFtnsInDoc ? FindFtnBossFrm( sal_True ) : 0;
- sal_Bool bReformat;
- if ( MoveBwd( bReformat ) )
- {
+ {
+ SwTabFrm *pMaster = (SwTabFrm*)FindMaster();
+ sal_Bool bDummy;
+ if ( ShouldBwdMoved( pMaster->GetUpper(), sal_False, bDummy ) )
+ pMaster->InvalidatePos();
+ }
+ }
+ SwFtnBossFrm *pOldBoss = bFtnsInDoc ? FindFtnBossFrm( sal_True ) : 0;
+ sal_Bool bReformat;
+ if ( MoveBwd( bReformat ) )
+ {
SWREFRESHFN( this )
- bMovedBwd = sal_True;
- aNotify.SetLowersComplete( sal_False );
- if ( bFtnsInDoc )
- MoveLowerFtns( 0, pOldBoss, 0, sal_True );
- if ( bReformat || bKeep )
- {
+ bMovedBwd = sal_True;
+ aNotify.SetLowersComplete( sal_False );
+ if ( bFtnsInDoc )
+ MoveLowerFtns( 0, pOldBoss, 0, sal_True );
+ if ( bReformat || bKeep )
+ {
long nOldTop = (Frm().*fnRect->fnGetTop)();
MakePos();
if( nOldTop != (Frm().*fnRect->fnGetTop)() )
- {
+ {
SwHTMLTableLayout *pHTMLLayout =
- GetTable()->GetHTMLTableLayout();
+ GetTable()->GetHTMLTableLayout();
if( pHTMLLayout )
- {
- delete pAccess;
+ {
+ delete pAccess;
bCalcLowers |= pHTMLLayout->Resize(
pHTMLLayout->GetBrowseWidthByTabFrm( *this ),
- sal_False );
+ sal_False );
- pAccess= new SwBorderAttrAccess(
- SwFrm::GetCache(), this );
- pAttrs = pAccess->Get();
- }
+ pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
+ pAttrs = pAccess->Get();
+ }
- bValidPrtArea = sal_False;
- Format( pAttrs );
- }
+ bValidPrtArea = sal_False;
+ Format( pAttrs );
+ }
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = sal_True;
- if ( bKeep && KEEPTAB )
- {
- // --> OD 2005-09-28 #b6329202#
- // Consider case that table is inside another table,
- // because it has to be avoided, that superior table
- // is formatted.
- // Thus, find next content, table or section
- // and, if a section is found, get its first
- // content.
-// SwFrm *pNxt = FindNextCnt();
-// if( pNxt && pNxt->IsInTab() )
-// pNxt = pNxt->FindTabFrm();
-// if ( pNxt )
-// {
-// pNxt->Calc();
-// if ( !GetNext() )
-// bValidPos = sal_False;
-// }
+ bLowersFormatted = sal_True;
+ if ( bKeep && KEEPTAB )
+ {
if ( 0 != lcl_FormatNextCntntForKeep( this ) && !GetNext() )
{
bValidPos = sal_False;
}
- // <--
- }
- }
- }
- }
+ }
+ }
+ }
+ }
- //Wieder ein Wert ungueltig? - dann nochmal das ganze...
- if ( !bValidPos || !bValidSize || !bValidPrtArea )
- continue;
+ //Wieder ein Wert ungueltig? - dann nochmal das ganze...
+ if ( !bValidPos || !bValidSize || !bValidPrtArea )
+ continue;
// check, if calculation of table frame is ready.
- /// OD 23.10.2002 #103517# - Local variable <nDistanceToUpperPrtBottom>
- /// Introduce local variable and init it with the distance from the
- /// table frame bottom to the bottom of the upper printing area.
- /// Note: negative values denotes the situation that table frame doesn't
- /// fit in its upper.
-
+ // Local variable <nDistanceToUpperPrtBottom>
+ // Introduce local variable and init it with the distance from the
+ // table frame bottom to the bottom of the upper printing area.
+ // Note: negative values denotes the situation that table frame doesn't fit in its upper.
SwTwips nDistanceToUpperPrtBottom =
(Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
- /// OD 23.10.2002 #103517# - In online layout try to grow upper of table
- /// frame, if table frame doesn't fit in its upper.
+ // In online layout try to grow upper of table frame, if table frame doesn't fit in its upper.
const ViewShell *pSh = getRootFrm()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
if ( nDistanceToUpperPrtBottom < 0 && bBrowseMode )
@@ -2223,8 +2199,7 @@ void SwTabFrm::MakeAll()
if ( GetUpper()->Grow( -nDistanceToUpperPrtBottom ) )
{
// upper is grown --> recalculate <nDistanceToUpperPrtBottom>
- nDistanceToUpperPrtBottom =
- (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
+ nDistanceToUpperPrtBottom = (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
}
}
@@ -2234,20 +2209,19 @@ void SwTabFrm::MakeAll()
// the table to be split! Only skip this if condition once.
if( nDistanceToUpperPrtBottom >= 0 && !bLastRowHasToMoveToFollow )
{
- // OD 23.10.2002 - translate german commentary
// If there is space left in the upper printing area, join as for trial
// at least one further row of an existing follow.
- if ( !bSplit && GetFollow() )
- {
- sal_Bool bDummy;
- if ( GetFollow()->ShouldBwdMoved( GetUpper(), sal_False, bDummy ) )
- {
+ if ( !bSplit && GetFollow() )
+ {
+ sal_Bool bDummy;
+ if ( GetFollow()->ShouldBwdMoved( GetUpper(), sal_False, bDummy ) )
+ {
SwFrm *pTmp = GetUpper();
SwTwips nDeadLine = (pTmp->*fnRect->fnGetPrtBottom)();
if ( bBrowseMode )
nDeadLine += pTmp->Grow( LONG_MAX, sal_True );
if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) > 0 )
- {
+ {
//
// First, we remove an existing follow flow line.
//
@@ -2267,7 +2241,7 @@ void SwTabFrm::MakeAll()
SwFrm* pRow = GetFollow()->GetFirstNonHeadlineRow();
if ( !pRow || !pRow->GetNext() )
- //Der Follow wird leer und damit ueberfluessig.
+ //Der Follow wird leer und damit ueberfluessig.
Join();
continue;
@@ -2279,8 +2253,8 @@ void SwTabFrm::MakeAll()
//
SwRowFrm *pRow = GetFollow()->GetFirstNonHeadlineRow();
- //Der Follow wird leer und damit ueberfluessig.
- if ( !pRow )
+ //Der Follow wird leer und damit ueberfluessig.
+ if ( !pRow )
{
Join();
continue;
@@ -2292,28 +2266,29 @@ void SwTabFrm::MakeAll()
while ( pRowToMove && nRowsToMove-- > 0 )
{
- const sal_Bool bMoveFtns = bFtnsInDoc && !GetFollow()->IsJoinLocked();
+ const sal_Bool bMoveFtns = bFtnsInDoc && !GetFollow()->IsJoinLocked();
SwFtnBossFrm *pOldBoss = 0;
- if ( bMoveFtns )
- pOldBoss = pRowToMove->FindFtnBossFrm( sal_True );
+ if ( bMoveFtns )
+ pOldBoss = pRowToMove->FindFtnBossFrm( sal_True );
SwFrm* pNextRow = pRowToMove->GetNext();
- if ( !pNextRow )
- //Der Follow wird leer und damit ueberfluessig.
+ if ( !pNextRow )
+ {
+ //Der Follow wird leer und damit ueberfluessig.
Join();
+ }
else
- {
- pRowToMove->Cut();
- pRowToMove->Paste( this );
+ {
+ pRowToMove->Cut();
+ pRowToMove->Paste( this );
}
- //Die Fussnoten verschieben!
- if ( bMoveFtns )
- if ( ((SwLayoutFrm*)pRowToMove)->MoveLowerFtns(
- 0, pOldBoss, FindFtnBossFrm( sal_True ), sal_True ) )
- GetUpper()->Calc();
+ //Die Fussnoten verschieben!
+ if ( bMoveFtns )
+ if ( ((SwLayoutFrm*)pRowToMove)->MoveLowerFtns( 0, pOldBoss, FindFtnBossFrm( sal_True ), sal_True ) )
+ GetUpper()->Calc();
pRowToMove = pNextRow;
}
@@ -2322,11 +2297,11 @@ void SwTabFrm::MakeAll()
lcl_RecalcTable( *this, (SwLayoutFrm*)pRow, aNotify );
continue;
- }
- }
- }
- else if ( KEEPTAB )
- {
+ }
+ }
+ }
+ else if ( KEEPTAB )
+ {
bool bFormat = false;
if ( bKeep )
bFormat = true;
@@ -2374,61 +2349,61 @@ void SwTabFrm::MakeAll()
bLastRowHasToMoveToFollow = true;
}
}
- }
+ }
- if ( IsValid() )
- {
- if ( bCalcLowers )
- {
+ if ( IsValid() )
+ {
+ if ( bCalcLowers )
+ {
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = sal_True;
- bCalcLowers = sal_False;
- }
- else if ( bONECalcLowers )
- {
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
+ }
+ else if ( bONECalcLowers )
+ {
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bONECalcLowers = sal_False;
- }
- }
- continue;
- }
+ bONECalcLowers = sal_False;
+ }
+ }
+ continue;
+ }
//Ich passe nicht mehr in meinen Uebergeordneten, also ist es jetzt
- //an der Zeit moeglichst konstruktive Veranderungen vorzunehmen
+ //an der Zeit moeglichst konstruktive Veranderungen vorzunehmen
- //Wenn ich den uebergeordneten Frm nicht verlassen darf, habe
- //ich ein Problem; Frei nach Artur Dent tun wir das einzige das man
- //mit einen nicht loesbaren Problem tun kann: wir ignorieren es - und
- //zwar mit aller Kraft.
- if ( !bMoveable )
- {
- if ( bCalcLowers && IsValid() )
- {
+ //Wenn ich den uebergeordneten Frm nicht verlassen darf, habe
+ //ich ein Problem; Frei nach Artur Dent tun wir das einzige das man
+ //mit einen nicht loesbaren Problem tun kann: wir ignorieren es - und
+ //zwar mit aller Kraft.
+ if ( !bMoveable )
+ {
+ if ( bCalcLowers && IsValid() )
+ {
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = sal_True;
- bCalcLowers = sal_False;
- }
- else if ( bONECalcLowers )
- {
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
+ }
+ else if ( bONECalcLowers )
+ {
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bONECalcLowers = sal_False;
- }
+ bONECalcLowers = sal_False;
+ }
// It does not make sense to cut off the last line if we are
// not moveable:
bLastRowHasToMoveToFollow = false;
- continue;
- }
+ continue;
+ }
if ( bCalcLowers && IsValid() )
- {
+ {
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = sal_True;
- bCalcLowers = sal_False;
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
if( !IsValid() )
continue;
- }
+ }
//
// First try to split the table. Condition:
@@ -2472,7 +2447,11 @@ void SwTabFrm::MakeAll()
nDeadLine = (*fnRect->fnYInc)( nDeadLine,
GetUpper()->Grow( LONG_MAX, sal_True ) );
- ::lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), nDeadLine );
+ {
+ SetInRecalcLowerRow( true );
+ ::lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), nDeadLine );
+ SetInRecalcLowerRow( false );
+ }
bLowersFormatted = sal_True;
aNotify.SetLowersComplete( sal_True );
@@ -2630,10 +2609,8 @@ void SwTabFrm::MakeAll()
SwFrm* pNxt = ((SwFrm*)GetFollow())->FindNext();
if ( pNxt )
{
- // OD 26.08.2003 #i18103# - no formatting
- // of found next frame, if its a follow
- // section of the 'ColLocked' section,
- // the follow table is in.
+ // no formatting of found next frame, if its a follow
+ // section of the 'ColLocked' section, the follow table is in.
bool bCalcNxt = true;
if ( GetFollow()->IsInSct() && pNxt->IsSctFrm() )
{
@@ -2679,30 +2656,30 @@ void SwTabFrm::MakeAll()
if ( !bMovedFwd && !MoveFwd( bMakePage, sal_False ) )
bMakePage = sal_False;
- // --> FME 2004-06-09 #i29771# Reset bSplitError flag on change of upper
+ // Reset bSplitError flag on change of upper
if ( GetUpper() != pOldUpper )
- {
+ {
bTryToSplit = true;
- nUnSplitted = 5;
- }
- // <--
+ nUnSplitted = 5;
+ }
SWREFRESHFN( this )
bMovedFwd = bCalcLowers = sal_True;
aNotify.SetLowersComplete( sal_False );
- if ( IsFollow() )
- { //Um Oszillationen zu vermeiden sollte kein ungueltiger Master
- //zurueckbleiben.
- SwTabFrm *pTab = FindMaster();
- if ( pTab->GetUpper() )
- pTab->GetUpper()->Calc();
- pTab->Calc();
- pTab->SetLowersFormatted( sal_False );
- }
+ if ( IsFollow() )
+ {
+ //Um Oszillationen zu vermeiden sollte kein ungueltiger Master
+ //zurueckbleiben.
+ SwTabFrm *pTab = FindMaster();
+ if ( pTab->GetUpper() )
+ pTab->GetUpper()->Calc();
+ pTab->Calc();
+ pTab->SetLowersFormatted( sal_False );
+ }
- //Wenn mein direkter Nachbar jetzt gleichzeitig mein Follow ist
- //verleibe ich mir das Teil ein.
- if ( ( GetNext() && GetNext() == GetFollow() ) || !GetLower() )
+ //Wenn mein direkter Nachbar jetzt gleichzeitig mein Follow ist
+ //verleibe ich mir das Teil ein.
+ if ( ( GetNext() && GetNext() == GetFollow() ) || !GetLower() )
{
if ( HasFollowFlowLine() )
RemoveFollowFlowLine();
@@ -2710,17 +2687,18 @@ void SwTabFrm::MakeAll()
Join();
}
- if ( bMovedBwd && GetUpper() )
- //Beim zurueckfliessen wurde der Upper angeregt sich vollstaendig
- //zu Painten, dass koennen wir uns jetzt nach dem hin und her
- //fliessen sparen.
- GetUpper()->ResetCompletePaint();
+ if ( bMovedBwd && GetUpper() )
+ {
+ //Beim zurueckfliessen wurde der Upper angeregt sich vollstaendig
+ //zu Painten, dass koennen wir uns jetzt nach dem hin und her
+ //fliessen sparen.
+ GetUpper()->ResetCompletePaint();
+ }
if ( bCalcLowers && IsValid() )
- {
- // --> OD 2005-05-11 #i44910# - format of lower frames unnecessary
- // and can cause layout loops, if table doesn't fit and isn't
- // allowed to split.
+ {
+ // format of lower frames unnecessary and can cause layout loops,
+ // if table doesn't fit and isn't allowed to split.
SwTwips nDistToUpperPrtBottom =
(Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
if ( nDistToUpperPrtBottom >= 0 || bTryToSplit )
@@ -2735,25 +2713,24 @@ void SwTabFrm::MakeAll()
ASSERT( false, "debug assertion: <SwTabFrm::MakeAll()> - format of table lowers suppressed by fix i44910" );
}
#endif
- // <--
- }
+ }
- } //while ( !bValidPos || !bValidSize || !bValidPrtArea )
+ } //while ( !bValidPos || !bValidSize || !bValidPrtArea )
- //Wenn mein direkter Vorgaenger jetzt mein Master ist, so kann er mich
- //bei der nachstbesten Gelegenheit vernichten.
- if ( IsFollow() )
- {
- SwFrm *pPre = GetPrev();
- if ( pPre && pPre->IsTabFrm() && ((SwTabFrm*)pPre)->GetFollow() == this)
- pPre->InvalidatePos();
- }
+ //Wenn mein direkter Vorgaenger jetzt mein Master ist, so kann er mich
+ //bei der nachstbesten Gelegenheit vernichten.
+ if ( IsFollow() )
+ {
+ SwFrm *pPre = GetPrev();
+ if ( pPre && pPre->IsTabFrm() && ((SwTabFrm*)pPre)->GetFollow() == this)
+ pPre->InvalidatePos();
+ }
- bCalcLowers = bONECalcLowers = sal_False;
- delete pAccess;
- UnlockJoin();
+ bCalcLowers = bONECalcLowers = sal_False;
+ delete pAccess;
+ UnlockJoin();
if ( bMovedFwd || bMovedBwd || !bOldValidPos )
- aNotify.SetInvaKeep();
+ aNotify.SetInvaKeep();
}
/*************************************************************************
@@ -4817,28 +4794,30 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDi
}
}
- //Geeignet invalidieren und die Hoehe der Zellen auf den neuesten
- //Stand bringen.
- if ( !bTst )
- {
- if ( nReal )
- {
- if ( GetNext() )
- GetNext()->_InvalidatePos();
- _InvalidateAll();
- SetCompletePaint();
+ //Geeignet invalidieren und die Hoehe der Zellen auf den neuesten
+ //Stand bringen.
+ if ( !bTst )
+ {
+ if ( nReal )
+ {
+ if ( GetNext() )
+ GetNext()->_InvalidatePos();
+ _InvalidateAll();
+ SetCompletePaint();
- SwTabFrm *pTab = FindTabFrm();
- if ( !pTab->IsRebuildLastLine() && pTab->IsFollow() &&
- this == pTab->GetFirstNonHeadlineRow() )
+ SwTabFrm *pTab = FindTabFrm();
+ if ( !pTab->IsRebuildLastLine()
+ && pTab->IsFollow()
+ && this == pTab->GetFirstNonHeadlineRow()
+ && !pTab->IsInRecalcLowerRow() )
{
SwTabFrm* pMasterTab = const_cast< SwTabFrm* >( pTab->FindMaster() );
pMasterTab->InvalidatePos();
}
}
AdjustCells( (Prt().*fnRect->fnGetHeight)() - nReal, sal_True );
- }
- return nReal;
+ }
+ return nReal;
}
/*************************************************************************
Modified: openoffice/branches/alg/aw080/main/sw/source/core/layout/trvlfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/layout/trvlfrm.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/layout/trvlfrm.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/layout/trvlfrm.cxx Wed Nov 27 17:25:40 2013
@@ -2007,7 +2007,9 @@ inline void Sub( SwRegionRects& rRegion,
rRegion -= rRect;
}
-void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
+void SwRootFrm::CalcFrmRects(
+ SwShellCrsr &rCrsr,
+ const sal_Bool bIsTblMode )
{
SwPosition *pStartPos = rCrsr.Start(),
*pEndPos = rCrsr.GetPoint() == pStartPos ? rCrsr.GetMark() : rCrsr.GetPoint();
Modified: openoffice/branches/alg/aw080/main/sw/source/core/layout/wsfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/layout/wsfrm.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/layout/wsfrm.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/layout/wsfrm.cxx Wed Nov 27 17:25:40 2013
@@ -96,6 +96,10 @@ SwFrm::SwFrm( SwModify *pMod, SwFrm* pSi
pNext( 0 ),
pPrev( 0 ),
pDrawObjs( 0 )
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add a member to identify if the acc table should dispose
+ , bIfAccTableShouldDisposing( sal_False )
+ //-----IAccessibility2 Implementation 2009
, bInfBody( sal_False )
, bInfTab ( sal_False )
, bInfFly ( sal_False )
Modified: openoffice/branches/alg/aw080/main/sw/source/core/ole/ndole.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/ole/ndole.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/ole/ndole.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/ole/ndole.cxx Wed Nov 27 17:25:40 2013
@@ -794,6 +794,15 @@ void SwOLEObj::SetNode( SwOLENode* pNode
}
}
+//IAccessibility2 Implementation 2009-----
+String SwOLEObj::GetStyleString()
+{
+ String strStyle;
+ if (xOLERef.is() && xOLERef.IsChart())
+ strStyle = xOLERef.GetChartType();
+ return strStyle;
+}
+//-----IAccessibility2 Implementation 2009
sal_Bool SwOLEObj::IsOleRef() const
{
return xOLERef.is();
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/atrhndl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/atrhndl.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/atrhndl.hxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/atrhndl.hxx Wed Nov 27 17:25:40 2013
@@ -25,7 +25,7 @@
#define _ATRHNDL_HXX
#define INITIAL_NUM_ATTR 3
-#define NUM_ATTRIBUTE_STACKS 40
+#define NUM_ATTRIBUTE_STACKS 41
#include <txatbase.hxx>
#include <swfntcch.hxx>
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/atrstck.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/atrstck.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/atrstck.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/atrstck.cxx Wed Nov 27 17:25:40 2013
@@ -132,7 +132,7 @@ const sal_uInt8 StackPos[ static_cast<sa
0, // RES_TXTATR_CHARFMT, // 49
39, // RES_TXTATR_CJK_RUBY, // 50
0, // RES_TXTATR_UNKNOWN_CONTAINER, // 51
- 0, // RES_TXTATR_DUMMY5 // 52
+ 40, // RES_TXTATR_INPUTFIELD // 52
};
/*************************************************************************
@@ -525,20 +525,21 @@ sal_Bool SwAttrHandler::Push( const SwTx
if ( RES_TXTATR_WITHEND_END <= rItem.Which() )
return sal_False;
- sal_uInt16 nStack = StackPos[ rItem.Which() ];
+ const sal_uInt16 nStack = StackPos[ rItem.Which() ];
// attributes originating from redlining have highest priority
// second priority are hyperlink attributes, which have a color replacement
const SwTxtAttr* pTopAttr = aAttrStack[ nStack ].Top();
- if ( !pTopAttr || rAttr.IsPriorityAttr() ||
- ( !pTopAttr->IsPriorityAttr() &&
- !lcl_ChgHyperLinkColor( *pTopAttr, rItem, mpShell, 0 ) ) )
+ if ( !pTopAttr
+ || rAttr.IsPriorityAttr()
+ || ( !pTopAttr->IsPriorityAttr()
+ && !lcl_ChgHyperLinkColor( *pTopAttr, rItem, mpShell, 0 ) ) )
{
aAttrStack[ nStack ].Push( rAttr );
return sal_True;
}
- sal_uInt16 nPos = aAttrStack[ nStack ].Count();
+ const sal_uInt16 nPos = aAttrStack[ nStack ].Count();
ASSERT( nPos, "empty stack?" );
aAttrStack[ nStack ].Insert( rAttr, nPos - 1 );
return sal_False;
@@ -688,6 +689,8 @@ void SwAttrHandler::ActivateTop( SwFont&
bVertLayout
);
}
+ else if ( RES_TXTATR_INPUTFIELD == nAttr )
+ rFnt.GetInputField()--;
}
/*************************************************************************
@@ -935,6 +938,12 @@ void SwAttrHandler::FontChg(const SfxPoo
else
rFnt.GetMeta()--;
break;
+ case RES_TXTATR_INPUTFIELD :
+ if ( bPush )
+ rFnt.GetInputField()++;
+ else
+ rFnt.GetInputField()--;
+ break;
}
}
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/frmform.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/frmform.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/frmform.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/frmform.cxx Wed Nov 27 17:25:40 2013
@@ -57,6 +57,11 @@
#include <frmfmt.hxx> // SwFrmFmt
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <portab.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/tstpitem.hxx>
+//-----IAccessibility2 Implementation 2009
class FormatLevel
{
@@ -556,6 +561,47 @@ void SwTxtFrm::AdjustFrm( const SwTwips
UNDO_SWAP( this )
}
+//IAccessibility2 Implementation 2009-----
+com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwTxtFrm::GetTabStopInfo( SwTwips CurrentPos )
+{
+ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > tabs(1);
+ ::com::sun::star::style::TabStop ts;
+
+ SwTxtFormatInfo aInf( this );
+ SwTxtFormatter aLine( this, &aInf );
+ SwTxtCursor TxtCursor( this, &aInf );
+ const Point aCharPos( TxtCursor.GetTopLeft() );
+
+
+ SwTwips nRight = aLine.Right();
+ CurrentPos -= aCharPos.X();
+
+ // get current tab stop information stored in the Frm
+ const SvxTabStop *pTS = aLine.GetLineInfo().GetTabStop( CurrentPos, nRight );
+
+ if( !pTS )
+ {
+ return com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop >();
+ }
+
+ // copy tab stop information into a Sequence, which only contains one element.
+ ts.Position = pTS->GetTabPos();
+ ts.DecimalChar = pTS->GetDecimal();
+ ts.FillChar = pTS->GetFill();
+ switch( pTS->GetAdjustment() )
+ {
+ case SVX_TAB_ADJUST_LEFT : ts.Alignment = ::com::sun::star::style::TabAlign_LEFT; break;
+ case SVX_TAB_ADJUST_CENTER : ts.Alignment = ::com::sun::star::style::TabAlign_CENTER; break;
+ case SVX_TAB_ADJUST_RIGHT : ts.Alignment = ::com::sun::star::style::TabAlign_RIGHT; break;
+ case SVX_TAB_ADJUST_DECIMAL: ts.Alignment = ::com::sun::star::style::TabAlign_DECIMAL; break;
+ case SVX_TAB_ADJUST_DEFAULT: ts.Alignment = ::com::sun::star::style::TabAlign_DEFAULT; break;
+ default: break; // prevent warning
+ }
+
+ tabs[0] = ts;
+ return tabs;
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
* SwTxtFrm::AdjustFollow()
*************************************************************************/
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/inftxt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/inftxt.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/inftxt.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/inftxt.cxx Wed Nov 27 17:25:40 2013
@@ -1271,42 +1271,52 @@ void SwTxtPaintInfo::_DrawBackBrush( con
*************************************************************************/
void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
- const MSHORT nWhich ) const
+ const MSHORT nWhich ) const
{
- if( OnWin() && !IsMulti() )
- {
- sal_Bool bDraw = sal_False;
- switch( nWhich )
- {
- case POR_FTN:
- case POR_QUOVADIS:
- case POR_NUMBER:
- case POR_FLD:
- case POR_URL:
- case POR_HIDDEN:
- case POR_TOX:
- case POR_REF:
- case POR_META:
- case POR_CONTROLCHAR:
- if ( !GetOpt().IsPagePreview() &&
- !GetOpt().IsReadonly() &&
- SwViewOption::IsFieldShadings() &&
- (POR_NUMBER != nWhich ||
- pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
- bDraw = sal_True;
+ if( OnWin() && !IsMulti() )
+ {
+ sal_Bool bDraw = sal_False;
+ switch( nWhich )
+ {
+ case POR_FTN:
+ case POR_QUOVADIS:
+ case POR_NUMBER:
+ case POR_FLD:
+ case POR_URL:
+ case POR_HIDDEN:
+ case POR_TOX:
+ case POR_REF:
+ case POR_META:
+ case POR_CONTROLCHAR:
+ if ( !GetOpt().IsPagePreview()
+ && !GetOpt().IsReadonly()
+ && SwViewOption::IsFieldShadings()
+ && ( POR_NUMBER != nWhich
+ || pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
+ {
+ bDraw = sal_True;
+ }
break;
- case POR_TAB: if ( GetOpt().IsTab() ) bDraw = sal_True; break;
- case POR_SOFTHYPH: if ( GetOpt().IsSoftHyph() )bDraw = sal_True; break;
- case POR_BLANK: if ( GetOpt().IsHardBlank())bDraw = sal_True; break;
- default:
- {
- ASSERT( !this, "SwTxtPaintInfo::DrawViewOpt: don't know how to draw this" );
- break;
- }
- }
- if ( bDraw )
- DrawBackground( rPor );
- }
+ case POR_INPUTFLD:
+ // input field shading also in read-only mode
+ if ( !GetOpt().IsPagePreview()
+ && SwViewOption::IsFieldShadings() )
+ {
+ bDraw = sal_True;
+ }
+ break;
+ case POR_TAB: if ( GetOpt().IsTab() ) bDraw = sal_True; break;
+ case POR_SOFTHYPH: if ( GetOpt().IsSoftHyph() )bDraw = sal_True; break;
+ case POR_BLANK: if ( GetOpt().IsHardBlank())bDraw = sal_True; break;
+ default:
+ {
+ ASSERT( !this, "SwTxtPaintInfo::DrawViewOpt: don't know how to draw this" );
+ break;
+ }
+ }
+ if ( bDraw )
+ DrawBackground( rPor );
+ }
}
/*************************************************************************
@@ -1750,8 +1760,12 @@ sal_Bool SwTxtFormatInfo::LastKernPortio
* class SwTxtSlot
*************************************************************************/
-SwTxtSlot::SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor,
- bool bTxtLen, bool bExgLists, const sal_Char *pCh )
+SwTxtSlot::SwTxtSlot(
+ const SwTxtSizeInfo *pNew,
+ const SwLinePortion *pPor,
+ bool bTxtLen,
+ bool bExgLists,
+ const sal_Char *pCh )
: pOldTxt( 0 ),
pOldSmartTagList( 0 ),
pOldGrammarCheckList( 0 ),
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/itrform2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/itrform2.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/itrform2.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/itrform2.cxx Wed Nov 27 17:25:40 2013
@@ -863,21 +863,27 @@ void SwMetaPortion::Paint( const SwTxtPa
SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
{
- SwTxtPortion *pPor = 0;
- if( GetFnt()->IsTox() )
- pPor = new SwToxPortion;
- else
- {
- if( GetFnt()->IsRef() )
- pPor = new SwRefPortion;
+ SwTxtPortion *pPor = 0;
+ if( GetFnt()->IsTox() )
+ {
+ pPor = new SwToxPortion;
+ }
+ else if ( GetFnt()->IsInputField() )
+ {
+ pPor = new SwTxtInputFldPortion();
+ }
+ else
+ {
+ if( GetFnt()->IsRef() )
+ pPor = new SwRefPortion;
else if (GetFnt()->IsMeta())
{
pPor = new SwMetaPortion;
}
- else
- {
- // Erst zum Schluss !
- // Wenn pCurr keine Breite hat, kann sie trotzdem schon Inhalt haben,
+ else
+ {
+ // Erst zum Schluss !
+ // Wenn pCurr keine Breite hat, kann sie trotzdem schon Inhalt haben,
// z.B. bei nicht darstellbaren Zeichen.
if( rInf.GetLen() > 0 )
{
@@ -895,8 +901,10 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPo
else
{
pPor = new SwTxtPortion;
- if( GetFnt()->IsURL() )
+ if ( GetFnt()->IsURL() )
+ {
pPor->SetWhichPor( POR_URL );
+ }
}
}
}
@@ -1302,39 +1310,37 @@ SwLinePortion *SwTxtFormatter::NewPortio
cChar = rInf.GetChar( rInf.GetIdx() );
}
- switch( cChar )
- {
+ switch( cChar )
+ {
case CH_TAB:
pPor = NewTabPortion( rInf, false ); break;
case CH_BREAK:
pPor = new SwBreakPortion( *rInf.GetLast() ); break;
- case CHAR_SOFTHYPHEN: // soft hyphen
- pPor = new SwSoftHyphPortion; break;
+ case CHAR_SOFTHYPHEN: // soft hyphen
+ pPor = new SwSoftHyphPortion; break;
- case CHAR_HARDBLANK: // no-break space
- pPor = new SwBlankPortion( ' ' ); break;
+ case CHAR_HARDBLANK: // no-break space
+ pPor = new SwBlankPortion( ' ' ); break;
case CHAR_HARDHYPHEN: // non-breaking hyphen
- pPor = new SwBlankPortion( '-' ); break;
+ pPor = new SwBlankPortion( '-' ); break;
case CHAR_ZWSP: // zero width space
case CHAR_ZWNBSP : // word joiner
-// case CHAR_RLM : // right to left mark
-// case CHAR_LRM : // left to right mark
pPor = new SwControlCharPortion( cChar ); break;
- case CH_TXTATR_BREAKWORD:
- case CH_TXTATR_INWORD:
- if( rInf.HasHint( rInf.GetIdx() ) )
- {
- pPor = NewExtraPortion( rInf );
- break;
- }
- // No break
- default :
- {
+ case CH_TXTATR_BREAKWORD:
+ case CH_TXTATR_INWORD:
+ if( rInf.HasHint( rInf.GetIdx() ) )
+ {
+ pPor = NewExtraPortion( rInf );
+ break;
+ }
+ // No break
+ default :
+ {
SwTabPortion* pLastTabPortion = rInf.GetLastTab();
if ( pLastTabPortion && cChar == rInf.GetTabDecimal() )
{
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/porfld.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/porfld.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/porfld.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/porfld.cxx Wed Nov 27 17:25:40 2013
@@ -68,10 +68,7 @@ SwFldPortion *SwFldPortion::Clone( const
{
pNewFnt = new SwFont( *pFnt );
}
- // --> OD 2009-11-25 #i107143#
- // pass placeholder property to created <SwFldPortion> instance.
SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt, bPlaceHolder );
- // <--
pClone->SetNextOffset( nNextOffset );
pClone->m_bNoLength = this->m_bNoLength;
return pClone;
@@ -91,6 +88,9 @@ SwFldPortion::SwFldPortion( const XubStr
, m_bNoLength( sal_False )
{
SetWhichPor( POR_FLD );
+ //IAccessibility2 Implementation 2009-----
+ m_nAttrFldType = 0;
+ //-----IAccessibility2 Implementation 2009
}
SwFldPortion::SwFldPortion( const SwFldPortion& rFld )
@@ -394,20 +394,10 @@ sal_Bool SwFldPortion::Format( SwTxtForm
case CHAR_HARDHYPHEN: // non-breaking hyphen
case CHAR_SOFTHYPHEN:
case CHAR_HARDBLANK:
- // --> FME 2006-01-11 #i59759# Erase additional control
- // characters from field string, otherwise we get stuck in
- // a loop.
case CHAR_ZWSP :
case CHAR_ZWNBSP :
- // case CHAR_RLM :
- // case CHAR_LRM :
- // <--
- // --> OD 2010-06-03 #i111750#
- // - Erasing further control characters from field string in
- // to avoid loop.
case CH_TXTATR_BREAKWORD:
case CH_TXTATR_INWORD:
- // <--
{
aNew.Erase( 0, 1 );
++nNextOfst;
@@ -481,6 +471,12 @@ sal_Bool SwFldPortion::GetExpTxt( const
void SwFldPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Special( GetLen(), aExpand, GetWhichPor() );
+ //IAccessibility2 Implementation 2009-----
+ if( GetWhichPor() == POR_FLD )
+ {
+ rPH.SetAttrFieldType(m_nAttrFldType);
+ }
+ //-----IAccessibility2 Implementation 2009
}
/*************************************************************************
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/porfld.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/porfld.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/porfld.hxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/porfld.hxx Wed Nov 27 17:25:40 2013
@@ -65,6 +65,9 @@ public:
SwFldPortion( const XubString &rExpand, SwFont *pFnt = 0, sal_Bool bPlaceHolder = sal_False );
~SwFldPortion();
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt16 m_nAttrFldType;
+ //-----IAccessibility2 Implementation 2009
void TakeNextOffset( const SwFldPortion* pFld );
void CheckScript( const SwTxtSizeInfo &rInf );
inline sal_Bool HasFont() const { return 0 != pFnt; }
@@ -174,7 +177,6 @@ public:
class SwBulletPortion : public SwNumberPortion
{
public:
- // --> OD 2008-01-23 #newlistlevelattrs#
SwBulletPortion( const xub_Unicode cCh,
const XubString& rBulletFollowedBy,
SwFont *pFnt,
@@ -182,7 +184,6 @@ public:
const sal_Bool bCenter,
const KSHORT nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- // <--
OUTPUT_OPERATOR
};
@@ -198,7 +199,6 @@ class SwGrfNumPortion : public SwNumberP
SwTwips nGrfHeight;
sal_Int16 eOrient;
public:
- // --> OD 2008-01-23 #newlistlevelattrs#
SwGrfNumPortion( SwFrm *pFrm,
const XubString& rGraphicFollowedBy,
const SvxBrushItem* pGrfBrush,
@@ -208,7 +208,6 @@ public:
const sal_Bool bCenter,
const KSHORT nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- // <--
~SwGrfNumPortion();
virtual void Paint( const SwTxtPaintInfo &rInf ) const;
virtual sal_Bool Format( SwTxtFormatInfo &rInf );
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/porlay.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/porlay.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/porlay.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/porlay.cxx Wed Nov 27 17:25:40 2013
@@ -2398,8 +2398,8 @@ void SwScriptInfo::CalcHiddenRanges( con
const SvxCharHiddenItem* pHiddenItem = static_cast<const SvxCharHiddenItem*>( CharFmt::GetItem( *pTxtAttr, RES_CHRATR_HIDDEN ) );
if( pHiddenItem )
{
- xub_StrLen nSt = *pTxtAttr->GetStart();
- xub_StrLen nEnd = *pTxtAttr->GetEnd();
+ const xub_StrLen nSt = *pTxtAttr->GetStart();
+ const xub_StrLen nEnd = *pTxtAttr->End();
if( nEnd > nSt )
{
Range aTmp( nSt, nEnd - 1 );
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/pormulti.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/pormulti.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/pormulti.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/pormulti.cxx Wed Nov 27 17:25:40 2013
@@ -992,7 +992,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
if( pRuby )
{ // The winner is ... a ruby attribute and so
// the end of the multiportion is the end of the ruby attribute.
- rPos = *pRuby->GetEnd();
+ rPos = *pRuby->End();
SwMultiCreator *pRet = new SwMultiCreator;
pRet->pItem = NULL;
pRet->pAttr = pRuby;
@@ -1018,7 +1018,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[n2Lines];
- aEnd.push_front( *pRet->pAttr->GetEnd() );
+ aEnd.push_front( *pRet->pAttr->End() );
if( pItem )
{
aEnd.front() = GetTxt().Len();
@@ -1094,8 +1094,8 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
if( bTwo == bOn )
{ // .. with the same state, so the last attribute could
// be continued.
- if( aEnd.back() < *pTmp->GetEnd() )
- aEnd.back() = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->End() )
+ aEnd.back() = *pTmp->End();
}
else
{ // .. with a different state.
@@ -1103,12 +1103,12 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
// If this is smaller than the last on the stack, we put
// it on the stack. If it has the same endposition, the last
// could be removed.
- if( aEnd.back() > *pTmp->GetEnd() )
- aEnd.push_back( *pTmp->GetEnd() );
+ if( aEnd.back() > *pTmp->End() )
+ aEnd.push_back( *pTmp->End() );
else if( aEnd.size() > 1 )
aEnd.pop_back();
else
- aEnd.back() = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->End();
}
}
}
@@ -1166,18 +1166,18 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
{
if( bTwo == bOn )
{
- if( aEnd.back() < *pTmp->GetEnd() )
- aEnd.back() = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->End() )
+ aEnd.back() = *pTmp->End();
}
else
{
bOn = bTwo;
- if( aEnd.back() > *pTmp->GetEnd() )
- aEnd.push_back( *pTmp->GetEnd() );
+ if( aEnd.back() > *pTmp->End() )
+ aEnd.push_back( *pTmp->End() );
else if( aEnd.size() > 1 )
aEnd.pop_back();
else
- aEnd.back() = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->End();
}
}
}
@@ -1192,7 +1192,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[nRotate];
- aEnd.push_front( *pRet->pAttr->GetEnd() );
+ aEnd.push_front( *pRet->pAttr->End() );
if( pRotItem )
{
aEnd.front() = GetTxt().Len();
@@ -1237,18 +1237,18 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiC
{
if( bTwo == bOn )
{
- if( aEnd.back() < *pTmp->GetEnd() )
- aEnd.back() = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->End() )
+ aEnd.back() = *pTmp->End();
}
else
{
bOn = bTwo;
- if( aEnd.back() > *pTmp->GetEnd() )
- aEnd.push_back( *pTmp->GetEnd() );
+ if( aEnd.back() > *pTmp->End() )
+ aEnd.push_back( *pTmp->End() );
else if( aEnd.size() > 1 )
aEnd.pop_back();
else
- aEnd.back() = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->End();
}
}
}
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/portxt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/portxt.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/portxt.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/portxt.cxx Wed Nov 27 17:25:40 2013
@@ -715,6 +715,124 @@ void SwTxtPortion::HandlePortion( SwPort
rPH.Text( GetLen(), GetWhichPor() );
}
+
+SwTxtInputFldPortion::SwTxtInputFldPortion()
+ : SwTxtPortion()
+ , mbContainsInputFieldStart( false )
+ , mbContainsInputFieldEnd( false )
+{
+ SetWhichPor( POR_INPUTFLD );
+}
+
+
+sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf )
+{
+ mbContainsInputFieldStart =
+ rInf.GetChar( rInf.GetIdx() ) == CH_TXT_ATR_INPUTFIELDSTART;
+ mbContainsInputFieldEnd =
+ rInf.GetChar( rInf.GetIdx() + rInf.GetLen() - 1 ) == CH_TXT_ATR_INPUTFIELDEND;
+
+ sal_Bool bRet = sal_False;
+ if ( rInf.GetLen() == 1
+ && ( mbContainsInputFieldStart || mbContainsInputFieldEnd ) )
+ {
+ Width( 0 );
+ }
+ else
+ {
+ SwTxtSlot aFormatTxt( &rInf, this, true, true, 0 );
+ if ( rInf.GetLen() == 0 )
+ {
+ Width( 0 );
+ }
+ else
+ {
+ bRet = SwTxtPortion::Format( rInf );
+
+ if ( mbContainsInputFieldEnd )
+ {
+ // adjust portion length accordingly, if complete text fits into the portion
+ if ( GetLen() == rInf.GetLen() )
+ {
+ SetLen( GetLen() + 1 );
+ }
+ }
+
+ if ( mbContainsInputFieldStart )
+ {
+ // adjust portion length accordingly
+ SetLen( GetLen() + 1 );
+ }
+ }
+ }
+
+ return bRet;
+}
+
+void SwTxtInputFldPortion::Paint( const SwTxtPaintInfo &rInf ) const
+{
+ if ( Width() )
+ {
+ rInf.DrawViewOpt( *this, POR_INPUTFLD );
+ static sal_Char sSpace = ' ';
+ SwTxtSlot aPaintTxt( &rInf, this, true, true,
+ ContainsOnlyDummyChars() ? &sSpace : 0 );
+ SwTxtPortion::Paint( rInf );
+ }
+}
+
+sal_Bool SwTxtInputFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const
+{
+ xub_StrLen nIdx = rInf.GetIdx();
+ xub_StrLen nLen = rInf.GetLen();
+ if ( rInf.GetChar( rInf.GetIdx() ) == CH_TXT_ATR_INPUTFIELDSTART )
+ {
+ ++nIdx;
+ --nLen;
+ }
+ if ( rInf.GetChar( rInf.GetIdx() + rInf.GetLen() - 1 ) == CH_TXT_ATR_INPUTFIELDEND )
+ {
+ --nLen;
+ }
+ rTxt = rInf.GetTxt().Copy( nIdx, nLen );
+
+ return sal_True;
+}
+
+
+SwPosSize SwTxtInputFldPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+{
+ SwTxtSlot aFormatTxt( &rInf, this, true, false, 0 );
+ if ( rInf.GetLen() == 0 )
+ {
+ return SwPosSize( 0, 0 );
+ }
+
+ return rInf.GetTxtSize();
+}
+
+
+KSHORT SwTxtInputFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+{
+ if( !Width()
+ && ContainsOnlyDummyChars()
+ && !rInf.GetOpt().IsPagePreview()
+ && !rInf.GetOpt().IsReadonly()
+ && SwViewOption::IsFieldShadings() )
+ {
+ return rInf.GetTxtSize( ' ' ).Width();
+ }
+
+ return SwTxtPortion::GetViewWidth( rInf );
+}
+
+bool SwTxtInputFldPortion::ContainsOnlyDummyChars() const
+{
+ return GetLen() <= 2
+ && mbContainsInputFieldStart
+ && mbContainsInputFieldEnd;
+}
+
/*************************************************************************
* class SwHolePortion
*************************************************************************/
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/portxt.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/portxt.hxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/portxt.hxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/portxt.hxx Wed Nov 27 17:25:40 2013
@@ -62,6 +62,24 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwTxtPortion)
};
+
+class SwTxtInputFldPortion : public SwTxtPortion
+{
+public:
+ SwTxtInputFldPortion();
+
+ virtual sal_Bool Format( SwTxtFormatInfo &rInf );
+ virtual void Paint( const SwTxtPaintInfo &rInf ) const;
+ virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const;
+ virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
+ virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const;
+
+private:
+ bool mbContainsInputFieldStart;
+ bool mbContainsInputFieldEnd;
+ bool ContainsOnlyDummyChars() const;
+};
+
/*************************************************************************
* class SwHolePortion
*************************************************************************/
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/txtfld.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/txtfld.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/txtfld.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/txtfld.cxx Wed Nov 27 17:25:40 2013
@@ -59,6 +59,14 @@
#include "fmtmeta.hxx" // lcl_NewMetaPortion
+//IAccessibility2 Implementation 2009-----
+#ifndef _REFFLD_HXX
+#include "reffld.hxx"
+#endif
+#ifndef _FLDDAT_HXX
+#include "flddat.hxx"
+#endif
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
* SwTxtFormatter::NewFldPortion()
*************************************************************************/
@@ -90,7 +98,9 @@ SwExpandPortion *SwTxtFormatter::NewFldP
SwCharFmt* pChFmt = 0;
sal_Bool bNewFlyPor = sal_False,
bINet = sal_False;
-
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt16 subType;
+ //-----IAccessibility2 Implementation 2009
// set language
((SwTxtFormatter*)this)->SeekAndChg( rInf );
if (pFld->GetLanguage() != GetFnt()->GetLanguage())
@@ -162,7 +172,11 @@ SwExpandPortion *SwTxtFormatter::NewFldP
: pFld->ExpandField(bInClipboard) );
pRet = new SwFldPortion( str );
}
- break;
+ //IAccessibility2 Implementation 2009-----
+ if(pRet)
+ ((SwFldPortion*)pRet)->m_nAttrFldType= ATTR_PAGECOOUNTFLD;
+ //-----IAccessibility2 Implementation 2009
+ break;
case RES_PAGENUMBERFLD:
{
@@ -188,7 +202,11 @@ SwExpandPortion *SwTxtFormatter::NewFldP
: pFld->ExpandField(bInClipboard) );
pRet = new SwFldPortion( str );
}
- break;
+ //IAccessibility2 Implementation 2009-----
+ if(pRet)
+ ((SwFldPortion*)pRet)->m_nAttrFldType= ATTR_PAGENUMBERFLD;
+ //-----IAccessibility2 Implementation 2009
+ break;
}
case RES_GETEXPFLD:
{
@@ -263,7 +281,40 @@ SwExpandPortion *SwTxtFormatter::NewFldP
bNewFlyPor = sal_True;
bPlaceHolder = sal_True;
break;
-
+ //IAccessibility2 Implementation 2009-----
+ case RES_GETREFFLD:
+ subType = ((SwGetRefField*)pFld)->GetSubType();
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
+ if(pRet)
+ {
+ if( subType == REF_BOOKMARK )
+ ((SwFldPortion*)pRet)->m_nAttrFldType = ATTR_BOOKMARKFLD;
+ else if( subType == REF_SETREFATTR )
+ ((SwFldPortion*)pRet)->m_nAttrFldType = ATTR_SETREFATTRFLD;
+ break;
+ }
+ case RES_DATETIMEFLD:
+ subType = ((SwDateTimeField*)pFld)->GetSubType();
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
+ if(pRet)
+ {
+ if( subType & DATEFLD )
+ ((SwFldPortion*)pRet)->m_nAttrFldType= ATTR_DATEFLD;
+ else if( subType & TIMEFLD )
+ ((SwFldPortion*)pRet)->m_nAttrFldType = ATTR_TIMEFLD;
+ break;
+ }
+ //-----IAccessibility2 Implementation 2009
default:
{
String const str( (bName)
@@ -365,63 +416,57 @@ SwTxtFormatter::TryNewNoLengthPortion(Sw
SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
{
- SwTxtAttr *pHint = GetAttr( rInf.GetIdx() );
- SwLinePortion *pRet = 0;
- if( !pHint )
- {
-#if OSL_DEBUG_LEVEL > 1
-// aDbstream << "NewExtraPortion: hint not found?" << endl;
-#endif
- pRet = new SwTxtPortion;
- pRet->SetLen( 1 );
- rInf.SetLen( 1 );
- return pRet;
- }
+ SwTxtAttr *pHint = GetAttr( rInf.GetIdx() );
+ SwLinePortion *pRet = 0;
+ if( !pHint )
+ {
+ pRet = new SwTxtPortion;
+ pRet->SetLen( 1 );
+ rInf.SetLen( 1 );
+ return pRet;
+ }
- switch( pHint->Which() )
- {
- case RES_TXTATR_FLYCNT :
- {
- pRet = NewFlyCntPortion( rInf, pHint );
- break;
- }
- case RES_TXTATR_FTN :
- {
- pRet = NewFtnPortion( rInf, pHint );
- break;
- }
- case RES_TXTATR_FIELD :
- {
- pRet = NewFldPortion( rInf, pHint );
- break;
- }
- case RES_TXTATR_REFMARK :
- {
- pRet = new SwIsoRefPortion;
- break;
- }
- case RES_TXTATR_TOXMARK :
- {
- pRet = new SwIsoToxPortion;
- break;
- }
- case RES_TXTATR_METAFIELD:
+ switch( pHint->Which() )
+ {
+ case RES_TXTATR_FLYCNT :
+ {
+ pRet = NewFlyCntPortion( rInf, pHint );
+ break;
+ }
+ case RES_TXTATR_FTN :
+ {
+ pRet = NewFtnPortion( rInf, pHint );
+ break;
+ }
+ case RES_TXTATR_FIELD :
+ {
+ pRet = NewFldPortion( rInf, pHint );
+ break;
+ }
+ case RES_TXTATR_REFMARK :
+ {
+ pRet = new SwIsoRefPortion;
+ break;
+ }
+ case RES_TXTATR_TOXMARK :
+ {
+ pRet = new SwIsoToxPortion;
+ break;
+ }
+ case RES_TXTATR_METAFIELD:
{
pRet = lcl_NewMetaPortion( *pHint, true );
break;
}
- default: ;
- }
- if( !pRet )
- {
-#if OSL_DEBUG_LEVEL > 1
-// aDbstream << "NewExtraPortion: unknown hint" << endl;
-#endif
- const XubString aNothing;
- pRet = new SwFldPortion( aNothing );
- rInf.SetLen( 1 );
- }
- return pRet;
+ default: ;
+ }
+ if( !pRet )
+ {
+ const XubString aNothing;
+ pRet = new SwFldPortion( aNothing );
+ rInf.SetLen( 1 );
+ }
+ return pRet;
}
/*************************************************************************
Modified: openoffice/branches/alg/aw080/main/sw/source/core/text/txtfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/text/txtfrm.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/text/txtfrm.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/text/txtfrm.cxx Wed Nov 27 17:25:40 2013
@@ -1329,16 +1329,6 @@ void SwTxtFrm::Modify( const SfxPoolItem
}
break;
-/* Seit dem neuen Blocksatz muessen wir immer neu formatieren:
- case RES_PARATR_ADJUST:
- {
- if( GetShell() )
- {
- Prepare( PREP_CLEAR );
- }
- break;
- }
-*/
// 6870: SwDocPosUpdate auswerten.
case RES_DOCPOS_UPDATE:
{
Modified: openoffice/branches/alg/aw080/main/sw/source/core/tox/tox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/tox/tox.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/tox/tox.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/tox/tox.cxx Wed Nov 27 17:25:40 2013
@@ -240,7 +240,7 @@ String SwTOXMark::GetText() const
aStr = aAltText;
else if( pTxtAttr && pTxtAttr->GetpTxtNd() )
{
- xub_StrLen* pEndIdx = pTxtAttr->GetEnd();
+ const xub_StrLen* pEndIdx = pTxtAttr->GetEnd();
ASSERT( pEndIdx, "TOXMark ohne Mark!!");
if( pEndIdx )
{
Modified: openoffice/branches/alg/aw080/main/sw/source/core/tox/txmsrt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/tox/txmsrt.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/tox/txmsrt.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/tox/txmsrt.cxx Wed Nov 27 17:25:40 2013
@@ -232,8 +232,8 @@ sal_Bool SwTOXSortTabBase::operator==( c
{
// beide Pointer vorhanden -> vergleiche Text
// beide Pointer nicht vorhanden -> vergleiche AlternativText
- const xub_StrLen *pEnd = pTxtMark->GetEnd(),
- *pEndCmp = rCmp.pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
+ const xub_StrLen* pEndCmp = rCmp.pTxtMark->End();
String sMyTxt;
String sMyTxtReading;
@@ -275,8 +275,8 @@ sal_Bool SwTOXSortTabBase::operator<( co
if( *pTxtMark->GetStart() == *rCmp.pTxtMark->GetStart() )
{
- const xub_StrLen *pEnd = pTxtMark->GetEnd(),
- *pEndCmp = rCmp.pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
+ const xub_StrLen* pEndCmp = rCmp.pTxtMark->End();
String sMyTxt;
String sMyTxtReading;
@@ -432,7 +432,7 @@ void SwTOXIndex::GetText_Impl( String& r
void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
- const xub_StrLen* pEnd = pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
String sTmp;
String sTmpReading;
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() &&
@@ -549,7 +549,7 @@ SwTOXContent::SwTOXContent( const SwTxtN
void SwTOXContent::GetText_Impl( String& rTxt, String& rTxtReading ) const
{
- const xub_StrLen* pEnd = pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() )
{
rTxt = ((SwTxtNode*)aTOXSources[0].pNd)->GetExpandTxt(
@@ -564,7 +564,7 @@ void SwTOXContent::GetText_Impl( String&
void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
- const xub_StrLen* pEnd = pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() )
((SwTxtNode*)aTOXSources[0].pNd)->GetExpandTxt( rNd, &rInsPos,
*pTxtMark->GetStart(),
Modified: openoffice/branches/alg/aw080/main/sw/source/core/txtnode/atrfld.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/txtnode/atrfld.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/txtnode/atrfld.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/txtnode/atrfld.cxx Wed Nov 27 17:25:40 2013
@@ -48,13 +48,13 @@
*
****************************************************************************/
- // Konstruktor fuers Default vom Attribut-Pool
-SwFmtFld::SwFmtFld()
- : SfxPoolItem( RES_TXTATR_FIELD )
- , SwClient( 0 )
+// constructor for default item in attribute-pool
+SwFmtFld::SwFmtFld( sal_uInt16 nWhich )
+ : SfxPoolItem( nWhich )
+ , SwClient()
, SfxBroadcaster()
- , pField( 0 )
- , pTxtAttr( 0 )
+ , mpField( NULL )
+ , mpTxtFld( NULL )
{
}
@@ -62,10 +62,15 @@ SwFmtFld::SwFmtFld( const SwField &rFld
: SfxPoolItem( RES_TXTATR_FIELD )
, SwClient( rFld.GetTyp() )
, SfxBroadcaster()
- , pField( 0 )
- , pTxtAttr( 0 )
+ , mpField( rFld.CopyField() )
+ , mpTxtFld( NULL )
{
- pField = rFld.CopyField();
+ // input field in-place editing
+ if ( GetField()->GetTyp()->Which() == RES_INPUTFLD )
+ {
+ SetWhich( RES_TXTATR_INPUTFIELD );
+ dynamic_cast<SwInputField*>(GetField())->SetFmtFld( *this );
+ }
}
// #i24434#
@@ -76,25 +81,31 @@ SwFmtFld::SwFmtFld( const SwFmtFld& rAtt
: SfxPoolItem( RES_TXTATR_FIELD )
, SwClient()
, SfxBroadcaster()
- , pField( 0 )
- , pTxtAttr( 0 )
+ , mpField( NULL )
+ , mpTxtFld( NULL )
{
- if(rAttr.GetField())
+ if ( rAttr.GetField() )
{
rAttr.GetField()->GetTyp()->Add(this);
- pField = rAttr.GetField()->CopyField();
+ mpField = rAttr.GetField()->CopyField();
+ // input field in-place editing
+ if ( GetField()->GetTyp()->Which() == RES_INPUTFLD )
+ {
+ SetWhich( RES_TXTATR_INPUTFIELD );
+ dynamic_cast<SwInputField*>(GetField())->SetFmtFld( *this );
+ }
}
}
SwFmtFld::~SwFmtFld()
{
- SwFieldType* pType = pField ? pField->GetTyp() : 0;
+ SwFieldType* pType = mpField ? mpField->GetTyp() : 0;
if (pType && pType->Which() == RES_DBFLD)
pType = 0; // DB-Feldtypen zerstoeren sich selbst
Broadcast( SwFmtFldHint( this, SWFMTFLD_REMOVED ) );
- delete pField;
+ delete mpField;
// bei einige FeldTypen muessen wir den FeldTypen noch loeschen
if( pType && pType->IsLastDepend() )
@@ -131,22 +142,36 @@ void SwFmtFld::RegisterToFieldType( SwFi
// #111840#
-void SwFmtFld::SetFld(SwField * _pField)
+void SwFmtFld::SetField(SwField * _pField)
{
- if (NULL != pField)
- delete pField;
+ if (NULL != mpField)
+ delete mpField;
- pField = _pField;
- Broadcast( SwFmtFldHint( this, SWFMTFLD_CHANGED ) );
+ mpField = _pField;
+ if ( GetField()->GetTyp()->Which() == RES_INPUTFLD )
+ {
+ dynamic_cast<SwInputField* >(GetField())->SetFmtFld( *this );
+ }
+ Broadcast( SwFmtFldHint( this, SWFMTFLD_CHANGED ) );
+}
+
+void SwFmtFld::SetTxtFld( SwTxtFld& rTxtFld )
+{
+ mpTxtFld = &rTxtFld;
+}
+
+void SwFmtFld::ClearTxtFld()
+{
+ mpTxtFld = NULL;
}
int SwFmtFld::operator==( const SfxPoolItem& rAttr ) const
{
ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
- return ( ( pField && ((SwFmtFld&)rAttr).GetField()
- && pField->GetTyp() == ((SwFmtFld&)rAttr).GetField()->GetTyp()
- && pField->GetFormat() == ((SwFmtFld&)rAttr).GetField()->GetFormat() ) )
- || ( !pField && !((SwFmtFld&)rAttr).GetField() );
+ return ( ( mpField && ((SwFmtFld&)rAttr).GetField()
+ && mpField->GetTyp() == ((SwFmtFld&)rAttr).GetField()->GetTyp()
+ && mpField->GetFormat() == ((SwFmtFld&)rAttr).GetField()->GetFormat() ) )
+ || ( !mpField && !((SwFmtFld&)rAttr).GetField() );
}
SfxPoolItem* SwFmtFld::Clone( SfxItemPool* ) const
@@ -156,7 +181,7 @@ SfxPoolItem* SwFmtFld::Clone( SfxItemPoo
void SwFmtFld::SwClientNotify( const SwModify&, const SfxHint& rHint )
{
- if( !pTxtAttr )
+ if( !mpTxtFld )
return;
const SwFieldHint* pHint = dynamic_cast<const SwFieldHint*>( &rHint );
@@ -165,9 +190,9 @@ void SwFmtFld::SwClientNotify( const SwM
// replace field content by text
SwPaM* pPaM = pHint->GetPaM();
SwDoc* pDoc = pPaM->GetDoc();
- const SwTxtNode& rTxtNode = pTxtAttr->GetTxtNode();
+ const SwTxtNode& rTxtNode = mpTxtFld->GetTxtNode();
pPaM->GetPoint()->nNode = rTxtNode;
- pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode, *pTxtAttr->GetStart() );
+ pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode, *mpTxtFld->GetStart() );
String const aEntry( GetField()->ExpandField( pDoc->IsClipBoard() ) );
pPaM->SetMark();
@@ -179,14 +204,14 @@ void SwFmtFld::SwClientNotify( const SwM
void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
- if( !pTxtAttr )
+ if( !mpTxtFld )
return;
// don't do anything, especially not expand!
if( pNew && pNew->Which() == RES_OBJECTDYING )
return;
- SwTxtNode* pTxtNd = (SwTxtNode*)&pTxtAttr->GetTxtNode();
+ SwTxtNode* pTxtNd = (SwTxtNode*)&mpTxtFld->GetTxtNode();
ASSERT( pTxtNd, "wo ist denn mein Node?" );
if( pNew )
{
@@ -203,7 +228,7 @@ void SwFmtFld::Modify( const SfxPoolItem
{
// --> OD 2007-09-06 #i81002#
// ((SwGetRefField*)GetFld())->UpdateField();
- dynamic_cast<SwGetRefField*>(GetField())->UpdateField( pTxtAttr );
+ dynamic_cast<SwGetRefField*>(GetField())->UpdateField( mpTxtFld );
// <--
}
break;
@@ -243,14 +268,14 @@ void SwFmtFld::Modify( const SfxPoolItem
pType->GetValue( aCalc );
}
}
- pTxtAttr->Expand();
+ mpTxtFld->ExpandTxtFld();
}
sal_Bool SwFmtFld::GetInfo( SfxPoolItem& rInfo ) const
{
const SwTxtNode* pTxtNd;
if( RES_AUTOFMT_DOCNODE != rInfo.Which() ||
- !pTxtAttr || 0 == ( pTxtNd = pTxtAttr->GetpTxtNode() ) ||
+ !mpTxtFld || 0 == ( pTxtNd = mpTxtFld->GetpTxtNode() ) ||
&pTxtNd->GetNodes() != ((SwAutoFmtGetDocNode&)rInfo).pNodes )
return sal_True;
@@ -259,82 +284,68 @@ sal_Bool SwFmtFld::GetInfo( SfxPoolItem&
}
-sal_Bool SwFmtFld::IsFldInDoc() const
+bool SwFmtFld::IsFldInDoc() const
{
- const SwTxtNode* pTxtNd;
- return pTxtAttr && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
- pTxtNd->GetNodes().IsDocNodes();
+ return mpTxtFld != NULL
+ && mpTxtFld->IsFldInDoc();
}
sal_Bool SwFmtFld::IsProtect() const
{
- const SwTxtNode* pTxtNd;
- return pTxtAttr && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
- pTxtNd->IsProtect();
+ return mpTxtFld != NULL
+ && mpTxtFld->GetpTxtNode() != NULL
+ && mpTxtFld->GetpTxtNode()->IsProtect();
}
-/*************************************************************************
-|*
-|* SwTxtFld::SwTxtFld()
-|*
-|* Beschreibung Attribut fuer automatischen Text, Ctor
-|* Ersterstellung BP 30.04.92
-|* Letzte Aenderung JP 15.08.94
-|*
-*************************************************************************/
-SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos)
+
+
+SwTxtFld::SwTxtFld(
+ SwFmtFld & rAttr,
+ xub_StrLen const nStartPos )
: SwTxtAttr( rAttr, nStartPos )
, m_aExpand( rAttr.GetField()->ExpandField(true) )
- , m_pTxtNode( 0 )
+ , m_pTxtNode( NULL )
{
- rAttr.pTxtAttr = this;
+ rAttr.SetTxtFld( *this );
SetHasDummyChar(true);
}
SwTxtFld::~SwTxtFld( )
{
SwFmtFld & rFmtFld( static_cast<SwFmtFld &>(GetAttr()) );
- if (this == rFmtFld.pTxtAttr)
+ if ( this == rFmtFld.GetTxtFld() )
{
- rFmtFld.pTxtAttr = 0; // #i110140# invalidate!
+ rFmtFld.ClearTxtFld();
}
}
-/*************************************************************************
-|*
-|* SwTxtFld::Expand()
-|*
-|* Beschreibung exandiert das Feld und tauscht den Text im Node
-|* Ersterstellung BP 30.04.92
-|* Letzte Aenderung JP 15.08.94
-|*
-*************************************************************************/
-void SwTxtFld::Expand() const
+bool SwTxtFld::IsFldInDoc() const
+{
+ return GetpTxtNode() != NULL
+ && GetpTxtNode()->GetNodes().IsDocNodes();
+}
+
+void SwTxtFld::ExpandTxtFld() const
{
- // Wenn das expandierte Feld sich nicht veraendert hat, wird returnt
ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
const SwField* pFld = GetFmtFld().GetField();
- XubString aNewExpand( pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) );
+ const XubString aNewExpand( pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) );
if( aNewExpand == m_aExpand )
{
// Bei Seitennummernfeldern
const sal_uInt16 nWhich = pFld->GetTyp()->Which();
- if( RES_CHAPTERFLD != nWhich && RES_PAGENUMBERFLD != nWhich &&
- RES_REFPAGEGETFLD != nWhich &&
- // --> FME 2005-05-23 #122919# Page count fields to not use aExpand
- // during formatting, therefore an invalidation of the text frame
- // has to be triggered even if aNewExpand == aExpand:
- ( RES_DOCSTATFLD != nWhich || DS_PAGE != static_cast<const SwDocStatField*>(pFld)->GetSubType() ) &&
- // <--
- ( RES_GETEXPFLD != nWhich || ((SwGetExpField*)pFld)->IsInBodyTxt() ) )
+ if ( RES_CHAPTERFLD != nWhich
+ && RES_PAGENUMBERFLD != nWhich
+ && RES_REFPAGEGETFLD != nWhich
+ // Page count fields to not use aExpand during formatting,
+ // therefore an invalidation of the text frame has to be triggered even if aNewExpand == aExpand:
+ && ( RES_DOCSTATFLD != nWhich || DS_PAGE != static_cast<const SwDocStatField*>(pFld)->GetSubType() )
+ && ( RES_GETEXPFLD != nWhich || ((SwGetExpField*)pFld)->IsInBodyTxt() ) )
{
- // BP: das muesste man noch optimieren!
- //JP 12.06.97: stimmt, man sollte auf jedenfall eine Status-
- // aenderung an die Frames posten
if( m_pTxtNode->CalcHiddenParaField() )
{
m_pTxtNode->ModifyNotification( 0, 0 );
@@ -345,15 +356,11 @@ void SwTxtFld::Expand() const
m_aExpand = aNewExpand;
- // 0, this for formatting
- m_pTxtNode->ModifyNotification( 0, const_cast<SwFmtFld*>( &GetFmtFld() ) );
+ const_cast<SwTxtFld*>(this)->NotifyContentChange( const_cast<SwFmtFld&>(GetFmtFld()) );
}
-/*************************************************************************
- * SwTxtFld::CopyFld()
- *************************************************************************/
-void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
+void SwTxtFld::CopyTxtFld( SwTxtFld *pDest ) const
{
ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
ASSERT( pDest->m_pTxtNode, "SwTxtFld: where is pDest's TxtNode?" );
@@ -361,8 +368,8 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest
IDocumentFieldsAccess* pIDFA = m_pTxtNode->getIDocumentFieldsAccess();
IDocumentFieldsAccess* pDestIDFA = pDest->m_pTxtNode->getIDocumentFieldsAccess();
- SwFmtFld& rFmtFld = (SwFmtFld&)pDest->GetFmtFld();
- const sal_uInt16 nFldWhich = rFmtFld.GetField()->GetTyp()->Which();
+ SwFmtFld& rDestFmtFld = (SwFmtFld&)pDest->GetFmtFld();
+ const sal_uInt16 nFldWhich = rDestFmtFld.GetField()->GetTyp()->Which();
if( pIDFA != pDestIDFA )
{
@@ -370,47 +377,54 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest
// der Feldtyp muss im neuen Dokument angemeldet werden.
// Z.B: Kopieren ins ClipBoard.
SwFieldType* pFldType;
- if( nFldWhich != RES_DBFLD && nFldWhich != RES_USERFLD &&
- nFldWhich != RES_SETEXPFLD && nFldWhich != RES_DDEFLD &&
- RES_AUTHORITY != nFldWhich )
+ if( nFldWhich != RES_DBFLD
+ && nFldWhich != RES_USERFLD
+ && nFldWhich != RES_SETEXPFLD
+ && nFldWhich != RES_DDEFLD
+ && RES_AUTHORITY != nFldWhich )
+ {
pFldType = pDestIDFA->GetSysFldType( nFldWhich );
+ }
else
- pFldType = pDestIDFA->InsertFldType( *rFmtFld.GetField()->GetTyp() );
+ {
+ pFldType = pDestIDFA->InsertFldType( *rDestFmtFld.GetField()->GetTyp() );
+ }
// Sonderbehandlung fuer DDE-Felder
if( RES_DDEFLD == nFldWhich )
{
- if( rFmtFld.GetTxtFld() )
- ((SwDDEFieldType*)rFmtFld.GetField()->GetTyp())->DecRefCnt();
+ if( rDestFmtFld.GetTxtFld() )
+ {
+ ((SwDDEFieldType*)rDestFmtFld.GetField()->GetTyp())->DecRefCnt();
+ }
((SwDDEFieldType*)pFldType)->IncRefCnt();
}
ASSERT( pFldType, "unbekannter FieldType" );
- pFldType->Add( &rFmtFld ); // ummelden
- rFmtFld.GetField()->ChgTyp( pFldType );
+ pFldType->Add( &rDestFmtFld ); // ummelden
+ rDestFmtFld.GetField()->ChgTyp( pFldType );
}
// Expressionfelder Updaten
- if( nFldWhich == RES_SETEXPFLD || nFldWhich == RES_GETEXPFLD ||
- nFldWhich == RES_HIDDENTXTFLD )
+ if( nFldWhich == RES_SETEXPFLD
+ || nFldWhich == RES_GETEXPFLD
+ || nFldWhich == RES_HIDDENTXTFLD )
{
SwTxtFld* pFld = (SwTxtFld*)this;
pDestIDFA->UpdateExpFlds( pFld, true );
}
// Tabellenfelder auf externe Darstellung
- else if( RES_TABLEFLD == nFldWhich &&
- ((SwTblField*)rFmtFld.GetField())->IsIntrnlName() )
+ else if( RES_TABLEFLD == nFldWhich
+ && ((SwTblField*)rDestFmtFld.GetField())->IsIntrnlName() )
{
// erzeuge aus der internen (fuer CORE) die externe (fuer UI) Formel
const SwTableNode* pTblNd = m_pTxtNode->FindTableNode();
if( pTblNd ) // steht in einer Tabelle
- ((SwTblField*)rFmtFld.GetField())->PtrToBoxNm( &pTblNd->GetTable() );
+ ((SwTblField*)rDestFmtFld.GetField())->PtrToBoxNm( &pTblNd->GetTable() );
}
}
-/* -----------------26.06.2003 13:54-----------------
- --------------------------------------------------*/
void SwTxtFld::NotifyContentChange(SwFmtFld& rFmtFld)
{
//if not in undo section notify the change
@@ -421,3 +435,83 @@ void SwTxtFld::NotifyContentChange(SwFmt
}
+// input field in-place editing
+SwTxtInputFld::SwTxtInputFld(
+ SwFmtFld & rAttr,
+ xub_StrLen const nStart,
+ xub_StrLen const nEnd )
+
+ : SwTxtFld( rAttr, nStart )
+ , m_nEnd( nEnd )
+{
+ SetHasDummyChar( false );
+ SetHasContent( true );
+
+ SetDontExpand( true );
+ SetLockExpandFlag( true );
+ SetDontExpandStartAttr( true );
+
+ SetNesting( true );
+}
+
+SwTxtInputFld::~SwTxtInputFld()
+{
+}
+
+xub_StrLen* SwTxtInputFld::GetEnd()
+{
+ return &m_nEnd;
+}
+
+void SwTxtInputFld::NotifyContentChange( SwFmtFld& rFmtFld )
+{
+ SwTxtFld::NotifyContentChange( rFmtFld );
+
+ UpdateTextNodeContent( GetFieldContent() );
+}
+
+const String SwTxtInputFld::GetFieldContent() const
+{
+ return GetFmtFld().GetField()->ExpandField(false);
+}
+
+void SwTxtInputFld::UpdateFieldContent()
+{
+ if ( IsFldInDoc()
+ && (*GetStart()) != (*End()) )
+ {
+ ASSERT( (*End()) - (*GetStart()) >= 2,
+ "<SwTxtInputFld::UpdateFieldContent()> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" );
+ // skip CH_TXT_ATR_INPUTFIELDSTART character
+ const xub_StrLen nIdx = (*GetStart()) + 1;
+ // skip CH_TXT_ATR_INPUTFIELDEND character
+ const xub_StrLen nLen = static_cast<xub_StrLen>(std::max( 0, ( (*End()) - 1 - nIdx ) ));
+ const String aNewFieldContent = GetTxtNode().GetExpandTxt( nIdx, nLen );
+
+ const SwInputField* pInputFld = dynamic_cast<const SwInputField*>(GetFmtFld().GetField());
+ ASSERT( pInputFld != NULL,
+ "<SwTxtInputFld::GetContent()> - Missing <SwInputFld> instance!" );
+ if ( pInputFld != NULL )
+ {
+ const_cast<SwInputField*>(pInputFld)->applyFieldContent( aNewFieldContent );
+ }
+ }
+}
+
+void SwTxtInputFld::UpdateTextNodeContent( const String& rNewContent )
+{
+ if ( !IsFldInDoc() )
+ {
+ ASSERT( false, "<SwTxtInputFld::UpdateTextNodeContent(..)> - misusage as Input Field is not in document content." );
+ return;
+ }
+
+ ASSERT( (*End()) - (*GetStart()) >= 2,
+ "<SwTxtInputFld::UpdateTextNodeContent(..)> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" );
+ // skip CH_TXT_ATR_INPUTFIELDSTART character
+ const xub_StrLen nIdx = (*GetStart()) + 1;
+ // skip CH_TXT_ATR_INPUTFIELDEND character
+ const xub_StrLen nDelLen = static_cast<xub_StrLen>(std::max( 0, ( (*End()) - 1 - nIdx ) ));
+ SwIndex aIdx( &GetTxtNode(), nIdx );
+ GetTxtNode().ReplaceText( aIdx, nDelLen, rNewContent );
+}
Modified: openoffice/branches/alg/aw080/main/sw/source/core/txtnode/ndhints.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/txtnode/ndhints.cxx?rev=1546124&r1=1546123&r2=1546124&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/txtnode/ndhints.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/txtnode/ndhints.cxx Wed Nov 27 17:25:40 2013
@@ -52,8 +52,8 @@ void DumpHints( const SwpHtStart &rHtSta
((((aDbstream << '\t').WriteNumber( i )<< " [").WriteNumber( pHt->Which() )
<< ']' << '\t').WriteNumber( long( pHt ) )
<< '\t').WriteNumber( *pHt->GetStart() );
- if( pHt->GetEnd() )
- (aDbstream << " -> " ).WriteNumber( *pHt->GetEnd() );
+ if( pHt->End() )
+ (aDbstream << " -> " ).WriteNumber( *pHt->End() );
aDbstream << endl;
}
(aDbstream << "\tEnds:").WriteNumber( rHtEnd.Count() )<< endl;
@@ -62,8 +62,8 @@ void DumpHints( const SwpHtStart &rHtSta
const SwTxtAttr *pHt = rHtEnd[i];
(((aDbstream << '\t').WriteNumber( i )<< " [").WriteNumber( pHt->Which() )
<< ']' << '\t' ).WriteNumber( long( pHt ) );
- if( pHt->GetEnd() )
- (aDbstream << '\t').WriteNumber( *pHt->GetEnd() )<< " <- ";
+ if( pHt->End() )
+ (aDbstream << '\t').WriteNumber( *pHt->End() )<< " <- ";
aDbstream.WriteNumber( *pHt->GetStart() )<< endl;
}
aDbstream << endl;
@@ -370,11 +370,11 @@ bool SwpHintsArray::Check() const
CHECK_ERR( 0 == i ||
( RES_TXTATR_CHARFMT != pHtLast->Which() && RES_TXTATR_AUTOFMT != pHtLast->Which() ) ||
( RES_TXTATR_CHARFMT != pHtThis->Which() && RES_TXTATR_AUTOFMT != pHtThis->Which() ) ||
- ( *pHtThis->GetStart() >= *pHtLast->GetEnd() ) ||
+ ( *pHtThis->GetStart() >= *pHtLast->End() ) ||
( ( ( (*pHtThis->GetStart() == *pHtLast->GetStart())
- && (*pHtThis->GetEnd() == *pHtLast->GetEnd())
+ && (*pHtThis->End() == *pHtLast->End())
) // same range
- || (*pHtThis->GetStart() == *pHtThis->GetEnd())
+ || (*pHtThis->GetStart() == *pHtThis->End())
)
&& ( (pHtThis->Which() != RES_TXTATR_AUTOFMT)
|| (pHtLast->Which() != RES_TXTATR_AUTOFMT)
@@ -392,8 +392,8 @@ bool SwpHintsArray::Check() const
if ( pOther->IsNesting() && (i != j) )
{
SwComparePosition cmp = ComparePosition(
- *pHtThis->GetStart(), *pHtThis->GetEnd(),
- *pOther->GetStart(), *pOther->GetEnd());
+ *pHtThis->GetStart(), *pHtThis->End(),
+ *pOther->GetStart(), *pOther->End());
CHECK_ERR( (POS_OVERLAP_BEFORE != cmp) &&
(POS_OVERLAP_BEHIND != cmp),
"HintsCheck: overlapping nesting hints!!!" );