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-09 16:36:44 +0200
commit313a0c7bb2aecb597ccab20712954cea216d5b58 (patch)
treed0f853d1dc59f31bb4477003efe0a5c71f54a0ab /sw/source
parent4f88fdc7fbf2b4a9113e4640b11ed3be3c768ed0 (diff)
lok: MSForms: test & fix two corner cases of drop-down field.
Change-Id: I2c54e2e2a94d15d42b23e04a896211936e9e1852 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93845 Tested-by: Jenkins 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 e39c5ced6a05..3efdbf98167d 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -755,12 +755,12 @@ namespace sw::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
{