[Libreoffice-commits] .: 2 commits - sc/inc sc/qa sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Jan 7 21:25:30 PST 2011
sc/inc/table.hxx | 10 +++++-----
sc/qa/unit/ucalc.cxx | 2 --
sc/source/core/data/table2.cxx | 22 +++++++++++-----------
3 files changed, 16 insertions(+), 18 deletions(-)
New commits:
commit e6c1ac1fc9dcfd0d806bc2ca4c04a46be4482d85
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Sat Jan 8 00:24:52 2011 -0500
BOOL to bool, to remove warnings on Windows.
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 82797e4..d02b689 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -297,7 +297,7 @@ public:
BOOL* pOnlyNotBecauseOfMatrix = NULL ) const;
BOOL HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const;
- BOOL HasSelectionMatrixFragment( const ScMarkData& rMark ) const;
+ bool HasSelectionMatrixFragment( const ScMarkData& rMark ) const;
BOOL IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes = false ) const;
@@ -507,8 +507,8 @@ public:
const SvxBorderLine** ppRight, const SvxBorderLine** ppBottom ) const;
bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nMask ) const;
- BOOL HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const;
- BOOL ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
+ bool HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const;
+ bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
BOOL bRefresh, BOOL bAttrs );
const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, USHORT nWhich ) const;
@@ -569,8 +569,8 @@ public:
BOOL IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const;
- BOOL ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags );
- BOOL RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags );
+ bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags );
+ bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags );
void ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = NULL );
void DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark );
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index e7bcd7f..7994d91 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1336,25 +1336,25 @@ bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
}
-BOOL ScTable::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const
+bool ScTable::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const
{
- BOOL bFound=FALSE;
+ bool bFound = false;
for (SCCOL i=0; i<=MAXCOL && !bFound; i++)
bFound |= aCol[i].HasAttribSelection( rMark, nMask );
return bFound;
}
-BOOL ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
+bool ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
BOOL bRefresh, BOOL bAttrs )
{
if (!(ValidCol(nStartCol) && ValidCol(rEndCol)))
{
DBG_ERRORFILE("ScTable::ExtendMerge: invalid column number");
- return FALSE;
+ return false;
}
- BOOL bFound=FALSE;
+ bool bFound = false;
SCCOL nOldEndX = rEndCol;
SCROW nOldEndY = rEndRow;
for (SCCOL i=nStartCol; i<=nOldEndX; i++)
@@ -1596,9 +1596,9 @@ BOOL ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR
}
-BOOL ScTable::HasSelectionMatrixFragment( const ScMarkData& rMark ) const
+bool ScTable::HasSelectionMatrixFragment( const ScMarkData& rMark ) const
{
- BOOL bFound=FALSE;
+ bool bFound = false;
for (SCCOL i=0; i<=MAXCOL && !bFound; i++)
bFound |= aCol[i].HasSelectionMatrixFragment(rMark);
return bFound;
@@ -2002,10 +2002,10 @@ void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL bRem
}
-BOOL ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+bool ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
INT16 nFlags )
{
- BOOL bChanged = FALSE;
+ bool bChanged = false;
if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
for (SCCOL i = nStartCol; i <= nEndCol; i++)
bChanged |= aCol[i].ApplyFlags(nStartRow, nEndRow, nFlags);
@@ -2013,10 +2013,10 @@ BOOL ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
}
-BOOL ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
INT16 nFlags )
{
- BOOL bChanged = FALSE;
+ bool bChanged = false;
if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
for (SCCOL i = nStartCol; i <= nEndCol; i++)
bChanged |= aCol[i].RemoveFlags(nStartRow, nEndRow, nFlags);
commit 368da4c5a998be4986a9484fde1e59201c1c07ee
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Sat Jan 8 00:24:06 2011 -0500
Now the matrix test passes on Windows. Re-enabling.
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index a52495e..abb8dd4 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -85,9 +85,7 @@ public:
CPPUNIT_TEST(testSUM);
CPPUNIT_TEST(testNamedRange);
CPPUNIT_TEST(testCSV);
-#ifndef WNT
CPPUNIT_TEST(testMatrix);
-#endif
CPPUNIT_TEST_SUITE_END();
private:
More information about the Libreoffice-commits
mailing list