diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2020-05-07 16:57:45 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2020-05-08 22:52:50 +0200 |
commit | 77a544b63d2713b842049666e9be5cb30e9ce219 (patch) | |
tree | 25fb9741b7379b40271caeefdfc4ac8c485391b1 /sw | |
parent | 2d6e1290c14f1064d5b00ab3dc81c88eb5a080ff (diff) |
lok: MSForms: fix editing of drop-down field.
When cursor is on the left side of the form field.
Change-Id: I8587c477b6177e9309349afbbfc70979b4338275
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93663
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 7c18ed5de296..1fb4ce3713be 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3393,16 +3393,16 @@ void SwXTextDocument::executeFromFieldEvent(const StringMap& aArguments) { --aPos.nContent; pFieldBM = pDocShell->GetWrtShell()->getIDocumentMarkAccess()->getFieldmarkFor(aPos); - if (pFieldBM && pFieldBM->GetFieldname() == ODF_FORMDROPDOWN) + } + if (pFieldBM && pFieldBM->GetFieldname() == ODF_FORMDROPDOWN) + { + if (nSelection >= 0) { - if (nSelection >= 0) - { - OUString sKey = ODF_FORMDROPDOWN_RESULT; - (*pFieldBM->GetParameters())[sKey] <<= nSelection; - pFieldBM->Invalidate(); - pDocShell->GetWrtShell()->SetModified(); - pDocShell->GetView()->GetEditWin().LogicInvalidate(nullptr); - } + OUString sKey = ODF_FORMDROPDOWN_RESULT; + (*pFieldBM->GetParameters())[sKey] <<= nSelection; + pFieldBM->Invalidate(); + pDocShell->GetWrtShell()->SetModified(); + pDocShell->GetView()->GetEditWin().LogicInvalidate(nullptr); } } } |