summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/opengrf.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-06 10:09:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-07 08:19:14 +0100
commit536a6d6ca67d01c8470c242c6f1fd0750496eed4 (patch)
treecc2aed75621456aaeb31d26e910cc61baf3bfdd7 /sfx2/source/appl/opengrf.cxx
parent53a318196859140deb4b3c317db583a90cfd604c (diff)
loplugin:flatten in sfx2
Change-Id: If4e07d497ead58a2ff58b5fdedd282b8784be421 Reviewed-on: https://gerrit.libreoffice.org/67435 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/appl/opengrf.cxx')
-rw-r--r--sfx2/source/appl/opengrf.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 873bd7914189..bff6d3d32eea 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -199,36 +199,36 @@ void SvxOpenGraphicDialog::SetPath( const OUString& rPath, bool bLinkState )
void SvxOpenGraphicDialog::EnableLink( bool state )
{
- if( mpImpl->xCtrlAcc.is() )
+ if( !mpImpl->xCtrlAcc.is() )
+ return;
+
+ try
+ {
+ mpImpl->xCtrlAcc->enableControl( ExtendedFilePickerElementIds::CHECKBOX_LINK, state );
+ }
+ catch(const IllegalArgumentException&)
{
- try
- {
- mpImpl->xCtrlAcc->enableControl( ExtendedFilePickerElementIds::CHECKBOX_LINK, state );
- }
- catch(const IllegalArgumentException&)
- {
#ifdef DBG_UTIL
- OSL_FAIL( "Cannot enable \"link\" checkbox" );
+ OSL_FAIL( "Cannot enable \"link\" checkbox" );
#endif
- }
}
}
void SvxOpenGraphicDialog::AsLink(bool bState)
{
- if( mpImpl->xCtrlAcc.is() )
+ if( !mpImpl->xCtrlAcc.is() )
+ return;
+
+ try
+ {
+ mpImpl->xCtrlAcc->setValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, Any(bState) );
+ }
+ catch(const IllegalArgumentException&)
{
- try
- {
- mpImpl->xCtrlAcc->setValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, Any(bState) );
- }
- catch(const IllegalArgumentException&)
- {
#ifdef DBG_UTIL
- OSL_FAIL( "Cannot check \"link\" checkbox" );
+ OSL_FAIL( "Cannot check \"link\" checkbox" );
#endif
- }
}
}