OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
XLEMUConverter.hpp
Go to the documentation of this file.
1/*
2 * OpenXLSX-NX - Modern High-Performance C++ Excel Library
3 *
4 * Original work Copyright (c) 2018-2025, Kenneth Troldal Balslev and OpenXLSX contributors
5 * Modified work Copyright (c) 2026, Curry Tang and OpenXLSX-NX contributors
6 *
7 * Distributed under the BSD 3-Clause License.
8 * See LICENSE.md in the project root or https://opensource.org/licenses/BSD-3-Clause
9 */
10
11#ifndef OPENXLSX_XLEMUCONVERTER_HPP
12#define OPENXLSX_XLEMUCONVERTER_HPP
13
14#include <cstdint>
15
16namespace OpenXLSX
17{
24 {
25 public:
26 static constexpr int32_t PIXELS_TO_EMU_FACTOR = 9525;
27
28 static constexpr int32_t pixelsToEmu(int32_t pixels) noexcept { return pixels * PIXELS_TO_EMU_FACTOR; }
29
30 static constexpr int32_t emuToPixels(int32_t emus) noexcept { return emus / PIXELS_TO_EMU_FACTOR; }
31 };
32} // namespace OpenXLSX
33
34#endif // OPENXLSX_XLEMUCONVERTER_HPP
Utility for handling Excel's complex coordinate and measurement conversions. Excel uses EMU (English ...
Definition XLEMUConverter.hpp:24
static constexpr int32_t pixelsToEmu(int32_t pixels) noexcept
Definition XLEMUConverter.hpp:28
static constexpr int32_t emuToPixels(int32_t emus) noexcept
Definition XLEMUConverter.hpp:30
static constexpr int32_t PIXELS_TO_EMU_FACTOR
Definition XLEMUConverter.hpp:26
Definition IXLCellProvider.hpp:24