summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/viewling.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview/viewling.cxx')
-rw-r--r--sw/source/uibase/uiview/viewling.cxx11
1 files changed, 11 insertions, 0 deletions
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 );