summaryrefslogtreecommitdiff
path: root/sw/source/core/text
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-05-20 13:05:49 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-05-20 13:05:49 +0200
commitab465b90f6c6da5595393a0ba73f33a1e71a2b65 (patch)
tree36b77192de2799a11b4bf0b269cb3f74d0a0bb1f /sw/source/core/text
parent0db96caf0fcce09b87621c11b584a6d81cc7df86 (diff)
bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-point
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
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 S