summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2025-01-10 21:19:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2025-01-11 17:29:40 +0100
commitb29e161488f0291f381f04e2533106321f357c1e (patch)
tree104eff44e62528c6069fc43d4f64b6af60656b86 /vcl/qt5
parente0935e73bb906fa143db349706466173ca11a626 (diff)
make the ScanlineFormat values more explicit
instead of cleverly deciding that one format is actually another format, depending on the current state of the supportsBitmap32() call, just have explicit values that say what the actual format is. This patch should have no functional affect, but will make upcoming patches simpler. Change-Id: I07f127a3e36800aa4cee034261c2e1216d8e8da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180089 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtBitmap.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/qt5/QtBitmap.cxx b/vcl/qt5/QtBitmap.cxx
index 7e24dd703a84..235f94715e04 100644
--- a/vcl/qt5/QtBitmap.cxx
+++ b/vcl/qt5/QtBitmap.cxx
@@ -28,6 +28,8 @@
#include <o3tl/safeint.hxx>
#include <sal/log.hxx>
#include <tools/helpers.hxx>
+#include <svdata.hxx>
+#include <salinst.hxx>
QtBitmap::QtBitmap() {}
@@ -137,9 +139,13 @@ BitmapBuffer* QtBitmap::AcquireBuffer(BitmapAccessMode /*nMode*/)
case 32:
{
#ifdef OSL_BIGENDIAN
- pBuffer->meFormat = ScanlineFormat::N32BitTcArgb;
+ pBuffer->meFormat = ImplGetSVData()->mpDefInst->supportsBitmap32()
+ ? ScanlineFormat::N32BitTcArgb
+ : ScanlineFormat::N32BitTcXrgb;
#else
- pBuffer->meFormat = ScanlineFormat::N32BitTcBgra;
+ pBuffer->meFormat = ImplGetSVData()->mpDefInst->supportsBitmap32()
+ ? ScanlineFormat::N32BitTcBgra
+ : ScanlineFormat::N32BitTcBgrx;
#endif
pBuffer->maPalette = aEmptyPalette;
break;