summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2020-05-09 13:35:16 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2020-05-10 01:22:57 +0200
commit987cc89f3f737704f50f167fadb3017a32716bfd (patch)
tree06f3f51ab3b22e02cd1e4462682b6c6784732933 /sw/source
parent3e325cfd1fa58b63ee2606de792b2560eaa43b24 (diff)
lok: MSForms: test & fix two corner cases of drop-down field.
Change-Id: I2c54e2e2a94d15d42b23e04a896211936e9e1852 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93847 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/crsr/bookmrk.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index d32d66404efe..484480283ce5 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -617,12 +617,12 @@ namespace sw { namespace mark
// Selected item
OUString sResultKey = ODF_FORMDROPDOWN_RESULT;
auto pSelectedItemIter = pParameters->find(sResultKey);
+ sal_Int32 nSelection = -1;
if (pSelectedItemIter != pParameters->end())
{
- sal_Int32 nSelection = -1;
pSelectedItemIter->second >>= nSelection;
- sPayload.append("\"selected\": \"" + OString::number(nSelection) + "\"}}");
}
+ sPayload.append("\"selected\": \"" + OString::number(nSelection) + "\"}}");
}
else
{