Using Version: 7.4.1.1 (x64) / LibreOffice Community Build ID: 0a046a10cbf1679eea5538bd3ab63156caa3a036 CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL 1. Enable experimental features (Options->LibreOffice->Advanced) to enable system dark mode support implemented in bug 118320. 2. Use system light mode. 3. Open vcl/qa/cppunit/pdfexport/data/form-font-name.odt. 4. Export to PDF. 5. Use system dark mode. 6. Export to another PDF (can be done even without reloading the document). Note that Writer displays the form control with black background BTW. Comparing the two resulting PDFs shows that they have different control backgrounds. Respective unit test fails on master with system dark mode with: C:/lo/src/core/vcl/qa/cppunit/pdfexport/pdfexport.cxx(2656) : error : Assertion Test name: `anonymous namespace'::testFormFontName::TestBody equality assertion failed - Expected: 0 0 0 rg /TiRo 12 Tf - Actual : 1 1 1 rg /TiRo 12 Tf
This happens for me without even enabling experimental features, using dark theme from the system seems to be the default.
In toolkit/source/awt/vclxwindow.cxx we set EnableNativeWidget(false) when drawing things like this, so possibly either that code path isn't used in this case or something similar should do the same, or it doesn't work fully.
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9f682acf75d56c82b40114bb9fceb29d837de2dd Related: tdf#150786 workaround unit test failure It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Can this be changed to All OS or is implementation different for Win and Lin?
Also repro on Ubuntu. Indeed, All.
turns out this is PDFWriterImpl::createDefaultEditAppearance and similar in vcl/source/gdi/pdfwriter_impl.cxx where we have stuff like setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) : COL_TRANSPARENT ); which sets the background to the current theme background. I'm not sure why we replaceColor at all, but at the least I guess we should not use the current theme here, but some "preset for pdf" colors which we can base on the current gen (light) theme for consistency regardless of the current UI theme
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a0bc0cc81b597aa81189355a8125753d6b873cce tdf#150786 use the same colors for pdf widgets regardless of theme It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
lets try that then, backport to 7-4 in gerrit
Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: a0bc0cc81b597aa81189355a8125753d6b873cce CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3 1. With dark theme, I still see black form, and I think it should not be black. 2. Export to PDF with "Create form" checked is OK. 3. Export to PDF without "Create form" checked is NOK, bug 150886.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/da42c917c49940b3507b72fcd8f603331d922244 tdf#150786 use the same colors for pdf widgets regardless of theme It will be available in 7.4.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
proposed solution for bug 150886 addresses point 1 as a side effect: https://gerrit.libreoffice.org/c/core/+/140942/2
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ea36e0502c0bc381577cfa1b1a7fedf0f05d1d72 tdf#150786 use a 'standard' theme for form controls It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 144863 has been marked as a duplicate of this bug. ***
(In reply to Commit Notification from comment #12) > Caolán McNamara committed a patch related to this issue. > It has been pushed to "master": > > Affected users are encouraged to test the fix and report feedback. Works great in Daily 7.4.4 and 7.5 Tested with Win10 and exporting a fillable pdf from Writer.