Kaydet (Commit) 80c233cd authored tarafından Markus Mohrhard's avatar Markus Mohrhard

search for hidden rows/columns and not filtered areas, fdo#48449

üst 95803f44
...@@ -674,7 +674,7 @@ public: ...@@ -674,7 +674,7 @@ public:
/// @return the index of the last changed row (flags and row height, auto pagebreak is ignored). /// @return the index of the last changed row (flags and row height, auto pagebreak is ignored).
SCROW GetLastChangedRow() const; SCROW GetLastChangedRow() const;
bool IsDataFiltered() const; bool IsDataFiltered(SCCOL nColStart, SCROW nRowStart, SCCOL nColEnd, SCROW nRowEnd) const;
sal_uInt8 GetColFlags( SCCOL nCol ) const; sal_uInt8 GetColFlags( SCCOL nCol ) const;
sal_uInt8 GetRowFlags( SCROW nRow ) const; sal_uInt8 GetRowFlags( SCROW nRow ) const;
......
...@@ -2806,19 +2806,19 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow) ...@@ -2806,19 +2806,19 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
DecRecalcLevel(); DecRecalcLevel();
} }
bool ScTable::IsDataFiltered() const bool ScTable::IsDataFiltered(SCCOL nColStart, SCROW nRowStart, SCCOL nColEnd, SCROW nRowEnd) const
{ {
bool bAnyQuery = false; for (SCROW i = nRowStart; i <= nRowEnd; ++i)
const ScDBCollection* pDBs = pDocument->GetDBCollection();
const ScDBData* pDBData = pDBs->GetFilterDBAtTable(nTab);
if ( pDBData )
{ {
ScQueryParam aParam; if (RowHidden(i))
pDBData->GetQueryParam( aParam ); return true;
if ( aParam.GetEntry(0).bDoQuery )
bAnyQuery = true;
} }
return bAnyQuery; for (SCCOL i = nColStart; i <= nColEnd; ++i)
{
if (ColHidden(i))
return true;
}
return false;
} }
......
...@@ -198,7 +198,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ...@@ -198,7 +198,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rMinDigits = 0; rMinDigits = 0;
rListData = NULL; rListData = NULL;
rCmd = FILL_SIMPLE; rCmd = FILL_SIMPLE;
if ( (nScFillModeMouseModifier & KEY_MOD1) || IsDataFiltered() ) if ( (nScFillModeMouseModifier & KEY_MOD1) || IsDataFiltered(nCol1, nRow1, nCol2, nRow2) )
return ; // Ctrl-Taste: Copy return ; // Ctrl-Taste: Copy
SCCOL nAddX; SCCOL nAddX;
...@@ -531,7 +531,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ...@@ -531,7 +531,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uLong nIMin = nIStart; sal_uLong nIMin = nIStart;
sal_uLong nIMax = nIEnd; sal_uLong nIMax = nIEnd;
PutInOrder(nIMin,nIMax); PutInOrder(nIMin,nIMax);
bool bHasFiltered = IsDataFiltered(); bool bHasFiltered = IsDataFiltered(nCol1, nRow1, nCol2, nRow2);
if (!bHasFiltered) if (!bHasFiltered)
{ {
...@@ -1015,7 +1015,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n ...@@ -1015,7 +1015,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
aValue = ((ScStringCell*)pCell)->GetString(); aValue = ((ScStringCell*)pCell)->GetString();
else else
aValue = ((ScEditCell*)pCell)->GetString(); aValue = ((ScEditCell*)pCell)->GetString();
if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered() ) if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered(nCol1, nRow1, nCol2, nRow2) )
{ {
sal_Int32 nVal; sal_Int32 nVal;
sal_uInt16 nCellDigits = 0; // look at each source cell individually sal_uInt16 nCellDigits = 0; // look at each source cell individually
...@@ -1036,7 +1036,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n ...@@ -1036,7 +1036,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
{ {
// dabei kann's keinen Ueberlauf geben... // dabei kann's keinen Ueberlauf geben...
double nVal = ((ScValueCell*)pCell)->GetValue(); double nVal = ((ScValueCell*)pCell)->GetValue();
if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered() ) if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered(nCol1, nRow1, nCol2, nRow2) )
nVal += (double) nDelta; nVal += (double) nDelta;
Color* pColor; Color* pColor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment