[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/inc sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Apr 12 23:15:27 PDT 2011
sc/inc/dbcolect.hxx | 2 +-
sc/inc/table.hxx | 2 +-
sc/source/core/data/table2.cxx | 12 ++++++------
sc/source/core/data/table4.cxx | 36 ++++++++++++++++++------------------
sc/source/core/tool/dbcolect.cxx | 7 ++++++-
5 files changed, 32 insertions(+), 27 deletions(-)
New commits:
commit 342d1adaca2f5718561acd945664c2ed74d39f66
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Apr 13 02:10:58 2011 -0400
Silly indentation errors, remove friend statement, bool over sal_Bool.
diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx
index c0e36f2..5c73ea2 100644
--- a/sc/inc/dbcolect.hxx
+++ b/sc/inc/dbcolect.hxx
@@ -44,7 +44,6 @@ class ScDocument;
class ScDBData : public ScDataObject, public ScRefreshTimer
{
-friend class ScDBCollection;
private:
// DBParam
String aName;
@@ -123,6 +122,7 @@ public:
bool operator== (const ScDBData& rData) const;
+ SCTAB GetTable() const;
const String& GetName() const { return aName; }
void GetName(String& rName) const { rName = aName; }
void SetName(const String& rName) { aName = rName; }
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 5df9875..2d8f942 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -690,7 +690,7 @@ public:
/// @return the index of the last changed row (flags and row height, auto pagebreak is ignored).
SCROW GetLastChangedRow() const;
- sal_Bool IsDataFiltered() const;
+ bool IsDataFiltered() const;
sal_uInt8 GetColFlags( SCCOL nCol ) const;
sal_uInt8 GetRowFlags( SCROW nRow ) const;
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 141e221..ce5c7e6 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2628,16 +2628,16 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
DecRecalcLevel();
}
-sal_Bool ScTable::IsDataFiltered() const
+bool ScTable::IsDataFiltered() const
{
- sal_Bool bAnyQuery = sal_False;
+ bool bAnyQuery = false;
ScDBData* pDBData = pDocument->GetFilterDBAtTable(nTab);
if ( pDBData )
{
- ScQueryParam aParam;
- pDBData->GetQueryParam( aParam );
- if ( aParam.GetEntry(0).bDoQuery )
- bAnyQuery = sal_True;
+ ScQueryParam aParam;
+ pDBData->GetQueryParam( aParam );
+ if ( aParam.GetEntry(0).bDoQuery )
+ bAnyQuery = true;
}
return bAnyQuery;
}
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 4522130..4d0c5d1 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -769,8 +769,8 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
bRowFiltered = mpFilteredRows->getValue(nRow);
- if (!bRowFiltered)
- {
+ if (!bRowFiltered)
+ {
switch (eCellType)
{
case CELLTYPE_VALUE:
@@ -958,28 +958,28 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
else if ( eFillCmd == FILL_SIMPLE ) // Auffuellen mit Muster
{
if ((eFillDir == FILL_TO_BOTTOM)||(eFillDir == FILL_TO_TOP))
- {
- long nBegin = 0;
- long nEnd = 0;
- if (nEndY > nRow1)
- {
- nBegin = nRow2+1;
- nEnd = nEndY;
- }
- else
- {
- nBegin = nEndY;
- nEnd = nRow1 -1;
- }
+ {
+ long nBegin = 0;
+ long nEnd = 0;
+ if (nEndY > nRow1)
+ {
+ nBegin = nRow2+1;
+ nEnd = nEndY;
+ }
+ else
+ {
+ nBegin = nEndY;
+ nEnd = nRow1 -1;
+ }
long nNonFiltered = CountNonFilteredRows(nBegin, nEnd);
long nFiltered = nEnd + 1 - nBegin - nNonFiltered;
- if (nIndex >0)
+ if (nIndex > 0)
nIndex = nIndex - nFiltered;
- else
+ else
nIndex = nIndex + nFiltered;
- }
+ }
long nPosIndex = nIndex;
while ( nPosIndex < 0 )
diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx
index bdb09ef..635ab5a 100644
--- a/sc/source/core/tool/dbcolect.cxx
+++ b/sc/source/core/tool/dbcolect.cxx
@@ -222,6 +222,11 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
return *this;
}
+SCTAB ScDBData::GetTable() const
+{
+ return nTable;
+}
+
bool ScDBData::operator== (const ScDBData& rData) const
{
// Daten, die nicht in den Params sind
@@ -828,7 +833,7 @@ ScDBData* ScDBCollection::GetFilterDBAtTable(SCTAB nTab) const
for (sal_uInt16 i = 0; i < nCount; i++)
{
ScDBData* pDBTemp = (ScDBData*)pItems[i];
- if ( pDBTemp->nTable == nTab )
+ if ( pDBTemp->GetTable() == nTab )
{
sal_Bool bFilter = pDBTemp->HasAutoFilter() || pDBTemp->HasQueryParam();
More information about the Libreoffice-commits
mailing list