Commit 252537dd authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

отрицательные CT_RotX

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63374 954022d7-b5bf-4e40-9824-e11837661b57
parent b828810e
......@@ -469,6 +469,17 @@ namespace NSBinPptxRW
m_lPosition += BYTE_SIZEOF;
m_pStreamCur += BYTE_SIZEOF;
}
void CBinaryFileWriter::WriteSBYTE(const signed char& lValue)
{
CheckBufferSize(BYTE_SIZEOF);
if (lValue < 0)
*m_pStreamCur = (lValue + 256);
else
*m_pStreamCur = lValue;
m_lPosition += BYTE_SIZEOF;
m_pStreamCur += BYTE_SIZEOF;
}
void CBinaryFileWriter::WriteBOOL(const bool& bValue)
{
WriteBYTE((bValue == true) ? 1 : 0);
......@@ -1499,6 +1510,18 @@ namespace NSBinPptxRW
++m_pDataCur;
return res;
}
signed char CBinaryFileReader::GetChar()
{
if (m_lPos >= m_lSize)
return 0;
BYTE res = *m_pDataCur;
if (res > 127)
res -= 256;
++m_lPos;
++m_pDataCur;
return res;
}
// 1 bytes
BYTE CBinaryFileReader::GetUChar_TypeNode()
......
......@@ -242,6 +242,7 @@ namespace NSBinPptxRW
void CheckBufferSize(_UINT32 lPlus);
void WriteBYTE(const BYTE& lValue);
void WriteSBYTE(const signed char& lValue);
void WriteBOOL(const bool& bValue);
void WriteUSHORT(const _UINT16& lValue);
......@@ -463,6 +464,7 @@ namespace NSBinPptxRW
// 1 bytes
BYTE GetUChar();
signed char GetChar();
bool GetBool();
BYTE GetUChar_TypeNode();
......
......@@ -14262,7 +14262,7 @@ namespace OOX{
WritingElement_ReadAttributes_Start_No_NS( oReader )
if(_T("val") == wsName)
{
char* pNewElem = new char;
signed char* pNewElem = new signed char;
CString sVal = oReader.GetText();
*pNewElem = _ttoi(sVal);
m_val = pNewElem;
......
......@@ -2866,7 +2866,7 @@ namespace OOX{
{
public:
//Attribute
char* m_val;
signed char* m_val;
CT_RotX();
~CT_RotX();
void fromXML(XmlUtils::CXmlLiteReader& oReader);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment