[Libreoffice-commits] core.git: 6 commits - comphelper/inc comphelper/source sw/inc sw/qa sw/source
Michael Stahl
mstahl at redhat.com
Mon Feb 18 11:19:19 PST 2013
comphelper/inc/comphelper/string.hxx | 11 +
comphelper/source/misc/string.cxx | 16 ++
sw/inc/ndtxt.hxx | 4
sw/qa/core/uwriter.cxx | 5
sw/qa/extras/inc/swmodeltestbase.hxx | 38 ++++-
sw/qa/extras/odfimport/data/fdo60842.odt |binary
sw/qa/extras/odfimport/odfimport.cxx | 12 +
sw/source/core/access/accpara.cxx | 2
sw/source/core/access/accportions.cxx | 18 +-
sw/source/core/crsr/bookmrk.cxx | 10 -
sw/source/core/crsr/crsrsh.cxx | 12 -
sw/source/core/crsr/findattr.cxx | 2
sw/source/core/crsr/findtxt.cxx | 23 ++-
sw/source/core/crsr/swcrsr.cxx | 17 +-
sw/source/core/doc/dbgoutsw.cxx | 2
sw/source/core/doc/doc.cxx | 12 -
sw/source/core/doc/doccomp.cxx | 43 +++---
sw/source/core/doc/docedt.cxx | 72 ++++++----
sw/source/core/doc/docfly.cxx | 4
sw/source/core/doc/docfmt.cxx | 10 -
sw/source/core/doc/docglbl.cxx | 2
sw/source/core/doc/docredln.cxx | 6
sw/source/core/doc/docruby.cxx | 12 -
sw/source/core/doc/doctxm.cxx | 21 +--
sw/source/core/doc/extinput.cxx | 4
sw/source/core/docnode/ndcopy.cxx | 16 +-
sw/source/core/docnode/ndsect.cxx | 6
sw/source/core/docnode/ndtbl.cxx | 37 +++--
sw/source/core/docnode/node.cxx | 6
sw/source/core/docnode/nodes.cxx | 2
sw/source/core/edit/acorrect.cxx | 26 +--
sw/source/core/edit/autofmt.cxx | 130 +++++++++----------
sw/source/core/edit/edattr.cxx | 35 ++---
sw/source/core/edit/edfmt.cxx | 5
sw/source/core/edit/edglbldc.cxx | 2
sw/source/core/edit/editsh.cxx | 2
sw/source/core/edit/edlingu.cxx | 7 -
sw/source/core/fields/authfld.cxx | 3
sw/source/core/frmedt/fecopy.cxx | 2
sw/source/core/frmedt/feshview.cxx | 4
sw/source/core/frmedt/fetab.cxx | 2
sw/source/core/frmedt/tblsel.cxx | 2
sw/source/core/inc/scriptinfo.hxx | 7 -
sw/source/core/layout/calcmove.cxx | 4
sw/source/core/layout/layact.cxx | 2
sw/source/core/layout/laycache.cxx | 2
sw/source/core/table/swtable.cxx | 2
sw/source/core/text/EnhancedPDFExportHelper.cxx | 2
sw/source/core/text/frmcrsr.cxx | 17 +-
sw/source/core/text/frmform.cxx | 9 -
sw/source/core/text/inftxt.cxx | 2
sw/source/core/text/inftxt.hxx | 2
sw/source/core/text/itratr.cxx | 18 +-
sw/source/core/text/porlay.cxx | 33 ++--
sw/source/core/text/redlnitr.cxx | 2
sw/source/core/text/txtdrop.cxx | 4
sw/source/core/text/txtfrm.cxx | 4
sw/source/core/txtnode/ndtxt.cxx | 162 +++++++++++++-----------
sw/source/core/txtnode/thints.cxx | 25 +--
sw/source/core/txtnode/txtedt.cxx | 121 ++++++++++-------
sw/source/core/undo/unattr.cxx | 2
sw/source/core/undo/undel.cxx | 22 +--
sw/source/core/undo/undobj1.cxx | 2
sw/source/core/undo/unins.cxx | 18 +-
sw/source/core/undo/unmove.cxx | 12 -
sw/source/core/undo/unovwr.cxx | 14 +-
sw/source/core/undo/unredln.cxx | 2
sw/source/core/undo/unsect.cxx | 4
sw/source/core/undo/unsort.cxx | 2
sw/source/core/undo/unspnd.cxx | 6
sw/source/core/undo/untbl.cxx | 14 +-
sw/source/core/undo/untblk.cxx | 6
sw/source/core/unocore/unocrsrhelper.cxx | 2
sw/source/core/unocore/unoobj2.cxx | 2
sw/source/core/unocore/unoparagraph.cxx | 4
sw/source/core/unocore/unoportenum.cxx | 11 -
sw/source/filter/ascii/wrtasc.cxx | 3
sw/source/filter/html/htmlfld.cxx | 2
sw/source/filter/html/htmlgrin.cxx | 2
sw/source/filter/html/htmltab.cxx | 6
sw/source/filter/html/swhtml.cxx | 10 -
sw/source/filter/rtf/swparrtf.cxx | 4
sw/source/filter/ww1/fltshell.cxx | 5
sw/source/filter/ww8/ww8par.cxx | 15 +-
sw/source/filter/ww8/ww8par2.cxx | 8 -
sw/source/filter/ww8/ww8par6.cxx | 4
sw/source/filter/xml/xmlimp.cxx | 10 -
sw/source/filter/xml/xmltbli.cxx | 3
sw/source/ui/uiview/viewling.cxx | 4
89 files changed, 716 insertions(+), 546 deletions(-)
New commits:
commit c5c5d87e8838b372968481483a5e20f5c5f56e3a
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Feb 18 20:08:30 2013 +0100
SwTxtNode: deploy some asserts
Change-Id: I04689c9c1c30482d57e43faf2912ca37299129ca
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 665d338..1b8b8c3 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1163,7 +1163,7 @@ lcl_GetTxtAttrs(
case SwTxtNode::DEFAULT: pMatchFunc = &lcl_GetTxtAttrDefault; break;
case SwTxtNode::EXPAND: pMatchFunc = &lcl_GetTxtAttrExpand; break;
case SwTxtNode::PARENT: pMatchFunc = &lcl_GetTxtAttrParent; break;
- default: OSL_ASSERT(false);
+ default: assert(false);
}
for( sal_uInt16 i = 0; i < nSize; ++i )
@@ -1181,8 +1181,8 @@ lcl_GetTxtAttrs(
}
xub_StrLen const*const pEndIdx = pHint->GetEnd();
- OSL_ENSURE(pEndIdx || pHint->HasDummyChar(),
- "hint with no end and no dummy char?");
+ // cannot have hint with no end and no dummy char
+ assert(pEndIdx || pHint->HasDummyChar());
// Wenn bExpand gesetzt ist, wird das Verhalten bei Eingabe
// simuliert, d.h. der Start wuede verschoben, das Ende expandiert,
bool const bContained( (pEndIdx)
@@ -1224,13 +1224,13 @@ SwTxtAttr *
SwTxtNode::GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
enum GetTxtAttrMode const eMode) const
{
- OSL_ENSURE( (nWhich == RES_TXTATR_META)
+ assert( (nWhich == RES_TXTATR_META)
|| (nWhich == RES_TXTATR_METAFIELD)
|| (nWhich == RES_TXTATR_AUTOFMT)
|| (nWhich == RES_TXTATR_INETFMT)
|| (nWhich == RES_TXTATR_CJK_RUBY)
- || (nWhich == RES_TXTATR_UNKNOWN_CONTAINER),
- "GetTxtAttrAt() will give wrong result for this hint!");
+ || (nWhich == RES_TXTATR_UNKNOWN_CONTAINER));
+ // "GetTxtAttrAt() will give wrong result for this hint!")
SwTxtAttr * pRet(0);
lcl_GetTxtAttrs(0, & pRet, m_pSwpHints, nIndex, nWhich, eMode);
@@ -1260,12 +1260,12 @@ static SwCharFmt* lcl_FindCharFmt( const SwCharFmts* pCharFmts, const XubString&
static void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
SwTxtAttr *const pNewHt, SwDoc *const pOtherDoc, SwTxtNode *const pDest )
{
- OSL_ENSURE( nWhich == pHt->Which(), "Falsche Hint-Id" );
+ assert(nWhich == pHt->Which()); // wrong hint-id
switch( nWhich )
{
// copy nodesarray section with footnote content
case RES_TXTATR_FTN :
- OSL_ENSURE(pDest, "lcl_CopyHint: no destination text node?");
+ assert(pDest); // "lcl_CopyHint: no destination text node?"
static_cast<const SwTxtFtn*>(pHt)->CopyFtn(
*static_cast<SwTxtFtn*>(pNewHt), *pDest);
break;
@@ -1706,7 +1706,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
OUString SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
const IDocumentContentOperations::InsertFlags nMode )
{
- OSL_ENSURE( rIdx <= m_Text.getLength(), "SwTxtNode::InsertText: invalid index." );
+ assert(rIdx <= m_Text.getLength()); // invalid index
xub_StrLen aPos = rIdx.GetIndex();
xub_StrLen nLen = m_Text.getLength() - aPos;
@@ -1830,6 +1830,7 @@ void SwTxtNode::CutText( SwTxtNode * const pDest,
else
{
OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!");
+ assert(false);
EraseText( rStart, nLen );
}
}
@@ -1841,6 +1842,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if(!pDest)
{
OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!");
+ assert(false);
EraseText( rStart, nLen );
return;
}
@@ -1849,6 +1851,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if( GetDoc() != pDest->GetDoc() )
{
OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!");
+ assert(false);
CopyText( pDest, rDestStart, rStart, nLen);
EraseText(rStart, nLen);
return;
@@ -1870,6 +1873,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if( pDest == this )
{
OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!");
+ assert(false);
OUStringBuffer buf(m_Text);
buf.insert(nDestStart, m_Text.copy(nTxtStartIdx, nLen));
buf.remove(
@@ -2009,6 +2013,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
OSL_ENSURE(!pOtherDoc,
"mst: entering dead and bitrotted code; fasten your seatbelts!");
+ assert(!pOtherDoc);
// harte Absatz umspannende Attribute kopieren
if( HasSwAttrSet() )
@@ -2174,7 +2179,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
const IDocumentContentOperations::InsertFlags nMode )
{
- OSL_ENSURE( rIdx <= m_Text.getLength(), "SwTxtNode::EraseText: invalid index." );
+ assert(rIdx <= m_Text.getLength()); // invalid index
const xub_StrLen nStartIdx = rIdx.GetIndex();
const xub_StrLen nCnt = (STRING_LEN == nCount)
@@ -2204,8 +2209,8 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
if( !pHtEndIdx )
{
- OSL_ENSURE(pHt->HasDummyChar(),
- "attribute with neither end nor CH_TXTATR?");
+ // attribute with neither end nor CH_TXTATR?
+ assert(pHt->HasDummyChar());
if (isTXTATR(nWhich) &&
(nHintStart >= nStartIdx) && (nHintStart < nEndIdx))
{
@@ -2216,11 +2221,11 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
continue;
}
- OSL_ENSURE(!( (nHintStart < nEndIdx) && (*pHtEndIdx > nEndIdx)
+ assert(!( (nHintStart < nEndIdx) && (*pHtEndIdx > nEndIdx)
&& pHt->HasDummyChar() )
// next line: deleting exactly dummy char: DeleteAttributes
- || ((nHintStart == nStartIdx) && (nHintStart + 1 == nEndIdx)),
- "ERROR: deleting left-overlapped attribute with CH_TXTATR");
+ || ((nHintStart == nStartIdx) && (nHintStart + 1 == nEndIdx)));
+ // "ERROR: deleting left-overlapped attribute with CH_TXTATR");
// Delete the hint if:
// 1. The hint ends before the deletion end position or
@@ -3337,9 +3342,8 @@ XubString SwTxtNode::GetRedlineTxt( xub_StrLen nIdx, xub_StrLen nLen,
void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
const XubString& rStr)
{
- OSL_ENSURE( rStart.GetIndex() < m_Text.getLength()
- && rStart.GetIndex() + nDelLen <= m_Text.getLength(),
- "SwTxtNode::ReplaceText: index out of bounds" );
+ assert( rStart.GetIndex() < m_Text.getLength() // index out of bounds
+ && rStart.GetIndex() + nDelLen <= m_Text.getLength());
long const nOverflow(static_cast<long>(m_Text.getLength())
+ static_cast<long>(rStr.Len()) - nDelLen - TXTNODE_MAX);
@@ -3363,11 +3367,10 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
SwTxtAttr *const pHint = GetTxtAttrForCharAt( nPos );
if (pHint)
{
- OSL_ENSURE(!( pHint->GetEnd() && pHint->HasDummyChar()
+ assert(!( pHint->GetEnd() && pHint->HasDummyChar()
&& (*pHint->GetStart() < nEndPos)
- && (*pHint->GetEnd() > nEndPos) ),
- "ReplaceText: ERROR: "
- "deleting left-overlapped attribute with CH_TXTATR");
+ && (*pHint->GetEnd() > nEndPos) ));
+ // "deleting left-overlapped attribute with CH_TXTATR"
DeleteAttribute( pHint );
--nEndPos;
--nLen;
@@ -3718,7 +3721,7 @@ int SwTxtNode::GetAttrOutlineLevel() const
}
void SwTxtNode::SetAttrOutlineLevel(int nLevel)
{
- OSL_ENSURE( 0 <= nLevel && nLevel <= MAXLEVEL ,"SwTxtNode: Level Out Of Range" );//#outline level,zhaojianwei
+ assert(0 <= nLevel && nLevel <= MAXLEVEL); // Level Out Of Range
if ( 0 <= nLevel && nLevel <= MAXLEVEL )
{
SetAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL,
@@ -3756,7 +3759,7 @@ void SwTxtNode::SetAttrListLevel( int nLevel )
{
if ( nLevel < 0 || nLevel >= MAXLEVEL )
{
- OSL_FAIL( "<SwTxtNode::SetAttrListLevel()> - value of parameter <nLevel> is out of valid range" );
+ assert(false); // invalid level
return;
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 80c65d8..35bea4a 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -607,7 +607,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
XubString SwTxtNode::GetCurWord( xub_StrLen nPos ) const
{
- OSL_ENSURE( nPos <= m_Text.getLength(), "SwTxtNode::GetCurWord: invalid index." );
+ assert(nPos <= m_Text.getLength()); // invalid index
if (m_Text.isEmpty())
return m_Text;
@@ -1954,7 +1954,6 @@ bool SwTxtNode::CountWords( SwDocStat& rStat,
if (aExpandText.isEmpty() && !bCountNumbering)
{
- OSL_ENSURE(aExpandText.getLength() >= 0, "Node text expansion error: length < 0." );
return false;
}
commit 0295c8a34e39326414c1b98cf4da905802f061b0
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Feb 18 18:36:45 2013 +0100
sw: let SwTxtNode::GetTxt() return OUString
Change-Id: I36e777b2f623429773277e092284f7d2ba61e6ef
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 854dbdc..eba1e5d 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -218,7 +218,7 @@ protected:
public:
using SwCntntNode::GetAttr;
- const String& GetTxt() const { return (String&)m_Text; } //FIXME
+ const OUString& GetTxt() const { return m_Text; }
/// getters for SwpHints
inline SwpHints &GetSwpHints();
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 5f94c84..7667f25 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -251,7 +251,7 @@ void SwDocTest::testModelToViewHelper()
nPos = aPaM.GetPoint()->nContent.GetIndex();
pTxtNode->InsertItem(aFtn, nPos, nPos);
m_pDoc->InsertString(aPaM, rtl::OUString(" DDDDD"));
- CPPUNIT_ASSERT(pTxtNode->GetTxt().Len() == (4*5) + 5 + 2);
+ CPPUNIT_ASSERT_EQUAL(pTxtNode->GetTxt().getLength(), (4*5) + 5 + 2);
//set start of selection to first B
aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 6);
@@ -533,7 +533,8 @@ void SwDocTest::testSwScanner()
aPaM.SetMark(); //set start of selection to current pos
aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 5); //set end of selection to fifth char of current node
m_pDoc->DeleteAndJoin(aPaM); //redline-aware deletion api
- CPPUNIT_ASSERT_MESSAGE("real underlying text should be the same", pTxtNode->GetTxt().EqualsAscii(aString));
+ //"real underlying text should be the same"
+ CPPUNIT_ASSERT_EQUAL(pTxtNode->GetTxt(), OUString(aString));
aDocStat.Reset();
pTxtNode->SetWordCountDirty(true);
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 4ae32a3..d3d58cf 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1623,7 +1623,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
paragraph. */
if (bBehindText)
{
- nPos = pNode->GetTxt().Len();
+ nPos = pNode->GetTxt().getLength();
}
else
nPos = GetPortionData().FillSpecialPos
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index dd8fcb0..8e1e2ff 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -105,7 +105,7 @@ SwAccessiblePortionData::~SwAccessiblePortionData()
void SwAccessiblePortionData::Text(sal_uInt16 nLength, sal_uInt16 nType, sal_Int32 /*nHeight*/, sal_Int32 /*nWidth*/)
{
- OSL_ENSURE( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(),
+ OSL_ENSURE( (nModelPosition + nLength) <= pTxtNode->GetTxt().getLength(),
"portion exceeds model string!" );
OSL_ENSURE( !bFinished, "We are already done!" );
@@ -124,9 +124,7 @@ void SwAccessiblePortionData::Text(sal_uInt16 nLength, sal_uInt16 nType, sal_Int
// update buffer + nModelPosition
aBuffer.append( OUString(
- pTxtNode->GetTxt().Copy(
- static_cast<sal_uInt16>( nModelPosition ),
- nLength ) ) );
+ pTxtNode->GetTxt().copy(nModelPosition, nLength)) );
nModelPosition += nLength;
bLastIsSpecial = sal_False;
@@ -136,7 +134,7 @@ void SwAccessiblePortionData::Special(
sal_uInt16 nLength, const String& rText, sal_uInt16 nType, sal_Int32 /*nHeight*/, sal_Int32 /*nWidth*/)
{
OSL_ENSURE( nModelPosition >= 0, "illegal position" );
- OSL_ENSURE( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(),
+ OSL_ENSURE( (nModelPosition + nLength) <= pTxtNode->GetTxt().getLength(),
"portion exceeds model string!" );
OSL_ENSURE( !bFinished, "We are already done!" );
@@ -166,7 +164,7 @@ void SwAccessiblePortionData::Special(
{
OUStringBuffer aTmpBuffer( rText.Len() + 1 );
aTmpBuffer.append( rText );
- aTmpBuffer.append( pTxtNode->GetTxt().GetChar(nModelPosition) );
+ aTmpBuffer.append( pTxtNode->GetTxt()[nModelPosition] );
sDisplay = aTmpBuffer.makeStringAndClear();
break;
}
@@ -216,7 +214,8 @@ void SwAccessiblePortionData::Skip(sal_uInt16 nLength)
{
OSL_ENSURE( !bFinished, "We are already done!" );
OSL_ENSURE( aModelPositions.empty(), "Never Skip() after portions" );
- OSL_ENSURE( nLength <= pTxtNode->GetTxt().Len(), "skip exceeds model string!" );
+ OSL_ENSURE( nLength <= pTxtNode->GetTxt().getLength(),
+ "skip exceeds model string!" );
nModelPosition += nLength;
}
@@ -532,7 +531,7 @@ void SwAccessiblePortionData::GetAttributeBoundary(
sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( sal_uInt16 nPos ) const
{
- OSL_ENSURE( nPos <= pTxtNode->GetTxt().Len(), "illegal position" );
+ OSL_ENSURE( nPos <= pTxtNode->GetTxt().getLength(), "illegal position" );
// find the portion number
// #i70538# - consider "empty" model portions - e.g. number portion
@@ -602,8 +601,7 @@ sal_uInt16 SwAccessiblePortionData::FillSpecialPos(
// if we have anything except plain text, compute nExtend + nRefPos
if( (nModelEndPos - nModelPos == 1) &&
- (pTxtNode->GetTxt().GetChar(static_cast<sal_uInt16>(nModelPos)) !=
- sAccessibleString.getStr()[nPos]) )
+ (pTxtNode->GetTxt()[nModelPos] != sAccessibleString.getStr()[nPos]))
{
// case 1: a one-character, non-text portion
// reference position is the first accessibilty for our
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 7e84482..0cb1562 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -70,10 +70,11 @@ namespace
SwTxtNode const*const pStartTxtNode =
rStart.nNode.GetNode().GetTxtNode();
SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
- const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex());
+ const sal_Unicode ch_start =
+ pStartTxtNode->GetTxt()[rStart.nContent.GetIndex()];
xub_StrLen nEndPos = ( rEnd == rStart || rEnd.nContent.GetIndex() == 0 ) ?
rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1;
- const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar( nEndPos );
+ const sal_Unicode ch_end = pEndTxtNode->GetTxt()[nEndPos];
SwPaM aStartPaM(rStart);
SwPaM aEndPaM(rEnd);
io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
@@ -100,10 +101,11 @@ namespace
SwTxtNode const*const pStartTxtNode =
rStart.nNode.GetNode().GetTxtNode();
SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
- const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex());
+ const sal_Unicode ch_start =
+ pStartTxtNode->GetTxt()[rStart.nContent.GetIndex()];
xub_StrLen nEndPos = ( rEnd == rStart || rEnd.nContent.GetIndex() == 0 ) ?
rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1;
- const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar( nEndPos );
+ const sal_Unicode ch_end = pEndTxtNode->GetTxt()[nEndPos];
SwPaM aStartPaM(rStart);
SwPaM aEndPaM(rEnd);
io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index e8048b2..5c8e955 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2151,7 +2151,7 @@ String SwCrsrShell::GetText() const
{
SwTxtNode* pTxtNd = pCurCrsr->GetNode()->GetTxtNode();
if( pTxtNd )
- aTxt = pTxtNd->GetTxt().Copy(
+ aTxt = pTxtNd->GetTxt().copy(
pCurCrsr->GetPoint()->nContent.GetIndex() );
}
return aTxt;
@@ -2174,11 +2174,11 @@ sal_Unicode SwCrsrShell::GetChar( sal_Bool bEnd, long nOffset )
return 0;
xub_StrLen nPos = pPos->nContent.GetIndex();
- const String& rStr = pTxtNd->GetTxt();
+ const OUString& rStr = pTxtNd->GetTxt();
sal_Unicode cCh = 0;
- if( ((nPos+nOffset) >= 0 ) && (nPos+nOffset) < rStr.Len() )
- cCh = rStr.GetChar( static_cast<xub_StrLen>(nPos+nOffset) );
+ if (((nPos+nOffset) >= 0 ) && (nPos+nOffset) < rStr.getLength())
+ cCh = rStr[nPos + nOffset];
return cCh;
}
@@ -2200,7 +2200,7 @@ sal_Bool SwCrsrShell::ExtendSelection( sal_Bool bEnd, xub_StrLen nCount )
xub_StrLen nPos = pPos->nContent.GetIndex();
if( bEnd )
{
- if( ( nPos + nCount ) <= pTxtNd->GetTxt().Len() )
+ if ((nPos + nCount) <= pTxtNd->GetTxt().getLength())
nPos = nPos + nCount;
else
return sal_False; // not possible
@@ -3318,7 +3318,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
lcl_FillTextRange( rRange, *pNode, nBegin, nLen );
// get smarttag word
- String aText( pNode->GetTxt().Copy( nBegin, nLen ) );
+ String aText( pNode->GetTxt().copy(nBegin, nLen) );
//save the start and end positons of the line and the starting point
Push();
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index b464f96..a14c928 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -240,7 +240,7 @@ void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam )
nNdStt = rPam.GetPoint()->nContent.GetIndex();
nNdEnd = rPam.GetPoint()->nNode == rPam.GetMark()->nNode
? rPam.GetMark()->nContent.GetIndex()
- : rTxtNd.GetTxt().Len();
+ : rTxtNd.GetTxt().getLength();
}
else
{
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index c1231f9..e813998 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -59,7 +59,7 @@ static String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart, xub_StrLen
const SwpHints *pHts = rNd.GetpSwpHints();
sal_uInt16 n = 0;
- xub_StrLen nSoftHyphen = nStart;
+ sal_Int32 nSoftHyphen = nStart;
xub_StrLen nHintStart = STRING_LEN;
bool bNewHint = true;
bool bNewSoftHyphen = true;
@@ -74,9 +74,11 @@ static String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart, xub_StrLen
STRING_LEN;
if ( bNewSoftHyphen )
- nSoftHyphen = bRemoveSoftHyphen ?
- rNd.GetTxt().Search( CHAR_SOFTHYPHEN, nSoftHyphen ) :
- STRING_LEN;
+ {
+ nSoftHyphen = (bRemoveSoftHyphen)
+ ? rNd.GetTxt().indexOf(CHAR_SOFTHYPHEN, nSoftHyphen)
+ : -1;
+ }
bNewHint = false;
bNewSoftHyphen = false;
@@ -84,19 +86,21 @@ static String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart, xub_StrLen
xub_StrLen nStt = 0;
// Check if next stop is a hint.
- if ( STRING_LEN != nHintStart && nHintStart < nSoftHyphen && nHintStart < nEnd )
+ if ( STRING_LEN != nHintStart
+ && (-1 == nSoftHyphen || nHintStart < nSoftHyphen)
+ && nHintStart < nEnd )
{
nStt = nHintStart;
bNewHint = true;
}
// Check if next stop is a soft hyphen.
- else if ( STRING_LEN != nSoftHyphen && nSoftHyphen < nHintStart && nSoftHyphen < nEnd )
+ else if (-1 != nSoftHyphen && nSoftHyphen < nHintStart && nSoftHyphen < nEnd)
{
nStt = nSoftHyphen;
bNewSoftHyphen = true;
}
// If nSoftHyphen == nHintStart, the current hint *must* be a hint with an end.
- else if ( STRING_LEN != nSoftHyphen && nSoftHyphen == nHintStart )
+ else if (-1 != nSoftHyphen && nSoftHyphen == nHintStart)
{
nStt = nSoftHyphen;
bNewHint = true;
@@ -258,7 +262,7 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes
{
if( pNode->IsTxtNode() )
{
- nTxtLen = ((SwTxtNode*)pNode)->GetTxt().Len();
+ nTxtLen = static_cast<SwTxtNode*>(pNode)->GetTxt().getLength();
if( rNdIdx == pPam->GetMark()->nNode )
nEnd = pPam->GetMark()->nContent.GetIndex();
else
@@ -668,7 +672,8 @@ String *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam )
}
xub_StrLen nEnd = aStr.Len();
bool bDeleteLastX = false;
- if( pPam->End()->nContent < (static_cast<const SwTxtNode*>(pTxtNode))->GetTxt().Len() )
+ if (pPam->End()->nContent <
+ static_cast<const SwTxtNode*>(pTxtNode)->GetTxt().getLength())
{
aStr.Insert( sX );
bDeleteLastX = true;
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 4e7f342..8bb731a 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1227,7 +1227,7 @@ sal_Bool SwCursor::GoStartWordWT( sal_Int16 nWordType )
nWordType,
sal_False ).startPos;
- if( nPtPos < pTxtNd->GetTxt().Len() )
+ if (nPtPos < pTxtNd->GetTxt().getLength())
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
@@ -1251,7 +1251,7 @@ sal_Bool SwCursor::GoEndWordWT( sal_Int16 nWordType )
nWordType,
sal_True ).endPos;
- if( nPtPos <= pTxtNd->GetTxt().Len() &&
+ if (nPtPos <= pTxtNd->GetTxt().getLength() &&
GetPoint()->nContent.GetIndex() != nPtPos )
{
GetPoint()->nContent = nPtPos;
@@ -1276,7 +1276,7 @@ sal_Bool SwCursor::GoNextWordWT( sal_Int16 nWordType )
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
nWordType ).startPos;
- if( nPtPos < pTxtNd->GetTxt().Len() )
+ if (nPtPos < pTxtNd->GetTxt().getLength())
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
@@ -1303,7 +1303,7 @@ sal_Bool SwCursor::GoPrevWordWT( sal_Int16 nWordType )
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos, 1 ) ),
nWordType ).startPos;
- if( nPtPos < pTxtNd->GetTxt().Len() )
+ if (nPtPos < pTxtNd->GetTxt().getLength())
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
@@ -1469,7 +1469,7 @@ sal_Bool SwCursor::GoSentence( SentenceMoveType eMoveType )
// it is allowed to place the PaM just behind the last
// character in the text thus <= ...Len
- if( nPtPos <= pTxtNd->GetTxt().Len() )
+ if (nPtPos <= pTxtNd->GetTxt().getLength())
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
@@ -1507,12 +1507,12 @@ sal_Bool SwCursor::ExpandToSentenceBorders()
// it is allowed to place the PaM just behind the last
// character in the text thus <= ...Len
bool bChanged = false;
- if (nStartPos <= pStartNd->GetTxt().Len())
+ if (nStartPos <= pStartNd->GetTxt().getLength())
{
GetMark()->nContent = nStartPos;
bChanged = true;
}
- if (nEndPos <= pEndNd->GetTxt().Len())
+ if (nEndPos <= pEndNd->GetTxt().getLength())
{
GetPoint()->nContent = nEndPos;
bChanged = true;
@@ -1723,7 +1723,8 @@ void SwCursor::DoSetBidiLevelUpDown()
SwIndex& rIdx = GetPoint()->nContent;
xub_StrLen nPos = rIdx.GetIndex();
- if( nPos && nPos < ((SwTxtNode&)rNode).GetTxt().Len() )
+ if (nPos && nPos <
+ static_cast<SwTxtNode&>(rNode).GetTxt().getLength())
{
const sal_uInt8 nCurrLevel = pSI->DirType( nPos );
const sal_uInt8 nPrevLevel = pSI->DirType( nPos - 1 );
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 8aec980..2298540 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -567,7 +567,7 @@ static String lcl_dbg_out(const SwNode & rNode)
const SfxItemSet * pAttrSet = pTxtNode->GetpSwAttrSet();
aTmpStr += String("<txt>", RTL_TEXTENCODING_ASCII_US);
- aTmpStr += pTxtNode->GetTxt().Copy(0, 10);
+ aTmpStr += pTxtNode->GetTxt().copy(0, 10);
aTmpStr += String("</txt>", RTL_TEXTENCODING_ASCII_US);
if (rNode.IsTableNode())
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 7c6379a..66bd4e9 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1698,7 +1698,7 @@ bool SwDoc::IncrementalDocStatCalculate( long nTextNodes )
case ND_TEXTNODE:
{
SwTxtNode *pTxt = static_cast< SwTxtNode * >( pNd );
- if( pTxt->CountWords( *mpDocStat, 0, pTxt->GetTxt().Len() ) )
+ if (pTxt->CountWords(*mpDocStat, 0, pTxt->GetTxt().getLength()))
nTextNodes--;
break;
}
@@ -2124,7 +2124,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, bool bIm
GetNodes()[ nIndex + nEndOfs ]->IsTxtNode() )
{
SwTxtNode* pTxtNode = (SwTxtNode*)GetNodes()[ nIndex+nEndOfs ];
- if( pTxtNode->GetTxt().Len() && nWish )
+ if (pTxtNode->GetTxt().getLength() && nWish)
--nWish;
bKeep = pTxtNode->GetSwAttrSet().GetKeep().GetValue();
++nEndOfs;
@@ -2189,7 +2189,7 @@ bool SwDoc::RemoveInvisibleContent()
&pTxtNd->GetNodes() == &GetNodes() )
{
bRet = true;
- SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
+ SwPaM aPam(*pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().getLength());
// Remove hidden paragraph or delete contents:
// Delete contents if
@@ -2220,7 +2220,7 @@ bool SwDoc::RemoveInvisibleContent()
if ( pTxtNd )
{
bool bRemoved = false;
- SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
+ SwPaM aPam(*pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().getLength());
if ( pTxtNd->HasHiddenCharAttribute( true ) )
{
bRemoved = sal_True;
@@ -2361,7 +2361,7 @@ bool SwDoc::HasInvisibleContent() const
SwTxtNode* pTxtNd = GetNodes()[ --n ]->GetTxtNode();
if ( pTxtNd )
{
- SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
+ SwPaM aPam(*pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().getLength());
if( pTxtNd->HasHiddenCharAttribute( true ) || ( pTxtNd->HasHiddenCharAttribute( false ) ) )
{
bRet = true;
@@ -2636,7 +2636,7 @@ String SwDoc::GetPaMDescr(const SwPaM & rPam) const
aResult += String(SW_RES(STR_START_QUOTE));
aResult += ShortenString(pTxtNode->GetTxt().
- Copy(nStart, nEnd - nStart),
+ copy(nStart, nEnd - nStart),
nUndoStringLength,
String(SW_RES(STR_LDOTS)));
aResult += String(SW_RES(STR_END_QUOTE));
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 8d19f54..8dc5406 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -244,8 +244,8 @@ public:
}
virtual bool Compare( int nIdx1, int nIdx2 ) const;
- virtual int GetLen1() const { return pTxtNd1->GetTxt().Len(); }
- virtual int GetLen2() const { return pTxtNd2->GetTxt().Len(); }
+ virtual int GetLen1() const { return pTxtNd1->GetTxt().getLength(); }
+ virtual int GetLen2() const { return pTxtNd2->GetTxt().getLength(); }
};
// Options set in Tools->Options->Writer->Comparison
@@ -1281,8 +1281,8 @@ bool SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
int nLcsLen = 0;
- int nDstLen = rDstNd.GetTxt().Len();
- int nSrcLen = rSrcNd.GetTxt().Len();
+ int nDstLen = rDstNd.GetTxt().getLength();
+ int nSrcLen = rSrcNd.GetTxt().getLength();
int nMinLen = std::min( nDstLen , nSrcLen );
int nAvgLen = ( nDstLen + nSrcLen )/2;
@@ -2146,13 +2146,13 @@ bool LineArrayComparator::Compare( int nIdx1, int nIdx2 ) const
}
for( i = 0; i < nBorderLen; i++ )
{
- nHash = nHash*nMul + pTxtNd1->GetTxt().GetChar( i );
+ nHash = nHash*nMul + pTxtNd1->GetTxt()[i];
}
aHashes.insert( nHash );
for( ; i < nPar1Len; i++ )
{
- nHash = nHash - nPow*pTxtNd1->GetTxt().GetChar( i - nBorderLen );
- nHash = nHash*nMul + pTxtNd1->GetTxt().GetChar( i );
+ nHash = nHash - nPow*pTxtNd1->GetTxt()[ i - nBorderLen ];
+ nHash = nHash*nMul + pTxtNd1->GetTxt()[ i ];
aHashes.insert( nHash );
}
@@ -2160,7 +2160,7 @@ bool LineArrayComparator::Compare( int nIdx1, int nIdx2 ) const
nHash = 0;
for( i = 0; i < nBorderLen; i++ )
{
- nHash = nHash*nMul + pTxtNd2->GetTxt().GetChar( i );
+ nHash = nHash*nMul + pTxtNd2->GetTxt()[ i ];
}
if( aHashes.find( nHash ) != aHashes.end() )
@@ -2170,8 +2170,8 @@ bool LineArrayComparator::Compare( int nIdx1, int nIdx2 ) const
for( ; i < nPar2Len; i++ )
{
- nHash = nHash - nPow*pTxtNd2->GetTxt().GetChar( i - nBorderLen );
- nHash = nHash*nMul + pTxtNd2->GetTxt().GetChar( i );
+ nHash = nHash - nPow*pTxtNd2->GetTxt()[ i - nBorderLen ];
+ nHash = nHash*nMul + pTxtNd2->GetTxt()[ i ];
if( aHashes.find( nHash ) != aHashes.end() )
{
return true;
@@ -2190,16 +2190,15 @@ bool CharArrayComparator::Compare( int nIdx1, int nIdx2 ) const
return ( !CmpOptions.bUseRsid
|| pTxtNd1->CompareRsid( *pTxtNd2, nIdx1 + 1, nIdx2 + 1 ) )
- && pTxtNd1->GetTxt().GetChar( nIdx1 )
- == pTxtNd2->GetTxt().GetChar( nIdx2 );
+ && pTxtNd1->GetTxt()[ nIdx1 ] == pTxtNd2->GetTxt()[ nIdx2 ];
}
WordArrayComparator::WordArrayComparator( const SwTxtNode *pNode1,
const SwTxtNode *pNode2 )
: pTxtNd1( pNode1 ), pTxtNd2( pNode2 )
{
- pPos1 = new int[ pTxtNd1->GetTxt().Len() + 1 ];
- pPos2 = new int[ pTxtNd2->GetTxt().Len() + 1 ];
+ pPos1 = new int[ pTxtNd1->GetTxt().getLength() + 1 ];
+ pPos2 = new int[ pTxtNd2->GetTxt().getLength() + 1 ];
CalcPositions( pPos1, pTxtNd1, nCnt1 );
CalcPositions( pPos2, pTxtNd2, nCnt2 );
@@ -2220,8 +2219,8 @@ bool WordArrayComparator::Compare( int nIdx1, int nIdx2 ) const
}
for( int i = 0; i < nLen; i++)
{
- if( pTxtNd1->GetTxt().GetChar( pPos1[ nIdx1 ] + i )
- != pTxtNd2->GetTxt().GetChar( pPos2[ nIdx2 ] + i )
+ if( pTxtNd1->GetTxt()[ pPos1[ nIdx1 ] + i ]
+ != pTxtNd2->GetTxt()[ pPos2[ nIdx2 ] + i ]
|| ( CmpOptions.bUseRsid && !pTxtNd1->CompareRsid( *pTxtNd2,
pPos1[ nIdx1 ] + i, pPos2[ nIdx2 ] + i ) ) )
{
@@ -2248,8 +2247,8 @@ int WordArrayComparator::GetCharSequence( const int *pWordLcs1,
pSubseq1[ nLen ] = pPos1[ pWordLcs1[i] ] + j;
pSubseq2[ nLen ] = pPos2[ pWordLcs2[i] ] + j;
- if( pTxtNd1->GetTxt().GetChar( pPos1[ pWordLcs1[i] ] + j )
- != pTxtNd2->GetTxt().GetChar( pPos2[ pWordLcs2[i] ] + j ) )
+ if( pTxtNd1->GetTxt()[ pPos1[ pWordLcs1[i] ] + j ]
+ != pTxtNd2->GetTxt()[ pPos2[ pWordLcs2[i] ] + j ] )
{
nLen -= j;
break;
@@ -2265,11 +2264,11 @@ void WordArrayComparator::CalcPositions( int *pPos, const SwTxtNode *pTxtNd,
int &nCnt )
{
nCnt = -1;
- for( int i = 0; i <= pTxtNd->GetTxt().Len(); i++ )
+ for (int i = 0; i <= pTxtNd->GetTxt().getLength(); ++i)
{
- if( i == 0 || i == pTxtNd->GetTxt().Len()
- || !isalnum( pTxtNd->GetTxt().GetChar( i - 1 ) )
- || !isalnum( pTxtNd->GetTxt().GetChar( i ) ) )
+ if (i == 0 || i == pTxtNd->GetTxt().getLength()
+ || !isalnum( pTxtNd->GetTxt()[ i - 1 ])
+ || !isalnum( pTxtNd->GetTxt()[ i ]))
{ // Begin new word
nCnt++;
pPos[ nCnt ] = i;
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 1da5be9..04274fc 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -130,7 +130,7 @@ typedef boost::ptr_vector< _SaveRedline > _SaveRedlines;
static bool lcl_MayOverwrite( const SwTxtNode *pNode, const xub_StrLen nPos )
{
- sal_Unicode cChr = pNode->GetTxt().GetChar( nPos );
+ sal_Unicode const cChr = pNode->GetTxt()[nPos];
switch (cChr)
{
case CH_TXTATR_BREAKWORD:
@@ -152,7 +152,8 @@ static void lcl_SkipAttr( const SwTxtNode *pNode, SwIndex &rIdx, xub_StrLen &rSt
// skip all special attributes
do {
++rIdx;
- } while( (rStart = rIdx.GetIndex()) < pNode->GetTxt().Len()
+ rStart = rIdx.GetIndex();
+ } while (rStart < pNode->GetTxt().getLength()
&& !lcl_MayOverwrite(pNode, rStart) );
}
}
@@ -717,9 +718,9 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
SwTxtNode *pNode = rPt.nNode.GetNode().GetTxtNode();
if (!pNode || ( static_cast<size_t>(rStr.Len()) // worst case: no erase
- + static_cast<size_t>(pNode->GetTxt().Len()) > TXTNODE_MAX))
+ + static_cast<size_t>(pNode->GetTxt().getLength()) > TXTNODE_MAX))
{
- return sal_False;
+ return false;
}
if (GetIDocumentUndoRedo().DoesUndo())
@@ -740,7 +741,7 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
{
// start behind the characters (to fix the attributes!)
nStart = rIdx.GetIndex();
- if ( nStart < pNode->GetTxt().Len() )
+ if (nStart < pNode->GetTxt().getLength())
{
lcl_SkipAttr( pNode, rIdx, nStart );
}
@@ -768,7 +769,7 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
else
{
// start behind the characters (to fix the attributes!)
- if( nStart < pNode->GetTxt().Len() )
+ if (nStart < pNode->GetTxt().getLength())
++rIdx;
pNode->InsertText( rtl::OUString(c), rIdx, INS_EMPTYEXPAND );
if( nStart+1 < rIdx.GetIndex() )
@@ -824,8 +825,8 @@ bool SwDoc::MoveAndJoin( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
if( pTxtNd && pTxtNd->CanJoinNext( &aNxtIdx ) )
{
{ // Block so SwIndex into node is deleted before Join
- CorrRel( aNxtIdx, SwPosition( aIdx, SwIndex( pTxtNd,
- pTxtNd->GetTxt().Len() ) ), 0, sal_True );
+ CorrRel( aNxtIdx, SwPosition( aIdx, SwIndex(pTxtNd,
+ pTxtNd->GetTxt().getLength()) ), 0, sal_True );
}
pTxtNd->JoinNext();
}
@@ -1236,7 +1237,7 @@ static bool lcl_StrLenOverFlow( const SwPaM& rPam )
if( (0 != pEndNd) && pStt->nNode.GetNode().IsTxtNode() )
{
sal_uInt64 nSum = pStt->nContent.GetIndex() +
- pEndNd->GetTxt().Len() - pEnd->nContent.GetIndex();
+ pEndNd->GetTxt().getLength() - pEnd->nContent.GetIndex();
if( nSum > STRING_LEN )
bRet = true;
}
@@ -1260,13 +1261,13 @@ void sw_GetJoinFlags( SwPaM& rPam, sal_Bool& rJoinTxt, sal_Bool& rJoinPrev )
{
bool bExchange = pStt == rPam.GetPoint();
if( !pStt->nContent.GetIndex() &&
- pEndNd->GetTxt().Len() != pEnd->nContent.GetIndex() )
+ pEndNd->GetTxt().getLength() != pEnd->nContent.GetIndex())
bExchange = !bExchange;
if( bExchange )
rPam.Exchange();
rJoinPrev = rPam.GetPoint() == pStt;
OSL_ENSURE( !pStt->nContent.GetIndex() &&
- pEndNd->GetTxt().Len() != pEnd->nContent.GetIndex()
+ pEndNd->GetTxt().getLength() != pEnd->nContent.GetIndex()
? rPam.GetPoint()->nNode < rPam.GetMark()->nNode
: rPam.GetPoint()->nNode > rPam.GetMark()->nNode,
"sw_GetJoinFlags");
@@ -1416,7 +1417,7 @@ lcl_CalcBreaks( ::std::vector<xub_StrLen> & rBreaks, SwPaM const & rPam )
for (xub_StrLen i = nStart; i < nEnd; ++i)
{
- const sal_Unicode c(pTxtNode->GetTxt().GetChar(i));
+ const sal_Unicode c(pTxtNode->GetTxt()[i]);
if ((CH_TXTATR_INWORD == c) || (CH_TXTATR_BREAKWORD == c))
{
SwTxtAttr const * const pAttr( pTxtNode->GetTxtAttrForCharAt(i) );
@@ -1618,7 +1619,7 @@ bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam)
SwTxtNode* pTxtNd = rPam.Start()->nNode.GetNode().GetTxtNode();
xub_StrLen nIndex = rPam.Start()->nContent.GetIndex();
// We may have a postit here.
- if (pTxtNd->GetTxt().GetChar(nIndex) == CH_TXTATR_INWORD)
+ if (pTxtNd->GetTxt()[nIndex] == CH_TXTATR_INWORD)
{
SwTxtAttr* pTxtAttr = pTxtNd->GetTxtAttrForCharAt(nIndex, RES_TXTATR_FIELD);
if (pTxtAttr && pTxtAttr->GetFld().GetFld()->Which() == RES_POSTITFLD)
@@ -1897,10 +1898,14 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
nBeginGrammarCheck = aCrsr.GetPoint()->nContent.GetIndex();
}
}
- nEndGrammarCheck = pSpellArgs->pEndNode == pNd ? pSpellArgs->pEndIdx->GetIndex() : ((SwTxtNode*)pNd)->GetTxt().Len();
+ nEndGrammarCheck = (pSpellArgs->pEndNode == pNd)
+ ? pSpellArgs->pEndIdx->GetIndex()
+ : static_cast<SwTxtNode const*>(pNd)
+ ->GetTxt().getLength();
}
- xub_StrLen nSpellErrorPosition = ((SwTxtNode*)pNd)->GetTxt().Len();
+ xub_StrLen nSpellErrorPosition =
+ static_cast<SwTxtNode const*>(pNd)->GetTxt().getLength();
if( (!pConvArgs &&
((SwTxtNode*)pNd)->Spell( pSpellArgs )) ||
( pConvArgs &&
@@ -2265,7 +2270,7 @@ bool SwDoc::ReplaceRangeImpl( SwPaM& rPam, const String& rStr,
SwTxtNode* pTxtNd = pStt->nNode.GetNode().GetTxtNode();
xub_StrLen nStt = pStt->nContent.GetIndex(),
nEnd = bOneNode ? pEnd->nContent.GetIndex()
- : pTxtNd->GetTxt().Len();
+ : pTxtNd->GetTxt().getLength();
SwDataChanged aTmp( aDelPam );
@@ -2411,13 +2416,13 @@ SetRedlineMode( eOld );
// Set the values again, if Frames or footnotes on the Text have been removed.
nStt = nPtCnt;
nEnd = bOneNode ? pEnd->nContent.GetIndex()
- : pTxtNd->GetTxt().Len();
+ : pTxtNd->GetTxt().getLength();
bool bFirst = true;
String sIns;
while ( lcl_GetTokenToParaBreak( sRepl, sIns, bRegExReplace ) )
{
- if( !bFirst || nStt == pTxtNd->GetTxt().Len() )
+ if (!bFirst || nStt == pTxtNd->GetTxt().getLength())
{
InsertString( aDelPam, sIns );
}
@@ -2431,7 +2436,7 @@ SetRedlineMode( eOld );
if( bFirst || sIns.Len() )
{
- if( !bFirst || nStt == pTxtNd->GetTxt().Len() )
+ if (!bFirst || nStt == pTxtNd->GetTxt().getLength())
{
InsertString( aDelPam, sIns );
}
@@ -2657,13 +2662,18 @@ void SwDoc::TransliterateText(
{
++aIdx;
if( pTNd )
- pTNd->TransliterateText( rTrans, nSttCnt, pTNd->GetTxt().Len(), pUndo );
+ pTNd->TransliterateText(
+ rTrans, nSttCnt, pTNd->GetTxt().getLength(), pUndo);
}
for( ; aIdx.GetIndex() < nEndNd; ++aIdx )
{
- if( 0 != ( pTNd = aIdx.GetNode().GetTxtNode() ))
- pTNd->TransliterateText( rTrans, 0, pTNd->GetTxt().Len(), pUndo );
+ pTNd = aIdx.GetNode().GetTxtNode();
+ if (pTNd)
+ {
+ pTNd->TransliterateText(
+ rTrans, 0, pTNd->GetTxt().getLength(), pUndo);
+ }
}
if( nEndCnt && 0 != ( pTNd = pEnd->nNode.GetNode().GetTxtNode() ))
@@ -2733,12 +2743,12 @@ void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const
{
++aIdx;
if( pTNd )
- pTNd->CountWords( rStat, nSttCnt, pTNd->GetTxt().Len() );
+ pTNd->CountWords( rStat, nSttCnt, pTNd->GetTxt().getLength() );
}
for( ; aIdx.GetIndex() < nEndNd; ++aIdx )
if( 0 != ( pTNd = aIdx.GetNode().GetTxtNode() ))
- pTNd->CountWords( rStat, 0, pTNd->GetTxt().Len() );
+ pTNd->CountWords( rStat, 0, pTNd->GetTxt().getLength() );
if( nEndCnt && 0 != ( pTNd = pEnd->nNode.GetNode().GetTxtNode() ))
pTNd->CountWords( rStat, 0, nEndCnt );
@@ -2752,13 +2762,17 @@ void SwDoc::RemoveLeadingWhiteSpace(const SwPosition & rPos )
const SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode();
if ( pTNd )
{
- const String& rTxt = pTNd->GetTxt();
+ const OUString& rTxt = pTNd->GetTxt();
xub_StrLen nIdx = 0;
- sal_Unicode cCh;
- while( nIdx < rTxt.Len() &&
- ( '\t' == ( cCh = rTxt.GetChar( nIdx ) ) ||
- ( ' ' == cCh ) ) )
+ while (nIdx < rTxt.getLength())
+ {
+ sal_Unicode const cCh = rTxt[nIdx];
+ if (('\t' != cCh) && (' ' != cCh))
+ {
+ break;
+ }
++nIdx;
+ }
if ( nIdx > 0 )
{
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 15097ad..729dff7 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -874,8 +874,10 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
const sal_uLong nFlySttNd = pCntIdx->GetIndex();
if( 2 != ( pCntIdx->GetNode().EndOfSectionIndex() - nFlySttNd ) ||
- pTxtNd->GetTxt().Len() )
+ pTxtNd->GetTxt().getLength() )
+ {
return SW_CHAIN_NOT_EMPTY;
+ }
sal_uInt16 nArrLen = GetSpzFrmFmts()->size();
for( sal_uInt16 n = 0; n < nArrLen; ++n )
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 21f1bc7..6355ec2 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -785,7 +785,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
SwTxtNode* pTxtNd = static_cast<SwTxtNode*>(pNode);
const SwIndex& rSt = pStt->nContent;
sal_uInt16 nMkPos, nPtPos = rSt.GetIndex();
- const String& rStr = pTxtNd->GetTxt();
+ const OUString& rStr = pTxtNd->GetTxt();
// Special case: if the Crsr is located within a URL attribute, we take over it's area
SwTxtAttr const*const pURLAttr(
@@ -819,7 +819,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
// These attributes are inserted as FormatAttributes and
// never override the TextAttributes!
if( !(nFlags & nsSetAttrMode::SETATTR_DONTREPLACE ) &&
- pTxtNd->HasHints() && !nMkPos && nPtPos == rStr.Len() )
+ pTxtNd->HasHints() && !nMkPos && nPtPos == rStr.getLength())
{
SwIndex aSt( pTxtNd );
if( pHistory )
@@ -985,7 +985,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if( pSwpHints )
pSwpHints->Register( &aRegH );
- pTNd->SetAttr( *pCharSet, 0, pTNd->GetTxt().Len(), nFlags );
+ pTNd->SetAttr(*pCharSet, 0, pTNd->GetTxt().getLength(), nFlags);
if( pSwpHints )
pSwpHints->DeRegister();
}
@@ -995,7 +995,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
else
{
if( pTNd && pCharSet && pCharSet->Count() )
- pTNd->SetAttr( *pCharSet, 0, pTNd->GetTxt().Len(), nFlags );
+ pTNd->SetAttr(*pCharSet, 0, pTNd->GetTxt().getLength(), nFlags);
if( pOtherSet && pOtherSet->Count() )
pNode->SetAttr( *pOtherSet );
}
@@ -2376,7 +2376,7 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
if( pSet && pTNd && pSet->Count() )
{
aPam.SetMark();
- aPam.GetMark()->nContent.Assign( pTNd, pTNd->GetTxt().Len() );
+ aPam.GetMark()->nContent.Assign(pTNd, pTNd->GetTxt().getLength());
InsertItemSet( aPam, *pSet, 0 );
}
}
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 9bd14f07..e69c47d 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -389,7 +389,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c
// set the link in the StartNode
SwFmtINetFmt aINet( sFileName , aEmptyStr );
SwTxtNode* pTNd = (SwTxtNode*)pStartNd;
- pTNd->InsertItem( aINet, 0, pTNd->GetTxt().Len() );
+ pTNd->InsertItem(aINet, 0, pTNd->GetTxt().getLength());
// If the link cannot be found anymore,
// it has to be a bug!
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 933b685..17ef88c 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -2892,7 +2892,7 @@ void SwRedlineExtraData_FmtColl::Reject( SwPaM& rPam ) const
SwTxtNode* pTNd = rMark.nNode.GetNode().GetTxtNode();
if( pTNd )
{
- rMark.nContent.Assign( pTNd, pTNd->GetTxt().Len() );
+ rMark.nContent.Assign(pTNd, pTNd->GetTxt().getLength());
if( pTNd->HasSwAttrSet() )
{
@@ -3263,7 +3263,9 @@ void SwRedline::InvalidateRange() // trigger the Layout
if( pNd->IsTxtNode() )
{
aHt.nStart = n == nSttNd ? nSttCnt : 0;
- aHt.nEnd = n == nEndNd ? nEndCnt : ((SwTxtNode*)pNd)->GetTxt().Len();
+ aHt.nEnd = (n == nEndNd)
+ ? nEndCnt
+ : static_cast<SwTxtNode*>(pNd)->GetTxt().getLength();
((SwTxtNode*)pNd)->ModifyNotification( &aHt, &aHt );
}
}
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 25f83ff8..25b11ee 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -188,8 +188,8 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
// Point must be the startposition, Mark is optional the end position
SwPosition* pPos = rPam.GetPoint();
const SwTxtNode* pTNd = pPos->nNode.GetNode().GetTxtNode();
- const String* pTxt = &pTNd->GetTxt();
- xub_StrLen nStart = pPos->nContent.GetIndex(), nEnd = pTxt->Len();
+ OUString const& rTxt = pTNd->GetTxt();
+ xub_StrLen nStart = pPos->nContent.GetIndex(), nEnd = rTxt.getLength();
sal_Bool bHasMark = rPam.HasMark();
if( bHasMark )
@@ -234,7 +234,7 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
{
// skip to the word begin!
long nWordStt = pBreakIt->GetBreakIter()->getWordBoundary(
- *pTxt, nStart,
+ rTxt, nStart,
pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
sal_True ).startPos;
@@ -264,7 +264,7 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
break;
}
- sal_Int32 nChType = rCC.getType( *pTxt, nStart );
+ sal_Int32 nChType = rCC.getType(rTxt, nStart);
bool bIgnoreChar = false, bIsAlphaNum = false, bChkNxtWrd = false;
switch( nChType )
{
@@ -305,7 +305,7 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
{
// search the end of this word
nWordEnd = pBreakIt->GetBreakIter()->getWordBoundary(
- *pTxt, nStart,
+ rTxt, nStart,
pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
sal_True ).endPos;
@@ -318,7 +318,7 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
}
nStart = rPam.GetMark()->nContent.GetIndex();
- rEntry.SetText( pTxt->Copy( nStart,
+ rEntry.SetText( rTxt.copy( nStart,
rPam.GetPoint()->nContent.GetIndex() - nStart ));
return rPam.HasMark();
}
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index cbe89a4..6615362 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1149,7 +1149,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
//
// If selected use marks from the same chapter only
if( pTOXSrc->GetNodes().IsDocNodes() &&
- pTOXSrc->GetTxt().Len() && pTOXSrc->GetDepends() &&
+ pTOXSrc->GetTxt().getLength() && pTOXSrc->GetDepends() &&
pTOXSrc->getLayoutFrm( pDoc->GetCurrentLayout() ) &&
(!IsFromChapter() || ::lcl_FindChapterNode( *pTOXSrc, 0 ) == pOwnChapterNode ) &&
!pTOXSrc->HasHiddenParaField() &&
@@ -1249,7 +1249,8 @@ void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode )
{
::SetProgressState( 0, pDoc->GetDocShell() );
- if( pTxtNd->GetTxt().Len() && pTxtNd->getLayoutFrm( pDoc->GetCurrentLayout() ) &&
+ if (pTxtNd->GetTxt().getLength() &&
+ pTxtNd->getLayoutFrm(pDoc->GetCurrentLayout()) &&
pTxtNd->GetNodes().IsDocNodes() &&
( !IsFromChapter() || pOwnChapterNode ==
::lcl_FindChapterNode( *pTxtNd, 0 ) ) )
@@ -1281,7 +1282,8 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode )
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
::SetProgressState( 0, pDoc->GetDocShell() );
- if( rTxtNode.GetTxt().Len() && rTxtNode.getLayoutFrm( pDoc->GetCurrentLayout() ) &&
+ if (rTxtNode.GetTxt().getLength() &&
+ rTxtNode.getLayoutFrm(pDoc->GetCurrentLayout()) &&
rTxtNode.GetNodes().IsDocNodes() &&
( !IsFromChapter() ||
::lcl_FindChapterNode( rTxtNode, 0 ) == pOwnChapterNode ) )
@@ -1319,7 +1321,8 @@ void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl )
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
::SetProgressState( 0, pDoc->GetDocShell() );
- if( rTxtNode.GetTxt().Len() && rTxtNode.getLayoutFrm( pDoc->GetCurrentLayout() ) &&
+ if (rTxtNode.GetTxt().getLength() &&
+ rTxtNode.getLayoutFrm(pDoc->GetCurrentLayout()) &&
rTxtNode.GetNodes().IsDocNodes() )
{
//#106485# the body node has to be used!
@@ -1976,16 +1979,16 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
rtl::OUString sSrchStr = rtl::OUStringBuffer().append(cNumRepl).
append(sPageDeli).append(cNumRepl).makeStringAndClear();
- xub_StrLen nStartPos = pNd->GetTxt().Search( sSrchStr );
+ sal_Int32 nStartPos = pNd->GetTxt().indexOf(sSrchStr);
sSrchStr = rtl::OUStringBuffer().append(cNumRepl).
append(cEndPageNum).makeStringAndClear();
- xub_StrLen nEndPos = pNd->GetTxt().Search( sSrchStr );
+ sal_Int32 nEndPos = pNd->GetTxt().indexOf(sSrchStr);
sal_uInt16 i;
- if( STRING_NOTFOUND == nEndPos || rNums.empty() )
+ if (-1 == nEndPos || rNums.empty())
return;
- if( STRING_NOTFOUND == nStartPos || nStartPos > nEndPos)
+ if (-1 == nStartPos || nStartPos > nEndPos)
nStartPos = nEndPos;
sal_uInt16 nOld = rNums[0],
@@ -2119,7 +2122,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
pCharFmt = pDoc->MakeCharFmt(GetMainEntryCharStyle(), 0);
// find the page numbers in aNumStr and set the character style
- xub_StrLen nOffset = pNd->GetTxt().Len() - aNumStr.Len();
+ xub_StrLen nOffset = pNd->GetTxt().getLength() - aNumStr.Len();
SwFmtCharFmt aCharFmt(pCharFmt);
for(sal_uInt16 j = 0; j < pCharStyleIdx->size(); j += 2)
{
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index 9d3c63a..626f8d6 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -85,7 +85,7 @@ SwExtTextInput::~SwExtTextInput()
}
}
rIdx = nSttCnt;
- String sTxt( pTNd->GetTxt().Copy( nSttCnt, nEndCnt - nSttCnt ));
+ String sTxt( pTNd->GetTxt().copy(nSttCnt, nEndCnt - nSttCnt));
if( bIsOverwriteCursor && sOverwriteText.Len() )
{
xub_StrLen nLen = sTxt.Len();
@@ -211,7 +211,7 @@ void SwExtTextInput::SetOverwriteCursor( sal_Bool bFlag )
{
xub_StrLen nSttCnt = GetPoint()->nContent.GetIndex(),
nEndCnt = GetMark()->nContent.GetIndex();
- sOverwriteText = pTNd->GetTxt().Copy( nEndCnt < nSttCnt ? nEndCnt
+ sOverwriteText = pTNd->GetTxt().copy( nEndCnt < nSttCnt ? nEndCnt
: nSttCnt );
if( sOverwriteText.Len() )
{
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index af32fe5..2eeea7a 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -277,7 +277,7 @@ SwCntntNode* SwTxtNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
// Is that enough? What about PostIts/Fields/FieldTypes?
// #i96213# - force copy of all attributes
pCpyTxtNd->CopyText( pTxtNd, SwIndex( pCpyTxtNd ),
- pCpyTxtNd->GetTxt().Len(), true );
+ pCpyTxtNd->GetTxt().getLength(), true );
if( RES_CONDTXTFMTCOLL == pColl->Which() )
pTxtNd->ChkCondColl();
@@ -903,7 +903,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
SwTxtNode* pEndTxtNd = pEnd->nNode.GetNode().GetTxtNode();
SwTxtNode* pDestTxtNd = aInsPos.GetNode().GetTxtNode();
bool bCopyCollFmt = !pDoc->IsInsOnlyTextGlossary() &&
- ( ( pDestTxtNd && !pDestTxtNd->GetTxt().Len() ) ||
+ ( (pDestTxtNd && !pDestTxtNd->GetTxt().getLength()) ||
( !bOneNode && !rPos.nContent.GetIndex() ) );
bool bCopyBookmarks = true;
sal_Bool bStartIsTxtNode = 0 != pSttTxtNd;
@@ -932,7 +932,8 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// - destination is an empty paragraph which is not in a list and
// - source contains at least one paragraph which is not in a list
if ( pNumRuleToPropagate &&
- pDestTxtNd && !pDestTxtNd->GetTxt().Len() && !pDestTxtNd->IsInList() &&
+ pDestTxtNd && !pDestTxtNd->GetTxt().getLength() &&
+ !pDestTxtNd->IsInList() &&
!lcl_ContainsOnlyParagraphsInList( rPam ) )
{
pNumRuleToPropagate = 0;
@@ -976,7 +977,8 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
}
pDestTxtNd = pDoc->GetNodes()[ aInsPos.GetIndex()-1 ]->GetTxtNode();
- aDestIdx.Assign( pDestTxtNd, pDestTxtNd->GetTxt().Len() );
+ aDestIdx.Assign(
+ pDestTxtNd, pDestTxtNd->GetTxt().getLength());
// Correct the area again
if( bEndEqualIns )
@@ -1029,7 +1031,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
{
const xub_StrLen nCpyLen = ( (bOneNode)
? pEnd->nContent.GetIndex()
- : pSttTxtNd->GetTxt().Len() )
+ : pSttTxtNd->GetTxt().getLength())
- pStt->nContent.GetIndex();
pSttTxtNd->CopyText( pDestTxtNd, aDestIdx,
pStt->nContent, nCpyLen );
@@ -1170,7 +1172,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
}
}
- const bool bEmptyDestNd = 0 == pDestTxtNd->GetTxt().Len();
+ const bool bEmptyDestNd = pDestTxtNd->GetTxt().isEmpty();
pEndTxtNd->CopyText( pDestTxtNd, aDestIdx, SwIndex( pEndTxtNd ),
pEnd->nContent.GetIndex() );
@@ -1423,7 +1425,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
SwTxtNode* pTxtNode;
if( 0 != ( pTxtNode = pAPos->nNode.GetNode().GetTxtNode() ))
{
- bEmptyNode = !pTxtNode->GetTxt().Len();
+ bEmptyNode = pTxtNode->GetTxt().isEmpty();
if( bEmptyNode )
{
//last node information is only necessary to know for the last TextNode
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index cd1f735..12f8349 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -233,8 +233,8 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
{
SwTxtNode *const pTNd =
pEndPos->nNode.GetNode().GetTxtNode();
- if (pTNd &&
- (pTNd->GetTxt().Len() != pEndPos->nContent.GetIndex()))
+ if (pTNd && (pTNd->GetTxt().getLength()
+ != pEndPos->nContent.GetIndex()))
{
pUndoInsSect->SaveSplitNode( pTNd, sal_False );
}
@@ -278,7 +278,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
pEndPos->nNode--;
pTNd = pEndPos->nNode.GetNode().GetTxtNode();
}
- if( pTNd ) nCntnt = pTNd->GetTxt().Len(); else nCntnt = 0;
+ nCntnt = (pTNd) ? pTNd->GetTxt().getLength() : 0;
pEndPos->nContent.Assign( pTNd, nCntnt );
}
}
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index ec4a146..5f6dad9 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1025,10 +1025,10 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
SwTxtFrmInfo aFInfo( (SwTxtFrm*)pTxtNd->getLayoutFrm( pTxtNd->GetDoc()->GetCurrentLayout() ) );
if( aFInfo.IsOneLine() ) // only makes sense in this case
{
- const sal_Unicode* pTxt = pTxtNd->GetTxt().GetBuffer();
- for( xub_StrLen nChPos = 0; *pTxt; ++nChPos, ++pTxt )
+ OUString const& rTxt(pTxtNd->GetTxt());
+ for (sal_Int32 nChPos = 0; nChPos < rTxt.getLength(); ++nChPos)
{
- if( *pTxt == cCh )
+ if (rTxt[nChPos] == cCh)
{
aPosArr.push_back( static_cast<sal_uInt16>(
aFInfo.GetCharPos( nChPos+1, sal_False )) );
@@ -1055,13 +1055,14 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
SwPosition aCntPos( aSttIdx, SwIndex( pTxtNd ));
std::vector<sal_uLong> aBkmkArr;
- _SaveCntntIdx( pDoc, aSttIdx.GetIndex(), pTxtNd->GetTxt().Len(), aBkmkArr );
-
- const sal_Unicode* pTxt = pTxtNd->GetTxt().GetBuffer();
+ _SaveCntntIdx( pDoc, aSttIdx.GetIndex(), pTxtNd->GetTxt().getLength(),
+ aBkmkArr );
if( T2T_PARA != cCh )
- for( xub_StrLen nChPos = 0; *pTxt; ++nChPos, ++pTxt )
- if( *pTxt == cCh )
+ {
+ for (xub_StrLen nChPos = 0; nChPos < pTxtNd->GetTxt().getLength();)
+ {
+ if (pTxtNd->GetTxt()[nChPos] == cCh)
{
aCntPos.nContent = nChPos;
SwCntntNode* pNewNd = pTxtNd->SplitCntntNode( aCntPos );
@@ -1072,9 +1073,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
// Delete separator and correct search string
pTxtNd->EraseText( aCntPos.nContent, 1 );
- pTxt = pTxtNd->GetTxt().GetBuffer();
nChPos = 0;
- --nChPos, --pTxt; // for the ++ in the for loop !!!
// Set the TableNode as StartNode for all TextNodes in the Table
const SwNodeIndex aTmpIdx( aCntPos.nNode, -1 );
@@ -1087,11 +1086,17 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
pBox = new SwTableBox( pBoxFmt, *pSttNd, pLine );
pLine->GetTabBoxes().insert( pLine->GetTabBoxes().begin() + nBoxes++, pBox );
}
+ else
+ {
+ ++nChPos;
+ }
+ }
+ }
// Now for the last substring
if( !aBkmkArr.empty() )
- _RestoreCntntIdx( aBkmkArr, *pTxtNd, pTxtNd->GetTxt().Len(),
- pTxtNd->GetTxt().Len()+1 );
+ _RestoreCntntIdx( aBkmkArr, *pTxtNd, pTxtNd->GetTxt().getLength(),
+ pTxtNd->GetTxt().getLength()+1 );
pSttNd = new SwStartNode( aCntPos.nNode, ND_STARTNODE, SwTableBoxStartNode );
const SwNodeIndex aTmpIdx( aCntPos.nNode, 1 );
@@ -1516,7 +1521,8 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara )
if( pDelPara->pLastNd == &aDelRg.aStart.GetNode() )
{
// Inserting the separator
- SwIndex aCntIdx( pDelPara->pLastNd, pDelPara->pLastNd->GetTxt().Len());
+ SwIndex aCntIdx( pDelPara->pLastNd,
+ pDelPara->pLastNd->GetTxt().getLength());
pDelPara->pLastNd->InsertText( rtl::OUString(pDelPara->cCh), aCntIdx,
IDocumentContentOperations::INS_EMPTYEXPAND );
if( pDelPara->pUndo )
@@ -1525,7 +1531,7 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara )
std::vector<sal_uLong> aBkmkArr;
xub_StrLen nOldTxtLen = aCntIdx.GetIndex();
- _SaveCntntIdx( pDoc, nNdIdx, pCurTxtNd->GetTxt().Len(),
+ _SaveCntntIdx( pDoc, nNdIdx, pCurTxtNd->GetTxt().getLength(),
aBkmkArr );
pDelPara->pLastNd->JoinNext();
@@ -4166,7 +4172,8 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
if( pNode->IsTxtNode() )
{
SwTxtNode * pTxtNode = pNode->GetTxtNode();
- if ( pTxtNode && pTxtNode->IsNumbered() && pTxtNode->GetTxt().Len()==0 )
+ if (pTxtNode && pTxtNode->IsNumbered()
+ && pTxtNode->GetTxt().isEmpty())
{
const SfxPoolItem* pFmtItem = 0;
SfxItemSet rSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 61a720f..56188e1 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1156,7 +1156,7 @@ sal_Bool SwCntntNode::GoNext(SwIndex * pIdx, sal_uInt16 nMode ) const
else
bRet = sal_False;
}
- else if( nPos < rTNd.GetTxt().Len() )
+ else if (nPos < rTNd.GetTxt().getLength())
++(*pIdx);
else
bRet = sal_False;
@@ -1634,8 +1634,8 @@ static bool lcl_CheckMaxLength(SwNode const& rPrev, SwNode const& rNext)
{
return true;
}
- size_t const nSum( static_cast<const SwTxtNode&>(rPrev).GetTxt().Len()
- + static_cast<const SwTxtNode&>(rNext).GetTxt().Len());
+ size_t const nSum(static_cast<const SwTxtNode&>(rPrev).GetTxt().getLength()
+ + static_cast<const SwTxtNode&>(rNext).GetTxt().getLength());
return (nSum <= TXTNODE_MAX);
}
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 8767e36..7ce9e62 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1604,7 +1604,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
SwTxtNode *const pSrcNd = aSttIdx.GetNode().GetTxtNode();
SwTxtNode * pDestNd = rPos.nNode.GetNode().GetTxtNode();
bool bSplitDestNd = true;
- bool bCopyCollFmt = pDestNd && !pDestNd->GetTxt().Len();
+ bool bCopyCollFmt = pDestNd && pDestNd->GetTxt().isEmpty();
if( pSrcNd )
{
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index a5fca1a..7acc7f5 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -166,7 +166,7 @@ sal_Bool SwAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength,
xub_StrLen const nLen = rTxt.Len();
for ( xub_StrLen n = 0; n < nLen; ++n )
{
- sal_Unicode const Char = pNd->GetTxt().GetChar( n + nPos );
+ sal_Unicode const Char = pNd->GetTxt()[n + nPos];
if ( ( CH_TXTATR_BREAKWORD == Char || CH_TXTATR_INWORD == Char )
&& pNd->GetTxtAttrForCharAt( n + nPos ) )
{
@@ -181,7 +181,7 @@ sal_Bool SwAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength,
if( pDoc->IsAutoFmtRedline() )
{
- if( nPos == pNd->GetTxt().Len() ) // at the End an Insert takes place
+ if (nPos == pNd->GetTxt().getLength()) // at the End do an Insert
{
pDoc->InsertString( *pPam, rTxt );
}
@@ -190,8 +190,8 @@ sal_Bool SwAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength,
_PaMIntoCrsrShellRing aTmp( rEditSh, rCrsr, *pPam );
pPam->SetMark();
- pPam->GetPoint()->nContent = Min( pNd->GetTxt().Len(),
- xub_StrLen( nPos + nSourceLength ));
+ pPam->GetPoint()->nContent =
+ std::min(pNd->GetTxt().getLength(), nPos + nSourceLength);
pDoc->ReplaceRange( *pPam, rTxt, false );
pPam->Exchange();
pPam->DeleteMark();
@@ -202,8 +202,8 @@ sal_Bool SwAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength,
if( nSourceLength != rTxt.Len() )
{
pPam->SetMark();
- pPam->GetPoint()->nContent = Min( pNd->GetTxt().Len(),
- xub_StrLen( nPos + nSourceLength ));
+ pPam->GetPoint()->nContent =
+ std::min(pNd->GetTxt().getLength(), nPos + nSourceLength);
pDoc->ReplaceRange( *pPam, rTxt, false );
pPam->Exchange();
pPam->DeleteMark();
@@ -288,13 +288,13 @@ const String* SwAutoCorrDoc::GetPrevPara( sal_Bool bAtNormalPos )
(*pIdx)--;
SwTxtNode* pTNd = pIdx->GetNode().GetTxtNode();
- while( pTNd && !pTNd->GetTxt().Len() )
+ while (pTNd && !pTNd->GetTxt().getLength())
{
(*pIdx)--;
pTNd = pIdx->GetNode().GetTxtNode();
}
if( pTNd && 0 == pTNd->GetAttrOutlineLevel() )//#outline level,zhaojianwei
- pStr = &pTNd->GetTxt();
+ pStr = reinterpret_cast<String const*>(&pTNd->GetTxt()); // FIXME
if( bUndoIdInitialized )
bUndoIdInitialized = true;
@@ -323,8 +323,8 @@ sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPo
eLang = GetAppLanguage();
//JP 22.04.99: Bug 63883 - Special treatment for dots.
- bool bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
- '.' == pTxtNd->GetTxt().GetChar( nEndPos );
+ bool bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().getLength() &&
+ ('.' == pTxtNd->GetTxt()[nEndPos]);
const SvxAutocorrWord* pFnd = rACorrect.SearchWordsInList(
pTxtNd->GetTxt(), rSttPos, nEndPos, *this, eLang );
@@ -398,7 +398,7 @@ sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPo
}
if( bRet && ppPara && pTxtNd )
- *ppPara = &pTxtNd->GetTxt();
+ *ppPara = reinterpret_cast<String const*>(&pTxtNd->GetTxt()); //FIXME
return bRet;
}
@@ -476,7 +476,7 @@ void SwDontExpandItem::SaveDontExpandItems( const SwPosition& rPos )
aCharFmtSetRange );
xub_StrLen n = rPos.nContent.GetIndex();
if( !pTxtNd->GetAttr( *pDontExpItems, n, n,
- n != pTxtNd->GetTxt().Len() ))
+ n != pTxtNd->GetTxt().getLength() ))
delete pDontExpItems, pDontExpItems = 0;
}
}
@@ -487,7 +487,7 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
if( pTxtNd )
{
xub_StrLen nStart = rPos.nContent.GetIndex();
- if( nStart == pTxtNd->GetTxt().Len() )
+ if( nStart == pTxtNd->GetTxt().getLength() )
pTxtNd->FmtToTxtAttr( pTxtNd );
if( pTxtNd->GetpSwpHints() && pTxtNd->GetpSwpHints()->Count() )
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 859de64..5f58eb0 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -162,8 +162,8 @@ class SwAutoFormat
// TxtNode methods
const SwTxtNode* GetNextNode() const;
bool IsEmptyLine( const SwTxtNode& rNd ) const
- { return 0 == rNd.GetTxt().Len() ||
- rNd.GetTxt().Len() == GetLeadingBlanks( rNd.GetTxt() ); }
+ { return rNd.GetTxt().isEmpty() ||
+ rNd.GetTxt().getLength() == GetLeadingBlanks( rNd.GetTxt() ); }
sal_Bool IsOneLine( const SwTxtNode& ) const;
sal_Bool IsFastFullLine( const SwTxtNode& ) const;
@@ -213,8 +213,8 @@ class SwAutoFormat
!IsEmptyLine( *pTxtNd ) &&
!IsNoAlphaLine( *pTxtNd) &&
!IsEnumericChar( *pTxtNd ) &&
- ((STRING_MAXLEN - 50 - pTxtNd->GetTxt().Len()) >
- pAktTxtNd->GetTxt().Len()) &&
+ ((STRING_MAXLEN - 50 - pTxtNd->GetTxt().getLength()) >
+ pAktTxtNd->GetTxt().getLength()) &&
!HasBreakAttr( *pTxtNd );
}
@@ -401,17 +401,17 @@ sal_Bool SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
sal_Bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
{
- const String& rTxt = rNd.GetTxt();
+ const OUString& rTxt = rNd.GetTxt();
String sTmp( rTxt );
xub_StrLen nBlnks = GetLeadingBlanks( sTmp );
- xub_StrLen nLen = rTxt.Len() - nBlnks;
+ xub_StrLen nLen = rTxt.getLength() - nBlnks;
if( !nLen )
return sal_False;
// -, +, * separated by blank ??
- if( 2 < nLen && IsSpace( rTxt.GetChar( nBlnks + 1 ) ) )
+ if (2 < nLen && IsSpace(rTxt[nBlnks + 1]))
{
- if( StrChr( pBulletChar, rTxt.GetChar( nBlnks ) ) )
+ if (StrChr(pBulletChar, rTxt[nBlnks]))
return sal_True;
// Should there be a symbol font at the position?
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
@@ -455,7 +455,7 @@ sal_Bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl ) const
{
sal_uInt16 nLvl = 0, nBlnk = 0;
- const String& rTxt = rNd.GetTxt();
+ const OUString& rTxt = rNd.GetTxt();
if( pDigitLvl )
*pDigitLvl = USHRT_MAX;
@@ -472,9 +472,9 @@ sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl
}
- for( xub_StrLen n = 0, nEnd = rTxt.Len(); n < nEnd; ++n )
+ for (xub_StrLen n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n)
{
- switch( rTxt.GetChar( n ) )
+ switch (rTxt[n])
{
case ' ': if( 3 == ++nBlnk )
++nLvl, nBlnk = 0;
@@ -540,13 +540,13 @@ bool SwAutoFormat::DoUnderline()
if( !aFlags.bSetBorder )
return false;
- const sal_Unicode* pStr = pAktTxtNd->GetTxt().GetBuffer();
+ OUString const& rTxt(pAktTxtNd->GetTxt());
int eState = 0;
xub_StrLen nCnt = 0;
- while( *pStr )
+ while (nCnt < rTxt.getLength())
{
int eTmp = 0;
- switch( *pStr )
+ switch (rTxt[nCnt])
{
case '-': eTmp = 1; break;
case '_': eTmp = 2; break;
@@ -562,8 +562,6 @@ bool SwAutoFormat::DoUnderline()
else if( eState != eTmp )
return false;
++nCnt;
-
- ++pStr;
}
if( 2 < nCnt )
@@ -624,25 +622,24 @@ bool SwAutoFormat::DoTable()
pAktTxtNd->FindTableNode() )
return false;
- const String& rTmp = pAktTxtNd->GetTxt();
+ const OUString& rTmp = pAktTxtNd->GetTxt();
xub_StrLen nSttPlus = GetLeadingBlanks( rTmp );
xub_StrLen nEndPlus = GetTrailingBlanks( rTmp );
sal_Unicode cChar;
if( 2 > nEndPlus - nSttPlus ||
- ( '+' != ( cChar = rTmp.GetChar( nSttPlus )) && '|' != cChar ) ||
- ( '+' != ( cChar = rTmp.GetChar( nEndPlus - 1)) && '|' != cChar ))
+ ( '+' != ( cChar = rTmp[nSttPlus]) && '|' != cChar ) ||
+ ( '+' != ( cChar = rTmp[nEndPlus - 1]) && '|' != cChar ))
return false;
SwTxtFrmInfo aInfo( pAktTxtFrm );
xub_StrLen n = nSttPlus;
- const sal_Unicode* pStr = rTmp.GetBuffer() + n;
std::vector<sal_uInt16> aPosArr;
- while( *pStr )
+ while (n < rTmp.getLength())
{
- switch( *pStr )
+ switch (rTmp[n])
{
case '-':
case '_':
@@ -661,8 +658,6 @@ bool SwAutoFormat::DoTable()
}
if( ++n == nEndPlus )
break;
-
- ++pStr;
}
if( 1 < aPosArr.size() )
@@ -754,9 +749,9 @@ xub_StrLen SwAutoFormat::GetTrailingBlanks( const String& rStr ) const
bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
{
- const String& rTxt = rNd.GetTxt();
- for( xub_StrLen n = 0, nEnd = rTxt.Len(); n < nEnd; ++n )
- if( !IsSpace( rTxt.GetChar( n ) ) )
+ const OUString& rTxt = rNd.GetTxt();
+ for (xub_StrLen n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n)
+ if (!IsSpace(rTxt[n]))
{
CharClass& rCC = GetCharClass( rNd.GetSwAttrSet().
GetLanguage().GetLanguage() );
@@ -773,7 +768,7 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
String* pPreFix, String* pPostFix, String* pNumTypes ) const
{
// Teste auf 1.) / 1. / 1.1.1 / (1). / (1) / ....
- const String& rTxt = rNd.GetTxt();
+ const OUString& rTxt = rNd.GetTxt();
xub_StrLen nPos = rPos;
int eScan = NONE;
@@ -785,9 +780,9 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
CharClass& rCC = GetCharClass( rNd.GetSwAttrSet().GetLanguage().GetLanguage() );
- while( nPos < rTxt.Len() && nDigitLvl < MAXLEVEL - 1)
+ while (nPos < rTxt.getLength() && nDigitLvl < MAXLEVEL - 1)
{
- const sal_Unicode cCurrentChar = rTxt.GetChar( nPos );
+ const sal_Unicode cCurrentChar = rTxt[nPos];
if( ('0' <= cCurrentChar && '9' >= cCurrentChar) ||
(0xff10 <= cCurrentChar && 0xff19 >= cCurrentChar) )
{
@@ -977,9 +972,9 @@ CHECK_ROMAN_5:
nClosingParentheses++;
// nur wenn noch keine Zahlen gelesen wurden!
if( pPreFix && !( eScan & ( NO_DELIM | CHG )) )
- *pPreFix += rTxt.GetChar( nPos );
+ *pPreFix += rTxt[nPos];
else if( pPostFix )
- *pPostFix += rTxt.GetChar( nPos );
+ *pPostFix += rTxt[nPos];
if( NO_DELIM & eScan )
{
@@ -998,7 +993,7 @@ CHECK_ROMAN_5:
++nPos;
}
if( !( CHG & eScan ) || rPos == nPos ||
- nPos == rTxt.Len() || !IsSpace( rTxt.GetChar( nPos ) ) ||
+ nPos == rTxt.getLength() || !IsSpace(rTxt[nPos]) ||
(nOpeningParentheses > nClosingParentheses))
return USHRT_MAX;
@@ -1054,16 +1049,16 @@ bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
SwPosition * pPos = rPam.End();
xub_StrLen nBlnkPos = pPos->nContent.GetIndex();
SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- if( nBlnkPos && nBlnkPos-- < pTxtNd->GetTxt().Len() &&
- ( ' ' == pTxtNd->GetTxt().GetChar( nBlnkPos ) ))
+ if (nBlnkPos && nBlnkPos-- < pTxtNd->GetTxt().getLength() &&
+ (' ' == pTxtNd->GetTxt()[nBlnkPos]))
pPos->nContent--;
else
{
pPos = rPam.GetPoint() == pPos ? rPam.GetMark() : rPam.GetPoint();
nBlnkPos = pPos->nContent.GetIndex();
pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- if( nBlnkPos < pTxtNd->GetTxt().Len() &&
- ( ' ' == pTxtNd->GetTxt().GetChar( nBlnkPos )))
+ if (nBlnkPos < pTxtNd->GetTxt().getLength() &&
+ (' ' == pTxtNd->GetTxt()[nBlnkPos]))
pPos->nContent++;
else
return false;
@@ -1124,10 +1119,11 @@ void SwAutoFormat::DeleteAktPara( bool bStart, bool bEnd )
DeleteSel( aDelPam );
aDelPam.DeleteMark();
}
- if( bEnd && pAktTxtNd->GetTxt().Len() !=
+ if (bEnd && pAktTxtNd->GetTxt().getLength() !=
( nPos = GetTrailingBlanks( pAktTxtNd->GetTxt() )) )
{
- aDelPam.GetPoint()->nContent.Assign( pAktTxtNd, pAktTxtNd->GetTxt().Len() );
+ aDelPam.GetPoint()->nContent.Assign(
+ pAktTxtNd, pAktTxtNd->GetTxt().getLength());
aDelPam.SetMark();
aDelPam.GetPoint()->nContent = nPos;
DeleteSel( aDelPam );
@@ -1180,7 +1176,7 @@ bool SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
{
// dann nur bis zum Ende von Absatz loeschen
aDelPam.GetPoint()->nNode--;
- aDelPam.GetPoint()->nContent = pAktTxtNd->GetTxt().Len();
+ aDelPam.GetPoint()->nContent = pAktTxtNd->GetTxt().getLength();
}
else
aDelPam.GetPoint()->nContent.Assign( pTNd,
@@ -1204,14 +1200,15 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara )
// Loesche Blanks den leeren Absatz
aDelPam.DeleteMark();
aDelPam.GetPoint()->nNode = aNdIdx;
- aDelPam.GetPoint()->nContent.Assign( pAktTxtNd, pAktTxtNd->GetTxt().Len() );
+ aDelPam.GetPoint()->nContent.Assign(
+ pAktTxtNd, pAktTxtNd->GetTxt().getLength() );
aDelPam.SetMark();
aDelPam.GetMark()->nNode--;
SwTxtNode* pTNd = aDelPam.GetNode( sal_False )->GetTxtNode();
if( pTNd )
// erstmal den vorherigen Textnode benutzen.
- aDelPam.GetMark()->nContent.Assign( pTNd, pTNd->GetTxt().Len() );
+ aDelPam.GetMark()->nContent.Assign(pTNd, pTNd->GetTxt().getLength());
else if( bTstNextPara )
{
// dann versuche den naechsten (am Anfang vom Dok, Tabellen-Zellen,
@@ -1288,7 +1285,7 @@ void SwAutoFormat::DelPrevPara()
if( pTNd )
{
// erstmal den vorherigen Textnode benutzen.
- aDelPam.GetPoint()->nContent.Assign( pTNd, pTNd->GetTxt().Len() );
+ aDelPam.GetPoint()->nContent.Assign(pTNd, pTNd->GetTxt().getLength());
DeleteSel( aDelPam );
}
aDelPam.DeleteMark();
@@ -1422,12 +1419,15 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
SwTwips nFrmWidth = pAktTxtFrm->Prt().Width();;
SwTwips nLeftTxtPos;
{
- const sal_Unicode* pTxt = pAktTxtNd->GetTxt().GetBuffer(), *pSav = pTxt;
- while( IsSpace( *pTxt ) )
- ++pTxt;
+ sal_Int32 nPos(0);
+ while (nPos < pAktTxtNd->GetTxt().getLength() &&
+ IsSpace(pAktTxtNd->GetTxt()[nPos]))
+ {
+ ++nPos;
+ }
SwTxtFrmInfo aInfo( pAktTxtFrm );
- nLeftTxtPos = aInfo.GetCharPos( static_cast<xub_StrLen>(pTxt - pSav) );
+ nLeftTxtPos = aInfo.GetCharPos(nPos);
nLeftTxtPos -= pAktTxtNd->GetSwAttrSet().GetLRSpace().GetLeft();
}
@@ -1747,21 +1747,21 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
if( nTxtPos )
{
- const String& rStr = pAktTxtNd->GetTxt();
+ const OUString& rStr = pAktTxtNd->GetTxt();
bool bInsTab = true;
- if( '\t' == rStr.GetChar( nSpacePos+1 )) // ein Tab, das belassen wir
+ if ('\t' == rStr[nSpacePos+1]) // leave tab alone
{
--nSpacePos;
bInsTab = false;
}
xub_StrLen nSpaceStt = nSpacePos;
- while( nSpaceStt && IsSpace( rStr.GetChar( --nSpaceStt ) ) )
+ while (nSpaceStt && IsSpace(rStr[--nSpaceStt]))
;
++nSpaceStt;
- if( bInsTab && '\t' == rStr.GetChar( nSpaceStt ) ) // ein Tab, das belassen wir
+ if (bInsTab && '\t' == rStr[nSpaceStt]) // leave tab alone
{
++nSpaceStt;
bInsTab = false;
@@ -1862,8 +1862,8 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
!aFlags.bChgWeightUnderl && !aFlags.bAddNonBrkSpace) )
return;
- const String* pTxt = &pAktTxtNd->GetTxt();
- if( nPos >= pTxt->Len() )
+ const OUString* pTxt = &pAktTxtNd->GetTxt();
+ if (nPos >= pTxt->getLength())
return;
bool bGetLanguage = aFlags.bChgOrdinalNumber ||
@@ -1887,14 +1887,14 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
CharClass& rAppCC = GetAppCharClass();
do {
- while( nPos < pTxt->Len() && IsSpace( cChar = pTxt->GetChar( nPos ) ))
+ while (nPos < pTxt->getLength() && IsSpace(cChar = (*pTxt)[nPos]))
++nPos;
- if( nPos == pTxt->Len() )
+ if (nPos == pTxt->getLength())
break; // das wars
if( ( ( bReplaceQuote && '\"' == cChar ) ||
( bReplaceSglQuote && '\'' == cChar ) ) &&
- ( !nPos || ' ' == pTxt->GetChar( nPos-1 ) ) )
+ (!nPos || ' ' == (*pTxt)[nPos-1]))
{
// --------------------------------------
// beachte: Sonderfall Symbolfonts !!!
@@ -1939,10 +1939,10 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
bool bCallACorr = false;
int bBreak = 0;
- if( nPos && IsSpace( pTxt->GetChar( nPos-1 )))
+ if (nPos && IsSpace((*pTxt)[nPos-1]))
nLastBlank = nPos;
- for( nSttPos = nPos; !bBreak && nPos < pTxt->Len(); ++nPos )
- switch( cChar = pTxt->GetChar( nPos ) )
+ for (nSttPos = nPos; !bBreak && nPos < pTxt->getLength(); ++nPos)
+ switch (cChar = (*pTxt)[nPos])
{
case '\"':
case '\'':
@@ -2006,7 +2006,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
? STR_AUTOFMTREDL_BOLD
: STR_AUTOFMTREDL_UNDER );
- sal_Unicode cBlank = nSttPos ? pTxt->GetChar(nSttPos - 1) : 0;
+ sal_Unicode cBlank = nSttPos ? (*pTxt)[nSttPos - 1] : 0;
aDelPam.GetPoint()->nContent = nPos;
if( pATst->FnChgWeightUnderl( aACorrDoc, *pTxt,
@@ -2025,7 +2025,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if(0 == (pDoc->GetRedlineMode() & nsRedlineMode_t::REDLINE_SHOW_DELETE))
nPos = aDelPam.GetPoint()->nContent.GetIndex() - 1;
// wurde vorm Start ein Zeichen entfernt?
- if( cBlank && cBlank != pTxt->GetChar(nSttPos - 1) )
+ if (cBlank && cBlank != (*pTxt)[nSttPos - 1])
--nSttPos;
}
}
@@ -2061,7 +2061,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( nPos == nSttPos )
{
- if( ++nPos == pTxt->Len() )
+ if (++nPos == pTxt->getLength())
bCallACorr = true;
}
else
@@ -2107,7 +2107,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
SetRedlineTxt( STR_AUTOFMTREDL_DASH ) &&
pATst->FnChgToEnEmDash( aACorrDoc, *pTxt, nSttPos, nPos, eLang ) ) ||
( aFlags.bSetINetAttr &&
- ( nPos == pTxt->Len() || IsSpace( pTxt->GetChar( nPos )) ) &&
+ (nPos == pTxt->getLength() || IsSpace((*pTxt)[nPos])) &&
SetRedlineTxt( STR_AUTOFMTREDL_DETECT_URL ) &&
pATst->FnSetINetAttr( aACorrDoc, *pTxt, nLastBlank, nPos, eLang ) ) )
nPos = aDelPam.GetPoint()->nContent.GetIndex();
@@ -2140,7 +2140,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
}
}
}
- } while( nPos < pTxt->Len() );
+ } while (nPos < pTxt->getLength());
ClearRedlineTxt();
}
@@ -2666,7 +2666,7 @@ void SwEditShell::AutoFmtBySplitNode()
// dann einen Node zurueckspringen
SwNodeIndex aNdIdx( pCrsr->GetMark()->nNode, -1 );
SwTxtNode* pTxtNd = aNdIdx.GetNode().GetTxtNode();
- if( pTxtNd && pTxtNd->GetTxt().Len() )
+ if (pTxtNd && !pTxtNd->GetTxt().isEmpty())
{
pCntnt->Assign( pTxtNd, 0 );
pCrsr->GetMark()->nNode = aNdIdx;
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 266f8d0..964fcda 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -126,9 +126,10 @@ sal_Bool SwEditShell::GetPaMAttr( SwPaM* pPaM, SfxItemSet& rSet,
{
case ND_TEXTNODE:
{
- xub_StrLen nStt = n == nSttNd ? nSttCnt : 0,
- nEnd = n == nEndNd ? nEndCnt
- : ((SwTxtNode*)pNd)->GetTxt().Len();
+ xub_StrLen const nStt = (n == nSttNd) ? nSttCnt : 0;
+ xub_StrLen const nEnd = (n == nEndNd)
+ ? nEndCnt
+ : static_cast<SwTxtNode*>(pNd)->GetTxt().getLength();
((SwTxtNode*)pNd)->GetAttr( *pSet, nStt, nEnd,
sal_False, sal_True,
@@ -456,7 +457,6 @@ static bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
sal_uInt16 &rScrpt, bool bInSelection, bool bNum )
{
bool bRet = false;
- const String& rTxt = rTNd.GetTxt();
String sExp;
// consider numbering
@@ -484,7 +484,7 @@ static bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
}
// and fields
- if ( CH_TXTATR_BREAKWORD == rTxt.GetChar( nPos ) )
+ if (CH_TXTATR_BREAKWORD == rTNd.GetTxt()[nPos])
{
const SwTxtAttr* const pAttr = rTNd.GetTxtAttrForCharAt( nPos );
if (pAttr)
@@ -557,7 +557,7 @@ sal_uInt16 SwEditShell::GetScriptType() const
sal_uInt16 nScript;
- if ( pTNd->GetTxt().Len() )
+ if (!pTNd->GetTxt().isEmpty())
{
nScript = pScriptInfo ?
pScriptInfo->ScriptType( nPos ) :
@@ -578,7 +578,7 @@ sal_uInt16 SwEditShell::GetScriptType() const
if( aIdx.GetNode().IsTxtNode() )
{
const SwTxtNode* pTNd = aIdx.GetNode().GetTxtNode();
- const String& rTxt = pTNd->GetTxt();
+ const OUString& rTxt = pTNd->GetTxt();
// try to get SwScriptInfo
const SwScriptInfo* pScriptInfo = SwScriptInfo::GetScriptInfo( *pTNd );
@@ -588,11 +588,12 @@ sal_uInt16 SwEditShell::GetScriptType() const
: 0,
nEndPos = aIdx == nEndIdx
? pEnd->nContent.GetIndex()
- : rTxt.Len();
+ : rTxt.getLength();
- OSL_ENSURE( nEndPos <= rTxt.Len(), "Index outside the range - endless loop!" );
- if( nEndPos > rTxt.Len() )
- nEndPos = rTxt.Len();
+ OSL_ENSURE( nEndPos <= rTxt.getLength(),
+ "Index outside the range - endless loop!" );
+ if (nEndPos > rTxt.getLength())
+ nEndPos = rTxt.getLength();
sal_uInt16 nScript;
while( nChg < nEndPos )
@@ -603,23 +604,23 @@ sal_uInt16 SwEditShell::GetScriptType() const
rTxt, nChg );
if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, true,
- 0 == nChg && rTxt.Len() == nEndPos ) )
+ 0 == nChg && rTxt.getLength() == nEndPos))
nRet |= lcl_SetScriptFlags( nScript );
if( (SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN |
SCRIPTTYPE_COMPLEX) == nRet )
break;
- xub_StrLen nFldPos = nChg+1;
+ sal_Int32 nFldPos = nChg+1;
nChg = pScriptInfo ?
pScriptInfo->NextScriptChg( nChg ) :
(xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(
rTxt, nChg, nScript );
- nFldPos = rTxt.Search(
- CH_TXTATR_BREAKWORD, nFldPos );
- if( nFldPos < nChg )
+ nFldPos = rTxt.indexOf(
+ CH_TXTATR_BREAKWORD, nFldPos);
+ if ((-1 != nFldPos) && (nFldPos < nChg))
nChg = nFldPos;
}
if( (SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN |
@@ -676,7 +677,7 @@ sal_uInt16 SwEditShell::GetScalingOfSelectedText() const
if( pStt->nNode == pEnd->nNode )
nEnd = pEnd->nContent.GetIndex();
else
- nEnd = pTNd->GetTxt().Len();
+ nEnd = pTNd->GetTxt().getLength();
nScaleWidth = pTNd->GetScalingOfSelectedText( nStt, nEnd );
}
else
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index e836908..af04306 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -73,6 +73,7 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, sal_Bool bReset)
const SwCntntNode* pCNd = pPam->GetCntntNode();
if( pCNd->IsTxtNode() )
{
+ SwTxtNode const*const pTxtNode(static_cast<SwTxtNode const*>(pCNd));
xub_StrLen nStt, nEnd;
if( pPam->HasMark() )
{
@@ -98,7 +99,7 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, sal_Bool bReset)
nStt = 0;
}
else
- nEnd = ((SwTxtNode*)pCNd)->GetTxt().Len();
+ nEnd = pTxtNode->GetTxt().getLength();
}
}
else
@@ -106,7 +107,7 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, sal_Bool bReset)
SfxItemSet aSet( pDoc->GetAttrPool(),
pCharFmt->GetAttrSet().GetRanges() );
- ((SwTxtNode*)pCNd)->GetAttr( aSet, nStt, nEnd );
+ pTxtNode->GetAttr( aSet, nStt, nEnd );
pCharFmt->SetFmtAttr( aSet );
}
else if( pCNd->HasSwAttrSet() )
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 5f8146d..31045e0 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -194,7 +194,7 @@ sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
bool bEndUndo = false;
SwDoc* pMyDoc = GetDoc();
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
- if( pTxtNd && pTxtNd->GetTxt().Len() && rPos.nNode.GetIndex() + 1 !=
+ if (pTxtNd && pTxtNd->GetTxt().getLength() && rPos.nNode.GetIndex() + 1 !=
pMyDoc->GetNodes().GetEndOfContent().GetIndex() )
rPos.nContent.Assign( pTxtNd, 0 );
else
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 31327d0..91d3e4e 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -558,7 +558,7 @@ String SwEditShell::GetDropTxt( const sal_uInt16 nChars ) const
{
xub_StrLen nDropLen = pTxtNd->GetDropLen( nChars );
if( nDropLen )
- aTxt = pTxtNd->GetTxt().Copy( 0, nDropLen );
+ aTxt = pTxtNd->GetTxt().copy(0, nDropLen);
}
return aTxt;
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 8cfb24d..ef15045 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1000,7 +1000,7 @@ uno::Reference< XSpellAlternatives >
xub_StrLen nLen = 1;
if( pWrong->InWrongWord(nBegin,nLen) && !pNode->IsSymbol(nBegin) )
{
- String aText( pNode->GetTxt().Copy( nBegin, nLen ) );
+ String const aText(pNode->GetTxt().copy(nBegin, nLen));
String aWord( aText );
aWord = comphelper::string::remove(aWord, CH_TXTATR_BREAKWORD);
aWord = comphelper::string::remove(aWord, CH_TXTATR_INWORD);
@@ -1113,7 +1113,7 @@ bool SwEditShell::GetGrammarCorrection(
xub_StrLen nLen = 1;
if (pWrong->InWrongWord(nBegin, nLen))
{
- String aText( pNode->GetTxt().Copy( nBegin, nLen ) );
+ String const aText(pNode->GetTxt().copy(nBegin, nLen));
uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( pDoc->GetGCIterator() );
if (xGCIterator.is())
@@ -1811,7 +1811,8 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt,
bool bField = false;
//read the character at the current position to check if it's a field
- sal_Unicode cChar = pTxtNode->GetTxt().GetChar( pCrsr->GetMark()->nContent.GetIndex() );
+ sal_Unicode const cChar =
+ pTxtNode->GetTxt()[pCrsr->GetMark()->nContent.GetIndex()];
if( CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar)
{
const SwTxtAttr* pTxtAttr = pTxtNode->GetTxtAttrForCharAt(
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 20aa72a..f8ffa9e 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -295,7 +295,8 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle)
//body the directly available text node will be used
if(!pTxtNode)
pTxtNode = &rFldTxtNode;
- if( pTxtNode->GetTxt().Len() && pTxtNode->getLayoutFrm( rDoc.GetCurrentLayout() ) &&
+ if (!pTxtNode->GetTxt().isEmpty() &&
+ pTxtNode->getLayoutFrm( rDoc.GetCurrentLayout() ) &&
pTxtNode->GetNodes().IsDocNodes() )
{
SwTOXAuthority* pNew = new SwTOXAuthority( *pTxtNode,
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index a74d10d..18b3414 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list