mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-10 21:37:34 +08:00
41 lines
892 B
C++
41 lines
892 B
C++
#pragma once
|
|
|
|
namespace ASCDocFileFormat
|
|
{
|
|
union PositionCodeOperand
|
|
{
|
|
private:
|
|
struct
|
|
{
|
|
unsigned char padding:4;
|
|
unsigned char pcVert:2;
|
|
unsigned char pcHorz:2;
|
|
} PositionCodeOperandStruct;
|
|
|
|
unsigned char PositionCodeOperandByte;
|
|
|
|
public:
|
|
PositionCodeOperand():
|
|
PositionCodeOperandByte(0)
|
|
{
|
|
}
|
|
|
|
explicit PositionCodeOperand( unsigned char _pcVert, unsigned char _pcHorz ):
|
|
PositionCodeOperandByte(0)
|
|
{
|
|
this->PositionCodeOperandStruct.padding = 0;
|
|
this->PositionCodeOperandStruct.pcVert = _pcVert;
|
|
this->PositionCodeOperandStruct.pcHorz = _pcHorz;
|
|
}
|
|
|
|
explicit PositionCodeOperand( unsigned char _positionCodeOperand ):
|
|
PositionCodeOperandByte(_positionCodeOperand)
|
|
{
|
|
}
|
|
|
|
operator unsigned char() const
|
|
{
|
|
return this->PositionCodeOperandByte;
|
|
}
|
|
};
|
|
} |