Kaydet (Commit) 923fd249 authored tarafından Noel Grandin's avatar Noel Grandin

convert svt::table::TableArea to scoped enum

and drop unused TableAreaDataArea enumerator

Change-Id: I00da558ab899dccbeaa9786c65f7a2831f323b25
üst 7bd5d9c8
...@@ -122,6 +122,7 @@ for d in definitionSet: ...@@ -122,6 +122,7 @@ for d in definitionSet:
"sw/inc/flddat.hxx", "sw/inc/flddat.hxx",
"sw/source/uibase/config/modcfg.cxx", # InsertConfigProp "sw/source/uibase/config/modcfg.cxx", # InsertConfigProp
"sw/inc/calc.hxx", # SwCalcOper "sw/inc/calc.hxx", # SwCalcOper
"svtools/source/config/helpopt.cxx", # HelpProperty
# Windows or OSX only # Windows or OSX only
"include/canvas/rendering/icolorbuffer.hxx", "include/canvas/rendering/icolorbuffer.hxx",
"include/vcl/commandevent.hxx", "include/vcl/commandevent.hxx",
......
...@@ -142,12 +142,11 @@ namespace svt { namespace table ...@@ -142,12 +142,11 @@ namespace svt { namespace table
//= TableArea //= TableArea
enum TableArea enum class TableArea
{ {
TableAreaColumnHeaders, ColumnHeaders,
TableAreaRowHeaders, RowHeaders,
TableAreaDataArea, All
TableAreaAll
}; };
......
...@@ -148,7 +148,7 @@ namespace svt { namespace table ...@@ -148,7 +148,7 @@ namespace svt { namespace table
requestedWidthLogical = maxWidthLogical; requestedWidthLogical = maxWidthLogical;
} }
pColumn->setWidth( requestedWidthLogical ); pColumn->setWidth( requestedWidthLogical );
i_tableControl.invalidate( TableAreaAll ); i_tableControl.invalidate( TableArea::All );
} }
i_tableControl.setPointer( Pointer() ); i_tableControl.setPointer( Pointer() );
......
...@@ -500,7 +500,7 @@ namespace svt { namespace table ...@@ -500,7 +500,7 @@ namespace svt { namespace table
if ( !m_bUpdatingColWidths ) if ( !m_bUpdatingColWidths )
{ {
impl_ni_relayout( i_column ); impl_ni_relayout( i_column );
invalidate( TableAreaAll ); invalidate( TableArea::All );
} }
nGroup &= ~ColumnAttributeGroup::WIDTH; nGroup &= ~ColumnAttributeGroup::WIDTH;
...@@ -1055,7 +1055,7 @@ namespace svt { namespace table ...@@ -1055,7 +1055,7 @@ namespace svt { namespace table
// if the column widths changed, ensure everything is repainted // if the column widths changed, ensure everything is repainted
if ( anyColumnWidthChanged ) if ( anyColumnWidthChanged )
invalidate( TableAreaAll ); invalidate( TableArea::All );
// if the column resizing happened to leave some space at the right, but there are columns // if the column resizing happened to leave some space at the right, but there are columns
// scrolled out to the left, scroll them in // scrolled out to the left, scroll them in
...@@ -1788,19 +1788,15 @@ namespace svt { namespace table ...@@ -1788,19 +1788,15 @@ namespace svt { namespace table
{ {
switch ( i_what ) switch ( i_what )
{ {
case TableAreaColumnHeaders: case TableArea::ColumnHeaders:
m_pDataWindow->Invalidate( calcHeaderRect( true ) ); m_pDataWindow->Invalidate( calcHeaderRect( true ) );
break; break;
case TableAreaRowHeaders: case TableArea::RowHeaders:
m_pDataWindow->Invalidate( calcHeaderRect( false ) ); m_pDataWindow->Invalidate( calcHeaderRect( false ) );
break; break;
case TableAreaDataArea: case TableArea::All:
m_pDataWindow->Invalidate( impl_getAllVisibleDataCellArea() );
break;
case TableAreaAll:
m_pDataWindow->Invalidate(); m_pDataWindow->Invalidate();
m_pDataWindow->GetParent()->Invalidate( InvalidateFlags::Transparent ); m_pDataWindow->GetParent()->Invalidate( InvalidateFlags::Transparent );
break; break;
......
...@@ -625,7 +625,7 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) ...@@ -625,7 +625,7 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event )
// So, just in case, invalidate the column header area, too. // So, just in case, invalidate the column header area, too.
VclPtr< TableControl > pTable = GetAsDynamic< TableControl >(); VclPtr< TableControl > pTable = GetAsDynamic< TableControl >();
ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" );
pTable->getTableControlInterface().invalidate( TableAreaColumnHeaders ); pTable->getTableControlInterface().invalidate( TableArea::ColumnHeaders );
} }
...@@ -637,7 +637,7 @@ void SAL_CALL SVTXGridControl::rowHeadingChanged( const GridDataEvent& ) ...@@ -637,7 +637,7 @@ void SAL_CALL SVTXGridControl::rowHeadingChanged( const GridDataEvent& )
ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowHeadingChanged: no control (anymore)!" ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowHeadingChanged: no control (anymore)!" );
// TODO: we could do better than this - invalidate the header area only // TODO: we could do better than this - invalidate the header area only
pTable->getTableControlInterface().invalidate( TableAreaRowHeaders ); pTable->getTableControlInterface().invalidate( TableArea::RowHeaders );
} }
......
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