diff options
author | Oliver Specht <oliver.specht@cib.de> | 2023-12-21 13:59:03 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2024-01-09 15:17:56 +0100 |
commit | dcfb786e5dee09a2ee28df9a4c64e08fef6180f9 (patch) | |
tree | 0b64c733ddba99c5806fcaec173a7c0ec06fc9db | |
parent | bc7ea997d5f6bb5a185fed76927175a53b87f7fc (diff) |
tdf#98321 Checkbox: size like Word
Display checkboxes imported from docx/rtf in the same size as Word.
Additionally apply font highlighting if available.
Change-Id: Ifea4aebf8c39b6cdd750f3c90e121da0c4131d4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161124
Tested-by: Jenkins
Tested-by: Gabor Kelemen <kelemeng@ubuntu.com>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit bece5f05a33ac7ac723b46d455d104930a3b0839)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161312
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 5e5d5718102f..3d9121ef1ec2 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1112,12 +1112,15 @@ void SwTextPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool { OutputDevice* pOut = const_cast<OutputDevice*>(GetOut()); pOut->Push( vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR ); - pOut->SetFillColor( GetOpt().GetFieldShadingsColor() ); + if( m_pFnt->GetHighlightColor() != COL_TRANSPARENT ) + pOut->SetFillColor(m_pFnt->GetHighlightColor()); + else + pOut->SetFillColor(GetOpt().GetFieldShadingsColor()); pOut->SetLineColor(); pOut->DrawRect( aIntersect.SVRect() ); pOut->Pop(); } - const int delta=10; + const int delta = 25; tools::Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta); m_pOut->Push( vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR ); m_pOut->SetLineColor( Color(0, 0, 0)); |