sw/source/core/text/inftxt.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit dcfb786e5dee09a2ee28df9a4c64e08fef6180f9
Author:     Oliver Specht <oliver.spe...@cib.de>
AuthorDate: Thu Dec 21 13:59:03 2023 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Jan 9 15:17:56 2024 +0100

    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 <kelem...@ubuntu.com>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    (cherry picked from commit bece5f05a33ac7ac723b46d455d104930a3b0839)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161312
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

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));

Reply via email to