diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-14 10:00:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-14 14:22:24 +0200 |
commit | 923fd24972e9d3dac4fa5ed863e42bb28cf6605a (patch) | |
tree | ef7903908f6323f4ca3cce7644f8d45a510e2893 | |
parent | 7bd5d9c81b30609d4d10dba091021352e94a7837 (diff) |
convert svt::table::TableArea to scoped enum
and drop unused TableAreaDataArea enumerator
Change-Id: I00da558ab899dccbeaa9786c65f7a2831f323b25
-rwxr-xr-x | compilerplugins/clang/unusedenumconstants.py | 1 | ||||
-rw-r--r-- | svtools/inc/table/tablecontrolinterface.hxx | 9 | ||||
-rw-r--r-- | svtools/source/table/mousefunction.cxx | 2 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.cxx | 14 | ||||
-rw-r--r-- | svtools/source/uno/svtxgridcontrol.cxx | 4 |
5 files changed, 13 insertions, 17 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py index 4db682b53f30..3cc97382d6b5 100755 --- a/compilerplugins/clang/unusedenumconstants.py +++ b/compilerplugins/clang/unusedenumconstants.py @@ -122,6 +122,7 @@ for d in definitionSet: "sw/inc/flddat.hxx", "sw/source/uibase/config/modcfg.cxx", # InsertConfigProp "sw/inc/calc.hxx", # SwCalcOper + "svtools/source/config/helpopt.cxx", # HelpProperty # Windows or OSX only "include/canvas/rendering/icolorbuffer.hxx", "include/vcl/commandevent.hxx", diff --git a/svtools/inc/table/tablecontrolinterface.hxx b/svtools/inc/table/tablecontrolinterface.hxx index 2e5e6d4d19b6..d9f37e28f69a 100644 --- a/svtools/inc/table/tablecontrolinterface.hxx +++ b/svtools/inc/table/tablecontrolinterface.hxx @@ -142,12 +142,11 @@ namespace svt { namespace table //= TableArea - enum TableArea + enum class TableArea { - TableAreaColumnHeaders, - TableAreaRowHeaders, - TableAreaDataArea, - TableAreaAll + ColumnHeaders, + RowHeaders, + All }; diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index bb0126872ae0..1cf7f22d829b 100644 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -148,7 +148,7 @@ namespace svt { namespace table requestedWidthLogical = maxWidthLogical; } pColumn->setWidth( requestedWidthLogical ); - i_tableControl.invalidate( TableAreaAll ); + i_tableControl.invalidate( TableArea::All ); } i_tableControl.setPointer( Pointer() ); diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index e7c703bebcf3..16e711e4b39b 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -500,7 +500,7 @@ namespace svt { namespace table if ( !m_bUpdatingColWidths ) { impl_ni_relayout( i_column ); - invalidate( TableAreaAll ); + invalidate( TableArea::All ); } nGroup &= ~ColumnAttributeGroup::WIDTH; @@ -1055,7 +1055,7 @@ namespace svt { namespace table // if the column widths changed, ensure everything is repainted if ( anyColumnWidthChanged ) - invalidate( TableAreaAll ); + invalidate( TableArea::All ); // if the column resizing happened to leave some space at the right, but there are columns // scrolled out to the left, scroll them in @@ -1788,19 +1788,15 @@ namespace svt { namespace table { switch ( i_what ) { - case TableAreaColumnHeaders: + case TableArea::ColumnHeaders: m_pDataWindow->Invalidate( calcHeaderRect( true ) ); break; - case TableAreaRowHeaders: + case TableArea::RowHeaders: m_pDataWindow->Invalidate( calcHeaderRect( false ) ); break; - case TableAreaDataArea: - m_pDataWindow->Invalidate( impl_getAllVisibleDataCellArea() ); - break; - - case TableAreaAll: + case TableArea::All: m_pDataWindow->Invalidate(); m_pDataWindow->GetParent()->Invalidate( InvalidateFlags::Transparent ); break; diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 574180953fa0..4fc636ccc440 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -625,7 +625,7 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) // So, just in case, invalidate the column header area, too. VclPtr< TableControl > pTable = GetAsDynamic< TableControl >(); 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& ) ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowHeadingChanged: no control (anymore)!" ); // TODO: we could do better than this - invalidate the header area only - pTable->getTableControlInterface().invalidate( TableAreaRowHeaders ); + pTable->getTableControlInterface().invalidate( TableArea::RowHeaders ); } |