diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-22 11:26:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-22 11:54:12 +0100 |
commit | 1ae61b0ac4187b2938647f3ca0289a070a5dc7d2 (patch) | |
tree | 9461c0532919f4fe61f3e0e3fa8556e954244fbd /svtools/source/dialogs/PlaceEditDialog.cxx | |
parent | 04bb9549e0a0ee567f3bd48a7707286c5abd631a (diff) |
loplugin:flatten in svtools
almost completely automatically rewritten, only had to tweak
the indentation on a couple of lines.
Change-Id: Ieec92e5b602d180d7ec556e3421ce3c835c1f646
Reviewed-on: https://gerrit.libreoffice.org/45072
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/dialogs/PlaceEditDialog.cxx')
-rw-r--r-- | svtools/source/dialogs/PlaceEditDialog.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 0a7ac213d5e7..e1318d1aa5dc 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -223,34 +223,34 @@ void PlaceEditDialog::InitDetails( ) IMPL_LINK( PlaceEditDialog, OKHdl, Button*, /*pBtn*/, void) { - if ( m_xCurrentDetails.get() ) - { - OUString sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DecodeMechanism::WithCharset ); + if ( !m_xCurrentDetails.get() ) + return; - if ( sUrl.startsWith( GDRIVE_BASE_URL ) - || sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL ) - || sUrl.startsWith( ONEDRIVE_BASE_URL ) ) - { - m_pBTRepoRefresh->Click(); + OUString sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DecodeMechanism::WithCharset ); - sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DecodeMechanism::WithCharset ); - INetURLObject aHostUrl( sUrl ); - OUString sRepoId = aHostUrl.GetMark(); + if ( sUrl.startsWith( GDRIVE_BASE_URL ) + || sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL ) + || sUrl.startsWith( ONEDRIVE_BASE_URL ) ) + { + m_pBTRepoRefresh->Click(); - if ( !sRepoId.isEmpty() ) - { - EndDialog( RET_OK ); - } - else - { - // TODO: repository id missing. Auth error? - } + sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DecodeMechanism::WithCharset ); + INetURLObject aHostUrl( sUrl ); + OUString sRepoId = aHostUrl.GetMark(); + + if ( !sRepoId.isEmpty() ) + { + EndDialog( RET_OK ); } else { - EndDialog( RET_OK ); + // TODO: repository id missing. Auth error? } } + else + { + EndDialog( RET_OK ); + } } IMPL_LINK( PlaceEditDialog, DelHdl, Button*, /*pButton*/, void) |