summaryrefslogtreecommitdiff
path: root/sw/source/core/text/porfld.cxx
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-03-04 20:52:38 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-03-09 21:58:40 +0100
commit10be5b6ce972dff517f3ceed41cab04d3e051f57 (patch)
tree2cd382716b678e7d493ff679417a4f5761e5766d /sw/source/core/text/porfld.cxx
parent31f96c3e0d13180447c45212158ee69e791c645a (diff)
MSForms: Add a drop-down button for drop-down form field
* Introduce a editing frame with a button for drop-down form field. ** The frame is mouse transparent. ** Pushing the button opens the popup window with the items of the field. * The button is visible when the cursor is inside the field. Change-Id: I5c7db138d14380899fee046c95a5afe14cfea213 Reviewed-on: https://gerrit.libreoffice.org/68961 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw/source/core/text/porfld.cxx')
-rw-r--r--sw/source/core/text/porfld.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index e2a482e870dc..2a52f9b539c7 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -43,6 +43,7 @@
#include <accessibilityoptions.hxx>
#include <editeng/lrspitem.hxx>
#include <unicode/ubidi.h>
+#include <bookmrk.hxx>
using namespace ::com::sun::star;
@@ -1310,7 +1311,20 @@ sal_uInt16 SwCombinedPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
SwFieldPortion *SwFieldFormDropDownPortion::Clone(const OUString &rExpand) const
{
- return new SwFieldFormDropDownPortion(rExpand);
+ return new SwFieldFormDropDownPortion(m_pFieldMark, rExpand);
+}
+
+void SwFieldFormDropDownPortion::Paint( const SwTextPaintInfo &rInf ) const
+{
+ SwFieldPortion::Paint( rInf );
+
+ ::sw::mark::DropDownFieldmark* pDropDownField = dynamic_cast< ::sw::mark::DropDownFieldmark* >(m_pFieldMark);
+ if(pDropDownField)
+ {
+ SwRect aPaintArea;
+ rInf.CalcRect( *this, &aPaintArea );
+ pDropDownField->SetPortionPaintArea(aPaintArea);
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */