diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-03 08:41:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-03 11:12:07 +0200 |
commit | e54777276d28e6bbceefa07e260926c81790938c (patch) | |
tree | 54aee65d9ab60e0dafbd574c1d0849b516af2367 /desktop/source/lib/init.cxx | |
parent | 32090b018d9ff81659a4c9ed41c64109ebebe4fc (diff) |
loplugin:flatten in configmgr..i18nutil
Change-Id: Idaeed33df4f1dd1b2acbdaf8a895c5d56c3ca14c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99980
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/lib/init.cxx')
-rw-r--r-- | desktop/source/lib/init.cxx | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index bac4d4da4cbd..e844243207d8 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3644,84 +3644,84 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned long if (!pWindow && nWindowId >= 1000000000 /* why unsigned? */) pWindow = getSidebarWindow(); - if (aMap.find("id") != aMap.end()) - { - static const OUString sClickAction("CLICK"); - static const OUString sSelectAction("SELECT"); - static const OUString sClearAction("CLEAR"); - static const OUString sTypeAction("TYPE"); - static const OUString sUpAction("UP"); - static const OUString sDownAction("DOWN"); - static const OUString sValue("VALUE"); + if (aMap.find("id") == aMap.end()) + return; - bool bIsWeldedDialog = false; + static const OUString sClickAction("CLICK"); + static const OUString sSelectAction("SELECT"); + static const OUString sClearAction("CLEAR"); + static const OUString sTypeAction("TYPE"); + static const OUString sUpAction("UP"); + static const OUString sDownAction("DOWN"); + static const OUString sValue("VALUE"); - try - { - OString sControlId = OUStringToOString(aMap["id"], RTL_TEXTENCODING_ASCII_US); + bool bIsWeldedDialog = false; - bIsWeldedDialog = jsdialog::ExecuteAction(nWindowId, sControlId, aMap); - if (!bIsWeldedDialog) - bIsWeldedDialog = jsdialog::ExecuteAction(reinterpret_cast<sal_uInt64>(SfxViewShell::Current()), - sControlId, aMap); + try + { + OString sControlId = OUStringToOString(aMap["id"], RTL_TEXTENCODING_ASCII_US); - if (!pWindow) - { - SetLastExceptionMsg("Document doesn't support dialog rendering, or window not found."); - return; - } + bIsWeldedDialog = jsdialog::ExecuteAction(nWindowId, sControlId, aMap); + if (!bIsWeldedDialog) + bIsWeldedDialog = jsdialog::ExecuteAction(reinterpret_cast<sal_uInt64>(SfxViewShell::Current()), + sControlId, aMap); - if (!bIsWeldedDialog) - { - WindowUIObject aUIObject(pWindow); - std::unique_ptr<UIObject> pUIWindow(aUIObject.get_child(aMap["id"])); - if (pUIWindow) { - bool bIsClickAction = false; + if (!pWindow) + { + SetLastExceptionMsg("Document doesn't support dialog rendering, or window not found."); + return; + } - if (aMap.find("cmd") != aMap.end()) { - if (aMap["cmd"] == "selected") - { - aMap["POS"] = aMap["data"]; - aMap["TEXT"] = aMap["data"]; + if (!bIsWeldedDialog) + { + WindowUIObject aUIObject(pWindow); + std::unique_ptr<UIObject> pUIWindow(aUIObject.get_child(aMap["id"])); + if (pUIWindow) { + bool bIsClickAction = false; - pUIWindow->execute(sSelectAction, aMap); - } - else if (aMap["cmd"] == "plus") - { - pUIWindow->execute(sUpAction, aMap); - } - else if (aMap["cmd"] == "minus") - { - pUIWindow->execute(sDownAction, aMap); - } - else if (aMap["cmd"] == "set") - { - aMap["TEXT"] = aMap["data"]; + if (aMap.find("cmd") != aMap.end()) { + if (aMap["cmd"] == "selected") + { + aMap["POS"] = aMap["data"]; + aMap["TEXT"] = aMap["data"]; - pUIWindow->execute(sClearAction, aMap); - pUIWindow->execute(sTypeAction, aMap); - } - else if (aMap["cmd"] == "value") - { - aMap["VALUE"] = aMap["data"]; - pUIWindow->execute(sValue, aMap); - } - else - bIsClickAction = true; + pUIWindow->execute(sSelectAction, aMap); + } + else if (aMap["cmd"] == "plus") + { + pUIWindow->execute(sUpAction, aMap); + } + else if (aMap["cmd"] == "minus") + { + pUIWindow->execute(sDownAction, aMap); + } + else if (aMap["cmd"] == "set") + { + aMap["TEXT"] = aMap["data"]; + + pUIWindow->execute(sClearAction, aMap); + pUIWindow->execute(sTypeAction, aMap); + } + else if (aMap["cmd"] == "value") + { + aMap["VALUE"] = aMap["data"]; + pUIWindow->execute(sValue, aMap); } else bIsClickAction = true; - - if (bIsClickAction) - pUIWindow->execute(sClickAction, aMap); } + else + bIsClickAction = true; + + if (bIsClickAction) + pUIWindow->execute(sClickAction, aMap); } - } catch(...) {} + } + } catch(...) {} - // force resend - if (!bIsWeldedDialog) - pWindow->Resize(); - } + // force resend + if (!bIsWeldedDialog) + pWindow->Resize(); } static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pCommand, const char* pArguments, bool bNotifyWhenFinished) |