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:
/// @return the index of the last changed row (flags and row height, auto pagebreak is ignored).
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 GetRowFlags( SCROW nRow ) const;
......
......@@ -2806,19 +2806,19 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
DecRecalcLevel();
}
bool ScTable::IsDataFiltered() const
bool ScTable::IsDataFiltered(SCCOL nColStart, SCROW nRowStart, SCCOL nColEnd, SCROW nRowEnd) const
{
bool bAnyQuery = false;
const ScDBCollection* pDBs = pDocument->GetDBCollection();
const ScDBData* pDBData = pDBs->GetFilterDBAtTable(nTab);
if ( pDBData )
for (SCROW i = nRowStart; i <= nRowEnd; ++i)
{
ScQueryParam aParam;
pDBData->GetQueryParam( aParam );
if ( aParam.GetEntry(0).bDoQuery )
bAnyQuery = true;
if (RowHidden(i))
return 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,
rMinDigits = 0;
rListData = NULL;
rCmd = FILL_SIMPLE;
if ( (nScFillModeMouseModifier & KEY_MOD1) || IsDataFiltered() )
if ( (nScFillModeMouseModifier & KEY_MOD1) || IsDataFiltered(nCol1, nRow1, nCol2, nRow2) )
return ; // Ctrl-Taste: Copy
SCCOL nAddX;
......@@ -531,7 +531,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uLong nIMin = nIStart;
sal_uLong nIMax = nIEnd;
PutInOrder(nIMin,nIMax);
bool bHasFiltered = IsDataFiltered();
bool bHasFiltered = IsDataFiltered(nCol1, nRow1, nCol2, nRow2);
if (!bHasFiltered)
{
......@@ -1015,7 +1015,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
aValue = ((ScStringCell*)pCell)->GetString();
else
aValue = ((ScEditCell*)pCell)->GetString();
if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered() )
if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered(nCol1, nRow1, nCol2, nRow2) )
{
sal_Int32 nVal;
sal_uInt16 nCellDigits = 0; // look at each source cell individually
......@@ -1036,7 +1036,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
{
// dabei kann's keinen Ueberlauf geben...
double nVal = ((ScValueCell*)pCell)->GetValue();
if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered() )
if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered(nCol1, nRow1, nCol2, nRow2) )
nVal += (double) nDelta;
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