diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-14 09:40:53 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-08-14 21:21:56 +0000 |
commit | cafcf33915fe30af693a94f4224fedd5cb9f9a55 (patch) | |
tree | 6e2589027c44cab56b4365dc25ca2a5eaecd7f02 /sw | |
parent | cb34d10ec875cb538d9d8d41faa995f7469ae89f (diff) |
String to OUString + prefix names of data members
Change-Id: Ic0cd2bdfde8c6ba915e89a346bcccd6fef1ca267
Reviewed-on: https://gerrit.libreoffice.org/5404
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/doc.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fmtftn.hxx | 31 | ||||
-rw-r--r-- | sw/inc/txtftn.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/docftn.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/doc/ftnidx.cxx | 31 | ||||
-rw-r--r-- | sw/source/core/layout/ftnfrm.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/txtnode/atrftn.cxx | 53 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ascii/ascatr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlftn.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/docvw/edtwin2.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/insfnote.cxx | 2 |
18 files changed, 88 insertions, 81 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 3e2369053ed7..aa6992839d1f 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1099,7 +1099,7 @@ public: SwFtnIdxs& GetFtnIdxs() { return *mpFtnIdxs; } const SwFtnIdxs& GetFtnIdxs() const { return *mpFtnIdxs; } /// change footnotes in area - bool SetCurFtn( const SwPaM& rPam, const String& rNumStr, + bool SetCurFtn( const SwPaM& rPam, const OUString& rNumStr, sal_uInt16 nNumber, bool bIsEndNote ); /** Operations on the content of the document e.g. diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx index f6af20eb6828..a1d310922819 100644 --- a/sw/inc/fmtftn.hxx +++ b/sw/inc/fmtftn.hxx @@ -19,7 +19,7 @@ #ifndef _FMTFTN_HXX #define _FMTFTN_HXX -#include <tools/string.hxx> +#include <rtl/ustring.hxx> #include <svl/poolitem.hxx> #include "swdllapi.h" @@ -31,9 +31,9 @@ class SwTxtFtn; class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem { friend class SwTxtFtn; - SwTxtFtn* pTxtAttr; ///< My TextAttribute. - String aNumber; ///< User-defined 'Number'. - sal_uInt16 nNumber; ///< Automatische Nummerierung + SwTxtFtn* m_pTxtAttr; ///< My TextAttribute. + OUString m_aNumber; ///< User-defined 'Number'. + sal_uInt16 m_nNumber; ///< Automatische Nummerierung bool m_bEndNote; ///< Is it an End note? /// Protected CopyCtor. @@ -48,24 +48,27 @@ public: virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - const String &GetNumStr() const { return aNumber; } - const sal_uInt16 &GetNumber() const { return nNumber; } - bool IsEndNote() const { return m_bEndNote;} + OUString GetNumStr() const { return m_aNumber; } + sal_uInt16 GetNumber() const { return m_nNumber; } + bool IsEndNote() const { return m_bEndNote;} - void SetNumStr( const String& rStr ) { aNumber = rStr; } - void SetNumber( sal_uInt16 nNo ) { nNumber = nNo; } + void SetNumStr( const OUString& rStr ) { m_aNumber = rStr; } + void SetNumber( sal_uInt16 nNo ) { m_nNumber = nNo; } void SetEndNote( bool b ); void SetNumber( const SwFmtFtn& rFtn ) - { nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; } + { + m_nNumber = rFtn.m_nNumber; + m_aNumber = rFtn.m_aNumber; + } - const SwTxtFtn *GetTxtFtn() const { return pTxtAttr; } - SwTxtFtn *GetTxtFtn() { return pTxtAttr; } + const SwTxtFtn *GetTxtFtn() const { return m_pTxtAttr; } + SwTxtFtn *GetTxtFtn() { return m_pTxtAttr; } - void GetFtnText( String& rStr ) const; + void GetFtnText( OUString& rStr ) const; /// Returns string to be displayed of footnote / endnote. - String GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrs = sal_False ) const; + OUString GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrs = sal_False ) const; }; diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx index 63a097bb34aa..9dc60a22d1f7 100644 --- a/sw/inc/txtftn.hxx +++ b/sw/inc/txtftn.hxx @@ -20,13 +20,13 @@ #define _TXTFTN_HXX #include <txatbase.hxx> -#include <tools/string.hxx> class SwNodeIndex; class SwTxtNode; class SwNodes; class SwDoc; class SwFrm; +class OUString; // ATT_FTN ********************************************************** @@ -42,7 +42,7 @@ public: inline SwNodeIndex *GetStartNode() const { return m_pStartNode; } void SetStartNode( const SwNodeIndex *pNode, sal_Bool bDelNodes = sal_True ); - void SetNumber( const sal_uInt16 nNumber, const String* = 0 ); + void SetNumber( const sal_uInt16 nNumber, const OUString &sNumStr ); void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const; // Get and set TxtNode pointer. diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 6d2cfdc24eb9..e1a0e25d0e85 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -321,7 +321,7 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) { SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ]; const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); - pTxtFtn->SetNumber( rFtn.GetNumber(), &rFtn.GetNumStr()); + pTxtFtn->SetNumber(rFtn.GetNumber(), rFtn.GetNumStr()); } } diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index e5393020a47f..d50ff9c222e3 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -201,7 +201,7 @@ void SwEndNoteInfo::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); if ( rFtn.IsEndNote() == m_bEndNote ) { - pTxtFtn->SetNumber( rFtn.GetNumber(), &rFtn.GetNumStr()); + pTxtFtn->SetNumber(rFtn.GetNumber(), rFtn.GetNumStr()); } } } @@ -302,7 +302,7 @@ void SwDoc::SetFtnInfo(const SwFtnInfo& rInfo) SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ]; const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); if ( !rFtn.IsEndNote() ) - pTxtFtn->SetNumber( rFtn.GetNumber(), &rFtn.GetNumStr()); + pTxtFtn->SetNumber(rFtn.GetNumber(), rFtn.GetNumStr()); } } } @@ -372,7 +372,7 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo) SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ]; const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); if ( rFtn.IsEndNote() ) - pTxtFtn->SetNumber( rFtn.GetNumber(), &rFtn.GetNumStr()); + pTxtFtn->SetNumber(rFtn.GetNumber(), rFtn.GetNumStr()); } } } //swmod 080219 @@ -394,7 +394,7 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo) } } -bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr, +bool SwDoc::SetCurFtn( const SwPaM& rPam, const OUString& rNumStr, sal_uInt16 nNumber, bool bIsEndNote ) { SwFtnIdxs& rFtnArr = GetFtnIdxs(); @@ -438,7 +438,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr, pUndo->GetHistory().Add( *pTxtFtn ); } - pTxtFtn->SetNumber( nNumber, &rNumStr ); + pTxtFtn->SetNumber( nNumber, rNumStr ); if( rFtn.IsEndNote() != bIsEndNote ) { ((SwFmtFtn&)rFtn).SetEndNote( bIsEndNote ); @@ -469,7 +469,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr, pUndo->GetHistory().Add( *pTxtFtn ); } - pTxtFtn->SetNumber( nNumber, &rNumStr ); + pTxtFtn->SetNumber( nNumber, rNumStr ); if( rFtn.IsEndNote() != bIsEndNote ) { ((SwFmtFtn&)rFtn).SetEndNote( bIsEndNote ); diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx index 68363138d758..721021cd32bd 100644 --- a/sw/source/core/doc/ftnidx.cxx +++ b/sw/source/core/doc/ftnidx.cxx @@ -100,10 +100,11 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt ) break; const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); - if( !rFtn.GetNumStr().Len() && !rFtn.IsEndNote() && + if( rFtn.GetNumStr().isEmpty() && !rFtn.IsEndNote() && !SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtFtn )) - pTxtFtn->SetNumber( rFtnInfo.nFtnOffset + nFtnNo++, - &rFtn.GetNumStr() ); + { + pTxtFtn->SetNumber( rFtnInfo.nFtnOffset + nFtnNo++, rFtn.GetNumStr() ); + } } } @@ -121,7 +122,7 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt ) break; const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); - if( !rFtn.GetNumStr().Len() ) + if( rFtn.GetNumStr().isEmpty() ) { if( !aNumArr.ChkNumber( *pTxtFtn ) ) { @@ -138,7 +139,7 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt ) { pTxtFtn = (*this)[ nPos ]; const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); - if( !rFtn.GetNumStr().Len() ) + if( rFtn.GetNumStr().isEmpty() ) { sal_uInt16 nSectNo = aNumArr.ChkNumber( *pTxtFtn ); if( !nSectNo && ( rFtn.IsEndNote() || !bEndNoteOnly )) @@ -148,7 +149,7 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt ) if( nSectNo ) { - pTxtFtn->SetNumber( nSectNo, &rFtn.GetNumStr() ); + pTxtFtn->SetNumber( nSectNo, rFtn.GetNumStr() ); } } } @@ -189,10 +190,11 @@ void SwFtnIdxs::UpdateAllFtn() // Endnotes are per-document only const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); - if( !rFtn.IsEndNote() && !rFtn.GetNumStr().Len() && + if( !rFtn.IsEndNote() && rFtn.GetNumStr().isEmpty() && !SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtFtn )) - pTxtFtn->SetNumber( rFtnInfo.nFtnOffset + nNo++, - &rFtn.GetNumStr() ); + { + pTxtFtn->SetNumber( rFtnInfo.nFtnOffset + nNo++, rFtn.GetNumStr() ); + } } if( nFtnIdx >= size() ) break; // ok, everything is updated @@ -205,10 +207,11 @@ void SwFtnIdxs::UpdateAllFtn() // Endnotes are per-document pTxtFtn = (*this)[ nFtnIdx ]; const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); - if( !rFtn.IsEndNote() && !rFtn.GetNumStr().Len() && + if( !rFtn.IsEndNote() && rFtn.GetNumStr().isEmpty() && !SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtFtn )) - pTxtFtn->SetNumber( rFtnInfo.nFtnOffset + nNo++, - &rFtn.GetNumStr() ); + { + pTxtFtn->SetNumber( rFtnInfo.nFtnOffset + nNo++, rFtn.GetNumStr() ); + } } } @@ -220,7 +223,7 @@ void SwFtnIdxs::UpdateAllFtn() { pTxtFtn = (*this)[ nPos ]; const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); - if( !rFtn.GetNumStr().Len() ) + if( rFtn.GetNumStr().isEmpty() ) { sal_uInt16 nSectNo = aNumArr.ChkNumber( *pTxtFtn ); if( !nSectNo && ( rFtn.IsEndNote() || !bEndNoteOnly )) @@ -230,7 +233,7 @@ void SwFtnIdxs::UpdateAllFtn() if( nSectNo ) { - pTxtFtn->SetNumber( nSectNo, &rFtn.GetNumStr() ); + pTxtFtn->SetNumber( nSectNo, rFtn.GetNumStr() ); } } } diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index ff798b5a2818..185cbc11084e 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -2652,10 +2652,12 @@ void SwPageFrm::UpdateFtnNum() { SwTxtFtn* pTxtFtn = pFtn->GetAttr(); if( !pTxtFtn->GetFtn().IsEndNote() && - !pTxtFtn->GetFtn().GetNumStr().Len() && + pTxtFtn->GetFtn().GetNumStr().isEmpty() && !pFtn->GetMaster() && (pTxtFtn->GetFtn().GetNumber() != ++nNum) ) - pTxtFtn->SetNumber( nNum ); + { + pTxtFtn->SetNumber( nNum, OUString() ); + } if ( pFtn->GetNext() ) pFtn = (SwFtnFrm*)pFtn->GetNext(); else diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 2b79b0ad56fe..be898145eab1 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -121,8 +121,8 @@ namespace { SwFmtFtn::SwFmtFtn( bool bEndNote ) : SfxPoolItem( RES_TXTATR_FTN ), - pTxtAttr( 0 ), - nNumber( 0 ), + m_pTxtAttr( 0 ), + m_nNumber( 0 ), m_bEndNote( bEndNote ) { } @@ -131,8 +131,8 @@ SwFmtFtn::SwFmtFtn( bool bEndNote ) int SwFmtFtn::operator==( const SfxPoolItem& rAttr ) const { OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" ); - return nNumber == ((SwFmtFtn&)rAttr).nNumber && - aNumber == ((SwFmtFtn&)rAttr).aNumber && + return m_nNumber == ((SwFmtFtn&)rAttr).m_nNumber && + m_aNumber == ((SwFmtFtn&)rAttr).m_aNumber && m_bEndNote == ((SwFmtFtn&)rAttr).m_bEndNote; } @@ -140,8 +140,8 @@ int SwFmtFtn::operator==( const SfxPoolItem& rAttr ) const SfxPoolItem* SwFmtFtn::Clone( SfxItemPool* ) const { SwFmtFtn* pNew = new SwFmtFtn; - pNew->aNumber = aNumber; - pNew->nNumber = nNumber; + pNew->m_aNumber = m_aNumber; + pNew->m_nNumber = m_nNumber; pNew->m_bEndNote = m_bEndNote; return pNew; } @@ -163,11 +163,11 @@ SwFmtFtn::~SwFmtFtn() } -void SwFmtFtn::GetFtnText( XubString& rStr ) const +void SwFmtFtn::GetFtnText( OUString& rStr ) const { - if( pTxtAttr->GetStartNode() ) + if( m_pTxtAttr->GetStartNode() ) { - SwNodeIndex aIdx( *pTxtAttr->GetStartNode(), 1 ); + SwNodeIndex aIdx( *m_pTxtAttr->GetStartNode(), 1 ); SwCntntNode* pCNd = aIdx.GetNode().GetTxtNode(); if( !pCNd ) pCNd = aIdx.GetNodes().GoNext( &aIdx ); @@ -178,7 +178,7 @@ void SwFmtFtn::GetFtnText( XubString& rStr ) const ++aIdx; while ( !aIdx.GetNode().IsEndNode() ) { if ( aIdx.GetNode().IsTxtNode() ) - rStr += OUString(" ") + ((SwTxtNode*)(aIdx.GetNode().GetTxtNode()))->GetExpandTxt(); + rStr += " " + ((SwTxtNode*)(aIdx.GetNode().GetTxtNode()))->GetExpandTxt(); ++aIdx; } } @@ -186,16 +186,16 @@ void SwFmtFtn::GetFtnText( XubString& rStr ) const } // returnt den anzuzeigenden String der Fuss-/Endnote -XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) const +OUString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) const { - XubString sRet( GetNumStr() ); - if( !sRet.Len() ) + OUString sRet( GetNumStr() ); + if( sRet.isEmpty() ) { // dann ist die Nummer von Interesse, also ueber die Info diese // besorgen. bool bMakeNum = true; - const SwSectionNode* pSectNd = pTxtAttr - ? SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtAttr ) + const SwSectionNode* pSectNd = m_pTxtAttr + ? SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *m_pTxtAttr ) : 0; if( pSectNd ) @@ -212,8 +212,7 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) co sRet = rFtnEnd.GetSwNumType().GetNumStr( GetNumber() ); if( bInclStrings ) { - sRet.Insert( rFtnEnd.GetPrefix(), 0 ); - sRet += rFtnEnd.GetSuffix(); + sRet = rFtnEnd.GetPrefix() + sRet + rFtnEnd.GetSuffix(); } } } @@ -228,8 +227,7 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) co sRet = pInfo->aFmt.GetNumStr( GetNumber() ); if( bInclStrings ) { - sRet.Insert( pInfo->GetPrefix(), 0 ); - sRet += pInfo->GetSuffix(); + sRet = pInfo->GetPrefix() + sRet + pInfo->GetSuffix(); } } } @@ -246,7 +244,7 @@ SwTxtFtn::SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStartPos ) , m_pTxtNode( 0 ) , m_nSeqNo( USHRT_MAX ) { - rAttr.pTxtAttr = this; + rAttr.m_pTxtAttr = this; SetHasDummyChar(true); } @@ -327,15 +325,14 @@ void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, sal_Bool bDelNode ) } -void SwTxtFtn::SetNumber( const sal_uInt16 nNewNum, const XubString* pStr ) +void SwTxtFtn::SetNumber( const sal_uInt16 nNewNum, const OUString &sNumStr ) { SwFmtFtn& rFtn = (SwFmtFtn&)GetFtn(); - if( pStr && pStr->Len() ) - rFtn.aNumber = *pStr; - else + + rFtn.m_aNumber = sNumStr; + if ( sNumStr.isEmpty() ) { - rFtn.nNumber = nNewNum; - rFtn.aNumber = aEmptyStr; + rFtn.m_nNumber = nNewNum; } OSL_ENSURE( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" ); @@ -392,9 +389,9 @@ void SwTxtFtn::CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const } // also copy user defined number string - if( GetFtn().aNumber.Len() ) + if( !GetFtn().m_aNumber.isEmpty() ) { - const_cast<SwFmtFtn &>(rDest.GetFtn()).aNumber = GetFtn().aNumber; + const_cast<SwFmtFtn &>(rDest.GetFtn()).m_aNumber = GetFtn().m_aNumber; } } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index a46bb1be4c54..33952c044b76 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2933,7 +2933,7 @@ Replace0xFF(SwTxtNode const& rNode, OUStringBuffer & rTxt, sal_Int32 & rTxtStt, { const SwFmtFtn& rFtn = pAttr->GetFtn(); OUString sExpand; - if( rFtn.GetNumStr().Len() ) + if( !rFtn.GetNumStr().isEmpty() ) sExpand = rFtn.GetNumStr(); else if( rFtn.IsEndNote() ) sExpand = rNode.GetDoc()->GetEndNoteInfo().aFmt. @@ -3091,7 +3091,7 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, { const SwFmtFtn& rFtn = pHt->GetFtn(); XubString sExpand; - if( rFtn.GetNumStr().Len() ) + if( !rFtn.GetNumStr().isEmpty() ) sExpand = rFtn.GetNumStr(); else if( rFtn.IsEndNote() ) sExpand = GetDoc()->GetEndNoteInfo().aFmt. diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index d620c2babde5..87a4000c8a28 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -117,7 +117,7 @@ bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos ) case RES_TXTATR_FTN: { const SwFmtFtn& rFtn = pHt->GetFtn(); - if( rFtn.GetNumStr().Len() ) + if( !rFtn.GetNumStr().isEmpty() ) sOut = rFtn.GetNumStr(); else if( rFtn.IsEndNote() ) sOut = rWrt.pDoc->GetEndNoteInfo().aFmt. diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index b6278fd84000..b62fa4839ca1 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -307,7 +307,7 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt ) rWrt.Strm() << sOut.makeStringAndClear().getStr(); HTMLOutFuncs::Out_String( rWrt.Strm(), sFtnName, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol).append('\"'); - if( rFmtFtn.GetNumStr().Len() ) + if( !rFmtFtn.GetNumStr().isEmpty() ) sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_sdfixed); sOut.append('>'); rWrt.Strm() << sOut.makeStringAndClear().getStr(); @@ -409,7 +409,7 @@ void SwHTMLWriter::OutFootEndNotes() String SwHTMLWriter::GetFootEndNoteSym( const SwFmtFtn& rFmtFtn ) { const SwEndNoteInfo * pInfo = 0; - if( rFmtFtn.GetNumStr().Len() == 0 ) + if( rFmtFtn.GetNumStr().isEmpty() ) pInfo = rFmtFtn.IsEndNote() ? &pDoc->GetEndNoteInfo() : &pDoc->GetFtnInfo(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7ea8024e6fec..a6904cec1898 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4249,7 +4249,7 @@ void DocxAttributeOutput::FootnoteEndnoteReference() sal_Int32 nToken = pFootnote->IsEndNote()? XML_endnoteReference: XML_footnoteReference; // write it - if ( pFootnote->GetNumStr().Len() == 0 ) + if ( pFootnote->GetNumStr().isEmpty() ) { // autonumbered m_pSerializer->singleElementNS( XML_w, nToken, diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 254adb2f7d57..89c3ecd577f9 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2394,7 +2394,7 @@ void RtfAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt ) void RtfAttributeOutput::WriteTextFootnoteNumStr(const SwFmtFtn& rFootnote) { - if (!rFootnote.GetNumStr().Len()) + if (rFootnote.GetNumStr().isEmpty()) m_aRun->append(OOO_STRING_SVTOOLS_RTF_CHFTN); else m_aRun->append(msfilter::rtfutil::OutString(rFootnote.GetNumStr(), m_rExport.eCurrentEncoding)); diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 5afe2d88bd9f..9f29d9132281 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -2358,7 +2358,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, { const SwFmtFtn* pFtn = (SwFmtFtn*)aCntnt[ i ]; SwWW8Writer::WriteShort( *rWrt.pTableStrm, - pFtn->GetNumStr().Len() ? 0 : ++nNo ); + !pFtn->GetNumStr().isEmpty() ? 0 : ++nNo ); } } } diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index f1daac939d32..2133eb55cac0 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3091,7 +3091,7 @@ void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pOutArr ) { ww::bytes aAttrArr; - bool bAutoNum = !rFtn.GetNumStr().Len(); // Auto-Nummer + const bool bAutoNum = rFtn.GetNumStr().isEmpty(); // Auto-Nummer if( bAutoNum ) { if( bWrtWW8 ) @@ -3139,7 +3139,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pOutArr ) WriteChar( 0x02 ); // Auto-Nummer-Zeichen else // User-Nummerierung - OutSwString( rFtn.GetNumStr(), 0, rFtn.GetNumStr().Len(), + OutSwString( rFtn.GetNumStr(), 0, rFtn.GetNumStr().getLength(), IsUnicode(), RTL_TEXTENCODING_MS_1252 ); if( pOutArr ) diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 8626adc18cc5..c8241826e313 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -334,7 +334,7 @@ sal_uInt16 SwWW8ImplReader::End_Ftn() // If no automatic numbering use the following char from the main text // as the footnote number if (!rDesc.mbAutoNum) - ((SwTxtFtn*)pFN)->SetNumber(0, &sChar); + ((SwTxtFtn*)pFN)->SetNumber(0, sChar); /* Delete the footnote char from the footnote if its at the beginning diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index a96cdc0251a9..9d7f8443b8dc 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -237,7 +237,9 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) if( aCntntAtPos.pFndTxtAttr && aCntntAtPos.aFnd.pAttr ) { const SwFmtFtn* pFtn = (SwFmtFtn*)aCntntAtPos.aFnd.pAttr; - pFtn->GetFtnText( sTxt ); + OUString sTmp; + pFtn->GetFtnText( sTmp ); + sTxt = sTmp; sTxt.Insert( SW_RESSTR( pFtn->IsEndNote() ? STR_ENDNOTE : STR_FTNNOTE ), 0 ); bBalloon = sal_True; diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index 8a848c31b5f2..cddb20fd0772 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -223,7 +223,7 @@ void SwInsFootNoteDlg::Init() if( rSh.GetCurFtn( &aFtnNote )) { - if(aFtnNote.GetNumStr().Len()) + if (!aFtnNote.GetNumStr().isEmpty()) { sNumStr = aFtnNote.GetNumStr(); |