[Libreoffice-commits] core.git: sw/source
Matteo Casalin
matteo.casalin at yahoo.com
Sun Sep 1 07:53:37 PDT 2013
sw/source/filter/ww8/ww8par5.cxx | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 520130dbdb79ec3c5d617e4c798fab791d7e0af3
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Fri Aug 30 00:45:32 2013 +0200
Remove unneeded member data
Change-Id: Ifc8cd48b9cfdd7d1fcd0ed9472b7080ba8ff6c6c
Reviewed-on: https://gerrit.libreoffice.org/5734
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 42bb38e..59aa231 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -95,8 +95,7 @@ using namespace nsSwDocInfoSubType;
class WW8ReadFieldParams
{
private:
- OUString aData;
- sal_Int32 nLen;
+ const OUString aData;
sal_Int32 nFnd;
sal_Int32 nNext;
sal_Int32 nSavPtr;
@@ -117,7 +116,6 @@ public:
WW8ReadFieldParams::WW8ReadFieldParams( const OUString& _rData )
: aData( _rData )
- , nLen( _rData.getLength() )
, nFnd( 0 )
, nNext( 0 )
, nSavPtr( 0 )
@@ -127,6 +125,8 @@ WW8ReadFieldParams::WW8ReadFieldParams( const OUString& _rData )
Anfuehrungszeichen oder einem Backslash suchen, damit der Feldbefehl
(also INCLUDEPICTURE bzw EINFUeGENGRAFIK bzw ...) ueberlesen wird
*/
+ const sal_Int32 nLen = aData.getLength();
+
while ( nNext<nLen && aData[nNext]==' ' )
++nNext;
@@ -168,7 +168,7 @@ sal_Int32 WW8ReadFieldParams::GoToTokenParam()
// ret: -2: NOT a '\' parameter but normal Text
sal_Int32 WW8ReadFieldParams::SkipToNextToken()
{
- if ( nNext<0 || nNext>=nLen )
+ if ( nNext<0 || nNext>=aData.getLength() )
return -1;
nFnd = FindNextStringPiece(nNext);
@@ -177,7 +177,7 @@ sal_Int32 WW8ReadFieldParams::SkipToNextToken()
nSavPtr = nNext;
- if ( aData[nFnd]=='\\' && nFnd+1<nLen && aData[nFnd+1]!='\\' )
+ if ( aData[nFnd]=='\\' && nFnd+1<aData.getLength() && aData[nFnd+1]!='\\' )
{
const sal_Int32 nRet = aData[++nFnd];
nNext = ++nFnd; // und dahinter setzen
@@ -202,6 +202,7 @@ sal_Int32 WW8ReadFieldParams::SkipToNextToken()
//
sal_Int32 WW8ReadFieldParams::FindNextStringPiece(const sal_Int32 nStart)
{
+ const sal_Int32 nLen = aData.getLength();
sal_Int32 n = nStart<0 ? nFnd : nStart; // Anfang
sal_Int32 n2; // Ende
More information about the Libreoffice-commits
mailing list