https://bugs.documentfoundation.org/show_bug.cgi?id=174501

--- Comment #9 from Patrick (volunteer) <[email protected]> ---
I finally found the code that sets the font size. The bad news is that the font
size comes from the forms saved in the .odb file. I learned that Base allows
you to save the font and font size for any of these database edit fields.

The rest of this post contains more details but my conclusion is that
implementing what @gio was trying to do in commit
f7cff4b832e2860da73437b4d07295235f97c674 appears to be a lot more complicated
than we thought. So I recommend reverting the patch in the libreoffice-26-8
branch so that this bug will no longer occur in the upcoming LibreOffice 26.8.4
release so I have submitted the following revert patch:

https://gerrit.libreoffice.org/c/core/+/214532

Not sure if @gio wants to try to find a fix for master before next February's
LibreOffice 27.2 release so let's leave this bug open until we know.

Ok. More details: the problem is that these saved font and font size need the
same conversion logic Window::ImplPointToLogic() and Window::ImplLogicToPoint()
in that was disabled on macOS in the original commit. So for the original
commit to work, we still need that disabled logic for *some* fonts but not for
most fonts.

I tried applying the conversion logic a little higher up the stack where the
fprintf() is in the following debug patch. But then I found that the control
font gets copied to the edit field's elsewhere in the form making labels too
large. Then I ran out of time and ideas:

diff --git a/toolkit/source/awt/vclxwindow.cxx
b/toolkit/source/awt/vclxwindow.cxx
index aac7c41088ba..7004047488dc 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1524,7 +1524,10 @@ void VCLXWindow::setProperty( const OUString&
PropertyName, const css::uno::Any&
             {
                 css::awt::FontDescriptor aFont;
                 if ( Value >>= aFont )
+{
+fprintf(stderr, "The following line is where font and font size saved in .odb
file is set\n");
                     pWindow->SetControlFont( VCLUnoHelper::CreateFont( aFont,
pWindow->GetControlFont() ) );
+}
             }
         }
         break;

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to