Avoid potential negative array index access to cached text.
[LibreOffice.git] / vcl / inc / win / wingdiimpl.hxx
blob94a1ec8f84f4ba11656a1170f5824d6c343e32e2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
8 */
10 #pragma once
12 #include <win/salgdi.h>
13 #include <ControlCacheKey.hxx>
15 class ControlCacheKey;
17 // Base class for some functionality that OpenGL/Skia/GDI backends must each implement.
18 class WinSalGraphicsImplBase
20 public:
21 virtual ~WinSalGraphicsImplBase() {}
23 // If true is returned, the following functions are used for drawing controls.
24 virtual bool UseRenderNativeControl() const { return false; }
25 virtual bool TryRenderCachedNativeControl(const ControlCacheKey& /*rControlCacheKey*/,
26 int /*nX*/, int /*nY*/)
28 abort();
30 virtual bool RenderAndCacheNativeControl(CompatibleDC& /*rWhite*/, CompatibleDC& /*rBlack*/,
31 int /*nX*/, int /*nY*/,
32 ControlCacheKey& /*aControlCacheKey*/)
34 abort();
37 virtual void ClearDevFontCache() {}
39 virtual void Flush() {}
41 // Implementation for WinSalGraphics::DrawTextLayout().
42 // Returns true if handled, if false, then WinSalGraphics will handle it itself.
43 virtual bool DrawTextLayout(const GenericSalLayout&) { return false; }
45 virtual void ClearNativeControlCache() {}
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */