summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser/dataview.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 08:56:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 09:39:03 +0200
commit598a65a3c1632c24f2aac38c5a2c9f6a55618cd6 (patch)
treeab510c8d34e95b8414c0a43726a0152073ed277d /dbaccess/source/ui/browser/dataview.cxx
parentb9db7c7236ab75199c281a510546d6778d28e474 (diff)
loplugin:flatten in dbaccess
Change-Id: Ifcfd3637fbce6dc3a07a1859f102a6ac85149190 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92237 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/browser/dataview.cxx')
-rw-r--r--dbaccess/source/ui/browser/dataview.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx
index 83cda7b2f2ef..724969302a54 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -139,26 +139,26 @@ namespace dbaui
m_xController->notifyHiContrastChanged();
}
- if ( nType == StateChangedType::InitShow )
+ if ( nType != StateChangedType::InitShow )
+ return;
+
+ // now that there's a view which is finally visible, remove the "Hidden" value from the
+ // model's arguments.
+ try
{
- // now that there's a view which is finally visible, remove the "Hidden" value from the
- // model's arguments.
- try
- {
- Reference< XController > xController( m_xController->getXController(), UNO_SET_THROW );
- Reference< XModel > xModel = xController->getModel();
- if ( xModel.is() )
- {
- ::comphelper::NamedValueCollection aArgs( xModel->getArgs() );
- aArgs.remove( "Hidden" );
- xModel->attachResource( xModel->getURL(), aArgs.getPropertyValues() );
- }
- }
- catch( const Exception& )
+ Reference< XController > xController( m_xController->getXController(), UNO_SET_THROW );
+ Reference< XModel > xModel = xController->getModel();
+ if ( xModel.is() )
{
- DBG_UNHANDLED_EXCEPTION("dbaccess");
+ ::comphelper::NamedValueCollection aArgs( xModel->getArgs() );
+ aArgs.remove( "Hidden" );
+ xModel->attachResource( xModel->getURL(), aArgs.getPropertyValues() );
}
}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION("dbaccess");
+ }
}
void ODataView::DataChanged( const DataChangedEvent& rDCEvt )
{