Files
libreoffice/vcl/qt5/Qt5SvpVirtualDevice.hxx
Caolán McNamara 6e2a7571e8 tdf#127529 vertical text not drawn in slideshow canvas
because the canvas text drawing impl falls back to using an OutputDevice view
of the canvas to use the vcl text drawing apis to achieve vertical text

To get an OutputDevice view of the canvas there is a specific VirtualDevice
ctor available to create a VirtualDevice that, unlike the normal case, doesn't
have its own specific backing buffer, but instead draws to the underlying target
provided via the SystemGraphicsData arg

The svp/gtk impl missed that understanding and provided an ordinary
VirtualDevice with its own backing buffer, not a VirtualDevice that would draw
to the expected target surface of the canvas. So the vertical text was drawn to
a different surface than the intended one, and was just discarded.

The cairo use in the canvas long precedes the use of cairo in vcl itself.

Seeing as text is now rendered with cairo in all cases where the canvas uses
cairo its probably now pointless for canvas to have its own text rendering
path.

Change-Id: Ie3b0a43ca2b746cbfe25e2d0415315b3d5403cd2
Reviewed-on: https://gerrit.libreoffice.org/80162
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-04 20:51:56 +02:00

38 lines
1.4 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#pragma once
#include <headless/svpvd.hxx>
#include <qt5/Qt5SvpGraphics.hxx>
class VCL_DLLPUBLIC Qt5SvpVirtualDevice : public SvpSalVirtualDevice
{
public:
Qt5SvpVirtualDevice(DeviceFormat eFormat, cairo_surface_t* pRefSurface,
cairo_surface_t* pPreExistingTarget)
: SvpSalVirtualDevice(eFormat, pRefSurface, pPreExistingTarget)
{
}
SalGraphics* AcquireGraphics() override { return AddGraphics(new Qt5SvpGraphics(nullptr)); }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */