Avoid potential negative array index access to cached text.
[LibreOffice.git] / vcl / inc / pdf / BitmapID.hxx
blob34f99944dcb56af58e27e3b882c2a2e4a172f6a6
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/.
9 */
11 #pragma once
13 #include <vcl/checksum.hxx>
14 #include <tools/gen.hxx>
16 namespace vcl::pdf
18 struct BitmapID
20 Size m_aPixelSize;
21 sal_Int32 m_nSize;
22 BitmapChecksum m_nChecksum;
23 BitmapChecksum m_nMaskChecksum;
25 BitmapID()
26 : m_nSize(0)
27 , m_nChecksum(0)
28 , m_nMaskChecksum(0)
32 bool operator==(const BitmapID& rComp) const
34 return (m_aPixelSize == rComp.m_aPixelSize && m_nSize == rComp.m_nSize
35 && m_nChecksum == rComp.m_nChecksum && m_nMaskChecksum == rComp.m_nMaskChecksum);
40 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */