calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / vcl / backendtest / outputdevice / text.cxx
blob5e53d900babd9bf8c99be4fd4208ef55523f31c5
1 /* -*- Mode: C++; tab-width: offset; indent-tabs-mode: nil; c-basic-offset: offset -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
11 #include <test/outputdevice.hxx>
13 namespace vcl::test
15 Bitmap OutputDeviceTestText::setupTextBitmap()
17 initialSetup(21, 21, constBackgroundColor);
19 mpVirtualDevice->SetLineColor(constLineColor);
20 mpVirtualDevice->SetFillColor();
22 tools::Long midX = (maVDRectangle.Right() - maVDRectangle.Left()) / 2.0;
23 tools::Long midY = (maVDRectangle.Bottom() - maVDRectangle.Top()) / 2.0;
25 vcl::Font Font("DejaVu Sans", "Book", Size(0, 10));
27 mpVirtualDevice->Erase();
28 mpVirtualDevice->SetFont(Font);
29 mpVirtualDevice->SetTextColor(COL_LIGHTRED);
30 mpVirtualDevice->DrawText(Point(midX, midY - midY / 2), "I");
32 return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());