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.cxx234
-rw-r--r--sw/source/core/text/atrhndl.hxx24
-rw-r--r--sw/source/core/text/atrstck.cxx94
-rw-r--r--sw/source/core/text/blink.cxx6
-rw-r--r--sw/source/core/text/frmcrsr.cxx260
-rw-r--r--sw/source/core/text/frmform.cxx338
-rw-r--r--sw/source/core/text/frminf.cxx90
-rw-r--r--sw/source/core/text/frmpaint.cxx126
-rw-r--r--sw/source/core/text/guess.cxx128
-rw-r--r--sw/source/core/text/guess.hxx12
-rw-r--r--sw/source/core/text/inftxt.cxx406
-rw-r--r--sw/source/core/text/inftxt.hxx240
-rw-r--r--sw/source/core/text/itradj.cxx76
-rw-r--r--sw/source/core/text/itratr.cxx192
-rw-r--r--sw/source/core/text/itratr.hxx26
-rw-r--r--sw/source/core/text/itrcrsr.cxx222
-rw-r--r--sw/source/core/text/itrform2.cxx480
-rw-r--r--sw/source/core/text/itrform2.hxx94
-rw-r--r--sw/source/core/text/itrpaint.cxx60
-rw-r--r--sw/source/core/text/itrpaint.hxx24
-rw-r--r--sw/source/core/text/itrtxt.cxx62
-rw-r--r--sw/source/core/text/itrtxt.hxx110
-rw-r--r--sw/source/core/text/pordrop.hxx14
-rw-r--r--sw/source/core/text/porexp.cxx58
-rw-r--r--sw/source/core/text/porexp.hxx28
-rw-r--r--sw/source/core/text/porfld.cxx282
-rw-r--r--sw/source/core/text/porfld.hxx72
-rw-r--r--sw/source/core/text/porfly.cxx66
-rw-r--r--sw/source/core/text/porfly.hxx16
-rw-r--r--sw/source/core/text/porftn.hxx44
-rw-r--r--sw/source/core/text/porglue.cxx28
-rw-r--r--sw/source/core/text/porglue.hxx6
-rw-r--r--sw/source/core/text/porhyph.hxx18
-rw-r--r--sw/source/core/text/porlay.cxx200
-rw-r--r--sw/source/core/text/porlay.hxx26
-rw-r--r--sw/source/core/text/porlin.cxx34
-rw-r--r--sw/source/core/text/porlin.hxx42
-rw-r--r--sw/source/core/text/pormulti.cxx348
-rw-r--r--sw/source/core/text/pormulti.hxx66
-rw-r--r--sw/source/core/text/porref.cxx12
-rw-r--r--sw/source/core/text/porref.hxx10
-rw-r--r--sw/source/core/text/porrst.cxx126
-rw-r--r--sw/source/core/text/porrst.hxx30
-rw-r--r--sw/source/core/text/portab.hxx12
-rw-r--r--sw/source/core/text/portox.cxx12
-rw-r--r--sw/source/core/text/portox.hxx10
-rw-r--r--sw/source/core/text/portxt.cxx178
-rw-r--r--sw/source/core/text/portxt.hxx68
-rw-r--r--sw/source/core/text/redlnitr.cxx56
-rw-r--r--sw/source/core/text/redlnitr.hxx8
-rw-r--r--sw/source/core/text/txtcache.cxx68
-rw-r--r--sw/source/core/text/txtcache.hxx20
-rw-r--r--sw/source/core/text/txtdrop.cxx164
-rw-r--r--sw/source/core/text/txtfld.cxx280
-rw-r--r--sw/source/core/text/txtfly.cxx204
-rw-r--r--sw/source/core/text/txtfrm.cxx554
-rw-r--r--sw/source/core/text/txtftn.cxx644
-rw-r--r--sw/source/core/text/txthyph.cxx104
-rw-r--r--sw/source/core/text/txtinit.cxx18
-rw-r--r--sw/source/core/text/txtio.cxx206
-rw-r--r--sw/source/core/text/txtpaint.cxx2
-rw-r--r--sw/source/core/text/txtpaint.hxx4
-rw-r--r--sw/source/core/text/txttab.cxx44
-rw-r--r--sw/source/core/text/widorp.cxx66
-rw-r--r--sw/source/core/text/widorp.hxx32
-rw-r--r--sw/source/core/text/xmldump.cxx32
66 files changed, 3808 insertions, 3808 deletions
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index ab8f3cb7ad76..3f4af08fa8ea 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -166,14 +166,14 @@ bool lcl_IsHeadlineCell( const SwCellFrm& rCellFrm )
{
bool bRet = false;
- const SwCntntFrm *pCnt = rCellFrm.ContainsCntnt();
- if ( pCnt && pCnt->IsTxtFrm() )
+ const SwContentFrm *pCnt = rCellFrm.ContainsContent();
+ if ( pCnt && pCnt->IsTextFrm() )
{
- const SwTxtNode* pTxtNode = static_cast<const SwTxtFrm*>(pCnt)->GetTxtNode();
- const SwFmt* pTxtFmt = pTxtNode->GetFmtColl();
+ const SwTextNode* pTextNode = static_cast<const SwTextFrm*>(pCnt)->GetTextNode();
+ const SwFormat* pTextFormat = pTextNode->GetFormatColl();
OUString sStyleName;
- SwStyleNameMapper::FillProgName( pTxtFmt->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
+ SwStyleNameMapper::FillProgName( pTextFormat->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
bRet = sStyleName == aTableHeadingName;
}
@@ -207,9 +207,9 @@ void* lcl_GetKeyFromFrame( const SwFrm& rFrm )
void* pKey = 0;
if ( rFrm.IsPageFrm() )
- pKey = (void*)static_cast<const SwPageFrm&>(rFrm).GetFmt()->getIDocumentSettingAccess();
- else if ( rFrm.IsTxtFrm() )
- pKey = (void*)static_cast<const SwTxtFrm&>(rFrm).GetTxtNode();
+ pKey = (void*)static_cast<const SwPageFrm&>(rFrm).GetFormat()->getIDocumentSettingAccess();
+ else if ( rFrm.IsTextFrm() )
+ pKey = (void*)static_cast<const SwTextFrm&>(rFrm).GetTextNode();
else if ( rFrm.IsSctFrm() )
pKey = (void*)static_cast<const SwSectionFrm&>(rFrm).GetSection();
else if ( rFrm.IsTabFrm() )
@@ -226,7 +226,7 @@ void* lcl_GetKeyFromFrame( const SwFrm& rFrm )
return pKey;
}
-bool lcl_HasPreviousParaSameNumRule( const SwTxtNode& rNode )
+bool lcl_HasPreviousParaSameNumRule( const SwTextNode& rNode )
{
bool bRet = false;
SwNodeIndex aIdx( rNode );
@@ -239,15 +239,15 @@ bool lcl_HasPreviousParaSameNumRule( const SwTxtNode& rNode )
{
--aIdx;
- if (aIdx.GetNode().IsTxtNode())
+ if (aIdx.GetNode().IsTextNode())
{
- const SwTxtNode* pPrevTxtNd = aIdx.GetNode().GetTxtNode();
- const SwNumRule * pPrevNumRule = pPrevTxtNd->GetNumRule();
+ const SwTextNode* pPrevTextNd = aIdx.GetNode().GetTextNode();
+ const SwNumRule * pPrevNumRule = pPrevTextNd->GetNumRule();
// We find the previous text node. Now check, if the previous text node
// has the same numrule like rNode:
if ( (pPrevNumRule == pNumRule) &&
- (!pPrevTxtNd->IsOutline() == !rNode.IsOutline()))
+ (!pPrevTextNd->IsOutline() == !rNode.IsOutline()))
bRet = true;
break;
@@ -342,8 +342,8 @@ bool SwTaggedPDFHelper::CheckReopenTag()
}
else if ( rFrm.IsFlyFrm() )
{
- const SwFmtAnchor& rAnchor =
- static_cast<const SwFlyFrm*>(&rFrm)->GetFmt()->GetAnchor();
+ const SwFormatAnchor& rAnchor =
+ static_cast<const SwFlyFrm*>(&rFrm)->GetFormat()->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
(FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
(FLY_AT_PAGE == rAnchor.GetAnchorId()))
@@ -422,9 +422,9 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const OUS
if ( mpNumInfo )
{
- const SwTxtFrm& rTxtFrm = static_cast<const SwTxtFrm&>(mpNumInfo->mrFrm);
- const SwTxtNode* pTxtNd = rTxtFrm.GetTxtNode();
- const SwNodeNum* pNodeNum = pTxtNd->GetNum();
+ const SwTextFrm& rTextFrm = static_cast<const SwTextFrm&>(mpNumInfo->mrFrm);
+ const SwTextNode* pTextNd = rTextFrm.GetTextNode();
+ const SwNodeNum* pNodeNum = pTextNd->GetNum();
if ( vcl::PDFWriter::List == eType )
{
@@ -443,7 +443,7 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const OUS
if ( ( rFrm.IsPageFrm() && !static_cast<const SwPageFrm&>(rFrm).GetPrev() ) ||
( rFrm.IsFlowFrm() && !SwFlowFrm::CastFlowFrm(&rFrm)->IsFollow() && SwFlowFrm::CastFlowFrm(&rFrm)->HasFollow() ) ||
- ( rFrm.IsTxtFrm() && rFrm.GetDrawObjs() ) ||
+ ( rFrm.IsTextFrm() && rFrm.GetDrawObjs() ) ||
( rFrm.IsRowFrm() && rFrm.IsInSplitTableRow() ) ||
( rFrm.IsCellFrm() && const_cast<SwFrm&>(rFrm).GetNextCellLeaf( MAKEPAGE_NONE ) ) )
{
@@ -618,18 +618,18 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
if ( bTextIndent )
{
- OSL_ENSURE( pFrm->IsTxtFrm(), "Frame type <-> tag attribute mismatch" );
+ OSL_ENSURE( pFrm->IsTextFrm(), "Frame type <-> tag attribute mismatch" );
const SvxLRSpaceItem &rSpace =
- static_cast<const SwTxtFrm*>(pFrm)->GetTxtNode()->GetSwAttrSet().GetLRSpace();
- nVal = rSpace.GetTxtFirstLineOfst();
+ static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetSwAttrSet().GetLRSpace();
+ nVal = rSpace.GetTextFirstLineOfst();
if ( 0 != nVal )
mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::TextIndent, nVal );
}
if ( bTextAlign )
{
- OSL_ENSURE( pFrm->IsTxtFrm(), "Frame type <-> tag attribute mismatch" );
- const SwAttrSet& aSet = static_cast<const SwTxtFrm*>(pFrm)->GetTxtNode()->GetSwAttrSet();
+ OSL_ENSURE( pFrm->IsTextFrm(), "Frame type <-> tag attribute mismatch" );
+ const SwAttrSet& aSet = static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetSwAttrSet();
const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust();
if ( SVX_ADJUST_BLOCK == nAdjust || SVX_ADJUST_CENTER == nAdjust ||
( (pFrm->IsRightToLeft() && SVX_ADJUST_LEFT == nAdjust) ||
@@ -649,13 +649,13 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
{
OSL_ENSURE( pFrm->IsFlyFrm(), "Frame type <-> tag attribute mismatch" );
const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pFrm);
- if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() )
+ if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() )
{
- const SwNoTxtFrm* pNoTxtFrm = static_cast<const SwNoTxtFrm*>(pFly->Lower());
- const SwNoTxtNode* pNoTxtNode = static_cast<const SwNoTxtNode*>(pNoTxtFrm->GetNode());
+ const SwNoTextFrm* pNoTextFrm = static_cast<const SwNoTextFrm*>(pFly->Lower());
+ const SwNoTextNode* pNoTextNode = static_cast<const SwNoTextNode*>(pNoTextFrm->GetNode());
- const OUString aAlternateTxt( pNoTxtNode->GetTitle() );
- mpPDFExtOutDevData->SetAlternateText( aAlternateTxt );
+ const OUString aAlternateText( pNoTextNode->GetTitle() );
+ mpPDFExtOutDevData->SetAlternateText( aAlternateText );
}
}
@@ -722,7 +722,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
else if ( mpPorInfo )
{
const SwLinePortion* pPor = &mpPorInfo->mrPor;
- const SwTxtPaintInfo& rInf = mpPorInfo->mrTxtPainter.GetInfo();
+ const SwTextPaintInfo& rInf = mpPorInfo->mrTextPainter.GetInfo();
bool bActualText = false;
bool bBaselineShift = false;
@@ -761,12 +761,12 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
if ( bActualText )
{
- OUString aActualTxt;
+ OUString aActualText;
if (pPor->GetWhichPor() == POR_SOFTHYPH || pPor->GetWhichPor() == POR_HYPH)
- aActualTxt = OUString(0xad); // soft hyphen
+ aActualText = OUString(0xad); // soft hyphen
else
- aActualTxt = rInf.GetTxt().copy(rInf.GetIdx(), pPor->GetLen());
- mpPDFExtOutDevData->SetActualText( aActualTxt );
+ aActualText = rInf.GetText().copy(rInf.GetIdx(), pPor->GetLen());
+ mpPDFExtOutDevData->SetActualText( aActualText );
}
if ( bBaselineShift )
@@ -833,19 +833,19 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements()
return;
const SwFrm& rFrm = mpNumInfo->mrFrm;
- OSL_ENSURE( rFrm.IsTxtFrm(), "numbered only for text frames" );
- const SwTxtFrm& rTxtFrm = static_cast<const SwTxtFrm&>(rFrm);
+ OSL_ENSURE( rFrm.IsTextFrm(), "numbered only for text frames" );
+ const SwTextFrm& rTextFrm = static_cast<const SwTextFrm&>(rFrm);
// Lowers of NonStructureElements should not be considered:
- if ( lcl_IsInNonStructEnv( rTxtFrm ) || rTxtFrm.IsFollow() )
+ if ( lcl_IsInNonStructEnv( rTextFrm ) || rTextFrm.IsFollow() )
return;
- const SwTxtNode* pTxtNd = rTxtFrm.GetTxtNode();
- const SwNumRule* pNumRule = pTxtNd->GetNumRule();
- const SwNodeNum* pNodeNum = pTxtNd->GetNum();
+ const SwTextNode* pTextNd = rTextFrm.GetTextNode();
+ const SwNumRule* pNumRule = pTextNd->GetNumRule();
+ const SwNodeNum* pNodeNum = pTextNd->GetNum();
- const bool bNumbered = !pTxtNd->IsOutline() && pNodeNum && pNodeNum->GetParent() && pNumRule;
+ const bool bNumbered = !pTextNd->IsOutline() && pNodeNum && pNodeNum->GetParent() && pNumRule;
// Check, if we have to reopen a list or a list body:
// First condition:
@@ -854,7 +854,7 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements()
return;
const SwNumberTreeNode* pParent = pNodeNum->GetParent();
- const bool bSameNumbering = lcl_HasPreviousParaSameNumRule(*pTxtNd);
+ const bool bSameNumbering = lcl_HasPreviousParaSameNumRule(*pTextNd);
// Second condition: current numbering is not 'interrupted'
if ( bSameNumbering )
@@ -867,8 +867,8 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements()
// and its level > 1 or
// - Numbering should restart at the current node and its level > 1
// - The current item has no label
- const bool bNewSubListStart = pParent->GetParent() && (pParent->IsFirst( pNodeNum ) || pTxtNd->IsListRestart() );
- const bool bNoLabel = !pTxtNd->IsCountedInList() && !pTxtNd->IsListRestart();
+ const bool bNewSubListStart = pParent->GetParent() && (pParent->IsFirst( pNodeNum ) || pTextNd->IsListRestart() );
+ const bool bNoLabel = !pTextNd->IsCountedInList() && !pTextNd->IsListRestart();
if ( bNewSubListStart || bNoLabel )
{
// Fine, we try to reopen the appropriate list body
@@ -908,7 +908,7 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements()
}
}
// 2. We have to reopen an existing list tag:
- else if ( !pParent->IsFirst( pNodeNum ) && !pTxtNd->IsListRestart() )
+ else if ( !pParent->IsFirst( pNodeNum ) && !pTextNd->IsListRestart() )
{
// any other than the first node in a list level has to reopen the current
// list. The current list is associated in a map with the first child of the list:
@@ -950,8 +950,8 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements()
}
// New tags:
- const bool bNewListTag = (pNodeNum->GetParent()->IsFirst( pNodeNum ) || pTxtNd->IsListRestart() || !bSameNumbering);
- const bool bNewItemTag = bNewListTag || pTxtNd->IsCountedInList(); // If the text node is not counted, we do not start a new list item:
+ const bool bNewListTag = (pNodeNum->GetParent()->IsFirst( pNodeNum ) || pTextNd->IsListRestart() || !bSameNumbering);
+ const bool bNewItemTag = bNewListTag || pTextNd->IsCountedInList(); // If the text node is not counted, we do not start a new list item:
if ( bNewListTag )
BeginTag( vcl::PDFWriter::List, OUString(aListString) );
@@ -1058,19 +1058,19 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
case FRM_TXT :
{
- const SwTxtNode* pTxtNd =
- static_cast<const SwTxtFrm*>(pFrm)->GetTxtNode();
+ const SwTextNode* pTextNd =
+ static_cast<const SwTextFrm*>(pFrm)->GetTextNode();
- const SwFmt* pTxtFmt = pTxtNd->GetFmtColl();
- const SwFmt* pParentTxtFmt = pTxtFmt ? pTxtFmt->DerivedFrom() : NULL;
+ const SwFormat* pTextFormat = pTextNd->GetFormatColl();
+ const SwFormat* pParentTextFormat = pTextFormat ? pTextFormat->DerivedFrom() : NULL;
OUString sStyleName;
OUString sParentStyleName;
- if ( pTxtFmt)
- SwStyleNameMapper::FillProgName( pTxtFmt->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
- if ( pParentTxtFmt)
- SwStyleNameMapper::FillProgName( pParentTxtFmt->GetName(), sParentStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
+ if ( pTextFormat)
+ SwStyleNameMapper::FillProgName( pTextFormat->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
+ if ( pParentTextFormat)
+ SwStyleNameMapper::FillProgName( pParentTextFormat->GetName(), sParentStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
// This is the default. If the paragraph could not be mapped to
// any of the standard pdf tags, we write a user defined tag
@@ -1112,9 +1112,9 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
// Heading: H1 - H6
- if ( pTxtNd->IsOutline() )
+ if ( pTextNd->IsOutline() )
{
- int nRealLevel = pTxtNd->GetAttrOutlineLevel()-1;
+ int nRealLevel = pTextNd->GetAttrOutlineLevel()-1;
nRealLevel = nRealLevel > 5 ? 5 : nRealLevel;
nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::H1 + nRealLevel);
@@ -1258,12 +1258,12 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
// fly in content or fly at page
{
const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pFrm);
- if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() )
+ if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() )
{
bool bFormula = false;
- const SwNoTxtFrm* pNoTxtFrm = static_cast<const SwNoTxtFrm*>(pFly->Lower());
- SwOLENode* pOLENd = const_cast<SwOLENode*>(pNoTxtFrm->GetNode()->GetOLENode());
+ const SwNoTextFrm* pNoTextFrm = static_cast<const SwNoTextFrm*>(pFly->Lower());
+ SwOLENode* pOLENd = const_cast<SwOLENode*>(pNoTextFrm->GetNode()->GetOLENode());
if ( pOLENd )
{
SwOLEObj& aOLEObj = pOLENd->GetOLEObj();
@@ -1313,8 +1313,8 @@ void SwTaggedPDFHelper::EndStructureElements()
void SwTaggedPDFHelper::BeginInlineStructureElements()
{
const SwLinePortion* pPor = &mpPorInfo->mrPor;
- const SwTxtPaintInfo& rInf = mpPorInfo->mrTxtPainter.GetInfo();
- const SwTxtFrm* pFrm = rInf.GetTxtFrm();
+ const SwTextPaintInfo& rInf = mpPorInfo->mrTextPainter.GetInfo();
+ const SwTextFrm* pFrm = rInf.GetTextFrm();
// Lowers of NonStructureElements should not be considered:
@@ -1339,24 +1339,24 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
case POR_TXT :
case POR_PARA :
{
- SwTxtNode* pNd = const_cast<SwTxtNode*>(pFrm->GetTxtNode());
- SwTxtAttr const*const pInetFmtAttr =
- pNd->GetTxtAttrAt(rInf.GetIdx(), RES_TXTATR_INETFMT);
+ SwTextNode* pNd = const_cast<SwTextNode*>(pFrm->GetTextNode());
+ SwTextAttr const*const pInetFormatAttr =
+ pNd->GetTextAttrAt(rInf.GetIdx(), RES_TXTATR_INETFMT);
OUString sStyleName;
- if ( !pInetFmtAttr )
+ if ( !pInetFormatAttr )
{
- ::std::vector<SwTxtAttr *> const charAttrs(
- pNd->GetTxtAttrsAt(rInf.GetIdx(), RES_TXTATR_CHARFMT));
+ ::std::vector<SwTextAttr *> const charAttrs(
+ pNd->GetTextAttrsAt(rInf.GetIdx(), RES_TXTATR_CHARFMT));
// TODO: handle more than 1 char style?
- const SwCharFmt* pCharFmt = (charAttrs.size())
- ? (*charAttrs.begin())->GetCharFmt().GetCharFmt() : 0;
- if ( pCharFmt )
- SwStyleNameMapper::FillProgName( pCharFmt->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
+ const SwCharFormat* pCharFormat = (charAttrs.size())
+ ? (*charAttrs.begin())->GetCharFormat().GetCharFormat() : 0;
+ if ( pCharFormat )
+ SwStyleNameMapper::FillProgName( pCharFormat->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
}
// Check for Link:
- if( pInetFmtAttr )
+ if( pInetFormatAttr )
{
nPDFType = vcl::PDFWriter::Link;
aPDFType = aLinkString;
@@ -1405,19 +1405,19 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
case POR_FLD :
{
// check field type:
- const sal_Int32 nIdx = static_cast<const SwFldPortion*>(pPor)->IsFollow() ?
+ const sal_Int32 nIdx = static_cast<const SwFieldPortion*>(pPor)->IsFollow() ?
rInf.GetIdx() - 1 :
rInf.GetIdx();
- const SwTxtAttr* pHint = mpPorInfo->mrTxtPainter.GetAttr( nIdx );
+ const SwTextAttr* pHint = mpPorInfo->mrTextPainter.GetAttr( nIdx );
if ( pHint && RES_TXTATR_FIELD == pHint->Which() )
{
- const SwField* pFld = pHint->GetFmtFld().GetField();
- if ( RES_GETREFFLD == pFld->Which() )
+ const SwField* pField = pHint->GetFormatField().GetField();
+ if ( RES_GETREFFLD == pField->Which() )
{
nPDFType = vcl::PDFWriter::Link;
aPDFType = aLinkString;
}
- else if ( RES_AUTHORITY == pFld->Which() )
+ else if ( RES_AUTHORITY == pField->Which() )
{
nPDFType = vcl::PDFWriter::BibEntry;
aPDFType = aBibEntryString;
@@ -1565,20 +1565,20 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
if ( pPDFExtOutDevData->GetIsExportNotes() )
{
- SwFieldType* pType = mrSh.GetFldType( RES_POSTITFLD, OUString() );
- SwIterator<SwFmtFld,SwFieldType> aIter( *pType );
- for( SwFmtFld* pFirst = aIter.First(); pFirst; )
+ SwFieldType* pType = mrSh.GetFieldType( RES_POSTITFLD, OUString() );
+ SwIterator<SwFormatField,SwFieldType> aIter( *pType );
+ for( SwFormatField* pFirst = aIter.First(); pFirst; )
{
- if( pFirst->GetTxtFld() && pFirst->IsFldInDoc() )
+ if( pFirst->GetTextField() && pFirst->IsFieldInDoc() )
{
- const SwTxtNode* pTNd = pFirst->GetTxtFld()->GetpTxtNode();
+ const SwTextNode* pTNd = pFirst->GetTextField()->GetpTextNode();
OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
// 1. Check if the whole paragraph is hidden
// 2. Move to the field
// 3. Check for hidden text attribute
if ( !pTNd->IsHidden() &&
- mrSh.GotoFld( *pFirst ) &&
+ mrSh.GotoFormatField( *pFirst ) &&
!mrSh.SelectHiddenRange() )
{
// Link Rectangle
@@ -1607,7 +1607,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// The title should consist of the author and the date:
aNote.Title = pField->GetPar1() + ", " + sDate;
// Guess what the contents contains...
- aNote.Contents = pField->GetTxt();
+ aNote.Contents = pField->GetText();
// Link Export
Rectangle aRect(SwRectToPDFRect(pCurrPage, rNoteRect.SVRect()));
@@ -1629,7 +1629,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
SwGetINetAttr* p = &rAttr;
OSL_ENSURE( 0 != p, "Enhanced pdf export - SwGetINetAttr is missing" );
- const SwTxtNode* pTNd = p->rINetAttr.GetpTxtNode();
+ const SwTextNode* pTNd = p->rINetAttr.GetpTextNode();
OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
// 1. Check if the whole paragraph is hidden
@@ -1641,12 +1641,12 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
{
// Select the hyperlink:
mrSh.SwCrsrShell::Right( 1, CRSR_SKIP_CHARS );
- if ( mrSh.SwCrsrShell::SelectTxtAttr( RES_TXTATR_INETFMT, true ) )
+ if ( mrSh.SwCrsrShell::SelectTextAttr( RES_TXTATR_INETFMT, true ) )
{
// First, we create the destination, because there may be more
// than one link to this destination:
OUString aURL( INetURLObject::decode(
- p->rINetAttr.GetINetFmt().GetValue(),
+ p->rINetAttr.GetINetFormat().GetValue(),
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ) );
@@ -1736,19 +1736,19 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// HYPERLINKS (Graphics, Frames, OLEs )
- const SwFrmFmts* pTbl = pDoc->GetSpzFrmFmts();
- const size_t nSpzFrmFmtsCount = pTbl->size();
- for( size_t n = 0; n < nSpzFrmFmtsCount; ++n )
+ const SwFrameFormats* pTable = pDoc->GetSpzFrameFormats();
+ const size_t nSpzFrameFormatsCount = pTable->size();
+ for( size_t n = 0; n < nSpzFrameFormatsCount; ++n )
{
- const SwFrmFmt* pFrmFmt = (*pTbl)[n];
+ const SwFrameFormat* pFrameFormat = (*pTable)[n];
const SfxPoolItem* pItem;
- if ( RES_DRAWFRMFMT != pFrmFmt->Which() &&
- SfxItemState::SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, true, &pItem ) )
+ if ( RES_DRAWFRMFMT != pFrameFormat->Which() &&
+ SfxItemState::SET == pFrameFormat->GetAttrSet().GetItemState( RES_URL, true, &pItem ) )
{
const SwPageFrm* pCurrPage =
static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() );
- OUString aURL( static_cast<const SwFmtURL*>(pItem)->GetURL() );
+ OUString aURL( static_cast<const SwFormatURL*>(pItem)->GetURL() );
const bool bIntern = '#' == aURL[0];
// Create the destination for internal links:
@@ -1778,7 +1778,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
if ( !bIntern || -1 != nDestId )
{
Point aNullPt;
- const SwRect aLinkRect = pFrmFmt->FindLayoutRect( false, &aNullPt );
+ const SwRect aLinkRect = pFrameFormat->FindLayoutRect( false, &aNullPt );
// Link PageNums
std::vector<sal_Int32> aLinkPageNums = CalcOutputPageNums( aLinkRect );
@@ -1797,13 +1797,13 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
pPDFExtOutDevData->SetLinkURL( nLinkId, aURL );
// #i44368# Links in Header/Footer
- const SwFmtAnchor &rAnch = pFrmFmt->GetAnchor();
+ const SwFormatAnchor &rAnch = pFrameFormat->GetAnchor();
if (FLY_AT_PAGE != rAnch.GetAnchorId())
{
- const SwPosition* pPosition = rAnch.GetCntntAnchor();
+ const SwPosition* pPosition = rAnch.GetContentAnchor();
if ( pPosition && pDoc->IsInHeaderFooter( pPosition->nNode ) )
{
- const SwTxtNode* pTNd = pPosition->nNode.GetNode().GetTxtNode();
+ const SwTextNode* pTNd = pPosition->nNode.GetNode().GetTextNode();
if ( pTNd )
MakeHeaderFooterLinks( *pPDFExtOutDevData, *pTNd, aLinkRect, nDestId, aURL, bIntern );
}
@@ -1816,20 +1816,20 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// REFERENCES
- SwFieldType* pType = mrSh.GetFldType( RES_GETREFFLD, OUString() );
- SwIterator<SwFmtFld,SwFieldType> aIter( *pType );
- for( SwFmtFld* pFirst = aIter.First(); pFirst; )
+ SwFieldType* pType = mrSh.GetFieldType( RES_GETREFFLD, OUString() );
+ SwIterator<SwFormatField,SwFieldType> aIter( *pType );
+ for( SwFormatField* pFirst = aIter.First(); pFirst; )
{
- if( pFirst->GetTxtFld() && pFirst->IsFldInDoc() )
+ if( pFirst->GetTextField() && pFirst->IsFieldInDoc() )
{
- const SwTxtNode* pTNd = pFirst->GetTxtFld()->GetpTxtNode();
+ const SwTextNode* pTNd = pFirst->GetTextField()->GetpTextNode();
OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
// 1. Check if the whole paragraph is hidden
// 2. Move to the field
// 3. Check for hidden text attribute
if ( !pTNd->IsHidden() &&
- mrSh.GotoFld( *pFirst ) &&
+ mrSh.GotoFormatField( *pFirst ) &&
!mrSh.SelectHiddenRange() )
{
// Select the field:
@@ -1906,19 +1906,19 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// FOOTNOTES
- const size_t nFtnCount = pDoc->GetFtnIdxs().size();
- for ( size_t nIdx = 0; nIdx < nFtnCount; ++nIdx )
+ const size_t nFootnoteCount = pDoc->GetFootnoteIdxs().size();
+ for ( size_t nIdx = 0; nIdx < nFootnoteCount; ++nIdx )
{
// Set cursor to text node that contains the footnote:
- const SwTxtFtn* pTxtFtn = pDoc->GetFtnIdxs()[ nIdx ];
- SwTxtNode& rTNd = const_cast<SwTxtNode&>(pTxtFtn->GetTxtNode());
+ const SwTextFootnote* pTextFootnote = pDoc->GetFootnoteIdxs()[ nIdx ];
+ SwTextNode& rTNd = const_cast<SwTextNode&>(pTextFootnote->GetTextNode());
mrSh._GetCrsr()->GetPoint()->nNode = rTNd;
- mrSh._GetCrsr()->GetPoint()->nContent.Assign( &rTNd, pTxtFtn->GetStart() );
+ mrSh._GetCrsr()->GetPoint()->nContent.Assign( &rTNd, pTextFootnote->GetStart() );
// 1. Check if the whole paragraph is hidden
// 2. Check for hidden text attribute
- if ( rTNd.GetTxtNode()->IsHidden() || mrSh.SelectHiddenRange() )
+ if ( rTNd.GetTextNode()->IsHidden() || mrSh.SelectHiddenRange() )
continue;
SwCrsrSaveState aSaveState( *mrSh._GetCrsr() );
@@ -1941,7 +1941,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
const SwRect aLinkRect( aTmp[ 0 ] );
// Goto footnote text:
- if ( mrSh.GotoFtnTxt() )
+ if ( mrSh.GotoFootnoteText() )
{
// Link PageNums
std::vector<sal_Int32> aLinkPageNums = CalcOutputPageNums( aLinkRect );
@@ -1992,12 +1992,12 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
for ( sal_uInt16 i = 0; i < nOutlineCount; ++i )
{
// Check if outline is hidden
- const SwTxtNode* pTNd = mrSh.GetNodes().GetOutLineNds()[ i ]->GetTxtNode();
+ const SwTextNode* pTNd = mrSh.GetNodes().GetOutLineNds()[ i ]->GetTextNode();
OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
if ( pTNd->IsHidden() ||
// #i40292# Skip empty outlines:
- pTNd->GetTxt().isEmpty())
+ pTNd->GetText().isEmpty())
continue;
// Get parent id from stack:
@@ -2207,7 +2207,7 @@ std::vector< sal_Int32 > SwEnhancedPDFExportHelper::CalcOutputPageNums(
}
void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rPDFExtOutDevData,
- const SwTxtNode& rTNd,
+ const SwTextNode& rTNd,
const SwRect& rLinkRect,
sal_Int32 nDestId,
const OUString& rURL,
@@ -2217,8 +2217,8 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP
// the offset of the link rectangle calculates as follows:
const Point aOffset = rLinkRect.Pos() + mrOut.GetMapMode().GetOrigin();
- SwIterator<SwTxtFrm,SwTxtNode> aIter( rTNd );
- for ( SwTxtFrm* pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() )
+ SwIterator<SwTextFrm,SwTextNode> aIter( rTNd );
+ for ( SwTextFrm* pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() )
{
// Add offset to current page:
const SwPageFrm* pPageFrm = pTmpFrm->FindPageFrm();
diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index c1ecd6a8e89f..f0c7a6b206fb 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -40,12 +40,12 @@ class SwAttrHandler
{
private:
- /// Container for SwTxtAttr Objects
+ /// Container for SwTextAttr Objects
class SwAttrStack
{
private:
- SwTxtAttr* pInitialArray[ INITIAL_NUM_ATTR ];
- SwTxtAttr** pArray;
+ SwTextAttr* pInitialArray[ INITIAL_NUM_ATTR ];
+ SwTextAttr** pArray;
sal_uInt16 nCount; // number of elements on stack
sal_uInt16 nSize; // number of positions in Array
@@ -59,23 +59,23 @@ private:
inline void Reset() { nCount = 0; };
// insert on top
- inline void Push( const SwTxtAttr& rAttr ) { Insert( rAttr, nCount ); };
+ inline void Push( const SwTextAttr& rAttr ) { Insert( rAttr, nCount ); };
// insert at specified position, take care for not inserting behind
// the value returned by Count()
- void Insert( const SwTxtAttr& rAttr, const sal_uInt16 nPos );
+ void Insert( const SwTextAttr& rAttr, const sal_uInt16 nPos );
// remove specified attribute
- void Remove( const SwTxtAttr& rAttr );
+ void Remove( const SwTextAttr& rAttr );
// get attribute from top if exists, otherwise 0
- const SwTxtAttr* Top() const;
+ const SwTextAttr* Top() const;
// number of elements on stack
inline sal_uInt16 Count() const { return nCount; };
// returns position of rAttr on Stack if found, otherwise USHRT_MAX
// can be used for Remove of an attribute
- sal_uInt16 Pos( const SwTxtAttr& rAttr ) const;
+ sal_uInt16 Pos( const SwTextAttr& rAttr ) const;
};
SwAttrStack aAttrStack[ NUM_ATTRIBUTE_STACKS ]; // stack collection
@@ -95,7 +95,7 @@ private:
// push attribute to specified stack, returns true, if attribute has
// been pushed on top of stack (important for stacks containing different
// attributes with different priority and redlining)
- bool Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem );
+ bool Push( const SwTextAttr& rAttr, const SfxPoolItem& rItem );
// apply top attribute on stack to font
void ActivateTop( SwFont& rFnt, sal_uInt16 nStackPos );
@@ -118,11 +118,11 @@ public:
void Reset( );
// insert specified attribute and change font
- void PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt );
+ void PushAndChg( const SwTextAttr& rAttr, SwFont& rFnt );
// remove specified attribute and reset font
- void PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt );
- void Pop( const SwTxtAttr& rAttr );
+ void PopAndChg( const SwTextAttr& rAttr, SwFont& rFnt );
+ void Pop( const SwTextAttr& rAttr );
// apply script dependent attributes
// void ChangeScript( SwFont& rFnt, const sal_uInt8 nScr );
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index e3cbe00f99be..155e02b23d3d 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -128,7 +128,7 @@ const sal_uInt8 StackPos[ RES_TXTATR_WITHEND_END - RES_CHRATR_BEGIN + 1 ] =
43, // RES_TXTATR_INPUTFIELD // 55
};
-namespace CharFmt
+namespace CharFormat
{
/// Returns the item set associated with an character/inet/auto style
@@ -138,17 +138,17 @@ const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr )
if ( RES_TXTATR_AUTOFMT == rAttr.Which() )
{
- pSet = static_cast<const SwFmtAutoFmt&>(rAttr).GetStyleHandle().get();
+ pSet = static_cast<const SwFormatAutoFormat&>(rAttr).GetStyleHandle().get();
}
else
{
// Get the attributes from the template
- const SwCharFmt* pFmt = RES_TXTATR_INETFMT == rAttr.Which() ?
- static_cast<const SwFmtINetFmt&>(rAttr).GetTxtINetFmt()->GetCharFmt() :
- static_cast<const SwFmtCharFmt&>(rAttr).GetCharFmt();
- if( pFmt )
+ const SwCharFormat* pFormat = RES_TXTATR_INETFMT == rAttr.Which() ?
+ static_cast<const SwFormatINetFormat&>(rAttr).GetTextINetFormat()->GetCharFormat() :
+ static_cast<const SwFormatCharFormat&>(rAttr).GetCharFormat();
+ if( pFormat )
{
- pSet = &pFmt->GetAttrSet();
+ pSet = &pFormat->GetAttrSet();
}
}
@@ -156,13 +156,13 @@ const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr )
}
/// Extracts pool item of type nWhich from rAttr
-const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, sal_uInt16 nWhich )
+const SfxPoolItem* GetItem( const SwTextAttr& rAttr, sal_uInt16 nWhich )
{
if ( RES_TXTATR_INETFMT == rAttr.Which() ||
RES_TXTATR_CHARFMT == rAttr.Which() ||
RES_TXTATR_AUTOFMT == rAttr.Which() )
{
- const SfxItemSet* pSet = CharFmt::GetItemSet( rAttr.GetAttr() );
+ const SfxItemSet* pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
if ( !pSet ) return 0;
bool bInParent = RES_TXTATR_AUTOFMT != rAttr.Which();
@@ -176,11 +176,11 @@ const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, sal_uInt16 nWhich )
}
/// Checks if item is included in character/inet/auto style
-bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr )
+bool IsItemIncluded( const sal_uInt16 nWhich, const SwTextAttr *pAttr )
{
bool bRet = false;
- const SfxItemSet* pItemSet = CharFmt::GetItemSet( pAttr->GetAttr() );
+ const SfxItemSet* pItemSet = CharFormat::GetItemSet( pAttr->GetAttr() );
if ( pItemSet )
bRet = SfxItemState::SET == pItemSet->GetItemState( nWhich, true );
@@ -195,7 +195,7 @@ bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr )
* 1. We never take the 'visited' color during printing/pdf export/preview
* 2. The user has chosen to override these colors in the view options
*/
-static bool lcl_ChgHyperLinkColor( const SwTxtAttr& rAttr,
+static bool lcl_ChgHyperLinkColor( const SwTextAttr& rAttr,
const SfxPoolItem& rItem,
const SwViewShell* pShell,
Color* pColor )
@@ -210,8 +210,8 @@ static bool lcl_ChgHyperLinkColor( const SwTxtAttr& rAttr,
// We do not want to show visited links:
// (printing, pdf export, page preview)
- SwTxtINetFmt & rINetAttr(const_cast<SwTxtINetFmt&>(
- static_txtattr_cast<SwTxtINetFmt const&>(rAttr)));
+ SwTextINetFormat & rINetAttr(const_cast<SwTextINetFormat&>(
+ static_txtattr_cast<SwTextINetFormat const&>(rAttr)));
if ( pShell->GetOut()->GetOutDevType() == OUTDEV_PRINTER ||
pShell->GetViewOptions()->IsPDFExport() ||
pShell->GetViewOptions()->IsPagePreview() )
@@ -222,9 +222,9 @@ static bool lcl_ChgHyperLinkColor( const SwTxtAttr& rAttr,
{
// take color from character format 'unvisited link'
rINetAttr.SetVisited(false);
- const SwCharFmt* pTmpFmt = rINetAttr.GetCharFmt();
+ const SwCharFormat* pTmpFormat = rINetAttr.GetCharFormat();
const SfxPoolItem* pItem;
- if (SfxItemState::SET == pTmpFmt->GetItemState(RES_CHRATR_COLOR, true, &pItem))
+ if (SfxItemState::SET == pTmpFormat->GetItemState(RES_CHRATR_COLOR, true, &pItem))
*pColor = static_cast<const SvxColorItem*>(pItem)->GetValue();
rINetAttr.SetVisited(true);
}
@@ -270,7 +270,7 @@ inline SwAttrHandler::SwAttrStack::SwAttrStack()
pArray = pInitialArray;
}
-void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const sal_uInt16 nPos )
+void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& rAttr, const sal_uInt16 nPos )
{
// do we still have enough space?
if ( nCount >= nSize )
@@ -279,19 +279,19 @@ void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const sal_uInt1
if ( INITIAL_NUM_ATTR == nSize )
{
nSize += STACK_INCREMENT;
- pArray = new SwTxtAttr*[ nSize ];
+ pArray = new SwTextAttr*[ nSize ];
// copy from pInitArray to new Array
memcpy( pArray, pInitialArray,
- INITIAL_NUM_ATTR * sizeof(SwTxtAttr*)
+ INITIAL_NUM_ATTR * sizeof(SwTextAttr*)
);
}
// we are in new memory
else
{
nSize += STACK_INCREMENT;
- SwTxtAttr** pTmpArray = new SwTxtAttr*[ nSize ];
+ SwTextAttr** pTmpArray = new SwTextAttr*[ nSize ];
// copy from pArray to new Array
- memcpy( pTmpArray, pArray, nCount * sizeof(SwTxtAttr*) );
+ memcpy( pTmpArray, pArray, nCount * sizeof(SwTextAttr*) );
// free old array
delete [] pArray;
pArray = pTmpArray;
@@ -302,31 +302,31 @@ void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const sal_uInt1
if ( nPos < nCount )
memmove( pArray + nPos + 1, pArray + nPos,
- ( nCount - nPos ) * sizeof(SwTxtAttr*)
+ ( nCount - nPos ) * sizeof(SwTextAttr*)
);
- pArray[ nPos ] = const_cast<SwTxtAttr*>(&rAttr);
+ pArray[ nPos ] = const_cast<SwTextAttr*>(&rAttr);
nCount++;
}
-void SwAttrHandler::SwAttrStack::Remove( const SwTxtAttr& rAttr )
+void SwAttrHandler::SwAttrStack::Remove( const SwTextAttr& rAttr )
{
sal_uInt16 nPos = Pos( rAttr );
if ( nPos < nCount )
{
memmove( pArray + nPos, pArray + nPos + 1,
- ( nCount - 1 - nPos ) * sizeof(SwTxtAttr*)
+ ( nCount - 1 - nPos ) * sizeof(SwTextAttr*)
);
nCount--;
}
}
-const SwTxtAttr* SwAttrHandler::SwAttrStack::Top() const
+const SwTextAttr* SwAttrHandler::SwAttrStack::Top() const
{
return nCount ? pArray[ nCount - 1 ] : 0;
}
-sal_uInt16 SwAttrHandler::SwAttrStack::Pos( const SwTxtAttr& rAttr ) const
+sal_uInt16 SwAttrHandler::SwAttrStack::Pos( const SwTextAttr& rAttr ) const
{
if ( ! nCount )
// empty stack
@@ -404,7 +404,7 @@ void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS,
}
// It is possible, that Init is called more than once, e.g., in a
- // SwTxtFrm::FormatOnceMore situation.
+ // SwTextFrm::FormatOnceMore situation.
delete pFnt;
pFnt = new SwFont( rFnt );
}
@@ -415,7 +415,7 @@ void SwAttrHandler::Reset( )
aAttrStack[ i ].Reset();
}
-void SwAttrHandler::PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
+void SwAttrHandler::PushAndChg( const SwTextAttr& rAttr, SwFont& rFnt )
{
// these special attributes in fact represent a collection of attributes
// they have to be pushed to each stack they belong to
@@ -423,7 +423,7 @@ void SwAttrHandler::PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
RES_TXTATR_CHARFMT == rAttr.Which() ||
RES_TXTATR_AUTOFMT == rAttr.Which() )
{
- const SfxItemSet* pSet = CharFmt::GetItemSet( rAttr.GetAttr() );
+ const SfxItemSet* pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
if ( !pSet ) return;
for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
@@ -459,7 +459,7 @@ void SwAttrHandler::PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
}
}
-bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
+bool SwAttrHandler::Push( const SwTextAttr& rAttr, const SfxPoolItem& rItem )
{
OSL_ENSURE( rItem.Which() < RES_TXTATR_WITHEND_END,
"I do not want this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
@@ -472,7 +472,7 @@ bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
// attributes originating from redlining have highest priority
// second priority are hyperlink attributes, which have a color replacement
- const SwTxtAttr* pTopAttr = aAttrStack[ nStack ].Top();
+ const SwTextAttr* pTopAttr = aAttrStack[ nStack ].Top();
if ( !pTopAttr
|| rAttr.IsPriorityAttr()
|| ( !pTopAttr->IsPriorityAttr()
@@ -488,7 +488,7 @@ bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
return false;
}
-void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
+void SwAttrHandler::PopAndChg( const SwTextAttr& rAttr, SwFont& rFnt )
{
if ( RES_TXTATR_WITHEND_END <= rAttr.Which() )
return; // robust
@@ -499,7 +499,7 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
RES_TXTATR_CHARFMT == rAttr.Which() ||
RES_TXTATR_AUTOFMT == rAttr.Which() )
{
- const SfxItemSet* pSet = CharFmt::GetItemSet( rAttr.GetAttr() );
+ const SfxItemSet* pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
if ( !pSet ) return;
for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
@@ -529,7 +529,7 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
}
/// Only used during redlining
-void SwAttrHandler::Pop( const SwTxtAttr& rAttr )
+void SwAttrHandler::Pop( const SwTextAttr& rAttr )
{
OSL_ENSURE( rAttr.Which() < RES_TXTATR_WITHEND_END,
"I do not have this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
@@ -546,7 +546,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
"I cannot activate this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
const sal_uInt16 nStackPos = StackPos[ nAttr ];
- const SwTxtAttr* pTopAt = aAttrStack[ nStackPos ].Top();
+ const SwTextAttr* pTopAt = aAttrStack[ nStackPos ].Top();
if ( pTopAt )
{
const SfxPoolItem* pItemNext(NULL);
@@ -556,7 +556,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
RES_TXTATR_CHARFMT == pTopAt->Which() ||
RES_TXTATR_AUTOFMT == pTopAt->Which() )
{
- const SfxItemSet* pSet = CharFmt::GetItemSet( pTopAt->GetAttr() );
+ const SfxItemSet* pSet = CharFormat::GetItemSet( pTopAt->GetAttr() );
if (pSet)
pSet->GetItemState( nAttr, RES_TXTATR_AUTOFMT != pTopAt->Which(), &pItemNext );
}
@@ -593,11 +593,11 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
// check, if an rotation attribute has to be applied
const sal_uInt16 nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
bool bTwoLineAct = false;
- const SwTxtAttr* pTwoLineAttr = aAttrStack[ nTwoLineStack ].Top();
+ const SwTextAttr* pTwoLineAttr = aAttrStack[ nTwoLineStack ].Top();
if ( pTwoLineAttr )
{
- const SfxPoolItem* pTwoLineItem = CharFmt::GetItem( *pTwoLineAttr, RES_CHRATR_TWO_LINES );
+ const SfxPoolItem* pTwoLineItem = CharFormat::GetItem( *pTwoLineAttr, RES_CHRATR_TWO_LINES );
bTwoLineAct = static_cast<const SvxTwoLinesItem*>(pTwoLineItem)->GetValue();
}
else
@@ -609,11 +609,11 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
// eventually, an rotate attribute has to be activated
const sal_uInt16 nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
- const SwTxtAttr* pRotateAttr = aAttrStack[ nRotateStack ].Top();
+ const SwTextAttr* pRotateAttr = aAttrStack[ nRotateStack ].Top();
if ( pRotateAttr )
{
- const SfxPoolItem* pRotateItem = CharFmt::GetItem( *pRotateAttr, RES_CHRATR_ROTATE );
+ const SfxPoolItem* pRotateItem = CharFormat::GetItem( *pRotateAttr, RES_CHRATR_ROTATE );
rFnt.SetVertical( static_cast<const SvxCharRotateItem*>(pRotateItem)->GetValue(),
bVertLayout );
}
@@ -677,10 +677,10 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
case RES_CHRATR_UNDERLINE :
{
const sal_uInt16 nStackPos = StackPos[ RES_CHRATR_HIDDEN ];
- const SwTxtAttr* pTopAt = aAttrStack[ nStackPos ].Top();
+ const SwTextAttr* pTopAt = aAttrStack[ nStackPos ].Top();
const SfxPoolItem* pTmpItem = pTopAt ?
- CharFmt::GetItem( *pTopAt, RES_CHRATR_HIDDEN ) :
+ CharFormat::GetItem( *pTopAt, RES_CHRATR_HIDDEN ) :
pDefaultArray[ nStackPos ];
if( (mpShell && !mpShell->GetWin()) ||
@@ -814,11 +814,11 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
const sal_uInt16 nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
bool bTwoLineAct = false;
- const SwTxtAttr* pTwoLineAttr = aAttrStack[ nTwoLineStack ].Top();
+ const SwTextAttr* pTwoLineAttr = aAttrStack[ nTwoLineStack ].Top();
if ( pTwoLineAttr )
{
- const SfxPoolItem* pTwoLineItem = CharFmt::GetItem( *pTwoLineAttr, RES_CHRATR_TWO_LINES );
+ const SfxPoolItem* pTwoLineItem = CharFormat::GetItem( *pTwoLineAttr, RES_CHRATR_TWO_LINES );
bTwoLineAct = static_cast<const SvxTwoLinesItem*>(pTwoLineItem)->GetValue();
}
else
@@ -851,11 +851,11 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
break;
const sal_uInt16 nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
- const SwTxtAttr* pRotateAttr = aAttrStack[ nRotateStack ].Top();
+ const SwTextAttr* pRotateAttr = aAttrStack[ nRotateStack ].Top();
if ( pRotateAttr )
{
- const SfxPoolItem* pRotateItem = CharFmt::GetItem( *pRotateAttr, RES_CHRATR_ROTATE );
+ const SfxPoolItem* pRotateItem = CharFormat::GetItem( *pRotateAttr, RES_CHRATR_ROTATE );
rFnt.SetVertical( static_cast<const SvxCharRotateItem*>(pRotateItem)->GetValue(),
bVertLayout );
}
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index 8bdd175f98d7..db06123d6809 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -116,7 +116,7 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void)
}
void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor,
- const SwTxtFrm *pTxtFrm, sal_uInt16 nDir )
+ const SwTextFrm *pTextFrm, sal_uInt16 nDir )
{
SwBlinkPortion *pBlinkPor = new SwBlinkPortion( pPor, nDir );
@@ -129,9 +129,9 @@ void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor,
else
{
pBlinkPor->SetPos( rPoint );
- pBlinkPor->SetRootFrm( pTxtFrm->getRootFrm() );
+ pBlinkPor->SetRootFrm( pTextFrm->getRootFrm() );
aList.insert( pBlinkPor );
- pTxtFrm->SetBlinkPor();
+ pTextFrm->SetBlinkPor();
if( pPor->IsLayPortion() || pPor->IsParaPortion() )
const_cast<SwLineLayout*>(static_cast<const SwLineLayout*>(pPor))->SetBlinking();
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 324a3b3b082a..51abdd35146f 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -55,18 +55,18 @@ using namespace ::com::sun::star;
* - RightMargin abstains from adjusting position with -1
* - GetCharRect returns a GetEndCharRect for MV_RIGHTMARGIN
* - GetEndCharRect sets bRightMargin to true
- * - SwTxtCursor::bRightMargin is set to false by CharCrsrToLine
+ * - SwTextCursor::bRightMargin is set to false by CharCrsrToLine
*/
namespace
{
-SwTxtFrm *GetAdjFrmAtPos( SwTxtFrm *pFrm, const SwPosition &rPos,
+SwTextFrm *GetAdjFrmAtPos( SwTextFrm *pFrm, const SwPosition &rPos,
const bool bRightMargin, const bool bNoScroll = true )
{
// RightMargin in the last master line
const sal_Int32 nOffset = rPos.nContent.GetIndex();
- SwTxtFrm *pFrmAtPos = pFrm;
+ SwTextFrm *pFrmAtPos = pFrm;
if( !bNoScroll || pFrm->GetFollow() )
{
pFrmAtPos = pFrm->GetFrmAtPos( rPos );
@@ -103,7 +103,7 @@ SwTxtFrm *GetAdjFrmAtPos( SwTxtFrm *pFrm, const SwPosition &rPos,
}
-bool sw_ChangeOffset( SwTxtFrm* pFrm, sal_Int32 nNew )
+bool sw_ChangeOffset( SwTextFrm* pFrm, sal_Int32 nNew )
{
// Do not scroll in areas and outside of flies
OSL_ENSURE( !pFrm->IsFollow(), "Illegal Scrolling by Follow!" );
@@ -138,17 +138,17 @@ bool sw_ChangeOffset( SwTxtFrm* pFrm, sal_Int32 nNew )
return false;
}
-SwTxtFrm& SwTxtFrm::GetFrmAtOfst( const sal_Int32 nWhere )
+SwTextFrm& SwTextFrm::GetFrmAtOfst( const sal_Int32 nWhere )
{
- SwTxtFrm* pRet = this;
+ SwTextFrm* pRet = this;
while( pRet->HasFollow() && nWhere >= pRet->GetFollow()->GetOfst() )
pRet = pRet->GetFollow();
return *pRet;
}
-SwTxtFrm *SwTxtFrm::GetFrmAtPos( const SwPosition &rPos )
+SwTextFrm *SwTextFrm::GetFrmAtPos( const SwPosition &rPos )
{
- SwTxtFrm *pFoll = this;
+ SwTextFrm *pFoll = this;
while( pFoll->GetFollow() )
{
if( rPos.nContent.GetIndex() > pFoll->GetFollow()->GetOfst() )
@@ -156,7 +156,7 @@ SwTxtFrm *SwTxtFrm::GetFrmAtPos( const SwPosition &rPos )
else
{
if( rPos.nContent.GetIndex() == pFoll->GetFollow()->GetOfst()
- && !SwTxtCursor::IsRightMargin() )
+ && !SwTextCursor::IsRightMargin() )
pFoll = pFoll->GetFollow();
else
break;
@@ -172,10 +172,10 @@ SwTxtFrm *SwTxtFrm::GetFrmAtPos( const SwPosition &rPos )
* Both are virtual in the frame base class and thus are redefined here.
*/
-bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
+bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
SwCrsrMoveState *pCMS ) const
{
- OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::GetCharRect with swapped frame" );
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrm::GetCharRect with swapped frame" );
if( IsLocked() || IsHiddenNow() )
return false;
@@ -189,7 +189,7 @@ bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
// Optimisation: reading ahead saves us a GetAdjFrmAtPos
const bool bRightMargin = pCMS && ( MV_RIGHTMARGIN == pCMS->eState );
const bool bNoScroll = pCMS && pCMS->bNoScroll;
- SwTxtFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTxtFrm*>(this), rPos, bRightMargin,
+ SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), rPos, bRightMargin,
bNoScroll );
pFrm->GetFormatted();
const SwFrm* pTmpFrm = (SwFrm*)pFrm->GetUpper();
@@ -208,9 +208,9 @@ bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() )
{
Point aPnt1 = pFrm->Frm().Pos() + pFrm->Prt().Pos();
- SwTxtNode* pTxtNd = const_cast<SwTxtFrm*>(this)->GetTxtNode();
+ SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode();
short nFirstOffset;
- pTxtNd->GetFirstLineOfsWithNum( nFirstOffset );
+ pTextNd->GetFirstLineOfsWithNum( nFirstOffset );
Point aPnt2;
if ( bVert )
@@ -266,8 +266,8 @@ bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
do
{
{
- SwTxtSizeInfo aInf( pFrm );
- SwTxtCursor aLine( pFrm, &aInf );
+ SwTextSizeInfo aInf( pFrm );
+ SwTextCursor aLine( pFrm, &aInf );
nNextOfst = aLine.GetEnd();
// See comment in AdjustFrm
// Include the line's last char?
@@ -285,7 +285,7 @@ bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
(rOrig.*fnRect->fnGetBottom)() == nUpperMaxY &&
pFrm->GetOfst() < nOffset &&
!pFrm->IsFollow() && !bNoScroll &&
- pFrm->GetTxtNode()->GetTxt().getLength() != nNextOfst)
+ pFrm->GetTextNode()->GetText().getLength() != nNextOfst)
{
bGoOn = sw_ChangeOffset( pFrm, nNextOfst );
}
@@ -353,13 +353,13 @@ bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
* and is used by the auto-positioned frame.
*/
-bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
+bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
{
if( IsHiddenNow() )
return false;
const sal_Int32 nOffset = rPos.nContent.GetIndex();
- SwTxtFrm* pFrm = &(const_cast<SwTxtFrm*>(this)->GetFrmAtOfst( nOffset ));
+ SwTextFrm* pFrm = &(const_cast<SwTextFrm*>(this)->GetFrmAtOfst( nOffset ));
pFrm->GetFormatted();
const SwFrm* pTmpFrm = (SwFrm*)pFrm->GetUpper();
@@ -413,8 +413,8 @@ bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
if ( bVert )
nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY );
- SwTxtSizeInfo aInf( pFrm );
- SwTxtCursor aLine( pFrm, &aInf );
+ SwTextSizeInfo aInf( pFrm );
+ SwTextCursor aLine( pFrm, &aInf );
SwCrsrMoveState aTmpState( MV_SETONLYTEXT );
aTmpState.bRealHeight = true;
if( aLine.GetCharRect( &rOrig, nOffset, &aTmpState, nMaxY ) )
@@ -443,7 +443,7 @@ bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
- If a proportional line spacing is applied use top of anchor character as
top of the line.
*/
-bool SwTxtFrm::GetTopOfLine( SwTwips& _onTopOfLine,
+bool SwTextFrm::GetTopOfLine( SwTwips& _onTopOfLine,
const SwPosition& _rPos ) const
{
bool bRet = true;
@@ -451,7 +451,7 @@ bool SwTxtFrm::GetTopOfLine( SwTwips& _onTopOfLine,
// get position offset
const sal_Int32 nOffset = _rPos.nContent.GetIndex();
- if ( GetTxt().getLength() < nOffset )
+ if ( GetText().getLength() < nOffset )
{
bRet = false;
}
@@ -467,7 +467,7 @@ bool SwTxtFrm::GetTopOfLine( SwTwips& _onTopOfLine,
else
{
// determine formatted text frame that contains the requested position
- SwTxtFrm* pFrm = &(const_cast<SwTxtFrm*>(this)->GetFrmAtOfst( nOffset ));
+ SwTextFrm* pFrm = &(const_cast<SwTextFrm*>(this)->GetFrmAtOfst( nOffset ));
pFrm->GetFormatted();
SWREFRESHFN( pFrm )
// If proportional line spacing is applied
@@ -492,8 +492,8 @@ bool SwTxtFrm::GetTopOfLine( SwTwips& _onTopOfLine,
// assure that text frame is in a horizontal layout
SwFrmSwapper aSwapper( pFrm, true );
// determine text line that contains the requested position
- SwTxtSizeInfo aInf( pFrm );
- SwTxtCursor aLine( pFrm, &aInf );
+ SwTextSizeInfo aInf( pFrm );
+ SwTextCursor aLine( pFrm, &aInf );
aLine.CharCrsrToLine( nOffset );
// determine top of line
_onTopOfLine = aLine.Y();
@@ -538,7 +538,7 @@ struct SwFillData
void SetOrient( const sal_Int16 eNew ){ pCMS->pFill->eOrient = eNew; }
};
-bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
+bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
const bool bChgFrm, SwCrsrMoveState* pCMS ) const
{
// _GetCrsrOfst is called by GetCrsrOfst and GetKeyCrsrOfst.
@@ -547,14 +547,14 @@ bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
if( IsLocked() || IsHiddenNow() )
return false;
- const_cast<SwTxtFrm*>(this)->GetFormatted();
+ const_cast<SwTextFrm*>(this)->GetFormatted();
Point aOldPoint( rPoint );
if ( IsVertical() )
{
SwitchVerticalToHorizontal( (Point&)rPoint );
- const_cast<SwTxtFrm*>(this)->SwapWidthAndHeight();
+ const_cast<SwTextFrm*>(this)->SwapWidthAndHeight();
}
if ( IsRightToLeft() )
@@ -565,9 +565,9 @@ bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
if ( IsEmpty() )
{
- SwTxtNode* pTxtNd = const_cast<SwTxtFrm*>(this)->GetTxtNode();
- pPos->nNode = *pTxtNd;
- pPos->nContent.Assign( pTxtNd, 0 );
+ SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode();
+ pPos->nNode = *pTextNd;
+ pPos->nContent.Assign( pTextNd, 0 );
if( pCMS && pCMS->bFieldInfo )
{
SwTwips nDiff = rPoint.X() - Frm().Left() - Prt().Left();
@@ -577,8 +577,8 @@ bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
}
else
{
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(this) );
- SwTxtCursor aLine( const_cast<SwTxtFrm*>(this), &aInf );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) );
+ SwTextCursor aLine( const_cast<SwTextFrm*>(this), &aInf );
// See comment in AdjustFrm()
SwTwips nMaxY = Frm().Top() + Prt().Top() + Prt().Height();
@@ -601,21 +601,21 @@ bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
// pPos is a pure IN parameter and must not be evaluated.
// pIter->GetCrsrOfst returns from a nesting with COMPLETE_STRING.
- // If SwTxtIter::GetCrsrOfst calls GetCrsrOfst further by itself
+ // If SwTextIter::GetCrsrOfst calls GetCrsrOfst further by itself
// nNode changes the position.
// In such cases, pPos must not be calculated.
if( COMPLETE_STRING != nOffset )
{
- SwTxtNode* pTxtNd = const_cast<SwTxtFrm*>(this)->GetTxtNode();
- pPos->nNode = *pTxtNd;
- pPos->nContent.Assign( pTxtNd, nOffset );
+ SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode();
+ pPos->nNode = *pTextNd;
+ pPos->nContent.Assign( pTextNd, nOffset );
if( pFillData )
{
- if (pTxtNd->GetTxt().getLength() > nOffset ||
+ if (pTextNd->GetText().getLength() > nOffset ||
rPoint.Y() < Frm().Top() )
pFillData->bInner = true;
pFillData->bFirstLine = aLine.GetLineNr() < 2;
- if (pTxtNd->GetTxt().getLength())
+ if (pTextNd->GetText().getLength())
{
pFillData->bEmpty = false;
pFillData->nLineWidth = aLine.GetCurr()->Width();
@@ -634,7 +634,7 @@ bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
{
if ( bChgFillData )
SwitchHorizontalToVertical( pFillData->Fill().aCrsr.Pos() );
- const_cast<SwTxtFrm*>(this)->SwapWidthAndHeight();
+ const_cast<SwTextFrm*>(this)->SwapWidthAndHeight();
}
if ( IsRightToLeft() && bChgFillData )
@@ -654,7 +654,7 @@ bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
return true;
}
-bool SwTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& rPoint,
+bool SwTextFrm::GetCrsrOfst(SwPosition* pPos, Point& rPoint,
SwCrsrMoveState* pCMS, bool ) const
{
const bool bChgFrm = !(pCMS && MV_UPDOWN == pCMS->eState);
@@ -665,21 +665,21 @@ bool SwTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& rPoint,
* Layout-oriented cursor movement to the line start.
*/
-bool SwTxtFrm::LeftMargin(SwPaM *pPam) const
+bool SwTextFrm::LeftMargin(SwPaM *pPam) const
{
if( &pPam->GetNode() != GetNode() )
- pPam->GetPoint()->nNode = *const_cast<SwTxtFrm*>(this)->GetTxtNode();
+ pPam->GetPoint()->nNode = *const_cast<SwTextFrm*>(this)->GetTextNode();
- SwTxtFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTxtFrm*>(this), *pPam->GetPoint(),
- SwTxtCursor::IsRightMargin() );
+ SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), *pPam->GetPoint(),
+ SwTextCursor::IsRightMargin() );
pFrm->GetFormatted();
sal_Int32 nIndx;
if ( pFrm->IsEmpty() )
nIndx = 0;
else
{
- SwTxtSizeInfo aInf( pFrm );
- SwTxtCursor aLine( pFrm, &aInf );
+ SwTextSizeInfo aInf( pFrm );
+ SwTextCursor aLine( pFrm, &aInf );
aLine.CharCrsrToLine(pPam->GetPoint()->nContent.GetIndex());
nIndx = aLine.GetStart();
@@ -689,8 +689,8 @@ bool SwTxtFrm::LeftMargin(SwPaM *pPam) const
nIndx = 0;
}
}
- pPam->GetPoint()->nContent = SwIndex( pFrm->GetTxtNode(), nIndx );
- SwTxtCursor::SetRightMargin( false );
+ pPam->GetPoint()->nContent = SwIndex( pFrm->GetTextNode(), nIndx );
+ SwTextCursor::SetRightMargin( false );
return true;
}
@@ -700,38 +700,38 @@ bool SwTxtFrm::LeftMargin(SwPaM *pPam) const
* the last char in order to append text.
*/
-bool SwTxtFrm::RightMargin(SwPaM *pPam, bool bAPI) const
+bool SwTextFrm::RightMargin(SwPaM *pPam, bool bAPI) const
{
if( &pPam->GetNode() != GetNode() )
- pPam->GetPoint()->nNode = *const_cast<SwTxtFrm*>(this)->GetTxtNode();
+ pPam->GetPoint()->nNode = *const_cast<SwTextFrm*>(this)->GetTextNode();
- SwTxtFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTxtFrm*>(this), *pPam->GetPoint(),
- SwTxtCursor::IsRightMargin() );
+ SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), *pPam->GetPoint(),
+ SwTextCursor::IsRightMargin() );
pFrm->GetFormatted();
sal_Int32 nRightMargin;
if ( IsEmpty() )
nRightMargin = 0;
else
{
- SwTxtSizeInfo aInf( pFrm );
- SwTxtCursor aLine( pFrm, &aInf );
+ SwTextSizeInfo aInf( pFrm );
+ SwTextCursor aLine( pFrm, &aInf );
aLine.CharCrsrToLine(pPam->GetPoint()->nContent.GetIndex());
nRightMargin = aLine.GetStart() + aLine.GetCurr()->GetLen();
// We skip hard line brakes
if( aLine.GetCurr()->GetLen() &&
- CH_BREAK == aInf.GetTxt()[nRightMargin - 1])
+ CH_BREAK == aInf.GetText()[nRightMargin - 1])
--nRightMargin;
else if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) )
{
while( nRightMargin > aLine.GetStart() &&
- ' ' == aInf.GetTxt()[nRightMargin - 1])
+ ' ' == aInf.GetText()[nRightMargin - 1])
--nRightMargin;
}
}
- pPam->GetPoint()->nContent = SwIndex( pFrm->GetTxtNode(), nRightMargin );
- SwTxtCursor::SetRightMargin( !bAPI );
+ pPam->GetPoint()->nContent = SwIndex( pFrm->GetTextNode(), nRightMargin );
+ SwTextCursor::SetRightMargin( !bAPI );
return true;
}
@@ -745,11 +745,11 @@ class SwSetToRightMargin
bool bRight;
public:
inline SwSetToRightMargin() : bRight( false ) { }
- inline ~SwSetToRightMargin() { SwTxtCursor::SetRightMargin( bRight ); }
+ inline ~SwSetToRightMargin() { SwTextCursor::SetRightMargin( bRight ); }
inline void SetRight( const bool bNew ) { bRight = bNew; }
};
-bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
+bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
bool bSetInReadOnly ) const
{
// Set the RightMargin if needed
@@ -761,10 +761,10 @@ bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
{
// If the PaM is located within different boxes, we have a table selection,
// which is handled by the base class.
- return SwCntntFrm::UnitUp( pPam, nOffset, bSetInReadOnly );
+ return SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly );
}
- const_cast<SwTxtFrm*>(this)->GetFormatted();
+ const_cast<SwTextFrm*>(this)->GetFormatted();
const sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex();
SwRect aCharBox;
@@ -774,10 +774,10 @@ bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
do
{
if( nFormat != COMPLETE_STRING && !IsFollow() )
- sw_ChangeOffset( const_cast<SwTxtFrm*>(this), nFormat );
+ sw_ChangeOffset( const_cast<SwTextFrm*>(this), nFormat );
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(this) );
- SwTxtCursor aLine( const_cast<SwTxtFrm*>(this), &aInf );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) );
+ SwTextCursor aLine( const_cast<SwTextFrm*>(this), &aInf );
// Optimize away flys with no flow and IsDummy()
if( nPos )
@@ -821,7 +821,7 @@ bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
aCharBox.SSize().Width() /= 2;
aCharBox.Pos().X() = aCharBox.Pos().X() - 150;
- // See comment in SwTxtFrm::GetCrsrOfst()
+ // See comment in SwTextFrm::GetCrsrOfst()
#if OSL_DEBUG_LEVEL > 0
const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
@@ -830,7 +830,7 @@ bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
aCharBox.Pos(), false );
#if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
- "SwTxtFrm::UnitUp: illegal node change" );
+ "SwTextFrm::UnitUp: illegal node change" );
#endif
// We make sure that we move up.
@@ -840,7 +840,7 @@ bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
aSet.SetRight( true );
}
pPam->GetPoint()->nContent =
- SwIndex( const_cast<SwTxtFrm*>(this)->GetTxtNode(), nTmpOfst );
+ SwIndex( const_cast<SwTextFrm*>(this)->GetTextNode(), nTmpOfst );
return true;
}
@@ -858,13 +858,13 @@ bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
*/
if ( IsFollow() )
{
- const SwTxtFrm *pTmpPrev = FindMaster();
+ const SwTextFrm *pTmpPrev = FindMaster();
sal_Int32 nOffs = GetOfst();
if( pTmpPrev )
{
SwViewShell *pSh = getRootFrm()->GetCurrShell();
const bool bProtectedAllowed = pSh && pSh->GetViewOptions()->IsCursorInProtectedArea();
- const SwTxtFrm *pPrevPrev = pTmpPrev;
+ const SwTextFrm *pPrevPrev = pTmpPrev;
// We skip protected frames and frames without content here
while( pPrevPrev && ( pPrevPrev->GetOfst() == nOffs ||
( !bProtectedAllowed && pPrevPrev->IsProtected() ) ) )
@@ -877,12 +877,12 @@ bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
pPrevPrev = NULL;
}
if ( !pPrevPrev )
- return pTmpPrev->SwCntntFrm::UnitUp( pPam, nOffset, bSetInReadOnly );
+ return pTmpPrev->SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly );
aCharBox.Pos().Y() = pPrevPrev->Frm().Bottom() - 1;
return pPrevPrev->GetKeyCrsrOfst( pPam->GetPoint(), aCharBox.Pos() );
}
}
- return SwCntntFrm::UnitUp( pPam, nOffset, bSetInReadOnly );
+ return SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly );
}
// Used for Bidi. nPos is the logical position in the string, bLeft indicates
@@ -1035,7 +1035,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI
}
}
-void SwTxtFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
+void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
bool& bForward, bool bInsertCrsr )
{
if( IsEmpty() || IsHiddenNow() )
@@ -1043,8 +1043,8 @@ void SwTxtFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
GetFormatted();
- SwTxtSizeInfo aInf(this);
- SwTxtCursor aLine(this, &aInf);
+ SwTextSizeInfo aInf(this);
+ SwTextCursor aLine(this, &aInf);
if( nPos )
aLine.CharCrsrToLine( nPos );
@@ -1077,7 +1077,7 @@ void SwTxtFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
// Bidi functions from icu 2.0
- const sal_Unicode* pLineString = GetTxtNode()->GetTxt().getStr();
+ const sal_Unicode* pLineString = GetTextNode()->GetText().getStr();
UErrorCode nError = U_ZERO_ERROR;
UBiDi* pBidi = ubidi_openSized( nLen, 0, &nError );
@@ -1138,7 +1138,7 @@ void SwTxtFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
ubidi_close( pBidi );
}
-bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
+bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
bool bSetInReadOnly ) const
{
@@ -1148,15 +1148,15 @@ bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
{
// If the PaM is located within different boxes, we have a table selection,
// which is handled by the base class.
- return SwCntntFrm::UnitDown( pPam, nOffset, bSetInReadOnly );
+ return SwContentFrm::UnitDown( pPam, nOffset, bSetInReadOnly );
}
- const_cast<SwTxtFrm*>(this)->GetFormatted();
+ const_cast<SwTextFrm*>(this)->GetFormatted();
const sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex();
SwRect aCharBox;
- const SwCntntFrm *pTmpFollow = 0;
+ const SwContentFrm *pTmpFollow = 0;
if ( IsVertical() )
- const_cast<SwTxtFrm*>(this)->SwapWidthAndHeight();
+ const_cast<SwTextFrm*>(this)->SwapWidthAndHeight();
if ( !IsEmpty() && !IsHiddenNow() )
{
@@ -1164,11 +1164,11 @@ bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
do
{
if( nFormat != COMPLETE_STRING && !IsFollow() &&
- !sw_ChangeOffset( const_cast<SwTxtFrm*>(this), nFormat ) )
+ !sw_ChangeOffset( const_cast<SwTextFrm*>(this), nFormat ) )
break;
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(this) );
- SwTxtCursor aLine( const_cast<SwTxtFrm*>(this), &aInf );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) );
+ SwTextCursor aLine( const_cast<SwTextFrm*>(this), &aInf );
nFormat = aLine.GetEnd();
aLine.CharCrsrToLine( nPos );
@@ -1183,7 +1183,7 @@ bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
{
aCharBox.SSize().Width() /= 2;
#if OSL_DEBUG_LEVEL > 0
- // See comment in SwTxtFrm::GetCrsrOfst()
+ // See comment in SwTextFrm::GetCrsrOfst()
const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
if ( pNextLine && ! bFirstOfDouble )
@@ -1193,23 +1193,23 @@ bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
aCharBox.Pos(), false );
#if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
- "SwTxtFrm::UnitDown: illegal node change" );
+ "SwTextFrm::UnitDown: illegal node change" );
#endif
// We make sure that we move down.
if( nTmpOfst <= nStart && ! bFirstOfDouble )
nTmpOfst = nStart + 1;
pPam->GetPoint()->nContent =
- SwIndex( const_cast<SwTxtFrm*>(this)->GetTxtNode(), nTmpOfst );
+ SwIndex( const_cast<SwTextFrm*>(this)->GetTextNode(), nTmpOfst );
if ( IsVertical() )
- const_cast<SwTxtFrm*>(this)->SwapWidthAndHeight();
+ const_cast<SwTextFrm*>(this)->SwapWidthAndHeight();
return true;
}
if( 0 != ( pTmpFollow = GetFollow() ) )
{ // Skip protected follows
- const SwCntntFrm* pTmp = pTmpFollow;
+ const SwContentFrm* pTmp = pTmpFollow;
SwViewShell *pSh = getRootFrm()->GetCurrShell();
if( !pSh || !pSh->GetViewOptions()->IsCursorInProtectedArea() )
{
@@ -1222,8 +1222,8 @@ bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
if( !pTmpFollow ) // Only protected ones left
{
if ( IsVertical() )
- const_cast<SwTxtFrm*>(this)->SwapWidthAndHeight();
- return pTmp->SwCntntFrm::UnitDown( pPam, nOffset, bSetInReadOnly );
+ const_cast<SwTextFrm*>(this)->SwapWidthAndHeight();
+ return pTmp->SwContentFrm::UnitDown( pPam, nOffset, bSetInReadOnly );
}
aLine.GetCharRect( &aCharBox, nPos );
@@ -1231,7 +1231,7 @@ bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
}
else if( !IsFollow() )
{
- sal_Int32 nTmpLen = aInf.GetTxt().getLength();
+ sal_Int32 nTmpLen = aInf.GetText().getLength();
if( aLine.GetEnd() < nTmpLen )
{
if( nFormat <= GetOfst() )
@@ -1251,48 +1251,48 @@ bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
pTmpFollow = GetFollow();
if ( IsVertical() )
- const_cast<SwTxtFrm*>(this)->SwapWidthAndHeight();
+ const_cast<SwTextFrm*>(this)->SwapWidthAndHeight();
// We take a shortcut for follows
if( pTmpFollow )
{
aCharBox.Pos().Y() = pTmpFollow->Frm().Top() + 1;
- return static_cast<const SwTxtFrm*>(pTmpFollow)->GetKeyCrsrOfst( pPam->GetPoint(),
+ return static_cast<const SwTextFrm*>(pTmpFollow)->GetKeyCrsrOfst( pPam->GetPoint(),
aCharBox.Pos() );
}
- return SwCntntFrm::UnitDown( pPam, nOffset, bSetInReadOnly );
+ return SwContentFrm::UnitDown( pPam, nOffset, bSetInReadOnly );
}
-bool SwTxtFrm::UnitUp(SwPaM *pPam, const SwTwips nOffset,
+bool SwTextFrm::UnitUp(SwPaM *pPam, const SwTwips nOffset,
bool bSetInReadOnly ) const
{
- /* We call CntntNode::GertFrm() in CrsrSh::Up().
+ /* We call ContentNode::GertFrm() in CrsrSh::Up().
* This _always returns the master.
* In order to not mess with cursor travelling, we correct here
- * in SwTxtFrm.
+ * in SwTextFrm.
* We calculate UnitUp for pFrm. pFrm is either a master (= this) or a
* follow (!= this).
*/
- const SwTxtFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTxtFrm*>(this), *(pPam->GetPoint()),
- SwTxtCursor::IsRightMargin() );
+ const SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), *(pPam->GetPoint()),
+ SwTextCursor::IsRightMargin() );
const bool bRet = pFrm->_UnitUp( pPam, nOffset, bSetInReadOnly );
- // No SwTxtCursor::SetRightMargin( false );
+ // No SwTextCursor::SetRightMargin( false );
// Instead we have a SwSetToRightMargin in _UnitUp
return bRet;
}
-bool SwTxtFrm::UnitDown(SwPaM *pPam, const SwTwips nOffset,
+bool SwTextFrm::UnitDown(SwPaM *pPam, const SwTwips nOffset,
bool bSetInReadOnly ) const
{
- const SwTxtFrm *pFrm = GetAdjFrmAtPos(const_cast<SwTxtFrm*>(this), *(pPam->GetPoint()),
- SwTxtCursor::IsRightMargin() );
+ const SwTextFrm *pFrm = GetAdjFrmAtPos(const_cast<SwTextFrm*>(this), *(pPam->GetPoint()),
+ SwTextCursor::IsRightMargin() );
const bool bRet = pFrm->_UnitDown( pPam, nOffset, bSetInReadOnly );
- SwTxtCursor::SetRightMargin( false );
+ SwTextCursor::SetRightMargin( false );
return bRet;
}
-void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
+void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const
{
if( !rFill.bColumn && GetUpper()->IsColBodyFrm() ) // ColumnFrms now with BodyFrm
{
@@ -1329,16 +1329,16 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
}
// No filling, if the last frame in the targeted column does
// not contain a paragraph, but e.g. a table
- if( pFrm->IsTxtFrm() )
+ if( pFrm->IsTextFrm() )
{
rFill.Fill().nColumnCnt = nNextCol;
rFill.bColumn = true;
if( rFill.pPos )
{
- SwTxtNode* pTxtNd = const_cast<SwTxtFrm*>(static_cast<const SwTxtFrm*>(pFrm))->GetTxtNode();
- rFill.pPos->nNode = *pTxtNd;
+ SwTextNode* pTextNd = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pFrm))->GetTextNode();
+ rFill.pPos->nNode = *pTextNd;
rFill.pPos->nContent.Assign(
- pTxtNd, pTxtNd->GetTxt().getLength());
+ pTextNd, pTextNd->GetText().getLength());
}
if( nNextCol )
{
@@ -1347,25 +1347,25 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
}
else
rFill.aFrm = pFrm->Frm();
- static_cast<const SwTxtFrm*>(pFrm)->FillCrsrPos( rFill );
+ static_cast<const SwTextFrm*>(pFrm)->FillCrsrPos( rFill );
}
return;
}
}
SwFont *pFnt;
- SwTxtFmtColl* pColl = GetTxtNode()->GetTxtColl();
- SwTwips nFirst = GetTxtNode()->GetSwAttrSet().GetULSpace().GetLower();
+ SwTextFormatColl* pColl = GetTextNode()->GetTextColl();
+ SwTwips nFirst = GetTextNode()->GetSwAttrSet().GetULSpace().GetLower();
SwTwips nDiff = rFill.Y() - Frm().Bottom();
if( nDiff < nFirst )
nDiff = -1;
else
- pColl = &pColl->GetNextTxtFmtColl();
- SwAttrSet aSet( const_cast<SwDoc*>(GetTxtNode()->GetDoc())->GetAttrPool(), aTxtFmtCollSetRange );
+ pColl = &pColl->GetNextTextFormatColl();
+ SwAttrSet aSet( const_cast<SwDoc*>(GetTextNode()->GetDoc())->GetAttrPool(), aTextFormatCollSetRange );
const SwAttrSet* pSet = &pColl->GetAttrSet();
SwViewShell *pSh = getRootFrm()->GetCurrShell();
- if( GetTxtNode()->HasSwAttrSet() )
+ if( GetTextNode()->HasSwAttrSet() )
{
- aSet.Put( *GetTxtNode()->GetpSwAttrSet() );
+ aSet.Put( *GetTextNode()->GetpSwAttrSet() );
aSet.SetParent( pSet );
pSet = &aSet;
pFnt = new SwFont( pSet, GetNode()->getIDocumentSettingAccess() );
@@ -1378,7 +1378,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
}
OutputDevice* pOut = pSh->GetOut();
if( !pSh->GetViewOptions()->getBrowseMode() || pSh->GetViewOptions()->IsPrtFormat() )
- pOut = GetTxtNode()->getIDocumentDeviceAccess()->getReferenceDevice( true );
+ pOut = GetTextNode()->getIDocumentDeviceAccess()->getReferenceDevice( true );
pFnt->SetFntChg( true );
pFnt->ChgPhysFnt( pSh, *pOut );
@@ -1429,7 +1429,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
rRect.Top( rRect.Top() + nFirst );
rRect.Height( nLineHeight );
SwTwips nLeft = rFill.Left() + rLRSpace.GetLeft() +
- GetTxtNode()->GetLeftMarginWithNum();
+ GetTextNode()->GetLeftMarginWithNum();
SwTwips nRight = rFill.Right() - rLRSpace.GetRight();
SwTwips nCenter = ( nLeft + nRight ) / 2;
rRect.Left( nLeft );
@@ -1467,7 +1467,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
{
const OUString aTmp(" ");
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTmp, 0, 2 );
- nSpace = pFnt->_GetTxtSize( aDrawInf ).Width()/2;
+ nSpace = pFnt->_GetTextSize( aDrawInf ).Width()/2;
}
if( rFill.X() >= nRight )
{
@@ -1501,9 +1501,9 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
}
else if( rFill.X() > nLeft )
{
- SwTwips nTxtLeft = rFill.Left() + rLRSpace.GetTxtLeft() +
- GetTxtNode()->GetLeftMarginWithNum( true );
- rFill.nLineWidth += rFill.bFirstLine ? nLeft : nTxtLeft;
+ SwTwips nTextLeft = rFill.Left() + rLRSpace.GetTextLeft() +
+ GetTextNode()->GetLeftMarginWithNum( true );
+ rFill.nLineWidth += rFill.bFirstLine ? nLeft : nTextLeft;
SwTwips nLeftTab = nLeft;
SwTwips nRightTab = nLeft;
sal_uInt16 nSpaceCnt = 0;
@@ -1515,9 +1515,9 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
if( nIdx < rRuler.Count() )
{
const SvxTabStop &rTabStop = rRuler.operator[](nIdx);
- nRightTab = nTxtLeft + rTabStop.GetTabPos();
- if( nLeftTab < nTxtLeft && nRightTab > nTxtLeft )
- nRightTab = nTxtLeft;
+ nRightTab = nTextLeft + rTabStop.GetTabPos();
+ if( nLeftTab < nTextLeft && nRightTab > nTextLeft )
+ nRightTab = nTextLeft;
else
++nIdx;
if( nRightTab > rFill.nLineWidth )
@@ -1529,9 +1529,9 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
static_cast<const SvxTabStopItem &>(pSet->
GetPool()->GetDefaultItem( RES_PARATR_TABSTOP ));
const SwTwips nDefTabDist = rTab[0].GetTabPos();
- nRightTab = nLeftTab - nTxtLeft;
+ nRightTab = nLeftTab - nTextLeft;
nRightTab /= nDefTabDist;
- nRightTab = nRightTab * nDefTabDist + nTxtLeft;
+ nRightTab = nRightTab * nDefTabDist + nTextLeft;
while ( nRightTab <= nLeftTab )
nRightTab += nDefTabDist;
if( nRightTab > rFill.nLineWidth )
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 802a131815ec..cb70ff23c9ce 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -67,7 +67,7 @@ public:
};
sal_uInt16 FormatLevel::nLevel = 0;
-void ValidateTxt( SwFrm *pFrm ) // Friend of frame
+void ValidateText( SwFrm *pFrm ) // Friend of frame
{
if ( ( ! pFrm->IsVertical() &&
pFrm->Frm().Width() == pFrm->GetUpper()->Prt().Width() ) ||
@@ -76,7 +76,7 @@ void ValidateTxt( SwFrm *pFrm ) // Friend of frame
pFrm->mbValidSize = true;
}
-void SwTxtFrm::ValidateFrm()
+void SwTextFrm::ValidateFrm()
{
// Validate surroundings to avoid oscillation
SWAP_IF_SWAPPED( this )
@@ -98,7 +98,7 @@ void SwTxtFrm::ValidateFrm()
if( pSct )
pSct->ColUnlock();
}
- ValidateTxt( this );
+ ValidateText( this );
// We at least have to save the MustFit flag!
OSL_ENSURE( HasPara(), "ResetPreps(), missing ParaPortion." );
@@ -110,7 +110,7 @@ void SwTxtFrm::ValidateFrm()
UNDO_SWAP( this )
}
-// After a RemoveFtn the BodyFrm and all Frms contained within it, need to be
+// After a RemoveFootnote the BodyFrm and all Frms contained within it, need to be
// recalculated, so that the DeadLine is right.
// First we search outwards, on the way back we calculate everything.
void _ValidateBodyFrm( SwFrm *pFrm )
@@ -123,16 +123,16 @@ void _ValidateBodyFrm( SwFrm *pFrm )
pFrm->Calc();
else
{
- const bool bOld = static_cast<SwSectionFrm*>(pFrm)->IsCntntLocked();
- static_cast<SwSectionFrm*>(pFrm)->SetCntntLock( true );
+ const bool bOld = static_cast<SwSectionFrm*>(pFrm)->IsContentLocked();
+ static_cast<SwSectionFrm*>(pFrm)->SetContentLock( true );
pFrm->Calc();
if( !bOld )
- static_cast<SwSectionFrm*>(pFrm)->SetCntntLock( false );
+ static_cast<SwSectionFrm*>(pFrm)->SetContentLock( false );
}
}
}
-void SwTxtFrm::ValidateBodyFrm()
+void SwTextFrm::ValidateBodyFrm()
{
SWAP_IF_SWAPPED( this )
@@ -144,13 +144,13 @@ void SwTxtFrm::ValidateBodyFrm()
UNDO_SWAP( this )
}
-bool SwTxtFrm::_GetDropRect( SwRect &rRect ) const
+bool SwTextFrm::_GetDropRect( SwRect &rRect ) const
{
SWAP_IF_NOT_SWAPPED( this )
- OSL_ENSURE( HasPara(), "SwTxtFrm::_GetDropRect: try again next year." );
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(this) );
- SwTxtMargin aLine( const_cast<SwTxtFrm*>(this), &aInf );
+ OSL_ENSURE( HasPara(), "SwTextFrm::_GetDropRect: try again next year." );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) );
+ SwTextMargin aLine( const_cast<SwTextFrm*>(this), &aInf );
if( aLine.GetDropLines() )
{
rRect.Top( aLine.Y() );
@@ -172,7 +172,7 @@ bool SwTxtFrm::_GetDropRect( SwRect &rRect ) const
return false;
}
-const SwBodyFrm *SwTxtFrm::FindBodyFrm() const
+const SwBodyFrm *SwTextFrm::FindBodyFrm() const
{
if ( IsInDocBody() )
{
@@ -184,19 +184,19 @@ const SwBodyFrm *SwTxtFrm::FindBodyFrm() const
return 0;
}
-bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
+bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst )
{
SWAP_IF_SWAPPED( this )
OSL_ENSURE( HasFollow(), "CalcFollow: missing Follow." );
- SwTxtFrm* pMyFollow = GetFollow();
+ SwTextFrm* pMyFollow = GetFollow();
SwParaPortion *pPara = GetPara();
- const bool bFollowFld = pPara && pPara->IsFollowField();
+ const bool bFollowField = pPara && pPara->IsFollowField();
- if( !pMyFollow->GetOfst() || pMyFollow->GetOfst() != nTxtOfst ||
- bFollowFld || pMyFollow->IsFieldFollow() ||
+ if( !pMyFollow->GetOfst() || pMyFollow->GetOfst() != nTextOfst ||
+ bFollowField || pMyFollow->IsFieldFollow() ||
( pMyFollow->IsVertical() && !pMyFollow->Prt().Width() ) ||
( ! pMyFollow->IsVertical() && !pMyFollow->Prt().Height() ) )
{
@@ -209,17 +209,17 @@ bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
SwTwips nMyPos = (Frm().*fnRect->fnGetTop)();
const SwPageFrm *pPage = 0;
- bool bOldInvaCntnt = true;
+ bool bOldInvaContent = true;
if ( !IsInFly() && GetNext() )
{
pPage = FindPageFrm();
// Minimize = that is set back if needed - for invalidation see below
- bOldInvaCntnt = pPage->IsInvalidCntnt();
+ bOldInvaContent = pPage->IsInvalidContent();
}
- pMyFollow->_SetOfst( nTxtOfst );
- pMyFollow->SetFieldFollow( bFollowFld );
- if( HasFtn() || pMyFollow->HasFtn() )
+ pMyFollow->_SetOfst( nTextOfst );
+ pMyFollow->SetFieldFollow( bFollowField );
+ if( HasFootnote() || pMyFollow->HasFootnote() )
{
ValidateFrm();
ValidateBodyFrm();
@@ -231,10 +231,10 @@ bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
}
// The footnote area must not get larger
- SwSaveFtnHeight aSave( FindFtnBossFrm( true ), LONG_MAX );
+ SwSaveFootnoteHeight aSave( FindFootnoteBossFrm( true ), LONG_MAX );
- pMyFollow->CalcFtnFlag();
- if ( !pMyFollow->GetNext() && !pMyFollow->HasFtn() )
+ pMyFollow->CalcFootnoteFlag();
+ if ( !pMyFollow->GetNext() && !pMyFollow->HasFootnote() )
nOldBottom = bVert ? 0 : LONG_MAX;
while( true )
@@ -285,12 +285,12 @@ bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
pMyFollow->Calc();
// The Follow can tell from its Frm().Height() that something went wrong
- OSL_ENSURE( !pMyFollow->GetPrev(), "SwTxtFrm::CalcFollow: cheesy follow" );
+ OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrm::CalcFollow: cheesy follow" );
if( pMyFollow->GetPrev() )
{
pMyFollow->Prepare( PREP_CLEAR );
pMyFollow->Calc();
- OSL_ENSURE( !pMyFollow->GetPrev(), "SwTxtFrm::CalcFollow: very cheesy follow" );
+ OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrm::CalcFollow: very cheesy follow" );
}
// OD 14.03.2003 #i11760# - reset control flag for follow format.
@@ -310,7 +310,7 @@ bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
break;
}
- if( HasFtn() || pMyFollow->HasFtn() )
+ if( HasFootnote() || pMyFollow->HasFootnote() )
{
ValidateBodyFrm();
ValidateFrm();
@@ -323,12 +323,12 @@ bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
if ( pPage )
{
- if ( !bOldInvaCntnt )
- pPage->ValidateCntnt();
+ if ( !bOldInvaContent )
+ pPage->ValidateContent();
}
#if OSL_DEBUG_LEVEL > 0
- OSL_ENSURE( pOldUp == GetUpper(), "SwTxtFrm::CalcFollow: heavy follow" );
+ OSL_ENSURE( pOldUp == GetUpper(), "SwTextFrm::CalcFollow: heavy follow" );
#endif
const long nRemaining =
@@ -348,7 +348,7 @@ bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
return false;
}
-void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit )
+void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit )
{
if( IsUndersized() )
{
@@ -369,14 +369,14 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit )
SwTwips nChgHeight = nChgHght;
if( nChgHght && !bHasToFit )
{
- if( IsInFtn() && !IsInSct() )
+ if( IsInFootnote() && !IsInSct() )
{
SwTwips nReal = Grow( nChgHght, true );
if( nReal < nChgHght )
{
SwTwips nBot = (*fnRect->fnYInc)( (Frm().*fnRect->fnGetBottom)(),
nChgHght - nReal );
- SwFrm* pCont = FindFtnFrm()->GetUpper();
+ SwFrm* pCont = FindFootnoteFrm()->GetUpper();
if( (pCont->Frm().*fnRect->fnBottomDist)( nBot ) > 0 )
{
@@ -458,7 +458,7 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit )
nRstHeight += nAdd;
}
- // nRstHeight < 0 means that the TxtFrm is located completely outside of its Upper.
+ // nRstHeight < 0 means that the TextFrm is located completely outside of its Upper.
// This can happen, if it's located within a FlyAtCntFrm, which changed sides by a
// Grow(). In such a case, it's wrong to execute the following Grow().
// In the case of a bug, we end up with an infinite loop.
@@ -468,7 +468,7 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit )
if( nRstHeight < nFrmHeight )
{
// It can be that I have the right size, but the Upper is too small and can get me some room
- if( ( nRstHeight >= 0 || ( IsInFtn() && IsInSct() ) ) && !bHasToFit )
+ if( ( nRstHeight >= 0 || ( IsInFootnote() && IsInSct() ) ) && !bHasToFit )
nRstHeight += GetUpper()->Grow( nFrmHeight - nRstHeight );
// In column sections we do not want to get too big or else more areas are created by
// GetNextSctLeaf. Instead, we shrink and remember bUndersized, so that FormatWidthCols
@@ -499,15 +499,15 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit )
UNDO_SWAP( this )
}
-com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwTxtFrm::GetTabStopInfo( SwTwips CurrentPos )
+com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwTextFrm::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() );
+ SwTextFormatInfo aInf( this );
+ SwTextFormatter aLine( this, &aInf );
+ SwTextCursor TextCursor( this, &aInf );
+ const Point aCharPos( TextCursor.GetTopLeft() );
SwTwips nRight = aLine.Right();
CurrentPos -= aCharPos.X();
@@ -539,11 +539,11 @@ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwTxtFrm::GetT
}
// AdjustFollow expects the following situation:
-// The SwTxtIter points to the lower end of the Master, the Offset is set in the Follow.
+// The SwTextIter points to the lower end of the Master, the Offset is set in the Follow.
// nOffset holds the Offset in the text string, from which the Master closes
// and the Follow starts.
// If it's 0, the FollowFrame is deleted.
-void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
+void SwTextFrm::_AdjustFollow( SwTextFormatter &rLine,
const sal_Int32 nOffset, const sal_Int32 nEnd,
const sal_uInt8 nMode )
{
@@ -556,9 +556,9 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
{
while( GetFollow() )
{
- if( static_cast<SwTxtFrm*>(GetFollow())->IsLocked() )
+ if( static_cast<SwTextFrm*>(GetFollow())->IsLocked() )
{
- OSL_FAIL( "+SwTxtFrm::JoinFrm: Follow is locked." );
+ OSL_FAIL( "+SwTextFrm::JoinFrm: Follow is locked." );
return;
}
if (GetFollow()->IsDeleteForbidden())
@@ -572,7 +572,7 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
// Dancing on the volcano: We'll just format the last line quickly
// for the QuoVadis stuff.
// The Offset can move of course:
- const sal_Int32 nNewOfst = ( IsInFtn() && ( !GetIndNext() || HasFollow() ) ) ?
+ const sal_Int32 nNewOfst = ( IsInFootnote() && ( !GetIndNext() || HasFollow() ) ) ?
rLine.FormatQuoVadis(nOffset) : nOffset;
if( !(nMode & 1) )
@@ -601,40 +601,40 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
}
}
-SwCntntFrm *SwTxtFrm::JoinFrm()
+SwContentFrm *SwTextFrm::JoinFrm()
{
- OSL_ENSURE( GetFollow(), "+SwTxtFrm::JoinFrm: no follow" );
- SwTxtFrm *pFoll = GetFollow();
+ OSL_ENSURE( GetFollow(), "+SwTextFrm::JoinFrm: no follow" );
+ SwTextFrm *pFoll = GetFollow();
- SwTxtFrm *pNxt = pFoll->GetFollow();
+ SwTextFrm *pNxt = pFoll->GetFollow();
// All footnotes of the to-be-destroyed Follow are relocated to us
sal_Int32 nStart = pFoll->GetOfst();
- if ( pFoll->HasFtn() )
+ if ( pFoll->HasFootnote() )
{
- const SwpHints *pHints = pFoll->GetTxtNode()->GetpSwpHints();
+ const SwpHints *pHints = pFoll->GetTextNode()->GetpSwpHints();
if( pHints )
{
- SwFtnBossFrm *pFtnBoss = 0;
- SwFtnBossFrm *pEndBoss = 0;
+ SwFootnoteBossFrm *pFootnoteBoss = 0;
+ SwFootnoteBossFrm *pEndBoss = 0;
for ( size_t i = 0; i < pHints->Count(); ++i )
{
- const SwTxtAttr *pHt = (*pHints)[i];
+ const SwTextAttr *pHt = (*pHints)[i];
if( RES_TXTATR_FTN==pHt->Which() && pHt->GetStart()>=nStart )
{
- if( pHt->GetFtn().IsEndNote() )
+ if( pHt->GetFootnote().IsEndNote() )
{
if( !pEndBoss )
- pEndBoss = pFoll->FindFtnBossFrm();
- SwFtnBossFrm::ChangeFtnRef( pFoll, static_cast<const SwTxtFtn*>(pHt), this );
+ pEndBoss = pFoll->FindFootnoteBossFrm();
+ SwFootnoteBossFrm::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this );
}
else
{
- if( !pFtnBoss )
- pFtnBoss = pFoll->FindFtnBossFrm( true );
- SwFtnBossFrm::ChangeFtnRef( pFoll, static_cast<const SwTxtFtn*>(pHt), this );
+ if( !pFootnoteBoss )
+ pFootnoteBoss = pFoll->FindFootnoteBossFrm( true );
+ SwFootnoteBossFrm::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this );
}
- SetFtn( true );
+ SetFootnote( true );
}
}
}
@@ -644,13 +644,13 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
else if ( pFoll->GetValidPrtAreaFlag() ||
pFoll->GetValidSizeFlag() )
{
- pFoll->CalcFtnFlag();
- OSL_ENSURE( !pFoll->HasFtn(), "Missing FtnFlag." );
+ pFoll->CalcFootnoteFlag();
+ OSL_ENSURE( !pFoll->HasFootnote(), "Missing FootnoteFlag." );
}
#endif
pFoll->MoveFlyInCnt( this, nStart, COMPLETE_STRING );
- pFoll->SetFtn( false );
+ pFoll->SetFootnote( false );
// #i27138#
// notify accessibility paragraphs objects about changed CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for current next paragraph will change
@@ -662,7 +662,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
- dynamic_cast<SwTxtFrm*>(pFoll->FindNextCnt( true )),
+ dynamic_cast<SwTextFrm*>(pFoll->FindNextCnt( true )),
this );
}
}
@@ -672,14 +672,14 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
return pNxt;
}
-SwCntntFrm *SwTxtFrm::SplitFrm( const sal_Int32 nTxtPos )
+SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos )
{
SWAP_IF_SWAPPED( this )
// The Paste sends a Modify() to me
// I lock myself, so that my data does not disappear
- TxtFrmLockGuard aLock( this );
- SwTxtFrm *pNew = static_cast<SwTxtFrm *>(GetTxtNode()->MakeFrm( this ));
+ TextFrmLockGuard aLock( this );
+ SwTextFrm *pNew = static_cast<SwTextFrm *>(GetTextNode()->MakeFrm( this ));
pNew->SetFollow( GetFollow() );
SetFollow( pNew );
@@ -696,38 +696,38 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const sal_Int32 nTxtPos )
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
- dynamic_cast<SwTxtFrm*>(pNew->FindNextCnt( true )),
+ dynamic_cast<SwTextFrm*>(pNew->FindNextCnt( true )),
this );
}
}
// If footnotes end up in pNew bz our actions, we need
// to re-register them
- if ( HasFtn() )
+ if ( HasFootnote() )
{
- const SwpHints *pHints = GetTxtNode()->GetpSwpHints();
+ const SwpHints *pHints = GetTextNode()->GetpSwpHints();
if( pHints )
{
- SwFtnBossFrm *pFtnBoss = 0;
- SwFtnBossFrm *pEndBoss = 0;
+ SwFootnoteBossFrm *pFootnoteBoss = 0;
+ SwFootnoteBossFrm *pEndBoss = 0;
for ( size_t i = 0; i < pHints->Count(); ++i )
{
- const SwTxtAttr *pHt = (*pHints)[i];
- if( RES_TXTATR_FTN==pHt->Which() && pHt->GetStart()>=nTxtPos )
+ const SwTextAttr *pHt = (*pHints)[i];
+ if( RES_TXTATR_FTN==pHt->Which() && pHt->GetStart()>=nTextPos )
{
- if( pHt->GetFtn().IsEndNote() )
+ if( pHt->GetFootnote().IsEndNote() )
{
if( !pEndBoss )
- pEndBoss = FindFtnBossFrm();
- SwFtnBossFrm::ChangeFtnRef( this, static_cast<const SwTxtFtn*>(pHt), pNew );
+ pEndBoss = FindFootnoteBossFrm();
+ SwFootnoteBossFrm::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew );
}
else
{
- if( !pFtnBoss )
- pFtnBoss = FindFtnBossFrm( true );
- SwFtnBossFrm::ChangeFtnRef( this, static_cast<const SwTxtFtn*>(pHt), pNew );
+ if( !pFootnoteBoss )
+ pFootnoteBoss = FindFootnoteBossFrm( true );
+ SwFootnoteBossFrm::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew );
}
- pNew->SetFtn( true );
+ pNew->SetFootnote( true );
}
}
}
@@ -736,22 +736,22 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const sal_Int32 nTxtPos )
#ifdef DBG_UTIL
else
{
- CalcFtnFlag( nTxtPos-1 );
- OSL_ENSURE( !HasFtn(), "Missing FtnFlag." );
+ CalcFootnoteFlag( nTextPos-1 );
+ OSL_ENSURE( !HasFootnote(), "Missing FootnoteFlag." );
}
#endif
- MoveFlyInCnt( pNew, nTxtPos, COMPLETE_STRING );
+ MoveFlyInCnt( pNew, nTextPos, COMPLETE_STRING );
// No SetOfst or CalcFollow, because an AdjustFollow follows immediately anyways
- pNew->ManipOfst( nTxtPos );
+ pNew->ManipOfst( nTextPos );
UNDO_SWAP( this )
return pNew;
}
-void SwTxtFrm::_SetOfst( const sal_Int32 nNewOfst )
+void SwTextFrm::_SetOfst( const sal_Int32 nNewOfst )
{
// We do not need to invalidate out Follow.
// We are a Follow, get formatted right away and call
@@ -762,15 +762,15 @@ void SwTxtFrm::_SetOfst( const sal_Int32 nNewOfst )
{
SwCharRange &rReformat = pPara->GetReformat();
rReformat.Start() = 0;
- rReformat.Len() = GetTxt().getLength();
+ rReformat.Len() = GetText().getLength();
pPara->GetDelta() = rReformat.Len();
}
InvalidateSize();
}
-bool SwTxtFrm::CalcPreps()
+bool SwTextFrm::CalcPreps()
{
- OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTxtFrm::CalcPreps with swapped frame" );
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTextFrm::CalcPreps with swapped frame" );
SWRECTFN( this );
SwParaPortion *pPara = GetPara();
@@ -791,7 +791,7 @@ bool SwTxtFrm::CalcPreps()
{
if( !GetFollow() )
{
- OSL_ENSURE( GetFollow(), "+SwTxtFrm::CalcPreps: no credits" );
+ OSL_ENSURE( GetFollow(), "+SwTextFrm::CalcPreps: no credits" );
return false;
}
@@ -828,7 +828,7 @@ bool SwTxtFrm::CalcPreps()
else
{
OSL_ENSURE( nChgHeight < (Prt().*fnRect->fnGetHeight)(),
- "+SwTxtFrm::CalcPrep: want to shrink" );
+ "+SwTextFrm::CalcPrep: want to shrink" );
nChgHeight = (Prt().*fnRect->fnGetHeight)() - nChgHeight;
@@ -853,13 +853,13 @@ bool SwTxtFrm::CalcPreps()
}
else if ( bPrepAdjust )
{
- if ( HasFtn() )
+ if ( HasFootnote() )
{
- if( !CalcPrepFtnAdjust() )
+ if( !CalcPrepFootnoteAdjust() )
{
if( bPrepMustFit )
{
- SwTxtLineAccess aAccess( this );
+ SwTextLineAccess aAccess( this );
aAccess.GetPara()->SetPrepMustFit();
}
return false;
@@ -868,8 +868,8 @@ bool SwTxtFrm::CalcPreps()
SWAP_IF_NOT_SWAPPED( this )
- SwTxtFormatInfo aInf( this );
- SwTxtFormatter aLine( this, &aInf );
+ SwTextFormatInfo aInf( this );
+ SwTextFormatter aLine( this, &aInf );
WidowsAndOrphans aFrmBreak( this );
// Whatever the attributes say: we split the paragraph in
@@ -898,14 +898,14 @@ bool SwTxtFrm::CalcPreps()
// Let's see if it works ...
aLine.TruncLines();
aFrmBreak.SetRstHeight( aLine );
- FormatAdjust( aLine, aFrmBreak, aInf.GetTxt().getLength(), aInf.IsStop() );
+ FormatAdjust( aLine, aFrmBreak, aInf.GetText().getLength(), aInf.IsStop() );
}
else
{
if( !GetFollow() )
{
FormatAdjust( aLine, aFrmBreak,
- aInf.GetTxt().getLength(), aInf.IsStop() );
+ aInf.GetText().getLength(), aInf.IsStop() );
}
else if ( !aFrmBreak.IsKeepAlways() )
{
@@ -956,7 +956,7 @@ bool SwTxtFrm::CalcPreps()
MoveFlyInCnt( pFrm, nNew, COMPLETE_STRING );\
}
-void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
+void SwTextFrm::FormatAdjust( SwTextFormatter &rLine,
WidowsAndOrphans &rFrmBreak,
const sal_Int32 nStrLen,
const bool bDummy )
@@ -970,7 +970,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
const bool bHasToFit = pPara->IsPrepMustFit();
// The StopFlag is set by footnotes which want to go onto the next page
- // Call base class method <SwTxtFrmBreak::IsBreakNow(..)>
+ // Call base class method <SwTextFrmBreak::IsBreakNow(..)>
// instead of method <WidowsAndOrphans::IsBreakNow(..)> to get a break,
// even if due to widow rule no enough lines exists.
sal_uInt8 nNew = ( !GetFollow() &&
@@ -986,7 +986,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
bool bOnlyContainsAsCharAnchoredObj =
!IsFollow() && nStrLen == 1 &&
GetDrawObjs() && GetDrawObjs()->size() == 1 &&
- (*GetDrawObjs())[0]->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR;
+ (*GetDrawObjs())[0]->GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR;
// Still try split text frame if we have columns.
if (FindColFrm())
@@ -1031,7 +1031,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
if( GetFollow() )
{
if( nNew && nOld < nEnd )
- RemoveFtn( nOld, nEnd - nOld );
+ RemoveFootnote( nOld, nEnd - nOld );
CHG_OFFSET( GetFollow(), nEnd )
if( !bDelta )
GetFollow()->ManipOfst( nEnd );
@@ -1050,11 +1050,11 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
// Example of this case: When an empty, but numbered paragraph
// at the end of page is completely displaced by a fly frame.
// Thus, the text frame introduced a follow by a
- // <SwTxtFrm::SplitFrm(..)> - see below. The follow then shows
+ // <SwTextFrm::SplitFrm(..)> - see below. The follow then shows
// the numbering and must stay.
if ( GetFollow()->GetOfst() != nEnd ||
GetFollow()->IsFieldFollow() ||
- ( nStrLen == 0 && GetTxtNode()->GetNumRule() ) )
+ ( nStrLen == 0 && GetTextNode()->GetNumRule() ) )
{
nNew |= 3;
}
@@ -1077,14 +1077,14 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
// as-character anchored object.
if ( !bOnlyContainsAsCharAnchoredObj &&
( nStrLen > 0 ||
- ( nStrLen == 0 && GetTxtNode()->GetNumRule() ) )
+ ( nStrLen == 0 && GetTextNode()->GetNumRule() ) )
)
{
SplitFrm( nEnd );
nNew |= 3;
}
}
- // If the remaining height changed e.g by RemoveFtn() we need to
+ // If the remaining height changed e.g by RemoveFootnote() we need to
// fill up in order to avoid oscillation.
if( bDummy && pBodyFrm &&
nBodyHeight < ( IsVertical() ?
@@ -1115,7 +1115,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
AdjustFrm( nChg, bHasToFit );
- if( HasFollow() || IsInFtn() )
+ if( HasFollow() || IsInFootnote() )
_AdjustFollow( rLine, nEnd, nStrLen, nNew );
pPara->SetPrepMustFit( false );
@@ -1125,10 +1125,10 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
// bPrev is set whether Reformat.Start() was called because of Prev().
// Else, wo don't know whether we can limit the repaint or not.
-bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
+bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev )
{
OSL_ENSURE( ! IsVertical() || IsSwapped(),
- "SwTxtFrm::FormatLine( rLine, bPrev) with unswapped frame" );
+ "SwTextFrm::FormatLine( rLine, bPrev) with unswapped frame" );
SwParaPortion *pPara = rLine.GetInfo().GetParaPortion();
const SwLineLayout *pOldCur = rLine.GetCurr();
const sal_Int32 nOldLen = pOldCur->GetLen();
@@ -1144,9 +1144,9 @@ bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
const sal_Int32 nNewStart = rLine.FormatLine( rLine.GetStart() );
OSL_ENSURE( Frm().Pos().Y() + Prt().Pos().Y() == rLine.GetFirstPos(),
- "SwTxtFrm::FormatLine: frame leaves orbit." );
+ "SwTextFrm::FormatLine: frame leaves orbit." );
OSL_ENSURE( rLine.GetCurr()->Height(),
- "SwTxtFrm::FormatLine: line height is zero" );
+ "SwTextFrm::FormatLine: line height is zero" );
// The current line break object
const SwLineLayout *pNew = rLine.GetCurr();
@@ -1172,7 +1172,7 @@ bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
SwRepaint &rRepaint = pPara->GetRepaint();
if( bUnChg && rRepaint.Top() == rLine.Y()
&& (bPrev || nNewStart <= pPara->GetReformat().Start())
- && (nNewStart < GetTxtNode()->GetTxt().getLength()))
+ && (nNewStart < GetTextNode()->GetText().getLength()))
{
rRepaint.Top( nBottom );
rRepaint.Height( 0 );
@@ -1245,7 +1245,7 @@ bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
return true;
// Until the String's end?
- if (nNewStart >= GetTxtNode()->GetTxt().getLength())
+ if (nNewStart >= GetTextNode()->GetText().getLength())
return false;
if( rLine.GetInfo().IsShift() )
@@ -1261,15 +1261,15 @@ bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
return 0 != pPara->GetDelta();
}
-void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
+void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
const bool bAdjust )
{
- OSL_ENSURE( ! IsVertical() || IsSwapped(),"SwTxtFrm::_Format with unswapped frame" );
+ OSL_ENSURE( ! IsVertical() || IsSwapped(),"SwTextFrm::_Format with unswapped frame" );
SwParaPortion *pPara = rLine.GetInfo().GetParaPortion();
rLine.SetUnclipped( false );
- const OUString &rString = GetTxtNode()->GetTxt();
+ const OUString &rString = GetTextNode()->GetText();
const sal_Int32 nStrLen = rString.getLength();
SwCharRange &rReformat = pPara->GetReformat();
@@ -1399,7 +1399,7 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
bool bJumpMidHyph = false;
bool bWatchMidHyph = false;
- const SwAttrSet& rAttrSet = GetTxtNode()->GetSwAttrSet();
+ const SwAttrSet& rAttrSet = GetTextNode()->GetSwAttrSet();
bool bMaxHyph = ( 0 !=
( rInf.MaxHyph() = rAttrSet.GetHyphenZone().GetMaxHyphens() ) );
if ( bMaxHyph )
@@ -1407,15 +1407,15 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
if( IsFollow() && IsFieldFollow() && rLine.GetStart() == GetOfst() )
{
- SwTxtFrm *pMaster = FindMaster();
- OSL_ENSURE( pMaster, "SwTxtFrm::Format: homeless follow" );
+ SwTextFrm *pMaster = FindMaster();
+ OSL_ENSURE( pMaster, "SwTextFrm::Format: homeless follow" );
const SwLineLayout* pLine=NULL;
if (pMaster)
{
if( !pMaster->HasPara() )
pMaster->GetFormatted();
- SwTxtSizeInfo aInf( pMaster );
- SwTxtIter aMasterLine( pMaster, &aInf );
+ SwTextSizeInfo aInf( pMaster );
+ SwTextIter aMasterLine( pMaster, &aInf );
aMasterLine.Bottom();
pLine = aMasterLine.GetCurr();
}
@@ -1558,7 +1558,7 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
if( !rInf.IsTest() )
{
// FormatAdjust does not pay off at OnceMore
- if( bAdjust || !rLine.GetDropFmt() || !rLine.CalcOnceMore() )
+ if( bAdjust || !rLine.GetDropFormat() || !rLine.CalcOnceMore() )
{
FormatAdjust( rLine, aFrmBreak, nStrLen, rInf.IsStop() );
}
@@ -1576,17 +1576,17 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
}
}
-void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
+void SwTextFrm::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
{
OSL_ENSURE( ! IsVertical() || IsSwapped(),
- "A frame is not swapped in SwTxtFrm::FormatOnceMore" );
+ "A frame is not swapped in SwTextFrm::FormatOnceMore" );
SwParaPortion *pPara = rLine.GetInfo().GetParaPortion();
if( !pPara )
return;
// If necessary the pPara
- sal_uInt16 nOld = static_cast<const SwTxtMargin&>(rLine).GetDropHeight();
+ sal_uInt16 nOld = static_cast<const SwTextMargin&>(rLine).GetDropHeight();
bool bShrink = false;
bool bGrow = false;
bool bGoOn = rLine.IsOnceMore();
@@ -1596,16 +1596,16 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
++nGo;
rInf.Init();
rLine.Top();
- if( !rLine.GetDropFmt() )
+ if( !rLine.GetDropFormat() )
rLine.SetOnceMore( false );
- SwCharRange aRange( 0, rInf.GetTxt().getLength() );
+ SwCharRange aRange( 0, rInf.GetText().getLength() );
pPara->GetReformat() = aRange;
_Format( rLine, rInf );
bGoOn = rLine.IsOnceMore();
if( bGoOn )
{
- const sal_uInt16 nNew = static_cast<const SwTxtMargin&>(rLine).GetDropHeight();
+ const sal_uInt16 nNew = static_cast<const SwTextMargin&>(rLine).GetDropHeight();
if( nOld == nNew )
bGoOn = false;
else
@@ -1624,11 +1624,11 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
// If something went wrong, we need to reformat again
if( !bGoOn )
{
- rInf.CtorInitTxtFormatInfo( this );
- rLine.CtorInitTxtFormatter( this, &rInf );
+ rInf.CtorInitTextFormatInfo( this );
+ rLine.CtorInitTextFormatter( this, &rInf );
rLine.SetDropLines( 1 );
rLine.CalcDropHeight( 1 );
- SwCharRange aTmpRange( 0, rInf.GetTxt().getLength() );
+ SwCharRange aTmpRange( 0, rInf.GetText().getLength() );
pPara->GetReformat() = aTmpRange;
_Format( rLine, rInf, true );
// We paint everything ...
@@ -1638,9 +1638,9 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
}
}
-void SwTxtFrm::_Format( SwParaPortion *pPara )
+void SwTextFrm::_Format( SwParaPortion *pPara )
{
- const bool bIsEmpty = GetTxt().isEmpty();
+ const bool bIsEmpty = GetText().isEmpty();
if ( bIsEmpty )
{
@@ -1665,8 +1665,8 @@ void SwTxtFrm::_Format( SwParaPortion *pPara )
if ( IsVertical() )
SwapWidthAndHeight();
- SwTxtFormatInfo aInf( this );
- SwTxtFormatter aLine( this, &aInf );
+ SwTextFormatInfo aInf( this );
+ SwTextFormatter aLine( this, &aInf );
HideAndShowObjects();
@@ -1699,19 +1699,19 @@ void SwTxtFrm::_Format( SwParaPortion *pPara )
// We calculate the text frame's size and send a notification.
// Shrink() or Grow() to adjust the frame's size to the changed required space.
-void SwTxtFrm::Format( const SwBorderAttrs * )
+void SwTextFrm::Format( const SwBorderAttrs * )
{
SWRECTFN( this )
CalcAdditionalFirstLineOffset();
- // The range autopilot or the BASIC interface pass us TxtFrms with
+ // The range autopilot or the BASIC interface pass us TextFrms with
// a width <= 0 from time to time
if( (Prt().*fnRect->fnGetWidth)() <= 0 )
{
// If MustFit is set, we shrink to the Upper's bottom edge if needed.
// Else we just take a standard size of 12 Pt. (240 twip).
- SwTxtLineAccess aAccess( this );
+ SwTextLineAccess aAccess( this );
long nFrmHeight = (Frm().*fnRect->fnGetHeight)();
if( aAccess.GetPara()->IsPrepMustFit() )
{
@@ -1734,7 +1734,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
return;
}
- const sal_Int32 nStrLen = GetTxtNode()->GetTxt().getLength();
+ const sal_Int32 nStrLen = GetTextNode()->GetText().getLength();
if ( nStrLen || !FormatEmpty() )
{
@@ -1769,19 +1769,19 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
}
// We do not want to be interrupted during formatting
- TxtFrmLockGuard aLock(this);
- SwTxtLineAccess aAccess( this );
- const bool bNew = !aAccess.SwTxtLineAccess::IsAvailable();
+ TextFrmLockGuard aLock(this);
+ SwTextLineAccess aAccess( this );
+ const bool bNew = !aAccess.SwTextLineAccess::IsAvailable();
const bool bSetOfst =
- (GetOfst() && GetOfst() > GetTxtNode()->GetTxt().getLength());
+ (GetOfst() && GetOfst() > GetTextNode()->GetText().getLength());
if( CalcPreps() )
; // nothing
- // We return if already formatted, but if the TxtFrm was just created
+ // We return if already formatted, but if the TextFrm was just created
// and does not have any format information
else if( !bNew && !aAccess.GetPara()->GetReformat().Len() )
{
- if( GetTxtNode()->GetSwAttrSet().GetRegister().GetValue() )
+ if( GetTextNode()->GetSwAttrSet().GetRegister().GetValue() )
{
aAccess.GetPara()->SetPrepAdjust();
aAccess.GetPara()->SetPrep();
@@ -1791,8 +1791,8 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
}
else if( bSetOfst && IsFollow() )
{
- SwTxtFrm *pMaster = FindMaster();
- OSL_ENSURE( pMaster, "SwTxtFrm::Format: homeless follow" );
+ SwTextFrm *pMaster = FindMaster();
+ OSL_ENSURE( pMaster, "SwTextFrm::Format: homeless follow" );
if( pMaster )
pMaster->Prepare( PREP_FOLLOW_FOLLOWS );
SwTwips nMaxY = (GetUpper()->*fnRect->fnGetPrtBottom)();
@@ -1808,30 +1808,30 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
_SetOfst( 0 );
const bool bOrphan = IsWidow();
- const SwFtnBossFrm* pFtnBoss = HasFtn() ? FindFtnBossFrm() : 0;
- SwTwips nFtnHeight = 0;
- if( pFtnBoss )
+ const SwFootnoteBossFrm* pFootnoteBoss = HasFootnote() ? FindFootnoteBossFrm() : 0;
+ SwTwips nFootnoteHeight = 0;
+ if( pFootnoteBoss )
{
- const SwFtnContFrm* pCont = pFtnBoss->FindFtnCont();
- nFtnHeight = pCont ? (pCont->Frm().*fnRect->fnGetHeight)() : 0;
+ const SwFootnoteContFrm* pCont = pFootnoteBoss->FindFootnoteCont();
+ nFootnoteHeight = pCont ? (pCont->Frm().*fnRect->fnGetHeight)() : 0;
}
do
{
_Format( aAccess.GetPara() );
- if( pFtnBoss && nFtnHeight )
+ if( pFootnoteBoss && nFootnoteHeight )
{
- const SwFtnContFrm* pCont = pFtnBoss->FindFtnCont();
+ const SwFootnoteContFrm* pCont = pFootnoteBoss->FindFootnoteCont();
SwTwips nNewHeight = pCont ? (pCont->Frm().*fnRect->fnGetHeight)() : 0;
// If we lost some footnotes, we may have more space
// for our main text, so we have to format again ...
- if( nNewHeight < nFtnHeight )
- nFtnHeight = nNewHeight;
+ if( nNewHeight < nFootnoteHeight )
+ nFootnoteHeight = nNewHeight;
else
break;
}
else
break;
- } while ( pFtnBoss );
+ } while ( pFootnoteBoss );
if( bOrphan )
{
ValidateFrm();
@@ -1870,10 +1870,10 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
// frames will not calculated during the painting. So I actually want to
// avoid a formatting during painting, but since I'm a coward, I'll only
// force the quick formatting in the situation of issue i29062.
-bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
+bool SwTextFrm::FormatQuick( bool bForceQuickFormat )
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
- "SwTxtFrm::FormatQuick with swapped frame" );
+ "SwTextFrm::FormatQuick with swapped frame" );
if( IsEmpty() && FormatEmpty() )
return true;
@@ -1884,27 +1884,27 @@ bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
( ( IsVertical() ? Prt().Width() : Prt().Height() ) && IsHiddenNow() ) )
return false;
- SwTxtLineAccess aAccess( this );
+ SwTextLineAccess aAccess( this );
SwParaPortion *pPara = aAccess.GetPara();
if( !pPara )
return false;
SwFrmSwapper aSwapper( this, true );
- TxtFrmLockGuard aLock(this);
- SwTxtFormatInfo aInf( this, false, true );
+ TextFrmLockGuard aLock(this);
+ SwTextFormatInfo aInf( this, false, true );
if( 0 != aInf.MaxHyph() ) // Respect MaxHyphen!
return false;
- SwTxtFormatter aLine( this, &aInf );
+ SwTextFormatter aLine( this, &aInf );
// DropCaps are too complicated ...
- if( aLine.GetDropFmt() )
+ if( aLine.GetDropFormat() )
return false;
sal_Int32 nStart = GetOfst();
const sal_Int32 nEnd = GetFollow()
- ? GetFollow()->GetOfst() : aInf.GetTxt().getLength();
+ ? GetFollow()->GetOfst() : aInf.GetText().getLength();
do
{
sal_Int32 nShift = aLine.FormatLine(nStart) - nStart;
@@ -1929,7 +1929,7 @@ bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
return false;
}
- if (m_pFollow && nStart != (static_cast<SwTxtFrm*>(m_pFollow))->GetOfst())
+ if (m_pFollow && nStart != (static_cast<SwTextFrm*>(m_pFollow))->GetOfst())
return false; // can be caused by e.g. Orphans
// We made it!
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index 2c813eafe51b..e1a795cbb51b 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -21,27 +21,27 @@
#include <frminf.hxx>
#include <itrtxt.hxx>
-sal_Int32 SwTxtMargin::GetTxtStart() const
+sal_Int32 SwTextMargin::GetTextStart() const
{
- const OUString &rTxt = GetInfo().GetTxt();
+ const OUString &rText = GetInfo().GetText();
const sal_Int32 nEnd = nStart + pCurr->GetLen();
for( sal_Int32 i = nStart; i < nEnd; ++i )
{
- const sal_Unicode aChar = rTxt[i];
+ const sal_Unicode aChar = rText[i];
if( CH_TAB != aChar && ' ' != aChar )
return i;
}
return nEnd;
}
-sal_Int32 SwTxtMargin::GetTxtEnd() const
+sal_Int32 SwTextMargin::GetTextEnd() const
{
- const OUString &rTxt = GetInfo().GetTxt();
+ const OUString &rText = GetInfo().GetText();
const sal_Int32 nEnd = nStart + pCurr->GetLen();
for( sal_Int32 i = nEnd - 1; i >= nStart; --i )
{
- const sal_Unicode aChar = rTxt[i];
+ const sal_Unicode aChar = rText[i];
if( CH_TAB != aChar && CH_BREAK != aChar && ' ' != aChar )
return i + 1;
}
@@ -49,7 +49,7 @@ sal_Int32 SwTxtMargin::GetTxtEnd() const
}
// Does the paragraph fit into one line?
-bool SwTxtFrmInfo::IsOneLine() const
+bool SwTextFrmInfo::IsOneLine() const
{
const SwLineLayout *pLay = pFrm->GetPara();
if( !pLay )
@@ -70,7 +70,7 @@ bool SwTxtFrmInfo::IsOneLine() const
}
// Is the line filled for X percent?
-bool SwTxtFrmInfo::IsFilled( const sal_uInt8 nPercent ) const
+bool SwTextFrmInfo::IsFilled( const sal_uInt8 nPercent ) const
{
const SwLineLayout *pLay = pFrm->GetPara();
if( !pLay )
@@ -83,39 +83,39 @@ bool SwTxtFrmInfo::IsFilled( const sal_uInt8 nPercent ) const
}
// Where does the text start (without whitespace)? (document global)
-SwTwips SwTxtFrmInfo::GetLineStart( const SwTxtCursor &rLine )
+SwTwips SwTextFrmInfo::GetLineStart( const SwTextCursor &rLine )
{
- const sal_Int32 nTxtStart = rLine.GetTxtStart();
- if( rLine.GetStart() == nTxtStart )
+ const sal_Int32 nTextStart = rLine.GetTextStart();
+ if( rLine.GetStart() == nTextStart )
return rLine.GetLineStart();
SwRect aRect;
- if( const_cast<SwTxtCursor&>(rLine).GetCharRect( &aRect, nTxtStart ) )
+ if( const_cast<SwTextCursor&>(rLine).GetCharRect( &aRect, nTextStart ) )
return aRect.Left();
return rLine.GetLineStart();
}
// Where does the text start (without whitespace)? (relative in the Frame)
-SwTwips SwTxtFrmInfo::GetLineStart() const
+SwTwips SwTextFrmInfo::GetLineStart() const
{
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(pFrm) );
- SwTxtCursor aLine( const_cast<SwTxtFrm*>(pFrm), &aInf );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) );
+ SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf );
return GetLineStart( aLine ) - pFrm->Frm().Left() - pFrm->Prt().Left();
}
// Calculates the character's position and returns the middle position
-SwTwips SwTxtFrmInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const
+SwTwips SwTextFrmInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const
{
SWRECTFN( pFrm )
SwFrmSwapper aSwapper( pFrm, true );
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(pFrm) );
- SwTxtCursor aLine( const_cast<SwTxtFrm*>(pFrm), &aInf );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) );
+ SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf );
SwTwips nStt, nNext;
SwRect aRect;
- if( static_cast<SwTxtCursor&>(aLine).GetCharRect( &aRect, nChar ) )
+ if( static_cast<SwTextCursor&>(aLine).GetCharRect( &aRect, nChar ) )
{
if ( bVert )
pFrm->SwitchHorizontalToVertical( aRect );
@@ -128,7 +128,7 @@ SwTwips SwTxtFrmInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const
if( !bCenter )
return nStt - (pFrm->Frm().*fnRect->fnGetLeft)();
- if( static_cast<SwTxtCursor&>(aLine).GetCharRect( &aRect, nChar+1 ) )
+ if( static_cast<SwTextCursor&>(aLine).GetCharRect( &aRect, nChar+1 ) )
{
if ( bVert )
pFrm->SwitchHorizontalToVertical( aRect );
@@ -141,7 +141,7 @@ SwTwips SwTxtFrmInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const
return (( nNext + nStt ) / 2 ) - (pFrm->Frm().*fnRect->fnGetLeft)();
}
-SwPaM *AddPam( SwPaM *pPam, const SwTxtFrm* pTxtFrm,
+SwPaM *AddPam( SwPaM *pPam, const SwTextFrm* pTextFrm,
const sal_Int32 nPos, const sal_Int32 nLen )
{
if( nLen )
@@ -160,7 +160,7 @@ SwPaM *AddPam( SwPaM *pPam, const SwTxtFrm* pTxtFrm,
}
SwIndex &rContent = pPam->GetPoint()->nContent;
- rContent.Assign( const_cast<SwTxtNode*>(pTxtFrm->GetTxtNode()), nPos );
+ rContent.Assign( const_cast<SwTextNode*>(pTextFrm->GetTextNode()), nPos );
pPam->SetMark();
rContent += nLen;
}
@@ -168,17 +168,17 @@ SwPaM *AddPam( SwPaM *pPam, const SwTxtFrm* pTxtFrm,
}
// Accumulates the whitespace at line start and end in the Pam
-void SwTxtFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const
+void SwTextFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const
{
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(pFrm) );
- SwTxtMargin aLine( const_cast<SwTxtFrm*>(pFrm), &aInf );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) );
+ SwTextMargin aLine( const_cast<SwTextFrm*>(pFrm), &aInf );
SwPaM *pPam = &rPam;
bool bFirstLine = true;
do {
if( aLine.GetCurr()->GetLen() )
{
- sal_Int32 nPos = aLine.GetTxtStart();
+ sal_Int32 nPos = aLine.GetTextStart();
// Do NOT include the blanks/tabs from the first line
// in the selection
if( !bFirstLine && nPos > aLine.GetStart() )
@@ -189,7 +189,7 @@ void SwTxtFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const
// in the selection
if( aLine.GetNext() )
{
- nPos = aLine.GetTxtEnd();
+ nPos = aLine.GetTextEnd();
if( nPos < aLine.GetEnd() )
{
@@ -207,22 +207,22 @@ void SwTxtFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const
// Is there a bullet/symbol etc. at the text position?
// Fonts: CharSet, SYMBOL und DONTKNOW
-bool SwTxtFrmInfo::IsBullet( sal_Int32 nTxtStart ) const
+bool SwTextFrmInfo::IsBullet( sal_Int32 nTextStart ) const
{
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(pFrm) );
- SwTxtMargin aLine( const_cast<SwTxtFrm*>(pFrm), &aInf );
- aInf.SetIdx( nTxtStart );
- return aLine.IsSymbol( nTxtStart );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) );
+ SwTextMargin aLine( const_cast<SwTextFrm*>(pFrm), &aInf );
+ aInf.SetIdx( nTextStart );
+ return aLine.IsSymbol( nTextStart );
}
// Get first line indent
// The precondition for a positive or negative first line indent:
// All lines (except for the first one) have the same left margin.
// We do not want to be so picky and work with a tolerance of TOLERANCE twips.
-SwTwips SwTxtFrmInfo::GetFirstIndent() const
+SwTwips SwTextFrmInfo::GetFirstIndent() const
{
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(pFrm) );
- SwTxtCursor aLine( const_cast<SwTxtFrm*>(pFrm), &aInf );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) );
+ SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf );
const SwTwips nFirst = GetLineStart( aLine );
const SwTwips TOLERANCE = 20;
@@ -251,18 +251,18 @@ SwTwips SwTxtFrmInfo::GetFirstIndent() const
return 1;
}
-sal_Int32 SwTxtFrmInfo::GetBigIndent( sal_Int32& rFndPos,
- const SwTxtFrm *pNextFrm ) const
+sal_Int32 SwTextFrmInfo::GetBigIndent( sal_Int32& rFndPos,
+ const SwTextFrm *pNextFrm ) const
{
- SwTxtSizeInfo aInf( const_cast<SwTxtFrm*>(pFrm) );
- SwTxtCursor aLine( const_cast<SwTxtFrm*>(pFrm), &aInf );
+ SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) );
+ SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf );
SwTwips nNextIndent = 0;
if( pNextFrm )
{
// I'm a single line
- SwTxtSizeInfo aNxtInf( const_cast<SwTxtFrm*>(pNextFrm) );
- SwTxtCursor aNxtLine( const_cast<SwTxtFrm*>(pNextFrm), &aNxtInf );
+ SwTextSizeInfo aNxtInf( const_cast<SwTextFrm*>(pNextFrm) );
+ SwTextCursor aNxtLine( const_cast<SwTextFrm*>(pNextFrm), &aNxtInf );
nNextIndent = GetLineStart( aNxtLine );
}
else
@@ -284,20 +284,20 @@ sal_Int32 SwTxtFrmInfo::GetBigIndent( sal_Int32& rFndPos,
return 0;
// Is on front of a non-space
- const OUString& rTxt = aInf.GetTxt();
- sal_Unicode aChar = rTxt[rFndPos];
+ const OUString& rText = aInf.GetText();
+ sal_Unicode aChar = rText[rFndPos];
if( CH_TAB == aChar || CH_BREAK == aChar || ' ' == aChar ||
(( CH_TXTATR_BREAKWORD == aChar || CH_TXTATR_INWORD == aChar ) &&
aInf.HasHint( rFndPos ) ) )
return 0;
// and after a space
- aChar = rTxt[rFndPos - 1];
+ aChar = rText[rFndPos - 1];
if( CH_TAB != aChar && CH_BREAK != aChar &&
( ( CH_TXTATR_BREAKWORD != aChar && CH_TXTATR_INWORD != aChar ) ||
!aInf.HasHint( rFndPos - 1 ) ) &&
// More than two Blanks!
- ( ' ' != aChar || ' ' != rTxt[rFndPos - 2] ) )
+ ( ' ' != aChar || ' ' != rText[rFndPos - 2] ) )
return 0;
SwRect aRect;
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 9d2c4ad55b24..a5b65ac30c42 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -60,7 +60,7 @@ class SwExtraPainter
{
SwSaveClip aClip;
SwRect aRect;
- const SwTxtFrm* pTxtFrm;
+ const SwTextFrm* pTextFrm;
SwViewShell *pSh;
SwFont* pFnt;
const SwLineNumberInfo &rLineInf;
@@ -72,7 +72,7 @@ class SwExtraPainter
bool bLineNum;
inline bool IsClipChg() { return aClip.IsChg(); }
public:
- SwExtraPainter( const SwTxtFrm *pFrm, SwViewShell *pVwSh,
+ SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh,
const SwLineNumberInfo &rLnInf, const SwRect &rRct,
sal_Int16 eHor, bool bLnNm );
~SwExtraPainter() { delete pFnt; }
@@ -86,12 +86,12 @@ public:
void PaintRedline( SwTwips nY, long nMax );
};
-SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, SwViewShell *pVwSh,
+SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh,
const SwLineNumberInfo &rLnInf, const SwRect &rRct,
sal_Int16 eHor, bool bLnNm )
: aClip( pVwSh->GetWin() || pFrm->IsUndersized() ? pVwSh->GetOut() : 0 )
, aRect( rRct )
- , pTxtFrm( pFrm )
+ , pTextFrm( pFrm )
, pSh( pVwSh )
, pFnt( 0 )
, rLineInf( rLnInf )
@@ -122,9 +122,9 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, SwViewShell *pVwSh,
*/
nDivider = !rLineInf.GetDivider().isEmpty() ? rLineInf.GetDividerCountBy() : 0;
nX = pFrm->Frm().Left();
- SwCharFmt* pFmt = rLineInf.GetCharFmt( const_cast<IDocumentStylePoolAccess&>(*pFrm->GetNode()->getIDocumentStylePoolAccess()) );
- OSL_ENSURE( pFmt, "PaintExtraData without CharFmt" );
- pFnt = new SwFont( &pFmt->GetAttrSet(), pFrm->GetTxtNode()->getIDocumentSettingAccess() );
+ SwCharFormat* pFormat = rLineInf.GetCharFormat( const_cast<IDocumentStylePoolAccess&>(*pFrm->GetNode()->getIDocumentStylePoolAccess()) );
+ OSL_ENSURE( pFormat, "PaintExtraData without CharFormat" );
+ pFnt = new SwFont( &pFormat->GetAttrSet(), pFrm->GetTextNode()->getIDocumentSettingAccess() );
pFnt->Invalidate();
pFnt->ChgPhysFnt( pSh, *pSh->GetOut() );
pFnt->SetVertical( 0, pFrm->IsVertical() );
@@ -195,7 +195,7 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed )
aDrawInf.SetSmartTags( NULL );
aDrawInf.SetLeft( 0 );
aDrawInf.SetRight( LONG_MAX );
- aDrawInf.SetFrm( pTxtFrm );
+ aDrawInf.SetFrm( pTextFrm );
aDrawInf.SetFont( pFnt );
aDrawInf.SetSnapToGrid( false );
aDrawInf.SetIgnoreFrmRTL( true );
@@ -220,7 +220,7 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed )
bool bPaint = true;
if( !IsClipChg() )
{
- Size aSize = pTmpFnt->_GetTxtSize( aDrawInf );
+ Size aSize = pTmpFnt->_GetTextSize( aDrawInf );
if( bGoLeft )
aTmpPos.X() -= aSize.Width();
// calculate rectangle containing the line number
@@ -232,11 +232,11 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed )
if( aRct.Intersection( aRect ).IsEmpty() )
bPaint = false;
else
- aClip.ChgClip( aRect, pTxtFrm );
+ aClip.ChgClip( aRect, pTextFrm );
}
}
else if( bGoLeft )
- aTmpPos.X() -= pTmpFnt->_GetTxtSize( aDrawInf ).Width();
+ aTmpPos.X() -= pTmpFnt->_GetTextSize( aDrawInf ).Width();
aDrawInf.SetPos( aTmpPos );
if( bPaint )
pTmpFnt->_DrawText( aDrawInf );
@@ -263,31 +263,31 @@ void SwExtraPainter::PaintRedline( SwTwips nY, long nMax )
{
if( aRct.Intersection( aRect ).IsEmpty() )
return;
- aClip.ChgClip( aRect, pTxtFrm );
+ aClip.ChgClip( aRect, pTextFrm );
}
}
const Color aOldCol( pSh->GetOut()->GetLineColor() );
pSh->GetOut()->SetLineColor( SW_MOD()->GetRedlineMarkColor() );
- if ( pTxtFrm->IsVertical() )
+ if ( pTextFrm->IsVertical() )
{
- pTxtFrm->SwitchHorizontalToVertical( aStart );
- pTxtFrm->SwitchHorizontalToVertical( aEnd );
+ pTextFrm->SwitchHorizontalToVertical( aStart );
+ pTextFrm->SwitchHorizontalToVertical( aEnd );
}
pSh->GetOut()->DrawLine( aStart, aEnd );
pSh->GetOut()->SetLineColor( aOldCol );
}
-void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
+void SwTextFrm::PaintExtraData( const SwRect &rRect ) const
{
if( Frm().Top() > rRect.Bottom() || Frm().Bottom() < rRect.Top() )
return;
- const SwTxtNode& rTxtNode = *GetTxtNode();
- const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess();
- const SwLineNumberInfo &rLineInf = rTxtNode.GetDoc()->GetLineNumberInfo();
- const SwFmtLineNumber &rLineNum = GetAttrSet()->GetLineNumber();
+ const SwTextNode& rTextNode = *GetTextNode();
+ const IDocumentRedlineAccess* pIDRA = rTextNode.getIDocumentRedlineAccess();
+ const SwLineNumberInfo &rLineInf = rTextNode.GetDoc()->GetLineNumberInfo();
+ const SwFormatLineNumber &rLineNum = GetAttrSet()->GetLineNumber();
bool bLineNum = !IsInTab() && rLineInf.IsPaintLineNumbers() &&
( !IsInFly() || rLineInf.IsCountInFlys() ) && rLineNum.IsCount();
sal_Int16 eHor = (sal_Int16)SW_MOD()->GetRedlineMarkPos();
@@ -316,23 +316,23 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
if( HasPara() )
{
- TxtFrmLockGuard aLock(const_cast<SwTxtFrm*>(this));
+ TextFrmLockGuard aLock(const_cast<SwTextFrm*>(this));
- SwTxtLineAccess aAccess( this );
+ SwTextLineAccess aAccess( this );
aAccess.GetPara();
- SwTxtPaintInfo aInf( const_cast<SwTxtFrm*>(this), rRect );
+ SwTextPaintInfo aInf( const_cast<SwTextFrm*>(this), rRect );
aLayoutModeModifier.Modify( false );
- SwTxtPainter aLine( const_cast<SwTxtFrm*>(this), &aInf );
+ SwTextPainter aLine( const_cast<SwTextFrm*>(this), &aInf );
bool bNoDummy = !aLine.GetNext(); // Only one empty line!
while( aLine.Y() + aLine.GetLineHeight() <= rRect.Top() )
{
if( !aLine.GetCurr()->IsDummy() &&
( rLineInf.IsCountBlankLines() ||
- aLine.GetCurr()->HasCntnt() ) )
+ aLine.GetCurr()->HasContent() ) )
aExtra.IncLineNr();
if( !aLine.Next() )
{
@@ -349,7 +349,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
{
while ( aLine.Y() < GetMinPrtLine() )
{
- if( ( rLineInf.IsCountBlankLines() || aLine.GetCurr()->HasCntnt() )
+ if( ( rLineInf.IsCountBlankLines() || aLine.GetCurr()->HasContent() )
&& !aLine.GetCurr()->IsDummy() )
aExtra.IncLineNr();
if( !aLine.Next() )
@@ -364,7 +364,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
if( bNoDummy || !aLine.GetCurr()->IsDummy() )
{
bool bRed = bRedLine && aLine.GetCurr()->HasRedline();
- if( rLineInf.IsCountBlankLines() || aLine.GetCurr()->HasCntnt() )
+ if( rLineInf.IsCountBlankLines() || aLine.GetCurr()->HasContent() )
{
if( bLineNum &&
( aExtra.HasNumber() || aExtra.HasDivider() ) )
@@ -385,7 +385,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
}
else
{
- if ( USHRT_MAX == pIDRA->GetRedlinePos(rTxtNode, USHRT_MAX) )
+ if ( USHRT_MAX == pIDRA->GetRedlinePos(rTextNode, USHRT_MAX) )
bRedLine = false;
if( bLineNum && rLineInf.IsCountBlankLines() &&
@@ -403,7 +403,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
}
}
-SwRect SwTxtFrm::Paint()
+SwRect SwTextFrm::Paint()
{
#if OSL_DEBUG_LEVEL > 1
const SwTwips nDbgY = Frm().Top();
@@ -411,7 +411,7 @@ SwRect SwTxtFrm::Paint()
#endif
// finger layout
- OSL_ENSURE( GetValidPosFlag(), "+SwTxtFrm::Paint: no Calc()" );
+ OSL_ENSURE( GetValidPosFlag(), "+SwTextFrm::Paint: no Calc()" );
SwRect aRet( Prt() );
if ( IsEmpty() || !HasPara() )
@@ -454,42 +454,42 @@ SwRect SwTxtFrm::Paint()
return aRet;
}
-bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
+bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
{
SwViewShell *pSh = getRootFrm()->GetCurrShell();
if( pSh && ( pSh->GetViewOptions()->IsParagraph() || bInitFont ) )
{
bInitFont = false;
- SwTxtFly aTxtFly( this );
- aTxtFly.SetTopRule();
+ SwTextFly aTextFly( this );
+ aTextFly.SetTopRule();
SwRect aRect;
- if( bCheck && aTxtFly.IsOn() && aTxtFly.IsAnyObj( aRect ) )
+ if( bCheck && aTextFly.IsOn() && aTextFly.IsAnyObj( aRect ) )
return false;
else if( pSh->GetWin() )
{
SwFont *pFnt;
- const SwTxtNode& rTxtNode = *GetTxtNode();
- if ( rTxtNode.HasSwAttrSet() )
+ const SwTextNode& rTextNode = *GetTextNode();
+ if ( rTextNode.HasSwAttrSet() )
{
- const SwAttrSet *pAttrSet = &( rTxtNode.GetSwAttrSet() );
- pFnt = new SwFont( pAttrSet, rTxtNode.getIDocumentSettingAccess() );
+ const SwAttrSet *pAttrSet = &( rTextNode.GetSwAttrSet() );
+ pFnt = new SwFont( pAttrSet, rTextNode.getIDocumentSettingAccess() );
}
else
{
- SwFontAccess aFontAccess( &rTxtNode.GetAnyFmtColl(), pSh );
+ SwFontAccess aFontAccess( &rTextNode.GetAnyFormatColl(), pSh );
pFnt = new SwFont( aFontAccess.Get()->GetFont() );
}
- const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess();
+ const IDocumentRedlineAccess* pIDRA = rTextNode.getIDocumentRedlineAccess();
if( IDocumentRedlineAccess::IsShowChanges( pIDRA->GetRedlineMode() ) )
{
- const sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTxtNode, USHRT_MAX );
+ const sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTextNode, USHRT_MAX );
if( USHRT_MAX != nRedlPos )
{
SwAttrHandler aAttrHandler;
- aAttrHandler.Init( rTxtNode.GetSwAttrSet(),
- *rTxtNode.getIDocumentSettingAccess(), NULL );
- SwRedlineItr aRedln( rTxtNode, *pFnt, aAttrHandler, nRedlPos, true );
+ aAttrHandler.Init( rTextNode.GetSwAttrSet(),
+ *rTextNode.getIDocumentSettingAccess(), NULL );
+ SwRedlineItr aRedln( rTextNode, *pFnt, aAttrHandler, nRedlPos, true );
}
}
@@ -513,10 +513,10 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
Point aPos = Frm().Pos() + Prt().Pos();
const SvxLRSpaceItem &rSpace =
- GetTxtNode()->GetSwAttrSet().GetLRSpace();
+ GetTextNode()->GetSwAttrSet().GetLRSpace();
- if ( rSpace.GetTxtFirstLineOfst() > 0 )
- aPos.X() += rSpace.GetTxtFirstLineOfst();
+ if ( rSpace.GetTextFirstLineOfst() > 0 )
+ aPos.X() += rSpace.GetTextFirstLineOfst();
SwSaveClip *pClip;
if( IsUndersized() )
@@ -529,7 +529,7 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
aPos.Y() += pFnt->GetAscent( pSh, *pSh->GetOut() );
- if ( GetTxtNode()->GetSwAttrSet().GetParaGrid().GetValue() &&
+ if ( GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() &&
IsInDocBody() )
{
SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm()));
@@ -575,7 +575,7 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
return false;
}
-void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
+void SwTextFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
ResetRepaint();
@@ -601,11 +601,11 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
// It can happen that the IdleCollector withdrew my cached information
if( !HasPara() )
{
- OSL_ENSURE( GetValidPosFlag(), "+SwTxtFrm::Paint: no Calc()" );
+ OSL_ENSURE( GetValidPosFlag(), "+SwTextFrm::Paint: no Calc()" );
// #i29062# pass info that we are currently
// painting.
- const_cast<SwTxtFrm*>(this)->GetFormatted( true );
+ const_cast<SwTextFrm*>(this)->GetFormatted( true );
if( IsEmpty() )
{
PaintEmpty( rRect, false );
@@ -613,22 +613,22 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
}
if( !HasPara() )
{
- OSL_ENSURE( false, "+SwTxtFrm::Paint: missing format information" );
+ OSL_ENSURE( false, "+SwTextFrm::Paint: missing format information" );
return;
}
}
// We don't want to be interrupted while painting.
// Do that after thr Format()!
- TxtFrmLockGuard aLock(const_cast<SwTxtFrm*>(this));
+ TextFrmLockGuard aLock(const_cast<SwTextFrm*>(this));
- // We only paint the part of the TxtFrm which changed, is within the
+ // We only paint the part of the TextFrm which changed, is within the
// range and was requested to paint.
// One could think that the area rRect _needs_ to be painted, although
// rRepaint is set. Indeed, we cannot avoid this problem from a formal
// perspective. Luckily we can assume rRepaint to be empty when we need
// paint the while Frm.
- SwTxtLineAccess aAccess( this );
+ SwTextLineAccess aAccess( this );
SwParaPortion *pPara = aAccess.GetPara();
SwRepaint &rRepaint = pPara->GetRepaint();
@@ -656,16 +656,16 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if ( IsRightToLeft() )
SwitchRTLtoLTR( (SwRect&)rRect );
- SwTxtPaintInfo aInf( const_cast<SwTxtFrm*>(this), rRect );
- aInf.SetWrongList( const_cast<SwTxtNode*>(GetTxtNode())->GetWrong() );
- aInf.SetGrammarCheckList( const_cast<SwTxtNode*>(GetTxtNode())->GetGrammarCheck() );
- aInf.SetSmartTags( const_cast<SwTxtNode*>(GetTxtNode())->GetSmartTags() );
- aInf.GetTxtFly().SetTopRule();
+ SwTextPaintInfo aInf( const_cast<SwTextFrm*>(this), rRect );
+ aInf.SetWrongList( const_cast<SwTextNode*>(GetTextNode())->GetWrong() );
+ aInf.SetGrammarCheckList( const_cast<SwTextNode*>(GetTextNode())->GetGrammarCheck() );
+ aInf.SetSmartTags( const_cast<SwTextNode*>(GetTextNode())->GetSmartTags() );
+ aInf.GetTextFly().SetTopRule();
- SwTxtPainter aLine( const_cast<SwTxtFrm*>(this), &aInf );
+ SwTextPainter aLine( const_cast<SwTextFrm*>(this), &aInf );
// Optimization: if no free flying Frm overlaps into our line, the
- // SwTxtFly just switches off
- aInf.GetTxtFly().Relax();
+ // SwTextFly just switches off
+ aInf.GetTextFly().Relax();
OutputDevice* pOut = aInf.GetOut();
const bool bOnWin = pSh->GetWin() != 0;
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 6f7008b1ab02..5c351da76e17 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -44,19 +44,19 @@ using namespace ::com::sun::star::linguistic2;
// provides information for line break calculation
// returns true if no line break has to be performed
// otherwise possible break or hyphenation position is determined
-bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
+bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
const sal_uInt16 nPorHeight )
{
nCutPos = rInf.GetIdx();
// Empty strings are always 0
- if( !rInf.GetLen() || rInf.GetTxt().isEmpty() )
+ if( !rInf.GetLen() || rInf.GetText().isEmpty() )
return false;
- OSL_ENSURE( rInf.GetIdx() < rInf.GetTxt().getLength(),
- "+SwTxtGuess::Guess: invalid SwTxtFormatInfo" );
+ OSL_ENSURE( rInf.GetIdx() < rInf.GetText().getLength(),
+ "+SwTextGuess::Guess: invalid SwTextFormatInfo" );
- OSL_ENSURE( nPorHeight, "+SwTxtGuess::Guess: no height" );
+ OSL_ENSURE( nPorHeight, "+SwTextGuess::Guess: no height" );
sal_uInt16 nMaxSizeDiff;
@@ -66,13 +66,13 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
sal_uInt16 nMaxComp = ( SW_CJK == rInf.GetFont()->GetActual() ) &&
rSI.CountCompChg() &&
! rInf.IsMulti() &&
- ! rPor.InFldGrp() &&
+ ! rPor.InFieldGrp() &&
! rPor.IsDropPortion() ?
10000 :
0 ;
SwTwips nLineWidth = rInf.Width() - rInf.X();
- sal_Int32 nMaxLen = rInf.GetTxt().getLength() - rInf.GetIdx();
+ sal_Int32 nMaxLen = rInf.GetText().getLength() - rInf.GetIdx();
if ( rInf.GetLen() < nMaxLen )
nMaxLen = rInf.GetLen();
@@ -89,13 +89,13 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
if ( rInf.SnapToGrid() )
{
SwTextGridItem const*const pGrid(
- GetGridItem(rInf.GetTxtFrm()->FindPageFrm()));
+ GetGridItem(rInf.GetTextFrm()->FindPageFrm()));
bAddItalic = !pGrid || GRID_LINES_CHARS != pGrid->GetGridType();
}
// do not add extra italic value for an isolated blank:
if ( 1 == rInf.GetLen() &&
- CH_BLANK == rInf.GetTxt()[ rInf.GetIdx() ] )
+ CH_BLANK == rInf.GetText()[ rInf.GetIdx() ] )
bAddItalic = false;
nItalic = bAddItalic ? nPorHeight / 12 : 0;
@@ -112,15 +112,15 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
nLineWidth -= nLeftRightBorderSpace;
- const bool bUnbreakableNumberings = rInf.GetTxtFrm()->GetTxtNode()->
+ const bool bUnbreakableNumberings = rInf.GetTextFrm()->GetTextNode()->
getIDocumentSettingAccess()->get(DocumentSettingId::UNBREAKABLE_NUMBERINGS);
// first check if everything fits to line
if ( ( long ( nLineWidth ) * 2 > long ( nMaxLen ) * nPorHeight ) ||
( bUnbreakableNumberings && rPor.IsNumberPortion() ) )
{
- // call GetTxtSize with maximum compression (for kanas)
- rInf.GetTxtSize( &rSI, rInf.GetIdx(), nMaxLen,
+ // call GetTextSize with maximum compression (for kanas)
+ rInf.GetTextSize( &rSI, rInf.GetIdx(), nMaxLen,
nMaxComp, nBreakWidth, nMaxSizeDiff );
if ( ( nBreakWidth <= nLineWidth ) || ( bUnbreakableNumberings && rPor.IsNumberPortion() ) )
@@ -128,10 +128,10 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// portion fits to line
nCutPos = rInf.GetIdx() + nMaxLen;
if( nItalic &&
- ( nCutPos >= rInf.GetTxt().getLength() ||
+ ( nCutPos >= rInf.GetText().getLength() ||
// #i48035# Needed for CalcFitToContent
// if first line ends with a manual line break
- rInf.GetTxt()[ nCutPos ] == CH_BREAK ) )
+ rInf.GetText()[ nCutPos ] == CH_BREAK ) )
nBreakWidth = nBreakWidth + nItalic;
// save maximum width for later use
@@ -152,20 +152,20 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// considering an additional "-" for hyphenation
if( bHyph )
{
- nCutPos = rInf.GetTxtBreak( nLineWidth, nMaxLen, nMaxComp, nHyphPos, rInf.GetCachedVclData().get() );
+ nCutPos = rInf.GetTextBreak( nLineWidth, nMaxLen, nMaxComp, nHyphPos, rInf.GetCachedVclData().get() );
if ( !nHyphPos && rInf.GetIdx() )
nHyphPos = rInf.GetIdx() - 1;
}
else
{
- nCutPos = rInf.GetTxtBreak( nLineWidth, nMaxLen, nMaxComp, rInf.GetCachedVclData().get() );
+ nCutPos = rInf.GetTextBreak( nLineWidth, nMaxLen, nMaxComp, rInf.GetCachedVclData().get() );
#if OSL_DEBUG_LEVEL > 1
if ( COMPLETE_STRING != nCutPos )
{
sal_uInt16 nMinSize;
- rInf.GetTxtSize( &rSI, rInf.GetIdx(), nCutPos - rInf.GetIdx(),
+ rInf.GetTextSize( &rSI, rInf.GetIdx(), nCutPos - rInf.GetIdx(),
nMaxComp, nMinSize, nMaxSizeDiff );
OSL_ENSURE( nMinSize <= nLineWidth, "What a Guess!!!" );
}
@@ -176,14 +176,14 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
{
// second check if everything fits to line
nCutPos = nBreakPos = rInf.GetIdx() + nMaxLen - 1;
- rInf.GetTxtSize( &rSI, rInf.GetIdx(), nMaxLen, nMaxComp,
+ rInf.GetTextSize( &rSI, rInf.GetIdx(), nMaxLen, nMaxComp,
nBreakWidth, nMaxSizeDiff );
// The following comparison should always give true, otherwise
- // there likely has been a pixel rounding error in GetTxtBreak
+ // there likely has been a pixel rounding error in GetTextBreak
if ( nBreakWidth <= nLineWidth )
{
- if( nItalic && ( nBreakPos + 1 ) >= rInf.GetTxt().getLength() )
+ if( nItalic && ( nBreakPos + 1 ) >= rInf.GetText().getLength() )
nBreakWidth = nBreakWidth + nItalic;
// save maximum width for later use
@@ -198,7 +198,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// we have to trigger an underflow for a footnote portion
// which does not fit to the current line
- if ( rPor.IsFtnPortion() )
+ if ( rPor.IsFootnotePortion() )
{
nBreakPos = rInf.GetIdx();
nCutPos = -1;
@@ -207,18 +207,18 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
sal_Int32 nPorLen = 0;
// do not call the break iterator nCutPos is a blank
- sal_Unicode cCutChar = nCutPos < rInf.GetTxt().getLength() ? rInf.GetTxt()[nCutPos] : 0;
+ sal_Unicode cCutChar = nCutPos < rInf.GetText().getLength() ? rInf.GetText()[nCutPos] : 0;
if( CH_BLANK == cCutChar || CH_FULL_BLANK == cCutChar )
{
nBreakPos = nCutPos;
sal_Int32 nX = nBreakPos;
- const SvxAdjust& rAdjust = rInf.GetTxtFrm()->GetTxtNode()->GetSwAttrSet().GetAdjust().GetAdjust();
+ const SvxAdjust& rAdjust = rInf.GetTextFrm()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust();
if ( rAdjust == SVX_ADJUST_LEFT )
{
// we step back until a non blank character has been found
// or there is only one more character left
- while( nX && nBreakPos > rInf.GetTxt().getLength() &&
+ while( nX && nBreakPos > rInf.GetText().getLength() &&
( CH_BLANK == ( cCutChar = rInf.GetChar( --nX ) ) ||
CH_FULL_BLANK == cCutChar ) )
--nBreakPos;
@@ -233,7 +233,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
if( nBreakPos > rInf.GetIdx() )
nPorLen = nBreakPos - rInf.GetIdx();
- while( ++nCutPos < rInf.GetTxt().getLength() &&
+ while( ++nCutPos < rInf.GetText().getLength() &&
( CH_BLANK == ( cCutChar = rInf.GetChar( nCutPos ) ) ||
CH_FULL_BLANK == cCutChar ) )
; // nothing
@@ -248,7 +248,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// the field portion, we trigger an underflow.
sal_Int32 nOldIdx = rInf.GetIdx();
- sal_Unicode cFldChr = 0;
+ sal_Unicode cFieldChr = 0;
#if OSL_DEBUG_LEVEL > 0
OUString aDebugString;
@@ -256,32 +256,32 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// be careful: a field portion can be both: 0x01 (common field)
// or 0x02 (the follow of a footnode)
- if ( rInf.GetLast() && rInf.GetLast()->InFldGrp() &&
- ! rInf.GetLast()->IsFtnPortion() &&
+ if ( rInf.GetLast() && rInf.GetLast()->InFieldGrp() &&
+ ! rInf.GetLast()->IsFootnotePortion() &&
rInf.GetIdx() > rInf.GetLineStart() &&
CH_TXTATR_BREAKWORD ==
- ( cFldChr = rInf.GetTxt()[ rInf.GetIdx() - 1 ] ) )
+ ( cFieldChr = rInf.GetText()[ rInf.GetIdx() - 1 ] ) )
{
- SwFldPortion* pFld = static_cast<SwFldPortion*>(rInf.GetLast());
- OUString aTxt;
- pFld->GetExpTxt( rInf, aTxt );
+ SwFieldPortion* pField = static_cast<SwFieldPortion*>(rInf.GetLast());
+ OUString aText;
+ pField->GetExpText( rInf, aText );
- if ( !aTxt.isEmpty() )
+ if ( !aText.isEmpty() )
{
- nFieldDiff = aTxt.getLength() - 1;
+ nFieldDiff = aText.getLength() - 1;
nCutPos = nCutPos + nFieldDiff;
nHyphPos = nHyphPos + nFieldDiff;
#if OSL_DEBUG_LEVEL > 0
- aDebugString = rInf.GetTxt();
+ aDebugString = rInf.GetText();
#endif
- OUString& rOldTxt = const_cast<OUString&> (rInf.GetTxt());
- rOldTxt = rOldTxt.replaceAt( rInf.GetIdx() - 1, 1, aTxt );
+ OUString& rOldText = const_cast<OUString&> (rInf.GetText());
+ rOldText = rOldText.replaceAt( rInf.GetIdx() - 1, 1, aText );
rInf.SetIdx( rInf.GetIdx() + nFieldDiff );
}
else
- cFldChr = 0;
+ cFieldChr = 0;
}
LineBreakHyphenationOptions aHyphOpt;
@@ -303,7 +303,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// If we are inside a field portion, we use a temporary string which
// differs from the string at the textnode. Therefore we are not allowed
// to call the GetLang function.
- if ( nCutPos && ! rPor.InFldGrp() )
+ if ( nCutPos && ! rPor.InFieldGrp() )
{
const CharClass& rCC = GetAppCharClass();
@@ -314,40 +314,40 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// step further than the beginning of the expanded field
// (which is the position of the field placeholder in our
// original string).
- const sal_Int32 nDoNotStepOver = CH_TXTATR_BREAKWORD == cFldChr ?
+ const sal_Int32 nDoNotStepOver = CH_TXTATR_BREAKWORD == cFieldChr ?
rInf.GetIdx() - nFieldDiff - 1:
0;
if ( nLangIndex > nDoNotStepOver &&
- rInf.GetTxt().getLength() == nLangIndex )
+ rInf.GetText().getLength() == nLangIndex )
--nLangIndex;
while ( nLangIndex > nDoNotStepOver &&
- ! rCC.isLetterNumeric( rInf.GetTxt(), nLangIndex ) )
+ ! rCC.isLetterNumeric( rInf.GetText(), nLangIndex ) )
--nLangIndex;
// last "real" character is not inside our current portion
// we have to check the script type of the last "real" character
if ( nLangIndex < rInf.GetIdx() )
{
- sal_uInt16 nScript = g_pBreakIt->GetRealScriptOfText( rInf.GetTxt(),
+ sal_uInt16 nScript = g_pBreakIt->GetRealScriptOfText( rInf.GetText(),
nLangIndex );
OSL_ENSURE( nScript, "Script is not between 1 and 4" );
// compare current script with script from last "real" character
if ( nScript - 1 != rInf.GetFont()->GetActual() )
- aLang = rInf.GetTxtFrm()->GetTxtNode()->GetLang(
- CH_TXTATR_BREAKWORD == cFldChr ?
+ aLang = rInf.GetTextFrm()->GetTextNode()->GetLang(
+ CH_TXTATR_BREAKWORD == cFieldChr ?
nDoNotStepOver :
nLangIndex, 0, nScript );
}
}
const ForbiddenCharacters aForbidden(
- *rInf.GetTxtFrm()->GetNode()->getIDocumentSettingAccess()->getForbiddenCharacters( aLang, true ) );
+ *rInf.GetTextFrm()->GetNode()->getIDocumentSettingAccess()->getForbiddenCharacters( aLang, true ) );
const bool bAllowHanging = rInf.IsHanging() && ! rInf.IsMulti() &&
- ! rPor.InFldGrp();
+ ! rPor.InFieldGrp();
LineBreakUserOptions aUserOpt(
aForbidden.beginLine, aForbidden.endLine,
@@ -367,7 +367,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// determines first possible line break from nCutPos to
// start index of current line
LineBreakResults aResult = g_pBreakIt->GetBreakIter()->getLineBreak(
- rInf.GetTxt(), nCutPos, aLocale,
+ rInf.GetText(), nCutPos, aLocale,
rInf.GetLineStart(), aHyphOpt, aUserOpt );
nBreakPos = aResult.breakIndex;
@@ -377,7 +377,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// we have to be careful with footnote portions, they always come in
// with an index 0
if ( nBreakPos < rInf.GetLineStart() && rInf.IsFirstMulti() &&
- ! rInf.IsFtnInside() )
+ ! rInf.IsFootnoteInside() )
nBreakPos = rInf.GetLineStart();
nBreakStart = nBreakPos;
@@ -406,7 +406,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
if( nBreakPos >= rInf.GetIdx() )
{
nPorLen = nBreakPos - rInf.GetIdx();
- if( '-' == rInf.GetTxt()[ nBreakPos - 1 ] )
+ if( '-' == rInf.GetText()[ nBreakPos - 1 ] )
xHyphWord = NULL;
}
}
@@ -420,10 +420,10 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// check, if break position is soft hyphen and an underflow
// has to be triggered
if( nBreakPos > rInf.GetLineStart() && rInf.GetIdx() &&
- CHAR_SOFTHYPHEN == rInf.GetTxt()[ nBreakPos - 1 ] )
+ CHAR_SOFTHYPHEN == rInf.GetText()[ nBreakPos - 1 ] )
nBreakPos = rInf.GetIdx() - 1;
- const SvxAdjust& rAdjust = rInf.GetTxtFrm()->GetTxtNode()->GetSwAttrSet().GetAdjust().GetAdjust();
+ const SvxAdjust& rAdjust = rInf.GetTextFrm()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust();
if( rAdjust != SVX_ADJUST_LEFT )
{
// Delete any blanks at the end of a line, but be careful:
@@ -432,7 +432,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// underflow
sal_Int32 nX = nBreakPos;
while( nX > rInf.GetLineStart() &&
- ( CH_TXTATR_BREAKWORD != cFldChr || nX > rInf.GetIdx() ) &&
+ ( CH_TXTATR_BREAKWORD != cFieldChr || nX > rInf.GetIdx() ) &&
( CH_BLANK == rInf.GetChar( --nX ) ||
CH_FULL_BLANK == rInf.GetChar( nX ) ) )
nBreakPos = nX;
@@ -452,7 +452,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
if( nBreakPos > nCutPos && nBreakPos != COMPLETE_STRING )
{
const sal_Int32 nHangingLen = nBreakPos - nCutPos;
- SwPosSize aTmpSize = rInf.GetTxtSize( &rSI, nCutPos,
+ SwPosSize aTmpSize = rInf.GetTextSize( &rSI, nCutPos,
nHangingLen, 0 );
aTmpSize.Width(aTmpSize.Width() + nLeftRightBorderSpace);
OSL_ENSURE( !pHanging, "A hanging portion is hanging around" );
@@ -466,7 +466,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// value, but we cannot correct the nBreakStart value:
// If we have found a hyphenation position, nBreakStart can lie before
// the field.
- if ( CH_TXTATR_BREAKWORD == cFldChr )
+ if ( CH_TXTATR_BREAKWORD == cFieldChr )
{
if ( nBreakPos < rInf.GetIdx() )
nBreakPos = nOldIdx - 1;
@@ -480,13 +480,13 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
"I've got field trouble, part2!" );
nCutPos = nCutPos - nFieldDiff;
- OUString& rOldTxt = const_cast<OUString&> (rInf.GetTxt());
- OUString aReplacement( cFldChr );
- rOldTxt = rOldTxt.replaceAt( nOldIdx - 1, nFieldDiff + 1, aReplacement);
+ OUString& rOldText = const_cast<OUString&> (rInf.GetText());
+ OUString aReplacement( cFieldChr );
+ rOldText = rOldText.replaceAt( nOldIdx - 1, nFieldDiff + 1, aReplacement);
rInf.SetIdx( nOldIdx );
#if OSL_DEBUG_LEVEL > 0
- OSL_ENSURE( aDebugString == rInf.GetTxt(),
+ OSL_ENSURE( aDebugString == rInf.GetText(),
"Somebody, somebody, somebody put something in my string" );
#endif
}
@@ -494,7 +494,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
if( nPorLen )
{
- rInf.GetTxtSize( &rSI, rInf.GetIdx(), nPorLen,
+ rInf.GetTextSize( &rSI, rInf.GetIdx(), nPorLen,
nMaxComp, nBreakWidth, nMaxSizeDiff,
rInf.GetCachedVclData().get() );
@@ -515,12 +515,12 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// returns true if word at position nPos has a diffenrent spelling
// if hyphenated at this position (old german spelling)
-bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
+bool SwTextGuess::AlternativeSpelling( const SwTextFormatInfo &rInf,
const sal_Int32 nPos )
{
// get word boundaries
Boundary aBound =
- g_pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nPos,
+ g_pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetText(), nPos,
g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
WordType::DICTIONARY_WORD, true );
nBreakStart = aBound.startPos;
@@ -529,13 +529,13 @@ bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
// if everything else fails, we want to cut at nPos
nCutPos = nPos;
- OUString aTxt( rInf.GetTxt().copy( nBreakStart, nWordLen ) );
+ OUString aText( rInf.GetText().copy( nBreakStart, nWordLen ) );
// check, if word has alternative spelling
Reference< XHyphenator > xHyph( ::GetHyphenator() );
OSL_ENSURE( xHyph.is(), "Hyphenator is missing");
//! subtract 1 since the UNO-interface is 0 based
- xHyphWord = xHyph->queryAlternativeSpelling( aTxt,
+ xHyphWord = xHyph->queryAlternativeSpelling( aText,
g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
nPos - nBreakStart, rInf.GetHyphValues() );
return xHyphWord.is() && xHyphWord->isAlternativeSpelling();
diff --git a/sw/source/core/text/guess.hxx b/sw/source/core/text/guess.hxx
index 250868687165..267c7c468636 100644
--- a/sw/source/core/text/guess.hxx
+++ b/sw/source/core/text/guess.hxx
@@ -24,9 +24,9 @@
#include "breakit.hxx"
#include "porrst.hxx"
-class SwTxtFormatInfo;
+class SwTextFormatInfo;
-class SwTxtGuess
+class SwTextGuess
{
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord;
SwHangingPortion *pHanging; // for hanging punctuation
@@ -37,15 +37,15 @@ class SwTxtGuess
// a field in the text has been expanded
sal_uInt16 nBreakWidth; // width of the broken portion
public:
- inline SwTxtGuess(): pHanging( NULL ), nCutPos(0), nBreakStart(0),
+ inline SwTextGuess(): pHanging( NULL ), nCutPos(0), nBreakStart(0),
nBreakPos(0), nFieldDiff(0), nBreakWidth(0)
{ }
- ~SwTxtGuess() { delete pHanging; }
+ ~SwTextGuess() { delete pHanging; }
// true, if current portion still fits to current line
- bool Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
+ bool Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
const sal_uInt16 nHeight );
- bool AlternativeSpelling( const SwTxtFormatInfo &rInf, const sal_Int32 nPos );
+ bool AlternativeSpelling( const SwTextFormatInfo &rInf, const sal_Int32 nPos );
inline SwHangingPortion* GetHangingPortion() const { return pHanging; }
inline void ClearHangingPortion() { pHanging = NULL; }
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 8f2d3f9e93d2..e07a40b037cc 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -87,7 +87,7 @@ using namespace ::com::sun::star::beans;
#define DRAW_SPECIAL_OPTIONS_ROTATE 2
#ifdef DBG_UTIL
-bool SwTxtSizeInfo::IsOptDbg() const { return GetOpt().IsTest4(); }
+bool SwTextSizeInfo::IsOptDbg() const { return GetOpt().IsTest4(); }
#endif
SwLineInfo::SwLineInfo()
@@ -105,11 +105,11 @@ SwLineInfo::~SwLineInfo()
delete pRuler;
}
void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
- const SwTxtNode& rTxtNode )
+ const SwTextNode& rTextNode )
{
delete pRuler;
pRuler = new SvxTabStopItem( rAttrSet.GetTabStops() );
- if ( rTxtNode.GetListTabStopPosition( nListTabStopPosition ) )
+ if ( rTextNode.GetListTabStopPosition( nListTabStopPosition ) )
{
bListTabStopIncluded = true;
@@ -130,7 +130,7 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
}
}
- if ( !rTxtNode.getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT) )
+ if ( !rTextNode.getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT) )
{
// remove default tab stop at position 0
for ( sal_uInt16 i = 0; i < pRuler->Count(); i++ )
@@ -149,26 +149,26 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
nDefTabStop = USHRT_MAX;
}
-void SwTxtInfo::CtorInitTxtInfo( SwTxtFrm *pFrm )
+void SwTextInfo::CtorInitTextInfo( SwTextFrm *pFrm )
{
m_pPara = pFrm->GetPara();
- m_nTxtStart = pFrm->GetOfst();
+ m_nTextStart = pFrm->GetOfst();
if (!m_pPara)
{
- SAL_WARN("sw.core", "+SwTxtInfo::CTOR: missing paragraph information");
+ SAL_WARN("sw.core", "+SwTextInfo::CTOR: missing paragraph information");
pFrm->Format();
m_pPara = pFrm->GetPara();
}
}
-SwTxtInfo::SwTxtInfo( const SwTxtInfo &rInf )
- : m_pPara( const_cast<SwTxtInfo&>(rInf).GetParaPortion() )
- , m_nTxtStart( rInf.GetTxtStart() )
+SwTextInfo::SwTextInfo( const SwTextInfo &rInf )
+ : m_pPara( const_cast<SwTextInfo&>(rInf).GetParaPortion() )
+ , m_nTextStart( rInf.GetTextStart() )
{ }
#if OSL_DEBUG_LEVEL > 0
-void ChkOutDev( const SwTxtSizeInfo &rInf )
+void ChkOutDev( const SwTextSizeInfo &rInf )
{
if ( !rInf.GetVsh() )
return;
@@ -179,26 +179,26 @@ void ChkOutDev( const SwTxtSizeInfo &rInf )
}
#endif
-inline sal_Int32 GetMinLen( const SwTxtSizeInfo &rInf )
+inline sal_Int32 GetMinLen( const SwTextSizeInfo &rInf )
{
- const sal_Int32 nTxtLen = rInf.GetTxt().getLength();
+ const sal_Int32 nTextLen = rInf.GetText().getLength();
if (rInf.GetLen() == COMPLETE_STRING)
- return nTxtLen;
+ return nTextLen;
const sal_Int32 nInfLen = rInf.GetIdx() + rInf.GetLen();
- return std::min(nTxtLen, nInfLen);
+ return std::min(nTextLen, nInfLen);
}
-SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
- : SwTxtInfo( rNew ),
+SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew )
+ : SwTextInfo( rNew ),
m_pKanaComp(rNew.GetpKanaComp()),
- m_pVsh(const_cast<SwTxtSizeInfo&>(rNew).GetVsh()),
- m_pOut(const_cast<SwTxtSizeInfo&>(rNew).GetOut()),
- m_pRef(const_cast<SwTxtSizeInfo&>(rNew).GetRefDev()),
- m_pFnt(const_cast<SwTxtSizeInfo&>(rNew).GetFont()),
+ m_pVsh(const_cast<SwTextSizeInfo&>(rNew).GetVsh()),
+ m_pOut(const_cast<SwTextSizeInfo&>(rNew).GetOut()),
+ m_pRef(const_cast<SwTextSizeInfo&>(rNew).GetRefDev()),
+ m_pFnt(const_cast<SwTextSizeInfo&>(rNew).GetFont()),
m_pUnderFnt(rNew.GetUnderFnt()),
m_pFrm(rNew.m_pFrm),
m_pOpt(&rNew.GetOpt()),
- m_pTxt(&rNew.GetTxt()),
+ m_pText(&rNew.GetText()),
m_nIdx(rNew.GetIdx()),
m_nLen(rNew.GetLen()),
m_nKanaIdx( rNew.GetKanaIdx() ),
@@ -206,8 +206,8 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
m_bNotEOL( rNew.NotEOL() ),
m_bURLNotify( rNew.URLNotify() ),
m_bStopUnderflow( rNew.StopUnderflow() ),
- m_bFtnInside( rNew.IsFtnInside() ),
- m_bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ),
+ m_bFootnoteInside( rNew.IsFootnoteInside() ),
+ m_bOtherThanFootnoteInside( rNew.IsOtherThanFootnoteInside() ),
m_bMulti( rNew.IsMulti() ),
m_bFirstMulti( rNew.IsFirstMulti() ),
m_bRuby( rNew.IsRuby() ),
@@ -222,14 +222,14 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
#endif
}
-void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
+void SwTextSizeInfo::CtorInitTextSizeInfo( SwTextFrm *pFrame, SwFont *pNewFnt,
const sal_Int32 nNewIdx, const sal_Int32 nNewLen )
{
m_pKanaComp = NULL;
m_nKanaIdx = 0;
m_pFrm = pFrame;
- CtorInitTxtInfo( m_pFrm );
- const SwTxtNode *pNd = m_pFrm->GetTxtNode();
+ CtorInitTextInfo( m_pFrm );
+ const SwTextNode *pNd = m_pFrm->GetTextNode();
m_pVsh = m_pFrm->getRootFrm()->GetCurrShell();
// Get the output and reference device
@@ -286,30 +286,30 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
m_pFnt = pNewFnt;
m_pUnderFnt = 0;
- m_pTxt = &pNd->GetTxt();
+ m_pText = &pNd->GetText();
m_nIdx = nNewIdx;
m_nLen = nNewLen;
m_bNotEOL = false;
- m_bStopUnderflow = m_bFtnInside = m_bOtherThanFtnInside = false;
+ m_bStopUnderflow = m_bFootnoteInside = m_bOtherThanFootnoteInside = false;
m_bMulti = m_bFirstMulti = m_bRuby = m_bHanging = m_bScriptSpace =
m_bForbiddenChars = false;
SetLen( GetMinLen( *this ) );
}
-SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const OUString* pTxt,
+SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew, const OUString* pText,
const sal_Int32 nIndex, const sal_Int32 nLength )
- : SwTxtInfo( rNew ),
+ : SwTextInfo( rNew ),
m_pKanaComp(rNew.GetpKanaComp()),
- m_pVsh(const_cast<SwTxtSizeInfo&>(rNew).GetVsh()),
- m_pOut(const_cast<SwTxtSizeInfo&>(rNew).GetOut()),
- m_pRef(const_cast<SwTxtSizeInfo&>(rNew).GetRefDev()),
- m_pFnt(const_cast<SwTxtSizeInfo&>(rNew).GetFont()),
+ m_pVsh(const_cast<SwTextSizeInfo&>(rNew).GetVsh()),
+ m_pOut(const_cast<SwTextSizeInfo&>(rNew).GetOut()),
+ m_pRef(const_cast<SwTextSizeInfo&>(rNew).GetRefDev()),
+ m_pFnt(const_cast<SwTextSizeInfo&>(rNew).GetFont()),
m_pUnderFnt(rNew.GetUnderFnt()),
m_pFrm( rNew.m_pFrm ),
m_pOpt(&rNew.GetOpt()),
- m_pTxt(pTxt),
+ m_pText(pText),
m_nIdx(nIndex),
m_nLen(nLength),
m_nKanaIdx( rNew.GetKanaIdx() ),
@@ -317,8 +317,8 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const OUString* pTxt,
m_bNotEOL( rNew.NotEOL() ),
m_bURLNotify( rNew.URLNotify() ),
m_bStopUnderflow( rNew.StopUnderflow() ),
- m_bFtnInside( rNew.IsFtnInside() ),
- m_bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ),
+ m_bFootnoteInside( rNew.IsFootnoteInside() ),
+ m_bOtherThanFootnoteInside( rNew.IsOtherThanFootnoteInside() ),
m_bMulti( rNew.IsMulti() ),
m_bFirstMulti( rNew.IsFirstMulti() ),
m_bRuby( rNew.IsRuby() ),
@@ -334,7 +334,7 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const OUString* pTxt,
SetLen( GetMinLen( *this ) );
}
-void SwTxtSizeInfo::SelectFont()
+void SwTextSizeInfo::SelectFont()
{
// The path needs to go via ChgPhysFnt or the FontMetricCache gets confused.
// In this case pLastMet has it's old value.
@@ -343,31 +343,31 @@ void SwTxtSizeInfo::SelectFont()
GetFont()->ChgPhysFnt( m_pVsh, *GetOut() );
}
-void SwTxtSizeInfo::NoteAnimation() const
+void SwTextSizeInfo::NoteAnimation() const
{
if( OnWin() )
SwRootFrm::FlushVout();
OSL_ENSURE( m_pOut == m_pVsh->GetOut(),
- "SwTxtSizeInfo::NoteAnimation() changed m_pOut" );
+ "SwTextSizeInfo::NoteAnimation() changed m_pOut" );
}
-SwPosSize SwTxtSizeInfo::GetTxtSize( OutputDevice* pOutDev,
+SwPosSize SwTextSizeInfo::GetTextSize( OutputDevice* pOutDev,
const SwScriptInfo* pSI,
- const OUString& rTxt,
+ const OUString& rText,
const sal_Int32 nIndex,
const sal_Int32 nLength,
const sal_uInt16 nComp) const
{
- SwDrawTextInfo aDrawInf( m_pVsh, *pOutDev, pSI, rTxt, nIndex, nLength );
+ SwDrawTextInfo aDrawInf( m_pVsh, *pOutDev, pSI, rText, nIndex, nLength );
aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
- return m_pFnt->_GetTxtSize( aDrawInf );
+ return m_pFnt->_GetTextSize( aDrawInf );
}
-SwPosSize SwTxtSizeInfo::GetTxtSize() const
+SwPosSize SwTextSizeInfo::GetTextSize() const
{
const SwScriptInfo& rSI =
const_cast<SwParaPortion*>(GetParaPortion())->GetScriptInfo();
@@ -380,31 +380,31 @@ SwPosSize SwTxtSizeInfo::GetTxtSize() const
GetKanaComp() :
0 ;
- SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rSI, *m_pTxt, m_nIdx, m_nLen );
+ SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rSI, *m_pText, m_nIdx, m_nLen );
aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
- return m_pFnt->_GetTxtSize( aDrawInf );
+ return m_pFnt->_GetTextSize( aDrawInf );
}
-void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const sal_Int32 nIndex,
+void SwTextSizeInfo::GetTextSize( const SwScriptInfo* pSI, const sal_Int32 nIndex,
const sal_Int32 nLength, const sal_uInt16 nComp,
sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff,
vcl::TextLayoutCache const*const pCache) const
{
- SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, pSI, *m_pTxt, nIndex, nLength,
+ SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, pSI, *m_pText, nIndex, nLength,
0, false, pCache);
aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
- SwPosSize aSize = m_pFnt->_GetTxtSize( aDrawInf );
+ SwPosSize aSize = m_pFnt->_GetTextSize( aDrawInf );
nMaxSizeDiff = (sal_uInt16)aDrawInf.GetKanaDiff();
nMinSize = aSize.Width();
}
-sal_Int32 SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
+sal_Int32 SwTextSizeInfo::GetTextBreak( const long nLineWidth,
const sal_Int32 nMaxLen,
const sal_uInt16 nComp,
vcl::TextLayoutCache const*const pCache) const
@@ -412,19 +412,19 @@ sal_Int32 SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const SwScriptInfo& rScriptInfo =
const_cast<SwParaPortion*>(GetParaPortion())->GetScriptInfo();
- OSL_ENSURE( m_pRef == m_pOut, "GetTxtBreak is supposed to use the RefDev" );
+ OSL_ENSURE( m_pRef == m_pOut, "GetTextBreak is supposed to use the RefDev" );
SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo,
- *m_pTxt, GetIdx(), nMaxLen, 0, false, pCache );
+ *m_pText, GetIdx(), nMaxLen, 0, false, pCache );
aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
aDrawInf.SetHyphPos( 0 );
- return m_pFnt->GetTxtBreak( aDrawInf, nLineWidth );
+ return m_pFnt->GetTextBreak( aDrawInf, nLineWidth );
}
-sal_Int32 SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
+sal_Int32 SwTextSizeInfo::GetTextBreak( const long nLineWidth,
const sal_Int32 nMaxLen,
const sal_uInt16 nComp,
sal_Int32& rExtraCharPos,
@@ -433,27 +433,27 @@ sal_Int32 SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const SwScriptInfo& rScriptInfo =
const_cast<SwParaPortion*>(GetParaPortion())->GetScriptInfo();
- OSL_ENSURE( m_pRef == m_pOut, "GetTxtBreak is supposed to use the RefDev" );
+ OSL_ENSURE( m_pRef == m_pOut, "GetTextBreak is supposed to use the RefDev" );
SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo,
- *m_pTxt, GetIdx(), nMaxLen, 0, false, pCache );
+ *m_pText, GetIdx(), nMaxLen, 0, false, pCache );
aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
aDrawInf.SetHyphPos( &rExtraCharPos );
- return m_pFnt->GetTxtBreak( aDrawInf, nLineWidth );
+ return m_pFnt->GetTextBreak( aDrawInf, nLineWidth );
}
-bool SwTxtSizeInfo::_HasHint( const SwTxtNode* pTxtNode, sal_Int32 nPos )
+bool SwTextSizeInfo::_HasHint( const SwTextNode* pTextNode, sal_Int32 nPos )
{
- return pTxtNode->GetTxtAttrForCharAt(nPos);
+ return pTextNode->GetTextAttrForCharAt(nPos);
}
-void SwTxtPaintInfo::CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPaint )
+void SwTextPaintInfo::CtorInitTextPaintInfo( SwTextFrm *pFrame, const SwRect &rPaint )
{
- CtorInitTxtSizeInfo( pFrame );
- aTxtFly.CtorInitTxtFly( pFrame ),
+ CtorInitTextSizeInfo( pFrame );
+ aTextFly.CtorInitTextFly( pFrame ),
aPaintRect = rPaint;
nSpaceIdx = 0;
pSpaceAdd = NULL;
@@ -468,27 +468,27 @@ void SwTxtPaintInfo::CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPain
#endif
}
-SwTxtPaintInfo::SwTxtPaintInfo( const SwTxtPaintInfo &rInf, const OUString* pTxt )
- : SwTxtSizeInfo( rInf, pTxt ),
+SwTextPaintInfo::SwTextPaintInfo( const SwTextPaintInfo &rInf, const OUString* pText )
+ : SwTextSizeInfo( rInf, pText ),
pWrongList( rInf.GetpWrongList() ),
pGrammarCheckList( rInf.GetGrammarCheckList() ),
pSmartTags( rInf.GetSmartTags() ),
pSpaceAdd( rInf.GetpSpaceAdd() ),
pBrushItem( rInf.GetBrushItem() ),
- aTxtFly( rInf.GetTxtFly() ),
+ aTextFly( rInf.GetTextFly() ),
aPos( rInf.GetPos() ),
aPaintRect( rInf.GetPaintRect() ),
nSpaceIdx( rInf.GetSpaceIdx() )
{ }
-SwTxtPaintInfo::SwTxtPaintInfo( const SwTxtPaintInfo &rInf )
- : SwTxtSizeInfo( rInf ),
+SwTextPaintInfo::SwTextPaintInfo( const SwTextPaintInfo &rInf )
+ : SwTextSizeInfo( rInf ),
pWrongList( rInf.GetpWrongList() ),
pGrammarCheckList( rInf.GetGrammarCheckList() ),
pSmartTags( rInf.GetSmartTags() ),
pSpaceAdd( rInf.GetpSpaceAdd() ),
pBrushItem( rInf.GetBrushItem() ),
- aTxtFly( rInf.GetTxtFly() ),
+ aTextFly( rInf.GetTextFly() ),
aPos( rInf.GetPos() ),
aPaintRect( rInf.GetPaintRect() ),
nSpaceIdx( rInf.GetSpaceIdx() )
@@ -497,7 +497,7 @@ SwTxtPaintInfo::SwTxtPaintInfo( const SwTxtPaintInfo &rInf )
extern Color aGlobalRetoucheColor;
/// Returns if the current background color is dark.
-static bool lcl_IsDarkBackground( const SwTxtPaintInfo& rInf )
+static bool lcl_IsDarkBackground( const SwTextPaintInfo& rInf )
{
const Color* pCol = rInf.GetFont()->GetBackColor();
if( ! pCol || COL_TRANSPARENT == pCol->GetColor() )
@@ -512,7 +512,7 @@ static bool lcl_IsDarkBackground( const SwTxtPaintInfo& rInf )
// See implementation in /core/layout/paintfrm.cxx
// There is a background color, if there is a background brush and
// its color is *not* "no fill"/"auto fill".
- if( rInf.GetTxtFrm()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) )
+ if( rInf.GetTextFrm()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) )
{
if ( !pCol )
pCol = &pItem->GetColor();
@@ -531,7 +531,7 @@ static bool lcl_IsDarkBackground( const SwTxtPaintInfo& rInf )
return pCol->IsDark();
}
-void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor,
+void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor,
const sal_Int32 nStart, const sal_Int32 nLength,
const bool bKern, const bool bWrong,
const bool bSmartTag,
@@ -543,7 +543,7 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
if( GetFont()->IsBlink() && OnWin() && rPor.Width() )
{
// check if accessibility options allow blinking portions:
- const SwViewShell* pSh = GetTxtFrm()->getRootFrm()->GetCurrShell();
+ const SwViewShell* pSh = GetTextFrm()->getRootFrm()->GetCurrShell();
if ( pSh && ! pSh->GetAccessibilityOptions()->IsStopAnimatedText() &&
! pSh->IsPreview() )
{
@@ -552,16 +552,16 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
Point aPoint( aPos );
- if ( GetTxtFrm()->IsRightToLeft() )
- GetTxtFrm()->SwitchLTRtoRTL( aPoint );
+ if ( GetTextFrm()->IsRightToLeft() )
+ GetTextFrm()->SwitchLTRtoRTL( aPoint );
if ( TEXT_LAYOUT_BIDI_STRONG != GetOut()->GetLayoutMode() )
aPoint.X() -= rPor.Width();
- if ( GetTxtFrm()->IsVertical() )
- GetTxtFrm()->SwitchHorizontalToVertical( aPoint );
+ if ( GetTextFrm()->IsVertical() )
+ GetTextFrm()->SwitchHorizontalToVertical( aPoint );
- pBlink->Insert( aPoint, &rPor, GetTxtFrm(), m_pFnt->GetOrientation() );
+ pBlink->Insert( aPoint, &rPor, GetTextFrm(), m_pFnt->GetOrientation() );
if( !pBlink->IsVisible() )
return;
@@ -575,7 +575,7 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
// The SwScriptInfo is useless if we are inside a field portion
SwScriptInfo* pSI = 0;
- if ( ! rPor.InFldGrp() )
+ if ( ! rPor.InFieldGrp() )
pSI = &GetParaPortion()->GetScriptInfo();
// in some cases, kana compression is not allowed or suppressed for
@@ -607,8 +607,8 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
sal_Int32 nCharCnt = 0;
// #i41860# Thai justified alignment needs some
// additional information:
- aDrawInf.SetNumberOfBlanks( rPor.InTxtGrp() ?
- static_cast<const SwTxtPortion&>(rPor).GetSpaceCnt( *this, nCharCnt ) :
+ aDrawInf.SetNumberOfBlanks( rPor.InTextGrp() ?
+ static_cast<const SwTextPortion&>(rPor).GetSpaceCnt( *this, nCharCnt ) :
0 );
}
@@ -618,7 +618,7 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
// the font is used to identify the current script via nActual
aDrawInf.SetFont( m_pFnt );
// the frame is used to identify the orientation
- aDrawInf.SetFrm( GetTxtFrm() );
+ aDrawInf.SetFrm( GetTextFrm() );
// we have to know if the paragraph should snap to grid
aDrawInf.SetSnapToGrid( SnapToGrid() );
// for underlining we must know when not to add extra space behind
@@ -629,16 +629,16 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
// Draw text next to the left border
Point aFontPos(aPos);
- if( m_pFnt->GetLeftBorder() && !static_cast<const SwTxtPortion&>(rPor).GetJoinBorderWithPrev() )
+ if( m_pFnt->GetLeftBorder() && !static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithPrev() )
{
const sal_uInt16 nLeftBorderSpace = m_pFnt->GetLeftBorderSpace();
- if ( GetTxtFrm()->IsRightToLeft() )
+ if ( GetTextFrm()->IsRightToLeft() )
{
aFontPos.X() -= nLeftBorderSpace;
}
else
{
- switch( m_pFnt->GetOrientation(GetTxtFrm()->IsVertical()) )
+ switch( m_pFnt->GetOrientation(GetTextFrm()->IsVertical()) )
{
case 0 :
aFontPos.X() += nLeftBorderSpace;
@@ -660,7 +660,7 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
aFontPos.X() = 0;
}
- if( GetTxtFly().IsOn() )
+ if( GetTextFly().IsOn() )
{
// aPos needs to be the TopLeft, because we cannot calculate the
// ClipRects otherwise
@@ -673,7 +673,7 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
aDrawInf.SetWrong( bTmpWrong ? pWrongList : NULL );
aDrawInf.SetGrammarCheck( bTmpGrammarCheck ? pGrammarCheckList : NULL );
aDrawInf.SetSmartTags( bTmpSmart ? pSmartTags : NULL );
- GetTxtFly().DrawTextOpaque( aDrawInf );
+ GetTextFly().DrawTextOpaque( aDrawInf );
}
else
{
@@ -690,7 +690,7 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
}
}
-void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
+void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor,
SwRect* pRect, SwRect* pIntersect,
const bool bInsideBox ) const
{
@@ -700,7 +700,7 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
if( rPor.InSpaceGrp() && GetSpaceAdd() )
{
SwTwips nAdd = rPor.CalcSpacing( GetSpaceAdd(), *this );
- if( rPor.InFldGrp() && GetSpaceAdd() < 0 && nAdd )
+ if( rPor.InFieldGrp() && GetSpaceAdd() < 0 && nAdd )
nAdd += GetSpaceAdd() / SPACING_PRECISION_FACTOR;
aSize.Width() += nAdd;
}
@@ -726,14 +726,14 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
else
{
aPoint.A() = X();
- if ( GetTxtFrm()->IsVertLR() )
+ if ( GetTextFrm()->IsVertLR() )
aPoint.B() = Y() - rPor.Height() + rPor.GetAscent();
else
aPoint.B() = Y() - rPor.GetAscent();
}
// Adjust x coordinate if we are inside a bidi portion
- const bool bFrmDir = GetTxtFrm()->IsRightToLeft();
+ const bool bFrmDir = GetTextFrm()->IsRightToLeft();
const bool bCounterDir = ( !bFrmDir && DIR_RIGHT2LEFT == GetDirection() ) ||
( bFrmDir && DIR_LEFT2RIGHT == GetDirection() );
@@ -742,19 +742,19 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
SwRect aRect( aPoint, aSize );
- if ( GetTxtFrm()->IsRightToLeft() )
- GetTxtFrm()->SwitchLTRtoRTL( aRect );
+ if ( GetTextFrm()->IsRightToLeft() )
+ GetTextFrm()->SwitchLTRtoRTL( aRect );
- if ( GetTxtFrm()->IsVertical() )
- GetTxtFrm()->SwitchHorizontalToVertical( aRect );
+ if ( GetTextFrm()->IsVertical() )
+ GetTextFrm()->SwitchHorizontalToVertical( aRect );
- if( bInsideBox && rPor.InTxtGrp() )
+ if( bInsideBox && rPor.InTextGrp() )
{
const bool bJoinWithPrev =
- static_cast<const SwTxtPortion&>(rPor).GetJoinBorderWithPrev();
+ static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithPrev();
const bool bJoinWithNext =
- static_cast<const SwTxtPortion&>(rPor).GetJoinBorderWithNext();
- const bool bIsVert = GetTxtFrm()->IsVertical();
+ static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithNext();
+ const bool bIsVert = GetTextFrm()->IsVertical();
aRect.Top(aRect.Top() + GetFont()->CalcShadowSpace(SvxShadowItemSide::TOP, bIsVert, bJoinWithPrev, bJoinWithNext ));
aRect.Bottom(aRect.Bottom() - GetFont()->CalcShadowSpace(SvxShadowItemSide::BOTTOM, bIsVert, bJoinWithPrev, bJoinWithNext ));
aRect.Left(aRect.Left() + GetFont()->CalcShadowSpace(SvxShadowItemSide::LEFT, bIsVert, bJoinWithPrev, bJoinWithNext ));
@@ -788,7 +788,7 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
* @param bCenter Draw the character centered, otherwise left aligned
* @param bRotate Rotate the character if character rotation is set
*/
-static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rPor,
+static void lcl_DrawSpecial( const SwTextPaintInfo& rInf, const SwLinePortion& rPor,
SwRect& rRect, const Color& rCol, sal_Unicode cChar,
sal_uInt8 nOptions )
{
@@ -796,10 +796,10 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
bool bRotate = 0 != ( nOptions & DRAW_SPECIAL_OPTIONS_ROTATE );
// rRect is given in absolute coordinates
- if ( rInf.GetTxtFrm()->IsRightToLeft() )
- rInf.GetTxtFrm()->SwitchRTLtoLTR( rRect );
- if ( rInf.GetTxtFrm()->IsVertical() )
- rInf.GetTxtFrm()->SwitchVerticalToHorizontal( rRect );
+ if ( rInf.GetTextFrm()->IsRightToLeft() )
+ rInf.GetTextFrm()->SwitchRTLtoLTR( rRect );
+ if ( rInf.GetTextFrm()->IsVertical() )
+ rInf.GetTextFrm()->SwitchVerticalToHorizontal( rRect );
const SwFont* pOldFnt = rInf.GetFont();
@@ -816,7 +816,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
// Some of the current values are set at the font:
if ( ! bRotate )
- m_pFnt->SetVertical( 0, rInf.GetTxtFrm()->IsVertical() );
+ m_pFnt->SetVertical( 0, rInf.GetTextFrm()->IsVertical() );
else
m_pFnt->SetVertical( pOldFnt->GetOrientation() );
@@ -825,10 +825,10 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
Size aFontSize( 0, SPECIAL_FONT_HEIGHT );
m_pFnt->SetSize( aFontSize, m_pFnt->GetActual() );
- const_cast<SwTxtPaintInfo&>(rInf).SetFont( m_pFnt );
+ const_cast<SwTextPaintInfo&>(rInf).SetFont( m_pFnt );
// The maximum width depends on the current orientation
- const sal_uInt16 nDir = m_pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ const sal_uInt16 nDir = m_pFnt->GetOrientation( rInf.GetTextFrm()->IsVertical() );
SwTwips nMaxWidth;
if (nDir == 900 || nDir == 2700)
nMaxWidth = rRect.Height();
@@ -840,7 +840,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
// check if char fits into rectangle
const OUString aTmp( cChar );
- aFontSize = rInf.GetTxtSize( aTmp ).SvLSize();
+ aFontSize = rInf.GetTextSize( aTmp ).SvLSize();
while ( aFontSize.Width() > nMaxWidth )
{
SwTwips nFactor = ( 100 * aFontSize.Width() ) / nMaxWidth;
@@ -856,7 +856,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
m_pFnt->SetSize( aFontSize, nAct );
- aFontSize = rInf.GetTxtSize( aTmp ).SvLSize();
+ aFontSize = rInf.GetTextSize( aTmp ).SvLSize();
if ( aFontSize.Width() >= nOldWidth )
break;
@@ -887,22 +887,22 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
}
Point aTmpPos( nX, nY );
- const_cast<SwTxtPaintInfo&>(rInf).SetPos( aTmpPos );
+ const_cast<SwTextPaintInfo&>(rInf).SetPos( aTmpPos );
sal_uInt16 nOldWidth = rPor.Width();
const_cast<SwLinePortion&>(rPor).Width( (sal_uInt16)aFontSize.Width() );
rInf.DrawText( aTmp, rPor );
const_cast<SwLinePortion&>(rPor).Width( nOldWidth );
- const_cast<SwTxtPaintInfo&>(rInf).SetFont( const_cast<SwFont*>(pOldFnt) );
- const_cast<SwTxtPaintInfo&>(rInf).SetPos( aOldPos );
+ const_cast<SwTextPaintInfo&>(rInf).SetFont( const_cast<SwFont*>(pOldFnt) );
+ const_cast<SwTextPaintInfo&>(rInf).SetPos( aOldPos );
}
-void SwTxtPaintInfo::DrawRect( const SwRect &rRect, bool bNoGraphic,
+void SwTextPaintInfo::DrawRect( const SwRect &rRect, bool bNoGraphic,
bool bRetouche ) const
{
if ( OnWin() || !bRetouche )
{
- if( aTxtFly.IsOn() )
- const_cast<SwTxtPaintInfo*>(this)->GetTxtFly().
+ if( aTextFly.IsOn() )
+ const_cast<SwTextPaintInfo*>(this)->GetTextFly().
DrawFlyRect( m_pOut, rRect, *this, bNoGraphic );
else if ( bNoGraphic )
m_pOut->DrawRect( rRect.SVRect() );
@@ -920,7 +920,7 @@ void SwTxtPaintInfo::DrawRect( const SwRect &rRect, bool bNoGraphic,
}
}
-void SwTxtPaintInfo::DrawTab( const SwLinePortion &rPor ) const
+void SwTextPaintInfo::DrawTab( const SwLinePortion &rPor ) const
{
if( OnWin() )
{
@@ -930,14 +930,14 @@ void SwTxtPaintInfo::DrawTab( const SwLinePortion &rPor ) const
if ( ! aRect.HasArea() )
return;
- const sal_Unicode cChar = GetTxtFrm()->IsRightToLeft() ? CHAR_TAB_RTL : CHAR_TAB;
+ const sal_Unicode cChar = GetTextFrm()->IsRightToLeft() ? CHAR_TAB_RTL : CHAR_TAB;
const sal_uInt8 nOptions = DRAW_SPECIAL_OPTIONS_CENTER | DRAW_SPECIAL_OPTIONS_ROTATE;
lcl_DrawSpecial( *this, rPor, aRect, Color(NON_PRINTING_CHARACTER_COLOR), cChar, nOptions );
}
}
-void SwTxtPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
+void SwTextPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
{
if( OnWin() )
{
@@ -949,7 +949,7 @@ void SwTxtPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
if( aRect.HasArea() )
{
- const sal_Unicode cChar = GetTxtFrm()->IsRightToLeft() ?
+ const sal_Unicode cChar = GetTextFrm()->IsRightToLeft() ?
CHAR_LINEBREAK_RTL : CHAR_LINEBREAK;
const sal_uInt8 nOptions = 0;
@@ -960,7 +960,7 @@ void SwTxtPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
}
}
-void SwTxtPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
+void SwTextPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
{
Size aSize( SPECIAL_FONT_HEIGHT, SPECIAL_FONT_HEIGHT );
SwRect aRect( static_cast<const SwArrowPortion&>(rPor).GetPos(), aSize );
@@ -982,8 +982,8 @@ void SwTxtPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
cChar = CHAR_RIGHT_ARROW;
}
- if ( GetTxtFrm()->IsVertical() )
- GetTxtFrm()->SwitchHorizontalToVertical( aRect );
+ if ( GetTextFrm()->IsVertical() )
+ GetTextFrm()->SwitchHorizontalToVertical( aRect );
Color aCol( COL_LIGHTRED );
@@ -994,7 +994,7 @@ void SwTxtPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
}
}
-void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const
+void SwTextPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const
{
if( OnWin() && m_pOpt->IsPostIts() )
{
@@ -1005,7 +1005,7 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const
const sal_uInt16 nFontHeight = m_pFnt->GetHeight( m_pVsh, *GetOut() );
const sal_uInt16 nFontAscent = m_pFnt->GetAscent( m_pVsh, *GetOut() );
- switch ( m_pFnt->GetOrientation( GetTxtFrm()->IsVertical() ) )
+ switch ( m_pFnt->GetOrientation( GetTextFrm()->IsVertical() ) )
{
case 0 :
aSize.Width() = nPostItsWidth;
@@ -1030,18 +1030,18 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const
SwRect aTmpRect( aTmp, aSize );
- if ( GetTxtFrm()->IsRightToLeft() )
- GetTxtFrm()->SwitchLTRtoRTL( aTmpRect );
+ if ( GetTextFrm()->IsRightToLeft() )
+ GetTextFrm()->SwitchLTRtoRTL( aTmpRect );
- if ( GetTxtFrm()->IsVertical() )
- GetTxtFrm()->SwitchHorizontalToVertical( aTmpRect );
+ if ( GetTextFrm()->IsVertical() )
+ GetTextFrm()->SwitchHorizontalToVertical( aTmpRect );
const Rectangle aRect( aTmpRect.SVRect() );
SwViewOption::PaintPostIts( const_cast<OutputDevice*>(GetOut()), aRect, bScript );
}
}
-void SwTxtPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const
+void SwTextPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const
{
SwRect aIntersect;
CalcRect( rPor, &aIntersect, 0 );
@@ -1072,9 +1072,9 @@ void SwTxtPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool b
}
}
-void SwTxtPaintInfo::DrawBackground( const SwLinePortion &rPor ) const
+void SwTextPaintInfo::DrawBackground( const SwLinePortion &rPor ) const
{
- OSL_ENSURE( OnWin(), "SwTxtPaintInfo::DrawBackground: printer pollution ?" );
+ OSL_ENSURE( OnWin(), "SwTextPaintInfo::DrawBackground: printer pollution ?" );
SwRect aIntersect;
CalcRect( rPor, 0, &aIntersect, true );
@@ -1100,14 +1100,14 @@ void SwTxtPaintInfo::DrawBackground( const SwLinePortion &rPor ) const
}
}
-void SwTxtPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
+void SwTextPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
{
{
SwRect aIntersect;
CalcRect( rPor, &aIntersect, 0, true );
if(aIntersect.HasArea())
{
- SwTxtNode *pNd = m_pFrm->GetTxtNode();
+ SwTextNode *pNd = m_pFrm->GetTextNode();
const ::sw::mark::IMark* pFieldmark = NULL;
if(pNd)
{
@@ -1119,7 +1119,7 @@ void SwTxtPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
pFieldmark=doc->getIDocumentMarkAccess()->getFieldmarkFor(aPosition);
}
}
- bool bIsStartMark=(1==GetLen() && CH_TXT_ATR_FIELDSTART==GetTxt()[GetIdx()]);
+ bool bIsStartMark=(1==GetLen() && CH_TXT_ATR_FIELDSTART==GetText()[GetIdx()]);
if(pFieldmark) {
OSL_TRACE("Found Fieldmark");
SAL_INFO("sw.core", pFieldmark->ToString() << "\n");
@@ -1173,19 +1173,19 @@ void SwTxtPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
}
}
-void SwTxtPaintInfo::DrawBorder( const SwLinePortion &rPor ) const
+void SwTextPaintInfo::DrawBorder( const SwLinePortion &rPor ) const
{
SwRect aDrawArea;
CalcRect( rPor, &aDrawArea );
if ( aDrawArea.HasArea() )
{
PaintCharacterBorder(
- *m_pFnt, aDrawArea, GetTxtFrm()->IsVertical(),
+ *m_pFnt, aDrawArea, GetTextFrm()->IsVertical(),
rPor.GetJoinBorderWithPrev(), rPor.GetJoinBorderWithNext());
}
}
-void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
+void SwTextPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
const sal_uInt16 nWhich ) const
{
if( OnWin() && !IsMulti() )
@@ -1207,7 +1207,7 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
&& !GetOpt().IsReadonly()
&& SwViewOption::IsFieldShadings()
&& ( POR_NUMBER != nWhich
- || m_pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
+ || m_pFrm->GetTextNode()->HasMarkedLabel())) // #i27615#
{
bDraw = true;
}
@@ -1225,7 +1225,7 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
case POR_BLANK: if ( GetOpt().IsHardBlank())bDraw = true; break;
default:
{
- OSL_ENSURE( false, "SwTxtPaintInfo::DrawViewOpt: don't know how to draw this" );
+ OSL_ENSURE( false, "SwTextPaintInfo::DrawViewOpt: don't know how to draw this" );
break;
}
}
@@ -1234,7 +1234,7 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
}
}
-void SwTxtPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const
+void SwTextPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const
{
OSL_ENSURE( pNoteURL, "NotifyURL: pNoteURL gone with the wind!" );
@@ -1243,13 +1243,13 @@ void SwTxtPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const
if( aIntersect.HasArea() )
{
- SwTxtNode *pNd = const_cast<SwTxtNode*>(GetTxtFrm()->GetTxtNode());
- SwTxtAttr *const pAttr =
- pNd->GetTxtAttrAt(GetIdx(), RES_TXTATR_INETFMT);
+ SwTextNode *pNd = const_cast<SwTextNode*>(GetTextFrm()->GetTextNode());
+ SwTextAttr *const pAttr =
+ pNd->GetTextAttrAt(GetIdx(), RES_TXTATR_INETFMT);
if( pAttr )
{
- const SwFmtINetFmt& rFmt = pAttr->GetINetFmt();
- pNoteURL->InsertURLNote( rFmt.GetValue(), rFmt.GetTargetFrame(),
+ const SwFormatINetFormat& rFormat = pAttr->GetINetFormat();
+ pNoteURL->InsertURLNote( rFormat.GetValue(), rFormat.GetTargetFrame(),
aIntersect );
}
}
@@ -1284,16 +1284,16 @@ static void lcl_InitHyphValues( PropertyValues &rVals,
}
}
-const PropertyValues & SwTxtFormatInfo::GetHyphValues() const
+const PropertyValues & SwTextFormatInfo::GetHyphValues() const
{
OSL_ENSURE( 2 == aHyphVals.getLength(),
"hyphenation values not yet initialized" );
return aHyphVals;
}
-bool SwTxtFormatInfo::InitHyph( const bool bAutoHyphen )
+bool SwTextFormatInfo::InitHyph( const bool bAutoHyphen )
{
- const SwAttrSet& rAttrSet = GetTxtFrm()->GetTxtNode()->GetSwAttrSet();
+ const SwAttrSet& rAttrSet = GetTextFrm()->GetTextNode()->GetSwAttrSet();
SetHanging( rAttrSet.GetHangingPunctuation().GetValue() );
SetScriptSpace( rAttrSet.GetScriptSpace().GetValue() );
SetForbiddenChars( rAttrSet.GetForbiddenRule().GetValue() );
@@ -1309,10 +1309,10 @@ bool SwTxtFormatInfo::InitHyph( const bool bAutoHyphen )
return bAuto;
}
-void SwTxtFormatInfo::CtorInitTxtFormatInfo( SwTxtFrm *pNewFrm, const bool bNewInterHyph,
+void SwTextFormatInfo::CtorInitTextFormatInfo( SwTextFrm *pNewFrm, const bool bNewInterHyph,
const bool bNewQuick, const bool bTst )
{
- CtorInitTxtPaintInfo( pNewFrm, SwRect() );
+ CtorInitTextPaintInfo( pNewFrm, SwRect() );
bQuick = bNewQuick;
bInterHyph = bNewInterHyph;
@@ -1347,7 +1347,7 @@ void SwTxtFormatInfo::CtorInitTxtFormatInfo( SwTxtFrm *pNewFrm, const bool bNewI
// set digit mode to what will be used later to get same results
SwDigitModeModifier const m(*m_pRef, LANGUAGE_NONE /*dummy*/);
assert(m_pRef->GetDigitLanguage() != LANGUAGE_NONE);
- SetCachedVclData(m_pRef->CreateTextLayoutCache(*m_pTxt));
+ SetCachedVclData(m_pRef->CreateTextLayoutCache(*m_pText));
}
Init();
@@ -1357,10 +1357,10 @@ void SwTxtFormatInfo::CtorInitTxtFormatInfo( SwTxtFrm *pNewFrm, const bool bNewI
* If the Hyphenator returns ERROR or the language is set to NOLANGUAGE
* we do not hyphenate.
* Else, we always hyphenate if we do interactive hyphenation.
- * If we do not do interactive hyphenation, we only hyphenate if ParaFmt is
+ * If we do not do interactive hyphenation, we only hyphenate if ParaFormat is
* set to automatic hyphenation.
*/
-bool SwTxtFormatInfo::IsHyphenate() const
+bool SwTextFormatInfo::IsHyphenate() const
{
if( !bInterHyph && !bAutoHyph )
return false;
@@ -1379,27 +1379,27 @@ bool SwTxtFormatInfo::IsHyphenate() const
return xHyph->hasLocale( g_pBreakIt->GetLocale(eTmp) );
}
-const SwFmtDrop *SwTxtFormatInfo::GetDropFmt() const
+const SwFormatDrop *SwTextFormatInfo::GetDropFormat() const
{
- const SwFmtDrop *pDrop = &GetTxtFrm()->GetTxtNode()->GetSwAttrSet().GetDrop();
+ const SwFormatDrop *pDrop = &GetTextFrm()->GetTextNode()->GetSwAttrSet().GetDrop();
if( 1 >= pDrop->GetLines() ||
( !pDrop->GetChars() && !pDrop->GetWholeWord() ) )
pDrop = 0;
return pDrop;
}
-void SwTxtFormatInfo::Init()
+void SwTextFormatInfo::Init()
{
// Not initialized: pRest, nLeft, nRight, nFirst, nRealWidth
X(0);
- bArrowDone = bFull = bFtnDone = bErgoDone = bNumDone = bNoEndHyph =
+ bArrowDone = bFull = bFootnoteDone = bErgoDone = bNumDone = bNoEndHyph =
bNoMidHyph = bStop = bNewLine = bUnderflow = bTabOverflow = false;
// generally we do not allow number portions in follows, except...
- if ( GetTxtFrm()->IsFollow() )
+ if ( GetTextFrm()->IsFollow() )
{
- const SwTxtFrm* pMaster = GetTxtFrm()->FindMaster();
- OSL_ENSURE(pMaster, "pTxtFrm without Master");
+ const SwTextFrm* pMaster = GetTextFrm()->FindMaster();
+ OSL_ENSURE(pMaster, "pTextFrm without Master");
const SwLinePortion* pTmpPara = pMaster ? pMaster->GetPara() : NULL;
// there is a master for this follow and the master does not have
@@ -1411,7 +1411,7 @@ void SwTxtFormatInfo::Init()
pRoot = 0;
pLast = 0;
pFly = 0;
- pLastFld = 0;
+ pLastField = 0;
pLastTab = 0;
pUnderflow = 0;
cTabDecimal = 0;
@@ -1421,7 +1421,7 @@ void SwTxtFormatInfo::Init()
nUnderScorePos = COMPLETE_STRING;
cHookChar = 0;
SetIdx(0);
- SetLen( GetTxt().getLength() );
+ SetLen( GetText().getLength() );
SetPaintOfst(0);
}
@@ -1433,14 +1433,14 @@ void SwTxtFormatInfo::Init()
* the line width is the rest width from the surrounding line
* and the bMulti and bFirstMulti-flag has to be set correctly.
*/
-SwTxtFormatInfo::SwTxtFormatInfo( const SwTxtFormatInfo& rInf,
- SwLineLayout& rLay, SwTwips nActWidth ) : SwTxtPaintInfo( rInf ),
+SwTextFormatInfo::SwTextFormatInfo( const SwTextFormatInfo& rInf,
+ SwLineLayout& rLay, SwTwips nActWidth ) : SwTextPaintInfo( rInf ),
bTabOverflow( false )
{
pRoot = &rLay;
pLast = &rLay;
pFly = NULL;
- pLastFld = NULL;
+ pLastField = NULL;
pUnderflow = NULL;
pRest = NULL;
pLastTab = NULL;
@@ -1461,7 +1461,7 @@ SwTxtFormatInfo::SwTxtFormatInfo( const SwTxtFormatInfo& rInf,
nMinTrailing = 0;
nMinWordLength = 0;
bFull = false;
- bFtnDone = true;
+ bFootnoteDone = true;
bErgoDone = true;
bNumDone = true;
bArrowDone = true;
@@ -1486,12 +1486,12 @@ SwTxtFormatInfo::SwTxtFormatInfo( const SwTxtFormatInfo& rInf,
SetFirstMulti( rInf.IsFirstMulti() );
}
-bool SwTxtFormatInfo::_CheckFtnPortion( SwLineLayout* pCurr )
+bool SwTextFormatInfo::_CheckFootnotePortion( SwLineLayout* pCurr )
{
const sal_uInt16 nHeight = pCurr->GetRealHeight();
for( SwLinePortion *pPor = pCurr->GetPortion(); pPor; pPor = pPor->GetPortion() )
{
- if( pPor->IsFtnPortion() && nHeight > static_cast<SwFtnPortion*>(pPor)->Orig() )
+ if( pPor->IsFootnotePortion() && nHeight > static_cast<SwFootnotePortion*>(pPor)->Orig() )
{
SetLineHeight( nHeight );
SetLineNetHeight( pCurr->Height() );
@@ -1501,7 +1501,7 @@ bool SwTxtFormatInfo::_CheckFtnPortion( SwLineLayout* pCurr )
return false;
}
-sal_Int32 SwTxtFormatInfo::ScanPortionEnd( const sal_Int32 nStart,
+sal_Int32 SwTextFormatInfo::ScanPortionEnd( const sal_Int32 nStart,
const sal_Int32 nEnd )
{
cHookChar = 0;
@@ -1515,7 +1515,7 @@ sal_Int32 SwTxtFormatInfo::ScanPortionEnd( const sal_Int32 nStart,
const sal_Unicode cThousandSep2 = ',' == cTabDec ? '.' : '\'';
bool bNumFound = false;
- const bool bTabCompat = GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
+ const bool bTabCompat = GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
for( ; i < nEnd; ++i )
{
@@ -1581,7 +1581,7 @@ sal_Int32 SwTxtFormatInfo::ScanPortionEnd( const sal_Int32 nStart,
// Check if character *behind* the portion has
// to become the hook:
- if ( i == nEnd && i < GetTxt().getLength() && bNumFound )
+ if ( i == nEnd && i < GetText().getLength() && bNumFound )
{
const sal_Unicode cPos = GetChar( i );
if ( cPos != cTabDec && cPos != cThousandSep && cPos !=cThousandSep2 && ( 0x2F >= cPos || cPos >= 0x3A ) )
@@ -1594,7 +1594,7 @@ sal_Int32 SwTxtFormatInfo::ScanPortionEnd( const sal_Int32 nStart,
return i;
}
-bool SwTxtFormatInfo::LastKernPortion()
+bool SwTextFormatInfo::LastKernPortion()
{
if( GetLast() )
{
@@ -1622,13 +1622,13 @@ bool SwTxtFormatInfo::LastKernPortion()
return false;
}
-SwTxtSlot::SwTxtSlot(
- const SwTxtSizeInfo *pNew,
+SwTextSlot::SwTextSlot(
+ const SwTextSizeInfo *pNew,
const SwLinePortion *pPor,
- bool bTxtLen,
+ bool bTextLen,
bool bExgLists,
OUString const & rCh )
- : pOldTxt(0)
+ : pOldText(0)
, pOldSmartTagList(0)
, pOldGrammarCheckList(0)
, pTempList(0)
@@ -1638,94 +1638,94 @@ SwTxtSlot::SwTxtSlot(
{
if( rCh.isEmpty() )
{
- bOn = pPor->GetExpTxt( *pNew, aTxt );
+ bOn = pPor->GetExpText( *pNew, aText );
}
else
{
- aTxt = rCh;
+ aText = rCh;
bOn = true;
}
// The text is replaced ...
if( bOn )
{
- pInf = const_cast<SwTxtSizeInfo*>(pNew);
+ pInf = const_cast<SwTextSizeInfo*>(pNew);
nIdx = pInf->GetIdx();
nLen = pInf->GetLen();
- pOldTxt = &(pInf->GetTxt());
+ pOldText = &(pInf->GetText());
m_pOldCachedVclData = pInf->GetCachedVclData();
- pInf->SetTxt( aTxt );
+ pInf->SetText( aText );
pInf->SetIdx( 0 );
- pInf->SetLen( bTxtLen ? pInf->GetTxt().getLength() : pPor->GetLen() );
+ pInf->SetLen( bTextLen ? pInf->GetText().getLength() : pPor->GetLen() );
pInf->SetCachedVclData(nullptr);
// ST2
if ( bExgLists )
{
- pOldSmartTagList = static_cast<SwTxtPaintInfo*>(pInf)->GetSmartTags();
+ pOldSmartTagList = static_cast<SwTextPaintInfo*>(pInf)->GetSmartTags();
if ( pOldSmartTagList )
{
const sal_uInt16 nPos = pOldSmartTagList->GetWrongPos(nIdx);
const sal_Int32 nListPos = pOldSmartTagList->Pos(nPos);
if( nListPos == nIdx )
- static_cast<SwTxtPaintInfo*>(pInf)->SetSmartTags( pOldSmartTagList->SubList( nPos ) );
- else if( !pTempList && nPos < pOldSmartTagList->Count() && nListPos < nIdx && !aTxt.isEmpty() )
+ static_cast<SwTextPaintInfo*>(pInf)->SetSmartTags( pOldSmartTagList->SubList( nPos ) );
+ else if( !pTempList && nPos < pOldSmartTagList->Count() && nListPos < nIdx && !aText.isEmpty() )
{
pTempList = new SwWrongList( WRONGLIST_SMARTTAG );
- pTempList->Insert( OUString(), 0, 0, aTxt.getLength(), 0 );
- static_cast<SwTxtPaintInfo*>(pInf)->SetSmartTags( pTempList );
+ pTempList->Insert( OUString(), 0, 0, aText.getLength(), 0 );
+ static_cast<SwTextPaintInfo*>(pInf)->SetSmartTags( pTempList );
}
else
- static_cast<SwTxtPaintInfo*>(pInf)->SetSmartTags( 0);
+ static_cast<SwTextPaintInfo*>(pInf)->SetSmartTags( 0);
}
- pOldGrammarCheckList = static_cast<SwTxtPaintInfo*>(pInf)->GetGrammarCheckList();
+ pOldGrammarCheckList = static_cast<SwTextPaintInfo*>(pInf)->GetGrammarCheckList();
if ( pOldGrammarCheckList )
{
const sal_uInt16 nPos = pOldGrammarCheckList->GetWrongPos(nIdx);
const sal_Int32 nListPos = pOldGrammarCheckList->Pos(nPos);
if( nListPos == nIdx )
- static_cast<SwTxtPaintInfo*>(pInf)->SetGrammarCheckList( pOldGrammarCheckList->SubList( nPos ) );
- else if( !pTempList && nPos < pOldGrammarCheckList->Count() && nListPos < nIdx && !aTxt.isEmpty() )
+ static_cast<SwTextPaintInfo*>(pInf)->SetGrammarCheckList( pOldGrammarCheckList->SubList( nPos ) );
+ else if( !pTempList && nPos < pOldGrammarCheckList->Count() && nListPos < nIdx && !aText.isEmpty() )
{
pTempList = new SwWrongList( WRONGLIST_GRAMMAR );
- pTempList->Insert( OUString(), 0, 0, aTxt.getLength(), 0 );
- static_cast<SwTxtPaintInfo*>(pInf)->SetGrammarCheckList( pTempList );
+ pTempList->Insert( OUString(), 0, 0, aText.getLength(), 0 );
+ static_cast<SwTextPaintInfo*>(pInf)->SetGrammarCheckList( pTempList );
}
else
- static_cast<SwTxtPaintInfo*>(pInf)->SetGrammarCheckList( 0);
+ static_cast<SwTextPaintInfo*>(pInf)->SetGrammarCheckList( 0);
}
}
}
}
-SwTxtSlot::~SwTxtSlot()
+SwTextSlot::~SwTextSlot()
{
if( bOn )
{
pInf->SetCachedVclData(m_pOldCachedVclData);
- pInf->SetTxt( *pOldTxt );
+ pInf->SetText( *pOldText );
pInf->SetIdx( nIdx );
pInf->SetLen( nLen );
// ST2
// Restore old smart tag list
if ( pOldSmartTagList )
- static_cast<SwTxtPaintInfo*>(pInf)->SetSmartTags( pOldSmartTagList );
+ static_cast<SwTextPaintInfo*>(pInf)->SetSmartTags( pOldSmartTagList );
if ( pOldGrammarCheckList )
- static_cast<SwTxtPaintInfo*>(pInf)->SetGrammarCheckList( pOldGrammarCheckList );
+ static_cast<SwTextPaintInfo*>(pInf)->SetGrammarCheckList( pOldGrammarCheckList );
delete pTempList;
}
}
-SwFontSave::SwFontSave(const SwTxtSizeInfo &rInf, SwFont *pNew,
+SwFontSave::SwFontSave(const SwTextSizeInfo &rInf, SwFont *pNew,
SwAttrIter* pItr)
: pInf(NULL)
- , pFnt(pNew ? const_cast<SwTxtSizeInfo&>(rInf).GetFont() : NULL)
+ , pFnt(pNew ? const_cast<SwTextSizeInfo&>(rInf).GetFont() : NULL)
, pIter(NULL)
{
if( pFnt )
{
- pInf = &const_cast<SwTxtSizeInfo&>(rInf);
+ pInf = &const_cast<SwTextSizeInfo&>(rInf);
// In these cases we temporarily switch to the new font:
// 1. the fonts have a different magic number
// 2. they have different script types
@@ -1768,7 +1768,7 @@ SwFontSave::~SwFontSave()
}
}
-bool SwTxtFormatInfo::ChgHyph( const bool bNew )
+bool SwTextFormatInfo::ChgHyph( const bool bNew )
{
const bool bOld = bAutoHyph;
if( bAutoHyph != bNew )
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 192531027059..a1a30cbd46af 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -40,15 +40,15 @@ class SvxLineSpacingItem;
class SvxTabStop;
class SvxTabStopItem;
class SwAttrSet;
-class SwFldPortion;
+class SwFieldPortion;
class SwFlyPortion;
-class SwFmtDrop;
+class SwFormatDrop;
class SwLineLayout;
class SwLinePortion;
class SwParaPortion;
class SwTabPortion;
-class SwTxtFrm;
-class SwTxtSizeInfo;
+class SwTextFrm;
+class SwTextSizeInfo;
class SwViewOption;
class SwViewShell;
class SwAttrIter;
@@ -71,7 +71,7 @@ class SwWrongList;
// Respects the attribute LineSpace when calculating the Height/Ascent
class SwLineInfo
{
- friend class SwTxtIter;
+ friend class SwTextIter;
SvxTabStopItem* pRuler;
const SvxLineSpacingItem *pSpace;
@@ -81,7 +81,7 @@ class SwLineInfo
long nListTabStopPosition;
void CtorInitLineInfo( const SwAttrSet& rAttrSet,
- const SwTxtNode& rTxtNode );
+ const SwTextNode& rTextNode );
SwLineInfo();
~SwLineInfo();
@@ -116,39 +116,39 @@ public:
friend SvStream & WriteSwLineInfo( SvStream &rOS, const SwLineInfo &rInf );
};
-class SwTxtInfo
+class SwTextInfo
{
// Implementation in txthyph.cxx
- friend void SetParaPortion( SwTxtInfo *pInf, SwParaPortion *pRoot );
+ friend void SetParaPortion( SwTextInfo *pInf, SwParaPortion *pRoot );
SwParaPortion *m_pPara;
- sal_Int32 m_nTxtStart; // TxtOfst for Follows
+ sal_Int32 m_nTextStart; // TextOfst for Follows
protected:
- SwTxtInfo()
+ SwTextInfo()
: m_pPara(0)
- , m_nTxtStart(0)
+ , m_nTextStart(0)
{}
public:
- void CtorInitTxtInfo( SwTxtFrm *pFrm );
- SwTxtInfo( const SwTxtInfo &rInf );
- SwTxtInfo( SwTxtFrm *pFrm ) { CtorInitTxtInfo( pFrm ); }
+ void CtorInitTextInfo( SwTextFrm *pFrm );
+ SwTextInfo( const SwTextInfo &rInf );
+ SwTextInfo( SwTextFrm *pFrm ) { CtorInitTextInfo( pFrm ); }
SwParaPortion *GetParaPortion() { return m_pPara; }
const SwParaPortion *GetParaPortion() const { return m_pPara; }
- sal_Int32 GetTxtStart() const { return m_nTxtStart; }
+ sal_Int32 GetTextStart() const { return m_nTextStart; }
- friend SvStream & WriteSwTxtInfo( SvStream &rOS, const SwTxtInfo &rInf );
+ friend SvStream & WriteSwTextInfo( SvStream &rOS, const SwTextInfo &rInf );
};
-class SwTxtSizeInfo : public SwTxtInfo
+class SwTextSizeInfo : public SwTextInfo
{
private:
- typedef ::std::map< sal_uIntPtr, sal_uInt16 > SwTxtPortionMap;
+ typedef ::std::map< sal_uIntPtr, sal_uInt16 > SwTextPortionMap;
protected:
// during formatting, a small database is built, mapping portion pointers
// to their maximum size (used for kana compression)
- SwTxtPortionMap m_aMaxWidth;
+ SwTextPortionMap m_aMaxWidth;
// for each line, an array of compression values is calculated
// this array is passed over to the info structure
std::deque<sal_uInt16>* m_pKanaComp;
@@ -159,24 +159,24 @@ protected:
VclPtr<OutputDevice> m_pOut;
VclPtr<OutputDevice> m_pRef;
- // performance hack - this is only used by SwTxtFormatInfo but
+ // performance hack - this is only used by SwTextFormatInfo but
// because it's not even possible to dynamic_cast these things
// currently it has to be stored here
std::shared_ptr<vcl::TextLayoutCache> m_pCachedVclData;
SwFont *m_pFnt;
SwUnderlineFont *m_pUnderFnt; // Font for underlining
- SwTxtFrm *m_pFrm;
+ SwTextFrm *m_pFrm;
const SwViewOption *m_pOpt;
- const OUString *m_pTxt;
+ const OUString *m_pText;
sal_Int32 m_nIdx, m_nLen;
sal_uInt16 m_nKanaIdx;
bool m_bOnWin : 1;
bool m_bNotEOL : 1;
bool m_bURLNotify : 1;
bool m_bStopUnderflow : 1; // Underflow was stopped e.g. by a FlyPortion
- bool m_bFtnInside : 1; // the current line contains a footnote
- bool m_bOtherThanFtnInside : 1; // the current line contains another portion than a footnote portion.
+ bool m_bFootnoteInside : 1; // the current line contains a footnote
+ bool m_bOtherThanFootnoteInside : 1; // the current line contains another portion than a footnote portion.
// needed for checking keep together of footnote portion with previous portion
bool m_bMulti : 1; // inside a multiportion
bool m_bFirstMulti : 1; // this flag is used for two purposes:
@@ -191,10 +191,10 @@ protected:
sal_uInt8 m_nDirection : 2; // writing direction: 0/90/180/270 degree
protected:
- void CtorInitTxtSizeInfo( SwTxtFrm *pFrm, SwFont *pFnt = 0,
+ void CtorInitTextSizeInfo( SwTextFrm *pFrm, SwFont *pFnt = 0,
const sal_Int32 nIdx = 0,
const sal_Int32 nLen = COMPLETE_STRING );
- SwTxtSizeInfo()
+ SwTextSizeInfo()
: m_pKanaComp(0)
, m_pVsh(0)
, m_pOut(0)
@@ -203,7 +203,7 @@ protected:
, m_pUnderFnt(0)
, m_pFrm(0)
, m_pOpt(0)
- , m_pTxt(0)
+ , m_pText(0)
, m_nIdx(0)
, m_nLen(0)
, m_nKanaIdx(0)
@@ -211,8 +211,8 @@ protected:
, m_bNotEOL (false)
, m_bURLNotify(false)
, m_bStopUnderflow(false)
- , m_bFtnInside(false)
- , m_bOtherThanFtnInside(false)
+ , m_bFootnoteInside(false)
+ , m_bOtherThanFootnoteInside(false)
, m_bMulti(false)
, m_bFirstMulti(false)
, m_bRuby(false)
@@ -223,17 +223,17 @@ protected:
, m_nDirection(0)
{}
public:
- SwTxtSizeInfo( const SwTxtSizeInfo &rInf );
- SwTxtSizeInfo( const SwTxtSizeInfo &rInf, const OUString* pTxt,
+ SwTextSizeInfo( const SwTextSizeInfo &rInf );
+ SwTextSizeInfo( const SwTextSizeInfo &rInf, const OUString* pText,
const sal_Int32 nIdx = 0,
const sal_Int32 nLen = COMPLETE_STRING );
- SwTxtSizeInfo( SwTxtFrm *pTxtFrm, SwFont *pTxtFnt = 0,
+ SwTextSizeInfo( SwTextFrm *pTextFrm, SwFont *pTextFnt = 0,
const sal_Int32 nIndex = 0,
const sal_Int32 nLength = COMPLETE_STRING )
: m_bOnWin(false)
{
- CtorInitTxtSizeInfo( pTxtFrm, pTxtFnt, nIndex, nLength );
+ CtorInitTextSizeInfo( pTextFrm, pTextFnt, nIndex, nLength );
}
// GetMultiAttr returns the text attribute of the multiportion,
@@ -249,10 +249,10 @@ public:
inline void SetURLNotify( const bool bNew ) { m_bURLNotify = bNew; }
inline bool StopUnderflow() const { return m_bStopUnderflow; }
inline void SetStopUnderflow( const bool bNew ) { m_bStopUnderflow = bNew; }
- inline bool IsFtnInside() const { return m_bFtnInside; }
- inline void SetFtnInside( const bool bNew ) { m_bFtnInside = bNew; }
- inline bool IsOtherThanFtnInside() const { return m_bOtherThanFtnInside; }
- inline void SetOtherThanFtnInside( const bool bNew ) { m_bOtherThanFtnInside = bNew; }
+ inline bool IsFootnoteInside() const { return m_bFootnoteInside; }
+ inline void SetFootnoteInside( const bool bNew ) { m_bFootnoteInside = bNew; }
+ inline bool IsOtherThanFootnoteInside() const { return m_bOtherThanFootnoteInside; }
+ inline void SetOtherThanFootnoteInside( const bool bNew ) { m_bOtherThanFootnoteInside = bNew; }
inline bool IsMulti() const { return m_bMulti; }
inline void SetMulti( const bool bNew ) { m_bMulti = bNew; }
inline bool IsFirstMulti() const { return m_bFirstMulti; }
@@ -289,29 +289,29 @@ public:
inline SwUnderlineFont* GetUnderFnt() const { return m_pUnderFnt; }
inline const SwViewOption &GetOpt() const { return *m_pOpt; }
- inline const OUString &GetTxt() const { return *m_pTxt; }
+ inline const OUString &GetText() const { return *m_pText; }
inline sal_Unicode GetChar( const sal_Int32 nPos ) const
- { if (m_pTxt && nPos < m_pTxt->getLength()) return (*m_pTxt)[ nPos ]; return 0; }
+ { if (m_pText && nPos < m_pText->getLength()) return (*m_pText)[ nPos ]; return 0; }
- sal_uInt16 GetTxtHeight() const;
+ sal_uInt16 GetTextHeight() const;
- SwPosSize GetTxtSize( OutputDevice* pOut, const SwScriptInfo* pSI,
- const OUString& rTxt, const sal_Int32 nIdx,
+ SwPosSize GetTextSize( OutputDevice* pOut, const SwScriptInfo* pSI,
+ const OUString& rText, const sal_Int32 nIdx,
const sal_Int32 nLen, const sal_uInt16 nComp ) const;
- SwPosSize GetTxtSize() const;
- void GetTxtSize( const SwScriptInfo* pSI, const sal_Int32 nIdx,
+ SwPosSize GetTextSize() const;
+ void GetTextSize( const SwScriptInfo* pSI, const sal_Int32 nIdx,
const sal_Int32 nLen, const sal_uInt16 nComp,
sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff,
vcl::TextLayoutCache const* = nullptr) const;
- inline SwPosSize GetTxtSize( const SwScriptInfo* pSI, const sal_Int32 nIdx,
+ inline SwPosSize GetTextSize( const SwScriptInfo* pSI, const sal_Int32 nIdx,
const sal_Int32 nLen, const sal_uInt16 nComp ) const;
- inline SwPosSize GetTxtSize( const OUString &rTxt ) const;
+ inline SwPosSize GetTextSize( const OUString &rText ) const;
- sal_Int32 GetTxtBreak( const long nLineWidth,
+ sal_Int32 GetTextBreak( const long nLineWidth,
const sal_Int32 nMaxLen,
const sal_uInt16 nComp,
vcl::TextLayoutCache const* = nullptr) const;
- sal_Int32 GetTxtBreak( const long nLineWidth,
+ sal_Int32 GetTextBreak( const long nLineWidth,
const sal_Int32 nMaxLen,
const sal_uInt16 nComp,
sal_Int32& rExtraCharPos,
@@ -323,9 +323,9 @@ public:
inline void SetIdx( const sal_Int32 nNew ) { m_nIdx = nNew; }
inline sal_Int32 GetLen() const { return m_nLen; }
inline void SetLen( const sal_Int32 nNew ) { m_nLen = nNew; }
- inline void SetTxt( const OUString &rNew ){ m_pTxt = &rNew; }
+ inline void SetText( const OUString &rNew ){ m_pText = &rNew; }
- friend SvStream & WriteSwTxtSizeInfo( SvStream &rOS, const SwTxtSizeInfo &rInf );
+ friend SvStream & WriteSwTextSizeInfo( SvStream &rOS, const SwTextSizeInfo &rInf );
// No Bullets for the symbol font!
inline bool IsNoSymbol() const
@@ -334,12 +334,12 @@ public:
void NoteAnimation() const;
// Home is where Your heart is...
- inline SwTxtFrm *GetTxtFrm() { return m_pFrm; }
- inline const SwTxtFrm *GetTxtFrm() const { return m_pFrm; }
+ inline SwTextFrm *GetTextFrm() { return m_pFrm; }
+ inline const SwTextFrm *GetTextFrm() const { return m_pFrm; }
inline bool HasHint( sal_Int32 nPos ) const
- { return _HasHint( m_pFrm->GetTxtNode(), nPos ); }
- static bool _HasHint( const SwTxtNode* pTxtNode, sal_Int32 nPos );
+ { return _HasHint( m_pFrm->GetTextNode(), nPos ); }
+ static bool _HasHint( const SwTextNode* pTextNode, sal_Int32 nPos );
// If Kana Compression is enabled, a minimum and maximum portion width
// is calculated. We format lines with minimal size and share remaining
@@ -352,7 +352,7 @@ public:
};
inline sal_uInt16 GetMaxWidthDiff( const void *nKey )
{
- SwTxtPortionMap::iterator it = m_aMaxWidth.find( reinterpret_cast<sal_uIntPtr>(nKey) );
+ SwTextPortionMap::iterator it = m_aMaxWidth.find( reinterpret_cast<sal_uIntPtr>(nKey) );
if( it != m_aMaxWidth.end() )
return it->second;
@@ -394,7 +394,7 @@ public:
#endif
};
-class SwTxtPaintInfo : public SwTxtSizeInfo
+class SwTextPaintInfo : public SwTextSizeInfo
{
const SwWrongList *pWrongList;
const SwWrongList *pGrammarCheckList;
@@ -402,7 +402,7 @@ class SwTxtPaintInfo : public SwTxtSizeInfo
std::vector<long>* pSpaceAdd;
const SvxBrushItem *pBrushItem; // For the background
SwRect aItemRect; // Also for the background
- SwTxtFly aTxtFly; // Calculate the FlyFrm
+ SwTextFly aTextFly; // Calculate the FlyFrm
Point aPos; // Paint position
SwRect aPaintRect; // Original paint rect (from Layout paint)
@@ -413,11 +413,11 @@ class SwTxtPaintInfo : public SwTxtSizeInfo
const bool bSmartTag = false,
const bool bGrammarCheck = false );
- SwTxtPaintInfo &operator=(const SwTxtPaintInfo&) SAL_DELETED_FUNCTION;
+ SwTextPaintInfo &operator=(const SwTextPaintInfo&) SAL_DELETED_FUNCTION;
void _NotifyURL( const SwLinePortion &rPor ) const;
protected:
- SwTxtPaintInfo()
+ SwTextPaintInfo()
: pWrongList(0)
, pGrammarCheckList(0)
, pSmartTags(0)
@@ -431,26 +431,26 @@ protected:
{}
public:
- SwTxtPaintInfo( const SwTxtPaintInfo &rInf );
- SwTxtPaintInfo( const SwTxtPaintInfo &rInf, const OUString* pTxt );
+ SwTextPaintInfo( const SwTextPaintInfo &rInf );
+ SwTextPaintInfo( const SwTextPaintInfo &rInf, const OUString* pText );
- void CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPaint );
+ void CtorInitTextPaintInfo( SwTextFrm *pFrame, const SwRect &rPaint );
void SetBack( const SvxBrushItem *pItem,
const SwRect &rRect ) { pBrushItem = pItem; aItemRect = rRect;}
const SvxBrushItem *GetBrushItem() const { return pBrushItem; }
const SwRect &GetBrushRect() const { return aItemRect; }
- inline SwTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPaint )
- { CtorInitTxtPaintInfo( pFrame, rPaint ); }
+ inline SwTextPaintInfo( SwTextFrm *pFrame, const SwRect &rPaint )
+ { CtorInitTextPaintInfo( pFrame, rPaint ); }
inline SwTwips X() const { return aPos.X(); }
inline void X( const long nNew ) { aPos.X() = nNew; }
inline SwTwips Y() const { return aPos.Y(); }
inline void Y( const SwTwips nNew ) { aPos.Y() = nNew; }
- inline SwTxtFly& GetTxtFly() { return aTxtFly; }
- inline const SwTxtFly& GetTxtFly() const { return aTxtFly; }
+ inline SwTextFly& GetTextFly() { return aTextFly; }
+ inline const SwTextFly& GetTextFly() const { return aTextFly; }
inline void DrawText( const OUString &rText, const SwLinePortion &rPor,
const sal_Int32 nIdx = 0,
const sal_Int32 nLen = COMPLETE_STRING,
@@ -505,7 +505,7 @@ public:
inline const SwRect &GetPaintRect() const { return aPaintRect; }
inline void SetPaintRect( const SwRect &rNew ) { aPaintRect = rNew; }
- friend SvStream & WriteSwTxtPaintInfo( SvStream &rOS, const SwTxtPaintInfo &rInf );
+ friend SvStream & WriteSwTextPaintInfo( SvStream &rOS, const SwTextPaintInfo &rInf );
// STUFF FOR JUSTIFIED ALIGNMENT
@@ -531,7 +531,7 @@ public:
inline const SwWrongList* GetSmartTags() const { return pSmartTags; }
};
-class SwTxtFormatInfo : public SwTxtPaintInfo
+class SwTextFormatInfo : public SwTextPaintInfo
{
// temporary arguments for hyphenation
com::sun::star::beans::PropertyValues aHyphVals;
@@ -539,14 +539,14 @@ class SwTxtFormatInfo : public SwTxtPaintInfo
SwLineLayout *pRoot; // The Root of the current line (pCurr)
SwLinePortion *pLast; // The last Portion
SwFlyPortion *pFly; // The following FlyPortion
- SwFldPortion *pLastFld; // Wrapped Field
+ SwFieldPortion *pLastField; // Wrapped Field
SwLinePortion *pUnderflow; // Underflow: Last Portion
SwLinePortion *pRest; // The Rest is the start of the next Line
SwTabPortion *pLastTab; // The _last_ TabPortion
sal_Int32 nSoftHyphPos; // SoftHyphPos forr Hyphenation
- sal_Int32 nLineStart; // Current line start in rTxt
+ sal_Int32 nLineStart; // Current line start in rText
sal_Int32 nUnderScorePos; // enlarge repaint if underscore has been found
// #i34348# Changed type from sal_uInt16 to SwTwips
SwTwips nLeft; // Left margin
@@ -563,7 +563,7 @@ class SwTxtFormatInfo : public SwTxtPaintInfo
sal_Int16 nMinWordLength; // minimum length of word to be hyphenated
bool bFull : 1; // Line is full
- bool bFtnDone : 1; // Ftn already formatted
+ bool bFootnoteDone : 1; // Footnote already formatted
bool bErgoDone : 1; // ErgoDone already formatted
bool bNumDone : 1; // bNumDone already formatted
bool bArrowDone : 1; // Arrow to the left for scrolling paragraphs
@@ -590,18 +590,18 @@ class SwTxtFormatInfo : public SwTxtPaintInfo
// Hyphenating ...
bool InitHyph( const bool bAuto = false );
- bool _CheckFtnPortion( SwLineLayout* pCurr );
+ bool _CheckFootnotePortion( SwLineLayout* pCurr );
public:
- void CtorInitTxtFormatInfo( SwTxtFrm *pFrm, const bool bInterHyph = false,
+ void CtorInitTextFormatInfo( SwTextFrm *pFrm, const bool bInterHyph = false,
const bool bQuick = false, const bool bTst = false );
- inline SwTxtFormatInfo(SwTxtFrm *pFrame, const bool bInterHyphL = false,
+ inline SwTextFormatInfo(SwTextFrm *pFrame, const bool bInterHyphL = false,
const bool bQuickL = false, const bool bTst = false)
- { CtorInitTxtFormatInfo( pFrame, bInterHyphL, bQuickL, bTst ); }
+ { CtorInitTextFormatInfo( pFrame, bInterHyphL, bQuickL, bTst ); }
// For the formatting inside a double line in a line (multi-line portion)
// we need a modified text-format-info:
- SwTxtFormatInfo( const SwTxtFormatInfo& rInf, SwLineLayout& rLay,
+ SwTextFormatInfo( const SwTextFormatInfo& rInf, SwLineLayout& rLay,
SwTwips nActWidth );
inline sal_uInt16 Width() const { return nWidth; }
@@ -678,7 +678,7 @@ public:
inline sal_Int32 GetSoftHyphPos() const { return nSoftHyphPos; }
inline void SetSoftHyphPos( const sal_Int32 nNew ) { nSoftHyphPos = nNew; }
- inline void SetParaFtn();
+ inline void SetParaFootnote();
// FlyFrms
inline SwFlyPortion *GetFly() { return pFly; }
@@ -693,16 +693,16 @@ public:
inline void SetTabDecimal( const sal_Unicode cNew ) { cTabDecimal = cNew;}
// Last*
- inline SwFldPortion *GetLastFld() { return pLastFld; }
- inline void SetLastFld( SwFldPortion *pNew ) { pLastFld = pNew; }
+ inline SwFieldPortion *GetLastField() { return pLastField; }
+ inline void SetLastField( SwFieldPortion *pNew ) { pLastField = pNew; }
inline void ClearHookChar() { cHookChar = 0; }
inline void SetHookChar( const sal_Unicode cNew ) { cHookChar = cNew; }
inline sal_Unicode GetHookChar() const { return cHookChar; }
// Done-Flags
- inline bool IsFtnDone() const { return bFtnDone; }
- inline void SetFtnDone( const bool bNew ) { bFtnDone = bNew; }
+ inline bool IsFootnoteDone() const { return bFootnoteDone; }
+ inline void SetFootnoteDone( const bool bNew ) { bFootnoteDone = bNew; }
inline bool IsErgoDone() const { return bErgoDone; }
inline void SetErgoDone( const bool bNew ) { bErgoDone = bNew; }
inline bool IsNumDone() const { return bNumDone; }
@@ -710,7 +710,7 @@ public:
inline bool IsArrowDone() const { return bArrowDone; }
inline void SetArrowDone( const bool bNew ) { bArrowDone = bNew; }
- // For SwTxtPortion::Hyphenate
+ // For SwTextPortion::Hyphenate
inline bool IsSoftHyph( const sal_Int32 nPos ) const;
bool ChgHyph( const bool bNew );
@@ -722,15 +722,15 @@ public:
// Calls HyphenateWord() of Hyphenator
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenatedWord >
- HyphWord( const OUString &rTxt, const sal_Int32 nMinTrail );
+ HyphWord( const OUString &rText, const sal_Int32 nMinTrail );
const com::sun::star::beans::PropertyValues &
GetHyphValues() const;
- bool CheckFtnPortion( SwLineLayout* pCurr )
- { return IsFtnInside() && _CheckFtnPortion( pCurr ); }
+ bool CheckFootnotePortion( SwLineLayout* pCurr )
+ { return IsFootnoteInside() && _CheckFootnotePortion( pCurr ); }
- // Dropcaps called by SwTxtFormatter::CTOR
- const SwFmtDrop *GetDropFmt() const;
+ // Dropcaps called by SwTextFormatter::CTOR
+ const SwFormatDrop *GetDropFormat() const;
// Sets the last SwKernPortion as pLast, if it is followed by empty portions
bool LastKernPortion();
@@ -739,7 +739,7 @@ public:
// Return: Position; sets cHookChar if necessary
sal_Int32 ScanPortionEnd( const sal_Int32 nStart, const sal_Int32 nEnd );
- friend SvStream & WriteSwTxtFormatInfo( SvStream &rOS, const SwTxtFormatInfo &rInf );
+ friend SvStream & WriteSwTextFormatInfo( SvStream &rOS, const SwTextFormatInfo &rInf );
inline void SetTabOverflow( bool bOverflow ) { bTabOverflow = bOverflow; }
inline bool IsTabOverflow() { return bTabOverflow; }
@@ -747,17 +747,17 @@ public:
};
/**
- * For the text replacement and restoration of SwTxtSizeInfo.
+ * For the text replacement and restoration of SwTextSizeInfo.
* The way this is done is a bit of a hack: Although rInf is const we change it
* anyway.
* Because rInf is restorated again in the DTOR, we can do this.
* You could call it a "logical const", if you wish.
*/
-class SwTxtSlot
+class SwTextSlot
{
- OUString aTxt;
+ OUString aText;
std::shared_ptr<vcl::TextLayoutCache> m_pOldCachedVclData;
- const OUString *pOldTxt;
+ const OUString *pOldText;
const SwWrongList* pOldSmartTagList;
const SwWrongList* pOldGrammarCheckList;
SwWrongList* pTempList;
@@ -765,106 +765,106 @@ class SwTxtSlot
sal_Int32 nLen;
bool bOn;
protected:
- SwTxtSizeInfo *pInf;
+ SwTextSizeInfo *pInf;
public:
// The replacement string originates either from the portion via GetExpText()
// or from the rCh, if it is not empty.
- SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor, bool bTxtLen,
+ SwTextSlot( const SwTextSizeInfo *pNew, const SwLinePortion *pPor, bool bTextLen,
bool bExgLists, OUString const & rCh = OUString() );
- ~SwTxtSlot();
+ ~SwTextSlot();
bool IsOn() const { return bOn; }
};
class SwFontSave
{
- SwTxtSizeInfo *pInf;
+ SwTextSizeInfo *pInf;
SwFont *pFnt;
SwAttrIter *pIter;
public:
- SwFontSave( const SwTxtSizeInfo &rInf, SwFont *pFnt,
+ SwFontSave( const SwTextSizeInfo &rInf, SwFont *pFnt,
SwAttrIter* pItr = NULL );
~SwFontSave();
};
-inline sal_uInt16 SwTxtSizeInfo::GetAscent() const
+inline sal_uInt16 SwTextSizeInfo::GetAscent() const
{
- SAL_WARN_IF( !GetOut(), "sw.core", "SwTxtSizeInfo::GetAscent() without m_pOut" );
+ SAL_WARN_IF( !GetOut(), "sw.core", "SwTextSizeInfo::GetAscent() without m_pOut" );
return const_cast<SwFont*>(GetFont())->GetAscent( m_pVsh, *GetOut() );
}
-inline sal_uInt16 SwTxtSizeInfo::GetTxtHeight() const
+inline sal_uInt16 SwTextSizeInfo::GetTextHeight() const
{
- SAL_WARN_IF( !GetOut(), "sw.core", "SwTxtSizeInfo::GetTxtHeight() without m_pOut" );
+ SAL_WARN_IF( !GetOut(), "sw.core", "SwTextSizeInfo::GetTextHeight() without m_pOut" );
return const_cast<SwFont*>(GetFont())->GetHeight( m_pVsh, *GetOut() );
}
-inline SwPosSize SwTxtSizeInfo::GetTxtSize( const OUString &rTxt ) const
+inline SwPosSize SwTextSizeInfo::GetTextSize( const OUString &rText ) const
{
- return GetTxtSize( m_pOut, 0, rTxt, 0, rTxt.getLength(), 0 );
+ return GetTextSize( m_pOut, 0, rText, 0, rText.getLength(), 0 );
}
-inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI,
+inline SwPosSize SwTextSizeInfo::GetTextSize( const SwScriptInfo* pSI,
const sal_Int32 nNewIdx,
const sal_Int32 nNewLen,
const sal_uInt16 nCompress ) const
{
- return GetTxtSize( m_pOut, pSI, *m_pTxt, nNewIdx, nNewLen, nCompress );
+ return GetTextSize( m_pOut, pSI, *m_pText, nNewIdx, nNewLen, nCompress );
}
-inline SwTwips SwTxtPaintInfo::GetPaintOfst() const
+inline SwTwips SwTextPaintInfo::GetPaintOfst() const
{
return GetParaPortion()->GetRepaint().GetOfst();
}
-inline void SwTxtPaintInfo::SetPaintOfst( const SwTwips nNew )
+inline void SwTextPaintInfo::SetPaintOfst( const SwTwips nNew )
{
GetParaPortion()->GetRepaint().SetOfst( nNew );
}
-inline void SwTxtPaintInfo::DrawText( const OUString &rText,
+inline void SwTextPaintInfo::DrawText( const OUString &rText,
const SwLinePortion &rPor,
const sal_Int32 nStart, const sal_Int32 nLength,
const bool bKern ) const
{
- const_cast<SwTxtPaintInfo*>(this)->_DrawText( rText, rPor, nStart, nLength, bKern );
+ const_cast<SwTextPaintInfo*>(this)->_DrawText( rText, rPor, nStart, nLength, bKern );
}
-inline void SwTxtPaintInfo::DrawText( const SwLinePortion &rPor,
+inline void SwTextPaintInfo::DrawText( const SwLinePortion &rPor,
const sal_Int32 nLength, const bool bKern ) const
{
- const_cast<SwTxtPaintInfo*>(this)->_DrawText( *m_pTxt, rPor, m_nIdx, nLength, bKern );
+ const_cast<SwTextPaintInfo*>(this)->_DrawText( *m_pText, rPor, m_nIdx, nLength, bKern );
}
-inline void SwTxtPaintInfo::DrawMarkedText( const SwLinePortion &rPor,
+inline void SwTextPaintInfo::DrawMarkedText( const SwLinePortion &rPor,
const sal_Int32 nLength,
const bool bKern,
const bool bWrong,
const bool bSmartTags,
const bool bGrammarCheck ) const
{
- const_cast<SwTxtPaintInfo*>(this)->_DrawText( *m_pTxt, rPor, m_nIdx, nLength, bKern, bWrong, bSmartTags, bGrammarCheck );
+ const_cast<SwTextPaintInfo*>(this)->_DrawText( *m_pText, rPor, m_nIdx, nLength, bKern, bWrong, bSmartTags, bGrammarCheck );
}
-inline sal_Int32 SwTxtFormatInfo::GetReformatStart() const
+inline sal_Int32 SwTextFormatInfo::GetReformatStart() const
{
return GetParaPortion()->GetReformat().Start();
}
-inline const SwAttrSet& SwTxtFormatInfo::GetCharAttr() const
+inline const SwAttrSet& SwTextFormatInfo::GetCharAttr() const
{
- return GetTxtFrm()->GetTxtNode()->GetSwAttrSet();
+ return GetTextFrm()->GetTextNode()->GetSwAttrSet();
}
-inline void SwTxtFormatInfo::SetParaFtn()
+inline void SwTextFormatInfo::SetParaFootnote()
{
- GetTxtFrm()->SetFtn( true );
+ GetTextFrm()->SetFootnote( true );
}
-inline bool SwTxtFormatInfo::IsSoftHyph( const sal_Int32 nPos ) const
+inline bool SwTextFormatInfo::IsSoftHyph( const sal_Int32 nPos ) const
{
- return CHAR_SOFTHYPHEN == GetTxtFrm()->GetTxtNode()->GetTxt()[nPos];
+ return CHAR_SOFTHYPHEN == GetTextFrm()->GetTextNode()->GetText()[nPos];
}
#endif
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index b48c6d009b21..1e74bdac46e2 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -35,7 +35,7 @@
using namespace ::com::sun::star;
-void SwTxtAdjuster::FormatBlock( )
+void SwTextAdjuster::FormatBlock( )
{
// Block format does not apply to the last line.
// And for tabs it doesn't exist out of tradition
@@ -44,7 +44,7 @@ void SwTxtAdjuster::FormatBlock( )
const SwLinePortion *pFly = 0;
bool bSkip = !IsLastBlock() &&
- nStart + pCurr->GetLen() >= GetInfo().GetTxt().getLength();
+ nStart + pCurr->GetLen() >= GetInfo().GetText().getLength();
// Multi-line fields are tricky, because we need to check whether there are
// any other text portions in the paragraph.
@@ -56,7 +56,7 @@ void SwTxtAdjuster::FormatBlock( )
const SwLinePortion *pPor = pCurr->GetFirstPortion();
while( pPor && bSkip )
{
- if( pPor->InTxtGrp() )
+ if( pPor->InTextGrp() )
bSkip = false;
pPor = pPor->GetPortion();
}
@@ -84,7 +84,7 @@ void SwTxtAdjuster::FormatBlock( )
// Look for the last Fly which has text coming after it:
if( pPos->IsFlyPortion() )
pTmpFly = pPos; // Found a Fly
- else if ( pTmpFly && pPos->InTxtGrp() )
+ else if ( pTmpFly && pPos->InTextGrp() )
{
pFly = pTmpFly; // A Fly with follow-up text!
pTmpFly = NULL;
@@ -109,7 +109,7 @@ void SwTxtAdjuster::FormatBlock( )
GetInfo().GetParaPortion()->GetRepaint().SetOfst(0);
}
-static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTxtIter& rItr,
+static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwTextIter& rItr,
sal_Int32& rKashidas, sal_Int32& nGluePortion )
{
// i60594 validate Kashida justification
@@ -157,7 +157,7 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, S
}
sal_Int32 nKashidasDropped = 0;
- if ( !SwScriptInfo::IsArabicText( rInf.GetTxt(), nIdx, nNext - nIdx ) )
+ if ( !SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
{
nKashidasDropped = nKashidasInAttr;
rKashidas -= nKashidasDropped;
@@ -166,7 +166,7 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, S
{
ComplexTextLayoutMode nOldLayout = rInf.GetOut()->GetLayoutMode();
rInf.GetOut()->SetLayoutMode ( nOldLayout | TEXT_LAYOUT_BIDI_RTL );
- nKashidasDropped = rInf.GetOut()->ValidateKashidas ( rInf.GetTxt(), nIdx, nNext - nIdx,
+ nKashidasDropped = rInf.GetOut()->ValidateKashidas ( rInf.GetText(), nIdx, nNext - nIdx,
nKashidasInAttr, pKashidaPos + nKashidaIdx,
pKashidaPosDropped );
rInf.GetOut()->SetLayoutMode ( nOldLayout );
@@ -188,7 +188,7 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, S
return (rKashidas > 0);
}
-static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTxtIter& rItr, sal_Int32& rKashidas,
+static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwTextIter& rItr, sal_Int32& rKashidas,
sal_Int32& nGluePortion, const long nGluePortionWidth, long& nSpaceAdd )
{
// check kashida width
@@ -215,7 +215,7 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTx
sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( 0, 0, nIdx, nNext - nIdx );
long nFontMinKashida = rInf.GetOut()->GetMinKashida();
- if ( nFontMinKashida && nKashidasInAttr > 0 && SwScriptInfo::IsArabicText( rInf.GetTxt(), nIdx, nNext - nIdx ) )
+ if ( nFontMinKashida && nKashidasInAttr > 0 && SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
{
sal_Int32 nKashidasDropped = 0;
while ( rKashidas && nGluePortion && nKashidasInAttr > 0 &&
@@ -247,12 +247,12 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTx
// CalcNewBlock() must only be called _after_ CalcLine()!
// We always span between two RandPortions or FixPortions (Tabs and Flys).
// We count the Glues and call ExpandBlock.
-void SwTxtAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
+void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
const SwLinePortion *pStopAt, SwTwips nReal, bool bSkipKashida )
{
OSL_ENSURE( GetInfo().IsMulti() || SVX_ADJUST_BLOCK == GetAdjust(),
"CalcNewBlock: Why?" );
- OSL_ENSURE( pCurrent->Height(), "SwTxtAdjuster::CalcBlockAdjust: missing CalcLine()" );
+ OSL_ENSURE( pCurrent->Height(), "SwTextAdjuster::CalcBlockAdjust: missing CalcLine()" );
pCurrent->InitSpaceAdd();
sal_Int32 nGluePortion = 0;
@@ -261,8 +261,8 @@ void SwTxtAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
// i60591: hennerdrews
SwScriptInfo& rSI = GetInfo().GetParaPortion()->GetScriptInfo();
- SwTxtSizeInfo aInf ( GetTxtFrm() );
- SwTxtIter aItr ( GetTxtFrm(), &aInf );
+ SwTextSizeInfo aInf ( GetTextFrm() );
+ SwTextIter aItr ( GetTextFrm(), &aInf );
if ( rSI.CountKashida() )
{
@@ -286,7 +286,7 @@ void SwTxtAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
// #i49277#
const bool bDoNotJustifyLinesWithManualBreak =
- GetTxtFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK);
+ GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK);
SwLinePortion *pPos = pCurrent->GetPortion();
@@ -299,8 +299,8 @@ void SwTxtAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
break;
}
- if ( pPos->InTxtGrp() )
- nGluePortion = nGluePortion + static_cast<SwTxtPortion*>(pPos)->GetSpaceCnt( GetInfo(), nCharCnt );
+ if ( pPos->InTextGrp() )
+ nGluePortion = nGluePortion + static_cast<SwTextPortion*>(pPos)->GetSpaceCnt( GetInfo(), nCharCnt );
else if( pPos->IsMultiPortion() )
{
SwMultiPortion* pMulti = static_cast<SwMultiPortion*>(pPos);
@@ -394,9 +394,9 @@ void SwTxtAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
}
}
-SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
+SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
{
- OSL_ENSURE( pCurrent->Height(), "SwTxtAdjuster::CalcBlockAdjust: missing CalcLine()" );
+ OSL_ENSURE( pCurrent->Height(), "SwTextAdjuster::CalcBlockAdjust: missing CalcLine()" );
OSL_ENSURE( !pCurrent->GetpKanaComp(), "pKanaComp already exists!!" );
std::deque<sal_uInt16> *pNewKana = new std::deque<sal_uInt16>();
@@ -416,7 +416,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
while( pPos )
{
- if ( pPos->InTxtGrp() )
+ if ( pPos->InTextGrp() )
{
// get maximum portion width from info structure, calculated
// during text formatting
@@ -494,7 +494,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
while( pPos )
{
- if ( pPos->InTxtGrp() )
+ if ( pPos->InTextGrp() )
{
const sal_uInt16 nMinWidth = pPos->Width();
@@ -530,7 +530,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
return nRepaintOfst;
}
-SwMarginPortion *SwTxtAdjuster::CalcRightMargin( SwLineLayout *pCurrent,
+SwMarginPortion *SwTextAdjuster::CalcRightMargin( SwLineLayout *pCurrent,
SwTwips nReal )
{
long nRealWidth;
@@ -581,7 +581,7 @@ SwMarginPortion *SwTxtAdjuster::CalcRightMargin( SwLineLayout *pCurrent,
return pRight;
}
-void SwTxtAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
+void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
{
// 1) We insert a left margin:
SwMarginPortion *pLeft = pCurrent->CalcLeftMargin();
@@ -596,7 +596,7 @@ void SwTxtAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
// If we only have one line, the text portion is consecutive and we center, then ...
bool bComplete = 0 == nStart;
- const bool bTabCompat = GetTxtFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
+ const bool bTabCompat = GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
bool bMultiTab = false;
while( pPos )
@@ -617,7 +617,7 @@ void SwTxtAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
// to left-aligned.
// The first text portion gets the whole Glue, but only if we have
// more than one line.
- if( bComplete && GetInfo().GetTxt().getLength() == nLen )
+ if( bComplete && GetInfo().GetText().getLength() == nLen )
static_cast<SwGluePortion*>(pPos)->MoveHalfGlue( pGlue );
else
{
@@ -656,7 +656,7 @@ void SwTxtAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
pLeft->AdjustRight( pCurrent );
}
-void SwTxtAdjuster::CalcAdjLine( SwLineLayout *pCurrent )
+void SwTextAdjuster::CalcAdjLine( SwLineLayout *pCurrent )
{
OSL_ENSURE( pCurrent->IsFormatAdj(), "CalcAdjLine: Why?" );
@@ -686,27 +686,27 @@ void SwTxtAdjuster::CalcAdjLine( SwLineLayout *pCurrent )
// adding the word, that still fits onto the line! For this reason the FlyPortion's
// width is still correct if we get a deadlock-situation of:
// bFirstWord && !WORDFITS
-SwFlyPortion *SwTxtAdjuster::CalcFlyPortion( const long nRealWidth,
+SwFlyPortion *SwTextAdjuster::CalcFlyPortion( const long nRealWidth,
const SwRect &rCurrRect )
{
- SwTxtFly aTxtFly( GetTxtFrm() );
+ SwTextFly aTextFly( GetTextFrm() );
const sal_uInt16 nCurrWidth = pCurr->PrtWidth();
SwFlyPortion *pFlyPortion = 0;
SwRect aLineVert( rCurrRect );
- if ( GetTxtFrm()->IsRightToLeft() )
- GetTxtFrm()->SwitchLTRtoRTL( aLineVert );
- if ( GetTxtFrm()->IsVertical() )
- GetTxtFrm()->SwitchHorizontalToVertical( aLineVert );
+ if ( GetTextFrm()->IsRightToLeft() )
+ GetTextFrm()->SwitchLTRtoRTL( aLineVert );
+ if ( GetTextFrm()->IsVertical() )
+ GetTextFrm()->SwitchHorizontalToVertical( aLineVert );
// aFlyRect is document-global!
- SwRect aFlyRect( aTxtFly.GetFrm( aLineVert ) );
+ SwRect aFlyRect( aTextFly.GetFrm( aLineVert ) );
- if ( GetTxtFrm()->IsRightToLeft() )
- GetTxtFrm()->SwitchRTLtoLTR( aFlyRect );
- if ( GetTxtFrm()->IsVertical() )
- GetTxtFrm()->SwitchVerticalToHorizontal( aFlyRect );
+ if ( GetTextFrm()->IsRightToLeft() )
+ GetTextFrm()->SwitchRTLtoLTR( aFlyRect );
+ if ( GetTextFrm()->IsVertical() )
+ GetTextFrm()->SwitchVerticalToHorizontal( aFlyRect );
// If a Frame overlapps we open a Portion
if( aFlyRect.HasArea() )
@@ -731,7 +731,7 @@ SwFlyPortion *SwTxtAdjuster::CalcFlyPortion( const long nRealWidth,
}
// CalcDropAdjust is called at the end by Format() if needed
-void SwTxtAdjuster::CalcDropAdjust()
+void SwTextAdjuster::CalcDropAdjust()
{
OSL_ENSURE( 1<GetDropLines() && SVX_ADJUST_LEFT!=GetAdjust() && SVX_ADJUST_BLOCK!=GetAdjust(),
"CalcDropAdjust: No reason for DropAdjustment." );
@@ -814,7 +814,7 @@ void SwTxtAdjuster::CalcDropAdjust()
}
}
-void SwTxtAdjuster::CalcDropRepaint()
+void SwTextAdjuster::CalcDropRepaint()
{
Top();
SwRepaint &rRepaint = GetInfo().GetParaPortion()->GetRepaint();
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index b85e351b0a82..3201e7f92f92 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -59,22 +59,22 @@
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star;
-void SwAttrIter::Chg( SwTxtAttr *pHt )
+void SwAttrIter::Chg( SwTextAttr *pHt )
{
assert(pHt && pFnt && "No attribute of font available for change");
if( pRedln && pRedln->IsOn() )
- pRedln->ChangeTxtAttr( pFnt, *pHt, true );
+ pRedln->ChangeTextAttr( pFnt, *pHt, true );
else
aAttrHandler.PushAndChg( *pHt, *pFnt );
nChgCnt++;
}
-void SwAttrIter::Rst( SwTxtAttr *pHt )
+void SwAttrIter::Rst( SwTextAttr *pHt )
{
assert(pHt && pFnt && "No attribute of font available for reset");
// get top from stack after removing pHt
if( pRedln && pRedln->IsOn() )
- pRedln->ChangeTxtAttr( pFnt, *pHt, false );
+ pRedln->ChangeTextAttr( pFnt, *pHt, false );
else
aAttrHandler.PopAndChg( *pHt, *pFnt );
nChgCnt--;
@@ -101,9 +101,9 @@ SwAttrIter::~SwAttrIter()
* The Formatter later on encounters such a special character and retrieves the
* degenerate attribute via GetAttr().
*/
-SwTxtAttr *SwAttrIter::GetAttr( const sal_Int32 nPosition ) const
+SwTextAttr *SwAttrIter::GetAttr( const sal_Int32 nPosition ) const
{
- return (m_pTxtNode) ? m_pTxtNode->GetTxtAttrForCharAt(nPosition) : 0;
+ return (m_pTextNode) ? m_pTextNode->GetTextAttrForCharAt(nPosition) : 0;
}
bool SwAttrIter::SeekAndChgAttrIter( const sal_Int32 nNewPos, OutputDevice* pOut )
@@ -162,13 +162,13 @@ bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFo
if ( pHints && !bParaFont )
{
- SwTxtAttr *pTxtAttr;
+ SwTextAttr *pTextAttr;
// While we've not reached the end of the StartArray && the TextAttribute starts at position 0...
while ( ( nStartIndex < pHints->GetStartCount() ) &&
- !((pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()) )
+ !((pTextAttr=pHints->GetStart(nStartIndex))->GetStart()) )
{
// open the TextAttributes
- Chg( pTxtAttr );
+ Chg( pTextAttr );
nStartIndex++;
}
}
@@ -194,7 +194,7 @@ bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFo
// AMA: New AttrIter Nov 94
void SwAttrIter::SeekFwd( const sal_Int32 nNewPos )
{
- SwTxtAttr *pTxtAttr;
+ SwTextAttr *pTextAttr;
if ( nStartIndex ) // If attributes have been opened at all ...
{
@@ -203,11 +203,11 @@ void SwAttrIter::SeekFwd( const sal_Int32 nNewPos )
// As long as we've not yet reached the end of EndArray and the
// TextAttribute ends before or at the new position ...
while ( ( nEndIndex < pHints->GetEndCount() ) &&
- (*(pTxtAttr=pHints->GetEnd(nEndIndex))->GetAnyEnd()<=nNewPos))
+ (*(pTextAttr=pHints->GetEnd(nEndIndex))->GetAnyEnd()<=nNewPos))
{
// Close the TextAttributes, whoes StartPos were before or at
// the old nPos and are currently open
- if (pTxtAttr->GetStart() <= nPos) Rst( pTxtAttr );
+ if (pTextAttr->GetStart() <= nPos) Rst( pTextAttr );
nEndIndex++;
}
}
@@ -223,11 +223,11 @@ void SwAttrIter::SeekFwd( const sal_Int32 nNewPos )
// As long as we've not yet reached the end of EndArray and the
// TextAttribute ends before or at the new position ...
while ( ( nStartIndex < pHints->GetStartCount() ) &&
- ((pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()<=nNewPos) )
+ ((pTextAttr=pHints->GetStart(nStartIndex))->GetStart()<=nNewPos) )
{
// open the TextAttributes, whose ends lie behind the new position
- if ( *pTxtAttr->GetAnyEnd() > nNewPos ) Chg( pTxtAttr );
+ if ( *pTextAttr->GetAnyEnd() > nNewPos ) Chg( pTextAttr );
nStartIndex++;
}
@@ -288,7 +288,7 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
// are there attribute starts left?
for (size_t i = nStartIndex; i < pHints->GetStartCount(); ++i)
{
- SwTxtAttr *const pAttr(pHints->GetStart(i));
+ SwTextAttr *const pAttr(pHints->GetStart(i));
if (!pAttr->IsFormatIgnoreStart())
{
nNext = pAttr->GetStart();
@@ -298,7 +298,7 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
// are there attribute ends left?
for (size_t i = nEndIndex; i < pHints->GetEndCount(); ++i)
{
- SwTxtAttr *const pAttr(pHints->GetEnd(i));
+ SwTextAttr *const pAttr(pHints->GetEnd(i));
if (!pAttr->IsFormatIgnoreEnd())
{
sal_Int32 const nNextEnd = *pAttr->GetAnyEnd();
@@ -307,11 +307,11 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
}
}
}
- if (m_pTxtNode!=NULL) {
+ if (m_pTextNode!=NULL) {
// TODO: maybe use hints like FieldHints for this instead of looking at the text...
- const sal_Int32 l = nNext<m_pTxtNode->Len() ? nNext : m_pTxtNode->Len();
+ const sal_Int32 l = nNext<m_pTextNode->Len() ? nNext : m_pTextNode->Len();
sal_Int32 p=nPos;
- const sal_Unicode* aStr = m_pTxtNode->GetTxt().getStr();
+ const sal_Unicode* aStr = m_pTextNode->GetText().getStr();
while (p<l)
{
sal_Unicode aChar = aStr[p];
@@ -354,7 +354,7 @@ public:
void NewWord() { nWordAdd = nWordWidth = 0; }
};
-static bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const OUString &rTxt,
+static bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const OUString &rText,
sal_Int32 nIdx, sal_Int32 nEnd )
{
bool bRet = false;
@@ -365,8 +365,8 @@ static bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const OUString &
LanguageType eLang = pFnt->GetLanguage();
if( g_pBreakIt->GetBreakIter().is() )
{
- bClear = CH_BLANK == rTxt[ nStop ];
- Boundary aBndry( g_pBreakIt->GetBreakIter()->getWordBoundary( rTxt, nIdx,
+ bClear = CH_BLANK == rText[ nStop ];
+ Boundary aBndry( g_pBreakIt->GetBreakIter()->getWordBoundary( rText, nIdx,
g_pBreakIt->GetLocale( eLang ),
WordType::DICTIONARY_WORD, true ) );
nStop = aBndry.endPos;
@@ -379,19 +379,19 @@ static bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const OUString &
}
else
{
- while( nStop < nEnd && CH_BLANK != rTxt[ nStop ] )
+ while( nStop < nEnd && CH_BLANK != rText[ nStop ] )
++nStop;
bClear = nStop == nIdx;
if ( bClear )
{
rArg.NewWord();
- while( nStop < nEnd && CH_BLANK == rTxt[ nStop ] )
+ while( nStop < nEnd && CH_BLANK == rText[ nStop ] )
++nStop;
}
}
- SwDrawTextInfo aDrawInf( rArg.pSh, *rArg.pOut, 0, rTxt, nIdx, nStop - nIdx );
- long nAktWidth = pFnt->_GetTxtSize( aDrawInf ).Width();
+ SwDrawTextInfo aDrawInf( rArg.pSh, *rArg.pOut, 0, rText, nIdx, nStop - nIdx );
+ long nAktWidth = pFnt->_GetTextSize( aDrawInf ).Width();
rArg.nRowWidth += nAktWidth;
if( bClear )
rArg.NewWord();
@@ -408,10 +408,10 @@ static bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const OUString &
return bRet;
}
-bool SwTxtNode::IsSymbol( const sal_Int32 nBegin ) const
+bool SwTextNode::IsSymbol( const sal_Int32 nBegin ) const
{
SwScriptInfo aScriptInfo;
- SwAttrIter aIter( *const_cast<SwTxtNode*>(this), aScriptInfo );
+ SwAttrIter aIter( *const_cast<SwTextNode*>(this), aScriptInfo );
aIter.Seek( nBegin );
return aIter.GetFnt()->IsSymbol(
const_cast<SwViewShell *>(getIDocumentLayoutAccess()->GetCurrentViewShell()) );
@@ -430,14 +430,14 @@ public:
void Minimum( long nNew ) { if( nNew > nMinWidth ) nMinWidth = nNew; }
};
-static void lcl_MinMaxNode( SwFrmFmt* pNd, SwMinMaxNodeArgs* pIn )
+static void lcl_MinMaxNode( SwFrameFormat* pNd, SwMinMaxNodeArgs* pIn )
{
- const SwFmtAnchor& rFmtA = pNd->GetAnchor();
+ const SwFormatAnchor& rFormatA = pNd->GetAnchor();
- if ((FLY_AT_PARA == rFmtA.GetAnchorId()) ||
- (FLY_AT_CHAR == rFmtA.GetAnchorId()))
+ if ((FLY_AT_PARA == rFormatA.GetAnchorId()) ||
+ (FLY_AT_CHAR == rFormatA.GetAnchorId()))
{
- const SwPosition *pPos = rFmtA.GetCntntAnchor();
+ const SwPosition *pPos = rFormatA.GetContentAnchor();
OSL_ENSURE(pPos && pIn, "Unexpected NULL arguments");
if (!pPos || !pIn || pIn->nIndx != pPos->nNode.GetIndex())
return;
@@ -445,27 +445,27 @@ static void lcl_MinMaxNode( SwFrmFmt* pNd, SwMinMaxNodeArgs* pIn )
long nMin, nMax;
SwHTMLTableLayout *pLayout = 0;
- const bool bIsDrawFrmFmt = pNd->Which()==RES_DRAWFRMFMT;
- if( !bIsDrawFrmFmt )
+ const bool bIsDrawFrameFormat = pNd->Which()==RES_DRAWFRMFMT;
+ if( !bIsDrawFrameFormat )
{
// Does the frame contain a table at the start or the end?
const SwNodes& rNodes = pNd->GetDoc()->GetNodes();
- const SwFmtCntnt& rFlyCntnt = pNd->GetCntnt();
- sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
- SwTableNode* pTblNd = rNodes[nStt+1]->GetTableNode();
- if( !pTblNd )
+ const SwFormatContent& rFlyContent = pNd->GetContent();
+ sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex();
+ SwTableNode* pTableNd = rNodes[nStt+1]->GetTableNode();
+ if( !pTableNd )
{
SwNode *pNd2 = rNodes[nStt];
pNd2 = rNodes[pNd2->EndOfSectionIndex()-1];
if( pNd2->IsEndNode() )
- pTblNd = pNd2->StartOfSectionNode()->GetTableNode();
+ pTableNd = pNd2->StartOfSectionNode()->GetTableNode();
}
- if( pTblNd )
- pLayout = pTblNd->GetTable().GetHTMLTableLayout();
+ if( pTableNd )
+ pLayout = pTableNd->GetTable().GetHTMLTableLayout();
}
- const SwFmtHoriOrient& rOrient = pNd->GetHoriOrient();
+ const SwFormatHoriOrient& rOrient = pNd->GetHoriOrient();
sal_Int16 eHoriOri = rOrient.GetHoriOrient();
long nDiff;
@@ -477,7 +477,7 @@ static void lcl_MinMaxNode( SwFrmFmt* pNd, SwMinMaxNodeArgs* pIn )
}
else
{
- if( bIsDrawFrmFmt )
+ if( bIsDrawFrameFormat )
{
const SdrObject* pSObj = pNd->FindSdrObject();
if( pSObj )
@@ -488,7 +488,7 @@ static void lcl_MinMaxNode( SwFrmFmt* pNd, SwMinMaxNodeArgs* pIn )
}
else
{
- const SwFmtFrmSize &rSz = pNd->GetFrmSize();
+ const SwFormatFrmSize &rSz = pNd->GetFrmSize();
nMin = rSz.GetWidth();
}
nMax = nMin;
@@ -553,7 +553,7 @@ static void lcl_MinMaxNode( SwFrmFmt* pNd, SwMinMaxNodeArgs* pIn )
/**
* Changing this method very likely requires changing of GetScalingOfSelectedText
*/
-void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax,
+void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax,
sal_uLong& rAbsMin, OutputDevice* pOut ) const
{
SwViewShell const * pSh = GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
@@ -573,7 +573,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
rAbsMin = 0;
const SvxLRSpaceItem &rSpace = GetSwAttrSet().GetLRSpace();
- long nLROffset = rSpace.GetTxtLeft() + GetLeftMarginWithNum( true );
+ long nLROffset = rSpace.GetTextLeft() + GetLeftMarginWithNum( true );
short nFLOffs;
// For enumerations a negative first line indentation is probably filled already
if( !GetFirstLineOfsWithNum( nFLOffs ) || nFLOffs > nLROffset )
@@ -588,12 +588,12 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
aNodeArgs.nRightDiff = 0;
if( nIndex )
{
- SwFrmFmts* pTmp = const_cast<SwFrmFmts*>(GetDoc()->GetSpzFrmFmts());
+ SwFrameFormats* pTmp = const_cast<SwFrameFormats*>(GetDoc()->GetSpzFrameFormats());
if( pTmp )
{
aNodeArgs.nIndx = nIndex;
- for( SwFrmFmt *pFmt : *pTmp )
- lcl_MinMaxNode( pFmt, &aNodeArgs );
+ for( SwFrameFormat *pFormat : *pTmp )
+ lcl_MinMaxNode( pFormat, &aNodeArgs );
}
}
if( aNodeArgs.nLeftRest < 0 )
@@ -609,7 +609,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
aNodeArgs.nMaxWidth -= aNodeArgs.nRightRest;
SwScriptInfo aScriptInfo;
- SwAttrIter aIter( *const_cast<SwTxtNode*>(this), aScriptInfo );
+ SwAttrIter aIter( *const_cast<SwTextNode*>(this), aScriptInfo );
sal_Int32 nIdx = 0;
aIter.SeekAndChgAttrIter( nIdx, pOut );
sal_Int32 nLen = m_Text.getLength();
@@ -622,7 +622,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
sal_Int32 nStop = aScriptInfo.NextScriptChg( nIdx );
if( nNextChg > nStop )
nNextChg = nStop;
- SwTxtAttr *pHint = NULL;
+ SwTextAttr *pHint = NULL;
sal_Unicode cChar = CH_BLANK;
nStop = nIdx;
while( nStop < nLen && nStop < nNextChg &&
@@ -667,7 +667,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
OUString sTmp( cChar );
SwDrawTextInfo aDrawInf( getIDocumentLayoutAccess()->GetCurrentViewShell(),
*pOut, 0, sTmp, 0, 1, 0, false );
- nAktWidth = aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
+ nAktWidth = aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
aArg.nWordWidth += nAktWidth;
aArg.nRowWidth += nAktWidth;
if( (long)rAbsMin < aArg.nWordWidth )
@@ -689,11 +689,11 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
{
case RES_TXTATR_FLYCNT :
{
- SwFrmFmt *pFrmFmt = pHint->GetFlyCnt().GetFrmFmt();
- const SvxLRSpaceItem &rLR = pFrmFmt->GetLRSpace();
- if( RES_DRAWFRMFMT == pFrmFmt->Which() )
+ SwFrameFormat *pFrameFormat = pHint->GetFlyCnt().GetFrameFormat();
+ const SvxLRSpaceItem &rLR = pFrameFormat->GetLRSpace();
+ if( RES_DRAWFRMFMT == pFrameFormat->Which() )
{
- const SdrObject* pSObj = pFrmFmt->FindSdrObject();
+ const SdrObject* pSObj = pFrameFormat->FindSdrObject();
if( pSObj )
nAktWidth = pSObj->GetCurrentBoundRect().GetWidth();
else
@@ -701,8 +701,8 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
}
else
{
- const SwFmtFrmSize& rTmpSize = pFrmFmt->GetFrmSize();
- if( RES_FLYFRMFMT == pFrmFmt->Which()
+ const SwFormatFrmSize& rTmpSize = pFrameFormat->GetFrmSize();
+ if( RES_FLYFRMFMT == pFrameFormat->Which()
&& rTmpSize.GetWidthPercent() )
{
// This is a hack for the wollowing situation: In the paragraph there's a
@@ -715,7 +715,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
rMax = USHRT_MAX;
}
else
- nAktWidth = pFrmFmt->GetFrmSize().GetWidth();
+ nAktWidth = pFrameFormat->GetFrmSize().GetWidth();
}
nAktWidth += rLR.GetLeft();
nAktWidth += rLR.GetRight();
@@ -729,9 +729,9 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
}
case RES_TXTATR_FTN :
{
- const OUString aTxt = pHint->GetFtn().GetNumStr();
- if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0,
- aTxt.getLength() ) )
+ const OUString aText = pHint->GetFootnote().GetNumStr();
+ if( lcl_MinMaxString( aArg, aIter.GetFnt(), aText, 0,
+ aText.getLength() ) )
nAdd = 20;
break;
}
@@ -739,10 +739,10 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
case RES_TXTATR_FIELD :
case RES_TXTATR_ANNOTATION :
{
- SwField *pFld = const_cast<SwField*>(pHint->GetFmtFld().GetField());
- const OUString aTxt = pFld->ExpandField(true);
- if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0,
- aTxt.getLength() ) )
+ SwField *pField = const_cast<SwField*>(pHint->GetFormatField().GetField());
+ const OUString aText = pField->ExpandField(true);
+ if( lcl_MinMaxString( aArg, aIter.GetFnt(), aText, 0,
+ aText.getLength() ) )
nAdd = 20;
break;
}
@@ -785,7 +785,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
*
* Changing this method very likely requires changing of "GetMinMaxSize"
*/
-sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
+sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
const
{
SwViewShell const * pSh = GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
@@ -813,11 +813,11 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
return 100;
SwScriptInfo aScriptInfo;
- SwAttrIter aIter( *const_cast<SwTxtNode*>(this), aScriptInfo );
+ SwAttrIter aIter( *const_cast<SwTextNode*>(this), aScriptInfo );
aIter.SeekAndChgAttrIter( nStt, pOut );
Boundary aBound =
- g_pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), nStt,
+ g_pBreakIt->GetBreakIter()->getWordBoundary( GetText(), nStt,
g_pBreakIt->GetLocale( aIter.GetFnt()->GetLanguage() ),
WordType::DICTIONARY_WORD, true );
@@ -839,14 +839,14 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
}
SwScriptInfo aScriptInfo;
- SwAttrIter aIter( *const_cast<SwTxtNode*>(this), aScriptInfo );
+ SwAttrIter aIter( *const_cast<SwTextNode*>(this), aScriptInfo );
// We do not want scaling attributes to be considered during this
// calculation. For this, we push a temporary scaling attribute with
// scaling value 100 and priority flag on top of the scaling stack
SwAttrHandler& rAH = aIter.GetAttrHandler();
SvxCharScaleWidthItem aItem(100, RES_CHRATR_SCALEW);
- SwTxtAttrEnd aAttr( aItem, nStt, nEnd );
+ SwTextAttrEnd aAttr( aItem, nStt, nEnd );
aAttr.SetPriorityAttr( true );
rAH.PushAndChg( aAttr, *(aIter.GetFnt()) );
@@ -864,7 +864,7 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
sal_Int32 nStop = nIdx;
sal_Unicode cChar = CH_BLANK;
- SwTxtAttr* pHint = NULL;
+ SwTextAttr* pHint = NULL;
// stop at special characters in [ nIdx, nNextChg ]
while( nStop < nEnd && nStop < nNextChg )
@@ -891,8 +891,8 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
// calculate text widths up to cChar
if ( nStop > nIdx )
{
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetTxt(), nIdx, nStop - nIdx );
- nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
+ SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetText(), nIdx, nStop - nIdx );
+ nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
}
nIdx = nStop;
@@ -909,7 +909,7 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
// tab receives width of one space
OUString sTmp( CH_BLANK );
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, sTmp, 0, 1 );
- nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
+ nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
nIdx++;
}
else if ( cChar == CHAR_SOFTHYPHEN )
@@ -918,7 +918,7 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
{
OUString sTmp( cChar );
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, sTmp, 0, 1 );
- nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
+ nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
nIdx++;
}
else if ( pHint && ( cChar == CH_TXTATR_BREAKWORD || cChar == CH_TXTATR_INWORD ) )
@@ -927,21 +927,21 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
{
case RES_TXTATR_FTN :
{
- const OUString aTxt = pHint->GetFtn().GetNumStr();
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.getLength() );
+ const OUString aText = pHint->GetFootnote().GetNumStr();
+ SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aText, 0, aText.getLength() );
- nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
+ nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
break;
}
case RES_TXTATR_FIELD :
case RES_TXTATR_ANNOTATION :
{
- SwField *pFld = const_cast<SwField*>(pHint->GetFmtFld().GetField());
- OUString const aTxt = pFld->ExpandField(true);
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.getLength() );
+ SwField *pField = const_cast<SwField*>(pHint->GetFormatField().GetField());
+ OUString const aText = pField->ExpandField(true);
+ SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aText, 0, aText.getLength() );
- nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
+ nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
break;
}
@@ -957,9 +957,9 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
nWidth = std::max( nWidth, nProWidth );
// search for a text frame this node belongs to
- SwIterator<SwTxtFrm,SwTxtNode> aFrmIter( *this );
- SwTxtFrm* pFrm = 0;
- for( SwTxtFrm* pTmpFrm = aFrmIter.First(); pTmpFrm; pTmpFrm = aFrmIter.Next() )
+ SwIterator<SwTextFrm,SwTextNode> aFrmIter( *this );
+ SwTextFrm* pFrm = 0;
+ for( SwTextFrm* pTmpFrm = aFrmIter.First(); pTmpFrm; pTmpFrm = aFrmIter.Next() )
{
if ( pTmpFrm->GetOfst() <= nStt &&
( !pTmpFrm->GetFollow() ||
@@ -973,8 +973,8 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
// search for the line containing nStt
if ( pFrm && pFrm->HasPara() )
{
- SwTxtInfo aInf( pFrm );
- SwTxtIter aLine( pFrm, &aInf );
+ SwTextInfo aInf( pFrm );
+ SwTextIter aLine( pFrm, &aInf );
aLine.CharToLine( nStt );
pOut->SetMapMode( aOldMap );
return (sal_uInt16)( nWidth ?
@@ -986,20 +986,20 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
aIter.SeekAndChgAttrIter( nStt, pOut );
pOut->SetMapMode( aOldMap );
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetTxt(), nStt, 1 );
+ SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetText(), nStt, 1 );
return (sal_uInt16)
- ( nWidth ? ((100 * aIter.GetFnt()->_GetTxtSize( aDrawInf ).Height()) / nWidth ) : 0 );
+ ( nWidth ? ((100 * aIter.GetFnt()->_GetTextSize( aDrawInf ).Height()) / nWidth ) : 0 );
}
-SwTwips SwTxtNode::GetWidthOfLeadingTabs() const
+SwTwips SwTextNode::GetWidthOfLeadingTabs() const
{
SwTwips nRet = 0;
sal_Int32 nIdx = 0;
- while ( nIdx < GetTxt().getLength() )
+ while ( nIdx < GetText().getLength() )
{
- const sal_Unicode cCh = GetTxt()[nIdx];
+ const sal_Unicode cCh = GetText()[nIdx];
if ( cCh!='\t' && cCh!=' ' )
{
break;
@@ -1013,8 +1013,8 @@ SwTwips SwTxtNode::GetWidthOfLeadingTabs() const
aPos.nContent += nIdx;
// Find the non-follow text frame:
- SwIterator<SwTxtFrm,SwTxtNode> aIter( *this );
- for( SwTxtFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
+ SwIterator<SwTextFrm,SwTextNode> aIter( *this );
+ for( SwTextFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
{
// Only consider master frames:
if ( !pFrm->IsFollow() )
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 7fb9ada2e7ad..6f19241b3dbc 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -27,12 +27,12 @@
class OutputDevice;
class SwFont;
class SwpHints;
-class SwTxtAttr;
+class SwTextAttr;
class SwAttrSet;
-class SwTxtNode;
+class SwTextNode;
class SwRedlineItr;
class SwViewShell;
-class SwTxtFrm;
+class SwTextFrm;
class SwAttrIter
{
@@ -56,16 +56,16 @@ private:
sal_uInt8 nPropFont;
const void* aMagicNo[ SW_SCRIPTS ];
sal_uInt16 aFntIdx[ SW_SCRIPTS ];
- const SwTxtNode* m_pTxtNode;
+ const SwTextNode* m_pTextNode;
void SeekFwd( const sal_Int32 nPos );
void SetFnt( SwFont* pNew ) { pFnt = pNew; }
protected:
- void Chg( SwTxtAttr *pHt );
- void Rst( SwTxtAttr *pHt );
- void CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, SwTxtFrm* pFrm = 0 );
- SwAttrIter(SwTxtNode* pTxtNode)
+ void Chg( SwTextAttr *pHt );
+ void Rst( SwTextAttr *pHt );
+ void CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrm* pFrm = 0 );
+ SwAttrIter(SwTextNode* pTextNode)
: pShell(0)
, pFnt(0)
, pHints(0)
@@ -78,16 +78,16 @@ protected:
, nEndIndex(0)
, nPos(0)
, nPropFont(0)
- , m_pTxtNode(pTxtNode)
+ , m_pTextNode(pTextNode)
{
aMagicNo[SW_LATIN] = aMagicNo[SW_CJK] = aMagicNo[SW_CTL] = NULL;
}
public:
// Constructor, destructor
- SwAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf )
- : pShell(0), pFnt(0), pHints(0), pScriptInfo(0), pLastOut(0), nChgCnt(0), pRedln(0),nPropFont(0), m_pTxtNode(&rTxtNode)
- { CtorInitAttrIter( rTxtNode, rScrInf ); }
+ SwAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf )
+ : pShell(0), pFnt(0), pHints(0), pScriptInfo(0), pLastOut(0), nChgCnt(0), pRedln(0),nPropFont(0), m_pTextNode(&rTextNode)
+ { CtorInitAttrIter( rTextNode, rScrInf ); }
virtual ~SwAttrIter();
@@ -111,7 +111,7 @@ public:
bool HasHints() const { return 0 != pHints; }
// Returns the attribute for a position
- SwTxtAttr *GetAttr( const sal_Int32 nPos ) const;
+ SwTextAttr *GetAttr( const sal_Int32 nPos ) const;
const SwAttrSet* GetAttrSet() const { return pAttrSet; }
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index dd149c7ad225..d8ea12b83da7 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -49,51 +49,51 @@
// Not reentrant !!!
// is set in GetCharRect and is interpreted in UnitUp/Down.
-bool SwTxtCursor::bRightMargin = false;
+bool SwTextCursor::bRightMargin = false;
// After calculating the position of a character during GetCharRect
// this function allows to find the coordinates of a position (defined
// in pCMS->pSpecialPos) inside a special portion (e.g., a field)
-static void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
+static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig,
const SwCrsrMoveState& rCMS,
const SwLinePortion& rPor )
{
OSL_ENSURE( rCMS.pSpecialPos, "Information about special pos missing" );
- if ( rPor.InFldGrp() && !static_cast<const SwFldPortion&>(rPor).GetExp().isEmpty() )
+ if ( rPor.InFieldGrp() && !static_cast<const SwFieldPortion&>(rPor).GetExp().isEmpty() )
{
const sal_Int32 nCharOfst = rCMS.pSpecialPos->nCharOfst;
- sal_Int32 nFldIdx = 0;
- sal_Int32 nFldLen = 0;
+ sal_Int32 nFieldIdx = 0;
+ sal_Int32 nFieldLen = 0;
OUString sString;
const OUString* pString = 0;
const SwLinePortion* pPor = &rPor;
do
{
- if ( pPor->InFldGrp() )
+ if ( pPor->InFieldGrp() )
{
- sString = static_cast<const SwFldPortion*>(pPor)->GetExp();
+ sString = static_cast<const SwFieldPortion*>(pPor)->GetExp();
pString = &sString;
- nFldLen = pString->getLength();
+ nFieldLen = pString->getLength();
}
else
{
pString = 0;
- nFldLen = 0;
+ nFieldLen = 0;
}
- if ( ! pPor->GetPortion() || nFldIdx + nFldLen > nCharOfst )
+ if ( ! pPor->GetPortion() || nFieldIdx + nFieldLen > nCharOfst )
break;
- nFldIdx = nFldIdx + nFldLen;
+ nFieldIdx = nFieldIdx + nFieldLen;
rOrig.Pos().X() += pPor->Width();
pPor = pPor->GetPortion();
} while ( true );
- OSL_ENSURE( nCharOfst >= nFldIdx, "Request of position inside field failed" );
- sal_Int32 nLen = nCharOfst - nFldIdx + 1;
+ OSL_ENSURE( nCharOfst >= nFieldIdx, "Request of position inside field failed" );
+ sal_Int32 nLen = nCharOfst - nFieldIdx + 1;
if ( pString )
{
@@ -103,14 +103,14 @@ static void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
sal_Int32 nOldLen = pPor->GetLen();
const_cast<SwLinePortion*>(pPor)->SetLen( nLen - 1 );
const SwTwips nX1 = pPor->GetLen() ?
- pPor->GetTxtSize( rInf ).Width() :
+ pPor->GetTextSize( rInf ).Width() :
0;
SwTwips nX2 = 0;
if ( rCMS.bRealWidth )
{
const_cast<SwLinePortion*>(pPor)->SetLen( nLen );
- nX2 = pPor->GetTxtSize( rInf ).Width();
+ nX2 = pPor->GetTextSize( rInf ).Width();
}
const_cast<SwLinePortion*>(pPor)->SetLen( nOldLen );
@@ -131,13 +131,13 @@ static void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
// #i111284#
namespace {
- bool AreListLevelIndentsApplicableAndLabelAlignmentActive( const SwTxtNode& rTxtNode )
+ bool AreListLevelIndentsApplicableAndLabelAlignmentActive( const SwTextNode& rTextNode )
{
bool bRet( false );
- if ( rTxtNode.GetNumRule() && rTxtNode.AreListLevelIndentsApplicable() )
+ if ( rTextNode.GetNumRule() && rTextNode.AreListLevelIndentsApplicable() )
{
- int nListLevel = rTxtNode.GetActualListLevel();
+ int nListLevel = rTextNode.GetActualListLevel();
if (nListLevel < 0)
nListLevel = 0;
@@ -145,9 +145,9 @@ namespace {
if (nListLevel >= MAXLEVEL)
nListLevel = MAXLEVEL - 1;
- const SwNumFmt& rNumFmt =
- rTxtNode.GetNumRule()->Get( static_cast<sal_uInt16>(nListLevel) );
- if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
+ const SwNumFormat& rNumFormat =
+ rTextNode.GetNumRule()->Get( static_cast<sal_uInt16>(nListLevel) );
+ if ( rNumFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
bRet = true;
}
@@ -157,19 +157,19 @@ namespace {
}
} // end of anonymous namespace
-void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
+void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewInf )
{
- CtorInitTxtIter( pNewFrm, pNewInf );
+ CtorInitTextIter( pNewFrm, pNewInf );
pInf = pNewInf;
GetInfo().SetFont( GetFnt() );
- const SwTxtNode *pNode = pFrm->GetTxtNode();
+ const SwTextNode *pNode = pFrm->GetTextNode();
- const SvxLRSpaceItem &rSpace = pFrm->GetTxtNode()->GetSwAttrSet().GetLRSpace();
+ const SvxLRSpaceItem &rSpace = pFrm->GetTextNode()->GetSwAttrSet().GetLRSpace();
// #i95907#
// #i111284#
const bool bListLevelIndentsApplicableAndLabelAlignmentActive(
- AreListLevelIndentsApplicableAndLabelAlignmentActive( *(pFrm->GetTxtNode()) ) );
+ AreListLevelIndentsApplicableAndLabelAlignmentActive( *(pFrm->GetTextNode()) ) );
// Carefully adjust the text formatting ranges.
@@ -192,10 +192,10 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
pNode->GetLeftMarginWithNum() -
// #i95907#
// #i111284#
- // rSpace.GetLeft() + rSpace.GetTxtLeft();
+ // rSpace.GetLeft() + rSpace.GetTextLeft();
( bListLevelIndentsApplicableAndLabelAlignmentActive
? 0
- : ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) );
+ : ( rSpace.GetLeft() - rSpace.GetTextLeft() ) );
}
else
{
@@ -213,12 +213,12 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
// #i111284#
( bListLevelIndentsApplicableAndLabelAlignmentActive
? 0
- : ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) );
+ : ( rSpace.GetLeft() - rSpace.GetTextLeft() ) );
}
else
{
nLeft = pFrm->Frm().Left() +
- std::max( long( rSpace.GetTxtLeft() + nLMWithNum ),
+ std::max( long( rSpace.GetTextLeft() + nLMWithNum ),
pFrm->Prt().Left() );
}
}
@@ -307,11 +307,11 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
else
{
nFirst = pFrm->Frm().Left() +
- std::max( rSpace.GetTxtLeft() + nLMWithNum+ nFirstLineOfs,
+ std::max( rSpace.GetTextLeft() + nLMWithNum+ nFirstLineOfs,
pFrm->Prt().Left() );
}
- // Note: <SwTxtFrm::GetAdditionalFirstLineOffset()> returns a negative
+ // Note: <SwTextFrm::GetAdditionalFirstLineOffset()> returns a negative
// value for the new list label position and space mode LABEL_ALIGNMENT
// and label alignment CENTER and RIGHT in L2R layout respectively
// label alignment LEFT and CENTER in R2L layout
@@ -320,7 +320,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
if( nFirst >= nRight )
nFirst = nRight - 1;
}
- const SvxAdjustItem& rAdjust = pFrm->GetTxtNode()->GetSwAttrSet().GetAdjust();
+ const SvxAdjustItem& rAdjust = pFrm->GetTextNode()->GetSwAttrSet().GetAdjust();
nAdjust = static_cast<sal_uInt16>(rAdjust.GetAdjust());
// left is left and right is right
@@ -350,7 +350,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
DropInit();
}
-void SwTxtMargin::DropInit()
+void SwTextMargin::DropInit()
{
nDropLeft = nDropLines = nDropHeight = nDropDescent = 0;
const SwParaPortion *pPara = GetInfo().GetParaPortion();
@@ -368,7 +368,7 @@ void SwTxtMargin::DropInit()
}
// The function is interpreting / observing / evaluating / keeping / respecting the first line indention and the specified width.
-SwTwips SwTxtMargin::GetLineStart() const
+SwTwips SwTextMargin::GetLineStart() const
{
SwTwips nRet = GetLeftMargin();
if( GetAdjust() != SVX_ADJUST_LEFT &&
@@ -384,15 +384,15 @@ SwTwips SwTxtMargin::GetLineStart() const
return nRet;
}
-void SwTxtCursor::CtorInitTxtCursor( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
+void SwTextCursor::CtorInitTextCursor( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewInf )
{
- CtorInitTxtMargin( pNewFrm, pNewInf );
+ CtorInitTextMargin( pNewFrm, pNewInf );
// 6096: Attention, the iterators are derived!
// GetInfo().SetOut( GetInfo().GetWin() );
}
// 1170: Ancient bug: Shift-End forgets the last character ...
-bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
+bool SwTextCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwCrsrMoveState* pCMS, const long nMax )
{
// 1170: Ambiguity of document positions
@@ -406,7 +406,7 @@ bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
{
// 8810: Master line RightMargin, after that LeftMargin
const bool bRet = GetCharRect( pOrig, nOfst, pCMS, nMax );
- bRightMargin = nOfst >= GetEnd() && nOfst < GetInfo().GetTxt().getLength();
+ bRightMargin = nOfst >= GetEnd() && nOfst < GetInfo().GetText().getLength();
return bRet;
}
@@ -429,7 +429,7 @@ bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
while( pPor )
{
nX = nX + pPor->Width();
- if( pPor->InTxtGrp() || ( pPor->GetLen() && !pPor->IsFlyPortion()
+ if( pPor->InTextGrp() || ( pPor->GetLen() && !pPor->IsFlyPortion()
&& !pPor->IsHolePortion() ) || pPor->IsBreakPortion() )
{
nLast = nX;
@@ -460,17 +460,17 @@ bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
return true;
}
-// internal function, called by SwTxtCursor::GetCharRect() to calculate
+// internal function, called by SwTextCursor::GetCharRect() to calculate
// the relative character position in the current line.
// pOrig referes to x and y coordinates, width and height of the cursor
// pCMS is used for restricting the cursor, if there are different font
// heights in one line ( first value = offset to y of pOrig, second
// value = real height of (shortened) cursor
-void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
+void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwCrsrMoveState* pCMS )
{
- const OUString aText = GetInfo().GetTxt();
- SwTxtSizeInfo aInf( GetInfo(), &aText, nStart );
+ const OUString aText = GetInfo().GetText();
+ SwTextSizeInfo aInf( GetInfo(), &aText, nStart );
if( GetPropFont() )
aInf.GetFont()->SetProportion( GetPropFont() );
sal_uInt16 nTmpAscent, nTmpHeight; // Line height
@@ -511,11 +511,11 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
size_t nKanaIdx = 0;
long nSpaceAdd = pCurr->IsSpaceAdd() ? pCurr->GetLLSpaceAdd( 0 ) : 0;
- bool bNoTxt = true;
+ bool bNoText = true;
// First all portions without Len at beginning of line are skipped.
// Exceptions are the mean special portions from WhichFirstPortion:
- // Num, ErgoSum, FtnNum, FeldReste
+ // Num, ErgoSum, FootnoteNum, FeldReste
// 8477: but also the only Textportion of an empty line with
// Right/Center-Adjustment! So not just pPor->GetExpandPortion() ...
while( pPor && !pPor->GetLen() && ! bInsideFirstField )
@@ -523,13 +523,13 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
nX += pPor->Width();
if ( pPor->InSpaceGrp() && nSpaceAdd )
nX += pPor->CalcSpacing( nSpaceAdd, aInf );
- if( bNoTxt )
+ if( bNoText )
nTmpFirst = nX;
- // 8670: EndPortions count once as TxtPortions.
- // if( pPor->InTxtGrp() || pPor->IsBreakPortion() )
- if( pPor->InTxtGrp() || pPor->IsBreakPortion() || pPor->InTabGrp() )
+ // 8670: EndPortions count once as TextPortions.
+ // if( pPor->InTextGrp() || pPor->IsBreakPortion() )
+ if( pPor->InTextGrp() || pPor->IsBreakPortion() || pPor->InTabGrp() )
{
- bNoTxt = false;
+ bNoText = false;
nTmpFirst = nX;
}
if( pPor->IsMultiPortion() && static_cast<SwMultiPortion*>(pPor)->HasTabulator() )
@@ -548,7 +548,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
if( pPor->InFixMargGrp() )
{
if( pPor->IsMarginPortion() )
- bNoTxt = false;
+ bNoText = false;
else
{
// fix margin portion => next SpaceAdd, KanaComp value
@@ -575,7 +575,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
else
{
if( !pPor->IsMarginPortion() && !pPor->IsPostItsPortion() &&
- (!pPor->InFldGrp() || pPor->GetAscent() ) )
+ (!pPor->InFieldGrp() || pPor->GetAscent() ) )
{
nPorHeight = pPor->Height();
nPorAscent = pPor->GetAscent();
@@ -584,7 +584,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
( bWidth && ( pPor->IsKernPortion() || pPor->IsMultiPortion() ) ) ) )
{
if( !pPor->IsMarginPortion() && !pPor->IsPostItsPortion() &&
- (!pPor->InFldGrp() || pPor->GetAscent() ) )
+ (!pPor->InFieldGrp() || pPor->GetAscent() ) )
{
nPorHeight = pPor->Height();
nPorAscent = pPor->GetAscent();
@@ -714,7 +714,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SetPropFont( 50 );
SwTextGridItem const*const pGrid(
- GetGridItem(GetTxtFrm()->FindPageFrm()));
+ GetGridItem(GetTextFrm()->FindPageFrm()));
const bool bHasGrid = pGrid && GetInfo().SnapToGrid();
const sal_uInt16 nRubyHeight = bHasGrid ?
pGrid->GetRubyHeight() : 0;
@@ -886,7 +886,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwTwips nTmp = nX;
aInf.SetKanaComp( pKanaComp );
aInf.SetKanaIdx( nKanaIdx );
- nX += pPor->GetTxtSize( aInf ).Width();
+ nX += pPor->GetTextSize( aInf ).Width();
aInf.SetOnWin( bOldOnWin );
if ( pPor->InSpaceGrp() && nSpaceAdd )
nX += pPor->CalcSpacing( nSpaceAdd, aInf );
@@ -895,7 +895,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
pPor->SetLen( pPor->GetLen() + 1 );
aInf.SetLen( pPor->GetLen() );
aInf.SetOnWin( false ); // keine BULLETs!
- nTmp += pPor->GetTxtSize( aInf ).Width();
+ nTmp += pPor->GetTextSize( aInf ).Width();
aInf.SetOnWin( bOldOnWin );
if ( pPor->InSpaceGrp() && nSpaceAdd )
nTmp += pPor->CalcSpacing(nSpaceAdd, aInf);
@@ -905,7 +905,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
pPor->SetLen( nOldLen );
// Shift the cursor with the right border width
- // Note: nX remains positive because GetTxtSize() also include the width of the right border
+ // Note: nX remains positive because GetTextSize() also include the width of the right border
if( aInf.GetIdx() < nOfst && nOfst < aInf.GetIdx() + pPor->GetLen() )
{
// Find the current drop portion part and use its right border
@@ -939,15 +939,15 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
if( pPor )
{
OSL_ENSURE( !pPor->InNumberGrp() || bInsideFirstField, "Number surprise" );
- bool bEmptyFld = false;
- if( pPor->InFldGrp() && pPor->GetLen() )
+ bool bEmptyField = false;
+ if( pPor->InFieldGrp() && pPor->GetLen() )
{
- SwFldPortion *pTmp = static_cast<SwFldPortion*>(pPor);
+ SwFieldPortion *pTmp = static_cast<SwFieldPortion*>(pPor);
while( pTmp->HasFollow() && pTmp->GetExp().isEmpty() )
{
sal_uInt16 nAddX = pTmp->Width();
SwLinePortion *pNext = pTmp->GetPortion();
- while( pNext && !pNext->InFldGrp() )
+ while( pNext && !pNext->InFieldGrp() )
{
OSL_ENSURE( !pNext->GetLen(), "Where's my field follow?" );
nAddX = nAddX + pNext->Width();
@@ -955,18 +955,18 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
}
if( !pNext )
break;
- pTmp = static_cast<SwFldPortion*>(pNext);
+ pTmp = static_cast<SwFieldPortion*>(pNext);
nPorHeight = pTmp->Height();
nPorAscent = pTmp->GetAscent();
nX += nAddX;
- bEmptyFld = true;
+ bEmptyField = true;
}
}
// 8513: Fields in justified text, skipped
while( pPor && !pPor->GetLen() && ! bInsideFirstField &&
( pPor->IsFlyPortion() || pPor->IsKernPortion() ||
pPor->IsBlankPortion() || pPor->InTabGrp() ||
- ( !bEmptyFld && pPor->InFldGrp() ) ) )
+ ( !bEmptyField && pPor->InFieldGrp() ) ) )
{
if ( pPor->InSpaceGrp() && nSpaceAdd )
nX += pPor->PrtWidth() +
@@ -1032,7 +1032,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
}
if( pPor && pCMS )
{
- if( pCMS->bFieldInfo && pPor->InFldGrp() && pPor->Width() )
+ if( pCMS->bFieldInfo && pPor->InFieldGrp() && pPor->Width() )
pOrig->Width( pPor->Width() );
if( pPor->IsDropPortion() )
{
@@ -1076,7 +1076,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
aInf.SetOnWin( false ); // keine BULLETs!
aInf.SetKanaComp( pKanaComp );
aInf.SetKanaIdx( nKanaIdx );
- nTmp = pPor->GetTxtSize( aInf ).Width();
+ nTmp = pPor->GetTextSize( aInf ).Width();
aInf.SetOnWin( bOldOnWin );
if ( pPor->InSpaceGrp() && nSpaceAdd )
nTmp += pPor->CalcSpacing( nSpaceAdd, aInf );
@@ -1164,7 +1164,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
}
}
-bool SwTxtCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
+bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwCrsrMoveState* pCMS, const long nMax )
{
CharCrsrToLine(nOfst);
@@ -1213,7 +1213,7 @@ bool SwTxtCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
pCMS->p2Lines->aPortion.Pos().Y() += aCharPos.Y();
}
- const bool bTabOverMargin = GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN);
+ const bool bTabOverMargin = GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN);
// Make sure the cursor respects the right margin, unless in compat mode, where the tab size has priority over the margin size.
if( pOrig->Left() > nTmpRight && !bTabOverMargin)
pOrig->Pos().X() = nTmpRight;
@@ -1238,13 +1238,13 @@ bool SwTxtCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
pCMS->aRealHeight.Y() = nMax - nTmp;
}
}
- long nOut = pOrig->Right() - GetTxtFrm()->Frm().Right();
+ long nOut = pOrig->Right() - GetTextFrm()->Frm().Right();
if( nOut > 0 )
{
- if( GetTxtFrm()->Frm().Width() < GetTxtFrm()->Prt().Left()
- + GetTxtFrm()->Prt().Width() )
- nOut += GetTxtFrm()->Frm().Width() - GetTxtFrm()->Prt().Left()
- - GetTxtFrm()->Prt().Width();
+ if( GetTextFrm()->Frm().Width() < GetTextFrm()->Prt().Left()
+ + GetTextFrm()->Prt().Width() )
+ nOut += GetTextFrm()->Frm().Width() - GetTextFrm()->Prt().Left()
+ - GetTextFrm()->Prt().Width();
if( nOut > 0 )
pOrig->Pos().X() -= nOut + 10;
}
@@ -1253,13 +1253,13 @@ bool SwTxtCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
}
// Return: Offset in String
-sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
+sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
bool nChgNode, SwCrsrMoveState* pCMS ) const
{
// If necessary, as catch up, do the adjustment
GetAdjusted();
- const OUString &rText = GetInfo().GetTxt();
+ const OUString &rText = GetInfo().GetText();
sal_Int32 nOffset = 0;
// x is the horizontal offset within the line.
@@ -1305,7 +1305,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
{
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
- const_cast<SwTxtSizeInfo&>(GetInfo()).SetIdx( nCurrStart );
+ const_cast<SwTextSizeInfo&>(GetInfo()).SetIdx( nCurrStart );
nWidth = nWidth + sal_uInt16( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
}
if( ( pPor->InFixMargGrp() && ! pPor->IsMarginPortion() ) ||
@@ -1334,7 +1334,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( pPor->IsPostItsPortion() )
nWidth30 = 30 + pPor->GetViewWidth( GetInfo() ) / 2;
else
- nWidth30 = ! nWidth && pPor->GetLen() && pPor->InToxRefOrFldGrp() ?
+ nWidth30 = ! nWidth && pPor->GetLen() && pPor->InToxRefOrFieldGrp() ?
30 :
nWidth;
@@ -1349,7 +1349,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
{
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
- const_cast<SwTxtSizeInfo&>(GetInfo()).SetIdx( nCurrStart );
+ const_cast<SwTextSizeInfo&>(GetInfo()).SetIdx( nCurrStart );
nWidth = nWidth + sal_uInt16( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
}
@@ -1378,7 +1378,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( pPor->IsPostItsPortion() )
nWidth30 = 30 + pPor->GetViewWidth( GetInfo() ) / 2;
else
- nWidth30 = ! nWidth && pPor->GetLen() && pPor->InToxRefOrFldGrp() ?
+ nWidth30 = ! nWidth && pPor->GetLen() && pPor->InToxRefOrFieldGrp() ?
30 :
nWidth;
if( !pPor->IsFlyPortion() && !pPor->IsMarginPortion() )
@@ -1390,7 +1390,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if( nX==nWidth )
{
SwLinePortion *pNextPor = pPor->GetPortion();
- while( pNextPor && pNextPor->InFldGrp() && !pNextPor->Width() )
+ while( pNextPor && pNextPor->InFieldGrp() && !pNextPor->Width() )
{
nCurrStart = nCurrStart + pPor->GetLen();
pPor = pNextPor;
@@ -1400,14 +1400,14 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
}
}
- const_cast<SwTxtSizeInfo&>(GetInfo()).SetIdx( nOldIdx );
+ const_cast<SwTextSizeInfo&>(GetInfo()).SetIdx( nOldIdx );
sal_Int32 nLength = pPor->GetLen();
const bool bFieldInfo = pCMS && pCMS->bFieldInfo;
if( bFieldInfo && ( nWidth30 < nX || bRightOver || bLeftOver ||
- ( pPor->InNumberGrp() && !pPor->IsFtnNumPortion() ) ||
+ ( pPor->InNumberGrp() && !pPor->IsFootnoteNumPortion() ) ||
( pPor->IsMarginPortion() && nWidth > nX + 30 ) ) )
static_cast<SwCrsrMoveState*>(pCMS)->bPosCorr = true;
@@ -1417,7 +1417,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if( pCMS->bInFrontOfLabel)
{
if (! (2 * nX < nWidth && pPor->InNumberGrp() &&
- !pPor->IsFtnNumPortion()))
+ !pPor->IsFootnoteNumPortion()))
pCMS->bInFrontOfLabel = false;
}
}
@@ -1434,8 +1434,8 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if (!bRightOver && nX)
{
- if( pPor->IsFtnNumPortion())
- static_cast<SwCrsrMoveState*>(pCMS)->bFtnNoInfo = true;
+ if( pPor->IsFootnoteNumPortion())
+ static_cast<SwCrsrMoveState*>(pCMS)->bFootnoteNoInfo = true;
else if (pPor->InNumberGrp() ) // #i23726#
{
static_cast<SwCrsrMoveState*>(pCMS)->nInNumPostionOffset = nX;
@@ -1453,7 +1453,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// in the last line of a centered paragraph
nCurrStart < rText.getLength() ) )
--nCurrStart;
- else if( pPor->InFldGrp() && static_cast<SwFldPortion*>(pPor)->IsFollow()
+ else if( pPor->InFieldGrp() && static_cast<SwFieldPortion*>(pPor)->IsFollow()
&& nWidth > nX )
{
if( bFieldInfo )
@@ -1476,7 +1476,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// Else we may not enter the character-supplying frame...
if( !( nChgNode && pPos && pPor->IsFlyCntPortion() ) )
{
- if ( pPor->InFldGrp() ||
+ if ( pPor->InFieldGrp() ||
( pPor->IsMultiPortion() &&
static_cast<SwMultiPortion*>(pPor)->IsBidi() ) )
{
@@ -1489,8 +1489,8 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
}
if( nWidth - nHeight/2 <= nX &&
- ( ! pPor->InFldGrp() ||
- !static_cast<SwFldPortion*>(pPor)->HasFollow() ) )
+ ( ! pPor->InFieldGrp() ||
+ !static_cast<SwFieldPortion*>(pPor)->HasFollow() ) )
++nCurrStart;
}
else if ( ( !pPor->IsFlyPortion() || ( pPor->GetPortion() &&
@@ -1513,9 +1513,9 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( pPor->IsPostItsPortion() || pPor->IsBreakPortion() ||
pPor->InToxRefGrp() )
return nCurrStart;
- if ( pPor->InFldGrp() )
+ if ( pPor->InFieldGrp() )
{
- if( bRightOver && !static_cast<SwFldPortion*>(pPor)->HasFollow() )
+ if( bRightOver && !static_cast<SwFieldPortion*>(pPor)->HasFollow() )
++nCurrStart;
return nCurrStart;
}
@@ -1537,8 +1537,8 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// if we are in the first line of a double line portion, we have
// to add a value to nTmpY for not staying in this line
// we also want to skip the first line, if we are inside ruby
- if ( ( static_cast<SwTxtSizeInfo*>(pInf)->IsMulti() &&
- static_cast<SwTxtSizeInfo*>(pInf)->IsFirstMulti() ) ||
+ if ( ( static_cast<SwTextSizeInfo*>(pInf)->IsMulti() &&
+ static_cast<SwTextSizeInfo*>(pInf)->IsFirstMulti() ) ||
( static_cast<SwMultiPortion*>(pPor)->IsRuby() &&
static_cast<SwMultiPortion*>(pPor)->OnTop() ) )
nTmpY += static_cast<SwMultiPortion*>(pPor)->Height();
@@ -1550,7 +1550,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
! static_cast<SwMultiPortion*>(pPor)->OnTop() )
nTmpY = 0;
- SwTxtCursorSave aSave( const_cast<SwTxtCursor*>(static_cast<const SwTxtCursor*>(this)), static_cast<SwMultiPortion*>(pPor),
+ SwTextCursorSave aSave( const_cast<SwTextCursor*>(static_cast<const SwTextCursor*>(this)), static_cast<SwMultiPortion*>(pPor),
nTmpY, nX, nCurrStart, nSpaceAdd );
SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() );
@@ -1582,7 +1582,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
return GetCrsrOfst( pPos, Point( GetLineStart() + nX, rPoint.Y() ),
nChgNode, pCMS );
}
- if( pPor->InTxtGrp() )
+ if( pPor->InTextGrp() )
{
sal_uInt8 nOldProp;
if( GetPropFont() )
@@ -1593,9 +1593,9 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
else
nOldProp = 0;
{
- SwTxtSizeInfo aSizeInf( GetInfo(), &rText, nCurrStart );
- const_cast<SwTxtCursor*>(this)->SeekAndChg( aSizeInf );
- SwTxtSlot aDiffTxt( &aSizeInf, static_cast<SwTxtPortion*>(pPor), false, false );
+ SwTextSizeInfo aSizeInf( GetInfo(), &rText, nCurrStart );
+ const_cast<SwTextCursor*>(this)->SeekAndChg( aSizeInf );
+ SwTextSlot aDiffText( &aSizeInf, static_cast<SwTextPortion*>(pPor), false, false );
SwFontSave aSave( aSizeInf, pPor->IsDropPortion() ?
static_cast<SwDropPortion*>(pPor)->GetFnt() : NULL );
@@ -1605,7 +1605,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
SwDrawTextInfo aDrawInf( aSizeInf.GetVsh(),
*aSizeInf.GetOut(),
&pPara->GetScriptInfo(),
- aSizeInf.GetTxt(),
+ aSizeInf.GetText(),
aSizeInf.GetIdx(),
pPor->GetLen() );
@@ -1646,12 +1646,12 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
sal_Int32 nCharCnt = 0;
// #i41860# Thai justified alignemt needs some
// additional information:
- aDrawInf.SetNumberOfBlanks( pPor->InTxtGrp() ?
- static_cast<const SwTxtPortion*>(pPor)->GetSpaceCnt( aSizeInf, nCharCnt ) :
+ aDrawInf.SetNumberOfBlanks( pPor->InTextGrp() ?
+ static_cast<const SwTextPortion*>(pPor)->GetSpaceCnt( aSizeInf, nCharCnt ) :
0 );
}
- if ( pPor->InFldGrp() && pCMS && pCMS->pSpecialPos )
+ if ( pPor->InFieldGrp() && pCMS && pCMS->pSpecialPos )
aDrawInf.SetLen( COMPLETE_STRING );
aDrawInf.SetSpace( nSpaceAdd );
@@ -1662,13 +1662,13 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( SW_CJK == aSizeInf.GetFont()->GetActual() &&
pPara->GetScriptInfo().CountCompChg() &&
- ! pPor->InFldGrp() )
+ ! pPor->InFieldGrp() )
aDrawInf.SetKanaComp( nKanaComp );
nLength = aSizeInf.GetFont()->_GetCrsrOfst( aDrawInf );
// get position inside field portion?
- if ( pPor->InFldGrp() && pCMS && pCMS->pSpecialPos )
+ if ( pPor->InFieldGrp() && pCMS && pCMS->pSpecialPos )
{
pCMS->pSpecialPos->nCharOfst = nLength;
nLength = 0;
@@ -1698,7 +1698,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
SwFlyInCntFrm *pTmp = static_cast<SwFlyCntPortion*>(pPor)->GetFlyFrm();
SwFrm* pLower = pTmp->GetLower();
bool bChgNode = pLower
- && (pLower->IsTxtFrm() || pLower->IsLayoutFrm());
+ && (pLower->IsTextFrm() || pLower->IsLayoutFrm());
Point aTmpPoint( rPoint );
if ( pFrm->IsRightToLeft() )
@@ -1715,7 +1715,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// After a change of the frame, our font must be still
// available for/in the OutputDevice.
// For comparison: Paint and new SwFlyCntPortion !
- static_cast<SwTxtSizeInfo*>(pInf)->SelectFont();
+ static_cast<SwTextSizeInfo*>(pInf)->SelectFont();
// 6776: The pIter->GetCrsrOfst is returning here
// from a nesting with COMPLETE_STRING.
@@ -1755,7 +1755,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
true if any overlapping text portion has been found and put into list
false if no portion overlaps, the list has been unchanged
*/
-bool SwTxtFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) const
+bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) const
{
bool bRet = false;
// PaintArea() instead Frm() for negative indents
@@ -1767,7 +1767,7 @@ bool SwTxtFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) c
SwRect aRect( aTmpFrm );
aRect.Intersection( rRect );
// rNode without const to create SwPaMs
- SwCntntNode &rNode = const_cast<SwCntntNode&>( *GetNode() );
+ SwContentNode &rNode = const_cast<SwContentNode&>( *GetNode() );
SwNodeIndex aIdx( rNode );
SwPosition aPosL( aIdx, SwIndex( &rNode, 0 ) );
if( IsEmpty() )
@@ -1780,8 +1780,8 @@ bool SwTxtFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) c
sal_Int32 nOld = -1;
SwPosition aPosR( aPosL );
Point aPoint;
- SwTxtInfo aInf( const_cast<SwTxtFrm*>(this) );
- SwTxtIter aLine( const_cast<SwTxtFrm*>(this), &aInf );
+ SwTextInfo aInf( const_cast<SwTextFrm*>(this) );
+ SwTextIter aLine( const_cast<SwTextFrm*>(this), &aInf );
// We have to care for top-to-bottom layout, where right becomes top etc.
SWRECTFN( this )
SwTwips nTop = (aRect.*fnRect->fnGetTop)();
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 505e017ebe7a..a8f5ff228ddd 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -70,28 +70,28 @@ using namespace ::com::sun::star;
namespace {
//! Calculates and sets optimal repaint offset for the current line
- static long lcl_CalcOptRepaint( SwTxtFormatter &rThis,
+ static long lcl_CalcOptRepaint( SwTextFormatter &rThis,
SwLineLayout &rCurr,
const sal_Int32 nOldLineEnd,
const std::vector<long> &rFlyStarts );
//! Determine if we need to build hidden portions
- static bool lcl_BuildHiddenPortion( const SwTxtSizeInfo& rInf, sal_Int32 &rPos );
+ static bool lcl_BuildHiddenPortion( const SwTextSizeInfo& rInf, sal_Int32 &rPos );
// Check whether the two font has the same border
static bool lcl_HasSameBorder(const SwFont& rFirst, const SwFont& rSecond);
}
-inline void ClearFly( SwTxtFormatInfo &rInf )
+inline void ClearFly( SwTextFormatInfo &rInf )
{
delete rInf.GetFly();
rInf.SetFly(0);
}
-void SwTxtFormatter::CtorInitTxtFormatter( SwTxtFrm *pNewFrm, SwTxtFormatInfo *pNewInf )
+void SwTextFormatter::CtorInitTextFormatter( SwTextFrm *pNewFrm, SwTextFormatInfo *pNewInf )
{
- CtorInitTxtPainter( pNewFrm, pNewInf );
+ CtorInitTextPainter( pNewFrm, pNewInf );
pInf = pNewInf;
- pDropFmt = GetInfo().GetDropFmt();
+ pDropFormat = GetInfo().GetDropFormat();
pMulti = NULL;
bOnceMore = false;
@@ -105,15 +105,15 @@ void SwTxtFormatter::CtorInitTxtFormatter( SwTxtFrm *pNewFrm, SwTxtFormatInfo *p
m_nHintEndIndex = 0;
m_pFirstOfBorderMerge = 0;
- if( nStart > GetInfo().GetTxt().getLength() )
+ if( nStart > GetInfo().GetText().getLength() )
{
- OSL_ENSURE( false, "+SwTxtFormatter::CTOR: bad offset" );
- nStart = GetInfo().GetTxt().getLength();
+ OSL_ENSURE( false, "+SwTextFormatter::CTOR: bad offset" );
+ nStart = GetInfo().GetText().getLength();
}
}
-SwTxtFormatter::~SwTxtFormatter()
+SwTextFormatter::~SwTextFormatter()
{
// Extremely unlikely, but still possible
// e.g.: field splits up, widows start to matter
@@ -124,7 +124,7 @@ SwTxtFormatter::~SwTxtFormatter()
}
}
-void SwTxtFormatter::Insert( SwLineLayout *pLay )
+void SwTextFormatter::Insert( SwLineLayout *pLay )
{
// Insert BEHIND the current element
if ( pCurr )
@@ -136,12 +136,12 @@ void SwTxtFormatter::Insert( SwLineLayout *pLay )
pCurr = pLay;
}
-sal_uInt16 SwTxtFormatter::GetFrmRstHeight() const
+sal_uInt16 SwTextFormatter::GetFrmRstHeight() const
{
// We want the rest height relative to the page.
// If we're in a table, then pFrm->GetUpper() is not the page.
- // GetFrmRstHeight() is being called with Ftn.
+ // GetFrmRstHeight() is being called with Footnote.
// Wrong: const SwFrm *pUpper = pFrm->GetUpper();
const SwFrm *pPage = (const SwFrm*)pFrm->FindPageFrm();
const SwTwips nHeight = pPage->Frm().Top()
@@ -153,7 +153,7 @@ sal_uInt16 SwTxtFormatter::GetFrmRstHeight() const
return sal_uInt16( nHeight );
}
-SwLinePortion *SwTxtFormatter::Underflow( SwTxtFormatInfo &rInf )
+SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
{
// Save values and initialize rInf
SwLinePortion *pUnderflow = rInf.GetUnderflow();
@@ -218,16 +218,16 @@ SwLinePortion *SwTxtFormatter::Underflow( SwTxtFormatInfo &rInf )
}
// What? The under-flow portion is not in the portion chain?
- OSL_ENSURE( pPor, "SwTxtFormatter::Underflow: overflow but underflow" );
+ OSL_ENSURE( pPor, "SwTextFormatter::Underflow: overflow but underflow" );
// OD 2004-05-26 #i29529# - correction: no delete of footnotes
-// if( rInf.IsFtnInside() && pPor && !rInf.IsQuick() )
+// if( rInf.IsFootnoteInside() && pPor && !rInf.IsQuick() )
// {
// SwLinePortion *pTmp = pPor->GetPortion();
// while( pTmp )
// {
-// if( pTmp->IsFtnPortion() )
-// ((SwFtnPortion*)pTmp)->ClearFtn();
+// if( pTmp->IsFootnotePortion() )
+// ((SwFootnotePortion*)pTmp)->ClearFootnote();
// pTmp = pTmp->GetPortion();
// }
// }
@@ -276,7 +276,7 @@ SwLinePortion *SwTxtFormatter::Underflow( SwTxtFormatInfo &rInf )
// Here inly the other way around:
if( rInf.GetLast() == pCurr )
{
- if( pPor->InTxtGrp() && !pPor->InExpGrp() )
+ if( pPor->InTextGrp() && !pPor->InExpGrp() )
{
const sal_uInt16 nOldWhich = pCurr->GetWhichPor();
*(SwLinePortion*)pCurr = *pPor;
@@ -289,8 +289,8 @@ SwLinePortion *SwTxtFormatter::Underflow( SwTxtFormatInfo &rInf )
}
pPor->Truncate();
SwLinePortion *const pRest( rInf.GetRest() );
- if (pRest && pRest->InFldGrp() &&
- static_cast<SwFldPortion*>(pRest)->IsNoLength())
+ if (pRest && pRest->InFieldGrp() &&
+ static_cast<SwFieldPortion*>(pRest)->IsNoLength())
{
// HACK: decrement again, so we pick up the suffix in next line!
--m_nHintEndIndex;
@@ -300,7 +300,7 @@ SwLinePortion *SwTxtFormatter::Underflow( SwTxtFormatInfo &rInf )
return pPor;
}
-void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf,
+void SwTextFormatter::InsertPortion( SwTextFormatInfo &rInf,
SwLinePortion *pPor ) const
{
// The new portion is inserted, but everything's different for
@@ -313,7 +313,7 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf,
}
// #i112181#
- rInf.SetOtherThanFtnInside( rInf.IsOtherThanFtnInside() || !pPor->IsFtnPortion() );
+ rInf.SetOtherThanFootnoteInside( rInf.IsOtherThanFootnoteInside() || !pPor->IsFootnotePortion() );
}
else
{
@@ -326,7 +326,7 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf,
}
pLast->Insert( pPor );
- rInf.SetOtherThanFtnInside( rInf.IsOtherThanFtnInside() || !pPor->IsFtnPortion() );
+ rInf.SetOtherThanFootnoteInside( rInf.IsOtherThanFootnoteInside() || !pPor->IsFootnotePortion() );
// Adjust maxima
if( pCurr->Height() < pPor->Height() )
@@ -345,14 +345,14 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf,
}
}
-void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
+void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
{
- OSL_ENSURE( rInf.GetTxt().getLength() < COMPLETE_STRING,
- "SwTxtFormatter::BuildPortions: bad text length in info" );
+ OSL_ENSURE( rInf.GetText().getLength() < COMPLETE_STRING,
+ "SwTextFormatter::BuildPortions: bad text length in info" );
rInf.ChkNoHyph( CntEndHyph(), CntMidHyph() );
- // First NewTxtPortion() decides whether pCurr ends up in pPor.
+ // First NewTextPortion() decides whether pCurr ends up in pPor.
// We need to make sure that the font is being set in any case.
// This is done automatically in CalcAscent.
rInf.SetLast( pCurr );
@@ -366,7 +366,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
SeekAndChg( rInf );
// Width() is shortened in CalcFlyWidth if we have a FlyPortion
- OSL_ENSURE( !rInf.X() || pMulti, "SwTxtFormatter::BuildPortion X=0?" );
+ OSL_ENSURE( !rInf.X() || pMulti, "SwTextFormatter::BuildPortion X=0?" );
CalcFlyWidth( rInf );
SwFlyPortion *pFly = rInf.GetFly();
if( pFly )
@@ -384,7 +384,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
const bool bHasGrid = pGrid && rInf.SnapToGrid() &&
GRID_LINES_CHARS == pGrid->GetGridType();
- const SwDoc *pDoc = rInf.GetTxtFrm()->GetNode()->GetDoc();
+ const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc();
const sal_uInt16 nGridWidth = (bHasGrid) ? GetGridWidth(*pGrid, *pDoc) : 0;
// used for grid mode only:
@@ -399,16 +399,16 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
while( pPor && !rInf.IsStop() )
{
OSL_ENSURE( rInf.GetLen() < COMPLETE_STRING &&
- rInf.GetIdx() <= rInf.GetTxt().getLength(),
- "SwTxtFormatter::BuildPortions: bad length in info" );
+ rInf.GetIdx() <= rInf.GetText().getLength(),
+ "SwTextFormatter::BuildPortions: bad length in info" );
// We have to check the script for fields in order to set the
// correct nActual value for the font.
- if( pPor->InFldGrp() )
- static_cast<SwFldPortion*>(pPor)->CheckScript( rInf );
+ if( pPor->InFieldGrp() )
+ static_cast<SwFieldPortion*>(pPor)->CheckScript( rInf );
if( ! bHasGrid && rInf.HasScriptSpace() &&
- rInf.GetLast() && rInf.GetLast()->InTxtGrp() &&
+ rInf.GetLast() && rInf.GetLast()->InTextGrp() &&
rInf.GetLast()->Width() && !rInf.GetLast()->InNumberGrp() )
{
sal_uInt8 nNxtActual = rInf.GetFont()->GetActual();
@@ -419,24 +419,24 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
// are there any punctuation characters on both sides
// of the kerning portion?
- if ( pPor->InFldGrp() )
+ if ( pPor->InFieldGrp() )
{
- OUString aAltTxt;
- if ( static_cast<SwFldPortion*>(pPor)->GetExpTxt( rInf, aAltTxt ) &&
- !aAltTxt.isEmpty() )
+ OUString aAltText;
+ if ( static_cast<SwFieldPortion*>(pPor)->GetExpText( rInf, aAltText ) &&
+ !aAltText.isEmpty() )
{
- bAllowBehind = rCC.isLetterNumeric( aAltTxt, 0 );
+ bAllowBehind = rCC.isLetterNumeric( aAltText, 0 );
- const SwFont* pTmpFnt = static_cast<SwFldPortion*>(pPor)->GetFont();
+ const SwFont* pTmpFnt = static_cast<SwFieldPortion*>(pPor)->GetFont();
if ( pTmpFnt )
nNxtActual = pTmpFnt->GetActual();
}
}
else
{
- const OUString& rTxt = rInf.GetTxt();
+ const OUString& rText = rInf.GetText();
sal_Int32 nIdx = rInf.GetIdx();
- bAllowBehind = nIdx < rTxt.getLength() && rCC.isLetterNumeric(rTxt, nIdx);
+ bAllowBehind = nIdx < rText.getLength() && rCC.isLetterNumeric(rText, nIdx);
}
const SwLinePortion* pLast = rInf.GetLast();
@@ -444,15 +444,15 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
{
bool bAllowBefore = false;
- if ( pLast->InFldGrp() )
+ if ( pLast->InFieldGrp() )
{
- OUString aAltTxt;
- if ( static_cast<const SwFldPortion*>(pLast)->GetExpTxt( rInf, aAltTxt ) &&
- !aAltTxt.isEmpty() )
+ OUString aAltText;
+ if ( static_cast<const SwFieldPortion*>(pLast)->GetExpText( rInf, aAltText ) &&
+ !aAltText.isEmpty() )
{
- bAllowBefore = rCC.isLetterNumeric( aAltTxt, aAltTxt.getLength() - 1 );
+ bAllowBefore = rCC.isLetterNumeric( aAltText, aAltText.getLength() - 1 );
- const SwFont* pTmpFnt = static_cast<const SwFldPortion*>(pLast)->GetFont();
+ const SwFont* pTmpFnt = static_cast<const SwFieldPortion*>(pLast)->GetFont();
if ( pTmpFnt )
{
nLstActual = pTmpFnt->GetActual();
@@ -462,7 +462,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
}
else if ( rInf.GetIdx() )
{
- bAllowBefore = rCC.isLetterNumeric( rInf.GetTxt(), rInf.GetIdx() - 1 );
+ bAllowBefore = rCC.isLetterNumeric( rInf.GetText(), rInf.GetIdx() - 1 );
// Note: ScriptType returns values in [1,4]
if ( bAllowBefore )
nLstActual = pScriptInfo->ScriptType( rInf.GetIdx() - 1 ) - 1;
@@ -475,7 +475,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
{
SwKernPortion* pKrn =
new SwKernPortion( *rInf.GetLast(), nLstHeight,
- pLast->InFldGrp() && pPor->InFldGrp() );
+ pLast->InFieldGrp() && pPor->InFieldGrp() );
rInf.GetLast()->SetPortion( NULL );
InsertPortion( rInf, pKrn );
}
@@ -587,20 +587,20 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
nUnderLineStart = 0;
if( pPor->IsFlyCntPortion() || ( pPor->IsMultiPortion() &&
- static_cast<SwMultiPortion*>(pPor)->HasFlyInCntnt() ) )
+ static_cast<SwMultiPortion*>(pPor)->HasFlyInContent() ) )
SetFlyInCntBase();
// bUnderflow needs to be reset or we wrap again at the next softhyphen
if ( !bFull )
{
rInf.ClrUnderflow();
- if( ! bHasGrid && rInf.HasScriptSpace() && pPor->InTxtGrp() &&
- pPor->GetLen() && !pPor->InFldGrp() )
+ if( ! bHasGrid && rInf.HasScriptSpace() && pPor->InTextGrp() &&
+ pPor->GetLen() && !pPor->InFieldGrp() )
{
// The distance between two different scripts is set
// to 20% of the fontheight.
sal_Int32 nTmp = rInf.GetIdx() + pPor->GetLen();
if( nTmp == pScriptInfo->NextScriptChg( nTmp - 1 ) &&
- nTmp != rInf.GetTxt().getLength() )
+ nTmp != rInf.GetText().getLength() )
{
const sal_uInt16 nDist = (sal_uInt16)(rInf.GetFont()->GetHeight()/5);
@@ -609,8 +609,8 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
// we do not want a kerning portion if any end
// would be a punctuation character
const CharClass& rCC = GetAppCharClass();
- if ( rCC.isLetterNumeric( rInf.GetTxt(), nTmp - 1 ) &&
- rCC.isLetterNumeric( rInf.GetTxt(), nTmp ) )
+ if ( rCC.isLetterNumeric( rInf.GetText(), nTmp - 1 ) &&
+ rCC.isLetterNumeric( rInf.GetText(), nTmp ) )
{
// does the kerning portion still fit into the line?
if ( rInf.X() + pPor->Width() + nDist <= rInf.Width() )
@@ -629,7 +629,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
const SwTwips nRestWidth = rInf.Width() - rInf.X() - pPor->Width();
const sal_uInt8 nCurrScript = pFnt->GetActual(); // pScriptInfo->ScriptType( rInf.GetIdx() );
- const sal_uInt8 nNextScript = nTmp >= rInf.GetTxt().getLength() ?
+ const sal_uInt8 nNextScript = nTmp >= rInf.GetText().getLength() ?
SW_CJK :
SwScriptInfo::WhichFont( nTmp, 0, pScriptInfo );
@@ -672,7 +672,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
}
else if ( pPor->IsMultiPortion() || pPor->InFixMargGrp() ||
pPor->IsFlyCntPortion() || pPor->InNumberGrp() ||
- pPor->InFldGrp() || nCurrScript != nNextScript )
+ pPor->InFieldGrp() || nCurrScript != nNextScript )
// next portion should snap to grid
pGridKernPortion = 0;
}
@@ -712,7 +712,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
rInf.SetTabOverflow( false );
}
-void SwTxtFormatter::CalcAdjustLine( SwLineLayout *pCurrent )
+void SwTextFormatter::CalcAdjustLine( SwLineLayout *pCurrent )
{
if( SVX_ADJUST_LEFT != GetAdjust() && !pMulti)
{
@@ -727,16 +727,16 @@ void SwTxtFormatter::CalcAdjustLine( SwLineLayout *pCurrent )
}
}
-void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
+void SwTextFormatter::CalcAscent( SwTextFormatInfo &rInf, SwLinePortion *pPor )
{
bool bCalc = false;
- if ( pPor->InFldGrp() && static_cast<SwFldPortion*>(pPor)->GetFont() )
+ if ( pPor->InFieldGrp() && static_cast<SwFieldPortion*>(pPor)->GetFont() )
{
- // Numbering + InterNetFlds can keep an own font, then their size is
+ // Numbering + InterNetFields can keep an own font, then their size is
// independent from hard attribute values
- SwFont* pFldFnt = static_cast<SwFldPortion*>(pPor)->pFnt;
- SwFontSave aSave( rInf, pFldFnt );
- pPor->Height( rInf.GetTxtHeight() );
+ SwFont* pFieldFnt = static_cast<SwFieldPortion*>(pPor)->pFnt;
+ SwFontSave aSave( rInf, pFieldFnt );
+ pPor->Height( rInf.GetTextHeight() );
pPor->SetAscent( rInf.GetAscent() );
bCalc = true;
}
@@ -764,7 +764,7 @@ void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
{
if( bFirstPor )
{
- if( !rInf.GetTxt().isEmpty() )
+ if( !rInf.GetText().isEmpty() )
{
if ( pPor->GetLen() || !rInf.GetIdx()
|| ( pCurr != pLast && !pLast->IsFlyPortion() )
@@ -787,10 +787,10 @@ void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
bChg = SeekAndChg( rInf );
}
if( bChg || bFirstPor || !pPor->GetAscent()
- || !rInf.GetLast()->InTxtGrp() )
+ || !rInf.GetLast()->InTextGrp() )
{
pPor->SetAscent( rInf.GetAscent() );
- pPor->Height( rInf.GetTxtHeight() );
+ pPor->Height( rInf.GetTextHeight() );
bCalc = true;
}
else
@@ -800,7 +800,7 @@ void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
}
}
- if( pPor->InTxtGrp() && bCalc )
+ if( pPor->InTextGrp() && bCalc )
{
pPor->SetAscent(pPor->GetAscent() +
rInf.GetFont()->GetTopBorderSpace());
@@ -810,20 +810,20 @@ void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
}
}
-class SwMetaPortion : public SwTxtPortion
+class SwMetaPortion : public SwTextPortion
{
public:
inline SwMetaPortion() { SetWhichPor( POR_META ); }
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
// OUTPUT_OPERATOR
};
-void SwMetaPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwMetaPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if ( Width() )
{
rInf.DrawViewOpt( *this, POR_META );
- SwTxtPortion::Paint( rInf );
+ SwTextPortion::Paint( rInf );
}
}
@@ -848,16 +848,16 @@ namespace sw { namespace mark {
}
} }
-SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
+SwTextPortion *SwTextFormatter::WhichTextPor( SwTextFormatInfo &rInf ) const
{
- SwTxtPortion *pPor = 0;
+ SwTextPortion *pPor = 0;
if( GetFnt()->IsTox() )
{
pPor = new SwToxPortion;
}
else if ( GetFnt()->IsInputField() )
{
- pPor = new SwTxtInputFldPortion();
+ pPor = new SwTextInputFieldPortion();
}
else
{
@@ -872,13 +872,13 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
// Only at the End!
// If pCurr does not have a width, it can however already have content.
// E.g. for non-displayable characters
- if (rInf.GetTxt()[rInf.GetIdx()]==CH_TXT_ATR_FIELDSTART)
+ if (rInf.GetText()[rInf.GetIdx()]==CH_TXT_ATR_FIELDSTART)
pPor = new SwFieldMarkPortion();
- else if (rInf.GetTxt()[rInf.GetIdx()]==CH_TXT_ATR_FIELDEND)
+ else if (rInf.GetText()[rInf.GetIdx()]==CH_TXT_ATR_FIELDEND)
pPor = new SwFieldMarkPortion();
- else if (rInf.GetTxt()[rInf.GetIdx()]==CH_TXT_ATR_FORMELEMENT)
+ else if (rInf.GetText()[rInf.GetIdx()]==CH_TXT_ATR_FORMELEMENT)
{
- SwTxtNode *pNd = const_cast<SwTxtNode *>(rInf.GetTxtFrm()->GetTxtNode());
+ SwTextNode *pNd = const_cast<SwTextNode *>(rInf.GetTextFrm()->GetTextNode());
const SwDoc *doc = pNd->GetDoc();
SwIndex aIndex(pNd, rInf.GetIdx());
SwPosition aPosition(*pNd, aIndex);
@@ -913,7 +913,7 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
pPor = pCurr;
else
{
- pPor = new SwTxtPortion;
+ pPor = new SwTextPortion;
if ( GetFnt()->IsURL() )
{
pPor->SetWhichPor( POR_URL );
@@ -931,16 +931,16 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
// 3) CH_TXTATR_BREAKWORD / CH_TXTATR_INWORD
// 4) next attribute change
-SwTxtPortion *SwTxtFormatter::NewTxtPortion( SwTxtFormatInfo &rInf )
+SwTextPortion *SwTextFormatter::NewTextPortion( SwTextFormatInfo &rInf )
{
// If we're at the line's beginning, we take pCurr
- // If pCurr is not derived from SwTxtPortion, we need to duplicate
+ // If pCurr is not derived from SwTextPortion, we need to duplicate
Seek( rInf.GetIdx() );
- SwTxtPortion *pPor = WhichTxtPor( rInf );
+ SwTextPortion *pPor = WhichTextPor( rInf );
// until next attribute change:
const sal_Int32 nNextAttr = GetNextAttr();
- sal_Int32 nNextChg = std::min( nNextAttr, rInf.GetTxt().getLength() );
+ sal_Int32 nNextChg = std::min( nNextAttr, rInf.GetText().getLength() );
// end of script type:
const sal_Int32 nNextScript = pScriptInfo->NextScriptChg( rInf.GetIdx() );
@@ -973,7 +973,7 @@ SwTxtPortion *SwTxtFormatter::NewTxtPortion( SwTxtFormatInfo &rInf )
nExpect = 1;
nExpect = rInf.GetIdx() + ((rInf.Width() - rInf.X()) / nExpect);
if( nExpect > rInf.GetIdx() && nNextChg > nExpect )
- nNextChg = std::min( nExpect, rInf.GetTxt().getLength() );
+ nNextChg = std::min( nExpect, rInf.GetText().getLength() );
// we keep an invariant during method calls:
// there are no portion ending characters like hard spaces
@@ -996,7 +996,7 @@ SwTxtPortion *SwTxtFormatter::NewTxtPortion( SwTxtFormatInfo &rInf )
return pPor;
}
-SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
+SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
{
SwLinePortion *pPor = 0;
@@ -1010,8 +1010,8 @@ SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
if( pPor->IsErgoSumPortion() )
rInf.SetErgoDone(true);
else
- if( pPor->IsFtnNumPortion() )
- rInf.SetFtnDone(true);
+ if( pPor->IsFootnoteNumPortion() )
+ rInf.SetFootnoteDone(true);
else
if( pPor->InNumberGrp() )
rInf.SetNumDone(true);
@@ -1025,12 +1025,12 @@ SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
// pFrm->GetOfst() == 0!
if( rInf.GetIdx() )
{
- // We now too can elongate FtnPortions and ErgoSumPortions
+ // We now too can elongate FootnotePortions and ErgoSumPortions
// 1. The ErgoSumTexts
if( !rInf.IsErgoDone() )
{
- if( pFrm->IsInFtn() && !pFrm->GetIndPrev() )
+ if( pFrm->IsInFootnote() && !pFrm->GetIndPrev() )
pPor = (SwLinePortion*)NewErgoSumPortion( rInf );
rInf.SetErgoDone( true );
}
@@ -1048,7 +1048,7 @@ SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
if ( ! pPor && ! pCurr->GetPortion() )
{
SwTextGridItem const*const pGrid(
- GetGridItem(GetTxtFrm()->FindPageFrm()));
+ GetGridItem(GetTextFrm()->FindPageFrm()));
if ( pGrid )
pPor = new SwKernPortion( *pCurr );
}
@@ -1068,23 +1068,23 @@ SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
else
{
// 5. The foot note count
- if( !rInf.IsFtnDone() )
+ if( !rInf.IsFootnoteDone() )
{
OSL_ENSURE( ( ! rInf.IsMulti() && ! pMulti ) || pMulti->HasRotation(),
"Rotated number portion trouble" );
- const bool bFtnNum = pFrm->IsFtnNumFrm();
- rInf.GetParaPortion()->SetFtnNum( bFtnNum );
- if( bFtnNum )
- pPor = (SwLinePortion*)NewFtnNumPortion( rInf );
- rInf.SetFtnDone( true );
+ const bool bFootnoteNum = pFrm->IsFootnoteNumFrm();
+ rInf.GetParaPortion()->SetFootnoteNum( bFootnoteNum );
+ if( bFootnoteNum )
+ pPor = (SwLinePortion*)NewFootnoteNumPortion( rInf );
+ rInf.SetFootnoteDone( true );
}
// 6. The ErgoSumTexts of course also exist in the TextMaster,
- // it's crucial whether the SwFtnFrm is aFollow
+ // it's crucial whether the SwFootnoteFrm is aFollow
if( !rInf.IsErgoDone() && !pPor && ! rInf.IsMulti() )
{
- if( pFrm->IsInFtn() && !pFrm->GetIndPrev() )
+ if( pFrm->IsInFootnote() && !pFrm->GetIndPrev() )
pPor = (SwLinePortion*)NewErgoSumPortion( rInf );
rInf.SetErgoDone( true );
}
@@ -1096,19 +1096,19 @@ SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
"Rotated number portion trouble" );
// If we're in the follow, then of course not
- if( GetTxtFrm()->GetTxtNode()->GetNumRule() )
+ if( GetTextFrm()->GetTextNode()->GetNumRule() )
pPor = (SwLinePortion*)NewNumberPortion( rInf );
rInf.SetNumDone( true );
}
// 8. The DropCaps
- if( !pPor && GetDropFmt() && ! rInf.IsMulti() )
+ if( !pPor && GetDropFormat() && ! rInf.IsMulti() )
pPor = (SwLinePortion*)NewDropPortion( rInf );
// 9. Kerning portions at beginning of line in grid mode
if ( !pPor && !pCurr->GetPortion() )
{
SwTextGridItem const*const pGrid(
- GetGridItem(GetTxtFrm()->FindPageFrm()));
+ GetGridItem(GetTextFrm()->FindPageFrm()));
if ( pGrid )
pPor = new SwKernPortion( *pCurr );
}
@@ -1116,8 +1116,8 @@ SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
// 10. Decimal tab portion at the beginning of each line in table cells
if ( !pPor && !pCurr->GetPortion() &&
- GetTxtFrm()->IsInTab() &&
- GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) )
+ GetTextFrm()->IsInTab() &&
+ GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) )
{
pPor = NewTabPortion( rInf, true );
}
@@ -1139,8 +1139,8 @@ static bool lcl_OldFieldRest( const SwLineLayout* pCurr )
bool bRet = false;
while( pPor && !bRet )
{
- bRet = (pPor->InFldGrp() && static_cast<const SwFldPortion*>(pPor)->IsFollow()) ||
- (pPor->IsMultiPortion() && static_cast<const SwMultiPortion*>(pPor)->IsFollowFld());
+ bRet = (pPor->InFieldGrp() && static_cast<const SwFieldPortion*>(pPor)->IsFollow()) ||
+ (pPor->IsMultiPortion() && static_cast<const SwMultiPortion*>(pPor)->IsFollowField());
if( !pPor->GetLen() )
break;
pPor = pPor->GetPortion();
@@ -1149,7 +1149,7 @@ static bool lcl_OldFieldRest( const SwLineLayout* pCurr )
}
/* NewPortion sets rInf.nLen
- * A SwTxtPortion is limited by a tab, break, txtatr or attr change
+ * A SwTextPortion is limited by a tab, break, txtatr or attr change
* We can have three cases:
* 1) The line is full and the wrap was not emulated
* -> return 0;
@@ -1159,13 +1159,13 @@ static bool lcl_OldFieldRest( const SwLineLayout* pCurr )
* -> CalcFlyWidth emulates the width and return portion, if needed
*/
-SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
+SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
{
// Underflow takes precedence
rInf.SetStopUnderflow( false );
if( rInf.GetUnderflow() )
{
- OSL_ENSURE( rInf.IsFull(), "SwTxtFormatter::NewPortion: underflow but not full" );
+ OSL_ENSURE( rInf.IsFull(), "SwTextFormatter::NewPortion: underflow but not full" );
return Underflow( rInf );
}
@@ -1193,8 +1193,8 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
return rInf.GetFly();
}
// Ein fieser Sonderfall: ein Rahmen ohne Umlauf kreuzt den
- // Ftn-Bereich. Wir muessen die Ftn-Portion als Zeilenrest
- // bekanntgeben, damit SwTxtFrm::Format nicht abbricht
+ // Footnote-Bereich. Wir muessen die Footnote-Portion als Zeilenrest
+ // bekanntgeben, damit SwTextFrm::Format nicht abbricht
// (die Textmasse wurde ja durchformatiert).
if( rInf.GetRest() )
rInf.SetNewLine( true );
@@ -1257,7 +1257,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
if ( rInf.SnapToGrid() )
{
SwTextGridItem const*const pGrid(
- GetGridItem(GetTxtFrm()->FindPageFrm()));
+ GetGridItem(GetTextFrm()->FindPageFrm()));
if ( pGrid )
{
bRubyTop = ! pGrid->GetRubyTextBelow();
@@ -1266,12 +1266,12 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
}
pTmp = new SwRubyPortion( *pCreate, *rInf.GetFont(),
- *GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess(),
+ *GetTextFrm()->GetTextNode()->getIDocumentSettingAccess(),
nEnd, 0, pRubyPos );
}
else if( SW_MC_ROTATE == pCreate->nId )
pTmp = new SwRotatedPortion( *pCreate, nEnd,
- GetTxtFrm()->IsRightToLeft() );
+ GetTextFrm()->IsRightToLeft() );
else
pTmp = new SwDoubleLinePortion( *pCreate, nEnd );
@@ -1289,17 +1289,17 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
/* Wir holen uns nocheinmal cChar, um sicherzustellen, dass das
* Tab jetzt wirklich ansteht und nicht auf die naechste Zeile
* gewandert ist ( so geschehen hinter Rahmen ).
- * Wenn allerdings eine FldPortion im Rest wartet, muessen wir
+ * Wenn allerdings eine FieldPortion im Rest wartet, muessen wir
* das cChar natuerlich aus dem Feldinhalt holen, z.B. bei
* DezimalTabs und Feldern (22615)
*/
- if( !rInf.GetRest() || !rInf.GetRest()->InFldGrp() )
+ if( !rInf.GetRest() || !rInf.GetRest()->InFieldGrp() )
cChar = rInf.GetChar( rInf.GetIdx() );
rInf.ClearHookChar();
}
else
{
- if( rInf.GetIdx() >= rInf.GetTxt().getLength() )
+ if( rInf.GetIdx() >= rInf.GetText().getLength() )
{
rInf.SetFull(true);
CalcFlyWidth( rInf );
@@ -1346,7 +1346,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
// We have a decimal tab portion in the line and the next character has to be
// aligned at the tab stop position. We store the width from the beginning of
// the tab stop portion up to the portion containint the decimal separator:
- if ( GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ &&
+ if ( GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ &&
POR_TABDECIMAL == pLastTabPortion->GetWhichPor() )
{
OSL_ENSURE( rInf.X() >= pLastTabPortion->Fix(), "Decimal tab stop position cannot be calculated" );
@@ -1372,7 +1372,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
{
if( rInf.IsFull() )
return 0;
- pPor = NewTxtPortion( rInf );
+ pPor = NewTextPortion( rInf );
}
break;
}
@@ -1396,20 +1396,20 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
// choose a rotated character attribute.
if ( pPor && ! pMulti )
{
- if ( pPor->IsFtnPortion() )
+ if ( pPor->IsFootnotePortion() )
{
- const SwTxtFtn* pTxtFtn = static_cast<SwFtnPortion*>(pPor)->GetTxtFtn();
+ const SwTextFootnote* pTextFootnote = static_cast<SwFootnotePortion*>(pPor)->GetTextFootnote();
- if ( pTxtFtn )
+ if ( pTextFootnote )
{
- SwFmtFtn& rFtn = (SwFmtFtn&)pTxtFtn->GetFtn();
- const SwDoc *pDoc = rInf.GetTxtFrm()->GetNode()->GetDoc();
+ SwFormatFootnote& rFootnote = (SwFormatFootnote&)pTextFootnote->GetFootnote();
+ const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc();
const SwEndNoteInfo* pInfo;
- if( rFtn.IsEndNote() )
+ if( rFootnote.IsEndNote() )
pInfo = &pDoc->GetEndNoteInfo();
else
- pInfo = &pDoc->GetFtnInfo();
- const SwAttrSet& rSet = pInfo->GetAnchorCharFmt((SwDoc&)*pDoc)->GetAttrSet();
+ pInfo = &pDoc->GetFootnoteInfo();
+ const SwAttrSet& rSet = pInfo->GetAnchorCharFormat((SwDoc&)*pDoc)->GetAttrSet();
const SfxPoolItem* pItem;
sal_uInt16 nDir = 0;
@@ -1428,11 +1428,11 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
}
else if ( pPor->InNumberGrp() )
{
- const SwFont* pNumFnt = static_cast<SwFldPortion*>(pPor)->GetFont();
+ const SwFont* pNumFnt = static_cast<SwFieldPortion*>(pPor)->GetFont();
if ( pNumFnt )
{
- sal_uInt16 nDir = pNumFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ sal_uInt16 nDir = pNumFnt->GetOrientation( rInf.GetTextFrm()->IsVertical() );
if ( 0 != nDir )
{
delete pPor;
@@ -1441,7 +1441,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
DIR_TOP2BOTTOM );
rInf.SetNumDone( false );
- rInf.SetFtnDone( false );
+ rInf.SetFootnoteDone( false );
}
}
}
@@ -1460,13 +1460,13 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
// Werte bereithalten muss:
if( !pCurr->Height() )
{
- OSL_ENSURE( pCurr->Height(), "SwTxtFormatter::NewPortion: limbo dance" );
+ OSL_ENSURE( pCurr->Height(), "SwTextFormatter::NewPortion: limbo dance" );
pCurr->Height( pPor->Height() );
pCurr->SetAscent( pPor->GetAscent() );
}
OSL_ENSURE( !pPor || pPor->Height(),
- "SwTxtFormatter::NewPortion: something went wrong");
+ "SwTextFormatter::NewPortion: something went wrong");
if( pPor->IsPostItsPortion() && rInf.X() >= rInf.Width() && rInf.GetFly() )
{
delete pPor;
@@ -1475,15 +1475,15 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
return pPor;
}
-sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
+sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
{
OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
- "SwTxtFormatter::FormatLine( nStartPos ) with unswapped frame" );
+ "SwTextFormatter::FormatLine( nStartPos ) with unswapped frame" );
// For the formatting routines, we set pOut to the reference device.
SwHookOut aHook( GetInfo() );
- if( GetInfo().GetLen() < GetInfo().GetTxt().getLength() )
- GetInfo().SetLen( GetInfo().GetTxt().getLength() );
+ if( GetInfo().GetLen() < GetInfo().GetText().getLength() )
+ GetInfo().SetLen( GetInfo().GetText().getLength() );
bool bBuild = true;
SetFlyInCntBase( false );
@@ -1500,11 +1500,11 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
// fly positioning can make it necessary format a line several times
// for this, we have to keep a copy of our rest portion
- SwLinePortion* pFld = GetInfo().GetRest();
- boost::scoped_ptr<SwFldPortion> xSaveFld;
+ SwLinePortion* pField = GetInfo().GetRest();
+ boost::scoped_ptr<SwFieldPortion> xSaveField;
- if ( pFld && pFld->InFldGrp() && !pFld->IsFtnPortion() )
- xSaveFld.reset(new SwFldPortion( *static_cast<SwFldPortion*>(pFld) ));
+ if ( pField && pField->InFieldGrp() && !pField->IsFootnotePortion() )
+ xSaveField.reset(new SwFieldPortion( *static_cast<SwFieldPortion*>(pField) ));
// for an optimal repaint rectangle, we want to compare fly portions
// before and after the BuildPortions call
@@ -1531,8 +1531,8 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
// Hier folgt bald die Unterlaufpruefung.
while( bBuild )
{
- GetInfo().SetFtnInside( false );
- GetInfo().SetOtherThanFtnInside( false );
+ GetInfo().SetFootnoteInside( false );
+ GetInfo().SetOtherThanFootnoteInside( false );
// These values must not be reset by FormatReset();
const bool bOldNumDone = GetInfo().IsNumDone();
@@ -1588,8 +1588,8 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
}
else
{
- bBuild = ( GetInfo().GetTxtFly().IsOn() && ChkFlyUnderflow(GetInfo()) )
- || GetInfo().CheckFtnPortion(pCurr);
+ bBuild = ( GetInfo().GetTextFly().IsOn() && ChkFlyUnderflow(GetInfo()) )
+ || GetInfo().CheckFootnotePortion(pCurr);
if( bBuild )
{
GetInfo().SetNumDone( bOldNumDone );
@@ -1603,8 +1603,8 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
}
// set original rest portion
- if ( xSaveFld )
- GetInfo().SetRest( new SwFldPortion( *xSaveFld ) );
+ if ( xSaveField )
+ GetInfo().SetRest( new SwFieldPortion( *xSaveField ) );
pCurr->SetLen( 0 );
pCurr->Width(0);
@@ -1616,7 +1616,7 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
// In case of compat mode, it's possible that a tab portion is wider after
// formatting than before. If this is the case, we also have to make sure
// the SwLineLayout is wider as well.
- if (GetInfo().GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN))
+ if (GetInfo().GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN))
{
sal_uInt16 nSum = 0;
SwLinePortion* pPor = pCurr->GetFirstPortion();
@@ -1649,7 +1649,7 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
GetInfo().GetParaPortion()->GetReformat().LeftMove( GetInfo().GetIdx() );
// delete master copy of rest portion
- xSaveFld.reset();
+ xSaveField.reset();
sal_Int32 nNewStart = nStartPos + pCurr->GetLen();
@@ -1680,7 +1680,7 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
return nNewStart;
}
-void SwTxtFormatter::RecalcRealHeight()
+void SwTextFormatter::RecalcRealHeight()
{
do
{
@@ -1688,7 +1688,7 @@ void SwTxtFormatter::RecalcRealHeight()
} while (Next());
}
-void SwTxtFormatter::CalcRealHeight( bool bNewLine )
+void SwTextFormatter::CalcRealHeight( bool bNewLine )
{
sal_uInt16 nLineHeight = pCurr->Height();
pCurr->SetClipping( false );
@@ -1736,7 +1736,7 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
// Zeile am Absatzende geben (bei leeren Abs?tzen oder nach einem
// Shift-Return), die das Register durchaus beachten soll.
if( !pCurr->IsDummy() || ( !pCurr->GetNext() &&
- GetStart() >= GetTxtFrm()->GetTxt().getLength() && !bNewLine ) )
+ GetStart() >= GetTextFrm()->GetText().getLength() && !bNewLine ) )
{
const SvxLineSpacingItem *pSpace = aLineInf.GetLineSpacing();
if( pSpace )
@@ -1747,7 +1747,7 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
// shrink first line of paragraph too on spacing < 100%
if (IsParaLine() &&
pSpace->GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP
- && GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE))
+ && GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE))
{
long nTmp = pSpace->GetPropLineSpace();
// Word will render < 50% too but it's just not readable
@@ -1844,7 +1844,7 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
pCurr->SetRealHeight( nLineHeight );
}
-void SwTxtFormatter::FeedInf( SwTxtFormatInfo &rInf ) const
+void SwTextFormatter::FeedInf( SwTextFormatInfo &rInf ) const
{
// 3260, 3860: Fly auf jeden Fall loeschen!
ClearFly( rInf );
@@ -1865,9 +1865,9 @@ void SwTxtFormatter::FeedInf( SwTxtFormatInfo &rInf ) const
nTmpRight > USHRT_MAX ||
nTmpFirst > USHRT_MAX )
{
- SWRECTFN( rInf.GetTxtFrm() )
- nTmpLeft = (rInf.GetTxtFrm()->Frm().*fnRect->fnGetLeft)();
- nTmpRight = (rInf.GetTxtFrm()->Frm().*fnRect->fnGetRight)();
+ SWRECTFN( rInf.GetTextFrm() )
+ nTmpLeft = (rInf.GetTextFrm()->Frm().*fnRect->fnGetLeft)();
+ nTmpRight = (rInf.GetTextFrm()->Frm().*fnRect->fnGetRight)();
nTmpFirst = nTmpLeft;
}
@@ -1877,14 +1877,14 @@ void SwTxtFormatter::FeedInf( SwTxtFormatInfo &rInf ) const
rInf.RealWidth( sal_uInt16(rInf.Right() - GetLeftMargin()) );
rInf.Width( rInf.RealWidth() );
- if( const_cast<SwTxtFormatter*>(this)->GetRedln() )
+ if( const_cast<SwTextFormatter*>(this)->GetRedln() )
{
- const_cast<SwTxtFormatter*>(this)->GetRedln()->Clear( const_cast<SwTxtFormatter*>(this)->GetFnt() );
- const_cast<SwTxtFormatter*>(this)->GetRedln()->Reset();
+ const_cast<SwTextFormatter*>(this)->GetRedln()->Clear( const_cast<SwTextFormatter*>(this)->GetFnt() );
+ const_cast<SwTextFormatter*>(this)->GetRedln()->Reset();
}
}
-void SwTxtFormatter::FormatReset( SwTxtFormatInfo &rInf )
+void SwTextFormatter::FormatReset( SwTextFormatInfo &rInf )
{
pCurr->Truncate();
pCurr->Init();
@@ -1898,12 +1898,12 @@ void SwTxtFormatter::FormatReset( SwTxtFormatInfo &rInf )
FeedInf( rInf );
}
-bool SwTxtFormatter::CalcOnceMore()
+bool SwTextFormatter::CalcOnceMore()
{
- if( pDropFmt )
+ if( pDropFormat )
{
const sal_uInt16 nOldDrop = GetDropHeight();
- CalcDropHeight( pDropFmt->GetLines() );
+ CalcDropHeight( pDropFormat->GetLines() );
bOnceMore = nOldDrop != GetDropHeight();
}
else
@@ -1911,10 +1911,10 @@ bool SwTxtFormatter::CalcOnceMore()
return bOnceMore;
}
-SwTwips SwTxtFormatter::CalcBottomLine() const
+SwTwips SwTextFormatter::CalcBottomLine() const
{
SwTwips nRet = Y() + GetLineHeight();
- SwTwips nMin = GetInfo().GetTxtFly().GetMinBottom();
+ SwTwips nMin = GetInfo().GetTextFly().GetMinBottom();
if( nMin && ++nMin > nRet )
{
SwTwips nDist = pFrm->Frm().Height() - pFrm->Prt().Height()
@@ -1928,7 +1928,7 @@ SwTwips SwTxtFormatter::CalcBottomLine() const
{
((SwRepaint&)GetInfo().GetParaPortion()
->GetRepaint()).Bottom( nRet-1 );
- ((SwTxtFormatInfo&)GetInfo()).SetPaintOfst( 0 );
+ ((SwTextFormatInfo&)GetInfo()).SetPaintOfst( 0 );
}
}
}
@@ -1936,7 +1936,7 @@ SwTwips SwTxtFormatter::CalcBottomLine() const
}
// FME/OD: This routine does a limited text formatting.
-SwTwips SwTxtFormatter::_CalcFitToContent()
+SwTwips SwTextFormatter::_CalcFitToContent()
{
FormatReset( GetInfo() );
BuildPortions( GetInfo() );
@@ -1946,8 +1946,8 @@ SwTwips SwTxtFormatter::_CalcFitToContent()
// determines if the calculation of a repaint offset is allowed
// otherwise each line is painted from 0 (this is a copy of the beginning
-// of the former SwTxtFormatter::Recycle() function
-bool SwTxtFormatter::AllowRepaintOpt() const
+// of the former SwTextFormatter::Recycle() function
+bool SwTextFormatter::AllowRepaintOpt() const
{
// reformat position in front of current line? Only in this case
// we want to set the repaint offset
@@ -1989,7 +1989,7 @@ bool SwTxtFormatter::AllowRepaintOpt() const
const sal_Int32 nReformat = GetInfo().GetReformatStart();
if( bOptimizeRepaint && COMPLETE_STRING != nReformat )
{
- const sal_Unicode cCh = nReformat >= GetInfo().GetTxt().getLength() ? 0 : GetInfo().GetTxt()[ nReformat ];
+ const sal_Unicode cCh = nReformat >= GetInfo().GetText().getLength() ? 0 : GetInfo().GetText()[ nReformat ];
bOptimizeRepaint = ( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
|| ! GetInfo().HasHint( nReformat );
}
@@ -1997,10 +1997,10 @@ bool SwTxtFormatter::AllowRepaintOpt() const
return bOptimizeRepaint;
}
-void SwTxtFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
+void SwTextFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
{
OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
- "SwTxtFormatter::CalcUnclipped with unswapped frame" );
+ "SwTextFormatter::CalcUnclipped with unswapped frame" );
long nFlyAsc, nFlyDesc;
pCurr->MaxAscentDescent( rTop, rBottom, nFlyAsc, nFlyDesc );
@@ -2009,17 +2009,17 @@ void SwTxtFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
rTop -= nFlyAsc;
}
-void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
+void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
sal_Int32 nStartIdx, bool bAlways ) const
{
OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
- "SwTxtFormatter::UpdatePos with unswapped frame" );
+ "SwTextFormatter::UpdatePos with unswapped frame" );
if( GetInfo().IsTest() )
return;
SwLinePortion *pFirst = pCurrent->GetFirstPortion();
SwLinePortion *pPos = pFirst;
- SwTxtPaintInfo aTmpInf( GetInfo() );
+ SwTextPaintInfo aTmpInf( GetInfo() );
aTmpInf.SetpSpaceAdd( pCurrent->GetpLLSpaceAdd() );
aTmpInf.ResetSpaceIdx();
aTmpInf.SetKanaComp( pCurrent->GetpKanaComp() );
@@ -2084,18 +2084,18 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
else
{
Point aBase( aTmpInf.GetPos() );
- if ( GetInfo().GetTxtFrm()->IsVertical() )
- GetInfo().GetTxtFrm()->SwitchHorizontalToVertical( aBase );
+ if ( GetInfo().GetTextFrm()->IsVertical() )
+ GetInfo().GetTextFrm()->SwitchHorizontalToVertical( aBase );
- static_cast<SwFlyCntPortion*>(pPos)->SetBase( *aTmpInf.GetTxtFrm(),
+ static_cast<SwFlyCntPortion*>(pPos)->SetBase( *aTmpInf.GetTextFrm(),
aBase, nTmpAscent, nTmpDescent, nFlyAsc,
nFlyDesc, nFlags );
}
}
- if( pPos->IsMultiPortion() && static_cast<SwMultiPortion*>(pPos)->HasFlyInCntnt() )
+ if( pPos->IsMultiPortion() && static_cast<SwMultiPortion*>(pPos)->HasFlyInContent() )
{
OSL_ENSURE( !GetMulti(), "Too much multi" );
- const_cast<SwTxtFormatter*>(static_cast<const SwTxtFormatter*>(this))->pMulti = static_cast<SwMultiPortion*>(pPos);
+ const_cast<SwTextFormatter*>(static_cast<const SwTextFormatter*>(this))->pMulti = static_cast<SwMultiPortion*>(pPos);
SwLineLayout *pLay = &GetMulti()->GetRoot();
Point aSt( aTmpInf.X(), aStart.Y() );
@@ -2124,17 +2124,17 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
aSt.Y() += pLay->Height();
pLay = pLay->GetNext();
} while ( pLay );
- const_cast<SwTxtFormatter*>(this)->pMulti = NULL;
+ const_cast<SwTextFormatter*>(this)->pMulti = NULL;
}
pPos->Move( aTmpInf );
pPos = pPos->GetPortion();
}
}
-void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const
+void SwTextFormatter::AlignFlyInCntBase( long nBaseLine ) const
{
OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
- "SwTxtFormatter::AlignFlyInCntBase with unswapped frame" );
+ "SwTextFormatter::AlignFlyInCntBase with unswapped frame" );
if( GetInfo().IsTest() )
return;
@@ -2162,15 +2162,15 @@ void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const
else
{
Point aBase;
- if ( GetInfo().GetTxtFrm()->IsVertical() )
+ if ( GetInfo().GetTextFrm()->IsVertical() )
{
- nBaseLine = GetInfo().GetTxtFrm()->SwitchHorizontalToVertical( nBaseLine );
+ nBaseLine = GetInfo().GetTextFrm()->SwitchHorizontalToVertical( nBaseLine );
aBase = Point( nBaseLine, static_cast<SwFlyCntPortion*>(pPos)->GetRefPoint().Y() );
}
else
aBase = Point( static_cast<SwFlyCntPortion*>(pPos)->GetRefPoint().X(), nBaseLine );
- static_cast<SwFlyCntPortion*>(pPos)->SetBase( *GetInfo().GetTxtFrm(), aBase, nTmpAscent, nTmpDescent,
+ static_cast<SwFlyCntPortion*>(pPos)->SetBase( *GetInfo().GetTextFrm(), aBase, nTmpAscent, nTmpDescent,
nFlyAsc, nFlyDesc, nFlags );
}
}
@@ -2178,9 +2178,9 @@ void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const
}
}
-bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
+bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const
{
- OSL_ENSURE( rInf.GetTxtFly().IsOn(), "SwTxtFormatter::ChkFlyUnderflow: why?" );
+ OSL_ENSURE( rInf.GetTextFly().IsOn(), "SwTextFormatter::ChkFlyUnderflow: why?" );
if( GetCurr() )
{
// First we check, whether a fly overlaps with the line.
@@ -2191,7 +2191,7 @@ bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
SwRect aLineVert( aLine );
if ( pFrm->IsVertical() )
pFrm->SwitchHorizontalToVertical( aLineVert );
- SwRect aInter( rInf.GetTxtFly().GetFrm( aLineVert ) );
+ SwRect aInter( rInf.GetTextFly().GetFrm( aLineVert ) );
if ( pFrm->IsVertical() )
pFrm->SwitchVerticalToHorizontal( aInter );
@@ -2211,7 +2211,7 @@ bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
aLineVert = aLine;
if ( pFrm->IsVertical() )
pFrm->SwitchHorizontalToVertical( aLineVert );
- aInter = rInf.GetTxtFly().GetFrm( aLineVert );
+ aInter = rInf.GetTextFly().GetFrm( aLineVert );
if ( pFrm->IsVertical() )
pFrm->SwitchVerticalToHorizontal( aInter );
@@ -2266,13 +2266,13 @@ bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
return false;
}
-void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
+void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
{
if( GetMulti() || rInf.GetFly() )
return;
- SwTxtFly& rTxtFly = rInf.GetTxtFly();
- if( !rTxtFly.IsOn() || rInf.IsIgnoreFly() )
+ SwTextFly& rTextFly = rInf.GetTextFly();
+ if( !rTextFly.IsOn() || rInf.IsIgnoreFly() )
return;
const SwLinePortion *pLast = rInf.GetLast();
@@ -2317,7 +2317,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
if ( pFrm->IsVertical() )
pFrm->SwitchHorizontalToVertical( aLineVert );
- SwRect aInter( rTxtFly.GetFrm( aLineVert ) );
+ SwRect aInter( rTextFly.GetFrm( aLineVert ) );
if ( pFrm->IsRightToLeft() )
pFrm->SwitchRTLtoLTR( aInter );
@@ -2331,9 +2331,9 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
bool bForced = false;
if( aInter.Left() <= nLeftMin )
{
- SwTwips nFrmLeft = GetTxtFrm()->Frm().Left();
- if( GetTxtFrm()->Prt().Left() < 0 )
- nFrmLeft += GetTxtFrm()->Prt().Left();
+ SwTwips nFrmLeft = GetTextFrm()->Frm().Left();
+ if( GetTextFrm()->Prt().Left() < 0 )
+ nFrmLeft += GetTextFrm()->Prt().Left();
if( aInter.Left() < nFrmLeft )
aInter.Left( nFrmLeft );
@@ -2351,7 +2351,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
// For a negative first line indent, we set this flag to show
// that the indentation/margin has been moved.
// This needs to be respected by the DefaultTab at the zero position.
- if( IsFirstTxtLine() && HasNegFirst() )
+ if( IsFirstTextLine() && HasNegFirst() )
bForced = true;
}
aInter.Intersection( aLine );
@@ -2363,7 +2363,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
// Although no text is left, we need to format another line,
// because also empty lines need to avoid a Fly with no wrapping.
- if( bFullLine && rInf.GetIdx() == rInf.GetTxt().getLength() )
+ if( bFullLine && rInf.GetIdx() == rInf.GetText().getLength() )
{
rInf.SetNewLine( true );
// 8221: We know that for dummies, it holds ascent == height
@@ -2390,7 +2390,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
// on this behaviour.
// To my knowledge we only have two places where DummyLines can be
// created: here and in MakeFlyDummies.
- // IsDummy() is evaluated in IsFirstTxtLine(), when moving lines
+ // IsDummy() is evaluated in IsFirstTextLine(), when moving lines
// and in relation with DropCaps.
pFly->Height( sal_uInt16(aInter.Height()) );
@@ -2398,7 +2398,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
// or the next margin's top edge, which we need to respect.
// That means we can comfortably grow up to this value; that's how
// we save a few empty lines.
- long nNextTop = rTxtFly.GetNextTop();
+ long nNextTop = rTextFly.GetNextTop();
if ( pFrm->IsVertical() )
nNextTop = pFrm->SwitchVerticalToHorizontal( nNextTop );
if( nNextTop > aInter.Bottom() )
@@ -2414,7 +2414,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
}
else
{
- if( rInf.GetIdx() == rInf.GetTxt().getLength() )
+ if( rInf.GetIdx() == rInf.GetText().getLength() )
{
// Don't use nHeight, or we have a huge descent
pFly->Height( pLast->Height() );
@@ -2447,7 +2447,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
(pBody->*fnRect->fnGetPrtLeft)() :
(pPageFrm->*fnRect->fnGetPrtLeft)();
- const SwDoc *pDoc = rInf.GetTxtFrm()->GetNode()->GetDoc();
+ const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc();
const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc);
SwTwips nStartX = GetLeftMargin();
@@ -2472,16 +2472,16 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
}
}
-SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
- SwTxtAttr *pHint ) const
+SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf,
+ SwTextAttr *pHint ) const
{
SwFlyCntPortion *pRet = 0;
const SwFrm *pFrame = (SwFrm*)pFrm;
SwFlyInCntFrm *pFly;
- SwFrmFmt* pFrmFmt = static_cast<SwTxtFlyCnt*>(pHint)->GetFlyCnt().GetFrmFmt();
- if( RES_FLYFRMFMT == pFrmFmt->Which() )
- pFly = static_cast<SwTxtFlyCnt*>(pHint)->GetFlyFrm(pFrame);
+ SwFrameFormat* pFrameFormat = static_cast<SwTextFlyCnt*>(pHint)->GetFlyCnt().GetFrameFormat();
+ if( RES_FLYFRMFMT == pFrameFormat->Which() )
+ pFly = static_cast<SwTextFlyCnt*>(pHint)->GetFlyFrm(pFrame);
else
pFly = NULL;
// aBase is the document-global position, from which the new extra portion is placed
@@ -2500,15 +2500,15 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
// he actually never was in.
sal_uInt16 nAscent = 0;
- const bool bTxtFrmVertical = GetInfo().GetTxtFrm()->IsVertical();
+ const bool bTextFrmVertical = GetInfo().GetTextFrm()->IsVertical();
const bool bUseFlyAscent = pFly && pFly->GetValidPosFlag() &&
- 0 != ( bTxtFrmVertical ?
+ 0 != ( bTextFrmVertical ?
pFly->GetRefPoint().X() :
pFly->GetRefPoint().Y() );
if ( bUseFlyAscent )
- nAscent = static_cast<sal_uInt16>( std::abs( int( bTxtFrmVertical ?
+ nAscent = static_cast<sal_uInt16>( std::abs( int( bTextFrmVertical ?
pFly->GetRelPos().X() :
pFly->GetRelPos().Y() ) ) );
@@ -2532,12 +2532,12 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
}
Point aTmpBase( aBase );
- if ( GetInfo().GetTxtFrm()->IsVertical() )
- GetInfo().GetTxtFrm()->SwitchHorizontalToVertical( aTmpBase );
+ if ( GetInfo().GetTextFrm()->IsVertical() )
+ GetInfo().GetTextFrm()->SwitchHorizontalToVertical( aTmpBase );
if( pFly )
{
- pRet = new SwFlyCntPortion( *GetInfo().GetTxtFrm(), pFly, aTmpBase,
+ pRet = new SwFlyCntPortion( *GetInfo().GetTextFrm(), pFly, aTmpBase,
nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nMode );
// We need to make sure that our font is set again in the OutputDevice
// It could be that the FlyInCnt was added anew and GetFlyFrm() would
@@ -2552,17 +2552,17 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
if( !rInf.IsTest() )
{
aTmpBase = aBase;
- if ( GetInfo().GetTxtFrm()->IsVertical() )
- GetInfo().GetTxtFrm()->SwitchHorizontalToVertical( aTmpBase );
+ if ( GetInfo().GetTextFrm()->IsVertical() )
+ GetInfo().GetTextFrm()->SwitchHorizontalToVertical( aTmpBase );
- pRet->SetBase( *rInf.GetTxtFrm(), aTmpBase, nTmpAscent,
+ pRet->SetBase( *rInf.GetTextFrm(), aTmpBase, nTmpAscent,
nTmpDescent, nFlyAsc, nFlyDesc, nMode );
}
}
}
else
{
- pRet = new SwFlyCntPortion( *rInf.GetTxtFrm(), static_cast<SwDrawContact*>(pFrmFmt->FindContactObj()),
+ pRet = new SwFlyCntPortion( *rInf.GetTextFrm(), static_cast<SwDrawContact*>(pFrameFormat->FindContactObj()),
aTmpBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nMode );
}
return pRet;
@@ -2570,7 +2570,7 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
/* Drop portion is a special case, because it has parts which aren't portions
but we have handle them just like portions */
-void SwTxtFormatter::MergeCharacterBorder( SwDropPortion& rPortion )
+void SwTextFormatter::MergeCharacterBorder( SwDropPortion& rPortion )
{
if( rPortion.GetLines() > 1 )
{
@@ -2588,7 +2588,7 @@ void SwTxtFormatter::MergeCharacterBorder( SwDropPortion& rPortion )
}
}
-void SwTxtFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwTxtFormatInfo& rInf )
+void SwTextFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwTextFormatInfo& rInf )
{
const SwFont aCurFont = *rInf.GetFont();
if( aCurFont.HasBorder() )
@@ -2602,7 +2602,7 @@ void SwTxtFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwTxtFormatI
if( !rPortion.GetJoinBorderWithPrev() )
{
rPortion.SetJoinBorderWithPrev(true);
- if( rPortion.InTxtGrp() && rPortion.Width() > aCurFont.GetLeftBorderSpace() )
+ if( rPortion.InTextGrp() && rPortion.Width() > aCurFont.GetLeftBorderSpace() )
rPortion.Width(rPortion.Width() - aCurFont.GetLeftBorderSpace());
}
}
@@ -2615,7 +2615,7 @@ void SwTxtFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwTxtFormatI
// Get next portion's font
bool bSeek = false;
if( !rInf.IsFull() && // Not the last portion of the line (in case of line break)
- rInf.GetIdx() + rPortion.GetLen() != rInf.GetTxt().getLength() ) // Not the last portion of the paragraph
+ rInf.GetIdx() + rPortion.GetLen() != rInf.GetText().getLength() ) // Not the last portion of the paragraph
bSeek = Seek(rInf.GetIdx() + rPortion.GetLen());
// If next portion has the same border then merge
@@ -2625,7 +2625,7 @@ void SwTxtFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwTxtFormatI
if( !rPortion.GetJoinBorderWithNext() )
{
rPortion.SetJoinBorderWithNext(true);
- if( rPortion.InTxtGrp() && rPortion.Width() > aCurFont.GetRightBorderSpace() )
+ if( rPortion.InTextGrp() && rPortion.Width() > aCurFont.GetRightBorderSpace() )
rPortion.Width(rPortion.Width() - aCurFont.GetRightBorderSpace());
}
}
@@ -2681,18 +2681,18 @@ void SwTxtFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwTxtFormatI
namespace {
// calculates and sets optimal repaint offset for the current line
- long lcl_CalcOptRepaint( SwTxtFormatter &rThis,
+ long lcl_CalcOptRepaint( SwTextFormatter &rThis,
SwLineLayout &rCurr,
const sal_Int32 nOldLineEnd,
const std::vector<long> &rFlyStarts )
{
- SwTxtFormatInfo txtFmtInfo = rThis.GetInfo();
- if ( txtFmtInfo.GetIdx() < txtFmtInfo.GetReformatStart() )
+ SwTextFormatInfo txtFormatInfo = rThis.GetInfo();
+ if ( txtFormatInfo.GetIdx() < txtFormatInfo.GetReformatStart() )
// the reformat position is behind our new line, that means
// something of our text has moved to the next line
return 0;
- sal_Int32 nReformat = std::min<sal_Int32>( txtFmtInfo.GetReformatStart(), nOldLineEnd );
+ sal_Int32 nReformat = std::min<sal_Int32>( txtFormatInfo.GetReformatStart(), nOldLineEnd );
// in case we do not have any fly in our line, our repaint position
// is the changed position - 1
@@ -2702,9 +2702,9 @@ namespace {
// for example: the beginning of the first right tab stop
// if this value is 0, this means that we do not have an upper
// limit for the repaint offset
- const long nFormatRepaint = txtFmtInfo.GetPaintOfst();
+ const long nFormatRepaint = txtFormatInfo.GetPaintOfst();
- if ( nReformat < txtFmtInfo.GetLineStart() + 3 )
+ if ( nReformat < txtFormatInfo.GetLineStart() + 3 )
return 0;
// step back two positions for smoother repaint
@@ -2715,7 +2715,7 @@ namespace {
// #i28795#, #i34607#, #i38388#
// step back six(!) more characters for complex scripts
// this is required e.g., for Khmer (thank you, Javier!)
- const SwScriptInfo& rSI = txtFmtInfo.GetParaPortion()->GetScriptInfo();
+ const SwScriptInfo& rSI = txtFormatInfo.GetParaPortion()->GetScriptInfo();
sal_Int32 nMaxContext = 0;
if( ::i18n::ScriptType::COMPLEX == rSI.ScriptType( nReformat ) )
nMaxContext = 6;
@@ -2730,28 +2730,28 @@ namespace {
#endif
if( nMaxContext > 0 )
{
- if ( nReformat > txtFmtInfo.GetLineStart() + nMaxContext )
+ if ( nReformat > txtFormatInfo.GetLineStart() + nMaxContext )
nReformat = nReformat - nMaxContext;
else
- nReformat = txtFmtInfo.GetLineStart();
+ nReformat = txtFormatInfo.GetLineStart();
}
// Weird situation: Our line used to end with a hole portion
// and we delete some characters at the end of our line. We have
// to take care for repainting the blanks which are not anymore
// covered by the hole portion
- while ( nReformat > txtFmtInfo.GetLineStart() &&
- CH_BLANK == txtFmtInfo.GetChar( nReformat ) )
+ while ( nReformat > txtFormatInfo.GetLineStart() &&
+ CH_BLANK == txtFormatInfo.GetChar( nReformat ) )
--nReformat;
- OSL_ENSURE( nReformat < txtFmtInfo.GetIdx(), "Reformat too small for me!" );
+ OSL_ENSURE( nReformat < txtFormatInfo.GetIdx(), "Reformat too small for me!" );
SwRect aRect;
// Note: GetChareRect is not const. It definitely changes the
// bMulti flag. We have to save and resore the old value.
- bool bOldMulti = txtFmtInfo.IsMulti();
+ bool bOldMulti = txtFormatInfo.IsMulti();
rThis.GetCharRect( &aRect, nReformat );
- txtFmtInfo.SetMulti( bOldMulti );
+ txtFormatInfo.SetMulti( bOldMulti );
return nFormatRepaint ? std::min( aRect.Left(), nFormatRepaint ) :
aRect.Left();
@@ -2794,7 +2794,7 @@ namespace {
}
// Determine if we need to build hidden portions
- bool lcl_BuildHiddenPortion( const SwTxtSizeInfo& rInf, sal_Int32 &rPos )
+ bool lcl_BuildHiddenPortion( const SwTextSizeInfo& rInf, sal_Int32 &rPos )
{
// Only if hidden text should not be shown:
// if ( rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar() )
diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
index ad2b7f54cfbf..104dea7e9716 100644
--- a/sw/source/core/text/itrform2.hxx
+++ b/sw/source/core/text/itrform2.hxx
@@ -23,17 +23,17 @@
class SwFlyCntPortion;
class SwInterHyphInfo;
class SwDropPortion;
-class SwFmtDrop;
-class SwTxtAttr;
+class SwFormatDrop;
+class SwTextAttr;
class SwNumberPortion;
class SwErgoSumPortion;
class SwExpandPortion;
class SwMultiPortion;
-class SwFtnPortion;
+class SwFootnotePortion;
-class SwTxtFormatter : public SwTxtPainter
+class SwTextFormatter : public SwTextPainter
{
- const SwFmtDrop *pDropFmt;
+ const SwFormatDrop *pDropFormat;
SwMultiPortion* pMulti; // during formatting a multi-portion
sal_uInt8 nCntEndHyph; // Counts consecutive hyphens at the line end
sal_uInt8 nCntMidHyph; // Counts consecutive hyphens before flies
@@ -47,63 +47,63 @@ class SwTxtFormatter : public SwTxtPainter
size_t m_nHintEndIndex; // HACK for TryNewNoLengthPortion
SwLinePortion* m_pFirstOfBorderMerge; // The first text portion of a joined border (during portion bulding)
- SwLinePortion *NewPortion( SwTxtFormatInfo &rInf );
- SwTxtPortion *NewTxtPortion( SwTxtFormatInfo &rInf );
- SwLinePortion *NewExtraPortion( SwTxtFormatInfo &rInf );
- SwTabPortion *NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) const;
- SwNumberPortion *NewNumberPortion( SwTxtFormatInfo &rInf ) const;
- SwDropPortion *NewDropPortion( SwTxtFormatInfo &rInf );
- SwNumberPortion *NewFtnNumPortion( SwTxtFormatInfo &rInf ) const;
- SwErgoSumPortion *NewErgoSumPortion( SwTxtFormatInfo &rInf ) const;
- SwExpandPortion *NewFldPortion( SwTxtFormatInfo &rInf,
- const SwTxtAttr *pHt ) const;
- SwFtnPortion *NewFtnPortion( SwTxtFormatInfo &rInf, SwTxtAttr *pHt );
+ SwLinePortion *NewPortion( SwTextFormatInfo &rInf );
+ SwTextPortion *NewTextPortion( SwTextFormatInfo &rInf );
+ SwLinePortion *NewExtraPortion( SwTextFormatInfo &rInf );
+ SwTabPortion *NewTabPortion( SwTextFormatInfo &rInf, bool bAuto ) const;
+ SwNumberPortion *NewNumberPortion( SwTextFormatInfo &rInf ) const;
+ SwDropPortion *NewDropPortion( SwTextFormatInfo &rInf );
+ SwNumberPortion *NewFootnoteNumPortion( SwTextFormatInfo &rInf ) const;
+ SwErgoSumPortion *NewErgoSumPortion( SwTextFormatInfo &rInf ) const;
+ SwExpandPortion *NewFieldPortion( SwTextFormatInfo &rInf,
+ const SwTextAttr *pHt ) const;
+ SwFootnotePortion *NewFootnotePortion( SwTextFormatInfo &rInf, SwTextAttr *pHt );
/**
Sets a new portion for an object anchored as character
*/
- SwFlyCntPortion *NewFlyCntPortion( SwTxtFormatInfo &rInf,
- SwTxtAttr *pHt ) const;
- SwLinePortion *WhichFirstPortion( SwTxtFormatInfo &rInf );
- SwTxtPortion *WhichTxtPor( SwTxtFormatInfo &rInf ) const;
- SwExpandPortion * TryNewNoLengthPortion( SwTxtFormatInfo & rInfo );
+ SwFlyCntPortion *NewFlyCntPortion( SwTextFormatInfo &rInf,
+ SwTextAttr *pHt ) const;
+ SwLinePortion *WhichFirstPortion( SwTextFormatInfo &rInf );
+ SwTextPortion *WhichTextPor( SwTextFormatInfo &rInf ) const;
+ SwExpandPortion * TryNewNoLengthPortion( SwTextFormatInfo & rInfo );
// The center pice of formatting
- void BuildPortions( SwTxtFormatInfo &rInf );
+ void BuildPortions( SwTextFormatInfo &rInf );
- bool BuildMultiPortion( SwTxtFormatInfo &rInf, SwMultiPortion& rMulti );
+ bool BuildMultiPortion( SwTextFormatInfo &rInf, SwMultiPortion& rMulti );
/**
Calculation of the emulated right side.
Determines the next object, that reaches into the rest of the line and
constructs the appropriate FlyPortion.
- SwTxtFly::GetFrm(const SwRect&, bool) will be needed for this.
+ SwTextFly::GetFrm(const SwRect&, bool) will be needed for this.
The right edge can be shortened by flys
*/
- void CalcFlyWidth( SwTxtFormatInfo &rInf );
+ void CalcFlyWidth( SwTextFormatInfo &rInf );
- // Is overloaded by SwTxtFormatter because of UpdatePos
+ // Is overloaded by SwTextFormatter because of UpdatePos
void CalcAdjustLine( SwLineLayout *pCurr );
// considers line spacing attributes
void CalcRealHeight( bool bNewLine = false );
// Transfers the data to rInf
- void FeedInf( SwTxtFormatInfo &rInf ) const;
+ void FeedInf( SwTextFormatInfo &rInf ) const;
// Treats underflow situations
- SwLinePortion *Underflow( SwTxtFormatInfo &rInf );
+ SwLinePortion *Underflow( SwTextFormatInfo &rInf );
// Calculates the ascent and the height from the fontmetric
- void CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor );
+ void CalcAscent( SwTextFormatInfo &rInf, SwLinePortion *pPor );
// determines, if a optimized repaint rectange is allowed
bool AllowRepaintOpt() const;
// Is called by FormatLine
- void FormatReset( SwTxtFormatInfo &rInf );
+ void FormatReset( SwTextFormatInfo &rInf );
/**
The position of the portions changes with the adjustment.
@@ -128,10 +128,10 @@ class SwTxtFormatter : public SwTxtPainter
We check this and return true, meaning that the line has to be
formatted again.
*/
- bool ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const;
+ bool ChkFlyUnderflow( SwTextFormatInfo &rInf ) const;
// Insert portion
- void InsertPortion( SwTxtFormatInfo &rInf, SwLinePortion *pPor ) const;
+ void InsertPortion( SwTextFormatInfo &rInf, SwLinePortion *pPor ) const;
// Guess height for the DropPortion
void GuessDropHeight( const sal_uInt16 nLines );
@@ -151,14 +151,14 @@ public:
// Amongst others for DropCaps
bool CalcOnceMore();
- void CtorInitTxtFormatter( SwTxtFrm *pFrm, SwTxtFormatInfo *pInf );
- SwTxtFormatter(SwTxtFrm *pTxtFrm, SwTxtFormatInfo *pTxtFmtInf)
- : SwTxtPainter(pTxtFrm->GetTxtNode())
+ void CtorInitTextFormatter( SwTextFrm *pFrm, SwTextFormatInfo *pInf );
+ SwTextFormatter(SwTextFrm *pTextFrm, SwTextFormatInfo *pTextFormatInf)
+ : SwTextPainter(pTextFrm->GetTextNode())
, bUnclipped(false)
{
- CtorInitTxtFormatter( pTxtFrm, pTxtFmtInf );
+ CtorInitTextFormatter( pTextFrm, pTextFormatInf );
}
- virtual ~SwTxtFormatter();
+ virtual ~SwTextFormatter();
sal_Int32 FormatLine( const sal_Int32 nStart );
@@ -168,7 +168,7 @@ public:
bool Hyphenate( SwInterHyphInfo &rInf );
// A special method for QuoVadis texts:
- // nErgo is the page number of the ErgoSum Ftn
+ // nErgo is the page number of the ErgoSum Footnote
// At 0 it's still unclear
sal_Int32 FormatQuoVadis( const sal_Int32 nStart );
@@ -181,10 +181,10 @@ public:
// FormatQuick(); Refresh formatting information
bool IsQuick() const { return GetInfo().IsQuick(); }
- // Create a SwLineLayout if needed, which avoids Ftn/Fly to oscillate
+ // Create a SwLineLayout if needed, which avoids Footnote/Fly to oscillate
void MakeDummyLine();
- // SwTxtIter functionality
+ // SwTextIter functionality
void Insert( SwLineLayout *pLine );
// The remaining height to the page border
@@ -195,8 +195,8 @@ public:
SwLinePortion* MakeRestPortion(const SwLineLayout* pLine, sal_Int32 nPos);
- const SwFmtDrop *GetDropFmt() const { return pDropFmt; }
- void ClearDropFmt() { pDropFmt = 0; }
+ const SwFormatDrop *GetDropFormat() const { return pDropFormat; }
+ void ClearDropFormat() { pDropFormat = 0; }
SwMultiPortion *GetMulti() const { return pMulti; }
@@ -215,10 +215,10 @@ public:
bool IsFlyInCntBase() const { return bFlyInCntBase; }
void SetFlyInCntBase( bool bNew = true ) { bFlyInCntBase = bNew; }
- SwTxtFormatInfo &GetInfo()
- { return static_cast<SwTxtFormatInfo&>(SwTxtIter::GetInfo()); }
- const SwTxtFormatInfo &GetInfo() const
- { return static_cast<const SwTxtFormatInfo&>(SwTxtIter::GetInfo()); }
+ SwTextFormatInfo &GetInfo()
+ { return static_cast<SwTextFormatInfo&>(SwTextIter::GetInfo()); }
+ const SwTextFormatInfo &GetInfo() const
+ { return static_cast<const SwTextFormatInfo&>(SwTextIter::GetInfo()); }
void InitCntHyph() { CntHyphens( nCntEndHyph, nCntMidHyph ); }
const sal_uInt8 &CntEndHyph() const { return nCntEndHyph; }
@@ -241,7 +241,7 @@ public:
* @param rPortion portion for merge
* @param rInf contain information
**/
- void MergeCharacterBorder( SwLinePortion& rPortion, SwTxtFormatInfo& rInf );
+ void MergeCharacterBorder( SwLinePortion& rPortion, SwTextFormatInfo& rInf );
};
#endif
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 760b663810aa..1a6c3d0b58aa 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -57,7 +57,7 @@
// Returns, if we have an underline breaking situation
// Adding some more conditions here means you also have to change them
-// in SwTxtPainter::CheckSpecialUnderline
+// in SwTextPainter::CheckSpecialUnderline
bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt )
{
return UNDERLINE_NONE == rFnt.GetUnderline() ||
@@ -69,9 +69,9 @@ bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt )
SVX_CASEMAP_KAPITAELCHEN == rFnt.GetCaseMap();
}
-void SwTxtPainter::CtorInitTxtPainter( SwTxtFrm *pNewFrm, SwTxtPaintInfo *pNewInf )
+void SwTextPainter::CtorInitTextPainter( SwTextFrm *pNewFrm, SwTextPaintInfo *pNewInf )
{
- CtorInitTxtCursor( pNewFrm, pNewInf );
+ CtorInitTextCursor( pNewFrm, pNewInf );
pInf = pNewInf;
SwFont *pMyFnt = GetFnt();
GetInfo().SetFont( pMyFnt );
@@ -79,14 +79,14 @@ void SwTxtPainter::CtorInitTxtPainter( SwTxtFrm *pNewFrm, SwTxtPaintInfo *pNewIn
if( ALIGN_BASELINE != pMyFnt->GetAlign() )
{
OSL_ENSURE( ALIGN_BASELINE == pMyFnt->GetAlign(),
- "+SwTxtPainter::CTOR: font alignment revolution" );
+ "+SwTextPainter::CTOR: font alignment revolution" );
pMyFnt->SetAlign( ALIGN_BASELINE );
}
#endif
bPaintDrop = false;
}
-SwLinePortion *SwTxtPainter::CalcPaintOfst( const SwRect &rPaint )
+SwLinePortion *SwTextPainter::CalcPaintOfst( const SwRect &rPaint )
{
SwLinePortion *pPor = pCurr->GetFirstPortion();
GetInfo().SetPaintOfst( 0 );
@@ -135,7 +135,7 @@ SwLinePortion *SwTxtPainter::CalcPaintOfst( const SwRect &rPaint )
// ausgefuehrt (objektiv langsam, subjektiv schnell).
// Da der User in der Regel subjektiv urteilt, wird die 2. Methode
// als Default eingestellt.
-void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
+void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
const bool bUnderSz )
{
#if OSL_DEBUG_LEVEL > 1
@@ -156,7 +156,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
const bool bDrawInWindow = GetInfo().OnWin();
// 6882: Leerzeilen duerfen nicht wegoptimiert werden bei Paragraphzeichen.
- const bool bEndPor = GetInfo().GetOpt().IsParagraph() && GetInfo().GetTxt().isEmpty();
+ const bool bEndPor = GetInfo().GetOpt().IsParagraph() && GetInfo().GetText().isEmpty();
SwLinePortion *pPor = bEndPor ? pCurr->GetFirstPortion() : CalcPaintOfst( rPaint );
@@ -231,12 +231,12 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( !pPor && !bEndPor )
return;
- // Baseline-Ausgabe auch bei nicht-TxtPortions (vgl. TabPor mit Fill)
+ // Baseline-Ausgabe auch bei nicht-TextPortions (vgl. TabPor mit Fill)
// if no special vertical alignment is used,
// we calculate Y value for the whole line
- SwTextGridItem const*const pGrid(GetGridItem(GetTxtFrm()->FindPageFrm()));
+ SwTextGridItem const*const pGrid(GetGridItem(GetTextFrm()->FindPageFrm()));
const bool bAdjustBaseLine =
- GetLineInfo().HasSpecialAlign( GetTxtFrm()->IsVertical() ) ||
+ GetLineInfo().HasSpecialAlign( GetTextFrm()->IsVertical() ) ||
( 0 != pGrid );
const SwTwips nLineBaseLine = GetInfo().GetPos().Y() + nTmpAscent;
if ( ! bAdjustBaseLine )
@@ -289,15 +289,15 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
// end character has the same font as this portion
// (only in special vertical alignment case, otherwise the first
// portion of the line is used)
- if ( pPor->Width() && pPor->InTxtGrp() )
+ if ( pPor->Width() && pPor->InTextGrp() )
pEndTempl = pPor;
}
// Ein Sonderfall sind GluePortions, die Blanks ausgeben.
- // 6168: Der Rest einer FldPortion zog sich die Attribute der naechsten
+ // 6168: Der Rest einer FieldPortion zog sich die Attribute der naechsten
// Portion an, dies wird durch SeekAndChgBefore vermieden:
- if( ( bRest && pPor->InFldGrp() && !pPor->GetLen() ) )
+ if( ( bRest && pPor->InFieldGrp() && !pPor->GetLen() ) )
SeekAndChgBefore( GetInfo() );
else if ( pPor->IsQuoVadisPortion() )
{
@@ -306,7 +306,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( GetRedln() && pCurr->HasRedline() )
GetRedln()->Seek( *pFnt, nOffset, 0 );
}
- else if( pPor->InTxtGrp() || pPor->InFldGrp() || pPor->InTabGrp() )
+ else if( pPor->InTextGrp() || pPor->InFieldGrp() || pPor->InTabGrp() )
SeekAndChg( GetInfo() );
else if ( !bFirst && pPor->IsBreakPortion() && GetInfo().GetOpt().IsParagraph() )
{
@@ -382,7 +382,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
// reset (for special vertical alignment)
GetInfo().Y( nOldY );
- if( GetFnt()->IsURL() && pPor->InTxtGrp() )
+ if( GetFnt()->IsURL() && pPor->InTextGrp() )
GetInfo().NotifyURL( *pPor );
bFirst &= !pPor->GetLen();
@@ -414,8 +414,8 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( !GetNextLine() &&
GetInfo().GetVsh() && !GetInfo().GetVsh()->IsPreview() &&
- GetInfo().GetOpt().IsParagraph() && !GetTxtFrm()->GetFollow() &&
- GetInfo().GetIdx() >= GetInfo().GetTxt().getLength() )
+ GetInfo().GetOpt().IsParagraph() && !GetTextFrm()->GetFollow() &&
+ GetInfo().GetIdx() >= GetInfo().GetText().getLength() )
{
const SwTmpEndPortion aEnd( *pEndTempl );
GetFnt()->ChgPhysFnt( GetInfo().GetVsh(), *pOut );
@@ -430,10 +430,10 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( GetInfo().GetVsh() && !GetInfo().GetVsh()->IsPreview() )
{
const bool bNextUndersized =
- ( GetTxtFrm()->GetNext() &&
- 0 == GetTxtFrm()->GetNext()->Prt().Height() &&
- GetTxtFrm()->GetNext()->IsTxtFrm() &&
- static_cast<SwTxtFrm*>(GetTxtFrm()->GetNext())->IsUndersized() ) ;
+ ( GetTextFrm()->GetNext() &&
+ 0 == GetTextFrm()->GetNext()->Prt().Height() &&
+ GetTextFrm()->GetNext()->IsTextFrm() &&
+ static_cast<SwTextFrm*>(GetTextFrm()->GetNext())->IsUndersized() ) ;
if( bUnderSz || bNextUndersized )
{
@@ -444,9 +444,9 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
GetInfo().DrawRedArrow( *pArrow );
// GetInfo().Y() must be current baseline
- SwTwips nDiff = GetInfo().Y() + nTmpHeight - nTmpAscent - GetTxtFrm()->Frm().Bottom();
+ SwTwips nDiff = GetInfo().Y() + nTmpHeight - nTmpAscent - GetTextFrm()->Frm().Bottom();
if( ( nDiff > 0 &&
- ( GetEnd() < GetInfo().GetTxt().getLength() ||
+ ( GetEnd() < GetInfo().GetText().getLength() ||
( nDiff > nTmpHeight/2 && GetPrevLine() ) ) ) ||
(nDiff >= 0 && bNextUndersized) )
@@ -464,7 +464,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
rClip.ChgClip( rPaint, pFrm );
}
-void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
+void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
long nAdjustBaseLine )
{
// Check if common underline should not be continued
@@ -487,7 +487,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
OSL_ENSURE( GetFnt() && UNDERLINE_NONE != GetFnt()->GetUnderline(),
"CheckSpecialUnderline without underlined font" );
- MultiSelection aUnderMulti( Range( 0, GetInfo().GetTxt().getLength() ) );
+ MultiSelection aUnderMulti( Range( 0, GetInfo().GetText().getLength() ) );
const SwFont* pParaFnt = GetAttrHandler().GetFont();
if( pParaFnt && pParaFnt->GetUnderline() == GetFnt()->GetUnderline() )
aUnderMulti.SelectAll();
@@ -496,15 +496,15 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
{
for ( size_t nTmp = 0; nTmp < pHints->GetStartCount(); ++nTmp )
{
- SwTxtAttr* const pTxtAttr = pHints->GetStart( nTmp );
+ SwTextAttr* const pTextAttr = pHints->GetStart( nTmp );
const SvxUnderlineItem* pItem =
- static_cast<const SvxUnderlineItem*>(CharFmt::GetItem( *pTxtAttr, RES_CHRATR_UNDERLINE ));
+ static_cast<const SvxUnderlineItem*>(CharFormat::GetItem( *pTextAttr, RES_CHRATR_UNDERLINE ));
if ( pItem )
{
- const sal_Int32 nSt = pTxtAttr->GetStart();
- const sal_Int32 nEnd = *pTxtAttr->GetEnd();
+ const sal_Int32 nSt = pTextAttr->GetStart();
+ const sal_Int32 nEnd = *pTextAttr->GetEnd();
if( nEnd > nSt )
{
const bool bUnderSelect = pFnt->GetUnderline() == pItem->GetLineStyle();
@@ -544,7 +544,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
{
// here starts the algorithm for calculating the underline font
SwScriptInfo& rScriptInfo = GetInfo().GetParaPortion()->GetScriptInfo();
- SwAttrIter aIter( *GetInfo().GetTxtFrm()->GetTxtNode(),
+ SwAttrIter aIter( *GetInfo().GetTextFrm()->GetTextNode(),
rScriptInfo );
sal_Int32 nTmpIdx = nIndx;
diff --git a/sw/source/core/text/itrpaint.hxx b/sw/source/core/text/itrpaint.hxx
index 3f5bb35f65f3..20fb2df23259 100644
--- a/sw/source/core/text/itrpaint.hxx
+++ b/sw/source/core/text/itrpaint.hxx
@@ -20,10 +20,10 @@
#define INCLUDED_SW_SOURCE_CORE_TEXT_ITRPAINT_HXX
#include "itrtxt.hxx"
-class SwSaveClip; // SwTxtPainter
+class SwSaveClip; // SwTextPainter
class SwMultiPortion;
-class SwTxtPainter : public SwTxtCursor
+class SwTextPainter : public SwTextCursor
{
bool bPaintDrop;
@@ -31,18 +31,18 @@ class SwTxtPainter : public SwTxtCursor
void CheckSpecialUnderline( const SwLinePortion* pPor,
long nAdjustBaseLine = 0 );
protected:
- void CtorInitTxtPainter( SwTxtFrm *pFrm, SwTxtPaintInfo *pInf );
- SwTxtPainter(SwTxtNode* pTxtNode)
- : SwTxtCursor(pTxtNode)
+ void CtorInitTextPainter( SwTextFrm *pFrm, SwTextPaintInfo *pInf );
+ SwTextPainter(SwTextNode* pTextNode)
+ : SwTextCursor(pTextNode)
, bPaintDrop(false)
{
}
public:
- SwTxtPainter(SwTxtFrm *pTxtFrm, SwTxtPaintInfo *pTxtPaintInf)
- : SwTxtCursor(pTxtFrm->GetTxtNode())
+ SwTextPainter(SwTextFrm *pTextFrm, SwTextPaintInfo *pTextPaintInf)
+ : SwTextCursor(pTextFrm->GetTextNode())
{
- CtorInitTxtPainter( pTxtFrm, pTxtPaintInf );
+ CtorInitTextPainter( pTextFrm, pTextPaintInf );
}
void DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
const bool bUnderSz );
@@ -53,10 +53,10 @@ public:
const SwMultiPortion* pEnvPor = 0 );
inline void SetPaintDrop( const bool bNew ) { bPaintDrop = bNew; }
inline bool IsPaintDrop() const { return bPaintDrop; }
- inline SwTxtPaintInfo &GetInfo()
- { return static_cast<SwTxtPaintInfo&>(SwTxtIter::GetInfo()); }
- inline const SwTxtPaintInfo &GetInfo() const
- { return static_cast<const SwTxtPaintInfo&>(SwTxtIter::GetInfo()); }
+ inline SwTextPaintInfo &GetInfo()
+ { return static_cast<SwTextPaintInfo&>(SwTextIter::GetInfo()); }
+ inline const SwTextPaintInfo &GetInfo() const
+ { return static_cast<const SwTextPaintInfo&>(SwTextIter::GetInfo()); }
};
bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt );
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index 920b22f66035..e211d2d50759 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -33,9 +33,9 @@
#include "txtfrm.hxx"
#include "porfly.hxx"
-void SwTxtIter::CtorInitTxtIter( SwTxtFrm *pNewFrm, SwTxtInfo *pNewInf )
+void SwTextIter::CtorInitTextIter( SwTextFrm *pNewFrm, SwTextInfo *pNewInf )
{
- SwTxtNode *pNode = pNewFrm->GetTxtNode();
+ SwTextNode *pNode = pNewFrm->GetTextNode();
OSL_ENSURE( pNewFrm->GetPara(), "No paragraph" );
@@ -45,30 +45,30 @@ void SwTxtIter::CtorInitTxtIter( SwTxtFrm *pNewFrm, SwTxtInfo *pNewInf )
pInf = pNewInf;
aLineInf.CtorInitLineInfo( pNode->GetSwAttrSet(), *pNode );
nFrameStart = pFrm->Frm().Pos().Y() + pFrm->Prt().Pos().Y();
- SwTxtIter::Init();
+ SwTextIter::Init();
// Order is important: only execute FillRegister if GetValue!=0
bRegisterOn = pNode->GetSwAttrSet().GetRegister().GetValue()
&& pFrm->FillRegister( nRegStart, nRegDiff );
}
-void SwTxtIter::Init()
+void SwTextIter::Init()
{
pCurr = pInf->GetParaPortion();
- nStart = pInf->GetTxtStart();
+ nStart = pInf->GetTextStart();
nY = nFrameStart;
bPrev = true;
pPrev = 0;
nLineNr = 1;
}
-void SwTxtIter::CalcAscentAndHeight( sal_uInt16 &rAscent, sal_uInt16 &rHeight ) const
+void SwTextIter::CalcAscentAndHeight( sal_uInt16 &rAscent, sal_uInt16 &rHeight ) const
{
rHeight = GetLineHeight();
rAscent = pCurr->GetAscent() + rHeight - pCurr->Height();
}
-SwLineLayout *SwTxtIter::_GetPrev()
+SwLineLayout *SwTextIter::_GetPrev()
{
pPrev = 0;
bPrev = true;
@@ -80,14 +80,14 @@ SwLineLayout *SwTxtIter::_GetPrev()
return pPrev = pLay;
}
-const SwLineLayout *SwTxtIter::GetPrev()
+const SwLineLayout *SwTextIter::GetPrev()
{
if(! bPrev)
_GetPrev();
return pPrev;
}
-const SwLineLayout *SwTxtIter::Prev()
+const SwLineLayout *SwTextIter::Prev()
{
if( !bPrev )
_GetPrev();
@@ -105,7 +105,7 @@ const SwLineLayout *SwTxtIter::Prev()
return 0;
}
-const SwLineLayout *SwTxtIter::Next()
+const SwLineLayout *SwTextIter::Next()
{
if(pCurr->GetNext())
{
@@ -121,7 +121,7 @@ const SwLineLayout *SwTxtIter::Next()
return 0;
}
-const SwLineLayout *SwTxtIter::NextLine()
+const SwLineLayout *SwTextIter::NextLine()
{
const SwLineLayout *pNext = Next();
while( pNext && pNext->IsDummy() && pNext->GetNext() )
@@ -131,7 +131,7 @@ const SwLineLayout *SwTxtIter::NextLine()
return pNext;
}
-const SwLineLayout *SwTxtIter::GetNextLine() const
+const SwLineLayout *SwTextIter::GetNextLine() const
{
const SwLineLayout *pNext = pCurr->GetNext();
while( pNext && pNext->IsDummy() && pNext->GetNext() )
@@ -141,7 +141,7 @@ const SwLineLayout *SwTxtIter::GetNextLine() const
return pNext;
}
-const SwLineLayout *SwTxtIter::GetPrevLine()
+const SwLineLayout *SwTextIter::GetPrevLine()
{
const SwLineLayout *pRoot = pInf->GetParaPortion();
if( pRoot == pCurr )
@@ -167,7 +167,7 @@ const SwLineLayout *SwTxtIter::GetPrevLine()
return pLay;
}
-const SwLineLayout *SwTxtIter::PrevLine()
+const SwLineLayout *SwTextIter::PrevLine()
{
const SwLineLayout *pMyPrev = Prev();
if( !pMyPrev )
@@ -182,7 +182,7 @@ const SwLineLayout *SwTxtIter::PrevLine()
return pMyPrev ? pMyPrev : pLast;
}
-void SwTxtIter::Bottom()
+void SwTextIter::Bottom()
{
while( Next() )
{
@@ -190,7 +190,7 @@ void SwTxtIter::Bottom()
}
}
-void SwTxtIter::CharToLine(const sal_Int32 nChar)
+void SwTextIter::CharToLine(const sal_Int32 nChar)
{
while( nStart + pCurr->GetLen() <= nChar && Next() )
;
@@ -199,7 +199,7 @@ void SwTxtIter::CharToLine(const sal_Int32 nChar)
}
// 1170: beruecksichtigt Mehrdeutigkeiten:
-const SwLineLayout *SwTxtCursor::CharCrsrToLine( const sal_Int32 nPosition )
+const SwLineLayout *SwTextCursor::CharCrsrToLine( const sal_Int32 nPosition )
{
CharToLine( nPosition );
if( nPosition != nStart )
@@ -211,7 +211,7 @@ const SwLineLayout *SwTxtCursor::CharCrsrToLine( const sal_Int32 nPosition )
return bPrevious ? PrevLine() : pCurr;
}
-sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
+sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine,
const SwLinePortion* pPor,
sal_uInt16 nPorHeight, sal_uInt16 nPorAscent,
const bool bAutoToCentered ) const
@@ -272,9 +272,9 @@ sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
nOfst += rLine.Height() - nPorHeight + nPorAscent;
break;
case SvxParaVertAlignItem::AUTOMATIC :
- if ( bAutoToCentered || GetInfo().GetTxtFrm()->IsVertical() )
+ if ( bAutoToCentered || GetInfo().GetTextFrm()->IsVertical() )
{
- if( GetInfo().GetTxtFrm()->IsVertLR() )
+ if( GetInfo().GetTextFrm()->IsVertLR() )
nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent;
else
nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent;
@@ -290,7 +290,7 @@ sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
return nOfst;
}
-const SwLineLayout *SwTxtIter::TwipsToLine( const SwTwips y)
+const SwLineLayout *SwTextIter::TwipsToLine( const SwTwips y)
{
while( nY + GetLineHeight() <= y && Next() )
;
@@ -306,15 +306,15 @@ static bool lcl_NeedsFieldRest( const SwLineLayout* pCurr )
bool bRet = false;
while( pPor && !bRet )
{
- bRet = pPor->InFldGrp() && static_cast<const SwFldPortion*>(pPor)->HasFollow();
- if( !pPor->GetPortion() || !pPor->GetPortion()->InFldGrp() )
+ bRet = pPor->InFieldGrp() && static_cast<const SwFieldPortion*>(pPor)->HasFollow();
+ if( !pPor->GetPortion() || !pPor->GetPortion()->InFieldGrp() )
break;
pPor = pPor->GetPortion();
}
return bRet;
}
-void SwTxtIter::TruncLines( bool bNoteFollow )
+void SwTextIter::TruncLines( bool bNoteFollow )
{
SwLineLayout *pDel = pCurr->GetNext();
const sal_Int32 nEnd = nStart + pCurr->GetLen();
@@ -328,7 +328,7 @@ void SwTxtIter::TruncLines( bool bNoteFollow )
lcl_NeedsFieldRest( pCurr ) );
// bug 88534: wrong positioning of flys
- SwTxtFrm* pFollow = GetTxtFrm()->GetFollow();
+ SwTextFrm* pFollow = GetTextFrm()->GetFollow();
if ( pFollow && ! pFollow->IsLocked() &&
nEnd == pFollow->GetOfst() )
{
@@ -342,12 +342,12 @@ void SwTxtIter::TruncLines( bool bNoteFollow )
pLine = pLine->GetNext();
}
- SwpHints* pTmpHints = GetTxtFrm()->GetTxtNode()->GetpSwpHints();
+ SwpHints* pTmpHints = GetTextFrm()->GetTextNode()->GetpSwpHints();
// examine hints in range nEnd - (nEnd + nRangeChar)
for( size_t i = 0; i < pTmpHints->Count(); ++i )
{
- const SwTxtAttr* pHt = pTmpHints->GetTextHint( i );
+ const SwTextAttr* pHt = pTmpHints->GetTextHint( i );
if( RES_TXTATR_FLYCNT == pHt->Which() )
{
// check, if hint is in our range
@@ -363,13 +363,13 @@ void SwTxtIter::TruncLines( bool bNoteFollow )
}
if( pCurr->IsDummy() &&
!pCurr->GetLen() &&
- nStart < GetTxtFrm()->GetTxt().getLength() )
+ nStart < GetTextFrm()->GetText().getLength() )
pCurr->SetRealHeight( 1 );
if( GetHints() )
- pFrm->RemoveFtn( nEnd );
+ pFrm->RemoveFootnote( nEnd );
}
-void SwTxtIter::CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const
+void SwTextIter::CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const
{
nEndCnt = 0;
nMidCnt = 0;
@@ -394,7 +394,7 @@ void SwTxtIter::CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const
// Change current output device to formatting device, this has to be done before
// formatting.
-SwHookOut::SwHookOut( SwTxtSizeInfo& rInfo ) :
+SwHookOut::SwHookOut( SwTextSizeInfo& rInfo ) :
pInf( &rInfo ),
pOut( rInfo.GetOut() ),
bOnWin( rInfo.OnWin() )
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 2008fefcff30..95f821d98c9a 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -22,18 +22,18 @@
#include "itratr.hxx"
#include "inftxt.hxx"
-class SwTxtFrm;
+class SwTextFrm;
struct SwPosition;
struct SwCrsrMoveState;
class SwMarginPortion;
class SwFlyPortion;
-class SwTxtIter : public SwAttrIter
+class SwTextIter : public SwAttrIter
{
protected:
SwLineInfo aLineInf;
- SwTxtFrm *pFrm;
- SwTxtInfo *pInf;
+ SwTextFrm *pFrm;
+ SwTextInfo *pInf;
SwLineLayout *pCurr;
SwLineLayout *pPrev;
SwTwips nFrameStart;
@@ -52,9 +52,9 @@ protected:
// Reset in the first line
void Init();
- void CtorInitTxtIter( SwTxtFrm *pFrm, SwTxtInfo *pInf );
- SwTxtIter(SwTxtNode* pTxtNode)
- : SwAttrIter(pTxtNode)
+ void CtorInitTextIter( SwTextFrm *pFrm, SwTextInfo *pInf );
+ SwTextIter(SwTextNode* pTextNode)
+ : SwAttrIter(pTextNode)
, pFrm(NULL)
, pInf(NULL)
, pCurr(NULL)
@@ -73,13 +73,13 @@ protected:
{
}
public:
- SwTxtIter(SwTxtFrm *pTxtFrm, SwTxtInfo *pTxtInf)
- : SwAttrIter(pTxtFrm->GetTxtNode())
+ SwTextIter(SwTextFrm *pTextFrm, SwTextInfo *pTextInf)
+ : SwAttrIter(pTextFrm->GetTextNode())
, bOneBlock(false)
, bLastBlock(false)
, bLastCenter(false)
{
- CtorInitTxtIter(pTxtFrm, pTxtInf);
+ CtorInitTextIter(pTextFrm, pTextInf);
}
inline const SwLineLayout *GetCurr() const { return pCurr; } // NEVER 0!
inline const SwLineLayout *GetNext() const { return pCurr->GetNext(); }
@@ -94,8 +94,8 @@ public:
inline sal_uInt16 RegDiff() const { return nRegDiff; }
inline bool IsRegisterOn() const { return bRegisterOn; }
- inline SwTxtInfo &GetInfo() { return *pInf; }
- inline const SwTxtInfo &GetInfo() const { return *pInf; }
+ inline SwTextInfo &GetInfo() { return *pInf; }
+ inline const SwTextInfo &GetInfo() const { return *pInf; }
inline void Top() { Init(); }
void Bottom();
@@ -118,8 +118,8 @@ public:
void CalcAscentAndHeight( sal_uInt16 &rAscent, sal_uInt16 &rHeight ) const;
// Lots of trouble for querying pCurr == pPara
- inline bool IsFirstTxtLine() const
- { return nStart == GetInfo().GetTxtStart() &&
+ inline bool IsFirstTextLine() const
+ { return nStart == GetInfo().GetTextStart() &&
!( pCurr->IsDummy() && GetNextLine() ); }
// Replacement for the old IsFirstLine()
@@ -128,18 +128,18 @@ public:
const SwLineInfo &GetLineInfo() const { return aLineInf; }
inline SwTwips GetFirstPos() const { return nFrameStart; }
- inline bool SeekAndChg( SwTxtSizeInfo &rInf );
- inline bool SeekAndChgBefore( SwTxtSizeInfo &rInf );
- inline bool SeekStartAndChg( SwTxtSizeInfo &rInf, const bool bPara=false );
+ inline bool SeekAndChg( SwTextSizeInfo &rInf );
+ inline bool SeekAndChgBefore( SwTextSizeInfo &rInf );
+ inline bool SeekStartAndChg( SwTextSizeInfo &rInf, const bool bPara=false );
- inline SwTxtFrm *GetTxtFrm() { return pFrm; }
- inline const SwTxtFrm *GetTxtFrm() const { return pFrm; }
+ inline SwTextFrm *GetTextFrm() { return pFrm; }
+ inline const SwTextFrm *GetTextFrm() const { return pFrm; }
// Counts consecutive hyphens in order to be within the boundary given by MaxHyphens
void CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const;
};
-class SwTxtMargin : public SwTxtIter
+class SwTextMargin : public SwTextIter
{
private:
SwTwips nLeft;
@@ -159,9 +159,9 @@ protected:
// For CalcFlyAdjust
inline void SetDropLeft( const sal_uInt16 nNew ) { nDropLeft = nNew; }
- void CtorInitTxtMargin( SwTxtFrm *pFrm, SwTxtSizeInfo *pInf );
- SwTxtMargin(SwTxtNode* pTxtNode)
- : SwTxtIter(pTxtNode)
+ void CtorInitTextMargin( SwTextFrm *pFrm, SwTextSizeInfo *pInf );
+ SwTextMargin(SwTextNode* pTextNode)
+ : SwTextIter(pTextNode)
, nLeft(0)
, nRight(0)
, nFirst(0)
@@ -174,10 +174,10 @@ protected:
{
}
public:
- SwTxtMargin(SwTxtFrm *pTxtFrm, SwTxtSizeInfo *pTxtSizeInf)
- : SwTxtIter(pTxtFrm->GetTxtNode())
+ SwTextMargin(SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf)
+ : SwTextIter(pTextFrm->GetTextNode())
{
- CtorInitTxtMargin( pTxtFrm, pTxtSizeInf );
+ CtorInitTextMargin( pTextFrm, pTextSizeInf );
}
inline SwTwips GetLeftMargin() const;
inline SwTwips Left() const;
@@ -211,19 +211,19 @@ public:
inline void SetDropDescent( const sal_uInt16 nNew ) { nDropDescent = nNew; }
void DropInit();
- // Returns the TxtPos for start and end of the current line without whitespace
+ // Returns the TextPos for start and end of the current line without whitespace
// Implemented in frminf.cxx
- sal_Int32 GetTxtStart() const;
- sal_Int32 GetTxtEnd() const;
+ sal_Int32 GetTextStart() const;
+ sal_Int32 GetTextEnd() const;
- inline SwTxtSizeInfo &GetInfo()
- { return static_cast<SwTxtSizeInfo&>(SwTxtIter::GetInfo()); }
- inline const SwTxtSizeInfo &GetInfo() const
- { return static_cast<const SwTxtSizeInfo&>(SwTxtIter::GetInfo()); }
+ inline SwTextSizeInfo &GetInfo()
+ { return static_cast<SwTextSizeInfo&>(SwTextIter::GetInfo()); }
+ inline const SwTextSizeInfo &GetInfo() const
+ { return static_cast<const SwTextSizeInfo&>(SwTextIter::GetInfo()); }
};
-class SwTxtAdjuster : public SwTxtMargin
+class SwTextAdjuster : public SwTextMargin
{
// Adjusts the portion, if we have adjustment and FlyFrms
void CalcFlyAdjust( SwLineLayout *pCurr );
@@ -239,23 +239,23 @@ class SwTxtAdjuster : public SwTxtMargin
const SwRect &rCurrRect );
protected:
- inline SwTxtAdjuster(SwTxtNode* pTxtNode) : SwTxtMargin(pTxtNode) { }
+ inline SwTextAdjuster(SwTextNode* pTextNode) : SwTextMargin(pTextNode) { }
// Creates the Glues for adjusted paragraphs
void CalcNewBlock( SwLineLayout *pCurr, const SwLinePortion *pStopAt,
SwTwips nReal = 0, bool bSkipKashida = false );
SwTwips CalcKanaAdj( SwLineLayout *pCurr );
public:
- inline SwTxtAdjuster( SwTxtFrm *pTxtFrm, SwTxtSizeInfo *pTxtSizeInf ) : SwTxtMargin(pTxtFrm!=NULL?pTxtFrm->GetTxtNode():NULL)
- { CtorInitTxtMargin( pTxtFrm, pTxtSizeInf ); }
+ inline SwTextAdjuster( SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf ) : SwTextMargin(pTextFrm!=NULL?pTextFrm->GetTextNode():NULL)
+ { CtorInitTextMargin( pTextFrm, pTextSizeInf ); }
- // Is overloaded by SwTxtFormatter due to UpdatePos
+ // Is overloaded by SwTextFormatter due to UpdatePos
void CalcAdjLine( SwLineLayout *pCurr );
// For adjusting afterwards
inline void GetAdjusted() const
{
if( pCurr->IsFormatAdj() )
- const_cast<SwTxtAdjuster*>(this)->CalcAdjLine( pCurr );
+ const_cast<SwTextAdjuster*>(this)->CalcAdjLine( pCurr );
}
// Special treatment for DropCaps
@@ -263,23 +263,23 @@ public:
void CalcDropRepaint();
};
-class SwTxtCursor : public SwTxtAdjuster
+class SwTextCursor : public SwTextAdjuster
{
- // A small helper-class to save SwTxtCursor member, manipulate them
+ // A small helper-class to save SwTextCursor member, manipulate them
// and to restore them
- friend class SwTxtCursorSave;
+ friend class SwTextCursorSave;
// Ambiguities
static bool bRightMargin;
void _GetCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* );
protected:
- void CtorInitTxtCursor( SwTxtFrm *pFrm, SwTxtSizeInfo *pInf );
- SwTxtCursor(SwTxtNode* pTxtNode) : SwTxtAdjuster(pTxtNode) { }
+ void CtorInitTextCursor( SwTextFrm *pFrm, SwTextSizeInfo *pInf );
+ SwTextCursor(SwTextNode* pTextNode) : SwTextAdjuster(pTextNode) { }
public:
- SwTxtCursor( SwTxtFrm *pTxtFrm, SwTxtSizeInfo *pTxtSizeInf )
- : SwTxtAdjuster(pTxtFrm->GetTxtNode())
+ SwTextCursor( SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf )
+ : SwTextAdjuster(pTextFrm->GetTextNode())
{
- CtorInitTxtCursor(pTxtFrm, pTxtSizeInf);
+ CtorInitTextCursor(pTextFrm, pTextSizeInf);
}
bool GetCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = 0,
const long nMax = 0 );
@@ -304,20 +304,20 @@ public:
// formatting.
class SwHookOut
{
- SwTxtSizeInfo* pInf;
+ SwTextSizeInfo* pInf;
VclPtr<OutputDevice> pOut;
bool bOnWin;
public:
- SwHookOut( SwTxtSizeInfo& rInfo );
+ SwHookOut( SwTextSizeInfo& rInfo );
~SwHookOut();
};
-inline bool SwTxtIter::SeekAndChg( SwTxtSizeInfo &rInf )
+inline bool SwTextIter::SeekAndChg( SwTextSizeInfo &rInf )
{
return SeekAndChgAttrIter( rInf.GetIdx(), rInf.GetOut() );
}
-inline bool SwTxtIter::SeekAndChgBefore( SwTxtSizeInfo &rInf )
+inline bool SwTextIter::SeekAndChgBefore( SwTextSizeInfo &rInf )
{
if ( rInf.GetIdx() )
return SeekAndChgAttrIter( rInf.GetIdx()-1, rInf.GetOut() );
@@ -325,17 +325,17 @@ inline bool SwTxtIter::SeekAndChgBefore( SwTxtSizeInfo &rInf )
return SeekAndChgAttrIter( rInf.GetIdx(), rInf.GetOut() );
}
-inline bool SwTxtIter::SeekStartAndChg( SwTxtSizeInfo &rInf, const bool bPara )
+inline bool SwTextIter::SeekStartAndChg( SwTextSizeInfo &rInf, const bool bPara )
{
return SeekStartAndChgAttrIter( rInf.GetOut(), bPara );
}
-inline SwTwips SwTxtMargin::GetLeftMargin() const
+inline SwTwips SwTextMargin::GetLeftMargin() const
{
- return IsFirstTxtLine() ? nFirst : Left();
+ return IsFirstTextLine() ? nFirst : Left();
}
-inline SwTwips SwTxtMargin::Left() const
+inline SwTwips SwTextMargin::Left() const
{
return (nDropLines >= nLineNr && 1 != nLineNr) ? nFirst + nDropLeft : nLeft;
}
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index 815e9eb07beb..568b03ff48d5 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -58,7 +58,7 @@ public:
void SetJoinBorderWithNext( const bool bJoinNext ) { m_bJoinBorderWithNext = bJoinNext; }
};
-class SwDropPortion : public SwTxtPortion
+class SwDropPortion : public SwTextPortion
{
friend class SwDropCapCache;
SwDropPortionPart* pPart; // due to script/attribute changes
@@ -70,8 +70,8 @@ class SwDropPortion : public SwTxtPortion
short nX; // X PaintOffset
short nY; // Y Offset
- bool FormatTxt( SwTxtFormatInfo &rInf );
- void PaintTxt( const SwTxtPaintInfo &rInf ) const;
+ bool FormatText( SwTextFormatInfo &rInf );
+ void PaintText( const SwTextPaintInfo &rInf ) const;
inline void Fix( const sal_uInt16 nNew ) { nFix = nNew; }
public:
@@ -81,10 +81,10 @@ public:
const sal_uInt16 nDistance );
virtual ~SwDropPortion();
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- void PaintDrop( const SwTxtPaintInfo &rInf ) const;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ void PaintDrop( const SwTextPaintInfo &rInf ) const;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const SAL_OVERRIDE;
virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
inline sal_uInt16 GetLines() const { return nLines; }
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index 31d6da800f01..161117ed334a 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -25,10 +25,10 @@
sal_Int32 SwExpandPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
{ return SwLinePortion::GetCrsrOfst( nOfst ); }
-bool SwExpandPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
+bool SwExpandPortion::GetExpText( const SwTextSizeInfo&, OUString &rText ) const
{
- rTxt.clear();
- // Do not do: return 0 != rTxt.Len();
+ rText.clear();
+ // Do not do: return 0 != rText.Len();
// Reason being: empty fields replace CH_TXTATR with an empty string
return true;
}
@@ -38,19 +38,19 @@ void SwExpandPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Special( GetLen(), OUString(), GetWhichPor() );
}
-SwPosSize SwExpandPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+SwPosSize SwExpandPortion::GetTextSize( const SwTextSizeInfo &rInf ) const
{
- SwTxtSlot aDiffTxt( &rInf, this, false, false );
- return rInf.GetTxtSize();
+ SwTextSlot aDiffText( &rInf, this, false, false );
+ return rInf.GetTextSize();
}
-bool SwExpandPortion::Format( SwTxtFormatInfo &rInf )
+bool SwExpandPortion::Format( SwTextFormatInfo &rInf )
{
- SwTxtSlot aDiffTxt( &rInf, this, true, false );
+ SwTextSlot aDiffText( &rInf, this, true, false );
const sal_Int32 nFullLen = rInf.GetLen();
// As odd as it may seem: the query for GetLen() must return
- // false due to the ExpandPortions _after_ the aDiffTxt (see SoftHyphs)
+ // false due to the ExpandPortions _after_ the aDiffText (see SoftHyphs)
// caused by the SetFull ...
if( !nFullLen )
{
@@ -58,17 +58,17 @@ bool SwExpandPortion::Format( SwTxtFormatInfo &rInf )
Width(0);
return false;
}
- return SwTxtPortion::Format( rInf );
+ return SwTextPortion::Format( rInf );
}
-void SwExpandPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwExpandPortion::Paint( const SwTextPaintInfo &rInf ) const
{
- SwTxtSlot aDiffTxt( &rInf, this, true, true );
+ SwTextSlot aDiffText( &rInf, this, true, true );
const SwFont aOldFont = *rInf.GetFont();
if( GetJoinBorderWithPrev() )
- const_cast<SwTxtPaintInfo&>(rInf).GetFont()->SetLeftBorder(0);
+ const_cast<SwTextPaintInfo&>(rInf).GetFont()->SetLeftBorder(0);
if( GetJoinBorderWithNext() )
- const_cast<SwTxtPaintInfo&>(rInf).GetFont()->SetRightBorder(0);
+ const_cast<SwTextPaintInfo&>(rInf).GetFont()->SetRightBorder(0);
rInf.DrawBackBrush( *this );
rInf.DrawBorder( *this );
@@ -91,7 +91,7 @@ void SwExpandPortion::Paint( const SwTxtPaintInfo &rInf ) const
rInf.DrawText( *this, rInf.GetLen(), false );
if( GetJoinBorderWithPrev() || GetJoinBorderWithNext() )
- *const_cast<SwTxtPaintInfo&>(rInf).GetFont() = aOldFont;
+ *const_cast<SwTextPaintInfo&>(rInf).GetFont() = aOldFont;
}
SwLinePortion *SwBlankPortion::Compress() { return this; }
@@ -101,7 +101,7 @@ SwLinePortion *SwBlankPortion::Compress() { return this; }
* underflows!
* Causes problems with Fly
*/
-sal_uInt16 SwBlankPortion::MayUnderflow( const SwTxtFormatInfo &rInf,
+sal_uInt16 SwBlankPortion::MayUnderflow( const SwTextFormatInfo &rInf,
sal_Int32 nIdx, bool bUnderflow )
{
if( rInf.StopUnderflow() )
@@ -116,9 +116,9 @@ sal_uInt16 SwBlankPortion::MayUnderflow( const SwTxtFormatInfo &rInf,
// If a Blank is preceding us, we do not need to trigger underflow
// If a Blank is succeeding us, we do not need to pass on the underflow
- if (bUnderflow && nIdx + 1 < rInf.GetTxt().getLength() && CH_BLANK == rInf.GetTxt()[nIdx + 1])
+ if (bUnderflow && nIdx + 1 < rInf.GetText().getLength() && CH_BLANK == rInf.GetText()[nIdx + 1])
return 0;
- if( nIdx && !const_cast<SwTxtFormatInfo&>(rInf).GetFly() )
+ if( nIdx && !const_cast<SwTextFormatInfo&>(rInf).GetFly() )
{
while( pPos && !pPos->IsFlyPortion() )
pPos = pPos->GetPortion();
@@ -151,7 +151,7 @@ sal_uInt16 SwBlankPortion::MayUnderflow( const SwTxtFormatInfo &rInf,
/**
* Format End of Line
*/
-void SwBlankPortion::FormatEOL( SwTxtFormatInfo &rInf )
+void SwBlankPortion::FormatEOL( SwTextFormatInfo &rInf )
{
sal_uInt16 nMay = MayUnderflow( rInf, rInf.GetIdx() - nLineLength, true );
if( nMay )
@@ -173,7 +173,7 @@ void SwBlankPortion::FormatEOL( SwTxtFormatInfo &rInf )
/**
* Pass on the underflows and trigger them ourselves!
*/
-bool SwBlankPortion::Format( SwTxtFormatInfo &rInf )
+bool SwBlankPortion::Format( SwTextFormatInfo &rInf )
{
const bool bFull = rInf.IsUnderflow() || SwExpandPortion::Format( rInf );
if( bFull && MayUnderflow( rInf, rInf.GetIdx(), rInf.IsUnderflow() ) )
@@ -186,16 +186,16 @@ bool SwBlankPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-void SwBlankPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwBlankPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( !bMulti ) // No gray background for multiportion brackets
rInf.DrawViewOpt( *this, POR_BLANK );
SwExpandPortion::Paint( rInf );
}
-bool SwBlankPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
+bool SwBlankPortion::GetExpText( const SwTextSizeInfo&, OUString &rText ) const
{
- rTxt = OUString(cChar);
+ rText = OUString(cChar);
return true;
}
@@ -211,19 +211,19 @@ SwPostItsPortion::SwPostItsPortion( bool bScrpt )
SetWhichPor( POR_POSTITS );
}
-void SwPostItsPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwPostItsPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( rInf.OnWin() && Width() )
rInf.DrawPostIts( *this, IsScript() );
}
-sal_uInt16 SwPostItsPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwPostItsPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
{
// Unbelievable: PostIts are always visible
return rInf.OnWin() ? SwViewOption::GetPostItsWidth( rInf.GetOut() ) : 0;
}
-bool SwPostItsPortion::Format( SwTxtFormatInfo &rInf )
+bool SwPostItsPortion::Format( SwTextFormatInfo &rInf )
{
const bool bRet = SwLinePortion::Format( rInf );
// PostIts should not have an effect on line height etc.
@@ -232,12 +232,12 @@ bool SwPostItsPortion::Format( SwTxtFormatInfo &rInf )
return bRet;
}
-bool SwPostItsPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
+bool SwPostItsPortion::GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const
{
if( rInf.OnWin() && rInf.GetOpt().IsPostIts() )
- rTxt = " ";
+ rText = " ";
else
- rTxt.clear();
+ rText.clear();
return true;
}
diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx
index 8ecf8c5ea9b7..cf2374aed66f 100644
--- a/sw/source/core/text/porexp.hxx
+++ b/sw/source/core/text/porexp.hxx
@@ -22,15 +22,15 @@
#include "portxt.hxx"
-class SwExpandPortion : public SwTxtPortion
+class SwExpandPortion : public SwTextPortion
{
public:
inline SwExpandPortion() { SetWhichPor( POR_EXP ); }
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
- virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
+ virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
@@ -51,11 +51,11 @@ public:
void SetMulti( bool bNew ) { bMulti = bNew; }
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
- virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- static sal_uInt16 MayUnderflow( const SwTxtFormatInfo &rInf, sal_Int32 nIdx,
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
+ virtual void FormatEOL( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ static sal_uInt16 MayUnderflow( const SwTextFormatInfo &rInf, sal_Int32 nIdx,
bool bUnderflow );
// Accessibility: pass information about this portion to the PortionHandler
@@ -69,10 +69,10 @@ class SwPostItsPortion : public SwExpandPortion
bool bScript;
public:
SwPostItsPortion( bool bScrpt );
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
bool IsScript() const { return bScript; }
OUTPUT_OPERATOR_OVERRIDE
};
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 95b1542fe8cc..a13c1501777b 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -45,10 +45,10 @@
using namespace ::com::sun::star;
-SwLinePortion *SwFldPortion::Compress()
+SwLinePortion *SwFieldPortion::Compress()
{ return (GetLen() || !aExpand.isEmpty() || SwLinePortion::Compress()) ? this : 0; }
-SwFldPortion *SwFldPortion::Clone( const OUString &rExpand ) const
+SwFieldPortion *SwFieldPortion::Clone( const OUString &rExpand ) const
{
SwFont *pNewFnt;
if( 0 != ( pNewFnt = pFnt ) )
@@ -56,75 +56,75 @@ SwFldPortion *SwFldPortion::Clone( const OUString &rExpand ) const
pNewFnt = new SwFont( *pFnt );
}
// #i107143#
- // pass placeholder property to created <SwFldPortion> instance.
- SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt, bPlaceHolder );
+ // pass placeholder property to created <SwFieldPortion> instance.
+ SwFieldPortion* pClone = new SwFieldPortion( rExpand, pNewFnt, bPlaceHolder );
pClone->SetNextOffset( nNextOffset );
pClone->m_bNoLength = this->m_bNoLength;
return pClone;
}
-void SwFldPortion::TakeNextOffset( const SwFldPortion* pFld )
+void SwFieldPortion::TakeNextOffset( const SwFieldPortion* pField )
{
- OSL_ENSURE( pFld, "TakeNextOffset: Missing Source" );
- nNextOffset = pFld->GetNextOffset();
+ OSL_ENSURE( pField, "TakeNextOffset: Missing Source" );
+ nNextOffset = pField->GetNextOffset();
aExpand = aExpand.replaceAt( 0, nNextOffset, "" );
bFollow = true;
}
-SwFldPortion::SwFldPortion( const OUString &rExpand, SwFont *pFont, bool bPlaceHold )
+SwFieldPortion::SwFieldPortion( const OUString &rExpand, SwFont *pFont, bool bPlaceHold )
: aExpand(rExpand), pFnt(pFont), nNextOffset(0), nNextScriptChg(COMPLETE_STRING), nViewWidth(0)
, bFollow( false ), bLeft( false), bHide( false)
, bCenter (false), bHasFollow( false )
, bAnimated( false), bNoPaint( false)
, bReplace( false), bPlaceHolder( bPlaceHold )
, m_bNoLength( false )
- , m_nAttrFldType(0)
+ , m_nAttrFieldType(0)
{
SetWhichPor( POR_FLD );
}
-SwFldPortion::SwFldPortion( const SwFldPortion& rFld )
- : SwExpandPortion( rFld )
- , aExpand( rFld.GetExp() )
- , nNextOffset( rFld.GetNextOffset() )
- , nNextScriptChg( rFld.GetNextScriptChg() )
- , nViewWidth( rFld.nViewWidth )
- , bFollow( rFld.IsFollow() )
- , bLeft( rFld.IsLeft() )
- , bHide( rFld.IsHide() )
- , bCenter( rFld.IsCenter() )
- , bHasFollow( rFld.HasFollow() )
- , bAnimated ( rFld.bAnimated )
- , bNoPaint( rFld.bNoPaint)
- , bReplace( rFld.bReplace )
- , bPlaceHolder( rFld.bPlaceHolder )
- , m_bNoLength( rFld.m_bNoLength )
- , m_nAttrFldType( rFld.m_nAttrFldType)
+SwFieldPortion::SwFieldPortion( const SwFieldPortion& rField )
+ : SwExpandPortion( rField )
+ , aExpand( rField.GetExp() )
+ , nNextOffset( rField.GetNextOffset() )
+ , nNextScriptChg( rField.GetNextScriptChg() )
+ , nViewWidth( rField.nViewWidth )
+ , bFollow( rField.IsFollow() )
+ , bLeft( rField.IsLeft() )
+ , bHide( rField.IsHide() )
+ , bCenter( rField.IsCenter() )
+ , bHasFollow( rField.HasFollow() )
+ , bAnimated ( rField.bAnimated )
+ , bNoPaint( rField.bNoPaint)
+ , bReplace( rField.bReplace )
+ , bPlaceHolder( rField.bPlaceHolder )
+ , m_bNoLength( rField.m_bNoLength )
+ , m_nAttrFieldType( rField.m_nAttrFieldType)
{
- if ( rFld.HasFont() )
- pFnt = new SwFont( *rFld.GetFont() );
+ if ( rField.HasFont() )
+ pFnt = new SwFont( *rField.GetFont() );
else
pFnt = 0;
SetWhichPor( POR_FLD );
}
-SwFldPortion::~SwFldPortion()
+SwFieldPortion::~SwFieldPortion()
{
delete pFnt;
if( pBlink )
pBlink->Delete( this );
}
-sal_uInt16 SwFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwFieldPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
{
// even though this is const, nViewWidth should be computed at the very end:
- SwFldPortion* pThis = const_cast<SwFldPortion*>(this);
+ SwFieldPortion* pThis = const_cast<SwFieldPortion*>(this);
if( !Width() && rInf.OnWin() && !rInf.GetOpt().IsPagePreview() &&
!rInf.GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() )
{
if( !nViewWidth )
- pThis->nViewWidth = rInf.GetTxtSize(OUString(' ')).Width();
+ pThis->nViewWidth = rInf.GetTextSize(OUString(' ')).Width();
}
else
pThis->nViewWidth = 0;
@@ -134,37 +134,37 @@ sal_uInt16 SwFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
/**
* Never just use SetLen(0)
*/
-class SwFldSlot
+class SwFieldSlot
{
std::shared_ptr<vcl::TextLayoutCache> m_pOldCachedVclData;
- const OUString *pOldTxt;
- OUString aTxt;
+ const OUString *pOldText;
+ OUString aText;
sal_Int32 nIdx;
sal_Int32 nLen;
- SwTxtFormatInfo *pInf;
+ SwTextFormatInfo *pInf;
bool bOn;
public:
- SwFldSlot( const SwTxtFormatInfo* pNew, const SwFldPortion *pPor );
- ~SwFldSlot();
+ SwFieldSlot( const SwTextFormatInfo* pNew, const SwFieldPortion *pPor );
+ ~SwFieldSlot();
};
-SwFldSlot::SwFldSlot( const SwTxtFormatInfo* pNew, const SwFldPortion *pPor )
- : pOldTxt(NULL)
+SwFieldSlot::SwFieldSlot( const SwTextFormatInfo* pNew, const SwFieldPortion *pPor )
+ : pOldText(NULL)
, nIdx(0)
, nLen(0)
, pInf(NULL)
{
- bOn = pPor->GetExpTxt( *pNew, aTxt );
+ bOn = pPor->GetExpText( *pNew, aText );
// The text will be replaced ...
if( bOn )
{
- pInf = const_cast<SwTxtFormatInfo*>(pNew);
+ pInf = const_cast<SwTextFormatInfo*>(pNew);
nIdx = pInf->GetIdx();
nLen = pInf->GetLen();
- pOldTxt = &(pInf->GetTxt());
+ pOldText = &(pInf->GetText());
m_pOldCachedVclData = pInf->GetCachedVclData();
- pInf->SetLen( aTxt.getLength() );
+ pInf->SetLen( aText.getLength() );
pInf->SetCachedVclData(nullptr);
if( pPor->IsFollow() )
{
@@ -173,45 +173,45 @@ SwFldSlot::SwFldSlot( const SwTxtFormatInfo* pNew, const SwFldPortion *pPor )
}
else
{
- aTxt = (*pOldTxt).replaceAt(nIdx, 1, aTxt);
+ aText = (*pOldText).replaceAt(nIdx, 1, aText);
}
- pInf->SetTxt( aTxt );
+ pInf->SetText( aText );
}
}
-SwFldSlot::~SwFldSlot()
+SwFieldSlot::~SwFieldSlot()
{
if( bOn )
{
pInf->SetCachedVclData(m_pOldCachedVclData);
- pInf->SetTxt( *pOldTxt );
+ pInf->SetText( *pOldText );
pInf->SetIdx( nIdx );
pInf->SetLen( nLen );
pInf->SetFakeLineStart( false );
}
}
-void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
+void SwFieldPortion::CheckScript( const SwTextSizeInfo &rInf )
{
- OUString aTxt;
- if( GetExpTxt( rInf, aTxt ) && !aTxt.isEmpty() && g_pBreakIt->GetBreakIter().is() )
+ OUString aText;
+ if( GetExpText( rInf, aText ) && !aText.isEmpty() && g_pBreakIt->GetBreakIter().is() )
{
sal_uInt8 nActual = pFnt ? pFnt->GetActual() : rInf.GetFont()->GetActual();
- sal_uInt16 nScript = g_pBreakIt->GetBreakIter()->getScriptType( aTxt, 0 );
+ sal_uInt16 nScript = g_pBreakIt->GetBreakIter()->getScriptType( aText, 0 );
sal_Int32 nChg = 0;
if( i18n::ScriptType::WEAK == nScript )
{
- nChg = g_pBreakIt->GetBreakIter()->endOfScript(aTxt,0,nScript);
- if (nChg < aTxt.getLength() && nChg >= 0)
- nScript = g_pBreakIt->GetBreakIter()->getScriptType( aTxt, nChg );
+ nChg = g_pBreakIt->GetBreakIter()->endOfScript(aText,0,nScript);
+ if (nChg < aText.getLength() && nChg >= 0)
+ nScript = g_pBreakIt->GetBreakIter()->getScriptType( aText, nChg );
}
- // nNextScriptChg will be evaluated during SwFldPortion::Format()
+ // nNextScriptChg will be evaluated during SwFieldPortion::Format()
- if (nChg < aTxt.getLength() && nChg >= 0)
- nNextScriptChg = g_pBreakIt->GetBreakIter()->endOfScript( aTxt, nChg, nScript );
+ if (nChg < aText.getLength() && nChg >= 0)
+ nNextScriptChg = g_pBreakIt->GetBreakIter()->endOfScript( aText, nChg, nScript );
else
- nNextScriptChg = aTxt.getLength();
+ nNextScriptChg = aText.getLength();
sal_uInt8 nTmp;
switch ( nScript ) {
@@ -224,16 +224,16 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
// #i16354# Change script type for RTL text to CTL.
const SwScriptInfo& rSI = rInf.GetParaPortion()->GetScriptInfo();
// #i98418#
- const sal_uInt8 nFldDir = ( IsNumberPortion() || IsFtnNumPortion() ) ?
+ const sal_uInt8 nFieldDir = ( IsNumberPortion() || IsFootnoteNumPortion() ) ?
rSI.GetDefaultDir() :
rSI.DirType( IsFollow() ? rInf.GetIdx() - 1 : rInf.GetIdx() );
- bool bPerformUBA = UBIDI_LTR != nFldDir || i18n::ScriptType::COMPLEX == nScript;
+ bool bPerformUBA = UBIDI_LTR != nFieldDir || i18n::ScriptType::COMPLEX == nScript;
if (bPerformUBA)
{
UErrorCode nError = U_ZERO_ERROR;
- UBiDi* pBidi = ubidi_openSized( aTxt.getLength(), 0, &nError );
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aTxt.getStr()), aTxt.getLength(), nFldDir, NULL, &nError );
+ UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError );
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nFieldDir, NULL, &nError );
int32_t nEnd;
UBiDiLevel nCurrDir;
ubidi_getLogicalRun( pBidi, 0, &nEnd, &nCurrDir );
@@ -248,7 +248,7 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
nCurrDir = UBIDI_RTL;
for( sal_Int32 nCharIdx = 0; nCharIdx < nEnd; ++nCharIdx )
{
- UCharDirection nCharDir = u_charDirection ( aTxt[ nCharIdx ]);
+ UCharDirection nCharDir = u_charDirection ( aText[ nCharIdx ]);
if ( nCharDir == U_LEFT_TO_RIGHT ||
nCharDir == U_LEFT_TO_RIGHT_EMBEDDING ||
nCharDir == U_LEFT_TO_RIGHT_OVERRIDE )
@@ -274,9 +274,9 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
// keep determined script type for footnote portions as preferred script type.
// For footnote portions a font can not be created directly - see footnote
// portion format method.
- if ( IsFtnPortion() )
+ if ( IsFootnotePortion() )
{
- static_cast<SwFtnPortion*>(this)->SetPreferredScriptType( nTmp );
+ static_cast<SwFootnotePortion*>(this)->SetPreferredScriptType( nTmp );
}
else if ( nTmp != nActual )
{
@@ -287,15 +287,15 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
}
}
-bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
+bool SwFieldPortion::Format( SwTextFormatInfo &rInf )
{
- // Scope wegen aDiffTxt::DTOR!
+ // Scope wegen aDiffText::DTOR!
sal_Int32 nRest;
bool bFull = false;
bool bEOL = false;
- const sal_Int32 nTxtRest = rInf.GetTxt().getLength() - rInf.GetIdx();
+ const sal_Int32 nTextRest = rInf.GetText().getLength() - rInf.GetIdx();
{
- SwFldSlot aDiffTxt( &rInf, this );
+ SwFieldSlot aDiffText( &rInf, this );
SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
aLayoutModeModifier.SetAuto();
@@ -327,7 +327,7 @@ bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
const sal_Int32 nFollow = IsFollow() ? 0 : 1;
// As odd is may seem: the query for GetLen() must return false due
- // to the ExpandPortions _after_ aDiffTxt (see SoftHyphs), caused
+ // to the ExpandPortions _after_ aDiffText (see SoftHyphs), caused
// by SetFull.
if( !nFullLen )
{
@@ -340,16 +340,16 @@ bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
sal_Int32 nOldLineStart = rInf.GetLineStart();
if( IsFollow() )
rInf.SetLineStart( 0 );
- rInf.SetNotEOL( nFullLen == nOldFullLen && nTxtRest > nFollow );
+ rInf.SetNotEOL( nFullLen == nOldFullLen && nTextRest > nFollow );
// the height depending on the fields font is set,
- // this is required for SwTxtGuess::Guess
- Height( rInf.GetTxtHeight() + rInf.GetFont()->GetTopBorderSpace() +
+ // this is required for SwTextGuess::Guess
+ Height( rInf.GetTextHeight() + rInf.GetFont()->GetTopBorderSpace() +
rInf.GetFont()->GetBottomBorderSpace() );
// If a kerning portion is inserted after our field portion,
// the ascent and height must be known
SetAscent( rInf.GetAscent() + rInf.GetFont()->GetTopBorderSpace() );
- bFull = SwTxtPortion::Format( rInf );
+ bFull = SwTextPortion::Format( rInf );
rInf.SetNotEOL( false );
rInf.SetLineStart( nOldLineStart );
}
@@ -368,7 +368,7 @@ bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
sal_Int32 nNextOfst = aExpand.getLength() - nRest;
if ( IsQuoVadisPortion() )
- nNextOfst = nNextOfst + static_cast<SwQuoVadisPortion*>(this)->GetContTxt().getLength();
+ nNextOfst = nNextOfst + static_cast<SwQuoVadisPortion*>(this)->GetContText().getLength();
OUString aNew( aExpand.copy( nNextOfst ) );
aExpand = aExpand.copy( 0, nNextOfst );
@@ -399,13 +399,13 @@ bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
// Even if there is no more text left for a follow field,
// we have to build a follow field portion (without font),
// otherwise the HookChar mechanism would not work.
- SwFldPortion *pFld = Clone( aNew );
- if( !aNew.isEmpty() && !pFld->GetFont() )
+ SwFieldPortion *pField = Clone( aNew );
+ if( !aNew.isEmpty() && !pField->GetFont() )
{
SwFont *pNewFnt = new SwFont( *rInf.GetFont() );
- pFld->SetFont( pNewFnt );
+ pField->SetFont( pNewFnt );
}
- pFld->SetFollow( true );
+ pField->SetFollow( true );
SetHasFollow( true );
// For a newly created field, nNextOffset contains the Offset
@@ -413,8 +413,8 @@ bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
// If a FollowField is created when formatting, this FollowField's
// Offset is being held in nNextOffset
nNextOffset = nNextOffset + nNextOfst;
- pFld->SetNextOffset( nNextOffset );
- rInf.SetRest( pFld );
+ pField->SetNextOffset( nNextOffset );
+ rInf.SetRest( pField );
}
}
@@ -423,11 +423,11 @@ bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-void SwFldPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwFieldPortion::Paint( const SwTextPaintInfo &rInf ) const
{
SwFontSave aSave( rInf, pFnt );
- OSL_ENSURE( GetLen() <= 1, "SwFldPortion::Paint: rest-portion pollution?" );
+ OSL_ENSURE( GetLen() <= 1, "SwFieldPortion::Paint: rest-portion pollution?" );
if( Width() && ( !bPlaceHolder || rInf.GetOpt().IsShowPlaceHolderFields() ) )
{
// A very liberal use of the background
@@ -436,18 +436,18 @@ void SwFldPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-bool SwFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
+bool SwFieldPortion::GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const
{
- rTxt = aExpand;
- if( rTxt.isEmpty() && rInf.OnWin() &&
+ rText = aExpand;
+ if( rText.isEmpty() && rInf.OnWin() &&
!rInf.GetOpt().IsPagePreview() && !rInf.GetOpt().IsReadonly() &&
SwViewOption::IsFieldShadings() &&
!HasFollow() )
- rTxt = " ";
+ rText = " ";
return true;
}
-void SwFldPortion::HandlePortion( SwPortionHandler& rPH ) const
+void SwFieldPortion::HandlePortion( SwPortionHandler& rPH ) const
{
sal_Int32 nH = 0;
sal_Int32 nW = 0;
@@ -459,18 +459,18 @@ void SwFldPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Special( GetLen(), aExpand, GetWhichPor(), nH, nW, pFnt );
if( GetWhichPor() == POR_FLD )
{
- rPH.SetAttrFieldType(m_nAttrFldType);
+ rPH.SetAttrFieldType(m_nAttrFieldType);
}
}
-SwPosSize SwFldPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+SwPosSize SwFieldPortion::GetTextSize( const SwTextSizeInfo &rInf ) const
{
SwFontSave aSave( rInf, pFnt );
- SwPosSize aSize( SwExpandPortion::GetTxtSize( rInf ) );
+ SwPosSize aSize( SwExpandPortion::GetTextSize( rInf ) );
return aSize;
}
-SwFldPortion *SwHiddenPortion::Clone(const OUString &rExpand ) const
+SwFieldPortion *SwHiddenPortion::Clone(const OUString &rExpand ) const
{
SwFont *pNewFnt;
if( 0 != ( pNewFnt = pFnt ) )
@@ -478,7 +478,7 @@ SwFldPortion *SwHiddenPortion::Clone(const OUString &rExpand ) const
return new SwHiddenPortion( rExpand, pNewFnt );
}
-void SwHiddenPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwHiddenPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( Width() )
{
@@ -488,10 +488,10 @@ void SwHiddenPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-bool SwHiddenPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
+bool SwHiddenPortion::GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const
{
// Do not query for IsHidden()!
- return SwFldPortion::GetExpTxt( rInf, rTxt );
+ return SwFieldPortion::GetExpText( rInf, rText );
}
SwNumberPortion::SwNumberPortion( const OUString &rExpand,
@@ -500,7 +500,7 @@ SwNumberPortion::SwNumberPortion( const OUString &rExpand,
const bool bCntr,
const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive )
- : SwFldPortion( rExpand, pFont ),
+ : SwFieldPortion( rExpand, pFont ),
nFixWidth(0),
nMinDist( nMinDst ),
mbLabelAlignmentPosAndSpaceModeActive( bLabelAlignmentPosAndSpaceModeActive )
@@ -516,7 +516,7 @@ sal_Int32 SwNumberPortion::GetCrsrOfst( const sal_uInt16 ) const
return 0;
}
-SwFldPortion *SwNumberPortion::Clone( const OUString &rExpand ) const
+SwFieldPortion *SwNumberPortion::Clone( const OUString &rExpand ) const
{
SwFont *pNewFnt;
if( 0 != ( pNewFnt = pFnt ) )
@@ -532,10 +532,10 @@ SwFldPortion *SwNumberPortion::Clone( const OUString &rExpand ) const
* to cause the line to overflow
* We need to keep the Fly's evasion tactics in mind
*/
-bool SwNumberPortion::Format( SwTxtFormatInfo &rInf )
+bool SwNumberPortion::Format( SwTextFormatInfo &rInf )
{
SetHide( false );
- const bool bFull = SwFldPortion::Format( rInf );
+ const bool bFull = SwFieldPortion::Format( rInf );
SetLen( 0 );
// a numbering portion can be contained in a rotated portion!!!
nFixWidth = rInf.IsMulti() ? Height() : Width();
@@ -549,13 +549,13 @@ bool SwNumberPortion::Format( SwTxtFormatInfo &rInf )
if ( !mbLabelAlignmentPosAndSpaceModeActive )
{
- if ( !rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) &&
+ if ( !rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) &&
// #i32902#
- !IsFtnNumPortion() )
+ !IsFootnoteNumPortion() )
{
nDiff = rInf.Left()
- + rInf.GetTxtFrm()->GetTxtNode()->
- GetSwAttrSet().GetLRSpace().GetTxtFirstLineOfst()
+ + rInf.GetTextFrm()->GetTextNode()->
+ GetSwAttrSet().GetLRSpace().GetTextFirstLineOfst()
- rInf.First()
+ rInf.ForcedLeftMargin();
}
@@ -608,7 +608,7 @@ bool SwNumberPortion::Format( SwTxtFormatInfo &rInf )
* the line anymore. In order for the Numbering to follow through,
* we hide this NumberPortion
*/
-void SwNumberPortion::FormatEOL( SwTxtFormatInfo& )
+void SwNumberPortion::FormatEOL( SwTextFormatInfo& )
{
// This caused trouble with flys anchored as characters.
@@ -623,12 +623,12 @@ void SwNumberPortion::FormatEOL( SwTxtFormatInfo& )
* A hidden NumberPortion is not displayed, unless there are TextPortions in
* this line or there's just one line at all
*/
-void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if ( IsHide() && rInf.GetParaPortion() && rInf.GetParaPortion()->GetNext() )
{
SwLinePortion *pTmp = GetPortion();
- while ( pTmp && !pTmp->InTxtGrp() )
+ while ( pTmp && !pTmp->InTextGrp() )
pTmp = pTmp->GetPortion();
if ( !pTmp )
return;
@@ -687,12 +687,12 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
sal_uInt16 nSpaceOffs = nFixWidth;
pThis->Width( nFixWidth );
- if( ( IsLeft() && ! rInf.GetTxtFrm()->IsRightToLeft() ) ||
- ( ! IsLeft() && ! IsCenter() && rInf.GetTxtFrm()->IsRightToLeft() ) )
+ if( ( IsLeft() && ! rInf.GetTextFrm()->IsRightToLeft() ) ||
+ ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrm()->IsRightToLeft() ) )
SwExpandPortion::Paint( rInf );
else
{
- SwTxtPaintInfo aInf( rInf );
+ SwTextPaintInfo aInf( rInf );
if( nOffset < nMinDist )
nOffset = 0;
else
@@ -715,7 +715,7 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
if( bPaintSpace && nOldWidth > nSpaceOffs )
{
- SwTxtPaintInfo aInf( rInf );
+ SwTextPaintInfo aInf( rInf );
aInf.X( aInf.X() + nSpaceOffs );
// #i53199# Adjust position of underline:
@@ -727,7 +727,7 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
pThis->Width( nOldWidth - nSpaceOffs + 12 );
{
- SwTxtSlot aDiffTxt( &aInf, this, true, false, " " );
+ SwTextSlot aDiffText( &aInf, this, true, false, " " );
aInf.DrawText( *this, aInf.GetLen(), true );
}
}
@@ -756,7 +756,7 @@ SwGrfNumPortion::SwGrfNumPortion(
SwFrm*,
const OUString& rGraphicFollowedBy,
const SvxBrushItem* pGrfBrush,
- const SwFmtVertOrient* pGrfOrient, const Size& rGrfSize,
+ const SwFormatVertOrient* pGrfOrient, const Size& rGrfSize,
const bool bLft, const bool bCntr, const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive ) :
SwNumberPortion( rGraphicFollowedBy, NULL, bLft, bCntr, nMinDst,
@@ -813,14 +813,14 @@ void SwGrfNumPortion::StopAnimation( OutputDevice* pOut )
}
}
-bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
+bool SwGrfNumPortion::Format( SwTextFormatInfo &rInf )
{
SetHide( false );
// Width( nFixWidth );
sal_uInt16 nFollowedByWidth( 0 );
if ( mbLabelAlignmentPosAndSpaceModeActive )
{
- SwFldPortion::Format( rInf );
+ SwFieldPortion::Format( rInf );
nFollowedByWidth = Width();
SetLen( 0 );
}
@@ -878,14 +878,14 @@ bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
* A hidden NumberPortion is not displayed, unless there are TextPortions in
* this line or there's only one line at all
*/
-void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( DontPaint() )
return;
if ( IsHide() && rInf.GetParaPortion() && rInf.GetParaPortion()->GetNext() )
{
SwLinePortion *pTmp = GetPortion();
- while ( pTmp && !pTmp->InTxtGrp() )
+ while ( pTmp && !pTmp->InTextGrp() )
pTmp = pTmp->GetPortion();
if ( !pTmp )
return;
@@ -895,8 +895,8 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
Size aSize( nTmpWidth, GetGrfHeight() - 2 * GRFNUM_SECURE );
const bool bTmpLeft = mbLabelAlignmentPosAndSpaceModeActive ||
- ( IsLeft() && ! rInf.GetTxtFrm()->IsRightToLeft() ) ||
- ( ! IsLeft() && ! IsCenter() && rInf.GetTxtFrm()->IsRightToLeft() );
+ ( IsLeft() && ! rInf.GetTextFrm()->IsRightToLeft() ) ||
+ ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrm()->IsRightToLeft() );
if( nFixWidth < Width() && !bTmpLeft )
{
@@ -932,8 +932,8 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
bDraw = !rInf.GetOpt().IsGraphic();
if( !nId )
{
- SetId( sal_IntPtr( rInf.GetTxtFrm() ) );
- rInf.GetTxtFrm()->SetAnimation();
+ SetId( sal_IntPtr( rInf.GetTextFrm() ) );
+ rInf.GetTextFrm()->SetAnimation();
}
if( aTmp.IsOver( rInf.GetPaintRect() ) && !bDraw )
{
@@ -947,7 +947,7 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic());
if (pGraph)
pGraph->StopAnimation(0,nId);
- rInf.GetTxtFrm()->getRootFrm()->GetCurrShell()->InvalidateWindows( aTmp );
+ rInf.GetTextFrm()->getRootFrm()->GetCurrShell()->InvalidateWindows( aTmp );
}
else if ( pViewShell &&
@@ -978,7 +978,7 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
SwRect aRepaint( rInf.GetPaintRect() );
- const SwTxtFrm& rFrm = *rInf.GetTxtFrm();
+ const SwTextFrm& rFrm = *rInf.GetTextFrm();
if( rFrm.IsVertical() )
{
rFrm.SwitchHorizontalToVertical( aTmp );
@@ -1034,9 +1034,9 @@ void SwGrfNumPortion::SetBase( long nLnAscent, long nLnDescent,
}
}
-void SwTxtFrm::StopAnimation( OutputDevice* pOut )
+void SwTextFrm::StopAnimation( OutputDevice* pOut )
{
- OSL_ENSURE( HasAnimation(), "SwTxtFrm::StopAnimation: Which Animation?" );
+ OSL_ENSURE( HasAnimation(), "SwTextFrm::StopAnimation: Which Animation?" );
if( HasPara() )
{
SwLineLayout *pLine = GetPara();
@@ -1060,8 +1060,8 @@ void SwTxtFrm::StopAnimation( OutputDevice* pOut )
/**
* Initializes the script array and clears the width array
*/
-SwCombinedPortion::SwCombinedPortion( const OUString &rTxt )
- : SwFldPortion( rTxt )
+SwCombinedPortion::SwCombinedPortion( const OUString &rText )
+ : SwFieldPortion( rText )
, nUpPos(0)
, nLowPos(0)
, nProportion(55)
@@ -1076,9 +1076,9 @@ SwCombinedPortion::SwCombinedPortion( const OUString &rTxt )
if( g_pBreakIt->GetBreakIter().is() )
{
sal_uInt8 nScr = SW_SCRIPTS;
- for( sal_Int32 i = 0; i < rTxt.getLength(); ++i )
+ for( sal_Int32 i = 0; i < rText.getLength(); ++i )
{
- switch ( g_pBreakIt->GetBreakIter()->getScriptType( rTxt, i ) ) {
+ switch ( g_pBreakIt->GetBreakIter()->getScriptType( rText, i ) ) {
case i18n::ScriptType::LATIN : nScr = SW_LATIN; break;
case i18n::ScriptType::ASIAN : nScr = SW_CJK; break;
case i18n::ScriptType::COMPLEX : nScr = SW_CTL; break;
@@ -1094,9 +1094,9 @@ SwCombinedPortion::SwCombinedPortion( const OUString &rTxt )
memset( &aWidth, 0, sizeof(aWidth) );
}
-void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwCombinedPortion::Paint( const SwTextPaintInfo &rInf ) const
{
- OSL_ENSURE( GetLen() <= 1, "SwFldPortion::Paint: rest-portion pollution?" );
+ OSL_ENSURE( GetLen() <= 1, "SwFieldPortion::Paint: rest-portion pollution?" );
if( Width() )
{
rInf.DrawBackBrush( *this );
@@ -1139,15 +1139,15 @@ void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
aTmpFont.SetSize( aTmpSz, nAct );
}
}
- const_cast<SwTxtPaintInfo&>(rInf).SetPos( aOutPos );
+ const_cast<SwTextPaintInfo&>(rInf).SetPos( aOutPos );
rInf.DrawText( aExpand, *this, i, 1 );
}
// rInf is const, so we have to take back our manipulations
- const_cast<SwTxtPaintInfo&>(rInf).SetPos( aOldPos );
+ const_cast<SwTextPaintInfo&>(rInf).SetPos( aOldPos );
}
}
-bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
+bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
{
const sal_Int32 nCount = aExpand.getLength();
if( !nCount )
@@ -1178,7 +1178,7 @@ bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
}
const sal_Int32 nTop = ( nCount + 1 ) / 2; // the first character of the second line
- SwViewShell *pSh = rInf.GetTxtFrm()->getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = rInf.GetTextFrm()->getRootFrm()->GetCurrShell();
SwFont aTmpFont( *rInf.GetFont() );
SwFontSave aFontSave( rInf, &aTmpFont );
nProportion = 55;
@@ -1217,7 +1217,7 @@ bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
}
SwDrawTextInfo aDrawInf( pSh, *rInf.GetOut(), 0, aExpand, i, 1 );
- Size aSize = aTmpFont._GetTxtSize( aDrawInf );
+ Size aSize = aTmpFont._GetTextSize( aDrawInf );
const sal_uInt16 nAsc = aTmpFont.GetAscent( pSh, *rInf.GetOut() );
aPos[ i ] = (sal_uInt16)aSize.Width();
if( i == nTop ) // enter the second line
@@ -1291,8 +1291,8 @@ bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
const bool bFull = rInf.Width() < rInf.X() + Width();
if( bFull )
{
- if( rInf.GetLineStart() == rInf.GetIdx() && (!rInf.GetLast()->InFldGrp()
- || !static_cast<SwFldPortion*>(rInf.GetLast())->IsFollow() ) )
+ if( rInf.GetLineStart() == rInf.GetIdx() && (!rInf.GetLast()->InFieldGrp()
+ || !static_cast<SwFieldPortion*>(rInf.GetLast())->IsFollow() ) )
Width( (sal_uInt16)( rInf.Width() - rInf.X() ) );
else
{
@@ -1306,14 +1306,14 @@ bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-sal_uInt16 SwCombinedPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwCombinedPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
{
if( !GetLen() ) // for the dummy part at the end of the line, where
return 0; // the combined portion doesn't fit.
- return SwFldPortion::GetViewWidth( rInf );
+ return SwFieldPortion::GetViewWidth( rInf );
}
-SwFldPortion *SwFieldFormDropDownPortion::Clone(const OUString &rExpand) const
+SwFieldPortion *SwFieldFormDropDownPortion::Clone(const OUString &rExpand) const
{
return new SwFieldFormDropDownPortion(rExpand);
}
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 19e59364c2fa..fe96aa42cfbe 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -25,12 +25,12 @@
class SwFont;
class SvxBrushItem;
-class SwFmtVertOrient;
+class SwFormatVertOrient;
class SwFrm;
-class SwFldPortion : public SwExpandPortion
+class SwFieldPortion : public SwExpandPortion
{
- friend class SwTxtFormatter;
+ friend class SwTextFormatter;
protected:
OUString aExpand; // The expanded field
SwFont *pFnt; // For multi-line fields
@@ -53,26 +53,26 @@ protected:
inline void SetNoLength() { m_bNoLength = true; }
public:
- SwFldPortion( const SwFldPortion& rFld );
- SwFldPortion( const OUString &rExpand, SwFont *pFnt = 0, bool bPlaceHolder = false );
- virtual ~SwFldPortion();
+ SwFieldPortion( const SwFieldPortion& rField );
+ SwFieldPortion( const OUString &rExpand, SwFont *pFnt = 0, bool bPlaceHolder = false );
+ virtual ~SwFieldPortion();
- sal_uInt16 m_nAttrFldType;
- void TakeNextOffset( const SwFldPortion* pFld );
- void CheckScript( const SwTxtSizeInfo &rInf );
+ sal_uInt16 m_nAttrFieldType;
+ void TakeNextOffset( const SwFieldPortion* pField );
+ void CheckScript( const SwTextSizeInfo &rInf );
inline bool HasFont() const { return 0 != pFnt; }
// #i89179# - made public
inline const SwFont *GetFont() const { return pFnt; }
inline OUString GetExp() const { return aExpand; }
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
// Empty fields are also allowed
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
inline bool IsFollow() const { return bFollow; }
inline void SetFollow( bool bNew ) { bFollow = bNew; }
@@ -96,10 +96,10 @@ public:
inline void SetNextScriptChg( sal_Int32 nNew ) { nNextScriptChg = nNew; }
// Field cloner for SplitGlue
- virtual SwFldPortion *Clone( const OUString &rExpand ) const;
+ virtual SwFieldPortion *Clone( const OUString &rExpand ) const;
- // Extra GetTxtSize because of pFnt
- virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
+ // Extra GetTextSize because of pFnt
+ virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
@@ -110,21 +110,21 @@ public:
/**
* Distinguish only for painting/hide
*/
-class SwHiddenPortion : public SwFldPortion
+class SwHiddenPortion : public SwFieldPortion
{
public:
inline SwHiddenPortion( const OUString &rExpand, SwFont *pFntL = 0 )
- : SwFldPortion( rExpand, pFntL )
+ : SwFieldPortion( rExpand, pFntL )
{ SetLen(1); SetWhichPor( POR_HIDDEN ); }
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
// Field cloner for SplitGlue
- virtual SwFldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
+ virtual SwFieldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
-class SwNumberPortion : public SwFldPortion
+class SwNumberPortion : public SwFieldPortion
{
protected:
sal_uInt16 nFixWidth; // See Glues
@@ -138,13 +138,13 @@ public:
const bool bCenter,
const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
// Field cloner for SplitGlue
- virtual SwFldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
- virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual SwFieldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
+ virtual void FormatEOL( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
@@ -173,15 +173,15 @@ public:
SwGrfNumPortion( SwFrm *pFrm,
const OUString& rGraphicFollowedBy,
const SvxBrushItem* pGrfBrush,
- const SwFmtVertOrient* pGrfOrient,
+ const SwFormatVertOrient* pGrfOrient,
const Size& rGrfSize,
const bool bLeft,
const bool bCenter,
const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
virtual ~SwGrfNumPortion();
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
void SetBase( long nLnAscent, long nLnDescent,
long nFlyAscent, long nFlyDescent );
@@ -211,7 +211,7 @@ public:
* ... ..B .C. C.D .D.E. D.E.F
* </pre>
*/
-class SwCombinedPortion : public SwFldPortion
+class SwCombinedPortion : public SwFieldPortion
{
sal_uInt16 aPos[6]; // up to six X positions
sal_uInt16 aWidth[3]; // one width for every scripttype
@@ -221,9 +221,9 @@ class SwCombinedPortion : public SwFldPortion
sal_uInt8 nProportion; // relative font height
public:
SwCombinedPortion( const OUString &rExpand );
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
@@ -231,15 +231,15 @@ namespace sw { namespace mark {
class IFieldmark;
} }
-class SwFieldFormDropDownPortion : public SwFldPortion
+class SwFieldFormDropDownPortion : public SwFieldPortion
{
public:
SwFieldFormDropDownPortion(const OUString &rExpand)
- : SwFldPortion(rExpand)
+ : SwFieldPortion(rExpand)
{
}
// Field cloner for SplitGlue
- virtual SwFldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
+ virtual SwFieldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 312e3cc4db9f..ac84ea739bce 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -46,11 +46,11 @@
* class SwFlyPortion => we expect a frame-locale SwRect!
*/
-void SwFlyPortion::Paint( const SwTxtPaintInfo& ) const
+void SwFlyPortion::Paint( const SwTextPaintInfo& ) const
{
}
-bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
+bool SwFlyPortion::Format( SwTextFormatInfo &rInf )
{
OSL_ENSURE( Fix() >= rInf.X(), "SwFlyPortion::Format" );
@@ -72,13 +72,13 @@ bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
rInf.GetParaPortion()->SetFly( true );
// trailing blank:
- if( rInf.GetIdx() < rInf.GetTxt().getLength() && 1 < rInf.GetIdx()
+ if( rInf.GetIdx() < rInf.GetText().getLength() && 1 < rInf.GetIdx()
&& !rInf.GetRest()
&& ' ' == rInf.GetChar( rInf.GetIdx() )
&& ' ' != rInf.GetChar( rInf.GetIdx() - 1 )
&& ( !rInf.GetLast() || !rInf.GetLast()->IsBreakPortion() ) )
{
- SetBlankWidth( rInf.GetTxtSize(OUString(' ')).Width() );
+ SetBlankWidth( rInf.GetTextSize(OUString(' ')).Width() );
SetLen( 1 );
}
@@ -96,7 +96,7 @@ bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
return false;
}
-bool SwFlyCntPortion::Format( SwTxtFormatInfo &rInf )
+bool SwFlyCntPortion::Format( SwTextFormatInfo &rInf )
{
bool bFull = rInf.Width() < rInf.X() + PrtWidth();
@@ -147,7 +147,7 @@ bool SwFlyCntPortion::Format( SwTxtFormatInfo &rInf )
* @param nStart
* @param nEnd
*/
-void SwTxtFrm::MoveFlyInCnt( SwTxtFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd )
+void SwTextFrm::MoveFlyInCnt( SwTextFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd )
{
SwSortedObjs *pObjs = 0L;
if ( 0 != (pObjs = GetDrawObjs()) )
@@ -156,10 +156,10 @@ void SwTxtFrm::MoveFlyInCnt( SwTxtFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd )
{
// Consider changed type of <SwSortedList> entries
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
- const SwFmtAnchor& rAnch = pAnchoredObj->GetFrmFmt().GetAnchor();
+ const SwFormatAnchor& rAnch = pAnchoredObj->GetFrameFormat().GetAnchor();
if (rAnch.GetAnchorId() == FLY_AS_CHAR)
{
- const SwPosition* pPos = rAnch.GetCntntAnchor();
+ const SwPosition* pPos = rAnch.GetContentAnchor();
const sal_Int32 nIdx = pPos->nContent.GetIndex();
if ( nIdx >= nStart && nEnd > nIdx )
{
@@ -180,20 +180,20 @@ void SwTxtFrm::MoveFlyInCnt( SwTxtFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd )
}
}
-sal_Int32 SwTxtFrm::CalcFlyPos( SwFrmFmt* pSearch )
+sal_Int32 SwTextFrm::CalcFlyPos( SwFrameFormat* pSearch )
{
- SwpHints* pHints = GetTxtNode()->GetpSwpHints();
+ SwpHints* pHints = GetTextNode()->GetpSwpHints();
OSL_ENSURE( pHints, "CalcFlyPos: Why me?" );
if( !pHints )
return COMPLETE_STRING;
- SwTxtAttr* pFound = NULL;
+ SwTextAttr* pFound = NULL;
for ( size_t i = 0; i < pHints->Count(); ++i )
{
- SwTxtAttr *pHt = pHints->GetTextHint( i );
+ SwTextAttr *pHt = pHints->GetTextHint( i );
if( RES_TXTATR_FLYCNT == pHt->Which() )
{
- SwFrmFmt* pFrmFmt = pHt->GetFlyCnt().GetFrmFmt();
- if( pFrmFmt == pSearch )
+ SwFrameFormat* pFrameFormat = pHt->GetFlyCnt().GetFrameFormat();
+ if( pFrameFormat == pSearch )
pFound = pHt;
}
}
@@ -203,7 +203,7 @@ sal_Int32 SwTxtFrm::CalcFlyPos( SwFrmFmt* pSearch )
return pFound->GetStart();
}
-void SwFlyCntPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwFlyCntPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( bDraw )
{
@@ -220,11 +220,11 @@ void SwFlyCntPortion::Paint( const SwTxtPaintInfo &rInf ) const
// Re-paint everything at a CompletePaint call
SwRect aRepaintRect( rInf.GetPaintRect() );
- if ( rInf.GetTxtFrm()->IsRightToLeft() )
- rInf.GetTxtFrm()->SwitchLTRtoRTL( aRepaintRect );
+ if ( rInf.GetTextFrm()->IsRightToLeft() )
+ rInf.GetTextFrm()->SwitchLTRtoRTL( aRepaintRect );
- if ( rInf.GetTxtFrm()->IsVertical() )
- rInf.GetTxtFrm()->SwitchHorizontalToVertical( aRepaintRect );
+ if ( rInf.GetTextFrm()->IsVertical() )
+ rInf.GetTextFrm()->SwitchHorizontalToVertical( aRepaintRect );
if( (GetFlyFrm()->IsCompletePaint() ||
GetFlyFrm()->Frm().IsOver( aRepaintRect )) &&
@@ -240,17 +240,17 @@ void SwFlyCntPortion::Paint( const SwTxtPaintInfo &rInf ) const
SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
GetFlyFrm()->Paint( aRect );
}
- ((SwTxtPaintInfo&)rInf).GetRefDev()->SetLayoutMode(
+ ((SwTextPaintInfo&)rInf).GetRefDev()->SetLayoutMode(
rInf.GetOut()->GetLayoutMode() );
// As the OutputDevice might be anything, the font must be re-selected.
// Being in const method should not be a problem.
- ((SwTxtPaintInfo&)rInf).SelectFont();
+ ((SwTextPaintInfo&)rInf).SelectFont();
OSL_ENSURE( ! rInf.GetVsh() || rInf.GetVsh()->GetOut() == rInf.GetOut(),
"SwFlyCntPortion::Paint: Outdev has changed" );
if( rInf.GetVsh() )
- ((SwTxtPaintInfo&)rInf).SetOut( rInf.GetVsh()->GetOut() );
+ ((SwTextPaintInfo&)rInf).SetOut( rInf.GetVsh()->GetOut() );
}
}
}
@@ -258,7 +258,7 @@ void SwFlyCntPortion::Paint( const SwTxtPaintInfo &rInf ) const
/**
* Use the dimensions of pFly->OutRect()
*/
-SwFlyCntPortion::SwFlyCntPortion( const SwTxtFrm& rFrm,
+SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm,
SwFlyInCntFrm *pFly, const Point &rBase,
long nLnAscent, long nLnDescent,
long nFlyAsc, long nFlyDesc,
@@ -275,7 +275,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTxtFrm& rFrm,
SetWhichPor( POR_FLYCNT );
}
-SwFlyCntPortion::SwFlyCntPortion( const SwTxtFrm& rFrm,
+SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm,
SwDrawContact *pDrawContact, const Point &rBase,
long nLnAscent, long nLnDescent,
long nFlyAsc, long nFlyDesc,
@@ -308,7 +308,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTxtFrm& rFrm,
*
* @param rBase CAUTION: needs to be an absolute value!
*/
-void SwFlyCntPortion::SetBase( const SwTxtFrm& rFrm, const Point &rBase,
+void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase,
long nLnAscent, long nLnDescent,
long nFlyAsc, long nFlyDesc,
objectpositioning::AsCharFlags nFlags )
@@ -327,7 +327,7 @@ void SwFlyCntPortion::SetBase( const SwTxtFrm& rFrm, const Point &rBase,
}
// Call <SwAnchoredDrawObject::MakeObjPos()> to assure that flag at
- // the <DrawFrmFmt> and at the <SwAnchoredDrawObject> instance are
+ // the <DrawFrameFormat> and at the <SwAnchoredDrawObject> instance are
// correctly set
if ( pSdrObj )
{
@@ -354,31 +354,31 @@ void SwFlyCntPortion::SetBase( const SwTxtFrm& rFrm, const Point &rBase,
aObjPositioning.CalcPosition();
}
- SwFrmFmt* pShape = FindFrmFmt(pSdrObj);
- const SwFmtAnchor& rAnchor(pShape->GetAnchor());
+ SwFrameFormat* pShape = FindFrameFormat(pSdrObj);
+ const SwFormatAnchor& rAnchor(pShape->GetAnchor());
if (rAnchor.GetAnchorId() == FLY_AS_CHAR)
{
// This is an inline draw shape, see if it has a textbox.
- SwFrmFmt* pTextBox = SwTextBoxHelper::findTextBox(pShape);
+ SwFrameFormat* pTextBox = SwTextBoxHelper::findTextBox(pShape);
if (pTextBox)
{
// It has, so look up its text rectangle, and adjust the position
// of the textbox accordingly.
Rectangle aTextRectangle = SwTextBoxHelper::getTextRectangle(pShape);
- SwFmtHoriOrient aHori(pTextBox->GetHoriOrient());
+ SwFormatHoriOrient aHori(pTextBox->GetHoriOrient());
aHori.SetHoriOrient(css::text::HoriOrientation::NONE);
sal_Int32 nLeft = aTextRectangle.getX() - rFrm.Frm().Left();
aHori.SetPos(nLeft);
- SwFmtVertOrient aVert(pTextBox->GetVertOrient());
+ SwFormatVertOrient aVert(pTextBox->GetVertOrient());
aVert.SetVertOrient(css::text::VertOrientation::NONE);
sal_Int32 nTop = aTextRectangle.getY() - rFrm.Frm().Top() - nFlyAsc;
aVert.SetPos(nTop);
pTextBox->LockModify();
- pTextBox->SetFmtAttr(aHori);
- pTextBox->SetFmtAttr(aVert);
+ pTextBox->SetFormatAttr(aHori);
+ pTextBox->SetFormatAttr(aVert);
pTextBox->UnlockModify();
}
}
diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx
index c4db0a6e0e93..ff31005315dd 100644
--- a/sw/source/core/text/porfly.hxx
+++ b/sw/source/core/text/porfly.hxx
@@ -25,7 +25,7 @@
class SwDrawContact;
class SwFlyInCntFrm;
-class SwTxtFrm;
+class SwTextFrm;
struct SwCrsrMoveState;
class SwFlyPortion : public SwFixPortion
@@ -36,8 +36,8 @@ public:
: SwFixPortion(rFlyRect), nBlankWidth( 0 ) { SetWhichPor( POR_FLY ); }
inline sal_uInt16 GetBlankWidth( ) const { return nBlankWidth; }
inline void SetBlankWidth( const sal_uInt16 nNew ) { nBlankWidth = nNew; }
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
@@ -53,12 +53,12 @@ class SwFlyCntPortion : public SwLinePortion
public:
// Use new datatype for parameter <nFlags>
- SwFlyCntPortion( const SwTxtFrm& rFrm, SwFlyInCntFrm *pFly,
+ SwFlyCntPortion( const SwTextFrm& rFrm, SwFlyInCntFrm *pFly,
const Point &rBase,
long nAscent, long nDescent, long nFlyAsc, long nFlyDesc,
objectpositioning::AsCharFlags nFlags );
// Use new datatype for parameter <nFlags>
- SwFlyCntPortion( const SwTxtFrm& rFrm, SwDrawContact *pDrawContact,
+ SwFlyCntPortion( const SwTextFrm& rFrm, SwDrawContact *pDrawContact,
const Point &rBase,
long nAscent, long nDescent, long nFlyAsc, long nFlyDesc,
objectpositioning::AsCharFlags nFlags );
@@ -75,14 +75,14 @@ public:
inline void SetAlign( sal_uInt8 nNew ) { nAlign = nNew; }
inline void SetMax( bool bNew ) { bMax = bNew; }
// Use new datatype for parameter <nFlags>
- void SetBase( const SwTxtFrm& rFrm, const Point &rBase,
+ void SetBase( const SwTextFrm& rFrm, const Point &rBase,
long nLnAscent, long nLnDescent,
long nFlyAscent, long nFlyDescent,
objectpositioning::AsCharFlags nFlags );
sal_Int32 GetFlyCrsrOfst( const sal_uInt16 nOfst, const Point &rPoint,
SwPosition *pPos, SwCrsrMoveState* pCMS ) const;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index 51d5f755008b..2a532022c386 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -21,58 +21,58 @@
#include "porfld.hxx"
-class SwTxtFrm;
-class SwTxtFtn;
+class SwTextFrm;
+class SwTextFootnote;
-class SwFtnPortion : public SwFldPortion
+class SwFootnotePortion : public SwFieldPortion
{
- SwTxtFtn *pFtn;
+ SwTextFootnote *pFootnote;
sal_uInt16 nOrigHeight;
// #i98418#
bool mbPreferredScriptTypeSet;
sal_uInt8 mnPreferredScriptType;
public:
- SwFtnPortion( const OUString &rExpand, SwTxtFtn *pFtn,
+ SwFootnotePortion( const OUString &rExpand, SwTextFootnote *pFootnote,
sal_uInt16 nOrig = USHRT_MAX );
sal_uInt16& Orig() { return nOrigHeight; }
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
- virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
+ virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
// #i98418#
void SetPreferredScriptType( sal_uInt8 nPreferredScriptType );
- const SwTxtFtn* GetTxtFtn() const { return pFtn; };
+ const SwTextFootnote* GetTextFootnote() const { return pFootnote; };
OUTPUT_OPERATOR_OVERRIDE
};
-class SwFtnNumPortion : public SwNumberPortion
+class SwFootnoteNumPortion : public SwNumberPortion
{
public:
- SwFtnNumPortion( const OUString &rExpand, SwFont *pFntL )
+ SwFootnoteNumPortion( const OUString &rExpand, SwFont *pFntL )
: SwNumberPortion( rExpand, pFntL, true, false, 0, false )
{ SetWhichPor( POR_FTNNUM ); }
OUTPUT_OPERATOR_OVERRIDE
};
-class SwQuoVadisPortion : public SwFldPortion
+class SwQuoVadisPortion : public SwFieldPortion
{
OUString aErgo;
public:
SwQuoVadisPortion( const OUString &rExp, const OUString& rStr );
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
void SetNumber( const OUString& rStr ) { aErgo = rStr; }
- const OUString GetQuoTxt() const { return aExpand; }
- const OUString &GetContTxt() const { return aErgo; }
+ const OUString GetQuoText() const { return aExpand; }
+ const OUString &GetContText() const { return aErgo; }
// Field cloner for SplitGlue
- virtual SwFldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
+ virtual SwFieldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
@@ -80,15 +80,15 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-class SwErgoSumPortion : public SwFldPortion
+class SwErgoSumPortion : public SwFieldPortion
{
public:
SwErgoSumPortion( const OUString &rExp, const OUString& rStr );
virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
// Field cloner for SplitGlue
- virtual SwFldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
+ virtual SwFieldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index bcad1ebb2a59..18b09bae87c7 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -42,7 +42,7 @@ sal_Int32 SwGluePortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
return nOfst / (Width() / GetLen());
}
-SwPosSize SwGluePortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+SwPosSize SwGluePortion::GetTextSize( const SwTextSizeInfo &rInf ) const
{
if( 1 >= GetLen() || rInf.GetLen() > GetLen() || !Width() || !GetLen() )
return SwPosSize(*this);
@@ -50,20 +50,20 @@ SwPosSize SwGluePortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
return SwPosSize( (Width() / GetLen()) * rInf.GetLen(), Height() );
}
-bool SwGluePortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
+bool SwGluePortion::GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const
{
if( GetLen() && rInf.OnWin() &&
rInf.GetOpt().IsBlank() && rInf.IsNoSymbol() )
{
OUStringBuffer aBuf;
comphelper::string::padToLength(aBuf, GetLen(), CH_BULLET);
- rTxt = aBuf.makeStringAndClear();
+ rText = aBuf.makeStringAndClear();
return true;
}
return false;
}
-void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwGluePortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( !GetLen() )
return;
@@ -72,9 +72,9 @@ void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
{
OUStringBuffer aBuf;
comphelper::string::padToLength(aBuf, GetFixWidth() / GetLen(), ' ');
- OUString aTxt(aBuf.makeStringAndClear());
- SwTxtPaintInfo aInf( rInf, &aTxt );
- aInf.DrawText( *this, aTxt.getLength(), true );
+ OUString aText(aBuf.makeStringAndClear());
+ SwTextPaintInfo aInf( rInf, &aText );
+ aInf.DrawText( *this, aText.getLength(), true );
}
if( rInf.OnWin() && rInf.GetOpt().IsBlank() && rInf.IsNoSymbol() )
@@ -87,12 +87,12 @@ void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
if( 1 == GetLen() )
{
OUString aBullet( CH_BULLET );
- SwPosSize aBulletSize( rInf.GetTxtSize( aBullet ) );
+ SwPosSize aBulletSize( rInf.GetTextSize( aBullet ) );
Point aPos( rInf.GetPos() );
aPos.X() += (Width()/2) - (aBulletSize.Width()/2);
- SwTxtPaintInfo aInf( rInf, &aBullet );
+ SwTextPaintInfo aInf( rInf, &aBullet );
aInf.SetPos( aPos );
- SwTxtPortion aBulletPor;
+ SwTextPortion aBulletPor;
aBulletPor.Width( aBulletSize.Width() );
aBulletPor.Height( aBulletSize.Height() );
aBulletPor.SetAscent( GetAscent() );
@@ -100,7 +100,7 @@ void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
}
else
{
- SwTxtSlot aSlot( &rInf, this, true, false );
+ SwTextSlot aSlot( &rInf, this, true, false );
rInf.DrawText( *this, rInf.GetLen(), true );
}
}
@@ -200,12 +200,12 @@ void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
SwFlyPortion *pFly = static_cast<SwFlyPortion *>(pRight);
if ( pFly->GetBlankWidth() < nRightGlue )
{
- // Creating new TxtPortion, that takes over the
+ // Creating new TextPortion, that takes over the
// Blank previously swallowed by the Fly.
nRightGlue = nRightGlue - pFly->GetBlankWidth();
pFly->SubPrtWidth( pFly->GetBlankWidth() );
pFly->SetLen( 0 );
- SwTxtPortion *pNewPor = new SwTxtPortion;
+ SwTextPortion *pNewPor = new SwTextPortion;
pNewPor->SetLen( 1 );
pNewPor->Height( pFly->Height() );
pNewPor->Width( pFly->GetBlankWidth() );
@@ -235,7 +235,7 @@ void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
pPrevPrev->SetPortion( pRight );
pPrev->SetPortion( pRight->GetPortion() );
pRight->SetPortion( pPrev );
- if ( pPrev->GetPortion() && pPrev->InTxtGrp()
+ if ( pPrev->GetPortion() && pPrev->InTextGrp()
&& pPrev->GetPortion()->IsHolePortion() )
{
SwHolePortion *pHolePor =
diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx
index e3cbb134911e..058d95137cc2 100644
--- a/sw/source/core/text/porglue.hxx
+++ b/sw/source/core/text/porglue.hxx
@@ -40,10 +40,10 @@ public:
inline void MoveAllGlue( SwGluePortion *pTarget );
inline void MoveHalfGlue( SwGluePortion *pTarget );
inline void AdjFixWidth();
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
- virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
+ virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx
index 996e4ec863a2..5d4edb75c6f2 100644
--- a/sw/source/core/text/porhyph.hxx
+++ b/sw/source/core/text/porhyph.hxx
@@ -28,8 +28,8 @@ public:
{
SetWhichPor( POR_HYPH );
}
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
@@ -47,7 +47,7 @@ public:
SetWhichPor( POR_HYPHSTR );
}
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
@@ -63,15 +63,15 @@ class SwSoftHyphPortion : public SwHyphPortion
public:
SwSoftHyphPortion();
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void FormatEOL( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
inline void SetExpand( const bool bNew ) { bExpand = bNew; }
bool IsExpand() const { return bExpand; }
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
@@ -83,7 +83,7 @@ class SwSoftHyphStrPortion : public SwHyphStrPortion
{
public:
SwSoftHyphStrPortion( const OUString &rStr );
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 72845e871ae0..4e41c32cde8e 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -104,11 +104,11 @@ static bool lcl_ConnectToPrev( sal_Unicode cCh, sal_Unicode cPrevCh )
return bRet;
}
-static bool lcl_HasStrongLTR ( const OUString& rTxt, sal_Int32 nStart, sal_Int32 nEnd )
+static bool lcl_HasStrongLTR ( const OUString& rText, sal_Int32 nStart, sal_Int32 nEnd )
{
for( sal_Int32 nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx )
{
- const UCharDirection nCharDir = u_charDirection ( rTxt[ nCharIdx ] );
+ const UCharDirection nCharDir = u_charDirection ( rText[ nCharIdx ] );
if ( nCharDir == U_LEFT_TO_RIGHT ||
nCharDir == U_LEFT_TO_RIGHT_EMBEDDING ||
nCharDir == U_LEFT_TO_RIGHT_OVERRIDE )
@@ -139,7 +139,7 @@ SwLinePortion *SwLineLayout::Insert( SwLinePortion *pIns )
{
if( GetLen() )
{
- pPortion = SwTxtPortion::CopyLinePortion(*this);
+ pPortion = SwTextPortion::CopyLinePortion(*this);
if( IsBlinking() && pBlink )
{
SetBlinking( false );
@@ -161,19 +161,19 @@ SwLinePortion *SwLineLayout::Append( SwLinePortion *pIns )
// First attribute change: copy mass and length from *pIns into the first
// text portion
if( !pPortion )
- pPortion = SwTxtPortion::CopyLinePortion(*this);
+ pPortion = SwTextPortion::CopyLinePortion(*this);
// Call with scope or we'll end up with recursion!
return pPortion->SwLinePortion::Append( pIns );
}
// For special treatment of empty lines
-bool SwLineLayout::Format( SwTxtFormatInfo &rInf )
+bool SwLineLayout::Format( SwTextFormatInfo &rInf )
{
if( GetLen() )
- return SwTxtPortion::Format( rInf );
+ return SwTextPortion::Format( rInf );
- Height( rInf.GetTxtHeight() );
+ Height( rInf.GetTextHeight() );
return true;
}
@@ -184,7 +184,7 @@ SwMarginPortion *SwLineLayout::CalcLeftMargin()
SwMarginPortion *pLeft = (GetPortion() && GetPortion()->IsMarginPortion()) ?
static_cast<SwMarginPortion *>(GetPortion()) : 0;
if( !GetPortion() )
- SetPortion(SwTxtPortion::CopyLinePortion(*this));
+ SetPortion(SwTextPortion::CopyLinePortion(*this));
if( !pLeft )
{
pLeft = new SwMarginPortion( 0 );
@@ -233,12 +233,12 @@ void SwLineLayout::CreateSpaceAdd( const long nInit )
}
// Returns true if there are only blanks in [nStt, nEnd[
-static bool lcl_HasOnlyBlanks( const OUString& rTxt, sal_Int32 nStt, sal_Int32 nEnd )
+static bool lcl_HasOnlyBlanks( const OUString& rText, sal_Int32 nStt, sal_Int32 nEnd )
{
bool bBlankOnly = true;
while ( nStt < nEnd )
{
- const sal_Unicode cChar = rTxt[ nStt++ ];
+ const sal_Unicode cChar = rText[ nStt++ ];
if ( ' ' != cChar && 0x3000 != cChar )
{
bBlankOnly = false;
@@ -249,7 +249,7 @@ static bool lcl_HasOnlyBlanks( const OUString& rTxt, sal_Int32 nStt, sal_Int32 n
}
// Swapped out from FormatLine()
-void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
+void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
{
const sal_uInt16 nLineWidth = rInf.RealWidth();
@@ -270,14 +270,14 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
// #i3952#
const bool bIgnoreBlanksAndTabsForLineHeightCalculation =
- rInf.GetTxtFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION);
+ rInf.GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION);
bool bHasBlankPortion = false;
bool bHasOnlyBlankPortions = true;
if( pPortion )
{
- SetCntnt( false );
+ SetContent( false );
if( pPortion->IsBreakPortion() )
{
SetLen( pPortion->GetLen() );
@@ -326,7 +326,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
{
if ( pPos->InTabGrp() || pPos->IsHolePortion() ||
( pPos->IsTextPortion() &&
- lcl_HasOnlyBlanks( rInf.GetTxt(), nPorSttIdx, nPorSttIdx + pPos->GetLen() ) ) )
+ lcl_HasOnlyBlanks( rInf.GetText(), nPorSttIdx, nPorSttIdx + pPos->GetLen() ) ) )
{
pLast = pPos;
pPos = pPos->GetPortion();
@@ -411,7 +411,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
Height(nPosHeight);
}
if( pPos->IsFlyCntPortion() || ( pPos->IsMultiPortion()
- && static_cast<SwMultiPortion*>(pPos)->HasFlyInCntnt() ) )
+ && static_cast<SwMultiPortion*>(pPos)->HasFlyInContent() ) )
rLine.SetFlyInCntBase();
if( pPos->IsFlyCntPortion() &&
static_cast<SwFlyCntPortion*>(pPos)->GetAlign() )
@@ -432,20 +432,20 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
else if( pPos->GetLen() )
bTmpDummy = false;
- if( !HasCntnt() && !pPos->InNumberGrp() )
+ if( !HasContent() && !pPos->InNumberGrp() )
{
if ( pPos->InExpGrp() )
{
- OUString aTxt;
- if( pPos->GetExpTxt( rInf, aTxt ) && !aTxt.isEmpty() )
- SetCntnt();
+ OUString aText;
+ if( pPos->GetExpText( rInf, aText ) && !aText.isEmpty() )
+ SetContent();
}
- else if( ( pPos->InTxtGrp() || pPos->IsMultiPortion() ) &&
+ else if( ( pPos->InTextGrp() || pPos->IsMultiPortion() ) &&
pPos->GetLen() )
- SetCntnt();
+ SetContent();
}
- bTmpDummy &= !HasCntnt() && ( !pPos->Width() || pPos->IsFlyPortion() );
+ bTmpDummy &= !HasContent() && ( !pPos->Width() || pPos->IsFlyPortion() );
pLast = pPos;
pPos = pPos->GetPortion();
@@ -487,11 +487,11 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
}
else
{
- SetCntnt( !bTmpDummy );
+ SetContent( !bTmpDummy );
// #i3952#
if ( bIgnoreBlanksAndTabsForLineHeightCalculation &&
- lcl_HasOnlyBlanks( rInf.GetTxt(), rInf.GetLineStart(), rInf.GetLineStart() + GetLen() ) )
+ lcl_HasOnlyBlanks( rInf.GetText(), rInf.GetLineStart(), rInf.GetLineStart() + GetLen() ) )
{
bHasBlankPortion = true;
}
@@ -599,12 +599,12 @@ SwScriptInfo::~SwScriptInfo()
// Converts i18n Script Type (LATIN, ASIAN, COMPLEX, WEAK) to
// Sw Script Types (SW_LATIN, SW_CJK, SW_CTL), used to identify the font
-sal_uInt8 SwScriptInfo::WhichFont( sal_Int32 nIdx, const OUString* pTxt, const SwScriptInfo* pSI )
+sal_uInt8 SwScriptInfo::WhichFont( sal_Int32 nIdx, const OUString* pText, const SwScriptInfo* pSI )
{
- assert((pSI || pTxt) && "How should I determine the script type?");
+ assert((pSI || pText) && "How should I determine the script type?");
const sal_uInt16 nScript = pSI
? pSI->ScriptType( nIdx ) // use our SwScriptInfo if available
- : g_pBreakIt->GetRealScriptOfText( *pTxt, nIdx ); // else ask the break iterator
+ : g_pBreakIt->GetRealScriptOfText( *pText, nIdx ); // else ask the break iterator
switch ( nScript ) {
case i18n::ScriptType::LATIN : return SW_LATIN;
@@ -616,22 +616,22 @@ sal_uInt8 SwScriptInfo::WhichFont( sal_Int32 nIdx, const OUString* pTxt, const S
return SW_LATIN;
}
-// searches for script changes in rTxt and stores them
-void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode )
+// searches for script changes in rText and stores them
+void SwScriptInfo::InitScriptInfo( const SwTextNode& rNode )
{
InitScriptInfo( rNode, nDefaultDir == UBIDI_RTL );
}
-void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
+void SwScriptInfo::InitScriptInfo( const SwTextNode& rNode, bool bRTL )
{
if( !g_pBreakIt->GetBreakIter().is() )
return;
- const OUString& rTxt = rNode.GetTxt();
+ const OUString& rText = rNode.GetText();
// HIDDEN TEXT INFORMATION
- Range aRange( 0, !rTxt.isEmpty() ? rTxt.getLength() - 1 : 0 );
+ Range aRange( 0, !rText.isEmpty() ? rText.getLength() - 1 : 0 );
MultiSelection aHiddenMulti( aRange );
CalcHiddenRanges( rNode, aHiddenMulti );
@@ -722,13 +722,13 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
// we go back in our group until we reach the first character of
// type nScript
while ( nChg > nGrpStart &&
- nScript != g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg ) )
+ nScript != g_pBreakIt->GetBreakIter()->getScriptType( rText, nChg ) )
--nChg;
// If we are at the start of a group, we do not trust nScript,
// we better get nScript from the breakiterator:
if ( nChg == nGrpStart )
- nScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
+ nScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rText, nChg );
// INVALID DATA FROM THE SCRIPT INFO ARRAYS HAS TO BE DELETED:
@@ -765,17 +765,17 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
// TAKE CARE OF WEAK CHARACTERS: WE MUST FIND AN APPROPRIATE
// SCRIPT FOR WEAK CHARACTERS AT THE BEGINNING OF A PARAGRAPH
- if( WEAK == g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg ) )
+ if( WEAK == g_pBreakIt->GetBreakIter()->getScriptType( rText, 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.
sal_Int32 nEnd =
- g_pBreakIt->GetBreakIter()->endOfScript( rTxt, nChg, WEAK );
+ g_pBreakIt->GetBreakIter()->endOfScript( rText, nChg, WEAK );
- if (nEnd > rTxt.getLength() || nEnd < 0)
- nEnd = rTxt.getLength();
+ if (nEnd > rText.getLength() || nEnd < 0)
+ nEnd = rText.getLength();
nScript = SvtLanguageOptions::GetI18NScriptTypeOfLanguage( GetAppLanguage() );
@@ -786,8 +786,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
nChg = nEnd;
// Get next script type or set to weak in order to exit
- sal_uInt8 nNextScript = ( nEnd < rTxt.getLength() ) ?
- (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nEnd ) :
+ sal_uInt8 nNextScript = ( nEnd < rText.getLength() ) ?
+ (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rText, nEnd ) :
(sal_uInt8)WEAK;
if ( nScript != nNextScript )
@@ -800,41 +800,41 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
// UPDATE THE SCRIPT INFO ARRAYS:
- while ( nChg < rTxt.getLength() || ( aScriptChanges.empty() && rTxt.isEmpty() ) )
+ while ( nChg < rText.getLength() || ( aScriptChanges.empty() && rText.isEmpty() ) )
{
SAL_WARN_IF( i18n::ScriptType::WEAK == nScript,
"sw.core", "Inserting WEAK into SwScriptInfo structure" );
sal_Int32 nSearchStt = nChg;
- nChg = g_pBreakIt->GetBreakIter()->endOfScript( rTxt, nSearchStt, nScript );
+ nChg = g_pBreakIt->GetBreakIter()->endOfScript( rText, nSearchStt, nScript );
- if (nChg > rTxt.getLength() || nChg < 0)
- nChg = rTxt.getLength();
+ if (nChg > rText.getLength() || nChg < 0)
+ nChg = rText.getLength();
// #i28203#
// for 'complex' portions, we make sure that a portion does not contain more
// than one script:
if( i18n::ScriptType::COMPLEX == nScript )
{
- const short nScriptType = ScriptTypeDetector::getCTLScriptType( rTxt, nSearchStt );
+ const short nScriptType = ScriptTypeDetector::getCTLScriptType( rText, nSearchStt );
sal_Int32 nNextCTLScriptStart = nSearchStt;
short nCurrentScriptType = nScriptType;
while( com::sun::star::i18n::CTLScriptType::CTL_UNKNOWN == nCurrentScriptType || nScriptType == nCurrentScriptType )
{
- nNextCTLScriptStart = ScriptTypeDetector::endOfCTLScriptType( rTxt, nNextCTLScriptStart );
- if( nNextCTLScriptStart >= rTxt.getLength() || nNextCTLScriptStart >= nChg )
+ nNextCTLScriptStart = ScriptTypeDetector::endOfCTLScriptType( rText, nNextCTLScriptStart );
+ if( nNextCTLScriptStart >= rText.getLength() || nNextCTLScriptStart >= nChg )
break;
- nCurrentScriptType = ScriptTypeDetector::getCTLScriptType( rTxt, nNextCTLScriptStart );
+ nCurrentScriptType = ScriptTypeDetector::getCTLScriptType( rText, nNextCTLScriptStart );
}
nChg = std::min( nChg, nNextCTLScriptStart );
}
// 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.getLength() && nChg > 0 && (i18n::ScriptType::WEAK ==
- g_pBreakIt->GetBreakIter()->getScriptType(rTxt,nChg - 1)))
+ if (nChg < rText.getLength() && nChg > 0 && (i18n::ScriptType::WEAK ==
+ g_pBreakIt->GetBreakIter()->getScriptType(rText,nChg - 1)))
{
- int8_t nType = u_charType(rTxt[nChg] );
+ int8_t nType = u_charType(rText[nChg] );
if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
nType == U_COMBINING_SPACING_MARK )
{
@@ -862,7 +862,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
while ( nLastCompression < nChg )
{
- sal_Unicode cChar = rTxt[ nLastCompression ];
+ sal_Unicode cChar = rText[ nLastCompression ];
// examine current character
switch ( cChar )
@@ -919,7 +919,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
// we search for connecting opportunities (kashida)
else if ( bAdjustBlock && i18n::ScriptType::COMPLEX == nScript )
{
- SwScanner aScanner( rNode, rNode.GetTxt(), 0, ModelToViewHelper(),
+ SwScanner aScanner( rNode, rNode.GetText(), 0, ModelToViewHelper(),
i18n::WordType::DICTIONARY_WORD,
nLastKashida, nChg );
@@ -1084,8 +1084,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
} // end of kashida search
}
- if ( nChg < rTxt.getLength() )
- nScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
+ if ( nChg < rText.getLength() )
+ nScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rText, nChg );
nLastCompression = nChg;
nLastKashida = nChg;
@@ -1123,7 +1123,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
// do not call the unicode bidi algorithm if not required
if ( bPerformUBA )
{
- UpdateBidiInfo( rTxt );
+ UpdateBidiInfo( rText );
// #i16354# Change script type for RTL text to CTL:
// 1. All text in RTL runs will use the CTL font
@@ -1138,7 +1138,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
const sal_Int32 nEnd = GetDirChg( nDirIdx );
if ( nCurrDirType % 2 == UBIDI_RTL || // text in RTL run
- ( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( rTxt, nStart, nEnd ) ) ) // non-strong text in embedded LTR run
+ ( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( rText, nStart, nEnd ) ) ) // non-strong text in embedded LTR run
{
// nScriptIdx points into the ScriptArrays:
size_t nScriptIdx = 0;
@@ -1195,7 +1195,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, bool bRTL )
}
}
-void SwScriptInfo::UpdateBidiInfo( const OUString& rTxt )
+void SwScriptInfo::UpdateBidiInfo( const OUString& rText )
{
// remove invalid entries from direction information arrays
aDirectionChanges.clear();
@@ -1203,10 +1203,10 @@ void SwScriptInfo::UpdateBidiInfo( const OUString& rTxt )
// Bidi functions from icu 2.0
UErrorCode nError = U_ZERO_ERROR;
- UBiDi* pBidi = ubidi_openSized( rTxt.getLength(), 0, &nError );
+ UBiDi* pBidi = ubidi_openSized( rText.getLength(), 0, &nError );
nError = U_ZERO_ERROR;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(rTxt.getStr()), rTxt.getLength(), // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(rText.getStr()), rText.getLength(), // UChar != sal_Unicode in MinGW
nDefaultDir, NULL, &nError );
nError = U_ZERO_ERROR;
int nCount = ubidi_countRuns( pBidi, &nError );
@@ -1284,11 +1284,11 @@ sal_uInt8 SwScriptInfo::DirType(const sal_Int32 nPos) const
}
// Takes a string and replaced the hidden ranges with cChar.
-sal_Int32 SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, OUStringBuffer & rText,
+sal_Int32 SwScriptInfo::MaskHiddenRanges( const SwTextNode& rNode, OUStringBuffer & rText,
const sal_Int32 nStt, const sal_Int32 nEnd,
const sal_Unicode cChar )
{
- assert(rNode.GetTxt().getLength() == rText.getLength());
+ assert(rNode.GetText().getLength() == rText.getLength());
PositionList aList;
sal_Int32 nHiddenStart;
@@ -1319,8 +1319,8 @@ sal_Int32 SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, OUStringBuffer
return nNumOfHiddenChars;
}
-// Takes a SwTxtNode and deletes the hidden ranges from the node.
-void SwScriptInfo::DeleteHiddenRanges( SwTxtNode& rNode )
+// Takes a SwTextNode and deletes the hidden ranges from the node.
+void SwScriptInfo::DeleteHiddenRanges( SwTextNode& rNode )
{
PositionList aList;
sal_Int32 nHiddenStart;
@@ -1338,7 +1338,7 @@ void SwScriptInfo::DeleteHiddenRanges( SwTxtNode& rNode )
}
}
-bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, sal_Int32 nPos,
+bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTextNode& rNode, sal_Int32 nPos,
sal_Int32& rnStartPos, sal_Int32& rnEndPos,
PositionList* pList )
{
@@ -1361,11 +1361,11 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, sal_Int32 nPo
if ( pList )
{
pList->push_back( 0 );
- pList->push_back(rNode.GetTxt().getLength());
+ pList->push_back(rNode.GetText().getLength());
}
rnStartPos = 0;
- rnEndPos = rNode.GetTxt().getLength();
+ rnEndPos = rNode.GetText().getLength();
return true;
}
}
@@ -1378,7 +1378,7 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, sal_Int32 nPo
bNewContainsHiddenChars = pSI->GetBoundsOfHiddenRange( nPos, rnStartPos, rnEndPos, pList );
const bool bNewHiddenCharsHidePara =
- rnStartPos == 0 && rnEndPos >= rNode.GetTxt().getLength();
+ rnStartPos == 0 && rnEndPos >= rNode.GetText().getLength();
rNode.SetHiddenCharAttribute( bNewHiddenCharsHidePara, bNewContainsHiddenChars );
}
else
@@ -1386,8 +1386,8 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, sal_Int32 nPo
// No valid SwScriptInfo Object, we have to do it the hard way:
- Range aRange(0, (!rNode.GetTxt().isEmpty())
- ? rNode.GetTxt().getLength() - 1
+ Range aRange(0, (!rNode.GetText().isEmpty())
+ ? rNode.GetText().getLength() - 1
: 0);
MultiSelection aHiddenMulti( aRange );
SwScriptInfo::CalcHiddenRanges( rNode, aHiddenMulti );
@@ -1403,7 +1403,7 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, sal_Int32 nPo
{
rnStartPos = nHiddenStart;
rnEndPos = std::min<sal_Int32>(nHiddenEnd,
- rNode.GetTxt().getLength());
+ rNode.GetText().getLength());
break;
}
}
@@ -1458,7 +1458,7 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( sal_Int32 nPos, sal_Int32& rnStartPos
return CountHiddenChg() > 0;
}
-bool SwScriptInfo::IsInHiddenRange( const SwTxtNode& rNode, sal_Int32 nPos )
+bool SwScriptInfo::IsInHiddenRange( const SwTextNode& rNode, sal_Int32 nPos )
{
sal_Int32 nStartPos;
sal_Int32 nEndPos;
@@ -1704,8 +1704,8 @@ sal_Int32 SwScriptInfo::KashidaJustify( long* pKernArray,
// Checks if the current text is 'Arabic' text. Note that only the first
// character has to be checked because a ctl portion only contains one
-// script, see NewTxtPortion
-bool SwScriptInfo::IsArabicText( const OUString& rTxt, sal_Int32 nStt, sal_Int32 nLen )
+// script, see NewTextPortion
+bool SwScriptInfo::IsArabicText( const OUString& rText, sal_Int32 nStt, sal_Int32 nLen )
{
using namespace ::com::sun::star::i18n;
static const ScriptTypeList typeList[] = {
@@ -1717,7 +1717,7 @@ bool SwScriptInfo::IsArabicText( const OUString& rTxt, sal_Int32 nStt, sal_Int32
const CharClass& rCC = GetAppCharClass();
sal_Int32 nIdx = nStt;
const sal_Int32 nEnd = nStt + nLen;
- while ( nIdx < nEnd && !rCC.isLetterNumeric( rTxt, nIdx ) )
+ while ( nIdx < nEnd && !rCC.isLetterNumeric( rText, nIdx ) )
{
++nIdx;
}
@@ -1726,7 +1726,7 @@ bool SwScriptInfo::IsArabicText( const OUString& rTxt, sal_Int32 nStt, sal_Int32
{
// no regular character found in this portion. Go backward:
--nIdx;
- while ( nIdx >= 0 && !rCC.isLetterNumeric( rTxt, nIdx ) )
+ while ( nIdx >= 0 && !rCC.isLetterNumeric( rText, nIdx ) )
{
--nIdx;
}
@@ -1734,7 +1734,7 @@ bool SwScriptInfo::IsArabicText( const OUString& rTxt, sal_Int32 nStt, sal_Int32
if( nIdx >= 0 )
{
- const sal_Unicode cCh = rTxt[nIdx];
+ const sal_Unicode cCh = rText[nIdx];
const sal_Int16 type = unicode::getUnicodeScriptType( cCh, typeList, UnicodeScript_kScriptCount );
return type == UnicodeScript_kArabic;
}
@@ -1890,12 +1890,12 @@ bool SwScriptInfo::MarkKashidasInvalid(sal_Int32 nCnt, sal_Int32* pKashidaPositi
return true;
}
-sal_Int32 SwScriptInfo::ThaiJustify( const OUString& rTxt, long* pKernArray,
+sal_Int32 SwScriptInfo::ThaiJustify( const OUString& rText, long* pKernArray,
long* pScrArray, sal_Int32 nStt,
sal_Int32 nLen, sal_Int32 nNumberOfBlanks,
long nSpaceAdd )
{
- SAL_WARN_IF( nStt + nLen > rTxt.getLength(), "sw.core", "String in ThaiJustify too small" );
+ SAL_WARN_IF( nStt + nLen > rText.getLength(), "sw.core", "String in ThaiJustify too small" );
SwTwips nNumOfTwipsToDistribute = nSpaceAdd * nNumberOfBlanks /
SPACING_PRECISION_FACTOR;
@@ -1905,7 +1905,7 @@ sal_Int32 SwScriptInfo::ThaiJustify( const OUString& rTxt, long* pKernArray,
for (sal_Int32 nI = 0; nI < nLen; ++nI)
{
- const sal_Unicode cCh = rTxt[nStt + nI];
+ const sal_Unicode cCh = rText[nStt + nI];
// check if character is not above or below base
if ( ( 0xE34 > cCh || cCh > 0xE3A ) &&
@@ -1928,13 +1928,13 @@ sal_Int32 SwScriptInfo::ThaiJustify( const OUString& rTxt, long* pKernArray,
return nCnt;
}
-SwScriptInfo* SwScriptInfo::GetScriptInfo( const SwTxtNode& rTNd,
+SwScriptInfo* SwScriptInfo::GetScriptInfo( const SwTextNode& rTNd,
bool bAllowInvalid )
{
- SwIterator<SwTxtFrm,SwTxtNode> aIter( rTNd );
+ SwIterator<SwTextFrm,SwTextNode> aIter( rTNd );
SwScriptInfo* pScriptInfo = 0;
- for( SwTxtFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() )
+ for( SwTextFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() )
{
pScriptInfo = const_cast<SwScriptInfo*>(pLast->GetScriptInfo());
if ( pScriptInfo )
@@ -1958,7 +1958,7 @@ SwParaPortion::SwParaPortion()
, bFlag16(false)
{
FormatReset();
- bFlys = bFtnNum = bMargin = false;
+ bFlys = bFootnoteNum = bMargin = false;
SetWhichPor( POR_PARA );
}
@@ -2032,7 +2032,7 @@ SwTwips SwLineLayout::_GetHangingMargin() const
return nDiff;
}
-SwTwips SwTxtFrm::HangingMargin() const
+SwTwips SwTextFrm::HangingMargin() const
{
SAL_WARN_IF( !HasPara(), "sw.core", "Don't call me without a paraportion" );
if( !GetPara()->IsMargin() )
@@ -2051,10 +2051,10 @@ SwTwips SwTxtFrm::HangingMargin() const
return nRet;
}
-void SwScriptInfo::selectHiddenTextProperty(const SwTxtNode& rNode, MultiSelection &rHiddenMulti)
+void SwScriptInfo::selectHiddenTextProperty(const SwTextNode& rNode, MultiSelection &rHiddenMulti)
{
- assert((rNode.GetTxt().isEmpty() && rHiddenMulti.GetTotalRange().Len() == 1)
- || (rNode.GetTxt().getLength() == rHiddenMulti.GetTotalRange().Len()));
+ assert((rNode.GetText().isEmpty() && rHiddenMulti.GetTotalRange().Len() == 1)
+ || (rNode.GetText().getLength() == rHiddenMulti.GetTotalRange().Len()));
const SfxPoolItem* pItem = 0;
if( SfxItemState::SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) &&
@@ -2069,13 +2069,13 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTxtNode& rNode, MultiSelecti
{
for( size_t nTmp = 0; nTmp < pHints->GetStartCount(); ++nTmp )
{
- const SwTxtAttr* pTxtAttr = pHints->GetStart( nTmp );
+ const SwTextAttr* pTextAttr = pHints->GetStart( nTmp );
const SvxCharHiddenItem* pHiddenItem =
- static_cast<const SvxCharHiddenItem*>( CharFmt::GetItem( *pTxtAttr, RES_CHRATR_HIDDEN ) );
+ static_cast<const SvxCharHiddenItem*>( CharFormat::GetItem( *pTextAttr, RES_CHRATR_HIDDEN ) );
if( pHiddenItem )
{
- const sal_Int32 nSt = pTxtAttr->GetStart();
- const sal_Int32 nEnd = *pTxtAttr->End();
+ const sal_Int32 nSt = pTextAttr->GetStart();
+ const sal_Int32 nEnd = *pTextAttr->End();
if( nEnd > nSt )
{
Range aTmp( nSt, nEnd - 1 );
@@ -2086,19 +2086,19 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTxtNode& rNode, MultiSelecti
}
}
-void SwScriptInfo::selectRedLineDeleted(const SwTxtNode& rNode, MultiSelection &rHiddenMulti, bool bSelect)
+void SwScriptInfo::selectRedLineDeleted(const SwTextNode& rNode, MultiSelection &rHiddenMulti, bool bSelect)
{
- assert((rNode.GetTxt().isEmpty() && rHiddenMulti.GetTotalRange().Len() == 1)
- || (rNode.GetTxt().getLength() == rHiddenMulti.GetTotalRange().Len()));
+ assert((rNode.GetText().isEmpty() && rHiddenMulti.GetTotalRange().Len() == 1)
+ || (rNode.GetText().getLength() == rHiddenMulti.GetTotalRange().Len()));
const IDocumentRedlineAccess& rIDRA = *rNode.getIDocumentRedlineAccess();
if ( IDocumentRedlineAccess::IsShowChanges( rIDRA.GetRedlineMode() ) )
{
sal_uInt16 nAct = rIDRA.GetRedlinePos( rNode, USHRT_MAX );
- for ( ; nAct < rIDRA.GetRedlineTbl().size(); nAct++ )
+ for ( ; nAct < rIDRA.GetRedlineTable().size(); nAct++ )
{
- const SwRangeRedline* pRed = rIDRA.GetRedlineTbl()[ nAct ];
+ const SwRangeRedline* pRed = rIDRA.GetRedlineTable()[ nAct ];
if (pRed->Start()->nNode > rNode.GetIndex())
break;
@@ -2110,7 +2110,7 @@ void SwScriptInfo::selectRedLineDeleted(const SwTxtNode& rNode, MultiSelection &
sal_Int32 nRedlnEnd;
pRed->CalcStartEnd( rNode.GetIndex(), nRedlStart, nRedlnEnd );
//clip it if the redline extends past the end of the nodes text
- nRedlnEnd = std::min<sal_Int32>(nRedlnEnd, rNode.GetTxt().getLength());
+ nRedlnEnd = std::min<sal_Int32>(nRedlnEnd, rNode.GetText().getLength());
if ( nRedlnEnd > nRedlStart )
{
Range aTmp( nRedlStart, nRedlnEnd - 1 );
@@ -2121,7 +2121,7 @@ void SwScriptInfo::selectRedLineDeleted(const SwTxtNode& rNode, MultiSelection &
}
// Returns a MultiSection indicating the hidden ranges.
-void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHiddenMulti )
+void SwScriptInfo::CalcHiddenRanges( const SwTextNode& rNode, MultiSelection& rHiddenMulti )
{
selectHiddenTextProperty(rNode, rHiddenMulti);
@@ -2139,7 +2139,7 @@ void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHi
const sal_Int32 nHiddenStart = rRange.Min();
const sal_Int32 nHiddenEnd = rRange.Max() + 1;
bNewHiddenCharsHidePara =
- (nHiddenStart == 0 && nHiddenEnd >= rNode.GetTxt().getLength());
+ (nHiddenStart == 0 && nHiddenEnd >= rNode.GetText().getLength());
}
rNode.SetHiddenCharAttribute( bNewHiddenCharsHidePara, bNewContainsHiddenChars );
}
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index a19be482353c..e42aa5c8031c 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -32,7 +32,7 @@
class SwMarginPortion;
class SwDropPortion;
class SvStream;
-class SwTxtFormatter;
+class SwTextFormatter;
class SwCharRange
{
@@ -76,7 +76,7 @@ public:
};
/// Collection of SwLinePortion instances, representing one line of text
-class SwLineLayout : public SwTxtPortion
+class SwLineLayout : public SwTextPortion
{
private:
SwLineLayout *pNext; // The next Line
@@ -125,8 +125,8 @@ public:
inline bool IsRest() const { return bRest; }
inline void SetBlinking( const bool bNew = true ) { bBlinking = bNew; }
inline bool IsBlinking() const { return bBlinking; }
- inline void SetCntnt( const bool bNew = true ) { bContent = bNew; }
- inline bool HasCntnt() const { return bContent; }
+ inline void SetContent( const bool bNew = true ) { bContent = bNew; }
+ inline bool HasContent() const { return bContent; }
inline void SetRedline( const bool bNew = true ) { bRedline = bNew; }
inline bool HasRedline() const { return bRedline; }
inline void SetForcedLeftMargin( const bool bNew = true ) { bForcedLeftMargin = bNew; }
@@ -153,7 +153,7 @@ public:
void Init( SwLinePortion *pNextPortion = NULL);
// Collects the data for the line
- void CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf );
+ void CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf );
inline void SetRealHeight( sal_uInt16 nNew ) { nRealHeight = nNew; }
inline sal_uInt16 GetRealHeight() const { return nRealHeight; }
@@ -165,7 +165,7 @@ public:
{ return _GetHangingMargin(); }
// For special treatment for empty lines
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
// Stuff for justified alignment
inline bool IsSpaceAdd() { return pLLSpaceAdd != NULL; }
@@ -244,7 +244,7 @@ class SwParaPortion : public SwLineLayout
// Fraction aZoom;
long nDelta;
- // If a SwTxtFrm is locked, no changes occur to the formatting data (under
+ // If a SwTextFrm is locked, no changes occur to the formatting data (under
// pLine) (compare with Orphans)
bool bFlys : 1; // Overlapping Flys?
bool bPrep : 1; // PREP_*
@@ -254,7 +254,7 @@ class SwParaPortion : public SwLineLayout
bool bFollowField : 1; // We have a bit of field left for the Follow
bool bFixLineHeight : 1; // Fixed line height
- bool bFtnNum : 1; // contains a footnotenumberportion
+ bool bFootnoteNum : 1; // contains a footnotenumberportion
bool bMargin : 1; // contains a hanging punctuation in the margin
bool bFlag00 : 1;
@@ -285,7 +285,7 @@ public:
inline SwScriptInfo& GetScriptInfo() { return aScriptInfo; }
inline const SwScriptInfo& GetScriptInfo() const { return aScriptInfo; }
- // For SwTxtFrm::Format: returns the paragraph's current length
+ // For SwTextFrm::Format: returns the paragraph's current length
sal_Int32 GetParLen() const;
// For Prepare()
@@ -309,8 +309,8 @@ public:
inline void SetFixLineHeight( const bool bNew = true ) { bFixLineHeight = bNew; }
inline bool IsFixLineHeight() const { return bFixLineHeight; }
- inline void SetFtnNum( const bool bNew = true ) { bFtnNum = bNew; }
- inline bool IsFtnNum() const { return bFtnNum; }
+ inline void SetFootnoteNum( const bool bNew = true ) { bFootnoteNum = bNew; }
+ inline bool IsFootnoteNum() const { return bFootnoteNum; }
inline void SetMargin( const bool bNew = true ) { bMargin = bNew; }
inline bool IsMargin() const { return bMargin; }
inline void SetFlag00( const bool bNew = true ) { bFlag00 = bNew; }
@@ -338,7 +338,7 @@ public:
const SwDropPortion *FindDropPortion() const;
#ifdef DBG_UTIL
- void dumpAsXml( xmlTextWriter* writer, SwTxtFrm* pTxtFrm );
+ void dumpAsXml( xmlTextWriter* writer, SwTextFrm* pTextFrm );
#endif
OUTPUT_OPERATOR_OVERRIDE
@@ -369,7 +369,7 @@ inline void SwParaPortion::FormatReset()
{
nDelta = 0;
aReformat = SwCharRange(0, COMPLETE_STRING);
- // bFlys needs to be retained in SwTxtFrm::_Format() so that empty
+ // bFlys needs to be retained in SwTextFrm::_Format() so that empty
// paragraphs that needed to avoid Frames with no flow, reformat
// when the Frame disappears from the Area
// bFlys = false;
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 3215844dbd0a..01fc7285ebf2 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -63,7 +63,7 @@ SwLinePortion *SwLinePortion::Compress()
return GetLen() || Width() ? this : 0;
}
-sal_uInt16 SwLinePortion::GetViewWidth( const SwTxtSizeInfo & ) const
+sal_uInt16 SwLinePortion::GetViewWidth( const SwTextSizeInfo & ) const
{
return 0;
}
@@ -78,7 +78,7 @@ SwLinePortion::SwLinePortion( ) :
{
}
-void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
+void SwLinePortion::PrePaint( const SwTextPaintInfo& rInf,
const SwLinePortion* pLast ) const
{
OSL_ENSURE( rInf.OnWin(), "SwLinePortion::PrePaint: don't prepaint on a printer");
@@ -96,14 +96,14 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
nLastWidth = nLastWidth + (sal_uInt16)pLast->CalcSpacing( rInf.GetSpaceAdd(), rInf );
sal_uInt16 nPos;
- SwTxtPaintInfo aInf( rInf );
+ SwTextPaintInfo aInf( rInf );
- const bool bBidiPor = rInf.GetTxtFrm()->IsRightToLeft() !=
+ const bool bBidiPor = rInf.GetTextFrm()->IsRightToLeft() !=
bool( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() );
sal_uInt16 nDir = bBidiPor ?
1800 :
- rInf.GetFont()->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() );
switch ( nDir )
{
@@ -139,15 +139,15 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
pThis->Width(0);
}
-void SwLinePortion::CalcTxtSize( const SwTxtSizeInfo &rInf )
+void SwLinePortion::CalcTextSize( const SwTextSizeInfo &rInf )
{
if( GetLen() == rInf.GetLen() )
- *static_cast<SwPosSize*>(this) = GetTxtSize( rInf );
+ *static_cast<SwPosSize*>(this) = GetTextSize( rInf );
else
{
- SwTxtSizeInfo aInf( rInf );
+ SwTextSizeInfo aInf( rInf );
aInf.SetLen( GetLen() );
- *static_cast<SwPosSize*>(this) = GetTxtSize( aInf );
+ *static_cast<SwPosSize*>(this) = GetTextSize( aInf );
}
}
@@ -230,14 +230,14 @@ sal_Int32 SwLinePortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
return 0;
}
-SwPosSize SwLinePortion::GetTxtSize( const SwTxtSizeInfo & ) const
+SwPosSize SwLinePortion::GetTextSize( const SwTextSizeInfo & ) const
{
- OSL_ENSURE( false, "SwLinePortion::GetTxtSize: don't ask me about sizes, "
+ OSL_ENSURE( false, "SwLinePortion::GetTextSize: don't ask me about sizes, "
"I'm only a stupid SwLinePortion" );
return SwPosSize();
}
-bool SwLinePortion::Format( SwTxtFormatInfo &rInf )
+bool SwLinePortion::Format( SwTextFormatInfo &rInf )
{
if( rInf.X() > rInf.Width() )
{
@@ -265,13 +265,13 @@ bool SwLinePortion::Format( SwTxtFormatInfo &rInf )
// Format end of line
-void SwLinePortion::FormatEOL( SwTxtFormatInfo & )
+void SwLinePortion::FormatEOL( SwTextFormatInfo & )
{ }
-void SwLinePortion::Move( SwTxtPaintInfo &rInf )
+void SwLinePortion::Move( SwTextPaintInfo &rInf )
{
bool bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP;
- const bool bFrmDir = rInf.GetTxtFrm()->IsRightToLeft();
+ const bool bFrmDir = rInf.GetTextFrm()->IsRightToLeft();
bool bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) ||
( bFrmDir && DIR_LEFT2RIGHT == rInf.GetDirection() );
@@ -305,12 +305,12 @@ void SwLinePortion::Move( SwTxtPaintInfo &rInf )
rInf.SetIdx( rInf.GetIdx() + GetLen() );
}
-long SwLinePortion::CalcSpacing( long , const SwTxtSizeInfo & ) const
+long SwLinePortion::CalcSpacing( long , const SwTextSizeInfo & ) const
{
return 0;
}
-bool SwLinePortion::GetExpTxt( const SwTxtSizeInfo &, OUString & ) const
+bool SwLinePortion::GetExpText( const SwTextSizeInfo &, OUString & ) const
{
return false;
}
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 59f272f08d24..792c9ef3b63e 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -26,9 +26,9 @@
#include <libxml/xmlwriter.h>
#endif
-class SwTxtSizeInfo;
-class SwTxtPaintInfo;
-class SwTxtFormatInfo;
+class SwTextSizeInfo;
+class SwTextPaintInfo;
+class SwTextFormatInfo;
class SwPortionHandler;
// The portions output operators are virtual methods of the portion.
@@ -107,19 +107,19 @@ public:
inline sal_uInt16 GetWhichPor( ) const { return nWhichPor; }
// Group queries
- inline bool InTxtGrp() const { return (nWhichPor & PORGRP_TXT) != 0; }
+ inline bool InTextGrp() const { return (nWhichPor & PORGRP_TXT) != 0; }
inline bool InGlueGrp() const { return (nWhichPor & PORGRP_GLUE) != 0; }
inline bool InTabGrp() const { return (nWhichPor & PORGRP_TAB) != 0; }
inline bool InHyphGrp() const { return (nWhichPor & PORGRP_HYPH) != 0; }
inline bool InNumberGrp() const { return (nWhichPor & PORGRP_NUMBER) != 0; }
inline bool InFixGrp() const { return (nWhichPor & PORGRP_FIX) != 0; }
- inline bool InFldGrp() const { return (nWhichPor & PORGRP_FLD) != 0; }
+ inline bool InFieldGrp() const { return (nWhichPor & PORGRP_FLD) != 0; }
inline bool InToxRefGrp() const { return (nWhichPor & PORGRP_TOXREF) != 0; }
- inline bool InToxRefOrFldGrp() const { return (nWhichPor & ( PORGRP_FLD | PORGRP_TOXREF )) != 0; }
+ inline bool InToxRefOrFieldGrp() const { return (nWhichPor & ( PORGRP_FLD | PORGRP_TOXREF )) != 0; }
inline bool InExpGrp() const { return (nWhichPor & PORGRP_EXP) != 0; }
inline bool InTabnLftGrp() const { return (nWhichPor & PORGRP_TABNOTLFT) != 0; }
inline bool InFixMargGrp() const { return (nWhichPor & PORGRP_FIXMARG) != 0; }
- inline bool InSpaceGrp() const { return InTxtGrp() || IsMultiPortion(); }
+ inline bool InSpaceGrp() const { return InTextGrp() || IsMultiPortion(); }
// Individual queries
inline bool IsGrfNumPortion() const { return nWhichPor == POR_GRFNUM; }
inline bool IsFlyCntPortion() const { return nWhichPor == POR_FLYCNT; }
@@ -130,8 +130,8 @@ public:
inline bool IsTabCntPortion() const { return nWhichPor == POR_TABCENTER; }
inline bool IsTabDecimalPortion() const { return nWhichPor == POR_TABDECIMAL; }
inline bool IsTabLeftPortion() const { return nWhichPor == POR_TABLEFT; }
- inline bool IsFtnNumPortion() const { return nWhichPor == POR_FTNNUM; }
- inline bool IsFtnPortion() const { return nWhichPor == POR_FTN; }
+ inline bool IsFootnoteNumPortion() const { return nWhichPor == POR_FTNNUM; }
+ inline bool IsFootnotePortion() const { return nWhichPor == POR_FTN; }
inline bool IsTmpEndPortion() const { return nWhichPor == POR_TMPEND; }
inline bool IsDropPortion() const { return nWhichPor == POR_DROP; }
inline bool IsLayPortion() const { return nWhichPor == POR_LAY; }
@@ -156,26 +156,26 @@ public:
SwLinePortion *FindLastPortion();
virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const;
- virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const;
- void CalcTxtSize( const SwTxtSizeInfo &rInfo );
+ virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const;
+ void CalcTextSize( const SwTextSizeInfo &rInfo );
// Output
- virtual void Paint( const SwTxtPaintInfo &rInf ) const = 0;
- void PrePaint( const SwTxtPaintInfo &rInf, const SwLinePortion *pLast ) const;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const = 0;
+ void PrePaint( const SwTextPaintInfo &rInf, const SwLinePortion *pLast ) const;
- virtual bool Format( SwTxtFormatInfo &rInf );
+ virtual bool Format( SwTextFormatInfo &rInf );
// Is called for the line's last portion
- virtual void FormatEOL( SwTxtFormatInfo &rInf );
- void Move( SwTxtPaintInfo &rInf );
+ virtual void FormatEOL( SwTextFormatInfo &rInf );
+ void Move( SwTextPaintInfo &rInf );
- // For SwTxtSlot
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const;
+ // For SwTextSlot
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const;
- // For SwFldPortion, SwSoftHyphPortion
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const;
+ // For SwFieldPortion, SwSoftHyphPortion
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const;
// for text- and multi-portions
- virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const;
+ virtual long CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) const;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const;
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 755869f62849..ca60bae72fc2 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -58,28 +58,28 @@ using namespace ::com::sun::star;
// and by another SwLineLayout via pNext to realize a doubleline portion.
SwMultiPortion::~SwMultiPortion()
{
- delete pFldRest;
+ delete pFieldRest;
}
-void SwMultiPortion::Paint( const SwTxtPaintInfo & ) const
+void SwMultiPortion::Paint( const SwTextPaintInfo & ) const
{
- OSL_FAIL( "Don't try SwMultiPortion::Paint, try SwTxtPainter::PaintMultiPortion" );
+ OSL_FAIL( "Don't try SwMultiPortion::Paint, try SwTextPainter::PaintMultiPortion" );
}
// Summarize the internal lines to calculate the (external) size.
// The internal line has to calculate first.
-void SwMultiPortion::CalcSize( SwTxtFormatter& rLine, SwTxtFormatInfo &rInf )
+void SwMultiPortion::CalcSize( SwTextFormatter& rLine, SwTextFormatInfo &rInf )
{
Width( 0 );
Height( 0 );
SetAscent( 0 );
- SetFlyInCntnt( false );
+ SetFlyInContent( false );
SwLineLayout *pLay = &GetRoot();
do
{
pLay->CalcLine( rLine, rInf );
if( rLine.IsFlyInCntBase() )
- SetFlyInCntnt( true );
+ SetFlyInContent( true );
if( IsRuby() && ( OnTop() == ( pLay == &GetRoot() ) ) )
{
// An empty phonetic line don't need an ascent or a height.
@@ -114,7 +114,7 @@ void SwMultiPortion::CalcSize( SwTxtFormatter& rLine, SwTxtFormatInfo &rInf )
}
}
-long SwMultiPortion::CalcSpacing( long , const SwTxtSizeInfo & ) const
+long SwMultiPortion::CalcSpacing( long , const SwTextSizeInfo & ) const
{
return 0;
}
@@ -156,9 +156,9 @@ SwRotatedPortion::SwRotatedPortion( const SwMultiCreator& rCreate,
const SvxCharRotateItem* pRot = static_cast<const SvxCharRotateItem*>(rCreate.pItem);
if( !pRot )
{
- const SwTxtAttr& rAttr = *rCreate.pAttr;
+ const SwTextAttr& rAttr = *rCreate.pAttr;
const SfxPoolItem *const pItem =
- CharFmt::GetItem(rAttr, RES_CHRATR_ROTATE);
+ CharFormat::GetItem(rAttr, RES_CHRATR_ROTATE);
if ( pItem )
{
pRot = static_cast<const SvxCharRotateItem*>(pItem);
@@ -187,7 +187,7 @@ SwBidiPortion::SwBidiPortion( sal_Int32 nEnd, sal_uInt8 nLv )
SetDirection( DIR_LEFT2RIGHT );
}
-long SwBidiPortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo& rInf ) const
+long SwBidiPortion::CalcSpacing( long nSpaceAdd, const SwTextSizeInfo& rInf ) const
{
return HasTabulator() ? 0 : GetSpaceCnt(rInf) * nSpaceAdd / SPACING_PRECISION_FACTOR;
}
@@ -204,7 +204,7 @@ bool SwBidiPortion::ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const
return false;
}
-sal_Int32 SwBidiPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf ) const
+sal_Int32 SwBidiPortion::GetSpaceCnt( const SwTextSizeInfo &rInf ) const
{
// Calculate number of blanks for justified alignment
SwLinePortion* pPor = GetRoot().GetFirstPortion();
@@ -214,15 +214,15 @@ sal_Int32 SwBidiPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf ) const
for( nBlanks = 0; pPor; pPor = pPor->GetPortion() )
{
- if( pPor->InTxtGrp() )
- nBlanks = nBlanks + static_cast<SwTxtPortion*>(pPor)->GetSpaceCnt( rInf, nNull );
+ if( pPor->InTextGrp() )
+ nBlanks = nBlanks + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull );
else if ( pPor->IsMultiPortion() &&
static_cast<SwMultiPortion*>(pPor)->IsBidi() )
nBlanks = nBlanks + static_cast<SwBidiPortion*>(pPor)->GetSpaceCnt( rInf );
- ((SwTxtSizeInfo &)rInf).SetIdx( rInf.GetIdx() + pPor->GetLen() );
+ ((SwTextSizeInfo &)rInf).SetIdx( rInf.GetIdx() + pPor->GetLen() );
}
- ((SwTxtSizeInfo &)rInf).SetIdx( nTmpStart );
+ ((SwTextSizeInfo &)rInf).SetIdx( nTmpStart );
return nBlanks;
}
@@ -269,11 +269,11 @@ SwDoubleLinePortion::SwDoubleLinePortion(const SwMultiCreator& rCreate, sal_Int3
pBracket->nStart = 0;
else
{
- const SwTxtAttr& rAttr = *rCreate.pAttr;
+ const SwTextAttr& rAttr = *rCreate.pAttr;
pBracket->nStart = rAttr.GetStart();
const SfxPoolItem * const pItem =
- CharFmt::GetItem( rAttr, RES_CHRATR_TWO_LINES );
+ CharFormat::GetItem( rAttr, RES_CHRATR_TWO_LINES );
if ( pItem )
{
pTwo = static_cast<const SvxTwoLinesItem*>(pItem);
@@ -292,15 +292,15 @@ SwDoubleLinePortion::SwDoubleLinePortion(const SwMultiCreator& rCreate, sal_Int3
sal_uInt8 nTmp = SW_SCRIPTS;
if( pBracket->cPre > 255 )
{
- OUString aTxt = OUString(pBracket->cPre);
- nTmp = SwScriptInfo::WhichFont( 0, &aTxt, 0 );
+ OUString aText = OUString(pBracket->cPre);
+ nTmp = SwScriptInfo::WhichFont( 0, &aText, 0 );
}
pBracket->nPreScript = nTmp;
nTmp = SW_SCRIPTS;
if( pBracket->cPost > 255 )
{
- OUString aTxt = OUString(pBracket->cPost);
- nTmp = SwScriptInfo::WhichFont( 0, &aTxt, 0 );
+ OUString aText = OUString(pBracket->cPost);
+ nTmp = SwScriptInfo::WhichFont( 0, &aText, 0 );
}
pBracket->nPostScript = nTmp;
@@ -319,10 +319,10 @@ SwDoubleLinePortion::SwDoubleLinePortion(const SwMultiCreator& rCreate, sal_Int3
// paints the wished bracket,
// if the multiportion has surrounding brackets.
-// The X-position of the SwTxtPaintInfo will be modified:
+// The X-position of the SwTextPaintInfo will be modified:
// the open bracket sets position behind itself,
// the close bracket in front of itself.
-void SwDoubleLinePortion::PaintBracket( SwTxtPaintInfo &rInf,
+void SwDoubleLinePortion::PaintBracket( SwTextPaintInfo &rInf,
long nSpaceAdd,
bool bOpen ) const
{
@@ -372,7 +372,7 @@ void SwDoubleLinePortion::SetBrackets( const SwDoubleLinePortion& rDouble )
// calculates the size of the brackets => pBracket,
// reduces the nMaxWidth-parameter ( minus bracket-width )
// and moves the rInf-x-position behind the opening bracket.
-void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWidth )
+void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxWidth )
{
nMaxWidth -= rInf.X();
SwFont* pTmpFnt = new SwFont( *rInf.GetFont() );
@@ -386,7 +386,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
if( SW_SCRIPTS > pBracket->nPreScript )
pTmpFnt->SetActual( pBracket->nPreScript );
SwFontSave aSave( rInf, pTmpFnt );
- SwPosSize aSize = rInf.GetTxtSize( aStr );
+ SwPosSize aSize = rInf.GetTextSize( aStr );
pBracket->nAscent = rInf.GetAscent();
pBracket->nHeight = aSize.Height();
pTmpFnt->SetActual( nActualScr );
@@ -410,7 +410,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
if( SW_SCRIPTS > pBracket->nPostScript )
pTmpFnt->SetActual( pBracket->nPostScript );
SwFontSave aSave( rInf, pTmpFnt );
- SwPosSize aSize = rInf.GetTxtSize( aStr );
+ SwPosSize aSize = rInf.GetTextSize( aStr );
const sal_uInt16 nTmpAsc = rInf.GetAscent();
if( nTmpAsc > pBracket->nAscent )
{
@@ -439,7 +439,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
// calculates the number of blanks in each line and
// the difference of the width of the two lines.
// These results are used from the text adjustment.
-void SwDoubleLinePortion::CalcBlanks( SwTxtFormatInfo &rInf )
+void SwDoubleLinePortion::CalcBlanks( SwTextFormatInfo &rInf )
{
SwLinePortion* pPor = GetRoot().GetFirstPortion();
sal_Int32 nNull = 0;
@@ -448,8 +448,8 @@ void SwDoubleLinePortion::CalcBlanks( SwTxtFormatInfo &rInf )
SetTab2( false );
for( nBlank1 = 0; pPor; pPor = pPor->GetPortion() )
{
- if( pPor->InTxtGrp() )
- nBlank1 = nBlank1 + static_cast<SwTxtPortion*>(pPor)->GetSpaceCnt( rInf, nNull );
+ if( pPor->InTextGrp() )
+ nBlank1 = nBlank1 + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull );
rInf.SetIdx( rInf.GetIdx() + pPor->GetLen() );
if( pPor->InTabGrp() )
SetTab1( true );
@@ -462,8 +462,8 @@ void SwDoubleLinePortion::CalcBlanks( SwTxtFormatInfo &rInf )
}
for( nBlank2 = 0; pPor; pPor = pPor->GetPortion() )
{
- if( pPor->InTxtGrp() )
- nBlank2 = nBlank2 + static_cast<SwTxtPortion*>(pPor)->GetSpaceCnt( rInf, nNull );
+ if( pPor->InTextGrp() )
+ nBlank2 = nBlank2 + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull );
rInf.SetIdx( rInf.GetIdx() + pPor->GetLen() );
if( pPor->InTabGrp() )
SetTab2( true );
@@ -471,7 +471,7 @@ void SwDoubleLinePortion::CalcBlanks( SwTxtFormatInfo &rInf )
rInf.SetIdx( nStart );
}
-long SwDoubleLinePortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo & ) const
+long SwDoubleLinePortion::CalcSpacing( long nSpaceAdd, const SwTextSizeInfo & ) const
{
return HasTabulator() ? 0 : GetSpaceCnt() * nSpaceAdd / SPACING_PRECISION_FACTOR;
}
@@ -553,7 +553,7 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
SetRuby();
OSL_ENSURE( SW_MC_RUBY == rCreate.nId, "Ruby expected" );
OSL_ENSURE( RES_TXTATR_CJK_RUBY == rCreate.pAttr->Which(), "Wrong attribute" );
- const SwFmtRuby& rRuby = rCreate.pAttr->GetRuby();
+ const SwFormatRuby& rRuby = rCreate.pAttr->GetRuby();
nAdjustment = rRuby.GetAdjustment();
nRubyOffset = nOffs;
@@ -563,12 +563,12 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
else
SetTop( ! rRuby.GetPosition() );
- const SwCharFmt *const pFmt =
- static_txtattr_cast<SwTxtRuby const*>(rCreate.pAttr)->GetCharFmt();
+ const SwCharFormat *const pFormat =
+ static_txtattr_cast<SwTextRuby const*>(rCreate.pAttr)->GetCharFormat();
SwFont *pRubyFont;
- if( pFmt )
+ if( pFormat )
{
- const SwAttrSet& rSet = pFmt->GetAttrSet();
+ const SwAttrSet& rSet = pFormat->GetAttrSet();
pRubyFont = new SwFont( rFnt );
pRubyFont->SetDiffFnt( &rSet, &rIDocumentSettingAccess );
@@ -579,16 +579,16 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
pRubyFont = NULL;
OUString aStr = rRuby.GetText().copy( nOffs );
- SwFldPortion *pFld = new SwFldPortion( aStr, pRubyFont );
- pFld->SetNextOffset( nOffs );
- pFld->SetFollow( true );
+ SwFieldPortion *pField = new SwFieldPortion( aStr, pRubyFont );
+ pField->SetNextOffset( nOffs );
+ pField->SetFollow( true );
if( OnTop() )
- GetRoot().SetPortion( pFld );
+ GetRoot().SetPortion( pField );
else
{
GetRoot().SetNext( new SwLineLayout() );
- GetRoot().GetNext()->SetPortion( pFld );
+ GetRoot().GetNext()->SetPortion( pField );
}
// ruby portions have the same direction as the frame directions
@@ -615,7 +615,7 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
// Notice: the smaller line will be manipulated, normally it's the ruby line,
// but it could be the main text, too.
// If there is a tabulator in smaller line, no adjustment is possible.
-void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
+void SwRubyPortion::_Adjust( SwTextFormatInfo &rInf )
{
SwTwips nLineDiff = GetRoot().Width() - GetRoot().GetNext()->Width();
sal_Int32 nOldIdx = rInf.GetIdx();
@@ -650,8 +650,8 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
SwLinePortion *pPor;
for( pPor = pCurr->GetFirstPortion(); pPor; pPor = pPor->GetPortion() )
{
- if( pPor->InTxtGrp() )
- static_cast<SwTxtPortion*>(pPor)->GetSpaceCnt( rInf, nCharCnt );
+ if( pPor->InTextGrp() )
+ static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nCharCnt );
rInf.SetIdx( rInf.GetIdx() + pPor->GetLen() );
}
if( nCharCnt > nSub )
@@ -678,7 +678,7 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
if( nLeft || nRight )
{
if( !pCurr->GetPortion() )
- pCurr->SetPortion(SwTxtPortion::CopyLinePortion(*pCurr));
+ pCurr->SetPortion(SwTextPortion::CopyLinePortion(*pCurr));
if( nLeft )
{
SwMarginPortion *pMarg = new SwMarginPortion( 0 );
@@ -712,17 +712,17 @@ void SwRubyPortion::CalcRubyOffset()
return;
}
const SwLinePortion *pPor = pCurr->GetFirstPortion();
- const SwFldPortion *pFld = NULL;
+ const SwFieldPortion *pField = NULL;
while( pPor )
{
- if( pPor->InFldGrp() )
- pFld = static_cast<const SwFldPortion*>(pPor);
+ if( pPor->InFieldGrp() )
+ pField = static_cast<const SwFieldPortion*>(pPor);
pPor = pPor->GetPortion();
}
- if( pFld )
+ if( pField )
{
- if( pFld->HasFollow() )
- nRubyOffset = pFld->GetNextOffset();
+ if( pField->HasFollow() )
+ nRubyOffset = pField->GetNextOffset();
else
nRubyOffset = COMPLETE_STRING;
}
@@ -734,10 +734,10 @@ void SwRubyPortion::CalcRubyOffset()
// no 2-line-format reference is passed. If there is a 2-line-format reference,
// then the rValue is set only, if the 2-line-attribute's value is set _and_
// the 2-line-formats has the same brackets.
-static bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &rpRef,
+static bool lcl_Has2Lines( const SwTextAttr& rAttr, const SvxTwoLinesItem* &rpRef,
bool &rValue )
{
- const SfxPoolItem* pItem = CharFmt::GetItem( rAttr, RES_CHRATR_TWO_LINES );
+ const SfxPoolItem* pItem = CharFormat::GetItem( rAttr, RES_CHRATR_TWO_LINES );
if( pItem )
{
rValue = static_cast<const SvxTwoLinesItem*>(pItem)->GetValue();
@@ -760,10 +760,10 @@ static bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &rpRef
// If there is a charrotate-format reference, then the rValue is set only,
// if the charrotate-attribute's value is set _and_ identical
// to the charrotate-format's value.
-static bool lcl_HasRotation( const SwTxtAttr& rAttr,
+static bool lcl_HasRotation( const SwTextAttr& rAttr,
const SvxCharRotateItem* &rpRef, bool &rValue )
{
- const SfxPoolItem* pItem = CharFmt::GetItem( rAttr, RES_CHRATR_ROTATE );
+ const SfxPoolItem* pItem = CharFormat::GetItem( rAttr, RES_CHRATR_ROTATE );
if ( pItem )
{
rValue = static_cast<const SvxCharRotateItem*>(pItem)->GetValue();
@@ -787,7 +787,7 @@ static bool lcl_HasRotation( const SwTxtAttr& rAttr,
// interrupts the first attribute.
// E.g. a ruby portion interrupts a 2-line-attribute, a 2-line-attribute
// with different brackets interrupts another 2-line-attribute.
-SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
+SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
SwMultiPortion* pMulti ) const
{
SwScriptInfo& rSI = const_cast<SwParaPortion*>(GetParaPortion())->GetScriptInfo();
@@ -802,22 +802,22 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
}
else
// no nested bidi portion required
- nCurrLevel = GetTxtFrm()->IsRightToLeft() ? 1 : 0;
+ nCurrLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0;
// check if there is a field at rPos:
sal_uInt8 nNextLevel = nCurrLevel;
- bool bFldBidi = false;
+ bool bFieldBidi = false;
- if ( rPos < GetTxt().getLength() && CH_TXTATR_BREAKWORD == GetChar( rPos ) )
+ if ( rPos < GetText().getLength() && CH_TXTATR_BREAKWORD == GetChar( rPos ) )
{
- bFldBidi = true;
+ bFieldBidi = true;
}
else
nNextLevel = rSI.DirType( rPos );
- if ( GetTxt().getLength() != rPos && nNextLevel > nCurrLevel )
+ if ( GetText().getLength() != rPos && nNextLevel > nCurrLevel )
{
- rPos = bFldBidi ? rPos + 1 : rSI.NextDirChg( rPos, &nCurrLevel );
+ rPos = bFieldBidi ? rPos + 1 : rSI.NextDirChg( rPos, &nCurrLevel );
if ( COMPLETE_STRING == rPos )
return NULL;
SwMultiCreator *pRet = new SwMultiCreator;
@@ -834,28 +834,28 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
const SvxCharRotateItem* pRotate = NULL;
const SfxPoolItem* pRotItem;
- if( SfxItemState::SET == m_pFrm->GetTxtNode()->GetSwAttrSet().
+ if( SfxItemState::SET == m_pFrm->GetTextNode()->GetSwAttrSet().
GetItemState( RES_CHRATR_ROTATE, true, &pRotItem ) &&
static_cast<const SvxCharRotateItem*>(pRotItem)->GetValue() )
pRotate = static_cast<const SvxCharRotateItem*>(pRotItem);
else
pRotItem = NULL;
const SvxTwoLinesItem* p2Lines = NULL;
- const SwTxtNode *pLclTxtNode = m_pFrm->GetTxtNode();
- if( !pLclTxtNode )
+ const SwTextNode *pLclTextNode = m_pFrm->GetTextNode();
+ if( !pLclTextNode )
return NULL;
const SfxPoolItem* pItem;
- if( SfxItemState::SET == pLclTxtNode->GetSwAttrSet().
+ if( SfxItemState::SET == pLclTextNode->GetSwAttrSet().
GetItemState( RES_CHRATR_TWO_LINES, true, &pItem ) &&
static_cast<const SvxTwoLinesItem*>(pItem)->GetValue() )
p2Lines = static_cast<const SvxTwoLinesItem*>(pItem);
else
pItem = NULL;
- const SwpHints *pHints = pLclTxtNode->GetpSwpHints();
+ const SwpHints *pHints = pLclTextNode->GetpSwpHints();
if( !pHints && !p2Lines && !pRotate )
return NULL;
- const SwTxtAttr *pRuby = NULL;
+ const SwTextAttr *pRuby = NULL;
bool bTwo = false;
bool bRot = false;
size_t n2Lines = SAL_MAX_SIZE;
@@ -863,7 +863,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
const size_t nCount = pHints ? pHints->Count() : 0;
for( size_t i = 0; i < nCount; ++i )
{
- const SwTxtAttr *pTmp = (*pHints)[i];
+ const SwTextAttr *pTmp = (*pHints)[i];
sal_Int32 nStart = pTmp->GetStart();
if( rPos < nStart )
break;
@@ -896,11 +896,11 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
pRet->pItem = NULL;
pRet->pAttr = pRuby;
pRet->nId = SW_MC_RUBY;
- pRet->nLevel = GetTxtFrm()->IsRightToLeft() ? 1 : 0;
+ pRet->nLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0;
return pRet;
}
if( n2Lines < nCount || ( pItem && pItem == p2Lines &&
- rPos < GetTxt().getLength() ) )
+ rPos < GetText().getLength() ) )
{ // The winner is a 2-line-attribute,
// the end of the multiportion depends on the following attributes...
SwMultiCreator *pRet = new SwMultiCreator;
@@ -920,7 +920,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
aEnd.push_front( *pRet->pAttr->End() );
if( pItem )
{
- aEnd.front() = GetTxt().getLength();
+ aEnd.front() = GetText().getLength();
bOn = static_cast<const SvxTwoLinesItem*>(pItem)->GetEndBracket() ==
p2Lines->GetEndBracket() &&
static_cast<const SvxTwoLinesItem*>(pItem)->GetStartBracket() ==
@@ -931,10 +931,10 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
{
pRet->pItem = pItem;
pRet->pAttr = NULL;
- aEnd.push_front( GetTxt().getLength() );
+ aEnd.push_front( GetText().getLength() );
}
pRet->nId = SW_MC_DOUBLE;
- pRet->nLevel = GetTxtFrm()->IsRightToLeft() ? 1 : 0;
+ pRet->nLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0;
// n2Lines is the index of the last 2-line-attribute, which contains
// the actual position.
@@ -955,7 +955,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
// continuity attribute.
for( size_t i = 0; i < nCount; ++i )
{
- const SwTxtAttr *pTmp = (*pHints)[i];
+ const SwTextAttr *pTmp = (*pHints)[i];
if( *pTmp->GetAnyEnd() <= rPos )
continue;
if( rPos < pTmp->GetStart() )
@@ -1016,7 +1016,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
return pRet;
}
if( nRotate < nCount || ( pRotItem && pRotItem == pRotate &&
- rPos < GetTxt().getLength() ) )
+ rPos < GetText().getLength() ) )
{ // The winner is a rotate-attribute,
// the end of the multiportion depends on the following attributes...
SwMultiCreator *pRet = new SwMultiCreator;
@@ -1028,12 +1028,12 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
// The bOn flag signs the state of the last 2-line attribute in the
// aEnd-stack, which could interrupts the winning rotation attribute.
bool bOn = pItem;
- aEnd.push_front( GetTxt().getLength() );
+ aEnd.push_front( GetText().getLength() );
sal_Int32 n2Start = rPos;
for( size_t i = 0; i < nCount; ++i )
{
- const SwTxtAttr *pTmp = (*pHints)[i];
+ const SwTextAttr *pTmp = (*pHints)[i];
if( *pTmp->GetAnyEnd() <= n2Start )
continue;
if( n2Start < pTmp->GetStart() )
@@ -1092,7 +1092,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
aEnd.push_front( *pRet->pAttr->End() );
if( pRotItem )
{
- aEnd.front() = GetTxt().getLength();
+ aEnd.front() = GetText().getLength();
bOn = static_cast<const SvxCharRotateItem*>(pRotItem)->GetValue() ==
pRotate->GetValue();
}
@@ -1101,11 +1101,11 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
{
pRet->pItem = pRotItem;
pRet->pAttr = NULL;
- aEnd.push_front( GetTxt().getLength() );
+ aEnd.push_front( GetText().getLength() );
}
for( size_t i = 0; i < nCount; ++i )
{
- const SwTxtAttr *pTmp = (*pHints)[i];
+ const SwTextAttr *pTmp = (*pHints)[i];
if( *pTmp->GetAnyEnd() <= rPos )
continue;
if( rPos < pTmp->GetStart() )
@@ -1165,7 +1165,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
// The destructor restores the values of the last manipulation.
class SwSpaceManipulator
{
- SwTxtPaintInfo& rInfo;
+ SwTextPaintInfo& rInfo;
SwMultiPortion& rMulti;
std::vector<long>* pOldSpaceAdd;
sal_uInt16 nOldSpIdx;
@@ -1173,13 +1173,13 @@ class SwSpaceManipulator
bool bSpaceChg;
sal_uInt8 nOldDir;
public:
- SwSpaceManipulator( SwTxtPaintInfo& rInf, SwMultiPortion& rMult );
+ SwSpaceManipulator( SwTextPaintInfo& rInf, SwMultiPortion& rMult );
~SwSpaceManipulator();
void SecondLine();
inline long GetSpaceAdd() const { return nSpaceAdd; }
};
-SwSpaceManipulator::SwSpaceManipulator( SwTxtPaintInfo& rInf,
+SwSpaceManipulator::SwSpaceManipulator( SwTextPaintInfo& rInf,
SwMultiPortion& rMult )
: rInfo(rInf)
, rMulti(rMult)
@@ -1247,8 +1247,8 @@ SwSpaceManipulator::~SwSpaceManipulator()
// Manages the paint for a SwMultiPortion.
// External, for the calling function, it seems to be a normal Paint-function,
-// internal it is like a SwTxtFrm::Paint with multiple DrawTextLines
-void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
+// internal it is like a SwTextFrm::Paint with multiple DrawTextLines
+void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
SwMultiPortion& rMulti, const SwMultiPortion* pEnvPor )
{
SwTextGridItem const*const pGrid(GetGridItem(pFrm->FindPageFrm()));
@@ -1284,7 +1284,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
// and the layout mode
OSL_ENSURE( ! pEnvPor || pEnvPor->IsBidi(),
"Oh no, I expected a BidiPortion" );
- nFrmDir = GetInfo().GetTxtFrm()->IsRightToLeft() ? 1 : 0;
+ nFrmDir = GetInfo().GetTextFrm()->IsRightToLeft() ? 1 : 0;
nEnvDir = pEnvPor ? static_cast<const SwBidiPortion*>(pEnvPor)->GetLevel() % 2 : nFrmDir;
nThisDir = static_cast<SwBidiPortion&>(rMulti).GetLevel() % 2;
}
@@ -1434,14 +1434,14 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
bool bSeeked = true;
GetInfo().SetLen( pPor->GetLen() );
- if( bRest && pPor->InFldGrp() && !pPor->GetLen() )
+ if( bRest && pPor->InFieldGrp() && !pPor->GetLen() )
{
- if( static_cast<SwFldPortion*>(pPor)->HasFont() )
+ if( static_cast<SwFieldPortion*>(pPor)->HasFont() )
bSeeked = false;
else
SeekAndChgBefore( GetInfo() );
}
- else if( pPor->InTxtGrp() || pPor->InFldGrp() || pPor->InTabGrp() )
+ else if( pPor->InTextGrp() || pPor->InFieldGrp() || pPor->InTabGrp() )
SeekAndChg( GetInfo() );
else if ( !bFirst && pPor->IsBreakPortion() && GetInfo().GetOpt().IsParagraph() )
{
@@ -1474,7 +1474,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
{
// we do not allow any rotation inside a bidi portion
SwFont* pTmpFont = GetInfo().GetFont();
- pTmpFont->SetVertical( 0, GetInfo().GetTxtFrm()->IsVertical() );
+ pTmpFont->SetVertical( 0, GetInfo().GetTextFrm()->IsVertical() );
}
if( pPor->IsMultiPortion() && static_cast<SwMultiPortion*>(pPor)->IsBidi() )
@@ -1486,7 +1486,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
else
pPor->Paint( GetInfo() );
- if( GetFnt()->IsURL() && pPor->InTxtGrp() )
+ if( GetFnt()->IsURL() && pPor->InTextGrp() )
GetInfo().NotifyURL( *pPor );
bFirst &= !pPor->GetLen();
@@ -1573,25 +1573,25 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
SetPropFont( 0 );
}
-static bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpFld )
+static bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpField )
{
SwLinePortion* pLast = pLine;
- rpFld = pLine->GetPortion();
- while( rpFld && !rpFld->InFldGrp() )
+ rpField = pLine->GetPortion();
+ while( rpField && !rpField->InFieldGrp() )
{
- pLast = rpFld;
- rpFld = rpFld->GetPortion();
+ pLast = rpField;
+ rpField = rpField->GetPortion();
}
- bool bRet = rpFld != 0;
+ bool bRet = rpField != 0;
if( bRet )
{
- if( static_cast<SwFldPortion*>(rpFld)->IsFollow() )
+ if( static_cast<SwFieldPortion*>(rpField)->IsFollow() )
{
- rpFld->Truncate();
+ rpField->Truncate();
pLast->SetPortion( NULL );
}
else
- rpFld = NULL;
+ rpField = NULL;
}
pLine->Truncate();
return bRet;
@@ -1600,7 +1600,7 @@ static bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpFld )
// If a multi portion completely has to go to the
// next line, this function is called to trunctate
// the rest of the remaining multi portion
-static void lcl_TruncateMultiPortion( SwMultiPortion& rMulti, SwTxtFormatInfo& rInf,
+static void lcl_TruncateMultiPortion( SwMultiPortion& rMulti, SwTextFormatInfo& rInf,
sal_Int32 nStartIdx )
{
rMulti.GetRoot().Truncate();
@@ -1620,8 +1620,8 @@ static void lcl_TruncateMultiPortion( SwMultiPortion& rMulti, SwTxtFormatInfo& r
// Manages the formatting of a SwMultiPortion. External, for the calling
// function, it seems to be a normal Format-function, internal it is like a
-// SwTxtFrm::_Format with multiple BuildPortions
-bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
+// SwTextFrm::_Format with multiple BuildPortions
+bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
SwMultiPortion& rMulti )
{
SwTwips nMaxWidth = rInf.Width();
@@ -1654,7 +1654,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
if ( rMulti.IsBidi() )
{
// set layout mode
- aLayoutModeModifier.Modify( ! rInf.GetTxtFrm()->IsRightToLeft() );
+ aLayoutModeModifier.Modify( ! rInf.GetTextFrm()->IsRightToLeft() );
}
SwTwips nTmpX = 0;
@@ -1681,15 +1681,15 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
if (!pUpperFrm)
return false;
const SwTableLine* pLine = static_cast<const SwRowFrm*>(pUpperFrm->GetUpper())->GetTabLine();
- const SwFmtFrmSize& rFrmFmtSize = pLine->GetFrmFmt()->GetFrmSize();
- if ( ATT_VAR_SIZE == rFrmFmtSize.GetHeightSizeType() )
+ const SwFormatFrmSize& rFrameFormatSize = pLine->GetFrameFormat()->GetFrmSize();
+ if ( ATT_VAR_SIZE == rFrameFormatSize.GetHeightSizeType() )
pUpperFrm = pPage;
}
- if ( pUpperFrm == pPage && !pFrm->IsInFtn() )
+ if ( pUpperFrm == pPage && !pFrm->IsInFootnote() )
pUpperFrm = pPage->FindBodyCont();
nMaxWidth = pUpperFrm ?
- ( rInf.GetTxtFrm()->IsVertical() ?
+ ( rInf.GetTextFrm()->IsVertical() ?
pUpperFrm->Prt().Width() :
pUpperFrm->Prt().Height() ) :
USHRT_MAX;
@@ -1733,14 +1733,14 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
}
// save some values
- const OUString* pOldTxt = &(rInf.GetTxt());
+ const OUString* pOldText = &(rInf.GetText());
const SwTwips nOldPaintOfst = rInf.GetPaintOfst();
std::shared_ptr<vcl::TextLayoutCache> const pOldCachedVclData(rInf.GetCachedVclData());
rInf.SetCachedVclData(nullptr);
- OUString const aMultiStr( rInf.GetTxt().copy(0, nMultiLen + rInf.GetIdx()) );
- rInf.SetTxt( aMultiStr );
- SwTxtFormatInfo aInf( rInf, rMulti.GetRoot(), nActWidth );
+ OUString const aMultiStr( rInf.GetText().copy(0, nMultiLen + rInf.GetIdx()) );
+ rInf.SetText( aMultiStr );
+ SwTextFormatInfo aInf( rInf, rMulti.GetRoot(), nActWidth );
// Do we allow break cuts? The FirstMulti-Flag is evaluated during
// line break determination.
bool bFirstMulti = rInf.GetIdx() != rInf.GetLineStart();
@@ -1768,16 +1768,16 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
aInf.RealWidth( sal_uInt16(nActWidth) );
aInf.SetFirstMulti( bFirstMulti );
aInf.SetNumDone( rInf.IsNumDone() );
- aInf.SetFtnDone( rInf.IsFtnDone() );
+ aInf.SetFootnoteDone( rInf.IsFootnoteDone() );
if( pFirstRest )
{
- OSL_ENSURE( pFirstRest->InFldGrp(), "BuildMulti: Fieldrest expected");
- SwFldPortion *pFld =
- static_cast<SwFldPortion*>(pFirstRest)->Clone(
- static_cast<SwFldPortion*>(pFirstRest)->GetExp() );
- pFld->SetFollow( true );
- aInf.SetRest( pFld );
+ OSL_ENSURE( pFirstRest->InFieldGrp(), "BuildMulti: Fieldrest expected");
+ SwFieldPortion *pField =
+ static_cast<SwFieldPortion*>(pFirstRest)->Clone(
+ static_cast<SwFieldPortion*>(pFirstRest)->GetExp() );
+ pField->SetFollow( true );
+ aInf.SetRest( pField );
}
aInf.SetRuby( rMulti.IsRuby() && rMulti.OnTop() );
@@ -1812,18 +1812,18 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
pCurr = pCurr->GetNext();
nStart = aInf.GetIdx();
aInf.X( nTmpX );
- SwTxtFormatInfo aTmp( aInf, *pCurr, nActWidth );
+ SwTextFormatInfo aTmp( aInf, *pCurr, nActWidth );
if( rMulti.IsRuby() )
{
aTmp.SetRuby( !rMulti.OnTop() );
pNextFirst = aInf.GetRest();
if( pSecondRest )
{
- OSL_ENSURE( pSecondRest->InFldGrp(), "Fieldrest expected");
- SwFldPortion *pFld = static_cast<SwFldPortion*>(pSecondRest)->Clone(
- static_cast<SwFldPortion*>(pSecondRest)->GetExp() );
- pFld->SetFollow( true );
- aTmp.SetRest( pFld );
+ OSL_ENSURE( pSecondRest->InFieldGrp(), "Fieldrest expected");
+ SwFieldPortion *pField = static_cast<SwFieldPortion*>(pSecondRest)->Clone(
+ static_cast<SwFieldPortion*>(pSecondRest)->GetExp() );
+ pField->SetFollow( true );
+ aTmp.SetRest( pField );
}
if( !rMulti.OnTop() && nFirstLen < nMultiLen )
bRet = true;
@@ -1867,7 +1867,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
nActWidth = ( 3 * nMaxWidth + nMinWidth + 3 ) / 4;
if ( nActWidth == nMaxWidth && rInf.GetLineStart() == rInf.GetIdx() )
// we have too less space, we must allow break cuts
- // ( the first multi flag is considered during TxtPortion::_Format() )
+ // ( the first multi flag is considered during TextPortion::_Format() )
bFirstMulti = false;
if( nActWidth <= nMinWidth )
break;
@@ -1876,7 +1876,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
{
// For Solaris, this optimization can causes trouble:
// Setting this to the portion width ( = rMulti.Width() )
- // can make GetTextBreak inside SwTxtGuess::Guess return to small
+ // can make GetTextBreak inside SwTextGuess::Guess return to small
// values. Therefore we add some extra twips.
if( nActWidth > nTmpX + rMulti.Width() + 6 )
nActWidth = nTmpX + rMulti.Width() + 6;
@@ -1966,7 +1966,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
// line break has to be performed!
if( bRet )
{
- OSL_ENSURE( !pNextFirst || pNextFirst->InFldGrp(),
+ OSL_ENSURE( !pNextFirst || pNextFirst->InFieldGrp(),
"BuildMultiPortion: Surprising restportion, field expected" );
SwMultiPortion *pTmp;
if( rMulti.IsDouble() )
@@ -1974,7 +1974,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
nMultiLen + rInf.GetIdx() );
else if( rMulti.IsRuby() )
{
- OSL_ENSURE( !pNextSecond || pNextSecond->InFldGrp(),
+ OSL_ENSURE( !pNextSecond || pNextSecond->InFieldGrp(),
"BuildMultiPortion: Surprising restportion, field expected" );
if ( rInf.GetIdx() == rInf.GetLineStart() )
@@ -1988,7 +1988,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
pTmp->GetRoot().SetNext( new SwLineLayout() );
pTmp->GetRoot().GetNext()->SetPortion( pNextSecond );
}
- pTmp->SetFollowFld();
+ pTmp->SetFollowField();
}
else
{
@@ -2044,7 +2044,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
if( pNextFirst && pTmp )
{
- pTmp->SetFollowFld();
+ pTmp->SetFollowField();
pTmp->GetRoot().SetPortion( pNextFirst );
}
else
@@ -2056,11 +2056,11 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
}
rInf.SetCachedVclData(pOldCachedVclData);
- rInf.SetTxt( *pOldTxt );
+ rInf.SetText( *pOldText );
rInf.SetPaintOfst( nOldPaintOfst );
rInf.SetStop( aInf.IsStop() );
rInf.SetNumDone( true );
- rInf.SetFtnDone( true );
+ rInf.SetFootnoteDone( true );
SeekAndChg( rInf );
delete pFirstRest;
delete pSecondRest;
@@ -2080,7 +2080,7 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
// restportion. This may be a multiportion, e.g. if the field is surrounded by
// a doubleline- or ruby-portion.
// The second parameter is the start index of the line.
-SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
+SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
sal_Int32 nPosition )
{
if( !nPosition )
@@ -2089,7 +2089,7 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
const SwMultiPortion *pTmpMulti = NULL;
const SwMultiPortion *pHelpMulti = NULL;
const SwLinePortion* pPor = pLine->GetFirstPortion();
- SwFldPortion *pFld = NULL;
+ SwFieldPortion *pField = NULL;
while( pPor )
{
if( pPor->GetLen() )
@@ -2100,18 +2100,18 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
pTmpMulti = NULL;
}
}
- if( pPor->InFldGrp() )
+ if( pPor->InFieldGrp() )
{
if( !pHelpMulti )
pTmpMulti = NULL;
- pFld = const_cast<SwFldPortion*>(static_cast<const SwFldPortion*>(pPor));
+ pField = const_cast<SwFieldPortion*>(static_cast<const SwFieldPortion*>(pPor));
}
else if( pPor->IsMultiPortion() )
{
OSL_ENSURE( !pHelpMulti || pHelpMulti->IsBidi(),
"Nested multiportions are forbidden." );
- pFld = NULL;
+ pField = NULL;
pTmpMulti = static_cast<const SwMultiPortion*>(pPor);
}
pPor = pPor->GetPortion();
@@ -2141,20 +2141,20 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
}
}
}
- if( pFld && !pFld->HasFollow() )
- pFld = NULL;
+ if( pField && !pField->HasFollow() )
+ pField = NULL;
SwLinePortion *pRest = NULL;
- if( pFld )
+ if( pField )
{
- const SwTxtAttr *pHint = GetAttr( nPosition - 1 );
+ const SwTextAttr *pHint = GetAttr( nPosition - 1 );
if ( pHint
&& ( pHint->Which() == RES_TXTATR_FIELD
|| pHint->Which() == RES_TXTATR_ANNOTATION ) )
{
- pRest = NewFldPortion( GetInfo(), pHint );
- if( pRest->InFldGrp() )
- static_cast<SwFldPortion*>(pRest)->TakeNextOffset( pFld );
+ pRest = NewFieldPortion( GetInfo(), pHint );
+ if( pRest->InFieldGrp() )
+ static_cast<SwFieldPortion*>(pRest)->TakeNextOffset( pField );
else
{
delete pRest;
@@ -2204,7 +2204,7 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
}
pTmp = new SwRubyPortion( *pCreate, *GetInfo().GetFont(),
- *pFrm->GetTxtNode()->getIDocumentSettingAccess(),
+ *pFrm->GetTextNode()->getIDocumentSettingAccess(),
nMultiPos, static_cast<const SwRubyPortion*>(pHelpMulti)->GetRubyOffset(),
pRubyPos );
}
@@ -2216,7 +2216,7 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
return pRest;
}
delete pCreate;
- pTmp->SetFollowFld();
+ pTmp->SetFollowField();
if( pRest )
{
SwLineLayout *pLay = &pTmp->GetRoot();
@@ -2233,65 +2233,65 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
return pRest;
}
-// SwTxtCursorSave notes the start and current line of a SwTxtCursor,
+// SwTextCursorSave notes the start and current line of a SwTextCursor,
// sets them to the values for GetCrsrOfst inside a multiportion
// and restores them in the destructor.
-SwTxtCursorSave::SwTxtCursorSave( SwTxtCursor* pTxtCursor,
+SwTextCursorSave::SwTextCursorSave( SwTextCursor* pTextCursor,
SwMultiPortion* pMulti,
SwTwips nY,
sal_uInt16& nX,
sal_Int32 nCurrStart,
long nSpaceAdd )
{
- pTxtCrsr = pTxtCursor;
- nStart = pTxtCursor->nStart;
- pTxtCursor->nStart = nCurrStart;
- pCurr = pTxtCursor->pCurr;
- pTxtCursor->pCurr = &pMulti->GetRoot();
- while( pTxtCursor->Y() + pTxtCursor->GetLineHeight() < nY &&
- pTxtCursor->Next() )
+ pTextCrsr = pTextCursor;
+ nStart = pTextCursor->nStart;
+ pTextCursor->nStart = nCurrStart;
+ pCurr = pTextCursor->pCurr;
+ pTextCursor->pCurr = &pMulti->GetRoot();
+ while( pTextCursor->Y() + pTextCursor->GetLineHeight() < nY &&
+ pTextCursor->Next() )
; // nothing
- nWidth = pTxtCursor->pCurr->Width();
- nOldProp = pTxtCursor->GetPropFont();
+ nWidth = pTextCursor->pCurr->Width();
+ nOldProp = pTextCursor->GetPropFont();
if ( pMulti->IsDouble() || pMulti->IsBidi() )
{
- bSpaceChg = pMulti->ChgSpaceAdd( pTxtCursor->pCurr, nSpaceAdd );
+ bSpaceChg = pMulti->ChgSpaceAdd( pTextCursor->pCurr, nSpaceAdd );
sal_Int32 nSpaceCnt;
if ( pMulti->IsDouble() )
{
- pTxtCursor->SetPropFont( 50 );
+ pTextCursor->SetPropFont( 50 );
nSpaceCnt = static_cast<SwDoubleLinePortion*>(pMulti)->GetSpaceCnt();
}
else
{
- const sal_Int32 nOldIdx = pTxtCursor->GetInfo().GetIdx();
- pTxtCursor->GetInfo().SetIdx ( nCurrStart );
- nSpaceCnt = static_cast<SwBidiPortion*>(pMulti)->GetSpaceCnt(pTxtCursor->GetInfo());
- pTxtCursor->GetInfo().SetIdx ( nOldIdx );
+ const sal_Int32 nOldIdx = pTextCursor->GetInfo().GetIdx();
+ pTextCursor->GetInfo().SetIdx ( nCurrStart );
+ nSpaceCnt = static_cast<SwBidiPortion*>(pMulti)->GetSpaceCnt(pTextCursor->GetInfo());
+ pTextCursor->GetInfo().SetIdx ( nOldIdx );
}
if( nSpaceAdd > 0 && !pMulti->HasTabulator() )
- pTxtCursor->pCurr->Width( static_cast<sal_uInt16>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) );
+ pTextCursor->pCurr->Width( static_cast<sal_uInt16>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) );
// For a BidiPortion we have to calculate the offset from the
// end of the portion
if ( nX && pMulti->IsBidi() )
- nX = pTxtCursor->pCurr->Width() - nX;
+ nX = pTextCursor->pCurr->Width() - nX;
}
else
bSpaceChg = false;
}
-SwTxtCursorSave::~SwTxtCursorSave()
+SwTextCursorSave::~SwTextCursorSave()
{
if( bSpaceChg )
- SwDoubleLinePortion::ResetSpaceAdd( pTxtCrsr->pCurr );
- pTxtCrsr->pCurr->Width( nWidth );
- pTxtCrsr->pCurr = pCurr;
- pTxtCrsr->nStart = nStart;
- pTxtCrsr->SetPropFont( nOldProp );
+ SwDoubleLinePortion::ResetSpaceAdd( pTextCrsr->pCurr );
+ pTextCrsr->pCurr->Width( nWidth );
+ pTextCrsr->pCurr = pCurr;
+ pTextCrsr->nStart = nStart;
+ pTextCrsr->SetPropFont( nOldProp );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index 67071a8245bb..f78baddd1ffa 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -22,12 +22,12 @@
#include "porlay.hxx"
#include "porexp.hxx"
-class SwTxtFormatInfo;
-class SwFldPortion;
-class SwTxtCursor;
+class SwTextFormatInfo;
+class SwFieldPortion;
+class SwTextCursor;
class SwLineLayout;
-class SwTxtPaintInfo;
-class SwTxtAttr;
+class SwTextPaintInfo;
+class SwTextAttr;
class SfxPoolItem;
class SwFont;
@@ -43,7 +43,7 @@ class SwFont;
struct SwMultiCreator
{
- const SwTxtAttr* pAttr;
+ const SwTextAttr* pAttr;
const SfxPoolItem* pItem;
sal_uInt8 nId;
sal_uInt8 nLevel;
@@ -73,7 +73,7 @@ struct SwBracket
class SwMultiPortion : public SwLinePortion
{
SwLineLayout aRoot; // One or more lines
- SwFldPortion *pFldRest; // Field rest from the previous line
+ SwFieldPortion *pFieldRest; // Field rest from the previous line
bool bTab1 :1; // First line tabulator
bool bTab2 :1; // Second line includes tabulator
bool bDouble :1; // Double line
@@ -81,12 +81,12 @@ class SwMultiPortion : public SwLinePortion
bool bBidi :1;
bool bTop :1; // Phonetic position
bool bFormatted :1; // Already formatted
- bool bFollowFld :1; // Field follow inside
- bool bFlyInCntnt:1; // Fly as character inside
+ bool bFollowField :1; // Field follow inside
+ bool bFlyInContent:1; // Fly as character inside
sal_uInt8 nDirection:2; // Direction (0/90/180/270 degrees)
protected:
explicit SwMultiPortion(sal_Int32 nEnd)
- : pFldRest(0)
+ : pFieldRest(0)
, bTab1(false)
, bTab2(false)
, bDouble(false)
@@ -94,8 +94,8 @@ protected:
, bBidi(false)
, bTop(false)
, bFormatted(false)
- , bFollowFld(false)
- , bFlyInCntnt(false)
+ , bFollowField(false)
+ , bFlyInContent(false)
, nDirection(0)
{
SetWhichPor(POR_MULTI);
@@ -114,28 +114,28 @@ public:
virtual ~SwMultiPortion();
const SwLineLayout& GetRoot() const { return aRoot; }
SwLineLayout& GetRoot() { return aRoot; }
- SwFldPortion* GetFldRest() { return pFldRest; }
- void SetFldRest( SwFldPortion* pNew ) { pFldRest = pNew; }
+ SwFieldPortion* GetFieldRest() { return pFieldRest; }
+ void SetFieldRest( SwFieldPortion* pNew ) { pFieldRest = pNew; }
inline bool HasTabulator() const { return bTab1 || bTab2; }
inline bool IsFormatted() const { return bFormatted; }
inline void SetFormatted() { bFormatted = true; }
- inline bool IsFollowFld() const { return bFollowFld; }
- inline void SetFollowFld() { bFollowFld = true; }
- inline bool HasFlyInCntnt() const { return bFlyInCntnt; }
- inline void SetFlyInCntnt( bool bNew ) { bFlyInCntnt = bNew; }
+ inline bool IsFollowField() const { return bFollowField; }
+ inline void SetFollowField() { bFollowField = true; }
+ inline bool HasFlyInContent() const { return bFlyInContent; }
+ inline void SetFlyInContent( bool bNew ) { bFlyInContent = bNew; }
inline bool IsDouble() const { return bDouble; }
inline bool IsRuby() const { return bRuby; }
inline bool IsBidi() const { return bBidi; }
inline bool OnTop() const { return bTop; }
void ActualizeTabulator();
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual long CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
virtual bool ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const;
// Summarize the internal lines to calculate the (external) size
- void CalcSize( SwTxtFormatter& rLine, SwTxtFormatInfo &rInf );
+ void CalcSize( SwTextFormatter& rLine, SwTextFormatInfo &rInf );
inline bool HasBrackets() const;
inline bool HasRotation() const { return 0 != (1 & nDirection); }
@@ -163,15 +163,15 @@ public:
inline SwBracket* GetBrackets() const { return pBracket; }
void SetBrackets( const SwDoubleLinePortion& rDouble );
- void PaintBracket( SwTxtPaintInfo& rInf, long nSpaceAdd, bool bOpen ) const;
- void FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWidth );
+ void PaintBracket( SwTextPaintInfo& rInf, long nSpaceAdd, bool bOpen ) const;
+ void FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxWidth );
inline sal_uInt16 PreWidth() const { return pBracket->nPreWidth; };
inline sal_uInt16 PostWidth() const { return pBracket->nPostWidth; }
inline void ClearBrackets()
{ pBracket->nPreWidth = pBracket->nPostWidth=0; Width( 0 ); }
inline sal_uInt16 BracketWidth(){ return PreWidth() + PostWidth(); }
- void CalcBlanks( SwTxtFormatInfo &rInf );
+ void CalcBlanks( SwTextFormatInfo &rInf );
static void ResetSpaceAdd( SwLineLayout* pCurr );
inline SwTwips GetLineDiff() const { return nLineDiff; }
inline sal_Int32 GetSpaceCnt() const
@@ -181,7 +181,7 @@ public:
inline sal_Int32 GetBlank1() const { return nBlank1; }
inline sal_Int32 GetBlank2() const { return nBlank2; }
- virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual long CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
virtual bool ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const SAL_OVERRIDE;
};
@@ -189,7 +189,7 @@ class SwRubyPortion : public SwMultiPortion
{
sal_Int32 nRubyOffset;
sal_uInt16 nAdjustment;
- void _Adjust( SwTxtFormatInfo &rInf);
+ void _Adjust( SwTextFormatInfo &rInf);
public:
SwRubyPortion( const SwRubyPortion& rRuby, sal_Int32 nEnd );
@@ -199,7 +199,7 @@ public:
const bool* pForceRubyPos );
void CalcRubyOffset();
- inline void Adjust( SwTxtFormatInfo &rInf )
+ inline void Adjust( SwTextFormatInfo &rInf )
{ if(nAdjustment && GetRoot().GetNext()) _Adjust(rInf); }
inline sal_uInt16 GetAdjustment() const { return nAdjustment; }
inline sal_Int32 GetRubyOffset() const { return nRubyOffset; }
@@ -223,27 +223,27 @@ public:
inline sal_uInt8 GetLevel() const { return nLevel; }
// Get number of blanks for justified alignment
- sal_Int32 GetSpaceCnt( const SwTxtSizeInfo &rInf ) const;
+ sal_Int32 GetSpaceCnt( const SwTextSizeInfo &rInf ) const;
// Calculates extra spacing based on number of blanks
- virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual long CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
// Manipulate the spacing array at pCurr
virtual bool ChgSpaceAdd( SwLineLayout* pCurr, long nSpaceAdd ) const SAL_OVERRIDE;
};
// For cursor travelling in multiportions
-class SwTxtCursorSave
+class SwTextCursorSave
{
- SwTxtCursor* pTxtCrsr;
+ SwTextCursor* pTextCrsr;
SwLineLayout* pCurr;
sal_Int32 nStart;
sal_uInt16 nWidth;
sal_uInt8 nOldProp;
bool bSpaceChg;
public:
- SwTxtCursorSave( SwTxtCursor* pTxtCursor, SwMultiPortion* pMulti,
+ SwTextCursorSave( SwTextCursor* pTextCursor, SwMultiPortion* pMulti,
SwTwips nY, sal_uInt16& nX, sal_Int32 nCurrStart, long nSpaceAdd );
- ~SwTxtCursorSave();
+ ~SwTextCursorSave();
};
inline bool SwMultiPortion::HasBrackets() const
diff --git a/sw/source/core/text/porref.cxx b/sw/source/core/text/porref.cxx
index 1f17acc7acbe..8e8e11aa5738 100644
--- a/sw/source/core/text/porref.cxx
+++ b/sw/source/core/text/porref.cxx
@@ -23,12 +23,12 @@
#include "porref.hxx"
#include "inftxt.hxx"
-void SwRefPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwRefPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( Width() )
{
rInf.DrawViewOpt( *this, POR_REF );
- SwTxtPortion::Paint( rInf );
+ SwTextPortion::Paint( rInf );
}
}
@@ -40,7 +40,7 @@ SwIsoRefPortion::SwIsoRefPortion() : nViewWidth(0)
SetWhichPor( POR_ISOREF );
}
-sal_uInt16 SwIsoRefPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwIsoRefPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
{
// Although we are const, nViewWidth should be calculated in the last
// moment possible
@@ -49,19 +49,19 @@ sal_uInt16 SwIsoRefPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
!rInf.GetOpt().IsReadonly() && !rInf.GetOpt().IsPagePreview() )
{
if( !nViewWidth )
- pThis->nViewWidth = rInf.GetTxtSize(OUString(' ')).Width();
+ pThis->nViewWidth = rInf.GetTextSize(OUString(' ')).Width();
}
else
pThis->nViewWidth = 0;
return nViewWidth;
}
-bool SwIsoRefPortion::Format( SwTxtFormatInfo &rInf )
+bool SwIsoRefPortion::Format( SwTextFormatInfo &rInf )
{
return SwLinePortion::Format( rInf );
}
-void SwIsoRefPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwIsoRefPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( Width() )
rInf.DrawViewOpt( *this, POR_REF );
diff --git a/sw/source/core/text/porref.hxx b/sw/source/core/text/porref.hxx
index e3ed4d9c39d0..8035d7f462c2 100644
--- a/sw/source/core/text/porref.hxx
+++ b/sw/source/core/text/porref.hxx
@@ -21,11 +21,11 @@
#include "portxt.hxx"
-class SwRefPortion : public SwTxtPortion
+class SwRefPortion : public SwTextPortion
{
public:
inline SwRefPortion(){ SetWhichPor( POR_REF ); }
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
@@ -35,10 +35,10 @@ class SwIsoRefPortion : public SwRefPortion
public:
SwIsoRefPortion();
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index d9d4fb922cc1..aadea9a52914 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -57,7 +57,7 @@ SwTmpEndPortion::SwTmpEndPortion( const SwLinePortion &rPortion )
SetWhichPor( POR_TMPEND );
}
-void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwTmpEndPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if (rInf.OnWin() && rInf.GetOpt().IsParagraph())
{
@@ -65,12 +65,12 @@ void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const
SwFont aFont(*pOldFnt);
aFont.SetColor(NON_PRINTING_CHARACTER_COLOR);
- const_cast<SwTxtPaintInfo&>(rInf).SetFont(&aFont);
+ const_cast<SwTextPaintInfo&>(rInf).SetFont(&aFont);
// draw the pilcrow
rInf.DrawText(OUString(CH_PAR), *this);
- const_cast<SwTxtPaintInfo&>(rInf).SetFont(const_cast<SwFont*>(pOldFnt));
+ const_cast<SwTextPaintInfo&>(rInf).SetFont(const_cast<SwFont*>(pOldFnt));
}
}
@@ -84,25 +84,25 @@ SwBreakPortion::SwBreakPortion( const SwLinePortion &rPortion )
sal_Int32 SwBreakPortion::GetCrsrOfst( const sal_uInt16 ) const
{ return 0; }
-sal_uInt16 SwBreakPortion::GetViewWidth( const SwTxtSizeInfo & ) const
+sal_uInt16 SwBreakPortion::GetViewWidth( const SwTextSizeInfo & ) const
{ return 0; }
SwLinePortion *SwBreakPortion::Compress()
-{ return (GetPortion() && GetPortion()->InTxtGrp() ? 0 : this); }
+{ return (GetPortion() && GetPortion()->InTextGrp() ? 0 : this); }
-void SwBreakPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwBreakPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( rInf.OnWin() && rInf.GetOpt().IsLineBreak() )
rInf.DrawLineBreak( *this );
}
-bool SwBreakPortion::Format( SwTxtFormatInfo &rInf )
+bool SwBreakPortion::Format( SwTextFormatInfo &rInf )
{
const SwLinePortion *pRoot = rInf.GetRoot();
Width( 0 );
Height( pRoot->Height() );
SetAscent( pRoot->GetAscent() );
- if ( rInf.GetIdx()+1 == rInf.GetTxt().getLength() )
+ if ( rInf.GetIdx()+1 == rInf.GetText().getLength() )
rInf.SetNewLine( true );
return true;
}
@@ -135,7 +135,7 @@ SwKernPortion::SwKernPortion( const SwLinePortion& rPortion ) :
SetWhichPor( POR_KERN );
}
-void SwKernPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwKernPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( Width() )
{
@@ -151,18 +151,18 @@ void SwKernPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.GetFont()->IsPaintBlank() )
{
- OUString aTxtDouble(" ");
+ OUString aTextDouble(" ");
SwRect aClipRect;
rInf.CalcRect( *this, &aClipRect, 0 );
SwSaveClip aClip( const_cast<OutputDevice*>(rInf.GetOut()) );
aClip.ChgClip( aClipRect, 0 );
- rInf.DrawText( aTxtDouble, *this, 0, 2, true );
+ rInf.DrawText( aTextDouble, *this, 0, 2, true );
}
}
}
-void SwKernPortion::FormatEOL( SwTxtFormatInfo &rInf )
+void SwKernPortion::FormatEOL( SwTextFormatInfo &rInf )
{
if ( bGridKern )
return;
@@ -185,32 +185,32 @@ SwArrowPortion::SwArrowPortion( const SwLinePortion &rPortion ) :
SetWhichPor( POR_ARROW );
}
-SwArrowPortion::SwArrowPortion( const SwTxtPaintInfo &rInf )
+SwArrowPortion::SwArrowPortion( const SwTextPaintInfo &rInf )
: bLeft( false )
{
- Height( (sal_uInt16)(rInf.GetTxtFrm()->Prt().Height()) );
- aPos.X() = rInf.GetTxtFrm()->Frm().Left() +
- rInf.GetTxtFrm()->Prt().Right();
- aPos.Y() = rInf.GetTxtFrm()->Frm().Top() +
- rInf.GetTxtFrm()->Prt().Bottom();
+ Height( (sal_uInt16)(rInf.GetTextFrm()->Prt().Height()) );
+ aPos.X() = rInf.GetTextFrm()->Frm().Left() +
+ rInf.GetTextFrm()->Prt().Right();
+ aPos.Y() = rInf.GetTextFrm()->Frm().Top() +
+ rInf.GetTextFrm()->Prt().Bottom();
SetWhichPor( POR_ARROW );
}
-void SwArrowPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwArrowPortion::Paint( const SwTextPaintInfo &rInf ) const
{
const_cast<SwArrowPortion*>(this)->aPos = rInf.GetPos();
}
SwLinePortion *SwArrowPortion::Compress() { return this; }
-SwTwips SwTxtFrm::EmptyHeight() const
+SwTwips SwTextFrm::EmptyHeight() const
{
if (IsCollapse()) {
SwViewShell *pSh = getRootFrm()->GetCurrShell();
if ( pSh->IsA( TYPE(SwCrsrShell) ) ) {
SwCrsrShell *pCrSh = static_cast<SwCrsrShell*>(pSh);
- SwCntntFrm *pCurrFrm=pCrSh->GetCurrFrm();
- if (pCurrFrm==(SwCntntFrm*)this) {
+ SwContentFrm *pCurrFrm=pCrSh->GetCurrFrm();
+ if (pCurrFrm==(SwContentFrm*)this) {
// do nothing
} else {
return 1;
@@ -219,20 +219,20 @@ SwTwips SwTxtFrm::EmptyHeight() const
return 1;
}
}
- OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::EmptyHeight with swapped frame" );
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrm::EmptyHeight with swapped frame" );
SwFont *pFnt;
- const SwTxtNode& rTxtNode = *GetTxtNode();
- const IDocumentSettingAccess* pIDSA = rTxtNode.getIDocumentSettingAccess();
+ const SwTextNode& rTextNode = *GetTextNode();
+ const IDocumentSettingAccess* pIDSA = rTextNode.getIDocumentSettingAccess();
SwViewShell *pSh = getRootFrm()->GetCurrShell();
- if ( rTxtNode.HasSwAttrSet() )
+ if ( rTextNode.HasSwAttrSet() )
{
- const SwAttrSet *pAttrSet = &( rTxtNode.GetSwAttrSet() );
+ const SwAttrSet *pAttrSet = &( rTextNode.GetSwAttrSet() );
pFnt = new SwFont( pAttrSet, pIDSA );
}
else
{
- SwFontAccess aFontAccess( &rTxtNode.GetAnyFmtColl(), pSh);
+ SwFontAccess aFontAccess( &rTextNode.GetAnyFormatColl(), pSh);
pFnt = new SwFont( aFontAccess.Get()->GetFont() );
pFnt->ChkMagic( pSh, pFnt->GetActual() );
}
@@ -244,19 +244,19 @@ SwTwips SwTxtFrm::EmptyHeight() const
if ( !pOut || !pSh->GetViewOptions()->getBrowseMode() ||
pSh->GetViewOptions()->IsPrtFormat() )
{
- pOut = rTxtNode.getIDocumentDeviceAccess()->getReferenceDevice(true);
+ pOut = rTextNode.getIDocumentDeviceAccess()->getReferenceDevice(true);
}
- const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess();
+ const IDocumentRedlineAccess* pIDRA = rTextNode.getIDocumentRedlineAccess();
if( IDocumentRedlineAccess::IsShowChanges( pIDRA->GetRedlineMode() ) )
{
- const sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTxtNode, USHRT_MAX );
+ const sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTextNode, USHRT_MAX );
if( USHRT_MAX != nRedlPos )
{
SwAttrHandler aAttrHandler;
- aAttrHandler.Init( GetTxtNode()->GetSwAttrSet(),
- *GetTxtNode()->getIDocumentSettingAccess(), NULL );
- SwRedlineItr aRedln( rTxtNode, *pFnt, aAttrHandler,
+ aAttrHandler.Init( GetTextNode()->GetSwAttrSet(),
+ *GetTextNode()->getIDocumentSettingAccess(), NULL );
+ SwRedlineItr aRedln( rTextNode, *pFnt, aAttrHandler,
nRedlPos, true );
}
}
@@ -276,18 +276,18 @@ SwTwips SwTxtFrm::EmptyHeight() const
return nRet;
}
-bool SwTxtFrm::FormatEmpty()
+bool SwTextFrm::FormatEmpty()
{
- OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::FormatEmpty with swapped frame" );
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrm::FormatEmpty with swapped frame" );
bool bCollapse = EmptyHeight( ) == 1 && this->IsCollapse( );
- if ( HasFollow() || GetTxtNode()->GetpSwpHints() ||
- 0 != GetTxtNode()->GetNumRule() ||
- GetTxtNode()->HasHiddenCharAttribute( true ) ||
- IsInFtn() || ( HasPara() && GetPara()->IsPrepMustFit() ) )
+ if ( HasFollow() || GetTextNode()->GetpSwpHints() ||
+ 0 != GetTextNode()->GetNumRule() ||
+ GetTextNode()->HasHiddenCharAttribute( true ) ||
+ IsInFootnote() || ( HasPara() && GetPara()->IsPrepMustFit() ) )
return false;
- const SwAttrSet& aSet = GetTxtNode()->GetSwAttrSet();
+ const SwAttrSet& aSet = GetTextNode()->GetSwAttrSet();
const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust();
if( !bCollapse && ( ( ( ! IsRightToLeft() && ( SVX_ADJUST_LEFT != nAdjust ) ) ||
( IsRightToLeft() && ( SVX_ADJUST_RIGHT != nAdjust ) ) ) ||
@@ -299,16 +299,16 @@ bool SwTxtFrm::FormatEmpty()
aSet.GetLRSpace().IsAutoFirst() ) )
return false;
- SwTxtFly aTxtFly( this );
+ SwTextFly aTextFly( this );
SwRect aRect;
bool bFirstFlyCheck = 0 != Prt().Height();
if ( !bCollapse && bFirstFlyCheck &&
- aTxtFly.IsOn() && aTxtFly.IsAnyObj( aRect ) )
+ aTextFly.IsOn() && aTextFly.IsAnyObj( aRect ) )
return false;
SwTwips nHeight = EmptyHeight();
- if ( GetTxtNode()->GetSwAttrSet().GetParaGrid().GetValue() &&
+ if ( GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() &&
IsInDocBody() )
{
SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm()));
@@ -335,7 +335,7 @@ bool SwTxtFrm::FormatEmpty()
SetCompletePaint();
}
if( !bCollapse && !bFirstFlyCheck &&
- aTxtFly.IsOn() && aTxtFly.IsAnyObj( aRect ) )
+ aTextFly.IsOn() && aTextFly.IsAnyObj( aRect ) )
return false;
// #i35635# - call method <HideAndShowObjects()>
@@ -345,7 +345,7 @@ bool SwTxtFrm::FormatEmpty()
return true;
}
-bool SwTxtFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
+bool SwTextFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
{
const SwFrm *pFrm = this;
rRegDiff = 0;
@@ -365,10 +365,10 @@ bool SwTxtFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
rRegDiff = pDesc->GetRegHeight();
if( !rRegDiff )
{
- const SwTxtFmtColl *pFmt = pDesc->GetRegisterFmtColl();
- if( pFmt )
+ const SwTextFormatColl *pFormat = pDesc->GetRegisterFormatColl();
+ if( pFormat )
{
- const SvxLineSpacingItem &rSpace = pFmt->GetLineSpacing();
+ const SvxLineSpacingItem &rSpace = pFormat->GetLineSpacing();
if( SVX_LINE_SPACE_FIX == rSpace.GetLineSpaceRule() )
{
rRegDiff = rSpace.GetLineHeight();
@@ -378,13 +378,13 @@ bool SwTxtFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
else
{
SwViewShell *pSh = getRootFrm()->GetCurrShell();
- SwFontAccess aFontAccess( pFmt, pSh );
+ SwFontAccess aFontAccess( pFormat, pSh );
SwFont aFnt( aFontAccess.Get()->GetFont() );
OutputDevice *pOut = 0;
if( !pSh || !pSh->GetViewOptions()->getBrowseMode() ||
pSh->GetViewOptions()->IsPrtFormat() )
- pOut = GetTxtNode()->getIDocumentDeviceAccess()->getReferenceDevice( true );
+ pOut = GetTextNode()->getIDocumentDeviceAccess()->getReferenceDevice( true );
if( pSh && !pOut )
pOut = pSh->GetWin();
@@ -455,7 +455,7 @@ bool SwTxtFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
return ( 0 != rRegDiff );
}
-void SwHiddenTextPortion::Paint( const SwTxtPaintInfo & rInf) const
+void SwHiddenTextPortion::Paint( const SwTextPaintInfo & rInf) const
{
(void)rInf;
#ifdef DBG_UTIL
@@ -472,15 +472,15 @@ void SwHiddenTextPortion::Paint( const SwTxtPaintInfo & rInf) const
#endif
}
-bool SwHiddenTextPortion::Format( SwTxtFormatInfo &rInf )
+bool SwHiddenTextPortion::Format( SwTextFormatInfo &rInf )
{
Width( 0 );
- rInf.GetTxtFrm()->HideFootnotes( rInf.GetIdx(), rInf.GetIdx() + GetLen() );
+ rInf.GetTextFrm()->HideFootnotes( rInf.GetIdx(), rInf.GetIdx() + GetLen() );
return false;
};
-void SwControlCharPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwControlCharPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if ( Width() ) // is only set during prepaint mode
{
@@ -504,27 +504,27 @@ void SwControlCharPortion::Paint( const SwTxtPaintInfo &rInf ) const
case CHAR_ZWSP :
aOutString = "/"; break;
// case CHAR_LRM :
-// rTxt = sal_Unicode(0x2514); break;
+// rText = sal_Unicode(0x2514); break;
// case CHAR_RLM :
-// rTxt = sal_Unicode(0x2518); break;
+// rText = sal_Unicode(0x2518); break;
}
if ( !mnHalfCharWidth )
- mnHalfCharWidth = rInf.GetTxtSize( aOutString ).Width() / 2;
+ mnHalfCharWidth = rInf.GetTextSize( aOutString ).Width() / 2;
Point aOldPos = rInf.GetPos();
Point aNewPos( aOldPos );
aNewPos.X() = aNewPos.X() + ( Width() / 2 ) - mnHalfCharWidth;
- const_cast< SwTxtPaintInfo& >( rInf ).SetPos( aNewPos );
+ const_cast< SwTextPaintInfo& >( rInf ).SetPos( aNewPos );
rInf.DrawText( aOutString, *this );
- const_cast< SwTxtPaintInfo& >( rInf ).SetPos( aOldPos );
+ const_cast< SwTextPaintInfo& >( rInf ).SetPos( aOldPos );
}
}
}
-bool SwControlCharPortion::Format( SwTxtFormatInfo &rInf )
+bool SwControlCharPortion::Format( SwTextFormatInfo &rInf )
{
const SwLinePortion* pRoot = rInf.GetRoot();
Width( 0 );
@@ -534,10 +534,10 @@ bool SwControlCharPortion::Format( SwTxtFormatInfo &rInf )
return false;
}
-sal_uInt16 SwControlCharPortion::GetViewWidth( const SwTxtSizeInfo& rInf ) const
+sal_uInt16 SwControlCharPortion::GetViewWidth( const SwTextSizeInfo& rInf ) const
{
if( !mnViewWidth )
- mnViewWidth = rInf.GetTxtSize(OUString(' ')).Width();
+ mnViewWidth = rInf.GetTextSize(OUString(' ')).Width();
return mnViewWidth;
}
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index 90ba3743f030..31f8ab0448bd 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -24,13 +24,13 @@
#define LINE_BREAK_WIDTH 150
#define SPECIAL_FONT_HEIGHT 200
-class SwTxtFormatInfo;
+class SwTextFormatInfo;
class SwTmpEndPortion : public SwLinePortion
{
public:
explicit SwTmpEndPortion( const SwLinePortion &rPortion );
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
@@ -40,9 +40,9 @@ public:
explicit SwBreakPortion( const SwLinePortion &rPortion );
// Returns 0 if we have no usable data
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
@@ -71,8 +71,8 @@ public:
// of rPortion. It is only used for kerning portions for grid mode
explicit SwKernPortion( const SwLinePortion &rPortion );
- virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual void FormatEOL( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
@@ -83,8 +83,8 @@ class SwArrowPortion : public SwLinePortion
bool bLeft;
public:
explicit SwArrowPortion( const SwLinePortion &rPortion );
- explicit SwArrowPortion( const SwTxtPaintInfo &rInf );
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ explicit SwArrowPortion( const SwTextPaintInfo &rInf );
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
virtual SwLinePortion *Compress() SAL_OVERRIDE;
inline bool IsLeft() const { return bLeft; }
inline const Point& GetPos() const { return aPos; }
@@ -95,7 +95,7 @@ public:
// other punctuation marks are allowed to display in the margin of the page
// by a user option.
// The SwHangingPortion is the corresponding textportion to do that.
-class SwHangingPortion : public SwTxtPortion
+class SwHangingPortion : public SwTextPortion
{
sal_uInt16 nInnerWidth;
public:
@@ -112,8 +112,8 @@ public:
explicit SwHiddenTextPortion( sal_Int32 nLen )
{ SetWhichPor( POR_HIDDEN_TXT ); SetLen( nLen ); }
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
};
class SwControlCharPortion : public SwLinePortion
@@ -132,9 +132,9 @@ public:
SetWhichPor( POR_CONTROLCHAR ); SetLen( 1 );
}
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo& rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo& rInf ) const SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx
index aa0ba81e94e3..fa635c1f0359 100644
--- a/sw/source/core/text/portab.hxx
+++ b/sw/source/core/text/portab.hxx
@@ -28,13 +28,13 @@ class SwTabPortion : public SwFixPortion
const bool bAutoTabStop;
// Format() branches either into PreFormat() or PostFormat()
- bool PreFormat( SwTxtFormatInfo &rInf );
+ bool PreFormat( SwTextFormatInfo &rInf );
public:
SwTabPortion( const sal_uInt16 nTabPos, const sal_Unicode cFill = '\0', const bool bAutoTab = true );
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- bool PostFormat( SwTxtFormatInfo &rInf );
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void FormatEOL( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ bool PostFormat( SwTextFormatInfo &rInf );
inline bool IsFilled() const { return 0 != cFill; }
inline sal_uInt16 GetTabPos() const { return nTabPos; }
inline bool IsAutoTabStop() const { return bAutoTabStop; }
@@ -112,7 +112,7 @@ public:
const sal_Unicode cFillChar = '\0' )
: SwTabDecimalPortion( nTabPosVal, cTab, cFillChar )
{ SetLen( 0 ); }
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/core/text/portox.cxx b/sw/source/core/text/portox.cxx
index 79873dec6c17..c5e6802c8a92 100644
--- a/sw/source/core/text/portox.cxx
+++ b/sw/source/core/text/portox.cxx
@@ -23,12 +23,12 @@
#include "portox.hxx"
#include "inftxt.hxx"
-void SwToxPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwToxPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( Width() )
{
rInf.DrawViewOpt( *this, POR_TOX );
- SwTxtPortion::Paint( rInf );
+ SwTextPortion::Paint( rInf );
}
}
@@ -40,7 +40,7 @@ SwIsoToxPortion::SwIsoToxPortion() : nViewWidth(0)
SetWhichPor( POR_ISOTOX );
}
-sal_uInt16 SwIsoToxPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwIsoToxPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
{
// Although we are const, nViewWidth should be calculated in the last
// moment possible
@@ -51,19 +51,19 @@ sal_uInt16 SwIsoToxPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
!rInf.GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() )
{
if( !nViewWidth )
- pThis->nViewWidth = rInf.GetTxtSize(OUString(' ')).Width();
+ pThis->nViewWidth = rInf.GetTextSize(OUString(' ')).Width();
}
else
pThis->nViewWidth = 0;
return nViewWidth;
}
-bool SwIsoToxPortion::Format( SwTxtFormatInfo &rInf )
+bool SwIsoToxPortion::Format( SwTextFormatInfo &rInf )
{
return SwLinePortion::Format( rInf );
}
-void SwIsoToxPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwIsoToxPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( Width() )
rInf.DrawViewOpt( *this, POR_TOX );
diff --git a/sw/source/core/text/portox.hxx b/sw/source/core/text/portox.hxx
index 0f6483fc8e1a..2d5811ed9bda 100644
--- a/sw/source/core/text/portox.hxx
+++ b/sw/source/core/text/portox.hxx
@@ -22,11 +22,11 @@
#include "portxt.hxx"
-class SwToxPortion : public SwTxtPortion
+class SwToxPortion : public SwTextPortion
{
public:
inline SwToxPortion(){ SetWhichPor( POR_TOX ); }
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
@@ -36,10 +36,10 @@ class SwIsoToxPortion : public SwToxPortion
public:
SwIsoToxPortion();
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 4b78981d039d..5220493a09d8 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -47,7 +47,7 @@ using namespace ::com::sun::star::i18n::ScriptType;
// Returns for how many characters an extra space has to be added
// (for justified alignment).
-static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
+static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr,
const SwLinePortion& rPor )
{
sal_Int32 nPos, nEnd;
@@ -63,7 +63,7 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
{
nPos = rInf.GetIdx();
nEnd = rInf.GetIdx() + rPor.GetLen();
- pStr = &rInf.GetTxt();
+ pStr = &rInf.GetText();
pSI = &const_cast<SwParaPortion*>(rInf.GetParaPortion())->GetScriptInfo();
}
@@ -89,7 +89,7 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
if ( nEnd > nPos && ASIAN == nScript )
{
LanguageType aLang =
- rInf.GetTxtFrm()->GetTxtNode()->GetLang( rInf.GetIdx(), 1, nScript );
+ rInf.GetTextFrm()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript );
if (!MsLangId::isKorean(aLang))
{
@@ -126,7 +126,7 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
if ( nEnd > nPos && COMPLEX == nScript )
{
LanguageType aLang =
- rInf.GetTxtFrm()->GetTxtNode()->GetLang( rInf.GetIdx(), 1, nScript );
+ rInf.GetTextFrm()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript );
if ( LANGUAGE_THAI == aLang )
{
@@ -152,13 +152,13 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
LATIN == nScript && ( nEnd == nPos + 1 ) && pSI &&
( i18n::ScriptType::COMPLEX ==
pSI->ScriptType( nPos + 1 ) ) &&
- rInf.GetTxtFrm() && rInf.GetTxtFrm()->IsRightToLeft();
+ rInf.GetTextFrm() && rInf.GetTextFrm()->IsRightToLeft();
if ( bDoNotAddSpace )
return nCnt;
- sal_Int32 nTxtEnd = std::min(nEnd, pStr->getLength());
- for ( ; nPos < nTxtEnd; ++nPos )
+ sal_Int32 nTextEnd = std::min(nEnd, pStr->getLength());
+ for ( ; nPos < nTextEnd; ++nPos )
{
if( CH_BLANK == (*pStr)[ nPos ] )
++nCnt;
@@ -170,7 +170,7 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
// nPos referes to the original string, even if a field string has
// been passed to this function
nPos = rInf.GetIdx() + rPor.GetLen();
- if ( nPos < rInf.GetTxt().getLength() )
+ if ( nPos < rInf.GetText().getLength() )
{
sal_uInt8 nNextScript = 0;
const SwLinePortion* pPor = rPor.GetPortion();
@@ -184,21 +184,21 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
if ( CH_TXTATR_BREAKWORD == rInf.GetChar( nPos ) && pPor->InExpGrp() )
{
bool bOldOnWin = rInf.OnWin();
- ((SwTxtSizeInfo &)rInf).SetOnWin( false );
+ ((SwTextSizeInfo &)rInf).SetOnWin( false );
OUString aStr;
- pPor->GetExpTxt( rInf, aStr );
- ((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
+ pPor->GetExpText( rInf, aStr );
+ ((SwTextSizeInfo &)rInf).SetOnWin( bOldOnWin );
nNextScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( aStr, 0 );
}
else
- nNextScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rInf.GetTxt(), nPos );
+ nNextScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rInf.GetText(), nPos );
if( ASIAN == nNextScript )
{
LanguageType aLang =
- rInf.GetTxtFrm()->GetTxtNode()->GetLang( nPos, 1, nNextScript );
+ rInf.GetTextFrm()->GetTextNode()->GetLang( nPos, 1, nNextScript );
if (!MsLangId::isKorean(aLang))
++nCnt;
@@ -208,15 +208,15 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
return nCnt;
}
-SwTxtPortion * SwTxtPortion::CopyLinePortion(const SwLinePortion &rPortion)
+SwTextPortion * SwTextPortion::CopyLinePortion(const SwLinePortion &rPortion)
{
- SwTxtPortion *const pNew(new SwTxtPortion);
+ SwTextPortion *const pNew(new SwTextPortion);
static_cast<SwLinePortion&>(*pNew) = rPortion;
pNew->SetWhichPor( POR_TXT ); // overwrite that!
return pNew;
}
-void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess )
+void SwTextPortion::BreakCut( SwTextFormatInfo &rInf, const SwTextGuess &rGuess )
{
// The word/char is larger than the line
// Special case 1: The word is larger than the line
@@ -231,7 +231,7 @@ void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess )
{
rInf.SetLen( nLen );
SetLen( nLen );
- CalcTxtSize( rInf );
+ CalcTextSize( rInf );
// changing these values requires also changing them in
// guess.cxx
@@ -261,7 +261,7 @@ void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess )
}
}
-void SwTxtPortion::BreakUnderflow( SwTxtFormatInfo &rInf )
+void SwTextPortion::BreakUnderflow( SwTextFormatInfo &rInf )
{
Truncate();
Height( 0 );
@@ -271,13 +271,13 @@ void SwTxtPortion::BreakUnderflow( SwTxtFormatInfo &rInf )
rInf.SetUnderflow( this );
}
-static bool lcl_HasContent( const SwFldPortion& rFld, SwTxtFormatInfo &rInf )
+static bool lcl_HasContent( const SwFieldPortion& rField, SwTextFormatInfo &rInf )
{
- OUString aTxt;
- return rFld.GetExpTxt( rInf, aTxt ) && !aTxt.isEmpty();
+ OUString aText;
+ return rField.GetExpText( rInf, aText ) && !aText.isEmpty();
}
-bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
+bool SwTextPortion::_Format( SwTextFormatInfo &rInf )
{
// 5744: If only the hypen does not fit anymore, we still need to wrap
// the word, or else return true!
@@ -289,7 +289,7 @@ bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
const bool bHyph = rInf.ChgHyph( true );
if( rInf.IsHyphenate() )
{
- SwTxtGuess aGuess;
+ SwTextGuess aGuess;
// check for alternative spelling left from the soft hyphen
// this should usually be true but
aGuess.AlternativeSpelling( rInf, rInf.GetSoftHyphPos() - 1 );
@@ -301,7 +301,7 @@ bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
return bFull;
}
- SwTxtGuess aGuess;
+ SwTextGuess aGuess;
const bool bFull = !aGuess.Guess( *this, rInf, Height() );
// these are the possible cases:
@@ -322,7 +322,7 @@ bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
{
Width( aGuess.BreakWidth() );
// Vorsicht !
- if( !InExpGrp() || InFldGrp() )
+ if( !InExpGrp() || InFieldGrp() )
SetLen( rInf.GetLen() );
short nKern = rInf.GetFont()->CheckKerning();
@@ -366,11 +366,11 @@ bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
// text portion, if they are not followed by a blank
// (work around different definition of tab stop character - breaking or
// non breaking character - in compatibility mode)
- else if ( ( IsFtnPortion() && rInf.IsFakeLineStart() &&
+ else if ( ( IsFootnotePortion() && rInf.IsFakeLineStart() &&
- rInf.IsOtherThanFtnInside() ) ||
+ rInf.IsOtherThanFootnoteInside() ) ||
( rInf.GetLast() &&
- rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) &&
+ rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) &&
rInf.GetLast()->InTabGrp() &&
rInf.GetLineStart() + rInf.GetLast()->GetLen() < rInf.GetIdx() &&
aGuess.BreakPos() == rInf.GetIdx() &&
@@ -388,10 +388,10 @@ bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
rInf.IsFirstMulti() ||
( rInf.GetLast() &&
( rInf.GetLast()->IsFlyPortion() ||
- ( rInf.GetLast()->InFldGrp() &&
+ ( rInf.GetLast()->InFieldGrp() &&
! rInf.GetLast()->InNumberGrp() &&
! rInf.GetLast()->IsErgoSumPortion() &&
- lcl_HasContent(*static_cast<SwFldPortion*>(rInf.GetLast()),rInf ) ) ) ) )
+ lcl_HasContent(*static_cast<SwFieldPortion*>(rInf.GetLast()),rInf ) ) ) ) )
{
if ( rInf.X() + aGuess.BreakWidth() <= rInf.Width() )
Width( aGuess.BreakWidth() );
@@ -434,7 +434,7 @@ bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
return bFull;
}
-bool SwTxtPortion::Format( SwTxtFormatInfo &rInf )
+bool SwTextPortion::Format( SwTextFormatInfo &rInf )
{
if( rInf.X() > rInf.Width() || (!GetLen() && !InExpGrp()) )
{
@@ -447,8 +447,8 @@ bool SwTxtPortion::Format( SwTxtFormatInfo &rInf )
}
OSL_ENSURE( rInf.RealWidth() || (rInf.X() == rInf.Width()),
- "SwTxtPortion::Format: missing real width" );
- OSL_ENSURE( Height(), "SwTxtPortion::Format: missing height" );
+ "SwTextPortion::Format: missing real width" );
+ OSL_ENSURE( Height(), "SwTextPortion::Format: missing height" );
return _Format( rInf );
}
@@ -461,11 +461,11 @@ bool SwTxtPortion::Format( SwTxtFormatInfo &rInf )
// with the MarginPortion.
// rInf.nIdx points to the next word, nIdx-1 is the portion's last char
-void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
+void SwTextPortion::FormatEOL( SwTextFormatInfo &rInf )
{
if( ( !GetPortion() || ( GetPortion()->IsKernPortion() &&
!GetPortion()->GetPortion() ) ) && GetLen() &&
- rInf.GetIdx() < rInf.GetTxt().getLength() &&
+ rInf.GetIdx() < rInf.GetText().getLength() &&
1 < rInf.GetIdx() && ' ' == rInf.GetChar( rInf.GetIdx() - 1 )
&& !rInf.GetLast()->IsHolePortion() )
{
@@ -481,7 +481,7 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
if( nHoleLen == GetLen() )
nBlankSize = Width();
else
- nBlankSize = nHoleLen * rInf.GetTxtSize(OUString(' ')).Width();
+ nBlankSize = nHoleLen * rInf.GetTextSize(OUString(' ')).Width();
Width( Width() - nBlankSize );
rInf.X( rInf.X() - nBlankSize );
SetLen( GetLen() - nHoleLen );
@@ -492,16 +492,16 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
}
}
-sal_Int32 SwTxtPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
+sal_Int32 SwTextPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
{
- OSL_ENSURE( false, "SwTxtPortion::GetCrsrOfst: don't use this method!" );
+ OSL_ENSURE( false, "SwTextPortion::GetCrsrOfst: don't use this method!" );
return SwLinePortion::GetCrsrOfst( nOfst );
}
-// The GetTxtSize() assumes that the own length is correct
-SwPosSize SwTxtPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+// The GetTextSize() assumes that the own length is correct
+SwPosSize SwTextPortion::GetTextSize( const SwTextSizeInfo &rInf ) const
{
- SwPosSize aSize = rInf.GetTxtSize();
+ SwPosSize aSize = rInf.GetTextSize();
if( !GetJoinBorderWithPrev() )
aSize.Width(aSize.Width() + rInf.GetFont()->GetLeftBorderSpace() );
if( !GetJoinBorderWithNext() )
@@ -514,21 +514,21 @@ SwPosSize SwTxtPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
return aSize;
}
-void SwTxtPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwTextPortion::Paint( const SwTextPaintInfo &rInf ) const
{
- if (rInf.OnWin() && 1==rInf.GetLen() && CH_TXT_ATR_FIELDEND==rInf.GetTxt()[rInf.GetIdx()])
+ if (rInf.OnWin() && 1==rInf.GetLen() && CH_TXT_ATR_FIELDEND==rInf.GetText()[rInf.GetIdx()])
{
assert(false); // this is some debugging only code
rInf.DrawBackBrush( *this );
- const OUString aTxt(CH_TXT_ATR_SUBST_FIELDEND);
- rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false );
+ const OUString aText(CH_TXT_ATR_SUBST_FIELDEND);
+ rInf.DrawText( aText, *this, 0, aText.getLength(), false );
}
- else if (rInf.OnWin() && 1==rInf.GetLen() && CH_TXT_ATR_FIELDSTART==rInf.GetTxt()[rInf.GetIdx()])
+ else if (rInf.OnWin() && 1==rInf.GetLen() && CH_TXT_ATR_FIELDSTART==rInf.GetText()[rInf.GetIdx()])
{
assert(false); // this is some debugging only code
rInf.DrawBackBrush( *this );
- const OUString aTxt(CH_TXT_ATR_SUBST_FIELDSTART);
- rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false );
+ const OUString aText(CH_TXT_ATR_SUBST_FIELDSTART);
+ rInf.DrawText( aText, *this, 0, aText.getLength(), false );
}
else if( GetLen() )
{
@@ -554,14 +554,14 @@ void SwTxtPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-bool SwTxtPortion::GetExpTxt( const SwTxtSizeInfo &, OUString & ) const
+bool SwTextPortion::GetExpText( const SwTextSizeInfo &, OUString & ) const
{
return false;
}
// Responsible for the justified paragraph. They calculate the blank
// count and the resulting added space.
-sal_Int32 SwTxtPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf,
+sal_Int32 SwTextPortion::GetSpaceCnt( const SwTextSizeInfo &rInf,
sal_Int32& rCharCnt ) const
{
sal_Int32 nCnt = 0;
@@ -573,11 +573,11 @@ sal_Int32 SwTxtPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf,
// OnWin() likes to return a blank instead of an empty string from
// time to time. We cannot use that here at all, however.
bool bOldOnWin = rInf.OnWin();
- ((SwTxtSizeInfo &)rInf).SetOnWin( false );
+ ((SwTextSizeInfo &)rInf).SetOnWin( false );
OUString aStr;
- GetExpTxt( rInf, aStr );
- ((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
+ GetExpText( rInf, aStr );
+ ((SwTextSizeInfo &)rInf).SetOnWin( bOldOnWin );
nCnt = nCnt + lcl_AddSpace( rInf, &aStr, *this );
nPos = aStr.getLength();
@@ -592,7 +592,7 @@ sal_Int32 SwTxtPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf,
return nCnt;
}
-long SwTxtPortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const
+long SwTextPortion::CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) const
{
sal_Int32 nCnt = 0;
@@ -603,11 +603,11 @@ long SwTxtPortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) cons
// OnWin() likes to return a blank instead of an empty string from
// time to time. We cannot use that here at all, however.
bool bOldOnWin = rInf.OnWin();
- ((SwTxtSizeInfo &)rInf).SetOnWin( false );
+ ((SwTextSizeInfo &)rInf).SetOnWin( false );
OUString aStr;
- GetExpTxt( rInf, aStr );
- ((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
+ GetExpText( rInf, aStr );
+ ((SwTextSizeInfo &)rInf).SetOnWin( bOldOnWin );
if( nSpaceAdd > 0 )
nCnt = nCnt + lcl_AddSpace( rInf, &aStr, *this );
else
@@ -642,20 +642,20 @@ long SwTxtPortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) cons
return nCnt * nSpaceAdd / SPACING_PRECISION_FACTOR;
}
-void SwTxtPortion::HandlePortion( SwPortionHandler& rPH ) const
+void SwTextPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Text( GetLen(), GetWhichPor(), Height(), Width() );
}
-SwTxtInputFldPortion::SwTxtInputFldPortion()
- : SwTxtPortion()
+SwTextInputFieldPortion::SwTextInputFieldPortion()
+ : SwTextPortion()
, mbContainsInputFieldStart( false )
, mbContainsInputFieldEnd( false )
{
SetWhichPor( POR_INPUTFLD );
}
-bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf )
+bool SwTextInputFieldPortion::Format( SwTextFormatInfo &rInf )
{
mbContainsInputFieldStart =
rInf.GetChar( rInf.GetIdx() ) == CH_TXT_ATR_INPUTFIELDSTART;
@@ -670,7 +670,7 @@ bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf )
}
else
{
- SwTxtSlot aFormatTxt( &rInf, this, true, true );
+ SwTextSlot aFormatText( &rInf, this, true, true );
if ( rInf.GetLen() == 0 )
{
Width( 0 );
@@ -683,7 +683,7 @@ bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf )
rInf.SetLineStart( 0 );
}
- bRet = SwTxtPortion::Format( rInf );
+ bRet = SwTextPortion::Format( rInf );
if ( mbContainsInputFieldEnd )
{
@@ -709,18 +709,18 @@ bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf )
return bRet;
}
-void SwTxtInputFldPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwTextInputFieldPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if ( Width() )
{
rInf.DrawViewOpt( *this, POR_INPUTFLD );
- SwTxtSlot aPaintTxt( &rInf, this, true, true,
+ SwTextSlot aPaintText( &rInf, this, true, true,
ContainsOnlyDummyChars() ? OUString(" ") : OUString() );
- SwTxtPortion::Paint( rInf );
+ SwTextPortion::Paint( rInf );
}
}
-bool SwTxtInputFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
+bool SwTextInputFieldPortion::GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const
{
sal_Int32 nIdx = rInf.GetIdx();
sal_Int32 nLen = rInf.GetLen();
@@ -733,23 +733,23 @@ bool SwTxtInputFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt
{
--nLen;
}
- rTxt = rInf.GetTxt().copy( nIdx, std::min( nLen, rInf.GetTxt().getLength() - nIdx ) );
+ rText = rInf.GetText().copy( nIdx, std::min( nLen, rInf.GetText().getLength() - nIdx ) );
return true;
}
-SwPosSize SwTxtInputFldPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+SwPosSize SwTextInputFieldPortion::GetTextSize( const SwTextSizeInfo &rInf ) const
{
- SwTxtSlot aFormatTxt( &rInf, this, true, false );
+ SwTextSlot aFormatText( &rInf, this, true, false );
if ( rInf.GetLen() == 0 )
{
return SwPosSize( 0, 0 );
}
- return rInf.GetTxtSize();
+ return rInf.GetTextSize();
}
-sal_uInt16 SwTxtInputFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwTextInputFieldPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
{
if( !Width()
&& ContainsOnlyDummyChars()
@@ -757,20 +757,20 @@ sal_uInt16 SwTxtInputFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
&& !rInf.GetOpt().IsReadonly()
&& SwViewOption::IsFieldShadings() )
{
- return rInf.GetTxtSize( " " ).Width();
+ return rInf.GetTextSize( " " ).Width();
}
- return SwTxtPortion::GetViewWidth( rInf );
+ return SwTextPortion::GetViewWidth( rInf );
}
-bool SwTxtInputFldPortion::ContainsOnlyDummyChars() const
+bool SwTextInputFieldPortion::ContainsOnlyDummyChars() const
{
return GetLen() <= 2
&& mbContainsInputFieldStart
&& mbContainsInputFieldEnd;
}
-SwHolePortion::SwHolePortion( const SwTxtPortion &rPor )
+SwHolePortion::SwHolePortion( const SwTextPortion &rPor )
: nBlankWidth( 0 )
{
SetLen( 1 );
@@ -781,7 +781,7 @@ SwHolePortion::SwHolePortion( const SwTxtPortion &rPor )
SwLinePortion *SwHolePortion::Compress() { return this; }
-void SwHolePortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwHolePortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( !rInf.GetOut() )
return;
@@ -805,14 +805,14 @@ void SwHolePortion::Paint( const SwTxtPaintInfo &rInf ) const
pFontSave = new SwFontSave( rInf, pHoleFont );
}
- const OUString aTxt( ' ' );
- rInf.DrawText( aTxt, *this, 0, 1, false );
+ const OUString aText( ' ' );
+ rInf.DrawText( aText, *this, 0, 1, false );
delete pFontSave;
delete pHoleFont;
}
-bool SwHolePortion::Format( SwTxtFormatInfo &rInf )
+bool SwHolePortion::Format( SwTextFormatInfo &rInf )
{
return rInf.IsFull() || rInf.X() >= rInf.Width();
}
@@ -822,21 +822,21 @@ void SwHolePortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Text( GetLen(), GetWhichPor() );
}
-void SwFieldMarkPortion::Paint( const SwTxtPaintInfo & /*rInf*/) const
+void SwFieldMarkPortion::Paint( const SwTextPaintInfo & /*rInf*/) const
{
// These shouldn't be painted!
- //SwTxtPortion::Paint(rInf);
+ //SwTextPortion::Paint(rInf);
}
-bool SwFieldMarkPortion::Format( SwTxtFormatInfo & )
+bool SwFieldMarkPortion::Format( SwTextFormatInfo & )
{
Width(0);
return false;
}
-void SwFieldFormCheckboxPortion::Paint( const SwTxtPaintInfo& rInf ) const
+void SwFieldFormCheckboxPortion::Paint( const SwTextPaintInfo& rInf ) const
{
- SwTxtNode* pNd = const_cast<SwTxtNode*>(rInf.GetTxtFrm()->GetTxtNode());
+ SwTextNode* pNd = const_cast<SwTextNode*>(rInf.GetTextFrm()->GetTextNode());
const SwDoc *doc=pNd->GetDoc();
SwIndex aIndex( pNd, rInf.GetIdx() );
SwPosition aPosition(*pNd, aIndex);
@@ -854,9 +854,9 @@ void SwFieldFormCheckboxPortion::Paint( const SwTxtPaintInfo& rInf ) const
}
}
-bool SwFieldFormCheckboxPortion::Format( SwTxtFormatInfo & rInf )
+bool SwFieldFormCheckboxPortion::Format( SwTextFormatInfo & rInf )
{
- SwTxtNode *pNd = const_cast < SwTxtNode * >( rInf.GetTxtFrm( )->GetTxtNode( ) );
+ SwTextNode *pNd = const_cast < SwTextNode * >( rInf.GetTextFrm( )->GetTextNode( ) );
const SwDoc *doc = pNd->GetDoc( );
SwIndex aIndex( pNd, rInf.GetIdx( ) );
SwPosition aPosition( *pNd, aIndex );
@@ -864,8 +864,8 @@ bool SwFieldFormCheckboxPortion::Format( SwTxtFormatInfo & rInf )
OSL_ENSURE(pBM && pBM->GetFieldname( ) == ODF_FORMCHECKBOX, "Where is my form field bookmark???");
if (pBM && pBM->GetFieldname( ) == ODF_FORMCHECKBOX)
{
- Width( rInf.GetTxtHeight( ) );
- Height( rInf.GetTxtHeight( ) );
+ Width( rInf.GetTextHeight( ) );
+ Height( rInf.GetTextHeight( ) );
SetAscent( rInf.GetAscent( ) );
}
return false;
diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
index 3f30ba7fc75f..660d38d72209 100644
--- a/sw/source/core/text/portxt.hxx
+++ b/sw/source/core/text/portxt.hxx
@@ -23,48 +23,48 @@
#include "porlin.hxx"
-class SwTxtGuess;
+class SwTextGuess;
/// This portion represents a part of the paragraph string.
-class SwTxtPortion : public SwLinePortion
+class SwTextPortion : public SwLinePortion
{
- void BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess );
- void BreakUnderflow( SwTxtFormatInfo &rInf );
- bool _Format( SwTxtFormatInfo &rInf );
+ void BreakCut( SwTextFormatInfo &rInf, const SwTextGuess &rGuess );
+ void BreakUnderflow( SwTextFormatInfo &rInf );
+ bool _Format( SwTextFormatInfo &rInf );
public:
- inline SwTxtPortion(){ SetWhichPor( POR_TXT ); }
- static SwTxtPortion * CopyLinePortion(const SwLinePortion &rPortion);
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ inline SwTextPortion(){ SetWhichPor( POR_TXT ); }
+ static SwTextPortion * CopyLinePortion(const SwLinePortion &rPortion);
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void FormatEOL( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
- virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
- virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
+ virtual long CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
// Counts the spaces for justified paragraph
- sal_Int32 GetSpaceCnt( const SwTxtSizeInfo &rInf, sal_Int32& rCnt ) const;
+ sal_Int32 GetSpaceCnt( const SwTextSizeInfo &rInf, sal_Int32& rCnt ) const;
- bool CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess );
+ bool CreateHyphen( SwTextFormatInfo &rInf, SwTextGuess &rGuess );
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
- DECL_FIXEDMEMPOOL_NEWDEL(SwTxtPortion)
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTextPortion)
};
-class SwTxtInputFldPortion : public SwTxtPortion
+class SwTextInputFieldPortion : public SwTextPortion
{
public:
- SwTxtInputFldPortion();
+ SwTextInputFieldPortion();
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
- virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
- virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const SAL_OVERRIDE;
+ virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const SAL_OVERRIDE;
private:
bool mbContainsInputFieldStart;
@@ -76,12 +76,12 @@ class SwHolePortion : public SwLinePortion
{
sal_uInt16 nBlankWidth;
public:
- SwHolePortion( const SwTxtPortion &rPor );
+ SwHolePortion( const SwTextPortion &rPor );
inline sal_uInt16 GetBlankWidth( ) const { return nBlankWidth; }
inline void SetBlankWidth( const sal_uInt16 nNew ) { nBlankWidth = nNew; }
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
@@ -90,23 +90,23 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwHolePortion)
};
-class SwFieldMarkPortion : public SwTxtPortion
+class SwFieldMarkPortion : public SwTextPortion
{
public:
- inline SwFieldMarkPortion() : SwTxtPortion()
+ inline SwFieldMarkPortion() : SwTextPortion()
{ }
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
};
-class SwFieldFormCheckboxPortion : public SwTxtPortion
+class SwFieldFormCheckboxPortion : public SwTextPortion
{
public:
- SwFieldFormCheckboxPortion() : SwTxtPortion()
+ SwFieldFormCheckboxPortion() : SwTextPortion()
{
}
- virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
+ virtual void Paint( const SwTextPaintInfo &rInf ) const SAL_OVERRIDE;
+ virtual bool Format( SwTextFormatInfo &rInf ) SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 3a3155424bac..9edc033e5eae 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -43,21 +43,21 @@
using namespace ::com::sun::star;
-void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, SwTxtFrm* pFrm )
+void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrm* pFrm )
{
// during HTML-Import it can happen, that no layout exists
- SwRootFrm* pRootFrm = rTxtNode.getIDocumentLayoutAccess()->GetCurrentLayout();
+ SwRootFrm* pRootFrm = rTextNode.getIDocumentLayoutAccess()->GetCurrentLayout();
pShell = pRootFrm ? pRootFrm->GetCurrShell() : 0;
pScriptInfo = &rScrInf;
// attributes set at the whole paragraph
- pAttrSet = rTxtNode.GetpSwAttrSet();
+ pAttrSet = rTextNode.GetpSwAttrSet();
// attribute array
- pHints = rTxtNode.GetpSwpHints();
+ pHints = rTextNode.GetpSwpHints();
// Build a font matching the default paragraph style:
- SwFontAccess aFontAccess( &rTxtNode.GetAnyFmtColl(), pShell );
+ SwFontAccess aFontAccess( &rTextNode.GetAnyFormatColl(), pShell );
delete pFnt;
pFnt = new SwFont( aFontAccess.Get()->GetFont() );
@@ -80,14 +80,14 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
// consider them during construction of the default array, and apply
// them to the font
aAttrHandler.Init( aFontAccess.Get()->GetDefault(), pAttrSet,
- *rTxtNode.getIDocumentSettingAccess(), pShell, *pFnt, bVertLayout );
+ *rTextNode.getIDocumentSettingAccess(), pShell, *pFnt, bVertLayout );
aMagicNo[SW_LATIN] = aMagicNo[SW_CJK] = aMagicNo[SW_CTL] = NULL;
// determine script changes if not already done for current paragraph
OSL_ENSURE( pScriptInfo, "No script info available");
if ( pScriptInfo->GetInvalidityA() != COMPLETE_STRING )
- pScriptInfo->InitScriptInfo( rTxtNode, bRTL );
+ pScriptInfo->InitScriptInfo( rTextNode, bRTL );
if ( g_pBreakIt->GetBreakIter().is() )
{
@@ -115,7 +115,7 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
pFnt->ChkMagic( pShell, nTmp );
pFnt->GetMagic( aMagicNo[ nTmp ], aFntIdx[ nTmp ], nTmp );
}
- } while (nChg < rTxtNode.GetTxt().getLength());
+ } while (nChg < rTextNode.GetText().getLength());
}
else
{
@@ -125,14 +125,14 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
nStartIndex = nEndIndex = nPos = nChgCnt = 0;
nPropFont = 0;
- SwDoc* pDoc = rTxtNode.GetDoc();
- const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess();
+ SwDoc* pDoc = rTextNode.GetDoc();
+ const IDocumentRedlineAccess* pIDRA = rTextNode.getIDocumentRedlineAccess();
- const SwExtTextInput* pExtInp = pDoc->GetExtTextInput( rTxtNode );
+ const SwExtTextInput* pExtInp = pDoc->GetExtTextInput( rTextNode );
const bool bShow = IDocumentRedlineAccess::IsShowChanges( pIDRA->GetRedlineMode() );
if( pExtInp || bShow )
{
- const sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTxtNode, USHRT_MAX );
+ const sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTextNode, USHRT_MAX );
if( pExtInp || USHRT_MAX != nRedlPos )
{
const std::vector<sal_uInt16> *pArr = 0;
@@ -144,7 +144,7 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
Seek( 0 );
}
- pRedln = new SwRedlineItr( rTxtNode, *pFnt, aAttrHandler, nRedlPos,
+ pRedln = new SwRedlineItr( rTextNode, *pFnt, aAttrHandler, nRedlPos,
bShow, pArr, nInputStt );
if( pRedln->IsOn() )
@@ -156,7 +156,7 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
// The Redline-Iterator
// The following information/states exist in RedlineIterator:
//
-// nFirst is the first index of RedlineTbl, which overlaps with the paragraph.
+// nFirst is the first index of RedlineTable, which overlaps with the paragraph.
//
// nAct is the currently active (if bOn is set) or the next possible index.
// nStart and nEnd give you the borders of the object within the paragraph.
@@ -165,12 +165,12 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
//
// If nAct is set to COMPLETE_STRING (via Reset()), then currently no
// Redline is active, nStart and nEnd are invalid.
-SwRedlineItr::SwRedlineItr( const SwTxtNode& rTxtNd, SwFont& rFnt,
+SwRedlineItr::SwRedlineItr( const SwTextNode& rTextNd, SwFont& rFnt,
SwAttrHandler& rAH, sal_Int32 nRed, bool bShw,
const std::vector<sal_uInt16> *pArr,
sal_Int32 nExtStart )
- : rDoc( *rTxtNd.GetDoc() ), rAttrHandler( rAH ), pSet( 0 ),
- nNdIdx( rTxtNd.GetIndex() ), nFirst( nRed ),
+ : rDoc( *rTextNd.GetDoc() ), rAttrHandler( rAH ), pSet( 0 ),
+ nNdIdx( rTextNd.GetIndex() ), nFirst( nRed ),
nAct( COMPLETE_STRING ), bOn( false ), bShow( bShw )
{
if( pArr )
@@ -223,16 +223,16 @@ short SwRedlineItr::_Seek(SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld)
nStart = COMPLETE_STRING;
nEnd = COMPLETE_STRING;
- for( ; nAct < (sal_Int32)rDoc.getIDocumentRedlineAccess().GetRedlineTbl().size() ; ++nAct )
+ for( ; nAct < (sal_Int32)rDoc.getIDocumentRedlineAccess().GetRedlineTable().size() ; ++nAct )
{
- rDoc.getIDocumentRedlineAccess().GetRedlineTbl()[ nAct ]->CalcStartEnd( nNdIdx, nStart, nEnd );
+ rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ]->CalcStartEnd( nNdIdx, nStart, nEnd );
if( nNew < nEnd )
{
if( nNew >= nStart ) // der einzig moegliche Kandidat
{
bOn = true;
- const SwRangeRedline *pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTbl()[ nAct ];
+ const SwRangeRedline *pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ];
if (pSet)
pSet->ClearItem();
@@ -255,7 +255,7 @@ short SwRedlineItr::_Seek(SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld)
if( ( nWhich < RES_CHRATR_END ) &&
( SfxItemState::SET == pSet->GetItemState( nWhich, true, &pItem ) ) )
{
- SwTxtAttr* pAttr = MakeRedlineTxtAttr(
+ SwTextAttr* pAttr = MakeRedlineTextAttr(
const_cast<SwDoc&>(rDoc),
*const_cast<SfxPoolItem*>(pItem) );
pAttr->SetPriorityAttr( true );
@@ -297,9 +297,9 @@ void SwRedlineItr::FillHints( sal_uInt16 nAuthor, RedlineType_t eType )
}
}
-void SwRedlineItr::ChangeTxtAttr( SwFont* pFnt, SwTxtAttr &rHt, bool bChg )
+void SwRedlineItr::ChangeTextAttr( SwFont* pFnt, SwTextAttr &rHt, bool bChg )
{
- OSL_ENSURE( IsOn(), "SwRedlineItr::ChangeTxtAttr: Off?" );
+ OSL_ENSURE( IsOn(), "SwRedlineItr::ChangeTextAttr: Off?" );
if( !bShow && !pExt )
return;
@@ -324,13 +324,13 @@ void SwRedlineItr::_Clear( SwFont* pFnt )
bOn = false;
while (!m_Hints.empty())
{
- SwTxtAttr *pPos = m_Hints.front();
+ SwTextAttr *pPos = m_Hints.front();
m_Hints.pop_front();
if( pFnt )
rAttrHandler.PopAndChg( *pPos, *pFnt );
else
rAttrHandler.Pop( *pPos );
- SwTxtAttr::Destroy(pPos, const_cast<SwDoc&>(rDoc).GetAttrPool() );
+ SwTextAttr::Destroy(pPos, const_cast<SwDoc&>(rDoc).GetAttrPool() );
}
if( pFnt )
pFnt->SetNoCol( false );
@@ -344,7 +344,7 @@ sal_Int32 SwRedlineItr::_GetNextRedln( sal_Int32 nNext )
if( COMPLETE_STRING == nAct )
{
nAct = nFirst;
- rDoc.getIDocumentRedlineAccess().GetRedlineTbl()[ nAct ]->CalcStartEnd( nNdIdx, nStart, nEnd );
+ rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ]->CalcStartEnd( nNdIdx, nStart, nEnd );
}
if( bOn || !nStart )
{
@@ -382,9 +382,9 @@ bool SwRedlineItr::CheckLine( sal_Int32 nChkStart, sal_Int32 nChkEnd )
sal_Int32 nOldAct = nAct;
bool bRet = false;
- for( nAct = nFirst; nAct < (sal_Int32)rDoc.getIDocumentRedlineAccess().GetRedlineTbl().size() ; ++nAct )
+ for( nAct = nFirst; nAct < (sal_Int32)rDoc.getIDocumentRedlineAccess().GetRedlineTable().size() ; ++nAct )
{
- rDoc.getIDocumentRedlineAccess().GetRedlineTbl()[ nAct ]->CalcStartEnd( nNdIdx, nStart, nEnd );
+ rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ]->CalcStartEnd( nNdIdx, nStart, nEnd );
if( nChkEnd < nStart )
break;
if( nChkStart <= nEnd && ( nChkEnd > nStart || COMPLETE_STRING == nEnd ) )
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index 90e3bc5f5881..0863e423954a 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -26,7 +26,7 @@
#include "swfont.hxx"
#include <vector>
-class SwTxtNode;
+class SwTextNode;
class SwDoc;
class SfxItemSet;
class SwAttrHandler;
@@ -57,7 +57,7 @@ public:
class SwRedlineItr
{
- std::deque<SwTxtAttr *> m_Hints;
+ std::deque<SwTextAttr *> m_Hints;
const SwDoc& rDoc;
SwAttrHandler& rAttrHandler;
SfxItemSet *pSet;
@@ -80,13 +80,13 @@ class SwRedlineItr
sal_Int32 NextExtend( sal_Int32 nNext )
{ if( pExt ) return pExt->Next( nNext ); return nNext; }
public:
- SwRedlineItr( const SwTxtNode& rTxtNd, SwFont& rFnt, SwAttrHandler& rAH,
+ SwRedlineItr( const SwTextNode& rTextNd, SwFont& rFnt, SwAttrHandler& rAH,
sal_Int32 nRedlPos, bool bShw, const std::vector<sal_uInt16> *pArr = 0,
sal_Int32 nExtStart = COMPLETE_STRING );
~SwRedlineItr();
inline bool IsOn() const { return bOn || ( pExt && pExt->IsOn() ); }
inline void Clear( SwFont* pFnt ) { if( bOn ) _Clear( pFnt ); }
- void ChangeTxtAttr( SwFont* pFnt, SwTxtAttr &rHt, bool bChg );
+ void ChangeTextAttr( SwFont* pFnt, SwTextAttr &rHt, bool bChg );
inline short Seek( SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld )
{ if( bShow || pExt ) return _Seek( rFnt, nNew, nOld ); return 0; }
inline void Reset() { if( nAct != nFirst ) nAct = COMPLETE_STRING;
diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx
index 51d442cb1ab1..00a7d4549024 100644
--- a/sw/source/core/text/txtcache.cxx
+++ b/sw/source/core/text/txtcache.cxx
@@ -21,67 +21,67 @@
#include "txtfrm.hxx"
#include "porlay.hxx"
-SwTxtLine::SwTxtLine( SwTxtFrm *pFrm, SwParaPortion *pNew ) :
+SwTextLine::SwTextLine( SwTextFrm *pFrm, SwParaPortion *pNew ) :
SwCacheObj( (void*)pFrm ),
pLine( pNew )
{
}
-SwTxtLine::~SwTxtLine()
+SwTextLine::~SwTextLine()
{
delete pLine;
}
-SwCacheObj *SwTxtLineAccess::NewObj()
+SwCacheObj *SwTextLineAccess::NewObj()
{
- return new SwTxtLine( const_cast<SwTxtFrm *>(static_cast<SwTxtFrm const *>(pOwner)) );
+ return new SwTextLine( const_cast<SwTextFrm *>(static_cast<SwTextFrm const *>(pOwner)) );
}
-SwParaPortion *SwTxtLineAccess::GetPara()
+SwParaPortion *SwTextLineAccess::GetPara()
{
- SwTxtLine *pRet;
+ SwTextLine *pRet;
if ( pObj )
- pRet = static_cast<SwTxtLine*>(pObj);
+ pRet = static_cast<SwTextLine*>(pObj);
else
{
- pRet = static_cast<SwTxtLine*>(Get());
- const_cast<SwTxtFrm *>(static_cast<SwTxtFrm const *>(pOwner))->SetCacheIdx( pRet->GetCachePos() );
+ pRet = static_cast<SwTextLine*>(Get());
+ const_cast<SwTextFrm *>(static_cast<SwTextFrm const *>(pOwner))->SetCacheIdx( pRet->GetCachePos() );
}
if ( !pRet->GetPara() )
pRet->SetPara( new SwParaPortion );
return pRet->GetPara();
}
-SwTxtLineAccess::SwTxtLineAccess( const SwTxtFrm *pOwn ) :
- SwCacheAccess( *SwTxtFrm::GetTxtCache(), pOwn, pOwn->GetCacheIdx() )
+SwTextLineAccess::SwTextLineAccess( const SwTextFrm *pOwn ) :
+ SwCacheAccess( *SwTextFrm::GetTextCache(), pOwn, pOwn->GetCacheIdx() )
{
}
-bool SwTxtLineAccess::IsAvailable() const
+bool SwTextLineAccess::IsAvailable() const
{
- return pObj && static_cast<SwTxtLine*>(pObj)->GetPara();
+ return pObj && static_cast<SwTextLine*>(pObj)->GetPara();
}
-bool SwTxtFrm::_HasPara() const
+bool SwTextFrm::_HasPara() const
{
- SwTxtLine *pTxtLine = static_cast<SwTxtLine*>(SwTxtFrm::GetTxtCache()->
+ SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()->
Get( this, GetCacheIdx(), false ));
- if ( pTxtLine )
+ if ( pTextLine )
{
- if ( pTxtLine->GetPara() )
+ if ( pTextLine->GetPara() )
return true;
}
else
- const_cast<SwTxtFrm*>(this)->nCacheIdx = USHRT_MAX;
+ const_cast<SwTextFrm*>(this)->nCacheIdx = USHRT_MAX;
return false;
}
-SwParaPortion *SwTxtFrm::GetPara()
+SwParaPortion *SwTextFrm::GetPara()
{
if ( GetCacheIdx() != USHRT_MAX )
{
- SwTxtLine *pLine = static_cast<SwTxtLine*>(SwTxtFrm::GetTxtCache()->
+ SwTextLine *pLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()->
Get( this, GetCacheIdx(), false ));
if ( pLine )
return pLine->GetPara();
@@ -91,35 +91,35 @@ SwParaPortion *SwTxtFrm::GetPara()
return 0;
}
-void SwTxtFrm::ClearPara()
+void SwTextFrm::ClearPara()
{
- OSL_ENSURE( !IsLocked(), "+SwTxtFrm::ClearPara: this is locked." );
+ OSL_ENSURE( !IsLocked(), "+SwTextFrm::ClearPara: this is locked." );
if ( !IsLocked() && GetCacheIdx() != USHRT_MAX )
{
- SwTxtLine *pTxtLine = static_cast<SwTxtLine*>(SwTxtFrm::GetTxtCache()->
+ SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()->
Get( this, GetCacheIdx(), false ));
- if ( pTxtLine )
+ if ( pTextLine )
{
- delete pTxtLine->GetPara();
- pTxtLine->SetPara( 0 );
+ delete pTextLine->GetPara();
+ pTextLine->SetPara( 0 );
}
else
nCacheIdx = USHRT_MAX;
}
}
-void SwTxtFrm::SetPara( SwParaPortion *pNew, bool bDelete )
+void SwTextFrm::SetPara( SwParaPortion *pNew, bool bDelete )
{
if ( GetCacheIdx() != USHRT_MAX )
{
// Only change the information, the CacheObj stays there
- SwTxtLine *pTxtLine = static_cast<SwTxtLine*>(SwTxtFrm::GetTxtCache()->
+ SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()->
Get( this, GetCacheIdx(), false ));
- if ( pTxtLine )
+ if ( pTextLine )
{
if( bDelete )
- delete pTxtLine->GetPara();
- pTxtLine->SetPara( pNew );
+ delete pTextLine->GetPara();
+ pTextLine->SetPara( pNew );
}
else
{
@@ -129,9 +129,9 @@ void SwTxtFrm::SetPara( SwParaPortion *pNew, bool bDelete )
}
else if ( pNew )
{ // Insert a new one
- SwTxtLine *pTxtLine = new SwTxtLine( this, pNew );
- if ( SwTxtFrm::GetTxtCache()->Insert( pTxtLine ) )
- nCacheIdx = pTxtLine->GetCachePos();
+ SwTextLine *pTextLine = new SwTextLine( this, pNew );
+ if ( SwTextFrm::GetTextCache()->Insert( pTextLine ) )
+ nCacheIdx = pTextLine->GetCachePos();
else
{
OSL_FAIL( "+SetPara: InsertCache failed." );
diff --git a/sw/source/core/text/txtcache.hxx b/sw/source/core/text/txtcache.hxx
index 67c7d82f1a5a..286427503cca 100644
--- a/sw/source/core/text/txtcache.hxx
+++ b/sw/source/core/text/txtcache.hxx
@@ -24,17 +24,17 @@
#include "swcache.hxx"
class SwParaPortion;
-class SwTxtFrm;
+class SwTextFrm;
-class SwTxtLine : public SwCacheObj
+class SwTextLine : public SwCacheObj
{
SwParaPortion *pLine;
public:
- DECL_FIXEDMEMPOOL_NEWDEL(SwTxtLine)
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTextLine)
- SwTxtLine( SwTxtFrm *pFrm, SwParaPortion *pNew = 0 );
- virtual ~SwTxtLine();
+ SwTextLine( SwTextFrm *pFrm, SwParaPortion *pNew = 0 );
+ virtual ~SwTextLine();
inline SwParaPortion *GetPara() { return pLine; }
inline const SwParaPortion *GetPara() const { return pLine; }
@@ -42,25 +42,25 @@ public:
inline void SetPara( SwParaPortion *pNew ) { pLine = pNew; }
};
-class SwTxtLineAccess : public SwCacheAccess
+class SwTextLineAccess : public SwCacheAccess
{
protected:
virtual SwCacheObj *NewObj() SAL_OVERRIDE;
public:
- SwTxtLineAccess( const SwTxtFrm *pOwner );
+ SwTextLineAccess( const SwTextFrm *pOwner );
SwParaPortion *GetPara();
- inline SwTxtLine &GetTxtLine();
+ inline SwTextLine &GetTextLine();
virtual bool IsAvailable() const SAL_OVERRIDE;
};
-inline SwTxtLine &SwTxtLineAccess::GetTxtLine()
+inline SwTextLine &SwTextLineAccess::GetTextLine()
{
- return *static_cast<SwTxtLine*>(Get());
+ return *static_cast<SwTextLine*>(Get());
}
#endif
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index bd06251d064f..296b487845a6 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -46,17 +46,17 @@ using namespace ::com::sun::star;
* The width and height of the drop caps portion are passed as arguments,
* the position is calculated from the values in rInf
*/
-static bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf,
+static bool lcl_IsDropFlyInter( const SwTextFormatInfo &rInf,
sal_uInt16 nWidth, sal_uInt16 nHeight )
{
- const SwTxtFly& rTxtFly = rInf.GetTxtFly();
- if( rTxtFly.IsOn() )
+ const SwTextFly& rTextFly = rInf.GetTextFly();
+ if( rTextFly.IsOn() )
{
- SwRect aRect( rInf.GetTxtFrm()->Frm().Pos(), Size( nWidth, nHeight) );
- aRect.Pos() += rInf.GetTxtFrm()->Prt().Pos();
+ SwRect aRect( rInf.GetTextFrm()->Frm().Pos(), Size( nWidth, nHeight) );
+ aRect.Pos() += rInf.GetTextFrm()->Prt().Pos();
aRect.Pos().X() += rInf.X();
aRect.Pos().Y() = rInf.Y();
- aRect = rTxtFly.GetFrm( aRect );
+ aRect = rTextFly.GetFrm( aRect );
return aRect.HasArea();
}
@@ -65,19 +65,19 @@ static bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf,
class SwDropSave
{
- SwTxtPaintInfo* pInf;
+ SwTextPaintInfo* pInf;
sal_Int32 nIdx;
sal_Int32 nLen;
long nX;
long nY;
public:
- SwDropSave( const SwTxtPaintInfo &rInf );
+ SwDropSave( const SwTextPaintInfo &rInf );
~SwDropSave();
};
-SwDropSave::SwDropSave( const SwTxtPaintInfo &rInf ) :
- pInf( const_cast<SwTxtPaintInfo*>(&rInf) ), nIdx( rInf.GetIdx() ),
+SwDropSave::SwDropSave( const SwTextPaintInfo &rInf ) :
+ pInf( const_cast<SwTextPaintInfo*>(&rInf) ), nIdx( rInf.GetIdx() ),
nLen( rInf.GetLen() ), nX( rInf.X() ), nY( rInf.Y() )
{
}
@@ -122,9 +122,9 @@ SwDropPortion::~SwDropPortion()
}
/// nWishLen = 0 indicates that we want a whole word
-sal_Int32 SwTxtNode::GetDropLen( sal_Int32 nWishLen ) const
+sal_Int32 SwTextNode::GetDropLen( sal_Int32 nWishLen ) const
{
- sal_Int32 nEnd = GetTxt().getLength();
+ sal_Int32 nEnd = GetText().getLength();
if( nWishLen && nWishLen < nEnd )
nEnd = nWishLen;
@@ -132,11 +132,11 @@ sal_Int32 SwTxtNode::GetDropLen( sal_Int32 nWishLen ) const
{
// find first word
const SwAttrSet& rAttrSet = GetSwAttrSet();
- const sal_uInt16 nTxtScript = g_pBreakIt->GetRealScriptOfText( GetTxt(), 0 );
+ const sal_uInt16 nTextScript = g_pBreakIt->GetRealScriptOfText( GetText(), 0 );
LanguageType eLanguage;
- switch ( nTxtScript )
+ switch ( nTextScript )
{
case i18n::ScriptType::ASIAN :
eLanguage = rAttrSet.GetCJKLanguage().GetLanguage();
@@ -150,7 +150,7 @@ sal_Int32 SwTxtNode::GetDropLen( sal_Int32 nWishLen ) const
}
Boundary aBound =
- g_pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), 0,
+ g_pBreakIt->GetBreakIter()->getWordBoundary( GetText(), 0,
g_pBreakIt->GetLocale( eLanguage ), WordType::DICTIONARY_WORD, true );
nEnd = aBound.endPos;
@@ -159,10 +159,10 @@ sal_Int32 SwTxtNode::GetDropLen( sal_Int32 nWishLen ) const
sal_Int32 i = 0;
for( ; i < nEnd; ++i )
{
- sal_Unicode const cChar = GetTxt()[i];
+ sal_Unicode const cChar = GetText()[i];
if( CH_TAB == cChar || CH_BREAK == cChar ||
(( CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar )
- && SwTxtSizeInfo::_HasHint( this, i ) ) )
+ && SwTextSizeInfo::_HasHint( this, i ) ) )
break;
}
return i;
@@ -173,14 +173,14 @@ sal_Int32 SwTxtNode::GetDropLen( sal_Int32 nWishLen ) const
* drop cap sizes passed back by reference are font height, drop height
* and drop descent.
*/
-bool SwTxtNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const
+bool SwTextNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const
{
rFontHeight = 0;
rDropHeight = 0;
rDropDescent =0;
const SwAttrSet& rSet = GetSwAttrSet();
- const SwFmtDrop& rDrop = rSet.GetDrop();
+ const SwFormatDrop& rDrop = rSet.GetDrop();
// Return (0,0) if there is no drop cap at this paragraph
if( 1 >= rDrop.GetLines() ||
@@ -190,8 +190,8 @@ bool SwTxtNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescen
}
// get text frame
- SwIterator<SwTxtFrm,SwTxtNode> aIter( *this );
- for( SwTxtFrm* pLastFrm = aIter.First(); pLastFrm; pLastFrm = aIter.Next() )
+ SwIterator<SwTextFrm,SwTextNode> aIter( *this );
+ for( SwTextFrm* pLastFrm = aIter.First(); pLastFrm; pLastFrm = aIter.Next() )
{
// Only (master-) text frames can have a drop cap.
if ( !pLastFrm->IsFollow() )
@@ -242,7 +242,7 @@ bool SwTxtNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescen
}
/// Manipulate the width, otherwise the chars are being stretched
-void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
+void SwDropPortion::PaintText( const SwTextPaintInfo &rInf ) const
{
OSL_ENSURE( nDropHeight && pPart && nLines != 1, "Drop Portion painted twice" );
@@ -252,7 +252,7 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
const sal_uInt16 nOldAscent = GetAscent();
const SwTwips nBasePosY = rInf.Y();
- const_cast<SwTxtPaintInfo&>(rInf).Y( nBasePosY + nY );
+ const_cast<SwTextPaintInfo&>(rInf).Y( nBasePosY + nY );
const_cast<SwDropPortion*>(this)->SetAscent( nOldAscent + nY );
SwDropSave aSave( rInf );
// for text inside drop portions we let vcl handle the text directions
@@ -263,7 +263,7 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
{
const_cast<SwDropPortion*>(this)->SetLen( pCurrPart->GetLen() );
const_cast<SwDropPortion*>(this)->Width( pCurrPart->GetWidth() );
- const_cast<SwTxtPaintInfo&>(rInf).SetLen( pCurrPart->GetLen() );
+ const_cast<SwTextPaintInfo&>(rInf).SetLen( pCurrPart->GetLen() );
SwFontSave aFontSave( rInf, &pCurrPart->GetFont() );
const_cast<SwDropPortion*>(this)->SetJoinBorderWithNext(pCurrPart->GetJoinBorderWithNext());
const_cast<SwDropPortion*>(this)->SetJoinBorderWithPrev(pCurrPart->GetJoinBorderWithPrev());
@@ -275,14 +275,14 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
rInf.DrawBackground( *this );
}
- SwTxtPortion::Paint( rInf );
+ SwTextPortion::Paint( rInf );
- const_cast<SwTxtPaintInfo&>(rInf).SetIdx( rInf.GetIdx() + pCurrPart->GetLen() );
- const_cast<SwTxtPaintInfo&>(rInf).X( rInf.X() + pCurrPart->GetWidth() );
+ const_cast<SwTextPaintInfo&>(rInf).SetIdx( rInf.GetIdx() + pCurrPart->GetLen() );
+ const_cast<SwTextPaintInfo&>(rInf).X( rInf.X() + pCurrPart->GetWidth() );
pCurrPart = pCurrPart->GetFollow();
}
- const_cast<SwTxtPaintInfo&>(rInf).Y( nBasePosY );
+ const_cast<SwTextPaintInfo&>(rInf).Y( nBasePosY );
const_cast<SwDropPortion*>(this)->Width( nOldWidth );
const_cast<SwDropPortion*>(this)->SetLen( nOldLen );
const_cast<SwDropPortion*>(this)->SetAscent( nOldAscent );
@@ -290,7 +290,7 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
const_cast<SwDropPortion*>(this)->SetJoinBorderWithPrev(false);
}
-void SwDropPortion::PaintDrop( const SwTxtPaintInfo &rInf ) const
+void SwDropPortion::PaintDrop( const SwTextPaintInfo &rInf ) const
{
// normal output is being done during the normal painting
if( ! nDropHeight || ! pPart || nLines == 1 )
@@ -308,7 +308,7 @@ void SwDropPortion::PaintDrop( const SwTxtPaintInfo &rInf ) const
// make good for retouching
// Set baseline
- const_cast<SwTxtPaintInfo&>(rInf).Y( aOutPos.Y() + nDropHeight );
+ const_cast<SwTextPaintInfo&>(rInf).Y( aOutPos.Y() + nDropHeight );
// for background
const_cast<SwDropPortion*>(this)->Height( nDropHeight + nDropDescent );
@@ -324,19 +324,19 @@ void SwDropPortion::PaintDrop( const SwTxtPaintInfo &rInf ) const
aClipRect.Intersection( rInf.GetPaintRect() );
}
SwSaveClip aClip( const_cast<OutputDevice*>(rInf.GetOut()) );
- aClip.ChgClip( aClipRect, rInf.GetTxtFrm() );
+ aClip.ChgClip( aClipRect, rInf.GetTextFrm() );
// Just do, what we always do ...
- PaintTxt( rInf );
+ PaintText( rInf );
// save old values
const_cast<SwDropPortion*>(this)->Height( nOldHeight );
const_cast<SwDropPortion*>(this)->Width( nOldWidth );
const_cast<SwDropPortion*>(this)->SetAscent( nOldAscent );
- const_cast<SwTxtPaintInfo&>(rInf).Y( nOldPosY );
+ const_cast<SwTextPaintInfo&>(rInf).Y( nOldPosY );
}
-void SwDropPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwDropPortion::Paint( const SwTextPaintInfo &rInf ) const
{
// normal output is being done here
if( ! nDropHeight || ! pPart || 1 == nLines )
@@ -347,10 +347,10 @@ void SwDropPortion::Paint( const SwTxtPaintInfo &rInf ) const
// make sure that font is not rotated
SwFont* pTmpFont = 0;
- if ( rInf.GetFont()->GetOrientation( rInf.GetTxtFrm()->IsVertical() ) )
+ if ( rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() ) )
{
pTmpFont = new SwFont( *rInf.GetFont() );
- pTmpFont->SetVertical( 0, rInf.GetTxtFrm()->IsVertical() );
+ pTmpFont->SetVertical( 0, rInf.GetTextFrm()->IsVertical() );
}
SwFontSave aFontSave( rInf, pTmpFont );
@@ -358,16 +358,16 @@ void SwDropPortion::Paint( const SwTxtPaintInfo &rInf ) const
SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
aLayoutModeModifier.SetAuto();
- SwTxtPortion::Paint( rInf );
+ SwTextPortion::Paint( rInf );
delete pTmpFont;
}
}
-bool SwDropPortion::FormatTxt( SwTxtFormatInfo &rInf )
+bool SwDropPortion::FormatText( SwTextFormatInfo &rInf )
{
const sal_Int32 nOldLen = GetLen();
const sal_Int32 nOldInfLen = rInf.GetLen();
- if (!SwTxtPortion::Format( rInf ))
+ if (!SwTextPortion::Format( rInf ))
return false;
// looks like shit, but what can we do?
@@ -379,7 +379,7 @@ bool SwDropPortion::FormatTxt( SwTxtFormatInfo &rInf )
return true;
}
-SwPosSize SwDropPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+SwPosSize SwDropPortion::GetTextSize( const SwTextSizeInfo &rInf ) const
{
sal_uInt16 nMyX = 0;
sal_Int32 nIdx = 0;
@@ -397,8 +397,8 @@ SwPosSize SwDropPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
sal_Int32 nOldIdx = rInf.GetIdx();
sal_Int32 nOldLen = rInf.GetLen();
- const_cast<SwTxtSizeInfo&>(rInf).SetIdx( nIdx );
- const_cast<SwTxtSizeInfo&>(rInf).SetLen( rInf.GetLen() - nIdx );
+ const_cast<SwTextSizeInfo&>(rInf).SetIdx( nIdx );
+ const_cast<SwTextSizeInfo&>(rInf).SetLen( rInf.GetLen() - nIdx );
if( pCurrPart )
{
@@ -408,11 +408,11 @@ SwPosSize SwDropPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
// robust
SwFontSave aFontSave( rInf, pCurrPart ? &pCurrPart->GetFont() : 0 );
- SwPosSize aPosSize( SwTxtPortion::GetTxtSize( rInf ) );
+ SwPosSize aPosSize( SwTextPortion::GetTextSize( rInf ) );
aPosSize.Width( aPosSize.Width() + nMyX );
- const_cast<SwTxtSizeInfo&>(rInf).SetIdx( nOldIdx );
- const_cast<SwTxtSizeInfo&>(rInf).SetLen( nOldLen );
+ const_cast<SwTextSizeInfo&>(rInf).SetIdx( nOldIdx );
+ const_cast<SwTextSizeInfo&>(rInf).SetLen( nOldLen );
if( pCurrPart )
{
const_cast<SwDropPortion*>(this)->SetJoinBorderWithNext(false);
@@ -427,7 +427,7 @@ sal_Int32 SwDropPortion::GetCrsrOfst( const sal_uInt16 ) const
return 0;
}
-void SwTxtFormatter::CalcDropHeight( const sal_uInt16 nLines )
+void SwTextFormatter::CalcDropHeight( const sal_uInt16 nLines )
{
const SwLinePortion *const pOldCurr = GetCurr();
sal_uInt16 nDropHght = 0;
@@ -479,7 +479,7 @@ void SwTxtFormatter::CalcDropHeight( const sal_uInt16 nLines )
{
if( !Next() )
{
- OSL_ENSURE( false, "SwTxtFormatter::_CalcDropHeight: left Toulouse" );
+ OSL_ENSURE( false, "SwTextFormatter::_CalcDropHeight: left Toulouse" );
break;
}
}
@@ -489,7 +489,7 @@ void SwTxtFormatter::CalcDropHeight( const sal_uInt16 nLines )
* We assume hat the font height doesn't change and that at first there
* are at least as many lines, as the DropCap-setting claims
*/
-void SwTxtFormatter::GuessDropHeight( const sal_uInt16 nLines )
+void SwTextFormatter::GuessDropHeight( const sal_uInt16 nLines )
{
OSL_ENSURE( nLines, "GuessDropHeight: Give me more Lines!" );
sal_uInt16 nAscent = 0;
@@ -504,16 +504,16 @@ void SwTxtFormatter::GuessDropHeight( const sal_uInt16 nLines )
SetDropHeight( nHeight * nLines - GetDropDescent() );
}
-SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
+SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf )
{
- if( !pDropFmt )
+ if( !pDropFormat )
return 0;
- sal_Int32 nPorLen = pDropFmt->GetWholeWord() ? 0 : pDropFmt->GetChars();
- nPorLen = pFrm->GetTxtNode()->GetDropLen( nPorLen );
+ sal_Int32 nPorLen = pDropFormat->GetWholeWord() ? 0 : pDropFormat->GetChars();
+ nPorLen = pFrm->GetTextNode()->GetDropLen( nPorLen );
if( !nPorLen )
{
- static_cast<SwTxtFormatter*>(this)->ClearDropFmt();
+ static_cast<SwTextFormatter*>(this)->ClearDropFormat();
return 0;
}
@@ -523,17 +523,17 @@ SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
if ( !( GetDropHeight() || IsOnceMore() ) )
{
if ( GetNext() )
- CalcDropHeight( pDropFmt->GetLines() );
+ CalcDropHeight( pDropFormat->GetLines() );
else
- GuessDropHeight( pDropFmt->GetLines() );
+ GuessDropHeight( pDropFormat->GetLines() );
}
// the DropPortion
if( GetDropHeight() )
pDropPor = new SwDropPortion( GetDropLines(), GetDropHeight(),
- GetDropDescent(), pDropFmt->GetDistance() );
+ GetDropDescent(), pDropFormat->GetDistance() );
else
- pDropPor = new SwDropPortion( 0,0,0,pDropFmt->GetDistance() );
+ pDropPor = new SwDropPortion( 0,0,0,pDropFormat->GetDistance() );
pDropPor->SetLen( nPorLen );
@@ -543,14 +543,14 @@ SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
// font is used.
if ( GetDropLines() < 2 )
{
- static_cast<SwTxtFormatter*>(this)->SetPaintDrop( true );
+ static_cast<SwTextFormatter*>(this)->SetPaintDrop( true );
return pDropPor;
}
// build DropPortionParts:
OSL_ENSURE( ! rInf.GetIdx(), "Drop Portion not at 0 position!" );
sal_Int32 nNextChg = 0;
- const SwCharFmt* pFmt = pDropFmt->GetCharFmt();
+ const SwCharFormat* pFormat = pDropFormat->GetCharFormat();
SwDropPortionPart* pCurrPart = 0;
while ( nNextChg < nPorLen )
@@ -560,18 +560,18 @@ SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
// the font is deleted in the destructor of the drop portion part
SwFont* pTmpFnt = new SwFont( *rInf.GetFont() );
- if ( pFmt )
+ if ( pFormat )
{
- const SwAttrSet& rSet = pFmt->GetAttrSet();
- pTmpFnt->SetDiffFnt( &rSet, pFrm->GetTxtNode()->getIDocumentSettingAccess() );
+ const SwAttrSet& rSet = pFormat->GetAttrSet();
+ pTmpFnt->SetDiffFnt( &rSet, pFrm->GetTextNode()->getIDocumentSettingAccess() );
}
// we do not allow a vertical font for the drop portion
- pTmpFnt->SetVertical( 0, rInf.GetTxtFrm()->IsVertical() );
+ pTmpFnt->SetVertical( 0, rInf.GetTextFrm()->IsVertical() );
// find next attribute change / script change
const sal_Int32 nTmpIdx = nNextChg;
- sal_Int32 nNextAttr = std::min( static_cast<sal_Int32>(GetNextAttr()), rInf.GetTxt().getLength() );
+ sal_Int32 nNextAttr = std::min( static_cast<sal_Int32>(GetNextAttr()), rInf.GetText().getLength() );
nNextChg = pScriptInfo->NextScriptChg( nTmpIdx );
if( nNextChg > nNextAttr )
nNextChg = nNextAttr;
@@ -589,11 +589,11 @@ SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
pCurrPart = pPart;
}
- static_cast<SwTxtFormatter*>(this)->SetPaintDrop( true );
+ static_cast<SwTextFormatter*>(this)->SetPaintDrop( true );
return pDropPor;
}
-void SwTxtPainter::PaintDropPortion()
+void SwTextPainter::PaintDropPortion()
{
const SwDropPortion *pDrop = GetInfo().GetParaPortion()->FindDropPortion();
OSL_ENSURE( pDrop, "DrapCop-Portion not available." );
@@ -643,7 +643,7 @@ void SwTxtPainter::PaintDropPortion()
class SwDropCapCache
{
long aMagicNo[ DROP_CACHE_SIZE ];
- OUString aTxt[ DROP_CACHE_SIZE ];
+ OUString aText[ DROP_CACHE_SIZE ];
sal_uInt16 aFactor[ DROP_CACHE_SIZE ];
sal_uInt16 aWishedHeight[ DROP_CACHE_SIZE ];
short aDescent[ DROP_CACHE_SIZE ];
@@ -651,7 +651,7 @@ class SwDropCapCache
public:
SwDropCapCache();
~SwDropCapCache(){}
- void CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf );
+ void CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf );
};
// SwDropCapCache Ctor / Dtor
@@ -666,7 +666,7 @@ void SwDropPortion::DeleteDropCapCache()
delete pDropCapCache;
}
-void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
+void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf )
{
const void* pFntNo = 0;
sal_uInt16 nTmpIdx = 0;
@@ -676,7 +676,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
SwDropPortionPart* pCurrPart = pDrop->GetPart();
const bool bUseCache = ! pCurrPart->GetFollow() && !pCurrPart->GetFont().HasBorder();
sal_Int32 nIdx = rInf.GetIdx();
- OUString aStr(rInf.GetTxt().copy(nIdx, pCurrPart->GetLen()));
+ OUString aStr(rInf.GetText().copy(nIdx, pCurrPart->GetLen()));
long nAscent = 0;
long nDescent = 0;
@@ -691,7 +691,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
nTmpIdx = 0;
while( nTmpIdx < DROP_CACHE_SIZE &&
- ( aTxt[ nTmpIdx ] != aStr || aMagicNo[ nTmpIdx ] != sal_IntPtr(pFntNo) ||
+ ( aText[ nTmpIdx ] != aStr || aMagicNo[ nTmpIdx ] != sal_IntPtr(pFntNo) ||
aWishedHeight[ nTmpIdx ] != pDrop->GetDropHeight() ) )
++nTmpIdx;
}
@@ -726,7 +726,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
{
// save keys for cache
aMagicNo[ nTmpIdx ] = sal_IntPtr(pFntNo);
- aTxt[ nTmpIdx ] = aStr;
+ aText[ nTmpIdx ] = aStr;
aWishedHeight[ nTmpIdx ] = sal_uInt16(nWishedHeight);
// save initial scaling factor
aFactor[ nTmpIdx ] = (sal_uInt16)nFactor;
@@ -778,7 +778,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
nAscent = rFnt.GetAscent( rInf.GetVsh(), *pOut );
// we get the rectangle that covers all chars
- bool bHaveGlyphRect = pOut->GetTextBoundRect( aRect, rInf.GetTxt(), 0,
+ bool bHaveGlyphRect = pOut->GetTextBoundRect( aRect, rInf.GetText(), 0,
nIdx, pCurrPart->GetLen() ) &&
! aRect.IsEmpty();
@@ -797,7 +797,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
}
pWin->SetFont( rFnt.GetActualFont() );
- bHaveGlyphRect = pWin->GetTextBoundRect( aRect, rInf.GetTxt(), 0,
+ bHaveGlyphRect = pWin->GetTextBoundRect( aRect, rInf.GetText(), 0,
nIdx, pCurrPart->GetLen() ) &&
! aRect.IsEmpty();
}
@@ -855,7 +855,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
// respect to a common baseline : 0
// get descent and ascent from union
- if ( rInf.GetTxtFrm()->IsVertical() )
+ if ( rInf.GetTextFrm()->IsVertical() )
{
nDescent = aCommonRect.Left();
nAscent = aCommonRect.Right();
@@ -933,7 +933,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
pDrop->SetY( (short)nDescent );
}
-bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
+bool SwDropPortion::Format( SwTextFormatInfo &rInf )
{
bool bFull = false;
Fix( (sal_uInt16)rInf.X() );
@@ -962,7 +962,7 @@ bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
SwFontSave aFontSave( rInf, &rFnt );
SetJoinBorderWithNext(pCurrPart->GetJoinBorderWithNext());
SetJoinBorderWithPrev(pCurrPart->GetJoinBorderWithPrev());
- bFull = FormatTxt( rInf );
+ bFull = FormatText( rInf );
if ( bFull )
break;
@@ -995,9 +995,9 @@ bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
if( bFull )
{
- // FormatTxt could have caused nHeight to be 0
+ // FormatText could have caused nHeight to be 0
if ( !Height() )
- Height( rInf.GetTxtHeight() );
+ Height( rInf.GetTextHeight() );
// And now for another round
nDropHeight = nLines = 0;
@@ -1005,16 +1005,16 @@ bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
pPart = NULL;
// Meanwhile use normal formatting
- bFull = SwTxtPortion::Format( rInf );
+ bFull = SwTextPortion::Format( rInf );
}
else
rInf.SetDropInit( true );
- Height( rInf.GetTxtHeight() );
+ Height( rInf.GetTextHeight() );
SetAscent( rInf.GetAscent() );
}
else
- bFull = SwTxtPortion::Format( rInf );
+ bFull = SwTextPortion::Format( rInf );
if( bFull )
nDistance = 0;
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 39bbdc9c6712..98fc3c98158c 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -68,26 +68,26 @@ static bool lcl_IsInBody( SwFrm *pFrm )
}
}
-SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
- const SwTxtAttr *pHint ) const
+SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,
+ const SwTextAttr *pHint ) const
{
SwExpandPortion *pRet = 0;
SwFrm *pFrame = pFrm;
- SwField *pFld = const_cast<SwField*>(pHint->GetFmtFld().GetField());
- const bool bName = rInf.GetOpt().IsFldName();
+ SwField *pField = const_cast<SwField*>(pHint->GetFormatField().GetField());
+ const bool bName = rInf.GetOpt().IsFieldName();
- SwCharFmt* pChFmt = 0;
+ SwCharFormat* pChFormat = 0;
bool bNewFlyPor = false;
sal_uInt16 subType = 0;
// set language
- const_cast<SwTxtFormatter*>(this)->SeekAndChg( rInf );
- if (pFld->GetLanguage() != GetFnt()->GetLanguage())
+ const_cast<SwTextFormatter*>(this)->SeekAndChg( rInf );
+ if (pField->GetLanguage() != GetFnt()->GetLanguage())
{
- pFld->SetLanguage( GetFnt()->GetLanguage() );
+ pField->SetLanguage( GetFnt()->GetLanguage() );
// let the visual note know about its new language
- if (pFld->GetTyp()->Which()==RES_POSTITFLD)
- const_cast<SwFmtFld*> (&pHint->GetFmtFld())->Broadcast( SwFmtFldHint( &pHint->GetFmtFld(), SwFmtFldHintWhich::LANGUAGE ) );
+ if (pField->GetTyp()->Which()==RES_POSTITFLD)
+ const_cast<SwFormatField*> (&pHint->GetFormatField())->Broadcast( SwFormatFieldHint( &pHint->GetFormatField(), SwFormatFieldHintWhich::LANGUAGE ) );
}
SwViewShell *pSh = rInf.GetVsh();
@@ -95,111 +95,111 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
bool const bInClipboard( pDoc == nullptr || pDoc->IsClipBoard() );
bool bPlaceHolder = false;
- switch( pFld->GetTyp()->Which() )
+ switch( pField->GetTyp()->Which() )
{
case RES_SCRIPTFLD:
case RES_POSTITFLD:
- pRet = new SwPostItsPortion( RES_SCRIPTFLD == pFld->GetTyp()->Which() );
+ pRet = new SwPostItsPortion( RES_SCRIPTFLD == pField->GetTyp()->Which() );
break;
case RES_COMBINED_CHARS:
{
if( bName )
- pRet = new SwFldPortion( pFld->GetFieldName() );
+ pRet = new SwFieldPortion( pField->GetFieldName() );
else
- pRet = new SwCombinedPortion( pFld->ExpandField(bInClipboard) );
+ pRet = new SwCombinedPortion( pField->ExpandField(bInClipboard) );
}
break;
case RES_HIDDENTXTFLD:
{
OUString const aStr( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
pRet = new SwHiddenPortion(aStr);
}
break;
case RES_CHAPTERFLD:
- if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
+ if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
{
- static_cast<SwChapterField*>(pFld)->ChangeExpansion( pFrame,
- &static_txtattr_cast<SwTxtFld const*>(pHint)->GetTxtNode());
+ static_cast<SwChapterField*>(pField)->ChangeExpansion( pFrame,
+ &static_txtattr_cast<SwTextField const*>(pHint)->GetTextNode());
}
{
OUString const aStr( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion( aStr );
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion( aStr );
}
break;
case RES_DOCSTATFLD:
- if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
+ if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
{
- static_cast<SwDocStatField*>(pFld)->ChangeExpansion( pFrame );
+ static_cast<SwDocStatField*>(pField)->ChangeExpansion( pFrame );
}
{
OUString const aStr( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion( aStr );
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion( aStr );
}
- static_cast<SwFldPortion*>(pRet)->m_nAttrFldType= ATTR_PAGECOOUNTFLD;
+ static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= ATTR_PAGECOOUNTFLD;
break;
case RES_PAGENUMBERFLD:
{
- if( !bName && pSh && pSh->GetLayout() && !pSh->Imp()->IsUpdateExpFlds() )
+ if( !bName && pSh && pSh->GetLayout() && !pSh->Imp()->IsUpdateExpFields() )
{
- SwPageNumberFieldType *pPageNr = static_cast<SwPageNumberFieldType *>(pFld->GetTyp());
+ SwPageNumberFieldType *pPageNr = static_cast<SwPageNumberFieldType *>(pField->GetTyp());
const SwRootFrm* pTmpRootFrm = pSh->GetLayout();
const bool bVirt = pTmpRootFrm->IsVirtPageNum();
sal_uInt16 nVirtNum = pFrame->GetVirtPageNum();
sal_uInt16 nNumPages = pTmpRootFrm->GetPageNum();
- sal_Int16 nNumFmt = -1;
- if(SVX_NUM_PAGEDESC == pFld->GetFormat())
- nNumFmt = pFrame->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType();
- static_cast<SwPageNumberField*>(pFld)
+ sal_Int16 nNumFormat = -1;
+ if(SVX_NUM_PAGEDESC == pField->GetFormat())
+ nNumFormat = pFrame->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType();
+ static_cast<SwPageNumberField*>(pField)
->ChangeExpansion(nVirtNum, nNumPages);
pPageNr->ChangeExpansion(pDoc,
- bVirt, nNumFmt > -1 ? &nNumFmt : 0);
+ bVirt, nNumFormat > -1 ? &nNumFormat : 0);
}
{
OUString const aStr( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion( aStr );
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion( aStr );
}
- static_cast<SwFldPortion*>(pRet)->m_nAttrFldType= ATTR_PAGENUMBERFLD;
+ static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= ATTR_PAGENUMBERFLD;
break;
}
case RES_GETEXPFLD:
{
- if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
+ if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
{
- SwGetExpField* pExpFld = static_cast<SwGetExpField*>(pFld);
+ SwGetExpField* pExpField = static_cast<SwGetExpField*>(pField);
if( !::lcl_IsInBody( pFrame ) )
{
- pExpFld->ChgBodyTxtFlag( false );
- pExpFld->ChangeExpansion(*pFrame,
- *static_txtattr_cast<SwTxtFld const*>(pHint));
+ pExpField->ChgBodyTextFlag( false );
+ pExpField->ChangeExpansion(*pFrame,
+ *static_txtattr_cast<SwTextField const*>(pHint));
}
- else if( !pExpFld->IsInBodyTxt() )
+ else if( !pExpField->IsInBodyText() )
{
// Was something else previously, thus: expand first, then convert it!
- pExpFld->ChangeExpansion(*pFrame,
- *static_txtattr_cast<SwTxtFld const*>(pHint));
- pExpFld->ChgBodyTxtFlag( true );
+ pExpField->ChangeExpansion(*pFrame,
+ *static_txtattr_cast<SwTextField const*>(pHint));
+ pExpField->ChgBodyTextFlag( true );
}
}
{
OUString const aStr( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion( aStr );
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion( aStr );
}
break;
}
@@ -207,69 +207,69 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
{
if( !bName )
{
- SwDBField* pDBFld = static_cast<SwDBField*>(pFld);
- pDBFld->ChgBodyTxtFlag( ::lcl_IsInBody( pFrame ) );
+ SwDBField* pDBField = static_cast<SwDBField*>(pField);
+ pDBField->ChgBodyTextFlag( ::lcl_IsInBody( pFrame ) );
}
{
OUString const aStr( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion(aStr);
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion(aStr);
}
break;
}
case RES_REFPAGEGETFLD:
- if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
+ if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
{
- static_cast<SwRefPageGetField*>(pFld)->ChangeExpansion(pFrame,
- static_txtattr_cast<SwTxtFld const*>(pHint));
+ static_cast<SwRefPageGetField*>(pField)->ChangeExpansion(pFrame,
+ static_txtattr_cast<SwTextField const*>(pHint));
}
{
OUString const aStr( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion(aStr);
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion(aStr);
}
break;
case RES_JUMPEDITFLD:
if( !bName )
- pChFmt = static_cast<SwJumpEditField*>(pFld)->GetCharFmt();
+ pChFormat = static_cast<SwJumpEditField*>(pField)->GetCharFormat();
bNewFlyPor = true;
bPlaceHolder = true;
break;
case RES_GETREFFLD:
- subType = static_cast<SwGetRefField*>(pFld)->GetSubType();
+ subType = static_cast<SwGetRefField*>(pField)->GetSubType();
{
OUString const str( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion(str);
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion(str);
}
if( subType == REF_BOOKMARK )
- static_cast<SwFldPortion*>(pRet)->m_nAttrFldType = ATTR_BOOKMARKFLD;
+ static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = ATTR_BOOKMARKFLD;
else if( subType == REF_SETREFATTR )
- static_cast<SwFldPortion*>(pRet)->m_nAttrFldType = ATTR_SETREFATTRFLD;
+ static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = ATTR_SETREFATTRFLD;
break;
case RES_DATETIMEFLD:
- subType = static_cast<SwDateTimeField*>(pFld)->GetSubType();
+ subType = static_cast<SwDateTimeField*>(pField)->GetSubType();
{
OUString const str( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion(str);
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion(str);
}
if( subType & DATEFLD )
- static_cast<SwFldPortion*>(pRet)->m_nAttrFldType= ATTR_DATEFLD;
+ static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= ATTR_DATEFLD;
else if( subType & TIMEFLD )
- static_cast<SwFldPortion*>(pRet)->m_nAttrFldType = ATTR_TIMEFLD;
+ static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = ATTR_TIMEFLD;
break;
default:
{
OUString const aStr( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion(aStr);
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion(aStr);
}
}
@@ -279,23 +279,23 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
if( !bName )
{
pTmpFnt = new SwFont( *pFnt );
- pTmpFnt->SetDiffFnt( &pChFmt->GetAttrSet(), pFrm->GetTxtNode()->getIDocumentSettingAccess() );
+ pTmpFnt->SetDiffFnt( &pChFormat->GetAttrSet(), pFrm->GetTextNode()->getIDocumentSettingAccess() );
}
{
OUString const aStr( (bName)
- ? pFld->GetFieldName()
- : pFld->ExpandField(bInClipboard) );
- pRet = new SwFldPortion(aStr, pTmpFnt, bPlaceHolder);
+ ? pField->GetFieldName()
+ : pField->ExpandField(bInClipboard) );
+ pRet = new SwFieldPortion(aStr, pTmpFnt, bPlaceHolder);
}
}
return pRet;
}
-static SwFldPortion * lcl_NewMetaPortion(SwTxtAttr & rHint, const bool bPrefix)
+static SwFieldPortion * lcl_NewMetaPortion(SwTextAttr & rHint, const bool bPrefix)
{
::sw::Meta *const pMeta(
- static_cast<SwFmtMeta &>(rHint.GetAttr()).GetMeta() );
+ static_cast<SwFormatMeta &>(rHint.GetAttr()).GetMeta() );
OUString fix;
::sw::MetaField *const pField( dynamic_cast< ::sw::MetaField * >(pMeta) );
OSL_ENSURE(pField, "lcl_NewMetaPortion: no meta field?");
@@ -303,7 +303,7 @@ static SwFldPortion * lcl_NewMetaPortion(SwTxtAttr & rHint, const bool bPrefix)
{
pField->GetPrefixAndSuffix((bPrefix) ? &fix : 0, (bPrefix) ? 0 : &fix);
}
- return new SwFldPortion( fix );
+ return new SwFieldPortion( fix );
}
/**
@@ -314,14 +314,14 @@ static SwFldPortion * lcl_NewMetaPortion(SwTxtAttr & rHint, const bool bPrefix)
* 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)
+SwExpandPortion * SwTextFormatter::TryNewNoLengthPortion(SwTextFormatInfo & rInfo)
{
if (pHints)
{
const sal_Int32 nIdx(rInfo.GetIdx());
while (m_nHintEndIndex < pHints->GetEndCount())
{
- SwTxtAttr & rHint( *pHints->GetEnd(m_nHintEndIndex) );
+ SwTextAttr & rHint( *pHints->GetEnd(m_nHintEndIndex) );
sal_Int32 const nEnd( *rHint.GetAnyEnd() );
if (nEnd > nIdx)
{
@@ -332,7 +332,7 @@ SwExpandPortion * SwTxtFormatter::TryNewNoLengthPortion(SwTxtFormatInfo & rInfo)
{
if (RES_TXTATR_METAFIELD == rHint.Which())
{
- SwFldPortion *const pPortion(
+ SwFieldPortion *const pPortion(
lcl_NewMetaPortion(rHint, false));
pPortion->SetNoLength(); // no CH_TXTATR at hint end!
return pPortion;
@@ -343,13 +343,13 @@ SwExpandPortion * SwTxtFormatter::TryNewNoLengthPortion(SwTxtFormatInfo & rInfo)
return 0;
}
-SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
+SwLinePortion *SwTextFormatter::NewExtraPortion( SwTextFormatInfo &rInf )
{
- SwTxtAttr *pHint = GetAttr( rInf.GetIdx() );
+ SwTextAttr *pHint = GetAttr( rInf.GetIdx() );
SwLinePortion *pRet = 0;
if( !pHint )
{
- pRet = new SwTxtPortion;
+ pRet = new SwTextPortion;
pRet->SetLen( 1 );
rInf.SetLen( 1 );
return pRet;
@@ -364,13 +364,13 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
}
case RES_TXTATR_FTN :
{
- pRet = NewFtnPortion( rInf, pHint );
+ pRet = NewFootnotePortion( rInf, pHint );
break;
}
case RES_TXTATR_FIELD :
case RES_TXTATR_ANNOTATION :
{
- pRet = NewFldPortion( rInf, pHint );
+ pRet = NewFieldPortion( rInf, pHint );
break;
}
case RES_TXTATR_REFMARK :
@@ -393,7 +393,7 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
if( !pRet )
{
const OUString aNothing;
- pRet = new SwFldPortion( aNothing );
+ pRet = new SwFieldPortion( aNothing );
rInf.SetLen( 1 );
}
return pRet;
@@ -404,22 +404,22 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
* character than can be configured to be shown). However, in practice MSO also uses it as direct formatting
* for numbering in that paragraph. I don't know if the problem is in the spec or in MSWord.
*/
-static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTxtFormatInfo& rInf, const IDocumentSettingAccess* pIDSA )
+static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTextFormatInfo& rInf, const IDocumentSettingAccess* pIDSA )
{
- SwTxtNode* node = rInf.GetTxtFrm()->GetTxtNode();
+ SwTextNode* node = rInf.GetTextFrm()->GetTextNode();
if( !pIDSA->get(DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ))
return;
if( SwpHints* hints = node->GetpSwpHints())
{
for( size_t i = 0; i < hints->Count(); ++i )
{
- SwTxtAttr* hint = hints->GetTextHint( i );
+ SwTextAttr* hint = hints->GetTextHint( i );
// Formatting for the paragraph mark is set to apply only to the (non-existent) extra character
// the at end of the txt node.
if( hint->Which() == RES_TXTATR_AUTOFMT && hint->GetEnd() != NULL
&& hint->GetStart() == *hint->GetEnd() && hint->GetStart() == node->Len())
{
- std::shared_ptr<SfxItemSet> pSet(hint->GetAutoFmt().GetStyleHandle());
+ std::shared_ptr<SfxItemSet> pSet(hint->GetAutoFormat().GetStyleHandle());
// Check each item and in case it should be ignored, then clear it.
std::shared_ptr<SfxItemSet> pCleanedSet;
@@ -431,7 +431,7 @@ static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTxtForm
const SfxPoolItem* pItem = aIter.GetCurItem();
while (true)
{
- if (SwTxtNode::IsIgnoredCharFmtForNumbering(pItem->Which()))
+ if (SwTextNode::IsIgnoredCharFormatForNumbering(pItem->Which()))
pCleanedSet->ClearItem(pItem->Which());
if (aIter.IsAtEnd())
@@ -447,20 +447,20 @@ static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTxtForm
}
-SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
+SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) const
{
- if( rInf.IsNumDone() || rInf.GetTxtStart() != nStart
- || rInf.GetTxtStart() != rInf.GetIdx() )
+ if( rInf.IsNumDone() || rInf.GetTextStart() != nStart
+ || rInf.GetTextStart() != rInf.GetIdx() )
return 0;
SwNumberPortion *pRet = 0;
- const SwTxtNode* pTxtNd = GetTxtFrm()->GetTxtNode();
- const SwNumRule* pNumRule = pTxtNd->GetNumRule();
+ const SwTextNode* pTextNd = GetTextFrm()->GetTextNode();
+ const SwNumRule* pNumRule = pTextNd->GetNumRule();
// Has a "valid" number?
- if( pTxtNd->IsNumbered() && pTxtNd->IsCountedInList())
+ if( pTextNd->IsNumbered() && pTextNd->IsCountedInList())
{
- int nLevel = pTxtNd->GetActualListLevel();
+ int nLevel = pTextNd->GetActualListLevel();
if (nLevel < 0)
nLevel = 0;
@@ -468,21 +468,21 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
if (nLevel >= MAXLEVEL)
nLevel = MAXLEVEL - 1;
- const SwNumFmt &rNumFmt = pNumRule->Get( nLevel );
- const bool bLeft = SVX_ADJUST_LEFT == rNumFmt.GetNumAdjust();
- const bool bCenter = SVX_ADJUST_CENTER == rNumFmt.GetNumAdjust();
+ const SwNumFormat &rNumFormat = pNumRule->Get( nLevel );
+ const bool bLeft = SVX_ADJUST_LEFT == rNumFormat.GetNumAdjust();
+ const bool bCenter = SVX_ADJUST_CENTER == rNumFormat.GetNumAdjust();
const bool bLabelAlignmentPosAndSpaceModeActive(
- rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT );
+ rNumFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT );
const sal_uInt16 nMinDist = bLabelAlignmentPosAndSpaceModeActive
- ? 0 : rNumFmt.GetCharTextDistance();
+ ? 0 : rNumFormat.GetCharTextDistance();
- if( SVX_NUM_BITMAP == rNumFmt.GetNumberingType() )
+ if( SVX_NUM_BITMAP == rNumFormat.GetNumberingType() )
{
- pRet = new SwGrfNumPortion( const_cast<SwTxtFrm*>(GetTxtFrm()),
- pTxtNd->GetLabelFollowedBy(),
- rNumFmt.GetBrush(),
- rNumFmt.GetGraphicOrientation(),
- rNumFmt.GetGraphicSize(),
+ pRet = new SwGrfNumPortion( const_cast<SwTextFrm*>(GetTextFrm()),
+ pTextNd->GetLabelFollowedBy(),
+ rNumFormat.GetBrush(),
+ rNumFormat.GetGraphicOrientation(),
+ rNumFormat.GetGraphicSize(),
bLeft, bCenter, nMinDist,
bLabelAlignmentPosAndSpaceModeActive );
long nTmpA = rInf.GetLast()->GetAscent();
@@ -493,17 +493,17 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
else
{
// The SwFont is created dynamically and passed in the ctor,
- // as the CharFmt only returns an SV-Font.
+ // as the CharFormat only returns an SV-Font.
// In the dtor of SwNumberPortion, the SwFont is deleted.
SwFont *pNumFnt = 0;
- const SwAttrSet* pFmt = rNumFmt.GetCharFmt() ?
- &rNumFmt.GetCharFmt()->GetAttrSet() :
+ const SwAttrSet* pFormat = rNumFormat.GetCharFormat() ?
+ &rNumFormat.GetCharFormat()->GetAttrSet() :
NULL;
- const IDocumentSettingAccess* pIDSA = pTxtNd->getIDocumentSettingAccess();
+ const IDocumentSettingAccess* pIDSA = pTextNd->getIDocumentSettingAccess();
- if( SVX_NUM_CHAR_SPECIAL == rNumFmt.GetNumberingType() )
+ if( SVX_NUM_CHAR_SPECIAL == rNumFormat.GetNumberingType() )
{
- const vcl::Font *pFmtFnt = rNumFmt.GetBulletFont();
+ const vcl::Font *pFormatFnt = rNumFormat.GetBulletFont();
// Build a new bullet font basing on the current paragraph font:
pNumFnt = new SwFont( &rInf.GetCharAttr(), pIDSA );
@@ -528,19 +528,19 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
// Apply the explicit attributes from the character style
// associated with the numering to the new bullet font.
- if( pFmt )
- pNumFnt->SetDiffFnt( pFmt, pIDSA );
+ if( pFormat )
+ pNumFnt->SetDiffFnt( pFormat, pIDSA );
checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA );
- if ( pFmtFnt )
+ if ( pFormatFnt )
{
const sal_uInt8 nAct = pNumFnt->GetActual();
- pNumFnt->SetFamily( pFmtFnt->GetFamily(), nAct );
- pNumFnt->SetName( pFmtFnt->GetName(), nAct );
- pNumFnt->SetStyleName( pFmtFnt->GetStyleName(), nAct );
- pNumFnt->SetCharSet( pFmtFnt->GetCharSet(), nAct );
- pNumFnt->SetPitch( pFmtFnt->GetPitch(), nAct );
+ pNumFnt->SetFamily( pFormatFnt->GetFamily(), nAct );
+ pNumFnt->SetName( pFormatFnt->GetName(), nAct );
+ pNumFnt->SetStyleName( pFormatFnt->GetStyleName(), nAct );
+ pNumFnt->SetCharSet( pFormatFnt->GetCharSet(), nAct );
+ pNumFnt->SetPitch( pFormatFnt->GetPitch(), nAct );
}
// we do not allow a vertical font
@@ -548,25 +548,25 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
pFrm->IsVertical() );
// --> OD 2008-01-23 #newlistelevelattrs#
- pRet = new SwBulletPortion( rNumFmt.GetBulletChar(),
- pTxtNd->GetLabelFollowedBy(),
+ pRet = new SwBulletPortion( rNumFormat.GetBulletChar(),
+ pTextNd->GetLabelFollowedBy(),
pNumFnt,
bLeft, bCenter, nMinDist,
bLabelAlignmentPosAndSpaceModeActive );
}
else
{
- OUString aTxt( pTxtNd->GetNumString() );
- if ( !aTxt.isEmpty() )
+ OUString aText( pTextNd->GetNumString() );
+ if ( !aText.isEmpty() )
{
- aTxt += pTxtNd->GetLabelFollowedBy();
+ aText += pTextNd->GetLabelFollowedBy();
}
// Not just an optimization ...
// A number portion without text will be assigned a width of 0.
// The succeeding text portion will flow into the BreakCut in the BreakLine,
// although we have rInf.GetLast()->GetFlyPortion()!
- if( !aTxt.isEmpty() )
+ if( !aText.isEmpty() )
{
// Build a new numbering font basing on the current paragraph font:
@@ -584,15 +584,15 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
// Apply the explicit attributes from the character style
// associated with the numering to the new bullet font.
- if( pFmt )
- pNumFnt->SetDiffFnt( pFmt, pIDSA );
+ if( pFormat )
+ pNumFnt->SetDiffFnt( pFormat, pIDSA );
checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA );
// we do not allow a vertical font
pNumFnt->SetVertical( pNumFnt->GetOrientation(), pFrm->IsVertical() );
- pRet = new SwNumberPortion( aTxt, pNumFnt,
+ pRet = new SwNumberPortion( aText, pNumFnt,
bLeft, bCenter, nMinDist,
bLabelAlignmentPosAndSpaceModeActive );
}
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index cb32445f4ba2..ed33e4c08011 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -172,16 +172,16 @@ void ClrContourCache()
// #i68520#
const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj,
const SwRect &rLine,
- const SwTxtFrm* pFrm,
+ const SwTextFrm* pFrm,
const long nXPos,
const bool bRight )
{
SwRect aRet;
- const SwFrmFmt* pFmt = &(pAnchoredObj->GetFrmFmt());
- if( pFmt->GetSurround().IsContour() &&
+ const SwFrameFormat* pFormat = &(pAnchoredObj->GetFrameFormat());
+ if( pFormat->GetSurround().IsContour() &&
( !pAnchoredObj->ISA(SwFlyFrm) ||
( static_cast<const SwFlyFrm*>(pAnchoredObj)->Lower() &&
- static_cast<const SwFlyFrm*>(pAnchoredObj)->Lower()->IsNoTxtFrm() ) ) )
+ static_cast<const SwFlyFrm*>(pAnchoredObj)->Lower()->IsNoTextFrm() ) ) )
{
aRet = pAnchoredObj->GetObjRectWithSpaces();
if( aRet.IsOver( rLine ) )
@@ -190,7 +190,7 @@ const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj
pContourCache = new SwContourCache;
aRet = pContourCache->ContourRect(
- pFmt, pAnchoredObj->GetDrawObj(), pFrm, rLine, nXPos, bRight );
+ pFormat, pAnchoredObj->GetDrawObj(), pFrm, rLine, nXPos, bRight );
}
else
aRet.Width( 0 );
@@ -203,8 +203,8 @@ const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj
return aRet;
}
-const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
- const SdrObject* pObj, const SwTxtFrm* pFrm, const SwRect &rLine,
+const SwRect SwContourCache::ContourRect( const SwFormat* pFormat,
+ const SdrObject* pObj, const SwTextFrm* pFrm, const SwRect &rLine,
const long nXPos, const bool bRight )
{
SwRect aRet;
@@ -242,15 +242,15 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
::basegfx::B2DPolyPolygon aContourPoly(pObj->TakeContour());
pPolyPolygon = new ::basegfx::B2DPolyPolygon(aContourPoly);
}
- const SvxLRSpaceItem &rLRSpace = pFmt->GetLRSpace();
- const SvxULSpaceItem &rULSpace = pFmt->GetULSpace();
+ const SvxLRSpaceItem &rLRSpace = pFormat->GetLRSpace();
+ const SvxULSpaceItem &rULSpace = pFormat->GetULSpace();
memmove( pTextRanger + 1, pTextRanger, nObjCnt * sizeof( TextRanger* ) );
memmove( (SdrObject**)pSdrObj + 1, pSdrObj, nObjCnt++ * sizeof( SdrObject* ) );
pSdrObj[ 0 ] = pObj; // due to #37347 the Object must be entered only
// after GetContour()
pTextRanger[ 0 ] = new TextRanger( aPolyPolygon, pPolyPolygon, 20,
(sal_uInt16)rLRSpace.GetLeft(), (sal_uInt16)rLRSpace.GetRight(),
- pFmt->GetSurround().IsOutside(), false, pFrm->IsVertical() );
+ pFormat->GetSurround().IsOutside(), false, pFrm->IsVertical() );
pTextRanger[ 0 ]->SetUpper( rULSpace.GetUpper() );
pTextRanger[ 0 ]->SetLower( rULSpace.GetLower() );
@@ -310,7 +310,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
return aRet;
}
-SwTxtFly::SwTxtFly()
+SwTextFly::SwTextFly()
: pPage(0)
, mpCurrAnchoredObj(0)
, pCurrFrm(0)
@@ -328,42 +328,42 @@ SwTxtFly::SwTxtFly()
{
}
-SwTxtFly::SwTxtFly( const SwTxtFrm *pFrm )
+SwTextFly::SwTextFly( const SwTextFrm *pFrm )
{
- CtorInitTxtFly( pFrm );
+ CtorInitTextFly( pFrm );
}
-SwTxtFly::SwTxtFly( const SwTxtFly& rTxtFly )
+SwTextFly::SwTextFly( const SwTextFly& rTextFly )
{
- pPage = rTxtFly.pPage;
- mpCurrAnchoredObj = rTxtFly.mpCurrAnchoredObj;
- pCurrFrm = rTxtFly.pCurrFrm;
- pMaster = rTxtFly.pMaster;
- if( rTxtFly.mpAnchoredObjList )
+ pPage = rTextFly.pPage;
+ mpCurrAnchoredObj = rTextFly.mpCurrAnchoredObj;
+ pCurrFrm = rTextFly.pCurrFrm;
+ pMaster = rTextFly.pMaster;
+ if( rTextFly.mpAnchoredObjList )
{
- mpAnchoredObjList = new SwAnchoredObjList( *(rTxtFly.mpAnchoredObjList) );
+ mpAnchoredObjList = new SwAnchoredObjList( *(rTextFly.mpAnchoredObjList) );
}
else
{
mpAnchoredObjList = NULL;
}
- bOn = rTxtFly.bOn;
- bTopRule = rTxtFly.bTopRule;
- nMinBottom = rTxtFly.nMinBottom;
- nNextTop = rTxtFly.nNextTop;
- nIndex = rTxtFly.nIndex;
- mbIgnoreCurrentFrame = rTxtFly.mbIgnoreCurrentFrame;
- mbIgnoreContour = rTxtFly.mbIgnoreContour;
- mbIgnoreObjsInHeaderFooter = rTxtFly.mbIgnoreObjsInHeaderFooter;
+ bOn = rTextFly.bOn;
+ bTopRule = rTextFly.bTopRule;
+ nMinBottom = rTextFly.nMinBottom;
+ nNextTop = rTextFly.nNextTop;
+ nIndex = rTextFly.nIndex;
+ mbIgnoreCurrentFrame = rTextFly.mbIgnoreCurrentFrame;
+ mbIgnoreContour = rTextFly.mbIgnoreContour;
+ mbIgnoreObjsInHeaderFooter = rTextFly.mbIgnoreObjsInHeaderFooter;
}
-SwTxtFly::~SwTxtFly()
+SwTextFly::~SwTextFly()
{
delete mpAnchoredObjList;
}
-void SwTxtFly::CtorInitTxtFly( const SwTxtFrm *pFrm )
+void SwTextFly::CtorInitTextFly( const SwTextFrm *pFrm )
{
mbIgnoreCurrentFrame = false;
mbIgnoreContour = false;
@@ -389,7 +389,7 @@ void SwTxtFly::CtorInitTxtFly( const SwTxtFrm *pFrm )
nIndex = ULONG_MAX;
}
-SwRect SwTxtFly::_GetFrm( const SwRect &rRect, bool bTop ) const
+SwRect SwTextFly::_GetFrm( const SwRect &rRect, bool bTop ) const
{
SwRect aRet;
if( ForEach( rRect, &aRet, true ) )
@@ -408,7 +408,7 @@ SwRect SwTxtFly::_GetFrm( const SwRect &rRect, bool bTop ) const
return aRet;
}
-bool SwTxtFly::IsAnyFrm() const
+bool SwTextFly::IsAnyFrm() const
{
SWAP_IF_SWAPPED( pCurrFrm )
@@ -421,9 +421,9 @@ bool SwTxtFly::IsAnyFrm() const
return bRet;
}
-bool SwTxtFly::IsAnyObj( const SwRect &rRect ) const
+bool SwTextFly::IsAnyObj( const SwRect &rRect ) const
{
- OSL_ENSURE( bOn, "SwTxtFly::IsAnyObj: Who's knocking?" );
+ OSL_ENSURE( bOn, "SwTextFly::IsAnyObj: Who's knocking?" );
SwRect aRect( rRect );
if ( aRect.IsEmpty() )
@@ -452,15 +452,15 @@ bool SwTxtFly::IsAnyObj( const SwRect &rRect ) const
return false;
}
-const SwCntntFrm* SwTxtFly::_GetMaster()
+const SwContentFrm* SwTextFly::_GetMaster()
{
pMaster = pCurrFrm;
while( pMaster && pMaster->IsFollow() )
- pMaster = (SwCntntFrm*)pMaster->FindMaster();
+ pMaster = (SwContentFrm*)pMaster->FindMaster();
return pMaster;
}
-bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
+bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf )
{
SwSaveClip aClipSave( rInf.GetpOut() );
SwRect aRect( rInf.GetPos(), rInf.GetSize() );
@@ -515,9 +515,9 @@ bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
const SwFlyFrm& rFly = dynamic_cast<const SwFlyFrm&>(*pTmpAnchoredObj);
if( aRegion.GetOrigin().IsOver( rFly.Frm() ) )
{
- const SwFrmFmt *pFmt = rFly.GetFmt();
- const SwFmtSurround &rSur = pFmt->GetSurround();
- const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
+ const SwFrameFormat *pFormat = rFly.GetFormat();
+ const SwFormatSurround &rSur = pFormat->GetSurround();
+ const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
// Only the ones who are opaque and more to the top
if( ! rFly.IsBackgroundTransparent() &&
SURROUND_THROUGHT == rSur.GetSurround() &&
@@ -534,12 +534,12 @@ bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
)
{
// Except for the content is transparent
- const SwNoTxtFrm *pNoTxt =
- rFly.Lower() && rFly.Lower()->IsNoTxtFrm()
- ? static_cast<const SwNoTxtFrm*>(rFly.Lower())
+ const SwNoTextFrm *pNoText =
+ rFly.Lower() && rFly.Lower()->IsNoTextFrm()
+ ? static_cast<const SwNoTextFrm*>(rFly.Lower())
: 0;
- if ( !pNoTxt ||
- (!pNoTxt->IsTransparent() && !rSur.IsContour()) )
+ if ( !pNoText ||
+ (!pNoText->IsTransparent() && !rSur.IsContour()) )
{
bOpaque = true;
aRegion -= rFly.Frm();
@@ -582,8 +582,8 @@ bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
return true;
}
-void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
- const SwTxtPaintInfo &rInf, bool bNoGraphic )
+void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
+ const SwTextPaintInfo &rInf, bool bNoGraphic )
{
SwRegionRects aRegion( rRect );
OSL_ENSURE( !bTopRule, "DrawFlyRect: Wrong TopRule" );
@@ -604,7 +604,7 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
if (pFly)
{
// #i68520#
- const SwFmtSurround& rSur = pAnchoredObjTmp->GetFrmFmt().GetSurround();
+ const SwFormatSurround& rSur = pAnchoredObjTmp->GetFrameFormat().GetSurround();
// OD 24.01.2003 #106593# - correct clipping of fly frame area.
// Consider that fly frame background/shadow can be transparent
@@ -618,8 +618,8 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
: !rSur.IsContour() ) &&
!pFly->IsBackgroundTransparent() &&
( !pFly->Lower() ||
- !pFly->Lower()->IsNoTxtFrm() ||
- !static_cast<const SwNoTxtFrm*>(pFly->Lower())->IsTransparent() );
+ !pFly->Lower()->IsNoTextFrm() ||
+ !static_cast<const SwNoTextFrm*>(pFly->Lower())->IsTransparent() );
if ( bClipFlyArea )
{
// #i68520#
@@ -657,8 +657,8 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
* #i26945# - change first parameter
* Now it's the <SwAnchoredObject> instance of the floating screen object
*/
-bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
- const bool bInFtn,
+bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
+ const bool bInFootnote,
const bool bInFooterOrHeader )
{
// #i68520#
@@ -677,19 +677,19 @@ bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
}
}
- if( ( bInFtn || bInFooterOrHeader ) && bTopRule )
+ if( ( bInFootnote || bInFooterOrHeader ) && bTopRule )
{
// #i26945#
- const SwFrmFmt& rFrmFmt = _pAnchoredObj->GetFrmFmt();
- const SwFmtAnchor& rNewA = rFrmFmt.GetAnchor();
+ const SwFrameFormat& rFrameFormat = _pAnchoredObj->GetFrameFormat();
+ const SwFormatAnchor& rNewA = rFrameFormat.GetAnchor();
if (FLY_AT_PAGE == rNewA.GetAnchorId())
{
- if ( bInFtn )
+ if ( bInFootnote )
return false;
if ( bInFooterOrHeader )
{
- SwFmtVertOrient aVert( rFrmFmt.GetVertOrient() );
+ SwFormatVertOrient aVert( rFrameFormat.GetVertOrient() );
bool bVertPrt = aVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA ||
aVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA;
if( bVertPrt )
@@ -718,13 +718,13 @@ bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
{
// Within chained Flys we only avoid Lower
// #i68520#
- const SwFmtChain &rChain = mpCurrAnchoredObj->GetFrmFmt().GetChain();
+ const SwFormatChain &rChain = mpCurrAnchoredObj->GetFrameFormat().GetChain();
if ( !rChain.GetPrev() && !rChain.GetNext() )
{
// #i26945#
- const SwFmtAnchor& rNewA = _pAnchoredObj->GetFrmFmt().GetAnchor();
+ const SwFormatAnchor& rNewA = _pAnchoredObj->GetFrameFormat().GetAnchor();
// #i68520#
- const SwFmtAnchor& rCurrA = mpCurrAnchoredObj->GetFrmFmt().GetAnchor();
+ const SwFormatAnchor& rCurrA = mpCurrAnchoredObj->GetFrameFormat().GetAnchor();
// If <mpCurrAnchoredObj> is anchored as character, its content
// does not wrap around pNew
@@ -776,7 +776,7 @@ bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
if ( bEvade )
{
// #i26945#
- const SwFmtAnchor& rNewA = _pAnchoredObj->GetFrmFmt().GetAnchor();
+ const SwFormatAnchor& rNewA = _pAnchoredObj->GetFrameFormat().GetAnchor();
OSL_ENSURE( FLY_AS_CHAR != rNewA.GetAnchorId(),
"Don't call GetTop with a FlyInCntFrm" );
if (FLY_AT_PAGE == rNewA.GetAnchorId())
@@ -791,7 +791,7 @@ bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
const SwFrm* pTmp = _pAnchoredObj->GetAnchorFrm();
if( pTmp == pCurrFrm )
return true;
- if( pTmp->IsTxtFrm() && ( pTmp->IsInFly() || pTmp->IsInFtn() ) )
+ if( pTmp->IsTextFrm() && ( pTmp->IsInFly() || pTmp->IsInFootnote() ) )
{
// #i26945#
Point aPos = _pAnchoredObj->GetObjRect().Pos();
@@ -801,7 +801,7 @@ bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// #115759#
// If <pTmp> is a text frame inside a table, take the upper
// of the anchor frame, which contains the anchor position.
- else if ( pTmp->IsTxtFrm() && pTmp->IsInTab() )
+ else if ( pTmp->IsTextFrm() && pTmp->IsInTab() )
{
pTmp = const_cast<SwAnchoredObject*>(_pAnchoredObj)
->GetAnchorFrmContainingAnchPos()->GetUpper();
@@ -817,7 +817,7 @@ bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// object position and former text wrapping is applied.
// This condition is typically for documents imported from the
// OpenOffice.org file format.
- const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTxtNode()->getIDocumentSettingAccess();
+ const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTextNode()->getIDocumentSettingAccess();
if ( ( pIDSA->get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ||
!pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) ) &&
::FindKontext( pTmp, 0 ) == ::FindKontext( pCurrFrm, 0 ) )
@@ -839,11 +839,11 @@ bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// Compare indices:
// The Index of the other is retrieved from the anchor attr.
- sal_uLong nTmpIndex = rNewA.GetCntntAnchor()->nNode.GetIndex();
+ sal_uLong nTmpIndex = rNewA.GetContentAnchor()->nNode.GetIndex();
// Now check whether the current paragraph is before the anchor
// of the displaced object in the text, then we don't have to
// get out of its way.
- // If possible determine Index via SwFmtAnchor because
+ // If possible determine Index via SwFormatAnchor because
// otherwise it's quite expensive.
if( ULONG_MAX == nIndex )
nIndex = pCurrFrm->GetNode()->GetIndex();
@@ -857,7 +857,7 @@ bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
}
// #i68520#
-SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
+SwAnchoredObjList* SwTextFly::InitAnchoredObjList()
{
OSL_ENSURE( pCurrFrm, "InitFlyList: No Frame, no FlyList" );
// #i68520#
@@ -870,10 +870,10 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
// --> #108724# Page header/footer content doesn't have to wrap around
// floating screen objects
const bool bFooterHeader = 0 != pCurrFrm->FindFooterOrHeader();
- const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTxtNode()->getIDocumentSettingAccess();
+ const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTextNode()->getIDocumentSettingAccess();
// #i40155# - check, if frame is marked not to wrap
const bool bWrapAllowed = ( pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) ||
- ( !pCurrFrm->IsInFtn() && !bFooterHeader ) );
+ ( !pCurrFrm->IsInFootnote() && !bFooterHeader ) );
bOn = false;
@@ -901,7 +901,7 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
const long nLeft = (aRect.*fnRect->fnGetLeft)() + 1;
const bool bR2L = pCurrFrm->IsRightToLeft();
- const IDocumentDrawModelAccess* pIDDMA = pCurrFrm->GetTxtNode()->getIDocumentDrawModelAccess();
+ const IDocumentDrawModelAccess* pIDDMA = pCurrFrm->GetTextNode()->getIDocumentDrawModelAccess();
for( size_t i = 0; i < nCount; ++i )
{
@@ -911,7 +911,7 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
// #118809# - If requested, do not consider
// objects in page header|footer for text frames not in page
// header|footer. This is requested for the calculation of
- // the base offset for objects <SwTxtFrm::CalcBaseOfstForFly()>
+ // the base offset for objects <SwTextFrm::CalcBaseOfstForFly()>
// #i20505# Do not consider oversized objects
SwAnchoredObject* pAnchoredObj = (*pSorted)[ i ];
assert(pAnchoredObj);
@@ -938,7 +938,7 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
// #i26945# - pass <pAnchoredObj> to method
// <GetTop(..)> instead of only the <SdrObject> instance of the
// anchored object
- if ( GetTop( pAnchoredObj, pCurrFrm->IsInFtn(), bFooterHeader ) )
+ if ( GetTop( pAnchoredObj, pCurrFrm->IsInFootnote(), bFooterHeader ) )
{
// OD 11.03.2003 #107862# - adjust insert position:
// overlapping objects should be sorted from left to right and
@@ -956,14 +956,14 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
mpAnchoredObjList->insert( aInsPosIter, pAnchoredObj );
}
- const SwFmtSurround &rFlyFmt = pAnchoredObj->GetFrmFmt().GetSurround();
+ const SwFormatSurround &rFlyFormat = pAnchoredObj->GetFrameFormat().GetSurround();
// #i68520#
- if ( rFlyFmt.IsAnchorOnly() &&
+ if ( rFlyFormat.IsAnchorOnly() &&
pAnchoredObj->GetAnchorFrm() == GetMaster() )
{
- const SwFmtVertOrient &rTmpFmt =
- pAnchoredObj->GetFrmFmt().GetVertOrient();
- if( text::VertOrientation::BOTTOM != rTmpFmt.GetVertOrient() )
+ const SwFormatVertOrient &rTmpFormat =
+ pAnchoredObj->GetFrameFormat().GetVertOrient();
+ if( text::VertOrientation::BOTTOM != rTmpFormat.GetVertOrient() )
nMinBottom = ( bVert && nMinBottom ) ?
std::min( nMinBottom, aBound.Left() ) :
std::max( nMinBottom, (aBound.*fnRect->fnGetBottom)() );
@@ -991,11 +991,11 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
return mpAnchoredObjList;
}
-SwTwips SwTxtFly::CalcMinBottom() const
+SwTwips SwTextFly::CalcMinBottom() const
{
SwTwips nRet = 0;
- const SwCntntFrm *pLclMaster = GetMaster();
- OSL_ENSURE(pLclMaster, "SwTxtFly without master");
+ const SwContentFrm *pLclMaster = GetMaster();
+ OSL_ENSURE(pLclMaster, "SwTextFly without master");
const SwSortedObjs *pDrawObj = pLclMaster ? pLclMaster->GetDrawObjs() : NULL;
const size_t nCount = pDrawObj ? pDrawObj->size() : 0;
if( nCount )
@@ -1004,12 +1004,12 @@ SwTwips SwTxtFly::CalcMinBottom() const
for( size_t i = 0; i < nCount; ++i )
{
SwAnchoredObject* pAnchoredObj = (*pDrawObj)[ i ];
- const SwFmtSurround &rFlyFmt = pAnchoredObj->GetFrmFmt().GetSurround();
- if( rFlyFmt.IsAnchorOnly() )
+ const SwFormatSurround &rFlyFormat = pAnchoredObj->GetFrameFormat().GetSurround();
+ if( rFlyFormat.IsAnchorOnly() )
{
- const SwFmtVertOrient &rTmpFmt =
- pAnchoredObj->GetFrmFmt().GetVertOrient();
- if( text::VertOrientation::BOTTOM != rTmpFmt.GetVertOrient() )
+ const SwFormatVertOrient &rTmpFormat =
+ pAnchoredObj->GetFrameFormat().GetVertOrient();
+ if( text::VertOrientation::BOTTOM != rTmpFormat.GetVertOrient() )
{
const SwRect aBound( pAnchoredObj->GetObjRectWithSpaces() );
if( aBound.Top() < nEndOfFrm )
@@ -1025,7 +1025,7 @@ SwTwips SwTxtFly::CalcMinBottom() const
return nRet;
}
-bool SwTxtFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const
+bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const
{
SWAP_IF_SWAPPED( pCurrFrm )
@@ -1049,14 +1049,14 @@ bool SwTxtFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const
if ( mpCurrAnchoredObj != pAnchoredObj && aRect.IsOver( rRect ) )
{
// #i68520#
- const SwFmt* pFmt( &(pAnchoredObj->GetFrmFmt()) );
- const SwFmtSurround &rSur = pFmt->GetSurround();
+ const SwFormat* pFormat( &(pAnchoredObj->GetFrameFormat()) );
+ const SwFormatSurround &rSur = pFormat->GetSurround();
if( bAvoid )
{
// If the text flows below, it has no influence on
// formatting. In LineIter::DrawText() it is "just"
// necessary to clevely set the ClippingRegions
- const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
+ const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
if( ( SURROUND_THROUGHT == rSur.GetSurround() &&
( !rSur.IsAnchorOnly() ||
// #i68520#
@@ -1111,7 +1111,7 @@ bool SwTxtFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const
}
// #i68520#
-SwAnchoredObjList::size_type SwTxtFly::GetPos( const SwAnchoredObject* pAnchoredObj ) const
+SwAnchoredObjList::size_type SwTextFly::GetPos( const SwAnchoredObject* pAnchoredObj ) const
{
SwAnchoredObjList::size_type nCount = GetAnchoredObjList()->size();
SwAnchoredObjList::size_type nRet = 0;
@@ -1121,13 +1121,13 @@ SwAnchoredObjList::size_type SwTxtFly::GetPos( const SwAnchoredObject* pAnchored
}
// #i68520#
-void SwTxtFly::CalcRightMargin( SwRect &rFly,
+void SwTextFly::CalcRightMargin( SwRect &rFly,
SwAnchoredObjList::size_type nFlyPos,
const SwRect &rLine ) const
{
// Usually the right margin is the right margin of the Printarea
OSL_ENSURE( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(),
- "SwTxtFly::CalcRightMargin with swapped frame" );
+ "SwTextFly::CalcRightMargin with swapped frame" );
SWRECTFN( pCurrFrm )
// #118796# - correct determination of right of printing area
SwTwips nRight = (pCurrFrm->*fnRect->fnGetPrtRight)();
@@ -1210,12 +1210,12 @@ void SwTxtFly::CalcRightMargin( SwRect &rFly,
}
// #i68520#
-void SwTxtFly::CalcLeftMargin( SwRect &rFly,
+void SwTextFly::CalcLeftMargin( SwRect &rFly,
SwAnchoredObjList::size_type nFlyPos,
const SwRect &rLine ) const
{
OSL_ENSURE( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(),
- "SwTxtFly::CalcLeftMargin with swapped frame" );
+ "SwTextFly::CalcLeftMargin with swapped frame" );
SWRECTFN( pCurrFrm )
// #118796# - correct determination of left of printing area
SwTwips nLeft = (pCurrFrm->*fnRect->fnGetPrtLeft)();
@@ -1274,7 +1274,7 @@ void SwTxtFly::CalcLeftMargin( SwRect &rFly,
}
// #i68520#
-SwRect SwTxtFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj,
+SwRect SwTextFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj,
const SwRect &rLine ) const
{
SWRECTFN( pCurrFrm )
@@ -1339,15 +1339,15 @@ SwRect SwTxtFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj,
// Wrap on both sides up to a frame width of 1.5cm
#define FRAME_MAX 850
-SwSurround SwTxtFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredObj ) const
+SwSurround SwTextFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredObj ) const
{
- const SwFrmFmt* pFmt = &(pAnchoredObj->GetFrmFmt());
- const SwFmtSurround &rFlyFmt = pFmt->GetSurround();
- SwSurround eSurroundForTextWrap = rFlyFmt.GetSurround();
+ const SwFrameFormat* pFormat = &(pAnchoredObj->GetFrameFormat());
+ const SwFormatSurround &rFlyFormat = pFormat->GetSurround();
+ SwSurround eSurroundForTextWrap = rFlyFormat.GetSurround();
- if( rFlyFmt.IsAnchorOnly() && pAnchoredObj->GetAnchorFrm() != GetMaster() )
+ if( rFlyFormat.IsAnchorOnly() && pAnchoredObj->GetAnchorFrm() != GetMaster() )
{
- const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
+ const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
(FLY_AT_CHAR == rAnchor.GetAnchorId()))
{
@@ -1409,7 +1409,7 @@ SwSurround SwTxtFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO
return eSurroundForTextWrap;
}
-bool SwTxtFly::IsAnyFrm( const SwRect &rLine ) const
+bool SwTextFly::IsAnyFrm( const SwRect &rLine ) const
{
SWAP_IF_SWAPPED( pCurrFrm )
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index cc801a926a83..4ce9409198d7 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -77,10 +77,10 @@
#include <calbck.hxx>
#include <ftnidx.hxx>
-TYPEINIT1( SwTxtFrm, SwCntntFrm );
+TYPEINIT1( SwTextFrm, SwContentFrm );
/// Switches width and height of the text frame
-void SwTxtFrm::SwapWidthAndHeight()
+void SwTextFrm::SwapWidthAndHeight()
{
if ( ! bIsSwapped )
{
@@ -116,7 +116,7 @@ void SwTxtFrm::SwapWidthAndHeight()
* Calculates the coordinates of a rectangle when switching from
* horizontal to vertical layout.
*/
-void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const
+void SwTextFrm::SwitchHorizontalToVertical( SwRect& rRect ) const
{
// calc offset inside frame
long nOfstX, nOfstY;
@@ -154,7 +154,7 @@ void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const
* Calculates the coordinates of a point when switching from
* horizontal to vertical layout.
*/
-void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const
+void SwTextFrm::SwitchHorizontalToVertical( Point& rPoint ) const
{
// calc offset inside frame
const long nOfstX = rPoint.X() - Frm().Left();
@@ -177,7 +177,7 @@ void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const
* Calculates the a limit value when switching from
* horizontal to vertical layout.
*/
-long SwTxtFrm::SwitchHorizontalToVertical( long nLimit ) const
+long SwTextFrm::SwitchHorizontalToVertical( long nLimit ) const
{
Point aTmp( 0, nLimit );
SwitchHorizontalToVertical( aTmp );
@@ -188,7 +188,7 @@ long SwTxtFrm::SwitchHorizontalToVertical( long nLimit ) const
* Calculates the coordinates of a rectangle when switching from
* vertical to horizontal layout.
*/
-void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const
+void SwTextFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const
{
long nOfstX;
@@ -218,7 +218,7 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const
* Calculates the coordinates of a point when switching from
* vertical to horizontal layout.
*/
-void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const
+void SwTextFrm::SwitchVerticalToHorizontal( Point& rPoint ) const
{
long nOfstX;
@@ -244,32 +244,32 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const
* Calculates the a limit value when switching from
* vertical to horizontal layout.
*/
-long SwTxtFrm::SwitchVerticalToHorizontal( long nLimit ) const
+long SwTextFrm::SwitchVerticalToHorizontal( long nLimit ) const
{
Point aTmp( nLimit, 0 );
SwitchVerticalToHorizontal( aTmp );
return aTmp.Y();
}
-SwFrmSwapper::SwFrmSwapper( const SwTxtFrm* pTxtFrm, bool bSwapIfNotSwapped )
- : pFrm( pTxtFrm ), bUndo( false )
+SwFrmSwapper::SwFrmSwapper( const SwTextFrm* pTextFrm, bool bSwapIfNotSwapped )
+ : pFrm( pTextFrm ), bUndo( false )
{
if ( pFrm->IsVertical() &&
( ( bSwapIfNotSwapped && ! pFrm->IsSwapped() ) ||
( ! bSwapIfNotSwapped && pFrm->IsSwapped() ) ) )
{
bUndo = true;
- const_cast<SwTxtFrm*>(pFrm)->SwapWidthAndHeight();
+ const_cast<SwTextFrm*>(pFrm)->SwapWidthAndHeight();
}
}
SwFrmSwapper::~SwFrmSwapper()
{
if ( bUndo )
- const_cast<SwTxtFrm*>(pFrm)->SwapWidthAndHeight();
+ const_cast<SwTextFrm*>(pFrm)->SwapWidthAndHeight();
}
-void SwTxtFrm::SwitchLTRtoRTL( SwRect& rRect ) const
+void SwTextFrm::SwitchLTRtoRTL( SwRect& rRect ) const
{
SWAP_IF_NOT_SWAPPED( this )
@@ -282,7 +282,7 @@ void SwTxtFrm::SwitchLTRtoRTL( SwRect& rRect ) const
UNDO_SWAP( this )
}
-void SwTxtFrm::SwitchLTRtoRTL( Point& rPoint ) const
+void SwTextFrm::SwitchLTRtoRTL( Point& rPoint ) const
{
SWAP_IF_NOT_SWAPPED( this )
@@ -335,9 +335,9 @@ SwDigitModeModifier::~SwDigitModeModifier()
const_cast<OutputDevice&>(rOut).SetDigitLanguage( nOldLanguageType );
}
-void SwTxtFrm::Init()
+void SwTextFrm::Init()
{
- OSL_ENSURE( !IsLocked(), "+SwTxtFrm::Init: this is locked." );
+ OSL_ENSURE( !IsLocked(), "+SwTextFrm::Init: this is locked." );
if( !IsLocked() )
{
ClearPara();
@@ -349,13 +349,13 @@ void SwTxtFrm::Init()
}
}
-SwTxtFrm::SwTxtFrm(SwTxtNode * const pNode, SwFrm* pSib )
- : SwCntntFrm( pNode, pSib )
+SwTextFrm::SwTextFrm(SwTextNode * const pNode, SwFrm* pSib )
+ : SwContentFrm( pNode, pSib )
, nAllLines( 0 )
, nThisLines( 0 )
, mnFlyAnchorOfst( 0 )
, mnFlyAnchorOfstNoWrap( 0 )
- , mnFtnLine( 0 )
+ , mnFootnoteLine( 0 )
, mnHeightOfLastLine( 0 ) // OD 2004-03-17 #i11860#
, mnAdditionalFirstLineOffset( 0 )
, nOfst( 0 )
@@ -364,8 +364,8 @@ SwTxtFrm::SwTxtFrm(SwTxtNode * const pNode, SwFrm* pSib )
, bWidow( false )
, bJustWidow( false )
, bEmpty( false )
- , bInFtnConnect( false )
- , bFtn( false )
+ , bInFootnoteConnect( false )
+ , bFootnote( false )
, bRepaint( false )
, bBlinkPor( false )
, bFieldFollow( false )
@@ -376,50 +376,50 @@ SwTxtFrm::SwTxtFrm(SwTxtNode * const pNode, SwFrm* pSib )
mnFrmType = FRM_TXT;
}
-void SwTxtFrm::DestroyImpl()
+void SwTextFrm::DestroyImpl()
{
- // Remove associated SwParaPortion from pTxtCache
+ // Remove associated SwParaPortion from pTextCache
ClearPara();
- const SwCntntNode* pCNd;
- if( 0 != ( pCNd = PTR_CAST( SwCntntNode, GetRegisteredIn() )) &&
- !pCNd->GetDoc()->IsInDtor() && HasFtn() )
+ const SwContentNode* pCNd;
+ if( 0 != ( pCNd = PTR_CAST( SwContentNode, GetRegisteredIn() )) &&
+ !pCNd->GetDoc()->IsInDtor() && HasFootnote() )
{
- SwTxtNode *pTxtNd = static_cast<SwTxtFrm*>(this)->GetTxtNode();
- const SwFtnIdxs &rFtnIdxs = pCNd->GetDoc()->GetFtnIdxs();
+ SwTextNode *pTextNd = static_cast<SwTextFrm*>(this)->GetTextNode();
+ const SwFootnoteIdxs &rFootnoteIdxs = pCNd->GetDoc()->GetFootnoteIdxs();
size_t nPos = 0;
sal_uLong nIndex = pCNd->GetIndex();
- rFtnIdxs.SeekEntry( *pTxtNd, &nPos );
- if( nPos < rFtnIdxs.size() )
+ rFootnoteIdxs.SeekEntry( *pTextNd, &nPos );
+ if( nPos < rFootnoteIdxs.size() )
{
- while( nPos && pTxtNd == &(rFtnIdxs[ nPos ]->GetTxtNode()) )
+ while( nPos && pTextNd == &(rFootnoteIdxs[ nPos ]->GetTextNode()) )
--nPos;
- if( nPos || pTxtNd != &(rFtnIdxs[ nPos ]->GetTxtNode()) )
+ if( nPos || pTextNd != &(rFootnoteIdxs[ nPos ]->GetTextNode()) )
++nPos;
}
- while( nPos < rFtnIdxs.size() )
+ while( nPos < rFootnoteIdxs.size() )
{
- SwTxtFtn* pTxtFtn = rFtnIdxs[ nPos ];
- if( pTxtFtn->GetTxtNode().GetIndex() > nIndex )
+ SwTextFootnote* pTextFootnote = rFootnoteIdxs[ nPos ];
+ if( pTextFootnote->GetTextNode().GetIndex() > nIndex )
break;
- pTxtFtn->DelFrms( this );
+ pTextFootnote->DelFrms( this );
++nPos;
}
}
- SwCntntFrm::DestroyImpl();
+ SwContentFrm::DestroyImpl();
}
-SwTxtFrm::~SwTxtFrm()
+SwTextFrm::~SwTextFrm()
{
}
-const OUString& SwTxtFrm::GetTxt() const
+const OUString& SwTextFrm::GetText() const
{
- return GetTxtNode()->GetTxt();
+ return GetTextNode()->GetText();
}
-void SwTxtFrm::ResetPreps()
+void SwTextFrm::ResetPreps()
{
if ( GetCacheIdx() != USHRT_MAX )
{
@@ -429,18 +429,18 @@ void SwTxtFrm::ResetPreps()
}
}
-bool SwTxtFrm::IsHiddenNow() const
+bool SwTextFrm::IsHiddenNow() const
{
SwFrmSwapper aSwapper( this, true );
if( !Frm().Width() && IsValid() && GetUpper()->IsValid() ) // invalid when stack overflows (StackHack)!
{
-// OSL_FAIL( "SwTxtFrm::IsHiddenNow: thin frame" );
+// OSL_FAIL( "SwTextFrm::IsHiddenNow: thin frame" );
return true;
}
- const bool bHiddenCharsHidePara = GetTxtNode()->HasHiddenCharAttribute( true );
- const bool bHiddenParaField = GetTxtNode()->HasHiddenParaField();
+ const bool bHiddenCharsHidePara = GetTextNode()->HasHiddenCharAttribute( true );
+ const bool bHiddenParaField = GetTextNode()->HasHiddenParaField();
const SwViewShell* pVsh = getRootFrm()->GetCurrShell();
if ( pVsh && ( bHiddenCharsHidePara || bHiddenParaField ) )
@@ -448,7 +448,7 @@ bool SwTxtFrm::IsHiddenNow() const
if (
( bHiddenParaField &&
( !pVsh->GetViewOptions()->IsShowHiddenPara() &&
- !pVsh->GetViewOptions()->IsFldName() ) ) ||
+ !pVsh->GetViewOptions()->IsFieldName() ) ) ||
( bHiddenCharsHidePara &&
!pVsh->GetViewOptions()->IsShowHiddenChar() ) )
{
@@ -460,7 +460,7 @@ bool SwTxtFrm::IsHiddenNow() const
}
/// Removes Textfrm's attachments, when it's hidden
-void SwTxtFrm::HideHidden()
+void SwTextFrm::HideHidden()
{
OSL_ENSURE( !GetFollow() && IsHiddenNow(),
"HideHidden on visible frame of hidden frame has follow" );
@@ -474,16 +474,16 @@ void SwTxtFrm::HideHidden()
ClearPara();
}
-void SwTxtFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd )
+void SwTextFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd )
{
- const SwpHints *pHints = GetTxtNode()->GetpSwpHints();
+ const SwpHints *pHints = GetTextNode()->GetpSwpHints();
if( pHints )
{
const size_t nSize = pHints->Count();
SwPageFrm *pPage = 0;
for ( size_t i = 0; i < nSize; ++i )
{
- const SwTxtAttr *pHt = (*pHints)[i];
+ const SwTextAttr *pHt = (*pHints)[i];
if ( pHt->Which() == RES_TXTATR_FTN )
{
const sal_Int32 nIdx = pHt->GetStart();
@@ -493,7 +493,7 @@ void SwTxtFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd )
{
if( !pPage )
pPage = FindPageFrm();
- pPage->RemoveFtn( this, static_cast<const SwTxtFtn*>(pHt) );
+ pPage->RemoveFootnote( this, static_cast<const SwTextFootnote*>(pHt) );
}
}
}
@@ -510,7 +510,7 @@ void SwTxtFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd )
* (b) the paragraph is the last content in the document and
* (c) the anchor character is an as-character anchored graphic.
*/
-bool sw_HideObj( const SwTxtFrm& _rFrm,
+bool sw_HideObj( const SwTextFrm& _rFrm,
const RndStdIds _eAnchorType,
const sal_Int32 _nObjAnchorPos,
SwAnchoredObject* _pAnchoredObj )
@@ -519,29 +519,29 @@ bool sw_HideObj( const SwTxtFrm& _rFrm,
if (_eAnchorType == FLY_AT_CHAR)
{
- const IDocumentSettingAccess* pIDSA = _rFrm.GetTxtNode()->getIDocumentSettingAccess();
+ const IDocumentSettingAccess* pIDSA = _rFrm.GetTextNode()->getIDocumentSettingAccess();
if ( !pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) &&
!pIDSA->get(DocumentSettingId::OLD_LINE_SPACING) &&
!pIDSA->get(DocumentSettingId::USE_FORMER_OBJECT_POS) &&
pIDSA->get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) &&
_rFrm.IsInDocBody() && !_rFrm.FindNextCnt() )
{
- const OUString &rStr = _rFrm.GetTxtNode()->GetTxt();
+ const OUString &rStr = _rFrm.GetTextNode()->GetText();
const sal_Unicode cAnchorChar = _nObjAnchorPos < rStr.getLength() ? rStr[_nObjAnchorPos] : 0;
if (cAnchorChar == CH_TXTATR_BREAKWORD)
{
- const SwTxtAttr* const pHint(
- _rFrm.GetTxtNode()->GetTxtAttrForCharAt(_nObjAnchorPos,
+ const SwTextAttr* const pHint(
+ _rFrm.GetTextNode()->GetTextAttrForCharAt(_nObjAnchorPos,
RES_TXTATR_FLYCNT) );
if ( pHint )
{
- const SwFrmFmt* pFrmFmt =
- static_cast<const SwTxtFlyCnt*>(pHint)->GetFlyCnt().GetFrmFmt();
- if ( pFrmFmt->Which() == RES_FLYFRMFMT )
+ const SwFrameFormat* pFrameFormat =
+ static_cast<const SwTextFlyCnt*>(pHint)->GetFlyCnt().GetFrameFormat();
+ if ( pFrameFormat->Which() == RES_FLYFRMFMT )
{
- SwNodeIndex nCntntIndex = *(pFrmFmt->GetCntnt().GetCntntIdx());
- ++nCntntIndex;
- if ( nCntntIndex.GetNode().IsNoTxtNode() )
+ SwNodeIndex nContentIndex = *(pFrameFormat->GetContent().GetContentIdx());
+ ++nContentIndex;
+ if ( nContentIndex.GetNode().IsNoTextNode() )
{
bRet = false;
// set needed data structure values for object positioning
@@ -571,7 +571,7 @@ bool sw_HideObj( const SwTxtFrm& _rFrm,
* - is called from HideHidden() - should hide objects in hidden paragraphs and
* - from _Format() - should hide/show objects in partly visible paragraphs
*/
-void SwTxtFrm::HideAndShowObjects()
+void SwTextFrm::HideAndShowObjects()
{
if ( GetDrawObjs() )
{
@@ -585,7 +585,7 @@ void SwTxtFrm::HideAndShowObjects()
// #120729# - hotfix
// under certain conditions
const RndStdIds eAnchorType( pContact->GetAnchorId() );
- const sal_Int32 nObjAnchorPos = pContact->GetCntntAnchorIndex().GetIndex();
+ const sal_Int32 nObjAnchorPos = pContact->GetContentAnchorIndex().GetIndex();
if ((eAnchorType != FLY_AT_CHAR) ||
sw_HideObj( *this, eAnchorType, nObjAnchorPos,
(*GetDrawObjs())[i] ))
@@ -598,7 +598,7 @@ void SwTxtFrm::HideAndShowObjects()
{
// paragraph is visible, but can contain hidden text portion.
// first we check if objects are allowed to be hidden:
- const SwTxtNode& rNode = *GetTxtNode();
+ const SwTextNode& rNode = *GetTextNode();
const SwViewShell* pVsh = getRootFrm()->GetCurrShell();
const bool bShouldBeHidden = !pVsh || !pVsh->GetWin() ||
!pVsh->GetViewOptions()->IsShowHiddenChar();
@@ -622,7 +622,7 @@ void SwTxtFrm::HideAndShowObjects()
{
sal_Int32 nHiddenStart;
sal_Int32 nHiddenEnd;
- const sal_Int32 nObjAnchorPos = pContact->GetCntntAnchorIndex().GetIndex();
+ const sal_Int32 nObjAnchorPos = pContact->GetContentAnchorIndex().GetIndex();
SwScriptInfo::GetBoundsOfHiddenRange( rNode, nObjAnchorPos, nHiddenStart, nHiddenEnd, 0 );
// #120729# - hotfix
// under certain conditions
@@ -634,7 +634,7 @@ void SwTxtFrm::HideAndShowObjects()
}
else
{
- OSL_FAIL( "<SwTxtFrm::HideAndShowObjects()> - object not anchored at/inside paragraph!?" );
+ OSL_FAIL( "<SwTextFrm::HideAndShowObjects()> - object not anchored at/inside paragraph!?" );
}
}
}
@@ -642,8 +642,8 @@ void SwTxtFrm::HideAndShowObjects()
if (IsFollow())
{
- SwTxtFrm *pMaster = FindMaster();
- OSL_ENSURE(pMaster, "SwTxtFrm without master");
+ SwTextFrm *pMaster = FindMaster();
+ OSL_ENSURE(pMaster, "SwTextFrm without master");
if (pMaster)
pMaster->HideAndShowObjects();
}
@@ -651,28 +651,28 @@ void SwTxtFrm::HideAndShowObjects()
/**
* Returns the first possible break point in the current line.
- * This method is used in SwTxtFrm::Format() to decide whether the previous
+ * This method is used in SwTextFrm::Format() to decide whether the previous
* line has to be formatted as well.
* nFound is <= nEndLine.
*/
-sal_Int32 SwTxtFrm::FindBrk( const OUString &rTxt,
+sal_Int32 SwTextFrm::FindBrk( const OUString &rText,
const sal_Int32 nStart,
const sal_Int32 nEnd )
{
sal_Int32 nFound = nStart;
- const sal_Int32 nEndLine = std::min( nEnd, rTxt.getLength() - 1 );
+ const sal_Int32 nEndLine = std::min( nEnd, rText.getLength() - 1 );
// skip all leading blanks (see bug #2235).
- while( nFound <= nEndLine && ' ' == rTxt[nFound] )
+ while( nFound <= nEndLine && ' ' == rText[nFound] )
{
nFound++;
}
- // A tricky situation with the TxtAttr-Dummy-character (in this case "$"):
+ // A tricky situation with the TextAttr-Dummy-character (in this case "$"):
// "Dr.$Meyer" at the beginning of the second line. Typing a blank after that
// doesn't result in the word moving into first line, even though that would work.
// For this reason we don't skip the dummy char.
- while( nFound <= nEndLine && ' ' != rTxt[nFound] )
+ while( nFound <= nEndLine && ' ' != rText[nFound] )
{
nFound++;
}
@@ -680,7 +680,7 @@ sal_Int32 SwTxtFrm::FindBrk( const OUString &rTxt,
return nFound;
}
-bool SwTxtFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const
+bool SwTextFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const
{
if( nLen != COMPLETE_STRING && GetOfst() > nPos + nLen ) // the range preceded us
return false;
@@ -691,7 +691,7 @@ bool SwTxtFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const
const sal_Int32 nMax = GetFollow()->GetOfst();
// either the range overlap or our text has been deleted
- if( nMax > nPos || nMax > GetTxt().getLength() )
+ if( nMax > nPos || nMax > GetText().getLength() )
return true;
// changes made in the first line of a follow can modify the master
@@ -699,13 +699,13 @@ bool SwTxtFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const
return pPara && ( nPos <= nMax + pPara->GetLen() );
}
-inline void SwTxtFrm::InvalidateRange(const SwCharRange &aRange, const long nD)
+inline void SwTextFrm::InvalidateRange(const SwCharRange &aRange, const long nD)
{
if ( IsIdxInside( aRange.Start(), aRange.Len() ) )
_InvalidateRange( aRange, nD );
}
-void SwTxtFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
+void SwTextFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
{
if ( !HasPara() )
{ InvalidateSize();
@@ -739,17 +739,17 @@ void SwTxtFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
}
}
-void SwTxtFrm::CalcLineSpace()
+void SwTextFrm::CalcLineSpace()
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
- "SwTxtFrm::CalcLineSpace with swapped frame!" );
+ "SwTextFrm::CalcLineSpace with swapped frame!" );
if( IsLocked() || !HasPara() )
return;
SwParaPortion *pPara;
if( GetDrawObjs() ||
- GetTxtNode()->GetSwAttrSet().GetLRSpace().IsAutoFirst() ||
+ GetTextNode()->GetSwAttrSet().GetLRSpace().IsAutoFirst() ||
( pPara = GetPara() )->IsFixLineHeight() )
{
Init();
@@ -758,8 +758,8 @@ void SwTxtFrm::CalcLineSpace()
Size aNewSize( Prt().SSize() );
- SwTxtFormatInfo aInf( this );
- SwTxtFormatter aLine( this, &aInf );
+ SwTextFormatInfo aInf( this );
+ SwTextFormatter aLine( this, &aInf );
if( aLine.GetDropLines() )
{
Init();
@@ -773,14 +773,14 @@ void SwTxtFrm::CalcLineSpace()
SwTwips nDelta = aNewSize.Height() - Prt().Height();
// Underflow with free-flying frames
- if( aInf.GetTxtFly().IsOn() )
+ if( aInf.GetTextFly().IsOn() )
{
SwRect aTmpFrm( Frm() );
if( nDelta < 0 )
aTmpFrm.Height( Prt().Height() );
else
aTmpFrm.Height( aNewSize.Height() );
- if( aInf.GetTxtFly().Relax( aTmpFrm ) )
+ if( aInf.GetTextFly().Relax( aTmpFrm ) )
{
Init();
return;
@@ -789,7 +789,7 @@ void SwTxtFrm::CalcLineSpace()
if( nDelta )
{
- SwTxtFrmBreak aBreak( this );
+ SwTextFrmBreak aBreak( this );
if( GetFollow() || aBreak.IsBreakNow( aLine ) )
{
// if there is a Follow() or if we need to break here, reformat
@@ -804,52 +804,52 @@ void SwTxtFrm::CalcLineSpace()
}
}
-static void lcl_SetWrong( SwTxtFrm& rFrm, sal_Int32 nPos, sal_Int32 nCnt, bool bMove )
+static void lcl_SetWrong( SwTextFrm& rFrm, sal_Int32 nPos, sal_Int32 nCnt, bool bMove )
{
if ( !rFrm.IsFollow() )
{
- SwTxtNode* pTxtNode = rFrm.GetTxtNode();
- IGrammarContact* pGrammarContact = getGrammarContact( *pTxtNode );
+ SwTextNode* pTextNode = rFrm.GetTextNode();
+ IGrammarContact* pGrammarContact = getGrammarContact( *pTextNode );
SwGrammarMarkUp* pWrongGrammar = pGrammarContact ?
- pGrammarContact->getGrammarCheck( *pTxtNode, false ) :
- pTxtNode->GetGrammarCheck();
- bool bGrammarProxy = pWrongGrammar != pTxtNode->GetGrammarCheck();
+ pGrammarContact->getGrammarCheck( *pTextNode, false ) :
+ pTextNode->GetGrammarCheck();
+ bool bGrammarProxy = pWrongGrammar != pTextNode->GetGrammarCheck();
if( bMove )
{
- if( pTxtNode->GetWrong() )
- pTxtNode->GetWrong()->Move( nPos, nCnt );
+ if( pTextNode->GetWrong() )
+ pTextNode->GetWrong()->Move( nPos, nCnt );
if( pWrongGrammar )
pWrongGrammar->MoveGrammar( nPos, nCnt );
- if( bGrammarProxy && pTxtNode->GetGrammarCheck() )
- pTxtNode->GetGrammarCheck()->MoveGrammar( nPos, nCnt );
- if( pTxtNode->GetSmartTags() )
- pTxtNode->GetSmartTags()->Move( nPos, nCnt );
+ if( bGrammarProxy && pTextNode->GetGrammarCheck() )
+ pTextNode->GetGrammarCheck()->MoveGrammar( nPos, nCnt );
+ if( pTextNode->GetSmartTags() )
+ pTextNode->GetSmartTags()->Move( nPos, nCnt );
}
else
{
- if( pTxtNode->GetWrong() )
- pTxtNode->GetWrong()->Invalidate( nPos, nCnt );
+ if( pTextNode->GetWrong() )
+ pTextNode->GetWrong()->Invalidate( nPos, nCnt );
if( pWrongGrammar )
pWrongGrammar->Invalidate( nPos, nCnt );
- if( pTxtNode->GetSmartTags() )
- pTxtNode->GetSmartTags()->Invalidate( nPos, nCnt );
+ if( pTextNode->GetSmartTags() )
+ pTextNode->GetSmartTags()->Invalidate( nPos, nCnt );
}
const sal_Int32 nEnd = nPos + (nCnt > 0 ? nCnt : 1 );
- if ( !pTxtNode->GetWrong() && !pTxtNode->IsWrongDirty() )
+ if ( !pTextNode->GetWrong() && !pTextNode->IsWrongDirty() )
{
- pTxtNode->SetWrong( new SwWrongList( WRONGLIST_SPELL ) );
- pTxtNode->GetWrong()->SetInvalid( nPos, nEnd );
+ pTextNode->SetWrong( new SwWrongList( WRONGLIST_SPELL ) );
+ pTextNode->GetWrong()->SetInvalid( nPos, nEnd );
}
- if ( !pTxtNode->GetSmartTags() && !pTxtNode->IsSmartTagDirty() )
+ if ( !pTextNode->GetSmartTags() && !pTextNode->IsSmartTagDirty() )
{
- pTxtNode->SetSmartTags( new SwWrongList( WRONGLIST_SMARTTAG ) );
- pTxtNode->GetSmartTags()->SetInvalid( nPos, nEnd );
+ pTextNode->SetSmartTags( new SwWrongList( WRONGLIST_SMARTTAG ) );
+ pTextNode->GetSmartTags()->SetInvalid( nPos, nEnd );
}
- pTxtNode->SetWrongDirty( true );
- pTxtNode->SetGrammarCheckDirty( true );
- pTxtNode->SetWordCountDirty( true );
- pTxtNode->SetAutoCompleteWordDirty( true );
- pTxtNode->SetSmartTagDirty( true );
+ pTextNode->SetWrongDirty( true );
+ pTextNode->SetGrammarCheckDirty( true );
+ pTextNode->SetWordCountDirty( true );
+ pTextNode->SetAutoCompleteWordDirty( true );
+ pTextNode->SetSmartTagDirty( true );
}
SwRootFrm *pRootFrm = rFrm.getRootFrm();
@@ -868,20 +868,20 @@ static void lcl_SetWrong( SwTxtFrm& rFrm, sal_Int32 nPos, sal_Int32 nCnt, bool b
}
}
-static void lcl_SetScriptInval( SwTxtFrm& rFrm, sal_Int32 nPos )
+static void lcl_SetScriptInval( SwTextFrm& rFrm, sal_Int32 nPos )
{
if( rFrm.GetPara() )
rFrm.GetPara()->GetScriptInfo().SetInvalidityA( nPos );
}
-static void lcl_ModifyOfst( SwTxtFrm* pFrm, sal_Int32 nPos, sal_Int32 nLen )
+static void lcl_ModifyOfst( SwTextFrm* pFrm, sal_Int32 nPos, sal_Int32 nLen )
{
while( pFrm && pFrm->GetOfst() <= nPos )
pFrm = pFrm->GetFollow();
while( pFrm )
{
if (nLen == COMPLETE_STRING)
- pFrm->ManipOfst( pFrm->GetTxtNode()->GetTxt().getLength() );
+ pFrm->ManipOfst( pFrm->GetTextNode()->GetText().getLength() );
else
pFrm->ManipOfst( pFrm->GetOfst() + nLen );
pFrm = pFrm->GetFollow();
@@ -907,14 +907,14 @@ static bool hasA11yRelevantAttribute( const std::vector<sal_uInt16>& nWhich )
return false;
}
-void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
+void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
// modifications concerning frame attributes are processed by the base class
- if( IsInRange( aFrmFmtSetRange, nWhich ) || RES_FMT_CHG == nWhich )
+ if( IsInRange( aFrameFormatSetRange, nWhich ) || RES_FMT_CHG == nWhich )
{
- SwCntntFrm::Modify( pOld, pNew );
+ SwContentFrm::Modify( pOld, pNew );
if( nWhich == RES_FMT_CHG && getRootFrm()->GetCurrShell() )
{
// collection has changed
@@ -939,8 +939,8 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
// warning: one has to ensure that all variables are set
sal_Int32 nPos;
sal_Int32 nLen;
- bool bSetFldsDirty = false;
- bool bRecalcFtnFlag = false;
+ bool bSetFieldsDirty = false;
+ bool bRecalcFootnoteFlag = false;
switch( nWhich )
{
@@ -951,8 +951,8 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
break;
case RES_INS_TXT:
{
- nPos = static_cast<const SwInsTxt*>(pNew)->nPos;
- nLen = static_cast<const SwInsTxt*>(pNew)->nLen;
+ nPos = static_cast<const SwInsText*>(pNew)->nPos;
+ nLen = static_cast<const SwInsText*>(pNew)->nLen;
if( IsIdxInside( nPos, nLen ) )
{
if( !nLen )
@@ -968,7 +968,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
}
lcl_SetWrong( *this, nPos, nLen, true );
lcl_SetScriptInval( *this, nPos );
- bSetFldsDirty = true;
+ bSetFieldsDirty = true;
if( HasFollow() )
lcl_ModifyOfst( this, nPos, nLen );
}
@@ -979,15 +979,15 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
InvalidateRange( SwCharRange( nPos, 1 ), -1 );
lcl_SetWrong( *this, nPos, -1, true );
lcl_SetScriptInval( *this, nPos );
- bSetFldsDirty = bRecalcFtnFlag = true;
+ bSetFieldsDirty = bRecalcFootnoteFlag = true;
if( HasFollow() )
lcl_ModifyOfst( this, nPos, COMPLETE_STRING );
}
break;
case RES_DEL_TXT:
{
- nPos = static_cast<const SwDelTxt*>(pNew)->nStart;
- nLen = static_cast<const SwDelTxt*>(pNew)->nLen;
+ nPos = static_cast<const SwDelText*>(pNew)->nStart;
+ nLen = static_cast<const SwDelText*>(pNew)->nLen;
const sal_Int32 m = -nLen;
if( IsIdxInside( nPos, nLen ) )
{
@@ -998,7 +998,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
}
lcl_SetWrong( *this, nPos, m, true );
lcl_SetScriptInval( *this, nPos );
- bSetFldsDirty = bRecalcFtnFlag = true;
+ bSetFieldsDirty = bRecalcFootnoteFlag = true;
if( HasFollow() )
lcl_ModifyOfst( this, nPos, nLen );
}
@@ -1014,7 +1014,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
// E.g.: empty line, set 14 pt!
// if( !nLen ) nLen = 1;
- // FtnNummbers need to be formatted
+ // FootnoteNummbers need to be formatted
if( !nLen )
nLen = 1;
@@ -1030,7 +1030,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
}
if( isA11yRelevantAttribute( static_cast<const SwUpdateAttr*>(pNew)->getWhichAttr() ) &&
- hasA11yRelevantAttribute( static_cast<const SwUpdateAttr*>(pNew)->getFmtAttr() ) )
+ hasA11yRelevantAttribute( static_cast<const SwUpdateAttr*>(pNew)->getFormatAttr() ) )
{
// #i104008#
SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
@@ -1069,7 +1069,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
case RES_TXTATR_FIELD:
case RES_TXTATR_ANNOTATION:
{
- nPos = static_cast<const SwFmtFld*>(pNew)->GetTxtFld()->GetStart();
+ nPos = static_cast<const SwFormatField*>(pNew)->GetTextField()->GetStart();
if( IsIdxInside( nPos, 1 ) )
{
if( pNew == pOld )
@@ -1082,7 +1082,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
else
_InvalidateRange( SwCharRange( nPos, 1 ) );
}
- bSetFldsDirty = true;
+ bSetFieldsDirty = true;
// ST2
if ( SwSmartTagMgr::Get().IsSmartTagsEnabled() )
lcl_SetWrong( *this, nPos, nPos + 1, false );
@@ -1091,9 +1091,9 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
case RES_TXTATR_FTN :
{
- nPos = static_cast<const SwFmtFtn*>(pNew)->GetTxtFtn()->GetStart();
- if( IsInFtn() || IsIdxInside( nPos, 1 ) )
- Prepare( PREP_FTN, static_cast<const SwFmtFtn*>(pNew)->GetTxtFtn() );
+ nPos = static_cast<const SwFormatFootnote*>(pNew)->GetTextFootnote()->GetStart();
+ if( IsInFootnote() || IsIdxInside( nPos, 1 ) )
+ Prepare( PREP_FTN, static_cast<const SwFormatFootnote*>(pNew)->GetTextFootnote() );
break;
}
@@ -1108,7 +1108,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if( SfxItemState::SET == rNewSet.GetItemState( RES_TXTATR_FTN, false, &pItem ))
{
- nPos = static_cast<const SwFmtFtn*>(pItem)->GetTxtFtn()->GetStart();
+ nPos = static_cast<const SwFormatFootnote*>(pItem)->GetTextFootnote()->GetStart();
if( IsIdxInside( nPos, 1 ) )
Prepare( PREP_FTN, pNew );
nClear = 0x01;
@@ -1117,7 +1117,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if( SfxItemState::SET == rNewSet.GetItemState( RES_TXTATR_FIELD, false, &pItem ))
{
- nPos = static_cast<const SwFmtFld*>(pItem)->GetTxtFld()->GetStart();
+ nPos = static_cast<const SwFormatField*>(pItem)->GetTextField()->GetStart();
if( IsIdxInside( nPos, 1 ) )
{
const SfxPoolItem* pOldItem = pOld ?
@@ -1280,10 +1280,10 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
aOldSet.ClearItem( RES_PARATR_SPLIT );
aNewSet.ClearItem( RES_PARATR_SPLIT );
}
- SwCntntFrm::Modify( &aOldSet, &aNewSet );
+ SwContentFrm::Modify( &aOldSet, &aNewSet );
}
else
- SwCntntFrm::Modify( pOld, pNew );
+ SwContentFrm::Modify( pOld, pNew );
}
if (isA11yRelevantAttribute(nWhich))
@@ -1306,9 +1306,9 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
const SwDocPosUpdate *pDocPos = static_cast<const SwDocPosUpdate*>(pOld);
if( pDocPos->nDocPos <= maFrm.Top() )
{
- const SwFmtFld *pFld = static_cast<const SwFmtFld *>(pNew);
+ const SwFormatField *pField = static_cast<const SwFormatField *>(pNew);
InvalidateRange(
- SwCharRange( pFld->GetTxtFld()->GetStart(), 1 ) );
+ SwCharRange( pField->GetTextField()->GetStart(), 1 ) );
}
}
break;
@@ -1317,7 +1317,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if ( GetPrev() )
CheckKeep();
Prepare( PREP_CLEAR );
- bSetFldsDirty = true;
+ bSetFieldsDirty = true;
break;
case RES_FRAMEDIR :
SetDerivedR2L( false );
@@ -1337,18 +1337,18 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
}
} // switch
- if( bSetFldsDirty )
+ if( bSetFieldsDirty )
GetNode()->getIDocumentFieldsAccess()->SetFieldsDirty( true, GetNode(), 1 );
- if ( bRecalcFtnFlag )
- CalcFtnFlag();
+ if ( bRecalcFootnoteFlag )
+ CalcFootnoteFlag();
}
-bool SwTxtFrm::GetInfo( SfxPoolItem &rHnt ) const
+bool SwTextFrm::GetInfo( SfxPoolItem &rHint ) const
{
- if ( RES_VIRTPAGENUM_INFO == rHnt.Which() && IsInDocBody() && ! IsFollow() )
+ if ( RES_VIRTPAGENUM_INFO == rHint.Which() && IsInDocBody() && ! IsFollow() )
{
- SwVirtPageNumInfo &rInfo = static_cast<SwVirtPageNumInfo&>(rHnt);
+ SwVirtPageNumInfo &rInfo = static_cast<SwVirtPageNumInfo&>(rHint);
const SwPageFrm *pPage = FindPageFrm();
if ( pPage )
{
@@ -1370,9 +1370,9 @@ bool SwTxtFrm::GetInfo( SfxPoolItem &rHnt ) const
return true;
}
-void SwTxtFrm::PrepWidows( const sal_uInt16 nNeed, bool bNotify )
+void SwTextFrm::PrepWidows( const sal_uInt16 nNeed, bool bNotify )
{
- OSL_ENSURE(GetFollow() && nNeed, "+SwTxtFrm::Prepare: lost all friends");
+ OSL_ENSURE(GetFollow() && nNeed, "+SwTextFrm::Prepare: lost all friends");
SwParaPortion *pPara = GetPara();
if ( !pPara )
@@ -1384,8 +1384,8 @@ void SwTxtFrm::PrepWidows( const sal_uInt16 nNeed, bool bNotify )
// We yield a few lines and shrink in CalcPreps()
SWAP_IF_NOT_SWAPPED( this )
- SwTxtSizeInfo aInf( this );
- SwTxtMargin aLine( this, &aInf );
+ SwTextSizeInfo aInf( this );
+ SwTextMargin aLine( this, &aInf );
aLine.Bottom();
sal_Int32 nTmpLen = aLine.GetCurr()->GetLen();
while( nHave && aLine.PrevLine() )
@@ -1424,30 +1424,30 @@ void SwTxtFrm::PrepWidows( const sal_uInt16 nNeed, bool bNotify )
UNDO_SWAP( this )
}
-static bool lcl_ErgoVadis( SwTxtFrm* pFrm, sal_Int32 &rPos, const PrepareHint ePrep )
+static bool lcl_ErgoVadis( SwTextFrm* pFrm, sal_Int32 &rPos, const PrepareHint ePrep )
{
- const SwFtnInfo &rFtnInfo = pFrm->GetNode()->GetDoc()->GetFtnInfo();
+ const SwFootnoteInfo &rFootnoteInfo = pFrm->GetNode()->GetDoc()->GetFootnoteInfo();
if( ePrep == PREP_ERGOSUM )
{
- if( rFtnInfo.aErgoSum.isEmpty() )
+ if( rFootnoteInfo.aErgoSum.isEmpty() )
return false;
rPos = pFrm->GetOfst();
}
else
{
- if( rFtnInfo.aQuoVadis.isEmpty() )
+ if( rFootnoteInfo.aQuoVadis.isEmpty() )
return false;
if( pFrm->HasFollow() )
rPos = pFrm->GetFollow()->GetOfst();
else
- rPos = pFrm->GetTxt().getLength();
+ rPos = pFrm->GetText().getLength();
if( rPos )
--rPos; // our last character
}
return true;
}
-void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
+void SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
bool bNotify )
{
SwFrmSwapper aSwapper( this, false );
@@ -1479,18 +1479,18 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
break;
}
// Are there any free-flying frames on this page?
- SwTxtFly aTxtFly( this );
- if( aTxtFly.IsOn() )
+ SwTextFly aTextFly( this );
+ if( aTextFly.IsOn() )
{
// Does any free-flying frame overlap?
- if ( aTxtFly.Relax() || IsUndersized() )
+ if ( aTextFly.Relax() || IsUndersized() )
break;
}
- if( GetTxtNode()->GetSwAttrSet().GetRegister().GetValue())
+ if( GetTextNode()->GetSwAttrSet().GetRegister().GetValue())
break;
SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm()));
- if ( pGrid && GetTxtNode()->GetSwAttrSet().GetParaGrid().GetValue() )
+ if ( pGrid && GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() )
break;
// #i28701# - consider anchored objects
@@ -1507,7 +1507,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if( !HasPara() && PREP_MUST_FIT != ePrep )
{
SetInvalidVert( true ); // Test
- OSL_ENSURE( !IsLocked(), "SwTxtFrm::Prepare: three of a perfect pair" );
+ OSL_ENSURE( !IsLocked(), "SwTextFrm::Prepare: three of a perfect pair" );
if ( bNotify )
InvalidateSize();
else
@@ -1516,7 +1516,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
}
// Get object from cache while locking
- SwTxtLineAccess aAccess( this );
+ SwTextLineAccess aAccess( this );
SwParaPortion *pPara = aAccess.GetPara();
switch( ePrep )
@@ -1527,7 +1527,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
_InvalidateSize();
/* no break here */
case PREP_ADJUST_FRM : pPara->SetPrepAdjust();
- if( IsFtnNumFrm() != pPara->IsFtnNum() ||
+ if( IsFootnoteNumFrm() != pPara->IsFootnoteNum() ||
IsUndersized() )
{
InvalidateRange( SwCharRange( 0, 1 ), 1);
@@ -1550,21 +1550,21 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
case PREP_FTN :
{
- SwTxtFtn const *pFtn = static_cast<SwTxtFtn const *>(pVoid);
- if( IsInFtn() )
+ SwTextFootnote const *pFootnote = static_cast<SwTextFootnote const *>(pVoid);
+ if( IsInFootnote() )
{
- // Am I the first TxtFrm of a footnote?
+ // Am I the first TextFrm of a footnote?
if( !GetPrev() )
- // So we're a TxtFrm of the footnote, which has
+ // So we're a TextFrm of the footnote, which has
// to display the footnote number or the ErgoSum text
InvalidateRange( SwCharRange( 0, 1 ), 1);
if( !GetNext() )
{
- // We're the last Ftn; we need to update the
+ // We're the last Footnote; we need to update the
// QuoVadis texts now
- const SwFtnInfo &rFtnInfo = GetNode()->GetDoc()->GetFtnInfo();
- if( !pPara->UpdateQuoVadis( rFtnInfo.aQuoVadis ) )
+ const SwFootnoteInfo &rFootnoteInfo = GetNode()->GetDoc()->GetFootnoteInfo();
+ if( !pPara->UpdateQuoVadis( rFootnoteInfo.aQuoVadis ) )
{
sal_Int32 nPos = pPara->GetParLen();
if( nPos )
@@ -1575,8 +1575,8 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
}
else
{
- // We are the TxtFrm _with_ the footnote
- const sal_Int32 nPos = pFtn->GetStart();
+ // We are the TextFrm _with_ the footnote
+ const sal_Int32 nPos = pFootnote->GetStart();
InvalidateRange( SwCharRange( nPos, 1 ), 1);
}
break;
@@ -1599,7 +1599,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
--nNxtOfst;
InvalidateRange( SwCharRange( nNxtOfst, 1 ), 1);
}
- if( IsInFtn() )
+ if( IsInFootnote() )
{
sal_Int32 nPos;
if( lcl_ErgoVadis( this, nPos, PREP_QUOVADIS ) )
@@ -1608,7 +1608,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
InvalidateRange( SwCharRange( nPos, 1 ), 0 );
}
// If we have a page number field, we must invalidate those spots
- SwpHints *pHints = GetTxtNode()->GetpSwpHints();
+ SwpHints *pHints = GetTextNode()->GetpSwpHints();
if( pHints )
{
const size_t nSize = pHints->Count();
@@ -1616,20 +1616,20 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
GetFollow()->GetOfst() : COMPLETE_STRING;
for ( size_t i = 0; i < nSize; ++i )
{
- const SwTxtAttr *pHt = (*pHints)[i];
+ const SwTextAttr *pHt = (*pHints)[i];
const sal_Int32 nStart = pHt->GetStart();
if( nStart >= GetOfst() )
{
if( nStart >= nEnd )
break;
- // If we're flowing back and own a Ftn, the Ftn also flows
+ // If we're flowing back and own a Footnote, the Footnote also flows
// with us. So that it doesn't obstruct us, we send ourselves
// a ADJUST_FRM.
// pVoid != 0 means MoveBwd()
const sal_uInt16 nWhich = pHt->Which();
if( RES_TXTATR_FIELD == nWhich ||
- (HasFtn() && pVoid && RES_TXTATR_FTN == nWhich))
+ (HasFootnote() && pVoid && RES_TXTATR_FTN == nWhich))
InvalidateRange( SwCharRange( nStart, 1 ), 1 );
}
}
@@ -1648,7 +1648,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if ( GetValidPrtAreaFlag() )
{
SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm()));
- if ( pGrid && GetTxtNode()->GetSwAttrSet().GetParaGrid().GetValue() )
+ if ( pGrid && GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() )
InvalidatePrt();
}
@@ -1674,7 +1674,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i];
// #i28701# - consider all
// to-character anchored objects
- if ( pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId()
+ if ( pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
== FLY_AT_CHAR )
{
bFormat = true;
@@ -1685,11 +1685,11 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if( !bFormat )
{
// Are there any free-flying frames on this page?
- SwTxtFly aTxtFly( this );
- if( aTxtFly.IsOn() )
+ SwTextFly aTextFly( this );
+ if( aTextFly.IsOn() )
{
// Does any free-flying frame overlap?
- bFormat = aTxtFly.Relax() || IsUndersized();
+ bFormat = aTextFly.Relax() || IsUndersized();
}
}
}
@@ -1708,12 +1708,12 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
}
else
{
- if( GetTxtNode()->GetSwAttrSet().GetRegister().GetValue() )
+ if( GetTextNode()->GetSwAttrSet().GetRegister().GetValue() )
Prepare( PREP_REGISTER, 0, bNotify );
// The Frames need to be readjusted, which caused by changes
// in position
- else if( HasFtn() )
+ else if( HasFootnote() )
{
Prepare( PREP_ADJUST_FRM, 0, bNotify );
_InvalidateSize();
@@ -1724,7 +1724,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
break;
}
case PREP_REGISTER:
- if( GetTxtNode()->GetSwAttrSet().GetRegister().GetValue() )
+ if( GetTextNode()->GetSwAttrSet().GetRegister().GetValue() )
{
pPara->SetPrepAdjust();
CalcLineSpace();
@@ -1770,7 +1770,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
{
if( pVoid )
{
- sal_Int32 nWhere = CalcFlyPos( const_cast<SwFrmFmt *>(static_cast<SwFrmFmt const *>(pVoid)) );
+ sal_Int32 nWhere = CalcFlyPos( const_cast<SwFrameFormat *>(static_cast<SwFrameFormat const *>(pVoid)) );
OSL_ENSURE( COMPLETE_STRING != nWhere, "Prepare: Why me?" );
InvalidateRange( SwCharRange( nWhere, 1 ) );
return;
@@ -1815,20 +1815,20 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
* The frame is changed in size and position, its SwParaPortion is moved aside
* and a new one is created.
* To achieve this, run formatting with bTestFormat flag set.
- * In the destructor the TxtFrm is reset to its original state.
+ * In the destructor the TextFrm is reset to its original state.
*/
class SwTestFormat
{
- SwTxtFrm *pFrm;
+ SwTextFrm *pFrm;
SwParaPortion *pOldPara;
SwRect aOldFrm, aOldPrt;
public:
- SwTestFormat( SwTxtFrm* pTxtFrm, const SwFrm* pPrv, SwTwips nMaxHeight );
+ SwTestFormat( SwTextFrm* pTextFrm, const SwFrm* pPrv, SwTwips nMaxHeight );
~SwTestFormat();
};
-SwTestFormat::SwTestFormat( SwTxtFrm* pTxtFrm, const SwFrm* pPre, SwTwips nMaxHeight )
- : pFrm( pTxtFrm )
+SwTestFormat::SwTestFormat( SwTextFrm* pTextFrm, const SwFrm* pPre, SwTwips nMaxHeight )
+ : pFrm( pTextFrm )
{
aOldFrm = pFrm->Frm();
aOldPrt = pFrm->Prt();
@@ -1868,8 +1868,8 @@ SwTestFormat::SwTestFormat( SwTxtFrm* pTxtFrm, const SwFrm* pPre, SwTwips nMaxHe
if ( pFrm->IsVertical() )
pFrm->SwapWidthAndHeight();
- SwTxtFormatInfo aInf( pFrm, false, true, true );
- SwTxtFormatter aLine( pFrm, &aInf );
+ SwTextFormatInfo aInf( pFrm, false, true, true );
+ SwTextFormatter aLine( pFrm, &aInf );
pFrm->_Format( aLine, aInf );
@@ -1886,7 +1886,7 @@ SwTestFormat::~SwTestFormat()
pFrm->SetPara( pOldPara );
}
-bool SwTxtFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit )
+bool SwTextFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit )
{
PROTOCOL_ENTER( this, PROT_TESTFORMAT, 0, 0 )
@@ -1895,7 +1895,7 @@ bool SwTxtFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit
SwTestFormat aSave( this, pPrv, rMaxHeight );
- return SwTxtFrm::WouldFit( rMaxHeight, bSplit, true );
+ return SwTextFrm::WouldFit( rMaxHeight, bSplit, true );
}
/**
@@ -1910,10 +1910,10 @@ bool SwTxtFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit
*
* @returns true if I can split
*/
-bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst )
+bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst )
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
- "SwTxtFrm::WouldFit with swapped frame" );
+ "SwTextFrm::WouldFit with swapped frame" );
SWRECTFN( this );
if( IsLocked() )
@@ -1925,8 +1925,8 @@ bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst )
// OD 2004-05-24 #i27801# - correction: 'short cut' for empty paragraph
// can *not* be applied, if test format is in progress. The test format doesn't
- // adjust the frame and the printing area - see method <SwTxtFrm::_Format(..)>,
- // which is called in <SwTxtFrm::TestFormat(..)>
+ // adjust the frame and the printing area - see method <SwTextFrm::_Format(..)>,
+ // which is called in <SwTextFrm::TestFormat(..)>
if ( IsEmpty() && !bTst )
{
bSplit = false;
@@ -1966,7 +1966,7 @@ bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst )
!GetFollow()->Frm().Width() :
!GetFollow()->Frm().Height() ) )
{
- SwTxtFrm* pFoll = GetFollow()->GetFollow();
+ SwTextFrm* pFoll = GetFollow()->GetFollow();
while( pFoll &&
( pFoll->IsVertical() ?
!pFoll->Frm().Width() :
@@ -1982,8 +1982,8 @@ bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst )
SWAP_IF_NOT_SWAPPED( this );
- SwTxtSizeInfo aInf( this );
- SwTxtMargin aLine( this, &aInf );
+ SwTextSizeInfo aInf( this );
+ SwTextMargin aLine( this, &aInf );
WidowsAndOrphans aFrmBreak( this, rMaxHeight, bSplit );
@@ -2009,10 +2009,10 @@ bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst )
return bRet;
}
-sal_uInt16 SwTxtFrm::GetParHeight() const
+sal_uInt16 SwTextFrm::GetParHeight() const
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
- "SwTxtFrm::GetParHeight with swapped frame" );
+ "SwTextFrm::GetParHeight with swapped frame" );
if( !HasPara() )
{ // For non-empty paragraphs this is a special case
@@ -2020,7 +2020,7 @@ sal_uInt16 SwTxtFrm::GetParHeight() const
sal_uInt16 nRet = (sal_uInt16)Prt().SSize().Height();
if( IsUndersized() )
{
- if( IsEmpty() || GetTxt().isEmpty() )
+ if( IsEmpty() || GetText().isEmpty() )
nRet = (sal_uInt16)EmptyHeight();
else
++nRet;
@@ -2050,7 +2050,7 @@ sal_uInt16 SwTxtFrm::GetParHeight() const
/**
* @returns this _always_ in the formatted state!
*/
-SwTxtFrm* SwTxtFrm::GetFormatted( bool bForceQuickFormat )
+SwTextFrm* SwTextFrm::GetFormatted( bool bForceQuickFormat )
{
SWAP_IF_SWAPPED( this )
@@ -2076,7 +2076,7 @@ SwTxtFrm* SwTxtFrm::GetFormatted( bool bForceQuickFormat )
return this;
}
-SwTwips SwTxtFrm::CalcFitToContent()
+SwTwips SwTextFrm::CalcFitToContent()
{
// #i31490#
// If we are currently locked, we better return with a
@@ -2104,11 +2104,11 @@ SwTwips SwTxtFrm::CalcFitToContent()
Frm().Pos().X() += nOldFrmWidth - nPageWidth;
// #i31490#
- TxtFrmLockGuard aLock( this );
+ TextFrmLockGuard aLock( this );
- SwTxtFormatInfo aInf( this, false, true, true );
+ SwTextFormatInfo aInf( this, false, true, true );
aInf.SetIgnoreFly( true );
- SwTxtFormatter aLine( this, &aInf );
+ SwTextFormatter aLine( this, &aInf );
SwHookOut aHook( aInf );
// #i54031# - assure mininum of MINLAY twips.
@@ -2133,7 +2133,7 @@ SwTwips SwTxtFrm::CalcFitToContent()
* line offset for the real text formatting due to the value of label
* adjustment attribute of the list level.
*/
-void SwTxtFrm::CalcAdditionalFirstLineOffset()
+void SwTextFrm::CalcAdditionalFirstLineOffset()
{
if ( IsLocked() )
return;
@@ -2141,11 +2141,11 @@ void SwTxtFrm::CalcAdditionalFirstLineOffset()
// reset additional first line offset
mnAdditionalFirstLineOffset = 0;
- const SwTxtNode* pTxtNode( GetTxtNode() );
- if ( pTxtNode && pTxtNode->IsNumbered() && pTxtNode->IsCountedInList() &&
- pTxtNode->GetNumRule() )
+ const SwTextNode* pTextNode( GetTextNode() );
+ if ( pTextNode && pTextNode->IsNumbered() && pTextNode->IsCountedInList() &&
+ pTextNode->GetNumRule() )
{
- int nListLevel = pTxtNode->GetActualListLevel();
+ int nListLevel = pTextNode->GetActualListLevel();
if (nListLevel < 0)
nListLevel = 0;
@@ -2153,9 +2153,9 @@ void SwTxtFrm::CalcAdditionalFirstLineOffset()
if (nListLevel >= MAXLEVEL)
nListLevel = MAXLEVEL - 1;
- const SwNumFmt& rNumFmt =
- pTxtNode->GetNumRule()->Get( static_cast<sal_uInt16>(nListLevel) );
- if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
+ const SwNumFormat& rNumFormat =
+ pTextNode->GetNumRule()->Get( static_cast<sal_uInt16>(nListLevel) );
+ if ( rNumFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
// keep current paragraph portion and apply dummy paragraph portion
SwParaPortion* pOldPara = GetPara();
@@ -2163,37 +2163,37 @@ void SwTxtFrm::CalcAdditionalFirstLineOffset()
SetPara( pDummy, false );
// lock paragraph
- TxtFrmLockGuard aLock( this );
+ TextFrmLockGuard aLock( this );
// simulate text formatting
- SwTxtFormatInfo aInf( this, false, true, true );
+ SwTextFormatInfo aInf( this, false, true, true );
aInf.SetIgnoreFly( true );
- SwTxtFormatter aLine( this, &aInf );
+ SwTextFormatter aLine( this, &aInf );
SwHookOut aHook( aInf );
aLine._CalcFitToContent();
// determine additional first line offset
const SwLinePortion* pFirstPortion = aLine.GetCurr()->GetFirstPortion();
- if ( pFirstPortion->InNumberGrp() && !pFirstPortion->IsFtnNumPortion() )
+ if ( pFirstPortion->InNumberGrp() && !pFirstPortion->IsFootnoteNumPortion() )
{
SwTwips nNumberPortionWidth( pFirstPortion->Width() );
const SwLinePortion* pPortion = pFirstPortion->GetPortion();
while ( pPortion &&
- pPortion->InNumberGrp() && !pPortion->IsFtnNumPortion())
+ pPortion->InNumberGrp() && !pPortion->IsFootnoteNumPortion())
{
nNumberPortionWidth += pPortion->Width();
pPortion = pPortion->GetPortion();
}
if ( ( IsRightToLeft() &&
- rNumFmt.GetNumAdjust() == SVX_ADJUST_LEFT ) ||
+ rNumFormat.GetNumAdjust() == SVX_ADJUST_LEFT ) ||
( !IsRightToLeft() &&
- rNumFmt.GetNumAdjust() == SVX_ADJUST_RIGHT ) )
+ rNumFormat.GetNumAdjust() == SVX_ADJUST_RIGHT ) )
{
mnAdditionalFirstLineOffset = -nNumberPortionWidth;
}
- else if ( rNumFmt.GetNumAdjust() == SVX_ADJUST_CENTER )
+ else if ( rNumFormat.GetNumAdjust() == SVX_ADJUST_CENTER )
{
mnAdditionalFirstLineOffset = -(nNumberPortionWidth/2);
}
@@ -2217,7 +2217,7 @@ void SwTxtFrm::CalcAdditionalFirstLineOffset()
* determine the height of the last line, which
* uses the font
*/
-void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
+void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont )
{
// #i71281#
// invalidate printing area, if height of last line changes
@@ -2225,7 +2225,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
// determine output device
SwViewShell* pVsh = getRootFrm()->GetCurrShell();
- OSL_ENSURE( pVsh, "<SwTxtFrm::_GetHeightOfLastLineForPropLineSpacing()> - no SwViewShell" );
+ OSL_ENSURE( pVsh, "<SwTextFrm::_GetHeightOfLastLineForPropLineSpacing()> - no SwViewShell" );
// #i78921# - make code robust, according to provided patch
// There could be no <SwViewShell> instance in the case of loading a binary
@@ -2235,13 +2235,13 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
return;
}
OutputDevice* pOut = pVsh->GetOut();
- const IDocumentSettingAccess* pIDSA = GetTxtNode()->getIDocumentSettingAccess();
+ const IDocumentSettingAccess* pIDSA = GetTextNode()->getIDocumentSettingAccess();
if ( !pVsh->GetViewOptions()->getBrowseMode() ||
pVsh->GetViewOptions()->IsPrtFormat() )
{
- pOut = GetTxtNode()->getIDocumentDeviceAccess()->getReferenceDevice( true );
+ pOut = GetTextNode()->getIDocumentDeviceAccess()->getReferenceDevice( true );
}
- OSL_ENSURE( pOut, "<SwTxtFrm::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" );
+ OSL_ENSURE( pOut, "<SwTextFrm::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" );
// #i78921# - make code robust, according to provided patch
if ( !pOut )
{
@@ -2293,7 +2293,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
else
{
bool bCalcHeightOfLastLine = true;
- if ( ( !HasPara() && IsEmpty( ) ) || GetTxt().isEmpty() )
+ if ( ( !HasPara() && IsEmpty( ) ) || GetText().isEmpty() )
{
mnHeightOfLastLine = EmptyHeight();
bCalcHeightOfLastLine = false;
@@ -2302,7 +2302,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
if ( bCalcHeightOfLastLine )
{
OSL_ENSURE( HasPara(),
- "<SwTxtFrm::_CalcHeightOfLastLine()> - missing paragraph portions." );
+ "<SwTextFrm::_CalcHeightOfLastLine()> - missing paragraph portions." );
const SwLineLayout* pLineLayout = GetPara();
while ( pLineLayout && pLineLayout->GetNext() )
{
@@ -2355,7 +2355,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
* value of a proportional line spacing is
* returned or not
*/
-long SwTxtFrm::GetLineSpace( const bool _bNoPropLineSpace ) const
+long SwTextFrm::GetLineSpace( const bool _bNoPropLineSpace ) const
{
long nRet = 0;
@@ -2397,7 +2397,7 @@ long SwTxtFrm::GetLineSpace( const bool _bNoPropLineSpace ) const
return nRet;
}
-sal_uInt16 SwTxtFrm::FirstLineHeight() const
+sal_uInt16 SwTextFrm::FirstLineHeight() const
{
if ( !HasPara() )
{
@@ -2412,17 +2412,17 @@ sal_uInt16 SwTxtFrm::FirstLineHeight() const
return pPara->Height();
}
-sal_uInt16 SwTxtFrm::GetLineCount( sal_Int32 nPos )
+sal_uInt16 SwTextFrm::GetLineCount( sal_Int32 nPos )
{
sal_uInt16 nRet = 0;
- SwTxtFrm *pFrm = this;
+ SwTextFrm *pFrm = this;
do
{
pFrm->GetFormatted();
if( !pFrm->HasPara() )
break;
- SwTxtSizeInfo aInf( pFrm );
- SwTxtMargin aLine( pFrm, &aInf );
+ SwTextSizeInfo aInf( pFrm );
+ SwTextMargin aLine( pFrm, &aInf );
if( COMPLETE_STRING == nPos )
aLine.Bottom();
else
@@ -2433,15 +2433,15 @@ sal_uInt16 SwTxtFrm::GetLineCount( sal_Int32 nPos )
return nRet;
}
-void SwTxtFrm::ChgThisLines()
+void SwTextFrm::ChgThisLines()
{
// not necessary to format here (GerFormatted etc.), because we have to come from there!
sal_uLong nNew = 0;
const SwLineNumberInfo &rInf = GetNode()->GetDoc()->GetLineNumberInfo();
- if ( !GetTxt().isEmpty() && HasPara() )
+ if ( !GetText().isEmpty() && HasPara() )
{
- SwTxtSizeInfo aInf( this );
- SwTxtMargin aLine( this, &aInf );
+ SwTextSizeInfo aInf( this );
+ SwTextMargin aLine( this, &aInf );
if ( rInf.IsCountBlankLines() )
{
aLine.Bottom();
@@ -2451,7 +2451,7 @@ void SwTxtFrm::ChgThisLines()
{
do
{
- if( aLine.GetCurr()->HasCntnt() )
+ if( aLine.GetCurr()->HasContent() )
++nNew;
} while ( aLine.NextLine() );
}
@@ -2466,7 +2466,7 @@ void SwTxtFrm::ChgThisLines()
nAllLines -= nThisLines;
nThisLines = nNew;
nAllLines += nThisLines;
- SwFrm *pNxt = GetNextCntntFrm();
+ SwFrm *pNxt = GetNextContentFrm();
while( pNxt && pNxt->IsInTab() )
{
if( 0 != (pNxt = pNxt->FindTabFrm()) )
@@ -2488,7 +2488,7 @@ void SwTxtFrm::ChgThisLines()
}
}
-void SwTxtFrm::RecalcAllLines()
+void SwTextFrm::RecalcAllLines()
{
ValidateLineNum();
@@ -2497,31 +2497,31 @@ void SwTxtFrm::RecalcAllLines()
if ( !IsInTab() )
{
const sal_uLong nOld = GetAllLines();
- const SwFmtLineNumber &rLineNum = pAttrSet->GetLineNumber();
+ const SwFormatLineNumber &rLineNum = pAttrSet->GetLineNumber();
sal_uLong nNewNum;
- const bool bRestart = GetTxtNode()->GetDoc()->GetLineNumberInfo().IsRestartEachPage();
+ const bool bRestart = GetTextNode()->GetDoc()->GetLineNumberInfo().IsRestartEachPage();
if ( !IsFollow() && rLineNum.GetStartValue() && rLineNum.IsCount() )
nNewNum = rLineNum.GetStartValue() - 1;
// If it is a follow or not has not be considered if it is a restart at each page; the
// restart should also take affekt at follows.
- else if ( bRestart && FindPageFrm()->FindFirstBodyCntnt() == this )
+ else if ( bRestart && FindPageFrm()->FindFirstBodyContent() == this )
{
nNewNum = 0;
}
else
{
- SwCntntFrm *pPrv = GetPrevCntntFrm();
+ SwContentFrm *pPrv = GetPrevContentFrm();
while ( pPrv &&
(pPrv->IsInTab() || pPrv->IsInDocBody() != IsInDocBody()) )
- pPrv = pPrv->GetPrevCntntFrm();
+ pPrv = pPrv->GetPrevContentFrm();
// #i78254# Restart line numbering at page change
// First body content may be in table!
if ( bRestart && pPrv && pPrv->FindPageFrm() != FindPageFrm() )
pPrv = 0;
- nNewNum = pPrv ? static_cast<SwTxtFrm*>(pPrv)->GetAllLines() : 0;
+ nNewNum = pPrv ? static_cast<SwTextFrm*>(pPrv)->GetAllLines() : 0;
}
if ( rLineNum.IsCount() )
nNewNum += GetThisLines();
@@ -2529,10 +2529,10 @@ void SwTxtFrm::RecalcAllLines()
if ( nOld != nNewNum )
{
nAllLines = nNewNum;
- SwCntntFrm *pNxt = GetNextCntntFrm();
+ SwContentFrm *pNxt = GetNextContentFrm();
while ( pNxt &&
(pNxt->IsInTab() || pNxt->IsInDocBody() != IsInDocBody()) )
- pNxt = pNxt->GetNextCntntFrm();
+ pNxt = pNxt->GetNextContentFrm();
if ( pNxt )
{
if ( pNxt->GetUpper() != GetUpper() )
@@ -2544,7 +2544,7 @@ void SwTxtFrm::RecalcAllLines()
}
}
-void SwTxtFrm::VisitPortions( SwPortionHandler& rPH ) const
+void SwTextFrm::VisitPortions( SwPortionHandler& rPH ) const
{
const SwParaPortion* pPara = IsValid() ? GetPara() : NULL;
@@ -2571,17 +2571,17 @@ void SwTxtFrm::VisitPortions( SwPortionHandler& rPH ) const
rPH.Finish();
}
-const SwScriptInfo* SwTxtFrm::GetScriptInfo() const
+const SwScriptInfo* SwTextFrm::GetScriptInfo() const
{
const SwParaPortion* pPara = GetPara();
return pPara ? &pPara->GetScriptInfo() : 0;
}
/**
- * Helper function for SwTxtFrm::CalcBasePosForFly()
+ * Helper function for SwTextFrm::CalcBasePosForFly()
*/
-static SwTwips lcl_CalcFlyBasePos( const SwTxtFrm& rFrm, SwRect aFlyRect,
- SwTxtFly& rTxtFly )
+static SwTwips lcl_CalcFlyBasePos( const SwTextFrm& rFrm, SwRect aFlyRect,
+ SwTextFly& rTextFly )
{
SWRECTFN( (&rFrm) )
SwTwips nRet = rFrm.IsRightToLeft() ?
@@ -2590,7 +2590,7 @@ static SwTwips lcl_CalcFlyBasePos( const SwTxtFrm& rFrm, SwRect aFlyRect,
do
{
- SwRect aRect = rTxtFly.GetFrm( aFlyRect );
+ SwRect aRect = rTextFly.GetFrm( aFlyRect );
if ( 0 != (aRect.*fnRect->fnGetWidth)() )
{
if ( rFrm.IsRightToLeft() )
@@ -2626,12 +2626,12 @@ static SwTwips lcl_CalcFlyBasePos( const SwTxtFrm& rFrm, SwRect aFlyRect,
return nRet;
}
-void SwTxtFrm::CalcBaseOfstForFly()
+void SwTextFrm::CalcBaseOfstForFly()
{
OSL_ENSURE( !IsVertical() || !IsSwapped(),
- "SwTxtFrm::CalcBasePosForFly with swapped frame!" );
+ "SwTextFrm::CalcBasePosForFly with swapped frame!" );
- const SwNode* pNode = GetTxtNode();
+ const SwNode* pNode = GetTextNode();
if ( !pNode->getIDocumentSettingAccess()->get(DocumentSettingId::ADD_FLY_OFFSETS) )
return;
@@ -2658,15 +2658,15 @@ void SwTxtFrm::CalcBaseOfstForFly()
(aFlyRect.*fnRect->fnSetTopAndHeight)( nTop, nLineHeight );
}
- SwTxtFly aTxtFly( this );
- aTxtFly.SetIgnoreCurrentFrame( true );
- aTxtFly.SetIgnoreContour( true );
+ SwTextFly aTextFly( this );
+ aTextFly.SetIgnoreCurrentFrame( true );
+ aTextFly.SetIgnoreContour( true );
// #118809# - ignore objects in page header|footer for
// text frames not in page header|footer
- aTxtFly.SetIgnoreObjsInHeaderFooter( true );
- SwTwips nRet1 = lcl_CalcFlyBasePos( *this, aFlyRect, aTxtFly );
- aTxtFly.SetIgnoreCurrentFrame( false );
- SwTwips nRet2 = lcl_CalcFlyBasePos( *this, aFlyRect, aTxtFly );
+ aTextFly.SetIgnoreObjsInHeaderFooter( true );
+ SwTwips nRet1 = lcl_CalcFlyBasePos( *this, aFlyRect, aTextFly );
+ aTextFly.SetIgnoreCurrentFrame( false );
+ SwTwips nRet2 = lcl_CalcFlyBasePos( *this, aFlyRect, aTextFly );
// make values relative to frame start position
SwTwips nLeft = IsRightToLeft() ?
@@ -2680,10 +2680,10 @@ void SwTxtFrm::CalcBaseOfstForFly()
/**
* Repaint all text frames of the given text node
*/
-void SwTxtFrm::repaintTextFrames( const SwTxtNode& rNode )
+void SwTextFrm::repaintTextFrames( const SwTextNode& rNode )
{
- SwIterator<SwTxtFrm,SwTxtNode> aIter( rNode );
- for( const SwTxtFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
+ SwIterator<SwTextFrm,SwTextNode> aIter( rNode );
+ for( const SwTextFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
{
SwRect aRec( pFrm->PaintArea() );
const SwRootFrm *pRootFrm = pFrm->getRootFrm();
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index f5be1d3288f1..07ba9d6e8083 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -55,24 +55,24 @@
using namespace ::com::sun::star;
-bool SwTxtFrm::_IsFtnNumFrm() const
+bool SwTextFrm::_IsFootnoteNumFrm() const
{
- const SwFtnFrm* pFtn = FindFtnFrm()->GetMaster();
- while( pFtn && !pFtn->ContainsCntnt() )
- pFtn = pFtn->GetMaster();
- return !pFtn;
+ const SwFootnoteFrm* pFootnote = FindFootnoteFrm()->GetMaster();
+ while( pFootnote && !pFootnote->ContainsContent() )
+ pFootnote = pFootnote->GetMaster();
+ return !pFootnote;
}
/**
- * Looks for the TxtFrm matching the SwTxtFtn within a master-follow chain
+ * Looks for the TextFrm matching the SwTextFootnote within a master-follow chain
*/
-SwTxtFrm *SwTxtFrm::FindFtnRef( const SwTxtFtn *pFtn )
+SwTextFrm *SwTextFrm::FindFootnoteRef( const SwTextFootnote *pFootnote )
{
- SwTxtFrm *pFrm = this;
- const bool bFwd = pFtn->GetStart() >= GetOfst();
+ SwTextFrm *pFrm = this;
+ const bool bFwd = pFootnote->GetStart() >= GetOfst();
while( pFrm )
{
- if( SwFtnBossFrm::FindFtn( pFrm, pFtn ) )
+ if( SwFootnoteBossFrm::FindFootnote( pFrm, pFootnote ) )
return pFrm;
pFrm = bFwd ? pFrm->GetFollow() :
pFrm->IsFollow() ? pFrm->FindMaster() : 0;
@@ -81,14 +81,14 @@ SwTxtFrm *SwTxtFrm::FindFtnRef( const SwTxtFtn *pFtn )
}
#ifdef DBG_UTIL
-void SwTxtFrm::CalcFtnFlag( sal_Int32 nStop )// For testing the SplitFrm
+void SwTextFrm::CalcFootnoteFlag( sal_Int32 nStop )// For testing the SplitFrm
#else
-void SwTxtFrm::CalcFtnFlag()
+void SwTextFrm::CalcFootnoteFlag()
#endif
{
- bFtn = false;
+ bFootnote = false;
- const SwpHints *pHints = GetTxtNode()->GetpSwpHints();
+ const SwpHints *pHints = GetTextNode()->GetpSwpHints();
if( !pHints )
return;
@@ -103,7 +103,7 @@ void SwTxtFrm::CalcFtnFlag()
for ( size_t i = 0; i < nSize; ++i )
{
- const SwTxtAttr *pHt = (*pHints)[i];
+ const SwTextAttr *pHt = (*pHints)[i];
if ( pHt->Which() == RES_TXTATR_FTN )
{
const sal_Int32 nIdx = pHt->GetStart();
@@ -111,41 +111,41 @@ void SwTxtFrm::CalcFtnFlag()
break;
if( GetOfst() <= nIdx )
{
- bFtn = true;
+ bFootnote = true;
break;
}
}
}
}
-bool SwTxtFrm::CalcPrepFtnAdjust()
+bool SwTextFrm::CalcPrepFootnoteAdjust()
{
- OSL_ENSURE( HasFtn(), "Who´s calling me?" );
- SwFtnBossFrm *pBoss = FindFtnBossFrm( true );
- const SwFtnFrm *pFtn = pBoss->FindFirstFtn( this );
- if( pFtn && FTNPOS_CHAPTER != GetNode()->GetDoc()->GetFtnInfo().ePos &&
+ OSL_ENSURE( HasFootnote(), "Who´s calling me?" );
+ SwFootnoteBossFrm *pBoss = FindFootnoteBossFrm( true );
+ const SwFootnoteFrm *pFootnote = pBoss->FindFirstFootnote( this );
+ if( pFootnote && FTNPOS_CHAPTER != GetNode()->GetDoc()->GetFootnoteInfo().ePos &&
( !pBoss->GetUpper()->IsSctFrm() ||
- !static_cast<SwSectionFrm*>(pBoss->GetUpper())->IsFtnAtEnd() ) )
+ !static_cast<SwSectionFrm*>(pBoss->GetUpper())->IsFootnoteAtEnd() ) )
{
- const SwFtnContFrm *pCont = pBoss->FindFtnCont();
+ const SwFootnoteContFrm *pCont = pBoss->FindFootnoteCont();
bool bReArrange = true;
SWRECTFN( this )
if ( pCont && (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(),
(Frm().*fnRect->fnGetBottom)() ) > 0 )
{
- pBoss->RearrangeFtns( (Frm().*fnRect->fnGetBottom)(), false,
- pFtn->GetAttr() );
+ pBoss->RearrangeFootnotes( (Frm().*fnRect->fnGetBottom)(), false,
+ pFootnote->GetAttr() );
ValidateBodyFrm();
ValidateFrm();
- pFtn = pBoss->FindFirstFtn( this );
+ pFootnote = pBoss->FindFirstFootnote( this );
}
else
bReArrange = false;
- if( !pCont || !pFtn || bReArrange != (pFtn->FindFtnBossFrm() == pBoss) )
+ if( !pCont || !pFootnote || bReArrange != (pFootnote->FindFootnoteBossFrm() == pBoss) )
{
- SwTxtFormatInfo aInf( this );
- SwTxtFormatter aLine( this, &aInf );
+ SwTextFormatInfo aInf( this );
+ SwTextFormatter aLine( this, &aInf );
aLine.TruncLines();
SetPara( 0 ); // May be deleted!
ResetPreps();
@@ -159,14 +159,14 @@ bool SwTxtFrm::CalcPrepFtnAdjust()
* Local helper function. Checks if nLower should be taken as the boundary
* for the footnote.
*/
-static SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
+static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower )
{
// nLower is an absolute value. It denotes the bottom of the line
// containing the footnote.
SWRECTFN( pFrm )
OSL_ENSURE( !pFrm->IsVertical() || !pFrm->IsSwapped(),
- "lcl_GetFtnLower with swapped frame" );
+ "lcl_GetFootnoteLower with swapped frame" );
SwTwips nAdd;
SwTwips nRet = nLower;
@@ -179,7 +179,7 @@ static SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
// b) The table row is not allowed to split
// Inside a table, there are no footnotes,
- // see SwFrm::FindFtnBossFrm. So we don't have to check
+ // see SwFrm::FindFootnoteBossFrm. So we don't have to check
// the case that pFrm is inside a (footnote collecting) section
// within the table.
const SwFrm* pRow = pFrm;
@@ -252,27 +252,27 @@ static SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
return nRet;
}
-SwTwips SwTxtFrm::GetFtnLine( const SwTxtFtn *pFtn ) const
+SwTwips SwTextFrm::GetFootnoteLine( const SwTextFootnote *pFootnote ) const
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
- "SwTxtFrm::GetFtnLine with swapped frame" );
+ "SwTextFrm::GetFootnoteLine with swapped frame" );
- SwTxtFrm *pThis = const_cast<SwTxtFrm*>(this);
+ SwTextFrm *pThis = const_cast<SwTextFrm*>(this);
if( !HasPara() )
{
// #109071# GetFormatted() does not work here, bacause most probably
// the frame is currently locked. We return the previous value.
- return pThis->mnFtnLine > 0 ?
- pThis->mnFtnLine :
+ return pThis->mnFootnoteLine > 0 ?
+ pThis->mnFootnoteLine :
IsVertical() ? Frm().Left() : Frm().Bottom();
}
SWAP_IF_NOT_SWAPPED( this )
- SwTxtInfo aInf( pThis );
- SwTxtIter aLine( pThis, &aInf );
- const sal_Int32 nPos = pFtn->GetStart();
+ SwTextInfo aInf( pThis );
+ SwTextIter aLine( pThis, &aInf );
+ const sal_Int32 nPos = pFootnote->GetStart();
aLine.CharToLine( nPos );
SwTwips nRet = aLine.Y() + SwTwips(aLine.GetLineHeight());
@@ -281,36 +281,36 @@ SwTwips SwTxtFrm::GetFtnLine( const SwTxtFtn *pFtn ) const
UNDO_SWAP( this )
- nRet = lcl_GetFtnLower( pThis, nRet );
+ nRet = lcl_GetFootnoteLower( pThis, nRet );
- pThis->mnFtnLine = nRet;
+ pThis->mnFootnoteLine = nRet;
return nRet;
}
/**
- * Calculates the maximum reachable height for the TxtFrm in the Ftn Area.
- * The cell's bottom margin with the Ftn Reference limit's this height.
+ * Calculates the maximum reachable height for the TextFrm in the Footnote Area.
+ * The cell's bottom margin with the Footnote Reference limit's this height.
*/
-SwTwips SwTxtFrm::_GetFtnFrmHeight() const
+SwTwips SwTextFrm::_GetFootnoteFrmHeight() const
{
- OSL_ENSURE( !IsFollow() && IsInFtn(), "SwTxtFrm::SetFtnLine: moon walk" );
+ OSL_ENSURE( !IsFollow() && IsInFootnote(), "SwTextFrm::SetFootnoteLine: moon walk" );
- const SwFtnFrm *pFtnFrm = FindFtnFrm();
- const SwTxtFrm *pRef = static_cast<const SwTxtFrm *>(pFtnFrm->GetRef());
- const SwFtnBossFrm *pBoss = FindFtnBossFrm();
- if( pBoss != pRef->FindFtnBossFrm( !pFtnFrm->GetAttr()->
- GetFtn().IsEndNote() ) )
+ const SwFootnoteFrm *pFootnoteFrm = FindFootnoteFrm();
+ const SwTextFrm *pRef = static_cast<const SwTextFrm *>(pFootnoteFrm->GetRef());
+ const SwFootnoteBossFrm *pBoss = FindFootnoteBossFrm();
+ if( pBoss != pRef->FindFootnoteBossFrm( !pFootnoteFrm->GetAttr()->
+ GetFootnote().IsEndNote() ) )
return 0;
SWAP_IF_SWAPPED( this )
- SwTwips nHeight = pRef->IsInFtnConnect() ?
- 1 : pRef->GetFtnLine( pFtnFrm->GetAttr() );
+ SwTwips nHeight = pRef->IsInFootnoteConnect() ?
+ 1 : pRef->GetFootnoteLine( pFootnoteFrm->GetAttr() );
if( nHeight )
{
- // As odd as it may seem: the first Ftn on the page may not touch the
- // Ftn Reference, when entering text in the Ftn Area.
- const SwFrm *pCont = pFtnFrm->GetUpper();
+ // As odd as it may seem: the first Footnote on the page may not touch the
+ // Footnote Reference, when entering text in the Footnote Area.
+ const SwFrm *pCont = pFootnoteFrm->GetUpper();
// Height within the Container which we're allowed to consume anyways
SWRECTFN( pCont )
@@ -330,20 +330,20 @@ SwTwips SwTxtFrm::_GetFtnFrmHeight() const
break;
pTmp = pTmp->GetUpper();
}
- OSL_ENSURE( bInvalidPos, "Hanging below FtnCont" );
+ OSL_ENSURE( bInvalidPos, "Hanging below FootnoteCont" );
}
#endif
if ( (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(), nHeight) > 0 )
{
// Growth potential of the container
- if ( !pRef->IsInFtnConnect() )
+ if ( !pRef->IsInFootnoteConnect() )
{
- SwSaveFtnHeight aSave( const_cast<SwFtnBossFrm*>(pBoss), nHeight );
- nHeight = const_cast<SwFtnContFrm*>(static_cast<const SwFtnContFrm*>(pCont))->Grow( LONG_MAX, true );
+ SwSaveFootnoteHeight aSave( const_cast<SwFootnoteBossFrm*>(pBoss), nHeight );
+ nHeight = const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pCont))->Grow( LONG_MAX, true );
}
else
- nHeight = const_cast<SwFtnContFrm*>(static_cast<const SwFtnContFrm*>(pCont))->Grow( LONG_MAX, true );
+ nHeight = const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pCont))->Grow( LONG_MAX, true );
nHeight += nTmp;
if( nHeight < 0 )
@@ -364,42 +364,42 @@ SwTwips SwTxtFrm::_GetFtnFrmHeight() const
return nHeight;
}
-SwTxtFrm *SwTxtFrm::FindQuoVadisFrm()
+SwTextFrm *SwTextFrm::FindQuoVadisFrm()
{
- // Check whether we're in a FtnFrm
- if( GetIndPrev() || !IsInFtn() )
+ // Check whether we're in a FootnoteFrm
+ if( GetIndPrev() || !IsInFootnote() )
return 0;
- // To the preceding FtnFrm
- SwFtnFrm *pFtnFrm = FindFtnFrm()->GetMaster();
- if( !pFtnFrm )
+ // To the preceding FootnoteFrm
+ SwFootnoteFrm *pFootnoteFrm = FindFootnoteFrm()->GetMaster();
+ if( !pFootnoteFrm )
return 0;
- // Now the last Cntnt
- SwCntntFrm *pCnt = pFtnFrm->ContainsCntnt();
+ // Now the last Content
+ SwContentFrm *pCnt = pFootnoteFrm->ContainsContent();
if( !pCnt )
return NULL;
- SwCntntFrm *pLast;
+ SwContentFrm *pLast;
do
{ pLast = pCnt;
- pCnt = pCnt->GetNextCntntFrm();
- } while( pCnt && pFtnFrm->IsAnLower( pCnt ) );
- return static_cast<SwTxtFrm*>(pLast);
+ pCnt = pCnt->GetNextContentFrm();
+ } while( pCnt && pFootnoteFrm->IsAnLower( pCnt ) );
+ return static_cast<SwTextFrm*>(pLast);
}
-void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
+void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen )
{
- if ( !IsFtnAllowed() )
+ if ( !IsFootnoteAllowed() )
return;
- SwpHints *pHints = GetTxtNode()->GetpSwpHints();
+ SwpHints *pHints = GetTextNode()->GetpSwpHints();
if( !pHints )
return;
bool bRollBack = nLen != COMPLETE_STRING;
const size_t nSize = pHints->Count();
sal_Int32 nEnd;
- SwTxtFrm* pSource;
+ SwTextFrm* pSource;
if( bRollBack )
{
nEnd = nStart + nLen;
@@ -417,13 +417,13 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
{
SwPageFrm* pUpdate = NULL;
bool bRemove = false;
- SwFtnBossFrm *pFtnBoss = 0;
- SwFtnBossFrm *pEndBoss = 0;
- bool bFtnEndDoc
- = FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFtnInfo().ePos;
+ SwFootnoteBossFrm *pFootnoteBoss = 0;
+ SwFootnoteBossFrm *pEndBoss = 0;
+ bool bFootnoteEndDoc
+ = FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFootnoteInfo().ePos;
for ( size_t i = nSize; i; )
{
- SwTxtAttr *pHt = pHints->GetTextHint(--i);
+ SwTextAttr *pHt = pHints->GetTextHint(--i);
if ( RES_TXTATR_FTN != pHt->Which() )
continue;
@@ -433,25 +433,25 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
if( nEnd >= nIdx )
{
- SwTxtFtn *pFtn = static_cast<SwTxtFtn*>(pHt);
- const bool bEndn = pFtn->GetFtn().IsEndNote();
+ SwTextFootnote *pFootnote = static_cast<SwTextFootnote*>(pHt);
+ const bool bEndn = pFootnote->GetFootnote().IsEndNote();
if( bEndn )
{
if( !pEndBoss )
- pEndBoss = pSource->FindFtnBossFrm();
+ pEndBoss = pSource->FindFootnoteBossFrm();
}
else
{
- if( !pFtnBoss )
+ if( !pFootnoteBoss )
{
- pFtnBoss = pSource->FindFtnBossFrm( true );
- if( pFtnBoss->GetUpper()->IsSctFrm() )
+ pFootnoteBoss = pSource->FindFootnoteBossFrm( true );
+ if( pFootnoteBoss->GetUpper()->IsSctFrm() )
{
SwSectionFrm* pSect = static_cast<SwSectionFrm*>(
- pFtnBoss->GetUpper());
- if( pSect->IsFtnAtEnd() )
- bFtnEndDoc = false;
+ pFootnoteBoss->GetUpper());
+ if( pSect->IsFootnoteAtEnd() )
+ bFootnoteEndDoc = false;
}
}
}
@@ -459,62 +459,62 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
// We don't delete, but move instead.
// Three cases are to be considered:
// 1) There's neither Follow nor PrevFollow:
- // -> RemoveFtn() (maybe even a OSL_ENSURE(value))
+ // -> RemoveFootnote() (maybe even a OSL_ENSURE(value))
//
// 2) nStart > GetOfst, I have a Follow
- // -> Ftn moves into Follow
+ // -> Footnote moves into Follow
//
// 3) nStart < GetOfst, I am a Follow
- // -> Ftn moves into the PrevFollow
+ // -> Footnote moves into the PrevFollow
//
// Both need to be on one Page/in one Column
- SwFtnFrm *pFtnFrm = SwFtnBossFrm::FindFtn(pSource, pFtn);
+ SwFootnoteFrm *pFootnoteFrm = SwFootnoteBossFrm::FindFootnote(pSource, pFootnote);
- if( pFtnFrm )
+ if( pFootnoteFrm )
{
- const bool bEndDoc = bEndn || bFtnEndDoc;
+ const bool bEndDoc = bEndn || bFootnoteEndDoc;
if( bRollBack )
{
- while ( pFtnFrm )
+ while ( pFootnoteFrm )
{
- pFtnFrm->SetRef( this );
- pFtnFrm = pFtnFrm->GetFollow();
- SetFtn( true );
+ pFootnoteFrm->SetRef( this );
+ pFootnoteFrm = pFootnoteFrm->GetFollow();
+ SetFootnote( true );
}
}
else if( GetFollow() )
{
- SwCntntFrm *pDest = GetFollow();
- while( pDest->GetFollow() && static_cast<SwTxtFrm*>(pDest->
+ SwContentFrm *pDest = GetFollow();
+ while( pDest->GetFollow() && static_cast<SwTextFrm*>(pDest->
GetFollow())->GetOfst() <= nIdx )
pDest = pDest->GetFollow();
- OSL_ENSURE( !SwFtnBossFrm::FindFtn(
- pDest,pFtn),"SwTxtFrm::RemoveFtn: footnote exists");
+ OSL_ENSURE( !SwFootnoteBossFrm::FindFootnote(
+ pDest,pFootnote),"SwTextFrm::RemoveFootnote: footnote exists");
// Never deregister; always move
if ( bEndDoc ||
- !pFtnFrm->FindFtnBossFrm()->IsBefore( pDest->FindFtnBossFrm( !bEndn ) )
+ !pFootnoteFrm->FindFootnoteBossFrm()->IsBefore( pDest->FindFootnoteBossFrm( !bEndn ) )
)
{
- SwPageFrm* pTmp = pFtnFrm->FindPageFrm();
+ SwPageFrm* pTmp = pFootnoteFrm->FindPageFrm();
if( pUpdate && pUpdate != pTmp )
- pUpdate->UpdateFtnNum();
+ pUpdate->UpdateFootnoteNum();
pUpdate = pTmp;
- while ( pFtnFrm )
+ while ( pFootnoteFrm )
{
- pFtnFrm->SetRef( pDest );
- pFtnFrm = pFtnFrm->GetFollow();
+ pFootnoteFrm->SetRef( pDest );
+ pFootnoteFrm = pFootnoteFrm->GetFollow();
}
}
else
{
- pFtnBoss->MoveFtns( this, pDest, pFtn );
+ pFootnoteBoss->MoveFootnotes( this, pDest, pFootnote );
bRemove = true;
}
- static_cast<SwTxtFrm*>(pDest)->SetFtn( true );
+ static_cast<SwTextFrm*>(pDest)->SetFootnote( true );
- OSL_ENSURE( SwFtnBossFrm::FindFtn( pDest,
- pFtn),"SwTxtFrm::RemoveFtn: footnote ChgRef failed");
+ OSL_ENSURE( SwFootnoteBossFrm::FindFootnote( pDest,
+ pFootnote),"SwTextFrm::RemoveFootnote: footnote ChgRef failed");
}
else
{
@@ -523,29 +523,29 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
pEndBoss->FindSctFrm(), NULL ) ) )
{
if( bEndn )
- pEndBoss->RemoveFtn( this, pFtn );
+ pEndBoss->RemoveFootnote( this, pFootnote );
else
- pFtnBoss->RemoveFtn( this, pFtn );
+ pFootnoteBoss->RemoveFootnote( this, pFootnote );
bRemove = bRemove || !bEndDoc;
- OSL_ENSURE( !SwFtnBossFrm::FindFtn( this, pFtn ),
- "SwTxtFrm::RemoveFtn: can't get off that footnote" );
+ OSL_ENSURE( !SwFootnoteBossFrm::FindFootnote( this, pFootnote ),
+ "SwTextFrm::RemoveFootnote: can't get off that footnote" );
}
}
}
}
}
if( pUpdate )
- pUpdate->UpdateFtnNum();
+ pUpdate->UpdateFootnoteNum();
// We brake the oscillation
- if( bRemove && !bFtnEndDoc && HasPara() )
+ if( bRemove && !bFootnoteEndDoc && HasPara() )
{
ValidateBodyFrm();
ValidateFrm();
}
}
- // We call the RemoveFtn from within the FindBreak, because the last line is
+ // We call the RemoveFootnote from within the FindBreak, because the last line is
// to be passed to the Follow. The Offset of the Follow is, however, outdated;
// it'll be set soon. CalcFntFlag depends on a correctly set Follow Offset.
// Therefore we temporarily calculate the Follow Offset here
@@ -555,7 +555,7 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
nOldOfst = GetFollow()->GetOfst();
GetFollow()->ManipOfst( nStart + ( bRollBack ? nLen : 0 ) );
}
- pSource->CalcFtnFlag();
+ pSource->CalcFootnoteFlag();
if( nOldOfst < COMPLETE_STRING )
GetFollow()->ManipOfst( nOldOfst );
}
@@ -564,48 +564,48 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
/**
* We basically only have two possibilities:
*
- * a) The Ftn is already present
+ * a) The Footnote is already present
* => we move it, if another pSrcFrm has been found
*
- * b) The Ftn is not present
+ * b) The Footnote is not present
* => we have it created for us
*
- * Whether the Ftn ends up on our Page/Column, doesn't matter in this
+ * Whether the Footnote ends up on our Page/Column, doesn't matter in this
* context.
*
* Optimization for Endnotes.
*
- * Another problem: if the Deadline falls within the Ftn Area, we need
- * to move the Ftn.
+ * Another problem: if the Deadline falls within the Footnote Area, we need
+ * to move the Footnote.
*
* @returns false on any type of error
*/
-void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
+void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine )
{
OSL_ENSURE( !IsVertical() || !IsSwapped(),
- "SwTxtFrm::ConnectFtn with swapped frame" );
+ "SwTextFrm::ConnectFootnote with swapped frame" );
- bFtn = true;
- bInFtnConnect = true; // Just reset!
- const bool bEnd = pFtn->GetFtn().IsEndNote();
+ bFootnote = true;
+ bInFootnoteConnect = true; // Just reset!
+ const bool bEnd = pFootnote->GetFootnote().IsEndNote();
// We want to store this value, because it is needed as a fallback
- // in GetFtnLine(), if there is no paragraph information available
- mnFtnLine = nDeadLine;
+ // in GetFootnoteLine(), if there is no paragraph information available
+ mnFootnoteLine = nDeadLine;
// We always need a parent (Page/Column)
SwSectionFrm *pSect;
- SwCntntFrm *pCntnt = this;
+ SwContentFrm *pContent = this;
if( bEnd && IsInSct() )
{
pSect = FindSctFrm();
if( pSect->IsEndnAtEnd() )
- pCntnt = pSect->FindLastCntnt( FINDMODE_ENDNOTE );
- if( !pCntnt )
- pCntnt = this;
+ pContent = pSect->FindLastContent( FINDMODE_ENDNOTE );
+ if( !pContent )
+ pContent = this;
}
- SwFtnBossFrm *pBoss = pCntnt->FindFtnBossFrm( !bEnd );
+ SwFootnoteBossFrm *pBoss = pContent->FindFootnoteBossFrm( !bEnd );
#if OSL_DEBUG_LEVEL > 1
SwTwips nRstHeight = GetRstHeight();
@@ -613,51 +613,51 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
pSect = pBoss->FindSctFrm();
bool bDocEnd = bEnd ? !( pSect && pSect->IsEndnAtEnd() ) :
- ( !( pSect && pSect->IsFtnAtEnd() ) &&
- FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFtnInfo().ePos );
+ ( !( pSect && pSect->IsFootnoteAtEnd() ) &&
+ FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFootnoteInfo().ePos );
- // Ftn can be registered with the Follow
- SwCntntFrm *pSrcFrm = FindFtnRef( pFtn );
+ // Footnote can be registered with the Follow
+ SwContentFrm *pSrcFrm = FindFootnoteRef( pFootnote );
if( bDocEnd )
{
if( pSect && pSrcFrm )
{
- SwFtnFrm *pFtnFrm = SwFtnBossFrm::FindFtn( pSrcFrm, pFtn );
- if( pFtnFrm && pFtnFrm->IsInSct() )
+ SwFootnoteFrm *pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote );
+ if( pFootnoteFrm && pFootnoteFrm->IsInSct() )
{
- pBoss->RemoveFtn( pSrcFrm, pFtn );
+ pBoss->RemoveFootnote( pSrcFrm, pFootnote );
pSrcFrm = 0;
}
}
}
else if( bEnd && pSect )
{
- SwFtnFrm *pFtnFrm = pSrcFrm ? SwFtnBossFrm::FindFtn( pSrcFrm, pFtn ) : NULL;
- if( pFtnFrm && !pFtnFrm->GetUpper() )
- pFtnFrm = NULL;
+ SwFootnoteFrm *pFootnoteFrm = pSrcFrm ? SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote ) : NULL;
+ if( pFootnoteFrm && !pFootnoteFrm->GetUpper() )
+ pFootnoteFrm = NULL;
SwDoc *pDoc = GetNode()->GetDoc();
- if( SwLayouter::Collecting( pDoc, pSect, pFtnFrm ) )
+ if( SwLayouter::Collecting( pDoc, pSect, pFootnoteFrm ) )
{
if( !pSrcFrm )
{
- SwFtnFrm *pNew = new SwFtnFrm(pDoc->GetDfltFrmFmt(),this,this,pFtn);
- SwNodeIndex aIdx( *pFtn->GetStartNode(), 1 );
+ SwFootnoteFrm *pNew = new SwFootnoteFrm(pDoc->GetDfltFrameFormat(),this,this,pFootnote);
+ SwNodeIndex aIdx( *pFootnote->GetStartNode(), 1 );
::_InsertCnt( pNew, pDoc, aIdx.GetIndex() );
GetNode()->getIDocumentLayoutAccess()->GetLayouter()->CollectEndnote( pNew );
}
else if( pSrcFrm != this )
- SwFtnBossFrm::ChangeFtnRef( pSrcFrm, pFtn, this );
- bInFtnConnect = false;
+ SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this );
+ bInFootnoteConnect = false;
return;
}
else if( pSrcFrm )
{
- SwFtnBossFrm *pFtnBoss = pFtnFrm->FindFtnBossFrm();
- if( !pFtnBoss->IsInSct() ||
- pFtnBoss->ImplFindSctFrm()->GetSection()!=pSect->GetSection() )
+ SwFootnoteBossFrm *pFootnoteBoss = pFootnoteFrm->FindFootnoteBossFrm();
+ if( !pFootnoteBoss->IsInSct() ||
+ pFootnoteBoss->ImplFindSctFrm()->GetSection()!=pSect->GetSection() )
{
- pBoss->RemoveFtn( pSrcFrm, pFtn );
+ pBoss->RemoveFootnote( pSrcFrm, pFootnote );
pSrcFrm = 0;
}
}
@@ -666,27 +666,27 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
if( bDocEnd || bEnd )
{
if( !pSrcFrm )
- pBoss->AppendFtn( this, pFtn );
+ pBoss->AppendFootnote( this, pFootnote );
else if( pSrcFrm != this )
- SwFtnBossFrm::ChangeFtnRef( pSrcFrm, pFtn, this );
- bInFtnConnect = false;
+ SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this );
+ bInFootnoteConnect = false;
return;
}
- SwSaveFtnHeight aHeight( pBoss, nDeadLine );
+ SwSaveFootnoteHeight aHeight( pBoss, nDeadLine );
- if( !pSrcFrm ) // No Ftn was found at all
- pBoss->AppendFtn( this, pFtn );
+ if( !pSrcFrm ) // No Footnote was found at all
+ pBoss->AppendFootnote( this, pFootnote );
else
{
- SwFtnFrm *pFtnFrm = SwFtnBossFrm::FindFtn( pSrcFrm, pFtn );
- SwFtnBossFrm *pFtnBoss = pFtnFrm->FindFtnBossFrm();
+ SwFootnoteFrm *pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote );
+ SwFootnoteBossFrm *pFootnoteBoss = pFootnoteFrm->FindFootnoteBossFrm();
bool bBrutal = false;
- if( pFtnBoss == pBoss ) // Ref and Ftn are on the same Page/Column
+ if( pFootnoteBoss == pBoss ) // Ref and Footnote are on the same Page/Column
{
- SwFrm *pCont = pFtnFrm->GetUpper();
+ SwFrm *pCont = pFootnoteFrm->GetUpper();
SWRECTFN ( pCont )
long nDiff = (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(),
@@ -697,13 +697,13 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
// If the Footnote has been registered to a Follow, we need to
// rewire it now too
if ( pSrcFrm != this )
- SwFtnBossFrm::ChangeFtnRef( pSrcFrm, pFtn, this );
+ SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this );
// We have some room left, so the Footnote can grow
- if ( pFtnFrm->GetFollow() && nDiff > 0 )
+ if ( pFootnoteFrm->GetFollow() && nDiff > 0 )
{
SwTwips nHeight = (pCont->Frm().*fnRect->fnGetHeight)();
- pBoss->RearrangeFtns( nDeadLine, false, pFtn );
+ pBoss->RearrangeFootnotes( nDeadLine, false, pFootnote );
ValidateBodyFrm();
ValidateFrm();
SwViewShell *pSh = getRootFrm()->GetCurrShell();
@@ -711,7 +711,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
// So that we don't miss anything
pSh->InvalidateWindows( pCont->Frm() );
}
- bInFtnConnect = false;
+ bInFootnoteConnect = false;
return;
}
else
@@ -719,7 +719,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
}
else
{
- // Ref and Ftn are not on one Page; attempt to move is necessary
+ // Ref and Footnote are not on one Page; attempt to move is necessary
SwFrm* pTmp = this;
while( pTmp->GetNext() && pSrcFrm != pTmp )
pTmp = pTmp->GetNext();
@@ -727,54 +727,54 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
bBrutal = true;
else
{ // If our Parent is in a column Area, but the Page already has a
- // FtnContainer, we can only brute force it
- if( pSect && pSect->FindFtnBossFrm( !bEnd )->FindFtnCont() )
+ // FootnoteContainer, we can only brute force it
+ if( pSect && pSect->FindFootnoteBossFrm( !bEnd )->FindFootnoteCont() )
bBrutal = true;
- else if ( !pFtnFrm->GetPrev() ||
- pFtnBoss->IsBefore( pBoss )
+ else if ( !pFootnoteFrm->GetPrev() ||
+ pFootnoteBoss->IsBefore( pBoss )
)
{
- SwFtnBossFrm *pSrcBoss = pSrcFrm->FindFtnBossFrm( !bEnd );
- pSrcBoss->MoveFtns( pSrcFrm, this, pFtn );
+ SwFootnoteBossFrm *pSrcBoss = pSrcFrm->FindFootnoteBossFrm( !bEnd );
+ pSrcBoss->MoveFootnotes( pSrcFrm, this, pFootnote );
}
else
- SwFtnBossFrm::ChangeFtnRef( pSrcFrm, pFtn, this );
+ SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this );
}
}
// The brute force method: Remove Footnote and append.
- // We need to call SetFtnDeadLine(), as we can more easily adapt the
- // nMaxFtnHeight after RemoveFtn
+ // We need to call SetFootnoteDeadLine(), as we can more easily adapt the
+ // nMaxFootnoteHeight after RemoveFootnote
if( bBrutal )
{
- pBoss->RemoveFtn( pSrcFrm, pFtn, false );
- SwSaveFtnHeight *pHeight = bEnd ? NULL : new SwSaveFtnHeight( pBoss, nDeadLine );
- pBoss->AppendFtn( this, pFtn );
+ pBoss->RemoveFootnote( pSrcFrm, pFootnote, false );
+ SwSaveFootnoteHeight *pHeight = bEnd ? NULL : new SwSaveFootnoteHeight( pBoss, nDeadLine );
+ pBoss->AppendFootnote( this, pFootnote );
delete pHeight;
}
}
- // In column Areas, that not yet reach the Page's border a RearrangeFtns is not
+ // In column Areas, that not yet reach the Page's border a RearrangeFootnotes is not
// useful yet, as the Footnote container has not yet been calculated
if( !pSect || !pSect->Growable() )
{
// Validate environment, to avoid oscillation
- SwSaveFtnHeight aNochmal( pBoss, nDeadLine );
+ SwSaveFootnoteHeight aNochmal( pBoss, nDeadLine );
ValidateBodyFrm();
- pBoss->RearrangeFtns( nDeadLine, true );
+ pBoss->RearrangeFootnotes( nDeadLine, true );
ValidateFrm();
}
- else if( pSect->IsFtnAtEnd() )
+ else if( pSect->IsFootnoteAtEnd() )
{
ValidateBodyFrm();
ValidateFrm();
}
#if OSL_DEBUG_LEVEL > 1
- // pFtnFrm may have changed due to Calc ...
- SwFtnFrm *pFtnFrm = pBoss->FindFtn( this, pFtn );
- if( pFtnFrm && pBoss != pFtnFrm->FindFtnBossFrm( !bEnd ) )
+ // pFootnoteFrm may have changed due to Calc ...
+ SwFootnoteFrm *pFootnoteFrm = pBoss->FindFootnote( this, pFootnote );
+ if( pFootnoteFrm && pBoss != pFootnoteFrm->FindFootnoteBossFrm( !bEnd ) )
{
int bla = 5;
(void)bla;
@@ -782,28 +782,28 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
nRstHeight = GetRstHeight();
(void)nRstHeight;
#endif
- bInFtnConnect = false;
+ bInFootnoteConnect = false;
return;
}
/**
- * The portion for the Ftn Reference in the Text
+ * The portion for the Footnote Reference in the Text
*/
-SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
- SwTxtAttr *pHint )
+SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf,
+ SwTextAttr *pHint )
{
OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
- "NewFtnPortion with unswapped frame" );
+ "NewFootnotePortion with unswapped frame" );
- if( !pFrm->IsFtnAllowed() )
+ if( !pFrm->IsFootnoteAllowed() )
return 0;
- SwTxtFtn *pFtn = static_cast<SwTxtFtn*>(pHint);
- const SwFmtFtn& rFtn = static_cast<const SwFmtFtn&>(pFtn->GetFtn());
+ SwTextFootnote *pFootnote = static_cast<SwTextFootnote*>(pHint);
+ const SwFormatFootnote& rFootnote = static_cast<const SwFormatFootnote&>(pFootnote->GetFootnote());
SwDoc *pDoc = pFrm->GetNode()->GetDoc();
if( rInf.IsTest() )
- return new SwFtnPortion( rFtn.GetViewNumStr( *pDoc ), pFtn );
+ return new SwFootnotePortion( rFootnote.GetViewNumStr( *pDoc ), pFootnote );
SWAP_IF_SWAPPED( pFrm )
@@ -827,43 +827,43 @@ SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
if( bVertical )
nLower = pFrm->SwitchHorizontalToVertical( nLower );
- nLower = lcl_GetFtnLower( pFrm, nLower );
+ nLower = lcl_GetFootnoteLower( pFrm, nLower );
// We just refresh.
// The Connect does not do anything useful in this case, but will
- // mostly throw away the Ftn and create it anew.
+ // mostly throw away the Footnote and create it anew.
if( !rInf.IsQuick() )
- pFrm->ConnectFtn( pFtn, nLower );
+ pFrm->ConnectFootnote( pFootnote, nLower );
- SwTxtFrm *pScrFrm = pFrm->FindFtnRef( pFtn );
- SwFtnBossFrm *pBoss = pFrm->FindFtnBossFrm( !rFtn.IsEndNote() );
- SwFtnFrm *pFtnFrm = NULL;
+ SwTextFrm *pScrFrm = pFrm->FindFootnoteRef( pFootnote );
+ SwFootnoteBossFrm *pBoss = pFrm->FindFootnoteBossFrm( !rFootnote.IsEndNote() );
+ SwFootnoteFrm *pFootnoteFrm = NULL;
if( pScrFrm )
- pFtnFrm = SwFtnBossFrm::FindFtn( pScrFrm, pFtn );
+ pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pScrFrm, pFootnote );
// We see whether our Append has caused some Footnote to
// still be on the Page/Column. If not, our line disappears too,
// which will lead to the following undesired behaviour:
- // Ftn1 still fits onto the Page/Column, but Ftn2 doesn't.
- // The Ftn2 Reference remains on the Page/Column. The Footnote itself
+ // Footnote1 still fits onto the Page/Column, but Footnote2 doesn't.
+ // The Footnote2 Reference remains on the Page/Column. The Footnote itself
// is on the next Page/Column.
//
// Exception: If the Page/Column cannot accomodate another line,
- // the Ftn Reference should be moved to the next one.
- if( !rFtn.IsEndNote() )
+ // the Footnote Reference should be moved to the next one.
+ if( !rFootnote.IsEndNote() )
{
SwSectionFrm *pSct = pBoss->FindSctFrm();
- bool bAtSctEnd = pSct && pSct->IsFtnAtEnd();
- if( FTNPOS_CHAPTER != pDoc->GetFtnInfo().ePos || bAtSctEnd )
+ bool bAtSctEnd = pSct && pSct->IsFootnoteAtEnd();
+ if( FTNPOS_CHAPTER != pDoc->GetFootnoteInfo().ePos || bAtSctEnd )
{
- SwFrm* pFtnCont = pBoss->FindFtnCont();
+ SwFrm* pFootnoteCont = pBoss->FindFootnoteCont();
// If the Parent is within an Area, it can only be a Column of this
// Area. If this one is not the first Column, we can avoid it.
if( !pFrm->IsInTab() && ( GetLineNr() > 1 || pFrm->GetPrev() ||
( !bAtSctEnd && pFrm->GetIndPrev() ) ||
( pSct && pBoss->GetPrev() ) ) )
{
- if( !pFtnCont )
+ if( !pFootnoteCont )
{
rInf.SetStop( true );
UNDO_SWAP( pFrm )
@@ -875,12 +875,12 @@ SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
// Page/Page column
if( pSct && !bAtSctEnd ) // Is the Container in a (column) Area?
{
- SwFtnBossFrm* pTmp = pBoss->FindSctFrm()->FindFtnBossFrm( true );
- SwFtnContFrm* pFtnC = pTmp->FindFtnCont();
- if( pFtnC )
+ SwFootnoteBossFrm* pTmp = pBoss->FindSctFrm()->FindFootnoteBossFrm( true );
+ SwFootnoteContFrm* pFootnoteC = pTmp->FindFootnoteCont();
+ if( pFootnoteC )
{
- SwFtnFrm* pTmpFrm = static_cast<SwFtnFrm*>(pFtnC->Lower());
- if( pTmpFrm && *pTmpFrm < pFtn )
+ SwFootnoteFrm* pTmpFrm = static_cast<SwFootnoteFrm*>(pFootnoteC->Lower());
+ if( pTmpFrm && *pTmpFrm < pFootnote )
{
rInf.SetStop( true );
UNDO_SWAP( pFrm )
@@ -894,18 +894,18 @@ SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
if( bVertical )
nTmpBot = pFrm->SwitchHorizontalToVertical( nTmpBot );
- SWRECTFN( pFtnCont )
+ SWRECTFN( pFootnoteCont )
const long nDiff = (*fnRect->fnYDiff)(
- (pFtnCont->Frm().*fnRect->fnGetTop)(),
+ (pFootnoteCont->Frm().*fnRect->fnGetTop)(),
nTmpBot );
if( pScrFrm && nDiff < 0 )
{
- if( pFtnFrm )
+ if( pFootnoteFrm )
{
- SwFtnBossFrm *pFtnBoss = pFtnFrm->FindFtnBossFrm();
- if( pFtnBoss != pBoss )
+ SwFootnoteBossFrm *pFootnoteBoss = pFootnoteFrm->FindFootnoteBossFrm();
+ if( pFootnoteBoss != pBoss )
{
// We're in the last Line and the Footnote has moved
// to another Page. We also want to be on that Page!
@@ -919,10 +919,10 @@ SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
}
}
}
- // Finally: Create FtnPortion and exit ...
- SwFtnPortion *pRet = new SwFtnPortion( rFtn.GetViewNumStr( *pDoc ),
- pFtn, nReal );
- rInf.SetFtnInside( true );
+ // Finally: Create FootnotePortion and exit ...
+ SwFootnotePortion *pRet = new SwFootnotePortion( rFootnote.GetViewNumStr( *pDoc ),
+ pFootnote, nReal );
+ rInf.SetFootnoteInside( true );
UNDO_SWAP( pFrm )
@@ -930,34 +930,34 @@ SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
}
/**
- * The portion for the Ftn Numbering in the Ftn Area
+ * The portion for the Footnote Numbering in the Footnote Area
*/
-SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
+SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf ) const
{
- OSL_ENSURE( pFrm->IsInFtn() && !pFrm->GetIndPrev() && !rInf.IsFtnDone(),
+ OSL_ENSURE( pFrm->IsInFootnote() && !pFrm->GetIndPrev() && !rInf.IsFootnoteDone(),
"This is the wrong place for a ftnnumber" );
- if( rInf.GetTxtStart() != nStart ||
- rInf.GetTxtStart() != rInf.GetIdx() )
+ if( rInf.GetTextStart() != nStart ||
+ rInf.GetTextStart() != rInf.GetIdx() )
return 0;
- const SwFtnFrm* pFtnFrm = pFrm->FindFtnFrm();
- const SwTxtFtn* pFtn = pFtnFrm->GetAttr();
+ const SwFootnoteFrm* pFootnoteFrm = pFrm->FindFootnoteFrm();
+ const SwTextFootnote* pFootnote = pFootnoteFrm->GetAttr();
// Aha! So we're in the Footnote Area!
- SwFmtFtn& rFtn = (SwFmtFtn&)pFtn->GetFtn();
+ SwFormatFootnote& rFootnote = (SwFormatFootnote&)pFootnote->GetFootnote();
SwDoc *pDoc = pFrm->GetNode()->GetDoc();
- OUString aFtnTxt( rFtn.GetViewNumStr( *pDoc, true ));
+ OUString aFootnoteText( rFootnote.GetViewNumStr( *pDoc, true ));
const SwEndNoteInfo* pInfo;
- if( rFtn.IsEndNote() )
+ if( rFootnote.IsEndNote() )
pInfo = &pDoc->GetEndNoteInfo();
else
- pInfo = &pDoc->GetFtnInfo();
- const SwAttrSet& rSet = pInfo->GetCharFmt(*pDoc)->GetAttrSet();
+ pInfo = &pDoc->GetFootnoteInfo();
+ const SwAttrSet& rSet = pInfo->GetCharFormat(*pDoc)->GetAttrSet();
const SwAttrSet* pParSet = &rInf.GetCharAttr();
- const IDocumentSettingAccess* pIDSA = pFrm->GetTxtNode()->getIDocumentSettingAccess();
+ const IDocumentSettingAccess* pIDSA = pFrm->GetTextNode()->getIDocumentSettingAccess();
SwFont *pNumFnt = new SwFont( pParSet, pIDSA );
// #i37142#
@@ -965,7 +965,7 @@ SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
// Overline style of paragraph font should not be considered
// Weight style of paragraph font should not be considered
// Posture style of paragraph font should not be considered
- // See also #i18463# and SwTxtFormatter::NewNumberPortion()
+ // See also #i18463# and SwTextFormatter::NewNumberPortion()
pNumFnt->SetUnderline( UNDERLINE_NONE );
pNumFnt->SetOverline( UNDERLINE_NONE );
pNumFnt->SetItalic( ITALIC_NONE, SW_LATIN );
@@ -978,30 +978,30 @@ SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
pNumFnt->SetDiffFnt(&rSet, pIDSA );
pNumFnt->SetVertical( pNumFnt->GetOrientation(), pFrm->IsVertical() );
- SwFtnNumPortion* pNewPor = new SwFtnNumPortion( aFtnTxt, pNumFnt );
+ SwFootnoteNumPortion* pNewPor = new SwFootnoteNumPortion( aFootnoteText, pNumFnt );
pNewPor->SetLeft( !pFrm->IsRightToLeft() );
return pNewPor;
}
OUString lcl_GetPageNumber( const SwPageFrm* pPage )
{
- OSL_ENSURE( pPage, "GetPageNumber: Homeless TxtFrm" );
+ OSL_ENSURE( pPage, "GetPageNumber: Homeless TextFrm" );
const sal_uInt16 nVirtNum = pPage->GetVirtPageNum();
const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType();
return rNum.GetNumStr( nVirtNum );
}
-SwErgoSumPortion *SwTxtFormatter::NewErgoSumPortion( SwTxtFormatInfo &rInf ) const
+SwErgoSumPortion *SwTextFormatter::NewErgoSumPortion( SwTextFormatInfo &rInf ) const
{
// We cannot assume we're a Follow
- if( !pFrm->IsInFtn() || pFrm->GetPrev() ||
+ if( !pFrm->IsInFootnote() || pFrm->GetPrev() ||
rInf.IsErgoDone() || rInf.GetIdx() != pFrm->GetOfst() ||
- pFrm->ImplFindFtnFrm()->GetAttr()->GetFtn().IsEndNote() )
+ pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() )
return 0;
// Aha, wir sind also im Fussnotenbereich
- const SwFtnInfo &rFtnInfo = pFrm->GetNode()->GetDoc()->GetFtnInfo();
- SwTxtFrm *pQuoFrm = pFrm->FindQuoVadisFrm();
+ const SwFootnoteInfo &rFootnoteInfo = pFrm->GetNode()->GetDoc()->GetFootnoteInfo();
+ SwTextFrm *pQuoFrm = pFrm->FindQuoVadisFrm();
if( !pQuoFrm )
return 0;
const SwPageFrm* pPage = pFrm->FindPageFrm();
@@ -1012,22 +1012,22 @@ SwErgoSumPortion *SwTxtFormatter::NewErgoSumPortion( SwTxtFormatInfo &rInf ) con
SwParaPortion *pPara = pQuoFrm->GetPara();
if( pPara )
pPara->SetErgoSumNum( aPage );
- if( rFtnInfo.aErgoSum.isEmpty() )
+ if( rFootnoteInfo.aErgoSum.isEmpty() )
return 0;
- SwErgoSumPortion *pErgo = new SwErgoSumPortion( rFtnInfo.aErgoSum,
+ SwErgoSumPortion *pErgo = new SwErgoSumPortion( rFootnoteInfo.aErgoSum,
lcl_GetPageNumber( pQuoPage ) );
return pErgo;
}
-sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
+sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset )
{
OSL_ENSURE( ! pFrm->IsVertical() || ! pFrm->IsSwapped(),
- "SwTxtFormatter::FormatQuoVadis with swapped frame" );
+ "SwTextFormatter::FormatQuoVadis with swapped frame" );
- if( !pFrm->IsInFtn() || pFrm->ImplFindFtnFrm()->GetAttr()->GetFtn().IsEndNote() )
+ if( !pFrm->IsInFootnote() || pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() )
return nOffset;
- const SwFrm* pErgoFrm = pFrm->FindFtnFrm()->GetFollow();
+ const SwFrm* pErgoFrm = pFrm->FindFootnoteFrm()->GetFollow();
if( !pErgoFrm && pFrm->HasFollow() )
pErgoFrm = pFrm->GetFollow();
if( !pErgoFrm )
@@ -1049,9 +1049,9 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
return nOffset; // If the ErgoSum is on the same Page
}
- SwTxtFormatInfo &rInf = GetInfo();
- const SwFtnInfo &rFtnInfo = pFrm->GetNode()->GetDoc()->GetFtnInfo();
- if( rFtnInfo.aQuoVadis.isEmpty() )
+ SwTextFormatInfo &rInf = GetInfo();
+ const SwFootnoteInfo &rFootnoteInfo = pFrm->GetNode()->GetDoc()->GetFootnoteInfo();
+ if( rFootnoteInfo.aQuoVadis.isEmpty() )
return nOffset;
// A remark on QuoVadis/ErgoSum:
@@ -1083,9 +1083,9 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
rInf.RealWidth( nOldRealWidth - nLastLeft );
OUString aErgo = lcl_GetPageNumber( pErgoFrm->FindPageFrm() );
- SwQuoVadisPortion *pQuo = new SwQuoVadisPortion(rFtnInfo.aQuoVadis, aErgo );
+ SwQuoVadisPortion *pQuo = new SwQuoVadisPortion(rFootnoteInfo.aQuoVadis, aErgo );
pQuo->SetAscent( rInf.GetAscent() );
- pQuo->Height( rInf.GetTxtHeight() );
+ pQuo->Height( rInf.GetTextHeight() );
pQuo->Format( rInf );
sal_uInt16 nQuoWidth = pQuo->Width();
SwLinePortion* pCurrPor = pQuo;
@@ -1215,10 +1215,10 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
* This function creates a Line that reaches to the other Page Margin.
* DummyLines or DummyPortions make sure, that osicllations stop, because
* there's no way to flow back.
- * They are used for Footnotes in paragraph-bound Frames and for Ftn
+ * They are used for Footnotes in paragraph-bound Frames and for Footnote
* oscillations
*/
-void SwTxtFormatter::MakeDummyLine()
+void SwTextFormatter::MakeDummyLine()
{
sal_uInt16 nRstHeight = GetFrmRstHeight();
if( pCurr && nRstHeight > pCurr->Height() )
@@ -1232,35 +1232,35 @@ void SwTxtFormatter::MakeDummyLine()
}
}
-class SwFtnSave
+class SwFootnoteSave
{
- SwTxtSizeInfo *pInf;
+ SwTextSizeInfo *pInf;
SwFont *pFnt;
SwFont *pOld;
public:
- SwFtnSave( const SwTxtSizeInfo &rInf,
- const SwTxtFtn *pTxtFtn,
+ SwFootnoteSave( const SwTextSizeInfo &rInf,
+ const SwTextFootnote *pTextFootnote,
const bool bApplyGivenScriptType,
const sal_uInt8 nGivenScriptType );
- ~SwFtnSave();
+ ~SwFootnoteSave();
};
-SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
- const SwTxtFtn* pTxtFtn,
+SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf,
+ const SwTextFootnote* pTextFootnote,
const bool bApplyGivenScriptType,
const sal_uInt8 nGivenScriptType )
- : pInf( &((SwTxtSizeInfo&)rInf) )
+ : pInf( &((SwTextSizeInfo&)rInf) )
, pFnt( 0 )
, pOld( 0 )
{
- if( pTxtFtn && rInf.GetTxtFrm() )
+ if( pTextFootnote && rInf.GetTextFrm() )
{
- pFnt = ((SwTxtSizeInfo&)rInf).GetFont();
+ pFnt = ((SwTextSizeInfo&)rInf).GetFont();
pOld = new SwFont( *pFnt );
pOld->GetTox() = pFnt->GetTox();
pFnt->GetTox() = 0;
- SwFmtFtn& rFtn = (SwFmtFtn&)pTxtFtn->GetFtn();
- const SwDoc *pDoc = rInf.GetTxtFrm()->GetNode()->GetDoc();
+ SwFormatFootnote& rFootnote = (SwFormatFootnote&)pTextFootnote->GetFootnote();
+ const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc();
// #i98418#
if ( bApplyGivenScriptType )
@@ -1270,17 +1270,17 @@ SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
else
{
// examine text and set script
- OUString aTmpStr( rFtn.GetViewNumStr( *pDoc ) );
+ OUString aTmpStr( rFootnote.GetViewNumStr( *pDoc ) );
pFnt->SetActual( SwScriptInfo::WhichFont( 0, &aTmpStr, 0 ) );
}
const SwEndNoteInfo* pInfo;
- if( rFtn.IsEndNote() )
+ if( rFootnote.IsEndNote() )
pInfo = &pDoc->GetEndNoteInfo();
else
- pInfo = &pDoc->GetFtnInfo();
- const SwAttrSet& rSet = pInfo->GetAnchorCharFmt((SwDoc&)*pDoc)->GetAttrSet();
- pFnt->SetDiffFnt( &rSet, rInf.GetTxtFrm()->GetNode()->getIDocumentSettingAccess() );
+ pInfo = &pDoc->GetFootnoteInfo();
+ const SwAttrSet& rSet = pInfo->GetAnchorCharFormat((SwDoc&)*pDoc)->GetAttrSet();
+ pFnt->SetDiffFnt( &rSet, rInf.GetTextFrm()->GetNode()->getIDocumentSettingAccess() );
// we reduce footnote size, if we are inside a double line portion
if ( ! pOld->GetEscapement() && 50 == pOld->GetPropr() )
@@ -1296,7 +1296,7 @@ SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_ROTATE,
true, &pItem ))
pFnt->SetVertical( static_cast<const SvxCharRotateItem*>(pItem)->GetValue(),
- rInf.GetTxtFrm()->IsVertical() );
+ rInf.GetTextFrm()->IsVertical() );
pFnt->ChgPhysFnt( pInf->GetVsh(), *pInf->GetOut() );
@@ -1308,7 +1308,7 @@ SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
pFnt = NULL;
}
-SwFtnSave::~SwFtnSave()
+SwFootnoteSave::~SwFootnoteSave()
{
if( pFnt )
{
@@ -1320,10 +1320,10 @@ SwFtnSave::~SwFtnSave()
}
}
-SwFtnPortion::SwFtnPortion( const OUString &rExpand,
- SwTxtFtn *pFootn, sal_uInt16 nReal )
- : SwFldPortion( rExpand, 0 )
- , pFtn(pFootn)
+SwFootnotePortion::SwFootnotePortion( const OUString &rExpand,
+ SwTextFootnote *pFootn, sal_uInt16 nReal )
+ : SwFieldPortion( rExpand, 0 )
+ , pFootnote(pFootn)
, nOrigHeight( nReal )
// #i98418#
, mbPreferredScriptTypeSet( false )
@@ -1333,79 +1333,79 @@ SwFtnPortion::SwFtnPortion( const OUString &rExpand,
SetWhichPor( POR_FTN );
}
-bool SwFtnPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const
+bool SwFootnotePortion::GetExpText( const SwTextSizeInfo &, OUString &rText ) const
{
- rTxt = aExpand;
+ rText = aExpand;
return true;
}
-bool SwFtnPortion::Format( SwTxtFormatInfo &rInf )
+bool SwFootnotePortion::Format( SwTextFormatInfo &rInf )
{
// #i98418#
-// SwFtnSave aFtnSave( rInf, pFtn );
- SwFtnSave aFtnSave( rInf, pFtn, mbPreferredScriptTypeSet, mnPreferredScriptType );
+// SwFootnoteSave aFootnoteSave( rInf, pFootnote );
+ SwFootnoteSave aFootnoteSave( rInf, pFootnote, mbPreferredScriptTypeSet, mnPreferredScriptType );
// the idx is manipulated in SwExpandPortion::Format
// this flag indicates, that a footnote is allowed to trigger
- // an underflow during SwTxtGuess::Guess
+ // an underflow during SwTextGuess::Guess
rInf.SetFakeLineStart( rInf.GetIdx() > rInf.GetLineStart() );
- const bool bFull = SwFldPortion::Format( rInf );
+ const bool bFull = SwFieldPortion::Format( rInf );
rInf.SetFakeLineStart( false );
SetAscent( rInf.GetAscent() );
- Height( rInf.GetTxtHeight() );
- rInf.SetFtnDone( !bFull );
+ Height( rInf.GetTextHeight() );
+ rInf.SetFootnoteDone( !bFull );
if( !bFull )
- rInf.SetParaFtn();
+ rInf.SetParaFootnote();
return bFull;
}
-void SwFtnPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwFootnotePortion::Paint( const SwTextPaintInfo &rInf ) const
{
// #i98418#
-// SwFtnSave aFtnSave( rInf, pFtn );
- SwFtnSave aFtnSave( rInf, pFtn, mbPreferredScriptTypeSet, mnPreferredScriptType );
+// SwFootnoteSave aFootnoteSave( rInf, pFootnote );
+ SwFootnoteSave aFootnoteSave( rInf, pFootnote, mbPreferredScriptTypeSet, mnPreferredScriptType );
rInf.DrawViewOpt( *this, POR_FTN );
SwExpandPortion::Paint( rInf );
}
-SwPosSize SwFtnPortion::GetTxtSize( const SwTxtSizeInfo &rInfo ) const
+SwPosSize SwFootnotePortion::GetTextSize( const SwTextSizeInfo &rInfo ) const
{
// #i98418#
-// SwFtnSave aFtnSave( rInfo, pFtn );
- SwFtnSave aFtnSave( rInfo, pFtn, mbPreferredScriptTypeSet, mnPreferredScriptType );
- return SwExpandPortion::GetTxtSize( rInfo );
+// SwFootnoteSave aFootnoteSave( rInfo, pFootnote );
+ SwFootnoteSave aFootnoteSave( rInfo, pFootnote, mbPreferredScriptTypeSet, mnPreferredScriptType );
+ return SwExpandPortion::GetTextSize( rInfo );
}
// #i98418#
-void SwFtnPortion::SetPreferredScriptType( sal_uInt8 nPreferredScriptType )
+void SwFootnotePortion::SetPreferredScriptType( sal_uInt8 nPreferredScriptType )
{
mbPreferredScriptTypeSet = true;
mnPreferredScriptType = nPreferredScriptType;
}
-SwFldPortion *SwQuoVadisPortion::Clone( const OUString &rExpand ) const
+SwFieldPortion *SwQuoVadisPortion::Clone( const OUString &rExpand ) const
{
return new SwQuoVadisPortion( rExpand, aErgo );
}
SwQuoVadisPortion::SwQuoVadisPortion( const OUString &rExp, const OUString& rStr )
- : SwFldPortion( rExp ), aErgo(rStr)
+ : SwFieldPortion( rExp ), aErgo(rStr)
{
SetLen(0);
SetWhichPor( POR_QUOVADIS );
}
-bool SwQuoVadisPortion::Format( SwTxtFormatInfo &rInf )
+bool SwQuoVadisPortion::Format( SwTextFormatInfo &rInf )
{
// First try; maybe the Text fits
CheckScript( rInf );
- bool bFull = SwFldPortion::Format( rInf );
+ bool bFull = SwFieldPortion::Format( rInf );
SetLen( 0 );
if( bFull )
{
// Second try; we make the String shorter
aExpand = "...";
- bFull = SwFldPortion::Format( rInf );
+ bFull = SwFieldPortion::Format( rInf );
SetLen( 0 );
if( bFull )
// Third try; we're done: we crush
@@ -1421,13 +1421,13 @@ bool SwQuoVadisPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-bool SwQuoVadisPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const
+bool SwQuoVadisPortion::GetExpText( const SwTextSizeInfo &, OUString &rText ) const
{
- rTxt = aExpand;
+ rText = aExpand;
// if this QuoVadisPortion has a follow, the follow is responsible for
// the ergo text.
if ( ! HasFollow() )
- rTxt += aErgo;
+ rText += aErgo;
return true;
}
@@ -1436,26 +1436,26 @@ void SwQuoVadisPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Special( GetLen(), aExpand + aErgo, GetWhichPor() );
}
-void SwQuoVadisPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwQuoVadisPortion::Paint( const SwTextPaintInfo &rInf ) const
{
// We _always_ want to ouput per DrawStretchText, because nErgo
// can quickly switch
if( PrtWidth() )
{
rInf.DrawViewOpt( *this, POR_QUOVADIS );
- SwTxtSlot aDiffTxt( &rInf, this, true, false );
+ SwTextSlot aDiffText( &rInf, this, true, false );
SwFontSave aSave( rInf, pFnt );
rInf.DrawText( *this, rInf.GetLen(), true );
}
}
-SwFldPortion *SwErgoSumPortion::Clone( const OUString &rExpand ) const
+SwFieldPortion *SwErgoSumPortion::Clone( const OUString &rExpand ) const
{
return new SwErgoSumPortion( rExpand, OUString() );
}
SwErgoSumPortion::SwErgoSumPortion(const OUString &rExp, const OUString& rStr)
- : SwFldPortion( rExp )
+ : SwFieldPortion( rExp )
{
SetLen(0);
aExpand += rStr;
@@ -1470,9 +1470,9 @@ sal_Int32 SwErgoSumPortion::GetCrsrOfst( const sal_uInt16 ) const
return 0;
}
-bool SwErgoSumPortion::Format( SwTxtFormatInfo &rInf )
+bool SwErgoSumPortion::Format( SwTextFormatInfo &rInf )
{
- const bool bFull = SwFldPortion::Format( rInf );
+ const bool bFull = SwFieldPortion::Format( rInf );
SetLen( 0 );
rInf.SetErgoDone( true );
@@ -1508,7 +1508,7 @@ void SwParaPortion::SetErgoSumNum( const OUString& rErgo )
}
/**
- * Is called in SwTxtFrm::Prepare()
+ * Is called in SwTextFrm::Prepare()
*/
bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo )
{
@@ -1529,7 +1529,7 @@ bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo )
if( !pQuo )
return false;
- return pQuo->GetQuoTxt() == rQuo;
+ return pQuo->GetQuoText() == rQuo;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 54316b949d3e..9ced752ad8aa 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -35,18 +35,18 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::i18n;
-Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
- const OUString &rTxt, const sal_Int32 nMinTrail )
+Reference< XHyphenatedWord > SwTextFormatInfo::HyphWord(
+ const OUString &rText, const sal_Int32 nMinTrail )
{
- if( rTxt.getLength() < 4 || m_pFnt->IsSymbol(m_pVsh) )
+ if( rText.getLength() < 4 || m_pFnt->IsSymbol(m_pVsh) )
return 0;
Reference< XHyphenator > xHyph = ::GetHyphenator();
Reference< XHyphenatedWord > xHyphWord;
if( xHyph.is() )
- xHyphWord = xHyph->hyphenate( OUString(rTxt),
+ xHyphWord = xHyph->hyphenate( OUString(rText),
g_pBreakIt->GetLocale( m_pFnt->GetLanguage() ),
- rTxt.getLength() - nMinTrail, GetHyphValues() );
+ rText.getLength() - nMinTrail, GetHyphValues() );
return xHyphWord;
}
@@ -54,15 +54,15 @@ Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
/**
* We format a row for interactive hyphenation
*/
-bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
+bool SwTextFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
{
- OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTxtFrm::Hyphenate" );
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTextFrm::Hyphenate" );
if( !g_pBreakIt->GetBreakIter().is() )
return false;
// We lock it, to start with
- OSL_ENSURE( !IsLocked(), "SwTxtFrm::Hyphenate: this is locked" );
+ OSL_ENSURE( !IsLocked(), "SwTextFrm::Hyphenate: this is locked" );
// The frame::Frame must have a valid SSize!
Calc();
@@ -72,14 +72,14 @@ bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
if( !IsEmpty() )
{
// We always need to enable hyphenation
- // Don't be afraid: the SwTxtIter saves the old row in the hyphenate
- TxtFrmLockGuard aLock( this );
+ // Don't be afraid: the SwTextIter saves the old row in the hyphenate
+ TextFrmLockGuard aLock( this );
if ( IsVertical() )
SwapWidthAndHeight();
- SwTxtFormatInfo aInf( this, true ); // true for interactive hyph!
- SwTxtFormatter aLine( this, &aInf );
+ SwTextFormatInfo aInf( this, true ); // true for interactive hyph!
+ SwTextFormatter aLine( this, &aInf );
aLine.CharToLine( rHyphInf.nStart );
// If we're within the first word of a row, it could've been hyphenated
@@ -116,27 +116,27 @@ bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
* the UI expects it to be.
* TODO: We can of course optimize this a lot.
*/
-void SetParaPortion( SwTxtInfo *pInf, SwParaPortion *pRoot )
+void SetParaPortion( SwTextInfo *pInf, SwParaPortion *pRoot )
{
OSL_ENSURE( pRoot, "SetParaPortion: no root anymore" );
pInf->m_pPara = pRoot;
}
-bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
+bool SwTextFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
{
- SwTxtFormatInfo &rInf = GetInfo();
+ SwTextFormatInfo &rInf = GetInfo();
// We never need to hyphenate anything in the last row
// Except for, if it contains a FlyPortion or if it's the
// last row of the Master
- if( !GetNext() && !rInf.GetTxtFly().IsOn() && !pFrm->GetFollow() )
+ if( !GetNext() && !rInf.GetTextFly().IsOn() && !pFrm->GetFollow() )
return false;
sal_Int32 nWrdStart = nStart;
// We need to retain the old row
// E.g.: The attribute for hyphenation was not set, but
- // it's always set in SwTxtFrm::Hyphenate, because we want
+ // it's always set in SwTextFrm::Hyphenate, because we want
// to set breakpoints.
SwLineLayout *pOldCurr = pCurr;
@@ -150,7 +150,7 @@ bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
SwParaPortion *pPara = new SwParaPortion();
SetParaPortion( &rInf, pPara );
pCurr = pPara;
- OSL_ENSURE( IsParaLine(), "SwTxtFormatter::Hyphenate: not the first" );
+ OSL_ENSURE( IsParaLine(), "SwTextFormatter::Hyphenate: not the first" );
}
else
pCurr = new SwLineLayout();
@@ -203,7 +203,7 @@ bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
if( pOldCurr->IsParaPortion() )
{
SetParaPortion( &rInf, static_cast<SwParaPortion*>(pOldCurr) );
- OSL_ENSURE( IsParaLine(), "SwTxtFormatter::Hyphenate: even not the first" );
+ OSL_ENSURE( IsParaLine(), "SwTextFormatter::Hyphenate: even not the first" );
}
if( nWrdStart==0 )
@@ -221,18 +221,18 @@ bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
Reference< XHyphenatedWord > xHyphWord;
Boundary aBound =
- g_pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nWrdStart,
+ g_pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetText(), nWrdStart,
g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ), WordType::DICTIONARY_WORD, true );
nWrdStart = aBound.startPos;
nLen = aBound.endPos - nWrdStart;
if ( nLen == 0 )
return false;
- OUString aSelTxt( rInf.GetTxt().copy(nWrdStart, nLen) );
+ OUString aSelText( rInf.GetText().copy(nWrdStart, nLen) );
const sal_Int32 nMinTrail = ( nWrdStart + nLen > nEnd ) ? nWrdStart + nLen - nEnd - 1 : 0;
//!! rHyphInf.SetHyphWord( ... ) mu??? hier geschehen
- xHyphWord = rInf.HyphWord( aSelTxt, nMinTrail );
+ xHyphWord = rInf.HyphWord( aSelText, nMinTrail );
if ( xHyphWord.is() )
{
rHyphInf.SetHyphWord( xHyphWord );
@@ -249,23 +249,23 @@ bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
return false;
}
-bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
+bool SwTextPortion::CreateHyphen( SwTextFormatInfo &rInf, SwTextGuess &rGuess )
{
Reference< XHyphenatedWord > xHyphWord = rGuess.HyphWord();
- OSL_ENSURE( !pPortion, "SwTxtPortion::CreateHyphen(): another portion, another planet..." );
- OSL_ENSURE( xHyphWord.is(), "SwTxtPortion::CreateHyphen(): You are lucky! The code is robust here." );
+ OSL_ENSURE( !pPortion, "SwTextPortion::CreateHyphen(): another portion, another planet..." );
+ OSL_ENSURE( xHyphWord.is(), "SwTextPortion::CreateHyphen(): You are lucky! The code is robust here." );
if( rInf.IsHyphForbud() ||
pPortion || // robust
!xHyphWord.is() || // more robust
// Mehrzeilige Felder duerfen nicht interaktiv getrennt werden.
- ( rInf.IsInterHyph() && InFldGrp() ) )
+ ( rInf.IsInterHyph() && InFieldGrp() ) )
return false;
SwHyphPortion *pHyphPor;
sal_Int32 nPorEnd;
- SwTxtSizeInfo aInf( rInf );
+ SwTextSizeInfo aInf( rInf );
// first case: hyphenated word has alternative spelling
if ( xHyphWord->isAlternativeSpelling() )
@@ -274,23 +274,23 @@ bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
aAltSpell = SvxGetAltSpelling( xHyphWord );
OSL_ENSURE( aAltSpell.bIsAltSpelling, "no alternatve spelling" );
- OUString aAltTxt = aAltSpell.aReplacement;
+ OUString aAltText = aAltSpell.aReplacement;
nPorEnd = aAltSpell.nChangedPos + rGuess.BreakStart() - rGuess.FieldDiff();
sal_Int32 nTmpLen = 0;
// soft hyphen at alternative spelling position?
- if( rInf.GetTxt()[ rInf.GetSoftHyphPos() ] == CHAR_SOFTHYPHEN )
+ if( rInf.GetText()[ rInf.GetSoftHyphPos() ] == CHAR_SOFTHYPHEN )
{
- pHyphPor = new SwSoftHyphStrPortion( aAltTxt );
+ pHyphPor = new SwSoftHyphStrPortion( aAltText );
nTmpLen = 1;
}
else {
- pHyphPor = new SwHyphStrPortion( aAltTxt );
+ pHyphPor = new SwHyphStrPortion( aAltText );
}
// length of pHyphPor is adjusted
- pHyphPor->SetLen( aAltTxt.getLength() + 1 );
- (SwPosSize&)(*pHyphPor) = pHyphPor->GetTxtSize( rInf );
+ pHyphPor->SetLen( aAltText.getLength() + 1 );
+ (SwPosSize&)(*pHyphPor) = pHyphPor->GetTextSize( rInf );
pHyphPor->SetLen( aAltSpell.nChangedLength + nTmpLen );
}
else
@@ -306,7 +306,7 @@ bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
rInf.GetFont()->GetMagic( pTmpMagic, nFntIdx, rInf.GetFont()->GetActual() );
if( !pLastMagicNo || pLastMagicNo != pTmpMagic ) {
pLastMagicNo = pTmpMagic;
- (SwPosSize&)(*pHyphPor) = pHyphPor->GetTxtSize( rInf );
+ (SwPosSize&)(*pHyphPor) = pHyphPor->GetTextSize( rInf );
aMiniCacheH = pHyphPor->Height();
aMiniCacheW = pHyphPor->Width();
} else {
@@ -328,7 +328,7 @@ bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
aInf.SetLen( nPorEnd - rInf.GetIdx() );
pHyphPor->SetAscent( GetAscent() );
SetLen( aInf.GetLen() );
- CalcTxtSize( aInf );
+ CalcTextSize( aInf );
Insert( pHyphPor );
@@ -345,9 +345,9 @@ bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
return false;
}
-bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &/*rInf*/, OUString &rTxt ) const
+bool SwHyphPortion::GetExpText( const SwTextSizeInfo &/*rInf*/, OUString &rText ) const
{
- rTxt = "-";
+ rText = "-";
return true;
}
@@ -356,17 +356,17 @@ void SwHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Special( GetLen(), OUString('-'), GetWhichPor() );
}
-bool SwHyphPortion::Format( SwTxtFormatInfo &rInf )
+bool SwHyphPortion::Format( SwTextFormatInfo &rInf )
{
const SwLinePortion *pLast = rInf.GetLast();
Height( pLast->Height() );
SetAscent( pLast->GetAscent() );
- OUString aTxt;
+ OUString aText;
- if( !GetExpTxt( rInf, aTxt ) )
+ if( !GetExpText( rInf, aText ) )
return false;
- PrtWidth( rInf.GetTxtSize( aTxt ).Width() );
+ PrtWidth( rInf.GetTextSize( aText ).Width() );
const bool bFull = rInf.Width() <= rInf.X() + PrtWidth();
if( bFull && !rInf.IsUnderflow() ) {
Truncate();
@@ -376,9 +376,9 @@ bool SwHyphPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-bool SwHyphStrPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const
+bool SwHyphStrPortion::GetExpText( const SwTextSizeInfo &, OUString &rText ) const
{
- rTxt = aExpand;
+ rText = aExpand;
return true;
}
@@ -396,7 +396,7 @@ SwSoftHyphPortion::SwSoftHyphPortion() :
SetWhichPor( POR_SOFTHYPH );
}
-sal_uInt16 SwSoftHyphPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwSoftHyphPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
{
// Although we're in the const, nViewWidth should be calculated at
// the last possible moment
@@ -404,7 +404,7 @@ sal_uInt16 SwSoftHyphPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
if( !nViewWidth )
const_cast<SwSoftHyphPortion*>(this)->nViewWidth
- = rInf.GetTxtSize(OUString('-')).Width();
+ = rInf.GetTextSize(OUString('-')).Width();
}
else
const_cast<SwSoftHyphPortion*>(this)->nViewWidth = 0;
@@ -421,7 +421,7 @@ sal_uInt16 SwSoftHyphPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
* 3) SoftHyph is at the end of the line, ViewOpt or or off
* -> always visible, neighbors unchanged
*/
-void SwSoftHyphPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwSoftHyphPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if( Width() )
{
@@ -447,7 +447,7 @@ void SwSoftHyphPortion::Paint( const SwTxtPaintInfo &rInf ) const
* 3) Underflow() and bFull = true
* 4) {Zuc} calls hyphenate => {Zuk}{-}{ker}
*/
-bool SwSoftHyphPortion::Format( SwTxtFormatInfo &rInf )
+bool SwSoftHyphPortion::Format( SwTextFormatInfo &rInf )
{
bool bFull = true;
@@ -465,7 +465,7 @@ bool SwSoftHyphPortion::Format( SwTxtFormatInfo &rInf )
// if the soft hyphend word has an alternative spelling
// when hyphenated (old german spelling), the soft hyphen
// portion has to trigger an underflow
- SwTxtGuess aGuess;
+ SwTextGuess aGuess;
bFull = rInf.IsInterHyph() ||
!aGuess.AlternativeSpelling( rInf, rInf.GetIdx() - 1 );
}
@@ -505,7 +505,7 @@ bool SwSoftHyphPortion::Format( SwTxtFormatInfo &rInf )
/**
* Format End of Line
*/
-void SwSoftHyphPortion::FormatEOL( SwTxtFormatInfo &rInf )
+void SwSoftHyphPortion::FormatEOL( SwTextFormatInfo &rInf )
{
if( !IsExpand() )
{
@@ -537,14 +537,14 @@ void SwSoftHyphPortion::FormatEOL( SwTxtFormatInfo &rInf )
* - if we're at the end of the line
* - if we're before a (real/emulated) line break
*/
-bool SwSoftHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
+bool SwSoftHyphPortion::GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const
{
if( IsExpand() || ( rInf.OnWin() && rInf.GetOpt().IsSoftHyph() ) ||
( GetPortion() && ( GetPortion()->InFixGrp() ||
GetPortion()->IsDropPortion() || GetPortion()->IsLayPortion() ||
GetPortion()->IsParaPortion() || GetPortion()->IsBreakPortion() ) ) )
{
- return SwHyphPortion::GetExpTxt( rInf, rTxt );
+ return SwHyphPortion::GetExpText( rInf, rText );
}
return false;
}
@@ -557,7 +557,7 @@ void SwSoftHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Special( GetLen(), OUString('-'), nWhich );
}
-void SwSoftHyphStrPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwSoftHyphStrPortion::Paint( const SwTextPaintInfo &rInf ) const
{
// Bug or feature?:
// {Zu}{k-}{ker}, {k-} will be gray instead of {-}
diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx
index 4e42e23b5950..15f1309b860e 100644
--- a/sw/source/core/text/txtinit.cxx
+++ b/sw/source/core/text/txtinit.cxx
@@ -38,16 +38,16 @@
#include "txtfly.hxx"
#include "dbg_lay.hxx"
-SwCache *SwTxtFrm::pTxtCache = 0;
-long SwTxtFrm::nMinPrtLine = 0;
+SwCache *SwTextFrm::pTextCache = 0;
+long SwTextFrm::nMinPrtLine = 0;
SwContourCache *pContourCache = 0;
SwDropCapCache *pDropCapCache = 0;
-IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtLine )
+IMPL_FIXEDMEMPOOL_NEWDEL( SwTextLine )
IMPL_FIXEDMEMPOOL_NEWDEL( SwParaPortion ) // Paragraphs
IMPL_FIXEDMEMPOOL_NEWDEL( SwLineLayout ) // Lines
IMPL_FIXEDMEMPOOL_NEWDEL( SwHolePortion ) // e.g. Blanks at the line end
-IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtPortion ) // Attribute change
+IMPL_FIXEDMEMPOOL_NEWDEL( SwTextPortion ) // Attribute change
// Are ONLY used in init.cxx.
// There we have extern void _TextFinit()
@@ -56,13 +56,13 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtPortion ) // Attribute change
void _TextInit()
{
pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... }
- pSwFontCache = new SwFontCache; // Cache for SwTxtFmtColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray }
- SwCache *pTxtCache = new SwCache( 250 // Cache for SwTxtFrm -> SwTxtLine = { SwParaPortion* pLine }
+ pSwFontCache = new SwFontCache; // Cache for SwTextFormatColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray }
+ SwCache *pTextCache = new SwCache( 250 // Cache for SwTextFrm -> SwTextLine = { SwParaPortion* pLine }
#ifdef DBG_UTIL
- , "static SwTxtFrm::pTxtCache"
+ , "static SwTextFrm::pTextCache"
#endif
);
- SwTxtFrm::SetTxtCache( pTxtCache );
+ SwTextFrm::SetTextCache( pTextCache );
pWaveCol = new Color( COL_GRAY );
PROTOCOL_INIT
}
@@ -70,7 +70,7 @@ void _TextInit()
void _TextFinit()
{
PROTOCOL_STOP
- delete SwTxtFrm::GetTxtCache();
+ delete SwTextFrm::GetTextCache();
delete pSwFontCache;
delete pFntCache;
delete pBlink;
diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx
index e1f503e44925..1e29121a8cb9 100644
--- a/sw/source/core/text/txtio.cxx
+++ b/sw/source/core/text/txtio.cxx
@@ -57,11 +57,11 @@ static void Error()
return rOs; \
}
-IMPL_OUTOP( SwTxtPortion )
+IMPL_OUTOP( SwTextPortion )
IMPL_OUTOP( SwLinePortion )
IMPL_OUTOP( SwBreakPortion )
IMPL_OUTOP( SwGluePortion )
-IMPL_OUTOP( SwFldPortion )
+IMPL_OUTOP( SwFieldPortion )
IMPL_OUTOP( SwHiddenPortion )
IMPL_OUTOP( SwHyphPortion )
IMPL_OUTOP( SwFixPortion )
@@ -73,8 +73,8 @@ IMPL_OUTOP( SwBulletPortion )
IMPL_OUTOP( SwGrfNumPortion )
IMPL_OUTOP( SwLineLayout )
IMPL_OUTOP( SwParaPortion )
-IMPL_OUTOP( SwFtnPortion )
-IMPL_OUTOP( SwFtnNumPortion )
+IMPL_OUTOP( SwFootnotePortion )
+IMPL_OUTOP( SwFootnoteNumPortion )
IMPL_OUTOP( SwTmpEndPortion )
IMPL_OUTOP( SwHyphStrPortion )
IMPL_OUTOP( SwExpandPortion )
@@ -180,10 +180,10 @@ SvStream &SwLinePortion::operator<<( SvStream &rOs ) const //$ ostream
return rOs;
}
-SvStream &SwTxtPortion::operator<<( SvStream &rOs ) const //$ ostream
+SvStream &SwTextPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {TXT:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {TXT:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -191,8 +191,8 @@ SvStream &SwTxtPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwTmpEndPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {END:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {END:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
if( PrtWidth() )
rOs.WriteCharPtr("(view)");
@@ -202,8 +202,8 @@ SvStream &SwTmpEndPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwBreakPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {BREAK:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {BREAK:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -211,8 +211,8 @@ SvStream &SwBreakPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwKernPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {KERN:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {KERN:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -220,8 +220,8 @@ SvStream &SwKernPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwArrowPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {ARROW:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {ARROW:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -229,8 +229,8 @@ SvStream &SwArrowPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwMultiPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {MULTI:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {MULTI:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -238,8 +238,8 @@ SvStream &SwMultiPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwCombinedPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {COMBINED:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {COMBINED:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -247,8 +247,8 @@ SvStream &SwCombinedPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwLineLayout::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {LINE:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {LINE:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
SwLinePortion *pPos = GetPortion();
while( pPos )
@@ -263,8 +263,8 @@ SvStream &SwLineLayout::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwGluePortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {GLUE:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {GLUE:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(" F:").WriteUInt16(GetFixWidth());
rOs.WriteCharPtr(" G:").WriteInt16(GetPrtGlue());
@@ -274,8 +274,8 @@ SvStream &SwGluePortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwFixPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {FIX:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {FIX:" );
+ rOs.WriteCharPtr(pText);
SwGluePortion::operator<<( rOs );
rOs.WriteCharPtr(" Fix:").WriteUInt16(nFix);
rOs.WriteCharPtr(pClose);
@@ -284,8 +284,8 @@ SvStream &SwFixPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwFlyPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {FLY:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {FLY:" );
+ rOs.WriteCharPtr(pText);
SwFixPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -293,8 +293,8 @@ SvStream &SwFlyPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwMarginPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {MAR:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {MAR:" );
+ rOs.WriteCharPtr(pText);
SwGluePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -302,19 +302,19 @@ SvStream &SwMarginPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwFlyCntPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {FLYCNT:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {FLYCNT:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
if( bDraw )
{
- CONSTCHAR( pTxt2, " {DRAWINCNT" );
- rOs.WriteCharPtr(pTxt2);
+ CONSTCHAR( pText2, " {DRAWINCNT" );
+ rOs.WriteCharPtr(pText2);
rOs.WriteCharPtr(pClose);
}
else
{
- CONSTCHAR( pTxt2, " {FRM:" );
- rOs.WriteCharPtr(pTxt2);
+ CONSTCHAR( pText2, " {FRM:" );
+ rOs.WriteCharPtr(pText2);
rOs.WriteCharPtr(" {FRM:");
WriteSwRect(rOs, GetFlyFrm()->Frm()).WriteCharPtr(pClose);
rOs.WriteCharPtr(" {PRT:");
@@ -327,26 +327,26 @@ SvStream &SwFlyCntPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwExpandPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {EXP:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {EXP:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
}
-SvStream &SwFtnPortion::operator<<( SvStream &rOs ) const //$ ostream
+SvStream &SwFootnotePortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {FTN:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {FTN:" );
+ rOs.WriteCharPtr(pText);
SwExpandPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
}
-SvStream &SwFtnNumPortion::operator<<( SvStream &rOs ) const //$ ostream
+SvStream &SwFootnoteNumPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {FTNNUM:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {FTNNUM:" );
+ rOs.WriteCharPtr(pText);
SwNumberPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -354,8 +354,8 @@ SvStream &SwFtnNumPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwNumberPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {NUMBER:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {NUMBER:" );
+ rOs.WriteCharPtr(pText);
SwExpandPortion::operator<<( rOs );
rOs.WriteCharPtr(" Exp:\"").WriteChar('\"');
rOs.WriteCharPtr(pClose);
@@ -364,8 +364,8 @@ SvStream &SwNumberPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwBulletPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {BULLET:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {BULLET:" );
+ rOs.WriteCharPtr(pText);
SwNumberPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -373,8 +373,8 @@ SvStream &SwBulletPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwGrfNumPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {GRFNUM:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {GRFNUM:" );
+ rOs.WriteCharPtr(pText);
SwNumberPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -382,35 +382,35 @@ SvStream &SwGrfNumPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwHiddenPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {Hidden:" );
- rOs.WriteCharPtr(pTxt);
- SwFldPortion::operator<<( rOs );
+ CONSTCHAR( pText, " {Hidden:" );
+ rOs.WriteCharPtr(pText);
+ SwFieldPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwToxPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {TOX:" );
- rOs.WriteCharPtr(pTxt);
- SwTxtPortion::operator<<( rOs );
+ CONSTCHAR( pText, " {TOX:" );
+ rOs.WriteCharPtr(pText);
+ SwTextPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwRefPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {Ref:" );
- rOs.WriteCharPtr(pTxt);
- SwTxtPortion::operator<<( rOs );
+ CONSTCHAR( pText, " {Ref:" );
+ rOs.WriteCharPtr(pText);
+ SwTextPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwIsoToxPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {ISOTOX:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {ISOTOX:" );
+ rOs.WriteCharPtr(pText);
SwToxPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -418,8 +418,8 @@ SvStream &SwIsoToxPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwIsoRefPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {ISOREF:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {ISOREF:" );
+ rOs.WriteCharPtr(pText);
SwRefPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -427,8 +427,8 @@ SvStream &SwIsoRefPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwHyphPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {HYPH:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {HYPH:" );
+ rOs.WriteCharPtr(pText);
SwExpandPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -436,8 +436,8 @@ SvStream &SwHyphPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwHyphStrPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {HYPHSTR:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {HYPHSTR:" );
+ rOs.WriteCharPtr(pText);
SwExpandPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -445,8 +445,8 @@ SvStream &SwHyphStrPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwSoftHyphPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {SOFTHYPH:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {SOFTHYPH:" );
+ rOs.WriteCharPtr(pText);
SwHyphPortion::operator<<( rOs );
rOs.WriteCharPtr(IsExpand() ? " on" : " off");
rOs.WriteCharPtr(pClose);
@@ -455,8 +455,8 @@ SvStream &SwSoftHyphPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwSoftHyphStrPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {SOFTHYPHSTR:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {SOFTHYPHSTR:" );
+ rOs.WriteCharPtr(pText);
SwHyphStrPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -464,17 +464,17 @@ SvStream &SwSoftHyphStrPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwBlankPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {BLANK:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {BLANK:" );
+ rOs.WriteCharPtr(pText);
SwExpandPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
}
-SvStream &SwFldPortion::operator<<( SvStream &rOs ) const //$ ostream
+SvStream &SwFieldPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {FLD:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {FLD:" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
if( IsFollow() )
rOs.WriteCharPtr(" F!");
@@ -484,8 +484,8 @@ SvStream &SwFldPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwPostItsPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {POSTITS" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {POSTITS" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -493,8 +493,8 @@ SvStream &SwPostItsPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwTabPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {TAB" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {TAB" );
+ rOs.WriteCharPtr(pText);
SwFixPortion::operator<<( rOs );
rOs.WriteCharPtr(" T:").WriteUInt16(nTabPos);
if( IsFilled() )
@@ -505,8 +505,8 @@ SvStream &SwTabPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwTabLeftPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {TABLEFT" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {TABLEFT" );
+ rOs.WriteCharPtr(pText);
SwTabPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -514,8 +514,8 @@ SvStream &SwTabLeftPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwTabRightPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {TABRIGHT" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {TABRIGHT" );
+ rOs.WriteCharPtr(pText);
SwTabPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -523,8 +523,8 @@ SvStream &SwTabRightPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwTabCenterPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {TABCENTER" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {TABCENTER" );
+ rOs.WriteCharPtr(pText);
SwTabPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -532,8 +532,8 @@ SvStream &SwTabCenterPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwTabDecimalPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {TABDECIMAL" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {TABDECIMAL" );
+ rOs.WriteCharPtr(pText);
SwTabPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -541,8 +541,8 @@ SvStream &SwTabDecimalPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwParaPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {PAR" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {PAR" );
+ rOs.WriteCharPtr(pText);
SwLineLayout::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -550,8 +550,8 @@ SvStream &SwParaPortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwHolePortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {HOLE" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {HOLE" );
+ rOs.WriteCharPtr(pText);
SwLinePortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
@@ -559,26 +559,26 @@ SvStream &SwHolePortion::operator<<( SvStream &rOs ) const //$ ostream
SvStream &SwQuoVadisPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {QUOVADIS" );
- rOs.WriteCharPtr(pTxt);
- SwFldPortion::operator<<( rOs );
+ CONSTCHAR( pText, " {QUOVADIS" );
+ rOs.WriteCharPtr(pText);
+ SwFieldPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwErgoSumPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {ERGOSUM" );
- rOs.WriteCharPtr(pTxt);
- SwFldPortion::operator<<( rOs );
+ CONSTCHAR( pText, " {ERGOSUM" );
+ rOs.WriteCharPtr(pText);
+ SwFieldPortion::operator<<( rOs );
rOs.WriteCharPtr(pClose);
return rOs;
}
-SvStream &operator<<( SvStream &rOs, const SwTxtSizeInfo &rInf ) //$ ostream
+SvStream &operator<<( SvStream &rOs, const SwTextSizeInfo &rInf ) //$ ostream
{
- CONSTCHAR( pTxt, " {SIZEINFO:" );
- rOs.WriteCharPtr(pTxt);
+ CONSTCHAR( pText, " {SIZEINFO:" );
+ rOs.WriteCharPtr(pText);
rOs.WriteChar(' ').WriteCharPtr(rInf.OnWin() ? "WIN:" : "PRT:");
rOs.WriteCharPtr(" Idx:").WriteInt32(rInf.GetIdx());
rOs.WriteCharPtr(" Len:").WriteInt32(rInf.GetLen());
@@ -588,9 +588,9 @@ SvStream &operator<<( SvStream &rOs, const SwTxtSizeInfo &rInf ) //$ ostream
SvStream &SwDropPortion::operator<<( SvStream &rOs ) const //$ ostream
{
- CONSTCHAR( pTxt, " {DROP:" );
- rOs.WriteCharPtr(pTxt);
- SwTxtPortion::operator<<( rOs );
+ CONSTCHAR( pText, " {DROP:" );
+ rOs.WriteCharPtr(pText);
+ SwTextPortion::operator<<( rOs );
if( pPart && nDropHeight )
{
rOs.WriteCharPtr(" H:").WriteUInt16(nDropHeight);
diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx
index c7328401e79b..e055a8fd40d6 100644
--- a/sw/source/core/text/txtpaint.cxx
+++ b/sw/source/core/text/txtpaint.cxx
@@ -39,7 +39,7 @@ void SwSaveClip::Reset()
}
}
-void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm,
+void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTextFrm* pFrm,
bool bEnlargeRect )
{
SwRect aOldRect( rRect );
diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx
index 607d6c5cf3a1..ce4357fdeb03 100644
--- a/sw/source/core/text/txtpaint.hxx
+++ b/sw/source/core/text/txtpaint.hxx
@@ -30,12 +30,12 @@ class SwSaveClip
bool bChg;
protected:
VclPtr<OutputDevice> pOut;
- void _ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm,
+ void _ChgClip( const SwRect &rRect, const SwTextFrm* pFrm,
bool bEnlargeRect );
public:
inline SwSaveClip( OutputDevice* pOut );
inline ~SwSaveClip();
- inline void ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm = 0,
+ inline void ChgClip( const SwRect &rRect, const SwTextFrm* pFrm = 0,
bool bEnlargeRect = false)
{ if( pOut ) _ChgClip( rRect, pFrm, bEnlargeRect ); }
void Reset();
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 2bc75dee0a83..522e1c2e47a6 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -61,7 +61,7 @@ sal_uInt16 SwLineInfo::NumberOfTabStops() const
return pRuler->Count();
}
-SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) const
+SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto ) const
{
sal_Unicode cFill = 0;
sal_Unicode cDec = 0;
@@ -76,7 +76,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
// #i91133#
const bool bTabsRelativeToIndent =
- pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT);
+ pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT);
const SwTwips nTabLeft = bRTL
? pFrm->Frm().Right() -
( bTabsRelativeToIndent ? GetTabLeft() : 0 )
@@ -169,7 +169,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
: ( ( nCount + 1 ) * nDefTabDist );
// --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips:
- const SwTwips nMinimumTabWidth = pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ? 0 : 50;
+ const SwTwips nMinimumTabWidth = pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ? 0 : 50;
if( ( bRTL && nTabLeft - nNextPos >= nCurrentAbsPos - nMinimumTabWidth ) ||
( !bRTL && nNextPos + nTabLeft <= nCurrentAbsPos + nMinimumTabWidth ) )
{
@@ -230,7 +230,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
!pTabStop ||
nNextPos != aLineInf.GetListTabStopPosition() ) ||
// compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
- pFrm->GetTxtNode()->getIDocumentSettingAccess()->
+ pFrm->GetTextNode()->getIDocumentSettingAccess()->
get(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST);
if ( bTabAtLeftMarginAllowed )
{
@@ -280,7 +280,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
default:
{
OSL_ENSURE( SVX_TAB_ADJUST_LEFT == eAdj || SVX_TAB_ADJUST_DEFAULT == eAdj,
- "+SwTxtFormatter::NewTabPortion: unknown adjustment" );
+ "+SwTextFormatter::NewTabPortion: unknown adjustment" );
pTabPor = new SwTabLeftPortion( nNewTabPos, cFill, bAutoTabStop );
break;
}
@@ -301,7 +301,7 @@ SwTabPortion::SwTabPortion( const sal_uInt16 nTabPosition, const sal_Unicode cFi
SetWhichPor( POR_TAB );
}
-bool SwTabPortion::Format( SwTxtFormatInfo &rInf )
+bool SwTabPortion::Format( SwTextFormatInfo &rInf )
{
SwTabPortion *pLastTab = rInf.GetLastTab();
if( pLastTab == this )
@@ -311,21 +311,21 @@ bool SwTabPortion::Format( SwTxtFormatInfo &rInf )
return PreFormat( rInf );
}
-void SwTabPortion::FormatEOL( SwTxtFormatInfo &rInf )
+void SwTabPortion::FormatEOL( SwTextFormatInfo &rInf )
{
if( rInf.GetLastTab() == this && !IsTabLeftPortion() )
PostFormat( rInf );
}
-bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
+bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf )
{
OSL_ENSURE( rInf.X() <= GetTabPos(), "SwTabPortion::PreFormat: rush hour" );
// Here we settle down ...
Fix( static_cast<sal_uInt16>(rInf.X()) );
- const bool bTabCompat = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
- const bool bTabOverflow = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVERFLOW);
+ const bool bTabCompat = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
+ const bool bTabOverflow = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVERFLOW);
// The minimal width of a tab is one blank at least.
// #i37686# In compatibility mode, the minimum width
@@ -346,8 +346,8 @@ bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
pSave.reset( new SwFontSave( rInf, const_cast<SwFont*>(pNumberPortionFont) ) );
}
OUString aTmp( ' ' );
- SwTxtSizeInfo aInf( rInf, &aTmp );
- nMinimumTabWidth = aInf.GetTxtSize().Width();
+ SwTextSizeInfo aInf( rInf, &aTmp );
+ nMinimumTabWidth = aInf.GetTextSize().Width();
}
PrtWidth( nMinimumTabWidth );
@@ -358,7 +358,7 @@ bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
( rInf.Width() <= rInf.X() + PrtWidth() && rInf.X() <= rInf.Width() ) ;
// #95477# Rotated tab stops get the width of one blank
- const sal_uInt16 nDir = rInf.GetFont()->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ const sal_uInt16 nDir = rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() );
if( ! bFull && 0 == nDir )
{
@@ -383,10 +383,10 @@ bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
// In tabulator compatibility mode, we reset the bFull flag
// if the tabulator is at the end of the paragraph and the
// tab stop position is outside the frame:
- bool bAtParaEnd = rInf.GetIdx() + GetLen() == rInf.GetTxt().getLength();
+ bool bAtParaEnd = rInf.GetIdx() + GetLen() == rInf.GetText().getLength();
if ( bFull && bTabCompat &&
( ( bTabOverflow && ( rInf.IsTabOverflow() || !IsAutoTabStop() ) ) || bAtParaEnd ) &&
- GetTabPos() >= rInf.GetTxtFrm()->Frm().Width() )
+ GetTabPos() >= rInf.GetTextFrm()->Frm().Width() )
{
bFull = false;
if ( bTabOverflow && !IsAutoTabStop() )
@@ -429,9 +429,9 @@ bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
}
}
-bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
+bool SwTabPortion::PostFormat( SwTextFormatInfo &rInf )
{
- const bool bTabOverMargin = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN);
+ const bool bTabOverMargin = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN);
// If the tab position is larger than the right margin, it gets scaled down by default.
// However, if compat mode enabled, we allow tabs to go over the margin: the rest of the paragraph is not broken into lines.
const sal_uInt16 nRight = bTabOverMargin ? GetTabPos() : std::min(GetTabPos(), rInf.Width());
@@ -446,7 +446,7 @@ bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
const sal_uInt16 nWhich = GetWhichPor();
OSL_ENSURE( POR_TABLEFT != nWhich, "SwTabPortion::PostFormat: already formatted" );
- const bool bTabCompat = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
+ const bool bTabCompat = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
// #127428# Abandon dec. tab position if line is full
if ( bTabCompat && POR_TABDECIMAL == nWhich )
@@ -500,7 +500,7 @@ bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
/**
* Ex: LineIter::DrawTab()
*/
-void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
+void SwTabPortion::Paint( const SwTextPaintInfo &rInf ) const
{
#if OSL_DEBUG_LEVEL > 1
// We want to view the fixed width
@@ -557,7 +557,7 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.GetFont()->IsPaintBlank() )
{
// Tabs with filling/filled tabs
- const sal_uInt16 nCharWidth = rInf.GetTxtSize(OUString(' ')).Width();
+ const sal_uInt16 nCharWidth = rInf.GetTextSize(OUString(' ')).Width();
// Robust:
if( nCharWidth )
@@ -574,7 +574,7 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( IsFilled() )
{
// Tabs with filling/filled tabs
- const sal_uInt16 nCharWidth = rInf.GetTxtSize(OUString(cFill)).Width();
+ const sal_uInt16 nCharWidth = rInf.GetTextSize(OUString(cFill)).Width();
OSL_ENSURE( nCharWidth, "!SwTabPortion::Paint: sophisticated tabchar" );
// Robust:
@@ -591,7 +591,7 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-void SwAutoTabDecimalPortion::Paint( const SwTxtPaintInfo & ) const
+void SwAutoTabDecimalPortion::Paint( const SwTextPaintInfo & ) const
{
}
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index 305c6ddd9d2a..f526c28cb2e2 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -44,17 +44,17 @@ namespace
{
// A Follow on the same page as its master is nasty.
-inline bool IsNastyFollow( const SwTxtFrm *pFrm )
+inline bool IsNastyFollow( const SwTextFrm *pFrm )
{
OSL_ENSURE( !pFrm->IsFollow() || !pFrm->GetPrev() ||
- static_cast<const SwTxtFrm*>(pFrm->GetPrev())->GetFollow() == pFrm,
+ static_cast<const SwTextFrm*>(pFrm->GetPrev())->GetFollow() == pFrm,
"IsNastyFollow: Was ist denn hier los?" );
return pFrm->IsFollow() && pFrm->GetPrev();
}
}
-SwTxtFrmBreak::SwTxtFrmBreak( SwTxtFrm *pNewFrm, const SwTwips nRst )
+SwTextFrmBreak::SwTextFrmBreak( SwTextFrm *pNewFrm, const SwTwips nRst )
: nRstHeight(nRst), pFrm(pNewFrm)
{
SWAP_IF_SWAPPED( pFrm )
@@ -66,13 +66,13 @@ SwTxtFrmBreak::SwTxtFrmBreak( SwTxtFrm *pNewFrm, const SwTwips nRst )
const SwSectionFrm* const pSct = pFrm->FindSctFrm();
bKeep = pSct->Lower()->IsColumnFrm() && !pSct->MoveAllowed( pFrm );
}
- bKeep = bKeep || !pFrm->GetTxtNode()->GetSwAttrSet().GetSplit().GetValue() ||
- pFrm->GetTxtNode()->GetSwAttrSet().GetKeep().GetValue();
+ bKeep = bKeep || !pFrm->GetTextNode()->GetSwAttrSet().GetSplit().GetValue() ||
+ pFrm->GetTextNode()->GetSwAttrSet().GetKeep().GetValue();
bBreak = false;
- if( !nRstHeight && !pFrm->IsFollow() && pFrm->IsInFtn() && pFrm->HasPara() )
+ if( !nRstHeight && !pFrm->IsFollow() && pFrm->IsInFootnote() && pFrm->HasPara() )
{
- nRstHeight = pFrm->GetFtnFrmHeight();
+ nRstHeight = pFrm->GetFootnoteFrmHeight();
nRstHeight += (pFrm->Prt().*fnRect->fnGetHeight)() -
(pFrm->Frm().*fnRect->fnGetHeight)();
if( nRstHeight < 0 )
@@ -102,7 +102,7 @@ SwTxtFrmBreak::SwTxtFrmBreak( SwTxtFrm *pNewFrm, const SwTwips nRst )
* be done until the Follow is formatted. Unfortunately this is crucial
* to decide if the whole paragraph goes to the next page or not.
*/
-bool SwTxtFrmBreak::IsInside( SwTxtMargin &rLine ) const
+bool SwTextFrmBreak::IsInside( SwTextMargin &rLine ) const
{
bool bFit = false;
@@ -151,9 +151,9 @@ bool SwTxtFrmBreak::IsInside( SwTxtMargin &rLine ) const
// grow the requested area.
nHeight += pFrm->GrowTst( LONG_MAX );
- // The Grow() returns the height by which the Upper of the TxtFrm
- // would let the TxtFrm grow.
- // The TxtFrm itself can grow as much as it wants.
+ // The Grow() returns the height by which the Upper of the TextFrm
+ // would let the TextFrm grow.
+ // The TextFrm itself can grow as much as it wants.
bFit = nHeight >= nLineHeight;
}
}
@@ -163,7 +163,7 @@ bool SwTxtFrmBreak::IsInside( SwTxtMargin &rLine ) const
return bFit;
}
-bool SwTxtFrmBreak::IsBreakNow( SwTxtMargin &rLine )
+bool SwTextFrmBreak::IsBreakNow( SwTextMargin &rLine )
{
SWAP_IF_SWAPPED( pFrm )
@@ -173,7 +173,7 @@ bool SwTxtFrmBreak::IsBreakNow( SwTxtMargin &rLine )
bBreak = false;
else
{
- /* This class assumes that the SwTxtMargin is processed from Top to
+ /* This class assumes that the SwTextMargin is processed from Top to
* Bottom. Because of performance reasons we stop splitting in the
* following cases:
* If only one line does not fit.
@@ -190,9 +190,9 @@ bool SwTxtFrmBreak::IsBreakNow( SwTxtMargin &rLine )
bKeep = true;
bBreak = false;
}
- else if(bFirstLine && pFrm->IsInFtn() && !pFrm->FindFtnFrm()->GetPrev())
+ else if(bFirstLine && pFrm->IsInFootnote() && !pFrm->FindFootnoteFrm()->GetPrev())
{
- SwLayoutFrm* pTmp = pFrm->FindFtnBossFrm()->FindBodyCont();
+ SwLayoutFrm* pTmp = pFrm->FindFootnoteBossFrm()->FindBodyCont();
if( !pTmp || !pTmp->Lower() )
bBreak = false;
}
@@ -204,7 +204,7 @@ bool SwTxtFrmBreak::IsBreakNow( SwTxtMargin &rLine )
}
/// OD 2004-02-27 #106629# - no longer inline
-void SwTxtFrmBreak::SetRstHeight( const SwTxtMargin &rLine )
+void SwTextFrmBreak::SetRstHeight( const SwTextMargin &rLine )
{
// OD, FME 2004-02-27 #106629# - consider bottom margin
SWRECTFN( pFrm )
@@ -222,9 +222,9 @@ void SwTxtFrmBreak::SetRstHeight( const SwTxtMargin &rLine )
nRstHeight += rLine.Y() - nOrigin;
}
-WidowsAndOrphans::WidowsAndOrphans( SwTxtFrm *pNewFrm, const SwTwips nRst,
+WidowsAndOrphans::WidowsAndOrphans( SwTextFrm *pNewFrm, const SwTwips nRst,
bool bChkKeep )
- : SwTxtFrmBreak( pNewFrm, nRst ), nWidLines( 0 ), nOrphLines( 0 )
+ : SwTextFrmBreak( pNewFrm, nRst ), nWidLines( 0 ), nOrphLines( 0 )
{
SWAP_IF_SWAPPED( pFrm )
@@ -232,7 +232,7 @@ WidowsAndOrphans::WidowsAndOrphans( SwTxtFrm *pNewFrm, const SwTwips nRst,
{
// 5652: If pararagraph should not be split but is larger than
// the page, then bKeep is overruled.
- if( bChkKeep && !pFrm->GetPrev() && !pFrm->IsInFtn() &&
+ if( bChkKeep && !pFrm->GetPrev() && !pFrm->IsInFootnote() &&
pFrm->IsMoveable() &&
( !pFrm->IsInSct() || pFrm->FindSctFrm()->MoveAllowed(pFrm) ) )
bKeep = false;
@@ -242,11 +242,11 @@ WidowsAndOrphans::WidowsAndOrphans( SwTxtFrm *pNewFrm, const SwTwips nRst,
// nevertheless the paragraph can request lines from the Master
// because of the Orphan rule.
if( pFrm->IsFollow() )
- nWidLines = pFrm->GetTxtNode()->GetSwAttrSet().GetWidows().GetValue();
+ nWidLines = pFrm->GetTextNode()->GetSwAttrSet().GetWidows().GetValue();
}
else
{
- const SwAttrSet& rSet = pFrm->GetTxtNode()->GetSwAttrSet();
+ const SwAttrSet& rSet = pFrm->GetTextNode()->GetSwAttrSet();
const SvxOrphansItem &rOrph = rSet.GetOrphans();
if ( rOrph.GetValue() > 1 )
nOrphLines = rOrph.GetValue();
@@ -273,14 +273,14 @@ WidowsAndOrphans::WidowsAndOrphans( SwTxtFrm *pNewFrm, const SwTwips nRst,
}
}
- if( pFrm->IsInFtn() && !pFrm->GetIndPrev() )
+ if( pFrm->IsInFootnote() && !pFrm->GetIndPrev() )
{
// Inside of footnotes there are good reasons to turn off the Keep attribute
// as well as Widows/Orphans.
- SwFtnFrm *pFtn = pFrm->FindFtnFrm();
- const bool bFt = !pFtn->GetAttr()->GetFtn().IsEndNote();
- if( !pFtn->GetPrev() &&
- pFtn->FindFtnBossFrm( bFt ) != pFtn->GetRef()->FindFtnBossFrm( bFt )
+ SwFootnoteFrm *pFootnote = pFrm->FindFootnoteFrm();
+ const bool bFt = !pFootnote->GetAttr()->GetFootnote().IsEndNote();
+ if( !pFootnote->GetPrev() &&
+ pFootnote->FindFootnoteBossFrm( bFt ) != pFootnote->GetRef()->FindFootnoteBossFrm( bFt )
&& ( !pFrm->IsInSct() || pFrm->FindSctFrm()->MoveAllowed(pFrm) ) )
{
bResetFlags = true;
@@ -299,11 +299,11 @@ WidowsAndOrphans::WidowsAndOrphans( SwTxtFrm *pNewFrm, const SwTwips nRst,
}
/**
- * The Find*-Methodes do not only search, but adjust the SwTxtMargin to the
+ * The Find*-Methodes do not only search, but adjust the SwTextMargin to the
* line where the paragraph should have a break and truncate the paragraph there.
* FindBreak()
*/
-bool WidowsAndOrphans::FindBreak( SwTxtFrm *pFrame, SwTxtMargin &rLine,
+bool WidowsAndOrphans::FindBreak( SwTextFrm *pFrame, SwTextMargin &rLine,
bool bHasToFit )
{
// OD 2004-02-25 #i16128# - Why member <pFrm> _*and*_ parameter <pFrame>??
@@ -351,12 +351,12 @@ bool WidowsAndOrphans::FindBreak( SwTxtFrm *pFrame, SwTxtMargin &rLine,
}
/**
- * FindWidows positions the SwTxtMargin of the Master to the line where to
+ * FindWidows positions the SwTextMargin of the Master to the line where to
* break by examining and formatting the Follow.
* Returns true if the Widows-rule matches, that means that the
* paragraph should not be split (keep) !
*/
-bool WidowsAndOrphans::FindWidows( SwTxtFrm *pFrame, SwTxtMargin &rLine )
+bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine )
{
OSL_ENSURE( ! pFrame->IsVertical() || ! pFrame->IsSwapped(),
"WidowsAndOrphans::FindWidows with swapped frame" );
@@ -367,7 +367,7 @@ bool WidowsAndOrphans::FindWidows( SwTxtFrm *pFrame, SwTxtMargin &rLine )
rLine.Bottom();
// We can still cut something off
- SwTxtFrm *pMaster = pFrame->FindMaster();
+ SwTextFrm *pMaster = pFrame->FindMaster();
OSL_ENSURE(pMaster, "+WidowsAndOrphans::FindWidows: Widows in a master?");
if( !pMaster )
return false;
@@ -480,7 +480,7 @@ bool WidowsAndOrphans::FindWidows( SwTxtFrm *pFrame, SwTxtMargin &rLine )
return true;
}
-bool WidowsAndOrphans::WouldFit( SwTxtMargin &rLine, SwTwips &rMaxHeight, bool bTst )
+bool WidowsAndOrphans::WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTst )
{
// Here it does not matter, if pFrm is swapped or not.
// IsInside() takes care of itself
@@ -516,7 +516,7 @@ bool WidowsAndOrphans::WouldFit( SwTxtMargin &rLine, SwTwips &rMaxHeight, bool b
// because we are just in the middle of calculating the break.
// In Ctor of WidowsAndOrphans the nWidLines are only calced for
// Follows from the AttrSet - so we catch up now:
- const SwAttrSet& rSet = pFrm->GetTxtNode()->GetSwAttrSet();
+ const SwAttrSet& rSet = pFrm->GetTextNode()->GetSwAttrSet();
nWidLines = rSet.GetWidows().GetValue();
}
diff --git a/sw/source/core/text/widorp.hxx b/sw/source/core/text/widorp.hxx
index 117c6886c388..3d8ee94e9af0 100644
--- a/sw/source/core/text/widorp.hxx
+++ b/sw/source/core/text/widorp.hxx
@@ -18,23 +18,23 @@
*/
#ifndef INCLUDED_SW_SOURCE_CORE_TEXT_WIDORP_HXX
#define INCLUDED_SW_SOURCE_CORE_TEXT_WIDORP_HXX
-class SwTxtFrm;
+class SwTextFrm;
#include "swtypes.hxx"
#include "itrtxt.hxx"
-class SwTxtFrmBreak
+class SwTextFrmBreak
{
private:
SwTwips nRstHeight;
SwTwips nOrigin;
protected:
- SwTxtFrm *pFrm;
+ SwTextFrm *pFrm;
bool bBreak;
bool bKeep;
public:
- SwTxtFrmBreak( SwTxtFrm *pFrm, const SwTwips nRst = 0 );
- bool IsBreakNow( SwTxtMargin &rLine );
+ SwTextFrmBreak( SwTextFrm *pFrm, const SwTwips nRst = 0 );
+ bool IsBreakNow( SwTextMargin &rLine );
bool IsBroken() const { return bBreak; }
bool IsKeepAlways() const { return bKeep; }
@@ -44,38 +44,38 @@ public:
inline bool GetKeep() const { return bKeep; }
inline void SetKeep( const bool bNew ) { bKeep = bNew; }
- bool IsInside( SwTxtMargin &rLine ) const;
+ bool IsInside( SwTextMargin &rLine ) const;
- // In order to be able to handle special cases with Ftn.
- // SetRstHeight sets the rest height for SwTxtFrmBreak. This is needed
+ // In order to be able to handle special cases with Footnote.
+ // SetRstHeight sets the rest height for SwTextFrmBreak. This is needed
// to call TruncLines() without IsBreakNow() returning another value.
// We assume that rLine is pointing to the last non-fitting line.
// OD 2004-02-27 #106629# - no longer inline
- void SetRstHeight( const SwTxtMargin &rLine );
+ void SetRstHeight( const SwTextMargin &rLine );
SwTwips GetRstHeight() const { return nRstHeight; }
};
-class WidowsAndOrphans : public SwTxtFrmBreak
+class WidowsAndOrphans : public SwTextFrmBreak
{
private:
sal_uInt16 nWidLines, nOrphLines;
public:
- WidowsAndOrphans( SwTxtFrm *pFrm, const SwTwips nRst = 0,
+ WidowsAndOrphans( SwTextFrm *pFrm, const SwTwips nRst = 0,
bool bCheckKeep = true );
- bool FindWidows( SwTxtFrm *pFrm, SwTxtMargin &rLine );
+ bool FindWidows( SwTextFrm *pFrm, SwTextMargin &rLine );
sal_uInt16 GetWidowsLines() const
{ return nWidLines; }
sal_uInt16 GetOrphansLines() const
{ return nOrphLines; }
void ClrOrphLines(){ nOrphLines = 0; }
- bool FindBreak( SwTxtFrm *pFrm, SwTxtMargin &rLine, bool bHasToFit );
- bool WouldFit( SwTxtMargin &rLine, SwTwips &rMaxHeight, bool bTest );
+ bool FindBreak( SwTextFrm *pFrm, SwTextMargin &rLine, bool bHasToFit );
+ bool WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTest );
// OD 2004-02-25 #i16128# - rename method to avoid confusion with base class
- // method <SwTxtFrmBreak::IsBreakNow>, which isn't virtual.
- bool IsBreakNowWidAndOrp( SwTxtMargin &rLine )
+ // method <SwTextFrmBreak::IsBreakNow>, which isn't virtual.
+ bool IsBreakNowWidAndOrp( SwTextMargin &rLine )
{
return ( rLine.GetLineNr() > nOrphLines ) && IsBreakNow( rLine );
}
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index aab4a3badde7..951b415ff565 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -324,20 +324,20 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const
}
// Dump the children
- if ( IsTxtFrm( ) )
+ if ( IsTextFrm( ) )
{
- const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm *>(this);
- OUString aTxt = pTxtFrm->GetTxt( );
+ const SwTextFrm *pTextFrm = static_cast<const SwTextFrm *>(this);
+ OUString aText = pTextFrm->GetText( );
for ( int i = 0; i < 32; i++ )
{
- aTxt = aTxt.replace( i, '*' );
+ aText = aText.replace( i, '*' );
}
- OString aTxt8 =OUStringToOString( aTxt,
+ OString aText8 =OUStringToOString( aText,
RTL_TEXTENCODING_UTF8 );
xmlTextWriterWriteString( writer,
- reinterpret_cast<const xmlChar *>(aTxt8.getStr( )) );
+ reinterpret_cast<const xmlChar *>(aText8.getStr( )) );
XmlPortionDumper pdumper( writer );
- pTxtFrm->VisitPortions( pdumper );
+ pTextFrm->VisitPortions( pdumper );
}
else
@@ -379,18 +379,18 @@ void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "upper" ), "%" SAL_PRIuUINT32, GetUpper()->GetFrmId() );
if ( GetLower( ) )
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "lower" ), "%" SAL_PRIuUINT32, GetLower()->GetFrmId() );
- if ( IsTxtFrm( ) )
+ if ( IsTextFrm( ) )
{
- const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm *>(this);
- const SwTxtNode *pTxtNode = pTxtFrm->GetTxtNode();
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "txtNodeIndex" ), TMP_FORMAT, pTxtNode->GetIndex() );
+ const SwTextFrm *pTextFrm = static_cast<const SwTextFrm *>(this);
+ const SwTextNode *pTextNode = pTextFrm->GetTextNode();
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "txtNodeIndex" ), TMP_FORMAT, pTextNode->GetIndex() );
}
if (IsHeaderFrm() || IsFooterFrm())
{
const SwHeadFootFrm *pHeadFootFrm = static_cast<const SwHeadFootFrm*>(this);
- OUString aFmtName = pHeadFootFrm->GetFmt()->GetName();
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtName" ), "%s", BAD_CAST(OUStringToOString(aFmtName, RTL_TEXTENCODING_UTF8).getStr()));
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtPtr" ), "%p", pHeadFootFrm->GetFmt());
+ OUString aFormatName = pHeadFootFrm->GetFormat()->GetName();
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtName" ), "%s", BAD_CAST(OUStringToOString(aFormatName, RTL_TEXTENCODING_UTF8).getStr()));
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtPtr" ), "%p", pHeadFootFrm->GetFormat());
}
}
@@ -433,14 +433,14 @@ void SwFont::dumpAsXml(xmlTextWriterPtr writer) const
xmlTextWriterEndElement(writer);
}
-void SwTxtFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
+void SwTextFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
{
SwFrm::dumpAsXmlAttributes( writer );
if ( HasFollow() )
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() );
if (m_pPrecede != NULL)
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTxtFrm*>(m_pPrecede)->GetFrmId() );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTextFrm*>(m_pPrecede)->GetFrmId() );
}
void SwSectionFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const