summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/crsr')
-rw-r--r--sw/source/core/crsr/annotationmark.cxx32
-rw-r--r--sw/source/core/crsr/bookmrk.cxx30
-rw-r--r--sw/source/core/crsr/callnk.cxx64
-rw-r--r--sw/source/core/crsr/callnk.hxx8
-rw-r--r--sw/source/core/crsr/crossrefbookmark.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx474
-rw-r--r--sw/source/core/crsr/crstrvl.cxx848
-rw-r--r--sw/source/core/crsr/findattr.cxx164
-rw-r--r--sw/source/core/crsr/findcoll.cxx36
-rw-r--r--sw/source/core/crsr/findfmt.cxx12
-rw-r--r--sw/source/core/crsr/findtxt.cxx108
-rw-r--r--sw/source/core/crsr/pam.cxx186
-rw-r--r--sw/source/core/crsr/paminit.cxx12
-rw-r--r--sw/source/core/crsr/swcrsr.cxx424
-rw-r--r--sw/source/core/crsr/trvlcol.cxx16
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx172
-rw-r--r--sw/source/core/crsr/trvlreg.cxx32
-rw-r--r--sw/source/core/crsr/trvltbl.cxx304
-rw-r--r--sw/source/core/crsr/viscrs.cxx148
19 files changed, 1536 insertions, 1536 deletions
diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index d66427fee1c6..0a308ecf69d2 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -51,15 +51,15 @@ namespace sw { namespace mark
void AnnotationMark::InitDoc(SwDoc* const io_pDoc)
{
- SwTxtNode *pTxtNode = GetMarkEnd().nNode.GetNode().GetTxtNode();
+ SwTextNode *pTextNode = GetMarkEnd().nNode.GetNode().GetTextNode();
- SwTxtFld* pTxtFld = pTxtNode ?
- pTxtNode->GetFldTxtAttrAt(
+ SwTextField* pTextField = pTextNode ?
+ pTextNode->GetFieldTextAttrAt(
GetMarkEnd().nContent.GetIndex()-1, true ) : NULL;
- OSL_ENSURE( pTxtFld != NULL, "<AnnotationMark::InitDoc(..)> - missing text attribute for annotation field!" );
- if ( pTxtFld != NULL )
+ OSL_ENSURE( pTextField != NULL, "<AnnotationMark::InitDoc(..)> - missing text attribute for annotation field!" );
+ if ( pTextField != NULL )
{
- const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pTxtFld->GetFmtFld().GetField());
+ const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pTextField->GetFormatField().GetField());
OSL_ENSURE( pPostItField != NULL, "<AnnotationMark::InitDoc(..)> - annotation field missing!" );
if ( pPostItField != NULL )
{
@@ -81,33 +81,33 @@ namespace sw { namespace mark
io_pDoc->getIDocumentState().SetModified();
}
- const SwFmtFld* AnnotationMark::GetAnnotationFmtFld() const
+ const SwFormatField* AnnotationMark::GetAnnotationFormatField() const
{
SwDoc* pDoc = GetMarkPos().GetDoc();
if ( pDoc == NULL )
{
- OSL_ENSURE( false, "<AnnotationMark::GetAnnotationFmtFld()> - missing document at annotation mark" );
+ OSL_ENSURE( false, "<AnnotationMark::GetAnnotationFormatField()> - missing document at annotation mark" );
return NULL;
}
- SwFmtFld* pAnnotationFmtFld = NULL;
+ SwFormatField* pAnnotationFormatField = NULL;
- SwFieldType* pType = pDoc->getIDocumentFieldsAccess().GetFldType( RES_POSTITFLD, OUString(), false );
- SwIterator<SwFmtFld,SwFieldType> aIter( *pType );
- for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld != NULL; pFmtFld = aIter.Next() )
+ SwFieldType* pType = pDoc->getIDocumentFieldsAccess().GetFieldType( RES_POSTITFLD, OUString(), false );
+ SwIterator<SwFormatField,SwFieldType> aIter( *pType );
+ for( SwFormatField* pFormatField = aIter.First(); pFormatField != NULL; pFormatField = aIter.Next() )
{
- if ( pFmtFld->IsFldInDoc() )
+ if ( pFormatField->IsFieldInDoc() )
{
- const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pFmtFld->GetField());
+ const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pFormatField->GetField());
if (pPostItField != NULL && pPostItField->GetName() == GetName())
{
- pAnnotationFmtFld = pFmtFld;
+ pAnnotationFormatField = pFormatField;
break;
}
}
}
- return pAnnotationFmtFld;
+ return pAnnotationFormatField;
}
}}
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 862fdb64adca..6b81556660ed 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -44,22 +44,22 @@ namespace
static void lcl_FixPosition(SwPosition& rPos)
{
// make sure the position has 1) the proper node, and 2) a proper index
- SwTxtNode* pTxtNode = rPos.nNode.GetNode().GetTxtNode();
- if(pTxtNode == NULL && rPos.nContent.GetIndex() > 0)
+ SwTextNode* pTextNode = rPos.nNode.GetNode().GetTextNode();
+ if(pTextNode == NULL && rPos.nContent.GetIndex() > 0)
{
SAL_INFO(
"sw.core",
"illegal position: " << rPos.nContent.GetIndex()
- << " without proper TxtNode");
+ << " without proper TextNode");
rPos.nContent.Assign(NULL, 0);
}
- else if(pTxtNode != NULL && rPos.nContent.GetIndex() > pTxtNode->Len())
+ else if(pTextNode != NULL && rPos.nContent.GetIndex() > pTextNode->Len())
{
SAL_INFO(
"sw.core",
"illegal position: " << rPos.nContent.GetIndex()
- << " is beyond " << pTxtNode->Len());
- rPos.nContent.Assign(pTxtNode, pTxtNode->Len());
+ << " is beyond " << pTextNode->Len());
+ rPos.nContent.Assign(pTextNode, pTextNode->Len());
}
}
@@ -71,9 +71,9 @@ namespace
io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
SwPosition rStart = pField->GetMarkStart();
- SwTxtNode const*const pStartTxtNode = rStart.nNode.GetNode().GetTxtNode();
- const sal_Unicode ch_start = ( rStart.nContent.GetIndex() >= pStartTxtNode->GetTxt().getLength() ) ? 0 :
- pStartTxtNode->GetTxt()[rStart.nContent.GetIndex()];
+ SwTextNode const*const pStartTextNode = rStart.nNode.GetNode().GetTextNode();
+ const sal_Unicode ch_start = ( rStart.nContent.GetIndex() >= pStartTextNode->GetText().getLength() ) ? 0 :
+ pStartTextNode->GetText()[rStart.nContent.GetIndex()];
if( ( ch_start != aStartMark ) && ( aEndMark != CH_TXT_ATR_FORMELEMENT ) )
{
SwPaM aStartPaM(rStart);
@@ -83,10 +83,10 @@ namespace
}
SwPosition& rEnd = pField->GetMarkEnd();
- SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
+ SwTextNode const*const pEndTextNode = rEnd.nNode.GetNode().GetTextNode();
const sal_Int32 nEndPos = ( rEnd == rStart || rEnd.nContent.GetIndex() == 0 ) ?
rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1;
- const sal_Unicode ch_end = nEndPos >= pEndTxtNode->GetTxt().getLength() ? 0 : pEndTxtNode->GetTxt()[nEndPos];
+ const sal_Unicode ch_end = nEndPos >= pEndTextNode->GetText().getLength() ? 0 : pEndTextNode->GetText()[nEndPos];
if ( aEndMark && ( ch_end != aEndMark ) )
{
SwPaM aEndPaM(rEnd);
@@ -105,9 +105,9 @@ namespace
io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
const SwPosition& rStart = pField->GetMarkStart();
- SwTxtNode const*const pStartTxtNode = rStart.nNode.GetNode().GetTxtNode();
+ SwTextNode const*const pStartTextNode = rStart.nNode.GetNode().GetTextNode();
const sal_Unicode ch_start =
- pStartTxtNode->GetTxt()[rStart.nContent.GetIndex()];
+ pStartTextNode->GetText()[rStart.nContent.GetIndex()];
if( ch_start == aStartMark )
{
@@ -117,11 +117,11 @@ namespace
}
const SwPosition& rEnd = pField->GetMarkEnd();
- SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
+ SwTextNode const*const pEndTextNode = rEnd.nNode.GetNode().GetTextNode();
const sal_Int32 nEndPos = ( rEnd == rStart || rEnd.nContent.GetIndex() == 0 )
? rEnd.nContent.GetIndex()
: rEnd.nContent.GetIndex() - 1;
- const sal_Unicode ch_end = pEndTxtNode->GetTxt()[nEndPos];
+ const sal_Unicode ch_end = pEndTextNode->GetText()[nEndPos];
if ( ch_end == aEndMark )
{
SwPaM aEnd(rEnd, rEnd);
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 60ddc4601b03..76e8e3bcfc77 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -36,9 +36,9 @@
#include <breakit.hxx>
#include <vcl/window.hxx>
-SwCallLink::SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, sal_Int32 nAktCntnt,
+SwCallLink::SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, sal_Int32 nAktContent,
sal_uInt8 nAktNdTyp, long nLRPos, bool bAktSelection )
- : rShell( rSh ), nNode( nAktNode ), nCntnt( nAktCntnt ),
+ : rShell( rSh ), nNode( nAktNode ), nContent( nAktContent ),
nNdTyp( nAktNdTyp ), nLeftFrmPos( nLRPos ),
bHasSelection( bAktSelection )
{
@@ -48,15 +48,15 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh )
: rShell( rSh )
{
// remember SPoint-values of current cursor
- SwPaM* pCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr();
+ SwPaM* pCrsr = rShell.IsTableMode() ? rShell.GetTableCrs() : rShell.GetCrsr();
SwNode& rNd = pCrsr->GetPoint()->nNode.GetNode();
nNode = rNd.GetIndex();
- nCntnt = pCrsr->GetPoint()->nContent.GetIndex();
+ nContent = pCrsr->GetPoint()->nContent.GetIndex();
nNdTyp = rNd.GetNodeType();
bHasSelection = ( *pCrsr->GetPoint() != *pCrsr->GetMark() );
- if( rNd.IsTxtNode() )
- nLeftFrmPos = SwCallLink::getLayoutFrm( rShell.GetLayout(), *rNd.GetTxtNode(), nCntnt,
+ if( rNd.IsTextNode() )
+ nLeftFrmPos = SwCallLink::getLayoutFrm( rShell.GetLayout(), *rNd.GetTextNode(), nContent,
!rShell.ActionPend() );
else
{
@@ -65,14 +65,14 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh )
// A special treatment for SwFeShell:
// When deleting the header/footer, footnotes SwFeShell sets the
// Cursor to NULL (Node + Content).
- // If the Cursor is not on a CntntNode (ContentNode) this fact gets
+ // If the Cursor is not on a ContentNode (ContentNode) this fact gets
// saved in NdType.
if( ND_CONTENTNODE & nNdTyp )
nNdTyp = 0;
}
}
-static void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell& rShell)
+static void lcl_notifyRow(const SwContentNode* pNode, SwCrsrShell& rShell)
{
if ( !pNode )
return;
@@ -95,7 +95,7 @@ static void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell& rShell)
{
if (pContent->GetType() == FRM_TAB)
{
- SwFmtFrmSize pSize = pLine->GetFrmFmt()->GetFrmSize();
+ SwFormatFrmSize pSize = pLine->GetFrameFormat()->GetFrmSize();
pRow->ModifyNotification(NULL, &pSize);
return;
}
@@ -110,22 +110,22 @@ SwCallLink::~SwCallLink()
// If travelling over Nodes check formats and register them anew at the
// new Node.
- SwPaM* pCurCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr();
- SwCntntNode * pCNd = pCurCrsr->GetCntntNode();
+ SwPaM* pCurCrsr = rShell.IsTableMode() ? rShell.GetTableCrs() : rShell.GetCrsr();
+ SwContentNode * pCNd = pCurCrsr->GetContentNode();
if( !pCNd )
return;
lcl_notifyRow(pCNd, rShell);
const SwDoc *pDoc=rShell.GetDoc();
- const SwCntntNode *pNode = NULL;
+ const SwContentNode *pNode = NULL;
if ( ( pDoc != NULL && nNode < pDoc->GetNodes( ).Count( ) ) )
{
- pNode = pDoc->GetNodes()[nNode]->GetCntntNode();
+ pNode = pDoc->GetNodes()[nNode]->GetContentNode();
}
lcl_notifyRow(pNode, rShell);
- sal_Int32 nCmp, nAktCntnt = pCurCrsr->GetPoint()->nContent.GetIndex();
+ sal_Int32 nCmp, nAktContent = pCurCrsr->GetPoint()->nContent.GetIndex();
sal_uInt16 nNdWhich = pCNd->GetNodeType();
sal_uLong nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex();
@@ -147,32 +147,32 @@ SwCallLink::~SwCallLink()
rShell.CallChgLnk();
}
else if( rShell.m_aChgLnk.IsSet() && ND_TEXTNODE == nNdWhich &&
- nCntnt != nAktCntnt )
+ nContent != nAktContent )
{
// If travelling with left/right only and the frame is
// unchanged (columns!) then check text hints.
- if( nLeftFrmPos == SwCallLink::getLayoutFrm( rShell.GetLayout(), *pCNd->GetTxtNode(), nAktCntnt,
+ if( nLeftFrmPos == SwCallLink::getLayoutFrm( rShell.GetLayout(), *pCNd->GetTextNode(), nAktContent,
!rShell.ActionPend() ) &&
- (( nCmp = nCntnt ) + 1 == nAktCntnt || // Right
- nCntnt -1 == ( nCmp = nAktCntnt )) ) // Left
+ (( nCmp = nContent ) + 1 == nAktContent || // Right
+ nContent -1 == ( nCmp = nAktContent )) ) // Left
{
- if( nCmp == nAktCntnt && pCurCrsr->HasMark() ) // left & select
+ if( nCmp == nAktContent && pCurCrsr->HasMark() ) // left & select
++nCmp;
- if ( pCNd->GetTxtNode()->HasHints() )
+ if ( pCNd->GetTextNode()->HasHints() )
{
- const SwpHints &rHts = pCNd->GetTxtNode()->GetSwpHints();
+ const SwpHints &rHts = pCNd->GetTextNode()->GetSwpHints();
for( size_t n = 0; n < rHts.Count(); ++n )
{
- const SwTxtAttr* pHt = rHts[ n ];
+ const SwTextAttr* pHt = rHts[ n ];
const sal_Int32 *pEnd = pHt->End();
const sal_Int32 nStart = pHt->GetStart();
// If "only start" or "start and end equal" then call on
// every overflow of start.
if( ( !pEnd || ( nStart == *pEnd ) ) &&
- ( nStart == nCntnt || nStart == nAktCntnt) )
+ ( nStart == nContent || nStart == nAktContent) )
{
rShell.CallChgLnk();
return;
@@ -193,10 +193,10 @@ SwCallLink::~SwCallLink()
if( g_pBreakIt->GetBreakIter().is() )
{
- const OUString rTxt = pCNd->GetTxtNode()->GetTxt();
+ const OUString rText = pCNd->GetTextNode()->GetText();
if( !nCmp ||
- g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nCmp )
- != g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nCmp - 1 ))
+ g_pBreakIt->GetBreakIter()->getScriptType( rText, nCmp )
+ != g_pBreakIt->GetBreakIter()->getScriptType( rText, nCmp - 1 ))
{
rShell.CallChgLnk();
return;
@@ -215,8 +215,8 @@ SwCallLink::~SwCallLink()
if( !rShell.ActionPend() && 0 != ( pFrm = pCNd->getLayoutFrm(rShell.GetLayout(), 0, 0, false) ) &&
0 != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() )
{
- const SwNodeIndex* pIndex = pFlyFrm->GetFmt()->GetCntnt().GetCntntIdx();
- OSL_ENSURE( pIndex, "Fly without Cntnt" );
+ const SwNodeIndex* pIndex = pFlyFrm->GetFormat()->GetContent().GetContentIdx();
+ OSL_ENSURE( pIndex, "Fly without Content" );
if (!pIndex)
return;
@@ -225,14 +225,14 @@ SwCallLink::~SwCallLink()
if( rStNd.EndOfSectionNode()->StartOfSectionIndex() > nNode ||
nNode > rStNd.EndOfSectionIndex() )
- rShell.GetFlyMacroLnk().Call( (void*)pFlyFrm->GetFmt() );
+ rShell.GetFlyMacroLnk().Call( (void*)pFlyFrm->GetFormat() );
}
}
-long SwCallLink::getLayoutFrm( const SwRootFrm* pRoot, SwTxtNode& rNd, sal_Int32 nCntPos, bool bCalcFrm )
+long SwCallLink::getLayoutFrm( const SwRootFrm* pRoot, SwTextNode& rNd, sal_Int32 nCntPos, bool bCalcFrm )
{
- SwTxtFrm* pFrm = static_cast<SwTxtFrm*>(rNd.getLayoutFrm(pRoot,0,0,bCalcFrm));
- SwTxtFrm* pNext;
+ SwTextFrm* pFrm = static_cast<SwTextFrm*>(rNd.getLayoutFrm(pRoot,0,0,bCalcFrm));
+ SwTextFrm* pNext;
if ( pFrm && !pFrm->IsHiddenNow() )
{
if( pFrm->HasFollow() )
diff --git a/sw/source/core/crsr/callnk.hxx b/sw/source/core/crsr/callnk.hxx
index 85e9799472c9..b0aebe7aa21b 100644
--- a/sw/source/core/crsr/callnk.hxx
+++ b/sw/source/core/crsr/callnk.hxx
@@ -23,7 +23,7 @@
#include <tools/solar.h>
class SwCrsrShell;
-class SwTxtNode;
+class SwTextNode;
class SwRootFrm;
class SwCallLink
@@ -31,18 +31,18 @@ class SwCallLink
public:
SwCrsrShell & rShell;
sal_uLong nNode;
- sal_Int32 nCntnt;
+ sal_Int32 nContent;
sal_uInt8 nNdTyp;
long nLeftFrmPos;
bool bHasSelection;
explicit SwCallLink( SwCrsrShell & rSh );
- SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, sal_Int32 nAktCntnt,
+ SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, sal_Int32 nAktContent,
sal_uInt8 nAktNdTyp, long nLRPos,
bool bAktSelection );
~SwCallLink();
- static long getLayoutFrm( const SwRootFrm*, SwTxtNode& rNd, sal_Int32 nCntPos, bool bCalcFrm );
+ static long getLayoutFrm( const SwRootFrm*, SwTextNode& rNd, sal_Int32 nCntPos, bool bCalcFrm );
};
#endif // INCLUDED_SW_SOURCE_CORE_CRSR_CALLNK_HXX
diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx
index 67a25d07520c..9ec38bdc5e29 100644
--- a/sw/source/core/crsr/crossrefbookmark.cxx
+++ b/sw/source/core/crsr/crossrefbookmark.cxx
@@ -51,7 +51,7 @@ namespace sw { namespace mark
void CrossRefBookmark::SetMarkPos(const SwPosition& rNewPos)
{
- assert(rNewPos.nNode.GetNode().GetTxtNode() &&
+ assert(rNewPos.nNode.GetNode().GetTextNode() &&
"<sw::mark::CrossRefBookmark::SetMarkPos(..)>"
" - new bookmark position for cross-reference bookmark doesn't mark text node");
assert(rNewPos.nContent.GetIndex() == 0 &&
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 4aa3dcd7bc2f..98dc7fddc554 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -181,28 +181,28 @@ SwPaM & SwCrsrShell::GetCurrentShellCursor()
* Return pointer to the current shell cursor
* @return - returns pointer to current `SwPaM` shell cursor
*/
-SwPaM* SwCrsrShell::GetCrsr( bool bMakeTblCrsr ) const
+SwPaM* SwCrsrShell::GetCrsr( bool bMakeTableCrsr ) const
{
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
{
- if( bMakeTblCrsr && m_pTblCrsr->IsCrsrMovedUpdt() )
+ if( bMakeTableCrsr && m_pTableCrsr->IsCrsrMovedUpdate() )
{
//don't re-create 'parked' cursors
- const SwCntntNode* pCNd;
- if( m_pTblCrsr->GetPoint()->nNode.GetIndex() &&
- m_pTblCrsr->GetMark()->nNode.GetIndex() &&
- 0 != ( pCNd = m_pTblCrsr->GetCntntNode() ) && pCNd->getLayoutFrm( GetLayout() ) &&
- 0 != ( pCNd = m_pTblCrsr->GetCntntNode(false) ) && pCNd->getLayoutFrm( GetLayout() ) )
+ const SwContentNode* pCNd;
+ if( m_pTableCrsr->GetPoint()->nNode.GetIndex() &&
+ m_pTableCrsr->GetMark()->nNode.GetIndex() &&
+ 0 != ( pCNd = m_pTableCrsr->GetContentNode() ) && pCNd->getLayoutFrm( GetLayout() ) &&
+ 0 != ( pCNd = m_pTableCrsr->GetContentNode(false) ) && pCNd->getLayoutFrm( GetLayout() ) )
{
- SwShellTableCrsr* pTC = (SwShellTableCrsr*)m_pTblCrsr;
- GetLayout()->MakeTblCrsrs( *pTC );
+ SwShellTableCrsr* pTC = (SwShellTableCrsr*)m_pTableCrsr;
+ GetLayout()->MakeTableCrsrs( *pTC );
}
}
- if( m_pTblCrsr->IsChgd() )
+ if( m_pTableCrsr->IsChgd() )
{
const_cast<SwCrsrShell*>(this)->m_pCurCrsr =
- dynamic_cast<SwShellCrsr*>(m_pTblCrsr->MakeBoxSels( m_pCurCrsr ));
+ dynamic_cast<SwShellCrsr*>(m_pTableCrsr->MakeBoxSels( m_pCurCrsr ));
}
}
return m_pCurCrsr;
@@ -215,11 +215,11 @@ void SwCrsrShell::StartAction()
// save for update of the ribbon bar
const SwNode& rNd = m_pCurCrsr->GetPoint()->nNode.GetNode();
m_nAktNode = rNd.GetIndex();
- m_nAktCntnt = m_pCurCrsr->GetPoint()->nContent.GetIndex();
+ m_nAktContent = m_pCurCrsr->GetPoint()->nContent.GetIndex();
m_nAktNdTyp = rNd.GetNodeType();
m_bAktSelection = *m_pCurCrsr->GetPoint() != *m_pCurCrsr->GetMark();
- if( rNd.IsTxtNode() )
- m_nLeftFrmPos = SwCallLink::getLayoutFrm( GetLayout(), const_cast<SwTxtNode&>(*rNd.GetTxtNode()), m_nAktCntnt, true );
+ if( rNd.IsTextNode() )
+ m_nLeftFrmPos = SwCallLink::getLayoutFrm( GetLayout(), const_cast<SwTextNode&>(*rNd.GetTextNode()), m_nAktContent, true );
else
m_nLeftFrmPos = 0;
}
@@ -273,7 +273,7 @@ void SwCrsrShell::EndAction( const bool bIdleEnd, const bool DoSetPosX )
{
// watch Crsr-Moves, call Link if needed, the DTOR is key here!
- SwCallLink aLk( *this, m_nAktNode, m_nAktCntnt, (sal_uInt8)m_nAktNdTyp,
+ SwCallLink aLk( *this, m_nAktNode, m_nAktContent, (sal_uInt8)m_nAktNdTyp,
m_nLeftFrmPos, m_bAktSelection );
}
@@ -295,7 +295,7 @@ void SwCrsrShell::EndAction( const bool bIdleEnd, const bool DoSetPosX )
SwCallLink aLk( *this ); // watch Crsr-Moves
aLk.nNode = m_nAktNode; // call Link if needed
aLk.nNdTyp = (sal_uInt8)m_nAktNdTyp;
- aLk.nCntnt = m_nAktCntnt;
+ aLk.nContent = m_nAktContent;
aLk.nLeftFrmPos = m_nLeftFrmPos;
if( !m_nCrsrMove ||
@@ -343,7 +343,7 @@ bool SwCrsrShell::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
bool bRet = false;
// #i27615# Handle cursor in front of label.
- const SwTxtNode* pTxtNd = 0;
+ const SwTextNode* pTextNd = 0;
if( m_pBlockCrsr )
m_pBlockCrsr->clearPoints();
@@ -360,8 +360,8 @@ bool SwCrsrShell::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
// to the left will simply set the bInFrontOfLabel flag:
else if ( bLeft && 0 == pShellCrsr->GetPoint()->nContent.GetIndex() &&
!pShellCrsr->IsInFrontOfLabel() && !pShellCrsr->HasMark() &&
- 0 != ( pTxtNd = pShellCrsr->GetNode().GetTxtNode() ) &&
- pTxtNd->HasVisibleNumberingOrBullet() )
+ 0 != ( pTextNd = pShellCrsr->GetNode().GetTextNode() ) &&
+ pTextNd->HasVisibleNumberingOrBullet() )
{
SetInFrontOfLabel( true );
bRet = true;
@@ -412,23 +412,23 @@ void SwCrsrShell::MarkListLevel( const OUString& sListId,
void SwCrsrShell::UpdateMarkedListLevel()
{
- SwTxtNode * pTxtNd = _GetCrsr()->GetNode().GetTxtNode();
+ SwTextNode * pTextNd = _GetCrsr()->GetNode().GetTextNode();
- if ( pTxtNd )
+ if ( pTextNd )
{
- if ( !pTxtNd->IsNumbered() )
+ if ( !pTextNd->IsNumbered() )
{
m_pCurCrsr->_SetInFrontOfLabel( false );
MarkListLevel( OUString(), 0 );
}
else if ( m_pCurCrsr->IsInFrontOfLabel() )
{
- if ( pTxtNd->IsInList() )
+ if ( pTextNd->IsInList() )
{
- OSL_ENSURE( pTxtNd->GetActualListLevel() >= 0 &&
- pTxtNd->GetActualListLevel() < MAXLEVEL, "Which level?");
- MarkListLevel( pTxtNd->GetListId(),
- pTxtNd->GetActualListLevel() );
+ OSL_ENSURE( pTextNd->GetActualListLevel() >= 0 &&
+ pTextNd->GetActualListLevel() < MAXLEVEL, "Which level?");
+ MarkListLevel( pTextNd->GetListId(),
+ pTextNd->GetActualListLevel() );
}
}
else
@@ -525,11 +525,11 @@ bool SwCrsrShell::UpDown( bool bUp, sal_uInt16 nCnt )
m_eMvState = MV_UPDOWN; // status for Crsr travelling - GetCrsrOfst
if( !ActionPend() )
{
- CrsrFlag eUpdtMode = SwCrsrShell::SCROLLWIN;
+ CrsrFlag eUpdateMode = SwCrsrShell::SCROLLWIN;
if( !bTableMode )
- eUpdtMode = (CrsrFlag) (eUpdtMode
+ eUpdateMode = (CrsrFlag) (eUpdateMode
| SwCrsrShell::UPDOWN | SwCrsrShell::CHKRANGE);
- UpdateCrsr( static_cast<sal_uInt16>(eUpdtMode) );
+ UpdateCrsr( static_cast<sal_uInt16>(eUpdateMode) );
}
}
return bRet;
@@ -554,8 +554,8 @@ bool SwCrsrShell::LRMargin( bool bLeft, bool bAPI)
if ( bLeft && !bTableMode && bRet && bWasAtLM && !_GetCrsr()->HasMark() )
{
- const SwTxtNode * pTxtNd = _GetCrsr()->GetNode().GetTxtNode();
- if ( pTxtNd && pTxtNd->HasVisibleNumberingOrBullet() )
+ const SwTextNode * pTextNd = _GetCrsr()->GetNode().GetTextNode();
+ if ( pTextNd && pTextNd->HasVisibleNumberingOrBullet() )
SetInFrontOfLabel( true );
}
else if ( !bLeft )
@@ -605,7 +605,7 @@ void SwCrsrShell::ExtendedSelectAll(bool bFootnotes)
pPos->nContent.Assign( rNodes.GoNext( &pPos->nNode ), 0 );
pPos = m_pCurCrsr->GetMark();
pPos->nNode = rNodes.GetEndOfContent();
- SwCntntNode* pCNd = SwNodes::GoPrevious( &pPos->nNode );
+ SwContentNode* pCNd = SwNodes::GoPrevious( &pPos->nNode );
pPos->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 );
}
@@ -613,10 +613,10 @@ bool SwCrsrShell::ExtendedSelectedAll(bool bFootnotes)
{
SwNodes& rNodes = GetDoc()->GetNodes();
SwNodeIndex nNode = bFootnotes ? rNodes.GetEndOfPostIts() : rNodes.GetEndOfAutotext();
- SwCntntNode* pStart = rNodes.GoNext(&nNode);
+ SwContentNode* pStart = rNodes.GoNext(&nNode);
nNode = rNodes.GetEndOfContent();
- SwCntntNode* pEnd = SwNodes::GoPrevious(&nNode);
+ SwContentNode* pEnd = SwNodes::GoPrevious(&nNode);
if (!pStart || !pEnd)
return false;
@@ -631,8 +631,8 @@ bool SwCrsrShell::StartsWithTable()
{
SwNodes& rNodes = GetDoc()->GetNodes();
SwNodeIndex nNode(rNodes.GetEndOfExtras());
- SwCntntNode* pCntntNode = rNodes.GoNext(&nNode);
- return pCntntNode->FindTableNode();
+ SwContentNode* pContentNode = rNodes.GoNext(&nNode);
+ return pContentNode->FindTableNode();
}
bool SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
@@ -640,14 +640,14 @@ bool SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
bool bRet = false;
// never jump of section borders at selection
- if( !m_pCurCrsr->HasMark() || !m_pCurCrsr->IsNoCntnt() )
+ if( !m_pCurCrsr->HasMark() || !m_pCurCrsr->IsNoContent() )
{
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
SET_CURR_SHELL( this );
SwCrsrSaveState aSaveState( *m_pCurCrsr );
Point& rPt = m_pCurCrsr->GetPtPos();
- SwCntntFrm * pFrm = m_pCurCrsr->GetCntntNode()->
+ SwContentFrm * pFrm = m_pCurCrsr->GetContentNode()->
getLayoutFrm( GetLayout(), &rPt, m_pCurCrsr->GetPoint(), false );
if( pFrm && ( bRet = GetFrmInPage( pFrm, fnWhichPage,
fnPosPage, m_pCurCrsr ) ) &&
@@ -660,12 +660,12 @@ bool SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
return bRet;
}
-bool SwCrsrShell::isInHiddenTxtFrm(SwShellCrsr* pShellCrsr)
+bool SwCrsrShell::isInHiddenTextFrm(SwShellCrsr* pShellCrsr)
{
- SwCntntNode *pCNode = pShellCrsr->GetCntntNode();
- SwCntntFrm *pFrm = pCNode ?
+ SwContentNode *pCNode = pShellCrsr->GetContentNode();
+ SwContentFrm *pFrm = pCNode ?
pCNode->getLayoutFrm( GetLayout(), &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), false ) : 0;
- return !pFrm || (pFrm->IsTxtFrm() && static_cast<SwTxtFrm*>(pFrm)->IsHiddenNow());
+ return !pFrm || (pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsHiddenNow());
}
bool SwCrsrShell::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
@@ -680,7 +680,7 @@ bool SwCrsrShell::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
//which is what SwCrsrShell::UpdateCrsrPos will reset
//the position to if we pass it a position in an
//invisible hidden paragraph field
- while (isInHiddenTxtFrm(pTmpCrsr))
+ while (isInHiddenTextFrm(pTmpCrsr))
{
if (!pTmpCrsr->MovePara(fnWhichPara, fnPosPara))
break;
@@ -708,10 +708,10 @@ bool SwCrsrShell::MoveSection( SwWhichSection fnWhichSect,
static SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt )
{
SwFrm* pFrm = 0;
- SwCntntNode* pCNd = rIdx.GetNode().GetCntntNode();
+ SwContentNode* pCNd = rIdx.GetNode().GetContentNode();
if( pCNd )
{
- SwCntntFrm *pCntFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, 0, false );
+ SwContentFrm *pCntFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, 0, false );
pFrm = pCntFrm ? pCntFrm->GetUpper() : NULL;
while( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() )
pFrm = pFrm->IsFlyFrm() ? static_cast<SwFlyFrm*>(pFrm)->AnchorFrm()
@@ -741,12 +741,12 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock )
bOnlyText ? MV_SETONLYTEXT : MV_NONE );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
- SwTxtNode * pTxtNd = pCrsr->GetNode().GetTxtNode();
+ SwTextNode * pTextNd = pCrsr->GetNode().GetTextNode();
- if ( pTxtNd && !IsTableMode() &&
+ if ( pTextNd && !IsTableMode() &&
// #i37515# No bInFrontOfLabel during selection
!pCrsr->HasMark() &&
- pTxtNd->HasVisibleNumberingOrBullet() )
+ pTextNd->HasVisibleNumberingOrBullet() )
{
aTmpState.bInFrontOfLabel = true; // #i27615#
}
@@ -792,12 +792,12 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock )
if( pFrm->Frm().IsInside( rAktCrsrPt ))
return bRet;
}
- else if( aPos.nNode.GetNode().IsCntntNode() )
+ else if( aPos.nNode.GetNode().IsContentNode() )
{
// in the same frame?
- SwFrm* pOld = static_cast<SwCntntNode&>(aPos.nNode.GetNode()).getLayoutFrm(
+ SwFrm* pOld = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrm(
GetLayout(), &m_aCharRect.Pos(), 0, false );
- SwFrm* pNew = static_cast<SwCntntNode&>(aPos.nNode.GetNode()).getLayoutFrm(
+ SwFrm* pNew = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrm(
GetLayout(), &aPt, 0, false );
if( pNew == pOld )
return bRet;
@@ -836,7 +836,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock )
}
else if( bOnlyText && !m_pCurCrsr->HasMark() )
{
- if( FindValidCntntNode( bOnlyText ) )
+ if( FindValidContentNode( bOnlyText ) )
{
// position cursor in a valid content
if( aPos == *pCrsr->GetPoint() )
@@ -863,10 +863,10 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock )
return bRet;
}
-void SwCrsrShell::TblCrsrToCursor()
+void SwCrsrShell::TableCrsrToCursor()
{
- OSL_ENSURE( m_pTblCrsr, "TblCrsrToCursor: Why?" );
- delete m_pTblCrsr, m_pTblCrsr = 0;
+ OSL_ENSURE( m_pTableCrsr, "TableCrsrToCursor: Why?" );
+ delete m_pTableCrsr, m_pTableCrsr = 0;
}
void SwCrsrShell::BlockCrsrToCrsr()
@@ -907,7 +907,7 @@ void SwCrsrShell::CrsrToBlockCrsr()
void SwCrsrShell::ClearMark()
{
// is there any GetMark?
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
{
std::vector<SwViewShell*> vShells;
for(SwViewShell& rShell : GetRingContainer())
@@ -915,13 +915,13 @@ void SwCrsrShell::ClearMark()
vShells.push_back(&rShell);
for(SwViewShell* pShell : vShells)
delete pShell;
- m_pTblCrsr->DeleteMark();
+ m_pTableCrsr->DeleteMark();
m_pCurCrsr->DeleteMark();
- *m_pCurCrsr->GetPoint() = *m_pTblCrsr->GetPoint();
- m_pCurCrsr->GetPtPos() = m_pTblCrsr->GetPtPos();
- delete m_pTblCrsr, m_pTblCrsr = 0;
+ *m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint();
+ m_pCurCrsr->GetPtPos() = m_pTableCrsr->GetPtPos();
+ delete m_pTableCrsr, m_pTableCrsr = 0;
m_pCurCrsr->SwSelPaintRects::Show();
}
else
@@ -965,8 +965,8 @@ bool SwCrsrShell::ChgCurrPam(
SET_CURR_SHELL( this );
// check if the SPoint is in a table selection
- if( bTstOnly && m_pTblCrsr )
- return m_pTblCrsr->IsInside( rPt );
+ if( bTstOnly && m_pTableCrsr )
+ return m_pTableCrsr->IsInside( rPt );
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
// search position <rPt> in document
@@ -999,21 +999,21 @@ bool SwCrsrShell::ChgCurrPam(
void SwCrsrShell::KillPams()
{
// Does any exist for deletion?
- if( !m_pTblCrsr && !m_pBlockCrsr && !m_pCurCrsr->IsMultiSelection() )
+ if( !m_pTableCrsr && !m_pBlockCrsr && !m_pCurCrsr->IsMultiSelection() )
return;
while( m_pCurCrsr->GetNext() != m_pCurCrsr )
delete m_pCurCrsr->GetNext();
m_pCurCrsr->SetColumnSelection( false );
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
{
// delete the ring of cursors
m_pCurCrsr->DeleteMark();
- *m_pCurCrsr->GetPoint() = *m_pTblCrsr->GetPoint();
- m_pCurCrsr->GetPtPos() = m_pTblCrsr->GetPtPos();
- delete m_pTblCrsr;
- m_pTblCrsr = 0;
+ *m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint();
+ m_pCurCrsr->GetPtPos() = m_pTableCrsr->GetPtPos();
+ delete m_pTableCrsr;
+ m_pTableCrsr = 0;
}
else if( m_pBlockCrsr )
{
@@ -1079,7 +1079,7 @@ bool SwCrsrShell::IsSttPara() const
{ return m_pCurCrsr->GetPoint()->nContent == 0; }
bool SwCrsrShell::IsEndPara() const
-{ return m_pCurCrsr->GetPoint()->nContent == m_pCurCrsr->GetCntntNode()->Len(); }
+{ return m_pCurCrsr->GetPoint()->nContent == m_pCurCrsr->GetContentNode()->Len(); }
bool SwCrsrShell::IsEndOfTable() const
{
@@ -1087,14 +1087,14 @@ bool SwCrsrShell::IsEndOfTable() const
{
return false;
}
- SwTableNode const*const pTableNode( IsCrsrInTbl() );
+ SwTableNode const*const pTableNode( IsCrsrInTable() );
if (!pTableNode)
{
return false;
}
SwEndNode const*const pEndTableNode(pTableNode->EndOfSectionNode());
SwNodeIndex const lastNode(*pEndTableNode, -2);
- SAL_WARN_IF(!lastNode.GetNode().GetTxtNode(), "sw.core",
+ SAL_WARN_IF(!lastNode.GetNode().GetTextNode(), "sw.core",
"text node expected");
return (lastNode == m_pCurCrsr->GetPoint()->nNode);
}
@@ -1130,7 +1130,7 @@ bool SwCrsrShell::GotoPage( sal_uInt16 nPage )
bool SwCrsrShell::GetCharRectAt(SwRect& rRect, const SwPosition* pPos)
{
- SwCntntFrm* pFrm = GetCurrFrm();
+ SwContentFrm* pFrm = GetCurrFrm();
return pFrm->GetCharRect( rRect, *pPos );
}
@@ -1139,7 +1139,7 @@ void SwCrsrShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
{
SET_CURR_SHELL( this );
// page number: first visible page or the one at the cursor
- const SwCntntFrm* pCFrm;
+ const SwContentFrm* pCFrm;
const SwPageFrm *pPg = 0;
if( !bAtCrsrPos || 0 == (pCFrm = GetCurrFrm( bCalcFrm )) ||
@@ -1258,7 +1258,7 @@ void SwCrsrShell::Paint( const Rectangle &rRect)
if( m_bHasFocus && !m_bBasicHideCrsr )
{
- SwShellCrsr* pAktCrsr = m_pTblCrsr ? m_pTblCrsr : m_pCurCrsr;
+ SwShellCrsr* pAktCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr;
if( !ActionPend() )
{
@@ -1314,7 +1314,7 @@ void SwCrsrShell::UpdateCrsrPos()
SwShellCrsr* pShellCrsr = getShellCrsr( true );
Size aOldSz( GetDocSize() );
- if( isInHiddenTxtFrm(pShellCrsr) )
+ if( isInHiddenTextFrm(pShellCrsr) )
{
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
@@ -1351,18 +1351,18 @@ static bool lcl_CheckHiddenSection( SwNodeIndex& rIdx )
static void lcl_CheckHiddenPara( SwPosition& rPos )
{
SwNodeIndex aTmp( rPos.nNode );
- SwTxtNode* pTxtNd = aTmp.GetNode().GetTxtNode();
- while( pTxtNd && pTxtNd->HasHiddenCharAttribute( true ) )
+ SwTextNode* pTextNd = aTmp.GetNode().GetTextNode();
+ while( pTextNd && pTextNd->HasHiddenCharAttribute( true ) )
{
- SwCntntNode* pCntnt = aTmp.GetNodes().GoNext( &aTmp );
- if ( pCntnt && pCntnt->IsTxtNode() )
- pTxtNd = pCntnt->GetTxtNode();
+ SwContentNode* pContent = aTmp.GetNodes().GoNext( &aTmp );
+ if ( pContent && pContent->IsTextNode() )
+ pTextNd = pContent->GetTextNode();
else
- pTxtNd = 0;
+ pTextNd = 0;
}
- if ( pTxtNd )
- rPos = SwPosition( aTmp, SwIndex( pTxtNd, 0 ) );
+ if ( pTextNd )
+ rPos = SwPosition( aTmp, SwIndex( pTextNd, 0 ) );
}
// #i27301# - helper class that notifies the accessibility about invalid text
@@ -1409,14 +1409,14 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
CheckRange( m_pCurCrsr ); // overlapping ranges
if( !bIdleEnd )
- CheckTblBoxCntnt();
+ CheckTableBoxContent();
// If the current cursor is in a table and point/mark in different boxes,
- // then the table mode is active (also if it is already active: m_pTblCrsr)
+ // then the table mode is active (also if it is already active: m_pTableCrsr)
SwPaM* pTstCrsr = getShellCrsr( true );
if( pTstCrsr->HasMark() && !m_pBlockCrsr &&
- mpDoc->IsIdxInTbl( pTstCrsr->GetPoint()->nNode ) &&
- ( m_pTblCrsr ||
+ mpDoc->IsIdxInTable( pTstCrsr->GetPoint()->nNode ) &&
+ ( m_pTableCrsr ||
pTstCrsr->GetNode( true ).StartOfSectionNode() !=
pTstCrsr->GetNode( false ).StartOfSectionNode() ) && !mbSelectAll)
{
@@ -1436,36 +1436,36 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
lcl_CheckHiddenPara( *pITmpCrsr->GetMark() );
}
- SwCntntFrm *pTblFrm = pPos->nNode.GetNode().GetCntntNode()->
+ SwContentFrm *pTableFrm = pPos->nNode.GetNode().GetContentNode()->
getLayoutFrm( GetLayout(), &aTmpPt, pPos, false );
- OSL_ENSURE( pTblFrm, "Tabelle Crsr nicht im Content ??" );
+ OSL_ENSURE( pTableFrm, "Tabelle Crsr nicht im Content ??" );
// --> Make code robust. The table cursor may point
// to a table in a currently inactive header.
- SwTabFrm *pTab = pTblFrm ? pTblFrm->FindTabFrm() : 0;
+ SwTabFrm *pTab = pTableFrm ? pTableFrm->FindTabFrm() : 0;
if ( pTab && pTab->GetTable()->GetRowsToRepeat() > 0 )
{
// First check if point is in repeated headline:
- bool bInRepeatedHeadline = pTab->IsFollow() && pTab->IsInHeadline( *pTblFrm );
+ bool bInRepeatedHeadline = pTab->IsFollow() && pTab->IsInHeadline( *pTableFrm );
// Second check if mark is in repeated headline:
if ( !bInRepeatedHeadline )
{
- SwCntntFrm* pMarkTblFrm = pITmpCrsr->GetCntntNode( false )->
+ SwContentFrm* pMarkTableFrm = pITmpCrsr->GetContentNode( false )->
getLayoutFrm( GetLayout(), &aTmpMk, pITmpCrsr->GetMark(), false );
- OSL_ENSURE( pMarkTblFrm, "Tabelle Crsr nicht im Content ??" );
+ OSL_ENSURE( pMarkTableFrm, "Tabelle Crsr nicht im Content ??" );
- if ( pMarkTblFrm )
+ if ( pMarkTableFrm )
{
- SwTabFrm* pMarkTab = pMarkTblFrm->FindTabFrm();
+ SwTabFrm* pMarkTab = pMarkTableFrm->FindTabFrm();
OSL_ENSURE( pMarkTab, "Tabelle Crsr nicht im Content ??" );
// Make code robust:
if ( pMarkTab )
{
- bInRepeatedHeadline = pMarkTab->IsFollow() && pMarkTab->IsInHeadline( *pMarkTblFrm );
+ bInRepeatedHeadline = pMarkTab->IsFollow() && pMarkTab->IsInHeadline( *pMarkTableFrm );
}
}
}
@@ -1473,20 +1473,20 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
// No table cursor in repeated headlines:
if ( bInRepeatedHeadline )
{
- pTblFrm = 0;
+ pTableFrm = 0;
SwPosSection fnPosSect = *pPos < *pITmpCrsr->GetMark()
? fnSectionStart
: fnSectionEnd;
// then only select inside the Box
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
{
m_pCurCrsr->SetMark();
- *m_pCurCrsr->GetMark() = *m_pTblCrsr->GetMark();
- m_pCurCrsr->GetMkPos() = m_pTblCrsr->GetMkPos();
- m_pTblCrsr->DeleteMark();
- m_pTblCrsr->SwSelPaintRects::Hide();
+ *m_pCurCrsr->GetMark() = *m_pTableCrsr->GetMark();
+ m_pCurCrsr->GetMkPos() = m_pTableCrsr->GetMkPos();
+ m_pTableCrsr->DeleteMark();
+ m_pTableCrsr->SwSelPaintRects::Hide();
}
*m_pCurCrsr->GetPoint() = *m_pCurCrsr->GetMark();
@@ -1495,18 +1495,18 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
}
// we really want a table selection
- if( pTab && pTblFrm )
+ if( pTab && pTableFrm )
{
- if( !m_pTblCrsr )
+ if( !m_pTableCrsr )
{
- m_pTblCrsr = new SwShellTableCrsr( *this,
+ m_pTableCrsr = new SwShellTableCrsr( *this,
*m_pCurCrsr->GetMark(), m_pCurCrsr->GetMkPos(),
*pPos, aTmpPt );
m_pCurCrsr->DeleteMark();
m_pCurCrsr->SwSelPaintRects::Hide();
- CheckTblBoxCntnt();
- if(!m_pTblCrsr)
+ CheckTableBoxContent();
+ if(!m_pTableCrsr)
{
SAL_WARN("sw", "fdo#74854: "
"this should not happen, but better lose the selection "
@@ -1517,13 +1517,13 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.bRealHeight = true;
- if( !pTblFrm->GetCharRect( m_aCharRect, *m_pTblCrsr->GetPoint(), &aTmpState ) )
+ if( !pTableFrm->GetCharRect( m_aCharRect, *m_pTableCrsr->GetPoint(), &aTmpState ) )
{
Point aCentrPt( m_aCharRect.Center() );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
- pTblFrm->GetCrsrOfst( m_pTblCrsr->GetPoint(), aCentrPt, &aTmpState );
+ pTableFrm->GetCrsrOfst( m_pTableCrsr->GetPoint(), aCentrPt, &aTmpState );
bool const bResult =
- pTblFrm->GetCharRect( m_aCharRect, *m_pTblCrsr->GetPoint() );
+ pTableFrm->GetCharRect( m_aCharRect, *m_pTableCrsr->GetPoint() );
OSL_ENSURE( bResult, "GetCharRect failed." );
(void) bResult; // non-debug: unused
}
@@ -1534,7 +1534,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
(HasSelection() || eFlags & SwCrsrShell::READONLY ||
!IsCrsrReadonly()) )
{
- SwFrm* pBoxFrm = pTblFrm;
+ SwFrm* pBoxFrm = pTableFrm;
while( pBoxFrm && !pBoxFrm->IsCellFrm() )
pBoxFrm = pBoxFrm->GetUpper();
if( pBoxFrm && pBoxFrm->Frm().HasArea() )
@@ -1544,14 +1544,14 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
}
// let Layout create the Cursors in the Boxes
- if( m_pTblCrsr->IsCrsrMovedUpdt() )
- GetLayout()->MakeTblCrsrs( *m_pTblCrsr );
+ if( m_pTableCrsr->IsCrsrMovedUpdate() )
+ GetLayout()->MakeTableCrsrs( *m_pTableCrsr );
if( m_bHasFocus && !m_bBasicHideCrsr )
- m_pTblCrsr->Show();
+ m_pTableCrsr->Show();
// set Cursor-Points to the new Positions
- m_pTblCrsr->GetPtPos().setX(m_aCharRect.Left());
- m_pTblCrsr->GetPtPos().setY(m_aCharRect.Top());
+ m_pTableCrsr->GetPtPos().setX(m_aCharRect.Left());
+ m_pTableCrsr->GetPtPos().setY(m_aCharRect.Top());
if( m_bSVCrsrVis )
{
@@ -1561,21 +1561,21 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
m_pVisCrsr->Show(); // show again
}
m_eMvState = MV_NONE; // state for cursor travelling - GetCrsrOfst
- if( pTblFrm && Imp()->IsAccessible() )
- Imp()->InvalidateAccessibleCursorPosition( pTblFrm );
+ if( pTableFrm && Imp()->IsAccessible() )
+ Imp()->InvalidateAccessibleCursorPosition( pTableFrm );
return;
}
}
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
{
// delete Ring
while( m_pCurCrsr->GetNext() != m_pCurCrsr )
delete m_pCurCrsr->GetNext();
m_pCurCrsr->DeleteMark();
- *m_pCurCrsr->GetPoint() = *m_pTblCrsr->GetPoint();
- m_pCurCrsr->GetPtPos() = m_pTblCrsr->GetPtPos();
- delete m_pTblCrsr, m_pTblCrsr = 0;
+ *m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint();
+ m_pCurCrsr->GetPtPos() = m_pTableCrsr->GetPtPos();
+ delete m_pTableCrsr, m_pTableCrsr = 0;
}
m_pVisCrsr->Hide(); // always hide visible Cursor
@@ -1591,7 +1591,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
( !mpDoc->GetDocShell() ||
!mpDoc->GetDocShell()->IsReadOnly() || m_bAllProtect )) ) )
{
- if( !FindValidCntntNode( !HasDrawView() ||
+ if( !FindValidContentNode( !HasDrawView() ||
0 == Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount()))
{
// everything protected/hidden -> special mode
@@ -1637,18 +1637,18 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
bool bPointIsStart = ( rCmp.Start() == rCmp.GetPoint() );
// move point; forward if it's the start, backwards if it's the end
- if( ! rCmp.GetPoint()->nNode.GetNode().IsCntntNode() )
+ if( ! rCmp.GetPoint()->nNode.GetNode().IsContentNode() )
rCmp.Move( bPointIsStart ? fnMoveForward : fnMoveBackward,
- fnGoCntnt );
+ fnGoContent );
// move mark (if exists); forward if it's the start, else backwards
if( rCmp.HasMark() )
{
- if( ! rCmp.GetMark()->nNode.GetNode().IsCntntNode() )
+ if( ! rCmp.GetMark()->nNode.GetNode().IsContentNode() )
{
rCmp.Exchange();
rCmp.Move( !bPointIsStart ? fnMoveForward : fnMoveBackward,
- fnGoCntnt );
+ fnGoContent );
rCmp.Exchange();
}
}
@@ -1656,7 +1656,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
SwRect aOld( m_aCharRect );
bool bFirst = true;
- SwCntntFrm *pFrm;
+ SwContentFrm *pFrm;
int nLoopCnt = 100;
SwShellCrsr* pShellCrsr = getShellCrsr( true );
@@ -1664,7 +1664,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
bool bAgainst;
do {
bAgainst = false;
- pFrm = pShellCrsr->GetCntntNode()->getLayoutFrm( GetLayout(),
+ pFrm = pShellCrsr->GetContentNode()->getLayoutFrm( GetLayout(),
&pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), false );
// if the Frm doesn't exist anymore, the complete Layout has to be
// created, because there used to be a Frm here!
@@ -1673,7 +1673,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
do
{
CalcLayout();
- pFrm = pShellCrsr->GetCntntNode()->getLayoutFrm( GetLayout(),
+ pFrm = pShellCrsr->GetContentNode()->getLayoutFrm( GetLayout(),
&pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), false );
} while( !pFrm );
}
@@ -1690,7 +1690,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
{
// look for a valid position
bool bChgState = true;
- if( !FindValidCntntNode(!HasDrawView() ||
+ if( !FindValidContentNode(!HasDrawView() ||
0 == Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount()))
{
// everything is protected / hidden -> special Mode
@@ -1809,8 +1809,8 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
if( !bIdleEnd && m_bHasFocus && !m_bBasicHideCrsr )
{
- if( m_pTblCrsr )
- m_pTblCrsr->SwSelPaintRects::Show();
+ if( m_pTableCrsr )
+ m_pTableCrsr->SwSelPaintRects::Show();
else
{
m_pCurCrsr->SwSelPaintRects::Show();
@@ -1858,7 +1858,7 @@ void SwCrsrShell::RefreshBlockCursor()
OSL_ENSURE( m_pBlockCrsr, "Don't call me without a block cursor" );
SwShellCrsr &rBlock = m_pBlockCrsr->getShellCrsr();
Point aPt = rBlock.GetPtPos();
- SwCntntFrm* pFrm = rBlock.GetCntntNode()->getLayoutFrm( GetLayout(), &aPt, rBlock.GetPoint(), false );
+ SwContentFrm* pFrm = rBlock.GetContentNode()->getLayoutFrm( GetLayout(), &aPt, rBlock.GetPoint(), false );
Point aMk;
if( m_pBlockCrsr->getEndPoint() && m_pBlockCrsr->getStartPoint() )
{
@@ -1970,7 +1970,7 @@ void SwCrsrShell::Push()
// fdo#60513: if we have a table cursor, copy that; else copy current.
// This seems to work because UpdateCrsr() will fix this up on Pop(),
// then MakeBoxSels() will re-create the current m_pCurCrsr cell ring.
- SwShellCrsr *const pCurrent((m_pTblCrsr) ? m_pTblCrsr : m_pCurCrsr);
+ SwShellCrsr *const pCurrent((m_pTableCrsr) ? m_pTableCrsr : m_pCurCrsr);
m_pCrsrStk = new SwShellCrsr( *this, *pCurrent->GetPoint(),
pCurrent->GetPtPos(), m_pCrsrStk );
@@ -2092,7 +2092,7 @@ void SwCrsrShell::HideCrsrs()
m_pVisCrsr->Hide();
}
// revoke inversion of SSelection
- SwShellCrsr* pAktCrsr = m_pTblCrsr ? m_pTblCrsr : m_pCurCrsr;
+ SwShellCrsr* pAktCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr;
pAktCrsr->Hide();
}
@@ -2102,7 +2102,7 @@ void SwCrsrShell::ShowCrsrs( bool bCrsrVis )
return;
SET_CURR_SHELL( this );
- SwShellCrsr* pAktCrsr = m_pTblCrsr ? m_pTblCrsr : m_pCurCrsr;
+ SwShellCrsr* pAktCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr;
pAktCrsr->Show();
if( m_bSVCrsrVis && bCrsrVis ) // also show SV cursor again
@@ -2114,7 +2114,7 @@ void SwCrsrShell::ShowCrsr()
if( !m_bBasicHideCrsr )
{
m_bSVCrsrVis = true;
- m_pCurCrsr->SetShowTxtInputFldOverlay( true );
+ m_pCurCrsr->SetShowTextInputFieldOverlay( true );
if (isTiledRendering())
libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr());
@@ -2130,7 +2130,7 @@ void SwCrsrShell::HideCrsr()
m_bSVCrsrVis = false;
// possibly reverse selected areas!!
SET_CURR_SHELL( this );
- m_pCurCrsr->SetShowTxtInputFldOverlay( false );
+ m_pCurCrsr->SetShowTextInputFieldOverlay( false );
m_pVisCrsr->Hide();
if (isTiledRendering())
@@ -2158,11 +2158,11 @@ void SwCrsrShell::ShGetFcs( bool bUpdate )
}
/** Get current frame in which the cursor is positioned. */
-SwCntntFrm *SwCrsrShell::GetCurrFrm( const bool bCalcFrm ) const
+SwContentFrm *SwCrsrShell::GetCurrFrm( const bool bCalcFrm ) const
{
SET_CURR_SHELL( (SwViewShell*)this );
- SwCntntFrm *pRet = 0;
- SwCntntNode *pNd = m_pCurCrsr->GetCntntNode();
+ SwContentFrm *pRet = 0;
+ SwContentNode *pNd = m_pCurCrsr->GetContentNode();
if ( pNd )
{
if ( bCalcFrm )
@@ -2201,7 +2201,7 @@ void SwCrsrShell::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
nWhich == RES_ATTRSET_CHG ))
// messages are not forwarded
// #i6681#: RES_UPDATE_ATTR is implicitly unset in
- // SwTxtNode::Insert(SwTxtHint*, sal_uInt16); we react here and thus do
+ // SwTextNode::Insert(SwTextHint*, sal_uInt16); we react here and thus do
// not need to send the expensive RES_FMT_CHG in Insert.
CallChgLnk();
@@ -2235,36 +2235,36 @@ void SwCrsrShell::CallChgLnk()
}
/// get selected text of a node at current cursor
-OUString SwCrsrShell::GetSelTxt() const
+OUString SwCrsrShell::GetSelText() const
{
- OUString aTxt;
+ OUString aText;
if( m_pCurCrsr->GetPoint()->nNode.GetIndex() ==
m_pCurCrsr->GetMark()->nNode.GetIndex() )
{
- SwTxtNode* pTxtNd = m_pCurCrsr->GetNode().GetTxtNode();
- if( pTxtNd )
+ SwTextNode* pTextNd = m_pCurCrsr->GetNode().GetTextNode();
+ if( pTextNd )
{
const sal_Int32 nStt = m_pCurCrsr->Start()->nContent.GetIndex();
- aTxt = pTxtNd->GetExpandTxt( nStt,
+ aText = pTextNd->GetExpandText( nStt,
m_pCurCrsr->End()->nContent.GetIndex() - nStt );
}
}
- return aTxt;
+ return aText;
}
/// get text only from current cursor position (until end of node)
OUString SwCrsrShell::GetText() const
{
- OUString aTxt;
+ OUString aText;
if( m_pCurCrsr->GetPoint()->nNode.GetIndex() ==
m_pCurCrsr->GetMark()->nNode.GetIndex() )
{
- SwTxtNode* pTxtNd = m_pCurCrsr->GetNode().GetTxtNode();
- if( pTxtNd )
- aTxt = pTxtNd->GetTxt().copy(
+ SwTextNode* pTextNd = m_pCurCrsr->GetNode().GetTextNode();
+ if( pTextNd )
+ aText = pTextNd->GetText().copy(
m_pCurCrsr->GetPoint()->nContent.GetIndex() );
}
- return aTxt;
+ return aText;
}
/** get the nth character of the current SSelection
@@ -2279,12 +2279,12 @@ sal_Unicode SwCrsrShell::GetChar( bool bEnd, long nOffset )
const SwPosition* pPos = !m_pCurCrsr->HasMark() ? m_pCurCrsr->GetPoint()
: bEnd ? m_pCurCrsr->End() : m_pCurCrsr->Start();
- SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- if( !pTxtNd )
+ SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode();
+ if( !pTextNd )
return 0;
const sal_Int32 nPos = pPos->nContent.GetIndex();
- const OUString& rStr = pTxtNd->GetTxt();
+ const OUString& rStr = pTextNd->GetText();
sal_Unicode cCh = 0;
if (((nPos+nOffset) >= 0 ) && (nPos+nOffset) < rStr.getLength())
@@ -2304,13 +2304,13 @@ bool SwCrsrShell::ExtendSelection( bool bEnd, sal_Int32 nCount )
return false; // no selection
SwPosition* pPos = bEnd ? m_pCurCrsr->End() : m_pCurCrsr->Start();
- SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- OSL_ENSURE( pTxtNd, "no text node; how should this then be extended?" );
+ SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode();
+ OSL_ENSURE( pTextNd, "no text node; how should this then be extended?" );
sal_Int32 nPos = pPos->nContent.GetIndex();
if( bEnd )
{
- if ((nPos + nCount) <= pTxtNd->GetTxt().getLength())
+ if ((nPos + nCount) <= pTextNd->GetText().getLength())
nPos = nPos + nCount;
else
return false; // not possible
@@ -2347,17 +2347,17 @@ bool SwCrsrShell::SetVisCrsr( const Point &rPt )
SetInFrontOfLabel( false ); // #i27615#
// show only in TextNodes
- SwTxtNode* pTxtNd = aPos.nNode.GetNode().GetTxtNode();
- if( !pTxtNd )
+ SwTextNode* pTextNd = aPos.nNode.GetNode().GetTextNode();
+ if( !pTextNd )
return false;
- const SwSectionNode* pSectNd = pTxtNd->FindSectionNode();
+ const SwSectionNode* pSectNd = pTextNd->FindSectionNode();
if( pSectNd && (pSectNd->GetSection().IsHiddenFlag() ||
( !IsReadOnlyAvailable() &&
pSectNd->GetSection().IsProtectFlag())) )
return false;
- SwCntntFrm *pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt, &aPos );
+ SwContentFrm *pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt, &aPos );
if ( Imp()->IsIdleAction() )
pFrm->PrepareCrsr();
SwRect aTmp( m_aCharRect );
@@ -2423,9 +2423,9 @@ bool SwCrsrShell::IsStartOfDoc() const
if( m_pCurCrsr->GetPoint()->nContent.GetIndex() )
return false;
- // after EndOfIcons comes the content selection (EndNd+StNd+CntntNd)
+ // after EndOfIcons comes the content selection (EndNd+StNd+ContentNd)
SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfExtras(), 2 );
- if( !aIdx.GetNode().IsCntntNode() )
+ if( !aIdx.GetNode().IsContentNode() )
GetDoc()->GetNodes().GoNext( &aIdx );
return aIdx == m_pCurCrsr->GetPoint()->nNode;
}
@@ -2433,7 +2433,7 @@ bool SwCrsrShell::IsStartOfDoc() const
bool SwCrsrShell::IsEndOfDoc() const
{
SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfContent(), -1 );
- SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
+ SwContentNode* pCNd = aIdx.GetNode().GetContentNode();
if( !pCNd )
pCNd = SwNodes::GoPrevious( &aIdx );
@@ -2448,19 +2448,19 @@ bool SwCrsrShell::IsEndOfDoc() const
This is needed for Drag&Drop/ Clipboard-paste in tables.
*/
-bool SwCrsrShell::ParkTblCrsr()
+bool SwCrsrShell::ParkTableCrsr()
{
- if( !m_pTblCrsr )
+ if( !m_pTableCrsr )
return false;
- m_pTblCrsr->ParkCrsr();
+ m_pTableCrsr->ParkCrsr();
while( m_pCurCrsr->GetNext() != m_pCurCrsr )
delete m_pCurCrsr->GetNext();
// *always* move cursor's Point and Mark
m_pCurCrsr->DeleteMark();
- *m_pCurCrsr->GetPoint() = *m_pTblCrsr->GetPoint();
+ *m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint();
return true;
}
@@ -2572,16 +2572,16 @@ void SwCrsrShell::ParkCrsr( const SwNodeIndex &rIdx )
pSh->_ParkPams( pNew, &pSh->m_pCrsrStk );
pSh->_ParkPams( pNew, &pSh->m_pCurCrsr );
- if( pSh->m_pTblCrsr )
+ if( pSh->m_pTableCrsr )
{
// set table cursor always to 0 and the current one always to
// the beginning of the table
- SwPaM* pTCrsr = pSh->GetTblCrs();
- SwNode* pTblNd = pTCrsr->GetPoint()->nNode.GetNode().FindTableNode();
- if ( pTblNd )
+ SwPaM* pTCrsr = pSh->GetTableCrs();
+ SwNode* pTableNd = pTCrsr->GetPoint()->nNode.GetNode().FindTableNode();
+ if ( pTableNd )
{
pTCrsr->DeleteMark();
- pSh->m_pCurCrsr->GetPoint()->nNode = *pTblNd;
+ pSh->m_pCurCrsr->GetPoint()->nNode = *pTableNd;
}
}
}
@@ -2599,13 +2599,13 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, vcl::Window *pInitWin )
, SwModify( 0 )
, m_pCrsrStk( 0 )
, m_pBlockCrsr( 0 )
- , m_pTblCrsr( 0 )
+ , m_pTableCrsr( 0 )
, m_pBoxIdx( 0 )
, m_pBoxPtr( 0 )
, m_nUpDownX(0)
, m_nLeftFrmPos(0)
, m_nAktNode(0)
- , m_nAktCntnt(0)
+ , m_nAktContent(0)
, m_nAktNdTyp(0)
, m_bAktSelection(false)
, m_nCrsrMove( 0 )
@@ -2618,10 +2618,10 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, vcl::Window *pInitWin )
SET_CURR_SHELL( this );
// only keep the position of the current cursor of the copy shell
m_pCurCrsr = new SwShellCrsr( *this, *(rShell.m_pCurCrsr->GetPoint()) );
- m_pCurCrsr->GetCntntNode()->Add( this );
+ m_pCurCrsr->GetContentNode()->Add( this );
m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd =
- m_bGCAttr = m_bIgnoreReadonly = m_bSelTblCells = m_bBasicHideCrsr =
+ m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCrsr =
m_bOverwriteCrsr = false;
m_bCallChgLnk = m_bHasFocus = m_bAutoUpdateCells = true;
m_bSVCrsrVis = true;
@@ -2641,13 +2641,13 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, vcl::Window *pInitWin,
, SwModify( 0 )
, m_pCrsrStk( 0 )
, m_pBlockCrsr( 0 )
- , m_pTblCrsr( 0 )
+ , m_pTableCrsr( 0 )
, m_pBoxIdx( 0 )
, m_pBoxPtr( 0 )
, m_nUpDownX(0)
, m_nLeftFrmPos(0)
, m_nAktNode(0)
- , m_nAktCntnt(0)
+ , m_nAktContent(0)
, m_nAktNdTyp(0)
, m_bAktSelection(false)
, m_nCrsrMove( 0 )
@@ -2662,7 +2662,7 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, vcl::Window *pInitWin,
SwNodes& rNds = rDoc.GetNodes();
SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() );
- SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to the first ContentNode
+ SwContentNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to the first ContentNode
m_pCurCrsr = new SwShellCrsr( *this, SwPosition( aNodeIdx, SwIndex( pCNd, 0 )));
@@ -2671,7 +2671,7 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, vcl::Window *pInitWin,
pCNd->Add( this );
m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd =
- m_bGCAttr = m_bIgnoreReadonly = m_bSelTblCells = m_bBasicHideCrsr =
+ m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCrsr =
m_bOverwriteCrsr = false;
m_bCallChgLnk = m_bHasFocus = m_bAutoUpdateCells = true;
m_bSVCrsrVis = true;
@@ -2689,13 +2689,13 @@ SwCrsrShell::~SwCrsrShell()
{
// if it is not the last view then at least the field should be updated
if( !unique() )
- CheckTblBoxCntnt( m_pCurCrsr->GetPoint() );
+ CheckTableBoxContent( m_pCurCrsr->GetPoint() );
else
- ClearTblBoxCntnt();
+ ClearTableBoxContent();
delete m_pVisCrsr;
delete m_pBlockCrsr;
- delete m_pTblCrsr;
+ delete m_pTableCrsr;
// release cursors
while(m_pCurCrsr->GetNext() != m_pCurCrsr)
@@ -2718,8 +2718,8 @@ SwCrsrShell::~SwCrsrShell()
SwShellCrsr* SwCrsrShell::getShellCrsr( bool bBlock )
{
- if( m_pTblCrsr )
- return m_pTblCrsr;
+ if( m_pTableCrsr )
+ return m_pTableCrsr;
if( m_pBlockCrsr && bBlock )
return &m_pBlockCrsr->getShellCrsr();
return m_pCurCrsr;
@@ -2742,13 +2742,13 @@ bool SwCrsrShell::ShouldWait() const
pPam->End()->nNode.GetIndex();
}
-size_t SwCrsrShell::UpdateTblSelBoxes()
+size_t SwCrsrShell::UpdateTableSelBoxes()
{
- if (m_pTblCrsr && (m_pTblCrsr->IsChgd() || !m_pTblCrsr->GetSelectedBoxesCount()))
+ if (m_pTableCrsr && (m_pTableCrsr->IsChgd() || !m_pTableCrsr->GetSelectedBoxesCount()))
{
- GetLayout()->MakeTblCrsrs( *m_pTblCrsr );
+ GetLayout()->MakeTableCrsrs( *m_pTableCrsr );
}
- return (m_pTblCrsr) ? m_pTblCrsr->GetSelectedBoxesCount() : 0;
+ return (m_pTableCrsr) ? m_pTableCrsr->GetSelectedBoxesCount() : 0;
}
/// show the current selected "object"
@@ -2787,9 +2787,9 @@ void SwCrsrShell::MakeSelVisible()
}
/// search a valid content position (not protected/hidden)
-bool SwCrsrShell::FindValidCntntNode( bool bOnlyText )
+bool SwCrsrShell::FindValidContentNode( bool bOnlyText )
{
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
{
OSL_ENSURE( false, "Did not remove table selection!" );
return false;
@@ -2807,8 +2807,8 @@ bool SwCrsrShell::FindValidCntntNode( bool bOnlyText )
SwNodeIndex& rNdIdx = m_pCurCrsr->GetPoint()->nNode;
sal_uLong nNdIdx = rNdIdx.GetIndex(); // keep backup
SwNodes& rNds = mpDoc->GetNodes();
- SwCntntNode* pCNd = rNdIdx.GetNode().GetCntntNode();
- const SwCntntFrm * pFrm;
+ SwContentNode* pCNd = rNdIdx.GetNode().GetContentNode();
+ const SwContentFrm * pFrm;
if( pCNd && 0 != (pFrm = pCNd->getLayoutFrm( GetLayout(), 0, m_pCurCrsr->GetPoint(), false)) &&
!IsReadOnlyAvailable() && pFrm->IsProtected() &&
@@ -2834,7 +2834,7 @@ bool SwCrsrShell::FindValidCntntNode( bool bOnlyText )
}
*m_pCurCrsr->GetPoint() = *aPam.GetPoint();
}
- else if( bOnlyText && pCNd && pCNd->IsNoTxtNode() )
+ else if( bOnlyText && pCNd && pCNd->IsNoTextNode() )
{
// set to beginning of document
rNdIdx = mpDoc->GetNodes().GetEndOfExtras();
@@ -2857,7 +2857,7 @@ bool SwCrsrShell::FindValidCntntNode( bool bOnlyText )
// move forward into non-protected area.
SwPaM aPam( rNdIdx.GetNode(), 0 );
while( aPam.GetNode().IsProtect() &&
- aPam.Move( fnMoveForward, fnGoCntnt ) )
+ aPam.Move( fnMoveForward, fnGoContent ) )
; // nothing to do in the loop; the aPam.Move does the moving!
// didn't work? then go backwards!
@@ -2866,7 +2866,7 @@ bool SwCrsrShell::FindValidCntntNode( bool bOnlyText )
SwPaM aTmpPaM( rNdIdx.GetNode(), 0 );
aPam = aTmpPaM;
while( aPam.GetNode().IsProtect() &&
- aPam.Move( fnMoveBackward, fnGoCntnt ) )
+ aPam.Move( fnMoveBackward, fnGoContent ) )
; // nothing to do in the loop; the aPam.Move does the moving!
}
@@ -2930,7 +2930,7 @@ bool SwCrsrShell::FindValidCntntNode( bool bOnlyText )
// also check for Fly - might be protected as well
if( 0 == (pFrm = pCNd->getLayoutFrm( GetLayout(), 0, 0, false)) ||
( !IsReadOnlyAvailable() && pFrm->IsProtected() ) ||
- ( bOnlyText && pCNd->IsNoTxtNode() ) )
+ ( bOnlyText && pCNd->IsNoTextNode() ) )
{
// continue search
bOk = false;
@@ -2949,13 +2949,13 @@ bool SwCrsrShell::FindValidCntntNode( bool bOnlyText )
}
if( bOk )
{
- pCNd = rNdIdx.GetNode().GetCntntNode();
- const sal_Int32 nCntnt = rNdIdx.GetIndex() < nNdIdx ? pCNd->Len() : 0;
- m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, nCntnt );
+ pCNd = rNdIdx.GetNode().GetContentNode();
+ const sal_Int32 nContent = rNdIdx.GetIndex() < nNdIdx ? pCNd->Len() : 0;
+ m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, nContent );
}
else
{
- pCNd = rNdIdx.GetNode().GetCntntNode();
+ pCNd = rNdIdx.GetNode().GetContentNode();
// if cursor in hidden frame, always move it
if( !pCNd || !pCNd->getLayoutFrm( GetLayout(), 0, 0, false) )
{
@@ -2978,9 +2978,9 @@ bool SwCrsrShell::IsCrsrReadonly() const
const SwSection* pSection;
if( pFrm && pFrm->IsInFly() &&
- (pFly = pFrm->FindFlyFrm())->GetFmt()->GetEditInReadonly().GetValue() &&
+ (pFly = pFrm->FindFlyFrm())->GetFormat()->GetEditInReadonly().GetValue() &&
pFly->Lower() &&
- !pFly->Lower()->IsNoTxtFrm() &&
+ !pFly->Lower()->IsNoTextFrm() &&
!GetDrawView()->GetMarkedObjectList().GetMarkCount() )
{
return false;
@@ -2992,7 +2992,7 @@ bool SwCrsrShell::IsCrsrReadonly() const
{
return false;
}
- else if ( !IsMultiSelection() && CrsrInsideInputFld() )
+ else if ( !IsMultiSelection() && CrsrInsideInputField() )
{
return false;
}
@@ -3027,10 +3027,10 @@ bool SwCrsrShell::HasReadonlySel(bool bAnnotationMode) const
// If protected area is to be ignored, then selections are never read-only.
if ((IsReadOnlyAvailable() || GetViewOptions()->IsFormView()) && !GetViewOptions()->IsIgnoreProtectedArea())
{
- if ( m_pTblCrsr != NULL )
+ if ( m_pTableCrsr != NULL )
{
- bRet = m_pTblCrsr->HasReadOnlyBoxSel()
- || m_pTblCrsr->HasReadonlySel( GetViewOptions()->IsFormView() );
+ bRet = m_pTableCrsr->HasReadOnlyBoxSel()
+ || m_pTableCrsr->HasReadonlySel( GetViewOptions()->IsFormView() );
}
else
{
@@ -3062,7 +3062,7 @@ bool SwCrsrShell::IsSelFullPara() const
nStt = nEnd;
nEnd = nTmp;
}
- const SwCntntNode* pCNd = m_pCurCrsr->GetCntntNode();
+ const SwContentNode* pCNd = m_pCurCrsr->GetContentNode();
bRet = pCNd && !nStt && nEnd == pCNd->Len();
}
return bRet;
@@ -3105,7 +3105,7 @@ bool SwCrsrShell::SelectHiddenRange()
if ( !GetViewOptions()->IsShowHiddenChar() && !m_pCurCrsr->HasMark() )
{
SwPosition& rPt = *m_pCurCrsr->GetPoint();
- const SwTxtNode* pNode = rPt.nNode.GetNode().GetTxtNode();
+ const SwTextNode* pNode = rPt.nNode.GetNode().GetTextNode();
if ( pNode )
{
const sal_Int32 nPos = rPt.nContent.GetIndex();
@@ -3134,9 +3134,9 @@ sal_uLong SwCrsrShell::Find( const SearchOptions& rSearchOpt,
FindRanges eRng,
bool bReplace )
{
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
GetCrsr();
- delete m_pTblCrsr, m_pTblCrsr = 0;
+ delete m_pTableCrsr, m_pTableCrsr = 0;
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
sal_uLong nRet = m_pCurCrsr->Find( rSearchOpt, bSearchInNotes, eStart, eEnd,
bCancel, eRng, bReplace );
@@ -3145,18 +3145,18 @@ sal_uLong SwCrsrShell::Find( const SearchOptions& rSearchOpt,
return nRet;
}
-sal_uLong SwCrsrShell::Find( const SwTxtFmtColl& rFmtColl,
+sal_uLong SwCrsrShell::Find( const SwTextFormatColl& rFormatColl,
SwDocPositions eStart, SwDocPositions eEnd,
bool& bCancel,
FindRanges eRng,
- const SwTxtFmtColl* pReplFmt )
+ const SwTextFormatColl* pReplFormat )
{
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
GetCrsr();
- delete m_pTblCrsr, m_pTblCrsr = 0;
+ delete m_pTableCrsr, m_pTableCrsr = 0;
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
- sal_uLong nRet = m_pCurCrsr->Find( rFmtColl, eStart, eEnd, bCancel, eRng,
- pReplFmt );
+ sal_uLong nRet = m_pCurCrsr->Find( rFormatColl, eStart, eEnd, bCancel, eRng,
+ pReplFormat );
if( nRet )
UpdateCrsr();
return nRet;
@@ -3170,9 +3170,9 @@ sal_uLong SwCrsrShell::Find( const SfxItemSet& rSet,
const SearchOptions* pSearchOpt,
const SfxItemSet* rReplSet )
{
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
GetCrsr();
- delete m_pTblCrsr, m_pTblCrsr = 0;
+ delete m_pTableCrsr, m_pTableCrsr = 0;
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
sal_uLong nRet = m_pCurCrsr->Find( rSet, bNoCollections, eStart, eEnd,
bCancel, eRng, pSearchOpt, rReplSet );
@@ -3227,7 +3227,7 @@ static const SwStartNode* lcl_NodeContext( const SwNode& rNode )
*/
bool sw_PosOk(const SwPosition & aPos)
{
- return NULL != aPos.nNode.GetNode().GetCntntNode() &&
+ return NULL != aPos.nNode.GetNode().GetContentNode() &&
aPos.nContent.GetIdxReg();
}
@@ -3301,8 +3301,8 @@ void SwCrsrShell::ClearUpCrsrs()
// If at least one of the cursors in the ring have been deleted or replaced,
// remove the table cursor.
- if (m_pTblCrsr != NULL && bChanged)
- TblCrsrToCursor();
+ if (m_pTableCrsr != NULL && bChanged)
+ TableCrsrToCursor();
}
OUString SwCrsrShell::GetCrsrDescr() const
@@ -3359,7 +3359,7 @@ static void lcl_FillRecognizerData( uno::Sequence< OUString >& rSmartTagTypes,
}
static void lcl_FillTextRange( uno::Reference<text::XTextRange>& rRange,
- SwTxtNode& rNode, sal_Int32 nBegin, sal_Int32 nLen )
+ SwTextNode& rNode, sal_Int32 nBegin, sal_Int32 nLen )
{
// create SwPosition for nStartIndex
SwIndex aIndex( &rNode, nBegin );
@@ -3384,7 +3384,7 @@ void SwCrsrShell::GetSmartTagTerm( uno::Sequence< OUString >& rSmartTagTypes,
SwPaM* pCrsr = GetCrsr();
SwPosition aPos( *pCrsr->GetPoint() );
- SwTxtNode *pNode = aPos.nNode.GetNode().GetTxtNode();
+ SwTextNode *pNode = aPos.nNode.GetNode().GetTextNode();
if ( pNode && !pNode->IsInProtectSect() )
{
const SwWrongList *pSmartTagList = pNode->GetSmartTags();
@@ -3426,11 +3426,11 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
SwCrsrMoveState eTmpState( MV_SETONLYTEXT );
SwSpecialPos aSpecialPos;
eTmpState.pSpecialPos = &aSpecialPos;
- SwTxtNode *pNode;
+ SwTextNode *pNode;
const SwWrongList *pSmartTagList;
if( GetLayout()->GetCrsrOfst( &aPos, aPt, &eTmpState ) &&
- 0 != (pNode = aPos.nNode.GetNode().GetTxtNode()) &&
+ 0 != (pNode = aPos.nNode.GetNode().GetTextNode()) &&
0 != (pSmartTagList = pNode->GetSmartTags()) &&
!pNode->IsInProtectSect() )
{
@@ -3452,7 +3452,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
lcl_FillTextRange( rRange, *pNode, nBegin, nLen );
// get smarttag word
- OUString aText( pNode->GetTxt().copy(nBegin, nLen) );
+ OUString aText( pNode->GetText().copy(nBegin, nLen) );
//save the start and end positions of the line and the starting point
Push();
@@ -3492,13 +3492,13 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
SwRect aStartRect;
SwCrsrMoveState aState;
aState.bRealWidth = true;
- SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->getLayoutFrm( GetLayout(), &rPt, pCrsr->GetPoint(), false);
+ SwContentNode* pContentNode = pCrsr->GetContentNode();
+ SwContentFrm *pContentFrame = pContentNode->getLayoutFrm( GetLayout(), &rPt, pCrsr->GetPoint(), false);
- pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
+ pContentFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd - 1;
SwRect aEndRect;
- pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
+ pContentFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
Pop(false);
}
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 3b0d097ef515..99c8a56ab622 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -80,7 +80,7 @@ void SwCrsrShell::MoveCrsrToNum()
// try to set cursor onto this position, at half of the char-
// SRectangle's height
Point aPt( m_pCurCrsr->GetPtPos() );
- SwCntntFrm * pFrm = m_pCurCrsr->GetCntntNode()->getLayoutFrm( GetLayout(), &aPt,
+ SwContentFrm * pFrm = m_pCurCrsr->GetContentNode()->getLayoutFrm( GetLayout(), &aPt,
m_pCurCrsr->GetPoint() );
pFrm->GetCharRect( m_aCharRect, *m_pCurCrsr->GetPoint() );
pFrm->Calc();
@@ -122,13 +122,13 @@ bool SwCrsrShell::GotoPrevNum()
}
/// jump from content to header
-bool SwCrsrShell::GotoHeaderTxt()
+bool SwCrsrShell::GotoHeaderText()
{
const SwFrm* pFrm = GetCurrFrm()->FindPageFrm();
while( pFrm && !pFrm->IsHeaderFrm() )
pFrm = pFrm->GetLower();
// found header, search 1. content frame
- while( pFrm && !pFrm->IsCntntFrm() )
+ while( pFrm && !pFrm->IsContentFrm() )
pFrm = pFrm->GetLower();
if( pFrm )
@@ -150,7 +150,7 @@ bool SwCrsrShell::GotoHeaderTxt()
}
/// jump from content to footer
-bool SwCrsrShell::GotoFooterTxt()
+bool SwCrsrShell::GotoFooterText()
{
const SwPageFrm* pFrm = GetCurrFrm()->FindPageFrm();
if( pFrm )
@@ -160,7 +160,7 @@ bool SwCrsrShell::GotoFooterTxt()
while( pLower && !pLower->IsFooterFrm() )
pLower = pLower->GetLower();
// found footer, search 1. content frame
- while( pLower && !pLower->IsCntntFrm() )
+ while( pLower && !pLower->IsContentFrm() )
pLower = pLower->GetLower();
if( pLower )
@@ -209,25 +209,25 @@ bool SwCrsrShell::SetCrsrInHdFt( size_t nDescNo, bool bInHeader )
if( pDesc )
{
// check if the attribute exists
- const SwFmtCntnt* pCnt = 0;
+ const SwFormatContent* pCnt = 0;
if( bInHeader )
{
// mirrored pages? ignore for now
- const SwFmtHeader& rHd = pDesc->GetMaster().GetHeader();
- if( rHd.GetHeaderFmt() )
- pCnt = &rHd.GetHeaderFmt()->GetCntnt();
+ const SwFormatHeader& rHd = pDesc->GetMaster().GetHeader();
+ if( rHd.GetHeaderFormat() )
+ pCnt = &rHd.GetHeaderFormat()->GetContent();
}
else
{
- const SwFmtFooter& rFt = pDesc->GetMaster().GetFooter();
- if( rFt.GetFooterFmt() )
- pCnt = &rFt.GetFooterFmt()->GetCntnt();
+ const SwFormatFooter& rFt = pDesc->GetMaster().GetFooter();
+ if( rFt.GetFooterFormat() )
+ pCnt = &rFt.GetFooterFormat()->GetContent();
}
- if( pCnt && pCnt->GetCntntIdx() )
+ if( pCnt && pCnt->GetContentIdx() )
{
- SwNodeIndex aIdx( *pCnt->GetCntntIdx(), 1 );
- SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
+ SwNodeIndex aIdx( *pCnt->GetContentIdx(), 1 );
+ SwContentNode* pCNd = aIdx.GetNode().GetContentNode();
if( !pCNd )
pCNd = pMyDoc->GetNodes().GoNext( &aIdx );
@@ -260,15 +260,15 @@ bool SwCrsrShell::GotoNextTOXBase( const OUString* pName )
{
bool bRet = false;
- const SwSectionFmts& rFmts = GetDoc()->GetSections();
- SwCntntNode* pFnd = 0;
- for( SwSectionFmts::size_type n = rFmts.size(); n; )
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
+ SwContentNode* pFnd = 0;
+ for( SwSectionFormats::size_type n = rFormats.size(); n; )
{
- const SwSection* pSect = rFmts[ --n ]->GetSection();
+ const SwSection* pSect = rFormats[ --n ]->GetSection();
if (TOX_CONTENT_SECTION == pSect->GetType())
{
SwSectionNode const*const pSectNd(
- pSect->GetFmt()->GetSectionNode());
+ pSect->GetFormat()->GetSectionNode());
if ( pSectNd
&& m_pCurCrsr->GetPoint()->nNode < pSectNd->GetIndex()
&& (!pFnd || pFnd->GetIndex() > pSectNd->GetIndex())
@@ -276,13 +276,13 @@ bool SwCrsrShell::GotoNextTOXBase( const OUString* pName )
static_cast<SwTOXBaseSection const*>(pSect)->GetTOXName()))
{
SwNodeIndex aIdx(*pSectNd, 1);
- SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
+ SwContentNode* pCNd = aIdx.GetNode().GetContentNode();
if (!pCNd)
pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
if (pCNd &&
pCNd->EndOfSectionIndex() <= pSectNd->EndOfSectionIndex())
{
- SwCntntFrm const*const pCFrm(
+ SwContentFrm const*const pCFrm(
pCNd->getLayoutFrm(GetLayout()));
if (pCFrm &&
(IsReadOnlyAvailable() || !pCFrm->IsProtected()))
@@ -311,15 +311,15 @@ bool SwCrsrShell::GotoPrevTOXBase( const OUString* pName )
{
bool bRet = false;
- const SwSectionFmts& rFmts = GetDoc()->GetSections();
- SwCntntNode* pFnd = 0;
- for( SwSectionFmts::size_type n = rFmts.size(); n; )
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
+ SwContentNode* pFnd = 0;
+ for( SwSectionFormats::size_type n = rFormats.size(); n; )
{
- const SwSection* pSect = rFmts[ --n ]->GetSection();
+ const SwSection* pSect = rFormats[ --n ]->GetSection();
if (TOX_CONTENT_SECTION == pSect->GetType())
{
SwSectionNode const*const pSectNd(
- pSect->GetFmt()->GetSectionNode());
+ pSect->GetFormat()->GetSectionNode());
if ( pSectNd
&& m_pCurCrsr->GetPoint()->nNode > pSectNd->EndOfSectionIndex()
&& (!pFnd || pFnd->GetIndex() < pSectNd->GetIndex())
@@ -327,13 +327,13 @@ bool SwCrsrShell::GotoPrevTOXBase( const OUString* pName )
static_cast<SwTOXBaseSection const*>(pSect)->GetTOXName()))
{
SwNodeIndex aIdx(*pSectNd, 1);
- SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
+ SwContentNode* pCNd = aIdx.GetNode().GetContentNode();
if (!pCNd)
pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
if (pCNd &&
pCNd->EndOfSectionIndex() <= pSectNd->EndOfSectionIndex())
{
- SwCntntFrm const*const pCFrm(
+ SwContentFrm const*const pCFrm(
pCNd->getLayoutFrm(GetLayout()));
if (pCFrm &&
(IsReadOnlyAvailable() || !pCFrm->IsProtected()))
@@ -372,19 +372,19 @@ bool SwCrsrShell::GotoTOXMarkBase()
const SwTOXType* pType = aMarks[0]->GetTOXType();
SwIterator<SwTOXBase,SwTOXType> aIter( *pType );
const SwSectionNode* pSectNd;
- const SwSectionFmt* pSectFmt;
+ const SwSectionFormat* pSectFormat;
for( SwTOXBase* pTOX = aIter.First(); pTOX; pTOX = aIter.Next() )
{
if( pTOX->ISA( SwTOXBaseSection ) &&
- 0 != ( pSectFmt = static_cast<SwTOXBaseSection*>(pTOX)->GetFmt() ) &&
- 0 != ( pSectNd = pSectFmt->GetSectionNode() ))
+ 0 != ( pSectFormat = static_cast<SwTOXBaseSection*>(pTOX)->GetFormat() ) &&
+ 0 != ( pSectNd = pSectFormat->GetSectionNode() ))
{
SwNodeIndex aIdx( *pSectNd, 1 );
- SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
+ SwContentNode* pCNd = aIdx.GetNode().GetContentNode();
if( !pCNd )
pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
- const SwCntntFrm* pCFrm;
+ const SwContentFrm* pCFrm;
if( pCNd &&
pCNd->EndOfSectionIndex() < pSectNd->EndOfSectionIndex() &&
0 != ( pCFrm = pCNd->getLayoutFrm( GetLayout() ) ) &&
@@ -408,7 +408,7 @@ bool SwCrsrShell::GotoTOXMarkBase()
/// Jump to next/previous table formula
/// Optionally it is possible to also jump to broken formulas
-bool SwCrsrShell::GotoNxtPrvTblFormula( bool bNext, bool bOnlyErrors )
+bool SwCrsrShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors )
{
if( IsTableMode() )
return false;
@@ -420,22 +420,22 @@ bool SwCrsrShell::GotoNxtPrvTblFormula( bool bNext, bool bOnlyErrors )
SwPosition aFndPos( GetDoc()->GetNodes().GetEndOfContent() );
if( !bNext )
aFndPos.nNode = 0;
- _SetGetExpFld aFndGEF( aFndPos ), aCurGEF( rPos );
+ _SetGetExpField aFndGEF( aFndPos ), aCurGEF( rPos );
{
const SwNode* pSttNd = rPos.nNode.GetNode().FindTableBoxStartNode();
if( pSttNd )
{
const SwTableBox* pTBox = pSttNd->FindTableNode()->GetTable().
- GetTblBox( pSttNd->GetIndex() );
+ GetTableBox( pSttNd->GetIndex() );
if( pTBox )
- aCurGEF = _SetGetExpFld( *pTBox );
+ aCurGEF = _SetGetExpField( *pTBox );
}
}
if( rPos.nNode < GetDoc()->GetNodes().GetEndOfExtras() )
// also at collection use only the first frame
- aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(),
+ aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetContentNode()->getLayoutFrm( GetLayout(),
&aPt, &rPos, false ) );
{
const SfxPoolItem* pItem;
@@ -445,19 +445,19 @@ bool SwCrsrShell::GotoNxtPrvTblFormula( bool bNext, bool bOnlyErrors )
for( n = 0; n < nMaxItems; ++n )
if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
RES_BOXATR_FORMULA, n ) ) &&
- 0 != (pTBox = static_cast<const SwTblBoxFormula*>(pItem)->GetTableBox() ) &&
+ 0 != (pTBox = static_cast<const SwTableBoxFormula*>(pItem)->GetTableBox() ) &&
pTBox->GetSttNd() &&
pTBox->GetSttNd()->GetNodes().IsDocNodes() &&
( !bOnlyErrors ||
- !static_cast<const SwTblBoxFormula*>(pItem)->HasValidBoxes() ) )
+ !static_cast<const SwTableBoxFormula*>(pItem)->HasValidBoxes() ) )
{
- const SwCntntFrm* pCFrm;
+ const SwContentFrm* pCFrm;
SwNodeIndex aIdx( *pTBox->GetSttNd() );
- const SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
+ const SwContentNode* pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
if( pCNd && 0 != ( pCFrm = pCNd->getLayoutFrm( GetLayout(), &aPt, 0, false ) ) &&
(IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
- _SetGetExpFld aCmp( *pTBox );
+ _SetGetExpField aCmp( *pTBox );
aCmp.SetBodyPos( *pCFrm );
if( bNext ? ( aCurGEF < aCmp && aCmp < aFndGEF )
@@ -500,32 +500,32 @@ bool SwCrsrShell::GotoNxtPrvTOXMark( bool bNext )
SwPosition aFndPos( GetDoc()->GetNodes().GetEndOfContent() );
if( !bNext )
aFndPos.nNode = 0;
- _SetGetExpFld aFndGEF( aFndPos ), aCurGEF( rPos );
+ _SetGetExpField aFndGEF( aFndPos ), aCurGEF( rPos );
if( rPos.nNode.GetIndex() < GetDoc()->GetNodes().GetEndOfExtras().GetIndex() )
// also at collection use only the first frame
aCurGEF.SetBodyPos( *rPos.nNode.GetNode().
- GetCntntNode()->getLayoutFrm( GetLayout(), &aPt, &rPos, false ) );
+ GetContentNode()->getLayoutFrm( GetLayout(), &aPt, &rPos, false ) );
{
- const SwTxtNode* pTxtNd;
- const SwTxtTOXMark* pTxtTOX;
+ const SwTextNode* pTextNd;
+ const SwTextTOXMark* pTextTOX;
sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK );
for( n = 0; n < nMaxItems; ++n )
{
const SfxPoolItem* pItem;
- const SwCntntFrm* pCFrm;
+ const SwContentFrm* pCFrm;
if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
RES_TXTATR_TOXMARK, n ) ) &&
- 0 != (pTxtTOX = static_cast<const SwTOXMark*>(pItem)->GetTxtTOXMark() ) &&
- ( pTxtNd = &pTxtTOX->GetTxtNode())->GetNodes().IsDocNodes() &&
- 0 != ( pCFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt, 0, false )) &&
+ 0 != (pTextTOX = static_cast<const SwTOXMark*>(pItem)->GetTextTOXMark() ) &&
+ ( pTextNd = &pTextTOX->GetTextNode())->GetNodes().IsDocNodes() &&
+ 0 != ( pCFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt, 0, false )) &&
( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
- SwNodeIndex aNdIndex( *pTxtNd ); // UNIX needs this object
- _SetGetExpFld aCmp( aNdIndex, *pTxtTOX, 0 );
+ SwNodeIndex aNdIndex( *pTextNd ); // UNIX needs this object
+ _SetGetExpField aCmp( aNdIndex, *pTextTOX, 0 );
aCmp.SetBodyPos( *pCFrm );
if( bNext ? ( aCurGEF < aCmp && aCmp < aFndGEF )
@@ -566,9 +566,9 @@ const SwTOXMark& SwCrsrShell::GotoTOXMark( const SwTOXMark& rStart,
IsReadOnlyAvailable() );
// set position
SwPosition& rPos = *GetCrsr()->GetPoint();
- rPos.nNode = rNewMark.GetTxtTOXMark()->GetTxtNode();
- rPos.nContent.Assign( rPos.nNode.GetNode().GetCntntNode(),
- rNewMark.GetTxtTOXMark()->GetStart() );
+ rPos.nNode = rNewMark.GetTextTOXMark()->GetTextNode();
+ rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(),
+ rNewMark.GetTextTOXMark()->GetStart() );
if( !m_pCurCrsr->IsSelOvr() )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
@@ -578,30 +578,30 @@ const SwTOXMark& SwCrsrShell::GotoTOXMark( const SwTOXMark& rStart,
}
/// jump to next/previous field type
-void lcl_MakeFldLst(
- _SetGetExpFlds& rLst,
- const SwFieldType& rFldType,
+void lcl_MakeFieldLst(
+ _SetGetExpFields& rLst,
+ const SwFieldType& rFieldType,
const bool bInReadOnly,
const bool bChkInpFlag = false )
{
// always search the 1. frame
Point aPt;
- SwTxtFld* pTxtFld = NULL;
- SwIterator<SwFmtFld,SwFieldType> aIter(rFldType);
- for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
+ SwTextField* pTextField = NULL;
+ SwIterator<SwFormatField,SwFieldType> aIter(rFieldType);
+ for( SwFormatField* pFormatField = aIter.First(); pFormatField; pFormatField = aIter.Next() )
{
- pTxtFld = pFmtFld->GetTxtFld();
- if ( pTxtFld != NULL
+ pTextField = pFormatField->GetTextField();
+ if ( pTextField != NULL
&& ( !bChkInpFlag
- || static_cast<const SwSetExpField*>(pTxtFld->GetFmtFld().GetField())->GetInputFlag() ) )
+ || static_cast<const SwSetExpField*>(pTextField->GetFormatField().GetField())->GetInputFlag() ) )
{
- const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
- const SwCntntFrm* pCFrm =
- rTxtNode.getLayoutFrm( rTxtNode.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
+ const SwTextNode& rTextNode = pTextField->GetTextNode();
+ const SwContentFrm* pCFrm =
+ rTextNode.getLayoutFrm( rTextNode.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
if ( pCFrm != NULL
&& ( bInReadOnly || !pCFrm->IsProtected() ) )
{
- _SetGetExpFld* pNew = new _SetGetExpFld( SwNodeIndex( rTxtNode ), pTxtFld );
+ _SetGetExpField* pNew = new _SetGetExpField( SwNodeIndex( rTextNode ), pTextField );
pNew->SetBodyPos( *pCFrm );
rLst.insert( pNew );
}
@@ -609,81 +609,81 @@ void lcl_MakeFldLst(
}
}
-static _SetGetExpFlds::const_iterator
-lcl_FindField(bool & o_rFound, _SetGetExpFlds const& rSrtLst,
- SwRootFrm *const pLayout, SwTxtNode *const pTxtNode,
- SwTxtFld *const pTxtFld, SwPosition const& rPos,
+static _SetGetExpFields::const_iterator
+lcl_FindField(bool & o_rFound, _SetGetExpFields const& rSrtLst,
+ SwRootFrm *const pLayout, SwTextNode *const pTextNode,
+ SwTextField *const pTextField, SwPosition const& rPos,
sal_Int32 const nContentOffset)
{
- boost::scoped_ptr<_SetGetExpFld> pSrch;
+ boost::scoped_ptr<_SetGetExpField> pSrch;
boost::scoped_ptr<SwIndex> pIndex;
if (-1 == nContentOffset)
{
- pSrch.reset(new _SetGetExpFld(rPos.nNode, pTxtFld, &rPos.nContent));
+ pSrch.reset(new _SetGetExpField(rPos.nNode, pTextField, &rPos.nContent));
}
else
{
- pIndex.reset(new SwIndex(rPos.nNode.GetNode().GetCntntNode(), nContentOffset));
- pSrch.reset(new _SetGetExpFld(rPos.nNode, pTxtFld, pIndex.get()));
+ pIndex.reset(new SwIndex(rPos.nNode.GetNode().GetContentNode(), nContentOffset));
+ pSrch.reset(new _SetGetExpField(rPos.nNode, pTextField, pIndex.get()));
}
- if (rPos.nNode.GetIndex() < pTxtNode->GetNodes().GetEndOfExtras().GetIndex())
+ if (rPos.nNode.GetIndex() < pTextNode->GetNodes().GetEndOfExtras().GetIndex())
{
// also at collection use only the first frame
Point aPt;
- pSrch->SetBodyPos(*pTxtNode->getLayoutFrm(pLayout, &aPt, &rPos, false));
+ pSrch->SetBodyPos(*pTextNode->getLayoutFrm(pLayout, &aPt, &rPos, false));
}
- _SetGetExpFlds::const_iterator it = rSrtLst.lower_bound(pSrch.get());
+ _SetGetExpFields::const_iterator it = rSrtLst.lower_bound(pSrch.get());
o_rFound = (it != rSrtLst.end()) && (**it == *pSrch);
return it;
}
-bool SwCrsrShell::MoveFldType(
- const SwFieldType* pFldType,
+bool SwCrsrShell::MoveFieldType(
+ const SwFieldType* pFieldType,
const bool bNext,
const sal_uInt16 nResType,
- const bool bAddSetExpressionFldsToInputFlds )
+ const bool bAddSetExpressionFieldsToInputFields )
{
// sorted list of all fields
- _SetGetExpFlds aSrtLst;
+ _SetGetExpFields aSrtLst;
- if ( pFldType )
+ if ( pFieldType )
{
- if( RES_INPUTFLD != pFldType->Which() && !pFldType->HasWriterListeners() )
+ if( RES_INPUTFLD != pFieldType->Which() && !pFieldType->HasWriterListeners() )
{
return false;
}
// found Modify object, add all fields to array
- ::lcl_MakeFldLst( aSrtLst, *pFldType, IsReadOnlyAvailable() );
+ ::lcl_MakeFieldLst( aSrtLst, *pFieldType, IsReadOnlyAvailable() );
- if( RES_INPUTFLD == pFldType->Which() && bAddSetExpressionFldsToInputFlds )
+ if( RES_INPUTFLD == pFieldType->Which() && bAddSetExpressionFieldsToInputFields )
{
// there are hidden input fields in the set exp. fields
- const SwFldTypes& rFldTypes = *mpDoc->getIDocumentFieldsAccess().GetFldTypes();
- const size_t nSize = rFldTypes.size();
+ const SwFieldTypes& rFieldTypes = *mpDoc->getIDocumentFieldsAccess().GetFieldTypes();
+ const size_t nSize = rFieldTypes.size();
for( size_t i=0; i < nSize; ++i )
{
- pFldType = rFldTypes[ i ];
- if ( RES_SETEXPFLD == pFldType->Which() )
+ pFieldType = rFieldTypes[ i ];
+ if ( RES_SETEXPFLD == pFieldType->Which() )
{
- ::lcl_MakeFldLst( aSrtLst, *pFldType, IsReadOnlyAvailable(), true );
+ ::lcl_MakeFieldLst( aSrtLst, *pFieldType, IsReadOnlyAvailable(), true );
}
}
}
}
else
{
- const SwFldTypes& rFldTypes = *mpDoc->getIDocumentFieldsAccess().GetFldTypes();
- const size_t nSize = rFldTypes.size();
+ const SwFieldTypes& rFieldTypes = *mpDoc->getIDocumentFieldsAccess().GetFieldTypes();
+ const size_t nSize = rFieldTypes.size();
for( size_t i=0; i < nSize; ++i )
{
- pFldType = rFldTypes[ i ];
- if( nResType == pFldType->Which() )
+ pFieldType = rFieldTypes[ i ];
+ if( nResType == pFieldType->Which() )
{
- ::lcl_MakeFldLst( aSrtLst, *pFldType, IsReadOnlyAvailable() );
+ ::lcl_MakeFieldLst( aSrtLst, *pFieldType, IsReadOnlyAvailable() );
}
}
}
@@ -692,7 +692,7 @@ bool SwCrsrShell::MoveFldType(
if( aSrtLst.empty() )
return false;
- _SetGetExpFlds::const_iterator it;
+ _SetGetExpFields::const_iterator it;
SwCursor* pCrsr = getShellCrsr( true );
{
// (1998): Always use field for search so that the right one is found as
@@ -700,39 +700,39 @@ bool SwCrsrShell::MoveFldType(
// field
const SwPosition& rPos = *pCrsr->GetPoint();
- SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode();
- OSL_ENSURE( pTNd, "No CntntNode" );
+ SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode();
+ OSL_ENSURE( pTNd, "No ContentNode" );
- SwTxtFld * pTxtFld = pTNd->GetFldTxtAttrAt( rPos.nContent.GetIndex(), true );
- const bool bDelFld = ( pTxtFld == NULL );
+ SwTextField * pTextField = pTNd->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true );
+ const bool bDelField = ( pTextField == NULL );
sal_Int32 nContentOffset = -1;
- if( bDelFld )
+ if( bDelField )
{
// create dummy for the search
- SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField(
- static_cast<SwDateTimeFieldType*>(mpDoc->getIDocumentFieldsAccess().GetSysFldType( RES_DATETIMEFLD ) ) ) );
+ SwFormatField* pFormatField = new SwFormatField( SwDateTimeField(
+ static_cast<SwDateTimeFieldType*>(mpDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_DATETIMEFLD ) ) ) );
- pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(),
+ pTextField = new SwTextField( *pFormatField, rPos.nContent.GetIndex(),
mpDoc->IsClipBoard() );
- pTxtFld->ChgTxtNode( pTNd );
+ pTextField->ChgTextNode( pTNd );
}
else
{
// the cursor might be anywhere inside the input field,
// but we will be searching for the field start
- if (pTxtFld->Which() == RES_TXTATR_INPUTFIELD
- && rPos.nContent.GetIndex() != pTxtFld->GetStart())
- nContentOffset = pTxtFld->GetStart();
+ if (pTextField->Which() == RES_TXTATR_INPUTFIELD
+ && rPos.nContent.GetIndex() != pTextField->GetStart())
+ nContentOffset = pTextField->GetStart();
}
bool isSrch;
it = lcl_FindField(isSrch, aSrtLst,
- GetLayout(), pTNd, pTxtFld, rPos, nContentOffset);
+ GetLayout(), pTNd, pTextField, rPos, nContentOffset);
- if( bDelFld )
+ if( bDelField )
{
- delete static_cast<SwFmtFld*>(&pTxtFld->GetAttr());
- delete pTxtFld;
+ delete static_cast<SwFormatField*>(&pTextField->GetAttr());
+ delete pTextField;
}
if( it != aSrtLst.end() && isSrch ) // found
@@ -764,7 +764,7 @@ bool SwCrsrShell::MoveFldType(
}
}
}
- const _SetGetExpFld& rFnd = **it;
+ const _SetGetExpField& rFnd = **it;
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // watch Crsr-Moves
@@ -778,10 +778,10 @@ bool SwCrsrShell::MoveFldType(
return bRet;
}
-bool SwCrsrShell::GotoFld( const SwFmtFld& rFld )
+bool SwCrsrShell::GotoFormatField( const SwFormatField& rField )
{
bool bRet = false;
- if( rFld.GetTxtFld() )
+ if( rField.GetTextField() )
{
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // watch Crsr-Moves
@@ -789,9 +789,9 @@ bool SwCrsrShell::GotoFld( const SwFmtFld& rFld )
SwCursor* pCrsr = getShellCrsr( true );
SwCrsrSaveState aSaveState( *pCrsr );
- SwTxtNode* pTNd = rFld.GetTxtFld()->GetpTxtNode();
+ SwTextNode* pTNd = rField.GetTextField()->GetpTextNode();
pCrsr->GetPoint()->nNode = *pTNd;
- pCrsr->GetPoint()->nContent.Assign( pTNd, rFld.GetTxtFld()->GetStart() );
+ pCrsr->GetPoint()->nContent.Assign( pTNd, rField.GetTextField()->GetStart() );
bRet = !pCrsr->IsSelOvr();
if( bRet )
@@ -800,45 +800,45 @@ bool SwCrsrShell::GotoFld( const SwFmtFld& rFld )
return bRet;
}
-SwTxtFld * SwCrsrShell::GetTxtFldAtPos(
+SwTextField * SwCrsrShell::GetTextFieldAtPos(
const SwPosition* pPos,
- const bool bIncludeInputFldAtStart )
+ const bool bIncludeInputFieldAtStart )
{
- SwTxtFld* pTxtFld = NULL;
+ SwTextField* pTextField = NULL;
- SwTxtNode * const pNode = pPos->nNode.GetNode().GetTxtNode();
+ SwTextNode * const pNode = pPos->nNode.GetNode().GetTextNode();
if ( pNode != NULL )
{
- pTxtFld = pNode->GetFldTxtAttrAt( pPos->nContent.GetIndex(), bIncludeInputFldAtStart );
+ pTextField = pNode->GetFieldTextAttrAt( pPos->nContent.GetIndex(), bIncludeInputFieldAtStart );
}
- return pTxtFld;
+ return pTextField;
}
SwField* SwCrsrShell::GetFieldAtCrsr(
const SwPaM* pCrsr,
- const bool bIncludeInputFldAtStart )
+ const bool bIncludeInputFieldAtStart )
{
SwField* pFieldAtCrsr = NULL;
- SwTxtFld* pTxtFld = GetTxtFldAtPos( pCrsr->Start(), bIncludeInputFldAtStart );
- if ( pTxtFld != NULL
+ SwTextField* pTextField = GetTextFieldAtPos( pCrsr->Start(), bIncludeInputFieldAtStart );
+ if ( pTextField != NULL
&& pCrsr->Start()->nNode == pCrsr->End()->nNode )
{
- const sal_Int32 nTxtFldLength =
- pTxtFld->End() != NULL
- ? *(pTxtFld->End()) - pTxtFld->GetStart()
+ const sal_Int32 nTextFieldLength =
+ pTextField->End() != NULL
+ ? *(pTextField->End()) - pTextField->GetStart()
: 1;
- if ( ( pCrsr->End()->nContent.GetIndex() - pCrsr->Start()->nContent.GetIndex() ) <= nTxtFldLength )
+ if ( ( pCrsr->End()->nContent.GetIndex() - pCrsr->Start()->nContent.GetIndex() ) <= nTextFieldLength )
{
- pFieldAtCrsr = const_cast<SwField*>(pTxtFld->GetFmtFld().GetField());
+ pFieldAtCrsr = const_cast<SwField*>(pTextField->GetFormatField().GetField());
}
}
return pFieldAtCrsr;
}
-SwField* SwCrsrShell::GetCurFld( const bool bIncludeInputFldAtStart ) const
+SwField* SwCrsrShell::GetCurField( const bool bIncludeInputFieldAtStart ) const
{
SwPaM* pCrsr = GetCrsr();
if ( pCrsr->IsMultiSelection() )
@@ -847,19 +847,19 @@ SwField* SwCrsrShell::GetCurFld( const bool bIncludeInputFldAtStart ) const
return NULL;
}
- SwField* pCurFld = GetFieldAtCrsr( pCrsr, bIncludeInputFldAtStart );;
- if ( pCurFld != NULL
- && RES_TABLEFLD == pCurFld->GetTyp()->Which() )
+ SwField* pCurField = GetFieldAtCrsr( pCrsr, bIncludeInputFieldAtStart );;
+ if ( pCurField != NULL
+ && RES_TABLEFLD == pCurField->GetTyp()->Which() )
{
// TabellenFormel ? wandel internen in externen Namen um
- const SwTableNode* pTblNd = IsCrsrInTbl();
- static_cast<SwTblField*>(pCurFld)->PtrToBoxNm( pTblNd ? &pTblNd->GetTable() : 0 );
+ const SwTableNode* pTableNd = IsCrsrInTable();
+ static_cast<SwTableField*>(pCurField)->PtrToBoxNm( pTableNd ? &pTableNd->GetTable() : 0 );
}
- return pCurFld;
+ return pCurField;
}
-bool SwCrsrShell::CrsrInsideInputFld() const
+bool SwCrsrShell::CrsrInsideInputField() const
{
for(SwPaM& rCrsr : GetCrsr()->GetRingContainer())
{
@@ -869,42 +869,42 @@ bool SwCrsrShell::CrsrInsideInputFld() const
return false;
}
-bool SwCrsrShell::PosInsideInputFld( const SwPosition& rPos )
+bool SwCrsrShell::PosInsideInputField( const SwPosition& rPos )
{
- return dynamic_cast<const SwTxtInputFld*>(GetTxtFldAtPos( &rPos, false )) != NULL;
+ return dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, false )) != NULL;
}
-bool SwCrsrShell::DocPtInsideInputFld( const Point& rDocPt ) const
+bool SwCrsrShell::DocPtInsideInputField( const Point& rDocPt ) const
{
SwPosition aPos( *(GetCrsr()->Start()) );
Point aDocPt( rDocPt );
if ( GetLayout()->GetCrsrOfst( &aPos, aDocPt ) )
{
- return PosInsideInputFld( aPos );
+ return PosInsideInputField( aPos );
}
return false;
}
-sal_Int32 SwCrsrShell::StartOfInputFldAtPos( const SwPosition& rPos )
+sal_Int32 SwCrsrShell::StartOfInputFieldAtPos( const SwPosition& rPos )
{
- const SwTxtInputFld* pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtFldAtPos( &rPos, true ));
- if ( pTxtInputFld == NULL )
+ const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true ));
+ if ( pTextInputField == NULL )
{
- OSL_ENSURE( false, "<SwEditShell::StartOfInputFldAtPos(..)> - no Input Field at given position" );
+ OSL_ENSURE( false, "<SwEditShell::StartOfInputFieldAtPos(..)> - no Input Field at given position" );
return 0;
}
- return pTxtInputFld->GetStart();
+ return pTextInputField->GetStart();
}
-sal_Int32 SwCrsrShell::EndOfInputFldAtPos( const SwPosition& rPos )
+sal_Int32 SwCrsrShell::EndOfInputFieldAtPos( const SwPosition& rPos )
{
- const SwTxtInputFld* pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtFldAtPos( &rPos, true ));
- if ( pTxtInputFld == NULL )
+ const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true ));
+ if ( pTextInputField == NULL )
{
- OSL_ENSURE( false, "<SwEditShell::EndOfInputFldAtPos(..)> - no Input Field at given position" );
+ OSL_ENSURE( false, "<SwEditShell::EndOfInputFieldAtPos(..)> - no Input Field at given position" );
return 0;
}
- return *(pTxtInputFld->End());
+ return *(pTextInputField->End());
}
void SwCrsrShell::GotoOutline( sal_uInt16 nIdx )
@@ -916,9 +916,9 @@ void SwCrsrShell::GotoOutline( sal_uInt16 nIdx )
SwCrsrSaveState aSaveState( *pCrsr );
const SwNodes& rNds = GetDoc()->GetNodes();
- SwTxtNode* pTxtNd = rNds.GetOutLineNds()[ nIdx ]->GetTxtNode();
- pCrsr->GetPoint()->nNode = *pTxtNd;
- pCrsr->GetPoint()->nContent.Assign( pTxtNd, 0 );
+ SwTextNode* pTextNd = rNds.GetOutLineNds()[ nIdx ]->GetTextNode();
+ pCrsr->GetPoint()->nNode = *pTextNd;
+ pCrsr->GetPoint()->nContent.Assign( pTextNd, 0 );
if( !pCrsr->IsSelOvr() )
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
@@ -961,7 +961,7 @@ bool SwCrsrShell::GotoNextOutline()
SwCallLink aLk( *this ); // watch Crsr-Moves
SwCrsrSaveState aSaveState( *pCrsr );
pCrsr->GetPoint()->nNode = *pNd;
- pCrsr->GetPoint()->nContent.Assign( pNd->GetTxtNode(), 0 );
+ pCrsr->GetPoint()->nContent.Assign( pNd->GetTextNode(), 0 );
bool bRet = !pCrsr->IsSelOvr();
if( bRet )
@@ -990,7 +990,7 @@ bool SwCrsrShell::GotoPrevOutline()
SwCallLink aLk( *this ); // watch Crsr-Moves
SwCrsrSaveState aSaveState( *pCrsr );
pCrsr->GetPoint()->nNode = *pNd;
- pCrsr->GetPoint()->nContent.Assign( pNd->GetTxtNode(), 0 );
+ pCrsr->GetPoint()->nContent.Assign( pNd->GetTextNode(), 0 );
bRet = !pCrsr->IsSelOvr();
if( bRet )
@@ -1014,7 +1014,7 @@ sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel )
{
pNd = rNds.GetOutLineNds()[ nPos ];
- if( pNd->GetTxtNode()->GetAttrOutlineLevel()-1 <= nLevel )
+ if( pNd->GetTextNode()->GetAttrOutlineLevel()-1 <= nLevel )
return nPos;
}
@@ -1045,11 +1045,11 @@ bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
if( bWithChildren )
{
- const int nLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;
+ const int nLevel = pEndNd->GetTextNode()->GetAttrOutlineLevel()-1;
for( ++nEndPos; nEndPos < rOutlNds.size(); ++nEndPos )
{
pEndNd = rOutlNds[ nEndPos ];
- const int nNxtLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;
+ const int nNxtLevel = pEndNd->GetTextNode()->GetAttrOutlineLevel()-1;
if( nNxtLevel <= nLevel )
break; // EndPos is now on the next one
}
@@ -1067,7 +1067,7 @@ bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
// set end to the end of the previous content node
m_pCurCrsr->GetPoint()->nNode = *pSttNd;
- m_pCurCrsr->GetPoint()->nContent.Assign( pSttNd->GetCntntNode(), 0 );
+ m_pCurCrsr->GetPoint()->nContent.Assign( pSttNd->GetContentNode(), 0 );
m_pCurCrsr->SetMark();
m_pCurCrsr->GetPoint()->nNode = *pEndNd;
m_pCurCrsr->Move( fnMoveBackward, fnGoNode ); // end of predecessor
@@ -1088,12 +1088,12 @@ bool SwCrsrShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType,
SwCrsrSaveState aSaveState( *m_pCurCrsr );
sal_Int32 nPos = -1;
- SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( GetDoc(), rRefMark,
+ SwTextNode* pTextNd = SwGetRefFieldType::FindAnchor( GetDoc(), rRefMark,
nSubType, nSeqNo, &nPos );
- if( pTxtNd && pTxtNd->GetNodes().IsDocNodes() )
+ if( pTextNd && pTextNd->GetNodes().IsDocNodes() )
{
- m_pCurCrsr->GetPoint()->nNode = *pTxtNd;
- m_pCurCrsr->GetPoint()->nContent.Assign( pTxtNd, nPos );
+ m_pCurCrsr->GetPoint()->nNode = *pTextNd;
+ m_pCurCrsr->GetPoint()->nContent.Assign( pTextNd, nPos );
if( !m_pCurCrsr->IsSelOvr() )
{
@@ -1112,9 +1112,9 @@ bool SwCrsrShell::IsPageAtPos( const Point &rPt ) const
}
bool SwCrsrShell::GetContentAtPos( const Point& rPt,
- SwContentAtPos& rCntntAtPos,
+ SwContentAtPos& rContentAtPos,
bool bSetCrsr,
- SwRect* pFldRect )
+ SwRect* pFieldRect )
{
SET_CURR_SHELL( this );
bool bRet = false;
@@ -1124,64 +1124,64 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
Point aPt( rPt );
SwPosition aPos( *m_pCurCrsr->GetPoint() );
- SwTxtNode* pTxtNd;
- SwCntntFrm *pFrm(0);
- SwTxtAttr* pTxtAttr;
+ SwTextNode* pTextNd;
+ SwContentFrm *pFrm(0);
+ SwTextAttr* pTextAttr;
SwCrsrMoveState aTmpState;
aTmpState.bFieldInfo = true;
- aTmpState.bExactOnly = !( SwContentAtPos::SW_OUTLINE & rCntntAtPos.eCntntAtPos );
- aTmpState.bCntntCheck = (SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos) != 0;
+ aTmpState.bExactOnly = !( SwContentAtPos::SW_OUTLINE & rContentAtPos.eContentAtPos );
+ aTmpState.bContentCheck = (SwContentAtPos::SW_CONTENT_CHECK & rContentAtPos.eContentAtPos) != 0;
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
SwSpecialPos aSpecialPos;
- aTmpState.pSpecialPos = ( SwContentAtPos::SW_SMARTTAG & rCntntAtPos.eCntntAtPos ) ?
+ aTmpState.pSpecialPos = ( SwContentAtPos::SW_SMARTTAG & rContentAtPos.eContentAtPos ) ?
&aSpecialPos : 0;
const bool bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState );
- pTxtNd = aPos.nNode.GetNode().GetTxtNode();
+ pTextNd = aPos.nNode.GetNode().GetTextNode();
const SwNodes& rNds = GetDoc()->GetNodes();
- if( pTxtNd
- && SwContentAtPos::SW_OUTLINE & rCntntAtPos.eCntntAtPos
+ if( pTextNd
+ && SwContentAtPos::SW_OUTLINE & rContentAtPos.eContentAtPos
&& !rNds.GetOutLineNds().empty() )
{
- const SwTxtNode* pONd = pTxtNd->FindOutlineNodeOfLevel( MAXLEVEL-1);
+ const SwTextNode* pONd = pTextNd->FindOutlineNodeOfLevel( MAXLEVEL-1);
if( pONd )
{
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_OUTLINE;
- rCntntAtPos.sStr = pONd->GetExpandTxt( 0, -1, true, true );
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_OUTLINE;
+ rContentAtPos.sStr = pONd->GetExpandText( 0, -1, true, true );
bRet = true;
}
}
- else if ( SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos
+ else if ( SwContentAtPos::SW_CONTENT_CHECK & rContentAtPos.eContentAtPos
&& bCrsrFoundExact )
{
bRet = true;
}
- else if( pTxtNd
- && SwContentAtPos::SW_NUMLABEL & rCntntAtPos.eCntntAtPos)
+ else if( pTextNd
+ && SwContentAtPos::SW_NUMLABEL & rContentAtPos.eContentAtPos)
{
bRet = aTmpState.bInNumPortion;
- rCntntAtPos.aFnd.pNode = pTxtNd;
+ rContentAtPos.aFnd.pNode = pTextNd;
Size aSizeLogic(aTmpState.nInNumPostionOffset, 0);
Size aSizePixel = GetWin()->LogicToPixel(aSizeLogic);
- rCntntAtPos.nDist = aSizePixel.Width();
+ rContentAtPos.nDist = aSizePixel.Width();
}
- else if( bCrsrFoundExact && pTxtNd )
+ else if( bCrsrFoundExact && pTextNd )
{
if( !aTmpState.bPosCorr )
{
if ( !bRet
- && SwContentAtPos::SW_SMARTTAG & rCntntAtPos.eCntntAtPos
- && !aTmpState.bFtnNoInfo )
+ && SwContentAtPos::SW_SMARTTAG & rContentAtPos.eContentAtPos
+ && !aTmpState.bFootnoteNoInfo )
{
- const SwWrongList* pSmartTagList = pTxtNd->GetSmartTags();
+ const SwWrongList* pSmartTagList = pTextNd->GetSmartTags();
sal_Int32 nCurrent = aPos.nContent.GetIndex();
const sal_Int32 nBegin = nCurrent;
sal_Int32 nLen = 1;
- if ( pSmartTagList && pSmartTagList->InWrongWord( nCurrent, nLen ) && !pTxtNd->IsSymbol(nBegin) )
+ if ( pSmartTagList && pSmartTagList->InWrongWord( nCurrent, nLen ) && !pTextNd->IsSymbol(nBegin) )
{
const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
const SwWrongList* pSubList = pSmartTagList->SubList( nIndex );
@@ -1208,32 +1208,32 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
if( bRet )
{
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_SMARTTAG;
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_SMARTTAG;
- if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
- pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
+ if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
}
if ( !bRet
- && ( SwContentAtPos::SW_FIELD | SwContentAtPos::SW_CLICKFIELD ) & rCntntAtPos.eCntntAtPos
- && !aTmpState.bFtnNoInfo )
+ && ( SwContentAtPos::SW_FIELD | SwContentAtPos::SW_CLICKFIELD ) & rContentAtPos.eContentAtPos
+ && !aTmpState.bFootnoteNoInfo )
{
- pTxtAttr = pTxtNd->GetFldTxtAttrAt( aPos.nContent.GetIndex() );
- const SwField* pFld = pTxtAttr != NULL
- ? pTxtAttr->GetFmtFld().GetField()
+ pTextAttr = pTextNd->GetFieldTextAttrAt( aPos.nContent.GetIndex() );
+ const SwField* pField = pTextAttr != NULL
+ ? pTextAttr->GetFormatField().GetField()
: 0;
- if ( SwContentAtPos::SW_CLICKFIELD & rCntntAtPos.eCntntAtPos
- && pFld && !pFld->HasClickHdl() )
+ if ( SwContentAtPos::SW_CLICKFIELD & rContentAtPos.eContentAtPos
+ && pField && !pField->HasClickHdl() )
{
- pFld = 0;
+ pField = 0;
}
- if ( pFld )
+ if ( pField )
{
- if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
- pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
+ if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
if( bSetCrsr )
{
@@ -1245,60 +1245,60 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
{
// allow click fields in protected sections
// only placeholder is not possible
- if( SwContentAtPos::SW_FIELD & rCntntAtPos.eCntntAtPos
- || RES_JUMPEDITFLD == pFld->Which() )
- pFld = 0;
+ if( SwContentAtPos::SW_FIELD & rContentAtPos.eContentAtPos
+ || RES_JUMPEDITFLD == pField->Which() )
+ pField = 0;
}
else
UpdateCrsr();
}
- else if( RES_TABLEFLD == pFld->Which() &&
- static_cast<const SwTblField*>(pFld)->IsIntrnlName() )
+ else if( RES_TABLEFLD == pField->Which() &&
+ static_cast<const SwTableField*>(pField)->IsIntrnlName() )
{
// create from internal (for CORE) the external
// (for UI) formula
- const SwTableNode* pTblNd = pTxtNd->FindTableNode();
- if( pTblNd ) // steht in einer Tabelle
- const_cast<SwTblField*>(static_cast<const SwTblField*>(pFld))->PtrToBoxNm( &pTblNd->GetTable() );
+ const SwTableNode* pTableNd = pTextNd->FindTableNode();
+ if( pTableNd ) // steht in einer Tabelle
+ const_cast<SwTableField*>(static_cast<const SwTableField*>(pField))->PtrToBoxNm( &pTableNd->GetTable() );
}
}
- if( pFld )
+ if( pField )
{
- rCntntAtPos.aFnd.pFld = pFld;
- rCntntAtPos.pFndTxtAttr = pTxtAttr;
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FIELD;
+ rContentAtPos.aFnd.pField = pField;
+ rContentAtPos.pFndTextAttr = pTextAttr;
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_FIELD;
bRet = true;
}
}
- if( !bRet && SwContentAtPos::SW_FORMCTRL & rCntntAtPos.eCntntAtPos )
+ if( !bRet && SwContentAtPos::SW_FORMCTRL & rContentAtPos.eContentAtPos )
{
IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( );
- sw::mark::IFieldmark* pFldBookmark = pMarksAccess->getFieldmarkFor( aPos );
- if( bCrsrFoundExact && pTxtNd && pFldBookmark) {
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FORMCTRL;
- rCntntAtPos.aFnd.pFldmark = pFldBookmark;
+ sw::mark::IFieldmark* pFieldBookmark = pMarksAccess->getFieldmarkFor( aPos );
+ if( bCrsrFoundExact && pTextNd && pFieldBookmark) {
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_FORMCTRL;
+ rContentAtPos.aFnd.pFieldmark = pFieldBookmark;
bRet=true;
}
}
- if( !bRet && SwContentAtPos::SW_FTN & rCntntAtPos.eCntntAtPos )
+ if( !bRet && SwContentAtPos::SW_FTN & rContentAtPos.eContentAtPos )
{
- if( aTmpState.bFtnNoInfo )
+ if( aTmpState.bFootnoteNoInfo )
{
// over the footnote's char
bRet = true;
if( bSetCrsr )
{
*m_pCurCrsr->GetPoint() = aPos;
- if( !GotoFtnAnchor() )
+ if( !GotoFootnoteAnchor() )
bRet = false;
}
if( bRet )
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FTN;
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_FTN;
}
- else if ( 0 != ( pTxtAttr = pTxtNd->GetTxtAttrForCharAt(
+ else if ( 0 != ( pTextAttr = pTextNd->GetTextAttrForCharAt(
aPos.nContent.GetIndex(), RES_TXTATR_FTN )) )
{
bRet = true;
@@ -1306,8 +1306,8 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
{
SwCallLink aLk( *this ); // watch Crsr-Moves
SwCrsrSaveState aSaveState( *m_pCurCrsr );
- m_pCurCrsr->GetPoint()->nNode = *static_cast<SwTxtFtn*>(pTxtAttr)->GetStartNode();
- SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection(
+ m_pCurCrsr->GetPoint()->nNode = *static_cast<SwTextFootnote*>(pTextAttr)->GetStartNode();
+ SwContentNode* pCNd = GetDoc()->GetNodes().GoNextSection(
&m_pCurCrsr->GetPoint()->nNode,
true, !IsReadOnlyAvailable() );
@@ -1326,45 +1326,45 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( bRet )
{
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FTN;
- rCntntAtPos.pFndTxtAttr = pTxtAttr;
- rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_FTN;
+ rContentAtPos.pFndTextAttr = pTextAttr;
+ rContentAtPos.aFnd.pAttr = &pTextAttr->GetAttr();
- if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
- pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
+ if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
}
if( !bRet
- && ( SwContentAtPos::SW_TOXMARK | SwContentAtPos::SW_REFMARK ) & rCntntAtPos.eCntntAtPos
- && !aTmpState.bFtnNoInfo )
+ && ( SwContentAtPos::SW_TOXMARK | SwContentAtPos::SW_REFMARK ) & rContentAtPos.eContentAtPos
+ && !aTmpState.bFootnoteNoInfo )
{
- pTxtAttr = 0;
- if( SwContentAtPos::SW_TOXMARK & rCntntAtPos.eCntntAtPos )
+ pTextAttr = 0;
+ if( SwContentAtPos::SW_TOXMARK & rContentAtPos.eContentAtPos )
{
- ::std::vector<SwTxtAttr *> const marks(
- pTxtNd->GetTxtAttrsAt(
+ ::std::vector<SwTextAttr *> const marks(
+ pTextNd->GetTextAttrsAt(
aPos.nContent.GetIndex(), RES_TXTATR_TOXMARK));
if (marks.size())
{ // hmm... can only return 1 here
- pTxtAttr = *marks.begin();
+ pTextAttr = *marks.begin();
}
}
- if( !pTxtAttr &&
- SwContentAtPos::SW_REFMARK & rCntntAtPos.eCntntAtPos )
+ if( !pTextAttr &&
+ SwContentAtPos::SW_REFMARK & rContentAtPos.eContentAtPos )
{
- ::std::vector<SwTxtAttr *> const marks(
- pTxtNd->GetTxtAttrsAt(
+ ::std::vector<SwTextAttr *> const marks(
+ pTextNd->GetTextAttrsAt(
aPos.nContent.GetIndex(), RES_TXTATR_REFMARK));
if (marks.size())
{ // hmm... can only return 1 here
- pTxtAttr = *marks.begin();
+ pTextAttr = *marks.begin();
}
}
- if( pTxtAttr )
+ if( pTextAttr )
{
bRet = true;
if( bSetCrsr )
@@ -1381,35 +1381,35 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( bRet )
{
- const sal_Int32* pEnd = pTxtAttr->GetEnd();
+ const sal_Int32* pEnd = pTextAttr->GetEnd();
if( pEnd )
- rCntntAtPos.sStr =
- pTxtNd->GetExpandTxt( pTxtAttr->GetStart(), *pEnd - pTxtAttr->GetStart() );
- else if( RES_TXTATR_TOXMARK == pTxtAttr->Which())
- rCntntAtPos.sStr =
- pTxtAttr->GetTOXMark().GetAlternativeText();
-
- rCntntAtPos.eCntntAtPos =
- RES_TXTATR_TOXMARK == pTxtAttr->Which()
+ rContentAtPos.sStr =
+ pTextNd->GetExpandText( pTextAttr->GetStart(), *pEnd - pTextAttr->GetStart() );
+ else if( RES_TXTATR_TOXMARK == pTextAttr->Which())
+ rContentAtPos.sStr =
+ pTextAttr->GetTOXMark().GetAlternativeText();
+
+ rContentAtPos.eContentAtPos =
+ RES_TXTATR_TOXMARK == pTextAttr->Which()
? SwContentAtPos::SW_TOXMARK
: SwContentAtPos::SW_REFMARK;
- rCntntAtPos.pFndTxtAttr = pTxtAttr;
- rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
+ rContentAtPos.pFndTextAttr = pTextAttr;
+ rContentAtPos.aFnd.pAttr = &pTextAttr->GetAttr();
- if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
- pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
+ if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
}
if ( !bRet
- && SwContentAtPos::SW_INETATTR & rCntntAtPos.eCntntAtPos
- && !aTmpState.bFtnNoInfo )
+ && SwContentAtPos::SW_INETATTR & rContentAtPos.eContentAtPos
+ && !aTmpState.bFootnoteNoInfo )
{
- pTxtAttr = pTxtNd->GetTxtAttrAt(
+ pTextAttr = pTextNd->GetTextAttrAt(
aPos.nContent.GetIndex(), RES_TXTATR_INETFMT);
// "detect" only INetAttrs with URLs
- if( pTxtAttr && !pTxtAttr->GetINetFmt().GetValue().isEmpty() )
+ if( pTextAttr && !pTextAttr->GetINetFormat().GetValue().isEmpty() )
{
bRet = true;
if( bSetCrsr )
@@ -1426,66 +1426,66 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
if( bRet )
{
- rCntntAtPos.sStr = pTxtNd->GetExpandTxt(
- pTxtAttr->GetStart(),
- *pTxtAttr->GetEnd() - pTxtAttr->GetStart() );
+ rContentAtPos.sStr = pTextNd->GetExpandText(
+ pTextAttr->GetStart(),
+ *pTextAttr->GetEnd() - pTextAttr->GetStart() );
- rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_INETATTR;
- rCntntAtPos.pFndTxtAttr = pTxtAttr;
+ rContentAtPos.aFnd.pAttr = &pTextAttr->GetAttr();
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_INETATTR;
+ rContentAtPos.pFndTextAttr = pTextAttr;
- if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
- pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
+ if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
}
- if( !bRet && SwContentAtPos::SW_REDLINE & rCntntAtPos.eCntntAtPos )
+ if( !bRet && SwContentAtPos::SW_REDLINE & rContentAtPos.eContentAtPos )
{
const SwRangeRedline* pRedl = GetDoc()->getIDocumentRedlineAccess().GetRedline(aPos, NULL);
if( pRedl )
{
- rCntntAtPos.aFnd.pRedl = pRedl;
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
- rCntntAtPos.pFndTxtAttr = 0;
+ rContentAtPos.aFnd.pRedl = pRedl;
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_REDLINE;
+ rContentAtPos.pFndTextAttr = 0;
bRet = true;
- if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
- pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
+ if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
}
if( !bRet
- && ( SwContentAtPos::SW_TABLEBOXFML & rCntntAtPos.eCntntAtPos
+ && ( SwContentAtPos::SW_TABLEBOXFML & rContentAtPos.eContentAtPos
#ifdef DBG_UTIL
- || SwContentAtPos::SW_TABLEBOXVALUE & rCntntAtPos.eCntntAtPos
+ || SwContentAtPos::SW_TABLEBOXVALUE & rContentAtPos.eContentAtPos
#endif
) )
{
- const SwTableNode* pTblNd;
+ const SwTableNode* pTableNd;
const SwTableBox* pBox;
- const SwStartNode* pSttNd = pTxtNd->FindTableBoxStartNode();
+ const SwStartNode* pSttNd = pTextNd->FindTableBoxStartNode();
const SfxPoolItem* pItem;
- if( pSttNd && 0 != ( pTblNd = pTxtNd->FindTableNode()) &&
- 0 != ( pBox = pTblNd->GetTable().GetTblBox(
+ if( pSttNd && 0 != ( pTableNd = pTextNd->FindTableNode()) &&
+ 0 != ( pBox = pTableNd->GetTable().GetTableBox(
pSttNd->GetIndex() )) &&
#ifdef DBG_UTIL
- ( SfxItemState::SET == pBox->GetFrmFmt()->GetItemState(
+ ( SfxItemState::SET == pBox->GetFrameFormat()->GetItemState(
RES_BOXATR_FORMULA, false, &pItem ) ||
- SfxItemState::SET == pBox->GetFrmFmt()->GetItemState(
+ SfxItemState::SET == pBox->GetFrameFormat()->GetItemState(
RES_BOXATR_VALUE, false, &pItem ))
#else
- SfxItemState::SET == pBox->GetFrmFmt()->GetItemState(
+ SfxItemState::SET == pBox->GetFrameFormat()->GetItemState(
RES_BOXATR_FORMULA, false, &pItem )
#endif
)
{
- SwFrm* pF = pTxtNd->getLayoutFrm( GetLayout(), &aPt );
+ SwFrm* pF = pTextNd->getLayoutFrm( GetLayout(), &aPt );
if( pF )
{
// then the CellFrame
- pFrm = static_cast<SwCntntFrm*>(pF);
+ pFrm = static_cast<SwContentFrm*>(pF);
while( pF && !pF->IsCellFrm() )
pF = pF->GetUpper();
}
@@ -1502,13 +1502,13 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
{
// create from internal (for CORE) the external
// (for UI) formula
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_TABLEBOXFML;
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_TABLEBOXFML;
#ifdef DBG_UTIL
if( RES_BOXATR_VALUE == pItem->Which() )
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_TABLEBOXVALUE;
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_TABLEBOXVALUE;
else
#endif
- const_cast<SwTblBoxFormula*>(static_cast<const SwTblBoxFormula*>(pItem))->PtrToBoxNm( &pTblNd->GetTable() );
+ const_cast<SwTableBoxFormula*>(static_cast<const SwTableBoxFormula*>(pItem))->PtrToBoxNm( &pTableNd->GetTable() );
bRet = true;
if( bSetCrsr )
@@ -1525,29 +1525,29 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( bRet )
{
- if( pFldRect )
+ if( pFieldRect )
{
- *pFldRect = pF->Prt();
- *pFldRect += pF->Frm().Pos();
+ *pFieldRect = pF->Prt();
+ *pFieldRect += pF->Frm().Pos();
}
- rCntntAtPos.pFndTxtAttr = 0;
- rCntntAtPos.aFnd.pAttr = pItem;
+ rContentAtPos.pFndTextAttr = 0;
+ rContentAtPos.aFnd.pAttr = pItem;
}
}
}
}
#ifdef DBG_UTIL
- if( !bRet && SwContentAtPos::SW_CURR_ATTRS & rCntntAtPos.eCntntAtPos )
+ if( !bRet && SwContentAtPos::SW_CURR_ATTRS & rContentAtPos.eContentAtPos )
{
const sal_Int32 n = aPos.nContent.GetIndex();
SfxItemSet aSet( GetDoc()->GetAttrPool(), POOLATTR_BEGIN,
POOLATTR_END - 1 );
- if( pTxtNd->GetpSwpHints() )
+ if( pTextNd->GetpSwpHints() )
{
- for( size_t i = 0; i < pTxtNd->GetSwpHints().Count(); ++i )
+ for( size_t i = 0; i < pTextNd->GetSwpHints().Count(); ++i )
{
- const SwTxtAttr* pHt = pTxtNd->GetSwpHints()[i];
+ const SwTextAttr* pHt = pTextNd->GetSwpHints()[i];
const sal_Int32 nAttrStart = pHt->GetStart();
if( nAttrStart > n ) // over the section
break;
@@ -1562,29 +1562,29 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
aSet.Put( pHt->GetAttr() );
}
}
- if( pTxtNd->HasSwAttrSet() &&
- pTxtNd->GetpSwAttrSet()->Count() )
+ if( pTextNd->HasSwAttrSet() &&
+ pTextNd->GetpSwAttrSet()->Count() )
{
- SfxItemSet aFmtSet( pTxtNd->GetSwAttrSet() );
+ SfxItemSet aFormatSet( pTextNd->GetSwAttrSet() );
// remove all from format set that are also in TextSet
- aFmtSet.Differentiate( aSet );
+ aFormatSet.Differentiate( aSet );
// now merge all together
- aSet.Put( aFmtSet );
+ aSet.Put( aFormatSet );
}
}
else
- pTxtNd->SwCntntNode::GetAttr( aSet );
-
- rCntntAtPos.sStr = "Pos: (";
- rCntntAtPos.sStr += OUString::number( aPos.nNode.GetIndex());
- rCntntAtPos.sStr += ":";
- rCntntAtPos.sStr += OUString::number( aPos.nContent.GetIndex());
- rCntntAtPos.sStr += ")";
- rCntntAtPos.sStr += "\nParagraph Style: ";
- rCntntAtPos.sStr += pTxtNd->GetFmtColl()->GetName();
- if( pTxtNd->GetCondFmtColl() )
+ pTextNd->SwContentNode::GetAttr( aSet );
+
+ rContentAtPos.sStr = "Pos: (";
+ rContentAtPos.sStr += OUString::number( aPos.nNode.GetIndex());
+ rContentAtPos.sStr += ":";
+ rContentAtPos.sStr += OUString::number( aPos.nContent.GetIndex());
+ rContentAtPos.sStr += ")";
+ rContentAtPos.sStr += "\nParagraph Style: ";
+ rContentAtPos.sStr += pTextNd->GetFormatColl()->GetName();
+ if( pTextNd->GetCondFormatColl() )
{
- rCntntAtPos.sStr += "\nConditional Style: " + pTxtNd->GetCondFmtColl()->GetName();
+ rContentAtPos.sStr += "\nConditional Style: " + pTextNd->GetCondFormatColl()->GetName();
}
if( aSet.Count() )
@@ -1609,13 +1609,13 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
if (!sAttrs.isEmpty())
{
- if( !rCntntAtPos.sStr.isEmpty() )
- rCntntAtPos.sStr += "\n";
- rCntntAtPos.sStr += "Attr: " + sAttrs;
+ if( !rContentAtPos.sStr.isEmpty() )
+ rContentAtPos.sStr += "\n";
+ rContentAtPos.sStr += "Attr: " + sAttrs;
}
}
bRet = true;
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_CURR_ATTRS;
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_CURR_ATTRS;
}
#endif
}
@@ -1623,8 +1623,8 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( !bRet )
{
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_NOTHING;
- rCntntAtPos.aFnd.pFld = 0;
+ rContentAtPos.eContentAtPos = SwContentAtPos::SW_NOTHING;
+ rContentAtPos.aFnd.pField = 0;
}
return bRet;
}
@@ -1632,45 +1632,45 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
// #i90516#
const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
{
- const SwPostItField* pPostItFld = 0;
+ const SwPostItField* pPostItField = 0;
if ( !IsTableMode() )
{
const SwPosition* pCursorPos = _GetCrsr()->GetPoint();
- const SwTxtNode* pTxtNd = pCursorPos->nNode.GetNode().GetTxtNode();
- if ( pTxtNd )
+ const SwTextNode* pTextNd = pCursorPos->nNode.GetNode().GetTextNode();
+ if ( pTextNd )
{
- SwTxtAttr* pTxtAttr = pTxtNd->GetFldTxtAttrAt( pCursorPos->nContent.GetIndex() );
- const SwField* pFld = pTxtAttr != NULL ? pTxtAttr->GetFmtFld().GetField() : 0;
- if ( pFld && pFld->Which()== RES_POSTITFLD )
+ SwTextAttr* pTextAttr = pTextNd->GetFieldTextAttrAt( pCursorPos->nContent.GetIndex() );
+ const SwField* pField = pTextAttr != NULL ? pTextAttr->GetFormatField().GetField() : 0;
+ if ( pField && pField->Which()== RES_POSTITFLD )
{
- pPostItFld = static_cast<const SwPostItField*>(pFld);
+ pPostItField = static_cast<const SwPostItField*>(pField);
}
}
}
- return pPostItFld;
+ return pPostItField;
}
/// is the node in a protected section?
bool SwContentAtPos::IsInProtectSect() const
{
- const SwTxtNode* pNd = 0;
- if( pFndTxtAttr )
+ const SwTextNode* pNd = 0;
+ if( pFndTextAttr )
{
- switch( eCntntAtPos )
+ switch( eContentAtPos )
{
case SW_FIELD:
case SW_CLICKFIELD:
- pNd = static_txtattr_cast<SwTxtFld const*>(pFndTxtAttr)->GetpTxtNode();
+ pNd = static_txtattr_cast<SwTextField const*>(pFndTextAttr)->GetpTextNode();
break;
case SW_FTN:
- pNd = &static_cast<const SwTxtFtn*>(pFndTxtAttr)->GetTxtNode();
+ pNd = &static_cast<const SwTextFootnote*>(pFndTextAttr)->GetTextNode();
break;
case SW_INETATTR:
- pNd = static_txtattr_cast<SwTxtINetFmt const*>(pFndTxtAttr)->GetpTxtNode();
+ pNd = static_txtattr_cast<SwTextINetFormat const*>(pFndTextAttr)->GetpTextNode();
break;
default:
@@ -1678,7 +1678,7 @@ bool SwContentAtPos::IsInProtectSect() const
}
}
- const SwCntntFrm* pFrm;
+ const SwContentFrm* pFrm;
return pNd && ( pNd->IsInProtectSect() ||
( 0 != ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, false)) &&
pFrm->IsProtected() ));
@@ -1687,24 +1687,24 @@ bool SwContentAtPos::IsInProtectSect() const
bool SwContentAtPos::IsInRTLText()const
{
bool bRet = false;
- const SwTxtNode* pNd = 0;
- if (pFndTxtAttr && (eCntntAtPos == SW_FTN))
+ const SwTextNode* pNd = 0;
+ if (pFndTextAttr && (eContentAtPos == SW_FTN))
{
- const SwTxtFtn* pTxtFtn = static_cast<const SwTxtFtn*>(pFndTxtAttr);
- if(pTxtFtn->GetStartNode())
+ const SwTextFootnote* pTextFootnote = static_cast<const SwTextFootnote*>(pFndTextAttr);
+ if(pTextFootnote->GetStartNode())
{
- SwStartNode* pSttNd = pTxtFtn->GetStartNode()->GetNode().GetStartNode();
+ SwStartNode* pSttNd = pTextFootnote->GetStartNode()->GetNode().GetStartNode();
SwPaM aTemp( *pSttNd );
aTemp.Move(fnMoveForward, fnGoNode);
- SwCntntNode* pCntntNode = aTemp.GetCntntNode();
- if(pCntntNode && pCntntNode->IsTxtNode())
- pNd = pCntntNode->GetTxtNode();
+ SwContentNode* pContentNode = aTemp.GetContentNode();
+ if(pContentNode && pContentNode->IsTextNode())
+ pNd = pContentNode->GetTextNode();
}
}
if(pNd)
{
- SwIterator<SwTxtFrm,SwTxtNode> aIter(*pNd);
- SwTxtFrm* pTmpFrm = aIter.First();
+ SwIterator<SwTextFrm,SwTextNode> aIter(*pNd);
+ SwTextFrm* pTmpFrm = aIter.First();
while( pTmpFrm )
{
if ( !pTmpFrm->IsFollow())
@@ -1718,7 +1718,7 @@ bool SwContentAtPos::IsInRTLText()const
return bRet;
}
-bool SwCrsrShell::SelectTxt( const sal_Int32 nStart,
+bool SwCrsrShell::SelectText( const sal_Int32 nStart,
const sal_Int32 nEnd )
{
SET_CURR_SHELL( this );
@@ -1742,39 +1742,39 @@ bool SwCrsrShell::SelectTxt( const sal_Int32 nStart,
return bRet;
}
-bool SwCrsrShell::SelectTxtAttr( sal_uInt16 nWhich,
+bool SwCrsrShell::SelectTextAttr( sal_uInt16 nWhich,
bool bExpand,
- const SwTxtAttr* pTxtAttr )
+ const SwTextAttr* pTextAttr )
{
SET_CURR_SHELL( this );
bool bRet = false;
if( !IsTableMode() )
{
- if( !pTxtAttr )
+ if( !pTextAttr )
{
SwPosition& rPos = *m_pCurCrsr->GetPoint();
- SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
- pTxtAttr = (pTxtNd)
- ? pTxtNd->GetTxtAttrAt(rPos.nContent.GetIndex(),
+ SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode();
+ pTextAttr = (pTextNd)
+ ? pTextNd->GetTextAttrAt(rPos.nContent.GetIndex(),
static_cast<RES_TXTATR>(nWhich),
- (bExpand) ? SwTxtNode::EXPAND : SwTxtNode::DEFAULT)
+ (bExpand) ? SwTextNode::EXPAND : SwTextNode::DEFAULT)
: 0;
}
- if( pTxtAttr )
+ if( pTextAttr )
{
- const sal_Int32* pEnd = pTxtAttr->End();
- bRet = SelectTxt( pTxtAttr->GetStart(), ( pEnd ? *pEnd : pTxtAttr->GetStart() + 1 ) );
+ const sal_Int32* pEnd = pTextAttr->End();
+ bRet = SelectText( pTextAttr->GetStart(), ( pEnd ? *pEnd : pTextAttr->GetStart() + 1 ) );
}
}
return bRet;
}
-bool SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
+bool SwCrsrShell::GotoINetAttr( const SwTextINetFormat& rAttr )
{
bool bRet = false;
- if( rAttr.GetpTxtNode() )
+ if( rAttr.GetpTextNode() )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -1782,8 +1782,8 @@ bool SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
SwCallLink aLk( *this ); // watch Crsr-Moves
SwCrsrSaveState aSaveState( *pCrsr );
- pCrsr->GetPoint()->nNode = *rAttr.GetpTxtNode();
- pCrsr->GetPoint()->nContent.Assign( const_cast<SwTxtNode*>(rAttr.GetpTxtNode()),
+ pCrsr->GetPoint()->nNode = *rAttr.GetpTextNode();
+ pCrsr->GetPoint()->nContent.Assign( const_cast<SwTextNode*>(rAttr.GetpTextNode()),
rAttr.GetStart() );
bRet = !pCrsr->IsSelOvr();
if( bRet )
@@ -1792,7 +1792,7 @@ bool SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
return bRet;
}
-const SwFmtINetFmt* SwCrsrShell::FindINetAttr( const OUString& rName ) const
+const SwFormatINetFormat* SwCrsrShell::FindINetAttr( const OUString& rName ) const
{
return mpDoc->FindINetAttr( rName );
}
@@ -1844,7 +1844,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
SwCallLink aLk( *this ); // watch Crsr-Moves
StartAction();
- SwCntntNode* pCNd = aPos.nNode.GetNode().GetCntntNode();
+ SwContentNode* pCNd = aPos.nNode.GetNode().GetContentNode();
SwUndoId nUndoId = UNDO_INS_FROM_SHADOWCRSR;
// If only the paragraph attributes "Adjust" or "LRSpace" are set,
// then the following should not delete those again.
@@ -1857,10 +1857,10 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
GetDoc()->GetIDocumentUndoRedo().StartUndo( nUndoId, NULL );
- SwTxtFmtColl* pNextFmt = 0;
- SwTxtNode* pTNd = pCNd ? pCNd->GetTxtNode() : NULL;
+ SwTextFormatColl* pNextFormat = 0;
+ SwTextNode* pTNd = pCNd ? pCNd->GetTextNode() : NULL;
if( pTNd )
- pNextFmt = &pTNd->GetTxtColl()->GetNextTxtFmtColl();
+ pNextFormat = &pTNd->GetTextColl()->GetNextTextFormatColl();
const SwSectionNode* pSectNd = pCNd ? pCNd->FindSectionNode() : NULL;
if( pSectNd && aFPos.nParaCnt )
@@ -1878,17 +1878,17 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
for( sal_uInt16 n = 0; n < aFPos.nParaCnt + aFPos.nColumnCnt; ++n )
{
- GetDoc()->getIDocumentContentOperations().AppendTxtNode( aPos );
- if( !n && pNextFmt )
+ GetDoc()->getIDocumentContentOperations().AppendTextNode( aPos );
+ if( !n && pNextFormat )
{
*m_pCurCrsr->GetPoint() = aPos;
- GetDoc()->SetTxtFmtColl( *m_pCurCrsr, pNextFmt, false );
+ GetDoc()->SetTextFormatColl( *m_pCurCrsr, pNextFormat, false );
}
if( n < aFPos.nColumnCnt )
{
*m_pCurCrsr->GetPoint() = aPos;
GetDoc()->getIDocumentContentOperations().InsertPoolItem( *m_pCurCrsr,
- SvxFmtBreakItem( SVX_BREAK_COLUMN_BEFORE, RES_BREAK ) );
+ SvxFormatBreakItem( SVX_BREAK_COLUMN_BEFORE, RES_BREAK ) );
}
}
@@ -1896,7 +1896,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
switch( aFPos.eMode )
{
case FILL_INDENT:
- if( 0 != (pCNd = aPos.nNode.GetNode().GetCntntNode() ))
+ if( 0 != (pCNd = aPos.nNode.GetNode().GetContentNode() ))
{
SfxItemSet aSet( GetDoc()->GetAttrPool(),
RES_LR_SPACE, RES_LR_SPACE,
@@ -1904,8 +1904,8 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
0 );
SvxLRSpaceItem aLR( static_cast<const SvxLRSpaceItem&>(
pCNd->GetAttr( RES_LR_SPACE ) ) );
- aLR.SetTxtLeft( aFPos.nTabCnt );
- aLR.SetTxtFirstLineOfst( 0 );
+ aLR.SetTextLeft( aFPos.nTabCnt );
+ aLR.SetTextFirstLineOfst( 0 );
aSet.Put( aLR );
const SvxAdjustItem& rAdj = static_cast<const SvxAdjustItem&>(pCNd->
@@ -1916,7 +1916,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
GetDoc()->getIDocumentContentOperations().InsertItemSet( *m_pCurCrsr, aSet );
}
else {
- OSL_ENSURE( false, "No CntntNode" );
+ OSL_ENSURE( false, "No ContentNode" );
}
break;
@@ -2003,14 +2003,14 @@ const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelec
SwCallLink aLk( *this ); // watch Crsr-Moves
SwCrsrSaveState aSaveState( *m_pCurCrsr );
- pFnd = GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl()[ nArrPos ];
+ pFnd = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable()[ nArrPos ];
if( pFnd )
{
*m_pCurCrsr->GetPoint() = *pFnd->Start();
- SwCntntNode* pCNd;
+ SwContentNode* pCNd;
SwNodeIndex* pIdx = &m_pCurCrsr->GetPoint()->nNode;
- if( !pIdx->GetNode().IsCntntNode() &&
+ if( !pIdx->GetNode().IsContentNode() &&
0 != ( pCNd = GetDoc()->GetNodes().GoNextSection( pIdx,
true, IsReadOnlyAvailable() )) )
{
@@ -2025,7 +2025,7 @@ const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelec
m_pCurCrsr->SetMark();
if( nsRedlineType_t::REDLINE_FMTCOLL == pFnd->GetType() )
{
- pCNd = pIdx->GetNode().GetCntntNode();
+ pCNd = pIdx->GetNode().GetContentNode();
m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
m_pCurCrsr->GetMark()->nContent.Assign( pCNd, 0 );
}
@@ -2033,7 +2033,7 @@ const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelec
*m_pCurCrsr->GetPoint() = *pFnd->End();
pIdx = &m_pCurCrsr->GetPoint()->nNode;
- if( !pIdx->GetNode().IsCntntNode() &&
+ if( !pIdx->GetNode().IsContentNode() &&
0 != ( pCNd = SwNodes::GoPrevSection( pIdx,
true, IsReadOnlyAvailable() )) )
{
@@ -2072,8 +2072,8 @@ const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect
{
SET_CURR_SHELL( this );
- const SwRedlineTbl& rTbl = GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl();
- const SwRangeRedline* pTmp = rTbl[ nArrPos ];
+ const SwRedlineTable& rTable = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
+ const SwRangeRedline* pTmp = rTable[ nArrPos ];
sal_uInt16 nSeqNo = pTmp->GetSeqNo();
if( nSeqNo && bSelect )
{
@@ -2089,7 +2089,7 @@ const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect
if( pTmp && bCheck )
{
- // Check for overlaps. These can happen when FmtColl-
+ // Check for overlaps. These can happen when FormatColl-
// Redlines were stretched over a whole paragraph
SwPaM* pCur = m_pCurCrsr;
SwPaM* pNextPam = pCur->GetNext();
@@ -2149,11 +2149,11 @@ const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect
}
sal_uInt16 nFndPos = 2 == nLoopCnt
- ? rTbl.FindNextOfSeqNo( nArrPos )
- : rTbl.FindPrevOfSeqNo( nArrPos );
+ ? rTable.FindNextOfSeqNo( nArrPos )
+ : rTable.FindPrevOfSeqNo( nArrPos );
if( USHRT_MAX != nFndPos ||
( 0 != ( --nLoopCnt ) && USHRT_MAX != (
- nFndPos = rTbl.FindPrevOfSeqNo( nArrSavPos ))) )
+ nFndPos = rTable.FindPrevOfSeqNo( nArrSavPos ))) )
{
if( pTmp )
{
@@ -2182,47 +2182,47 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
sal_uLong nBodySttNdIdx = pBodySttNd->GetIndex();
Point aPt;
- _SetGetExpFld aCmpPos( SwPosition( bNext ? *pBodyEndNd : *pBodySttNd ) );
- _SetGetExpFld aCurPos( bNext ? *m_pCurCrsr->End() : *m_pCurCrsr->Start() );
+ _SetGetExpField aCmpPos( SwPosition( bNext ? *pBodyEndNd : *pBodySttNd ) );
+ _SetGetExpField aCurPos( bNext ? *m_pCurCrsr->End() : *m_pCurCrsr->Start() );
if( aCurPos.GetNode() < nBodySttNdIdx )
{
- const SwCntntNode* pCNd = aCurPos.GetNodeFromCntnt()->GetCntntNode();
- SwCntntFrm* pFrm;
+ const SwContentNode* pCNd = aCurPos.GetNodeFromContent()->GetContentNode();
+ SwContentFrm* pFrm;
if( pCNd && 0 != ( pFrm = pCNd->getLayoutFrm( GetLayout(), &aPt )) )
aCurPos.SetBodyPos( *pFrm );
}
// check first all the hyperlink fields
{
- const SwTxtNode* pTxtNd;
- const SwCharFmts* pFmts = GetDoc()->GetCharFmts();
- for( SwCharFmts::size_type n = pFmts->size(); 1 < n; )
+ const SwTextNode* pTextNd;
+ const SwCharFormats* pFormats = GetDoc()->GetCharFormats();
+ for( SwCharFormats::size_type n = pFormats->size(); 1 < n; )
{
- SwIterator<SwTxtINetFmt,SwCharFmt> aIter(*(*pFmts)[--n]);
+ SwIterator<SwTextINetFormat,SwCharFormat> aIter(*(*pFormats)[--n]);
- for( SwTxtINetFmt* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
- if( 0 != ( pTxtNd = pFnd->GetpTxtNode()) &&
- pTxtNd->GetNodes().IsDocNodes() )
+ for( SwTextINetFormat* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
+ if( 0 != ( pTextNd = pFnd->GetpTextNode()) &&
+ pTextNd->GetNodes().IsDocNodes() )
{
- SwTxtINetFmt& rAttr = *pFnd;
- SwPosition aTmpPos( *pTxtNd );
- _SetGetExpFld aPos( aTmpPos.nNode, rAttr );
- SwCntntFrm* pFrm;
- if( pTxtNd->GetIndex() < nBodySttNdIdx &&
- 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt )) )
+ SwTextINetFormat& rAttr = *pFnd;
+ SwPosition aTmpPos( *pTextNd );
+ _SetGetExpField aPos( aTmpPos.nNode, rAttr );
+ SwContentFrm* pFrm;
+ if( pTextNd->GetIndex() < nBodySttNdIdx &&
+ 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt )) )
aPos.SetBodyPos( *pFrm );
if( bNext
? ( aPos < aCmpPos && aCurPos < aPos )
: ( aCmpPos < aPos && aPos < aCurPos ))
{
- OUString sTxt( pTxtNd->GetExpandTxt( rAttr.GetStart(),
+ OUString sText( pTextNd->GetExpandText( rAttr.GetStart(),
*rAttr.GetEnd() - rAttr.GetStart() ) );
- sTxt = comphelper::string::remove(sTxt, 0x0a);
- sTxt = comphelper::string::strip(sTxt, ' ');
+ sText = comphelper::string::remove(sText, 0x0a);
+ sText = comphelper::string::strip(sText, ' ');
- if( !sTxt.isEmpty() )
+ if( !sText.isEmpty() )
aCmpPos = aPos;
}
}
@@ -2231,19 +2231,19 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
// then check all the Flys with a URL or imapge map
{
- const SwFrmFmts* pFmts = GetDoc()->GetSpzFrmFmts();
- for( SwFrmFmts::size_type n = 0, nEnd = pFmts->size(); n < nEnd; ++n )
+ const SwFrameFormats* pFormats = GetDoc()->GetSpzFrameFormats();
+ for( SwFrameFormats::size_type n = 0, nEnd = pFormats->size(); n < nEnd; ++n )
{
- SwFlyFrmFmt* pFmt = static_cast<SwFlyFrmFmt*>((*pFmts)[ n ]);
- const SwFmtURL& rURLItem = pFmt->GetURL();
+ SwFlyFrameFormat* pFormat = static_cast<SwFlyFrameFormat*>((*pFormats)[ n ]);
+ const SwFormatURL& rURLItem = pFormat->GetURL();
if( rURLItem.GetMap() || !rURLItem.GetURL().isEmpty() )
{
- SwFlyFrm* pFly = pFmt->GetFrm( &aPt, false );
+ SwFlyFrm* pFly = pFormat->GetFrm( &aPt, false );
SwPosition aTmpPos( *pBodySttNd );
if( pFly &&
- GetBodyTxtNode( *GetDoc(), aTmpPos, *pFly->GetLower() ) )
+ GetBodyTextNode( *GetDoc(), aTmpPos, *pFly->GetLower() ) )
{
- _SetGetExpFld aPos( *pFmt, &aTmpPos );
+ _SetGetExpField aPos( *pFormat, &aTmpPos );
if( bNext
? ( aPos < aCmpPos && aCurPos < aPos )
@@ -2256,9 +2256,9 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
// found any URL ?
bool bRet = false;
- const SwTxtINetFmt* pFndAttr = aCmpPos.GetINetFmt();
- const SwFlyFrmFmt* pFndFmt = aCmpPos.GetFlyFmt();
- if( pFndAttr || pFndFmt )
+ const SwTextINetFormat* pFndAttr = aCmpPos.GetINetFormat();
+ const SwFlyFrameFormat* pFndFormat = aCmpPos.GetFlyFormat();
+ if( pFndAttr || pFndFormat )
{
SET_CURR_SHELL( this );
SwCallLink aLk( *this );
@@ -2281,9 +2281,9 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
}
}
// found a draw object ?
- else if( RES_DRAWFRMFMT == pFndFmt->Which() )
+ else if( RES_DRAWFRMFMT == pFndFormat->Which() )
{
- const SdrObject* pSObj = pFndFmt->FindSdrObject();
+ const SdrObject* pSObj = pFndFormat->FindSdrObject();
if (pSObj)
{
static_cast<SwFEShell*>(this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
@@ -2293,7 +2293,7 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
}
else // then is it a fly
{
- SwFlyFrm* pFly = pFndFmt->GetFrm(&aPt, false );
+ SwFlyFrm* pFly = pFndFormat->GetFrm(&aPt, false );
if( pFly )
{
static_cast<SwFEShell*>(this)->SelectFlyFrm( *pFly, true );
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index d0cdeaa50b6c..9ff5944d7e5c 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -49,7 +49,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
-typedef std::set<SwFmt*> SwpFmts;
+typedef std::set<SwFormat*> SwpFormats;
// Special case for SvxFontItem: only compare the name
bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
@@ -66,9 +66,9 @@ bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
case RES_PAGEDESC:
bool bNumOffsetEqual = false;
::boost::optional<sal_uInt16> const oNumOffset1 =
- static_cast<const SwFmtPageDesc&>(rItem1).GetNumOffset();
+ static_cast<const SwFormatPageDesc&>(rItem1).GetNumOffset();
::boost::optional<sal_uInt16> const oNumOffset2 =
- static_cast<const SwFmtPageDesc&>(rItem2).GetNumOffset();
+ static_cast<const SwFormatPageDesc&>(rItem2).GetNumOffset();
if (!oNumOffset1 && !oNumOffset2)
{
bNumOffsetEqual = true;
@@ -85,33 +85,33 @@ bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
if (!bNumOffsetEqual)
return false;
- return static_cast<const SwFmtPageDesc&>(rItem1).GetPageDesc() == static_cast<const SwFmtPageDesc&>(rItem2).GetPageDesc();
+ return static_cast<const SwFormatPageDesc&>(rItem1).GetPageDesc() == static_cast<const SwFormatPageDesc&>(rItem2).GetPageDesc();
}
return rItem1 == rItem2;
}
-const SwTxtAttr* GetFrwrdTxtHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
- sal_Int32 nCntntPos )
+const SwTextAttr* GetFrwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
+ sal_Int32 nContentPos )
{
while( rPos < rHtsArr.Count() )
{
- const SwTxtAttr *pTxtHt = rHtsArr.GetStart( rPos++ );
+ const SwTextAttr *pTextHt = rHtsArr.GetStart( rPos++ );
// the start of an attribute has to be in the section
- if( pTxtHt->GetStart() >= nCntntPos )
- return pTxtHt; // valid text attribute
+ if( pTextHt->GetStart() >= nContentPos )
+ return pTextHt; // valid text attribute
}
return 0; // invalid text attribute
}
-const SwTxtAttr* GetBkwrdTxtHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
- sal_Int32 nCntntPos )
+const SwTextAttr* GetBkwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
+ sal_Int32 nContentPos )
{
while( rPos > 0 )
{
- const SwTxtAttr *pTxtHt = rHtsArr.GetStart( --rPos );
+ const SwTextAttr *pTextHt = rHtsArr.GetStart( --rPos );
// the start of an attribute has to be in the section
- if( pTxtHt->GetStart() < nCntntPos )
- return pTxtHt; // valid text attribute
+ if( pTextHt->GetStart() < nContentPos )
+ return pTextHt; // valid text attribute
}
return 0; // invalid text attribute
}
@@ -119,22 +119,22 @@ const SwTxtAttr* GetBkwrdTxtHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
static void lcl_SetAttrPam( SwPaM& rPam, sal_Int32 nStart, const sal_Int32* pEnd,
const bool bSaveMark )
{
- sal_Int32 nCntntPos;
+ sal_Int32 nContentPos;
if( bSaveMark )
- nCntntPos = rPam.GetMark()->nContent.GetIndex();
+ nContentPos = rPam.GetMark()->nContent.GetIndex();
else
- nCntntPos = rPam.GetPoint()->nContent.GetIndex();
+ nContentPos = rPam.GetPoint()->nContent.GetIndex();
bool bTstEnd = rPam.GetPoint()->nNode == rPam.GetMark()->nNode;
- SwCntntNode* pCNd = rPam.GetCntntNode();
+ SwContentNode* pCNd = rPam.GetContentNode();
rPam.GetPoint()->nContent.Assign( pCNd, nStart );
rPam.SetMark(); // Point == GetMark
// Point points to end of search area or end of attribute
if( pEnd )
{
- if( bTstEnd && *pEnd > nCntntPos )
- rPam.GetPoint()->nContent = nCntntPos;
+ if( bTstEnd && *pEnd > nContentPos )
+ rPam.GetPoint()->nContent = nContentPos;
else
rPam.GetPoint()->nContent = *pEnd;
}
@@ -147,30 +147,30 @@ static void lcl_SetAttrPam( SwPaM& rPam, sal_Int32 nStart, const sal_Int32* pEnd
If that is found then the SwPaM contains the section that surrounds the
attribute (w.r.t. the search area).
- @param rTxtNd Text node to search in.
+ @param rTextNd Text node to search in.
@param rPam ???
@param rCmpItem ???
@param fnMove ???
@param bValue ???
@return Returns <true> if found, <false> otherwise.
*/
-static bool lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
+static bool lcl_Search( const SwTextNode& rTextNd, SwPaM& rPam,
const SfxPoolItem& rCmpItem,
SwMoveFn fnMove, bool bValue )
{
- if ( !rTxtNd.HasHints() )
+ if ( !rTextNd.HasHints() )
return false;
- const SwTxtAttr *pTxtHt = 0;
+ const SwTextAttr *pTextHt = 0;
bool bForward = fnMove == fnMoveForward;
- sal_uInt16 nPos = bForward ? 0 : rTxtNd.GetSwpHints().Count();
- sal_Int32 nCntntPos = rPam.GetPoint()->nContent.GetIndex();
+ sal_uInt16 nPos = bForward ? 0 : rTextNd.GetSwpHints().Count();
+ sal_Int32 nContentPos = rPam.GetPoint()->nContent.GetIndex();
- while( 0 != ( pTxtHt=(*fnMove->fnGetHint)(rTxtNd.GetSwpHints(),nPos,nCntntPos)))
- if( pTxtHt->Which() == rCmpItem.Which() &&
- ( !bValue || CmpAttr( pTxtHt->GetAttr(), rCmpItem )))
+ while( 0 != ( pTextHt=(*fnMove->fnGetHint)(rTextNd.GetSwpHints(),nPos,nContentPos)))
+ if( pTextHt->Which() == rCmpItem.Which() &&
+ ( !bValue || CmpAttr( pTextHt->GetAttr(), rCmpItem )))
{
- lcl_SetAttrPam( rPam, pTxtHt->GetStart(), pTxtHt->End(), bForward );
+ lcl_SetAttrPam( rPam, pTextHt->GetStart(), pTextHt->End(), bForward );
return true;
}
return false;
@@ -204,7 +204,7 @@ public:
SwAttrCheckArr( const SfxItemSet& rSet, bool bForward, bool bNoCollections );
~SwAttrCheckArr();
- void SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam );
+ void SetNewSet( const SwTextNode& rTextNd, const SwPaM& rPam );
/// how many attributes are there in total?
sal_uInt16 Count() const { return aCmpSet.Count(); }
@@ -217,8 +217,8 @@ public:
sal_Int32 GetNdStt() const { return nNdStt; }
sal_Int32 GetNdEnd() const { return nNdEnd; }
- bool SetAttrFwd( const SwTxtAttr& rAttr );
- bool SetAttrBwd( const SwTxtAttr& rAttr );
+ bool SetAttrFwd( const SwTextAttr& rAttr );
+ bool SetAttrBwd( const SwTextAttr& rAttr );
};
SwAttrCheckArr::SwAttrCheckArr( const SfxItemSet& rSet, bool bFwd,
@@ -251,7 +251,7 @@ SwAttrCheckArr::~SwAttrCheckArr()
delete[] reinterpret_cast<char*>(pStackArr);
}
-void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam )
+void SwAttrCheckArr::SetNewSet( const SwTextNode& rTextNd, const SwPaM& rPam )
{
memset( pFndArr, 0, nArrLen * sizeof(_SwSrchChrAttr) );
memset( pStackArr, 0, nArrLen * sizeof(_SwSrchChrAttr) );
@@ -263,7 +263,7 @@ void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam )
nNdStt = rPam.GetPoint()->nContent.GetIndex();
nNdEnd = rPam.GetPoint()->nNode == rPam.GetMark()->nNode
? rPam.GetMark()->nContent.GetIndex()
- : rTxtNd.GetTxt().getLength();
+ : rTextNd.GetText().getLength();
}
else
{
@@ -273,10 +273,10 @@ void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam )
: 0;
}
- if( bNoColls && !rTxtNd.HasSwAttrSet() )
+ if( bNoColls && !rTextNd.HasSwAttrSet() )
return ;
- const SfxItemSet& rSet = rTxtNd.GetSwAttrSet();
+ const SfxItemSet& rSet = rTextNd.GetSwAttrSet();
SfxItemIter aIter( aCmpSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
@@ -333,7 +333,7 @@ lcl_IsAttributeIgnorable(sal_Int32 const nNdStart, sal_Int32 const nNdEnd,
: ((rTmp.nEnd <= nNdStart) || (nNdEnd <= rTmp.nStt)));
}
-bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
+bool SwAttrCheckArr::SetAttrFwd( const SwTextAttr& rAttr )
{
_SwSrchChrAttr aTmp( rAttr.GetAttr(), rAttr.GetStart(), *rAttr.GetAnyEnd() );
@@ -354,7 +354,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
if( bNoColls && RES_TXTATR_CHARFMT == nWhch )
return Found();
pTmpItem = NULL;
- pSet = CharFmt::GetItemSet( rAttr.GetAttr() );
+ pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
if ( pSet )
{
pIter = new SfxWhichIter( *pSet );
@@ -486,7 +486,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
return Found();
}
-bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
+bool SwAttrCheckArr::SetAttrBwd( const SwTextAttr& rAttr )
{
_SwSrchChrAttr aTmp( rAttr.GetAttr(), rAttr.GetStart(), *rAttr.GetAnyEnd() );
@@ -507,7 +507,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
if( bNoColls && RES_TXTATR_CHARFMT == nWhch )
return Found();
- pSet = CharFmt::GetItemSet( rAttr.GetAttr() );
+ pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
if ( pSet )
{
pIter = new SfxWhichIter( *pSet );
@@ -693,12 +693,12 @@ bool SwAttrCheckArr::CheckStack()
return nFound == aCmpSet.Count();
}
-static bool lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
+static bool lcl_SearchForward( const SwTextNode& rTextNd, SwAttrCheckArr& rCmpArr,
SwPaM& rPam )
{
sal_Int32 nEndPos;
- rCmpArr.SetNewSet( rTxtNd, rPam );
- if( !rTxtNd.HasHints() )
+ rCmpArr.SetNewSet( rTextNd, rPam );
+ if( !rTextNd.HasHints() )
{
if( !rCmpArr.Found() )
return false;
@@ -707,8 +707,8 @@ static bool lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
return true;
}
- const SwpHints& rHtArr = rTxtNd.GetSwpHints();
- const SwTxtAttr* pAttr;
+ const SwpHints& rHtArr = rTextNd.GetSwpHints();
+ const SwTextAttr* pAttr;
size_t nPos = 0;
// if everything is already there then check with which it will be ended
@@ -767,12 +767,12 @@ static bool lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
return true;
}
-static bool lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
+static bool lcl_SearchBackward( const SwTextNode& rTextNd, SwAttrCheckArr& rCmpArr,
SwPaM& rPam )
{
sal_Int32 nEndPos;
- rCmpArr.SetNewSet( rTxtNd, rPam );
- if( !rTxtNd.HasHints() )
+ rCmpArr.SetNewSet( rTextNd, rPam );
+ if( !rTextNd.HasHints() )
{
if( !rCmpArr.Found() )
return false;
@@ -781,8 +781,8 @@ static bool lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr
return true;
}
- const SwpHints& rHtArr = rTxtNd.GetSwpHints();
- const SwTxtAttr* pAttr;
+ const SwpHints& rHtArr = rTextNd.GetSwpHints();
+ const SwTextAttr* pAttr;
size_t nPos = rHtArr.Count();
sal_Int32 nSttPos;
@@ -845,7 +845,7 @@ static bool lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr
return true;
}
-static bool lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, bool bNoColls )
+static bool lcl_Search( const SwContentNode& rCNd, const SfxItemSet& rCmpSet, bool bNoColls )
{
// search only hard attribution?
if( bNoColls && !rCNd.HasSwAttrSet() )
@@ -893,20 +893,20 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
bool bFound = false;
bool bFirst = true;
const bool bSrchForward = fnMove == fnMoveForward;
- SwCntntNode * pNode;
+ SwContentNode * pNode;
const SfxPoolItem* pItem;
- SwpFmts aFmtArr;
+ SwpFormats aFormatArr;
// if at beginning/end then move it out of the node
if( bSrchForward
- ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
+ ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetContentNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() )
{
if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, false ))
{
return false;
}
- SwCntntNode *pNd = pPam->GetCntntNode();
+ SwContentNode *pNd = pPam->GetContentNode();
pPam->GetPoint()->nContent.Assign( pNd, bSrchForward ? 0 : pNd->Len() );
}
@@ -914,11 +914,11 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
{
if( bCharAttr )
{
- if( !pNode->IsTxtNode() ) // CharAttr are only in text nodes
+ if( !pNode->IsTextNode() ) // CharAttr are only in text nodes
continue;
- if( pNode->GetTxtNode()->HasHints() &&
- lcl_Search( *pNode->GetTxtNode(), *pPam, rAttr, fnMove, bValue ))
+ if( pNode->GetTextNode()->HasHints() &&
+ lcl_Search( *pNode->GetTextNode(), *pPam, rAttr, fnMove, bValue ))
{
// set to the values of the attribute
SetMark();
@@ -934,10 +934,10 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
// no hard attribution, so check if node was asked for this attr before
if( !pNode->HasSwAttrSet() )
{
- SwFmt* pTmpFmt = pNode->GetFmtColl();
- if( aFmtArr.find( pTmpFmt ) != aFmtArr.end() )
+ SwFormat* pTmpFormat = pNode->GetFormatColl();
+ if( aFormatArr.find( pTmpFormat ) != aFormatArr.end() )
continue; // collection was requested earlier
- aFmtArr.insert( pTmpFmt );
+ aFormatArr.insert( pTmpFormat );
}
if( SfxItemState::SET == pNode->GetSwAttrSet().GetItemState( nWhich,
@@ -961,7 +961,7 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
return bFound;
}
-typedef bool (*FnSearchAttr)( const SwTxtNode&, SwAttrCheckArr&, SwPaM& );
+typedef bool (*FnSearchAttr)( const SwTextNode&, SwAttrCheckArr&, SwPaM& );
bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFn fnMove,
const SwPaM *pRegion, bool bInReadOnly, bool bMoveFirst )
@@ -971,8 +971,8 @@ bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFn fnMove,
bool bFound = false;
bool bFirst = true;
const bool bSrchForward = fnMove == fnMoveForward;
- SwCntntNode * pNode;
- SwpFmts aFmtArr;
+ SwContentNode * pNode;
+ SwpFormats aFormatArr;
// check which text/char attributes are searched
SwAttrCheckArr aCmpArr( rSet, bSrchForward, bNoColls );
@@ -987,14 +987,14 @@ bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFn fnMove,
// if at beginning/end then move it out of the node
if( bMoveFirst &&
( bSrchForward
- ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
+ ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetContentNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() ) )
{
if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, false ))
{
return false;
}
- SwCntntNode *pNd = pPam->GetCntntNode();
+ SwContentNode *pNd = pPam->GetContentNode();
pPam->GetPoint()->nContent.Assign( pNd, bSrchForward ? 0 : pNd->Len() );
}
@@ -1002,12 +1002,12 @@ bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFn fnMove,
{
if( aCmpArr.Count() )
{
- if( !pNode->IsTxtNode() ) // CharAttr are only in text nodes
+ if( !pNode->IsTextNode() ) // CharAttr are only in text nodes
continue;
if( (!aOtherSet.Count() ||
lcl_Search( *pNode, aOtherSet, bNoColls )) &&
- (*fnSearch)( *pNode->GetTxtNode(), aCmpArr, *pPam ))
+ (*fnSearch)( *pNode->GetTextNode(), aCmpArr, *pPam ))
{
// set to the values of the attribute
SetMark();
@@ -1025,10 +1025,10 @@ bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFn fnMove,
// no hard attribution, so check if node was asked for this attr before
if( !pNode->HasSwAttrSet() )
{
- SwFmt* pTmpFmt = pNode->GetFmtColl();
- if( aFmtArr.find( pTmpFmt ) != aFmtArr.end() )
+ SwFormat* pTmpFormat = pNode->GetFormatColl();
+ if( aFormatArr.find( pTmpFormat ) != aFormatArr.end() )
continue; // collection was requested earlier
- aFmtArr.insert( pTmpFmt );
+ aFormatArr.insert( pTmpFormat );
}
if( lcl_Search( *pNode, aOtherSet, bNoColls ))
@@ -1058,15 +1058,15 @@ struct SwFindParaAttr : public SwFindParas
const SfxItemSet *pSet, *pReplSet;
const SearchOptions *pSearchOpt;
SwCursor& rCursor;
- utl::TextSearch* pSTxt;
+ utl::TextSearch* pSText;
SwFindParaAttr( const SfxItemSet& rSet, bool bNoCollection,
const SearchOptions* pOpt, const SfxItemSet* pRSet,
SwCursor& rCrsr )
: bValue( bNoCollection ), pSet( &rSet ), pReplSet( pRSet ),
- pSearchOpt( pOpt ), rCursor( rCrsr ),pSTxt( 0 ) {}
+ pSearchOpt( pOpt ), rCursor( rCrsr ),pSText( 0 ) {}
- virtual ~SwFindParaAttr() { delete pSTxt; }
+ virtual ~SwFindParaAttr() { delete pSText; }
virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, bool bInReadOnly ) SAL_OVERRIDE;
virtual bool IsReplaceMode() const SAL_OVERRIDE;
@@ -1076,11 +1076,11 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
bool bInReadOnly )
{
// replace string (only if text given and search is not parameterized)?
- bool bReplaceTxt = pSearchOpt && ( !pSearchOpt->replaceString.isEmpty() ||
+ bool bReplaceText = pSearchOpt && ( !pSearchOpt->replaceString.isEmpty() ||
!pSet->Count() );
bool bReplaceAttr = pReplSet && pReplSet->Count();
bool bMoveFirst = !bReplaceAttr;
- if( bInReadOnly && (bReplaceAttr || bReplaceTxt ))
+ if( bInReadOnly && (bReplaceAttr || bReplaceText ))
bInReadOnly = false;
// We search for attributes, should we search for text as well?
@@ -1107,7 +1107,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
return FIND_NOT_FOUND;
// then search in text of it
- if( !pSTxt )
+ if( !pSText )
{
SearchOptions aTmp( *pSearchOpt );
@@ -1117,14 +1117,14 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
aTmp.Locale = SvtSysLocale().GetLanguageTag().getLocale();
- pSTxt = new utl::TextSearch( aTmp );
+ pSText = new utl::TextSearch( aTmp );
}
// TODO: searching for attributes in Outliner text?!
bool bSearchInNotes = false;
// continue search in correct section (pTextRegion)
- if( aSrchPam.Find( *pSearchOpt, bSearchInNotes, *pSTxt, fnMove, pTextRegion, bInReadOnly ) &&
+ if( aSrchPam.Find( *pSearchOpt, bSearchInNotes, *pSText, fnMove, pTextRegion, bInReadOnly ) &&
*aSrchPam.GetMark() != *aSrchPam.GetPoint() )
break; // found
else if( !pSet->Count() )
@@ -1138,7 +1138,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
*pCrsr->GetMark() = *aSrchPam.GetMark();
}
- if( bReplaceTxt )
+ if( bReplaceText )
{
const bool bRegExp(
SearchAlgorithms_REGEXP == pSearchOpt->algorithmType);
@@ -1158,7 +1158,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange( *pCrsr,
(pRepl.get()) ? *pRepl : pSearchOpt->replaceString,
bRegExp );
- rCursor.SaveTblBoxCntnt( pCrsr->GetPoint() );
+ rCursor.SaveTableBoxContent( pCrsr->GetPoint() );
if( bRegExp )
{
diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx
index 62e9e799fb18..762e53309f18 100644
--- a/sw/source/core/crsr/findcoll.cxx
+++ b/sw/source/core/crsr/findcoll.cxx
@@ -28,45 +28,45 @@
#include <comcore.hrc>
/// parameters for a search for FormatCollections
-struct SwFindParaFmtColl : public SwFindParas
+struct SwFindParaFormatColl : public SwFindParas
{
- const SwTxtFmtColl *pFmtColl, *pReplColl;
+ const SwTextFormatColl *pFormatColl, *pReplColl;
SwCursor& rCursor;
- SwFindParaFmtColl( const SwTxtFmtColl& rFmtColl,
- const SwTxtFmtColl* pRpColl, SwCursor& rCrsr )
- : pFmtColl( &rFmtColl ), pReplColl( pRpColl ), rCursor( rCrsr )
+ SwFindParaFormatColl( const SwTextFormatColl& rFormatColl,
+ const SwTextFormatColl* pRpColl, SwCursor& rCrsr )
+ : pFormatColl( &rFormatColl ), pReplColl( pRpColl ), rCursor( rCrsr )
{}
- virtual ~SwFindParaFmtColl() {}
+ virtual ~SwFindParaFormatColl() {}
virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, bool bInReadOnly ) SAL_OVERRIDE;
virtual bool IsReplaceMode() const SAL_OVERRIDE;
};
-int SwFindParaFmtColl::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
+int SwFindParaFormatColl::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
bool bInReadOnly )
{
int nRet = FIND_FOUND;
if( bInReadOnly && pReplColl )
bInReadOnly = false;
- if( !pCrsr->Find( *pFmtColl, fnMove, pRegion, bInReadOnly ) )
+ if( !pCrsr->Find( *pFormatColl, fnMove, pRegion, bInReadOnly ) )
nRet = FIND_NOT_FOUND;
else if( pReplColl )
{
- pCrsr->GetDoc()->SetTxtFmtColl( *pCrsr, const_cast<SwTxtFmtColl*>(pReplColl) );
+ pCrsr->GetDoc()->SetTextFormatColl( *pCrsr, const_cast<SwTextFormatColl*>(pReplColl) );
nRet = FIND_NO_RING;
}
return nRet;
}
-bool SwFindParaFmtColl::IsReplaceMode() const
+bool SwFindParaFormatColl::IsReplaceMode() const
{
return 0 != pReplColl;
}
/// search for Format-Collections
-sal_uLong SwCursor::Find( const SwTxtFmtColl& rFmtColl, SwDocPositions nStart,
+sal_uLong SwCursor::Find( const SwTextFormatColl& rFormatColl, SwDocPositions nStart,
SwDocPositions nEnd, bool& bCancel,
- FindRanges eFndRngs, const SwTxtFmtColl* pReplFmtColl )
+ FindRanges eFndRngs, const SwTextFormatColl* pReplFormatColl )
{
// switch off OLE-notifications
SwDoc* pDoc = GetDoc();
@@ -74,24 +74,24 @@ sal_uLong SwCursor::Find( const SwTxtFmtColl& rFmtColl, SwDocPositions nStart,
pDoc->SetOle2Link( Link<>() );
bool const bStartUndo =
- pDoc->GetIDocumentUndoRedo().DoesUndo() && pReplFmtColl;
+ pDoc->GetIDocumentUndoRedo().DoesUndo() && pReplFormatColl;
if (bStartUndo)
{
SwRewriter aRewriter;
- aRewriter.AddRule(UndoArg1, rFmtColl.GetName());
+ aRewriter.AddRule(UndoArg1, rFormatColl.GetName());
aRewriter.AddRule(UndoArg2, SW_RES(STR_YIELDS));
- aRewriter.AddRule(UndoArg3, pReplFmtColl->GetName());
+ aRewriter.AddRule(UndoArg3, pReplFormatColl->GetName());
pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_UI_REPLACE_STYLE,
&aRewriter );
}
- SwFindParaFmtColl aSwFindParaFmtColl( rFmtColl, pReplFmtColl, *this );
+ SwFindParaFormatColl aSwFindParaFormatColl( rFormatColl, pReplFormatColl, *this );
- sal_uLong nRet = FindAll( aSwFindParaFmtColl, nStart, nEnd, eFndRngs, bCancel );
+ sal_uLong nRet = FindAll( aSwFindParaFormatColl, nStart, nEnd, eFndRngs, bCancel );
pDoc->SetOle2Link( aLnk );
- if( nRet && pReplFmtColl )
+ if( nRet && pReplFormatColl )
pDoc->getIDocumentState().SetModified();
if (bStartUndo)
diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx
index 8ffc5b307b06..e9e745514557 100644
--- a/sw/source/core/crsr/findfmt.cxx
+++ b/sw/source/core/crsr/findfmt.cxx
@@ -21,7 +21,7 @@
#include <pamtyp.hxx>
#include <boost/scoped_ptr.hpp>
-bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
+bool SwPaM::Find( const SwFormat& rFormat, SwMoveFn fnMove,
const SwPaM *pRegion, bool bInReadOnly )
{
bool bFound = false;
@@ -30,24 +30,24 @@ bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
// if at beginning/end then move it out of the node
if( bSrchForward
- ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
+ ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetContentNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() )
{
if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, false ))
{
return false;
}
- SwCntntNode *pNd = pPam->GetPoint()->nNode.GetNode().GetCntntNode();
+ SwContentNode *pNd = pPam->GetPoint()->nNode.GetNode().GetContentNode();
pPam->GetPoint()->nContent.Assign( pNd, bSrchForward ? 0 : pNd->Len() );
}
bool bFirst = true;
- SwCntntNode* pNode;
+ SwContentNode* pNode;
while( 0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly )))
{
- if ( pNode->GetFmtColl() == &rFmt )
+ if ( pNode->GetFormatColl() == &rFormat )
{
- // if a FormatCollection is found then it is definitely a SwCntntNode
+ // if a FormatCollection is found then it is definitely a SwContentNode
// FORWARD: SPoint at the end, GetMark at the beginning of the node
// BACKWARD: SPoint at the beginning, GetMark at the end of the node
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index ba7dcbdefe01..9a2a8a1e7060 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -51,10 +51,10 @@ using namespace ::com::sun::star;
using namespace util;
static OUString
-lcl_CleanStr(const SwTxtNode& rNd, sal_Int32 const nStart, sal_Int32& rEnd,
+lcl_CleanStr(const SwTextNode& rNd, sal_Int32 const nStart, sal_Int32& rEnd,
std::vector<sal_Int32> &rArr, bool const bRemoveSoftHyphen)
{
- OUStringBuffer buf(rNd.GetTxt());
+ OUStringBuffer buf(rNd.GetText());
rArr.clear();
const SwpHints *pHts = rNd.GetpSwpHints();
@@ -77,7 +77,7 @@ lcl_CleanStr(const SwTxtNode& rNd, sal_Int32 const nStart, sal_Int32& rEnd,
if ( bNewSoftHyphen )
{
nSoftHyphen = (bRemoveSoftHyphen)
- ? rNd.GetTxt().indexOf(CHAR_SOFTHYPHEN, nSoftHyphen)
+ ? rNd.GetText().indexOf(CHAR_SOFTHYPHEN, nSoftHyphen)
: -1;
}
@@ -115,7 +115,7 @@ lcl_CleanStr(const SwTxtNode& rNd, sal_Int32 const nStart, sal_Int32& rEnd,
if ( bNewHint )
{
- const SwTxtAttr* pHt = (*pHts)[n];
+ const SwTextAttr* pHt = (*pHts)[n];
if ( pHt->HasDummyChar() && (nStt >= nStart) )
{
switch( pHt->Which() )
@@ -139,7 +139,7 @@ lcl_CleanStr(const SwTxtNode& rNd, sal_Int32 const nStart, sal_Int32& rEnd,
const bool bEmpty =
( pHt->Which() != RES_TXTATR_FIELD
&& pHt->Which() != RES_TXTATR_ANNOTATION )
- || (static_txtattr_cast<SwTxtFld const*>(pHt)->GetFmtFld().GetField()->ExpandField(true).isEmpty());;
+ || (static_txtattr_cast<SwTextField const*>(pHt)->GetFormatField().GetField()->ExpandField(true).isEmpty());;
if ( bEmpty && nStart == nAkt )
{
rArr.push_back( nAkt );
@@ -195,8 +195,8 @@ size_t GetPostIt(sal_Int32 aCount,const SwpHints *pHts)
for (size_t i = 0; i < pHts->Count(); ++i )
{
aIndex++;
- const SwTxtAttr* pTxtAttr = (*pHts)[i];
- if ( pTxtAttr->Which() == RES_TXTATR_ANNOTATION )
+ const SwTextAttr* pTextAttr = (*pHts)[i];
+ if ( pTextAttr->Which() == RES_TXTATR_ANNOTATION )
{
aCount--;
if (!aCount)
@@ -207,8 +207,8 @@ size_t GetPostIt(sal_Int32 aCount,const SwpHints *pHts)
// throw away all following non postits
for( size_t i = aIndex; i < pHts->Count(); ++i )
{
- const SwTxtAttr* pTxtAttr = (*pHts)[i];
- if ( pTxtAttr->Which() == RES_TXTATR_ANNOTATION )
+ const SwTextAttr* pTextAttr = (*pHts)[i];
+ if ( pTextAttr->Which() == RES_TXTATR_ANNOTATION )
break;
else
aIndex++;
@@ -216,7 +216,7 @@ size_t GetPostIt(sal_Int32 aCount,const SwpHints *pHts)
return aIndex;
}
-bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::TextSearch& rSTxt,
+bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::TextSearch& rSText,
SwMoveFn fnMove, const SwPaM * pRegion,
bool bInReadOnly )
{
@@ -226,13 +226,13 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
SwPaM* pPam = MakeRegion( fnMove, pRegion );
const bool bSrchForward = fnMove == fnMoveForward;
SwNodeIndex& rNdIdx = pPam->GetPoint()->nNode;
- SwIndex& rCntntIdx = pPam->GetPoint()->nContent;
+ SwIndex& rContentIdx = pPam->GetPoint()->nContent;
// If bFound is true then the string was found and is between nStart and nEnd
bool bFound = false;
// start position in text or initial position
bool bFirst = true;
- SwCntntNode * pNode;
+ SwContentNode * pNode;
const bool bRegSearch = SearchAlgorithms_REGEXP == rSearchOpt.algorithmType;
const bool bChkEmptyPara = bRegSearch && 2 == rSearchOpt.searchString.getLength() &&
@@ -243,22 +243,22 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
// LanguageType eLastLang = 0;
while( 0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ) ))
{
- if( pNode->IsTxtNode() )
+ if( pNode->IsTextNode() )
{
- SwTxtNode& rTxtNode = *pNode->GetTxtNode();
- sal_Int32 nTxtLen = rTxtNode.GetTxt().getLength();
+ SwTextNode& rTextNode = *pNode->GetTextNode();
+ sal_Int32 nTextLen = rTextNode.GetText().getLength();
sal_Int32 nEnd;
if( rNdIdx == pPam->GetMark()->nNode )
nEnd = pPam->GetMark()->nContent.GetIndex();
else
- nEnd = bSrchForward ? nTxtLen : 0;
- sal_Int32 nStart = rCntntIdx.GetIndex();
+ nEnd = bSrchForward ? nTextLen : 0;
+ sal_Int32 nStart = rContentIdx.GetIndex();
/* #i80135# */
// if there are SwPostItFields inside our current node text, we
// split the text into separate pieces and search for text inside
// the pieces as well as inside the fields
- const SwpHints *pHts = rTxtNode.GetpSwpHints();
+ const SwpHints *pHts = rTextNode.GetpSwpHints();
// count PostItFields by looping over all fields
sal_Int32 aNumberPostits = 0;
@@ -272,10 +272,10 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
for( size_t i = 0; i < pHts->Count(); ++i )
{
- const SwTxtAttr* pTxtAttr = (*pHts)[i];
- if ( pTxtAttr->Which()==RES_TXTATR_ANNOTATION )
+ const SwTextAttr* pTextAttr = (*pHts)[i];
+ if ( pTextAttr->Which()==RES_TXTATR_ANNOTATION )
{
- const sal_Int32 aPos = pTxtAttr->GetStart();
+ const sal_Int32 aPos = pTextAttr->GetStart();
if ( (aPos >= nStart) && (aPos <= nEnd) )
aNumberPostits++;
else
@@ -323,11 +323,11 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
// If there are any shapes anchored to this node, search there.
SwPaM aPaM(pNode->GetDoc()->GetNodes().GetEndOfContent());
- aPaM.GetPoint()->nNode = rTxtNode;
- aPaM.GetPoint()->nContent.Assign(aPaM.GetPoint()->nNode.GetNode().GetTxtNode(), nStart);
+ aPaM.GetPoint()->nNode = rTextNode;
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetPoint()->nNode.GetNode().GetTextNode(), nStart);
aPaM.SetMark();
- aPaM.GetMark()->nNode = rTxtNode.GetIndex() + 1;
- aPaM.GetMark()->nContent.Assign(aPaM.GetMark()->nNode.GetNode().GetTxtNode(), 0);
+ aPaM.GetMark()->nNode = rTextNode.GetIndex() + 1;
+ aPaM.GetMark()->nContent.Assign(aPaM.GetMark()->nNode.GetNode().GetTextNode(), 0);
if (pNode->GetDoc()->getIDocumentDrawModelAccess().Search(aPaM, aSearchItem))
{
bFound = true;
@@ -373,18 +373,18 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
{
nStartInside = aLoop==0 ? nStart : (*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)]->GetStart()+1;
nEndInside = aLoop==aNumberPostits ? nEnd : (*pHts)[GetPostIt(aLoop+aIgnore,pHts)]->GetStart();
- nTxtLen = nEndInside - nStartInside;
+ nTextLen = nEndInside - nStartInside;
}
else
{
nStartInside = aLoop==aNumberPostits ? nStart : (*pHts)[GetPostIt(aLoop+aIgnore,pHts)]->GetStart();
nEndInside = aLoop==0 ? nEnd : (*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)]->GetStart()+1;
- nTxtLen = nStartInside - nEndInside;
+ nTextLen = nStartInside - nEndInside;
}
// search inside the text between a note
- bFound = DoSearch( rSearchOpt, rSTxt, fnMove, bSrchForward,
+ bFound = DoSearch( rSearchOpt, rSText, fnMove, bSrchForward,
bRegSearch, bChkEmptyPara, bChkParaEnd,
- nStartInside, nEndInside, nTxtLen, pNode,
+ nStartInside, nEndInside, nTextLen, pNode,
pPam );
if ( bFound )
break;
@@ -393,9 +393,9 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
// we should now be right in front of a note, search inside
if ( (bSrchForward && (GetPostIt(aLoop + aIgnore,pHts) < pHts->Count()) ) || ( !bSrchForward && (aLoop!=0) ))
{
- const SwTxtAttr* pTxtAttr = bSrchForward ? (*pHts)[GetPostIt(aLoop+aIgnore,pHts)] : (*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)];
+ const SwTextAttr* pTextAttr = bSrchForward ? (*pHts)[GetPostIt(aLoop+aIgnore,pHts)] : (*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)];
if (pPostItMgr && pPostItMgr->SearchReplace(
- static_txtattr_cast<SwTxtFld const*>(pTxtAttr)->GetFmtFld(),rSearchOpt,bSrchForward))
+ static_txtattr_cast<SwTextField const*>(pTextAttr)->GetFormatField(),rSearchOpt,bSrchForward))
{
bFound = true ;
break;
@@ -409,9 +409,9 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
{
// if there is no SwPostItField inside or searching inside notes
// is disabled, we search the whole length just like before
- bFound = DoSearch( rSearchOpt, rSTxt, fnMove, bSrchForward,
+ bFound = DoSearch( rSearchOpt, rSText, fnMove, bSrchForward,
bRegSearch, bChkEmptyPara, bChkParaEnd,
- nStart, nEnd, nTxtLen, pNode, pPam );
+ nStart, nEnd, nTextLen, pNode, pPam );
}
if (bFound)
break;
@@ -421,10 +421,10 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
return bFound;
}
-bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
+bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSText,
SwMoveFn fnMove, bool bSrchForward, bool bRegSearch,
bool bChkEmptyPara, bool bChkParaEnd,
- sal_Int32 &nStart, sal_Int32 &nEnd, sal_Int32 nTxtLen,
+ sal_Int32 &nStart, sal_Int32 &nEnd, sal_Int32 nTextLen,
SwNode* pNode, SwPaM* pPam)
{
bool bFound = false;
@@ -456,10 +456,10 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
}
if( bSrchForward )
- sCleanStr = lcl_CleanStr(*pNode->GetTxtNode(), nStart, nEnd,
+ sCleanStr = lcl_CleanStr(*pNode->GetTextNode(), nStart, nEnd,
aFltArr, bRemoveSoftHyphens);
else
- sCleanStr = lcl_CleanStr(*pNode->GetTxtNode(), nEnd, nStart,
+ sCleanStr = lcl_CleanStr(*pNode->GetTextNode(), nEnd, nStart,
aFltArr, bRemoveSoftHyphens);
SwScriptIterator* pScriptIter = 0;
@@ -488,7 +488,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
if ( nSearchScript == nCurrScript )
{
const LanguageType eCurrLang =
- pNode->GetTxtNode()->GetLang( bSrchForward ?
+ pNode->GetTextNode()->GetLang( bSrchForward ?
nStart :
nEnd );
@@ -496,7 +496,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
{
const lang::Locale aLocale(
g_pBreakIt->GetLocale( eCurrLang ) );
- rSTxt.SetLocale( rSearchOpt, aLocale );
+ rSText.SetLocale( rSearchOpt, aLocale );
eLastLang = eCurrLang;
}
}
@@ -505,7 +505,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
sal_Int32 nProxyStart = nStart;
sal_Int32 nProxyEnd = nEnd;
if( nSearchScript == nCurrScript &&
- (rSTxt.*fnMove->fnSearch)( sCleanStr, &nProxyStart, &nProxyEnd, 0 ) &&
+ (rSText.*fnMove->fnSearch)( sCleanStr, &nProxyStart, &nProxyEnd, 0 ) &&
!(bZeroMatch = (nProxyStart == nProxyEnd)))
{
nStart = nProxyStart;
@@ -558,16 +558,16 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
if ( bFound )
return true;
- else if( ( bChkEmptyPara && !nStart && !nTxtLen ) || bChkParaEnd)
+ else if( ( bChkEmptyPara && !nStart && !nTextLen ) || bChkParaEnd)
{
*GetPoint() = *pPam->GetPoint();
- GetPoint()->nContent = bChkParaEnd ? nTxtLen : 0;
+ GetPoint()->nContent = bChkParaEnd ? nTextLen : 0;
SetMark();
/* FIXME: this condition does not work for !bSrchForward backward
* search, it probably never did. (pSttNd != &rNdIdx.GetNode())
* is never true in this case. */
if( (bSrchForward || pSttNd != &rNdIdx.GetNode()) &&
- Move( fnMoveForward, fnGoCntnt ) &&
+ Move( fnMoveForward, fnGoContent ) &&
(!bSrchForward || pSttNd != &GetPoint()->nNode.GetNode()) &&
1 == std::abs( (int)( GetPoint()->nNode.GetIndex() -
GetMark()->nNode.GetIndex()) ) )
@@ -586,12 +586,12 @@ struct SwFindParaText : public SwFindParas
{
const SearchOptions& rSearchOpt;
SwCursor& rCursor;
- utl::TextSearch aSTxt;
+ utl::TextSearch aSText;
bool bReplace;
bool bSearchInNotes;
SwFindParaText( const SearchOptions& rOpt, bool bSearchNotes, bool bRepl, SwCursor& rCrsr )
- : rSearchOpt( rOpt ), rCursor( rCrsr ), aSTxt( rOpt ), bReplace( bRepl ), bSearchInNotes( bSearchNotes )
+ : rSearchOpt( rOpt ), rCursor( rCrsr ), aSText( rOpt ), bReplace( bRepl ), bSearchInNotes( bSearchNotes )
{}
virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, bool bInReadOnly ) SAL_OVERRIDE;
virtual bool IsReplaceMode() const SAL_OVERRIDE;
@@ -608,7 +608,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
if( bInReadOnly && bReplace )
bInReadOnly = false;
- const bool bFnd = pCrsr->Find( rSearchOpt, bSearchInNotes, aSTxt, fnMove, pRegion, bInReadOnly );
+ const bool bFnd = pCrsr->Find( rSearchOpt, bSearchInNotes, aSText, fnMove, pRegion, bInReadOnly );
if( bFnd && bReplace ) // replace string
{
@@ -631,7 +631,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
*pCrsr,
(pRepl.get()) ? *pRepl : rSearchOpt.replaceString,
bRegExp );
- rCursor.SaveTblBoxCntnt( pCrsr->GetPoint() );
+ rCursor.SaveTableBoxContent( pCrsr->GetPoint() );
if( bRegExp )
{
@@ -649,7 +649,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
bool bRet = ((fnMoveForward == fnMove) ? &GoNextPara : &GoPrevPara)
(*pCrsr, fnMove);
(void) bRet;
- assert(bRet); // if join failed, next node must be SwTxtNode
+ assert(bRet); // if join failed, next node must be SwTextNode
}
else
pCrsr->Start()->nContent = nSttCnt;
@@ -702,18 +702,18 @@ OUString *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam )
if( pPam && pPam->HasMark() &&
SearchAlgorithms_REGEXP == rSearchOpt.algorithmType )
{
- const SwCntntNode* pTxtNode = pPam->GetCntntNode( true );
- if( pTxtNode && pTxtNode->IsTxtNode() && pTxtNode == pPam->GetCntntNode( false ) )
+ const SwContentNode* pTextNode = pPam->GetContentNode( true );
+ if( pTextNode && pTextNode->IsTextNode() && pTextNode == pPam->GetContentNode( false ) )
{
- utl::TextSearch aSTxt( rSearchOpt );
- const OUString& rStr = pTxtNode->GetTxtNode()->GetTxt();
+ utl::TextSearch aSText( rSearchOpt );
+ const OUString& rStr = pTextNode->GetTextNode()->GetText();
sal_Int32 nStart = pPam->Start()->nContent.GetIndex();
sal_Int32 nEnd = pPam->End()->nContent.GetIndex();
SearchResult aResult;
- if( aSTxt.SearchForward( rStr, &nStart, &nEnd, &aResult ) )
+ if( aSText.SearchForward( rStr, &nStart, &nEnd, &aResult ) )
{
OUString aReplaceStr( rSearchOpt.replaceString );
- aSTxt.ReplaceBackReferences( aReplaceStr, rStr, aResult );
+ aSText.ReplaceBackReferences( aReplaceStr, rStr, aResult );
pRet = new OUString( aReplaceStr );
}
}
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 95794338782f..a1cbabf2f112 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -44,27 +44,27 @@
#include <xmloff/odffields.hxx>
// for the dump "MSC-" compiler
-inline sal_Int32 GetSttOrEnd( bool bCondition, const SwCntntNode& rNd )
+inline sal_Int32 GetSttOrEnd( bool bCondition, const SwContentNode& rNd )
{
return bCondition ? 0 : rNd.Len();
}
-SwPosition::SwPosition( const SwNodeIndex & rNodeIndex, const SwIndex & rCntnt )
- : nNode( rNodeIndex ), nContent( rCntnt )
+SwPosition::SwPosition( const SwNodeIndex & rNodeIndex, const SwIndex & rContent )
+ : nNode( rNodeIndex ), nContent( rContent )
{
}
SwPosition::SwPosition( const SwNodeIndex & rNodeIndex )
- : nNode( rNodeIndex ), nContent( nNode.GetNode().GetCntntNode() )
+ : nNode( rNodeIndex ), nContent( nNode.GetNode().GetContentNode() )
{
}
SwPosition::SwPosition( const SwNode& rNode )
- : nNode( rNode ), nContent( nNode.GetNode().GetCntntNode() )
+ : nNode( rNode ), nContent( nNode.GetNode().GetContentNode() )
{
}
-SwPosition::SwPosition( SwCntntNode & rNode, const sal_Int32 nOffset )
+SwPosition::SwPosition( SwContentNode & rNode, const sal_Int32 nOffset )
: nNode( rNode ), nContent( &rNode, nOffset )
{
}
@@ -279,22 +279,22 @@ bool CheckNodesRange( const SwNodeIndex& rStt,
bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
{
- if( pNd->IsCntntNode() )
- return static_cast<SwCntntNode*>(pNd)->GoNext( pIdx, nMode );
+ if( pNd->IsContentNode() )
+ return static_cast<SwContentNode*>(pNd)->GoNext( pIdx, nMode );
return false;
}
bool GoPrevious( SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
{
- if( pNd->IsCntntNode() )
- return static_cast<SwCntntNode*>(pNd)->GoPrevious( pIdx, nMode );
+ if( pNd->IsContentNode() )
+ return static_cast<SwContentNode*>(pNd)->GoPrevious( pIdx, nMode );
return false;
}
-SwCntntNode* GoNextNds( SwNodeIndex* pIdx, bool bChk )
+SwContentNode* GoNextNds( SwNodeIndex* pIdx, bool bChk )
{
SwNodeIndex aIdx( *pIdx );
- SwCntntNode* pNd = aIdx.GetNodes().GoNext( &aIdx );
+ SwContentNode* pNd = aIdx.GetNodes().GoNext( &aIdx );
if( pNd )
{
if( bChk && 1 != aIdx.GetIndex() - pIdx->GetIndex() &&
@@ -306,10 +306,10 @@ SwCntntNode* GoNextNds( SwNodeIndex* pIdx, bool bChk )
return pNd;
}
-SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, bool bChk )
+SwContentNode* GoPreviousNds( SwNodeIndex * pIdx, bool bChk )
{
SwNodeIndex aIdx( *pIdx );
- SwCntntNode* pNd = SwNodes::GoPrevious( &aIdx );
+ SwContentNode* pNd = SwNodes::GoPrevious( &aIdx );
if( pNd )
{
if( bChk && 1 != pIdx->GetIndex() - aIdx.GetIndex() &&
@@ -358,8 +358,8 @@ SwPaM::SwPaM( const SwNodeIndex& rMark, const SwNodeIndex& rPoint,
{
m_pPoint->nNode += nPointOffset;
}
- m_Bound1.nContent.Assign( m_Bound1.nNode.GetNode().GetCntntNode(), 0 );
- m_Bound2.nContent.Assign( m_Bound2.nNode.GetNode().GetCntntNode(), 0 );
+ m_Bound1.nContent.Assign( m_Bound1.nNode.GetNode().GetContentNode(), 0 );
+ m_Bound2.nContent.Assign( m_Bound2.nNode.GetNode().GetContentNode(), 0 );
}
SwPaM::SwPaM( const SwNode& rMark, const SwNode& rPoint,
@@ -379,12 +379,12 @@ SwPaM::SwPaM( const SwNode& rMark, const SwNode& rPoint,
{
m_pPoint->nNode += nPointOffset;
}
- m_Bound1.nContent.Assign( m_Bound1.nNode.GetNode().GetCntntNode(), 0 );
- m_Bound2.nContent.Assign( m_Bound2.nNode.GetNode().GetCntntNode(), 0 );
+ m_Bound1.nContent.Assign( m_Bound1.nNode.GetNode().GetContentNode(), 0 );
+ m_Bound2.nContent.Assign( m_Bound2.nNode.GetNode().GetContentNode(), 0 );
}
-SwPaM::SwPaM( const SwNodeIndex& rMark, sal_Int32 nMarkCntnt,
- const SwNodeIndex& rPoint, sal_Int32 nPointCntnt, SwPaM* pRing )
+SwPaM::SwPaM( const SwNodeIndex& rMark, sal_Int32 nMarkContent,
+ const SwNodeIndex& rPoint, sal_Int32 nPointContent, SwPaM* pRing )
: Ring( pRing )
, m_Bound1( rMark )
, m_Bound2( rPoint )
@@ -392,12 +392,12 @@ SwPaM::SwPaM( const SwNodeIndex& rMark, sal_Int32 nMarkCntnt,
, m_pMark( &m_Bound1 )
, m_bIsInFrontOfLabel( false )
{
- m_pPoint->nContent.Assign( rPoint.GetNode().GetCntntNode(), nPointCntnt);
- m_pMark ->nContent.Assign( rMark .GetNode().GetCntntNode(), nMarkCntnt );
+ m_pPoint->nContent.Assign( rPoint.GetNode().GetContentNode(), nPointContent);
+ m_pMark ->nContent.Assign( rMark .GetNode().GetContentNode(), nMarkContent );
}
-SwPaM::SwPaM( const SwNode& rMark, sal_Int32 nMarkCntnt,
- const SwNode& rPoint, sal_Int32 nPointCntnt, SwPaM* pRing )
+SwPaM::SwPaM( const SwNode& rMark, sal_Int32 nMarkContent,
+ const SwNode& rPoint, sal_Int32 nPointContent, SwPaM* pRing )
: Ring( pRing )
, m_Bound1( rMark )
, m_Bound2( rPoint )
@@ -405,13 +405,13 @@ SwPaM::SwPaM( const SwNode& rMark, sal_Int32 nMarkCntnt,
, m_pMark( &m_Bound1 )
, m_bIsInFrontOfLabel( false )
{
- m_pPoint->nContent.Assign( m_pPoint->nNode.GetNode().GetCntntNode(),
- nPointCntnt);
- m_pMark ->nContent.Assign( m_pMark ->nNode.GetNode().GetCntntNode(),
- nMarkCntnt );
+ m_pPoint->nContent.Assign( m_pPoint->nNode.GetNode().GetContentNode(),
+ nPointContent);
+ m_pMark ->nContent.Assign( m_pMark ->nNode.GetNode().GetContentNode(),
+ nMarkContent );
}
-SwPaM::SwPaM( const SwNode& rNode, sal_Int32 nCntnt, SwPaM* pRing )
+SwPaM::SwPaM( const SwNode& rNode, sal_Int32 nContent, SwPaM* pRing )
: Ring( pRing )
, m_Bound1( rNode )
, m_Bound2( m_Bound1.nNode.GetNode().GetNodes() ) // default initialize
@@ -419,11 +419,11 @@ SwPaM::SwPaM( const SwNode& rNode, sal_Int32 nCntnt, SwPaM* pRing )
, m_pMark( &m_Bound1 )
, m_bIsInFrontOfLabel( false )
{
- m_pPoint->nContent.Assign( m_pPoint->nNode.GetNode().GetCntntNode(),
- nCntnt );
+ m_pPoint->nContent.Assign( m_pPoint->nNode.GetNode().GetContentNode(),
+ nContent );
}
-SwPaM::SwPaM( const SwNodeIndex& rNodeIdx, sal_Int32 nCntnt, SwPaM* pRing )
+SwPaM::SwPaM( const SwNodeIndex& rNodeIdx, sal_Int32 nContent, SwPaM* pRing )
: Ring( pRing )
, m_Bound1( rNodeIdx )
, m_Bound2( rNodeIdx.GetNode().GetNodes() ) // default initialize
@@ -431,7 +431,7 @@ SwPaM::SwPaM( const SwNodeIndex& rNodeIdx, sal_Int32 nCntnt, SwPaM* pRing )
, m_pMark( &m_Bound1 )
, m_bIsInFrontOfLabel( false )
{
- m_pPoint->nContent.Assign( rNodeIdx.GetNode().GetCntntNode(), nCntnt );
+ m_pPoint->nContent.Assign( rNodeIdx.GetNode().GetContentNode(), nContent );
}
SwPaM::~SwPaM() {}
@@ -543,12 +543,12 @@ SwPaM & SwPaM::Normalize(bool bPointFirst)
/// return page number at cursor (for reader and page bound frames)
sal_uInt16 SwPaM::GetPageNum( bool bAtPoint, const Point* pLayPos )
{
- const SwCntntFrm* pCFrm;
+ const SwContentFrm* pCFrm;
const SwPageFrm *pPg;
- const SwCntntNode *pNd ;
+ const SwContentNode *pNd ;
const SwPosition* pPos = bAtPoint ? m_pPoint : m_pMark;
- if( 0 != ( pNd = pPos->nNode.GetNode().GetCntntNode() ) &&
+ if( 0 != ( pNd = pPos->nNode.GetNode().GetContentNode() ) &&
0 != ( pCFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), pLayPos, pPos, false )) &&
0 != ( pPg = pCFrm->FindPageFrm() ))
return pPg->GetPhyPageNum();
@@ -564,9 +564,9 @@ static const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm )
const SwSectionFrm* pSectionFrm;
if( rFrm.IsInFly() &&
- (pFly = rFrm.FindFlyFrm())->GetFmt()->GetEditInReadonly().GetValue() &&
+ (pFly = rFrm.FindFlyFrm())->GetFormat()->GetEditInReadonly().GetValue() &&
pFly->Lower() &&
- !pFly->Lower()->IsNoTxtFrm() )
+ !pFly->Lower()->IsNoTextFrm() )
{
pRet = pFly;
}
@@ -585,8 +585,8 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
{
bool bRet = false;
- const SwCntntNode* pNd = GetPoint()->nNode.GetNode().GetCntntNode();
- const SwCntntFrm *pFrm = NULL;
+ const SwContentNode* pNd = GetPoint()->nNode.GetNode().GetContentNode();
+ const SwContentFrm *pFrm = NULL;
if ( pNd != NULL )
{
Point aTmpPt;
@@ -618,7 +618,7 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
&& HasMark()
&& GetPoint()->nNode != GetMark()->nNode )
{
- pNd = GetMark()->nNode.GetNode().GetCntntNode();
+ pNd = GetMark()->nNode.GetNode().GetContentNode();
pFrm = NULL;
if ( pNd != NULL )
{
@@ -668,20 +668,20 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
// If a protected section should be between nodes, then the
// selection needs to contain already x nodes.
- // (TxtNd, SectNd, TxtNd, EndNd, TxtNd )
+ // (TextNd, SectNd, TextNd, EndNd, TextNd )
if( nSttIdx + 3 < nEndIdx )
{
- const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( SwSectionFmts::size_type n = rFmts.size(); n; )
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
+ for( SwSectionFormats::size_type n = rFormats.size(); n; )
{
- const SwSectionFmt* pFmt = rFmts[ --n ];
- if( pFmt->GetProtect().IsCntntProtected() )
+ const SwSectionFormat* pFormat = rFormats[ --n ];
+ if( pFormat->GetProtect().IsContentProtected() )
{
- const SwFmtCntnt& rCntnt = pFmt->GetCntnt(false);
- OSL_ENSURE( rCntnt.GetCntntIdx(), "where is the SectionNode?" );
- sal_uLong nIdx = rCntnt.GetCntntIdx()->GetIndex();
+ const SwFormatContent& rContent = pFormat->GetContent(false);
+ OSL_ENSURE( rContent.GetContentIdx(), "where is the SectionNode?" );
+ sal_uLong nIdx = rContent.GetContentIdx()->GetIndex();
if( nSttIdx <= nIdx && nEndIdx >= nIdx &&
- rCntnt.GetCntntIdx()->GetNode().GetNodes().IsDocNodes() )
+ rContent.GetContentIdx()->GetNode().GetNodes().IsDocNodes() )
{
bRet = true;
break;
@@ -729,7 +729,7 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
// the 'comment anchor', unless the cursor is inside the annotation.
if (!bRet && !bAnnotationMode)
{
- if (!pA && GetPoint() && GetPoint()->nNode.GetNode().IsTxtNode() && GetPoint()->nContent.GetIndex() > 0)
+ if (!pA && GetPoint() && GetPoint()->nNode.GetNode().IsTextNode() && GetPoint()->nContent.GetIndex() > 0)
{
// getFieldmarkFor() searches for >= start and < end, so check for
// the previous character, to also get the fieldmark, if we're
@@ -749,25 +749,25 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
/// left or the next is out of the area, then a null-pointer is returned.
/// @param rbFirst If <true> than first time request. If so than the position of
/// the PaM must not be changed!
-SwCntntNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
+SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
bool bInReadOnly )
{
- SwCntntNode * pNd = 0;
- SwCntntFrm* pFrm;
+ SwContentNode * pNd = 0;
+ SwContentFrm* pFrm;
if( ((*rPam.GetPoint()).*fnMove->fnCmpOp)( *rPam.GetMark() ) ||
( *rPam.GetPoint() == *rPam.GetMark() && rbFirst ) )
{
if( rbFirst )
{
rbFirst = false;
- pNd = rPam.GetCntntNode();
+ pNd = rPam.GetContentNode();
if( pNd )
{
if(
(
0 == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) ||
( !bInReadOnly && pFrm->IsProtected() ) ||
- (pFrm->IsTxtFrm() && static_cast<SwTxtFrm*>(pFrm)->IsHiddenNow())
+ (pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsHiddenNow())
) ||
( !bInReadOnly && pNd->FindSectionNode() &&
pNd->FindSectionNode()->GetSection().IsProtect()
@@ -779,13 +779,13 @@ SwCntntNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
}
}
- if( !pNd ) // is the cursor not on a CntntNode?
+ if( !pNd ) // is the cursor not on a ContentNode?
{
SwPosition aPos( *rPam.GetPoint() );
bool bSrchForward = fnMove == fnMoveForward;
SwNodes& rNodes = aPos.nNode.GetNodes();
- // go to next/previous CntntNode
+ // go to next/previous ContentNode
while( true )
{
pNd = bSrchForward
@@ -800,8 +800,8 @@ SwCntntNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
// only in AutoTextSection can be nodes that are hidden
if( 0 == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) ||
( !bInReadOnly && pFrm->IsProtected() ) ||
- ( pFrm->IsTxtFrm() &&
- static_cast<SwTxtFrm*>(pFrm)->IsHiddenNow() ) )
+ ( pFrm->IsTextFrm() &&
+ static_cast<SwTextFrm*>(pFrm)->IsHiddenNow() ) )
{
pNd = 0;
continue;
@@ -824,7 +824,7 @@ void GoStartDoc( SwPosition * pPos )
SwNodes& rNodes = pPos->nNode.GetNodes();
pPos->nNode = *rNodes.GetEndOfContent().StartOfSectionNode();
// we always need to find a ContentNode!
- SwCntntNode* pCNd = rNodes.GoNext( &pPos->nNode );
+ SwContentNode* pCNd = rNodes.GoNext( &pPos->nNode );
if( pCNd )
pCNd->MakeStartIndex( &pPos->nContent );
}
@@ -833,7 +833,7 @@ void GoEndDoc( SwPosition * pPos )
{
SwNodes& rNodes = pPos->nNode.GetNodes();
pPos->nNode = rNodes.GetEndOfContent();
- SwCntntNode* pCNd = GoPreviousNds( &pPos->nNode, true );
+ SwContentNode* pCNd = GoPreviousNds( &pPos->nNode, true );
if( pCNd )
pCNd->MakeEndIndex( &pPos->nContent );
}
@@ -847,8 +847,8 @@ void GoStartSection( SwPosition * pPos )
nLevel--;
do { SwNodes::GoStartOfSection( &pPos->nNode ); } while( nLevel-- );
- // already on a CntntNode
- pPos->nNode.GetNode().GetCntntNode()->MakeStartIndex( &pPos->nContent );
+ // already on a ContentNode
+ pPos->nNode.GetNode().GetContentNode()->MakeStartIndex( &pPos->nContent );
}
/// go to the end of the current base section
@@ -861,9 +861,9 @@ void GoEndSection( SwPosition * pPos )
nLevel--;
do { SwNodes::GoEndOfSection( &pPos->nNode ); } while( nLevel-- );
- // now on a EndNode, thus to the previous CntntNode
+ // now on a EndNode, thus to the previous ContentNode
if( GoPreviousNds( &pPos->nNode, true ) )
- pPos->nNode.GetNode().GetCntntNode()->MakeEndIndex( &pPos->nContent );
+ pPos->nNode.GetNode().GetContentNode()->MakeEndIndex( &pPos->nContent );
}
bool GoInDoc( SwPaM & rPam, SwMoveFn fnMove )
@@ -880,14 +880,14 @@ bool GoInSection( SwPaM & rPam, SwMoveFn fnMove )
bool GoInNode( SwPaM & rPam, SwMoveFn fnMove )
{
- SwCntntNode *pNd = (*fnMove->fnNds)( &rPam.GetPoint()->nNode, true );
+ SwContentNode *pNd = (*fnMove->fnNds)( &rPam.GetPoint()->nNode, true );
if( pNd )
rPam.GetPoint()->nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ) );
return pNd;
}
-bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInContent( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CHARS ))
@@ -895,7 +895,7 @@ bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove )
return GoInNode( rPam, fnMove );
}
-bool GoInCntntCells( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInContentCells( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CELLS ))
@@ -903,7 +903,7 @@ bool GoInCntntCells( SwPaM & rPam, SwMoveFn fnMove )
return GoInNode( rPam, fnMove );
}
-bool GoInCntntSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInContentSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CHARS | CRSR_SKIP_HIDDEN ) )
@@ -911,7 +911,7 @@ bool GoInCntntSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
return GoInNode( rPam, fnMove );
}
-bool GoInCntntCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInContentCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CELLS | CRSR_SKIP_HIDDEN ) )
@@ -923,9 +923,9 @@ bool GoPrevPara( SwPaM & rPam, SwPosPara aPosPara )
{
if( rPam.Move( fnMoveBackward, fnGoNode ) )
{
- // always on a CntntNode
+ // always on a ContentNode
SwPosition& rPos = *rPam.GetPoint();
- SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
+ SwContentNode * pNd = rPos.nNode.GetNode().GetContentNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( aPosPara == fnMoveForward, *pNd ) );
return true;
@@ -936,7 +936,7 @@ bool GoPrevPara( SwPaM & rPam, SwPosPara aPosPara )
bool GoCurrPara( SwPaM & rPam, SwPosPara aPosPara )
{
SwPosition& rPos = *rPam.GetPoint();
- SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
+ SwContentNode * pNd = rPos.nNode.GetNode().GetContentNode();
if( pNd )
{
const sal_Int32 nOld = rPos.nContent.GetIndex();
@@ -948,7 +948,7 @@ bool GoCurrPara( SwPaM & rPam, SwPosPara aPosPara )
return true;
}
}
- // move node to next/previous CntntNode
+ // move node to next/previous ContentNode
if( ( aPosPara==fnParaStart && 0 != ( pNd =
GoPreviousNds( &rPos.nNode, true ))) ||
( aPosPara==fnParaEnd && 0 != ( pNd =
@@ -965,9 +965,9 @@ bool GoNextPara( SwPaM & rPam, SwPosPara aPosPara )
{
if( rPam.Move( fnMoveForward, fnGoNode ) )
{
- // always on a CntntNode
+ // always on a ContentNode
SwPosition& rPos = *rPam.GetPoint();
- SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
+ SwContentNode * pNd = rPos.nNode.GetNode().GetContentNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( aPosPara == fnMoveForward, *pNd ) );
return true;
@@ -980,8 +980,8 @@ bool GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
SwPosition& rPos = *rPam.GetPoint();
SwPosition aSavePos( rPos ); // position for comparison
(fnMove->fnSection)( &rPos.nNode );
- SwCntntNode *pNd;
- if( 0 == ( pNd = rPos.nNode.GetNode().GetCntntNode()) &&
+ SwContentNode *pNd;
+ if( 0 == ( pNd = rPos.nNode.GetNode().GetContentNode()) &&
0 == ( pNd = (*fnMove->fnNds)( &rPos.nNode, true )) )
{
rPos = aSavePos; // do not change cursor
@@ -999,14 +999,14 @@ bool GoNextSection( SwPaM & rPam, SwMoveFn fnMove )
SwPosition aSavePos( rPos ); // position for comparison
SwNodes::GoEndOfSection( &rPos.nNode );
- // no other CntntNode existent?
- if( !GoInCntnt( rPam, fnMoveForward ) )
+ // no other ContentNode existent?
+ if( !GoInContent( rPam, fnMoveForward ) )
{
rPos = aSavePos; // do not change cursor
return false;
}
(fnMove->fnSection)( &rPos.nNode );
- SwCntntNode *pNd = rPos.nNode.GetNode().GetCntntNode();
+ SwContentNode *pNd = rPos.nNode.GetNode().GetContentNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ) );
return true;
@@ -1018,20 +1018,20 @@ bool GoPrevSection( SwPaM & rPam, SwMoveFn fnMove )
SwPosition aSavePos( rPos ); // position for comparison
SwNodes::GoStartOfSection( &rPos.nNode );
- // no further CntntNode existent?
- if( !GoInCntnt( rPam, fnMoveBackward ))
+ // no further ContentNode existent?
+ if( !GoInContent( rPam, fnMoveBackward ))
{
rPos = aSavePos; // do not change cursor
return false;
}
(fnMove->fnSection)( &rPos.nNode );
- SwCntntNode *pNd = rPos.nNode.GetNode().GetCntntNode();
+ SwContentNode *pNd = rPos.nNode.GetNode().GetContentNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ));
return true;
}
-OUString SwPaM::GetTxt() const
+OUString SwPaM::GetText() const
{
OUString aResult;
@@ -1044,11 +1044,11 @@ OUString SwPaM::GetTxt() const
for (;;)
{
const bool bIsEndNode = aNodeIndex == End()->nNode;
- SwTxtNode * pTxtNode = aNodeIndex.GetNode().GetTxtNode();
+ SwTextNode * pTextNode = aNodeIndex.GetNode().GetTextNode();
- if (pTxtNode != NULL)
+ if (pTextNode != NULL)
{
- const OUString aTmpStr = pTxtNode->GetTxt();
+ const OUString aTmpStr = pTextNode->GetText();
if (bIsStartNode || bIsEndNode)
{
@@ -1083,13 +1083,13 @@ OUString SwPaM::GetTxt() const
void SwPaM::InvalidatePaM()
{
const SwNode &_pNd = this->GetNode();
- const SwTxtNode *_pTxtNd = _pNd.GetTxtNode();
- if (_pTxtNd != NULL)
+ const SwTextNode *_pTextNd = _pNd.GetTextNode();
+ if (_pTextNd != NULL)
{
// pretend that the PaM marks inserted text to recalc the portion...
- SwInsTxt aHint( Start()->nContent.GetIndex(),
+ SwInsText aHint( Start()->nContent.GetIndex(),
End()->nContent.GetIndex() - Start()->nContent.GetIndex() + 1 );
- SwModify *_pModify=(SwModify*)_pTxtNd;
+ SwModify *_pModify=(SwModify*)_pTextNd;
_pModify->ModifyNotification( 0, &aHint);
}
}
diff --git a/sw/source/core/crsr/paminit.cxx b/sw/source/core/crsr/paminit.cxx
index 4069a1225ce9..479fa12745d4 100644
--- a/sw/source/core/crsr/paminit.cxx
+++ b/sw/source/core/crsr/paminit.cxx
@@ -28,7 +28,7 @@ static SwMoveFnCollection aFwrd = {
/* fnDoc */ &GoEndDoc,
/* fnSections */ &GoEndSection,
/* fnCmpOp */ &SwPosition::operator<,
- /* fnGetHint */ &GetFrwrdTxtHint,
+ /* fnGetHint */ &GetFrwrdTextHint,
/* fnSearch */ &utl::TextSearch::SearchForward,
/* fnSection */ &SwNodes::GoStartOfSection
};
@@ -39,7 +39,7 @@ static SwMoveFnCollection aBwrd = {
/* fnDoc */ &GoStartDoc,
/* fnSections */ &GoStartSection,
/* fnCmpOp */ &SwPosition::operator>,
- /* fnGetHint */ &GetBkwrdTxtHint,
+ /* fnGetHint */ &GetBkwrdTextHint,
/* fnSearch */ &utl::TextSearch::SearchBackward,
/* fnSection */ &SwNodes::GoEndOfSection
};
@@ -47,10 +47,10 @@ static SwMoveFnCollection aBwrd = {
SwGoInDoc fnGoDoc = &GoInDoc;
SwGoInDoc fnGoSection = &GoInSection;
SwGoInDoc fnGoNode = &GoInNode;
-SwGoInDoc fnGoCntnt = &GoInCntnt;
-SwGoInDoc fnGoCntntCells = &GoInCntntCells;
-SwGoInDoc fnGoCntntSkipHidden = &GoInCntntSkipHidden;
-SwGoInDoc fnGoCntntCellsSkipHidden = &GoInCntntCellsSkipHidden;
+SwGoInDoc fnGoContent = &GoInContent;
+SwGoInDoc fnGoContentCells = &GoInContentCells;
+SwGoInDoc fnGoContentSkipHidden = &GoInContentSkipHidden;
+SwGoInDoc fnGoContentCellsSkipHidden = &GoInContentCellsSkipHidden;
SwWhichPara fnParaPrev = &GoPrevPara;
SwWhichPara fnParaCurr = &GoCurrPara;
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 1df0894774ed..9baa90101297 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -187,7 +187,7 @@ _SwCursor_SavePos* SwCursor::CreateNewSavePos() const
}
/// determine if point is outside of the node-array's content area
-bool SwCursor::IsNoCntnt() const
+bool SwCursor::IsNoContent() const
{
return GetPoint()->nNode.GetIndex() <
GetDoc()->GetNodes().GetEndOfExtras().GetIndex();
@@ -210,7 +210,7 @@ bool SwTableCursor::IsSelOvrCheck(int eFlags)
if( !CheckNodesRange( aOldPos, GetPoint()->nNode, true ))
{
GetPoint()->nNode = aOldPos;
- GetPoint()->nContent.Assign( GetCntntNode(), GetSavePos()->nCntnt );
+ GetPoint()->nContent.Assign( GetContentNode(), GetSavePos()->nContent );
return true;
}
}
@@ -219,12 +219,12 @@ bool SwTableCursor::IsSelOvrCheck(int eFlags)
namespace
{
- const SwTxtAttr* InputFieldAtPos(SwPosition *pPos)
+ const SwTextAttr* InputFieldAtPos(SwPosition *pPos)
{
- SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- if (!pTxtNd)
+ SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode();
+ if (!pTextNd)
return NULL;
- return pTxtNd->GetTxtAttrAt(pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTxtNode::PARENT);
+ return pTextNd->GetTextAttrAt(pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT);
}
}
@@ -261,9 +261,9 @@ bool SwCursor::IsSelOvr( int eFlags )
// set cursor to new position:
SwNodeIndex aIdx( rPtIdx );
- sal_Int32 nCntntPos = m_pSavePos->nCntnt;
+ sal_Int32 nContentPos = m_pSavePos->nContent;
bool bGoNxt = m_pSavePos->nNode < rPtIdx.GetIndex();
- SwCntntNode* pCNd = bGoNxt
+ SwContentNode* pCNd = bGoNxt
? rNds.GoNextSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections)
: SwNodes::GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections);
if( !pCNd && ( nsSwCursorSelOverFlags::SELOVER_ENABLEREVDIREKTION & eFlags ))
@@ -279,12 +279,12 @@ bool SwCursor::IsSelOvr( int eFlags )
if( !bValidNodesRange )
{
rPtIdx = m_pSavePos->nNode;
- if( 0 == ( pCNd = rPtIdx.GetNode().GetCntntNode() ) )
+ if( 0 == ( pCNd = rPtIdx.GetNode().GetContentNode() ) )
{
bIsValidPos = false;
- nCntntPos = 0;
+ nContentPos = 0;
rPtIdx = aIdx;
- if( 0 == ( pCNd = rPtIdx.GetNode().GetCntntNode() ) )
+ if( 0 == ( pCNd = rPtIdx.GetNode().GetContentNode() ) )
{
// then to the beginning of the document
rPtIdx = rNds.GetEndOfExtras();
@@ -294,7 +294,7 @@ bool SwCursor::IsSelOvr( int eFlags )
}
// register ContentIndex:
- const sal_Int32 nTmpPos = bIsValidPos ? (bGoNxt ? 0 : pCNd->Len()) : nCntntPos;
+ const sal_Int32 nTmpPos = bIsValidPos ? (bGoNxt ? 0 : pCNd->Len()) : nContentPos;
GetPoint()->nContent.Assign( pCNd, nTmpPos );
if( !bIsValidPos || !bValidNodesRange ||
IsInProtectTable( true ) )
@@ -313,20 +313,20 @@ bool SwCursor::IsSelOvr( int eFlags )
nEndIdx = nTmp;
}
- const SwSectionFmts& rFmts = pDoc->GetSections();
- for( SwSectionFmts::size_type n = 0; n < rFmts.size(); ++n )
+ const SwSectionFormats& rFormats = pDoc->GetSections();
+ for( SwSectionFormats::size_type n = 0; n < rFormats.size(); ++n )
{
- const SwSectionFmt* pFmt = rFmts[n];
- const SvxProtectItem& rProtect = pFmt->GetProtect();
- if( rProtect.IsCntntProtected() )
+ const SwSectionFormat* pFormat = rFormats[n];
+ const SvxProtectItem& rProtect = pFormat->GetProtect();
+ if( rProtect.IsContentProtected() )
{
- const SwFmtCntnt& rCntnt = pFmt->GetCntnt(false);
- OSL_ENSURE( rCntnt.GetCntntIdx(), "No SectionNode?" );
- sal_uLong nIdx = rCntnt.GetCntntIdx()->GetIndex();
+ const SwFormatContent& rContent = pFormat->GetContent(false);
+ OSL_ENSURE( rContent.GetContentIdx(), "No SectionNode?" );
+ sal_uLong nIdx = rContent.GetContentIdx()->GetIndex();
if( nSttIdx <= nIdx && nEndIdx >= nIdx )
{
// if it is no linked section then we cannot select it
- const SwSection& rSect = *pFmt->GetSection();
+ const SwSection& rSect = *pFormat->GetSection();
if( CONTENT_SECTION == rSect.GetType() )
{
RestoreSavePos();
@@ -339,9 +339,9 @@ bool SwCursor::IsSelOvr( int eFlags )
}
const SwNode* pNd = &GetPoint()->nNode.GetNode();
- if( pNd->IsCntntNode() && !dynamic_cast<SwUnoCrsr*>(this) )
+ if( pNd->IsContentNode() && !dynamic_cast<SwUnoCrsr*>(this) )
{
- const SwCntntFrm* pFrm = static_cast<const SwCntntNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
+ const SwContentFrm* pFrm = static_cast<const SwContentNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
if ( (nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags) //allowed to change position if it's a bad one
&& pFrm && pFrm->IsValid() && !pFrm->Frm().Height() //a bad zero height position
&& !InputFieldAtPos(GetPoint()) ) //unless it's a (vertical) input field
@@ -349,7 +349,7 @@ bool SwCursor::IsSelOvr( int eFlags )
// skip to the next/prev valid paragraph with a layout
SwNodeIndex& rPtIdx = GetPoint()->nNode;
bool bGoNxt = m_pSavePos->nNode < rPtIdx.GetIndex();
- while( 0 != ( pFrm = ( bGoNxt ? pFrm->GetNextCntntFrm() : pFrm->GetPrevCntntFrm() ))
+ while( 0 != ( pFrm = ( bGoNxt ? pFrm->GetNextContentFrm() : pFrm->GetPrevContentFrm() ))
&& 0 == pFrm->Frm().Height() )
;
@@ -358,18 +358,18 @@ bool SwCursor::IsSelOvr( int eFlags )
if( !pFrm )
{
bGoNxt = !bGoNxt;
- pFrm = static_cast<const SwCntntNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
+ pFrm = static_cast<const SwContentNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
while ( pFrm && 0 == pFrm->Frm().Height() )
{
- pFrm = bGoNxt ? pFrm->GetNextCntntFrm()
- : pFrm->GetPrevCntntFrm();
+ pFrm = bGoNxt ? pFrm->GetNextContentFrm()
+ : pFrm->GetPrevContentFrm();
}
}
- SwCntntNode* pCNd = (pFrm != NULL) ? const_cast<SwCntntNode*>(pFrm->GetNode()) : NULL;
+ SwContentNode* pCNd = (pFrm != NULL) ? const_cast<SwContentNode*>(pFrm->GetNode()) : NULL;
if ( pCNd != NULL )
{
- // set this CntntNode as new position
+ // set this ContentNode as new position
rPtIdx = *pCNd;
// assign corresponding ContentIndex
@@ -377,7 +377,7 @@ bool SwCursor::IsSelOvr( int eFlags )
GetPoint()->nContent.Assign( pCNd, nTmpPos );
if (rPtIdx.GetIndex() == m_pSavePos->nNode
- && nTmpPos == m_pSavePos->nCntnt)
+ && nTmpPos == m_pSavePos->nContent)
{
// new position equals saved one
// --> trigger restore of saved pos by setting <pFrm> to NULL - see below
@@ -420,8 +420,8 @@ bool SwCursor::IsSelOvr( int eFlags )
return true; // we need a frame
}
- if( (pNd = &GetMark()->nNode.GetNode())->IsCntntNode()
- && !static_cast<const SwCntntNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() )
+ if( (pNd = &GetMark()->nNode.GetNode())->IsContentNode()
+ && !static_cast<const SwContentNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() )
&& !dynamic_cast<SwUnoCrsr*>(this) )
{
DeleteMark();
@@ -431,10 +431,10 @@ bool SwCursor::IsSelOvr( int eFlags )
// ensure that selection is only inside an InputField or contains the InputField completely
{
- const SwTxtAttr* pInputFldTxtAttrAtPoint = InputFieldAtPos(GetPoint());
- const SwTxtAttr* pInputFldTxtAttrAtMark = InputFieldAtPos(GetMark());
+ const SwTextAttr* pInputFieldTextAttrAtPoint = InputFieldAtPos(GetPoint());
+ const SwTextAttr* pInputFieldTextAttrAtMark = InputFieldAtPos(GetMark());
- if ( pInputFldTxtAttrAtPoint != pInputFldTxtAttrAtMark )
+ if ( pInputFieldTextAttrAtPoint != pInputFieldTextAttrAtMark )
{
const sal_uLong nRefNodeIdx =
( nsSwCursorSelOverFlags::SELOVER_TOGGLE & eFlags )
@@ -442,27 +442,27 @@ bool SwCursor::IsSelOvr( int eFlags )
: GetMark()->nNode.GetIndex();
const sal_Int32 nRefContentIdx =
( nsSwCursorSelOverFlags::SELOVER_TOGGLE & eFlags )
- ? m_pSavePos->nCntnt
+ ? m_pSavePos->nContent
: GetMark()->nContent.GetIndex();
const bool bIsForwardSelection =
nRefNodeIdx < GetPoint()->nNode.GetIndex()
|| ( nRefNodeIdx == GetPoint()->nNode.GetIndex()
&& nRefContentIdx < GetPoint()->nContent.GetIndex() );
- if ( pInputFldTxtAttrAtPoint != NULL )
+ if ( pInputFieldTextAttrAtPoint != NULL )
{
const sal_Int32 nNewPointPos =
- bIsForwardSelection ? *(pInputFldTxtAttrAtPoint->End()) : pInputFldTxtAttrAtPoint->GetStart();
- SwTxtNode* pTxtNdAtPoint = GetPoint()->nNode.GetNode().GetTxtNode();
- GetPoint()->nContent.Assign( pTxtNdAtPoint, nNewPointPos );
+ bIsForwardSelection ? *(pInputFieldTextAttrAtPoint->End()) : pInputFieldTextAttrAtPoint->GetStart();
+ SwTextNode* pTextNdAtPoint = GetPoint()->nNode.GetNode().GetTextNode();
+ GetPoint()->nContent.Assign( pTextNdAtPoint, nNewPointPos );
}
- if ( pInputFldTxtAttrAtMark != NULL )
+ if ( pInputFieldTextAttrAtMark != NULL )
{
const sal_Int32 nNewMarkPos =
- bIsForwardSelection ? pInputFldTxtAttrAtMark->GetStart() : *(pInputFldTxtAttrAtMark->End());
- SwTxtNode* pTxtNdAtMark = GetMark()->nNode.GetNode().GetTxtNode();
- GetMark()->nContent.Assign( pTxtNdAtMark, nNewMarkPos );
+ bIsForwardSelection ? pInputFieldTextAttrAtMark->GetStart() : *(pInputFieldTextAttrAtMark->End());
+ SwTextNode* pTextNdAtMark = GetMark()->nNode.GetNode().GetTextNode();
+ GetMark()->nContent.Assign( pTextNdAtMark, nNewMarkPos );
}
}
}
@@ -492,12 +492,12 @@ bool SwCursor::IsSelOvr( int eFlags )
do { // loop for table after table
sal_uLong nSEIdx = pPtNd->EndOfSectionIndex();
- sal_uLong nSttEndTbl = nSEIdx + 1;
+ sal_uLong nSttEndTable = nSEIdx + 1;
if( bSelTop )
- nSttEndTbl = rNds[ nSEIdx ]->StartOfSectionIndex() - 1;
+ nSttEndTable = rNds[ nSEIdx ]->StartOfSectionIndex() - 1;
- GetPoint()->nNode = nSttEndTbl;
+ GetPoint()->nNode = nSttEndTable;
const SwNode* pMyNd = &(GetNode());
if( pMyNd->IsSectionNode() || ( pMyNd->IsEndNode() &&
@@ -516,7 +516,7 @@ bool SwCursor::IsSelOvr( int eFlags )
}
// we permit these
- if( pMyNd->IsCntntNode() &&
+ if( pMyNd->IsContentNode() &&
::CheckNodesRange( GetMark()->nNode,
GetPoint()->nNode, true ))
{
@@ -526,7 +526,7 @@ bool SwCursor::IsSelOvr( int eFlags )
pMyNd = pOuterTableNd;
else
{
- SwCntntNode* pCNd = const_cast<SwCntntNode*>(static_cast<const SwCntntNode*>(pMyNd));
+ SwContentNode* pCNd = const_cast<SwContentNode*>(static_cast<const SwContentNode*>(pMyNd));
GetPoint()->nContent.Assign( pCNd, bSelTop ? pCNd->Len() : 0 );
return false;
}
@@ -545,7 +545,7 @@ bool SwCursor::IsSelOvr( int eFlags )
bool SwCursor::IsInProtectTable( bool bMove, bool bChgCrsr )
{
- SwCntntNode* pCNd = GetCntntNode();
+ SwContentNode* pCNd = GetContentNode();
if( !pCNd )
return false;
@@ -562,7 +562,7 @@ bool SwCursor::IsInProtectTable( bool bMove, bool bChgCrsr )
bool bInCoveredCell = false;
const SwStartNode* pTmpSttNode = pCNd->FindTableBoxStartNode();
OSL_ENSURE( pTmpSttNode, "In table, therefore I expect to get a SwTableBoxStartNode" );
- const SwTableBox* pBox = pTmpSttNode ? pTableNode->GetTable().GetTblBox( pTmpSttNode->GetIndex() ) : 0; //Robust #151355
+ const SwTableBox* pBox = pTmpSttNode ? pTableNode->GetTable().GetTableBox( pTmpSttNode->GetIndex() ) : 0; //Robust #151355
if ( pBox && pBox->getRowSpan() < 1 ) // Robust #151270
bInCoveredCell = true;
@@ -602,7 +602,7 @@ GoNextCell:
if( !aCellStt.GetNode().IsStartNode() )
break;
++aCellStt;
- if( 0 == ( pCNd = aCellStt.GetNode().GetCntntNode() ))
+ if( 0 == ( pCNd = aCellStt.GetNode().GetContentNode() ))
pCNd = aCellStt.GetNodes().GoNext( &aCellStt );
if( !( bProt = pCNd->IsProtect() ))
break;
@@ -613,7 +613,7 @@ SetNextCrsr:
if( !bProt ) // found free cell
{
GetPoint()->nNode = aCellStt;
- SwCntntNode* pTmpCNd = GetCntntNode();
+ SwContentNode* pTmpCNd = GetContentNode();
if( pTmpCNd )
{
GetPoint()->nContent.Assign( pTmpCNd, 0 );
@@ -651,7 +651,7 @@ GoPrevCell:
if( !( pNd = &aCellStt.GetNode())->IsEndNode() )
break;
aCellStt.Assign( *pNd->StartOfSectionNode(), +1 );
- if( 0 == ( pCNd = aCellStt.GetNode().GetCntntNode() ))
+ if( 0 == ( pCNd = aCellStt.GetNode().GetContentNode() ))
pCNd = pNd->GetNodes().GoNext( &aCellStt );
if( !( bProt = pCNd->IsProtect() ))
break;
@@ -662,7 +662,7 @@ SetPrevCrsr:
if( !bProt ) // found free cell
{
GetPoint()->nNode = aCellStt;
- SwCntntNode* pTmpCNd = GetCntntNode();
+ SwContentNode* pTmpCNd = GetContentNode();
if( pTmpCNd )
{
GetPoint()->nContent.Assign( pTmpCNd, 0 );
@@ -695,7 +695,7 @@ bool SwCursor::IsAtValidPos( bool bPoint ) const
const SwPosition* pPos = bPoint ? GetPoint() : GetMark();
const SwNode* pNd = &pPos->nNode.GetNode();
- if( pNd->IsCntntNode() && !static_cast<const SwCntntNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) &&
+ if( pNd->IsContentNode() && !static_cast<const SwContentNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) &&
!dynamic_cast<const SwUnoCrsr*>(this) )
{
return false;
@@ -717,7 +717,7 @@ bool SwCursor::IsAtValidPos( bool bPoint ) const
return true;
}
-void SwCursor::SaveTblBoxCntnt( const SwPosition* ) {}
+void SwCursor::SaveTableBoxContent( const SwPosition* ) {}
/// set range for search in document
SwMoveFnCollection* SwCursor::MakeFindRange( SwDocPositions nStart,
@@ -867,7 +867,7 @@ static bool lcl_MakeSelFwrd( const SwNode& rSttNd, const SwNode& rEndNd,
SwNodes& rNds = rPam.GetDoc()->GetNodes();
rPam.DeleteMark();
- SwCntntNode* pCNd;
+ SwContentNode* pCNd;
if( !bFirst )
{
rPam.GetPoint()->nNode = rSttNd;
@@ -899,7 +899,7 @@ static bool lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd,
SwNodes& rNds = rPam.GetDoc()->GetNodes();
rPam.DeleteMark();
- SwCntntNode* pCNd;
+ SwContentNode* pCNd;
if( !bFirst )
{
rPam.GetPoint()->nNode = rSttNd;
@@ -1081,7 +1081,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const
{
bool bIsStart = true;
- SwCntntNode* pCNd = 0;
+ SwContentNode* pCNd = 0;
SwNodes& rNds = GetDoc()->GetNodes();
switch( ePos )
@@ -1162,13 +1162,13 @@ bool SwCursor::SelectWord( SwViewShell* pViewShell, const Point* pPt )
bool SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
- if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
+ const SwTextNode* pTextNd = GetNode().GetTextNode();
+ if( pTextNd && g_pBreakIt->GetBreakIter().is() )
{
const sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
bRet = g_pBreakIt->GetBreakIter()->isBeginWord(
- pTxtNd->GetTxt(), nPtPos,
- g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos )),
+ pTextNd->GetText(), nPtPos,
+ g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos )),
nWordType );
}
return bRet;
@@ -1177,13 +1177,13 @@ bool SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
bool SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
- if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
+ const SwTextNode* pTextNd = GetNode().GetTextNode();
+ if( pTextNd && g_pBreakIt->GetBreakIter().is() )
{
const sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
bRet = g_pBreakIt->GetBreakIter()->isEndWord(
- pTxtNd->GetTxt(), nPtPos,
- g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ pTextNd->GetText(), nPtPos,
+ g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos ) ),
nWordType );
}
@@ -1193,13 +1193,13 @@ bool SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
bool SwCursor::IsInWordWT( sal_Int16 nWordType ) const
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
- if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
+ const SwTextNode* pTextNd = GetNode().GetTextNode();
+ if( pTextNd && g_pBreakIt->GetBreakIter().is() )
{
const sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
Boundary aBoundary = g_pBreakIt->GetBreakIter()->getWordBoundary(
- pTxtNd->GetTxt(), nPtPos,
- g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ pTextNd->GetText(), nPtPos,
+ g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos ) ),
nWordType,
true );
@@ -1209,7 +1209,7 @@ bool SwCursor::IsInWordWT( sal_Int16 nWordType ) const
if(bRet)
{
const CharClass& rCC = GetAppCharClass();
- bRet = rCC.isLetterNumeric( pTxtNd->GetTxt(), aBoundary.startPos );
+ bRet = rCC.isLetterNumeric( pTextNd->GetText(), aBoundary.startPos );
}
}
return bRet;
@@ -1218,7 +1218,7 @@ bool SwCursor::IsInWordWT( sal_Int16 nWordType ) const
bool SwCursor::IsStartEndSentence( bool bEnd ) const
{
bool bRet = bEnd ?
- GetCntntNode() && GetPoint()->nContent == GetCntntNode()->Len() :
+ GetContentNode() && GetPoint()->nContent == GetContentNode()->Len() :
GetPoint()->nContent.GetIndex() == 0;
if( !bRet )
@@ -1234,18 +1234,18 @@ bool SwCursor::IsStartEndSentence( bool bEnd ) const
bool SwCursor::GoStartWordWT( sal_Int16 nWordType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
- if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
+ const SwTextNode* pTextNd = GetNode().GetTextNode();
+ if( pTextNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
nPtPos = g_pBreakIt->GetBreakIter()->getWordBoundary(
- pTxtNd->GetTxt(), nPtPos,
- g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ pTextNd->GetText(), nPtPos,
+ g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos ) ),
nWordType,
false ).startPos;
- if (nPtPos < pTxtNd->GetTxt().getLength() && nPtPos >= 0)
+ if (nPtPos < pTextNd->GetText().getLength() && nPtPos >= 0)
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
@@ -1258,18 +1258,18 @@ bool SwCursor::GoStartWordWT( sal_Int16 nWordType )
bool SwCursor::GoEndWordWT( sal_Int16 nWordType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
- if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
+ const SwTextNode* pTextNd = GetNode().GetTextNode();
+ if( pTextNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
nPtPos = g_pBreakIt->GetBreakIter()->getWordBoundary(
- pTxtNd->GetTxt(), nPtPos,
- g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ pTextNd->GetText(), nPtPos,
+ g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos ) ),
nWordType,
true ).endPos;
- if (nPtPos <= pTxtNd->GetTxt().getLength() && nPtPos >= 0 &&
+ if (nPtPos <= pTextNd->GetText().getLength() && nPtPos >= 0 &&
GetPoint()->nContent.GetIndex() != nPtPos )
{
GetPoint()->nContent = nPtPos;
@@ -1283,18 +1283,18 @@ bool SwCursor::GoEndWordWT( sal_Int16 nWordType )
bool SwCursor::GoNextWordWT( sal_Int16 nWordType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
- if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
+ const SwTextNode* pTextNd = GetNode().GetTextNode();
+ if( pTextNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
nPtPos = g_pBreakIt->GetBreakIter()->nextWord(
- pTxtNd->GetTxt(), nPtPos,
- g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
+ pTextNd->GetText(), nPtPos,
+ g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos, 1 ) ),
nWordType ).startPos;
- if (nPtPos < pTxtNd->GetTxt().getLength() && nPtPos >= 0)
+ if (nPtPos < pTextNd->GetText().getLength() && nPtPos >= 0)
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
@@ -1307,8 +1307,8 @@ bool SwCursor::GoNextWordWT( sal_Int16 nWordType )
bool SwCursor::GoPrevWordWT( sal_Int16 nWordType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
- if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
+ const SwTextNode* pTextNd = GetNode().GetTextNode();
+ if( pTextNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
@@ -1317,11 +1317,11 @@ bool SwCursor::GoPrevWordWT( sal_Int16 nWordType )
if( nPtPos )
--nPtPos;
nPtPos = g_pBreakIt->GetBreakIter()->previousWord(
- pTxtNd->GetTxt(), nPtStart,
- g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
+ pTextNd->GetText(), nPtStart,
+ g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos, 1 ) ),
nWordType ).startPos;
- if (nPtPos < pTxtNd->GetTxt().getLength() && nPtPos >= 0)
+ if (nPtPos < pTextNd->GetText().getLength() && nPtPos >= 0)
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
@@ -1346,8 +1346,8 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const
pLayout->GetCrsrOfst( GetPoint(), aPt );
}
- const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
- if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
+ const SwTextNode* pTextNd = GetNode().GetTextNode();
+ if( pTextNd && g_pBreakIt->GetBreakIter().is() )
{
// Should we select the whole fieldmark?
const IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( );
@@ -1374,8 +1374,8 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const
{
sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
Boundary aBndry( g_pBreakIt->GetBreakIter()->getWordBoundary(
- pTxtNd->GetTxt(), nPtPos,
- g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ pTextNd->GetText(), nPtPos,
+ g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos ) ),
nWordType,
bForward ));
@@ -1384,8 +1384,8 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const
// nPtPos is the end of the paragraph, select the last word then.
--nPtPos;
aBndry = Boundary( g_pBreakIt->GetBreakIter()->getWordBoundary(
- pTxtNd->GetTxt(), nPtPos,
- g_pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ pTextNd->GetText(), nPtPos,
+ g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos ) ),
nWordType,
bForward ));
}
@@ -1424,28 +1424,28 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const
return bRet;
}
-static OUString lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
+static OUString lcl_MaskDeletedRedlines( const SwTextNode* pTextNd )
{
OUString aRes;
- if (pTxtNd)
+ if (pTextNd)
{
//mask deleted redlines
- OUString sNodeText(pTxtNd->GetTxt());
- const SwDoc& rDoc = *pTxtNd->GetDoc();
+ OUString sNodeText(pTextNd->GetText());
+ const SwDoc& rDoc = *pTextNd->GetDoc();
const bool nShowChg = IDocumentRedlineAccess::IsShowChanges( rDoc.getIDocumentRedlineAccess().GetRedlineMode() );
if ( nShowChg )
{
- sal_uInt16 nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( *pTxtNd, USHRT_MAX );
- for ( ; nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTbl().size(); nAct++ )
+ sal_uInt16 nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( *pTextNd, USHRT_MAX );
+ for ( ; nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(); nAct++ )
{
- const SwRangeRedline* pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTbl()[ nAct ];
- if ( pRed->Start()->nNode > pTxtNd->GetIndex() )
+ const SwRangeRedline* pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ];
+ if ( pRed->Start()->nNode > pTextNd->GetIndex() )
break;
if( nsRedlineType_t::REDLINE_DELETE == pRed->GetType() )
{
sal_Int32 nStart, nEnd;
- pRed->CalcStartEnd( pTxtNd->GetIndex(), nStart, nEnd );
+ pRed->CalcStartEnd( pTextNd->GetIndex(), nStart, nEnd );
while ( nStart < nEnd && nStart < sNodeText.getLength() )
sNodeText = sNodeText.replaceAt( nStart++, 1, OUString(CH_TXTATR_INWORD) );
@@ -1460,10 +1460,10 @@ static OUString lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
bool SwCursor::GoSentence( SentenceMoveType eMoveType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
- if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
+ const SwTextNode* pTextNd = GetNode().GetTextNode();
+ if( pTextNd && g_pBreakIt->GetBreakIter().is() )
{
- OUString sNodeText( lcl_MaskDeletedRedlines( pTxtNd ) );
+ OUString sNodeText( lcl_MaskDeletedRedlines( pTextNd ) );
SwCrsrSaveState aSave( *this );
sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
@@ -1473,22 +1473,22 @@ bool SwCursor::GoSentence( SentenceMoveType eMoveType )
nPtPos = g_pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
nPtPos, g_pBreakIt->GetLocale(
- pTxtNd->GetLang( nPtPos ) ));
+ pTextNd->GetLang( nPtPos ) ));
break;
case END_SENT: /* when modifying: see also ExpandToSentenceBorders below! */
nPtPos = g_pBreakIt->GetBreakIter()->endOfSentence(
sNodeText,
nPtPos, g_pBreakIt->GetLocale(
- pTxtNd->GetLang( nPtPos ) ));
+ pTextNd->GetLang( nPtPos ) ));
break;
case NEXT_SENT:
{
nPtPos = g_pBreakIt->GetBreakIter()->endOfSentence(
sNodeText,
nPtPos, g_pBreakIt->GetLocale(
- pTxtNd->GetLang( nPtPos ) ));
+ pTextNd->GetLang( nPtPos ) ));
while (nPtPos>=0 && ++nPtPos < sNodeText.getLength()
- && sNodeText[nPtPos] == ' ' /*isWhiteSpace( aTxt.GetChar(nPtPos)*/ )
+ && sNodeText[nPtPos] == ' ' /*isWhiteSpace( aText.GetChar(nPtPos)*/ )
;
break;
}
@@ -1496,20 +1496,20 @@ bool SwCursor::GoSentence( SentenceMoveType eMoveType )
nPtPos = g_pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
nPtPos, g_pBreakIt->GetLocale(
- pTxtNd->GetLang( nPtPos ) ));
+ pTextNd->GetLang( nPtPos ) ));
if (nPtPos == 0)
return false; // the previous sentence is not in this paragraph
if (nPtPos > 0)
nPtPos = g_pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
nPtPos - 1, g_pBreakIt->GetLocale(
- pTxtNd->GetLang( nPtPos ) ));
+ pTextNd->GetLang( nPtPos ) ));
break;
}
// it is allowed to place the PaM just behind the last
// character in the text thus <= ...Len
- if (nPtPos <= pTxtNd->GetTxt().getLength() && nPtPos >= 0)
+ if (nPtPos <= pTextNd->GetText().getLength() && nPtPos >= 0)
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
@@ -1522,8 +1522,8 @@ bool SwCursor::GoSentence( SentenceMoveType eMoveType )
bool SwCursor::ExpandToSentenceBorders()
{
bool bRes = false;
- const SwTxtNode* pStartNd = Start()->nNode.GetNode().GetTxtNode();
- const SwTxtNode* pEndNd = End()->nNode.GetNode().GetTxtNode();
+ const SwTextNode* pStartNd = Start()->nNode.GetNode().GetTextNode();
+ const SwTextNode* pEndNd = End()->nNode.GetNode().GetTextNode();
if (pStartNd && pEndNd && g_pBreakIt->GetBreakIter().is())
{
if (!HasMark())
@@ -1546,12 +1546,12 @@ bool SwCursor::ExpandToSentenceBorders()
// it is allowed to place the PaM just behind the last
// character in the text thus <= ...Len
bool bChanged = false;
- if (nStartPos <= pStartNd->GetTxt().getLength() && nStartPos >= 0)
+ if (nStartPos <= pStartNd->GetText().getLength() && nStartPos >= 0)
{
GetMark()->nContent = nStartPos;
bChanged = true;
}
- if (nEndPos <= pEndNd->GetTxt().getLength() && nEndPos >= 0)
+ if (nEndPos <= pEndNd->GetText().getLength() && nEndPos >= 0)
{
GetPoint()->nContent = nEndPos;
bChanged = true;
@@ -1570,17 +1570,17 @@ bool SwTableCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 /*nMode*/
}
// calculate cursor bidi level: extracted from LeftRight()
-const SwCntntFrm*
+const SwContentFrm*
SwCursor::DoSetBidiLevelLeftRight(
bool & io_rbLeft, bool bVisualAllowed, bool bInsertCrsr)
{
// calculate cursor bidi level
- const SwCntntFrm* pSttFrm = NULL;
+ const SwContentFrm* pSttFrm = NULL;
SwNode& rNode = GetPoint()->nNode.GetNode();
- if( rNode.IsTxtNode() )
+ if( rNode.IsTextNode() )
{
- const SwTxtNode& rTNd = *rNode.GetTxtNode();
+ const SwTextNode& rTNd = *rNode.GetTextNode();
SwIndex& rIdx = GetPoint()->nContent;
sal_Int32 nPos = rIdx.GetIndex();
@@ -1597,7 +1597,7 @@ SwCursor::DoSetBidiLevelLeftRight(
{
sal_uInt8 nCrsrLevel = GetCrsrBidiLevel();
bool bForward = ! io_rbLeft;
- const_cast<SwTxtFrm*>(static_cast<const SwTxtFrm*>(pSttFrm))->PrepareVisualMove( nPos, nCrsrLevel,
+ const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pSttFrm))->PrepareVisualMove( nPos, nCrsrLevel,
bForward, bInsertCrsr );
rIdx = nPos;
SetCrsrBidiLevel( nCrsrLevel );
@@ -1624,7 +1624,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
{
// calculate cursor bidi level
SwNode& rNode = GetPoint()->nNode.GetNode();
- const SwCntntFrm* pSttFrm = // may side-effect bLeft!
+ const SwContentFrm* pSttFrm = // may side-effect bLeft!
DoSetBidiLevelLeftRight(bLeft, bVisualAllowed, bInsertCrsr);
// can the cursor be moved n times?
@@ -1633,9 +1633,9 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
SwGoInDoc fnGo;
if ( bSkipHidden )
- fnGo = CRSR_SKIP_CELLS == nMode ? fnGoCntntCellsSkipHidden : fnGoCntntSkipHidden;
+ fnGo = CRSR_SKIP_CELLS == nMode ? fnGoContentCellsSkipHidden : fnGoContentSkipHidden;
else
- fnGo = CRSR_SKIP_CELLS == nMode ? fnGoCntntCells : fnGoCntnt;
+ fnGo = CRSR_SKIP_CELLS == nMode ? fnGoContentCells : fnGoContent;
while( nCnt )
{
@@ -1663,7 +1663,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
if ( bCellChanged )
{
// Set cursor to start/end of covered cell:
- SwTableBox* pTableBox = pOldTabBoxSttNode->GetTblBox();
+ SwTableBox* pTableBox = pOldTabBoxSttNode->GetTableBox();
if ( pTableBox && pTableBox->getRowSpan() > 1 )
{
pTableBox = & pTableBox->FindEndOfRowSpan(
@@ -1674,10 +1674,10 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
rPtIdx = aNewIdx;
GetDoc()->GetNodes().GoNextSection( &rPtIdx, false, false );
- SwCntntNode* pCntntNode = GetCntntNode();
- if ( pCntntNode )
+ SwContentNode* pContentNode = GetContentNode();
+ if ( pContentNode )
{
- GetPoint()->nContent.Assign( pCntntNode, bLeft ? pCntntNode->Len() : 0 );
+ GetPoint()->nContent.Assign( pContentNode, bLeft ? pContentNode->Len() : 0 );
// Redo the move:
if ( !Move( fnMove, fnGo ) )
@@ -1693,24 +1693,24 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
const SwNode* pTableBoxStartNode = GetPoint()->nNode.GetNode().FindTableBoxStartNode();
if ( pTableBoxStartNode )
{
- const SwTableBox* pTableBox = pTableBoxStartNode->GetTblBox();
+ const SwTableBox* pTableBox = pTableBoxStartNode->GetTableBox();
if ( pTableBox && pTableBox->getRowSpan() < 1 )
{
// Store the row span offset:
m_nRowSpanOffset = pTableBox->getRowSpan();
// Move cursor to non-covered cell:
- const SwTableNode* pTblNd = pTableBoxStartNode->FindTableNode();
- pTableBox = & pTableBox->FindStartOfRowSpan( pTblNd->GetTable(), USHRT_MAX );
+ const SwTableNode* pTableNd = pTableBoxStartNode->FindTableNode();
+ pTableBox = & pTableBox->FindStartOfRowSpan( pTableNd->GetTable(), USHRT_MAX );
SwNodeIndex& rPtIdx = GetPoint()->nNode;
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
rPtIdx = aNewIdx;
GetDoc()->GetNodes().GoNextSection( &rPtIdx, false, false );
- SwCntntNode* pCntntNode = GetCntntNode();
- if ( pCntntNode )
+ SwContentNode* pContentNode = GetContentNode();
+ if ( pContentNode )
{
- GetPoint()->nContent.Assign( pCntntNode, bLeft ? pCntntNode->Len() : 0 );
+ GetPoint()->nContent.Assign( pContentNode, bLeft ? pContentNode->Len() : 0 );
}
}
}
@@ -1721,10 +1721,10 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
if ( pSttFrm )
{
SwNode& rTmpNode = GetPoint()->nNode.GetNode();
- if ( &rTmpNode != &rNode && rTmpNode.IsTxtNode() )
+ if ( &rTmpNode != &rNode && rTmpNode.IsTextNode() )
{
Point aPt;
- const SwCntntFrm* pEndFrm = rTmpNode.GetTxtNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
+ const SwContentFrm* pEndFrm = rTmpNode.GetTextNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
if ( pEndFrm )
{
if ( ! pEndFrm->IsRightToLeft() != ! pSttFrm->IsRightToLeft() )
@@ -1747,16 +1747,16 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
void SwCursor::DoSetBidiLevelUpDown()
{
SwNode& rNode = GetPoint()->nNode.GetNode();
- if ( rNode.IsTxtNode() )
+ if ( rNode.IsTextNode() )
{
const SwScriptInfo* pSI =
- SwScriptInfo::GetScriptInfo( *rNode.GetTxtNode() );
+ SwScriptInfo::GetScriptInfo( *rNode.GetTextNode() );
if ( pSI )
{
SwIndex& rIdx = GetPoint()->nContent;
const sal_Int32 nPos = rIdx.GetIndex();
- if (nPos && nPos < rNode.GetTxtNode()->GetTxt().getLength())
+ if (nPos && nPos < rNode.GetTextNode()->GetText().getLength())
{
const sal_uInt8 nCurrLevel = pSI->DirType( nPos );
const sal_uInt8 nPrevLevel = pSI->DirType( nPos - 1 );
@@ -1776,12 +1776,12 @@ void SwCursor::DoSetBidiLevelUpDown()
bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
Point* pPt, long nUpDownX )
{
- SwTableCursor* pTblCrsr = dynamic_cast<SwTableCursor*>(this);
+ SwTableCursor* pTableCrsr = dynamic_cast<SwTableCursor*>(this);
bool bAdjustTableCrsr = false;
// If the point/mark of the table cursor in the same box then set cursor to
// beginning of the box
- if( pTblCrsr && GetNode( true ).StartOfSectionNode() ==
+ if( pTableCrsr && GetNode( true ).StartOfSectionNode() ==
GetNode( false ).StartOfSectionNode() )
{
if ( End() != GetPoint() )
@@ -1793,7 +1793,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
Point aPt;
if( pPt )
aPt = *pPt;
- SwCntntFrm* pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
+ SwContentFrm* pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
if( pFrm )
{
@@ -1811,7 +1811,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
}
// It is allowed to move footnotes in other footnotes but not sections
- const bool bChkRange = !pFrm->IsInFtn() || HasMark();
+ const bool bChkRange = !pFrm->IsInFootnote() || HasMark();
const SwPosition aOldPos( *GetPoint() );
const bool bInReadOnly = IsReadOnlyAvailable();
@@ -1821,15 +1821,15 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
// than one paragraph. If we want to go down, we have to set the
// point to the last frame in the table box. This is only necessary
// if we do not already have a table selection
- const SwStartNode* pTblNd = GetNode( true ).FindTableBoxStartNode();
- OSL_ENSURE( pTblNd, "pTblCrsr without SwTableNode?" );
+ const SwStartNode* pTableNd = GetNode( true ).FindTableBoxStartNode();
+ OSL_ENSURE( pTableNd, "pTableCrsr without SwTableNode?" );
- if ( pTblNd ) // safety first
+ if ( pTableNd ) // safety first
{
- const SwNode* pEndNd = pTblNd->EndOfSectionNode();
+ const SwNode* pEndNd = pTableNd->EndOfSectionNode();
GetPoint()->nNode = *pEndNd;
- pTblCrsr->Move( fnMoveBackward, fnGoNode );
- pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
+ pTableCrsr->Move( fnMoveBackward, fnGoNode );
+ pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
}
}
@@ -1838,7 +1838,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
: pFrm->UnitDown( this, nUpDownX, bInReadOnly ) ) &&
CheckNodesRange( aOldPos.nNode, GetPoint()->nNode, bChkRange ))
{
- pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
+ pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
--nCnt;
}
@@ -1846,10 +1846,10 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
if( !nCnt && !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
{
- if( !pTblCrsr )
+ if( !pTableCrsr )
{
// try to position the cursor at half of the char-rect's height
- pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
+ pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
SwCrsrMoveState eTmpState( MV_UPDOWN );
eTmpState.bSetInReadOnly = bInReadOnly;
SwRect aTmpRect;
@@ -1881,7 +1881,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
bool SwCursor::LeftRightMargin( bool bLeft, bool bAPI )
{
Point aPt;
- SwCntntFrm * pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
+ SwContentFrm * pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
// calculate cursor bidi level
if ( pFrm )
@@ -1897,7 +1897,7 @@ bool SwCursor::IsAtLeftRightMargin( bool bLeft, bool bAPI ) const
{
bool bRet = false;
Point aPt;
- SwCntntFrm * pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
+ SwContentFrm * pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
if( pFrm )
{
SwPaM aPam( *GetPoint() );
@@ -1916,7 +1916,7 @@ bool SwCursor::SttEndDoc( bool bStt )
// Never jump over section boundaries during selection!
// Can the cursor still moved on?
SwMoveFn fnMove = bStt ? fnMoveBackward : fnMoveForward;
- bool bRet = (!HasMark() || !IsNoCntnt() ) &&
+ bool bRet = (!HasMark() || !IsNoContent() ) &&
Move( fnMove, fnGoDoc ) &&
!IsInProtectTable( true ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
@@ -1927,8 +1927,8 @@ bool SwCursor::SttEndDoc( bool bStt )
bool SwCursor::GoPrevNextCell( bool bNext, sal_uInt16 nCnt )
{
- const SwTableNode* pTblNd = GetPoint()->nNode.GetNode().FindTableNode();
- if( !pTblNd )
+ const SwTableNode* pTableNd = GetPoint()->nNode.GetNode().FindTableNode();
+ if( !pTableNd )
return false;
// If there is another EndNode in front of the cell's StartNode then there
@@ -1939,7 +1939,7 @@ bool SwCursor::GoPrevNextCell( bool bNext, sal_uInt16 nCnt )
while( nCnt-- )
{
const SwNode* pTableBoxStartNode = rPtIdx.GetNode().FindTableBoxStartNode();
- const SwTableBox* pTableBox = pTableBoxStartNode->GetTblBox();
+ const SwTableBox* pTableBox = pTableBoxStartNode->GetTableBox();
// Check if we have to move the cursor to a covered cell before
// proceeding:
@@ -1947,7 +1947,7 @@ bool SwCursor::GoPrevNextCell( bool bNext, sal_uInt16 nCnt )
{
if ( pTableBox && pTableBox->getRowSpan() > 1 )
{
- pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(),
+ pTableBox = & pTableBox->FindEndOfRowSpan( pTableNd->GetTable(),
static_cast<sal_uInt16>(pTableBox->getRowSpan() + m_nRowSpanOffset));
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
rPtIdx = aNewIdx;
@@ -1968,21 +1968,21 @@ bool SwCursor::GoPrevNextCell( bool bNext, sal_uInt16 nCnt )
rPtIdx = bNext ? aCellIdx : SwNodeIndex(*aCellIdx.GetNode().StartOfSectionNode());
pTableBoxStartNode = rPtIdx.GetNode().FindTableBoxStartNode();
- pTableBox = pTableBoxStartNode->GetTblBox();
+ pTableBox = pTableBoxStartNode->GetTableBox();
if ( pTableBox && pTableBox->getRowSpan() < 1 )
{
m_nRowSpanOffset = pTableBox->getRowSpan();
// move cursor to non-covered cell:
- pTableBox = & pTableBox->FindStartOfRowSpan( pTblNd->GetTable(), USHRT_MAX );
+ pTableBox = & pTableBox->FindStartOfRowSpan( pTableNd->GetTable(), USHRT_MAX );
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
rPtIdx = aNewIdx;
}
}
++rPtIdx;
- if( !rPtIdx.GetNode().IsCntntNode() )
+ if( !rPtIdx.GetNode().IsContentNode() )
GetDoc()->GetNodes().GoNextSection( &rPtIdx, true, false );
- GetPoint()->nContent.Assign( GetCntntNode(), 0 );
+ GetPoint()->nContent.Assign( GetContentNode(), 0 );
return !IsInProtectTable( true );
}
@@ -1997,35 +1997,35 @@ bool SwCursor::GotoTable( const OUString& rName )
bool bRet = false;
if ( !HasMark() )
{
- SwTable* pTmpTbl = SwTable::FindTable( GetDoc()->FindTblFmtByName( rName ) );
- if( pTmpTbl )
+ SwTable* pTmpTable = SwTable::FindTable( GetDoc()->FindTableFormatByName( rName ) );
+ if( pTmpTable )
{
// a table in a normal nodes array
SwCrsrSaveState aSave( *this );
- GetPoint()->nNode = *pTmpTbl->GetTabSortBoxes()[ 0 ]->
+ GetPoint()->nNode = *pTmpTable->GetTabSortBoxes()[ 0 ]->
GetSttNd()->FindTableNode();
- Move( fnMoveForward, fnGoCntnt );
+ Move( fnMoveForward, fnGoContent );
bRet = !IsSelOvr();
}
}
return bRet;
}
-bool SwCursor::GotoTblBox( const OUString& rName )
+bool SwCursor::GotoTableBox( const OUString& rName )
{
bool bRet = false;
- const SwTableNode* pTblNd = GetPoint()->nNode.GetNode().FindTableNode();
- if( pTblNd )
+ const SwTableNode* pTableNd = GetPoint()->nNode.GetNode().FindTableNode();
+ if( pTableNd )
{
// retrieve box by name
- const SwTableBox* pTblBox = pTblNd->GetTable().GetTblBox( rName );
- if( pTblBox && pTblBox->GetSttNd() &&
- ( !pTblBox->GetFrmFmt()->GetProtect().IsCntntProtected() ||
+ const SwTableBox* pTableBox = pTableNd->GetTable().GetTableBox( rName );
+ if( pTableBox && pTableBox->GetSttNd() &&
+ ( !pTableBox->GetFrameFormat()->GetProtect().IsContentProtected() ||
IsReadOnlyAvailable() ) )
{
SwCrsrSaveState aSave( *this );
- GetPoint()->nNode = *pTblBox->GetSttNd();
- Move( fnMoveForward, fnGoCntnt );
+ GetPoint()->nNode = *pTableBox->GetSttNd();
+ Move( fnMoveForward, fnGoContent );
bRet = !IsSelOvr();
}
}
@@ -2043,19 +2043,19 @@ bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
// If fnWhichPara == fnParaCurr then (*fnWhichPara)( *this, fnPosPara )
// can already move the cursor to a different text node. In this case
// we better check if IsSelOvr().
- const SwCntntNode* pCntntNd = pNd->GetCntntNode();
- if ( pCntntNd )
+ const SwContentNode* pContentNd = pNd->GetContentNode();
+ if ( pContentNd )
{
- const sal_Int32 nSttEnd = fnPosPara == fnMoveForward ? 0 : pCntntNd->Len();
+ const sal_Int32 nSttEnd = fnPosPara == fnMoveForward ? 0 : pContentNd->Len();
if ( GetPoint()->nContent.GetIndex() != nSttEnd )
bShortCut = true;
}
}
else
{
- if ( pNd->IsTxtNode() &&
+ if ( pNd->IsTextNode() &&
pNd->GetNodes()[ pNd->GetIndex() +
- (fnWhichPara == fnParaNext ? 1 : -1 ) ]->IsTxtNode() )
+ (fnWhichPara == fnParaNext ? 1 : -1 ) ]->IsTextNode() )
bShortCut = true;
}
@@ -2094,17 +2094,17 @@ void SwCursor::RestoreSavePos()
GetPoint()->nNode = m_pSavePos->nNode;
sal_Int32 nIdx = 0;
- if ( GetCntntNode() )
+ if ( GetContentNode() )
{
- if (m_pSavePos->nCntnt <= GetCntntNode()->Len())
- nIdx = m_pSavePos->nCntnt;
+ if (m_pSavePos->nContent <= GetContentNode()->Len())
+ nIdx = m_pSavePos->nContent;
else
{
- nIdx = GetCntntNode()->Len();
+ nIdx = GetContentNode()->Len();
OSL_FAIL("SwCursor::RestoreSavePos: invalid content index");
}
}
- GetPoint()->nContent.Assign( GetCntntNode(), nIdx );
+ GetPoint()->nContent.Assign( GetContentNode(), nIdx );
}
}
@@ -2113,8 +2113,8 @@ SwTableCursor::SwTableCursor( const SwPosition &rPos, SwPaM* pRing )
{
m_bParked = false;
m_bChanged = false;
- m_nTblPtNd = 0, m_nTblMkNd = 0;
- m_nTblPtCnt = 0, m_nTblMkCnt = 0;
+ m_nTablePtNd = 0, m_nTableMkNd = 0;
+ m_nTablePtCnt = 0, m_nTableMkCnt = 0;
}
SwTableCursor::~SwTableCursor() {}
@@ -2185,22 +2185,22 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
{
SwNodeIndex aIdx( *pSttNd, 1 );
const SwNode* pNd = &aIdx.GetNode();
- if( !pNd->IsCntntNode() )
+ if( !pNd->IsContentNode() )
pNd = rNds.GoNextSection( &aIdx, true, false );
SwPosition* pPos = pCur->GetMark();
if( pNd != &pPos->nNode.GetNode() )
pPos->nNode = *pNd;
- pPos->nContent.Assign( const_cast<SwCntntNode*>(static_cast<const SwCntntNode*>(pNd)), 0 );
+ pPos->nContent.Assign( const_cast<SwContentNode*>(static_cast<const SwContentNode*>(pNd)), 0 );
aIdx.Assign( *pSttNd->EndOfSectionNode(), - 1 );
- if( !( pNd = &aIdx.GetNode())->IsCntntNode() )
+ if( !( pNd = &aIdx.GetNode())->IsContentNode() )
pNd = SwNodes::GoPrevSection( &aIdx, true, false );
pPos = pCur->GetPoint();
if (pNd && pNd != &pPos->nNode.GetNode())
pPos->nNode = *pNd;
- pPos->nContent.Assign(const_cast<SwCntntNode*>(static_cast<const SwCntntNode*>(pNd)), pNd ? static_cast<const SwCntntNode*>(pNd)->Len() : 0);
+ pPos->nContent.Assign(const_cast<SwContentNode*>(static_cast<const SwContentNode*>(pNd)), pNd ? static_cast<const SwContentNode*>(pNd)->Len() : 0);
aTmp.erase( aTmp.begin() + nPos );
}
@@ -2227,30 +2227,30 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
if( &aIdx.GetNodes() != &rNds )
break;
SwNode* pNd = &aIdx.GetNode();
- if( !pNd->IsCntntNode() )
+ if( !pNd->IsContentNode() )
pNd = rNds.GoNextSection( &aIdx, true, false );
SwPaM *const pNew = (!pAktCrsr->IsMultiSelection() && !pAktCrsr->HasMark())
? pAktCrsr
: pAktCrsr->Create( pAktCrsr );
pNew->GetPoint()->nNode = *pNd;
- pNew->GetPoint()->nContent.Assign( static_cast<SwCntntNode*>(pNd), 0 );
+ pNew->GetPoint()->nContent.Assign( static_cast<SwContentNode*>(pNd), 0 );
pNew->SetMark();
SwPosition* pPos = pNew->GetPoint();
pPos->nNode.Assign( *pSttNd->EndOfSectionNode(), - 1 );
- if( !( pNd = &pPos->nNode.GetNode())->IsCntntNode() )
+ if( !( pNd = &pPos->nNode.GetNode())->IsContentNode() )
pNd = SwNodes::GoPrevSection( &pPos->nNode, true, false );
- pPos->nContent.Assign(static_cast<SwCntntNode*>(pNd), pNd ? static_cast<SwCntntNode*>(pNd)->Len() : 0);
+ pPos->nContent.Assign(static_cast<SwContentNode*>(pNd), pNd ? static_cast<SwContentNode*>(pNd)->Len() : 0);
}
}
return pAktCrsr;
}
-void SwTableCursor::InsertBox( const SwTableBox& rTblBox )
+void SwTableCursor::InsertBox( const SwTableBox& rTableBox )
{
- SwTableBox* pBox = const_cast<SwTableBox*>(&rTblBox);
+ SwTableBox* pBox = const_cast<SwTableBox*>(&rTableBox);
m_SelectedBoxes.insert(pBox);
m_bChanged = true;
}
@@ -2264,8 +2264,8 @@ void SwTableCursor::DeleteBox(size_t const nPos)
bool SwTableCursor::NewTableSelection()
{
bool bRet = false;
- const SwNode *pStart = GetCntntNode()->FindTableBoxStartNode();
- const SwNode *pEnd = GetCntntNode(false)->FindTableBoxStartNode();
+ const SwNode *pStart = GetContentNode()->FindTableBoxStartNode();
+ const SwNode *pEnd = GetContentNode(false)->FindTableBoxStartNode();
if( pStart && pEnd )
{
const SwTableNode *pTableNode = pStart->FindTableNode();
@@ -2317,15 +2317,15 @@ void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew )
}
}
-bool SwTableCursor::IsCrsrMovedUpdt()
+bool SwTableCursor::IsCrsrMovedUpdate()
{
if( !IsCrsrMoved() )
return false;
- m_nTblMkNd = GetMark()->nNode.GetIndex();
- m_nTblPtNd = GetPoint()->nNode.GetIndex();
- m_nTblMkCnt = GetMark()->nContent.GetIndex();
- m_nTblPtCnt = GetPoint()->nContent.GetIndex();
+ m_nTableMkNd = GetMark()->nNode.GetIndex();
+ m_nTablePtNd = GetPoint()->nNode.GetIndex();
+ m_nTableMkCnt = GetMark()->nContent.GetIndex();
+ m_nTablePtCnt = GetPoint()->nContent.GetIndex();
return true;
}
@@ -2354,7 +2354,7 @@ bool SwTableCursor::HasReadOnlyBoxSel() const
bool bRet = false;
for (size_t n = m_SelectedBoxes.size(); n; )
{
- if (m_SelectedBoxes[--n]->GetFrmFmt()->GetProtect().IsCntntProtected())
+ if (m_SelectedBoxes[--n]->GetFrameFormat()->GetProtect().IsContentProtected())
{
bRet = true;
break;
diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx
index ffd22a28cd78..e5b5c865fdb5 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -44,22 +44,22 @@ SwLayoutFrm* GetPrevColumn( const SwLayoutFrm* pLayFrm )
return pActCol ? static_cast<SwLayoutFrm*>(pActCol->GetPrev()) : 0;
}
-SwCntntFrm* GetColumnStt( const SwLayoutFrm* pColFrm )
+SwContentFrm* GetColumnStt( const SwLayoutFrm* pColFrm )
{
- return pColFrm ? const_cast<SwCntntFrm*>(pColFrm->ContainsCntnt()) : 0;
+ return pColFrm ? const_cast<SwContentFrm*>(pColFrm->ContainsContent()) : 0;
}
-SwCntntFrm* GetColumnEnd( const SwLayoutFrm* pColFrm )
+SwContentFrm* GetColumnEnd( const SwLayoutFrm* pColFrm )
{
- SwCntntFrm *pRet = GetColumnStt( pColFrm );
+ SwContentFrm *pRet = GetColumnStt( pColFrm );
if( !pRet )
return 0;
- SwCntntFrm *pNxt = pRet->GetNextCntntFrm();
+ SwContentFrm *pNxt = pRet->GetNextContentFrm();
while( pNxt && pColFrm->IsAnLower( pNxt ) )
{
pRet = pNxt;
- pNxt = pNxt->GetNextCntntFrm();
+ pNxt = pNxt->GetNextContentFrm();
}
return pRet;
}
@@ -73,12 +73,12 @@ SwPosColumn fnColumnEnd = &GetColumnEnd;
bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
{
bool bRet = false;
- if( !m_pTblCrsr )
+ if( !m_pTableCrsr )
{
SwLayoutFrm* pLayFrm = GetCurrFrm()->GetUpper();
if( pLayFrm && 0 != ( pLayFrm = (*fnWhichCol)( pLayFrm )) )
{
- SwCntntFrm* pCnt = (*fnPosCol)( pLayFrm );
+ SwContentFrm* pCnt = (*fnPosCol)( pLayFrm );
if( pCnt )
{
SET_CURR_SHELL( this );
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 62cdca2b27e2..31fe101dd889 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -46,22 +46,22 @@ bool SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr )
return bRet;
}
-bool SwCursor::GotoFtnTxt()
+bool SwCursor::GotoFootnoteText()
{
// jump from content to footnote
bool bRet = false;
- SwTxtNode* pTxtNd = GetPoint()->nNode.GetNode().GetTxtNode();
+ SwTextNode* pTextNd = GetPoint()->nNode.GetNode().GetTextNode();
- SwTxtAttr *const pFtn( (pTxtNd)
- ? pTxtNd->GetTxtAttrForCharAt(
+ SwTextAttr *const pFootnote( (pTextNd)
+ ? pTextNd->GetTextAttrForCharAt(
GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN)
: 0);
- if (pFtn)
+ if (pFootnote)
{
SwCrsrSaveState aSaveState( *this );
- GetPoint()->nNode = *static_cast<SwTxtFtn*>(pFtn)->GetStartNode();
+ GetPoint()->nNode = *static_cast<SwTextFootnote*>(pFootnote)->GetStartNode();
- SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection(
+ SwContentNode* pCNd = GetDoc()->GetNodes().GoNextSection(
&GetPoint()->nNode,
true, !IsReadOnlyAvailable() );
if( pCNd )
@@ -74,36 +74,36 @@ bool SwCursor::GotoFtnTxt()
return bRet;
}
-bool SwCrsrShell::GotoFtnTxt()
+bool SwCrsrShell::GotoFootnoteText()
{
- bool bRet = CallCrsrFN( &SwCursor::GotoFtnTxt );
+ bool bRet = CallCrsrFN( &SwCursor::GotoFootnoteText );
if( !bRet )
{
- SwTxtNode* pTxtNd = _GetCrsr() ?
- _GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode() : NULL;
- if( pTxtNd )
+ SwTextNode* pTextNd = _GetCrsr() ?
+ _GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode() : NULL;
+ if( pTextNd )
{
- const SwFrm *pFrm = pTxtNd->getLayoutFrm( GetLayout(), &_GetCrsr()->GetSttPos(),
+ const SwFrm *pFrm = pTextNd->getLayoutFrm( GetLayout(), &_GetCrsr()->GetSttPos(),
_GetCrsr()->Start() );
- const SwFtnBossFrm* pFtnBoss;
- bool bSkip = pFrm && pFrm->IsInFtn();
- while( pFrm && 0 != ( pFtnBoss = pFrm->FindFtnBossFrm() ) )
+ const SwFootnoteBossFrm* pFootnoteBoss;
+ bool bSkip = pFrm && pFrm->IsInFootnote();
+ while( pFrm && 0 != ( pFootnoteBoss = pFrm->FindFootnoteBossFrm() ) )
{
- if( 0 != ( pFrm = pFtnBoss->FindFtnCont() ) )
+ if( 0 != ( pFrm = pFootnoteBoss->FindFootnoteCont() ) )
{
if( bSkip )
bSkip = false;
else
{
- const SwCntntFrm* pCnt = static_cast<const SwLayoutFrm*>
- (pFrm)->ContainsCntnt();
+ const SwContentFrm* pCnt = static_cast<const SwLayoutFrm*>
+ (pFrm)->ContainsContent();
if( pCnt )
{
- const SwCntntNode* pNode = pCnt->GetNode();
+ const SwContentNode* pNode = pCnt->GetNode();
_GetCrsr()->GetPoint()->nNode = *pNode;
_GetCrsr()->GetPoint()->nContent.Assign(
- const_cast<SwCntntNode*>(pNode),
- static_cast<const SwTxtFrm*>(pCnt)->GetOfst() );
+ const_cast<SwContentNode*>(pNode),
+ static_cast<const SwTextFrm*>(pCnt)->GetOfst() );
UpdateCrsr( SwCrsrShell::SCROLLWIN |
SwCrsrShell::CHKRANGE | SwCrsrShell::READONLY );
bRet = true;
@@ -111,34 +111,34 @@ bool SwCrsrShell::GotoFtnTxt()
}
}
}
- if( pFtnBoss->GetNext() && !pFtnBoss->IsPageFrm() )
- pFrm = pFtnBoss->GetNext();
+ if( pFootnoteBoss->GetNext() && !pFootnoteBoss->IsPageFrm() )
+ pFrm = pFootnoteBoss->GetNext();
else
- pFrm = pFtnBoss->GetUpper();
+ pFrm = pFootnoteBoss->GetUpper();
}
}
}
return bRet;
}
-bool SwCursor::GotoFtnAnchor()
+bool SwCursor::GotoFootnoteAnchor()
{
// jump from footnote to anchor
const SwNode* pSttNd = GetNode().FindFootnoteStartNode();
if( pSttNd )
{
// search in all footnotes in document for this StartIndex
- const SwTxtFtn* pTxtFtn;
- const SwFtnIdxs& rFtnArr = pSttNd->GetDoc()->GetFtnIdxs();
- for( size_t n = 0; n < rFtnArr.size(); ++n )
- if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
- pSttNd == &pTxtFtn->GetStartNode()->GetNode() )
+ const SwTextFootnote* pTextFootnote;
+ const SwFootnoteIdxs& rFootnoteArr = pSttNd->GetDoc()->GetFootnoteIdxs();
+ for( size_t n = 0; n < rFootnoteArr.size(); ++n )
+ if( 0 != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
+ pSttNd == &pTextFootnote->GetStartNode()->GetNode() )
{
SwCrsrSaveState aSaveState( *this );
- SwTxtNode& rTNd = (SwTxtNode&)pTxtFtn->GetTxtNode();
+ SwTextNode& rTNd = (SwTextNode&)pTextFootnote->GetTextNode();
GetPoint()->nNode = rTNd;
- GetPoint()->nContent.Assign( &rTNd, pTxtFtn->GetStart() );
+ GetPoint()->nContent.Assign( &rTNd, pTextFootnote->GetStart() );
return !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE );
@@ -147,11 +147,11 @@ bool SwCursor::GotoFtnAnchor()
return false;
}
-bool SwCrsrShell::GotoFtnAnchor()
+bool SwCrsrShell::GotoFootnoteAnchor()
{
// jump from footnote to anchor
SwCallLink aLk( *this ); // watch Crsr-Moves
- bool bRet = m_pCurCrsr->GotoFtnAnchor();
+ bool bRet = m_pCurCrsr->GotoFootnoteAnchor();
if( bRet )
{
// special treatment for table header row
@@ -162,99 +162,99 @@ bool SwCrsrShell::GotoFtnAnchor()
return bRet;
}
-inline bool CmpLE( const SwTxtFtn& rFtn, sal_uLong nNd, sal_Int32 nCnt )
+inline bool CmpLE( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt )
{
- const sal_uLong nTNd = rFtn.GetTxtNode().GetIndex();
- return nTNd < nNd || ( nTNd == nNd && rFtn.GetStart() <= nCnt );
+ const sal_uLong nTNd = rFootnote.GetTextNode().GetIndex();
+ return nTNd < nNd || ( nTNd == nNd && rFootnote.GetStart() <= nCnt );
}
-inline bool CmpL( const SwTxtFtn& rFtn, sal_uLong nNd, sal_Int32 nCnt )
+inline bool CmpL( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt )
{
- const sal_uLong nTNd = rFtn.GetTxtNode().GetIndex();
- return nTNd < nNd || ( nTNd == nNd && rFtn.GetStart() < nCnt );
+ const sal_uLong nTNd = rFootnote.GetTextNode().GetIndex();
+ return nTNd < nNd || ( nTNd == nNd && rFootnote.GetStart() < nCnt );
}
-bool SwCursor::GotoNextFtnAnchor()
+bool SwCursor::GotoNextFootnoteAnchor()
{
- const SwFtnIdxs& rFtnArr = GetDoc()->GetFtnIdxs();
- const SwTxtFtn* pTxtFtn = 0;
+ const SwFootnoteIdxs& rFootnoteArr = GetDoc()->GetFootnoteIdxs();
+ const SwTextFootnote* pTextFootnote = 0;
size_t nPos = 0;
- if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos ))
+ if( rFootnoteArr.SeekEntry( GetPoint()->nNode, &nPos ))
{
// there is a footnote with this index, so search also for the next one
- if( nPos < rFtnArr.size() )
+ if( nPos < rFootnoteArr.size() )
{
sal_uLong nNdPos = GetPoint()->nNode.GetIndex();
const sal_Int32 nCntPos = GetPoint()->nContent.GetIndex();
- pTxtFtn = rFtnArr[ nPos ];
+ pTextFootnote = rFootnoteArr[ nPos ];
// search forwards
- if( CmpLE( *pTxtFtn, nNdPos, nCntPos ) )
+ if( CmpLE( *pTextFootnote, nNdPos, nCntPos ) )
{
- pTxtFtn = 0;
- for( ++nPos; nPos < rFtnArr.size(); ++nPos )
+ pTextFootnote = 0;
+ for( ++nPos; nPos < rFootnoteArr.size(); ++nPos )
{
- pTxtFtn = rFtnArr[ nPos ];
- if( !CmpLE( *pTxtFtn, nNdPos, nCntPos ) )
+ pTextFootnote = rFootnoteArr[ nPos ];
+ if( !CmpLE( *pTextFootnote, nNdPos, nCntPos ) )
break; // found
- pTxtFtn = 0;
+ pTextFootnote = 0;
}
}
else if( nPos )
{
// search backwards
- pTxtFtn = 0;
+ pTextFootnote = 0;
while( nPos )
{
- pTxtFtn = rFtnArr[ --nPos ];
- if( CmpLE( *pTxtFtn, nNdPos, nCntPos ) )
+ pTextFootnote = rFootnoteArr[ --nPos ];
+ if( CmpLE( *pTextFootnote, nNdPos, nCntPos ) )
{
- pTxtFtn = rFtnArr[ ++nPos ];
+ pTextFootnote = rFootnoteArr[ ++nPos ];
break; // found
}
}
}
}
}
- else if( nPos < rFtnArr.size() )
- pTxtFtn = rFtnArr[ nPos ];
+ else if( nPos < rFootnoteArr.size() )
+ pTextFootnote = rFootnoteArr[ nPos ];
- bool bRet = 0 != pTxtFtn;
+ bool bRet = 0 != pTextFootnote;
if( bRet )
{
SwCrsrSaveState aSaveState( *this );
- SwTxtNode& rTNd = (SwTxtNode&)pTxtFtn->GetTxtNode();
+ SwTextNode& rTNd = (SwTextNode&)pTextFootnote->GetTextNode();
GetPoint()->nNode = rTNd;
- GetPoint()->nContent.Assign( &rTNd, pTxtFtn->GetStart() );
+ GetPoint()->nContent.Assign( &rTNd, pTextFootnote->GetStart() );
bRet = !IsSelOvr();
}
return bRet;
}
-bool SwCursor::GotoPrevFtnAnchor()
+bool SwCursor::GotoPrevFootnoteAnchor()
{
- const SwFtnIdxs& rFtnArr = GetDoc()->GetFtnIdxs();
- const SwTxtFtn* pTxtFtn = 0;
+ const SwFootnoteIdxs& rFootnoteArr = GetDoc()->GetFootnoteIdxs();
+ const SwTextFootnote* pTextFootnote = 0;
size_t nPos = 0;
- if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos ) )
+ if( rFootnoteArr.SeekEntry( GetPoint()->nNode, &nPos ) )
{
// there is a footnote with this index, so search also for the next one
sal_uLong nNdPos = GetPoint()->nNode.GetIndex();
const sal_Int32 nCntPos = GetPoint()->nContent.GetIndex();
- pTxtFtn = rFtnArr[ nPos ];
+ pTextFootnote = rFootnoteArr[ nPos ];
// search forwards
- if( CmpL( *pTxtFtn, nNdPos, nCntPos ))
+ if( CmpL( *pTextFootnote, nNdPos, nCntPos ))
{
- for( ++nPos; nPos < rFtnArr.size(); ++nPos )
+ for( ++nPos; nPos < rFootnoteArr.size(); ++nPos )
{
- pTxtFtn = rFtnArr[ nPos ];
- if( !CmpL( *pTxtFtn, nNdPos, nCntPos ) )
+ pTextFootnote = rFootnoteArr[ nPos ];
+ if( !CmpL( *pTextFootnote, nNdPos, nCntPos ) )
{
- pTxtFtn = rFtnArr[ nPos-1 ];
+ pTextFootnote = rFootnoteArr[ nPos-1 ];
break;
}
}
@@ -262,42 +262,42 @@ bool SwCursor::GotoPrevFtnAnchor()
else if( nPos )
{
// search backwards
- pTxtFtn = 0;
+ pTextFootnote = 0;
while( nPos )
{
- pTxtFtn = rFtnArr[ --nPos ];
- if( CmpL( *pTxtFtn, nNdPos, nCntPos ))
+ pTextFootnote = rFootnoteArr[ --nPos ];
+ if( CmpL( *pTextFootnote, nNdPos, nCntPos ))
break; // found
- pTxtFtn = 0;
+ pTextFootnote = 0;
}
}
else
- pTxtFtn = 0;
+ pTextFootnote = 0;
}
else if( nPos )
- pTxtFtn = rFtnArr[ nPos-1 ];
+ pTextFootnote = rFootnoteArr[ nPos-1 ];
- bool bRet = 0 != pTxtFtn;
+ bool bRet = 0 != pTextFootnote;
if( bRet )
{
SwCrsrSaveState aSaveState( *this );
- SwTxtNode& rTNd = (SwTxtNode&)pTxtFtn->GetTxtNode();
+ SwTextNode& rTNd = (SwTextNode&)pTextFootnote->GetTextNode();
GetPoint()->nNode = rTNd;
- GetPoint()->nContent.Assign( &rTNd, pTxtFtn->GetStart() );
+ GetPoint()->nContent.Assign( &rTNd, pTextFootnote->GetStart() );
bRet = !IsSelOvr();
}
return bRet;
}
-bool SwCrsrShell::GotoNextFtnAnchor()
+bool SwCrsrShell::GotoNextFootnoteAnchor()
{
- return CallCrsrFN( &SwCursor::GotoNextFtnAnchor );
+ return CallCrsrFN( &SwCursor::GotoNextFootnoteAnchor );
}
-bool SwCrsrShell::GotoPrevFtnAnchor()
+bool SwCrsrShell::GotoPrevFootnoteAnchor()
{
- return CallCrsrFN( &SwCursor::GotoPrevFtnAnchor );
+ return CallCrsrFN( &SwCursor::GotoPrevFootnoteAnchor );
}
/// jump from border to anchor
@@ -326,7 +326,7 @@ bool SwCrsrShell::GotoFlyAnchor()
: pFrm->Frm().Left());
const SwPageFrm* pPageFrm = pFrm->FindPageFrm();
- const SwCntntFrm* pFndFrm = pPageFrm->GetCntntPos( aPt, false, true );
+ const SwContentFrm* pFndFrm = pPageFrm->GetContentPos( aPt, false, true );
pFndFrm->GetCrsrOfst( m_pCurCrsr->GetPoint(), aPt );
bool bRet = !m_pCurCrsr->IsInProtectTable() && !m_pCurCrsr->IsSelOvr();
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index 92d40ed3e3a5..8c2ba4e36b2e 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -53,7 +53,7 @@ bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
else if( fnPosRegion == fnMoveForward )
{
aIdx = *pNd;
- SwCntntNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx,
+ SwContentNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx,
true, !bInReadOnly );
if( !pCNd )
{
@@ -65,7 +65,7 @@ bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
else
{
aIdx = *pNd->EndOfSectionNode();
- SwCntntNode* pCNd = SwNodes::GoPrevSection( &aIdx,
+ SwContentNode* pCNd = SwNodes::GoPrevSection( &aIdx,
true, !bInReadOnly );
if( !pCNd )
{
@@ -107,7 +107,7 @@ bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
else if( fnPosRegion == fnMoveForward )
{
aIdx = *pNd;
- SwCntntNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx,
+ SwContentNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx,
true, !bInReadOnly );
if( !pCNd )
{
@@ -119,7 +119,7 @@ bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
else
{
aIdx = *pNd->EndOfSectionNode();
- SwCntntNode* pCNd = SwNodes::GoPrevSection( &aIdx,
+ SwContentNode* pCNd = SwNodes::GoPrevSection( &aIdx,
true, !bInReadOnly );
if( !pCNd )
{
@@ -145,7 +145,7 @@ bool GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
SwPosition* pPos = rCurCrsr.GetPoint();
bool bMoveBackward = fnPosRegion == fnMoveBackward;
- SwCntntNode* pCNd;
+ SwContentNode* pCNd;
if( bMoveBackward )
{
SwNodeIndex aIdx( *pNd->EndOfSectionNode() );
@@ -178,7 +178,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
bool bMoveBackward = fnPosRegion == fnMoveBackward;
do {
- SwCntntNode* pCNd;
+ SwContentNode* pCNd;
if( bMoveBackward ) // to the end of the section
{
SwNodeIndex aIdx( *pNd->EndOfSectionNode() );
@@ -205,7 +205,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
// try also the parent of this section
SwSection* pParent = pNd->GetSection().GetParent();
- pNd = pParent ? pParent->GetFmt()->GetSectionNode() : 0;
+ pNd = pParent ? pParent->GetFormat()->GetSectionNode() : 0;
} while( pNd );
return false;
}
@@ -217,13 +217,13 @@ bool SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion
(*fnWhichRegion)( *this, fnPosRegion, IsReadOnlyAvailable() ) &&
!IsSelOvr() &&
(GetPoint()->nNode.GetIndex() != m_pSavePos->nNode ||
- GetPoint()->nContent.GetIndex() != m_pSavePos->nCntnt);
+ GetPoint()->nContent.GetIndex() != m_pSavePos->nContent);
}
bool SwCrsrShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
{
SwCallLink aLk( *this ); // watch Crsr-Moves;call Link if needed
- bool bRet = !m_pTblCrsr && m_pCurCrsr->MoveRegion( fnWhichRegion, fnPosRegion );
+ bool bRet = !m_pTableCrsr && m_pCurCrsr->MoveRegion( fnWhichRegion, fnPosRegion );
if( bRet )
UpdateCrsr();
return bRet;
@@ -232,22 +232,22 @@ bool SwCrsrShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegi
bool SwCursor::GotoRegion( const OUString& rName )
{
bool bRet = false;
- const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( SwSectionFmts::size_type n = rFmts.size(); n; )
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
+ for( SwSectionFormats::size_type n = rFormats.size(); n; )
{
- const SwSectionFmt* pFmt = rFmts[ --n ];
+ const SwSectionFormat* pFormat = rFormats[ --n ];
const SwNodeIndex* pIdx = 0;
const SwSection* pSect;
- if( 0 != ( pSect = pFmt->GetSection() ) &&
+ if( 0 != ( pSect = pFormat->GetSection() ) &&
pSect->GetSectionName() == rName &&
- 0 != ( pIdx = pFmt->GetCntnt().GetCntntIdx() ) &&
+ 0 != ( pIdx = pFormat->GetContent().GetContentIdx() ) &&
pIdx->GetNode().GetNodes().IsDocNodes() )
{
// area in normal nodes array
SwCrsrSaveState aSaveState( *this );
GetPoint()->nNode = *pIdx;
- Move( fnMoveForward, fnGoCntnt );
+ Move( fnMoveForward, fnGoContent );
bRet = !IsSelOvr();
}
}
@@ -257,7 +257,7 @@ bool SwCursor::GotoRegion( const OUString& rName )
bool SwCrsrShell::GotoRegion( const OUString& rName )
{
SwCallLink aLk( *this ); // watch Crsr-Moves;call Link if needed
- bool bRet = !m_pTblCrsr && m_pCurCrsr->GotoRegion( rName );
+ bool bRet = !m_pTableCrsr && m_pCurCrsr->GotoRegion( rName );
if( bRet )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
SwCrsrShell::READONLY );
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 33d29140a431..6c7ae407b910 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -44,11 +44,11 @@
bool SwCrsrShell::GoNextCell( bool bAppendLine )
{
bool bRet = false;
- const SwTableNode* pTblNd = 0;
+ const SwTableNode* pTableNd = 0;
- if( IsTableMode() || 0 != ( pTblNd = IsCrsrInTbl() ))
+ if( IsTableMode() || 0 != ( pTableNd = IsCrsrInTable() ))
{
- SwCursor* pCrsr = m_pTblCrsr ? m_pTblCrsr : m_pCurCrsr;
+ SwCursor* pCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr;
SwCallLink aLk( *this ); // watch Crsr-Moves
bRet = true;
@@ -59,13 +59,13 @@ bool SwCrsrShell::GoNextCell( bool bAppendLine )
if ( pCrsr->GetCrsrRowSpanOffset() )
{
- pTableBox = pTableBoxStartNode->GetTblBox();
+ pTableBox = pTableBoxStartNode->GetTableBox();
if ( pTableBox->getRowSpan() > 1 )
{
- if ( !pTblNd )
- pTblNd = IsCrsrInTbl();
- assert (pTblNd);
- pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(),
+ if ( !pTableNd )
+ pTableNd = IsCrsrInTable();
+ assert (pTableNd);
+ pTableBox = & pTableBox->FindEndOfRowSpan( pTableNd->GetTable(),
(sal_uInt16)(pTableBox->getRowSpan() + pCrsr->GetCrsrRowSpanOffset() ) );
pTableBoxStartNode = pTableBox->GetSttNd();
}
@@ -79,11 +79,11 @@ bool SwCrsrShell::GoNextCell( bool bAppendLine )
{
if( pCrsr->HasMark() || !bAppendLine )
bRet = false;
- else if (pTblNd)
+ else if (pTableNd)
{
// if there is no list anymore then create new one
if ( !pTableBox )
- pTableBox = pTblNd->GetTable().GetTblBox(
+ pTableBox = pTableNd->GetTable().GetTableBox(
pCrsr->GetPoint()->nNode.GetNode().
StartOfSectionIndex() );
@@ -105,9 +105,9 @@ bool SwCrsrShell::GoNextCell( bool bAppendLine )
bool SwCrsrShell::GoPrevCell()
{
bool bRet = false;
- if( IsTableMode() || IsCrsrInTbl() )
+ if( IsTableMode() || IsCrsrInTable() )
{
- SwCursor* pCrsr = m_pTblCrsr ? m_pTblCrsr : m_pCurCrsr;
+ SwCursor* pCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr;
SwCallLink aLk( *this ); // watch Crsr-Moves
bRet = pCrsr->GoPrevCell();
if( bRet )
@@ -128,7 +128,7 @@ static const SwFrm* lcl_FindMostUpperCellFrm( const SwFrm* pFrm )
return pFrm;
}
-bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
+bool SwCrsrShell::_SelTableRowOrCol( bool bRow, bool bRowSimple )
{
// check if the current cursor's SPoint/Mark are in a table
SwFrm *pFrm = GetCurrFrm();
@@ -146,15 +146,15 @@ bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
// search box based on layout
SwSelBoxes aBoxes;
- SwTblSearchType eType = bRow ? nsSwTblSearchType::TBLSEARCH_ROW : nsSwTblSearchType::TBLSEARCH_COL;
+ SwTableSearchType eType = bRow ? nsSwTableSearchType::TBLSEARCH_ROW : nsSwTableSearchType::TBLSEARCH_COL;
const bool bCheckProtected = !IsReadOnlyAvailable();
if( bCheckProtected )
- eType = (SwTblSearchType)(eType | nsSwTblSearchType::TBLSEARCH_PROTECT);
+ eType = (SwTableSearchType)(eType | nsSwTableSearchType::TBLSEARCH_PROTECT);
if ( !bRowSimple )
{
- GetTblSel( *this, aBoxes, eType );
+ GetTableSel( *this, aBoxes, eType );
if( aBoxes.empty() )
return false;
@@ -178,7 +178,7 @@ bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
{
const SwShellCrsr *pCrsr = _GetCrsr();
const SwFrm* pStartFrm = pFrm;
- const SwCntntNode *pCNd = pCrsr->GetCntntNode( false );
+ const SwContentNode *pCNd = pCrsr->GetContentNode( false );
const SwFrm* pEndFrm = pCNd ? pCNd->getLayoutFrm( GetLayout(), &pCrsr->GetMkPos() ) : 0;
if ( bRow )
@@ -194,13 +194,13 @@ bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
// If we select upwards it is sufficient to set pStt and pEnd
// to the first resp. last box of the selection obtained from
- // GetTblSel. However, selecting downwards requires the frames
+ // GetTableSel. However, selecting downwards requires the frames
// located at the corners of the selection. This does not work
// for column selections in vertical tables:
const bool bSelectUp = ( bVert && !bRow ) ||
*pCrsr->GetPoint() <= *pCrsr->GetMark();
SwCellFrms aCells;
- GetTblSel( static_cast<const SwCellFrm*>(pStartFrm),
+ GetTableSel( static_cast<const SwCellFrm*>(pStartFrm),
static_cast<const SwCellFrm*>(pEndFrm),
aBoxes, bSelectUp ? 0 : &aCells, eType );
@@ -222,26 +222,26 @@ bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
}
// if no table cursor exists, create one
- if( !m_pTblCrsr )
+ if( !m_pTableCrsr )
{
- m_pTblCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() );
+ m_pTableCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() );
m_pCurCrsr->DeleteMark();
m_pCurCrsr->SwSelPaintRects::Hide();
}
- m_pTblCrsr->DeleteMark();
+ m_pTableCrsr->DeleteMark();
// set start and end of a column
- m_pTblCrsr->GetPoint()->nNode = *pEnd->GetSttNd();
- m_pTblCrsr->Move( fnMoveForward, fnGoCntnt );
- m_pTblCrsr->SetMark();
- m_pTblCrsr->GetPoint()->nNode = *pStt->GetSttNd()->EndOfSectionNode();
- m_pTblCrsr->Move( fnMoveBackward, fnGoCntnt );
+ m_pTableCrsr->GetPoint()->nNode = *pEnd->GetSttNd();
+ m_pTableCrsr->Move( fnMoveForward, fnGoContent );
+ m_pTableCrsr->SetMark();
+ m_pTableCrsr->GetPoint()->nNode = *pStt->GetSttNd()->EndOfSectionNode();
+ m_pTableCrsr->Move( fnMoveBackward, fnGoContent );
// set PtPos 'close' to the reference table, otherwise we might get problems
// with the repeated headlines check in UpdateCrsr():
if ( !bRow )
- m_pTblCrsr->GetPtPos() = pMasterTabFrm->IsVertical()
+ m_pTableCrsr->GetPtPos() = pMasterTabFrm->IsVertical()
? pMasterTabFrm->Frm().TopRight()
: pMasterTabFrm->Frm().TopLeft();
@@ -249,40 +249,40 @@ bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
return true;
}
-bool SwCrsrShell::SelTbl()
+bool SwCrsrShell::SelTable()
{
// check if the current cursor's SPoint/Mark are in a table
SwFrm *pFrm = GetCurrFrm();
if( !pFrm->IsInTab() )
return false;
- const SwTabFrm *pTblFrm = pFrm->ImplFindTabFrm();
- const SwTabFrm* pMasterTabFrm = pTblFrm->IsFollow() ? pTblFrm->FindMaster( true ) : pTblFrm;
- const SwTableNode* pTblNd = pTblFrm->GetTable()->GetTableNode();
+ const SwTabFrm *pTableFrm = pFrm->ImplFindTabFrm();
+ const SwTabFrm* pMasterTabFrm = pTableFrm->IsFollow() ? pTableFrm->FindMaster( true ) : pTableFrm;
+ const SwTableNode* pTableNd = pTableFrm->GetTable()->GetTableNode();
SET_CURR_SHELL( this );
- if( !m_pTblCrsr )
+ if( !m_pTableCrsr )
{
- m_pTblCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() );
+ m_pTableCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() );
m_pCurCrsr->DeleteMark();
m_pCurCrsr->SwSelPaintRects::Hide();
}
- m_pTblCrsr->DeleteMark();
- m_pTblCrsr->GetPoint()->nNode = *pTblNd;
- m_pTblCrsr->Move( fnMoveForward, fnGoCntnt );
- m_pTblCrsr->SetMark();
+ m_pTableCrsr->DeleteMark();
+ m_pTableCrsr->GetPoint()->nNode = *pTableNd;
+ m_pTableCrsr->Move( fnMoveForward, fnGoContent );
+ m_pTableCrsr->SetMark();
// set MkPos 'close' to the master table, otherwise we might get problems
// with the repeated headlines check in UpdateCrsr():
- m_pTblCrsr->GetMkPos() = pMasterTabFrm->IsVertical() ? pMasterTabFrm->Frm().TopRight() : pMasterTabFrm->Frm().TopLeft();
- m_pTblCrsr->GetPoint()->nNode = *pTblNd->EndOfSectionNode();
- m_pTblCrsr->Move( fnMoveBackward, fnGoCntnt );
+ m_pTableCrsr->GetMkPos() = pMasterTabFrm->IsVertical() ? pMasterTabFrm->Frm().TopRight() : pMasterTabFrm->Frm().TopLeft();
+ m_pTableCrsr->GetPoint()->nNode = *pTableNd->EndOfSectionNode();
+ m_pTableCrsr->Move( fnMoveBackward, fnGoContent );
UpdateCrsr();
return true;
}
-bool SwCrsrShell::SelTblBox()
+bool SwCrsrShell::SelTableBox()
{
// if we're in a table, create a table cursor, and select the cell
// that the current cursor's point resides in
@@ -305,26 +305,26 @@ bool SwCrsrShell::SelTblBox()
SET_CURR_SHELL( this );
// create a table cursor, if there isn't one already
- if( !m_pTblCrsr )
+ if( !m_pTableCrsr )
{
- m_pTblCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() );
+ m_pTableCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() );
m_pCurCrsr->DeleteMark();
m_pCurCrsr->SwSelPaintRects::Hide();
}
- // select the complete box with our shiny new m_pTblCrsr
+ // select the complete box with our shiny new m_pTableCrsr
// 1. delete mark, and move point to first content node in box
- m_pTblCrsr->DeleteMark();
- *(m_pTblCrsr->GetPoint()) = SwPosition( *pStartNode );
- m_pTblCrsr->Move( fnMoveForward, fnGoNode );
+ m_pTableCrsr->DeleteMark();
+ *(m_pTableCrsr->GetPoint()) = SwPosition( *pStartNode );
+ m_pTableCrsr->Move( fnMoveForward, fnGoNode );
// 2. set mark, and move point to last content node in box
- m_pTblCrsr->SetMark();
- *(m_pTblCrsr->GetPoint()) = SwPosition( *(pStartNode->EndOfSectionNode()) );
- m_pTblCrsr->Move( fnMoveBackward, fnGoNode );
+ m_pTableCrsr->SetMark();
+ *(m_pTableCrsr->GetPoint()) = SwPosition( *(pStartNode->EndOfSectionNode()) );
+ m_pTableCrsr->Move( fnMoveBackward, fnGoNode );
// 3. exchange
- m_pTblCrsr->Exchange();
+ m_pTableCrsr->Exchange();
// with some luck, UpdateCrsr() will now update everything that
// needs updating
@@ -348,18 +348,18 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly )
SwNodeIndex aTmp( rIdx, 2 ); // TableNode + StartNode
// the resulting cell should be in that table:
- const SwTableNode* pTblNd = rIdx.GetNode().GetTableNode();
+ const SwTableNode* pTableNd = rIdx.GetNode().GetTableNode();
- if ( !pTblNd )
+ if ( !pTableNd )
{
OSL_FAIL( "lcl_FindNextCell not celled with table start node!" );
return false;
}
- const SwNode* pTableEndNode = pTblNd->EndOfSectionNode();
+ const SwNode* pTableEndNode = pTableNd->EndOfSectionNode();
SwNodes& rNds = aTmp.GetNode().GetNodes();
- SwCntntNode* pCNd = aTmp.GetNode().GetCntntNode();
+ SwContentNode* pCNd = aTmp.GetNode().GetContentNode();
// no content node => go to next content node
if( !pCNd )
@@ -369,9 +369,9 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly )
if ( !pCNd )
return false;
- SwCntntFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
+ SwContentFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
- if ( 0 == pFrm || pCNd->FindTableNode() != pTblNd ||
+ if ( 0 == pFrm || pCNd->FindTableNode() != pTableNd ||
(!bInReadOnly && pFrm->IsProtected() ) )
{
// we are not located inside a 'valid' cell. We have to continue searching...
@@ -392,7 +392,7 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly )
return false;
// ok, get the next content node:
- pCNd = aTmp.GetNode().GetCntntNode();
+ pCNd = aTmp.GetNode().GetContentNode();
if( 0 == pCNd )
pCNd = rNds.GoNext( &aTmp );
@@ -403,7 +403,7 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly )
// check if we have found a suitable table cell:
pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
- if ( 0 != pFrm && pCNd->FindTableNode() == pTblNd &&
+ if ( 0 != pFrm && pCNd->FindTableNode() == pTableNd &&
(bInReadOnly || !pFrm->IsProtected() ) )
{
// finally, we have found a suitable table cell => set index and return
@@ -425,15 +425,15 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly )
SwNodeIndex aTmp( rIdx, -2 ); // TableNode + EndNode
const SwNode* pTableEndNode = &rIdx.GetNode();
- const SwTableNode* pTblNd = pTableEndNode->StartOfSectionNode()->GetTableNode();
+ const SwTableNode* pTableNd = pTableEndNode->StartOfSectionNode()->GetTableNode();
- if ( !pTblNd )
+ if ( !pTableNd )
{
OSL_FAIL( "lcl_FindPrevCell not celled with table start node!" );
return false;
}
- SwCntntNode* pCNd = aTmp.GetNode().GetCntntNode();
+ SwContentNode* pCNd = aTmp.GetNode().GetContentNode();
if( !pCNd )
pCNd = SwNodes::GoPrevious( &aTmp );
@@ -441,9 +441,9 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly )
if ( !pCNd )
return false;
- SwCntntFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
+ SwContentFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
- if( 0 == pFrm || pCNd->FindTableNode() != pTblNd ||
+ if( 0 == pFrm || pCNd->FindTableNode() != pTableNd ||
(!bInReadOnly && pFrm->IsProtected() ))
{
// skip before current section
@@ -452,10 +452,10 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly )
{
SwNode* pNd = &aTmp.GetNode();
- if( pNd == pTblNd || pNd->GetIndex() < pTblNd->GetIndex() )
+ if( pNd == pTableNd || pNd->GetIndex() < pTableNd->GetIndex() )
return false;
- pCNd = aTmp.GetNode().GetCntntNode();
+ pCNd = aTmp.GetNode().GetContentNode();
if( 0 == pCNd )
pCNd = SwNodes::GoPrevious( &aTmp );
@@ -464,7 +464,7 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly )
pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
- if( 0 != pFrm && pCNd->FindTableNode() == pTblNd &&
+ if( 0 != pFrm && pCNd->FindTableNode() == pTableNd &&
(bInReadOnly || !pFrm->IsProtected() ) )
{
rIdx = *pCNd;
@@ -477,40 +477,40 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly )
return true;
}
-bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
+bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTable,
bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
- SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
- if( pTblNd )
+ SwTableNode* pTableNd = aIdx.GetNode().FindTableNode();
+ if( pTableNd )
{
// #i26532#: If we are inside a table, we may not go backward to the
// table start node, because we would miss any tables inside this table.
- SwTableNode* pInnerTblNd = 0;
+ SwTableNode* pInnerTableNd = 0;
SwNodeIndex aTmpIdx( aIdx );
while( aTmpIdx.GetIndex() &&
- 0 == ( pInnerTblNd = aTmpIdx.GetNode().StartOfSectionNode()->GetTableNode()) )
+ 0 == ( pInnerTableNd = aTmpIdx.GetNode().StartOfSectionNode()->GetTableNode()) )
--aTmpIdx;
- if( pInnerTblNd == pTblNd )
- aIdx.Assign( *pTblNd, - 1 );
+ if( pInnerTableNd == pTableNd )
+ aIdx.Assign( *pTableNd, - 1 );
}
do {
while( aIdx.GetIndex() &&
- 0 == ( pTblNd = aIdx.GetNode().StartOfSectionNode()->GetTableNode()) )
+ 0 == ( pTableNd = aIdx.GetNode().StartOfSectionNode()->GetTableNode()) )
--aIdx;
- if( pTblNd ) // any further table node?
+ if( pTableNd ) // any further table node?
{
- if( fnPosTbl == fnMoveForward ) // at the beginning?
+ if( fnPosTable == fnMoveForward ) // at the beginning?
{
aIdx = *aIdx.GetNode().StartOfSectionNode();
if( !lcl_FindNextCell( aIdx, bInReadOnly ))
{
// skip table
- aIdx.Assign( *pTblNd, -1 );
+ aIdx.Assign( *pTableNd, -1 );
continue;
}
}
@@ -520,48 +520,48 @@ bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
if( !lcl_FindNextCell( aIdx, bInReadOnly ))
{
// skip table
- aIdx.Assign( *pTblNd, -1 );
+ aIdx.Assign( *pTableNd, -1 );
continue;
}
}
- SwTxtNode* pTxtNode = aIdx.GetNode().GetTxtNode();
- if ( pTxtNode )
+ SwTextNode* pTextNode = aIdx.GetNode().GetTextNode();
+ if ( pTextNode )
{
- rCurCrsr.GetPoint()->nNode = *pTxtNode;
- rCurCrsr.GetPoint()->nContent.Assign( pTxtNode, fnPosTbl == fnMoveBackward ?
- pTxtNode->Len() :
+ rCurCrsr.GetPoint()->nNode = *pTextNode;
+ rCurCrsr.GetPoint()->nContent.Assign( pTextNode, fnPosTable == fnMoveBackward ?
+ pTextNode->Len() :
0 );
}
return true;
}
- } while( pTblNd );
+ } while( pTableNd );
return false;
}
-bool GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
+bool GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTable,
bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
- SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
+ SwTableNode* pTableNd = aIdx.GetNode().FindTableNode();
- if( pTblNd )
- aIdx.Assign( *pTblNd->EndOfSectionNode(), 1 );
+ if( pTableNd )
+ aIdx.Assign( *pTableNd->EndOfSectionNode(), 1 );
sal_uLong nLastNd = rCurCrsr.GetDoc()->GetNodes().Count() - 1;
do {
while( aIdx.GetIndex() < nLastNd &&
- 0 == ( pTblNd = aIdx.GetNode().GetTableNode()) )
+ 0 == ( pTableNd = aIdx.GetNode().GetTableNode()) )
++aIdx;
- if( pTblNd ) // any further table node?
+ if( pTableNd ) // any further table node?
{
- if( fnPosTbl == fnMoveForward ) // at the beginning?
+ if( fnPosTable == fnMoveForward ) // at the beginning?
{
if( !lcl_FindNextCell( aIdx, bInReadOnly ))
{
// skip table
- aIdx.Assign( *pTblNd->EndOfSectionNode(), + 1 );
+ aIdx.Assign( *pTableNd->EndOfSectionNode(), + 1 );
continue;
}
}
@@ -572,93 +572,93 @@ bool GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
if( !lcl_FindNextCell( aIdx, bInReadOnly ))
{
// skip table
- aIdx.Assign( *pTblNd->EndOfSectionNode(), + 1 );
+ aIdx.Assign( *pTableNd->EndOfSectionNode(), + 1 );
continue;
}
}
- SwTxtNode* pTxtNode = aIdx.GetNode().GetTxtNode();
- if ( pTxtNode )
+ SwTextNode* pTextNode = aIdx.GetNode().GetTextNode();
+ if ( pTextNode )
{
- rCurCrsr.GetPoint()->nNode = *pTxtNode;
- rCurCrsr.GetPoint()->nContent.Assign( pTxtNode, fnPosTbl == fnMoveBackward ?
- pTxtNode->Len() :
+ rCurCrsr.GetPoint()->nNode = *pTextNode;
+ rCurCrsr.GetPoint()->nContent.Assign( pTextNode, fnPosTable == fnMoveBackward ?
+ pTextNode->Len() :
0 );
}
return true;
}
- } while( pTblNd );
+ } while( pTableNd );
return false;
}
-bool GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
+bool GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTable,
bool bInReadOnly )
{
- SwTableNode* pTblNd = rCurCrsr.GetPoint()->nNode.GetNode().FindTableNode();
- if( !pTblNd )
+ SwTableNode* pTableNd = rCurCrsr.GetPoint()->nNode.GetNode().FindTableNode();
+ if( !pTableNd )
return false;
- SwTxtNode* pTxtNode = 0;
- if( fnPosTbl == fnMoveBackward ) // to the end of the table
+ SwTextNode* pTextNode = 0;
+ if( fnPosTable == fnMoveBackward ) // to the end of the table
{
- SwNodeIndex aIdx( *pTblNd->EndOfSectionNode() );
+ SwNodeIndex aIdx( *pTableNd->EndOfSectionNode() );
if( !lcl_FindPrevCell( aIdx, bInReadOnly ))
return false;
- pTxtNode = aIdx.GetNode().GetTxtNode();
+ pTextNode = aIdx.GetNode().GetTextNode();
}
else
{
- SwNodeIndex aIdx( *pTblNd );
+ SwNodeIndex aIdx( *pTableNd );
if( !lcl_FindNextCell( aIdx, bInReadOnly ))
return false;
- pTxtNode = aIdx.GetNode().GetTxtNode();
+ pTextNode = aIdx.GetNode().GetTextNode();
}
- if ( pTxtNode )
+ if ( pTextNode )
{
- rCurCrsr.GetPoint()->nNode = *pTxtNode;
- rCurCrsr.GetPoint()->nContent.Assign( pTxtNode, fnPosTbl == fnMoveBackward ?
- pTxtNode->Len() :
+ rCurCrsr.GetPoint()->nNode = *pTextNode;
+ rCurCrsr.GetPoint()->nContent.Assign( pTextNode, fnPosTable == fnMoveBackward ?
+ pTextNode->Len() :
0 );
}
return true;
}
-bool SwCursor::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
+bool SwCursor::MoveTable( SwWhichTable fnWhichTable, SwPosTable fnPosTable )
{
bool bRet = false;
- SwTableCursor* m_pTblCrsr = dynamic_cast<SwTableCursor*>(this);
+ SwTableCursor* m_pTableCrsr = dynamic_cast<SwTableCursor*>(this);
- if( m_pTblCrsr || !HasMark() )
+ if( m_pTableCrsr || !HasMark() )
{
SwCrsrSaveState aSaveState( *this );
- bRet = (*fnWhichTbl)( *this, fnPosTbl, IsReadOnlyAvailable() ) &&
+ bRet = (*fnWhichTable)( *this, fnPosTable, IsReadOnlyAvailable() ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE );
}
return bRet;
}
-bool SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
+bool SwCrsrShell::MoveTable( SwWhichTable fnWhichTable, SwPosTable fnPosTable )
{
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
- SwShellCrsr* pCrsr = m_pTblCrsr ? m_pTblCrsr : m_pCurCrsr;
+ SwShellCrsr* pCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr;
bool bCheckPos;
bool bRet;
sal_uLong nPtNd = 0;
sal_Int32 nPtCnt = 0;
- if ( !m_pTblCrsr && m_pCurCrsr->HasMark() )
+ if ( !m_pTableCrsr && m_pCurCrsr->HasMark() )
{
// switch to table mode
- m_pTblCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() );
+ m_pTableCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() );
m_pCurCrsr->DeleteMark();
m_pCurCrsr->SwSelPaintRects::Hide();
- m_pTblCrsr->SetMark();
- pCrsr = m_pTblCrsr;
+ m_pTableCrsr->SetMark();
+ pCrsr = m_pTableCrsr;
bCheckPos = false;
}
else
@@ -668,7 +668,7 @@ bool SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
nPtCnt = pCrsr->GetPoint()->nContent.GetIndex();
}
- bRet = pCrsr->MoveTable( fnWhichTbl, fnPosTbl );
+ bRet = pCrsr->MoveTable( fnWhichTable, fnPosTable );
if( bRet )
{
@@ -685,7 +685,7 @@ bool SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
return bRet;
}
-bool SwCrsrShell::IsTblComplexForChart()
+bool SwCrsrShell::IsTableComplexForChart()
{
bool bRet = false;
@@ -696,9 +696,9 @@ bool SwCrsrShell::IsTblComplexForChart()
{
// in a table; check if table or section is balanced
OUString sSel;
- if( m_pTblCrsr )
+ if( m_pTableCrsr )
sSel = GetBoxNms();
- bRet = pTNd->GetTable().IsTblComplexForChart( sSel );
+ bRet = pTNd->GetTable().IsTableComplexForChart( sSel );
}
EndAction();
@@ -713,7 +713,7 @@ OUString SwCrsrShell::GetBoxNms() const
if( IsTableMode() )
{
- SwCntntNode *pCNd = m_pTblCrsr->Start()->nNode.GetNode().GetCntntNode();
+ SwContentNode *pCNd = m_pTableCrsr->Start()->nNode.GetNode().GetContentNode();
pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : 0;
if( !pFrm )
return sNm;
@@ -729,17 +729,17 @@ OUString SwCrsrShell::GetBoxNms() const
sNm = static_cast<SwCellFrm*>(pFrm)->GetTabBox()->GetName();
sNm += ":";
- pPos = m_pTblCrsr->End();
+ pPos = m_pTableCrsr->End();
}
else
{
- const SwTableNode* pTblNd = IsCrsrInTbl();
- if( !pTblNd )
+ const SwTableNode* pTableNd = IsCrsrInTable();
+ if( !pTableNd )
return sNm;
pPos = GetCrsr()->GetPoint();
}
- SwCntntNode* pCNd = pPos->nNode.GetNode().GetCntntNode();
+ SwContentNode* pCNd = pPos->nNode.GetNode().GetContentNode();
pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : 0;
if( pFrm )
@@ -757,7 +757,7 @@ OUString SwCrsrShell::GetBoxNms() const
bool SwCrsrShell::GotoTable( const OUString& rName )
{
SwCallLink aLk( *this ); // watch Crsr-Moves
- bool bRet = !m_pTblCrsr && m_pCurCrsr->GotoTable( rName );
+ bool bRet = !m_pTableCrsr && m_pCurCrsr->GotoTable( rName );
if( bRet )
{
m_pCurCrsr->GetPtPos() = Point();
@@ -767,9 +767,9 @@ bool SwCrsrShell::GotoTable( const OUString& rName )
return bRet;
}
-bool SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
+bool SwCrsrShell::CheckTableBoxContent( const SwPosition* pPos )
{
- if( !m_pBoxIdx || !m_pBoxPtr || IsSelTblCells() || !IsAutoUpdateCells() )
+ if( !m_pBoxIdx || !m_pBoxPtr || IsSelTableCells() || !IsAutoUpdateCells() )
return false;
// check if box content is consistent with given box format, reset if not
@@ -782,13 +782,13 @@ bool SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
0 != ( pSttNd = m_pBoxIdx->GetNode().GetStartNode() ) &&
SwTableBoxStartNode == pSttNd->GetStartNodeType() &&
m_pBoxPtr == pSttNd->FindTableNode()->GetTable().
- GetTblBox( m_pBoxIdx->GetIndex() ) )
+ GetTableBox( m_pBoxIdx->GetIndex() ) )
pChkBox = m_pBoxPtr;
}
else if( 0 != ( pSttNd = pPos->nNode.GetNode().
FindSttNodeByType( SwTableBoxStartNode )) )
{
- pChkBox = pSttNd->FindTableNode()->GetTable().GetTblBox( pSttNd->GetIndex() );
+ pChkBox = pSttNd->FindTableNode()->GetTable().GetTableBox( pSttNd->GetIndex() );
}
// box has more than one paragraph
@@ -797,7 +797,7 @@ bool SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
// destroy pointer before next action starts
if( !pPos && !pChkBox )
- ClearTblBoxCntnt();
+ ClearTableBoxContent();
// cursor not anymore in this section?
if( pChkBox && !pPos &&
@@ -809,11 +809,11 @@ bool SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
// could not restore the content properly.
if( pChkBox )
{
- const SwTxtNode* pNd = GetDoc()->GetNodes()[
- pSttNd->GetIndex() + 1 ]->GetTxtNode();
+ const SwTextNode* pNd = GetDoc()->GetNodes()[
+ pSttNd->GetIndex() + 1 ]->GetTextNode();
if( !pNd ||
- ( pNd->GetTxt() == SwViewShell::GetShellRes()->aCalc_Error &&
- SfxItemState::SET == pChkBox->GetFrmFmt()->
+ ( pNd->GetText() == SwViewShell::GetShellRes()->aCalc_Error &&
+ SfxItemState::SET == pChkBox->GetFrameFormat()->
GetItemState( RES_BOXATR_FORMULA )) )
pChkBox = 0;
}
@@ -821,18 +821,18 @@ bool SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
if( pChkBox )
{
// destroy pointer before next action starts
- ClearTblBoxCntnt();
+ ClearTableBoxContent();
StartAction();
- GetDoc()->ChkBoxNumFmt( *pChkBox, true );
+ GetDoc()->ChkBoxNumFormat( *pChkBox, true );
EndAction();
}
return 0 != pChkBox;
}
-void SwCrsrShell::SaveTblBoxCntnt( const SwPosition* pPos )
+void SwCrsrShell::SaveTableBoxContent( const SwPosition* pPos )
{
- if( IsSelTblCells() || !IsAutoUpdateCells() )
+ if( IsSelTableCells() || !IsAutoUpdateCells() )
return ;
if( !pPos )
@@ -855,12 +855,12 @@ void SwCrsrShell::SaveTblBoxCntnt( const SwPosition* pPos )
{
// check m_pBoxIdx
SwPosition aPos( *m_pBoxIdx );
- CheckTblBoxCntnt( &aPos );
+ CheckTableBoxContent( &aPos );
}
if( pSttNd )
{
- m_pBoxPtr = pSttNd->FindTableNode()->GetTable().GetTblBox( pSttNd->GetIndex() );
+ m_pBoxPtr = pSttNd->FindTableNode()->GetTable().GetTableBox( pSttNd->GetIndex() );
if( m_pBoxIdx )
*m_pBoxIdx = *pSttNd;
@@ -869,19 +869,19 @@ void SwCrsrShell::SaveTblBoxCntnt( const SwPosition* pPos )
}
}
-void SwCrsrShell::ClearTblBoxCntnt()
+void SwCrsrShell::ClearTableBoxContent()
{
delete m_pBoxIdx, m_pBoxIdx = 0;
m_pBoxPtr = 0;
}
-bool SwCrsrShell::EndAllTblBoxEdit()
+bool SwCrsrShell::EndAllTableBoxEdit()
{
bool bRet = false;
for(SwViewShell& rSh : GetRingContainer())
{
if( rSh.IsA( TYPE( SwCrsrShell ) ) )
- bRet |= static_cast<SwCrsrShell*>(&rSh)->CheckTblBoxCntnt(
+ bRet |= static_cast<SwCrsrShell*>(&rSh)->CheckTableBoxContent(
static_cast<SwCrsrShell*>(&rSh)->m_pCurCrsr->GetPoint() );
}
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 991c5548612b..1366935e485c 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -68,16 +68,16 @@ MapMode* SwSelPaintRects::s_pMapMode = 0;
SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell )
: m_pCrsrShell( pCShell )
{
- pCShell->GetWin()->SetCursor( &m_aTxtCrsr );
- m_bIsVisible = m_aTxtCrsr.IsVisible();
+ pCShell->GetWin()->SetCursor( &m_aTextCrsr );
+ m_bIsVisible = m_aTextCrsr.IsVisible();
m_bIsDragCrsr = false;
- m_aTxtCrsr.SetWidth( 0 );
+ m_aTextCrsr.SetWidth( 0 );
}
SwVisCrsr::~SwVisCrsr()
{
- if( m_bIsVisible && m_aTxtCrsr.IsVisible() )
- m_aTxtCrsr.Hide();
+ if( m_bIsVisible && m_aTextCrsr.IsVisible() )
+ m_aTextCrsr.Hide();
m_pCrsrShell->GetWin()->SetCursor( 0 );
}
@@ -100,8 +100,8 @@ void SwVisCrsr::Hide()
{
m_bIsVisible = false;
- if( m_aTxtCrsr.IsVisible() ) // Shouldn't the flags be in effect?
- m_aTxtCrsr.Hide();
+ if( m_aTextCrsr.IsVisible() ) // Shouldn't the flags be in effect?
+ m_aTextCrsr.Hide();
}
}
@@ -112,7 +112,7 @@ void SwVisCrsr::_SetPosAndShow()
if( 0 > nTmpY )
{
nTmpY = -nTmpY;
- m_aTxtCrsr.SetOrientation( 900 );
+ m_aTextCrsr.SetOrientation( 900 );
aRect = SwRect( m_pCrsrShell->m_aCharRect.Pos(),
Size( m_pCrsrShell->m_aCharRect.Height(), nTmpY ) );
aRect.Pos().setX(aRect.Pos().getX() + m_pCrsrShell->m_aCrsrHeight.getX());
@@ -121,30 +121,30 @@ void SwVisCrsr::_SetPosAndShow()
}
else
{
- m_aTxtCrsr.SetOrientation( 0 );
+ m_aTextCrsr.SetOrientation( 0 );
aRect = SwRect( m_pCrsrShell->m_aCharRect.Pos(),
Size( m_pCrsrShell->m_aCharRect.Width(), nTmpY ) );
aRect.Pos().setY(aRect.Pos().getY() + m_pCrsrShell->m_aCrsrHeight.getX());
}
// check if cursor should show the current cursor bidi level
- m_aTxtCrsr.SetDirection( CursorDirection::NONE );
+ m_aTextCrsr.SetDirection( CursorDirection::NONE );
const SwCursor* pTmpCrsr = m_pCrsrShell->_GetCrsr();
if ( pTmpCrsr && !m_pCrsrShell->IsOverwriteCrsr() )
{
SwNode& rNode = pTmpCrsr->GetPoint()->nNode.GetNode();
- if( rNode.IsTxtNode() )
+ if( rNode.IsTextNode() )
{
- const SwTxtNode& rTNd = *rNode.GetTxtNode();
+ const SwTextNode& rTNd = *rNode.GetTextNode();
const SwFrm* pFrm = rTNd.getLayoutFrm( m_pCrsrShell->GetLayout(), 0, 0, false );
if ( pFrm )
{
- const SwScriptInfo* pSI = static_cast<const SwTxtFrm*>(pFrm)->GetScriptInfo();
+ const SwScriptInfo* pSI = static_cast<const SwTextFrm*>(pFrm)->GetScriptInfo();
// cursor level has to be shown
if ( pSI && pSI->CountDirChg() > 1 )
{
- m_aTxtCrsr.SetDirection(
+ m_aTextCrsr.SetDirection(
( pTmpCrsr->GetCrsrBidiLevel() % 2 ) ?
CursorDirection::RTL :
CursorDirection::LTR );
@@ -173,9 +173,9 @@ void SwVisCrsr::_SetPosAndShow()
m_pCrsrShell->IsSelection() )
aRect.Width( 0 );
- m_aTxtCrsr.SetSize( aRect.SSize() );
+ m_aTextCrsr.SetSize( aRect.SSize() );
- m_aTxtCrsr.SetPos( aRect.Pos() );
+ m_aTextCrsr.SetPos( aRect.Pos() );
if (m_pCrsrShell->isTiledRendering())
{
@@ -191,13 +191,13 @@ void SwVisCrsr::_SetPosAndShow()
!m_pCrsrShell->IsSelection() );
sal_uInt16 nStyle = m_bIsDragCrsr ? CURSOR_SHADOW : 0;
- if( nStyle != m_aTxtCrsr.GetStyle() )
+ if( nStyle != m_aTextCrsr.GetStyle() )
{
- m_aTxtCrsr.SetStyle( nStyle );
- m_aTxtCrsr.SetWindow( m_bIsDragCrsr ? m_pCrsrShell->GetWin() : 0 );
+ m_aTextCrsr.SetStyle( nStyle );
+ m_aTextCrsr.SetWindow( m_bIsDragCrsr ? m_pCrsrShell->GetWin() : 0 );
}
- m_aTxtCrsr.Show();
+ m_aTextCrsr.Show();
}
}
@@ -206,8 +206,8 @@ SwSelPaintRects::SwSelPaintRects( const SwCrsrShell& rCSh )
, m_pCursorShell( &rCSh )
#if HAVE_FEATURE_DESKTOP
, m_pCursorOverlay(nullptr)
- , m_bShowTxtInputFldOverlay(true)
- , m_pTxtInputFldOverlay(nullptr)
+ , m_bShowTextInputFieldOverlay(true)
+ , m_pTextInputFieldOverlay(nullptr)
#endif
{
}
@@ -227,13 +227,13 @@ void SwSelPaintRects::swapContent(SwSelPaintRects& rSwap)
setCursorOverlay(rSwap.getCursorOverlay());
rSwap.setCursorOverlay(pTempOverlay);
- const bool bTempShowTxtInputFldOverlay = m_bShowTxtInputFldOverlay;
- m_bShowTxtInputFldOverlay = rSwap.m_bShowTxtInputFldOverlay;
- rSwap.m_bShowTxtInputFldOverlay = bTempShowTxtInputFldOverlay;
+ const bool bTempShowTextInputFieldOverlay = m_bShowTextInputFieldOverlay;
+ m_bShowTextInputFieldOverlay = rSwap.m_bShowTextInputFieldOverlay;
+ rSwap.m_bShowTextInputFieldOverlay = bTempShowTextInputFieldOverlay;
- sw::overlay::OverlayRangesOutline* pTempTxtInputFldOverlay = m_pTxtInputFldOverlay;
- m_pTxtInputFldOverlay = rSwap.m_pTxtInputFldOverlay;
- rSwap.m_pTxtInputFldOverlay = pTempTxtInputFldOverlay;
+ sw::overlay::OverlayRangesOutline* pTempTextInputFieldOverlay = m_pTextInputFieldOverlay;
+ m_pTextInputFieldOverlay = rSwap.m_pTextInputFieldOverlay;
+ rSwap.m_pTextInputFieldOverlay = pTempTextInputFieldOverlay;
#endif
}
@@ -246,10 +246,10 @@ void SwSelPaintRects::Hide()
m_pCursorOverlay = nullptr;
}
- if (m_pTxtInputFldOverlay != nullptr)
+ if (m_pTextInputFieldOverlay != nullptr)
{
- delete m_pTxtInputFldOverlay;
- m_pTxtInputFldOverlay = nullptr;
+ delete m_pTextInputFieldOverlay;
+ m_pTextInputFieldOverlay = nullptr;
}
#endif
@@ -266,8 +266,8 @@ void SwSelPaintRects::Hide()
*/
static SwRect lcl_getLayoutRect(const Point& rPoint, const SwPosition& rPosition)
{
- const SwCntntNode* pNode = rPosition.nNode.GetNode().GetCntntNode();
- const SwCntntFrm* pFrm = pNode->getLayoutFrm(pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPoint, &rPosition);
+ const SwContentNode* pNode = rPosition.nNode.GetNode().GetContentNode();
+ const SwContentFrm* pFrm = pNode->getLayoutFrm(pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPoint, &rPosition);
SwRect aRect;
pFrm->GetCharRect(aRect, rPosition);
return aRect;
@@ -338,7 +338,7 @@ void SwSelPaintRects::Show()
}
}
- HighlightInputFld();
+ HighlightInputField();
#endif
// Tiled editing does not expose the draw and writer cursor, it just
@@ -384,42 +384,42 @@ void SwSelPaintRects::Show()
}
}
-void SwSelPaintRects::HighlightInputFld()
+void SwSelPaintRects::HighlightInputField()
{
- std::vector< basegfx::B2DRange > aInputFldRanges;
+ std::vector< basegfx::B2DRange > aInputFieldRanges;
- if (m_bShowTxtInputFldOverlay)
+ if (m_bShowTextInputFieldOverlay)
{
- SwTxtInputFld* pCurTxtInputFldAtCrsr =
- dynamic_cast<SwTxtInputFld*>(SwCrsrShell::GetTxtFldAtPos( GetShell()->GetCrsr()->Start(), false ));
- if ( pCurTxtInputFldAtCrsr != NULL )
+ SwTextInputField* pCurTextInputFieldAtCrsr =
+ dynamic_cast<SwTextInputField*>(SwCrsrShell::GetTextFieldAtPos( GetShell()->GetCrsr()->Start(), false ));
+ if ( pCurTextInputFieldAtCrsr != NULL )
{
- SwTxtNode* pTxtNode = pCurTxtInputFldAtCrsr->GetpTxtNode();
- ::boost::scoped_ptr<SwShellCrsr> pCrsrForInputTxtFld(
- new SwShellCrsr( *GetShell(), SwPosition( *pTxtNode, pCurTxtInputFldAtCrsr->GetStart() ) ) );
- pCrsrForInputTxtFld->SetMark();
- pCrsrForInputTxtFld->GetMark()->nNode = *pTxtNode;
- pCrsrForInputTxtFld->GetMark()->nContent.Assign( pTxtNode, *(pCurTxtInputFldAtCrsr->End()) );
-
- pCrsrForInputTxtFld->FillRects();
- SwRects* pRects = static_cast<SwRects*>(pCrsrForInputTxtFld.get());
+ SwTextNode* pTextNode = pCurTextInputFieldAtCrsr->GetpTextNode();
+ ::boost::scoped_ptr<SwShellCrsr> pCrsrForInputTextField(
+ new SwShellCrsr( *GetShell(), SwPosition( *pTextNode, pCurTextInputFieldAtCrsr->GetStart() ) ) );
+ pCrsrForInputTextField->SetMark();
+ pCrsrForInputTextField->GetMark()->nNode = *pTextNode;
+ pCrsrForInputTextField->GetMark()->nContent.Assign( pTextNode, *(pCurTextInputFieldAtCrsr->End()) );
+
+ pCrsrForInputTextField->FillRects();
+ SwRects* pRects = static_cast<SwRects*>(pCrsrForInputTextField.get());
for (size_t a(0); a < pRects->size(); ++a)
{
const SwRect aNextRect((*pRects)[a]);
const Rectangle aPntRect(aNextRect.SVRect());
- aInputFldRanges.push_back(basegfx::B2DRange(
+ aInputFieldRanges.push_back(basegfx::B2DRange(
aPntRect.Left(), aPntRect.Top(),
aPntRect.Right() + 1, aPntRect.Bottom() + 1));
}
}
}
- if ( aInputFldRanges.size() > 0 )
+ if ( aInputFieldRanges.size() > 0 )
{
- if (m_pTxtInputFldOverlay != nullptr)
+ if (m_pTextInputFieldOverlay != nullptr)
{
- m_pTxtInputFldOverlay->setRanges( aInputFldRanges );
+ m_pTextInputFieldOverlay->setRanges( aInputFieldRanges );
}
else
{
@@ -434,18 +434,18 @@ void SwSelPaintRects::HighlightInputFld()
Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor());
aHighlight.DecreaseLuminance( 128 );
- m_pTxtInputFldOverlay = new sw::overlay::OverlayRangesOutline(
- aHighlight, aInputFldRanges );
- xTargetOverlay->add( *m_pTxtInputFldOverlay );
+ m_pTextInputFieldOverlay = new sw::overlay::OverlayRangesOutline(
+ aHighlight, aInputFieldRanges );
+ xTargetOverlay->add( *m_pTextInputFieldOverlay );
}
}
}
else
{
- if (m_pTxtInputFldOverlay != nullptr)
+ if (m_pTextInputFieldOverlay != nullptr)
{
- delete m_pTxtInputFldOverlay;
- m_pTxtInputFldOverlay = nullptr;
+ delete m_pTextInputFieldOverlay;
+ m_pTextInputFieldOverlay = nullptr;
}
}
}
@@ -556,11 +556,11 @@ void SwShellCrsr::FillRects()
{
// calculate the new rectangles
if( HasMark() &&
- GetPoint()->nNode.GetNode().IsCntntNode() &&
- GetPoint()->nNode.GetNode().GetCntntNode()->getLayoutFrm( GetShell()->GetLayout() ) &&
+ GetPoint()->nNode.GetNode().IsContentNode() &&
+ GetPoint()->nNode.GetNode().GetContentNode()->getLayoutFrm( GetShell()->GetLayout() ) &&
(GetMark()->nNode == GetPoint()->nNode ||
- (GetMark()->nNode.GetNode().IsCntntNode() &&
- GetMark()->nNode.GetNode().GetCntntNode()->getLayoutFrm( GetShell()->GetLayout() ) ) ))
+ (GetMark()->nNode.GetNode().IsContentNode() &&
+ GetMark()->nNode.GetNode().GetContentNode()->getLayoutFrm( GetShell()->GetLayout() ) ) ))
GetShell()->GetLayout()->CalcFrmRects( *this );
}
@@ -642,9 +642,9 @@ short SwShellCrsr::MaxReplaceArived()
return nRet;
}
-void SwShellCrsr::SaveTblBoxCntnt( const SwPosition* pPos )
+void SwShellCrsr::SaveTableBoxContent( const SwPosition* pPos )
{
- const_cast<SwCrsrShell*>(GetShell())->SaveTblBoxCntnt( pPos );
+ const_cast<SwCrsrShell*>(GetShell())->SaveTableBoxContent( pPos );
}
bool SwShellCrsr::UpDown( bool bUp, sal_uInt16 nCnt )
@@ -696,9 +696,9 @@ short SwShellTableCrsr::MaxReplaceArived()
return SwShellCrsr::MaxReplaceArived();
}
-void SwShellTableCrsr::SaveTblBoxCntnt( const SwPosition* pPos )
+void SwShellTableCrsr::SaveTableBoxContent( const SwPosition* pPos )
{
- SwShellCrsr::SaveTblBoxCntnt( pPos );
+ SwShellCrsr::SaveTableBoxContent( pPos );
}
void SwShellTableCrsr::FillRects()
@@ -716,20 +716,20 @@ void SwShellTableCrsr::FillRects()
for (size_t n = 0; n < m_SelectedBoxes.size(); ++n)
{
const SwStartNode* pSttNd = m_SelectedBoxes[n]->GetSttNd();
- const SwTableNode* pSelTblNd = pSttNd->FindTableNode();
+ const SwTableNode* pSelTableNd = pSttNd->FindTableNode();
SwNodeIndex aIdx( *pSttNd );
- SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, true, false );
+ SwContentNode* pCNd = rNds.GoNextSection( &aIdx, true, false );
// table in table
// (see also lcl_FindTopLevelTable in unoobj2.cxx for a different
// version to do this)
- const SwTableNode* pCurTblNd = pCNd ? pCNd->FindTableNode() : NULL;
- while ( pSelTblNd != pCurTblNd && pCurTblNd )
+ const SwTableNode* pCurTableNd = pCNd ? pCNd->FindTableNode() : NULL;
+ while ( pSelTableNd != pCurTableNd && pCurTableNd )
{
- aIdx = pCurTblNd->EndOfSectionIndex();
+ aIdx = pCurTableNd->EndOfSectionIndex();
pCNd = rNds.GoNextSection( &aIdx, true, false );
- pCurTblNd = pCNd->FindTableNode();
+ pCurTableNd = pCNd->FindTableNode();
}
if( !pCNd )
@@ -780,7 +780,7 @@ bool SwShellTableCrsr::IsInside( const Point& rPt ) const
for (size_t n = 0; n < m_SelectedBoxes.size(); ++n)
{
SwNodeIndex aIdx( *m_SelectedBoxes[n]->GetSttNd() );
- SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, true, false );
+ SwContentNode* pCNd = rNds.GoNextSection( &aIdx, true, false );
if( !pCNd )
continue;