22#include <config_vclplug.h>
24#include <QtCore/QPoint>
25#include <QtCore/QRect>
26#include <QtCore/QSize>
27#include <QtCore/QString>
28#include <QtGui/QImage>
30#include <rtl/string.hxx>
31#include <rtl/ustring.hxx>
36#include <com/sun/star/uno/Sequence.hxx>
37#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
47 return OUString(
reinterpret_cast<const sal_Unicode*
>(s.data()), s.length());
52 return QString::fromUtf16(s.getStr(), s.getLength());
62 return QRect(floor(rRect.
Left() * fScale), floor(rRect.
Top() * fScale),
66inline QRect
scaledQRect(
const QRect& rRect,
const qreal fScale)
68 return QRect(floor(rRect.x() * fScale), floor(rRect.y() * fScale), ceil(rRect.width() * fScale),
69 ceil(rRect.height() * fScale));
74 return tools::Rectangle(rRect.left(), rRect.top(), rRect.right(), rRect.bottom());
79inline Size toSize(
const QSize& rSize) {
return Size(rSize.width(), rSize.height()); }
93inline QList<int>
toQList(
const css::uno::Sequence<sal_Int32>& aSequence)
96 for (sal_Int32
i : aSequence)
107 switch (ePixelFormat)
110 return QImage::Format_Indexed8;
112 return QImage::Format_RGB888;
119 return QImage::Format_Invalid;
126 case QImage::Format_Mono:
128 case QImage::Format_Indexed8:
130 case QImage::Format_RGB888:
133 case QImage::Format_ARGB32_Premultiplied:
154template <
typename charT,
typename traits>
155inline std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& stream,
156 const QString& rString)
161template <
typename charT,
typename traits>
162inline std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& stream,
168template <
typename charT,
typename traits>
169inline std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& stream,
175template <
typename charT,
typename traits>
176inline std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& stream,
177 const QPoint& rPoint)
182#define CHECK_QT5_USING_X11 (QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT5_USING_X11)
184#define CHECK_QT6_USING_X11 (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && QT6_USING_X11)
186#define CHECK_ANY_QT_USING_X11 CHECK_QT5_USING_X11 || CHECK_QT6_USING_X11
struct _cairo_surface cairo_surface_t
sal_uInt8 GetBlue() const
sal_uInt8 GetAlpha() const
sal_uInt8 GetGreen() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
Reference< XOutputStream > stream
PixelFormat
Pixel format of the bitmap in bits per pixel.
void operator()(cairo_surface_t *pSurface) const