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-09 09:36:15 +0200 |
commit | cdf234f0f8b72eb1fd1ed9082180df46607bcfc2 (patch) | |
tree | 098aa141d95dd74076c292d1fbc4930388ac8aea /sw | |
parent | b59bb50b56b5e22b9d71e14064239da3a295b89c (diff) |
lok: MSForms: fix editing of drop-down field.
When cursor is on the left side of the form field.
Change-Id: I8587c477b6177e9309349afbbfc70979b4338275
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 5c2ce7236c7e..3ab7e4a8c8d8 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3439,16 +3439,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); } } } |