diff options
Diffstat (limited to 'desktop/source/lib/init.cxx')
-rw-r--r-- | desktop/source/lib/init.cxx | 50 |
1 files changed, 21 insertions, 29 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 210ce2d84d34..f527656333b6 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3749,43 +3749,35 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned long if (!bIsWeldedDialog) { + OUString sAction((aMap.find("cmd") != aMap.end())? aMap["cmd"]: ""); WindowUIObject aUIObject(pWindow); std::unique_ptr<UIObject> pUIWindow(aUIObject.get_visible_child(aMap["id"])); if (pUIWindow) { bool bIsClickAction = false; - if (aMap.find("cmd") != aMap.end()) { - if (aMap["cmd"] == "selected") - { - aMap["POS"] = aMap["data"]; - aMap["TEXT"] = aMap["data"]; + if (sAction == "selected") + { + aMap["POS"] = aMap["data"]; + aMap["TEXT"] = aMap["data"]; - 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(sSelectAction, aMap); + } + else if (sAction == "plus") + { + pUIWindow->execute(sUpAction, aMap); + } + else if (sAction == "minus") + { + pUIWindow->execute(sDownAction, aMap); + } + else if (sAction == "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; + pUIWindow->execute(sClearAction, aMap); + pUIWindow->execute(sTypeAction, aMap); } - else if (aMap["cmd"] == "value") + else if (sAction == "value") { aMap["VALUE"] = aMap["data"]; pUIWindow->execute(sValue, aMap); |