diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-07-10 18:22:31 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-07-12 12:55:40 +0200 |
commit | 68e1be4ccbb90ee9a788962219a88312c4ffbea2 (patch) | |
tree | 22a46bc974e012859846180ac8a7f00c61fb7527 /sw/source/core/text/porfld.cxx | |
parent | 77eb3a7ff88c30d6145a3aa6d454d08ed93206df (diff) |
MSForms: Rework text-based date form field's representation
* Better to represent it similar to text form field with two
marking characters selecting a text range
* So the text between the two marks can be anything (not only
a well formatted date) and also have any character formatting.
* With this we handle the case when the user needs a placeholder
text in the date field or when the user needs time values (hour,
minute, sec) next to the date.
Change-Id: Id60a50a2028058f8a6a080e265c0730d88b98543
Reviewed-on: https://gerrit.libreoffice.org/75459
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.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 09ace4f82c84..428dc0bfa5e6 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -1329,9 +1329,9 @@ void SwFieldFormDropDownPortion::Paint( const SwTextPaintInfo &rInf ) const } } -SwFieldPortion *SwFieldFormDatePortion::Clone(const OUString &rExpand) const +SwFieldPortion *SwFieldFormDatePortion::Clone(const OUString &/*rExpand*/) const { - return new SwFieldFormDatePortion(m_pFieldMark, rExpand); + return new SwFieldFormDatePortion(m_pFieldMark, m_bStart); } void SwFieldFormDatePortion::Paint( const SwTextPaintInfo &rInf ) const @@ -1343,7 +1343,10 @@ void SwFieldFormDatePortion::Paint( const SwTextPaintInfo &rInf ) const { SwRect aPaintArea; rInf.CalcRect( *this, &aPaintArea ); - pDateField->SetPortionPaintArea(aPaintArea); + if(m_bStart) + pDateField->SetPortionPaintAreaStart(aPaintArea); + else + pDateField->SetPortionPaintAreaEnd(aPaintArea); } } |