make SwTxtNode::Replace0xFF static function
Change-Id: I4da73eab3e767c2ed7699808e00c40d440a40dbe
This commit is contained in:
@@ -141,9 +141,6 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
|
|||||||
/// Create the specific AttrSet.
|
/// Create the specific AttrSet.
|
||||||
SW_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& );
|
SW_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& );
|
||||||
|
|
||||||
SW_DLLPRIVATE void Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
|
|
||||||
xub_StrLen nEndPos, sal_Bool bExpandFlds ) const;
|
|
||||||
|
|
||||||
/// Optimization: Asking for information about hidden characters at SwScriptInfo
|
/// Optimization: Asking for information about hidden characters at SwScriptInfo
|
||||||
/// updates these flags.
|
/// updates these flags.
|
||||||
inline bool IsCalcHiddenCharFlags() const
|
inline bool IsCalcHiddenCharFlags() const
|
||||||
|
@@ -2893,10 +2893,11 @@ long SwTxtNode::GetLeftMarginForTabCalculation() const
|
|||||||
return nLeftMarginForTabCalc;
|
return nLeftMarginForTabCalc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
|
static void
|
||||||
xub_StrLen nEndPos, sal_Bool bExpandFlds ) const
|
Replace0xFF(SwTxtNode const& rNode, XubString& rTxt, xub_StrLen& rTxtStt,
|
||||||
|
xub_StrLen nEndPos, sal_Bool const bExpandFlds)
|
||||||
{
|
{
|
||||||
if( GetpSwpHints() )
|
if (rNode.GetpSwpHints())
|
||||||
{
|
{
|
||||||
sal_Unicode cSrchChr = CH_TXTATR_BREAKWORD;
|
sal_Unicode cSrchChr = CH_TXTATR_BREAKWORD;
|
||||||
for( int nSrchIter = 0; 2 > nSrchIter; ++nSrchIter,
|
for( int nSrchIter = 0; 2 > nSrchIter; ++nSrchIter,
|
||||||
@@ -2906,7 +2907,7 @@ void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
|
|||||||
while( STRING_NOTFOUND != nPos && nPos < nEndPos )
|
while( STRING_NOTFOUND != nPos && nPos < nEndPos )
|
||||||
{
|
{
|
||||||
const SwTxtAttr* const pAttr =
|
const SwTxtAttr* const pAttr =
|
||||||
GetTxtAttrForCharAt( rTxtStt + nPos );
|
rNode.GetTxtAttrForCharAt(rTxtStt + nPos);
|
||||||
if( pAttr )
|
if( pAttr )
|
||||||
{
|
{
|
||||||
switch( pAttr->Which() )
|
switch( pAttr->Which() )
|
||||||
@@ -2934,10 +2935,10 @@ void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
|
|||||||
if( rFtn.GetNumStr().Len() )
|
if( rFtn.GetNumStr().Len() )
|
||||||
sExpand = rFtn.GetNumStr();
|
sExpand = rFtn.GetNumStr();
|
||||||
else if( rFtn.IsEndNote() )
|
else if( rFtn.IsEndNote() )
|
||||||
sExpand = GetDoc()->GetEndNoteInfo().aFmt.
|
sExpand = rNode.GetDoc()->GetEndNoteInfo().aFmt.
|
||||||
GetNumStr( rFtn.GetNumber() );
|
GetNumStr( rFtn.GetNumber() );
|
||||||
else
|
else
|
||||||
sExpand = GetDoc()->GetFtnInfo().aFmt.
|
sExpand = rNode.GetDoc()->GetFtnInfo().aFmt.
|
||||||
GetNumStr( rFtn.GetNumber() );
|
GetNumStr( rFtn.GetNumber() );
|
||||||
rTxt.Insert( sExpand, nPos );
|
rTxt.Insert( sExpand, nPos );
|
||||||
nPos = nPos + sExpand.Len();
|
nPos = nPos + sExpand.Len();
|
||||||
@@ -2973,7 +2974,7 @@ OUString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx,
|
|||||||
XubString aTxt(
|
XubString aTxt(
|
||||||
(STRING_LEN == nLen) ? GetTxt().copy(nIdx) : GetTxt().copy(nIdx, nLen));
|
(STRING_LEN == nLen) ? GetTxt().copy(nIdx) : GetTxt().copy(nIdx, nLen));
|
||||||
xub_StrLen nTxtStt = nIdx;
|
xub_StrLen nTxtStt = nIdx;
|
||||||
Replace0xFF( aTxt, nTxtStt, aTxt.Len(), sal_True );
|
Replace0xFF(*this, aTxt, nTxtStt, aTxt.Len(), true);
|
||||||
if( bWithNum )
|
if( bWithNum )
|
||||||
{
|
{
|
||||||
XubString aListLabelStr = GetNumString();
|
XubString aListLabelStr = GetNumString();
|
||||||
@@ -3366,13 +3367,13 @@ OUString SwTxtNode::GetRedlineTxt( xub_StrLen nIdx, xub_StrLen nLen,
|
|||||||
if( nIdxEnd < nEnd ) nEnd = nIdxEnd;
|
if( nIdxEnd < nEnd ) nEnd = nIdxEnd;
|
||||||
xub_StrLen nDelCnt = nEnd - nStt;
|
xub_StrLen nDelCnt = nEnd - nStt;
|
||||||
aTxt.Erase( nStt - nTxtStt, nDelCnt );
|
aTxt.Erase( nStt - nTxtStt, nDelCnt );
|
||||||
Replace0xFF( aTxt, nTxtStt, nStt - nTxtStt, bExpandFlds );
|
Replace0xFF(*this, aTxt, nTxtStt, nStt - nTxtStt, bExpandFlds);
|
||||||
nTxtStt = nTxtStt + nDelCnt;
|
nTxtStt = nTxtStt + nDelCnt;
|
||||||
}
|
}
|
||||||
else if( nStt >= nIdxEnd )
|
else if( nStt >= nIdxEnd )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Replace0xFF( aTxt, nTxtStt, aTxt.Len(), bExpandFlds );
|
Replace0xFF(*this, aTxt, nTxtStt, aTxt.Len(), bExpandFlds);
|
||||||
|
|
||||||
if( bWithNum )
|
if( bWithNum )
|
||||||
aTxt.Insert( GetNumString(), 0 );
|
aTxt.Insert( GetNumString(), 0 );
|
||||||
|
Reference in New Issue
Block a user