[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Feb 16 17:32:07 UTC 2019
sw/source/uibase/uiview/viewling.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 575438b0b68baeee3d37d887d8645757a4505971
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Feb 14 13:15:41 2019 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sat Feb 16 18:31:48 2019 +0100
MSForms: Don't show popup dialog of drop-down field when there is no item list
Change-Id: Ife361e0ee18437da6f188e77713ea51403b70dbc
Reviewed-on: https://gerrit.libreoffice.org/67910
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 935f974ce75a..c29c1637ab87 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -912,6 +912,17 @@ IMPL_LINK_NOARG(SwView, FieldPopupModeEndHdl, FloatingWindow*, void)
void SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
{
+ // Don't show popup if there is no list item
+ auto pListEntries = fieldBM->GetParameters()->find( ODF_FORMDROPDOWN_LISTENTRY );
+ Sequence< OUString > vListEntries;
+ if(pListEntries != fieldBM->GetParameters()->end())
+ {
+ pListEntries->second >>= vListEntries;
+ }
+
+ if(vListEntries.getLength() == 0)
+ return;
+
const Point aPixPos = GetEditWin().LogicToPixel( rPt );
m_pFieldPopup = VclPtr<SwFieldDialog>::Create( m_pEditWin, fieldBM );
More information about the Libreoffice-commits
mailing list