[Libreoffice-commits] .: 3 commits - sw/source
Michael Stahl
mst at kemper.freedesktop.org
Tue Jul 17 08:53:32 PDT 2012
sw/source/core/doc/docbm.cxx | 9 ++++++---
sw/source/core/txtnode/ndtxt.cxx | 2 +-
sw/source/filter/inc/wrtswtbl.hxx | 8 ++++----
sw/source/filter/writer/wrtswtbl.cxx | 7 ++++---
4 files changed, 15 insertions(+), 11 deletions(-)
New commits:
commit 78e8911d25ff33892fd3121b3f0a8df6a6439d72
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jul 17 17:44:05 2012 +0200
SwWriteTable: warning C4389: '==': signed/unsigned mismatch
Change-Id: I58b2f74aef426e880ed7f2867e4cb0bbdff44328
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index fbb62f5..15f87bd 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -292,7 +292,7 @@ protected:
void MergeBorders( const editeng::SvxBorderLine* pBorderLine, sal_Bool bTable );
- sal_uInt16 MergeBoxBorders( const SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 MergeBoxBorders(const SwTableBox *pBox, size_t nRow, size_t nCol,
sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
sal_uInt16 &rTopBorder, sal_uInt16 &rBottomBorder );
@@ -308,16 +308,16 @@ public:
sal_uInt16 GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
sal_uInt16 GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
- long GetAbsHeight( long nRawWidth, sal_uInt16 nRow, sal_uInt16 nRowSpan ) const;
-protected:
+ long GetAbsHeight(long nRawWidth, size_t nRow, sal_uInt16 nRowSpan) const;
+protected:
long GetLineHeight( const SwTableLine *pLine );
long GetLineHeight( const SwTableBox *pBox ) const;
const SvxBrushItem *GetLineBrush( const SwTableBox *pBox,
SwWriteTableRow *pRow );
sal_uInt16 GetLeftSpace( sal_uInt16 nCol ) const;
- sal_uInt16 GetRightSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetRightSpace(size_t nCol, sal_uInt16 nColSpan) const;
public:
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index d52ff11..ef8697c 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -241,7 +241,7 @@ void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
- sal_uInt16 nRow, sal_uInt16 nCol,
+ size_t const nRow, size_t const nCol,
sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
sal_uInt16& rTopBorder,
sal_uInt16 &rBottomBorder )
@@ -326,7 +326,8 @@ sal_uInt16 SwWriteTable::GetLeftSpace( sal_uInt16 nCol ) const
return nSpace;
}
-sal_uInt16 SwWriteTable::GetRightSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
+sal_uInt16
+SwWriteTable::GetRightSpace(size_t const nCol, sal_uInt16 nColSpan) const
{
sal_uInt16 nSpace = nCellPadding;
@@ -377,7 +378,7 @@ sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) con
GetBaseWidth() );
}
-long SwWriteTable::GetAbsHeight( long nRawHeight, sal_uInt16 nRow,
+long SwWriteTable::GetAbsHeight(long nRawHeight, size_t const nRow,
sal_uInt16 nRowSpan ) const
{
nRawHeight -= (2*nCellPadding + nCellSpacing);
commit b8aa2fa9506967e20fd0db0af30de599f91cf10a
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jul 17 17:36:16 2012 +0200
warning C4701: potentially uninitialized local variable used
Change-Id: Id82ecd3bfa7da6740d475ccaeea599529b090fe6
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 1a710a8..85336a8 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3107,7 +3107,7 @@ const ModelToViewHelper::ConversionMap*
{
const SwTxtAttr* pAttr = (*pSwpHints2)[i];
bool bReplace = false;
- xub_StrLen nFieldPos;
+ xub_StrLen nFieldPos(STRING_NOTFOUND);
rtl::OUString aExpand;
switch (pAttr->Which())
{
commit bcd8f0ce8c5ed677be168085913300b8bab02e75
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jul 17 17:28:13 2012 +0200
docbm.cxx: MSVC wants const_iterators and complains with error C2440
Change-Id: I9dfc01a3405f685437a562e8330b5821864de0da
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 04074c7..a00e075 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1418,7 +1418,8 @@ void _SaveCntntIdx(SwDoc* pDoc,
{
aSave.SetTypeAndCount( 0x400, 0 );
const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
- for( SwUnoCrsrTbl::iterator it = rTbl.begin(); it != rTbl.end(); ++it )
+ for (SwUnoCrsrTbl::const_iterator it = rTbl.begin();
+ it != rTbl.end(); ++it)
{
FOREACHPAM_START( *it )
lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, sal_False );
@@ -1558,7 +1559,8 @@ void _RestoreCntntIdx(SwDoc* pDoc,
{
sal_uInt16 nCnt = 0;
const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
- for( SwUnoCrsrTbl::iterator it = rTbl.begin(); it != rTbl.end(); ++it )
+ for (SwUnoCrsrTbl::const_iterator it = rTbl.begin();
+ it != rTbl.end(); ++it)
{
FOREACHPAM_START( *it )
if( aSave.GetCount() == nCnt )
@@ -1718,7 +1720,8 @@ void _RestoreCntntIdx(std::vector<sal_uLong> &rSaveArr,
{
sal_uInt16 nCnt = 0;
const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
- for( SwUnoCrsrTbl::iterator it = rTbl.begin(); it != rTbl.end(); ++it )
+ for (SwUnoCrsrTbl::const_iterator it = rTbl.begin();
+ it != rTbl.end(); ++it)
{
FOREACHPAM_START( *it )
if( aSave.GetCount() == nCnt )
More information about the Libreoffice-commits
mailing list