diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qt5/Qt5Bitmap.cxx | 8 | ||||
-rw-r--r-- | vcl/qt5/Qt5Graphics_GDI.cxx | 8 | ||||
-rw-r--r-- | vcl/qt5/Qt5Instance.cxx | 5 |
3 files changed, 12 insertions, 9 deletions
diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx index 824bfc28b89a..adc46651fe41 100644 --- a/vcl/qt5/Qt5Bitmap.cxx +++ b/vcl/qt5/Qt5Bitmap.cxx @@ -38,11 +38,11 @@ bool Qt5Bitmap::Create(const Size& rSize, sal_uInt16 nBitCount, const BitmapPale && "Unsupported BitCount!"); if (nBitCount == 1) - assert(2 == rPal.GetEntryCount()); + assert(2 >= rPal.GetEntryCount()); if (nBitCount == 4) - assert(16 == rPal.GetEntryCount()); + assert(16 >= rPal.GetEntryCount()); if (nBitCount == 8) - assert(256 == rPal.GetEntryCount()); + assert(256 >= rPal.GetEntryCount()); if (nBitCount == 4) { @@ -230,7 +230,7 @@ BitmapBuffer* Qt5Bitmap::AcquireBuffer(BitmapAccessMode /*nMode*/) switch (pBuffer->mnBitCount) { case 1: - pBuffer->mnFormat = ScanlineFormat::N1BitLsbPal | ScanlineFormat::TopDown; + pBuffer->mnFormat = ScanlineFormat::N1BitMsbPal | ScanlineFormat::TopDown; pBuffer->maPalette = m_aPalette; break; case 4: diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx index 146849007035..a9f9175e6d48 100644 --- a/vcl/qt5/Qt5Graphics_GDI.cxx +++ b/vcl/qt5/Qt5Graphics_GDI.cxx @@ -196,7 +196,7 @@ void Qt5Graphics::drawLine(long nX1, long nY1, long nX2, long nY2) nY1 = nY2; nY2 = tmp; } - aPainter.update(nX1, nY1, nX2 - nX1, nY2 - nY1); + aPainter.update(nX1, nY1, nX2 - nX1 + 1, nY2 - nY1 + 1); } void Qt5Graphics::drawRect(long nX, long nY, long nWidth, long nHeight) @@ -207,7 +207,7 @@ void Qt5Graphics::drawRect(long nX, long nY, long nWidth, long nHeight) Qt5Painter aPainter(*this, true); if (SALCOLOR_NONE != m_aFillColor) aPainter.fillRect(nX, nY, nWidth, nHeight, aPainter.brush()); - else + if (SALCOLOR_NONE != m_aLineColor) aPainter.drawRect(nX, nY, nWidth, nHeight); aPainter.update(nX, nY, nWidth, nHeight); } @@ -527,7 +527,7 @@ static bool getAlphaImage(const SalBitmap& rSourceBitmap, const SalBitmap& rAlph { if (x && !(x % 8)) ++alpha_line; - if (0 == (*alpha_line & (1 << (x % 8)))) + if (0 != (*alpha_line & (1 << (7 - x % 8)))) image_line[3] = 0; } } @@ -584,7 +584,7 @@ bool Qt5Graphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, Qt5Painter aPainter(*this, true, nTransparency); if (SALCOLOR_NONE != m_aFillColor) aPainter.fillRect(nX, nY, nWidth, nHeight, aPainter.brush()); - else + if (SALCOLOR_NONE != m_aLineColor) aPainter.drawRect(nX, nY, nWidth, nHeight); aPainter.update(nX, nY, nWidth, nHeight); return true; diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index ef618e18fa7f..40c737446c65 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -50,7 +50,10 @@ Qt5Instance::Qt5Instance(SalYieldMutex* pMutex, bool bUseCairo) { ImplSVData* pSVData = ImplGetSVData(); delete pSVData->maAppData.mpToolkitName; - pSVData->maAppData.mpToolkitName = new OUString("qt5"); + if (bUseCairo) + pSVData->maAppData.mpToolkitName = new OUString("qt5+cairo"); + else + pSVData->maAppData.mpToolkitName = new OUString("qt5"); m_postUserEventId = QEvent::registerEventType(); |