summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-18 12:14:29 +0200
committerNoel Grandin <noel@peralex.com>2014-06-24 11:34:21 +0200
commite2080e70fe8b085f18e868e46340454720fa94ca (patch)
tree4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /sw
parentf910280b8704ed9c289150a4ca3c8d60e15d0d97 (diff)
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/crsrsh.hxx2
-rw-r--r--sw/inc/dcontact.hxx4
-rw-r--r--sw/inc/pam.hxx8
-rw-r--r--sw/inc/txatbase.hxx6
-rw-r--r--sw/qa/core/uwriter.cxx42
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx6
-rw-r--r--sw/source/core/access/accpara.cxx12
-rw-r--r--sw/source/core/crsr/callnk.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx26
-rw-r--r--sw/source/core/crsr/crstrvl.cxx30
-rw-r--r--sw/source/core/crsr/findattr.cxx18
-rw-r--r--sw/source/core/crsr/findtxt.cxx12
-rw-r--r--sw/source/core/crsr/pam.cxx6
-rw-r--r--sw/source/core/crsr/swcrsr.cxx34
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx12
-rw-r--r--sw/source/core/crsr/trvlreg.cxx8
-rw-r--r--sw/source/core/crsr/trvltbl.cxx2
-rw-r--r--sw/source/core/crsr/viscrs.cxx2
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx2
-rw-r--r--sw/source/core/doc/doc.cxx16
-rw-r--r--sw/source/core/doc/docedt.cxx16
-rw-r--r--sw/source/core/doc/docfld.cxx10
-rw-r--r--sw/source/core/doc/docfmt.cxx4
-rw-r--r--sw/source/core/doc/docftn.cxx8
-rw-r--r--sw/source/core/doc/doclay.cxx2
-rw-r--r--sw/source/core/doc/docruby.cxx10
-rw-r--r--sw/source/core/doc/doctxm.cxx16
-rw-r--r--sw/source/core/doc/ftnidx.cxx2
-rw-r--r--sw/source/core/doc/textboxhelper.cxx2
-rw-r--r--sw/source/core/doc/visiturl.cxx2
-rw-r--r--sw/source/core/docnode/ndcopy.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx6
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx2
-rw-r--r--sw/source/core/docnode/node2lay.cxx2
-rw-r--r--sw/source/core/docnode/nodedump.cxx2
-rw-r--r--sw/source/core/draw/dcontact.cxx16
-rw-r--r--sw/source/core/edit/acorrect.cxx6
-rw-r--r--sw/source/core/edit/autofmt.cxx10
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/edit/eddel.cxx14
-rw-r--r--sw/source/core/edit/editsh.cxx38
-rw-r--r--sw/source/core/edit/edlingu.cxx6
-rw-r--r--sw/source/core/edit/ednumber.cxx16
-rw-r--r--sw/source/core/edit/edtab.cxx6
-rw-r--r--sw/source/core/edit/edws.cxx6
-rw-r--r--sw/source/core/fields/ddefld.cxx4
-rw-r--r--sw/source/core/fields/expfld.cxx4
-rw-r--r--sw/source/core/fields/postithelper.cxx2
-rw-r--r--sw/source/core/fields/reffld.cxx10
-rw-r--r--sw/source/core/frmedt/fecopy.cxx22
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2
-rw-r--r--sw/source/core/frmedt/fetab.cxx6
-rw-r--r--sw/source/core/frmedt/tblsel.cxx8
-rw-r--r--sw/source/core/inc/doctxm.hxx2
-rw-r--r--sw/source/core/inc/flowfrm.hxx4
-rw-r--r--sw/source/core/inc/fntcache.hxx4
-rw-r--r--sw/source/core/inc/swfntcch.hxx4
-rw-r--r--sw/source/core/layout/calcmove.cxx2
-rw-r--r--sw/source/core/layout/flowfrm.cxx10
-rw-r--r--sw/source/core/layout/flycnt.cxx2
-rw-r--r--sw/source/core/layout/frmtool.cxx6
-rw-r--r--sw/source/core/layout/ftnfrm.cxx2
-rw-r--r--sw/source/core/layout/laycache.cxx8
-rw-r--r--sw/source/core/layout/layhelp.hxx2
-rw-r--r--sw/source/core/layout/layouter.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx17
-rw-r--r--sw/source/core/layout/tabfrm.cxx2
-rw-r--r--sw/source/core/layout/trvlfrm.cxx10
-rw-r--r--sw/source/core/layout/wsfrm.cxx2
-rw-r--r--sw/source/core/table/swtable.cxx4
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx14
-rw-r--r--sw/source/core/text/frmform.cxx60
-rw-r--r--sw/source/core/text/frmpaint.cxx26
-rw-r--r--sw/source/core/text/inftxt.cxx10
-rw-r--r--sw/source/core/text/inftxt.hxx10
-rw-r--r--sw/source/core/text/itradj.cxx6
-rw-r--r--sw/source/core/text/itratr.cxx8
-rw-r--r--sw/source/core/text/itrform2.cxx26
-rw-r--r--sw/source/core/text/itrpaint.cxx2
-rw-r--r--sw/source/core/text/itrtxt.cxx2
-rw-r--r--sw/source/core/text/porfly.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx2
-rw-r--r--sw/source/core/text/porlay.hxx12
-rw-r--r--sw/source/core/text/pormulti.cxx22
-rw-r--r--sw/source/core/text/porrst.cxx4
-rw-r--r--sw/source/core/text/redlnitr.cxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx6
-rw-r--r--sw/source/core/text/txtfld.cxx4
-rw-r--r--sw/source/core/text/txtfrm.cxx32
-rw-r--r--sw/source/core/text/txtftn.cxx8
-rw-r--r--sw/source/core/text/txthyph.cxx2
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx2
-rw-r--r--sw/source/core/tox/tox.cxx2
-rw-r--r--sw/source/core/tox/txmsrt.cxx22
-rw-r--r--sw/source/core/txtnode/atrfld.cxx16
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx4
-rw-r--r--sw/source/core/txtnode/fntcap.cxx2
-rw-r--r--sw/source/core/txtnode/modeltoviewhelper.cxx2
-rw-r--r--sw/source/core/txtnode/ndhints.cxx30
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx76
-rw-r--r--sw/source/core/txtnode/thints.cxx112
-rw-r--r--sw/source/core/txtnode/txatritr.cxx2
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx6
-rw-r--r--sw/source/core/txtnode/txtedt.cxx8
-rw-r--r--sw/source/core/undo/rolbck.cxx16
-rw-r--r--sw/source/core/undo/unattr.cxx6
-rw-r--r--sw/source/core/undo/undel.cxx2
-rw-r--r--sw/source/core/undo/undobj.cxx18
-rw-r--r--sw/source/core/undo/undobj1.cxx2
-rw-r--r--sw/source/core/undo/unins.cxx2
-rw-r--r--sw/source/core/undo/unmove.cxx4
-rw-r--r--sw/source/core/undo/unovwr.cxx4
-rw-r--r--sw/source/core/undo/unredln.cxx23
-rw-r--r--sw/source/core/undo/unsort.cxx2
-rw-r--r--sw/source/core/undo/unspnd.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx12
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx40
-rw-r--r--sw/source/core/unocore/unodraw.cxx6
-rw-r--r--sw/source/core/unocore/unofield.cxx12
-rw-r--r--sw/source/core/unocore/unoframe.cxx8
-rw-r--r--sw/source/core/unocore/unoftn.cxx10
-rw-r--r--sw/source/core/unocore/unoidx.cxx12
-rw-r--r--sw/source/core/unocore/unoobj.cxx16
-rw-r--r--sw/source/core/unocore/unoobj2.cxx12
-rw-r--r--sw/source/core/unocore/unoport.cxx2
-rw-r--r--sw/source/core/unocore/unoportenum.cxx18
-rw-r--r--sw/source/core/unocore/unoredline.cxx10
-rw-r--r--sw/source/core/unocore/unorefmk.cxx20
-rw-r--r--sw/source/core/unocore/unosect.cxx18
-rw-r--r--sw/source/core/unocore/unotbl.cxx18
-rw-r--r--sw/source/core/unocore/unotext.cxx41
-rw-r--r--sw/source/core/view/vprint.cxx2
-rw-r--r--sw/source/filter/ascii/ascatr.cxx8
-rw-r--r--sw/source/filter/basflt/shellio.cxx10
-rw-r--r--sw/source/filter/html/htmlatr.cxx12
-rw-r--r--sw/source/filter/html/htmlfld.cxx2
-rw-r--r--sw/source/filter/html/htmlfldw.cxx2
-rw-r--r--sw/source/filter/html/htmlftn.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx8
-rw-r--r--sw/source/filter/html/htmlnumwriter.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx10
-rw-r--r--sw/source/filter/html/wrthtml.cxx24
-rw-r--r--sw/source/filter/ww1/fltshell.cxx2
-rw-r--r--sw/source/filter/ww1/w1filter.cxx6
-rw-r--r--sw/source/filter/ww1/w1struct.hxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx36
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx46
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx7
-rw-r--r--sw/source/filter/ww8/ww8par.cxx20
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx4
-rw-r--r--sw/source/filter/xml/xmltbli.cxx2
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx2
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx2
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx8
-rw-r--r--sw/source/uibase/docvw/AnnotationWin.cxx8
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx6
-rw-r--r--sw/source/uibase/docvw/frmsidebarwincontainer.cxx2
-rw-r--r--sw/source/uibase/inc/pview.hxx6
-rw-r--r--sw/source/uibase/inc/redlndlg.hxx2
-rw-r--r--sw/source/uibase/shells/langhelper.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx10
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx10
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx9
173 files changed, 887 insertions, 900 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index b94b412e9e79..a7f9b1f0a9e7 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -896,7 +896,7 @@ inline bool SwCrsrShell::IsSelOnePara() const
inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( bool bIsPtInTbl ) const
{
- return m_pCurCrsr->GetNode( bIsPtInTbl )->FindTableNode();
+ return m_pCurCrsr->GetNode( bIsPtInTbl ).FindTableNode();
}
inline bool SwCrsrShell::IsCrsrPtAtEnd() const
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 63c92528b476..fc8b107f5d5d 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -260,8 +260,8 @@ class SwDrawVirtObj : public SdrVirtObj
SwDrawVirtObj& operator= (const SwDrawVirtObj& rObj);
/// connection to writer layout
- const SwAnchoredObject* GetAnchoredObj() const { return &maAnchoredDrawObj;}
- SwAnchoredObject* AnchoredObj() { return &maAnchoredDrawObj;}
+ const SwAnchoredObject& GetAnchoredObj() const { return maAnchoredDrawObj; }
+ SwAnchoredObject& AnchoredObj() { return maAnchoredDrawObj; }
const SwFrm* GetAnchorFrm() const;
SwFrm* AnchorFrm();
void RemoveFromWriterLayout();
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 957f9673b18f..c090b3f0dfae 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -216,7 +216,7 @@ public:
{
/** clear the mark position; this helps if mark's SwIndex is
registered at some node, and that node is then deleted */
- *m_pMark = SwPosition( SwNodeIndex( GetNode()->GetNodes() ) );
+ *m_pMark = SwPosition( SwNodeIndex( GetNode().GetNodes() ) );
m_pMark = m_pPoint;
}
}
@@ -256,15 +256,15 @@ public:
{ return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
/// @return current Node at Point/Mark
- SwNode * GetNode ( bool bPoint = true ) const
+ SwNode & GetNode ( bool bPoint = true ) const
{
- return &( bPoint ? m_pPoint->nNode : m_pMark->nNode ).GetNode();
+ return ( bPoint ? m_pPoint->nNode : m_pMark->nNode ).GetNode();
}
/// @return current ContentNode at Point/Mark
SwCntntNode* GetCntntNode( bool bPoint = true ) const
{
- return GetNode(bPoint)->GetCntntNode();
+ return GetNode(bPoint).GetCntntNode();
}
/**
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index c849a7b70e8d..222857da0d0d 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -76,8 +76,8 @@ public:
static void Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool );
/// start position
- sal_Int32* GetStart() { return & m_nStart; }
- const sal_Int32* GetStart() const { return & m_nStart; }
+ sal_Int32& GetStart() { return m_nStart; }
+ const sal_Int32& GetStart() const { return m_nStart; }
/// end position
virtual sal_Int32* GetEnd(); // also used to change the end position
@@ -140,7 +140,7 @@ inline const sal_Int32* SwTxtAttr::End() const
inline const sal_Int32* SwTxtAttr::GetAnyEnd() const
{
const sal_Int32* pEnd = End();
- return pEnd ? pEnd : GetStart();
+ return pEnd ? pEnd : &GetStart();
}
inline const SfxPoolItem& SwTxtAttr::GetAttr() const
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 6b073fee70d7..c15ca72f0c21 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -232,7 +232,7 @@ void SwDocTest::testModelToViewHelper()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, OUString("AAAAA BBBBB "));
- SwTxtNode* pTxtNode = aPaM.GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
sal_Int32 nPos = aPaM.GetPoint()->nContent.GetIndex();
pTxtNode->InsertItem(aFtn, nPos, nPos);
m_pDoc->InsertString(aPaM, OUString(" CCCCC "));
@@ -411,7 +411,7 @@ void SwDocTest::testModelToViewHelper()
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] = uno::makeAny(vListEntries);
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] = uno::makeAny(sal_Int32(0));
m_pDoc->InsertString(aPaM, OUString("CCCCC"));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(11),
pTxtNode->GetTxt().getLength());
@@ -442,7 +442,7 @@ void SwDocTest::testSwScanner()
SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx);
- SwTxtNode* pTxtNode = aPaM.GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
CPPUNIT_ASSERT_MESSAGE("Has Text Node", pTxtNode);
@@ -482,7 +482,7 @@ void SwDocTest::testSwScanner()
m_pDoc->InsertPoolItem(aPaM, aWestLangItem, 0 );
SwDocStat aDocStat;
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(IDEOGRAPHICFULLSTOP_D));
CPPUNIT_ASSERT_MESSAGE("Should be 2", aDocStat.nChar == 2);
@@ -518,7 +518,7 @@ void SwDocTest::testSwScanner()
m_pDoc->InsertPoolItem(aPaM, aWestLangItem, 0 );
SwDocStat aDocStat;
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(test));
CPPUNIT_ASSERT_MESSAGE("58 words", aDocStat.nWord == 58);
CPPUNIT_ASSERT_MESSAGE("43 Asian characters and Korean syllables", aDocStat.nAsianWord == 43);
@@ -539,7 +539,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, OUString(aShouldBeThree, SAL_N_ELEMENTS(aShouldBeThree)));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(aShouldBeThree));
CPPUNIT_ASSERT_MESSAGE("Should be 3", aDocStat.nWord == 3);
@@ -556,7 +556,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, OUString(aShouldBeFive, SAL_N_ELEMENTS(aShouldBeFive)));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
aDocStat.Reset();
pTxtNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(aShouldBeFive));
CPPUNIT_ASSERT_MESSAGE("Should be 5", aDocStat.nWord == 5);
@@ -568,7 +568,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, OUString("Apple"));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
sal_Int32 nPos = aPaM.GetPoint()->nContent.GetIndex();
SwFmtFtn aFtn;
aFtn.SetNumStr(OUString("banana"));
@@ -601,7 +601,7 @@ void SwDocTest::testSwScanner()
m_pDoc->InsertPoolItem(aPaM, SwFmtFld(aPostIt), 0);
m_pDoc->InsertString(aPaM, OUString("Apple"));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
aDocStat.Reset();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 1);
@@ -618,7 +618,7 @@ void SwDocTest::testSwScanner()
const char aString[] = "Lorem ipsum";
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, OUString(aString));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT_EQUAL(aDocStat.nWord, static_cast<sal_uLong>(2));
@@ -681,7 +681,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replace('X', ' '));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
aDocStat.nCharExcludingSpaces == 12 &&
@@ -690,7 +690,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replaceAll(OUString('X'), OUString(" = ")));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 5 &&
aDocStat.nCharExcludingSpaces == 13 &&
@@ -699,7 +699,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replaceAll(OUString('X'), OUString(" _ ")));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 5 &&
aDocStat.nCharExcludingSpaces == 13 &&
@@ -708,7 +708,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replaceAll(OUString('X'), OUString(" -- ")));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 5 &&
aDocStat.nCharExcludingSpaces == 14 &&
@@ -717,7 +717,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replace('X', '_'));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
aDocStat.nCharExcludingSpaces == 13 &&
@@ -726,7 +726,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replace('X', '-'));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
aDocStat.nCharExcludingSpaces == 13 &&
@@ -735,7 +735,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replace('X', 0x2012));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
aDocStat.nCharExcludingSpaces == 13 &&
@@ -744,7 +744,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replace('X', 0x2015));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
aDocStat.nCharExcludingSpaces == 13 &&
@@ -755,7 +755,7 @@ void SwDocTest::testSwScanner()
//and endash as word separators for word-counting
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replace('X', 0x2013));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
aDocStat.nCharExcludingSpaces == 13 &&
@@ -764,7 +764,7 @@ void SwDocTest::testSwScanner()
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replace('X', 0x2014));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
aDocStat.nCharExcludingSpaces == 13 &&
@@ -775,7 +775,7 @@ void SwDocTest::testSwScanner()
OUString sChunk(aChunk, SAL_N_ELEMENTS(aChunk));
m_pDoc->AppendTxtNode(*aPaM.GetPoint());
m_pDoc->InsertString(aPaM, sTemplate.replaceAll(OUString('X'), sChunk));
- pTxtNode = aPaM.GetNode()->GetTxtNode();
+ pTxtNode = aPaM.GetNode().GetTxtNode();
pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
aDocStat.nCharExcludingSpaces == 13 &&
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 7fd4a7012f2c..85c294c07776 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -88,7 +88,7 @@ void SwUiWriterTest::testReplaceForward()
pDoc->InsertString(aPaM, ORIGINAL_REPLACE_CONTENT);
- SwTxtNode* pTxtNode = aPaM.GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
lcl_selectCharacters(aPaM, 5, 9);
pDoc->ReplaceRange(aPaM, OUString("toto"), false);
@@ -137,7 +137,7 @@ void SwUiWriterTest::testReplaceBackward()
SwPaM aPaM(aIdx);
pDoc->InsertString(aPaM, OUString("toto titi tutu"));
- SwTxtNode* pTxtNode = aPaM.GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
lcl_selectCharacters(aPaM, 9, 5);
pDoc->ReplaceRange(aPaM, OUString("toto"), false);
@@ -207,7 +207,7 @@ void SwUiWriterTest::testImportRTF()
CPPUNIT_ASSERT(pRTFReader != 0);
CPPUNIT_ASSERT_EQUAL(sal_uLong(0), aReader.Read(*pRTFReader));
- sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode()->GetIndex();
+ sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex();
CPPUNIT_ASSERT_EQUAL(OUString("fooHello world!"), static_cast<SwTxtNode*>(pDoc->GetNodes()[nIndex - 1])->GetTxt());
CPPUNIT_ASSERT_EQUAL(OUString("bar"), static_cast<SwTxtNode*>(pDoc->GetNodes()[nIndex])->GetTxt());
}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index f35dfcd30eac..9c70eb15c652 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -686,11 +686,11 @@ SwTOXSortTabBase* SwAccessibleParagraph::GetTOXSortTabBase()
if( pSect->GetType() == TOX_CONTENT_SECTION )
{
SwTOXSortTabBase* pSortBase = 0;
- size_t nSize = pTOXBaseSect->GetTOXSortTabBases()->size();
+ size_t nSize = pTOXBaseSect->GetTOXSortTabBases().size();
for(size_t nIndex = 0; nIndex<nSize; nIndex++ )
{
- pSortBase = (*(pTOXBaseSect->GetTOXSortTabBases()))[nIndex];
+ pSortBase = pTOXBaseSect->GetTOXSortTabBases()[nIndex];
if( pSortBase->pTOXNd == pTxtNd )
break;
}
@@ -3134,7 +3134,7 @@ const SwTxtAttr *SwHyperlinkIter_Impl::next()
const SwTxtAttr *pHt = (*pHints)[nPos];
if( RES_TXTATR_INETFMT == pHt->Which() )
{
- const sal_Int32 nHtStt = *pHt->GetStart();
+ const sal_Int32 nHtStt = pHt->GetStart();
const sal_Int32 nHtEnd = *pHt->GetAnyEnd();
if( nHtEnd > nHtStt &&
( (nHtStt >= nStt && nHtStt < nEnd) ||
@@ -3188,7 +3188,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
bool bH = false;
if( pHt )
- nHStt = *pHt->GetStart();
+ nHStt = pHt->GetStart();
bool bTOC = false;
// Inside TOC & get the first link
if( pTBase && nTIndex == -1 )
@@ -3221,7 +3221,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
{
{
const sal_Int32 nTmpHStt= GetPortionData().GetAccessiblePosition(
- max( aHIter.startIdx(), *pHt->GetStart() ) );
+ max( aHIter.startIdx(), pHt->GetStart() ) );
const sal_Int32 nTmpHEnd= GetPortionData().GetAccessiblePosition(
min( aHIter.endIdx(), *pHt->GetAnyEnd() ) );
xRet = new SwAccessibleHyperlink( aHIter.getCurrHintPos(),
@@ -3280,7 +3280,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde
const sal_Int32 nIdx = GetPortionData().GetModelPosition( nCharIndex );
sal_Int32 nPos = 0;
const SwTxtAttr *pHt = aHIter.next();
- while( pHt && !(nIdx >= *pHt->GetStart() && nIdx < *pHt->GetAnyEnd()) )
+ while( pHt && !(nIdx >= pHt->GetStart() && nIdx < *pHt->GetAnyEnd()) )
{
pHt = aHIter.next();
nPos++;
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index ba0d893f8c6b..a8449fbebdb0 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -167,7 +167,7 @@ SwCallLink::~SwCallLink()
{
const SwTxtAttr* pHt = rHts[ n ];
const sal_Int32 *pEnd = pHt->End();
- const sal_Int32 nStart = *pHt->GetStart();
+ const sal_Int32 nStart = pHt->GetStart();
// If "only start" or "start and end equal" then call on
// every overflow of start.
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 46446c2f18fa..fb9b19d53c07 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -353,7 +353,7 @@ 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() ) &&
+ 0 != ( pTxtNd = pShellCrsr->GetNode().GetTxtNode() ) &&
pTxtNd->HasVisibleNumberingOrBullet() )
{
SetInFrontOfLabel( true );
@@ -405,7 +405,7 @@ void SwCrsrShell::MarkListLevel( const OUString& sListId,
void SwCrsrShell::UpdateMarkedListLevel()
{
- SwTxtNode * pTxtNd = _GetCrsr()->GetNode()->GetTxtNode();
+ SwTxtNode * pTxtNd = _GetCrsr()->GetNode().GetTxtNode();
if ( pTxtNd )
{
@@ -547,7 +547,7 @@ bool SwCrsrShell::LRMargin( bool bLeft, bool bAPI)
if ( bLeft && !bTableMode && bRet && bWasAtLM && !_GetCrsr()->HasMark() )
{
- const SwTxtNode * pTxtNd = _GetCrsr()->GetNode()->GetTxtNode();
+ const SwTxtNode * pTxtNd = _GetCrsr()->GetNode().GetTxtNode();
if ( pTxtNd && pTxtNd->HasVisibleNumberingOrBullet() )
SetInFrontOfLabel( true );
}
@@ -734,7 +734,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock )
bOnlyText ? MV_SETONLYTEXT : MV_NONE );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
- SwTxtNode * pTxtNd = pCrsr->GetNode()->GetTxtNode();
+ SwTxtNode * pTxtNd = pCrsr->GetNode().GetTxtNode();
if ( pTxtNd && !IsTableMode() &&
// #i37515# No bInFrontOfLabel during selection
@@ -1405,8 +1405,8 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
if( pTstCrsr->HasMark() && !m_pBlockCrsr &&
mpDoc->IsIdxInTbl( pTstCrsr->GetPoint()->nNode ) &&
( m_pTblCrsr ||
- pTstCrsr->GetNode( true )->StartOfSectionNode() !=
- pTstCrsr->GetNode( false )->StartOfSectionNode() ) && !mbSelectAll)
+ pTstCrsr->GetNode( true ).StartOfSectionNode() !=
+ pTstCrsr->GetNode( false ).StartOfSectionNode() ) && !mbSelectAll)
{
SwShellCrsr* pITmpCrsr = getShellCrsr( true );
Point aTmpPt( pITmpCrsr->GetPtPos() );
@@ -1572,7 +1572,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
{
SwShellCrsr* pShellCrsr = getShellCrsr( true );
bool bChgState = true;
- const SwSectionNode* pSectNd = pShellCrsr->GetNode()->FindSectionNode();
+ const SwSectionNode* pSectNd = pShellCrsr->GetNode().FindSectionNode();
if( pSectNd && ( pSectNd->GetSection().IsHiddenFlag() ||
( !IsReadOnlyAvailable() &&
pSectNd->GetSection().IsProtectFlag() &&
@@ -2236,7 +2236,7 @@ OUString SwCrsrShell::GetSelTxt() const
if( m_pCurCrsr->GetPoint()->nNode.GetIndex() ==
m_pCurCrsr->GetMark()->nNode.GetIndex() )
{
- SwTxtNode* pTxtNd = m_pCurCrsr->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = m_pCurCrsr->GetNode().GetTxtNode();
if( pTxtNd )
{
const sal_Int32 nStt = m_pCurCrsr->Start()->nContent.GetIndex();
@@ -2254,7 +2254,7 @@ OUString SwCrsrShell::GetText() const
if( m_pCurCrsr->GetPoint()->nNode.GetIndex() ==
m_pCurCrsr->GetMark()->nNode.GetIndex() )
{
- SwTxtNode* pTxtNd = m_pCurCrsr->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = m_pCurCrsr->GetNode().GetTxtNode();
if( pTxtNd )
aTxt = pTxtNd->GetTxt().copy(
m_pCurCrsr->GetPoint()->nContent.GetIndex() );
@@ -2843,22 +2843,22 @@ bool SwCrsrShell::FindValidCntntNode( bool bOnlyText )
// move forward into non-protected area.
SwPaM aPam( rNdIdx.GetNode(), 0 );
- while( aPam.GetNode()->IsProtect() &&
+ while( aPam.GetNode().IsProtect() &&
aPam.Move( fnMoveForward, fnGoCntnt ) )
; // nothing to do in the loop; the aPam.Move does the moving!
// didn't work? then go backwards!
- if( aPam.GetNode()->IsProtect() )
+ if( aPam.GetNode().IsProtect() )
{
SwPaM aTmpPaM( rNdIdx.GetNode(), 0 );
aPam = aTmpPaM;
- while( aPam.GetNode()->IsProtect() &&
+ while( aPam.GetNode().IsProtect() &&
aPam.Move( fnMoveBackward, fnGoCntnt ) )
; // nothing to do in the loop; the aPam.Move does the moving!
}
// if we're successful, set the new position
- if( ! aPam.GetNode()->IsProtect() )
+ if( ! aPam.GetNode().IsProtect() )
{
*m_pCurCrsr->GetPoint() = *aPam.GetPoint();
}
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 9925e1e0f282..8ff7f73720e0 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -564,7 +564,7 @@ const SwTOXMark& SwCrsrShell::GotoTOXMark( const SwTOXMark& rStart,
SwPosition& rPos = *GetCrsr()->GetPoint();
rPos.nNode = rNewMark.GetTxtTOXMark()->GetTxtNode();
rPos.nContent.Assign( rPos.nNode.GetNode().GetCntntNode(),
- *rNewMark.GetTxtTOXMark()->GetStart() );
+ rNewMark.GetTxtTOXMark()->GetStart() );
if( !m_pCurCrsr->IsSelOvr() )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
@@ -752,7 +752,7 @@ bool SwCrsrShell::GotoFld( const SwFmtFld& rFld )
SwTxtNode* pTNd = (SwTxtNode*)rFld.GetTxtFld()->GetpTxtNode();
pCrsr->GetPoint()->nNode = *pTNd;
- pCrsr->GetPoint()->nContent.Assign( pTNd, *rFld.GetTxtFld()->GetStart() );
+ pCrsr->GetPoint()->nContent.Assign( pTNd, rFld.GetTxtFld()->GetStart() );
bRet = !pCrsr->IsSelOvr();
if( bRet )
@@ -788,7 +788,7 @@ SwField* SwCrsrShell::GetFieldAtCrsr(
{
const sal_Int32 nTxtFldLength =
pTxtFld->End() != NULL
- ? *(pTxtFld->End()) - *(pTxtFld->GetStart())
+ ? *(pTxtFld->End()) - pTxtFld->GetStart()
: 1;
if ( ( pCrsr->End()->nContent.GetIndex() - pCrsr->Start()->nContent.GetIndex() ) <= nTxtFldLength )
{
@@ -861,7 +861,7 @@ sal_Int32 SwCrsrShell::StartOfInputFldAtPos( const SwPosition& rPos ) const
OSL_ENSURE( false, "<SwEditShell::StartOfInputFldAtPos(..)> - no Input Field at given position" );
return 0;
}
- return *(pTxtInputFld->GetStart());
+ return pTxtInputFld->GetStart();
}
sal_Int32 SwCrsrShell::EndOfInputFldAtPos( const SwPosition& rPos ) const
@@ -915,7 +915,7 @@ bool SwCrsrShell::GotoNextOutline()
SwCursor* pCrsr = getShellCrsr( true );
const SwNodes& rNds = GetDoc()->GetNodes();
- SwNode* pNd = pCrsr->GetNode();
+ SwNode* pNd = &(pCrsr->GetNode());
sal_uInt16 nPos;
if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos ))
++nPos;
@@ -943,7 +943,7 @@ bool SwCrsrShell::GotoPrevOutline()
SwCursor* pCrsr = getShellCrsr( true );
const SwNodes& rNds = GetDoc()->GetNodes();
- SwNode* pNd = pCrsr->GetNode();
+ SwNode* pNd = &(pCrsr->GetNode());
sal_uInt16 nPos;
rNds.GetOutLineNds().Seek_Entry( pNd, &nPos );
@@ -975,7 +975,7 @@ sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel )
SwPaM* pCrsr = getShellCrsr( true );
const SwNodes& rNds = GetDoc()->GetNodes();
- SwNode* pNd = pCrsr->GetNode();
+ SwNode* pNd = &(pCrsr->GetNode());
sal_uInt16 nPos;
if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos ))
nPos++; // is at correct position; take next for while
@@ -1354,7 +1354,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
const sal_Int32* pEnd = pTxtAttr->GetEnd();
if( pEnd )
rCntntAtPos.sStr =
- pTxtNd->GetExpandTxt( *pTxtAttr->GetStart(), *pEnd - *pTxtAttr->GetStart() );
+ pTxtNd->GetExpandTxt( pTxtAttr->GetStart(), *pEnd - pTxtAttr->GetStart() );
else if( RES_TXTATR_TOXMARK == pTxtAttr->Which())
rCntntAtPos.sStr =
pTxtAttr->GetTOXMark().GetAlternativeText();
@@ -1397,8 +1397,8 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( bRet )
{
rCntntAtPos.sStr = pTxtNd->GetExpandTxt(
- *pTxtAttr->GetStart(),
- *pTxtAttr->GetEnd() - *pTxtAttr->GetStart() );
+ pTxtAttr->GetStart(),
+ *pTxtAttr->GetEnd() - pTxtAttr->GetStart() );
rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_INETATTR;
@@ -1518,7 +1518,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
for( sal_uInt16 i = 0; i < pTxtNd->GetSwpHints().Count(); ++i )
{
const SwTxtAttr* pHt = pTxtNd->GetSwpHints()[i];
- const sal_Int32 nAttrStart = *pHt->GetStart();
+ const sal_Int32 nAttrStart = pHt->GetStart();
if( nAttrStart > n ) // over the section
break;
@@ -1737,7 +1737,7 @@ bool SwCrsrShell::SelectTxtAttr( sal_uInt16 nWhich,
if( pTxtAttr )
{
const sal_Int32* pEnd = pTxtAttr->End();
- bRet = SelectTxt( *pTxtAttr->GetStart(), ( pEnd ? *pEnd : *pTxtAttr->GetStart() + 1 ) );
+ bRet = SelectTxt( pTxtAttr->GetStart(), ( pEnd ? *pEnd : pTxtAttr->GetStart() + 1 ) );
}
}
return bRet;
@@ -1756,7 +1756,7 @@ bool SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
pCrsr->GetPoint()->nNode = *rAttr.GetpTxtNode();
pCrsr->GetPoint()->nContent.Assign( (SwTxtNode*)rAttr.GetpTxtNode(),
- *rAttr.GetStart() );
+ rAttr.GetStart() );
bRet = !pCrsr->IsSelOvr();
if( bRet )
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
@@ -2188,8 +2188,8 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
? ( aPos < aCmpPos && aCurPos < aPos )
: ( aCmpPos < aPos && aPos < aCurPos ))
{
- OUString sTxt( pTxtNd->GetExpandTxt( *rAttr.GetStart(),
- *rAttr.GetEnd() - *rAttr.GetStart() ) );
+ OUString sTxt( pTxtNd->GetExpandTxt( rAttr.GetStart(),
+ *rAttr.GetEnd() - rAttr.GetStart() ) );
sTxt = comphelper::string::remove(sTxt, 0x0a);
sTxt = comphelper::string::strip(sTxt, ' ');
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index bc02b63d5ade..bc581a78b7f9 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -94,7 +94,7 @@ const SwTxtAttr* GetFrwrdTxtHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
{
const SwTxtAttr *pTxtHt = rHtsArr.GetStart( rPos++ );
// the start of an attribute has to be in the section
- if( *pTxtHt->GetStart() >= nCntntPos )
+ if( pTxtHt->GetStart() >= nCntntPos )
return pTxtHt; // valid text attribute
}
return 0; // invalid text attribute
@@ -107,7 +107,7 @@ const SwTxtAttr* GetBkwrdTxtHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
{
const SwTxtAttr *pTxtHt = rHtsArr.GetStart( --rPos );
// the start of an attribute has to be in the section
- if( *pTxtHt->GetStart() < nCntntPos )
+ if( pTxtHt->GetStart() < nCntntPos )
return pTxtHt; // valid text attribute
}
return 0; // invalid text attribute
@@ -167,7 +167,7 @@ static bool lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
if( pTxtHt->Which() == rCmpItem.Which() &&
( !bValue || CmpAttr( pTxtHt->GetAttr(), rCmpItem )))
{
- lcl_SetAttrPam( rPam, *pTxtHt->GetStart(), pTxtHt->End(), bForward );
+ lcl_SetAttrPam( rPam, pTxtHt->GetStart(), pTxtHt->End(), bForward );
return true;
}
return false;
@@ -332,7 +332,7 @@ lcl_IsAttributeIgnorable(sal_Int32 const nNdStart, sal_Int32 const nNdEnd,
bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
{
- _SwSrchChrAttr aTmp( rAttr.GetAttr(), *rAttr.GetStart(), *rAttr.GetAnyEnd() );
+ _SwSrchChrAttr aTmp( rAttr.GetAttr(), rAttr.GetStart(), *rAttr.GetAnyEnd() );
// ignore all attributes not in search range
if (lcl_IsAttributeIgnorable(nNdStt, nNdEnd, aTmp))
@@ -485,7 +485,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
{
- _SwSrchChrAttr aTmp( rAttr.GetAttr(), *rAttr.GetStart(), *rAttr.GetAnyEnd() );
+ _SwSrchChrAttr aTmp( rAttr.GetAttr(), rAttr.GetStart(), *rAttr.GetAnyEnd() );
// ignore all attributes not in search range
if (lcl_IsAttributeIgnorable(nNdStt, nNdEnd, aTmp))
@@ -714,11 +714,11 @@ static int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
for( ; nPos < rHtArr.Count(); ++nPos )
if( !rCmpArr.SetAttrFwd( *( pAttr = rHtArr.GetStart( nPos )) ) )
{
- if( rCmpArr.GetNdStt() < *pAttr->GetStart() )
+ if( rCmpArr.GetNdStt() < pAttr->GetStart() )
{
// found end
lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(),
- pAttr->GetStart(), true );
+ &pAttr->GetStart(), true );
return sal_True;
}
// continue search
@@ -739,9 +739,9 @@ static int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
if( rCmpArr.SetAttrFwd( *( pAttr = rHtArr.GetStart( nPos )) ) )
{
// Do multiple start at that position? Do also check those:
- nSttPos = *pAttr->GetStart();
+ nSttPos = pAttr->GetStart();
while( ++nPos < rHtArr.Count() && nSttPos ==
- *( pAttr = rHtArr.GetStart( nPos ))->GetStart() &&
+ ( pAttr = rHtArr.GetStart( nPos ))->GetStart() &&
rCmpArr.SetAttrFwd( *pAttr ) )
;
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 8b0b33cbf51b..b8e2b470dfb3 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -66,7 +66,7 @@ lcl_CleanStr(const SwTxtNode& rNd, sal_Int32 const nStart, sal_Int32& rEnd,
{
if ( bNewHint )
nHintStart = pHts && n < pHts->Count() ?
- *(*pHts)[n]->GetStart() :
+ (*pHts)[n]->GetStart() :
-1;
if ( bNewSoftHyphen )
@@ -269,7 +269,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
const SwTxtAttr* pTxtAttr = (*pHts)[i];
if ( pTxtAttr->Which()==RES_TXTATR_ANNOTATION )
{
- const sal_Int32 aPos = *pTxtAttr->GetStart();
+ const sal_Int32 aPos = pTxtAttr->GetStart();
if ( (aPos >= nStart) && (aPos <= nEnd) )
aNumberPostits++;
else
@@ -328,14 +328,14 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
{
if (bSrchForward)
{
- nStartInside = aLoop==0 ? nStart : *(*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)]->GetStart()+1;
- nEndInside = aLoop==aNumberPostits ? nEnd : *(*pHts)[GetPostIt(aLoop+aIgnore,pHts)]->GetStart();
+ 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;
}
else
{
- nStartInside = aLoop==aNumberPostits ? nStart : *(*pHts)[GetPostIt(aLoop+aIgnore,pHts)]->GetStart();
- nEndInside = aLoop==0 ? nEnd : *(*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)]->GetStart()+1;
+ 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;
}
// search inside the text between a note
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 36c0aa2fcac0..1b3801f9a657 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -1072,9 +1072,9 @@ OUString SwPaM::GetTxt() const
void SwPaM::InvalidatePaM()
{
- const SwNode *_pNd=this->GetNode();
- const SwTxtNode *_pTxtNd=(_pNd!=NULL?_pNd->GetTxtNode():NULL);
- if (_pTxtNd!=NULL)
+ const SwNode &_pNd = this->GetNode();
+ const SwTxtNode *_pTxtNd = _pNd.GetTxtNode();
+ if (_pTxtNd != NULL)
{
// pretend that the PaM marks inserted text to recalc the portion...
SwInsTxt aHint( Start()->nContent.GetIndex(),
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index b2b6dde7b37c..c93bfc77326a 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -447,14 +447,14 @@ bool SwCursor::IsSelOvr( int eFlags )
if ( pInputFldTxtAttrAtPoint != NULL )
{
const sal_Int32 nNewPointPos =
- bIsForwardSelection ? *(pInputFldTxtAttrAtPoint->End()) : *(pInputFldTxtAttrAtPoint->GetStart());
+ bIsForwardSelection ? *(pInputFldTxtAttrAtPoint->End()) : pInputFldTxtAttrAtPoint->GetStart();
GetPoint()->nContent.Assign( pTxtNdAtPoint, nNewPointPos );
}
if ( pInputFldTxtAttrAtMark != NULL )
{
const sal_Int32 nNewMarkPos =
- bIsForwardSelection ? *(pInputFldTxtAttrAtMark->GetStart()) : *(pInputFldTxtAttrAtMark->End());
+ bIsForwardSelection ? pInputFldTxtAttrAtMark->GetStart() : *(pInputFldTxtAttrAtMark->End());
GetMark()->nContent.Assign( pTxtNdAtMark, nNewMarkPos );
}
}
@@ -492,7 +492,7 @@ bool SwCursor::IsSelOvr( int eFlags )
nSttEndTbl = rNds[ nSEIdx ]->StartOfSectionIndex() - 1;
GetPoint()->nNode = nSttEndTbl;
- const SwNode* pMyNd = GetNode();
+ const SwNode* pMyNd = &(GetNode());
if( pMyNd->IsSectionNode() || ( pMyNd->IsEndNode() &&
pMyNd->StartOfSectionNode()->IsSectionNode() ) )
@@ -592,7 +592,7 @@ bool SwCursor::IsInProtectTable( bool bMove, bool bChgCrsr )
// search next valid box
// if there is another StartNode after the EndNode of a cell then
// there is another cell
- SwNodeIndex aCellStt( *GetNode()->FindTableBoxStartNode()->EndOfSectionNode(), 1 );
+ SwNodeIndex aCellStt( *GetNode().FindTableBoxStartNode()->EndOfSectionNode(), 1 );
bool bProt = true;
GoNextCell:
do {
@@ -640,7 +640,7 @@ SetNextCrsr:
{
// if there is another EndNode in front of the StartNode than there
// exists a previous cell
- SwNodeIndex aCellStt( *GetNode()->FindTableBoxStartNode(), -1 );
+ SwNodeIndex aCellStt( *GetNode().FindTableBoxStartNode(), -1 );
SwNode* pNd;
bool bProt = true;
GoPrevCell:
@@ -1163,7 +1163,7 @@ bool SwCursor::SelectWord( SwViewShell* pViewShell, const Point* pPt )
bool SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
const sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
@@ -1178,7 +1178,7 @@ bool SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
bool SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
const sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
@@ -1194,7 +1194,7 @@ bool SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
bool SwCursor::IsInWordWT( sal_Int16 nWordType ) const
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
const sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
@@ -1235,7 +1235,7 @@ bool SwCursor::IsStartEndSentence( bool bEnd ) const
bool SwCursor::GoStartWordWT( sal_Int16 nWordType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
@@ -1259,7 +1259,7 @@ bool SwCursor::GoStartWordWT( sal_Int16 nWordType )
bool SwCursor::GoEndWordWT( sal_Int16 nWordType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
@@ -1284,7 +1284,7 @@ bool SwCursor::GoEndWordWT( sal_Int16 nWordType )
bool SwCursor::GoNextWordWT( sal_Int16 nWordType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
@@ -1308,7 +1308,7 @@ bool SwCursor::GoNextWordWT( sal_Int16 nWordType )
bool SwCursor::GoPrevWordWT( sal_Int16 nWordType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
SwCrsrSaveState aSave( *this );
@@ -1347,7 +1347,7 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const
pLayout->GetCrsrOfst( GetPoint(), aPt );
}
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
// Should we select the whole fieldmark?
@@ -1438,7 +1438,7 @@ static OUString lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
bool SwCursor::GoSentence( SentenceMoveType eMoveType )
{
bool bRet = false;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetNode().GetTxtNode();
if( pTxtNd && g_pBreakIt->GetBreakIter().is() )
{
OUString sNodeText( lcl_MaskDeletedRedlines( pTxtNd ) );
@@ -1758,8 +1758,8 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
// 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() ==
- GetNode( false )->StartOfSectionNode() )
+ if( pTblCrsr && GetNode( true ).StartOfSectionNode() ==
+ GetNode( false ).StartOfSectionNode() )
{
if ( End() != GetPoint() )
Exchange();
@@ -1798,7 +1798,7 @@ 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();
+ const SwStartNode* pTblNd = GetNode( true ).FindTableBoxStartNode();
OSL_ENSURE( pTblNd, "pTblCrsr without SwTableNode?" );
if ( pTblNd ) // safety first
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index a26fe9d19044..dc220d9eae3d 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -124,7 +124,7 @@ bool SwCrsrShell::GotoFtnTxt()
bool SwCursor::GotoFtnAnchor()
{
// jump from footnote to anchor
- const SwNode* pSttNd = GetNode()->FindFootnoteStartNode();
+ const SwNode* pSttNd = GetNode().FindFootnoteStartNode();
if( pSttNd )
{
// search in all footnotes in document for this StartIndex
@@ -138,7 +138,7 @@ bool SwCursor::GotoFtnAnchor()
SwTxtNode& rTNd = (SwTxtNode&)pTxtFtn->GetTxtNode();
GetPoint()->nNode = rTNd;
- GetPoint()->nContent.Assign( &rTNd, *pTxtFtn->GetStart() );
+ GetPoint()->nContent.Assign( &rTNd, pTxtFtn->GetStart() );
return !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE );
@@ -165,13 +165,13 @@ bool SwCrsrShell::GotoFtnAnchor()
inline bool CmpLE( const SwTxtFtn& rFtn, sal_uLong nNd, sal_Int32 nCnt )
{
const sal_uLong nTNd = rFtn.GetTxtNode().GetIndex();
- return nTNd < nNd || ( nTNd == nNd && *rFtn.GetStart() <= nCnt );
+ return nTNd < nNd || ( nTNd == nNd && rFtn.GetStart() <= nCnt );
}
inline bool CmpL( const SwTxtFtn& rFtn, sal_uLong nNd, sal_Int32 nCnt )
{
const sal_uLong nTNd = rFtn.GetTxtNode().GetIndex();
- return nTNd < nNd || ( nTNd == nNd && *rFtn.GetStart() < nCnt );
+ return nTNd < nNd || ( nTNd == nNd && rFtn.GetStart() < nCnt );
}
bool SwCursor::GotoNextFtnAnchor()
@@ -227,7 +227,7 @@ bool SwCursor::GotoNextFtnAnchor()
SwTxtNode& rTNd = (SwTxtNode&)pTxtFtn->GetTxtNode();
GetPoint()->nNode = rTNd;
- GetPoint()->nContent.Assign( &rTNd, *pTxtFtn->GetStart() );
+ GetPoint()->nContent.Assign( &rTNd, pTxtFtn->GetStart() );
bRet = !IsSelOvr();
}
return bRet;
@@ -284,7 +284,7 @@ bool SwCursor::GotoPrevFtnAnchor()
SwTxtNode& rTNd = (SwTxtNode&)pTxtFtn->GetTxtNode();
GetPoint()->nNode = rTNd;
- GetPoint()->nContent.Assign( &rTNd, *pTxtFtn->GetStart() );
+ GetPoint()->nContent.Assign( &rTNd, pTxtFtn->GetStart() );
bRet = !IsSelOvr();
}
return bRet;
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index d5b8f231e950..92f37ab8cf2b 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -138,7 +138,7 @@ bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
bool GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
bool bInReadOnly )
{
- SwSectionNode* pNd = rCurCrsr.GetNode()->FindSectionNode();
+ SwSectionNode* pNd = rCurCrsr.GetNode().FindSectionNode();
if( !pNd )
return false;
@@ -168,8 +168,8 @@ bool GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
bool bInReadOnly )
{
- SwNode* pCurrNd = rCurCrsr.GetNode();
- SwSectionNode* pNd = pCurrNd->FindSectionNode();
+ SwNode& rCurrNd = rCurCrsr.GetNode();
+ SwSectionNode* pNd = rCurrNd.FindSectionNode();
if( !pNd )
return false;
@@ -198,7 +198,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
pPos->nContent.Assign( pCNd, bMoveBackward ? pCNd->Len() : 0 );
- if( &pPos->nNode.GetNode() != pCurrNd ||
+ if( &pPos->nNode.GetNode() != &rCurrNd ||
pPos->nContent.GetIndex() != nCurrCnt )
// there was a change
return true;
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 5d7a647ba3b2..080521648e11 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -53,7 +53,7 @@ bool SwCrsrShell::GoNextCell( bool bAppendLine )
// Check if we have to move the cursor to a covered cell before
// proceeding:
- const SwNode* pTableBoxStartNode = pCrsr->GetNode()->FindTableBoxStartNode();
+ const SwNode* pTableBoxStartNode = pCrsr->GetNode().FindTableBoxStartNode();
const SwTableBox* pTableBox = 0;
if ( pCrsr->GetCrsrRowSpanOffset() )
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 8dfc31213479..b81dde872449 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -364,7 +364,7 @@ void SwSelPaintRects::HighlightInputFld()
{
SwTxtNode* pTxtNode = pCurTxtInputFldAtCrsr->GetpTxtNode();
::boost::scoped_ptr<SwShellCrsr> pCrsrForInputTxtFld(
- new SwShellCrsr( *GetShell(), SwPosition( *pTxtNode, *(pCurTxtInputFldAtCrsr->GetStart()) ) ) );
+ new SwShellCrsr( *GetShell(), SwPosition( *pTxtNode, pCurTxtInputFldAtCrsr->GetStart() ) ) );
pCrsrForInputTxtFld->SetMark();
pCrsrForInputTxtFld->GetMark()->nNode = *pTxtNode;
pCrsrForInputTxtFld->GetMark()->nContent.Assign( pTxtNode, *(pCurTxtInputFldAtCrsr->End()) );
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 070aaea7a71a..824ac667cb41 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -301,7 +301,7 @@ static const OUString lcl_dbg_out(const SwTxtAttr & rAttr)
{
OUString aStr("[ ");
- aStr += OUString::number(*rAttr.GetStart());
+ aStr += OUString::number(rAttr.GetStart());
aStr += "->";
aStr += OUString::number(*rAttr.End());
aStr += " ";
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index effc0bdbef31..289b13fcfef3 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1988,12 +1988,12 @@ bool SwDoc::ConvertFieldsToText()
sText = "";
//now remove the field and insert the string
- SwPaM aPam1(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
+ SwPaM aPam1(*pTxtFld->GetpTxtNode(), pTxtFld->GetStart());
aPam1.Move();
//insert first to keep the field's attributes
if (!sText.isEmpty())
InsertString( aPam1, sText );
- SwPaM aPam2(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
+ SwPaM aPam2(*pTxtFld->GetpTxtNode(), pTxtFld->GetStart());
aPam2.SetMark();
aPam2.Move();
DeleteAndJoin(aPam2);//remove the field
@@ -2154,9 +2154,9 @@ void SwDoc::ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew)
OUString SwDoc::GetPaMDescr(const SwPaM & rPam) const
{
- if (rPam.GetNode(true) == rPam.GetNode(false))
+ if (&rPam.GetNode(true) == &rPam.GetNode(false))
{
- SwTxtNode * pTxtNode = rPam.GetNode(true)->GetTxtNode();
+ SwTxtNode * pTxtNode = rPam.GetNode(true).GetTxtNode();
if (0 != pTxtNode)
{
@@ -2170,13 +2170,9 @@ OUString SwDoc::GetPaMDescr(const SwPaM & rPam) const
+ SW_RESSTR(STR_END_QUOTE);
}
}
- else if (0 != rPam.GetNode(true))
+ else
{
- if (0 != rPam.GetNode(false))
- {
- return SW_RESSTR(STR_PARAGRAPHS);
- }
- return OUString();
+ return SW_RESSTR(STR_PARAGRAPHS);
}
return OUString("??");
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 2ce11ac1752b..24c2761873ee 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -356,7 +356,7 @@ static bool lcl_SaveFtn( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd,
&( pSrch = rFtnArr[ nPos ] )->GetTxtNode())->GetIndex()
<= rEndNd.GetIndex() )
{
- const sal_Int32 nFtnSttIdx = *pSrch->GetStart();
+ const sal_Int32 nFtnSttIdx = pSrch->GetStart();
if( ( pEndCnt && pSttCnt )
? (( &rSttNd.GetNode() == pFtnNd &&
pSttCnt->GetIndex() > nFtnSttIdx) ||
@@ -389,7 +389,7 @@ static bool lcl_SaveFtn( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd,
while( nPos-- && ( pFtnNd = &( pSrch = rFtnArr[ nPos ] )->
GetTxtNode())->GetIndex() >= rSttNd.GetIndex() )
{
- const sal_Int32 nFtnSttIdx = *pSrch->GetStart();
+ const sal_Int32 nFtnSttIdx = pSrch->GetStart();
if( !pEndCnt || !pSttCnt ||
!( (( &rSttNd.GetNode() == pFtnNd &&
pSttCnt->GetIndex() > nFtnSttIdx ) ||
@@ -449,7 +449,7 @@ static bool lcl_SaveFtn( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd,
static void lcl_SaveRedlines( const SwPaM& aPam, _SaveRedlines& rArr )
{
- SwDoc* pDoc = aPam.GetNode()->GetDoc();
+ SwDoc* pDoc = aPam.GetNode().GetDoc();
const SwPosition* pStart = aPam.Start();
const SwPosition* pEnd = aPam.End();
@@ -964,7 +964,7 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
*aSavePam.GetMark() = rPos;
rPaM.SetMark(); // create a Sel. around the new range
- pTNd = aSavePam.GetNode()->GetTxtNode();
+ pTNd = aSavePam.GetNode().GetTxtNode();
if (GetIDocumentUndoRedo().DoesUndo())
{
// correct the SavePam's Content first
@@ -983,7 +983,7 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
// If it's not possible to call Undo JoinNext here.
bool bJoin = bSplit && pTNd;
bCorrSavePam = bCorrSavePam &&
- 0 != ( pPamTxtNd = rPaM.GetNode()->GetTxtNode() )
+ 0 != ( pPamTxtNd = rPaM.GetNode().GetTxtNode() )
&& pPamTxtNd->CanJoinNext()
&& (*rPaM.GetPoint() <= *aSavePam.GetPoint());
@@ -1595,12 +1595,12 @@ bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam)
for( sal_uInt16 n = pHts->Count(); n; )
{
const SwTxtAttr* pAttr = (*pHts)[ --n ];
- if( nMkCntPos > *pAttr->GetStart() )
+ if( nMkCntPos > pAttr->GetStart() )
break;
- if( nMkCntPos == *pAttr->GetStart() &&
+ if( nMkCntPos == pAttr->GetStart() &&
0 != (pEndIdx = pAttr->End()) &&
- *pEndIdx == *pAttr->GetStart() )
+ *pEndIdx == pAttr->GetStart() )
pTxtNd->DestroyAttr( pHts->Cut( n ) );
}
}
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 2c032717935a..9832b23912f7 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -726,7 +726,7 @@ _SetGetExpFld::_SetGetExpFld(
if( pIdx )
nCntnt = pIdx->GetIndex();
else if( pFld )
- nCntnt = *pFld->GetStart();
+ nCntnt = pFld->GetStart();
else
nCntnt = 0;
}
@@ -740,7 +740,7 @@ _SetGetExpFld::_SetGetExpFld( const SwNodeIndex& rNdIdx,
if( pIdx )
nCntnt = pIdx->GetIndex();
else
- nCntnt = *rINet.GetStart();
+ nCntnt = rINet.GetStart();
}
// Extension for Sections:
@@ -798,7 +798,7 @@ _SetGetExpFld::_SetGetExpFld( const SwNodeIndex& rNdIdx,
if( pIdx )
nCntnt = pIdx->GetIndex();
else
- nCntnt = *rTOX.GetStart();
+ nCntnt = rTOX.GetStart();
}
_SetGetExpFld::_SetGetExpFld( const SwPosition& rPos )
@@ -972,7 +972,7 @@ sal_Int32 _SetGetExpFld::GetCntPosFromCntnt() const
case TEXTFIELD:
case TEXTINET:
case TEXTTOXMARK:
- nRet = *CNTNT.pTxtFld->GetStart();
+ nRet = CNTNT.pTxtFld->GetStart();
break;
case CRSRPOS:
nRet = CNTNT.pPos->nContent.GetIndex();
@@ -2646,7 +2646,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
if (GetIDocumentUndoRedo().DoesUndo())
{
SwPosition aPosition( pDstTxtFld->GetTxtNode() );
- aPosition.nContent = *pDstTxtFld->GetStart();
+ aPosition.nContent = pDstTxtFld->GetStart();
SwUndo *const pUndo( new SwUndoFieldFromDoc( aPosition, *pDstFld, rSrcFld, pMsgHnt, bUpdateFlds) );
GetIDocumentUndoRedo().AppendUndo(pUndo);
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 8f1f9762ab3c..39515aefa85f 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -331,7 +331,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
pTxtNd->GetTxtAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT));
if (pURLAttr && !pURLAttr->GetINetFmt().GetValue().isEmpty())
{
- nMkPos = *pURLAttr->GetStart();
+ nMkPos = pURLAttr->GetStart();
nPtPos = *pURLAttr->End();
}
else
@@ -789,7 +789,7 @@ static bool lcl_InsAttr(
pTxtNd->GetTxtAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT));
if (pURLAttr && !pURLAttr->GetINetFmt().GetValue().isEmpty())
{
- nMkPos = *pURLAttr->GetStart();
+ nMkPos = pURLAttr->GetStart();
nPtPos = *pURLAttr->End();
}
else
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index be8be9a23921..54f0469fa010 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -412,9 +412,9 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const OUString& rNumStr,
while( nPos < rFtnArr.size() &&
(( nIdx = _SwTxtFtn_GetIndex((pTxtFtn = rFtnArr[ nPos++ ] )))
< nEndNd || ( nIdx == nEndNd &&
- nEndCnt >= *pTxtFtn->GetStart() )) )
+ nEndCnt >= pTxtFtn->GetStart() )) )
if( nIdx > nSttNd || ( nIdx == nSttNd &&
- nSttCnt <= *pTxtFtn->GetStart() ) )
+ nSttCnt <= pTxtFtn->GetStart() ) )
{
const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
if( rFtn.GetNumStr() != rNumStr ||
@@ -443,9 +443,9 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const OUString& rNumStr,
while( nPos &&
(( nIdx = _SwTxtFtn_GetIndex((pTxtFtn = rFtnArr[ --nPos ] )))
> nSttNd || ( nIdx == nSttNd &&
- nSttCnt <= *pTxtFtn->GetStart() )) )
+ nSttCnt <= pTxtFtn->GetStart() )) )
if( nIdx < nEndNd || ( nIdx == nEndNd &&
- nEndCnt >= *pTxtFtn->GetStart() ) )
+ nEndCnt >= pTxtFtn->GetStart() ) )
{
const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
if( rFtn.GetNumStr() != rNumStr ||
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 9db67c3ba8cd..52c62633ee08 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -908,7 +908,7 @@ SwDrawFrmFmt* SwDoc::InsertDrawObj(
eAnchorId = aAnch.GetAnchorId();
if ( eAnchorId == FLY_AT_FLY )
{
- SwPosition aPos( *rRg.GetNode()->FindFlyStartNode() );
+ SwPosition aPos( *rRg.GetNode().FindFlyStartNode() );
aAnch.SetAnchor( &aPos );
}
else
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 1f7126910847..b8f264a82da0 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -214,12 +214,12 @@ bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt
if( RES_TXTATR_CJK_RUBY == ( pHt = (*pHts)[ nHtIdx ])->Which() &&
*pHt->GetAnyEnd() > nStart )
{
- if( *pHt->GetStart() < nEnd )
+ if( pHt->GetStart() < nEnd )
{
pAttr = pHt;
- if( !bHasMark && nStart > *pAttr->GetStart() )
+ if( !bHasMark && nStart > pAttr->GetStart() )
{
- nStart = *pAttr->GetStart();
+ nStart = pAttr->GetStart();
pPos->nContent = nStart;
}
}
@@ -227,7 +227,7 @@ bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt
}
}
- if( !bHasMark && nStart && ( !pAttr || nStart != *pAttr->GetStart()) )
+ if( !bHasMark && nStart && ( !pAttr || nStart != pAttr->GetStart()) )
{
// skip to the word begin!
const sal_Int32 nWordStt = g_pBreakIt->GetBreakIter()->getWordBoundary(
@@ -247,7 +247,7 @@ bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt
CharClass& rCC = GetAppCharClass();
while( nStart < nEnd )
{
- if( pAttr && nStart == *pAttr->GetStart() )
+ if( pAttr && nStart == pAttr->GetStart() )
{
pPos->nContent = nStart;
if( !rPam.HasMark() )
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 3a80426ef4f0..d98edcac5f5a 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -123,7 +123,7 @@ sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos,
{
if( RES_TXTATR_TOXMARK != (pHt = rHts[n])->Which() )
continue;
- if( ( nSttIdx = *pHt->GetStart() ) < nAktPos )
+ if( ( nSttIdx = pHt->GetStart() ) < nAktPos )
{
// also check the end
if( 0 == ( pEndIdx = pHt->End() ) ||
@@ -154,7 +154,7 @@ void SwDoc::DeleteTOXMark( const SwTOXMark* pTOXMark )
{
// save attributes for Undo
SwUndoResetAttr* pUndo = new SwUndoResetAttr(
- SwPosition( rTxtNd, SwIndex( &rTxtNd, *pTxtTOXMark->GetStart() ) ),
+ SwPosition( rTxtNd, SwIndex( &rTxtNd, pTxtTOXMark->GetStart() ) ),
RES_TXTATR_TOXMARK );
GetIDocumentUndoRedo().AppendUndo( pUndo );
@@ -207,7 +207,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
const SwTxtNode *pTOXSrc = pMark->GetpTxtNd();
- CompareNodeCntnt aAbsIdx( pTOXSrc->GetIndex(), *pMark->GetStart() );
+ CompareNodeCntnt aAbsIdx( pTOXSrc->GetIndex(), pMark->GetStart() );
CompareNodeCntnt aPrevPos( 0, 0 );
CompareNodeCntnt aNextPos( ULONG_MAX, SAL_MAX_INT32 );
CompareNodeCntnt aMax( 0, 0 );
@@ -242,7 +242,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
if ( bInReadOnly || !pCFrm->IsProtected() )
{
- CompareNodeCntnt aAbsNew( pTOXSrc->GetIndex(), *pMark->GetStart() );
+ CompareNodeCntnt aAbsNew( pTOXSrc->GetIndex(), pMark->GetStart() );
switch( eDir )
{
// The following (a bit more complicated) statements make it
@@ -1150,7 +1150,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
pTOXSrc->getLayoutFrm( pDoc->GetCurrentLayout() ) &&
(!IsFromChapter() || ::lcl_FindChapterNode( *pTOXSrc, 0 ) == pOwnChapterNode ) &&
!pTOXSrc->HasHiddenParaField() &&
- !SwScriptInfo::IsInHiddenRange( *pTOXSrc, *pTxtMark->GetStart() ) )
+ !SwScriptInfo::IsInHiddenRange( *pTOXSrc, pTxtMark->GetStart() ) )
{
SwTOXSortTabBase* pBase = 0;
if(TOX_INDEX == eTOXTyp)
@@ -1160,7 +1160,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
if ( g_pBreakIt->GetBreakIter().is() )
{
aLocale = g_pBreakIt->GetLocale(
- pTOXSrc->GetLang( *pTxtMark->GetStart() ) );
+ pTOXSrc->GetLang( pTxtMark->GetStart() ) );
}
pBase = new SwTOXIndex( *pTOXSrc, pTxtMark,
@@ -1292,7 +1292,7 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode )
}
else if(GetCaptionDisplay() == CAPTION_NUMBER)
{
- pNew->SetEndIndex(*pTxtFld->GetStart() + 1);
+ pNew->SetEndIndex(pTxtFld->GetStart() + 1);
}
InsertSorted(pNew);
}
@@ -1696,7 +1696,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
{
SwTxtAttr* pAttr = pHints->GetStart(nHintIdx);
const sal_Int32 nTmpEnd = pAttr->End() ? *pAttr->End() : 0;
- if( nStartPos >= *pAttr->GetStart() &&
+ if( nStartPos >= pAttr->GetStart() &&
(nStartPos + 2) <= nTmpEnd &&
pAttr->Which() == RES_TXTATR_CHARFMT)
{
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index 428ddad5b44e..2d63872af828 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -32,7 +32,7 @@ bool CompareSwFtnIdxs::operator()(SwTxtFtn* const& lhs, SwTxtFtn* const& rhs) co
{
sal_uLong nIdxLHS = _SwTxtFtn_GetIndex( lhs );
sal_uLong nIdxRHS = _SwTxtFtn_GetIndex( rhs );
- return ( nIdxLHS == nIdxRHS && *lhs->GetStart() < *rhs->GetStart() ) || nIdxLHS < nIdxRHS;
+ return ( nIdxLHS == nIdxRHS && lhs->GetStart() < rhs->GetStart() ) || nIdxLHS < nIdxRHS;
}
void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 70f3ef8b857b..8e6bfd5b152c 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -76,7 +76,7 @@ void SwTextBoxHelper::create(SwFrmFmt* pShape)
if (sw::XTextRangeToSwPaM(aInternalPaM, xTextBox))
{
SwAttrSet aSet(pShape->GetAttrSet());
- SwFmtCntnt aCntnt(aInternalPaM.GetNode()->StartOfSectionNode());
+ SwFmtCntnt aCntnt(aInternalPaM.GetNode().StartOfSectionNode());
aSet.Put(aCntnt);
pShape->SetFmtAttr(aSet);
}
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index 4c08fd7dba30..db255aee7805 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -77,7 +77,7 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
}
const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( false );
const SwTxtAttr* pAttr = pTxtAttr;
- SwUpdateAttr aUpdateAttr( *pAttr->GetStart(),
+ SwUpdateAttr aUpdateAttr( pAttr->GetStart(),
*pAttr->End(),
RES_FMT_CHG );
((SwTxtNode*)pTxtNd)->ModifyNotification( &aUpdateAttr, &aUpdateAttr );
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index fd9f0137e907..55759345356d 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -754,7 +754,7 @@ SwDoc::CopyRange( SwPaM& rPam, SwPosition& rPos, const bool bCopyAll ) const
pDoc->GetNodes().GoPrevious( &aPam.GetMark()->nNode );
pNode->MakeEndIndex( &aPam.GetMark()->nContent );
- aPam.GetPoint()->nNode = *aPam.GetNode()->StartOfSectionNode();
+ aPam.GetPoint()->nNode = *aPam.GetNode().StartOfSectionNode();
pNode = pDoc->GetNodes().GoNext( &aPam.GetPoint()->nNode );
pNode->MakeStartIndex( &aPam.GetPoint()->nContent );
// move to desired position
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index fad6ee095773..ec985559728a 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1802,7 +1802,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor )
// - when there's another Line, we place it in that one
// - when a Line preceeds it, we place it in that one
{
- SwTableNode* pTblNd = rCursor.GetNode()->FindTableNode();
+ SwTableNode* pTblNd = rCursor.GetNode().FindTableNode();
if( pTblNd->GetTable().ISA( SwDDETable ))
return false;
@@ -1905,7 +1905,7 @@ bool SwDoc::DeleteCol( const SwCursor& rCursor )
SwEditShell* pESh = GetEditShell();
if( pESh )
{
- const SwNode* pNd = rCursor.GetNode()->FindTableBoxStartNode();
+ const SwNode* pNd = rCursor.GetNode().FindTableBoxStartNode();
pESh->ParkCrsr( SwNodeIndex( *pNd ) );
}
@@ -2196,7 +2196,7 @@ bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, bool bVert, sal_uInt16 nCnt,
sal_uInt16 SwDoc::MergeTbl( SwPaM& rPam )
{
// Check if the current cursor's Point/Mark are inside a Table
- SwTableNode* pTblNd = rPam.GetNode()->FindTableNode();
+ SwTableNode* pTblNd = rPam.GetNode().FindTableNode();
if( !pTblNd )
return TBLMERGE_NOSELECTION;
SwTable& rTable = pTblNd->GetTable();
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index aa267de1e22c..038281f3f400 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -129,7 +129,7 @@ static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
{
const SwPaM *pCurPam = &rCursor, *pSttPam = pCurPam;
do {
- const SwNode* pNd = pCurPam->GetNode()->FindTableBoxStartNode();
+ const SwNode* pNd = pCurPam->GetNode().FindTableBoxStartNode();
if( pNd )
{
SwTableBox* pBox = (SwTableBox*)pNd->FindTableNode()->GetTable().
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 6a04f88d83f2..8f80d9180bfb 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -217,7 +217,7 @@ SwFrm* SwNode2LayImpl::NextFrm()
{
while( pFlow->HasFollow() )
pFlow = pFlow->GetFollow();
- pRet = pFlow->GetFrm();
+ pRet = &(pFlow->GetFrm());
}
if( pRet->IsInSct() )
{
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 743d749dae32..3c1b3c1c9833 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -710,7 +710,7 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w )
SwTxtAttr* pHint = rHints.GetTextHint(i);
if (pHint->GetStart())
- writer.writeFormatAttribute("start", TMP_FORMAT, *pHint->GetStart());
+ writer.writeFormatAttribute("start", TMP_FORMAT, pHint->GetStart());
if (pHint->GetEnd())
writer.writeFormatAttribute("end", TMP_FORMAT, *pHint->GetEnd());
writer.writeFormatAttribute("whichId", TMP_FORMAT, pHint->Which());
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 11ffaf829f30..1734bb462572 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -692,7 +692,7 @@ const SwAnchoredObject* SwDrawContact::GetAnchoredObj( const SdrObject* _pSdrObj
{
if ( _pSdrObj->ISA(SwDrawVirtObj) )
{
- pRetAnchoredObj = static_cast<const SwDrawVirtObj*>(_pSdrObj)->GetAnchoredObj();
+ pRetAnchoredObj = &(static_cast<const SwDrawVirtObj*>(_pSdrObj)->GetAnchoredObj());
}
else if ( !_pSdrObj->ISA(SdrVirtObj) && !_pSdrObj->ISA(SwDrawVirtObj) )
{
@@ -725,7 +725,7 @@ SwAnchoredObject* SwDrawContact::GetAnchoredObj( SdrObject* _pSdrObj )
{
if ( _pSdrObj->ISA(SwDrawVirtObj) )
{
- pRetAnchoredObj = static_cast<SwDrawVirtObj*>(_pSdrObj)->AnchoredObj();
+ pRetAnchoredObj = &(static_cast<SwDrawVirtObj*>(_pSdrObj)->AnchoredObj());
}
else if ( !_pSdrObj->ISA(SdrVirtObj) && !_pSdrObj->ISA(SwDrawVirtObj) )
{
@@ -976,7 +976,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
if ( pDrawVirtObj->GetAnchorFrm() )
{
// #i34640# - determine correct page frame
- SwPageFrm* pPage = pDrawVirtObj->AnchoredObj()->FindPageFrmOfAnchor();
+ SwPageFrm* pPage = pDrawVirtObj->AnchoredObj().FindPageFrmOfAnchor();
if( pOldBoundRect && pPage )
{
SwRect aOldRect( *pOldBoundRect );
@@ -986,7 +986,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
aOldRect, PREP_FLY_LEAVE,true);
}
// #i34640# - include spacing for wrapping
- SwRect aRect( pDrawVirtObj->GetAnchoredObj()->GetObjRectWithSpaces() );
+ SwRect aRect( pDrawVirtObj->GetAnchoredObj().GetObjRectWithSpaces() );
if (aRect.HasArea() && pPage)
{
SwPageFrm* pPg = (SwPageFrm*)::FindPage( aRect, pPage );
@@ -1568,11 +1568,11 @@ void SwDrawContact::_InvalidateObjs( const bool _bUpdateSortedObjsList )
// 'virtual' drawing objects
if ( pDrawVirtObj->IsConnected() )
{
- pDrawVirtObj->AnchoredObj()->InvalidateObjPos();
+ pDrawVirtObj->AnchoredObj().InvalidateObjPos();
// #i28701#
if ( _bUpdateSortedObjsList )
{
- pDrawVirtObj->AnchoredObj()->UpdateObjInSortedList();
+ pDrawVirtObj->AnchoredObj().UpdateObjInSortedList();
}
}
}
@@ -1869,7 +1869,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
{
ClrContourCache( pDrawVirtObj );
}
- pFrm->AppendDrawObj( *(pDrawVirtObj->AnchoredObj()) );
+ pFrm->AppendDrawObj( pDrawVirtObj->AnchoredObj() );
pDrawVirtObj->ActionChanged();
}
@@ -1976,7 +1976,7 @@ void SwDrawContact::GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredOb
aDrawVirtObjsIter != maDrawVirtObjs.end();
++aDrawVirtObjsIter )
{
- _roAnchoredObjs.push_back( (*aDrawVirtObjsIter)->AnchoredObj() );
+ _roAnchoredObjs.push_back( &(*aDrawVirtObjsIter)->AnchoredObj() );
}
}
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 20ee723f6eb9..6e836f4e919a 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -153,7 +153,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const
pPam->GetPoint()->nContent = nPos;
}
- SwTxtNode * const pNd = pPam->GetNode()->GetTxtNode();
+ SwTxtNode * const pNd = pPam->GetNode().GetTxtNode();
if ( !pNd )
{
return false;
@@ -303,7 +303,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos,
// Found a beginning of a paragraph or a Blank,
// search for the word Kuerzel (Shortcut) in the Auto
- SwTxtNode* pTxtNd = rCrsr.GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = rCrsr.GetNode().GetTxtNode();
OSL_ENSURE( pTxtNd, "where is the TextNode?" );
bool bRet = false;
@@ -491,7 +491,7 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
for( n = 0; n < nSize; ++n )
{
SwTxtAttr* pHt = pTxtNd->GetpSwpHints()->GetTextHint( n );
- nAttrStart = *pHt->GetStart();
+ nAttrStart = pHt->GetStart();
if( nAttrStart > nStart ) // beyond the area
break;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index c39acfccd88b..dafa0a939ade 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1115,7 +1115,7 @@ bool SwAutoFormat::DeleteCurNxtPara( const OUString& rNxtPara )
m_aDelPam.SetMark();
m_aDelPam.GetPoint()->nNode++;
- SwTxtNode* pTNd = m_aDelPam.GetNode()->GetTxtNode();
+ SwTxtNode* pTNd = m_aDelPam.GetNode().GetTxtNode();
if( !pTNd )
{
// then delete only up to end of the paragraph
@@ -1148,7 +1148,7 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara )
m_aDelPam.SetMark();
m_aDelPam.GetMark()->nNode--;
- SwTxtNode* pTNd = m_aDelPam.GetNode( false )->GetTxtNode();
+ SwTxtNode* pTNd = m_aDelPam.GetNode( false ).GetTxtNode();
if( pTNd )
// first use the previous text node
m_aDelPam.GetMark()->nContent.Assign(pTNd, pTNd->GetTxt().getLength());
@@ -1156,7 +1156,7 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara )
{
// then try the next (at the beginning of a Doc, table cells, borders, ...)
m_aDelPam.GetMark()->nNode += 2;
- pTNd = m_aDelPam.GetNode( false )->GetTxtNode();
+ pTNd = m_aDelPam.GetNode( false ).GetTxtNode();
if( pTNd )
{
m_aDelPam.GetMark()->nContent.Assign( pTNd, 0 );
@@ -1221,7 +1221,7 @@ void SwAutoFormat::DelPrevPara()
m_aDelPam.SetMark();
m_aDelPam.GetPoint()->nNode--;
- SwTxtNode* pTNd = m_aDelPam.GetNode()->GetTxtNode();
+ SwTxtNode* pTNd = m_aDelPam.GetNode().GetTxtNode();
if( pTNd )
{
// use the previous text node first
@@ -1571,7 +1571,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
{
m_aDelPam.SetMark();
m_aDelPam.GetMark()->nNode++;
- m_aDelPam.GetNode(false)->GetTxtNode()->SetAttrListLevel( nLvl );
+ m_aDelPam.GetNode(false).GetTxtNode()->SetAttrListLevel( nLvl );
}
m_pCurTxtNd->SetAttrListLevel(nLvl);
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 0e52b380075e..1c0ac183b1b5 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -285,7 +285,7 @@ bool SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn )
{
// The cursor must be positioned on the current footnotes anchor:
SwPaM* pCrsr = GetCrsr();
- SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = pCrsr->GetNode().GetTxtNode();
if( !pTxtNd )
return false;
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index 47614f2c925b..854d31357b34 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -45,9 +45,9 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
// 1. Point and Mark are in one box, delete selection as usual
// 2. Point and Mark are in different boxes, search all selected boxes and delete content
// 3. Point and Mark are at the document start and end, Point is in a table: delete selection as usual
- if( rPam.GetNode()->FindTableNode() &&
- rPam.GetNode()->StartOfSectionNode() !=
- rPam.GetNode(false)->StartOfSectionNode() && !bSelectAll )
+ if( rPam.GetNode().FindTableNode() &&
+ rPam.GetNode().StartOfSectionNode() !=
+ rPam.GetNode(false).StartOfSectionNode() && !bSelectAll )
{
// group the Undo in the table
if( pUndo && !*pUndo )
@@ -59,8 +59,8 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
const SwPosition* pEndSelPos = rPam.End();
do {
aDelPam.SetMark();
- SwNode* pNd = aDelPam.GetNode();
- const SwNode& rEndNd = *pNd->EndOfSectionNode();
+ SwNode& rNd = aDelPam.GetNode();
+ const SwNode& rEndNd = *rNd.EndOfSectionNode();
if( pEndSelPos->nNode.GetIndex() <= rEndNd.GetIndex() )
{
*aDelPam.GetPoint() = *pEndSelPos;
@@ -73,8 +73,8 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
aDelPam.Move( fnMoveBackward, fnGoCntnt );
}
// skip protected boxes
- if( !pNd->IsCntntNode() ||
- !pNd->IsInProtectSect() )
+ if( !rNd.IsCntntNode() ||
+ !rNd.IsInProtectSect() )
{
// delete everything
GetDoc()->DeleteAndJoin( aDelPam );
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index c536aab51521..2746b725290c 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -290,7 +290,7 @@ bool SwEditShell::GetGrfSize(Size& rSz) const
SwPaM* pCurrentCrsr = GetCrsr();
if( ( !pCurrentCrsr->HasMark()
|| pCurrentCrsr->GetPoint()->nNode == pCurrentCrsr->GetMark()->nNode )
- && 0 != ( pNoTxtNd = pCurrentCrsr->GetNode()->GetNoTxtNode() ) )
+ && 0 != ( pNoTxtNd = pCurrentCrsr->GetNode().GetNoTxtNode() ) )
{
rSz = pNoTxtNd->GetTwipSize();
return true;
@@ -326,13 +326,13 @@ void SwEditShell::GetGrfNms( OUString* pGrfName, OUString* pFltName,
const PolyPolygon *SwEditShell::GetGraphicPolygon() const
{
- SwNoTxtNode *pNd = GetCrsr()->GetNode()->GetNoTxtNode();
+ SwNoTxtNode *pNd = GetCrsr()->GetNode().GetNoTxtNode();
return pNd->HasContour();
}
void SwEditShell::SetGraphicPolygon( const PolyPolygon *pPoly )
{
- SwNoTxtNode *pNd = GetCrsr()->GetNode()->GetNoTxtNode();
+ SwNoTxtNode *pNd = GetCrsr()->GetNode().GetNoTxtNode();
StartAllAction();
pNd->SetContour( pPoly );
SwFlyFrm *pFly = (SwFlyFrm*)pNd->getLayoutFrm(GetLayout())->GetUpper();
@@ -344,7 +344,7 @@ void SwEditShell::SetGraphicPolygon( const PolyPolygon *pPoly )
void SwEditShell::ClearAutomaticContour()
{
- SwNoTxtNode *pNd = GetCrsr()->GetNode()->GetNoTxtNode();
+ SwNoTxtNode *pNd = GetCrsr()->GetNode().GetNoTxtNode();
OSL_ENSURE( pNd, "is no NoTxtNode!" );
if( pNd->HasAutomaticContour() )
{
@@ -372,7 +372,7 @@ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const
GetCrsr()->GetPoint()->nNode == GetCrsr()->GetMark()->nNode),
"GetOLEObj: no OLENode." );
- SwOLENode *pOLENode = GetCrsr()->GetNode()->GetOLENode();
+ SwOLENode *pOLENode = GetCrsr()->GetNode().GetOLENode();
OSL_ENSURE( pOLENode, "GetOLEObj: no OLENode." );
SwOLEObj& rOObj = pOLENode->GetOLEObj();
return rOObj.GetObject();
@@ -398,7 +398,7 @@ bool SwEditShell::HasOLEObj( const OUString &rName ) const
void SwEditShell::SetChartName( const OUString &rName )
{
- SwOLENode *pONd = GetCrsr()->GetNode()->GetOLENode();
+ SwOLENode *pONd = GetCrsr()->GetNode().GetOLENode();
OSL_ENSURE( pONd, "ChartNode not found" );
pONd->SetChartTblName( rName );
}
@@ -418,7 +418,7 @@ void SwEditShell::SetTableName( SwFrmFmt& rTblFmt, const OUString &rNewName )
OUString SwEditShell::GetCurWord()
{
const SwPaM& rPaM = *GetCrsr();
- const SwTxtNode* pNd = rPaM.GetNode()->GetTxtNode();
+ const SwTxtNode* pNd = rPaM.GetNode().GetTxtNode();
OUString aString = pNd ?
pNd->GetCurWord(rPaM.GetPoint()->nContent.GetIndex()) :
OUString();
@@ -489,7 +489,7 @@ OUString SwEditShell::GetDropTxt( const sal_uInt16 nChars ) const
}
}
- SwTxtNode* pTxtNd = pCrsr->GetNode( !pCrsr->HasMark() )->GetTxtNode();
+ SwTxtNode* pTxtNd = pCrsr->GetNode( !pCrsr->HasMark() ).GetTxtNode();
if( pTxtNd )
{
sal_Int32 nDropLen = pTxtNd->GetDropLen( nChars );
@@ -504,7 +504,7 @@ void SwEditShell::ReplaceDropTxt( const OUString &rStr, SwPaM* pPaM )
{
SwPaM* pCrsr = pPaM ? pPaM : GetCrsr();
if( pCrsr->GetPoint()->nNode == pCrsr->GetMark()->nNode &&
- pCrsr->GetNode()->GetTxtNode()->IsTxtNode() )
+ pCrsr->GetNode().GetTxtNode()->IsTxtNode() )
{
StartAllAction();
@@ -528,7 +528,7 @@ OUString SwEditShell::Calculate()
const CharClass& rCC = GetAppCharClass();
do {
- SwTxtNode* pTxtNd = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = pPaM->GetNode().GetTxtNode();
if(pTxtNd)
{
const SwPosition *pStart = pPaM->Start(), *pEnd = pPaM->End();
@@ -591,7 +591,7 @@ sfx2::LinkManager& SwEditShell::GetLinkManager()
void *SwEditShell::GetIMapInventor() const
{
// The node on which the cursor points should be sufficient as a unique identifier
- return (void*)GetCrsr()->GetNode();
+ return (void*)&(GetCrsr()->GetNode());
}
// #i73788#
@@ -603,10 +603,10 @@ Graphic SwEditShell::GetIMapGraphic() const
SwPaM* pCrsr = GetCrsr();
if ( !pCrsr->HasMark() )
{
- SwNode *pNd =pCrsr->GetNode();
- if( pNd->IsGrfNode() )
+ SwNode& rNd =pCrsr->GetNode();
+ if( rNd.IsGrfNode() )
{
- SwGrfNode & rGrfNode(*static_cast<SwGrfNode*>(pNd));
+ SwGrfNode & rGrfNode(static_cast<SwGrfNode&>(rNd));
const Graphic& rGrf = rGrfNode.GetGrf();
if( rGrf.IsSwapOut() || ( rGrfNode.IsLinkedFile() &&
GRAPHIC_DEFAULT == rGrf.GetType() ) )
@@ -617,13 +617,13 @@ Graphic SwEditShell::GetIMapGraphic() const
}
aRet = rGrf;
}
- else if ( pNd->IsOLENode() )
+ else if ( rNd.IsOLENode() )
{
- aRet = *((SwOLENode*)pNd)->GetGraphic();
+ aRet = *((SwOLENode&)rNd).GetGraphic();
}
else
{
- SwFlyFrm* pFlyFrm = pNd->GetCntntNode()->getLayoutFrm( GetLayout() )->FindFlyFrm();
+ SwFlyFrm* pFlyFrm = rNd.GetCntntNode()->getLayoutFrm( GetLayout() )->FindFlyFrm();
if(pFlyFrm)
aRet = pFlyFrm->GetFmt()->MakeGraphic();
}
@@ -700,8 +700,8 @@ sal_uInt16 SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
pTxtNd->GetNodes().IsDocNodes() )
{
SwTxtINetFmt& rAttr = *pFnd;
- OUString sTxt( pTxtNd->GetExpandTxt( *rAttr.GetStart(),
- *rAttr.GetEnd() - *rAttr.GetStart() ) );
+ OUString sTxt( pTxtNd->GetExpandTxt( rAttr.GetStart(),
+ *rAttr.GetEnd() - rAttr.GetStart() ) );
sTxt = comphelper::string::remove(sTxt, 0x0a);
sTxt = comphelper::string::strip(sTxt, ' ');
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 713f6519ba18..efa5650e5cbe 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1260,7 +1260,7 @@ static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell* pSh)
{
SwPaM *pCrsr = pSh->GetCrsr();
const SwPosition* pStartPos = pCrsr->Start();
- const SwTxtNode* pTxtNode = pCrsr->GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNode = pCrsr->GetNode().GetTxtNode();
sal_uInt16 nAct = pDoc->GetRedlinePos( *pTxtNode, USHRT_MAX );
const sal_Int32 nStartIndex = pStartPos->nContent.GetIndex();
@@ -1425,7 +1425,7 @@ bool SwSpellIter::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammar
pMySh->GoEndSentence();
if( bGrammarErrorFound )
{
- const ModelToViewHelper aConversionMap(*(SwTxtNode*)pCrsr->GetNode());
+ const ModelToViewHelper aConversionMap((SwTxtNode&)pCrsr->GetNode());
OUString aExpandText = aConversionMap.getViewText();
sal_Int32 nSentenceEnd =
aConversionMap.ConvertToViewPosition( aGrammarResult.nBehindEndOfSentencePosition );
@@ -1619,7 +1619,7 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt,
// iterate over the text to find changes in language
// set the mark equal to the point
*pCrsr->GetMark() = aStart;
- SwTxtNode* pTxtNode = pCrsr->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = pCrsr->GetNode().GetTxtNode();
LanguageType eStartLanguage = lcl_GetLanguage(*GetSh());
SpellContentPosition aNextRedline = lcl_FindNextDeletedRedline(
rDeletedRedlines, aStart.nContent.GetIndex() );
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index c86790175399..1f36489f98d7 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -414,7 +414,7 @@ int SwEditShell::GetCurrentParaOutlineLevel( ) const
int nLevel = 0;
SwPaM* pCrsr = GetCrsr();
- const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = pCrsr->GetNode().GetTxtNode();
if( pTxtNd )
nLevel = pTxtNd->GetAttrOutlineLevel();
return nLevel;
@@ -472,9 +472,9 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft )
}
else // move down
{
- const SwNumRule* pOrig = aCrsr.GetNode(false)->GetTxtNode()->GetNumRule();
- if( aCrsr.GetNode()->IsTxtNode() &&
- pOrig == aCrsr.GetNode()->GetTxtNode()->GetNumRule() )
+ const SwNumRule* pOrig = aCrsr.GetNode(false).GetTxtNode()->GetNumRule();
+ if( aCrsr.GetNode().IsTxtNode() &&
+ pOrig == aCrsr.GetNode().GetTxtNode()->GetNumRule() )
{
sal_uLong nStt = aCrsr.GetPoint()->nNode.GetIndex(), nIdx = nStt+1;
@@ -654,7 +654,7 @@ bool SwEditShell::IsNoNum( bool bChkStart ) const
&& !HasSelection()
&& ( !bChkStart || IsSttPara() ) )
{
- const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = GetCrsr()->GetNode().GetTxtNode();
if ( pTxtNd != NULL )
{
bResult = !pTxtNd->IsCountedInList();
@@ -670,7 +670,7 @@ sal_uInt8 SwEditShell::GetNumLevel() const
sal_uInt8 nLevel = MAXLEVEL;
SwPaM* pCrsr = GetCrsr();
- const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = pCrsr->GetNode().GetTxtNode();
OSL_ENSURE( pTxtNd, "GetNumLevel() without text node" );
if ( pTxtNd == NULL )
@@ -811,7 +811,7 @@ bool SwEditShell::IsNumRuleStart( SwPaM* pPaM ) const
{
bool bResult = false;
SwPaM* pCrsr = pPaM ? pPaM : GetCrsr( );
- const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = pCrsr->GetNode().GetTxtNode();
if( pTxtNd )
bResult = pTxtNd->IsListRestart() ? sal_True : sal_False;
return bResult;
@@ -840,7 +840,7 @@ void SwEditShell::SetNodeNumStart( sal_uInt16 nStt, SwPaM* pPaM )
sal_uInt16 SwEditShell::GetNodeNumStart( SwPaM* pPaM ) const
{
SwPaM* pCrsr = pPaM ? pPaM : GetCrsr();
- const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = pCrsr->GetNode().GetTxtNode();
// correction: check, if list restart value is set at text node and
// use new method <SwTxtNode::GetAttrListRestartValue()>.
// return USHRT_MAX, if no list restart value is found.
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index fec6777ae923..3efe0e9cd924 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -429,7 +429,7 @@ bool SwEditShell::SplitTable( sal_uInt16 eMode )
{
bool bRet = false;
SwPaM *pCrsr = GetCrsr();
- if( pCrsr->GetNode()->FindTableNode() )
+ if( pCrsr->GetNode().FindTableNode() )
{
StartAllAction();
GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
@@ -447,7 +447,7 @@ bool SwEditShell::MergeTable( bool bWithPrev, sal_uInt16 nMode )
{
bool bRet = false;
SwPaM *pCrsr = GetCrsr();
- if( pCrsr->GetNode()->FindTableNode() )
+ if( pCrsr->GetNode().FindTableNode() )
{
StartAllAction();
GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
@@ -465,7 +465,7 @@ bool SwEditShell::CanMergeTable( bool bWithPrev, bool* pChkNxtPrv ) const
{
bool bRet = false;
const SwPaM *pCrsr = GetCrsr();
- const SwTableNode* pTblNd = pCrsr->GetNode()->FindTableNode();
+ const SwTableNode* pTblNd = pCrsr->GetNode().FindTableNode();
if( pTblNd && !pTblNd->GetTable().ISA( SwDDETable ))
{
bool bNew = pTblNd->GetTable().IsNewModel();
diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx
index 4d6f493a0db1..8be5eaad765a 100644
--- a/sw/source/core/edit/edws.cxx
+++ b/sw/source/core/edit/edws.cxx
@@ -118,7 +118,7 @@ sal_uInt16 SwEditShell::GetCntType() const
if( IsTableMode() )
nRet = CNT_TXT;
else
- switch( GetCrsr()->GetNode()->GetNodeType() )
+ switch( GetCrsr()->GetNode().GetNodeType() )
{
case ND_TEXTNODE: nRet = CNT_TXT; break;
case ND_GRFNODE: nRet = CNT_GRF; break;
@@ -246,7 +246,7 @@ void SwEditShell::AutoCorrect( SvxAutoCorrect& rACorr, bool bInsert,
StartAllAction();
SwPaM* pCrsr = getShellCrsr( true );
- SwTxtNode* pTNd = pCrsr->GetNode()->GetTxtNode();
+ SwTxtNode* pTNd = pCrsr->GetNode().GetTxtNode();
SwAutoCorrDoc aSwAutoCorrDoc( *this, *pCrsr, cChar );
// FIXME: this _must_ be called with reference to the actual node text!
@@ -271,7 +271,7 @@ bool SwEditShell::GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, OUString& rWord )
bool bRet;
SwPaM* pCrsr = getShellCrsr( true );
const sal_Int32 nPos = pCrsr->GetPoint()->nContent.GetIndex();
- SwTxtNode* pTNd = pCrsr->GetNode()->GetTxtNode();
+ SwTxtNode* pTNd = pCrsr->GetNode().GetTxtNode();
if( pTNd && nPos )
{
SwAutoCorrDoc aSwAutoCorrDoc( *this, *pCrsr, 0 );
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index d947cebad397..d0fd69dbe32f 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -217,8 +217,8 @@ bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
{
sal_uLong nNdPos = pNd->GetIndex();
if( nSttNd <= nNdPos && nNdPos <= nEndNd &&
- ( nNdPos != nSttNd || *pTFld->GetStart() >= nStt ) &&
- ( nNdPos != nEndNd || *pTFld->GetStart() < nEnd ))
+ ( nNdPos != nSttNd || pTFld->GetStart() >= nStt ) &&
+ ( nNdPos != nEndNd || pTFld->GetStart() < nEnd ))
return true;
}
}
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 35e32aa1e461..45262262dd52 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -212,7 +212,7 @@ const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos,
const SwTxtFtn* pFtn = ((SwFtnFrm*)pLayout)->GetAttr();
pTxtNode = &pFtn->GetTxtNode();
rPos.nNode = *pTxtNode;
- rPos.nContent = *pFtn->GetStart();
+ rPos.nContent = pFtn->GetStart();
}
else if( pLayout->IsHeaderFrm() || pLayout->IsFooterFrm() )
{
@@ -873,7 +873,7 @@ sal_Int32 SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc,
const SwTxtFld* pTxtFld = rFmt.GetTxtFld();
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
- sal_Int32 nRet = nHint ? nHint : *pTxtFld->GetStart() + 1;
+ sal_Int32 nRet = nHint ? nHint : pTxtFld->GetStart() + 1;
OUString sNodeText = rTxtNode.GetTxt();
if(nRet<sNodeText.getLength())
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 66d354d5ac9f..91aab4cceb70 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -134,7 +134,7 @@ SwPosition SwAnnotationItem::GetAnchorPosition() const
SwTxtNode* pTxtNode = pTxtFld->GetpTxtNode();
SwPosition aPos( *pTxtNode );
- aPos.nContent.Assign( pTxtNode, *(pTxtFld->GetStart()) );
+ aPos.nContent.Assign( pTxtNode, pTxtFld->GetStart() );
return aPos;
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index f3205dfb69a3..18b85c50c0ed 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -464,13 +464,13 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
// first a "short" test - in case both are in the same node
if( pFldTxtAttr->GetpTxtNode() == pTxtNd )
{
- sTxt = nNumStart < *pFldTxtAttr->GetStart()
+ sTxt = nNumStart < pFldTxtAttr->GetStart()
? aLocaleData.getAboveWord()
: aLocaleData.getBelowWord();
break;
}
- sTxt = ::IsFrameBehind( *pFldTxtAttr->GetpTxtNode(), *pFldTxtAttr->GetStart(),
+ sTxt = ::IsFrameBehind( *pFldTxtAttr->GetpTxtNode(), pFldTxtAttr->GetStart(),
*pTxtNd, nNumStart )
? aLocaleData.getAboveWord()
: aLocaleData.getBelowWord();
@@ -800,7 +800,7 @@ void SwGetRefFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
pTFld->GetpTxtNode() )
{
pGRef->SetLanguage( pTFld->GetpTxtNode()->GetLang(
- *pTFld->GetStart() ) );
+ pTFld->GetStart() ) );
}
// #i81002#
@@ -826,7 +826,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark,
if( pRef && pRef->GetTxtRefMark() )
{
pTxtNd = (SwTxtNode*)&pRef->GetTxtRefMark()->GetTxtNode();
- *pStt = *pRef->GetTxtRefMark()->GetStart();
+ *pStt = pRef->GetTxtRefMark()->GetStart();
if( pEnd )
*pEnd = *pRef->GetTxtRefMark()->GetAnyEnd();
}
@@ -847,7 +847,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark,
{
SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
pTxtNd = (SwTxtNode*)pTxtFld->GetpTxtNode();
- *pStt = *pTxtFld->GetStart();
+ *pStt = pTxtFld->GetStart();
if( pEnd )
*pEnd = (*pStt) + 1;
break;
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 2dfa6a9c08ad..c980082b5b82 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -348,11 +348,11 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
else
{
SwPaM *pCrsr = pDestShell->GetCrsr();
- if( pCrsr->GetNode()->IsNoTxtNode() )
+ if( pCrsr->GetNode().IsNoTxtNode() )
bRet = false;
else
bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(),
- *pCrsr->GetNode(), 0, rInsPt,
+ pCrsr->GetNode(), 0, rInsPt,
*pDestShell, aAnchor,
aNewAnch, false );
}
@@ -506,10 +506,10 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
else
{
const SwPaM *pCrsr = pDestShell->GetCrsr();
- if( pCrsr->GetNode()->IsNoTxtNode() )
+ if( pCrsr->GetNode().IsNoTxtNode() )
bRet = false;
else
- bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), *pCrsr->GetNode(),
+ bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), pCrsr->GetNode(),
pFly, rInsPt, *pDestShell, aAnchor,
aNewAnch, GetDoc() == pDestShell->GetDoc());
}
@@ -587,7 +587,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
if( !pDstPos->nNode.GetNode().IsNoTxtNode() )
bRet = true;
}
- else if( !pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() )
+ else if( !pDestShell->GetCrsr()->GetNode().IsNoTxtNode() )
{
pDstPos = new SwPosition( *pDestShell->GetCrsr()->GetPoint() );
bRet = true;
@@ -631,7 +631,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
GetLayout()->GetCrsrOfst( &aPos, aPt );
bRet = !aPos.nNode.GetNode().IsNoTxtNode();
}
- else if( pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() )
+ else if( pDestShell->GetCrsr()->GetNode().IsNoTxtNode() )
bRet = false;
if( bRet )
@@ -682,10 +682,10 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
// (individual boxes in the area are retrieved via the layout)
SwFieldType* pTblFldTyp = GetDoc()->GetSysFldType( RES_TABLEFLD );
- SwTableNode *pDestNd, *pSrcNd = aCpyPam.GetNode()->GetTableNode();
+ SwTableNode *pDestNd, *pSrcNd = aCpyPam.GetNode().GetTableNode();
if( !pSrcNd ) // TabellenNode ?
{ // nicht ueberspringen!!
- SwCntntNode* pCNd = aCpyPam.GetNode()->GetCntntNode();
+ SwCntntNode* pCNd = aCpyPam.GetNode().GetCntntNode();
if( pCNd )
aCpyPam.GetPoint()->nContent.Assign( pCNd, 0 );
else if( !aCpyPam.Move( fnMoveForward, fnGoNode ))
@@ -819,7 +819,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
SwPosition aDestPos( *PCURCRSR->GetPoint() );
bool bParkTblCrsr = false;
- const SwStartNode* pSttNd = PCURCRSR->GetNode()->FindTableBoxStartNode();
+ const SwStartNode* pSttNd = PCURCRSR->GetNode().FindTableBoxStartNode();
// TABLE IN TABLE: copy table in table
// search boxes via the layout
@@ -959,7 +959,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
else if( FLY_AT_FLY == aAnchor.GetAnchorId() )
{
Point aPt;
- lcl_SetAnchor( *PCURCRSR->GetPoint(), *PCURCRSR->GetNode(),
+ lcl_SetAnchor( *PCURCRSR->GetPoint(), PCURCRSR->GetNode(),
0, aPt, *this, aAnchor, aPt, false );
}
@@ -1133,7 +1133,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1
return false;
}
//if the page starts with a table a paragraph has to be inserted before
- SwNode* pTableNode = aCpyPam.GetNode()->FindTableNode();
+ SwNode* pTableNode = aCpyPam.GetNode().FindTableNode();
if(pTableNode)
{
//insert a paragraph
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 25c329ffcf15..cb1c552b471e 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -774,7 +774,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName,
case FLY_AT_FLY:
if( !pAnchor->GetCntntAnchor() )
{
- lcl_SetNewFlyPos( *pCursor->GetNode(),
+ lcl_SetNewFlyPos( pCursor->GetNode(),
*pAnchor, GetCrsrDocPos() );
}
break;
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index b12762b31d12..0b104a395a21 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -452,7 +452,7 @@ sal_uInt16 SwFEShell::MergeTab()
if( IsTableMode() )
{
SwShellTableCrsr* pTableCrsr = GetTableCrsr();
- const SwTableNode* pTblNd = pTableCrsr->GetNode()->FindTableNode();
+ const SwTableNode* pTblNd = pTableCrsr->GetNode().FindTableNode();
if( pTblNd->GetTable().ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
@@ -884,7 +884,7 @@ bool SwFEShell::HasBoxSelection() const
}
SwNode* pNd;
if( pPam->GetPoint()->nNode.GetIndex() -1 ==
- ( pNd = pPam->GetNode())->StartOfSectionIndex() &&
+ ( pNd = &pPam->GetNode())->StartOfSectionIndex() &&
!pPam->GetPoint()->nContent.GetIndex() &&
pPam->GetMark()->nNode.GetIndex() + 1 ==
pNd->EndOfSectionIndex())
@@ -2081,7 +2081,7 @@ static bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp )
OSL_ENSURE( pShell != NULL, "need shell" );
SwPaM* pPam = pShell->GetCrsr();
- const SwStartNode* pTableBox = pPam->GetNode()->FindTableBoxStartNode();
+ const SwStartNode* pTableBox = pPam->GetNode().FindTableBoxStartNode();
OSL_ENSURE( pTableBox != NULL, "I'm living in a box... NOT!" );
// move cursor to start node of table box
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 2d94ddfbe82c..e69b80f7c9df 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -161,7 +161,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
// Row-selection:
// Check for complex tables. If Yes, search selected boxes via
// the layout. Otherwise via the table structure (for macros !!)
- const SwCntntNode* pContentNd = rCrsr.GetNode()->GetCntntNode();
+ const SwCntntNode* pContentNd = rCrsr.GetNode().GetCntntNode();
const SwTableNode* pTblNd = pContentNd ? pContentNd->FindTableNode() : 0;
if( pTblNd && pTblNd->GetTable().IsNewModel() )
{
@@ -182,8 +182,8 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const SwTable& rTbl = pTblNd->GetTable();
const SwTableLines& rLines = rTbl.GetTabLines();
- const SwNode* pMarkNode = rCrsr.GetNode( false );
- const sal_uLong nMarkSectionStart = pMarkNode->StartOfSectionIndex();
+ const SwNode& rMarkNode = rCrsr.GetNode( false );
+ const sal_uLong nMarkSectionStart = rMarkNode.StartOfSectionIndex();
const SwTableBox* pMarkBox = rTbl.GetTblBox( nMarkSectionStart );
OSL_ENSURE( pMarkBox, "Point in table, mark outside?" );
@@ -191,7 +191,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : 0;
sal_uInt16 nSttPos = rLines.GetPos( pLine );
OSL_ENSURE( USHRT_MAX != nSttPos, "Where is my row in the table?" );
- pLine = rTbl.GetTblBox( rCrsr.GetNode( true )->StartOfSectionIndex() )->GetUpper();
+ pLine = rTbl.GetTblBox( rCrsr.GetNode( true ).StartOfSectionIndex() )->GetUpper();
sal_uInt16 nEndPos = rLines.GetPos( pLine );
OSL_ENSURE( USHRT_MAX != nEndPos, "Where is my row in the table?" );
// pb: #i20193# if tableintable then nSttPos == nEndPos == USHRT_MAX
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index bae445ada61d..c1339634c1db 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -86,7 +86,7 @@ public:
void UpdatePageNum(); // insert page numbering
TYPEINFO_OVERRIDE(); // for rtti
- SwTOXSortTabBases* GetTOXSortTabBases() { return &aSortArr; }
+ SwTOXSortTabBases& GetTOXSortTabBases() { return aSortArr; }
bool SetPosAtStartEnd( SwPosition& rPos, bool bAtStart = true ) const;
};
diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx
index 13b1db252057..489119fa7446 100644
--- a/sw/source/core/inc/flowfrm.hxx
+++ b/sw/source/core/inc/flowfrm.hxx
@@ -145,8 +145,8 @@ public:
SwFlowFrm( SwFrm &rFrm );
virtual ~SwFlowFrm();
- const SwFrm *GetFrm() const { return &m_rThis; }
- SwFrm *GetFrm() { return &m_rThis; }
+ const SwFrm& GetFrm() const { return m_rThis; }
+ SwFrm& GetFrm() { return m_rThis; }
static bool IsMoveBwdJump() { return m_bMoveBwdJump; }
static void SetMoveBwdJump( bool bNew ){ m_bMoveBwdJump = bNew; }
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index b3adc89ef259..106b7076ecfa 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -93,8 +93,8 @@ public:
virtual ~SwFntObj();
inline Font *GetScrFont() { return pScrFont; }
- inline Font *GetFont() { return &aFont; }
- inline const Font *GetFont() const { return &aFont; }
+ inline Font& GetFont() { return aFont; }
+ inline const Font& GetFont() const { return aFont; }
inline sal_uInt16 GetGuessedLeading() const { return nGuessedLeading; }
inline sal_uInt16 GetExtLeading() const { return nExtLeading; }
diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx
index 5bb84ba74904..24b39d0405c7 100644
--- a/sw/source/core/inc/swfntcch.hxx
+++ b/sw/source/core/inc/swfntcch.hxx
@@ -59,8 +59,8 @@ public:
virtual ~SwFontObj();
- inline SwFont *GetFont() { return &aSwFont; }
- inline const SwFont *GetFont() const { return &aSwFont; }
+ inline SwFont& GetFont() { return aSwFont; }
+ inline const SwFont& GetFont() const { return aSwFont; }
inline const SfxPoolItem** GetDefault() { return pDefaultArray; }
};
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 869f5a3bf289..7910135c2951 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1122,7 +1122,7 @@ void SwCntntFrm::MakeAll()
if ( GetUpper()->IsSctFrm() &&
HasFollow() &&
- GetFollow()->GetFrm() == GetNext() )
+ &GetFollow()->GetFrm() == GetNext() )
{
dynamic_cast<SwTxtFrm&>(*this).JoinFrm();
}
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 7a7441e25d67..233f0e6dc3c8 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -194,7 +194,7 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
{
SwFrm *pNxt;
if( 0 != (pNxt = m_rThis.FindNextCnt()) &&
- (!m_pFollow || pNxt != m_pFollow->GetFrm()))
+ (!m_pFollow || pNxt != &m_pFollow->GetFrm()))
{
// #135914#
// The last row of a table only keeps with the next content
@@ -277,7 +277,7 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe
// do a test formatting, because paragraph bound objects wouldn't
// be properly considered, and character bound objects shouldn't
// be test formatted at all.
- if( pTmp->GetFrm()->GetDrawObjs() )
+ if( pTmp->GetFrm().GetDrawObjs() )
nRet = 1;
pTmp = pTmp->GetFollow();
} while ( !nRet && pTmp );
@@ -831,10 +831,10 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
// Did we find ourselves?
if( pNewFlow == pFlow )
pNewFlow = NULL;
- if ( pNewFlow && pNewFlow->GetFrm()->IsInTab() )
- pNewFlow = pNewFlow->GetFrm()->FindTabFrm();
+ if ( pNewFlow && pNewFlow->GetFrm().IsInTab() )
+ pNewFlow = pNewFlow->GetFrm().FindTabFrm();
const SwPageDesc *pNewDesc= ( pNewFlow && !pNewFlow->IsFollow() )
- ? pNewFlow->GetFrm()->GetAttrSet()->GetPageDesc().GetPageDesc() : 0;
+ ? pNewFlow->GetFrm().GetAttrSet()->GetPageDesc().GetPageDesc() : 0;
return (pNew->GetPageDesc() != pDesc) // own desc ?
|| (pNew->GetFmt() !=
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 513efae5144c..0ca29c21f5fc 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -1351,7 +1351,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
pCnt->GetNode()->GetTxtNode()->GetTxtAttrAt( pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTxtNode::PARENT );
if ( pTxtInputFld != NULL )
{
- pPos->nContent = *(pTxtInputFld->GetStart());
+ pPos->nContent = pTxtInputFld->GetStart();
}
}
ResetLastCharRectHeight();
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index daa1205d2d5f..849d29c74fa2 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1679,16 +1679,16 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
if( pTmp )
{
- SwFrm* pOldUp = pTmp->GetFrm()->GetUpper();
+ SwFrm* pOldUp = pTmp->GetFrm().GetUpper();
// MoveFwd==sal_True means that we are still on the same page.
// But since we want to move if possible!
bool bTmpOldLock = pTmp->IsJoinLocked();
pTmp->LockJoin();
while( pTmp->MoveFwd( true, false, true ) )
{
- if( pOldUp == pTmp->GetFrm()->GetUpper() )
+ if( pOldUp == pTmp->GetFrm().GetUpper() )
break;
- pOldUp = pTmp->GetFrm()->GetUpper();
+ pOldUp = pTmp->GetFrm().GetUpper();
}
if( !bTmpOldLock )
pTmp->UnlockJoin();
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index bffbb1481ad5..70d79fc7ce9c 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2825,7 +2825,7 @@ SwCntntFrm* SwFtnFrm::GetRefFromAttr()
{
OSL_ENSURE( pAttr, "invalid Attribute" );
SwTxtNode& rTNd = (SwTxtNode&)pAttr->GetTxtNode();
- SwPosition aPos( rTNd, SwIndex( &rTNd, *pAttr->GetStart() ));
+ SwPosition aPos( rTNd, SwIndex( &rTNd, pAttr->GetStart() ));
SwCntntFrm* pCFrm = rTNd.getLayoutFrm( getRootFrm(), 0, &aPos, false );
return pCFrm;
}
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index baa24c18aaf2..6d405a1cd064 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -922,7 +922,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
// skip fly frames from pages before the current page
while( nFlyIdx < nFlyCount &&
- pImpl->GetFlyCache(nFlyIdx)->nPageNum < nPgNum )
+ pImpl->GetFlyCache(nFlyIdx).nPageNum < nPgNum )
++nFlyIdx;
// sort cached objects on this page by ordnum
@@ -931,7 +931,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
SwFlyCache* pFlyC;
while( nIdx < nFlyCount &&
- ( pFlyC = pImpl->GetFlyCache( nIdx ) )->nPageNum == nPgNum )
+ ( pFlyC = &pImpl->GetFlyCache( nIdx ) )->nPageNum == nPgNum )
{
aFlyCacheSet.insert( pFlyC );
++nIdx;
@@ -1016,11 +1016,11 @@ bool SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
// skip fly frames from pages before the current page
while( nIdx < nCnt &&
- nPgNum > (pFlyC = pCache->GetFlyCache( nIdx ))->nPageNum )
+ nPgNum > (pFlyC = &pCache->GetFlyCache( nIdx ))->nPageNum )
++nIdx;
while( nIdx < nCnt &&
- nOrdNum != (pFlyC = pCache->GetFlyCache( nIdx ))->nOrdNum )
+ nOrdNum != (pFlyC = &pCache->GetFlyCache( nIdx ))->nOrdNum )
++nIdx;
if( nIdx < nCnt )
{
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index bb8728354872..493e40962450 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -66,7 +66,7 @@ public:
sal_uInt16 GetBreakType( sal_uInt16 nIdx ) const { return aType[ nIdx ]; }
sal_uInt16 GetFlyCount() const { return aFlyCache.size(); }
- SwFlyCache *GetFlyCache( sal_uInt16 nIdx ) { return &aFlyCache[ nIdx ]; }
+ SwFlyCache& GetFlyCache( sal_uInt16 nIdx ) { return aFlyCache[ nIdx ]; }
bool IsUseFlyCache() const { return bUseFlyCache; }
};
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index 87201c552018..b485c84c9094 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -446,7 +446,7 @@ bool SwLayouter::MoveBwdSuppressed( const SwDoc& p_rDoc,
// create hash map key
tMoveBwdLayoutInfoKey aMoveBwdLayoutInfo;
- aMoveBwdLayoutInfo.mnFrmId = p_rFlowFrm.GetFrm()->GetFrmId();
+ aMoveBwdLayoutInfo.mnFrmId = p_rFlowFrm.GetFrm().GetFrmId();
aMoveBwdLayoutInfo.mnNewUpperPosX = p_rNewUpperFrm.Frm().Pos().X();
aMoveBwdLayoutInfo.mnNewUpperPosY = p_rNewUpperFrm.Frm().Pos().Y();
aMoveBwdLayoutInfo.mnNewUpperWidth = p_rNewUpperFrm.Frm().Width();
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 35634f431bec..d046fb4b311e 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -148,7 +148,7 @@ public:
SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
const SwTabFrm *pT , const sal_uInt8 nSCol );
- const Color *GetColor() const { return &aColor;}
+ const Color& GetColor() const { return aColor;}
SvxBorderStyle GetStyle() const { return nStyle; }
const SwTabFrm *GetTab() const { return pTab; }
void SetPainted() { bPainted = true; }
@@ -661,8 +661,7 @@ void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const Svx
if ( rLRect.GetTab() == pTab &&
!rLRect.IsPainted() && rLRect.GetSubColor() == nSCol &&
(rLRect.Height() > rLRect.Width()) == (rRect.Height() > rRect.Width()) &&
- ((!rLRect.GetColor() && !pCol) ||
- (rLRect.GetColor() && pCol && *rLRect.GetColor() == *pCol)) )
+ (pCol && rLRect.GetColor() == *pCol) )
{
if ( rLRect.MakeUnion( rRect ) )
return;
@@ -773,7 +772,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
aIns.Bottom( pLA->Bottom() );
if ( !rL1.IsInside( aIns ) )
continue;
- aLineRects.push_back( SwLineRect( aIns, rL1.GetColor(),
+ aLineRects.push_back( SwLineRect( aIns, &rL1.GetColor(),
table::BorderLineStyle::SOLID,
rL1.GetTab(), SUBCOL_TAB ) );
if ( isFull() )
@@ -814,7 +813,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
aIns.Right( pLA->Right() );
if ( !rL1.IsInside( aIns ) )
continue;
- aLineRects.push_back( SwLineRect( aIns, rL1.GetColor(),
+ aLineRects.push_back( SwLineRect( aIns, &rL1.GetColor(),
table::BorderLineStyle::SOLID,
rL1.GetTab(), SUBCOL_TAB ) );
if ( isFull() )
@@ -1043,9 +1042,9 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
}
if ( bPaint )
{
- if ( !pLast || *pLast != *rLRect.GetColor() )
+ if ( !pLast || *pLast != rLRect.GetColor() )
{
- pLast = rLRect.GetColor();
+ pLast = &rLRect.GetColor();
sal_uLong nOldDrawMode = pOut->GetDrawMode();
if( pGlobalShell->GetWin() &&
@@ -1078,9 +1077,9 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
continue;
}
- if ( !pLast || *pLast != *rLRect.GetColor() )
+ if ( !pLast || *pLast != rLRect.GetColor() )
{
- pLast = rLRect.GetColor();
+ pLast = &rLRect.GetColor();
sal_uLong nOldDrawMode = pOut->GetDrawMode();
if( pGlobalShell->GetWin() &&
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index f8dfce209ce1..d5429472937d 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -133,7 +133,7 @@ extern const SwFrm *pRowCacheLastCellFrm;
SwTabFrm* SwTabFrm::GetFollowFlowLineFor()
{
SwFlowFrm *pPrec = GetPrecede();
- if (pPrec && pPrec->GetFrm()->IsTabFrm())
+ if (pPrec && pPrec->GetFrm().IsTabFrm())
{
SwTabFrm *pPrevTabFrm = (SwTabFrm*)pPrec;
assert(this == pPrevTabFrm->GetFollow());
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 8e48c430dc57..f98aee6be4a8 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -618,7 +618,7 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
/** Layout dependent cursor travelling */
bool SwCntntFrm::LeftMargin(SwPaM *pPam) const
{
- if( pPam->GetNode() != (SwCntntNode*)GetNode() )
+ if( &pPam->GetNode() != (SwCntntNode*)GetNode() )
return false;
((SwCntntNode*)GetNode())->
MakeStartIndex((SwIndex *) &pPam->GetPoint()->nContent);
@@ -627,7 +627,7 @@ bool SwCntntFrm::LeftMargin(SwPaM *pPam) const
bool SwCntntFrm::RightMargin(SwPaM *pPam, bool) const
{
- if( pPam->GetNode() != (SwCntntNode*)GetNode() )
+ if( &pPam->GetNode() != (SwCntntNode*)GetNode() )
return false;
((SwCntntNode*)GetNode())->
MakeEndIndex((SwIndex *) &pPam->GetPoint()->nContent);
@@ -693,7 +693,7 @@ static const SwCntntFrm * lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
static bool lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
GetNxtPrvCnt fnNxtPrv, bool bInReadOnly )
{
- OSL_ENSURE( pPam->GetNode() == (SwCntntNode*)pStart->GetNode(),
+ OSL_ENSURE( &pPam->GetNode() == (SwCntntNode*)pStart->GetNode(),
"lcl_UpDown doesn't work for others." );
const SwCntntFrm *pCnt = 0;
@@ -703,8 +703,8 @@ static bool lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
//going down.
bool bTblSel = false;
if ( pStart->IsInTab() &&
- pPam->GetNode( true )->StartOfSectionNode() !=
- pPam->GetNode( false )->StartOfSectionNode() )
+ pPam->GetNode( true ).StartOfSectionNode() !=
+ pPam->GetNode( false ).StartOfSectionNode() )
{
bTblSel = true;
const SwLayoutFrm *pCell = pStart->GetUpper();
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 73762f764825..f30fa20d023e 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -2526,7 +2526,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
{ // If we are in an other column/page than the frame with the
// reference, we don't need to invalidate its master.
SwFrm *pTmp = pCnt->FindFtnBossFrm(true) == FindFtnBossFrm(true)
- ? pCnt->FindMaster()->GetFrm() : pCnt;
+ ? &pCnt->FindMaster()->GetFrm() : pCnt;
pTmp->Prepare( PREP_ADJUST_FRM );
pTmp->InvalidateSize();
}
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 2f2666e41740..cf5b25b07dc7 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2474,7 +2474,7 @@ sal_uLong SwTableBox::IsValidNumTxtNd( bool bCheckAttr ) const
const SwTxtAttr* pAttr = (*pHts)[ n ];
if( RES_TXTATR_NOEND_BEGIN <= pAttr->Which() )
{
- if ( (*pAttr->GetStart() == nNextSetField)
+ if ( (pAttr->GetStart() == nNextSetField)
&& (pAttr->Which() == RES_TXTATR_FIELD))
{
// #i104949# hideous hack for report builder:
@@ -2488,7 +2488,7 @@ sal_uLong SwTableBox::IsValidNumTxtNd( bool bCheckAttr ) const
(pField)->GetSubType() &
nsSwExtendedSubType::SUB_INVISIBLE)))
{
- nNextSetField = *pAttr->GetStart() + 1;
+ nNextSetField = pAttr->GetStart() + 1;
continue;
}
}
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 6afa51d3fdc7..84c771d38d29 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1915,7 +1915,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
SwTxtNode& rTNd = const_cast<SwTxtNode&>(pTxtFtn->GetTxtNode());
mrSh._GetCrsr()->GetPoint()->nNode = rTNd;
- mrSh._GetCrsr()->GetPoint()->nContent.Assign( &rTNd, *pTxtFtn->GetStart() );
+ mrSh._GetCrsr()->GetPoint()->nContent.Assign( &rTNd, pTxtFtn->GetStart() );
// 1. Check if the whole paragraph is hidden
// 2. Check for hidden text attribute
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index b5f053ccd252..0aecaab906f3 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -669,7 +669,7 @@ bool SwTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& rPoint,
bool SwTxtFrm::LeftMargin(SwPaM *pPam) const
{
- if( ((const SwNode*)pPam->GetNode()) != GetNode() )
+ if( &pPam->GetNode() != GetNode() )
pPam->GetPoint()->nNode = *((SwTxtFrm*)this)->GetTxtNode();
SwTxtFrm *pFrm = GetAdjFrmAtPos( (SwTxtFrm*)this, *pPam->GetPoint(),
@@ -704,7 +704,7 @@ bool SwTxtFrm::LeftMargin(SwPaM *pPam) const
bool SwTxtFrm::RightMargin(SwPaM *pPam, bool bAPI) const
{
- if( ((const SwNode*)pPam->GetNode()) != GetNode() )
+ if( &pPam->GetNode() != GetNode() )
pPam->GetPoint()->nNode = *((SwTxtFrm*)this)->GetTxtNode();
SwTxtFrm *pFrm = GetAdjFrmAtPos( (SwTxtFrm*)this, *pPam->GetPoint(),
@@ -758,8 +758,8 @@ bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
SwSetToRightMargin aSet;
if( IsInTab() &&
- pPam->GetNode( true )->StartOfSectionNode() !=
- pPam->GetNode( false )->StartOfSectionNode() )
+ pPam->GetNode( true ).StartOfSectionNode() !=
+ pPam->GetNode( false ).StartOfSectionNode() )
{
// If the PaM is located within different boxes, we have a table selection,
// which is handled by the base class.
@@ -1145,8 +1145,8 @@ bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
{
if ( IsInTab() &&
- pPam->GetNode( true )->StartOfSectionNode() !=
- pPam->GetNode( false )->StartOfSectionNode() )
+ pPam->GetNode( true ).StartOfSectionNode() !=
+ pPam->GetNode( false ).StartOfSectionNode() )
{
// If the PaM is located within different boxes, we have a table selection,
// which is handled by the base class.
@@ -1375,7 +1375,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
else
{
SwFontAccess aFontAccess( pColl, pSh );
- pFnt = new SwFont( *aFontAccess.Get()->GetFont() );
+ pFnt = new SwFont( aFontAccess.Get()->GetFont() );
pFnt->ChkMagic( pSh, pFnt->GetActual() );
}
OutputDevice* pOut = pSh->GetOut();
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 1d688d88718b..29c3f3ca8852 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -222,8 +222,8 @@ bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
ValidateBodyFrm();
if( pPara )
{
- *(pPara->GetReformat()) = SwCharRange();
- *(pPara->GetDelta()) = 0;
+ pPara->GetReformat() = SwCharRange();
+ pPara->GetDelta() = 0;
}
}
@@ -313,8 +313,8 @@ bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
ValidateFrm();
if( pPara )
{
- *(pPara->GetReformat()) = SwCharRange();
- *(pPara->GetDelta()) = 0;
+ pPara->GetReformat() = SwCharRange();
+ pPara->GetDelta() = 0;
}
}
@@ -615,7 +615,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
for ( sal_uInt16 i = 0; i < pHints->Count(); ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
- if( RES_TXTATR_FTN==pHt->Which() && *pHt->GetStart()>=nStart )
+ if( RES_TXTATR_FTN==pHt->Which() && pHt->GetStart()>=nStart )
{
if( pHt->GetFtn().IsEndNote() )
{
@@ -708,7 +708,7 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const sal_Int32 nTxtPos )
for ( sal_uInt16 i = 0; i < pHints->Count(); ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
- if( RES_TXTATR_FTN==pHt->Which() && *pHt->GetStart()>=nTxtPos )
+ if( RES_TXTATR_FTN==pHt->Which() && pHt->GetStart()>=nTxtPos )
{
if( pHt->GetFtn().IsEndNote() )
{
@@ -755,10 +755,10 @@ void SwTxtFrm::_SetOfst( const sal_Int32 nNewOfst )
SwParaPortion *pPara = GetPara();
if( pPara )
{
- SwCharRange &rReformat = *(pPara->GetReformat());
+ SwCharRange &rReformat = pPara->GetReformat();
rReformat.Start() = 0;
rReformat.Len() = GetTxt().getLength();
- *(pPara->GetDelta()) = rReformat.Len();
+ pPara->GetDelta() = rReformat.Len();
}
InvalidateSize();
}
@@ -778,7 +778,7 @@ bool SwTxtFrm::CalcPreps()
ResetPreps();
bool bRet = false;
- if( bPrep && !pPara->GetReformat()->Len() )
+ if( bPrep && !pPara->GetReformat().Len() )
{
// PREP_WIDOWS means that the orphans rule got activated in the Follow.
// In unfortunate cases we could also have a PrepAdjust!
@@ -830,7 +830,7 @@ bool SwTxtFrm::CalcPreps()
GetFollow()->SetJustWidow( true );
GetFollow()->Prepare( PREP_CLEAR );
Shrink( nChgHeight );
- SwRect &rRepaint = *(pPara->GetRepaint());
+ SwRect &rRepaint = pPara->GetRepaint();
if ( bVert )
{
@@ -907,7 +907,7 @@ bool SwTxtFrm::CalcPreps()
// We delete a line before the Master, because the Follow
// could hand over a line
const SwCharRange aFollowRg( GetFollow()->GetOfst(), 1 );
- *(pPara->GetReformat()) += aFollowRg;
+ pPara->GetReformat() += aFollowRg;
// We should continue!
bRet = false;
}
@@ -1000,9 +1000,9 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
// If the current values have been calculated, show that they
// are valid now
- *(pPara->GetReformat()) = SwCharRange();
- bool bDelta = *pPara->GetDelta() != 0;
- *(pPara->GetDelta()) = 0;
+ pPara->GetReformat() = SwCharRange();
+ bool bDelta = pPara->GetDelta() != 0;
+ pPara->GetDelta() = 0;
if( rLine.IsStop() )
{
@@ -1090,7 +1090,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
if ( IsVertical() && !IsVertLR() && nChg )
{
- SwRect &rRepaint = *(pPara->GetRepaint());
+ SwRect &rRepaint = pPara->GetRepaint();
rRepaint.Left( rRepaint.Left() - nChg );
rRepaint.Width( rRepaint.Width() - nChg );
}
@@ -1151,9 +1151,9 @@ bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
// Calculate rRepaint
const SwTwips nBottom = rLine.Y() + rLine.GetLineHeight();
- SwRepaint &rRepaint = *(pPara->GetRepaint());
+ SwRepaint &rRepaint = pPara->GetRepaint();
if( bUnChg && rRepaint.Top() == rLine.Y()
- && (bPrev || nNewStart <= pPara->GetReformat()->Start())
+ && (bPrev || nNewStart <= pPara->GetReformat().Start())
&& (nNewStart < GetTxtNode()->GetTxt().getLength()))
{
rRepaint.Top( nBottom );
@@ -1216,7 +1216,7 @@ bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
rLine.SetChanges();
// Calculating the good ol' nDelta
- *(pPara->GetDelta()) -= long(pNew->GetLen()) - long(nOldLen);
+ pPara->GetDelta() -= long(pNew->GetLen()) - long(nOldLen);
// Stop!
if( rLine.IsStop() )
@@ -1234,13 +1234,13 @@ bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
return true;
// Reached the Reformat's end?
- const sal_Int32 nEnd = pPara->GetReformat()->Start() +
- pPara->GetReformat()->Len();
+ const sal_Int32 nEnd = pPara->GetReformat().Start() +
+ pPara->GetReformat().Len();
if( nNewStart <= nEnd )
return true;
- return 0 != *(pPara->GetDelta());
+ return 0 != pPara->GetDelta();
}
void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
@@ -1255,8 +1255,8 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
const OUString &rString = GetTxtNode()->GetTxt();
const sal_Int32 nStrLen = rString.getLength();
- SwCharRange &rReformat = *(pPara->GetReformat());
- SwRepaint &rRepaint = *(pPara->GetRepaint());
+ SwCharRange &rReformat = pPara->GetReformat();
+ SwRepaint &rRepaint = pPara->GetRepaint();
SwRepaint *pFreeze = NULL;
// Due to performance reasons we set rReformat to COMPLETE_STRING in Init()
@@ -1588,7 +1588,7 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
if( !rLine.GetDropFmt() )
rLine.SetOnceMore( false );
SwCharRange aRange( 0, rInf.GetTxt().getLength() );
- *(pPara->GetReformat()) = aRange;
+ pPara->GetReformat() = aRange;
_Format( rLine, rInf );
bGoOn = rLine.IsOnceMore();
@@ -1618,7 +1618,7 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
rLine.SetDropLines( 1 );
rLine.CalcDropHeight( 1 );
SwCharRange aTmpRange( 0, rInf.GetTxt().getLength() );
- *(pPara->GetReformat()) = aTmpRange;
+ pPara->GetReformat() = aTmpRange;
_Format( rLine, rInf, true );
// We paint everything ...
SetCompletePaint();
@@ -1768,7 +1768,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
; // nothing
// We return if already formatted, but if the TxtFrm was just created
// and does not have any format information
- else if( !bNew && !aAccess.GetPara()->GetReformat()->Len() )
+ else if( !bNew && !aAccess.GetPara()->GetReformat().Len() )
{
if( GetTxtNode()->GetSwAttrSet().GetRegister().GetValue() )
{
@@ -1934,12 +1934,12 @@ bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
// We made it!
// Set repaint
- pPara->GetRepaint()->Pos( aTopLeft );
- pPara->GetRepaint()->SSize( Prt().SSize() );
+ pPara->GetRepaint().Pos( aTopLeft );
+ pPara->GetRepaint().SSize( Prt().SSize() );
// Delete reformat
- *(pPara->GetReformat()) = SwCharRange();
- *(pPara->GetDelta()) = 0;
+ pPara->GetReformat() = SwCharRange();
+ pPara->GetDelta() = 0;
return true;
}
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 112c1486038c..cccdaf87d5a3 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -422,20 +422,20 @@ SwRect SwTxtFrm::Paint()
{
// We return the right paint rect. Use the calculated PaintOfst as the
// left margin
- SwRepaint *pRepaint = GetPara()->GetRepaint();
+ SwRepaint& rRepaint = GetPara()->GetRepaint();
long l;
if ( IsVertLR() ) // mba: the following line was added, but we don't need it for the existing directions; kept for IsVertLR(), but should be checked
- pRepaint->Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() );
+ rRepaint.Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() );
- if( pRepaint->GetOfst() )
- pRepaint->Left( pRepaint->GetOfst() );
+ if( rRepaint.GetOfst() )
+ rRepaint.Left( rRepaint.GetOfst() );
- l = pRepaint->GetRightOfst();
- if( l && l > pRepaint->Right() )
- pRepaint->Right( l );
- pRepaint->SetOfst( 0 );
- aRet = *pRepaint;
+ l = rRepaint.GetRightOfst();
+ if( l && l > rRepaint.Right() )
+ rRepaint.Right( l );
+ rRepaint.SetOfst( 0 );
+ aRet = rRepaint;
// In case our left edge is the same as the body frame's left edge,
// then extend the rectangle to include the page margin as well,
@@ -479,7 +479,7 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
else
{
SwFontAccess aFontAccess( &rTxtNode.GetAnyFmtColl(), pSh );
- pFnt = new SwFont( *aFontAccess.Get()->GetFont() );
+ pFnt = new SwFont( aFontAccess.Get()->GetFont() );
}
const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess();
@@ -633,7 +633,7 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
SwTxtLineAccess aAccess( (SwTxtFrm*)this );
SwParaPortion *pPara = aAccess.GetPara();
- SwRepaint &rRepaint = *(pPara->GetRepaint());
+ SwRepaint &rRepaint = pPara->GetRepaint();
// Switch off recycling when in the FlyCntFrm.
// A DrawRect is called for repainting the line anyways.
@@ -662,12 +662,12 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
aInf.SetWrongList( ( (SwTxtNode*)GetTxtNode() )->GetWrong() );
aInf.SetGrammarCheckList( ( (SwTxtNode*)GetTxtNode() )->GetGrammarCheck() );
aInf.SetSmartTags( ( (SwTxtNode*)GetTxtNode() )->GetSmartTags() );
- aInf.GetTxtFly()->SetTopRule();
+ aInf.GetTxtFly().SetTopRule();
SwTxtPainter aLine( (SwTxtFrm*)this, &aInf );
// Optimization: if no free flying Frm overlaps into our line, the
// SwTxtFly just switches off
- aInf.GetTxtFly()->Relax();
+ aInf.GetTxtFly().Relax();
OutputDevice* pOut = aInf.GetOut();
const bool bOnWin = pSh->GetWin() != 0;
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index d260a6ff830a..f45a7aff2c7d 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -474,7 +474,7 @@ SwTxtPaintInfo::SwTxtPaintInfo( const SwTxtPaintInfo &rInf, const OUString* pTxt
pSmartTags( rInf.GetSmartTags() ),
pSpaceAdd( rInf.GetpSpaceAdd() ),
pBrushItem( rInf.GetBrushItem() ),
- aTxtFly( *rInf.GetTxtFly() ),
+ aTxtFly( rInf.GetTxtFly() ),
aPos( rInf.GetPos() ),
aPaintRect( rInf.GetPaintRect() ),
nSpaceIdx( rInf.GetSpaceIdx() )
@@ -487,7 +487,7 @@ SwTxtPaintInfo::SwTxtPaintInfo( const SwTxtPaintInfo &rInf )
pSmartTags( rInf.GetSmartTags() ),
pSpaceAdd( rInf.GetpSpaceAdd() ),
pBrushItem( rInf.GetBrushItem() ),
- aTxtFly( *rInf.GetTxtFly() ),
+ aTxtFly( rInf.GetTxtFly() ),
aPos( rInf.GetPos() ),
aPaintRect( rInf.GetPaintRect() ),
nSpaceIdx( rInf.GetSpaceIdx() )
@@ -659,7 +659,7 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
aFontPos.X() = 0;
}
- if( GetTxtFly()->IsOn() )
+ if( GetTxtFly().IsOn() )
{
// aPos needs to be the TopLeft, because we cannot calculate the
// ClipRects otherwise
@@ -672,7 +672,7 @@ void SwTxtPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPor
aDrawInf.SetWrong( bTmpWrong ? pWrongList : NULL );
aDrawInf.SetGrammarCheck( bTmpGrammarCheck ? pGrammarCheckList : NULL );
aDrawInf.SetSmartTags( bTmpSmart ? pSmartTags : NULL );
- GetTxtFly()->DrawTextOpaque( aDrawInf );
+ GetTxtFly().DrawTextOpaque( aDrawInf );
}
else
{
@@ -897,7 +897,7 @@ void SwTxtPaintInfo::DrawRect( const SwRect &rRect, bool bNoGraphic,
if ( OnWin() || !bRetouche )
{
if( aTxtFly.IsOn() )
- ((SwTxtPaintInfo*)this)->GetTxtFly()->
+ ((SwTxtPaintInfo*)this)->GetTxtFly().
DrawFlyRect( m_pOut, rRect, *this, bNoGraphic );
else if ( bNoGraphic )
m_pOut->DrawRect( rRect.SVRect() );
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index a7572228ace3..5364cd7d841e 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -432,8 +432,8 @@ public:
inline SwTwips Y() const { return aPos.Y(); }
inline void Y( const SwTwips nNew ) { aPos.Y() = nNew; }
- inline SwTxtFly *GetTxtFly() { return &aTxtFly; }
- inline const SwTxtFly *GetTxtFly() const { return &aTxtFly; }
+ inline SwTxtFly& GetTxtFly() { return aTxtFly; }
+ inline const SwTxtFly& GetTxtFly() const { return aTxtFly; }
inline void DrawText( const OUString &rText, const SwLinePortion &rPor,
const sal_Int32 nIdx = 0,
const sal_Int32 nLen = COMPLETE_STRING,
@@ -795,12 +795,12 @@ inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI,
inline SwTwips SwTxtPaintInfo::GetPaintOfst() const
{
- return GetParaPortion()->GetRepaint()->GetOfst();
+ return GetParaPortion()->GetRepaint().GetOfst();
}
inline void SwTxtPaintInfo::SetPaintOfst( const SwTwips nNew )
{
- GetParaPortion()->GetRepaint()->SetOfst( nNew );
+ GetParaPortion()->GetRepaint().SetOfst( nNew );
}
inline void SwTxtPaintInfo::DrawText( const OUString &rText,
@@ -829,7 +829,7 @@ inline void SwTxtPaintInfo::DrawMarkedText( const SwLinePortion &rPor,
inline sal_Int32 SwTxtFormatInfo::GetReformatStart() const
{
- return GetParaPortion()->GetReformat()->Start();
+ return GetParaPortion()->GetReformat().Start();
}
inline const SwAttrSet& SwTxtFormatInfo::GetCharAttr() const
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 24e71116f116..b2ad8a232166 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -106,7 +106,7 @@ void SwTxtAdjuster::FormatBlock( )
GetInfo().SetIdx( nStart );
CalcNewBlock( pCurr, pFly );
GetInfo().SetIdx( nOldIdx );
- GetInfo().GetParaPortion()->GetRepaint()->SetOfst(0);
+ GetInfo().GetParaPortion()->GetRepaint().SetOfst(0);
}
static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTxtIter& rItr,
@@ -677,7 +677,7 @@ void SwTxtAdjuster::CalcAdjLine( SwLineLayout *pCurrent )
case SVX_ADJUST_CENTER:
{
CalcFlyAdjust( pCurrent );
- pPara->GetRepaint()->SetOfst( 0 );
+ pPara->GetRepaint().SetOfst( 0 );
break;
}
case SVX_ADJUST_BLOCK:
@@ -824,7 +824,7 @@ void SwTxtAdjuster::CalcDropAdjust()
void SwTxtAdjuster::CalcDropRepaint()
{
Top();
- SwRepaint &rRepaint = *GetInfo().GetParaPortion()->GetRepaint();
+ SwRepaint &rRepaint = GetInfo().GetParaPortion()->GetRepaint();
if( rRepaint.Top() > Y() )
rRepaint.Top( Y() );
for( MSHORT i = 1; i < GetDropLines(); ++i )
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 41488530e0ea..f4212b6fdc0e 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -157,7 +157,7 @@ bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFo
SwTxtAttr *pTxtAttr;
// While we've not reached the end of the StartArray && the TextAttribute starts at position 0...
while ( ( nStartIndex < pHints->GetStartCount() ) &&
- !(*(pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()) )
+ !((pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()) )
{
// open the TextAttributes
Chg( pTxtAttr );
@@ -199,7 +199,7 @@ void SwAttrIter::SeekFwd( const sal_Int32 nNewPos )
{
// schliesse die TextAttribute, deren StartPos vor
// oder an der alten nPos lag, die z.Z. geoeffnet sind.
- if (*pTxtAttr->GetStart() <= nPos) Rst( pTxtAttr );
+ if (pTxtAttr->GetStart() <= nPos) Rst( pTxtAttr );
nEndIndex++;
}
}
@@ -214,7 +214,7 @@ void SwAttrIter::SeekFwd( const sal_Int32 nNewPos )
// Solange wir noch nicht am Ende des StartArrays angekommen sind &&
// das TextAttribut vor oder an der neuen Position beginnt ...
while ( ( nStartIndex < pHints->GetStartCount() ) &&
- (*(pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()<=nNewPos))
+ ((pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()<=nNewPos) )
{
// open the TextAttributes, whose ends lie behind the new position
@@ -280,7 +280,7 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
SwTxtAttr *const pAttr(pHints->GetStart(i));
if (!pAttr->IsFormatIgnoreStart())
{
- nNext = *pAttr->GetStart();
+ nNext = pAttr->GetStart();
break;
}
}
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index abbfecafc3c4..8bf8437304d8 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1582,7 +1582,7 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
}
else
{
- bBuild = ( GetInfo().GetTxtFly()->IsOn() && ChkFlyUnderflow(GetInfo()) )
+ bBuild = ( GetInfo().GetTxtFly().IsOn() && ChkFlyUnderflow(GetInfo()) )
|| GetInfo().CheckFtnPortion(pCurr);
if( bBuild )
{
@@ -1640,7 +1640,7 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
// This corrects the start of the reformat range if something has
// moved to the next line. Otherwise IsFirstReformat in AllowRepaintOpt
// will give us a wrong result if we have to reformat another line
- GetInfo().GetParaPortion()->GetReformat()->LeftMove( GetInfo().GetIdx() );
+ GetInfo().GetParaPortion()->GetReformat().LeftMove( GetInfo().GetIdx() );
// delete master copy of rest portion
xSaveFld.reset();
@@ -1901,7 +1901,7 @@ bool SwTxtFormatter::CalcOnceMore()
SwTwips SwTxtFormatter::CalcBottomLine() const
{
SwTwips nRet = Y() + GetLineHeight();
- SwTwips nMin = GetInfo().GetTxtFly()->GetMinBottom();
+ SwTwips nMin = GetInfo().GetTxtFly().GetMinBottom();
if( nMin && ++nMin > nRet )
{
SwTwips nDist = pFrm->Frm().Height() - pFrm->Prt().Height()
@@ -1909,12 +1909,12 @@ SwTwips SwTxtFormatter::CalcBottomLine() const
if( nRet + nDist < nMin )
{
const bool bRepaint = HasTruncLines() &&
- GetInfo().GetParaPortion()->GetRepaint()->Bottom() == nRet-1;
+ GetInfo().GetParaPortion()->GetRepaint().Bottom() == nRet-1;
nRet = nMin - nDist;
if( bRepaint )
{
- ((SwRepaint*)GetInfo().GetParaPortion()
- ->GetRepaint())->Bottom( nRet-1 );
+ ((SwRepaint&)GetInfo().GetParaPortion()
+ ->GetRepaint()).Bottom( nRet-1 );
((SwTxtFormatInfo&)GetInfo()).SetPaintOfst( 0 );
}
}
@@ -2167,7 +2167,7 @@ void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const
bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
{
- OSL_ENSURE( rInf.GetTxtFly()->IsOn(), "SwTxtFormatter::ChkFlyUnderflow: why?" );
+ OSL_ENSURE( rInf.GetTxtFly().IsOn(), "SwTxtFormatter::ChkFlyUnderflow: why?" );
if( GetCurr() )
{
// First we check, whether a fly overlaps with the line.
@@ -2178,7 +2178,7 @@ bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
SwRect aLineVert( aLine );
if ( pFrm->IsVertical() )
pFrm->SwitchHorizontalToVertical( aLineVert );
- SwRect aInter( rInf.GetTxtFly()->GetFrm( aLineVert ) );
+ SwRect aInter( rInf.GetTxtFly().GetFrm( aLineVert ) );
if ( pFrm->IsVertical() )
pFrm->SwitchVerticalToHorizontal( aInter );
@@ -2198,7 +2198,7 @@ bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
aLineVert = aLine;
if ( pFrm->IsVertical() )
pFrm->SwitchHorizontalToVertical( aLineVert );
- aInter = rInf.GetTxtFly()->GetFrm( aLineVert );
+ aInter = rInf.GetTxtFly().GetFrm( aLineVert );
if ( pFrm->IsVertical() )
pFrm->SwitchVerticalToHorizontal( aInter );
@@ -2258,8 +2258,8 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
if( GetMulti() || rInf.GetFly() )
return;
- SwTxtFly *pTxtFly = rInf.GetTxtFly();
- if( !pTxtFly->IsOn() || rInf.IsIgnoreFly() )
+ SwTxtFly& rTxtFly = rInf.GetTxtFly();
+ if( !rTxtFly.IsOn() || rInf.IsIgnoreFly() )
return;
const SwLinePortion *pLast = rInf.GetLast();
@@ -2304,7 +2304,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
if ( pFrm->IsVertical() )
pFrm->SwitchHorizontalToVertical( aLineVert );
- SwRect aInter( pTxtFly->GetFrm( aLineVert ) );
+ SwRect aInter( rTxtFly.GetFrm( aLineVert ) );
if ( pFrm->IsRightToLeft() )
pFrm->SwitchRTLtoLTR( aInter );
@@ -2385,7 +2385,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
// or the next margin's top edge, which we need to respect.
// That means we can comfortably grow up to this value; that's how
// we save a few empty lines.
- long nNextTop = pTxtFly->GetNextTop();
+ long nNextTop = rTxtFly.GetNextTop();
if ( pFrm->IsVertical() )
nNextTop = pFrm->SwitchVerticalToHorizontal( nNextTop );
if( nNextTop > aInter.Bottom() )
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index fff6ea7488c5..5c34b7535ca1 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -503,7 +503,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
if ( pItem )
{
- const sal_Int32 nSt = *pTxtAttr->GetStart();
+ const sal_Int32 nSt = pTxtAttr->GetStart();
const sal_Int32 nEnd = *pTxtAttr->GetEnd();
if( nEnd > nSt )
{
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index 6268c8c138cb..ac2f7dc5d6fd 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -351,7 +351,7 @@ void SwTxtIter::TruncLines( bool bNoteFollow )
if( RES_TXTATR_FLYCNT == pHt->Which() )
{
// check, if hint is in our range
- const sal_uInt16 nTmpPos = *pHt->GetStart();
+ const sal_uInt16 nTmpPos = pHt->GetStart();
if ( nEnd <= nTmpPos && nTmpPos < nRangeEnd )
pFollow->_InvalidateRange(
SwCharRange( nTmpPos, nTmpPos ), 0 );
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index d848bc1170ea..46d88b41dabb 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -198,7 +198,7 @@ sal_Int32 SwTxtFrm::CalcFlyPos( SwFrmFmt* pSearch )
OSL_ENSURE( pHints, "CalcFlyPos: Not Found!" );
if( !pFound )
return COMPLETE_STRING;
- return *pFound->GetStart();
+ return pFound->GetStart();
}
void SwFlyCntPortion::Paint( const SwTxtPaintInfo &rInf ) const
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 40e3a58238fa..3c8f77bc3ba0 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2081,7 +2081,7 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTxtNode& rNode, MultiSelecti
static_cast<const SvxCharHiddenItem*>( CharFmt::GetItem( *pTxtAttr, RES_CHRATR_HIDDEN ) );
if( pHiddenItem )
{
- const sal_Int32 nSt = *pTxtAttr->GetStart();
+ const sal_Int32 nSt = pTxtAttr->GetStart();
const sal_Int32 nEnd = *pTxtAttr->End();
if( nEnd > nSt )
{
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 7d138cb5bb3c..64c8082d7908 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -276,12 +276,12 @@ public:
inline void ResetPreps();
// Get/Set methods
- inline SwRepaint *GetRepaint() { return &aRepaint; }
- inline const SwRepaint *GetRepaint() const { return &aRepaint; }
- inline SwCharRange *GetReformat() { return &aReformat; }
- inline const SwCharRange *GetReformat() const { return &aReformat; }
- inline long *GetDelta() { return &nDelta; }
- inline const long *GetDelta() const { return &nDelta; }
+ inline SwRepaint& GetRepaint() { return aRepaint; }
+ inline const SwRepaint& GetRepaint() const { return aRepaint; }
+ inline SwCharRange& GetReformat() { return aReformat; }
+ inline const SwCharRange& GetReformat() const { return aReformat; }
+ inline long& GetDelta() { return nDelta; }
+ inline const long& GetDelta() const { return nDelta; }
inline SwScriptInfo& GetScriptInfo() { return aScriptInfo; }
inline const SwScriptInfo& GetScriptInfo() const { return aScriptInfo; }
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index f9ccc77a16ed..b0909b7663f1 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -270,7 +270,7 @@ SwDoubleLinePortion::SwDoubleLinePortion(const SwMultiCreator& rCreate, sal_Int3
else
{
const SwTxtAttr& rAttr = *rCreate.pAttr;
- pBracket->nStart = *rAttr.GetStart();
+ pBracket->nStart = rAttr.GetStart();
const SfxPoolItem * const pItem =
CharFmt::GetItem( rAttr, RES_CHRATR_TWO_LINES );
@@ -864,7 +864,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
for( i = 0; i < nCount; ++i )
{
const SwTxtAttr *pTmp = (*pHints)[i];
- sal_Int32 nStart = *pTmp->GetStart();
+ sal_Int32 nStart = pTmp->GetStart();
if( rPos < nStart )
break;
if( *pTmp->GetAnyEnd() > rPos )
@@ -958,18 +958,18 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
const SwTxtAttr *pTmp = (*pHints)[i++];
if( *pTmp->GetAnyEnd() <= rPos )
continue;
- if( rPos < *pTmp->GetStart() )
+ if( rPos < pTmp->GetStart() )
{
// If bOn is false and the next attribute starts later than rPos
// the winner attribute is interrupted at rPos.
// If the start of the next attribute is behind the end of
// the last attribute on the aEnd-stack, this is the endposition
// on the stack is the end of the 2-line portion.
- if( !bOn || aEnd.back() < *pTmp->GetStart() )
+ if( !bOn || aEnd.back() < pTmp->GetStart() )
break;
// At this moment, bOn is true and the next attribute starts
// behind rPos, so we could move rPos to the next startpoint
- rPos = *pTmp->GetStart();
+ rPos = pTmp->GetStart();
// We clean up the aEnd-stack, endpositions equal to rPos are
// superfluous.
while( !aEnd.empty() && aEnd.back() <= rPos )
@@ -1038,11 +1038,11 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
const SwTxtAttr *pTmp = (*pHints)[i++];
if( *pTmp->GetAnyEnd() <= n2Start )
continue;
- if( n2Start < *pTmp->GetStart() )
+ if( n2Start < pTmp->GetStart() )
{
- if( bOn || aEnd.back() < *pTmp->GetStart() )
+ if( bOn || aEnd.back() < pTmp->GetStart() )
break;
- n2Start = *pTmp->GetStart();
+ n2Start = pTmp->GetStart();
while( !aEnd.empty() && aEnd.back() <= n2Start )
{
bOn = !bOn;
@@ -1111,11 +1111,11 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
const SwTxtAttr *pTmp = (*pHints)[i++];
if( *pTmp->GetAnyEnd() <= rPos )
continue;
- if( rPos < *pTmp->GetStart() )
+ if( rPos < pTmp->GetStart() )
{
- if( !bOn || aEnd.back() < *pTmp->GetStart() )
+ if( !bOn || aEnd.back() < pTmp->GetStart() )
break;
- rPos = *pTmp->GetStart();
+ rPos = pTmp->GetStart();
while( !aEnd.empty() && aEnd.back() <= rPos )
{
bOn = !bOn;
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 280acfdbb92d..e34f0f8915d7 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -224,7 +224,7 @@ SwTwips SwTxtFrm::EmptyHeight() const
else
{
SwFontAccess aFontAccess( &rTxtNode.GetAnyFmtColl(), pSh);
- pFnt = new SwFont( *aFontAccess.Get()->GetFont() );
+ pFnt = new SwFont( aFontAccess.Get()->GetFont() );
pFnt->ChkMagic( pSh, pFnt->GetActual() );
}
@@ -370,7 +370,7 @@ bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
{
SwViewShell *pSh = getRootFrm()->GetCurrShell();
SwFontAccess aFontAccess( pFmt, pSh );
- SwFont aFnt( *aFontAccess.Get()->GetFont() );
+ SwFont aFnt( aFontAccess.Get()->GetFont() );
OutputDevice *pOut = 0;
if( !pSh || !pSh->GetViewOptions()->getBrowseMode() ||
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index f783ef335ac1..7fdc70127cf7 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -58,7 +58,7 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
// Build a font matching the default paragraph style:
SwFontAccess aFontAccess( &rTxtNode.GetAnyFmtColl(), pShell );
delete pFnt;
- pFnt = new SwFont( *aFontAccess.Get()->GetFont() );
+ pFnt = new SwFont( aFontAccess.Get()->GetFont() );
// set font to vertical if frame layout is vertical
bool bVertLayout = false;
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index b7e8d67ed3ed..bd64f1cae05f 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -47,14 +47,14 @@ using namespace ::com::sun::star;
static bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf,
sal_uInt16 nWidth, sal_uInt16 nHeight )
{
- const SwTxtFly *pTxtFly = rInf.GetTxtFly();
- if( pTxtFly && pTxtFly->IsOn() )
+ const SwTxtFly& rTxtFly = rInf.GetTxtFly();
+ if( rTxtFly.IsOn() )
{
SwRect aRect( rInf.GetTxtFrm()->Frm().Pos(), Size( nWidth, nHeight) );
aRect.Pos() += rInf.GetTxtFrm()->Prt().Pos();
aRect.Pos().X() += rInf.X();
aRect.Pos().Y() = rInf.Y();
- aRect = pTxtFly->GetFrm( aRect );
+ aRect = rTxtFly.GetFrm( aRect );
return aRect.HasArea();
}
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 84cd6156c2f9..d04227f6b370 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -418,8 +418,8 @@ static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTxtForm
SwTxtAttr* hint = hints->GetTextHint( i );
// Formatting for the paragraph mark is set to apply only to the (non-existent) extra character
// the at end of the txt node.
- if( hint->Which() == RES_TXTATR_AUTOFMT && hint->GetStart() != NULL && hint->GetEnd() != NULL
- && *hint->GetStart() == *hint->GetEnd() && *hint->GetStart() == node->Len())
+ if( hint->Which() == RES_TXTATR_AUTOFMT && hint->GetEnd() != NULL
+ && hint->GetStart() == *hint->GetEnd() && hint->GetStart() == node->Len())
{
boost::shared_ptr<SfxItemSet> pSet(hint->GetAutoFmt().GetStyleHandle());
pNumFnt->SetDiffFnt( pSet.get(), pIDSA );
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 4871825e729e..0fe340f2eacb 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -443,7 +443,7 @@ void SwTxtFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd )
const SwTxtAttr *pHt = (*pHints)[i];
if ( pHt->Which() == RES_TXTATR_FTN )
{
- const sal_Int32 nIdx = *pHt->GetStart();
+ const sal_Int32 nIdx = pHt->GetStart();
if ( nEnd < nIdx )
break;
if( nStart <= nIdx )
@@ -674,10 +674,10 @@ void SwTxtFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
// linelengths are being added, that's why it's negative
// if chars have been added and positive, if chars have
// deleted
- *(pPara->GetDelta()) += nD;
+ pPara->GetDelta() += nD;
bInv = true;
}
- SwCharRange &rReformat = *(pPara->GetReformat());
+ SwCharRange &rReformat = pPara->GetReformat();
if(aRange != rReformat) {
if( COMPLETE_STRING == rReformat.Len() )
rReformat = aRange;
@@ -725,14 +725,14 @@ void SwTxtFrm::CalcLineSpace()
SwTwips nDelta = aNewSize.Height() - Prt().Height();
// 4291: underflow with free-flying frames
- if( aInf.GetTxtFly()->IsOn() )
+ if( aInf.GetTxtFly().IsOn() )
{
SwRect aTmpFrm( Frm() );
if( nDelta < 0 )
aTmpFrm.Height( Prt().Height() );
else
aTmpFrm.Height( aNewSize.Height() );
- if( aInf.GetTxtFly()->Relax( aTmpFrm ) )
+ if( aInf.GetTxtFly().Relax( aTmpFrm ) )
{
Init();
return;
@@ -1019,7 +1019,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
case RES_TXTATR_FIELD:
case RES_TXTATR_ANNOTATION:
{
- nPos = *((SwFmtFld*)pNew)->GetTxtFld()->GetStart();
+ nPos = ((SwFmtFld*)pNew)->GetTxtFld()->GetStart();
if( IsIdxInside( nPos, 1 ) )
{
if( pNew == pOld )
@@ -1041,7 +1041,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
case RES_TXTATR_FTN :
{
- nPos = *((SwFmtFtn*)pNew)->GetTxtFtn()->GetStart();
+ nPos = ((SwFmtFtn*)pNew)->GetTxtFtn()->GetStart();
if( IsInFtn() || IsIdxInside( nPos, 1 ) )
Prepare( PREP_FTN, ((SwFmtFtn*)pNew)->GetTxtFtn() );
break;
@@ -1058,7 +1058,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if( SFX_ITEM_SET == rNewSet.GetItemState( RES_TXTATR_FTN, false, &pItem ))
{
- nPos = *((SwFmtFtn*)pItem)->GetTxtFtn()->GetStart();
+ nPos = ((SwFmtFtn*)pItem)->GetTxtFtn()->GetStart();
if( IsIdxInside( nPos, 1 ) )
Prepare( PREP_FTN, pNew );
nClear = 0x01;
@@ -1067,7 +1067,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if( SFX_ITEM_SET == rNewSet.GetItemState( RES_TXTATR_FIELD, false, &pItem ))
{
- nPos = *((SwFmtFld*)pItem)->GetTxtFld()->GetStart();
+ nPos = ((SwFmtFld*)pItem)->GetTxtFld()->GetStart();
if( IsIdxInside( nPos, 1 ) )
{
const SfxPoolItem& rOldItem =
@@ -1258,7 +1258,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
const SwFmtFld *pFld = (const SwFmtFld *)pNew;
InvalidateRange(
- SwCharRange( *pFld->GetTxtFld()->GetStart(), 1 ) );
+ SwCharRange( pFld->GetTxtFld()->GetStart(), 1 ) );
}
}
break;
@@ -1527,7 +1527,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
else
{
// we are the TxtFrm _with_ the footnote
- const sal_Int32 nPos = *pFtn->GetStart();
+ const sal_Int32 nPos = pFtn->GetStart();
InvalidateRange( SwCharRange( nPos, 1 ), 1);
}
break;
@@ -1568,7 +1568,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
for ( sal_uInt16 i = 0; i < nSize; ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
- const sal_Int32 nStart = *pHt->GetStart();
+ const sal_Int32 nStart = pHt->GetStart();
if( nStart >= GetOfst() )
{
if( nStart >= nEnd )
@@ -1652,7 +1652,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
{
if( !IsLocked() )
{
- if( pPara->GetRepaint()->HasArea() )
+ if( pPara->GetRepaint().HasArea() )
SetCompletePaint();
Init();
pPara = 0;
@@ -1742,7 +1742,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
}
else
{
- if( pPara->GetRepaint()->HasArea() )
+ if( pPara->GetRepaint().HasArea() )
SetCompletePaint();
Init();
pPara = 0;
@@ -2417,8 +2417,8 @@ void SwTxtFrm::ChgThisLines()
// Extend repaint to the bottom.
if ( HasPara() )
{
- SwRepaint *pRepaint = GetPara()->GetRepaint();
- pRepaint->Bottom( std::max( pRepaint->Bottom(),
+ SwRepaint& rRepaint = GetPara()->GetRepaint();
+ rRepaint.Bottom( std::max( rRepaint.Bottom(),
Frm().Top()+Prt().Bottom()));
}
}
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 15c7021cb8b3..868bce76a316 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -66,7 +66,7 @@ bool SwTxtFrm::_IsFtnNumFrm() const
SwTxtFrm *SwTxtFrm::FindFtnRef( const SwTxtFtn *pFtn )
{
SwTxtFrm *pFrm = this;
- const bool bFwd = *pFtn->GetStart() >= GetOfst();
+ const bool bFwd = pFtn->GetStart() >= GetOfst();
while( pFrm )
{
if( SwFtnBossFrm::FindFtn( pFrm, pFtn ) )
@@ -103,7 +103,7 @@ void SwTxtFrm::CalcFtnFlag()
const SwTxtAttr *pHt = (*pHints)[i];
if ( pHt->Which() == RES_TXTATR_FTN )
{
- const sal_Int32 nIdx = *pHt->GetStart();
+ const sal_Int32 nIdx = pHt->GetStart();
if ( nEnd < nIdx )
break;
if( GetOfst() <= nIdx )
@@ -267,7 +267,7 @@ SwTwips SwTxtFrm::GetFtnLine( const SwTxtFtn *pFtn ) const
SwTxtInfo aInf( pThis );
SwTxtIter aLine( pThis, &aInf );
- const sal_Int32 nPos = *pFtn->GetStart();
+ const sal_Int32 nPos = pFtn->GetStart();
aLine.CharToLine( nPos );
SwTwips nRet = aLine.Y() + SwTwips(aLine.GetLineHeight());
@@ -421,7 +421,7 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
if ( RES_TXTATR_FTN != pHt->Which() )
continue;
- const sal_Int32 nIdx = *pHt->GetStart();
+ const sal_Int32 nIdx = pHt->GetStart();
if( nStart > nIdx )
break;
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 491e05044098..e2eb32badb06 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -125,7 +125,7 @@ bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
// In der letzten Zeile gibt es nie etwas zu trennen.
// Es sei denn, es befindet sich eine FlyPortion darin,
// oder es ist die letzte Zeile des Masters
- if( !GetNext() && !rInf.GetTxtFly()->IsOn() && !pFrm->GetFollow() )
+ if( !GetNext() && !rInf.GetTxtFly().IsOn() && !pFrm->GetFollow() )
return false;
sal_Int32 nWrdStart = nStart;
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx
index 3e2581576bec..a02b5c7624d3 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -311,7 +311,7 @@ ToxTextGenerator::HandleTextToken(const SwTOXSortTabBase& source, SwAttrPool& po
clone->SetStyleHandle(attributesToClone);
result.autoFormats.push_back(clone);
- result.startPositions.push_back(stripper.GetPositionInStrippedString(*hint->GetStart()));
+ result.startPositions.push_back(stripper.GetPositionInStrippedString(hint->GetStart()));
result.endPositions.push_back(stripper.GetPositionInStrippedString(*hint->GetAnyEnd()));
}
return result;
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 819b94fb4610..2608d35a27c6 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -221,7 +221,7 @@ OUString SwTOXMark::GetText() const
OSL_ENSURE( pEndIdx, "TOXMark without mark!");
if( pEndIdx )
{
- const sal_Int32 nStt = *pTxtAttr->GetStart();
+ const sal_Int32 nStt = pTxtAttr->GetStart();
return pTxtAttr->GetpTxtNd()->GetExpandTxt( nStt, *pEndIdx-nStt );
}
}
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 80736682d924..ff7bc61234f4 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -142,7 +142,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
{
sal_Int32 n = 0;
if( pTxtMark )
- n = *pTxtMark->GetStart();
+ n = pTxtMark->GetStart();
SwTOXSource aTmp( pNd, n, pTxtMark && pTxtMark->GetTOXMark().IsMainEntry() );
aTOXSources.push_back(aTmp);
@@ -199,7 +199,7 @@ bool SwTOXSortTabBase::operator==( const SwTOXSortTabBase& rCmp )
if( TOX_SORT_CONTENT == nType )
{
bRet = bRet && pTxtMark && rCmp.pTxtMark &&
- *pTxtMark->GetStart() == *rCmp.pTxtMark->GetStart();
+ pTxtMark->GetStart() == rCmp.pTxtMark->GetStart();
if( bRet )
{
@@ -235,10 +235,10 @@ bool SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
{
if( TOX_SORT_CONTENT == nType && pTxtMark && rCmp.pTxtMark )
{
- if( *pTxtMark->GetStart() < *rCmp.pTxtMark->GetStart() )
+ if( pTxtMark->GetStart() < rCmp.pTxtMark->GetStart() )
return true;
- if( *pTxtMark->GetStart() == *rCmp.pTxtMark->GetStart() )
+ if( pTxtMark->GetStart() == rCmp.pTxtMark->GetStart() )
{
const sal_Int32 *pEnd = pTxtMark->End();
const sal_Int32 *pEndCmp = rCmp.pTxtMark->End();
@@ -371,8 +371,8 @@ void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 )
0 == (GetOptions() & nsSwTOIOptions::TOI_KEY_AS_ENTRY))
{
aRet.sText = ((SwTxtNode*)aTOXSources[0].pNd)->GetExpandTxt(
- *pTxtMark->GetStart(),
- *pEnd - *pTxtMark->GetStart());
+ pTxtMark->GetStart(),
+ *pEnd - pTxtMark->GetStart());
if(nsSwTOIOptions::TOI_INITIAL_CAPS & nOpt && pTOXIntl && !aRet.sText.isEmpty())
{
aRet.sText = pTOXIntl->ToUpper( aRet.sText, 0 ) + aRet.sText.copy(1);
@@ -450,8 +450,8 @@ TextAndReading SwTOXContent::GetText_Impl() const
{
return TextAndReading(
((SwTxtNode*)aTOXSources[0].pNd)->GetExpandTxt(
- *pTxtMark->GetStart(),
- *pEnd - *pTxtMark->GetStart() ),
+ pTxtMark->GetStart(),
+ *pEnd - pTxtMark->GetStart() ),
pTxtMark->GetTOXMark().GetTextReading());
}
@@ -463,8 +463,8 @@ void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16
const sal_Int32* pEnd = pTxtMark->End();
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() )
((SwTxtNode*)aTOXSources[0].pNd)->GetExpandTxt( rNd, &rInsPos,
- *pTxtMark->GetStart(),
- *pEnd - *pTxtMark->GetStart() );
+ pTxtMark->GetStart(),
+ *pEnd - pTxtMark->GetStart() );
else
{
rNd.InsertText( GetTxt().sText, rInsPos );
@@ -663,7 +663,7 @@ SwTOXAuthority::SwTOXAuthority( const SwCntntNode& rNd,
m_rField(rField)
{
if(rField.GetTxtFld())
- nCntPos = *rField.GetTxtFld()->GetStart();
+ nCntPos = rField.GetTxtFld()->GetStart();
}
sal_uInt16 SwTOXAuthority::GetLevel() const
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index dc7bc1dfd9cb..b704710101a2 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -195,7 +195,7 @@ void SwFmtFld::SwClientNotify( const SwModify&, const SfxHint& rHint )
SwDoc* pDoc = pPaM->GetDoc();
const SwTxtNode& rTxtNode = mpTxtFld->GetTxtNode();
pPaM->GetPoint()->nNode = rTxtNode;
- pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode, *mpTxtFld->GetStart() );
+ pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode, mpTxtFld->GetStart() );
OUString const aEntry( GetField()->ExpandField( pDoc->IsClipBoard() ) );
pPaM->SetMark();
@@ -448,9 +448,9 @@ void SwTxtFld::GetPamForTxtFld(
const SwTxtNode& rTxtNode = rTxtFld.GetTxtNode();
rPamForTxtFld.reset( new SwPaM( rTxtNode,
- ( (rTxtFld.End() != NULL) ? *(rTxtFld.End()) : ( *(rTxtFld.GetStart()) + 1 ) ),
+ (rTxtFld.End() != NULL) ? *(rTxtFld.End()) : ( rTxtFld.GetStart() + 1 ),
rTxtNode,
- *(rTxtFld.GetStart()) ) );
+ rTxtFld.GetStart() ) );
}
@@ -529,12 +529,12 @@ const OUString SwTxtInputFld::GetFieldContent() const
void SwTxtInputFld::UpdateFieldContent()
{
if ( IsFldInDoc()
- && (*GetStart()) != (*End()) )
+ && GetStart() != (*End()) )
{
- OSL_ENSURE( (*End()) - (*GetStart()) >= 2,
+ OSL_ENSURE( (*End()) - GetStart() >= 2,
"<SwTxtInputFld::UpdateFieldContent()> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" );
// skip CH_TXT_ATR_INPUTFIELDSTART character
- const sal_Int32 nIdx = (*GetStart()) + 1;
+ const sal_Int32 nIdx = GetStart() + 1;
// skip CH_TXT_ATR_INPUTFIELDEND character
const sal_Int32 nLen = static_cast<sal_Int32>(std::max<sal_Int32>( 0, ( (*End()) - 1 - nIdx ) ));
const OUString aNewFieldContent = GetTxtNode().GetExpandTxt( nIdx, nLen );
@@ -557,10 +557,10 @@ void SwTxtInputFld::UpdateTextNodeContent( const OUString& rNewContent )
return;
}
- OSL_ENSURE( (*End()) - (*GetStart()) >= 2,
+ OSL_ENSURE( (*End()) - GetStart() >= 2,
"<SwTxtInputFld::UpdateTextNodeContent(..)> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" );
// skip CH_TXT_ATR_INPUTFIELDSTART character
- const sal_Int32 nIdx = (*GetStart()) + 1;
+ const sal_Int32 nIdx = GetStart() + 1;
// skip CH_TXT_ATR_INPUTFIELDEND character
const sal_Int32 nDelLen = std::max<sal_Int32>( 0, ( (*End()) - 1 - nIdx ) );
SwIndex aIdx( &GetTxtNode(), nIdx );
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index a8cf81c84c37..51759e2b00b5 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -45,7 +45,7 @@ bool SwFmtFlyCnt::operator==( const SfxPoolItem& rAttr ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return( pTxtAttr && ((SwFmtFlyCnt&)rAttr).pTxtAttr &&
- *pTxtAttr->GetStart() == *((SwFmtFlyCnt&)rAttr).pTxtAttr->GetStart() &&
+ pTxtAttr->GetStart() == ((SwFmtFlyCnt&)rAttr).pTxtAttr->GetStart() &&
pFmt == ((SwFmtFlyCnt&)rAttr).GetFrmFmt() );
}
@@ -144,7 +144,7 @@ void SwTxtFlyCnt::SetAnchor( const SwTxtNode *pNode )
SwDoc* pDoc = (SwDoc*)pNode->GetDoc();
- SwIndex aIdx( (SwTxtNode*)pNode, *GetStart() );
+ SwIndex aIdx( (SwTxtNode*)pNode, GetStart() );
SwPosition aPos( *pNode->StartOfSectionNode(), aIdx );
SwFrmFmt* pFmt = GetFlyCnt().GetFrmFmt();
SwFmtAnchor aAnchor( pFmt->GetAnchor() );
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 1a6fd1cb4a7c..de3583011b01 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1635,7 +1635,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
sal_uInt16 nDir = bBidiPor ?
1800 :
UnMapDirection(
- GetFont()->GetOrientation(),
+ GetFont().GetOrientation(),
bSwitchH2V );
switch ( nDir )
@@ -1686,7 +1686,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// anything to do?
if (rInf.GetWrong() || rInf.GetGrammarCheck() || rInf.GetSmartTags())
{
- CalcLinePosData aCalcLinePosData(rInf, *GetFont(),
+ CalcLinePosData aCalcLinePosData(rInf, GetFont(),
nCnt, bSwitchH2V, bSwitchL2R,
nHalfSpace, pKernArray, bBidiPor);
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 19304787680d..0a173ed208be 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -266,7 +266,7 @@ void SwDoDrawCapital::Do()
}
OSL_ENSURE( pUpperFnt, "No upper font, dying soon!");
- rInf.Shift( pUpperFnt->GetFont()->GetOrientation() );
+ rInf.Shift( pUpperFnt->GetFont().GetOrientation() );
rInf.SetWidth( nOrgWidth );
}
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx
index bd1a3ae8250d..63223e64e6d7 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -133,7 +133,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTxtNode &rNode, sal_uInt16 eMode)
const SwTxtAttr* pAttr = (*pSwpHints2)[i];
if (pAttr->HasDummyChar())
{
- const sal_Int32 nDummyCharPos = *pAttr->GetStart();
+ const sal_Int32 nDummyCharPos = pAttr->GetStart();
if (aHiddenMulti.IsSelected(nDummyCharPos))
continue;
std::vector<block>::iterator aFind = std::find_if(aBlocks.begin(),
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index b2ec93036de3..e0b616e4c8a7 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -34,7 +34,7 @@ inline void DumpHints(const SwpHtStart &, const SwpHtEnd &) { }
static bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
- if ( *rHt1.GetStart() == *rHt2.GetStart() )
+ if ( rHt1.GetStart() == rHt2.GetStart() )
{
const sal_Int32 nHt1 = *rHt1.GetAnyEnd();
const sal_Int32 nHt2 = *rHt2.GetAnyEnd();
@@ -59,7 +59,7 @@ static bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
}
return ( nHt1 > nHt2 );
}
- return ( *rHt1.GetStart() < *rHt2.GetStart() );
+ return ( rHt1.GetStart() < rHt2.GetStart() );
}
// Zuerst nach Ende danach nach Ptr
@@ -69,7 +69,7 @@ static bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
const sal_Int32 nHt2 = *rHt2.GetAnyEnd();
if ( nHt1 == nHt2 )
{
- if ( *rHt1.GetStart() == *rHt2.GetStart() )
+ if ( rHt1.GetStart() == rHt2.GetStart() )
{
const sal_uInt16 nWhich1 = rHt1.Which();
const sal_uInt16 nWhich2 = rHt2.Which();
@@ -89,7 +89,7 @@ static bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
return ( nWhich1 < nWhich2 );
}
else
- return ( *rHt1.GetStart() > *rHt2.GetStart() );
+ return ( rHt1.GetStart() > rHt2.GetStart() );
}
return ( nHt1 < nHt2 );
}
@@ -191,7 +191,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const
CHECK_ERR( 0xFF != *(unsigned char*)pHt, "HintsCheck: start ptr was deleted" );
// 3a) Stimmt die Start-Sortierung?
- sal_Int32 nIdx = *pHt->GetStart();
+ sal_Int32 nIdx = pHt->GetStart();
CHECK_ERR( nIdx >= nLastStart, "HintsCheck: starts are unsorted" );
// 4a) IsLessStart-Konsistenz
@@ -251,8 +251,8 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const
&& (RES_TXTATR_AUTOFMT != pHtLast->Which()))
|| ( (RES_TXTATR_CHARFMT != pHtThis->Which())
&& (RES_TXTATR_AUTOFMT != pHtThis->Which()))
- || (*pHtThis->GetStart() >= *pHtLast->End()) // no overlap
- || ( ( (*pHtThis->GetStart() == *pHtLast->GetStart())
+ || (pHtThis->GetStart() >= *pHtLast->End()) // no overlap
+ || ( ( (pHtThis->GetStart() == pHtLast->GetStart())
&& (*pHtThis->End() == *pHtLast->End())
) // same range
&& ( (pHtThis->Which() != RES_TXTATR_AUTOFMT)
@@ -266,7 +266,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const
->GetSortNumber())
) // multiple CHARFMT on same range need distinct sortnr
)
- || (*pHtThis->GetStart() == *pHtThis->End()), // this empty
+ || (pHtThis->GetStart() == *pHtThis->End()), // this empty
"HintsCheck: Portion inconsistency. "
"This can be temporarily ok during undo operations" );
@@ -279,7 +279,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const
{
// mostly ignore the annoying no-length hints
// BuildPortions inserts these in the middle of an existing one
- bool const bNoLength(*pHt->GetStart() == *pHt->End());
+ bool const bNoLength(pHt->GetStart() == *pHt->End());
bool bNeedContinuation(!bNoLength && pHt->IsFormatIgnoreEnd());
bool bForbidContinuation(!bNoLength && !bNeedContinuation);
if (RES_TXTATR_AUTOFMT == pHt->Which())
@@ -297,15 +297,15 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const
for (sal_uInt16 j = i + 1; j < Count(); ++j)
{
SwTxtAttr *const pOther(m_HintStarts[j]);
- if (*pOther->GetStart() > *pHt->End())
+ if (pOther->GetStart() > *pHt->End())
{
break; // done
}
- else if (*pOther->GetStart() == *pOther->GetAnyEnd())
+ else if (pOther->GetStart() == *pOther->GetAnyEnd())
{
continue; // empty hint: ignore
}
- else if (*pOther->GetStart() == *pHt->End())
+ else if (pOther->GetStart() == *pHt->End())
{
if (RES_TXTATR_AUTOFMT == pOther->Which() ||
RES_TXTATR_CHARFMT == pOther->Which())
@@ -346,8 +346,8 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const
if ( pOther->IsNesting() && (i != j) )
{
SwComparePosition cmp = ComparePosition(
- *pHtThis->GetStart(), *pHtThis->End(),
- *pOther->GetStart(), *pOther->End());
+ pHtThis->GetStart(), *pHtThis->End(),
+ pOther->GetStart(), *pOther->End());
CHECK_ERR( (POS_OVERLAP_BEFORE != cmp) &&
(POS_OVERLAP_BEHIND != cmp),
"HintsCheck: overlapping nesting hints!!!" );
@@ -363,7 +363,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const
SwTxtAttr const * const pOther( m_HintStarts[j] );
if (pOther->HasDummyChar())
{
- CHECK_ERR( (*pOther->GetStart() != *pHtThis->GetStart()),
+ CHECK_ERR( (pOther->GetStart() != pHtThis->GetStart()),
"HintsCheck: multiple hints claim same CH_TXTATR!");
}
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index ba6061d5f679..01f9e9a1f5f3 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -451,7 +451,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
else if ( pHt->DontExpand() )
{
const sal_Int32* const pEnd = pHt->GetEnd();
- if (pEnd && *pHt->GetStart() == *pEnd )
+ if (pEnd && pHt->GetStart() == *pEnd )
{
// delete it!
m_pSwpHints->DeleteAtPos( j );
@@ -533,7 +533,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
{
SwTxtAttr* const pHt = m_pSwpHints->GetTextHint( --j );
const sal_Int32* const pEnd = pHt->GetEnd();
- if ( pHt->DontExpand() && pEnd && (*pHt->GetStart() == *pEnd) )
+ if ( pHt->DontExpand() && pEnd && (pHt->GetStart() == *pEnd) )
{
// delete it!
m_pSwpHints->DeleteAtPos( j );
@@ -590,7 +590,7 @@ void SwTxtNode::MoveTxtAttr_To_AttrSet()
{
SwTxtAttr *pHt = m_pSwpHints->GetTextHint(i);
- if( *pHt->GetStart() )
+ if( pHt->GetStart() )
break;
const sal_Int32* pHtEndIdx = pHt->GetEnd();
@@ -844,16 +844,16 @@ void SwTxtNode::Update(
bool bTxtAttrChanged = false;
bool bStartOfTxtAttrChanged = false;
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n);
- sal_Int32 * const pStart = pHint->GetStart();
- if ( *pStart > nChangePos )
+ sal_Int32 & rStart = pHint->GetStart();
+ if ( rStart > nChangePos )
{
- if ( *pStart > nChangeEnd )
+ if ( rStart > nChangeEnd )
{
- *pStart = *pStart - nChangeLen;
+ rStart = rStart - nChangeLen;
}
else
{
- *pStart = nChangePos;
+ rStart = nChangePos;
}
bStartOfTxtAttrChanged = true;
}
@@ -903,11 +903,11 @@ void SwTxtNode::Update(
{
bool bTxtAttrChanged = false;
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n);
- sal_Int32 * const pStart = pHint->GetStart();
+ sal_Int32 & rStart = pHint->GetStart();
sal_Int32 * const pEnd = pHint->GetEnd();
- if ( *pStart >= nChangePos )
+ if ( rStart >= nChangePos )
{
- *pStart = *pStart + nChangeLen;
+ rStart = rStart + nChangeLen;
if ( pEnd )
{
*pEnd = *pEnd + nChangeLen;
@@ -1173,7 +1173,7 @@ bool SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
if( nIdx != *pEnd )
nPos = 0;
else if( bFlag != pTmp->DontExpand() && !pTmp->IsLockExpandFlag()
- && *pEnd > *pTmp->GetStart())
+ && *pEnd > pTmp->GetStart())
{
bRet = true;
m_pSwpHints->NoteInHistory( pTmp );
@@ -1219,7 +1219,7 @@ lcl_GetTxtAttrs(
for( sal_uInt16 i = 0; i < nSize; ++i )
{
SwTxtAttr *const pHint = pSwpHints->GetTextHint(i);
- sal_Int32 const nHintStart( *(pHint->GetStart()) );
+ sal_Int32 const nHintStart = pHint->GetStart();
if (nIndex < nHintStart)
{
return; // hints are sorted by start, so we are done...
@@ -1292,7 +1292,7 @@ const SwTxtInputFld* SwTxtNode::GetOverlappingInputFld( const SwTxtAttr& rTxtAtt
{
const SwTxtInputFld* pTxtInputFld = NULL;
- pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt( *(rTxtAttr.GetStart()), RES_TXTATR_INPUTFIELD, PARENT ));
+ pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt( rTxtAttr.GetStart(), RES_TXTATR_INPUTFIELD, PARENT ));
if ( pTxtInputFld == NULL && rTxtAttr.End() != NULL )
{
@@ -1461,7 +1461,7 @@ void lcl_CopyHint(
case RES_TXTATR_METAFIELD:
OSL_ENSURE( pNewHt, "copying Meta should not fail!" );
OSL_ENSURE( pDest
- && (CH_TXTATR_INWORD == pDest->GetTxt()[*pNewHt->GetStart()]),
+ && (CH_TXTATR_INWORD == pDest->GetTxt()[pNewHt->GetStart()]),
"missing CH_TXTATR?");
break;
}
@@ -1483,7 +1483,7 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const sal_Int32 nTxtStartIdx,
for ( sal_uInt16 i = 0; i < m_pSwpHints->Count(); i++ )
{
SwTxtAttr *const pHt = m_pSwpHints->GetTextHint(i);
- sal_Int32 const nAttrStartIdx = *pHt->GetStart();
+ sal_Int32 const nAttrStartIdx = pHt->GetStart();
if ( nTxtStartIdx < nAttrStartIdx )
break; // ueber das Textende, da nLen == 0
@@ -1659,7 +1659,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
//Achtung: kann ungueltig sein!!
for (sal_uInt16 n = 0; ( n < nSize ); ++n)
{
- const sal_Int32 nAttrStartIdx = *(*m_pSwpHints)[n]->GetStart();
+ const sal_Int32 nAttrStartIdx = (*m_pSwpHints)[n]->GetStart();
if (!( nAttrStartIdx < nEnd))
break;
@@ -1791,7 +1791,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
}
else
{
- const SwIndex aIdx( pDest, *pNewHt->GetStart() );
+ const SwIndex aIdx( pDest, pNewHt->GetStart() );
pDest->EraseText( aIdx, 1 );
}
}
@@ -1843,7 +1843,7 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
{
bool bMergePortionsNeeded(false);
for ( sal_uInt16 i = 0; i < m_pSwpHints->Count() &&
- rIdx >= *(*m_pSwpHints)[i]->GetStart(); ++i )
+ rIdx >= (*m_pSwpHints)[i]->GetStart(); ++i )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint( i );
sal_Int32 * const pEndIdx = pHt->GetEnd();
@@ -1857,8 +1857,8 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
&& pHt->DontExpand()) )
{
// bei leeren Attributen auch Start veraendern
- if( rIdx == *pHt->GetStart() )
- *pHt->GetStart() = *pHt->GetStart() - nLen;
+ if( rIdx == pHt->GetStart() )
+ pHt->GetStart() = pHt->GetStart() - nLen;
*pEndIdx = *pEndIdx - nLen;
m_pSwpHints->DeleteAtPos(i);
// could be that pHt has IsFormatIgnoreEnd set, and it's
@@ -1873,9 +1873,9 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
}
// empty hints at insert position?
else if ( (nMode & IDocumentContentOperations::INS_EMPTYEXPAND)
- && (*pEndIdx == *pHt->GetStart()) )
+ && (*pEndIdx == pHt->GetStart()) )
{
- *pHt->GetStart() = *pHt->GetStart() - nLen;
+ pHt->GetStart() = pHt->GetStart() - nLen;
const sal_uInt16 nAktLen = m_pSwpHints->Count();
m_pSwpHints->DeleteAtPos(i);
InsertHint( pHt/* AUTOSTYLES:, nsSetAttrMode::SETATTR_NOHINTADJUST*/ );
@@ -1891,12 +1891,12 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
}
}
if ( !(nMode & IDocumentContentOperations::INS_NOHINTEXPAND) &&
- rIdx == nLen && *pHt->GetStart() == rIdx.GetIndex() &&
+ rIdx == nLen && pHt->GetStart() == rIdx.GetIndex() &&
!pHt->IsDontExpandStartAttr() )
{
// Kein Feld, am Absatzanfang, HintExpand
m_pSwpHints->DeleteAtPos(i);
- *pHt->GetStart() = *pHt->GetStart() - nLen;
+ pHt->GetStart() = pHt->GetStart() - nLen;
// no effect on format ignore flags here (para start)
InsertHint( pHt, nsSetAttrMode::SETATTR_NOHINTADJUST );
}
@@ -1998,7 +1998,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
while ( m_pSwpHints && nAttrCnt < m_pSwpHints->Count() )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt);
- const sal_Int32 nAttrStartIdx = *pHt->GetStart();
+ const sal_Int32 nAttrStartIdx = pHt->GetStart();
if (!( nAttrStartIdx < nEnd ))
break;
const sal_Int32 * const pEndIdx = pHt->GetEnd();
@@ -2027,7 +2027,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// Attribut verschieben
m_pSwpHints->Delete( pHt );
// die Start/End Indicies neu setzen
- *pHt->GetStart() = nAttrStartIdx - nTxtStartIdx;
+ pHt->GetStart() = nAttrStartIdx - nTxtStartIdx;
if( pEndIdx )
*pHt->GetEnd() = *pEndIdx - nTxtStartIdx;
aArr.push_back( pHt );
@@ -2078,7 +2078,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
for ( sal_uInt16 n = 0; n < aArr.size(); ++n )
{
SwTxtAttr *const pNewHt = aArr[n];
- *pNewHt->GetStart() = nDestStart + *pNewHt->GetStart();
+ pNewHt->GetStart() = nDestStart + pNewHt->GetStart();
sal_Int32 * const pEndIdx = pNewHt->GetEnd();
if ( pEndIdx )
{
@@ -2150,7 +2150,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
while ( m_pSwpHints && (nAttrCnt < m_pSwpHints->Count()) )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt);
- const sal_Int32 nAttrStartIdx = *pHt->GetStart();
+ const sal_Int32 nAttrStartIdx = pHt->GetStart();
if (!( nAttrStartIdx < nEnd ))
break;
const sal_Int32 * const pEndIdx = pHt->GetEnd();
@@ -2193,7 +2193,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
{
bMergePortionsNeeded = true;
}
- *pHt->GetStart() =
+ pHt->GetStart() =
nDestStart + (nAttrStartIdx - nTxtStartIdx);
if( pEndIdx )
{
@@ -2244,7 +2244,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
while ( nAttrCnt < m_pSwpHints->Count() )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt);
- if ( nEnd != *pHt->GetStart() )
+ if ( nEnd != pHt->GetStart() )
break;
const sal_Int32 * const pEndIdx = pHt->GetEnd();
if ( pEndIdx && *pEndIdx == nEnd )
@@ -2262,7 +2262,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
for ( sal_uInt16 n = 0; n < aArr.size(); ++n )
{
SwTxtAttr * const pHt = aArr[ n ];
- *pHt->GetStart() = *pHt->GetEnd() = rStart.GetIndex();
+ pHt->GetStart() = *pHt->GetEnd() = rStart.GetIndex();
InsertHint( pHt );
}
}
@@ -2308,7 +2308,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount,
{
SwTxtAttr *pHt = m_pSwpHints->GetTextHint(i);
- const sal_Int32 nHintStart = *pHt->GetStart();
+ const sal_Int32 nHintStart = pHt->GetStart();
if ( nHintStart < nStartIdx )
continue;
@@ -2406,11 +2406,11 @@ void SwTxtNode::GCAttr()
// wenn Ende und Start gleich sind --> loeschen
const sal_Int32 * const pEndIdx = pHt->GetEnd();
- if (pEndIdx && !pHt->HasDummyChar() && (*pEndIdx == *pHt->GetStart())
+ if (pEndIdx && !pHt->HasDummyChar() && (*pEndIdx == pHt->GetStart())
&& ( bAll || pHt->Which() == RES_TXTATR_INETFMT ) )
{
bChanged = true;
- nMin = std::min( nMin, *pHt->GetStart() );
+ nMin = std::min( nMin, pHt->GetStart() );
nMax = std::max( nMax, *pHt->GetEnd() );
DestroyAttr( m_pSwpHints->Cut(i) );
--i;
@@ -2690,7 +2690,7 @@ SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt(
for ( sal_uInt16 i = 0; i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(i);
- const sal_Int32 nStartPos = *pHint->GetStart();
+ const sal_Int32 nStartPos = pHint->GetStart();
if ( nIndex < nStartPos )
{
return 0;
@@ -3171,7 +3171,7 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
for ( sal_uInt16 i = 0; i < m_pSwpHints->Count(); i++ )
{
const SwTxtAttr* pHt = (*m_pSwpHints)[i];
- const sal_Int32 nAttrStartIdx = *pHt->GetStart();
+ const sal_Int32 nAttrStartIdx = pHt->GetStart();
const sal_uInt16 nWhich = pHt->Which();
if (nIdx + nLen <= nAttrStartIdx)
break; // ueber das Textende
@@ -3409,7 +3409,7 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
if (pHint)
{
assert(!( pHint->GetEnd() && pHint->HasDummyChar()
- && (*pHint->GetStart() < nEndPos)
+ && (pHint->GetStart() < nEndPos)
&& (*pHint->GetEnd() > nEndPos) ));
// "deleting left-overlapped attribute with CH_TXTATR"
DeleteAttribute( pHint );
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index cae6296bf64e..294f28af0034 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -113,7 +113,7 @@ struct TxtAttrContains
TxtAttrContains( const sal_Int32 nPos ) : m_nPos( nPos ) { }
bool operator() (SwTxtAttrEnd * const pAttr)
{
- return (*pAttr->GetStart() < m_nPos) && (m_nPos < *pAttr->End());
+ return (pAttr->GetStart() < m_nPos) && (m_nPos < *pAttr->End());
}
};
@@ -354,7 +354,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
{
// INVARIANT: the nestable hints in the array are properly nested
const sal_uInt16 nNewWhich( rNewHint.Which() );
- const sal_Int32 nNewStart( *rNewHint.GetStart() );
+ const sal_Int32 nNewStart( rNewHint.GetStart() );
const sal_Int32 nNewEnd ( *rNewHint.GetEnd() );
const bool bNewSelfNestable( isSelfNestable(nNewWhich) );
@@ -379,7 +379,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
if (pOther->IsNesting())
{
const sal_uInt16 nOtherWhich( pOther->Which() );
- const sal_Int32 nOtherStart( *(pOther)->GetStart() );
+ const sal_Int32 nOtherStart( pOther->GetStart() );
const sal_Int32 nOtherEnd ( *(pOther)->GetEnd() );
if (isOverlap(nNewStart, nNewEnd, nOtherStart, nOtherEnd ))
{
@@ -423,9 +423,9 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
// should be corrected because it may lead to problems
// in SwXMeta::createEnumeration
// SplitNew is sorted, so this is the first split
- sal_Int32 *const pStart(SplitNew.front()->GetStart());
- OSL_ENSURE(*pStart == nNewStart, "how did that happen?");
- *pStart = nNewStart + 1;
+ sal_Int32& rStart(SplitNew.front()->GetStart());
+ OSL_ENSURE(rStart == nNewStart, "how did that happen?");
+ rStart = nNewStart + 1;
}
}
}
@@ -446,13 +446,13 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
for (NestList_t::iterator itOther = OverlappingExisting.begin();
itOther != OverlappingExisting.end(); ++itOther)
{
- const sal_Int32 nOtherStart( *(*itOther)->GetStart() );
+ const sal_Int32 nOtherStart( (*itOther)->GetStart() );
const sal_Int32 nOtherEnd ( *(*itOther)->GetEnd() );
for (NestList_t::iterator itNew = SplitNew.begin();
itNew != SplitNew.end(); ++itNew)
{
- const sal_Int32 nSplitNewStart( *(*itNew)->GetStart() );
+ const sal_Int32 nSplitNewStart( (*itNew)->GetStart() );
const sal_Int32 nSplitNewEnd ( *(*itNew)->GetEnd() );
// 4 cases: within, around, overlap l, overlap r, (OTHER: no action)
const bool bRemoveOverlap(
@@ -476,7 +476,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
case POS_OVERLAP_BEFORE:
{
Delete( *itOther ); // this also does NoteInHistory!
- *(*itOther)->GetStart() = nSplitNewEnd;
+ (*itOther)->GetStart() = nSplitNewEnd;
InsertNesting( **itOther );
if (!bRemoveOverlap)
{
@@ -536,7 +536,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
for (NestList_t::iterator itOther = OverwrittenExisting.begin();
itOther != OverwrittenExisting.end(); ++itOther)
{
- const sal_Int32 nOtherStart( *(*itOther)->GetStart() );
+ const sal_Int32 nOtherStart( (*itOther)->GetStart() );
const sal_Int32 nOtherEnd ( *(*itOther)->GetEnd() );
// overwritten portion is given by start/end of inserted hint
@@ -582,7 +582,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
{
const sal_uInt16 nWhich = rNewHint.Which();
- const sal_Int32 nThisStart = *rNewHint.GetStart();
+ const sal_Int32 nThisStart = rNewHint.GetStart();
const sal_Int32 nThisEnd = *rNewHint.GetEnd();
const bool bNoLengthAttribute = nThisStart == nThisEnd;
@@ -606,7 +606,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
RES_TXTATR_AUTOFMT != pOther->Which() )
continue;
- sal_Int32 nOtherStart = *pOther->GetStart();
+ sal_Int32 nOtherStart = pOther->GetStart();
const sal_Int32 nOtherEnd = *pOther->GetEnd();
// Check if start of new attribute overlaps with pOther:
@@ -620,7 +620,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
aInsDelHints.push_back( pNewAttr );
NoteInHistory( pOther );
- *pOther->GetStart() = nThisStart;
+ pOther->GetStart() = nThisStart;
NoteInHistory( pOther, true );
nOtherStart = nThisStart;
@@ -637,7 +637,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
aInsDelHints.push_back( pNewAttr );
NoteInHistory( pOther );
- *pOther->GetStart() = nThisEnd;
+ pOther->GetStart() = nThisEnd;
NoteInHistory( pOther, true );
}
}
@@ -671,7 +671,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
RES_TXTATR_AUTOFMT != pOther->Which() )
continue;
- const sal_Int32 nOtherStart = *pOther->GetStart();
+ const sal_Int32 nOtherStart = pOther->GetStart();
const sal_Int32 nOtherEnd = *pOther->End();
aBounds.insert( nOtherStart );
@@ -703,7 +703,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
RES_TXTATR_AUTOFMT != pOther->Which() )
continue;
- const sal_Int32 nOtherStart = *pOther->GetStart();
+ const sal_Int32 nOtherStart = pOther->GetStart();
if ( nOtherStart > nPorStart )
break;
@@ -1243,7 +1243,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
bool bHiddenPara = false;
- OSL_ENSURE( pAttr && *pAttr->GetStart() <= Len(), "StartIdx out of bounds!" );
+ OSL_ENSURE( pAttr && pAttr->GetStart() <= Len(), "StartIdx out of bounds!" );
OSL_ENSURE( !pAttr->GetEnd() || (*pAttr->GetEnd() <= Len()),
"EndIdx out of bounds!" );
@@ -1256,7 +1256,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
: IDocumentContentOperations::INS_EMPTYEXPAND;
// need this after TryInsertHint, when pAttr may be deleted
- const sal_Int32 nStart( *pAttr->GetStart() );
+ const sal_Int32 nStart( pAttr->GetStart() );
const bool bDummyChar( pAttr->HasDummyChar() );
if (bDummyChar)
{
@@ -1279,7 +1279,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
pFmt->GetItemState( RES_ANCHOR, false,
(const SfxPoolItem**)&pAnchor );
- SwIndex aIdx( this, *pAttr->GetStart() );
+ SwIndex aIdx( this, pAttr->GetStart() );
const OUString c(GetCharOfTxtAttr(*pAttr));
OUString const ins( InsertText(c, aIdx, nInsertFlags) );
if (ins.isEmpty())
@@ -1328,13 +1328,13 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
// loesche das Zeichen aus dem String !
OSL_ENSURE( ( CH_TXTATR_BREAKWORD ==
- m_Text[*pAttr->GetStart()] ||
+ m_Text[pAttr->GetStart()] ||
CH_TXTATR_INWORD ==
- m_Text[*pAttr->GetStart()]),
+ m_Text[pAttr->GetStart()]),
"where is my attribute character?" );
- m_Text = m_Text.replaceAt(*pAttr->GetStart(), 1, "");
+ m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, "");
// Indizies Updaten
- SwIndex aTmpIdx( this, *pAttr->GetStart() );
+ SwIndex aTmpIdx( this, pAttr->GetStart() );
Update( aTmpIdx, 1, true );
}
// do not record deletion of Format!
@@ -1364,13 +1364,13 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
// loesche das Zeichen aus dem String !
OSL_ENSURE( ( CH_TXTATR_BREAKWORD ==
- m_Text[*pAttr->GetStart()] ||
+ m_Text[pAttr->GetStart()] ||
CH_TXTATR_INWORD ==
- m_Text[*pAttr->GetStart()]),
+ m_Text[pAttr->GetStart()]),
"where is my attribute character?" );
- m_Text = m_Text.replaceAt(*pAttr->GetStart(), 1, "");
+ m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, "");
// Indizies Updaten
- SwIndex aTmpIdx( this, *pAttr->GetStart() );
+ SwIndex aTmpIdx( this, pAttr->GetStart() );
Update( aTmpIdx, 1, true );
}
DestroyAttr( pAttr );
@@ -1404,7 +1404,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// Wir muessen zuerst einfuegen, da sonst gleiche Indizes
// entstehen koennen und das Attribut im _SortArr_ am
// Dokument nicht eingetrage wird.
- SwIndex aNdIdx( this, *pAttr->GetStart() );
+ SwIndex aNdIdx( this, pAttr->GetStart() );
const OUString c(GetCharOfTxtAttr(*pAttr));
OUString const ins( InsertText(c, aNdIdx, nInsertFlags) );
if (ins.isEmpty())
@@ -1470,7 +1470,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// mitkopiert. In solchem Fall ist SETATTR_NOTXTATRCHR angegeben worden.
if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
{
- SwIndex aIdx( this, *pAttr->GetStart() );
+ SwIndex aIdx( this, pAttr->GetStart() );
OUString const ins( InsertText(OUString(GetCharOfTxtAttr(*pAttr)),
aIdx, nInsertFlags) );
if (ins.isEmpty())
@@ -1504,7 +1504,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
{
- SwIndex aIdx( this, *pAttr->GetStart() );
+ SwIndex aIdx( this, pAttr->GetStart() );
InsertText( OUString(CH_TXT_ATR_INPUTFIELDSTART), aIdx, nInsertFlags );
const OUString aContent = pTxtInputFld->GetFieldContent();
InsertText( aContent, aIdx, nInsertFlags );
@@ -1521,9 +1521,9 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
else
{
// assure that CH_TXT_ATR_INPUTFIELDSTART and CH_TXT_ATR_INPUTFIELDEND are inserted.
- if ( m_Text[ *(pAttr->GetStart()) ] != CH_TXT_ATR_INPUTFIELDSTART )
+ if ( m_Text[ pAttr->GetStart() ] != CH_TXT_ATR_INPUTFIELDSTART )
{
- SwIndex aIdx( this, *pAttr->GetStart() );
+ SwIndex aIdx( this, pAttr->GetStart() );
InsertText( OUString(CH_TXT_ATR_INPUTFIELDSTART), aIdx, nInsertFlags );
bInputFieldStartCharInserted = true;
sal_Int32* const pEnd(pAttr->GetEnd());
@@ -1569,9 +1569,9 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
}
else
{
- if ( *(pAttr->GetStart()) > *(pTxtInputFld->GetStart()) )
+ if ( pAttr->GetStart() > pTxtInputFld->GetStart() )
{
- *(pAttr->GetStart()) = *(pTxtInputFld->GetStart());
+ pAttr->GetStart() = pTxtInputFld->GetStart();
}
if ( *(pAttr->End()) < *(pTxtInputFld->End()) )
{
@@ -1647,21 +1647,21 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr )
if ( pAttr->HasDummyChar() )
{
// Unbedingt Copy-konstruieren!
- const SwIndex aIdx( this, *pAttr->GetStart() );
+ const SwIndex aIdx( this, pAttr->GetStart() );
// erase the CH_TXTATR, which will also delete pAttr
EraseText( aIdx, 1 );
}
else if ( pAttr->HasContent() )
{
- const SwIndex aIdx( this, *pAttr->GetStart() );
+ const SwIndex aIdx( this, pAttr->GetStart() );
OSL_ENSURE( pAttr->End() != NULL, "<SwTxtNode::DeleteAttribute(..)> - missing End() at <SwTxtAttr> instance which has content" );
- EraseText( aIdx, *pAttr->End() - *pAttr->GetStart() );
+ EraseText( aIdx, *pAttr->End() - pAttr->GetStart() );
}
else
{
// create MsgHint before start/end become invalid
SwUpdateAttr aHint(
- *pAttr->GetStart(), *pAttr->GetEnd(), pAttr->Which() );
+ pAttr->GetStart(), *pAttr->GetEnd(), pAttr->Which() );
m_pSwpHints->Delete( pAttr );
SwTxtAttr::Destroy( pAttr, GetDoc()->GetAttrPool() );
NotifyClients( 0, &aHint );
@@ -1682,7 +1682,7 @@ void SwTxtNode::DeleteAttributes(
for ( sal_uInt16 nPos = 0; m_pSwpHints && nPos < m_pSwpHints->Count(); nPos++ )
{
SwTxtAttr * const pTxtHt = m_pSwpHints->GetTextHint( nPos );
- const sal_Int32 nHintStart = *(pTxtHt->GetStart());
+ const sal_Int32 nHintStart = pTxtHt->GetStart();
if (nStart < nHintStart)
{
break; // sorted by start
@@ -2092,7 +2092,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
for (sal_uInt16 n = 0; n < nSize; ++n)
{
const SwTxtAttr* pHt = (*m_pSwpHints)[n];
- const sal_Int32 nAttrStart = *pHt->GetStart();
+ const sal_Int32 nAttrStart = pHt->GetStart();
if( nAttrStart > nEnd ) // ueber den Bereich hinaus
break;
@@ -2119,7 +2119,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
for (sal_uInt16 n = 0; n < nSize; ++n)
{
const SwTxtAttr* pHt = (*m_pSwpHints)[n];
- const sal_Int32 nAttrStart = *pHt->GetStart();
+ const sal_Int32 nAttrStart = pHt->GetStart();
if( nAttrStart > nEnd ) // ueber den Bereich hinaus
break;
@@ -2346,7 +2346,7 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_uInt16 nLength,
const sal_uInt16 nWhich(pHint->Which());
if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT)
{
- const AttrSpan_t aSpan(*pHint->GetStart(), *pHint->End());
+ const AttrSpan_t aSpan(pHint->GetStart(), *pHint->End());
o_rSpanMap.insert(AttrSpanMap_t::value_type(aSpan, pHint));
// < not != because there may be multiple CHARFMT at same range
@@ -2661,7 +2661,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
{
// fdo#70201: eliminate no-extent RSID-only AUTOFMT
// could be produced by ReplaceText or (maybe?) RstAttr
- if (*pHt->GetStart() == *pHt->GetEnd())
+ if (pHt->GetStart() == *pHt->GetEnd())
{
SwpHintsArray::DeleteAtPos(i); // kill it without History!
SwTxtAttr::Destroy(pHt, rNode.GetDoc()->GetAttrPool());
@@ -2680,14 +2680,14 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
}
}
- if (*pHt->GetStart() == *pHt->GetEnd())
+ if (pHt->GetStart() == *pHt->GetEnd())
{
// no-length hints are a disease. ignore them here.
// the SwAttrIter::SeekFwd will not call Rst/Chg for them.
continue;
}
- const sal_Int32 nPorStart = *pHt->GetStart();
+ const sal_Int32 nPorStart = pHt->GetStart();
if (nPorStart != nLastPorStart)
++nKey;
nLastPorStart = nPorStart;
@@ -2731,7 +2731,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
{
// first of all test if there's no gap (before skipping stuff!)
if (aIter1 != aRange1.second && aIter2 != aRange2.second &&
- *aIter1->second.first->End() < *aIter2->second.first->GetStart())
+ *aIter1->second.first->End() < aIter2->second.first->GetStart())
{
eMerge = DIFFER;
break;
@@ -2900,7 +2900,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
// check if there is already a character format and adjust the sort numbers
static void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharFmt )
{
- const sal_Int32 nHtStart = *rNewCharFmt.GetStart();
+ const sal_Int32 nHtStart = rNewCharFmt.GetStart();
const sal_Int32 nHtEnd = *rNewCharFmt.GetEnd();
sal_uInt16 nSortNumber = 0;
@@ -2908,7 +2908,7 @@ static void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharF
{
const SwTxtAttr* pOtherHt = rHints[i];
- const sal_Int32 nOtherStart = *pOtherHt->GetStart();
+ const sal_Int32 nOtherStart = pOtherHt->GetStart();
if ( nOtherStart > nHtStart )
break;
@@ -2974,7 +2974,7 @@ bool SwpHints::TryInsertHint(
case RES_TXTATR_AUTOFMT:
{
boost::shared_ptr<SfxItemSet> const pSet( pHint->GetAutoFmt().GetStyleHandle() );
- if (*pHint->GetStart() == *pHint->GetEnd())
+ if (pHint->GetStart() == *pHint->GetEnd())
{
if (pSet->Count() == 1 && pSet->GetItem(RES_CHRATR_RSID, false))
{ // empty range RSID-only hints could cause trouble, there's no
@@ -3102,8 +3102,8 @@ bool SwpHints::TryInsertHint(
0 != ( pTmpHintEnd = pHint->GetEnd() ) )
{
SwComparePosition eCmp = ::ComparePosition(
- *pTmpHt->GetStart(), *pTmpHtEnd,
- *pHint->GetStart(), *pTmpHintEnd );
+ pTmpHt->GetStart(), *pTmpHtEnd,
+ pHint->GetStart(), *pTmpHintEnd );
bool bDelOld = true, bChgStart = false, bChgEnd = false;
switch( eCmp )
{
@@ -3120,7 +3120,7 @@ bool SwpHints::TryInsertHint(
}
if( bChgStart )
- *pHint->GetStart() = *pTmpHt->GetStart();
+ pHint->GetStart() = pTmpHt->GetStart();
if( bChgEnd )
*pTmpHintEnd = *pTmpHtEnd;
@@ -3159,7 +3159,7 @@ bool SwpHints::TryInsertHint(
// Sie werden natuerlich in das Array insertet, aber sie werden nicht
// in die pPrev/Next/On/Off-Verkettung aufgenommen.
// Der Formatierer erkennt diese TxtHints an dem CH_TXTATR_.. im Text !
- sal_Int32 nHtStart = *pHint->GetStart();
+ sal_Int32 nHtStart = pHint->GetStart();
if( !pHtEnd )
{
SwpHintsArray::Insert( pHint );
@@ -3185,9 +3185,9 @@ bool SwpHints::TryInsertHint(
"+SwpHints::Insert: invalid hint, end < start" );
// Wir drehen den Quatsch einfach um:
- *pHint->GetStart() = *pHtEnd;
+ pHint->GetStart() = *pHtEnd;
*pHtEnd = nHtStart;
- nHtStart = *pHint->GetStart();
+ nHtStart = pHint->GetStart();
}
// I need this value later on for notification but the pointer may become invalid
@@ -3364,7 +3364,7 @@ sal_uInt16 SwTxtNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen,
{
// ist der Attribut-Anfang schon groesser als der Idx ?
const SwTxtAttr *pHt = m_pSwpHints->operator[](i);
- const sal_Int32 nAttrStart = *pHt->GetStart();
+ const sal_Int32 nAttrStart = pHt->GetStart();
if( nEnd < nAttrStart )
break;
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 5fc1f4a8255d..e8499ac664c5 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -203,7 +203,7 @@ void SwTxtAttrIterator::SearchNextChg()
{
const SwTxtAttr* pHt = (*pHts)[ nAttrPos ];
const sal_Int32* pEnd = pHt->End();
- const sal_Int32 nHtStt = *pHt->GetStart();
+ const sal_Int32 nHtStt = pHt->GetStart();
if( nHtStt < nStt && ( !pEnd || *pEnd <= nStt ))
continue;
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index c8f8daa56c37..e676498d8c9e 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -59,7 +59,7 @@ void SwTxtCharFmt::ModifyNotification( const SfxPoolItem* pOld, const SfxPoolIte
if ( m_pTxtNode )
{
- SwUpdateAttr aUpdateAttr( *GetStart(), *GetEnd(), nWhich );
+ SwUpdateAttr aUpdateAttr( GetStart(), *GetEnd(), nWhich );
m_pTxtNode->ModifyNotification( &aUpdateAttr, &aUpdateAttr );
}
}
@@ -167,7 +167,7 @@ void SwTxtINetFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if ( m_pTxtNode )
{
- SwUpdateAttr aUpdateAttr( *GetStart(), *GetEnd(), nWhich );
+ SwUpdateAttr aUpdateAttr( GetStart(), *GetEnd(), nWhich );
m_pTxtNode->ModifyNotification( &aUpdateAttr, &aUpdateAttr );
}
}
@@ -212,7 +212,7 @@ void SwTxtRuby::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if ( m_pTxtNode )
{
- SwUpdateAttr aUpdateAttr( *GetStart(), *GetEnd(), nWhich );
+ SwUpdateAttr aUpdateAttr( GetStart(), *GetEnd(), nWhich );
m_pTxtNode->ModifyNotification( &aUpdateAttr, &aUpdateAttr );
}
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 6c2adee3c350..af8e9f2a10e3 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -392,9 +392,9 @@ void SwTxtNode::RstTxtAttr(
}
if ( pTxtInputFld != NULL )
{
- if ( nStt > *(pTxtInputFld->GetStart()) )
+ if ( nStt > pTxtInputFld->GetStart() )
{
- nStt = *(pTxtInputFld->GetStart());
+ nStt = pTxtInputFld->GetStart();
}
if ( nEnd < *(pTxtInputFld->End()) )
{
@@ -420,7 +420,7 @@ void SwTxtNode::RstTxtAttr(
sal_Int32 nAttrStart;
SwTxtAttr *pHt = NULL;
while ( (i < m_pSwpHints->Count())
- && ( ( ( nAttrStart = *(*m_pSwpHints)[i]->GetStart()) < nEnd )
+ && ( ( ( nAttrStart = (*m_pSwpHints)[i]->GetStart()) < nEnd )
|| nLen==0 ) )
{
pHt = m_pSwpHints->GetTextHint(i);
@@ -531,7 +531,7 @@ void SwTxtNode::RstTxtAttr(
{
m_pSwpHints->NoteInHistory( pHt );
// UGLY: this may temporarily destroy the sorting!
- *pHt->GetStart() = nEnd;
+ pHt->GetStart() = nEnd;
m_pSwpHints->NoteInHistory( pHt, true );
if ( pStyleHandle.get() && nAttrStart < nEnd )
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index f7c696c921c0..c5cfc3409597 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -194,7 +194,7 @@ void SwHistoryResetFmt::SetInDoc( SwDoc* pDoc, bool )
SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETTXTHNT )
, m_nNodeIndex( nNodePos )
- , m_nStart( *pTxtHt->GetStart() )
+ , m_nStart( pTxtHt->GetStart() )
, m_nEnd( *pTxtHt->GetAnyEnd() )
, m_bFormatIgnoreStart(pTxtHt->IsFormatIgnoreStart())
, m_bFormatIgnoreEnd (pTxtHt->IsFormatIgnoreEnd ())
@@ -272,7 +272,7 @@ SwHistorySetTxtFld::SwHistorySetTxtFld( SwTxtFld* pTxtFld, sal_uLong nNodePos )
m_pFld->GetField()->ChgTyp( m_pFldType.get() ); // change field type
}
m_nNodeIndex = nNodePos;
- m_nPos = *pTxtFld->GetStart();
+ m_nPos = pTxtFld->GetStart();
}
OUString SwHistorySetTxtFld::GetDescription() const
@@ -316,7 +316,7 @@ SwHistorySetRefMark::SwHistorySetRefMark( SwTxtRefMark* pTxtHt, sal_uLong nNodeP
: SwHistoryHint( HSTRY_SETREFMARKHNT )
, m_RefName( pTxtHt->GetRefMark().GetRefName() )
, m_nNodeIndex( nNodePos )
- , m_nStart( *pTxtHt->GetStart() )
+ , m_nStart( pTxtHt->GetStart() )
, m_nEnd( *pTxtHt->GetAnyEnd() )
{
}
@@ -345,7 +345,7 @@ SwHistorySetTOXMark::SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, sal_uLong nNodeP
, m_TOXName( m_TOXMark.GetTOXType()->GetTypeName() )
, m_eTOXTypes( m_TOXMark.GetTOXType()->GetType() )
, m_nNodeIndex( nNodePos )
- , m_nStart( *pTxtHt->GetStart() )
+ , m_nStart( pTxtHt->GetStart() )
, m_nEnd( *pTxtHt->GetAnyEnd() )
{
m_TOXMark.DeRegister();
@@ -417,7 +417,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, sal_uLong nNodePo
, m_pUndo( new SwUndoSaveSection )
, m_FootnoteNumber( pTxtFtn->GetFtn().GetNumStr() )
, m_nNodeIndex( nNodePos )
- , m_nStart( *pTxtFtn->GetStart() )
+ , m_nStart( pTxtFtn->GetStart() )
, m_bEndNote( pTxtFtn->GetFtn().IsEndNote() )
{
OSL_ENSURE( pTxtFtn->GetStartNode(),
@@ -442,7 +442,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( const SwTxtFtn &rTxtFtn )
, m_pUndo( 0 )
, m_FootnoteNumber( rTxtFtn.GetFtn().GetNumStr() )
, m_nNodeIndex( _SwTxtFtn_GetIndex( (&rTxtFtn) ) )
- , m_nStart( *rTxtFtn.GetStart() )
+ , m_nStart( rTxtFtn.GetStart() )
, m_bEndNote( rTxtFtn.GetFtn().IsEndNote() )
{
OSL_ENSURE( rTxtFtn.GetStartNode(),
@@ -1042,7 +1042,7 @@ void SwHistory::Add( SwTxtAttr* pHint, sal_uLong nNodeIdx, bool bNewAttr )
}
else
{
- pHt = new SwHistoryResetTxt( pHint->Which(), *pHint->GetStart(),
+ pHt = new SwHistoryResetTxt( pHint->Which(), pHint->GetStart(),
*pHint->GetAnyEnd(), nNodeIdx );
}
m_SwpHstry.push_back( pHt );
@@ -1231,7 +1231,7 @@ void SwHistory::CopyAttr(
{
// nAttrStt must even be set when !pEndIdx
pHt = pHts->GetTextHint(n);
- const sal_Int32 nAttrStt = *pHt->GetStart();
+ const sal_Int32 nAttrStt = pHt->GetStart();
if( 0 != ( pEndIdx = pHt->GetEnd() ) && nAttrStt > nEnd )
break;
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 2f482e38a24d..ed0ac1ce43c9 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -328,7 +328,7 @@ void SwUndoFmtAttr::RepeatImpl(::sw::RepeatContext & rContext)
case RES_GRFFMTCOLL:
{
SwNoTxtNode *const pNd =
- rContext.GetRepeatPaM().GetNode()->GetNoTxtNode();
+ rContext.GetRepeatPaM().GetNode().GetNoTxtNode();
if( pNd )
{
rDoc.SetAttr( m_pFmt->GetAttrSet(), *pNd->GetFmtColl() );
@@ -339,7 +339,7 @@ void SwUndoFmtAttr::RepeatImpl(::sw::RepeatContext & rContext)
case RES_TXTFMTCOLL:
{
SwTxtNode *const pNd =
- rContext.GetRepeatPaM().GetNode()->GetTxtNode();
+ rContext.GetRepeatPaM().GetNode().GetTxtNode();
if( pNd )
{
rDoc.SetAttr( m_pFmt->GetAttrSet(), *pNd->GetFmtColl() );
@@ -353,7 +353,7 @@ void SwUndoFmtAttr::RepeatImpl(::sw::RepeatContext & rContext)
// Steps: search in all FlyFrmFormats for the FlyCntnt attribute
// and validate if the cursor is in the respective section
SwFrmFmt *const pFly =
- rContext.GetRepeatPaM().GetNode()->GetFlyFmt();
+ rContext.GetRepeatPaM().GetNode().GetFlyFmt();
if( pFly )
{
// Bug 43672: do not set all attributes!
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 839550ef80ab..7e1074cb7fcd 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -343,7 +343,7 @@ SwUndoDelete::SwUndoDelete(
nNdDiff -= rPam.GetPoint()->nNode.GetIndex();
}
- if( !rPam.GetNode()->IsCntntNode() )
+ if( !rPam.GetNode().IsCntntNode() )
rPam.GetPoint()->nContent.Assign( 0, 0 );
// is a history necessary here at all?
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 78697dcf1a80..f99b377537b4 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -97,9 +97,9 @@ void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToCntnt ) const
{
rPam.DeleteMark();
rPam.GetPoint()->nNode = nSttNode;
- SwNode* pNd = rPam.GetNode();
- if( pNd->IsCntntNode() )
- rPam.GetPoint()->nContent.Assign( pNd->GetCntntNode(), nSttCntnt );
+ SwNode& rNd = rPam.GetNode();
+ if( rNd.IsCntntNode() )
+ rPam.GetPoint()->nContent.Assign( rNd.GetCntntNode(), nSttCntnt );
else if( bCorrToCntnt )
rPam.Move( fnMoveForward, fnGoCntnt );
else
@@ -113,8 +113,8 @@ void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToCntnt ) const
return; // nothing left to do
rPam.GetPoint()->nNode = nEndNode;
- if( (pNd = rPam.GetNode())->IsCntntNode() )
- rPam.GetPoint()->nContent.Assign( pNd->GetCntntNode(), nEndCntnt );
+ if( rPam.GetNode().IsCntntNode() )
+ rPam.GetPoint()->nContent.Assign( rPam.GetNode().GetCntntNode(), nEndCntnt );
else if( bCorrToCntnt )
rPam.Move( fnMoveBackward, fnGoCntnt );
else
@@ -333,7 +333,7 @@ void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
SwDoc& rDoc = *rPaM.GetDoc();
::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
- SwNoTxtNode* pCpyNd = rPaM.GetNode()->GetNoTxtNode();
+ SwNoTxtNode* pCpyNd = rPaM.GetNode().GetNoTxtNode();
// here comes the actual delete (move)
SwNodes & rNds = rDoc.GetUndoManager().GetUndoNodes();
@@ -387,7 +387,7 @@ void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx,
GoInCntnt( aPaM, fnMoveBackward );
}
- SwTxtNode* pTxtNd = aPaM.GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = aPaM.GetNode().GetTxtNode();
if (!pEndNdIdx && pTxtNd)
{
if( pEndCntIdx )
@@ -498,7 +498,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
&( pSrch = rFtnArr[ nPos ] )->GetTxtNode())->GetIndex()
<= pEnd->nNode.GetIndex() )
{
- const sal_Int32 nFtnSttIdx = *pSrch->GetStart();
+ const sal_Int32 nFtnSttIdx = pSrch->GetStart();
if( (nsDelCntntType::DELCNT_CHKNOCNTNT & nDelCntntType )
? (&pEnd->nNode.GetNode() == pFtnNd )
: (( &pStt->nNode.GetNode() == pFtnNd &&
@@ -528,7 +528,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
while( nPos-- && ( pFtnNd = &( pSrch = rFtnArr[ nPos ] )->
GetTxtNode())->GetIndex() >= pStt->nNode.GetIndex() )
{
- const sal_Int32 nFtnSttIdx = *pSrch->GetStart();
+ const sal_Int32 nFtnSttIdx = pSrch->GetStart();
if( !(nsDelCntntType::DELCNT_CHKNOCNTNT & nDelCntntType) && (
( &pStt->nNode.GetNode() == pFtnNd &&
pStt->nContent.GetIndex() > nFtnSttIdx ) ||
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 126807d5676c..38893d497ee1 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -311,7 +311,7 @@ void SwUndoInsLayFmt::RepeatImpl(::sw::RepeatContext & rContext)
else if( FLY_AT_FLY == aAnchor.GetAnchorId() )
{
SwStartNode const*const pSttNd =
- rContext.GetRepeatPaM().GetNode()->FindFlyStartNode();
+ rContext.GetRepeatPaM().GetNode().FindFlyStartNode();
if( pSttNd )
{
SwPosition aPos( *pSttNd );
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 10c1b7ee1329..e18a02e8a7e3 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -680,7 +680,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
pDoc->DeleteAndJoin( rPam );
rPam.DeleteMark();
- pNd = rPam.GetNode()->GetTxtNode();
+ pNd = rPam.GetNode().GetTxtNode();
OSL_ENSURE( pNd, "Dude, where's my TextNode?" );
aIdx.Assign( pNd, m_nSttCnt );
}
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index c7ff4f34f57e..8b4812acb83e 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -232,8 +232,8 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
aPam.Exchange();
aPam.DeleteMark();
- if( aPam.GetNode()->IsCntntNode() )
- aPam.GetNode()->GetCntntNode()->ResetAllAttr();
+ if( aPam.GetNode().IsCntntNode() )
+ aPam.GetNode().GetCntntNode()->ResetAllAttr();
// the Pam will be dropped now
}
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index cf36e15d65ca..03a6d7250fdd 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -177,7 +177,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
pAktPam->DeleteMark();
pAktPam->GetPoint()->nNode = nSttNode;
- SwTxtNode* pTxtNd = pAktPam->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = pAktPam->GetNode().GetTxtNode();
OSL_ENSURE( pTxtNd, "Overwrite not in a TextNode?" );
SwIndex& rIdx = pAktPam->GetPoint()->nContent;
rIdx.Assign( pTxtNd, nSttCntnt );
@@ -259,7 +259,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
pAktPam->DeleteMark();
pAktPam->GetPoint()->nNode = nSttNode;
- SwTxtNode* pTxtNd = pAktPam->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = pAktPam->GetNode().GetTxtNode();
OSL_ENSURE( pTxtNd, "Overwrite not in TextNode?" );
SwIndex& rIdx = pAktPam->GetPoint()->nContent;
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 283bf307cb91..4c31ca31b2f0 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -146,7 +146,7 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
const SwTxtNode* pTNd;
if( UNDO_DELETE == mnUserId &&
nSttNode == nEndNode && nSttCntnt + 1 == nEndCntnt &&
- 0 != (pTNd = rRange.GetNode()->GetTxtNode()) )
+ 0 != (pTNd = rRange.GetNode().GetTxtNode()) )
{
sal_Unicode const cCh = pTNd->GetTxt()[nSttCntnt];
if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
@@ -428,19 +428,16 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
if( pCSttNd && !pCEndNd)
{
// #112139# Do not step behind the end of content.
- SwNode * pTmp = pPam->GetNode(true);
- if (pTmp)
+ SwNode & rTmp = pPam->GetNode(true);
+ SwNode * pEnd = pDoc->GetNodes().DocumentSectionEndNode(&rTmp);
+
+ if (&rTmp != pEnd)
{
- SwNode * pEnd = pDoc->GetNodes().DocumentSectionEndNode(pTmp);
-
- if (pTmp != pEnd)
- {
- pPam->SetMark();
- pPam->GetPoint()->nNode++;
- pPam->GetBound( true ).nContent.Assign( 0, 0 );
- pPam->GetBound( false ).nContent.Assign( 0, 0 );
- pUnDel2 = new SwUndoDelete( *pPam, true );
- }
+ pPam->SetMark();
+ pPam->GetPoint()->nNode++;
+ pPam->GetBound( true ).nContent.Assign( 0, 0 );
+ pPam->GetBound( false ).nContent.Assign( 0, 0 );
+ pUnDel2 = new SwUndoDelete( *pPam, true );
}
}
pPam->DeleteMark();
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index e7d791e4dbb6..5316daa0a64b 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -224,7 +224,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
delete *it;
aIdxList.clear();
SetPaM(rPam, true);
- SwTxtNode const*const pTNd = rPam.GetNode()->GetTxtNode();
+ SwTxtNode const*const pTNd = rPam.GetNode().GetTxtNode();
if( pTNd )
{
rPam.GetPoint()->nContent = pTNd->GetTxt().getLength();
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index 53dd57ba49a9..704673bd64c9 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -149,7 +149,7 @@ void SwUndoSplitNode::RedoImpl(::sw::UndoRedoContext & rContext)
{
SwPaM & rPam( rContext.GetCursorSupplier().CreateNewShellCursor() );
rPam.GetPoint()->nNode = nNode;
- SwTxtNode * pTNd = rPam.GetNode()->GetTxtNode();
+ SwTxtNode * pTNd = rPam.GetNode().GetTxtNode();
OSL_ENSURE(pTNd, "SwUndoSplitNode::RedoImpl(): SwTxtNode expected");
if (pTNd)
{
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index f40696f94797..54ce92d8a1c7 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -500,7 +500,7 @@ void SwUndoTblToTxt::UndoImpl(::sw::UndoRedoContext & rContext)
pPam->DeleteMark();
pPam->GetPoint()->nNode = *pTblNd->EndOfSectionNode();
pPam->SetMark();
- pPam->GetPoint()->nNode = *pPam->GetNode()->StartOfSectionNode();
+ pPam->GetPoint()->nNode = *pPam->GetNode().StartOfSectionNode();
pPam->Move( fnMoveForward, fnGoCntnt );
pPam->Exchange();
pPam->Move( fnMoveBackward, fnGoCntnt );
@@ -629,7 +629,7 @@ void SwUndoTblToTxt::RedoImpl(::sw::UndoRedoContext & rContext)
pPam->SetMark(); // log off all indices
pPam->DeleteMark();
- SwTableNode* pTblNd = pPam->GetNode()->GetTableNode();
+ SwTableNode* pTblNd = pPam->GetNode().GetTableNode();
OSL_ENSURE( pTblNd, "Could not find any TableNode" );
if( pTblNd->GetTable().IsA( TYPE( SwDDETable )) )
@@ -656,7 +656,7 @@ void SwUndoTblToTxt::RedoImpl(::sw::UndoRedoContext & rContext)
void SwUndoTblToTxt::RepeatImpl(::sw::RepeatContext & rContext)
{
SwPaM *const pPam = & rContext.GetRepeatPaM();
- SwTableNode *const pTblNd = pPam->GetNode()->FindTableNode();
+ SwTableNode *const pTblNd = pPam->GetNode().FindTableNode();
if( pTblNd )
{
// move cursor out of table
@@ -798,7 +798,7 @@ void SwUndoTxtToTbl::RedoImpl(::sw::UndoRedoContext & rContext)
void SwUndoTxtToTbl::RepeatImpl(::sw::RepeatContext & rContext)
{
// no Table In Table
- if (!rContext.GetRepeatPaM().GetNode()->FindTableNode())
+ if (!rContext.GetRepeatPaM().GetNode().FindTableNode())
{
rContext.GetDoc().TextToTable( aInsTblOpts, rContext.GetRepeatPaM(),
cTrenner, nAdjust,
@@ -855,7 +855,7 @@ void SwUndoTblHeadline::RedoImpl(::sw::UndoRedoContext & rContext)
void SwUndoTblHeadline::RepeatImpl(::sw::RepeatContext & rContext)
{
SwTableNode *const pTblNd =
- rContext.GetRepeatPaM().GetNode()->FindTableNode();
+ rContext.GetRepeatPaM().GetNode().FindTableNode();
if( pTblNd )
{
rContext.GetDoc().SetRowsToRepeat( pTblNd->GetTable(), nNewHeadline );
@@ -1924,7 +1924,7 @@ void SwUndoTblNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
SwUndoTblMerge::SwUndoTblMerge( const SwPaM& rTblSel )
: SwUndo( UNDO_TABLE_MERGE ), SwUndRng( rTblSel ), pHistory( 0 )
{
- const SwTableNode* pTblNd = rTblSel.GetNode()->FindTableNode();
+ const SwTableNode* pTblNd = rTblSel.GetNode().FindTableNode();
OSL_ENSURE( pTblNd, "Where is the TableNode?" );
pSaveTbl = new _SaveTable( pTblNd->GetTable() );
pMoves = new SwUndoMoves;
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 7cdfe1214985..8c5c93721bec 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -280,8 +280,8 @@ GetNestedTextContent(SwTxtNode & rTextNode, sal_Int32 const nIndex,
// which is innermost?
SwTxtAttr *const pTxtAttr = (pMetaTxtAttr)
? ((pMetaFieldTxtAttr)
- ? ((*pMetaFieldTxtAttr->GetStart() >
- *pMetaTxtAttr->GetStart())
+ ? ((pMetaFieldTxtAttr->GetStart() >
+ pMetaTxtAttr->GetStart())
? pMetaFieldTxtAttr : pMetaTxtAttr)
: pMetaTxtAttr)
: pMetaFieldTxtAttr;
@@ -315,7 +315,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
const SwTxtNode * pTmpNode = pNode;
if (!pTmpNode)
- pTmpNode = rPam.GetNode()->GetTxtNode();
+ pTmpNode = rPam.GetNode().GetTxtNode();
bool bRet = false;
@@ -335,7 +335,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
const SwTxtNode * pTmpNode = pNode;
if (!pTmpNode)
- pTmpNode = rPam.GetNode()->GetTxtNode();
+ pTmpNode = rPam.GetNode().GetTxtNode();
OUString sRet;
if ( pTmpNode && pTmpNode->GetNum() )
@@ -352,7 +352,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
const SwTxtNode * pTmpNode = pNode;
if (!pTmpNode)
- pTmpNode = rPam.GetNode()->GetTxtNode();
+ pTmpNode = rPam.GetNode().GetTxtNode();
sal_Int16 nRet = -1;
if ( pTmpNode )
@@ -410,7 +410,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_NUMBER_NEWSTART:
{
// a multi selection is not considered
- const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = rPam.GetNode().GetTxtNode();
if ( pTxtNd && pTxtNd->IsInList() )
{
if( pAny )
@@ -469,9 +469,9 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_DOCUMENT_INDEX_MARK:
{
::std::vector<SwTxtAttr *> marks;
- if (rPam.GetNode()->IsTxtNode())
+ if (rPam.GetNode().IsTxtNode())
{
- marks = rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ marks = rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK);
}
if (marks.size())
@@ -535,7 +535,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_TEXT_TABLE:
case FN_UNO_CELL:
{
- SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
+ SwStartNode* pSttNode = rPam.GetNode().StartOfSectionNode();
SwStartNodeType eType = pSttNode->GetStartNodeType();
if(SwTableBoxStartNode == eType)
{
@@ -563,7 +563,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
break;
case FN_UNO_TEXT_FRAME:
{
- SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
+ SwStartNode* pSttNode = rPam.GetNode().StartOfSectionNode();
SwStartNodeType eType = pSttNode->GetStartNodeType();
SwFrmFmt* pFmt;
@@ -597,8 +597,8 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_ENDNOTE:
case FN_UNO_FOOTNOTE:
{
- SwTxtAttr *const pTxtAttr = rPam.GetNode()->IsTxtNode() ?
- rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ SwTxtAttr *const pTxtAttr = rPam.GetNode().IsTxtNode() ?
+ rPam.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN) : 0;
if(pTxtAttr)
{
@@ -622,10 +622,10 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_REFERENCE_MARK:
{
::std::vector<SwTxtAttr *> marks;
- if (rPam.GetNode()->IsTxtNode())
+ if (rPam.GetNode().IsTxtNode())
{
marks = (
- rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
}
if (marks.size())
@@ -643,8 +643,8 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
break;
case FN_UNO_NESTED_TEXT_CONTENT:
{
- uno::Reference<XTextContent> const xRet(rPam.GetNode()->IsTxtNode()
- ? GetNestedTextContent(*rPam.GetNode()->GetTxtNode(),
+ uno::Reference<XTextContent> const xRet(rPam.GetNode().IsTxtNode()
+ ? GetNestedTextContent(*rPam.GetNode().GetTxtNode(),
rPam.GetPoint()->nContent.GetIndex(), false)
: 0);
if (xRet.is())
@@ -663,8 +663,8 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_CHARFMT_SEQUENCE:
{
- SwTxtNode *const pTxtNode = rPam.GetNode()->GetTxtNode();
- if (rPam.GetNode(true) == rPam.GetNode(false)
+ SwTxtNode *const pTxtNode = rPam.GetNode().GetTxtNode();
+ if (&rPam.GetNode(true) == &rPam.GetNode(false)
&& pTxtNode && pTxtNode->GetpSwpHints())
{
sal_Int32 nPaMStart = rPam.GetPoint()->nContent.GetIndex();
@@ -680,7 +680,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
SwTxtAttr* pAttr = pHints->GetStart( nAttr );
if(pAttr->Which() != RES_TXTATR_CHARFMT)
continue;
- const sal_Int32 nAttrStart = *pAttr->GetStart();
+ const sal_Int32 nAttrStart = pAttr->GetStart();
const sal_Int32 nAttrEnd = *pAttr->GetEnd();
//check if the attribute touches the selection
if( ( nAttrEnd > nPaMStart && nAttrStart < nPaMEnd ) ||
@@ -731,7 +731,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
sal_Int16 IsNodeNumStart(SwPaM& rPam, PropertyState& eState)
{
- const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = rPam.GetNode().GetTxtNode();
// correction: check, if restart value is set at the text node and use
// new method <SwTxtNode::GetAttrListRestartValue()> to retrieve the value
if ( pTxtNd && pTxtNd->GetNumRule() && pTxtNd->IsListRestart() &&
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 8bcc0ca3322e..4bc32b47e999 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -689,7 +689,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
if (::sw::XTextRangeToSwPaM(*pInternalPam, xRg))
{
if(FLY_AT_FLY == aAnchor.GetAnchorId() &&
- !pInternalPam->GetNode()->FindFlyStartNode())
+ !pInternalPam->GetNode().FindFlyStartNode())
{
aAnchor.SetType(FLY_AS_CHAR);
}
@@ -1172,7 +1172,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
//The connection is removed now the attribute can be deleted.
pTxtNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx );
//create a new one
- SwTxtNode *pNd = pInternalPam->GetNode()->GetTxtNode();
+ SwTxtNode *pNd = pInternalPam->GetNode().GetTxtNode();
SAL_WARN_IF( !pNd, "sw.uno", "Cursor not at TxtNode." );
SwFmtFlyCnt aFmt( pFmt );
pNd->InsertItem(aFmt, pInternalPam->GetPoint()
@@ -1341,7 +1341,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
aPam.Move( fnMoveBackward, fnGoDoc );
}
//the RES_TXTATR_FLYCNT needs to be added now
- SwTxtNode *pNd = aPam.GetNode()->GetTxtNode();
+ SwTxtNode *pNd = aPam.GetNode().GetTxtNode();
SAL_WARN_IF( !pNd, "sw.uno", "Crsr is not in a TxtNode." );
SwFmtFlyCnt aFmt( pFlyFmt );
pNd->InsertItem(aFmt,
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index a89c8b3d2157..a27eadd7dc27 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1929,7 +1929,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
else
pDoc->InsertPoolItem(aPam, aFmt, nInsertFlags);
- SwTxtAttr* pTxtAttr = aPam.GetNode()->GetTxtNode()->GetFldTxtAttrAt( aPam.GetPoint()->nContent.GetIndex()-1, true );
+ SwTxtAttr* pTxtAttr = aPam.GetNode().GetTxtNode()->GetFldTxtAttrAt( aPam.GetPoint()->nContent.GetIndex()-1, true );
// was passiert mit dem Update der Felder ? (siehe fldmgr.cxx)
if (pTxtAttr)
@@ -1987,14 +1987,14 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
const SwTxtFld* pTxtFld = m_pImpl->m_pFmtFld->GetTxtFld();
SwTxtNode& rTxtNode = (SwTxtNode&)*pTxtFld->GetpTxtNode();
- SwPaM aPam( rTxtNode, *pTxtFld->GetStart() );
+ SwPaM aPam( rTxtNode, pTxtFld->GetStart() );
aPam.SetMark();
aPam.Move();
m_pImpl->m_pDoc->DeleteAndJoin(aPam);
}
// keep inserted annotation
{
- SwTxtFld* pTxtAttr = aEnd.GetNode()->GetTxtNode()->GetFldTxtAttrAt( aEnd.End()->nContent.GetIndex()-1, true );
+ SwTxtFld* pTxtAttr = aEnd.GetNode().GetTxtNode()->GetFldTxtAttrAt( aEnd.End()->nContent.GetIndex()-1, true );
if ( pTxtAttr != NULL )
{
m_pImpl->m_pFmtFld = &pTxtAttr->GetFmtFld();
@@ -2142,7 +2142,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
if(!pTxtFld)
throw uno::RuntimeException();
SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
+ aPosition.nContent = pTxtFld->GetStart();
pDoc->PutValueToField( aPosition, rValue, pEntry->nWID);
}
@@ -2335,10 +2335,10 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
sal_Int32 nHiddenEnd;
SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
+ aPosition.nContent = pTxtFld->GetStart();
bHidden = SwScriptInfo::GetBoundsOfHiddenRange( pTxtFld->GetTxtNode(),
- *pTxtFld->GetStart(),
+ pTxtFld->GetStart(),
nHiddenStart, nHiddenEnd );
}
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 55c50d4aca26..ca1555bd0bfc 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2765,7 +2765,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
{
eAnchorId = ((const SwFmtAnchor*)pItem)->GetAnchorId();
if( FLY_AT_FLY == eAnchorId &&
- !aPam.GetNode()->FindFlyStartNode())
+ !aPam.GetNode().FindFlyStartNode())
{
//rahmengebunden geht nur dort, wo ein Rahmen ist!
SwFmtAnchor aAnchor(FLY_AT_PARA);
@@ -3234,7 +3234,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor(void) throw(
SwPaM aPam(rNode);
aPam.Move(fnMoveForward, fnGoNode);
- SwTableNode* pTblNode = aPam.GetNode()->FindTableNode();
+ SwTableNode* pTblNode = aPam.GetNode().FindTableNode();
SwCntntNode* pCont = 0;
while( pTblNode )
{
@@ -3246,7 +3246,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor(void) throw(
aPam.GetPoint()->nContent.Assign(pCont, 0);
const SwStartNode* pNewStartNode =
- aPam.GetNode()->FindSttNodeByType(SwFlyStartNode);
+ aPam.GetNode().FindSttNodeByType(SwFlyStartNode);
if(!pNewStartNode || pNewStartNode != pOwnStartNode)
{
uno::RuntimeException aExcept;
@@ -3282,7 +3282,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursorByRange(const
(void)p1;
(void)p2;
#endif
- if(aPam.GetNode()->FindFlyStartNode() == rNode.FindFlyStartNode())
+ if(aPam.GetNode().FindFlyStartNode() == rNode.FindFlyStartNode())
{
aRef = static_cast<text::XWordCursor*>(
new SwXTextCursor(*pFmt->GetDoc(), this, CURSOR_FRAME,
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index bdf91c63ad86..bca83baeff2d 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -269,7 +269,7 @@ SwXFootnote::setLabel(const OUString& aLabel) throw (uno::RuntimeException, std:
OSL_ENSURE(pTxtFtn, "kein TextNode?");
SwTxtNode& rTxtNode = (SwTxtNode&)pTxtFtn->GetTxtNode();
- SwPaM aPam(rTxtNode, *pTxtFtn->GetStart());
+ SwPaM aPam(rTxtNode, pTxtFtn->GetStart());
GetDoc()->SetCurFtn(aPam, aLabel, pFmt->GetNumber(), pFmt->IsEndNote());
}
else if (m_pImpl->m_bIsDescriptor)
@@ -328,7 +328,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
pNewDoc->InsertPoolItem(aPam, aFootNote, nInsertFlags);
SwTxtFtn *const pTxtAttr = static_cast<SwTxtFtn*>(
- aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ aPam.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_FTN ));
if (pTxtAttr)
@@ -358,7 +358,7 @@ SwXFootnote::getAnchor() throw (uno::RuntimeException, std::exception)
SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
- SwPaM aPam( pTxtFtn->GetTxtNode(), *pTxtFtn->GetStart() );
+ SwPaM aPam( pTxtFtn->GetTxtNode(), pTxtFtn->GetStart() );
SwPosition aMark( *aPam.Start() );
aPam.SetMark();
aPam.GetMark()->nContent++;
@@ -376,7 +376,7 @@ void SAL_CALL SwXFootnote::dispose() throw (uno::RuntimeException, std::exceptio
SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
OSL_ENSURE(pTxtFtn, "no TextNode?");
SwTxtNode& rTxtNode = const_cast<SwTxtNode&>(pTxtFtn->GetTxtNode());
- const sal_Int32 nPos = *pTxtFtn->GetStart();
+ const sal_Int32 nPos = pTxtFtn->GetStart();
SwPaM aPam(rTxtNode, nPos, rTxtNode, nPos+1);
GetDoc()->DeleteAndJoin( aPam );
}
@@ -455,7 +455,7 @@ throw (uno::RuntimeException, std::exception)
SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
SwNode const*const pFtnStartNode = &pTxtFtn->GetStartNode()->GetNode();
- const SwNode* pStart = aPam.GetNode()->FindFootnoteStartNode();
+ const SwNode* pStart = aPam.GetNode().FindFootnoteStartNode();
if (pStart != pFtnStartNode)
{
throw uno::RuntimeException();
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 7440a9d331a2..888dfb6eed58 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1764,7 +1764,7 @@ throw (uno::RuntimeException, std::exception)
aMark.SetAlternativeText(rIndexEntry);
SwTxtTOXMark const*const pTxtMark =
m_pImpl->m_pTOXMark->GetTxtTOXMark();
- SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart());
+ SwPaM aPam(pTxtMark->GetTxtNode(), pTxtMark->GetStart());
aPam.SetMark();
if(pTxtMark->End())
{
@@ -1953,7 +1953,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
::std::vector<SwTxtAttr *> oldMarks;
if (bMark)
{
- oldMarks = rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ oldMarks = rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK);
}
@@ -1970,7 +1970,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
// #i107672#
// ensure that we do not retrieve a different mark at the same position
::std::vector<SwTxtAttr *> const newMarks(
- rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK));
::std::vector<SwTxtAttr *>::const_iterator const iter(
::std::find_if(newMarks.begin(), newMarks.end(),
@@ -1983,7 +1983,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
}
else
{
- pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ pTxtAttr = rPam.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
rPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_TOXMARK );
}
@@ -2015,7 +2015,7 @@ SwXDocumentIndexMark::getAnchor() throw (uno::RuntimeException, std::exception)
throw uno::RuntimeException();
}
const SwTxtTOXMark* pTxtMark = m_pImpl->m_pTOXMark->GetTxtTOXMark();
- SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart());
+ SwPaM aPam(pTxtMark->GetTxtNode(), pTxtMark->GetStart());
aPam.SetMark();
if(pTxtMark->End())
{
@@ -2157,7 +2157,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
SwTxtTOXMark const*const pTxtMark =
m_pImpl->m_pTOXMark->GetTxtTOXMark();
- SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart());
+ SwPaM aPam(pTxtMark->GetTxtNode(), pTxtMark->GetStart());
aPam.SetMark();
if(pTxtMark->End())
{
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index dacbf6a6032f..e1c99dc5a1d2 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -518,7 +518,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, uno::DeploymentExc
case FN_UNO_IS_NUMBER:
{
// multi selection is not considered
- SwTxtNode *const pTxtNd = rPam.GetNode()->GetTxtNode();
+ SwTxtNode *const pTxtNd = rPam.GetNode().GetTxtNode();
if (!pTxtNd)
{
throw lang::IllegalArgumentException();
@@ -1037,7 +1037,7 @@ SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException, std::exc
{
rUnoCursor.Move( fnMoveBackward, fnGoDoc );
//check, that the cursor is not in a table
- SwTableNode * pTblNode = rUnoCursor.GetNode()->FindTableNode();
+ SwTableNode * pTblNode = rUnoCursor.GetNode().FindTableNode();
SwCntntNode * pCNode = 0;
while (pTblNode)
{
@@ -1050,7 +1050,7 @@ SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException, std::exc
rUnoCursor.GetPoint()->nContent.Assign(pCNode, 0);
}
SwStartNode const*const pTmp =
- rUnoCursor.GetNode()->StartOfSectionNode();
+ rUnoCursor.GetNode().StartOfSectionNode();
if (pTmp->IsSectionNode())
{
SwSectionNode const*const pSectionStartNode =
@@ -1171,7 +1171,7 @@ throw (uno::RuntimeException, std::exception)
;
}
- const SwStartNode* pOwnStartNode = rOwnCursor.GetNode()->FindSttNodeByType(eSearchNodeType);
+ const SwStartNode* pOwnStartNode = rOwnCursor.GetNode().FindSttNodeByType(eSearchNodeType);
while ( pOwnStartNode != NULL
&& pOwnStartNode->IsSectionNode())
{
@@ -1179,7 +1179,7 @@ throw (uno::RuntimeException, std::exception)
}
const SwStartNode* pTmp =
- pPam->GetNode()->FindSttNodeByType(eSearchNodeType);
+ pPam->GetNode().FindSttNodeByType(eSearchNodeType);
while ( pTmp != NULL
&& pTmp->IsSectionNode() )
{
@@ -2557,11 +2557,9 @@ throw (uno::RuntimeException, std::exception)
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
- SwNode* node = rUnoCursor.GetNode();
+ SwNode& node = rUnoCursor.GetNode();
- if (node == 0) return;
-
- SwTxtNode* txtNode = node->GetTxtNode();
+ SwTxtNode* txtNode = node.GetTxtNode();
if (txtNode == 0) return;
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 1328b228bfaf..cb0dfc56f53c 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -332,7 +332,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SFX_ITEM_AVAILABLE )
{
- SwTxtNode * pTmpNode = rPam.GetNode()->GetTxtNode();
+ SwTxtNode * pTmpNode = rPam.GetNode().GetTxtNode();
if ( pTmpNode )
{
rPam.GetDoc()->GetNodes().UpdateOutlineNode( *pTmpNode );
@@ -605,7 +605,7 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
// os 2005-01-14: This part is only necessary to detect movements out
// of a selection; if there is no selection we don't have to care
- SwTableNode *const pTblNode = aNewCrsr->GetNode()->FindTableNode();
+ SwTableNode *const pTblNode = aNewCrsr->GetNode().FindTableNode();
if (((CURSOR_TBLTEXT != m_eCursorType) &&
(CURSOR_SELECTION_IN_TABLE != m_eCursorType)) && pTblNode)
{
@@ -627,7 +627,7 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
{
pUnoCrsr->SetRemainInSection( false );
// what to do if already in a table?
- SwTableNode * pTblNode = pUnoCrsr->GetNode()->FindTableNode();
+ SwTableNode * pTblNode = pUnoCrsr->GetNode().FindTableNode();
pTblNode = lcl_FindTopLevelTable( pTblNode, m_pOwnTable );
if (pTblNode && (&pTblNode->GetTable() != m_pOwnTable))
{
@@ -656,7 +656,7 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
(m_nEndIndex == pStart->nNode.GetIndex()) ? m_nLastParaEnd : -1;
// position in a table, or in a simple paragraph?
- SwTableNode * pTblNode = pUnoCrsr->GetNode()->FindTableNode();
+ SwTableNode * pTblNode = pUnoCrsr->GetNode().FindTableNode();
pTblNode = lcl_FindTopLevelTable( pTblNode, m_pOwnTable );
if (/*CURSOR_TBLTEXT != eCursorType && CURSOR_SELECTION_IN_TABLE != eCursorType && */
pTblNode && (&pTblNode->GetTable() != m_pOwnTable))
@@ -1794,8 +1794,8 @@ lcl_FillFrame(SwClient & rEnum, SwUnoCrsr& rUnoCrsr,
FrameDependList_t & rFrames)
{
// search for objects at the cursor - anchored at/as char
- SwTxtAttr const*const pTxtAttr = (rUnoCrsr.GetNode()->IsTxtNode())
- ? rUnoCrsr.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ SwTxtAttr const*const pTxtAttr = (rUnoCrsr.GetNode().IsTxtNode())
+ ? rUnoCrsr.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
rUnoCrsr.GetPoint()->nContent.GetIndex(), RES_TXTATR_FLYCNT)
: 0;
if (pTxtAttr)
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index b6bc4318459d..6750c47134c7 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -197,7 +197,7 @@ throw( uno::RuntimeException, std::exception )
throw uno::RuntimeException();
// TextPortions are always within a paragraph
- SwTxtNode* pTxtNd = pUnoCrsr->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = pUnoCrsr->GetNode().GetTxtNode();
if ( pTxtNd )
{
const sal_Int32 nStt = pUnoCrsr->Start()->nContent.GetIndex();
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 2b0ae04147ff..c4d49ca55b93 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -727,7 +727,7 @@ lcl_ExportHints(
break;
case RES_TXTATR_CJK_RUBY:
//#i91534# GetEnd() == 0 mixes the order of ruby start/end
- if( *pAttr->GetEnd() == *pAttr->GetStart())
+ if( *pAttr->GetEnd() == pAttr->GetStart())
{
lcl_InsertRubyPortion( *rPortionStack.top().first,
xParent, pUnoCrsr, *pAttr, false);
@@ -738,17 +738,17 @@ lcl_ExportHints(
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
{
- OSL_ENSURE(*pAttr->GetStart() != *pAttr->GetEnd(),
+ OSL_ENSURE(pAttr->GetStart() != *pAttr->GetEnd(),
"empty meta?");
if ((i_nStartPos > 0) &&
- (*pAttr->GetStart() < i_nStartPos))
+ (pAttr->GetStart() < i_nStartPos))
{
// force skip pAttr and rest of attribute ends
// at nCurrentIndex
// because they are not contained in the meta pAttr
// and the meta pAttr itself is outside selection!
// (necessary for SwXMeta::createEnumeration)
- if (*pAttr->GetStart() + 1 == i_nStartPos)
+ if (pAttr->GetStart() + 1 == i_nStartPos)
{
nEndIndex = pHints->GetEndCount() - 1;
}
@@ -783,7 +783,7 @@ lcl_ExportHints(
sal_uInt16 nStartIndex = 0;
sal_uInt16 nNextStart = 0;
while(nStartIndex < pHints->GetStartCount() &&
- nCurrentIndex >= (nNextStart = (*pHints->GetStart(nStartIndex)->GetStart())))
+ nCurrentIndex >= (nNextStart = pHints->GetStart(nStartIndex)->GetStart()))
{
SwTxtAttr * const pAttr = pHints->GetStart(nStartIndex);
sal_uInt16 nAttrWhich = pAttr->Which();
@@ -917,7 +917,7 @@ lcl_ExportHints(
break;
case RES_TXTATR_CJK_RUBY:
//#i91534# GetEnd() == 0 mixes the order of ruby start/end
- if(pAttr->GetEnd() && (*pAttr->GetEnd() != *pAttr->GetStart()))
+ if(pAttr->GetEnd() && (*pAttr->GetEnd() != pAttr->GetStart()))
{
lcl_InsertRubyPortion( *rPortionStack.top().first,
xParent, pUnoCrsr, *pAttr, false);
@@ -925,7 +925,7 @@ lcl_ExportHints(
break;
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
- if (*pAttr->GetStart() != *pAttr->GetEnd())
+ if (pAttr->GetStart() != *pAttr->GetEnd())
{
if (!bRightMoveForbidden)
{
@@ -965,7 +965,7 @@ lcl_ExportHints(
nStartIndex = 0;
nNextStart = 0;
while(nStartIndex < pHints->GetStartCount() &&
- nCurrentIndex >= (nNextStart = (*pHints->GetStart(nStartIndex)->GetStart())))
+ nCurrentIndex >= (nNextStart = pHints->GetStart(nStartIndex)->GetStart()))
nStartIndex++;
nEndIndex = 0;
@@ -1253,7 +1253,7 @@ static void lcl_CreatePortions(
pUnoCrsr->DeleteMark();
}
- SwTxtNode * const pTxtNode = pUnoCrsr->GetNode()->GetTxtNode();
+ SwTxtNode * const pTxtNode = pUnoCrsr->GetNode().GetTxtNode();
if (!pTxtNode)
{
OSL_FAIL("lcl_CreatePortions: no TextNode - what now ?");
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index b1ea530adbf3..5093f6c28c2a 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -113,7 +113,7 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor(void)
// Patterned after SwXTextFrame::createTextCursor(void).
// skip all tables at the beginning
- SwTableNode* pTableNode = pUnoCursor->GetNode()->FindTableNode();
+ SwTableNode* pTableNode = pUnoCursor->GetNode().FindTableNode();
SwCntntNode* pContentNode = NULL;
bool bTable = pTableNode != NULL;
while( pTableNode != NULL )
@@ -124,7 +124,7 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor(void)
}
if( pContentNode != NULL )
pUnoCursor->GetPoint()->nContent.Assign( pContentNode, 0 );
- if( bTable && pUnoCursor->GetNode()->FindSttNodeByType( SwNormalStartNode )
+ if( bTable && pUnoCursor->GetNode().FindSttNodeByType( SwNormalStartNode )
!= GetStartNode() )
{
// We have gone too far and have left our own redline. This means that
@@ -448,9 +448,9 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
rPropertyName == UNO_NAME_REDLINE_END)
{
uno::Reference<XInterface> xRet;
- SwNode* pNode = pRedline->GetNode();
+ SwNode* pNode = &pRedline->GetNode();
if(!bStart && pRedline->HasMark())
- pNode = pRedline->GetNode(false);
+ pNode = &pRedline->GetNode(false);
switch(pNode->GetNodeType())
{
case ND_SECTIONNODE:
@@ -591,7 +591,7 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor(void) throw( u
pUnoCrsr->Move(fnMoveForward, fnGoNode);
//steht hier eine Tabelle?
- SwTableNode* pTblNode = pUnoCrsr->GetNode()->FindTableNode();
+ SwTableNode* pTblNode = pUnoCrsr->GetNode().FindTableNode();
SwCntntNode* pCont = 0;
while( pTblNode )
{
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 1c16911c1953..617ad1aeba6a 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -221,7 +221,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
::std::vector<SwTxtAttr *> oldMarks;
if (bMark)
{
- oldMarks = rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ oldMarks = rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK);
}
@@ -239,7 +239,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
// #i107672#
// ensure that we do not retrieve a different mark at the same position
::std::vector<SwTxtAttr *> const newMarks(
- rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetNode().GetTxtNode()->GetTxtAttrsAt(
rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
::std::vector<SwTxtAttr *>::const_iterator const iter(
::std::find_if(newMarks.begin(), newMarks.end(),
@@ -252,9 +252,9 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
}
else
{
- SwTxtNode *pTxtNd = rPam.GetNode()->GetTxtNode();
+ SwTxtNode *pTxtNd = rPam.GetNode().GetTxtNode();
OSL_ASSERT(pTxtNd);
- pTxtAttr = pTxtNd ? rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ pTxtAttr = pTxtNd ? rPam.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK) : NULL;
}
@@ -324,8 +324,8 @@ SwXReferenceMark::getAnchor() throw (uno::RuntimeException, std::exception)
SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwPaM> pPam( (pTxtMark->End())
? new SwPaM( rTxtNode, *pTxtMark->End(),
- rTxtNode, *pTxtMark->GetStart())
- : new SwPaM( rTxtNode, *pTxtMark->GetStart()) );
+ rTxtNode, pTxtMark->GetStart())
+ : new SwPaM( rTxtNode, pTxtMark->GetStart()) );
SAL_WNODEPRECATED_DECLARATIONS_POP
return SwXTextRange::CreateXTextRange(
@@ -352,7 +352,7 @@ void SAL_CALL SwXReferenceMark::dispose() throw (uno::RuntimeException, std::exc
&m_pImpl->m_pDoc->GetNodes()))
{
SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- const sal_Int32 nStt = *pTxtMark->GetStart();
+ const sal_Int32 nStt = pTxtMark->GetStart();
const sal_Int32 nEnd = pTxtMark->End()
? *pTxtMark->End()
: nStt + 1;
@@ -425,7 +425,7 @@ throw (uno::RuntimeException, std::exception)
&m_pImpl->m_pDoc->GetNodes()))
{
SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- const sal_Int32 nStt = *pTxtMark->GetStart();
+ const sal_Int32 nStt = pTxtMark->GetStart();
const sal_Int32 nEnd = pTxtMark->End()
? *pTxtMark->End()
: nStt + 1;
@@ -766,7 +766,7 @@ SwXMeta::CreateXMeta(::sw::Meta & rMeta,
SwTxtMeta * const pTxtAttr( rMeta.GetTxtAttr() );
OSL_ENSURE(pTxtAttr, "CreateXMeta: no text attr?");
if (!pTxtAttr) { return 0; }
- const SwPosition aPos(*pTxtNode, *pTxtAttr->GetStart());
+ const SwPosition aPos(*pTxtNode, pTxtAttr->GetStart());
xParentText.set( ::sw::CreateParentXText(*pTxtNode->GetDoc(), aPos) );
}
if (!xParentText.is()) { return 0; }
@@ -796,7 +796,7 @@ bool SwXMeta::SetContentRange(
if (rpNode)
{
// rStart points at the first position _within_ the meta!
- rStart = *pTxtAttr->GetStart() + 1;
+ rStart = pTxtAttr->GetStart() + 1;
rEnd = *pTxtAttr->End();
return true;
}
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index f37109283d10..acc576db54d5 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -1138,16 +1138,16 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
for (size_t nRed = 0; nRed < rRedTbl.size(); ++nRed)
{
const SwRangeRedline* pRedline = rRedTbl[nRed];
- SwNode const*const pRedPointNode = pRedline->GetNode(true);
- SwNode const*const pRedMarkNode = pRedline->GetNode(false);
- if ((pRedPointNode == pSectNode) ||
- (pRedMarkNode == pSectNode))
+ const SwNode& rRedPointNode = pRedline->GetNode(true);
+ const SwNode& rRedMarkNode = pRedline->GetNode(false);
+ if ((&rRedPointNode == pSectNode) ||
+ (&rRedMarkNode == pSectNode))
{
- SwNode const*const pStartOfRedline =
- (SwNodeIndex(*pRedPointNode) <=
- SwNodeIndex(*pRedMarkNode))
- ? pRedPointNode : pRedMarkNode;
- const bool bIsStart = (pStartOfRedline == pSectNode);
+ const SwNode& rStartOfRedline =
+ (SwNodeIndex(rRedPointNode) <=
+ SwNodeIndex(rRedMarkNode))
+ ? rRedPointNode : rRedMarkNode;
+ const bool bIsStart = (&rStartOfRedline == pSectNode);
pRet[nProperty] <<=
SwXRedlinePortion::CreateRedlineProperties(
*pRedline, bIsStart);
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 061f43061cb2..c7215a8a4b35 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -317,13 +317,13 @@ static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimp
for(size_t nRed = 0; nRed < rRedTbl.size(); ++nRed)
{
const SwRangeRedline* pRedline = rRedTbl[nRed];
- const SwNode* pRedPointNode = pRedline->GetNode(true);
- const SwNode* pRedMarkNode = pRedline->GetNode(false);
- if(pRedPointNode == pTblNode || pRedMarkNode == pTblNode)
+ const SwNode& rRedPointNode = pRedline->GetNode(true);
+ const SwNode& rRedMarkNode = pRedline->GetNode(false);
+ if(&rRedPointNode == pTblNode || &rRedMarkNode == pTblNode)
{
- const SwNode* pStartOfRedline = SwNodeIndex(*pRedPointNode) <= SwNodeIndex(*pRedMarkNode) ?
- pRedPointNode : pRedMarkNode;
- bool bIsStart = pStartOfRedline == pTblNode;
+ const SwNode& rStartOfRedline = SwNodeIndex(rRedPointNode) <= SwNodeIndex(rRedMarkNode) ?
+ rRedPointNode : rRedMarkNode;
+ bool bIsStart = &rStartOfRedline == pTblNode;
aRet <<= SwXRedlinePortion::CreateRedlineProperties(*pRedline, bIsStart);
break;
}
@@ -1026,7 +1026,7 @@ uno::Reference< text::XTextCursor > SwXCell::createTextCursorByRange(const uno:
{
const SwStartNode* pSttNd = pStartNode ? pStartNode : pBox->GetSttNd();
// skip sections
- SwStartNode* p1 = aPam.GetNode()->StartOfSectionNode();
+ SwStartNode* p1 = aPam.GetNode().StartOfSectionNode();
while(p1->IsSectionNode())
p1 = p1->StartOfSectionNode();
@@ -1810,7 +1810,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
{
- SwStartNode* pSttNode = pUnoCrsr->GetNode()->StartOfSectionNode();
+ SwStartNode* pSttNode = pUnoCrsr->GetNode().StartOfSectionNode();
const SwTableNode* pTblNode = pSttNode->FindTableNode();
lcl_FormatTable((SwFrmFmt*)pTblNode->GetTable().GetFrmFmt());
SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
@@ -1875,7 +1875,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
{
- SwStartNode* pSttNode = pUnoCrsr->GetNode()->StartOfSectionNode();
+ SwStartNode* pSttNode = pUnoCrsr->GetNode().StartOfSectionNode();
const SwTableNode* pTblNode = pSttNode->FindTableNode();
lcl_FormatTable((SwFrmFmt*)pTblNode->GetTable().GetFrmFmt());
SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index b89f32b0f35b..e6bf2304dd5c 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -326,7 +326,7 @@ throw (uno::RuntimeException, std::exception)
throw uno::RuntimeException();
}
- const SwStartNode* pTmp(pPam->GetNode()->StartOfSectionNode());
+ const SwStartNode* pTmp(pPam->GetNode().StartOfSectionNode());
while (pTmp && pTmp->IsSectionNode())
{
pTmp = pTmp->StartOfSectionNode();
@@ -550,7 +550,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
const SwStartNode* pTmp =
- aPam.GetNode()->FindSttNodeByType(eSearchNodeType);
+ aPam.GetNode().FindSttNodeByType(eSearchNodeType);
// ignore SectionNodes
while (pTmp && pTmp->IsSectionNode())
@@ -993,7 +993,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xTunnel);
OSL_ENSURE(pOwnCursor, "OTextCursorHelper::getUnoTunnelId() ??? ");
const SwStartNode* pOwnStartNode =
- pOwnCursor->GetPaM()->GetNode()->StartOfSectionNode();
+ pOwnCursor->GetPaM()->GetNode().StartOfSectionNode();
SwStartNodeType eSearchNodeType = SwNormalStartNode;
switch (m_eType)
{
@@ -1008,9 +1008,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
;
}
- SwNode const*const pSrcNode(rPaM.GetNode());
- if (!pSrcNode) { return false; }
- const SwStartNode* pTmp = pSrcNode->FindSttNodeByType(eSearchNodeType);
+ const SwNode& rSrcNode = rPaM.GetNode();
+ const SwStartNode* pTmp = rSrcNode.FindSttNodeByType(eSearchNodeType);
//SectionNodes ueberspringen
while(pTmp && pTmp->IsSectionNode())
@@ -1564,12 +1563,12 @@ SwXText::convertToTextFrame(
bool bIllegalException = false;
bool bRuntimeException = false;
OUString sMessage;
- SwStartNode* pStartStartNode = aStartPam.GetNode()->StartOfSectionNode();
+ SwStartNode* pStartStartNode = aStartPam.GetNode().StartOfSectionNode();
while (pStartStartNode && pStartStartNode->IsSectionNode())
{
pStartStartNode = pStartStartNode->StartOfSectionNode();
}
- SwStartNode* pEndStartNode = pEndPam->GetNode()->StartOfSectionNode();
+ SwStartNode* pEndStartNode = pEndPam->GetNode().StartOfSectionNode();
while (pEndStartNode && pEndStartNode->IsSectionNode())
{
pEndStartNode = pEndStartNode->StartOfSectionNode();
@@ -1600,7 +1599,7 @@ SwXText::convertToTextFrame(
bParaBeforeInserted = GetDoc()->AppendTxtNode( aBefore );
aStartPam.DeleteMark();
*aStartPam.GetPoint() = aBefore;
- pStartStartNode = aStartPam.GetNode()->StartOfSectionNode();
+ pStartStartNode = aStartPam.GetNode().StartOfSectionNode();
}
if (pEndStartNode->GetStartNodeType() == SwTableBoxStartNode)
{
@@ -1610,7 +1609,7 @@ SwXText::convertToTextFrame(
bParaAfterInserted = GetDoc()->AppendTxtNode( aTableEnd );
pEndPam->DeleteMark();
*pEndPam->GetPoint() = aTableEnd;
- pEndStartNode = pEndPam->GetNode()->StartOfSectionNode();
+ pEndStartNode = pEndPam->GetNode().StartOfSectionNode();
}
// now we should have the positions in the same hierarchy
if ((pStartStartNode != pEndStartNode) ||
@@ -1690,13 +1689,13 @@ SwXText::convertToTextFrame(
pNewFrame->setName(m_pImpl->m_pDoc->GetUniqueFrameName());
}
- SwTxtNode *const pTxtNode(aStartPam.GetNode()->GetTxtNode());
+ SwTxtNode *const pTxtNode(aStartPam.GetNode().GetTxtNode());
OSL_ASSERT(pTxtNode);
if (!pTxtNode || !pTxtNode->Len()) // don't remove if it contains text!
{
{ // has to be in a block to remove the SwIndexes before
// DelFullPara is called
- SwPaM aMovePam( *aStartPam.GetNode() );
+ SwPaM aMovePam( aStartPam.GetNode() );
if (aMovePam.Move( fnMoveForward, fnGoCntnt ))
{
// move the anchor to the next paragraph
@@ -1754,7 +1753,7 @@ SwXText::convertToTextFrame(
else
{
// In case the frame has a table only, the cursor points to the end of the first cell of the table.
- SwPaM aPaM(*pFrameCursor->GetPaM()->GetNode()->FindSttNodeByType(SwFlyStartNode)->EndOfSectionNode());
+ SwPaM aPaM(*pFrameCursor->GetPaM()->GetNode().FindSttNodeByType(SwFlyStartNode)->EndOfSectionNode());
// Now we have the end of the frame -- the node before that will be the paragraph we want to remove.
aPaM.GetPoint()->nNode--;
m_pImpl->m_pDoc->DelFullPara(aPaM);
@@ -1949,7 +1948,7 @@ void SwXText::Impl::ConvertCell(
aEndCellPam.DeleteMark();
aEndCellPam.Move(fnMoveBackward, fnGoNode);
aEndCellPam.GetPoint()->nContent =
- aEndCellPam.GetNode()->GetTxtNode()->Len();
+ aEndCellPam.GetNode().GetTxtNode()->Len();
}
*rLastPaM.GetPoint() = *aEndCellPam.Start();
@@ -2443,7 +2442,7 @@ SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables)
aPam.Move( fnMoveBackward, fnGoDoc );
if (!bIgnoreTables)
{
- SwTableNode * pTblNode = aPam.GetNode()->FindTableNode();
+ SwTableNode * pTblNode = aPam.GetNode().FindTableNode();
SwCntntNode * pCont = 0;
while (pTblNode)
{
@@ -2493,12 +2492,12 @@ throw (uno::RuntimeException, std::exception)
SwUnoInternalPaM aPam(*GetDoc());
if (::sw::XTextRangeToSwPaM(aPam, xTextPosition))
{
- if ( !aPam.GetNode()->GetTxtNode() )
+ if ( !aPam.GetNode().GetTxtNode() )
throw uno::RuntimeException("Invalid text range" );
SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent();
- SwStartNode* p1 = aPam.GetNode()->StartOfSectionNode();
+ SwStartNode* p1 = aPam.GetNode().StartOfSectionNode();
//document starts with a section?
while(p1->IsSectionNode())
{
@@ -2730,7 +2729,7 @@ SwXHeadFootText::createTextCursor() throw (uno::RuntimeException, std::exception
SwStartNode const*const pOwnStartNode = rNode.FindSttNodeByType(
(m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode);
// is there a table here?
- SwTableNode* pTblNode = pUnoCrsr->GetNode()->FindTableNode();
+ SwTableNode* pTblNode = pUnoCrsr->GetNode().FindTableNode();
SwCntntNode* pCont = 0;
while (pTblNode)
{
@@ -2743,7 +2742,7 @@ SwXHeadFootText::createTextCursor() throw (uno::RuntimeException, std::exception
pUnoCrsr->GetPoint()->nContent.Assign(pCont, 0);
}
SwStartNode const*const pNewStartNode =
- pUnoCrsr->GetNode()->FindSttNodeByType(
+ pUnoCrsr->GetNode().FindSttNodeByType(
(m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode);
if (!pNewStartNode || (pNewStartNode != pOwnStartNode))
{
@@ -2777,9 +2776,9 @@ throw (uno::RuntimeException, std::exception)
SwPosition aPos(rNode);
SwPaM aHFPam(aPos);
aHFPam.Move(fnMoveForward, fnGoNode);
- SwStartNode *const pOwnStartNode = aHFPam.GetNode()->FindSttNodeByType(
+ SwStartNode *const pOwnStartNode = aHFPam.GetNode().FindSttNodeByType(
(m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode);
- SwStartNode *const p1 = aPam.GetNode()->FindSttNodeByType(
+ SwStartNode *const p1 = aPam.GetNode().FindSttNodeByType(
(m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode);
if (p1 == pOwnStartNode)
{
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 3a548f5fc944..ce5f4dc7d0d1 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -353,7 +353,7 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
- const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
+ const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode().GetCntntNode();
const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->getLayoutFrm( GetLayout(), 0, pShellTblCrsr->Start() ) : 0;
if( pCntntFrm )
{
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 04a5d890f477..d9ca76da33bf 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -90,7 +90,7 @@ sal_Int32 SwASC_AttrIter::SearchNext( sal_Int32 nStartPos )
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if ( pHt->HasDummyChar() )
{
- sal_Int32 nPos = *pHt->GetStart();
+ sal_Int32 nPos = pHt->GetStart();
if( nPos >= nStartPos && nPos <= nMinPos )
nMinPos = nPos;
@@ -100,7 +100,7 @@ sal_Int32 SwASC_AttrIter::SearchNext( sal_Int32 nStartPos )
}
else if ( pHt->HasContent() )
{
- const sal_Int32 nHintStart = *pHt->GetStart();
+ const sal_Int32 nHintStart = pHt->GetStart();
if ( nHintStart >= nStartPos && nHintStart <= nMinPos )
{
nMinPos = nHintStart;
@@ -129,7 +129,7 @@ bool SwASC_AttrIter::OutAttr( sal_Int32 nSwPos )
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if ( ( pHt->HasDummyChar()
|| pHt->HasContent() )
- && nSwPos == *pHt->GetStart() )
+ && nSwPos == pHt->GetStart() )
{
bRet = true;
OUString sOut;
@@ -158,7 +158,7 @@ bool SwASC_AttrIter::OutAttr( sal_Int32 nSwPos )
if( !sOut.isEmpty() )
rWrt.Strm().WriteUnicodeOrByteText( sOut );
}
- else if( nSwPos < *pHt->GetStart() )
+ else if( nSwPos < pHt->GetStart() )
break;
}
}
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 8162258b726a..a5eb5e414c90 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -203,15 +203,15 @@ sal_uLong SwReader::Read( const Reader& rOptions )
{
*pUndoPam->GetMark() = *pPam->GetPoint();
pUndoPam->GetPoint()->nNode++;
- SwNode* pNd = pUndoPam->GetNode();
- if( pNd->IsCntntNode() )
+ SwNode& rNd = pUndoPam->GetNode();
+ if( rNd.IsCntntNode() )
pUndoPam->GetPoint()->nContent.Assign(
- (SwCntntNode*)pNd, nSttCntnt );
+ (SwCntntNode*)&rNd, nSttCntnt );
else
pUndoPam->GetPoint()->nContent.Assign( 0, 0 );
- bool bChkHeaderFooter = pNd->FindHeaderStartNode() ||
- pNd->FindFooterStartNode();
+ bool bChkHeaderFooter = rNd.FindHeaderStartNode() ||
+ rNd.FindFooterStartNode();
// search all new Fly's, and store them as individual Undo Objects
for( sal_uInt16 n = 0; n < pDoc->GetSpzFrmFmts()->size(); ++n )
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index c6eb10e26ef0..db52907da556 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -477,7 +477,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
sal_uInt8 nBulletGrfLvl = 255; // Die auszugebende Bullet-Grafik
// Sind wir in einer Aufzaehlungs- oder Numerierungliste?
- const SwTxtNode* pTxtNd = rWrt.pCurPam->GetNode()->GetTxtNode();
+ const SwTxtNode* pTxtNd = rWrt.pCurPam->GetNode().GetTxtNode();
SwHTMLNumRuleInfo aNumInfo;
if( rHWrt.GetNextNumInfo() )
@@ -2339,7 +2339,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
sal_Int32 nStrPos = rHTMLWrt.pCurPam->GetPoint()->nContent.GetIndex();
const SwTxtAttr * pHt = 0;
sal_uInt16 nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0;
- if( nCntAttr && nStrPos > *( pHt = pNd->GetSwpHints()[ 0 ] )->GetStart() )
+ if( nCntAttr && nStrPos > ( pHt = pNd->GetSwpHints()[ 0 ] )->GetStart() )
{
// Ok, es gibt vorher Attribute, die ausgegeben werden muessen
do {
@@ -2353,7 +2353,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if ( pHt->End() && !pHt->HasDummyChar() )
{
const sal_Int32 nHtEnd = *pHt->End(),
- nHtStt = *pHt->GetStart();
+ nHtStt = pHt->GetStart();
if( !rHTMLWrt.bWriteAll && nHtEnd <= nStrPos )
continue;
@@ -2379,7 +2379,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
}
} while( nAttrPos < nCntAttr && nStrPos >
- *( pHt = pNd->GetSwpHints()[ nAttrPos ] )->GetStart() );
+ ( pHt = pNd->GetSwpHints()[ nAttrPos ] )->GetStart() );
// dann gebe mal alle gesammelten Attribute von der String-Pos aus
aEndPosLst.OutEndAttrs( rHTMLWrt, nStrPos + nOffset );
@@ -2407,7 +2407,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
bool bOutChar = true;
const SwTxtAttr * pTxtHt = 0;
- if( nAttrPos < nCntAttr && *pHt->GetStart() == nStrPos
+ if( nAttrPos < nCntAttr && pHt->GetStart() == nStrPos
&& nStrPos != nEnd )
{
do {
@@ -2445,7 +2445,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
bOutChar = false; // keine 255 ausgeben
}
} while( ++nAttrPos < nCntAttr && nStrPos ==
- *( pHt = pNd->GetSwpHints()[ nAttrPos ] )->GetStart() );
+ ( pHt = pNd->GetSwpHints()[ nAttrPos ] )->GetStart() );
}
// Manche Draw-Formate koennen auch noch Attribute mitbringen
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index b9bf7140d2df..bc8359cb5e71 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -612,7 +612,7 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag
// werden soll, fuegen wir es vor dem Space ein. Dann gibt es
// weniger Probleme beim Formatieren (bug #40483#)
const sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex();
- SwTxtNode *pTxtNd = pPam->GetNode()->GetTxtNode();
+ SwTxtNode *pTxtNd = pPam->GetNode().GetTxtNode();
bool bMoveFwd = false;
if (nPos>0 && pTxtNd && (' ' == pTxtNd->GetTxt()[nPos-1]))
{
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index f97112855185..e0d37e3bef54 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -536,7 +536,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
OSL_ENSURE( pTxtFld, "Where is the txt fld?" );
if( pTxtFld )
OutHTML_SwField( rWrt, pFld, pTxtFld->GetTxtNode(),
- *pTxtFld->GetStart() );
+ pTxtFld->GetStart() );
}
return rWrt;
}
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 3d0602fbf347..c3c2b9061739 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -206,7 +206,7 @@ void SwHTMLParser::FinishFootEndNote()
pDoc->InsertPoolItem( *pPam, aFtn, 0 );
SwTxtFtn * const pTxtFtn = static_cast<SwTxtFtn *>(
- pPam->GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ pPam->GetNode().GetTxtNode()->GetTxtAttrForCharAt(
pPam->GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_FTN ) );
// In Kopf- und Fusszeilen duerfen keine Fussnoten eingefuegt werden.
if( pTxtFtn )
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index eee34a296dc3..0eeea5eb6ced 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -439,7 +439,7 @@ IMAGE_SETEVENT:
!aBulletGrfs[GetNumInfo().GetDepth()-1].isEmpty() &&
aBulletGrfs[GetNumInfo().GetDepth()-1]==sGrfNm )
{
- SwTxtNode* pTxtNode = pPam->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = pPam->GetNode().GetTxtNode();
if( pTxtNode && ! pTxtNode->IsCountedInList())
{
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index f56d3b168bdf..bb5efeb872d7 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -338,7 +338,7 @@ void SwHTMLParser::EndNumBulList( int nToken )
bool bAppend = pPam->GetPoint()->nContent.GetIndex() > 0;
if( !bAppend )
{
- SwTxtNode* pTxtNode = pPam->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = pPam->GetNode().GetTxtNode();
bAppend = (pTxtNode && ! pTxtNode->IsOutline() && pTxtNode->IsCountedInList()) ||
@@ -399,7 +399,7 @@ void SwHTMLParser::EndNumBulList( int nToken )
// Beim letzen Append wurde das NumRule-Item und das
// NodeNum-Objekt mit kopiert. Beides muessen wir noch
// loeschen. Das ResetAttr loescht das NodeNum-Objekt mit!
- pPam->GetNode()->GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE );
+ pPam->GetNode().GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE );
rInfo.Clear();
}
@@ -507,7 +507,7 @@ void SwHTMLParser::NewNumBulListItem( int nToken )
nOpenParaToken = static_cast< sal_uInt16 >(nToken);
}
- SwTxtNode* pTxtNode = pPam->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = pPam->GetNode().GetTxtNode();
((SwCntntNode *)pTxtNode)->SetAttr( SwNumRuleItem(aNumRuleName) );
pTxtNode->SetAttrListLevel(nLevel);
// #i57656# - <IsCounted()> state of text node has to be adjusted accordingly.
@@ -600,7 +600,7 @@ void SwHTMLParser::EndNumBulListItem( int nToken, bool bSetColl,
void SwHTMLParser::SetNodeNum( sal_uInt8 nLevel, bool bCountedInList )
{
- SwTxtNode* pTxtNode = pPam->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = pPam->GetNode().GetTxtNode();
OSL_ENSURE( pTxtNode, "Kein Text-Node an PaM-Position" );
OSL_ENSURE( GetNumInfo().GetNumRule(), "Kein Numerierungs-Regel" );
diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx
index 8296f8d971a3..34f4528704d4 100644
--- a/sw/source/filter/html/htmlnumwriter.cxx
+++ b/sw/source/filter/html/htmlnumwriter.cxx
@@ -243,10 +243,10 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
if( bStartValue && 1 == nStartVal && i == rInfo.GetDepth()-1 )
{
// #i51089 - TUNING#
- if ( rWrt.pCurPam->GetNode()->GetTxtNode()->GetNum() )
+ if ( rWrt.pCurPam->GetNode().GetTxtNode()->GetNum() )
{
nStartVal = static_cast< sal_uInt16 >( rWrt.pCurPam->GetNode()
- ->GetTxtNode()->GetNumberVector()[i] );
+ .GetTxtNode()->GetNumberVector()[i] );
}
else
{
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index ddba2af44821..5f3e5bbd26e5 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -5344,7 +5344,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
SwStartNode *pTblStNd = pTCntxt->GetTableNode();
OSL_ENSURE( pTblStNd, "Wo ist der Tabellen-Node" );
- OSL_ENSURE( pTblStNd==pPam->GetNode()->FindTableNode(),
+ OSL_ENSURE( pTblStNd==pPam->GetNode().FindTableNode(),
"Stehen wir in der falschen Tabelle?" );
SwNode* pNd;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index a5983c1ba17a..f2469a39e2e4 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1671,10 +1671,10 @@ void SwHTMLParser::NextToken( int nToken )
if( nOpenParaToken )
EndPara();
OSL_ENSURE( !pTable, "table in table not allowed here" );
- if( !pTable && (IsNewDoc() || !pPam->GetNode()->FindTableNode()) &&
+ if( !pTable && (IsNewDoc() || !pPam->GetNode().FindTableNode()) &&
(pPam->GetPoint()->nNode.GetIndex() >
pDoc->GetNodes().GetEndOfExtras().GetIndex() ||
- !pPam->GetNode()->FindFootnoteStartNode() ) )
+ !pPam->GetNode().FindFootnoteStartNode() ) )
{
if ( nParaCnt < 5 )
Show(); // show what we have up to here
@@ -2260,7 +2260,7 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum )
SetNodeNum( nLvl, false );
}
else
- pPam->GetNode()->GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE );
+ pPam->GetNode().GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE );
}
// Attrubute im Absatz davor sollte man jetzt setzen (wegen JavaScript)
@@ -2337,7 +2337,7 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum )
}
if( nIdx != -1 )
{
- sal_Int32 nStt = *pHt->GetStart();
+ sal_Int32 nStt = pHt->GetStart();
if( nStt >= aEndPos[nIdx] )
{
bool bFont = (nIdx % 5) == 0;
@@ -3946,7 +3946,7 @@ void SwHTMLParser::EndPara( bool bReal )
if( HTML_LI_ON==nOpenParaToken && pTable )
{
#if OSL_DEBUG_LEVEL > 0
- const SwNumRule *pNumRule = pPam->GetNode()->GetTxtNode()->GetNumRule();
+ const SwNumRule *pNumRule = pPam->GetNode().GetTxtNode()->GetNumRule();
OSL_ENSURE( pNumRule, "Wo ist die Numrule geblieben" );
#endif
}
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index cb32cd81bbc5..18a17ded3a0d 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -294,7 +294,7 @@ sal_uLong SwHTMLWriter::WriteStream()
// Tabellen und Bereiche am Doc.-Anfang beachten
{
- SwTableNode * pTNd = pCurPam->GetNode()->FindTableNode();
+ SwTableNode * pTNd = pCurPam->GetNode().FindTableNode();
if( pTNd && bWriteAll )
{
// mit dem Tabellen-Node anfangen !!
@@ -307,7 +307,7 @@ sal_uLong SwHTMLWriter::WriteStream()
// erster Node (der einen Seitenumbruch enthalten darf)
pStartNdIdx = new SwNodeIndex( pCurPam->GetPoint()->nNode );
- SwSectionNode * pSNd = pCurPam->GetNode()->FindSectionNode();
+ SwSectionNode * pSNd = pCurPam->GetNode().FindSectionNode();
while( pSNd )
{
if( bWriteAll )
@@ -737,30 +737,30 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam )
(pCurPam->GetPoint()->nNode.GetIndex() == pCurPam->GetMark()->nNode.GetIndex() &&
pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex()) )
{
- SwNode * pNd = pCurPam->GetNode();
+ SwNode& rNd = pCurPam->GetNode();
- OSL_ENSURE( !(pNd->IsGrfNode() || pNd->IsOLENode()),
+ OSL_ENSURE( !(rNd.IsGrfNode() || rNd.IsOLENode()),
"Grf- oder OLE-Node hier unerwartet" );
- if( pNd->IsTxtNode() )
+ if( rNd.IsTxtNode() )
{
- SwTxtNode* pTxtNd = pNd->GetTxtNode();
+ SwTxtNode* pTxtNd = rNd.GetTxtNode();
if( !bFirstLine )
pCurPam->GetPoint()->nContent.Assign( pTxtNd, 0 );
OutHTML_SwTxtNode( *this, *pTxtNd );
}
- else if( pNd->IsTableNode() )
+ else if( rNd.IsTableNode() )
{
- OutHTML_SwTblNode( *this, *pNd->GetTableNode(), 0 );
+ OutHTML_SwTblNode( *this, *rNd.GetTableNode(), 0 );
nBkmkTabPos = bWriteAll ? FindPos_Bkmk( *pCurPam->GetPoint() ) : -1;
}
- else if( pNd->IsSectionNode() )
+ else if( rNd.IsSectionNode() )
{
- OutHTML_Section( *this, *pNd->GetSectionNode() );
+ OutHTML_Section( *this, *rNd.GetSectionNode() );
nBkmkTabPos = bWriteAll ? FindPos_Bkmk( *pCurPam->GetPoint() ) : -1;
}
- else if( pNd == &pDoc->GetNodes().GetEndOfContent() )
+ else if( &rNd == &pDoc->GetNodes().GetEndOfContent() )
break;
pCurPam->GetPoint()->nNode++; // Bewegen
@@ -877,7 +877,7 @@ sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
const SwTxtAttr *pHt = pTxtNd->GetSwpHints()[i];
if( !pHt->End() )
{
- sal_Int32 nPos = *pHt->GetStart();
+ sal_Int32 nPos = pHt->GetStart();
if( nPos-nOldPos > 1
|| ( pHt->Which() != RES_TXTATR_FIELD
&& pHt->Which() != RES_TXTATR_ANNOTATION ) )
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 7cd8b9fad273..a77f06f94216 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -2000,7 +2000,7 @@ void SwFltShell::BeginFootnote()
OSL_ENSURE(pSavedPos == NULL, "SwFltShell");
pSavedPos = new SwPosition(*pPaM->GetPoint());
pPaM->Move(fnMoveBackward, fnGoCntnt);
- SwTxtNode* pTxt = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pTxt = pPaM->GetNode().GetTxtNode();
SwTxtAttr *const pFN = pTxt->GetTxtAttrForCharAt(
pPaM->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
if( !pFN ){ // Happens at footnote in Fly, among others
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index d52cfeea5436..2ad184434dd3 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -1745,7 +1745,7 @@ static sal_uLong GuessPicSize(W1_PIC* pPic)
void Ww1Picture::WriteBmp(SvStream& rOut)
{
long nSize = pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb));
- sal_uInt8* p = pPic->rgbGet();
+ sal_uInt8* p = &pPic->rgbGet();
sal_uInt16 maxx = pPic->mfp.xExtGet();
sal_uInt16 padx = ((maxx + 7) / 8) * 8;
sal_uInt16 maxy = pPic->mfp.yExtGet();
@@ -1869,7 +1869,7 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
case 8: // embedded metafile
{
SvMemoryStream aOut(8192, 8192);
- aOut.Write(pPic->rgbGet(), pPic->lcbGet() -
+ aOut.Write(&pPic->rgbGet(), pPic->lcbGet() -
(sizeof(*pPic)-sizeof(pPic->rgb)));
aOut.Seek(0);
GDIMetaFile aWMF;
@@ -1889,7 +1889,7 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
case 94: // embedded name SH:??? Which one is it? Embedded or Name ?
case 98: // TIFF name
{
- OUString aDir( (sal_Char*)pPic->rgbGet(),
+ OUString aDir( (sal_Char*)&pPic->rgbGet(),
(sal_uInt16)(pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb))),
RTL_TEXTENCODING_MS_1252 );
diff --git a/sw/source/filter/ww1/w1struct.hxx b/sw/source/filter/ww1/w1struct.hxx
index 189103f88706..f8b7de9ee52a 100644
--- a/sw/source/filter/ww1/w1struct.hxx
+++ b/sw/source/filter/ww1/w1struct.hxx
@@ -793,7 +793,7 @@ struct W1_PIC // PictureStructure
// sal_uInt16 dyaOriginGet() {
// return SVBT16ToShort(dyaOrigin); }
sal_uInt8 rgb;// 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
- sal_uInt8* rgbGet() { return &rgb; }
+ sal_uInt8& rgbGet() { return rgb; }
};
struct W1_TBD
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 83c753e9f5bc..e725b7e61905 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -407,7 +407,7 @@ void RtfExport::WriteMainText()
{
SAL_INFO("sw.rtf", OSL_THIS_FUNC << " start");
- SwTableNode* pTableNode = pCurPam->GetNode()->FindTableNode();
+ SwTableNode* pTableNode = pCurPam->GetNode().FindTableNode();
if (m_pWriter && m_pWriter->bWriteOnlyFirstTable
&& pTableNode != 0)
{
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index d885948a1616..9b662f99ce6a 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -313,7 +313,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos )
for( sal_uInt16 i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
- sal_Int32 nPos = *pHt->GetStart(); // first Attr characters
+ sal_Int32 nPos = pHt->GetStart(); // first Attr characters
if( nPos >= nStartPos && nPos <= nMinPos )
nMinPos = nPos;
@@ -326,7 +326,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos )
if (pHt->HasDummyChar())
{
// pos + 1 because of CH_TXTATR in Text
- nPos = *pHt->GetStart() + 1;
+ nPos = pHt->GetStart() + 1;
if( nPos >= nStartPos && nPos <= nMinPos )
nMinPos = nPos;
}
@@ -422,8 +422,8 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby )
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const sal_Int32* pEnd = pHt->End();
- if (pEnd ? ( nSwPos >= *pHt->GetStart() && nSwPos < *pEnd)
- : nSwPos == *pHt->GetStart() )
+ if (pEnd ? ( nSwPos >= pHt->GetStart() && nSwPos < *pEnd)
+ : nSwPos == pHt->GetStart() )
{
sal_uInt16 nWhich = pHt->GetAttr().Which();
if (nWhich == RES_TXTATR_AUTOFMT)
@@ -450,7 +450,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby )
else
aRangeItems[nWhich] = (&(pHt->GetAttr()));
}
- else if (nSwPos < *pHt->GetStart())
+ else if (nSwPos < pHt->GetStart())
break;
}
}
@@ -617,7 +617,7 @@ bool SwWW8AttrIter::IsTxtAttr( sal_Int32 nSwPos )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if ( ( pHt->HasDummyChar() || pHt->HasContent() )
- && (*pHt->GetStart() == nSwPos) )
+ && (pHt->GetStart() == nSwPos) )
{
return true;
}
@@ -676,7 +676,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
const SfxPoolItem* pItem = &pHt->GetAttr();
const sal_Int32 * pAtrEnd = 0;
if( 0 != ( pAtrEnd = pHt->End() ) && // only Attr with an end
- nTmpSwPos >= *pHt->GetStart() && nTmpSwPos < *pAtrEnd )
+ nTmpSwPos >= pHt->GetStart() && nTmpSwPos < *pAtrEnd )
{
if ( nWhich == pItem->Which() )
{
@@ -697,7 +697,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
}
}
}
- else if (nTmpSwPos < *pHt->GetStart())
+ else if (nTmpSwPos < pHt->GetStart())
break; // nothing more to come
}
}
@@ -805,7 +805,7 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, sal_Int32 /*nPos*/,
if ( g_pBreakIt->GetBreakIter().is() )
nRubyScript = g_pBreakIt->GetBreakIter()->getScriptType( rNode.GetTxt(),
- *( pRubyTxt->GetStart() ) );
+ pRubyTxt->GetStart() );
else
nRubyScript = i18n::ScriptType::ASIAN;
@@ -1146,8 +1146,8 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt
const sal_Int32* pTxtEnd = rTxtTOXMark.End();
if ( pTxtEnd ) // has range?
{
- sTxt = rNode.GetExpandTxt( *rTxtTOXMark.GetStart(),
- *pTxtEnd - *rTxtTOXMark.GetStart() );
+ sTxt = rNode.GetExpandTxt( rTxtTOXMark.GetStart(),
+ *pTxtEnd - rTxtTOXMark.GetStart() );
}
else
sTxt = rAttr.GetAlternativeText();
@@ -1205,7 +1205,7 @@ int SwWW8AttrIter::OutAttrWithRange(sal_Int32 nPos)
switch ( pItem->Which() )
{
case RES_TXTATR_INETFMT:
- if ( nPos == *pHt->GetStart() )
+ if ( nPos == pHt->GetStart() )
{
const SwFmtINetFmt *rINet = static_cast< const SwFmtINetFmt* >( pItem );
if ( m_rExport.AttrOutput().StartURL( rINet->GetValue(), rINet->GetTargetFrame() ) )
@@ -1218,7 +1218,7 @@ int SwWW8AttrIter::OutAttrWithRange(sal_Int32 nPos)
}
break;
case RES_TXTATR_REFMARK:
- if ( nPos == *pHt->GetStart() )
+ if ( nPos == pHt->GetStart() )
{
OutSwFmtRefMark( *static_cast< const SwFmtRefMark* >( pItem ), true );
++nRet;
@@ -1230,11 +1230,11 @@ int SwWW8AttrIter::OutAttrWithRange(sal_Int32 nPos)
}
break;
case RES_TXTATR_TOXMARK:
- if ( nPos == *pHt->GetStart() )
+ if ( nPos == pHt->GetStart() )
m_rExport.AttrOutput().TOXMark( rNd, *static_cast< const SwTOXMark* >( pItem ) );
break;
case RES_TXTATR_CJK_RUBY:
- if ( nPos == *pHt->GetStart() )
+ if ( nPos == pHt->GetStart() )
{
m_rExport.AttrOutput().StartRuby( rNd, nPos, *static_cast< const SwFmtRuby* >( pItem ) );
++nRet;
@@ -2659,14 +2659,14 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
for( sal_uInt16 i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
- const sal_Int32* startPos = pHt->GetStart(); // first Attr characters
+ const sal_Int32 startPos = pHt->GetStart(); // first Attr characters
const sal_Int32* endPos = pHt->End(); // end Attr characters
// Check if these attributes are for the last character in the paragraph
// - which means the paragraph marker. If a paragraph has 7 characters,
// then properties on character 8 are for the paragraph marker
- if( (startPos && endPos) && (*startPos == *endPos ) && (*endPos == rNode.GetTxt().getLength()) )
+ if( (endPos) && (startPos == *endPos ) && (*endPos == rNode.GetTxt().getLength()) )
{
- SAL_INFO( "sw.ww8", *startPos << "startPos == endPos" << *endPos);
+ SAL_INFO( "sw.ww8", startPos << "startPos == endPos" << *endPos);
sal_uInt16 nWhich = pHt->GetAttr().Which();
SAL_INFO( "sw.ww8", "nWhich" << nWhich);
if (nWhich == RES_TXTATR_AUTOFMT)
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 215c33ad2ec4..c4bde9e0df92 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1044,7 +1044,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
sal_uLong nRstLnNum = pSet ? ((SwFmtLineNumber&)pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
- const SwTableNode* pTblNd = rExport.pCurPam->GetNode()->FindTableNode();
+ const SwTableNode* pTblNd = rExport.pCurPam->GetNode().FindTableNode();
const SwSectionNode* pSectNd;
if ( pTblNd )
{
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 368422fbcf4f..c69ee3f5fbe2 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2546,38 +2546,38 @@ void MSWordExportBase::WriteText()
( pCurPam->GetPoint()->nNode == pCurPam->GetMark()->nNode &&
pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex() ) )
{
- SwNode * pNd = pCurPam->GetNode();
+ SwNode& rNd = pCurPam->GetNode();
- if ( pNd->IsTxtNode() )
- SectionBreaksAndFrames( *pNd->GetTxtNode() );
+ if ( rNd.IsTxtNode() )
+ SectionBreaksAndFrames( *rNd.GetTxtNode() );
// output the various types of nodes
- if ( pNd->IsCntntNode() )
+ if ( rNd.IsCntntNode() )
{
- SwCntntNode* pCNd = (SwCntntNode*)pNd;
+ SwCntntNode* pCNd = (SwCntntNode*)&rNd;
- const SwPageDesc* pTemp = pNd->FindPageDesc(false);
+ const SwPageDesc* pTemp = rNd.FindPageDesc(false);
if ( pTemp )
pAktPageDesc = pTemp;
pCurPam->GetPoint()->nContent.Assign( pCNd, 0 );
OutputContentNode( *pCNd );
}
- else if ( pNd->IsTableNode() )
+ else if ( rNd.IsTableNode() )
{
- mpTableInfo->processSwTable( &pNd->GetTableNode()->GetTable() );
+ mpTableInfo->processSwTable( &rNd.GetTableNode()->GetTable() );
}
- else if ( pNd->IsSectionNode() && TXT_MAINTEXT == nTxtTyp )
- OutputSectionNode( *pNd->GetSectionNode() );
- else if ( TXT_MAINTEXT == nTxtTyp && pNd->IsEndNode() &&
- pNd->StartOfSectionNode()->IsSectionNode() )
+ else if ( rNd.IsSectionNode() && TXT_MAINTEXT == nTxtTyp )
+ OutputSectionNode( *rNd.GetSectionNode() );
+ else if ( TXT_MAINTEXT == nTxtTyp && rNd.IsEndNode() &&
+ rNd.StartOfSectionNode()->IsSectionNode() )
{
- const SwSection& rSect = pNd->StartOfSectionNode()->GetSectionNode()
+ const SwSection& rSect = rNd.StartOfSectionNode()->GetSectionNode()
->GetSection();
if ( bStartTOX && TOX_CONTENT_SECTION == rSect.GetType() )
bStartTOX = false;
- SwNodeIndex aIdx( *pNd, 1 );
+ SwNodeIndex aIdx( rNd, 1 );
if ( aIdx.GetNode().IsEndNode() && aIdx.GetNode().StartOfSectionNode()->IsSectionNode() )
;
else if ( aIdx.GetNode().IsSectionNode() )
@@ -2634,16 +2634,16 @@ void MSWordExportBase::WriteText()
}
}
}
- else if ( pNd->IsStartNode() )
+ else if ( rNd.IsStartNode() )
{
- OutputStartNode( *pNd->GetStartNode() );
+ OutputStartNode( *rNd.GetStartNode() );
}
- else if ( pNd->IsEndNode() )
+ else if ( rNd.IsEndNode() )
{
- OutputEndNode( *pNd->GetEndNode() );
+ OutputEndNode( *rNd.GetEndNode() );
}
- if ( pNd == &pNd->GetNodes().GetEndOfContent() )
+ if ( &rNd == &rNd.GetNodes().GetEndOfContent() )
break;
SwNode * pCurrentNode = &pCurPam->GetPoint()->nNode.GetNode();
@@ -2695,11 +2695,11 @@ bool MSWordExportBase::IsInTable() const
if (pCurPam != NULL)
{
- SwNode * pNode = pCurPam->GetNode();
+ SwNode& rNode = pCurPam->GetNode();
- if (pNode != NULL && mpTableInfo.get() != NULL)
+ if (mpTableInfo.get() != NULL)
{
- ww8::WW8TableNodeInfo::Pointer_t pTableNodeInfo = mpTableInfo->getTableNodeInfo(pNode);
+ ww8::WW8TableNodeInfo::Pointer_t pTableNodeInfo = mpTableInfo->getTableNodeInfo(&rNode);
if (pTableNodeInfo.get() != NULL && pTableNodeInfo->getDepth() > 0)
{
@@ -3425,7 +3425,7 @@ sal_uLong SwWW8Writer::WriteStorage()
// Respect table at the beginning of the document
{
- SwTableNode * pTNd = pCurPam->GetNode()->FindTableNode();
+ SwTableNode* pTNd = pCurPam->GetNode().FindTableNode();
if( pTNd && bWriteAll )
// start with the table node !!
pCurPam->GetPoint()->nNode = *pTNd;
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 2f8959d2cdb1..31b9df797f2c 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3083,8 +3083,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
const SwTxtNode *pTxtNd = GetExport().GetHdFtPageRoot();
if (!pTxtNd)
{
- if (const SwNode *pNd = GetExport().pCurPam->GetNode())
- pTxtNd = pNd->GetTxtNode();
+ pTxtNd = GetExport().pCurPam->GetNode().GetTxtNode();
}
if (pTxtNd)
@@ -3318,8 +3317,8 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pOutArr )
pCFmt = pInfo->GetCharFmt( *pDoc );
aSet.Set( pCFmt->GetAttrSet() );
- pTxtFtn->GetTxtNode().GetAttr( aSet, *pTxtFtn->GetStart(),
- (*pTxtFtn->GetStart()) + 1 );
+ pTxtFtn->GetTxtNode().GetAttr( aSet, pTxtFtn->GetStart(),
+ (pTxtFtn->GetStart()) + 1 );
m_pAttrOutput->OutputItem( aSet.Get( RES_CHRATR_FONT ) );
pO = pOld;
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 90b6a44c551a..ae1d28cfea65 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2468,7 +2468,7 @@ void wwSectionManager::SetHdFt(wwSection &rSection, int nSect,
void SwWW8ImplReader::AppendTxtNode(SwPosition& rPos)
{
- SwTxtNode* pTxt = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pTxt = pPaM->GetNode().GetTxtNode();
const SwNumRule* pRule = NULL;
@@ -3432,7 +3432,7 @@ bool SwWW8ImplReader::HandlePageBreakChar()
if (!nInTable)
{
bool IsTemp=true;
- SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pTemp = pPaM->GetNode().GetTxtNode();
if (pTemp && pTemp->GetTxt().isEmpty()
&& (bFirstPara || bFirstParaOfPage))
{
@@ -3453,7 +3453,7 @@ bool SwWW8ImplReader::HandlePageBreakChar()
bParaEndAdded = true;
if (0 >= pPaM->GetPoint()->nContent.GetIndex())
{
- if (SwTxtNode* pTxtNode = pPaM->GetNode()->GetTxtNode())
+ if (SwTxtNode* pTxtNode = pPaM->GetNode().GetTxtNode())
{
pTxtNode->SetAttr(
*GetDfltAttr(RES_PARATR_NUMRULE));
@@ -3716,20 +3716,20 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine)
long nSkipChars = 0;
WW8PLCFManResult aRes;
- OSL_ENSURE(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
+ OSL_ENSURE(pPaM->GetNode().GetTxtNode(), "Missing txtnode");
bool bStartAttr = pPlcxMan->Get(&aRes); // Get Attribute position again
aRes.nAktCp = rTxtPos; // Current Cp position
bool bNewSection = (aRes.nFlags & MAN_MASK_NEW_SEP) && !bIgnoreText;
if ( bNewSection ) // New Section
{
- OSL_ENSURE(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
+ OSL_ENSURE(pPaM->GetNode().GetTxtNode(), "Missing txtnode");
// Create PageDesc and fill it
maSectionManager.CreateSep(rTxtPos, bPgSecBreak);
// -> 0xc was a Sectionbreak, but not a Pagebreak;
// Create PageDesc and fill it
bPgSecBreak = false;
- OSL_ENSURE(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
+ OSL_ENSURE(pPaM->GetNode().GetTxtNode(), "Missing txtnode");
}
// New paragraph over Plcx.Fkp.papx
@@ -3930,7 +3930,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
while ( l<nStartCp+nTextLen )
{
ReadAttrs( nNext, l, bStartLine );// Takes SectionBreaks into account, too
- OSL_ENSURE(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
+ OSL_ENSURE(pPaM->GetNode().GetTxtNode(), "Missing txtnode");
if (mpPostProcessAttrsInfo != NULL)
PostProcessAttrs();
@@ -3968,7 +3968,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
if (pPreviousNode && bStartLine)
{
- SwTxtNode* pEndNd = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pEndNd = pPaM->GetNode().GetTxtNode();
const sal_Int32 nDropCapLen = pPreviousNode->GetTxt().getLength();
// Need to reset the font size and text position for the dropcap
@@ -4001,7 +4001,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
else if (bDropCap)
{
// If we have found a dropcap store the textnode
- pPreviousNode = pPaM->GetNode()->GetTxtNode();
+ pPreviousNode = pPaM->GetNode().GetTxtNode();
const sal_uInt8 *pDCS;
@@ -5244,7 +5244,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
for( sal_uInt16 nHintPos = 0; pHints && nHintPos < pHints->Count(); ++nHintPos)
{
const SwTxtAttr *pHt = (*pHints)[nHintPos];
- const sal_Int32 st = *(pHt->GetStart());
+ const sal_Int32 st = pHt->GetStart();
if( pHt
&& pHt->Which() == RES_TXTATR_FLYCNT
&& (st >= ppBkmk->get()->GetMarkStart().nContent.GetIndex()) )
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 2a7cc2ca8437..758c35b8e592 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -288,7 +288,7 @@ sal_uInt16 SwWW8ImplReader::End_Ftn()
//Get the footnote character and remove it from the txtnode. We'll
//replace it with the footnote
- SwTxtNode* pTxt = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pTxt = pPaM->GetNode().GetTxtNode();
sal_Int32 nPos = pPaM->GetPoint()->nContent.GetIndex();
OUString sChar;
@@ -996,7 +996,7 @@ void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13)
else
nSwNumLevel = 0xff; // no number
- SwTxtNode* pNd = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pNd = pPaM->GetNode().GetTxtNode();
if (nSwNumLevel < MAXLEVEL)
pNd->SetAttrListLevel( nSwNumLevel );
else
@@ -2848,7 +2848,7 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
}
// Better to turn Snap to Grid off for all paragraphs in tables
- if(SwTxtNode *pNd = pIo->pPaM->GetNode()->GetTxtNode())
+ if(SwTxtNode *pNd = pIo->pPaM->GetNode().GetTxtNode())
{
const SfxPoolItem &rItm = pNd->SwCntntNode::GetAttr(RES_PARATR_SNAPTOGRID);
SvxParaGridItem &rSnapToGrid = (SvxParaGridItem&)(rItm);
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index b547cd080366..dd40c3ac396f 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1629,7 +1629,7 @@ bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(const SwPaM& rRg,
if( rStyleInfo.pFmt && rStyleInfo.bColl )
{
bRes = rDoc.SetTxtFmtColl(rRg, (SwTxtFmtColl*)rStyleInfo.pFmt);
- SwTxtNode* pTxtNode = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = pPaM->GetNode().GetTxtNode();
OSL_ENSURE( pTxtNode, "No Text-Node at PaM-Position" );
// make code robust
if ( !pTxtNode )
@@ -1792,7 +1792,7 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
if (pLstManager) // sind die Listendeklarationen gelesen?
{
- SwTxtNode* pTxtNd = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNd = pPaM->GetNode().GetTxtNode();
OSL_ENSURE(pTxtNd, "No Text-Node at PaM-Position");
if (!pTxtNd)
return;
@@ -2001,7 +2001,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
// reset/blank the indent
pAktColl->SetFmtAttr(SvxLRSpaceItem(RES_LR_SPACE));
}
- else if (SwTxtNode* pTxtNode = pPaM->GetNode()->GetTxtNode())
+ else if (SwTxtNode* pTxtNode = pPaM->GetNode().GetTxtNode())
{
// here a paragraph is being directly formated
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index e3414ee10e9d..c7352c21c58e 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2364,7 +2364,7 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, OUString& rSt
//we have inserted a section before this point, so adjust pos
//for future page/section segment insertion
- maSectionManager.PrependedInlineNode(aTmpPos, *pPaM->GetNode());
+ maSectionManager.PrependedInlineNode(aTmpPos, pPaM->GetNode());
return FLD_TEXT;
}
@@ -3325,7 +3325,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
// inserting a toc inserts a section before this point, so adjust pos
// for future page/section segment insertion
- maSectionManager.PrependedInlineNode( *mpPosAfterTOC->GetPoint(), *aRegion.GetNode() );
+ maSectionManager.PrependedInlineNode( *mpPosAfterTOC->GetPoint(), aRegion.GetNode() );
}
// Setze Ende in Stack
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index de10966c796d..884af8595a57 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3884,7 +3884,7 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
// for list levels of mode LABEL_ALIGNMENT.(see ww8par3.cxx
// W8ImplReader::RegisterNumFmtOnTxtNode).
// Need to apply the list format to the paragraph here.
- SwTxtNode* pTxtNode = pPaM->GetNode()->GetTxtNode();
+ SwTxtNode* pTxtNode = pPaM->GetNode().GetTxtNode();
if( pTxtNode && pTxtNode->AreListLevelIndentsApplicable() )
{
SwNumRule * pNumRule = pTxtNode->GetNumRule();
@@ -3975,7 +3975,7 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
if (!pAktColl)
{
- if (const SwTxtNode* pNode = pPaM->GetNode()->GetTxtNode())
+ if (const SwTxtNode* pNode = pPaM->GetNode().GetTxtNode())
{
if ( const SwNumFmt *pNumFmt = GetNumFmtFromTxtNode(*pNode) )
{
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index d129574b808e..f9a14fd049dd 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -2845,7 +2845,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
if( bFirstSection )
{
// The Cursor already is in the first section
- pStNd = pTxtCrsr->GetPaM()->GetNode()->FindTableBoxStartNode();
+ pStNd = pTxtCrsr->GetPaM()->GetNode().FindTableBoxStartNode();
bFirstSection = false;
GetImport().GetTextImport()->SetStyleAndAttrs( GetImport(),
GetImport().GetTextImport()->GetCursor(), "Standard", true );
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 12cabb4ea082..7d302395f980 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -315,7 +315,7 @@ void SwIndexMarkPane::UpdateLanguageDependenciesForPhoneticReading()
OSL_ENSURE(pTxtNode, "need current SwTxtNode");
if(!pTxtNode)
return;
- sal_Int32 nTextIndex = *pTxtTOXMark->GetStart();
+ sal_Int32 nTextIndex = pTxtTOXMark->GetStart();
nLangForPhoneticReading = pTxtNode->GetLang( nTextIndex );
}
else //if dialog is opened to create a new mark
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 67d0f03d07fd..f8c5f7f192be 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -66,7 +66,7 @@ void SwModalRedlineAcceptDlg::Activate()
void SwModalRedlineAcceptDlg::AcceptAll( bool bAccept )
{
- SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
+ SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl().GetFilterPage();
if (pFilterTP->IsDate() || pFilterTP->IsAuthor() ||
pFilterTP->IsRange() || pFilterTP->IsAction())
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index a53cc29cd401..90a56323595b 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -545,8 +545,8 @@ void SwSpellDialogChildWindow::GetFocus()
case SHELL_MODE_TABLE_LIST_TEXT:
{
SwPaM* pCursor = pWrtShell->GetCrsr();
- if(m_pSpellState->m_pPointNode != pCursor->GetNode(true) ||
- m_pSpellState->m_pMarkNode != pCursor->GetNode(false)||
+ if(m_pSpellState->m_pPointNode != &pCursor->GetNode(true) ||
+ m_pSpellState->m_pMarkNode != &pCursor->GetNode(false)||
m_pSpellState->m_nPointPos != pCursor->GetPoint()->nContent.GetIndex()||
m_pSpellState->m_nMarkPos != pCursor->GetMark()->nContent.GetIndex())
bInvalidate = true;
@@ -602,8 +602,8 @@ void SwSpellDialogChildWindow::LoseFocus()
{
// store a node pointer and a pam-position to be able to check on next GetFocus();
SwPaM* pCursor = pWrtShell->GetCrsr();
- m_pSpellState->m_pPointNode = pCursor->GetNode(true);
- m_pSpellState->m_pMarkNode = pCursor->GetNode(false);
+ m_pSpellState->m_pPointNode = &pCursor->GetNode(true);
+ m_pSpellState->m_pMarkNode = &pCursor->GetNode(false);
m_pSpellState->m_nPointPos = pCursor->GetPoint()->nContent.GetIndex();
m_pSpellState->m_nMarkPos = pCursor->GetMark()->nContent.GetIndex();
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx
index 9ef1e482bae0..1a0692146548 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -127,7 +127,7 @@ void SwAnnotationWin::UpdateData()
{
SwTxtFld *const pTxtFld = mpFmtFld->GetTxtFld();
SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
+ aPosition.nContent = pTxtFld->GetStart();
rUndoRedo.AppendUndo(
new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
}
@@ -169,7 +169,7 @@ bool SwAnnotationWin::CalcFollow()
{
SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
+ aPosition.nContent = pTxtFld->GetStart();
SwTxtAttr * const pTxtAttr =
pTxtFld->GetTxtNode().GetTxtAttrForCharAt(
aPosition.nContent.GetIndex() - 1,
@@ -184,7 +184,7 @@ sal_uInt32 SwAnnotationWin::CountFollowing()
sal_uInt32 aCount = 1; // we start with 1, so we have to subtract one at the end again
SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
+ aPosition.nContent = pTxtFld->GetStart();
SwTxtAttr * pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt(
aPosition.nContent.GetIndex() + 1,
@@ -267,7 +267,7 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
{
SwTxtFld *const pTxtFld = mpFmtFld->GetTxtFld();
SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
+ aPosition.nContent = pTxtFld->GetStart();
rUndoRedo.AppendUndo(
new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
}
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 856d18c993d3..7f574601e827 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -660,7 +660,7 @@ void SwSidebarWin::SetPosAndSize()
SwShellTableCrsr* pTableCrsr = new SwShellTableCrsr( DocView().GetWrtShell(), aStartPos );
pTableCrsr->SetMark();
pTableCrsr->GetMark()->nNode = *pTxtNode;
- pTableCrsr->GetMark()->nContent.Assign( pTxtNode, *(pTxtAnnotationFld->GetStart())+1 );
+ pTableCrsr->GetMark()->nContent.Assign( pTxtNode, pTxtAnnotationFld->GetStart()+1 );
pTableCrsr->NewTableSelection();
pTmpCrsr = pTableCrsr;
}
@@ -669,7 +669,7 @@ void SwSidebarWin::SetPosAndSize()
SwShellCrsr* pCrsr = new SwShellCrsr( DocView().GetWrtShell(), aStartPos );
pCrsr->SetMark();
pCrsr->GetMark()->nNode = *pTxtNode;
- pCrsr->GetMark()->nContent.Assign( pTxtNode, *(pTxtAnnotationFld->GetStart())+1 );
+ pCrsr->GetMark()->nContent.Assign( pTxtNode, pTxtAnnotationFld->GetStart()+1 );
pTmpCrsr = pCrsr;
}
::boost::scoped_ptr<SwShellCrsr> pTmpCrsrForAnnotationTextRange( pTmpCrsr );
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 71e7f483c4be..e1fda396a3a2 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -3609,10 +3609,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// half of the field was clicked on.
SwTxtAttr const*const pTxtFld(aFieldAtPos.pFndTxtAttr);
if (rSh.GetCurrentShellCursor().GetPoint()->nContent
- .GetIndex() != *pTxtFld->GetStart())
+ .GetIndex() != pTxtFld->GetStart())
{
assert(rSh.GetCurrentShellCursor().GetPoint()->nContent
- .GetIndex() == (*pTxtFld->GetStart() + 1));
+ .GetIndex() == (pTxtFld->GetStart() + 1));
rSh.Left( CRSR_SKIP_CHARS, false, 1, false );
}
// don't go into the !bOverSelect block below - it moves
@@ -4507,7 +4507,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
// select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART
// and CH_TXT_ATR_INPUTFIELDEND
rSh.SttSelect();
- rSh.SelectTxt( *(aCntntAtPos.pFndTxtAttr->GetStart()) + 1,
+ rSh.SelectTxt( aCntntAtPos.pFndTxtAttr->GetStart() + 1,
*(aCntntAtPos.pFndTxtAttr->End()) - 1 );
}
else
diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
index 3760f9778446..14c96d5da3a9 100644
--- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
+++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
@@ -101,7 +101,7 @@ bool SwFrmSidebarWinContainer::insert( const SwFrm& rFrm,
FrmKey aFrmKey( &rFrm );
SidebarWinContainer& rSidebarWinContainer = (*mpFrmSidebarWinContainer)[ aFrmKey ];
- SidebarWinKey aSidebarWinKey( *(rFmtFld.GetTxtFld()->GetStart()) );
+ SidebarWinKey aSidebarWinKey( rFmtFld.GetTxtFld()->GetStart() );
if ( rSidebarWinContainer.empty() ||
rSidebarWinContainer.find( aSidebarWinKey) == rSidebarWinContainer.end() )
{
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index 17676f2fff92..e3372fbf8239 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -225,8 +225,8 @@ private:
static void InitInterface_Impl();
public:
- inline Window* GetFrameWindow() const { return &(GetViewFrame())->GetWindow(); }
- inline SwViewShell* GetViewShell() const { return pViewWin->GetViewShell(); }
+ inline Window& GetFrameWindow() const { return GetViewFrame()->GetWindow(); }
+ inline SwViewShell* GetViewShell() const { return pViewWin->GetViewShell(); }
inline const Rectangle& GetVisArea() const { return aVisArea; }
inline void GrabFocusViewWin() { pViewWin->GrabFocus(); }
inline void RepaintCoreRect( const SwRect& rRect )
@@ -297,7 +297,7 @@ public:
inline void SwPagePreview::AdjustEditWin()
{
- OuterResizePixel( Point(), GetFrameWindow()->GetOutputSizePixel() );
+ OuterResizePixel( Point(), GetFrameWindow().GetOutputSizePixel() );
}
#endif
diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx
index 1c3ca950a205..1a84a2a895fb 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -118,7 +118,7 @@ public:
DECL_LINK( FilterChangedHdl, void *pDummy = 0 );
- inline SvxAcceptChgCtr* GetChgCtrl() { return &aTabPagesCTRL; }
+ inline SvxAcceptChgCtr& GetChgCtrl() { return aTabPagesCTRL; }
inline bool HasRedlineAutoFmt() const { return bRedlnAutoFmt; }
void Init(sal_uInt16 nStart = 0);
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 62474b422739..801a420471b5 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -546,7 +546,7 @@ namespace SwLangHelper
// string for guessing language
OUString aText;
SwPaM *pCrsr = rSh.GetCrsr();
- SwTxtNode *pNode = pCrsr->GetNode()->GetTxtNode();
+ SwTxtNode *pNode = pCrsr->GetNode().GetTxtNode();
if (pNode)
{
aText = pNode->GetTxt();
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index a10d2c68a24e..1ce5469bd189 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -839,11 +839,11 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
pUnoCrsr->DeleteMark();
}
}
- const SwNode* pRangeNode = pUnoCrsr->GetNode();
- bParentInExtra = pRangeNode->FindFlyStartNode() ||
- pRangeNode->FindFootnoteStartNode() ||
- pRangeNode->FindHeaderStartNode() ||
- pRangeNode->FindFooterStartNode() ;
+ const SwNode& rRangeNode = pUnoCrsr->GetNode();
+ bParentInExtra = rRangeNode.FindFlyStartNode() ||
+ rRangeNode.FindFootnoteStartNode() ||
+ rRangeNode.FindHeaderStartNode() ||
+ rRangeNode.FindFooterStartNode() ;
}
util::SearchOptions aSearchOpt;
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index a21ae7536924..75d94dbab393 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -1105,20 +1105,20 @@ void SwXTextViewCursor::gotoRange(
else if(nFrmType & FRMTYPE_FOOTNOTE)
eSearchNodeType = SwFootnoteStartNode;
- const SwStartNode* pOwnStartNode = aOwnPaM.GetNode()->
+ const SwStartNode* pOwnStartNode = aOwnPaM.GetNode().
FindSttNodeByType(eSearchNodeType);
const SwNode* pSrcNode = 0;
if(pCursor && pCursor->GetPaM())
{
- pSrcNode = pCursor->GetPaM()->GetNode();
+ pSrcNode = &pCursor->GetPaM()->GetNode();
}
else if (pRange)
{
SwPaM aPam(pRange->GetDoc()->GetNodes());
if (pRange->GetPositions(aPam))
{
- pSrcNode = aPam.GetNode();
+ pSrcNode = &aPam.GetNode();
}
}
else if (pPara && pPara->GetTxtNode())
@@ -1501,8 +1501,8 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- SwNode *pNode = pShellCrsr->GetNode();
- if (pNode && pNode->IsTxtNode())
+ SwNode& rNode = pShellCrsr->GetNode();
+ if (rNode.IsTxtNode())
{
SwUnoCursorHelper::SetPropertyValue(
*pShellCrsr, *m_pPropSet, rPropertyName, aValue );
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index dcb9d4c52d0c..ae07f4b9c902 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -184,7 +184,7 @@ long SwWrtShell::DelLeft()
// #i4032# Don't actually call a 'delete' if we
// changed the table cell, compare DelRight().
const SwStartNode * pSNdOld = pWasInTblNd ?
- GetSwCrsr()->GetNode()->FindTableBoxStartNode() :
+ GetSwCrsr()->GetNode().FindTableBoxStartNode() :
0;
// If the cursor is at the beginning of a paragraph, try to step
@@ -199,7 +199,7 @@ long SwWrtShell::DelLeft()
return 0;
const SwStartNode* pSNdNew = pIsInTblNd ?
- GetSwCrsr()->GetNode()->FindTableBoxStartNode() :
+ GetSwCrsr()->GetNode().FindTableBoxStartNode() :
0;
// #i4032# Don't actually call a 'delete' if we
@@ -300,8 +300,7 @@ long SwWrtShell::DelRight()
{
// #108049# Save the startnode of the current cell
const SwStartNode * pSNdOld;
- pSNdOld = GetSwCrsr()->GetNode()->
- FindTableBoxStartNode();
+ pSNdOld = GetSwCrsr()->GetNode().FindTableBoxStartNode();
if ( SwCrsrShell::IsEndPara() )
{
@@ -320,7 +319,7 @@ long SwWrtShell::DelRight()
cell. May be different to pSNdOld as we have
moved. */
const SwStartNode * pSNdNew = GetSwCrsr()
- ->GetNode()->FindTableBoxStartNode();
+ ->GetNode().FindTableBoxStartNode();
/** #108049# Only move instead of deleting if we
have moved to a different cell */