Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


regards
From 13a33d71df128454159d0e911f55179cddac2d72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= <pjacquod@alumni.ethz.ch>
Date: Thu, 25 Nov 2010 20:52:47 +0100
Subject: [PATCH 7/9] warnings removal in binfilter sw_sw3redln.cxx

all code deletion due to compiler warning with message:

sw_sw3redln.cxx:255:25:
warning: comparison is always false due to limited range of data type
---
 binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx |   21 ++-------------------
 1 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx 
b/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx
index e2453f4..2a3f9ef 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx
@@ -251,12 +251,7 @@ xub_StrLen lcl_sw3io_getNodeOff( const SwNodeIndex& rNdIdx, xub_StrLen 
nCntntIdx
     // unbenutzte Content-Position.
     const SwNode& rNode = rNdIdx.GetNode();
     if( rNode.IsCntntNode() )
-    {
-        if( nCntntIdx > STRING_MAXLEN52 )
-            return STRING_MAXLEN52;
-        else
-            return nCntntIdx;
-    }
+        return nCntntIdx;
 
     if( rNode.IsStartNode() )
         return 0;
@@ -294,10 +289,6 @@ xub_StrLen lcl_sw3io_getNodeOff( const SwNodeIndex& rNdIdx, xub_StrLen 
nCntntIdx
 /*?*/          // If the redline is within one node and starts behind the
 /*?*/          // last position that is possible within the 5.2 version,
 /*?*/          // it will be ignored.
-/*?*/          if( pPos->nContent.GetIndex() > STRING_MAXLEN52 &&
-/*?*/                  pPos->nNode.GetIndex() == pEndPos->nNode.GetIndex() &&
-/*?*/                  pEndPos->nContent.GetIndex() > STRING_MAXLEN52 )
-/*?*/                  continue;
 /*?*/ 
 /*?*/          if( pDoc->IsInHeaderFooter( pPos->nNode ) )
 /*?*/          {
@@ -457,7 +448,7 @@ xub_StrLen lcl_sw3io_getNodeOff( const SwNodeIndex& rNdIdx, xub_StrLen nCntntIdx
 /*N*/          xub_StrLen nLen = rNode.GetCntntNode()->Len();
 /*N*/          xub_StrLen nIdx = static_cast< xub_StrLen >( nNodeOff+nCntntOff );
 /*N*/          ASSERT( nIdx>=0 && nIdx<=nLen, "ungueltiger Cntnt-Offset" );
-/*N*/          if( nIdx<0 || nIdx > nLen )
+/*N*/          if( nIdx > nLen )
 /*N*/          {
 /*N*/                  bInvalid = sal_True;
 /*N*/          }
@@ -635,14 +626,6 @@ xub_StrLen lcl_sw3io_getNodeOff( const SwNodeIndex& rNdIdx, xub_StrLen 
nCntntIdx
 /*?*/                          else if( pContentIdx )
 /*?*/                                  cFlags |= 0x20;
 /*?*/ 
-/*?*/                          xub_StrLen nOffs = pMark->GetNodeOff();
-/*?*/                          if( pDoc->GetNodes()[nIdx]->IsCntntNode() &&
-/*?*/                                  nOffs > STRING_MAXLEN52 )
-/*?*/                                  nOffs = STRING_MAXLEN52;
-/*?*/                          *pStrm  << (BYTE)  cFlags
-/*?*/                                          << (UINT16)pMark->GetId()
-/*?*/                                          << (UINT16)nOffs;
-/*?*/ 
 /*?*/                          if( pContentIdx )
 /*?*/                          {
 /*?*/                                  ASSERT( pContentIdx->GetNode().EndOfSectionIndex() -
-- 
1.7.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.