LibreOffice Module oox (master) 1
Classes | Namespaces | Macros | Functions | Variables
helper.hxx File Reference
#include <sal/config.h>
#include <cstring>
#include <limits>
#include <optional>
#include <o3tl/safeint.hxx>
#include <osl/endian.h>
#include <rtl/math.hxx>
#include <sal/macros.h>
#include <sal/types.h>
#include <tools/color.hxx>
#include <utility>
Include dependency graph for helper.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  oox::ByteOrderConverter
 Provides platform independent functions to convert from or to little-endian byte order, e.g. More...
 

Namespaces

namespace  oox
 
namespace  oox::detail
 

Macros

#define STATIC_ARRAY_SELECT(array, index, def)    ((detail::make_unsigned(index) < SAL_N_ELEMENTS(array)) ? ((array)[static_cast<size_t>(index)]) : (def))
 Expands to the 'index'-th element of a STATIC data array, or to 'def', if 'index' is out of the array limits. More...
 

Functions

template<typename T >
constexpr std::make_unsigned_t< T > oox::detail::make_unsigned (T value)
 
template<typename ReturnType , typename Type >
ReturnType oox::getLimitedValue (Type nValue, Type nMin, Type nMax)
 
template<typename ReturnType , typename Type >
ReturnType oox::getIntervalValue (Type nValue, Type nBegin, Type nEnd)
 
template<typename ReturnType >
ReturnType oox::getDoubleIntervalValue (double fValue, double fBegin, double fEnd)
 
template<typename Type >
bool oox::getFlag (Type nBitField, Type nMask)
 Returns true, if at least one of the bits set in nMask is set in nBitField. More...
 
template<typename ReturnType , typename Type >
ReturnType oox::getFlagValue (Type nBitField, Type nMask, ReturnType nSet, ReturnType nUnset)
 Returns nSet, if at least one bit of nMask is set in nBitField, otherwise nUnset. More...
 
template<typename ReturnType , typename Type >
ReturnType oox::extractValue (Type nBitField, sal_uInt8 nStartBit, sal_uInt8 nBitCount)
 Extracts a value from a bit field. More...
 
template<typename Type >
void oox::setFlag (Type &ornBitField, Type nMask, bool bSet=true)
 Sets or clears (according to bSet) all set bits of nMask in ornBitField. More...
 
template<typename Type >
void oox::assignIfUsed (std::optional< Type > &rDestValue, const std::optional< Type > &rSourceValue)
 

Variables

const sal_uInt8 oox::WINDOWS_CHARSET_ANSI = 0
 
const sal_uInt8 oox::WINDOWS_CHARSET_DEFAULT = 1
 
const sal_uInt8 oox::WINDOWS_CHARSET_SYMBOL = 2
 
const sal_uInt8 oox::WINDOWS_CHARSET_APPLE_ROMAN = 77
 
const sal_uInt8 oox::WINDOWS_CHARSET_SHIFTJIS = 128
 
const sal_uInt8 oox::WINDOWS_CHARSET_HANGEUL = 129
 
const sal_uInt8 oox::WINDOWS_CHARSET_JOHAB = 130
 
const sal_uInt8 oox::WINDOWS_CHARSET_GB2312 = 134
 
const sal_uInt8 oox::WINDOWS_CHARSET_BIG5 = 136
 
const sal_uInt8 oox::WINDOWS_CHARSET_GREEK = 161
 
const sal_uInt8 oox::WINDOWS_CHARSET_TURKISH = 162
 
const sal_uInt8 oox::WINDOWS_CHARSET_VIETNAMESE = 163
 
const sal_uInt8 oox::WINDOWS_CHARSET_HEBREW = 177
 
const sal_uInt8 oox::WINDOWS_CHARSET_ARABIC = 178
 
const sal_uInt8 oox::WINDOWS_CHARSET_BALTIC = 186
 
const sal_uInt8 oox::WINDOWS_CHARSET_RUSSIAN = 204
 
const sal_uInt8 oox::WINDOWS_CHARSET_THAI = 222
 
const sal_uInt8 oox::WINDOWS_CHARSET_EASTERN = 238
 
const sal_uInt8 oox::WINDOWS_CHARSET_OEM = 255
 
const ::Color oox::API_RGB_TRANSPARENT (ColorTransparency, 0xffffffff)
 Transparent color for API calls. More...
 
const sal_uInt32 oox::UNSIGNED_RGB_TRANSPARENT = static_cast<sal_uInt32>(-1)
 Transparent color for unsigned int32 places. More...
 
const ::Color oox::API_RGB_BLACK (0x000000)
 Black color for API calls. More...
 
const ::Color oox::API_RGB_GRAY (0x808080)
 Gray color for API calls. More...
 
const ::Color oox::API_RGB_WHITE (0xFFFFFF)
 White color for API calls. More...
 
const sal_Int16 oox::API_LINE_SOLID = 0
 
const sal_Int16 oox::API_LINE_DOTTED = 1
 
const sal_Int16 oox::API_LINE_DASHED = 2
 
const sal_Int16 oox::API_FINE_LINE_DASHED = 14
 
const sal_Int16 oox::API_LINE_NONE = 0
 
const sal_Int16 oox::API_LINE_HAIR = 2
 
const sal_Int16 oox::API_LINE_THIN = 35
 
const sal_Int16 oox::API_LINE_MEDIUM = 88
 
const sal_Int16 oox::API_LINE_THICK = 141
 
const sal_Int16 oox::API_ESCAPE_NONE = 0
 No escapement. More...
 
const sal_Int16 oox::API_ESCAPE_SUPERSCRIPT = 101
 Superscript: raise characters automatically (magic value 101). More...
 
const sal_Int16 oox::API_ESCAPE_SUBSCRIPT = -101
 Subscript: lower characters automatically (magic value -101). More...
 
const sal_Int8 oox::API_ESCAPEHEIGHT_NONE = 100
 Relative character height if not escaped. More...
 
const sal_Int8 oox::API_ESCAPEHEIGHT_DEFAULT = 58
 Relative character height if escaped. More...
 

Macro Definition Documentation

◆ STATIC_ARRAY_SELECT

#define STATIC_ARRAY_SELECT (   array,
  index,
  def 
)     ((detail::make_unsigned(index) < SAL_N_ELEMENTS(array)) ? ((array)[static_cast<size_t>(index)]) : (def))

Expands to the 'index'-th element of a STATIC data array, or to 'def', if 'index' is out of the array limits.

Definition at line 57 of file helper.hxx.