Commit 9fe16b8e authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

OfficeXlsFile2 linux build - complete

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64139 954022d7-b5bf-4e40-9824-e11837661b57
parent 72af6e0f
......@@ -14,6 +14,11 @@ DEFINES += UNICODE \
_LINUX_QT \
LINUX
CONFIG(debug, debug|release){
message(Debug)
DEFINES += _DEBUG
}
TARGET = ASCXlsConverter
CONFIG += console
......
#pragma once
#include <string>
#include <string.h>
#include "../../../Common/DocxFormat/Source/Base/unicode_util.h"
static std::wstring convertUtf16ToWString(const UTF16 * Data, int nLength)
{
UTF32 *pStrUtf32 = new UTF32 [nLength + 1];
memset ((void *) pStrUtf32, 0, sizeof (UTF32) * (nLength + 1));
// this values will be modificated
const UTF16 *pStrUtf16_Conv = Data;
UTF32 *pStrUtf32_Conv = pStrUtf32;
ConversionResult eUnicodeConversionResult =
ConvertUTF16toUTF32 (&pStrUtf16_Conv,
&Data[nLength]
, &pStrUtf32_Conv
, &pStrUtf32 [nLength]
, strictConversion);
if (conversionOK != eUnicodeConversionResult)
{
delete [] pStrUtf32;
return std::wstring();
}
std::wstring wstr ((wchar_t *) pStrUtf32);
delete [] pStrUtf32;
return wstr;
}
namespace xml {
......
......@@ -70,7 +70,7 @@ const std::wstring row2str(const int row)
}
const std::wstring loc2str(const long row, const bool row_rel, const long column, const bool col_rel)
const std::wstring loc2str(const int row, const bool row_rel, const int column, const bool col_rel)
{
return (col_rel ? L"" : L"$") + column2str(column) + (row_rel ? L"" : L"$") + row2str(row);
}
......@@ -131,7 +131,7 @@ const bool str2rel(std::wstring::const_iterator& str_begin, std::wstring::const_
return true;
}
void str2loc(std::wstring::const_iterator& str_begin, std::wstring::const_iterator& str_end, long& row, bool& row_rel, long& column, bool& col_rel)
void str2loc(std::wstring::const_iterator& str_begin, std::wstring::const_iterator& str_end, int& row, bool& row_rel, int& column, bool& col_rel)
{
col_rel = str2rel (str_begin, str_end);
column = str2column (str_begin, str_end);
......@@ -139,7 +139,7 @@ void str2loc(std::wstring::const_iterator& str_begin, std::wstring::const_iterat
row = str2row (str_begin, str_end);
}
void str2loc(const std::wstring& str, long& row, bool& row_rel, long& column, bool& col_rel)
void str2loc(const std::wstring& str, int& row, bool& row_rel, int& column, bool& col_rel)
{
std::wstring::const_iterator str_begin = str.begin();
std::wstring::const_iterator str_end = str.end();
......@@ -279,14 +279,19 @@ const std::wstring int2hex_wstr(const int val, const size_t size_of)
{
if(size_of > 4) return L"";
static wchar_t num_buf[10]={};
#if defined(_WIN64) || defined(_WIN64)
swprintf_s(num_buf, 9, (L"%0" + STR::int2wstr(size_of << 1, 10) + L"X").c_str(), val);
static wchar_t num_buf[10]={};
std::wstring wstr = STR::int2wstr(size_of << 1, 10);
swprintf_s(num_buf, 9, (L"%0" + wstr + L"X").c_str(), val);
return std::wstring(num_buf);
#else
//todooooo
char num_buf[10]={};
std::string str = STR::int2str(size_of << 1, 10);
snprintf(num_buf, 9, ("%0" + str + "X").c_str(), val);
std::string res(num_buf);
return std::wstring(res.begin(), res.end());
#endif
return std::wstring(num_buf);
}
......@@ -421,7 +426,7 @@ const size_t hex_str2int(const std::wstring::const_iterator& it_begin, const std
return numeric;
}
const std::string toStdString(const std::wstring& wide_string, const unsigned int code_page)
const std::string toStdString(std::wstring wide_string, const unsigned int code_page)
{
#if defined (_WIN32) || defined (_WIN64)
const int nSize = WideCharToMultiByte(code_page, 0, wide_string.c_str(), wide_string.length(), NULL, 0, NULL, NULL);
......@@ -469,7 +474,7 @@ const std::string toStdString(const std::wstring& wide_string, const unsigned in
}
const std::wstring toStdWString(const std::string& ansi_string, const unsigned int code_page)
const std::wstring toStdWString(std::string ansi_string, const unsigned int code_page)
{
#if defined (_WIN32) || defined (_WIN64)
const int nSize = MultiByteToWideChar(code_page, 0, ansi_string.c_str(), ansi_string.size(), NULL, 0);
......@@ -490,10 +495,7 @@ const std::wstring toStdWString(const std::string& ansi_string, const unsigned i
size_t insize = ansi_string.length();
std::wstring w_out;
w_out.reserve(insize);
char *inptr = (char*)ansi_string.c_str();
char* outptr = (char*)w_out.c_str();
if (code_page >= 0)
{
......@@ -502,14 +504,21 @@ const std::wstring toStdWString(const std::string& ansi_string, const unsigned i
iconv_t ic= iconv_open("WCHAR_T", sCodepage.c_str());
if (ic != (iconv_t) -1)
{
size_t nconv = 0, avail = (insize) * sizeof(wchar_t);
size_t nconv = 0, avail = (insize + 1) * sizeof(wchar_t);
char* out_str = new char[avail];
char* outptr = out_str;
nconv = iconv (ic, &inptr, &insize, &outptr, &avail);
if (nconv == 0)
{
insize = ansi_string.length();
((wchar_t*)out_str)[insize] = 0;
w_out = std::wstring((wchar_t*)out_str, insize);
ansi = false;
}
iconv_close(ic);
delete []out_str;
}
}
if (ansi)
......
......@@ -23,9 +23,9 @@ namespace AUX
const int normalizeRow(const int row);
const std::wstring column2str(const int column);
const std::wstring row2str(const int row);
const std::wstring loc2str(const long row, const bool row_rel, const long column, const bool col_rel);
void str2loc(const std::wstring& str, long& row, bool& row_rel, long& column, bool& col_rel);
void str2loc(std::wstring::const_iterator& str_begin, std::wstring::const_iterator& str_end, long& row, bool& row_rel, long& column, bool& col_rel);
const std::wstring loc2str(const int row, const bool row_rel, const int column, const bool col_rel);
void str2loc(const std::wstring& str, int& row, bool& row_rel, int& column, bool& col_rel);
void str2loc(std::wstring::const_iterator& str_begin, std::wstring::const_iterator& str_end, int& row, bool& row_rel, int& column, bool& col_rel);
void str2refs(const std::wstring& str, std::vector<XLS::CellRangeRef>& vec);
};
......@@ -51,8 +51,8 @@ namespace STR
const size_t hex_str2int(const std::wstring::const_iterator& it_begin, const std::wstring::const_iterator& it_end);
//const std::string hres2wstr(const HRESULT hres);
const std::string toStdString(const std::wstring& wide_string, const unsigned int code_page);
const std::wstring toStdWString(const std::string& ansi_string, const unsigned int code_page);
const std::string toStdString(std::wstring wide_string, const unsigned int code_page);
const std::wstring toStdWString(std::string ansi_string, const unsigned int code_page);
};
namespace XMLSTUFF
......
......@@ -114,10 +114,9 @@ public:
CFRecord& operator>>(unsigned char& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(unsigned short& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(unsigned int& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(long& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(int& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(double& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(_GUID_& val) { loadAnyData(val); return *this; }
//CFRecord& operator>>(unsigned int& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(short& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(char& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(bool& val);
......@@ -125,10 +124,9 @@ public:
CFRecord& operator<<(unsigned char& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(unsigned short& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(unsigned int& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(long& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(int& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(double& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(_GUID_& val) { storeAnyData(val); return *this; }
//CFRecord& operator<<(unsigned int& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(short& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(char& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(wchar_t& val) { storeAnyData(val); return *this; }
......
......@@ -48,7 +48,7 @@ int MergeCells::serialize(std::wostream & stream)
CP_XML_WRITER(stream)
{
for (long i = 0 ; i < rgref.size(); i++)
for (int i = 0 ; i < rgref.size(); i++)
{
Ref8* ref = dynamic_cast<Ref8*>(rgref[i].get());
CP_XML_NODE(L"mergeCell")
......
......@@ -77,7 +77,7 @@ void MulBlank::readFields(CFRecord& record)
record.skipNunBytes(sizeof(unsigned short));
}
const long MulBlank::GetRow() const
const int MulBlank::GetRow() const
{
return static_cast<unsigned short>(rw);
}
......
......@@ -39,7 +39,7 @@ public:
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
const long GetRow() const;
const int GetRow() const;
int serialize(std::wostream & stream);
......
......@@ -50,7 +50,7 @@ void MulRk::readFields(CFRecord& record)
record.skipNunBytes(sizeof(unsigned short));
}
const long MulRk::GetRow() const
const int MulRk::GetRow() const
{
return static_cast<unsigned short>(rw);
}
......@@ -61,7 +61,7 @@ int MulRk::serialize(std::wostream & stream)
{
int row = GetRow();
for (long i = 0; i < cells.size(); i++)
for (int i = 0; i < cells.size(); i++)
{
Cell * cell = dynamic_cast<Cell *>(cells[i].get());
RkRec * rkrec = dynamic_cast<RkRec *>(rgrkrec[i].get());
......
......@@ -22,7 +22,7 @@ public:
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
const long GetRow() const;
const int GetRow() const;
int serialize(std::wostream & stream);
//-----------------------------
......
......@@ -6,8 +6,8 @@
typedef struct tagPOINT
{
long x;
long y;
_INT32 x;
_INT32 y;
} POINT;
typedef struct _devicemodeW
......
......@@ -86,7 +86,7 @@ int SST::serialize(std::wostream & stream)
CP_XML_ATTR(L"uniqueCount", rgb.size());
CP_XML_ATTR(L"xmlns", "http://schemas.openxmlformats.org/spreadsheetml/2006/main");
for (long i=0; i < rgb.size(); i++)
for (int i=0; i < rgb.size(); i++)
{
CP_XML_NODE(L"si")
{
......
#include "BiffString.h"
#include <utils.h>
namespace XLS
{
......@@ -72,9 +73,12 @@ void BiffString::load(CFRecord& record, const size_t cch, const bool is_wide)
if(is_wide)
{
//todoooo wchar_t = 4 !!!!
std::wstring int_str(record.getCurData<wchar_t>(), cch);
#if defined(_WIN32) || defined(_WIN64)
std::wstring int_str(record.getCurData<wchar_t>(), cch);
str_ = int_str.c_str();
#else
str_= convertUtf16ToWString(record.getCurData<UTF16>(), cch);
#endif
}
else
{
......
......@@ -94,10 +94,10 @@ const std::wstring CellRangeRef::toString(const bool useShortForm) const
{
if(to_string_cache.empty())
{
long rowLast_norm = AUX::normalizeRow(rowLast);
long rowFirst_norm = AUX::normalizeRow(rowFirst);
long columnFirst_norm = AUX::normalizeColumn(columnFirst);
long columnLast_norm = AUX::normalizeColumn(columnLast);
int rowLast_norm = AUX::normalizeRow(rowLast);
int rowFirst_norm = AUX::normalizeRow(rowFirst);
int columnFirst_norm = AUX::normalizeColumn(columnFirst);
int columnLast_norm = AUX::normalizeColumn(columnLast);
if(0 == rowFirst_norm && 65535 == rowLast_norm ) // whole column or range of columns
{
if(useShortForm)
......
......@@ -33,12 +33,12 @@ public:
const CellRef getTopLeftCell() const;
const long getRowFirst() const { return rowFirst; }
const long getRowLast() const { return rowLast; }
const int getRowFirst() const { return rowFirst; }
const int getRowLast() const { return rowLast; }
const bool getRowFirstRelative() const { return rowFirstRelative; }
const bool getRowLastRelative() const { return rowLastRelative; }
const long getColumnFirst() const { return columnFirst; }
const long getColumnLast() const { return columnLast; }
const int getColumnFirst() const { return columnFirst; }
const int getColumnLast() const { return columnLast; }
const bool getColumnFirstRelative() const { return columnFirstRelative; }
const bool getColumnLastRelative() const { return columnLastRelative; }
void setColumnRelativity(const bool is_relative);
......@@ -50,12 +50,12 @@ public:
virtual void load(CFRecord& record) {}
virtual void store(CFRecord& record) {}
long rowFirst;
long rowLast;
int rowFirst;
int rowLast;
bool rowFirstRelative;
bool rowLastRelative;
long columnFirst;
long columnLast;
int columnFirst;
int columnLast;
bool columnFirstRelative;
bool columnLastRelative;
......@@ -175,7 +175,7 @@ typedef CellRangeRef_T<Ref8_name, unsigned short, unsigned short, rel_Absent> Re
typedef CellRangeRef_T<Ref8U_name, unsigned short, unsigned short, rel_Absent> Ref8U;
typedef CellRangeRef_T<RefU_name, unsigned short, unsigned char, rel_Absent> RefU;
typedef CellRangeRef_T<Ref8U2007_name, unsigned int, unsigned int, rel_Absent> Ref8U2007;
typedef CellRangeRef_T<RFX_name, long, long, rel_Absent> RFX;
typedef CellRangeRef_T<RFX_name, int, int, rel_Absent> RFX;
typedef CellRangeRef_T<RgceArea_name, unsigned short, unsigned short, rel_Present> RgceArea;
typedef CellRangeRef_T<RgceAreaRel_name, short, short, rel_Present> RgceAreaRel;
......
......@@ -27,7 +27,7 @@ CellRef::CellRef(const std::wstring str_ref)
}
CellRef::CellRef(const long row_init, const long column_init, const bool row_relative_init, const bool col_relative_init)
CellRef::CellRef(const int row_init, const int column_init, const bool row_relative_init, const bool col_relative_init)
: row(row_init),
column(column_init),
rowRelative(row_relative_init),
......@@ -80,11 +80,11 @@ CellRef::operator const std::wstring () const
}
const long CellRef::getRow() const
const int CellRef::getRow() const
{
return row;
}
const long CellRef::getColumn() const
const int CellRef::getColumn() const
{
return column;
}
......
......@@ -12,7 +12,7 @@ public:
CellRef();
CellRef(const std::wstring str);
CellRef(const long row_init, const long column_init, const bool row_relative_init, const bool col_relative_init);
CellRef(const int row_init, const int column_init, const bool row_relative_init, const bool col_relative_init);
BiffStructurePtr clone();
......@@ -27,18 +27,18 @@ public:
void operator-=(const CellRef& subtracted_ref);
private:
virtual void load(CFRecord& record) {};
virtual void store(CFRecord& record) {};
virtual void load(CFRecord& record) {}
virtual void store(CFRecord& record) {}
public:
const long getRow() const;
const long getColumn() const;
const int getRow() const;
const int getColumn() const;
const bool getRowRelative() const;
const bool getColumnRelative() const;
protected:
long row;
long column;
int row;
int column;
bool rowRelative;
bool colRelative;
bool fQuoted;
......@@ -80,7 +80,7 @@ class CellRef_T : public CellRef
public:
CellRef_T(const std::wstring & str_ref) : CellRef(str_ref) {}
CellRef_T() {}
CellRef_T(const long row_init, const long column_init, const bool row_relative_init, const bool col_relative_init)
CellRef_T(const int row_init, const int column_init, const bool row_relative_init, const bool col_relative_init)
: CellRef(row_init, column_init, row_relative_init, col_relative_init) {}
template<class otherNameProducer, class otherRwType, class otherColType, RELATIVE_INFO otherRel_info>
......
......@@ -114,7 +114,7 @@ void CellXF::load(CFRecord& record)
void CellXF::RegisterFillBorder()
{
for (long i = 0; i < ext_props.size(); i++ )
for (int i = 0; i < ext_props.size(); i++ )
{
ExtProp* ext_prop = dynamic_cast<ExtProp*>(ext_props[i].get());
......
......@@ -23,13 +23,13 @@ public:
XLUnicodeStringNoCch stFontName;
Stxp stxp;
long icvFore;
int icvFore;
Ts tsNinch;
Boolean<unsigned int> fSssNinch;
Boolean<unsigned int> fUlsNinch;
Boolean<unsigned int> fBlsNinch;
long ich;
long cch;
int ich;
int cch;
unsigned short iFnt;
};
......
......@@ -20,8 +20,8 @@ public:
virtual void store(XLS::CFRecord& record);
EncryptionHeaderFlags Flags;
long AlgID;
long AlgIDHash;
int AlgID;
int AlgIDHash;
unsigned int KeySize;
unsigned int ProviderType;
std::wstring CSPName;
......
#include "FileMoniker.h"
#include <Binary/CFRecord.h>
#include <utils.h>
namespace OSHARED
{
......@@ -41,7 +42,12 @@ void FileMoniker::load(XLS::CFRecord& record)
{
unsigned int cbUnicodePathBytes;
record >> cbUnicodePathBytes >> usKeyValue;
unicodePath = std::wstring(record.getCurData<wchar_t>(), cbUnicodePathBytes / 2);
#if defined(_WIN32) || defined(_WIN64)
unicodePath = std::wstring(record.getCurData<wchar_t>(), cbUnicodePathBytes / 2);
#else
unicodePath = convertUtf16ToWString(record.getCurData<UTF16>(), cbUnicodePathBytes / 2);
#endif
record.skipNunBytes(cbUnicodePathBytes);
}
}
......
......@@ -12,7 +12,7 @@ FixedPoint::FixedPoint()
}
FixedPoint::FixedPoint(const long raw_data)
FixedPoint::FixedPoint(const int raw_data)
{
Fractional = static_cast<unsigned char>(raw_data & 0xFFFF);
Integral = static_cast<unsigned char>(raw_data >> 16);
......
......@@ -11,7 +11,7 @@ class FixedPoint : public XLS::BiffAttribute
{
public:
FixedPoint();
FixedPoint(const long raw_data);
FixedPoint(const int raw_data);
XLS::BiffStructurePtr clone();
//virtual void toXML(BiffStructurePtr & parent, const std::wstring & attrib_name);
......
......@@ -805,7 +805,7 @@ const std::wstring Ftab_Cetab::ValuesDetermination::getName(const unsigned short
// static
const long Ftab_Cetab::ValuesDetermination::getParamsNum(const unsigned short iftab)
const int Ftab_Cetab::ValuesDetermination::getParamsNum(const unsigned short iftab)
{
const ParamsFixedSet::index<sort_by_iftab>::type& iftab_index = getInst().params_fixed.get<sort_by_iftab>();
const ParamsFixedSet::index<sort_by_iftab>::type::iterator found = iftab_index.find(iftab);
......@@ -831,7 +831,7 @@ const unsigned short Ftab_Cetab::ValuesDetermination::getIndex(const std::wstrin
// static
const long Ftab_Cetab::ValuesDetermination::getParamsNum(const std::wstring& func_name)
const int Ftab_Cetab::ValuesDetermination::getParamsNum(const std::wstring& func_name)
{
const ParamsFixedSet::index<sort_by_name>::type& name_index = getInst().params_fixed.get<sort_by_name>();
const ParamsFixedSet::index<sort_by_name>::type::iterator found = name_index.find(func_name);
......@@ -849,7 +849,7 @@ const std::wstring Ftab_Cetab::getFuncName() const
}
const long Ftab_Cetab::getParamsNum() const
const int Ftab_Cetab::getParamsNum() const
{
return ValuesDetermination::getParamsNum(func_index);
}
......
......@@ -17,7 +17,7 @@ public:
Ftab_Cetab(const unsigned short func_index_init);
const std::wstring getFuncName() const;
const long getParamsNum() const;
const int getParamsNum() const;
const unsigned short getIndex() const;
const bool isMacro() const;
......@@ -27,21 +27,22 @@ public:
{
public:
static const std::wstring getName(const unsigned short iftab);
static const long getParamsNum(const unsigned short iftab);
static const int getParamsNum(const unsigned short iftab);
static const unsigned short getIndex(const std::wstring& func_name);
static const long getParamsNum(const std::wstring& func_name);
static const int getParamsNum(const std::wstring& func_name);
ValuesDetermination();
static ValuesDetermination& getInst()
{
static ValuesDetermination inst;
return inst;
};
}
struct ParamsFixed{
ParamsFixed(const unsigned short iftab_, const long params_num_, const std::wstring& name_): name(name_), iftab(iftab_), params_num(params_num_) {};
ParamsFixed(const unsigned short iftab_, const int params_num_, const std::wstring& name_):
name(name_), iftab(iftab_), params_num(params_num_) {}
std::wstring name;
unsigned short iftab;
long params_num;
int params_num;
};
struct sort_by_name {};
struct sort_by_iftab {};
......
#include "ItemMoniker.h"
#include <Binary/CFRecord.h>
#include <utils.h>
namespace OSHARED
{
......@@ -52,19 +53,29 @@ void ItemMoniker::load(XLS::CFRecord& record)
unsigned int delimiterLength;
record >> delimiterLength >> delimiterAnsi;
int sizeof_delimiterUnicode = delimiterLength - (delimiterAnsi.length() + 1);
if(sizeof_delimiterUnicode > 0)
{
delimiterUnicode = std::wstring(record.getCurData<wchar_t>(), sizeof_delimiterUnicode / 2);
record.skipNunBytes(sizeof_delimiterUnicode);
if(sizeof_delimiterUnicode > 0)
{
#if defined(_WIN32) || defined(_WIN64)
delimiterUnicode = std::wstring(record.getCurData<wchar_t>(), sizeof_delimiterUnicode / 2);
#else
delimiterUnicode = convertUtf16ToWString(record.getCurData<UTF16>(), sizeof_delimiterUnicode / 2);
#endif
record.skipNunBytes(sizeof_delimiterUnicode);
}
unsigned int itemLength;
record >> itemLength >> itemAnsi;
int sizeof_itemUnicode = itemLength - (itemAnsi.length() + 1);
if(sizeof_itemUnicode > 0)
{
itemUnicode = std::wstring(record.getCurData<wchar_t>(), sizeof_itemUnicode / 2);
record.skipNunBytes(sizeof_itemUnicode);
if(sizeof_itemUnicode > 0)
{
#if defined(_WIN32) || defined(_WIN64)
itemUnicode = std::wstring(record.getCurData<wchar_t>(), sizeof_itemUnicode / 2);
#else
itemUnicode = convertUtf16ToWString(record.getCurData<UTF16>(), sizeof_itemUnicode / 2);
#endif
record.skipNunBytes(sizeof_itemUnicode);
}
}
......
......@@ -18,7 +18,7 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
long imdt;
int imdt;
unsigned short mdd;
};
......
......@@ -23,7 +23,7 @@ void MSOSHADECOLOR::store(XLS::CFRecord& record)
void MSOSHADECOLOR::load(XLS::CFRecord& record)
{
long raw_color;
int raw_color;
record >> raw_color >> position;
color = OfficeArtCOLORREF(raw_color);
}
......
......@@ -16,7 +16,7 @@ namespace ODRAW
class MSOLINEDASHING
{
public:
static const std::wstring ToString(const long raw_data)
static const std::wstring ToString(const int raw_data)
{
switch (raw_data)
{
......@@ -61,7 +61,7 @@ public:
class MSOLINESTYLE
{
public:
static const std::wstring ToString(const long raw_data)
static const std::wstring ToString(const int raw_data)
{
switch (raw_data)
{
......
......@@ -11,7 +11,7 @@ OfficeArtCOLORREF::OfficeArtCOLORREF()
index = -1;
}
OfficeArtCOLORREF::OfficeArtCOLORREF(const long raw_data)
OfficeArtCOLORREF::OfficeArtCOLORREF(const int raw_data)
{
red = static_cast<unsigned char>(GETBITS(raw_data, 0, 7));
green = static_cast<unsigned char>(GETBITS(raw_data, 8, 15));
......
......@@ -15,13 +15,13 @@ class OfficeArtCOLORREF : public XLS::BiffStructure
BASE_STRUCTURE_DEFINE_CLASS_NAME(OfficeArtCOLORREF)
public:
OfficeArtCOLORREF();
OfficeArtCOLORREF(const long raw_data);
OfficeArtCOLORREF(const int raw_data);
XLS::BiffStructurePtr clone();
static const XLS::ElementType type = XLS::typeOfficeArtCOLORREF;
virtual void load(XLS::CFRecord& record) {};
virtual void store(XLS::CFRecord& record) {};
virtual void load(XLS::CFRecord& record) {}
virtual void store(XLS::CFRecord& record) {}
unsigned char red;
unsigned char green;
......
......@@ -27,10 +27,10 @@ public:
// bool fMove; // This attribute is ignored for chart sheets
bool fSize;
long lx1;
long ly1;
long lx2;
long ly2;
int lx1;
int ly1;
int lx2;
int ly2;
};
typedef boost::shared_ptr<OfficeArtClientAnchorChart> OfficeArtClientAnchorChartPtr;
......
......@@ -23,8 +23,8 @@ public:
virtual void loadFields(XLS::CFRecord& record);
virtual void storeFields(XLS::CFRecord& record);
long width;
long height;
int width;
int height;
};
typedef boost::shared_ptr<OfficeArtClientAnchorHF> OfficeArtClientAnchorHFPtr;
......
......@@ -28,20 +28,6 @@ OfficeArtContainer::OfficeArtContainer(const unsigned char recVer, const unsigne
{
}
//void OfficeArtContainer::setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
//{
// std::for_each(child_records.begin(), child_records.end(), boost::bind(&OfficeArtRecord::toXML, _1, xml_tag));
//}
//
//
//void OfficeArtContainer::getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
//{
//#pragma message("####################### OfficeArtContainer composite has no BiffStructure::getXMLAttributes() implemented")
// Log::error(" Error!!! OfficeArtContainer composite has no BiffStructure::getXMLAttributes() implemented.");
//}
void OfficeArtContainer::loadFields(XLS::CFRecord& record)
{
size_t container_beginning_ptr = record.getRdPtr();
......
......@@ -47,7 +47,7 @@ void OfficeArtDgContainer::loadFields(XLS::CFRecord& record)
{
}
for (long i = 0 ; i < child_records.size(); i++)
for (int i = 0 ; i < child_records.size(); i++)
{
switch(child_records[i]->rh_own.recType)
{
......
......@@ -3,6 +3,7 @@
#include <Binary/CFRecord.h>
#include "OfficeArtBlip.h"
#include <bitset>
#include <utils.h>
namespace ODRAW
{
......@@ -388,8 +389,12 @@ void fillBlip::ReadComplexData(XLS::CFRecord& record)
}
void anyString::ReadComplexData(XLS::CFRecord& record)
{
string_ = std::wstring(record.getCurData<wchar_t>(), op);
{
#if defined(_WIN32) || defined(_WIN64)
string_ = std::wstring(record.getCurData<wchar_t>(), op);
#else
string_ = convertUtf16ToWString(record.getCurData<UTF16>(), op);
#endif
record.skipNunBytes(op);
}
......
......@@ -79,7 +79,7 @@ public:
unsigned short opid;
bool fBid;
bool fComplex;
long op;
_INT32 op;
};
......@@ -515,8 +515,8 @@ class MSOPOINT : public XLS::BiffStructure
static const XLS::ElementType type = XLS::typeOfficeArtRecord;
long x;
long y;
int x;
int y;
};
class MSOPATHINFO : public XLS::BiffStructure
......
......@@ -23,10 +23,10 @@ public:
virtual void loadFields(XLS::CFRecord& record);
virtual void storeFields(XLS::CFRecord& record);
long xLeft;
long yTop;
long xRight;
long yBottom;
int xLeft;
int yTop;
int xRight;
int yBottom;
};
typedef boost::shared_ptr<OfficeArtFSPGR> OfficeArtFSPGRPtr;
......
......@@ -8,16 +8,16 @@
typedef struct tagPOINT
{
long x;
long y;
_INT32 x;
_INT32 y;
} POINT;
typedef struct tagRECT
{
long left;
long top;
long right;
long bottom;
_INT32 left;
_INT32 top;
_INT32 right;
_INT32 bottom;
} RECT;
#else
#include <windows.h>
......
......@@ -14,7 +14,7 @@ void OfficeArtDggContainer::loadFields(XLS::CFRecord& record)
{
OfficeArtContainer::loadFields(record);
for (long i = 0 ; i < child_records.size(); i++)
for (int i = 0 ; i < child_records.size(); i++)
{
switch(child_records[i]->rh_own.recType)
{
......@@ -52,7 +52,7 @@ void OfficeArtSpgrContainer::loadFields(XLS::CFRecord& record)
{
OfficeArtContainer::loadFields(record);
//for (long i = 0 ; i < child_records.size(); i++)
//for (int i = 0 ; i < child_records.size(); i++)
//{
// switch(child_records[i]->rh_own.recType)
// {
......
......@@ -44,14 +44,14 @@ void PtgFunc::loadFields(CFRecord& record)
void PtgFunc::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data)
{
long num_params = iftab.getParamsNum();
int num_params = iftab.getParamsNum();
std::wstring arguments;
if(num_params && ptg_stack.size() > 0)
{
arguments += ptg_stack.top();
ptg_stack.pop();
for(long i = 0; i < num_params - 1 && ptg_stack.size() > 0; ++i)
for(int i = 0; i < num_params - 1 && ptg_stack.size() > 0; ++i)
{
arguments = ptg_stack.top() + L',' + arguments;
ptg_stack.pop();
......@@ -78,7 +78,7 @@ PtgPtr PtgFunc::create(const std::wstring& word, const unsigned char data_type)
}
const long PtgFunc::getParametersNum() const
const int PtgFunc::getParametersNum() const
{
return iftab.getParamsNum();
}
......
......@@ -24,7 +24,7 @@ public:
virtual void assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data);
const long getParametersNum() const;
const int getParametersNum() const;
static const unsigned short fixed_id = 0x01;
private:
......
......@@ -113,31 +113,31 @@ const std::wstring PtgParam::getClearLine() const
}
const long PtgParam::getFirstParam() const
const int PtgParam::getFirstParam() const
{
return params[0];
}
const long PtgParam::getSecondParam() const
const int PtgParam::getSecondParam() const
{
return params[1];
}
const long PtgParam::getParam(const size_t pos) const
const int PtgParam::getParam(const size_t pos) const
{
return params[pos];
}
const long PtgParam::getParamsNum() const
const int PtgParam::getParamsNum() const
{
return params.size();
}
void PtgParam::addParam(const long param)
void PtgParam::addParam(const int param)
{
params.push_back(param);
}
......@@ -149,7 +149,7 @@ const std::wstring PtgParam::toString() const
if(!params.empty())
{
result += L'(';
for(std::vector<long>::const_iterator it = params.begin(), itEnd = --params.end(); it != itEnd; ++it)
for(std::vector<int>::const_iterator it = params.begin(), itEnd = --params.end(); it != itEnd; ++it)
{
result += STR::int2wstr(*it) + L',';
}
......
......@@ -21,13 +21,13 @@ public:
const ParamType getType() const;
const std::wstring getClearLine() const;
const long getFirstParam() const;
const long getSecondParam() const;
const long getParam(const size_t pos) const;
const long getParamsNum() const;
const int getFirstParam() const;
const int getSecondParam() const;
const int getParam(const size_t pos) const;
const int getParamsNum() const;
const std::wstring toString() const;
void addParam(const long param);
void addParam(const int param);
......@@ -37,7 +37,7 @@ private:
private:
ParamType type_;
std::vector<long> params;
std::vector<int> params;
std::wstring clear_line_;
};
......
......@@ -22,7 +22,7 @@ public:
virtual void store(CFRecord& record);
unsigned int cbMemory;
long revid;
int revid;
RevisionType revt;
bool fAccepted;
bool fUndoAction;
......
......@@ -26,6 +26,8 @@ public:
virtual const std::wstring toString() const = 0;
static const ElementType type = typeSerAr;
SerType fixed_type;
};
typedef boost::shared_ptr<SerAr> SerArPtr;
......
......@@ -8,6 +8,7 @@ namespace XLS
SerBool::SerBool()
{
fixed_type = typeSerBool;
}
......@@ -25,7 +26,7 @@ BiffStructurePtr SerBool::clone()
void SerBool::store(CFRecord& record)
{
record.storeAnyData(fixed_type);
record.storeAnyData(fixed_type);
record << f;
record.reserveNunBytes(7); // reserved/unused
}
......
......@@ -17,7 +17,7 @@ public:
virtual const std::wstring toString() const;
private:
const static SerType fixed_type = typeSerBool;
unsigned char f;
};
......
......@@ -8,6 +8,7 @@ namespace XLS
SerErr::SerErr()
{
fixed_type= typeSerErr;
}
......
......@@ -18,8 +18,7 @@ public:
virtual const std::wstring toString() const;
private:
const static SerType fixed_type = typeSerErr;
BErr err;
BErr err;
};
......
......@@ -5,6 +5,10 @@
namespace XLS
{
SerNil::SerNil()
{
fixed_type = typeSerNil;
}
BiffStructurePtr SerNil::clone()
{
......
......@@ -9,13 +9,12 @@ class SerNil : public SerAr
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SerNil)
public:
SerNil();
BiffStructurePtr clone();
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
virtual const std::wstring toString() const;
private:
const static SerType fixed_type = typeSerNil;
};
} // namespace XLS
......@@ -8,6 +8,7 @@ namespace XLS
SerNum::SerNum()
{
fixed_type = typeSerNum;
}
......
......@@ -17,7 +17,6 @@ public:
virtual const std::wstring toString() const;
private:
const static SerType fixed_type = typeSerNum;
double xnum;
};
......
......@@ -10,6 +10,7 @@ namespace XLS
SerStr::SerStr()
{
fixed_type = typeSerStr;
}
......
......@@ -17,8 +17,6 @@ public:
virtual void store(CFRecord& record);
virtual const std::wstring toString() const;
private:
const static SerType fixed_type = typeSerStr;
XLUnicodeString string_;
};
......
......@@ -28,7 +28,7 @@ public:
CondDataValue condDataValue;
CFFlag cfflag;
long cchSt;
int cchSt;
XLUnicodeStringNoCch stSslist;
};
......
......@@ -19,7 +19,7 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
long twpHeight;
int twpHeight;
Ts ts;
short bls;
short sss;
......
......@@ -102,7 +102,7 @@ void StyleXF::load(CFRecord& record)
void StyleXF::RegisterFillBorder()
{
for (long i = 0; i < ext_props.size(); i++ )
for (int i = 0; i < ext_props.size(); i++ )
{
ExtProp* ext_prop = dynamic_cast<ExtProp*>(ext_props[i].get());
......
......@@ -125,7 +125,7 @@ void XLUnicodeRichExtendedString::store(CFRecord& record)
}
if(fExtSt)
{
long cbExtRst = extRst.getSize();
int cbExtRst = extRst.getSize();
record << cbExtRst;
}
......@@ -185,7 +185,7 @@ void XLUnicodeRichExtendedString::load(CFRecord& record)
{
record >> cRun;
}
long cbExtRst = 0;
int cbExtRst = 0;
if(fExtSt)
{
record >> cbExtRst;
......@@ -232,8 +232,12 @@ void XLUnicodeRichExtendedString::loadSymbols(CFRecord& record, const size_t cch
if(is_wide)
{
std::wstring int_str(record.getCurData<wchar_t>(), cch);
#if defined(_WIN32) || defined(_WIN64)
std::wstring int_str(record.getCurData<wchar_t>(), cch);
str_ = int_str.c_str();
#else
str_ = convertUtf16ToWString(record.getCurData<UTF16>(), cch);
#endif
}
else
{
......@@ -284,11 +288,11 @@ const size_t XLUnicodeRichExtendedString::getNonVariablePartSize() const
unsigned short size = sizeof(unsigned short)/*cch*/ + sizeof(unsigned char)/*flags*/;
if(fRichSt)
{
size += sizeof(unsigned short)/*cRun*/;
size += sizeof(unsigned short)/*cRun*/; //2 !!!!
}
if(fExtSt)
{
size += sizeof(long)/*cbExtRst*/;
size += sizeof(int)/*cbExtRst*/; // ??? 4!!!
}
return size;
}
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeCELL;
long RowNumber;
int RowNumber;
std::vector<CellRef>& shared_formulas_locations_ref_;
};
......
......@@ -25,7 +25,7 @@ public:
std::vector<CellRef>& shared_formulas_locations_ref_;
long m_count_CELL_GROUP;
int m_count_CELL_GROUP;
};
} // namespace XLS
......
......@@ -101,7 +101,7 @@ int FORMATTING::serialize1(std::wostream & stream)
CP_XML_NODE(L"numFmts")
{
CP_XML_ATTR(L"count", m_Formats.size());
for (long i = 0 ; i < m_Formats.size(); i++)
for (int i = 0 ; i < m_Formats.size(); i++)
{
m_Formats[i]->serialize(CP_XML_STREAM());
}
......@@ -112,7 +112,7 @@ int FORMATTING::serialize1(std::wostream & stream)
CP_XML_NODE(L"fonts")
{
CP_XML_ATTR(L"count", m_Fonts.size());
for (long i = 0 ; i < m_Fonts.size(); i++)
for (int i = 0 ; i < m_Fonts.size(); i++)
{
Font * font = dynamic_cast<Font*>(m_Fonts[i].get());
std::map<int, FillInfoExt>::iterator it = global_info->fonts_color_ext.find(i);
......
......@@ -87,7 +87,7 @@ int STYLES::serialize(std::wostream & stream)
}
}
for (long i = 0; i < styleExt->xfProps.xfPropArray.size(); i++)
for (int i = 0; i < styleExt->xfProps.xfPropArray.size(); i++)
{
}
}
......
......@@ -115,7 +115,7 @@ const bool XFS::loadContent(BinProcessor& proc)
}*/
}
for (long i = 0 ; i < m_cell_xfs.size(); i++)
for (int i = 0 ; i < m_cell_xfs.size(); i++)
{
XF *xfs = dynamic_cast<XF*>(m_cell_xfs[i].get());
......@@ -151,7 +151,7 @@ int XFS::serialize(std::wostream & stream)
CP_XML_NODE(L"cellStyleXfs")
{
CP_XML_ATTR(L"count", m_cell_styles.size());
for (long i = 0; i < m_cell_styles.size(); i++)
for (int i = 0; i < m_cell_styles.size(); i++)
{
m_cell_styles[i]->serialize(CP_XML_STREAM());
}
......@@ -159,7 +159,7 @@ int XFS::serialize(std::wostream & stream)
CP_XML_NODE(L"cellXfs")
{
CP_XML_ATTR(L"count", m_cell_xfs.size());
for (long i = 0; i < m_cell_xfs.size(); i++)
for (int i = 0; i < m_cell_xfs.size(); i++)
{
m_cell_xfs[i]->serialize(CP_XML_STREAM());
}
......
......@@ -225,7 +225,7 @@ void XlsConverter::convert(XLS::WorkbookStreamObject* woorkbook)
convert((XLS::GlobalsSubstream*)woorkbook->m_GlobalsSubstream.get());
for (long i=0 ; i < woorkbook->m_WorksheetSubstream.size(); i++)
for (int i=0 ; i < woorkbook->m_WorksheetSubstream.size(); i++)
{
xlsx_context->start_table(xls_global_info->sheets_names[i]);
convert((XLS::WorksheetSubstream*)woorkbook->m_WorksheetSubstream[i].get());
......@@ -271,14 +271,14 @@ void XlsConverter::convert(XLS::WorksheetSubstream* sheet)
{
CP_XML_NODE(L"mergeCells")
{
for (long i = 0 ; i < sheet->m_MergeCells.size(); i++)
for (int i = 0 ; i < sheet->m_MergeCells.size(); i++)
{
sheet->m_MergeCells[i]->serialize(CP_XML_STREAM());
}
}
}
}
for (long i = 0 ; i < sheet->m_HLINK.size(); i++)
for (int i = 0 ; i < sheet->m_HLINK.size(); i++)
{
convert((XLS::HLINK*)sheet->m_HLINK[i].get());
}
......@@ -300,12 +300,12 @@ void XlsConverter::convert(XLS::GlobalsSubstream* global)
convert((XLS::SHAREDSTRINGS*)global->m_SHAREDSTRINGS.get());
for (long i = 0 ; i < global->m_LBL.size(); i++)
for (int i = 0 ; i < global->m_LBL.size(); i++)
{
convert((XLS::LBL*)global->m_LBL[i].get());
}
for (long i = 0 ; i < global->m_MSODRAWINGGROUP.size(); i++)
for (int i = 0 ; i < global->m_MSODRAWINGGROUP.size(); i++)
{
convert((XLS::MSODRAWINGGROUP*)global->m_MSODRAWINGGROUP[i].get());
}
......@@ -410,7 +410,7 @@ void XlsConverter::convert(ODRAW::OfficeArtBStoreContainer* art_bstore)
FileSystem::Directory::CreateDirectory((xl_path + FILE_SEPARATOR_STR + L"media").c_str());
for (long i =0 ; i < art_bstore->rgfb.size(); i++)
for (int i =0 ; i < art_bstore->rgfb.size(); i++)
{
int bin_id = i + 1;
if (art_bstore->rgfb[i]->data_size > 0 && art_bstore->rgfb[i]->pict_data)
......@@ -489,7 +489,7 @@ void XlsConverter::convert(XLS::OBJECTS* objects)
ODRAW::OfficeArtSpgrContainer *spgr = dynamic_cast<ODRAW::OfficeArtSpgrContainer*>(objects->m_MsoDrawing.get()->rgChildRec.m_OfficeArtSpgrContainer.get());
for (long i = 0 ; i < objects->m_OBJs.size(); i++)
for (int i = 0 ; i < objects->m_OBJs.size(); i++)
{
int ind = objects->m_OBJs[i].second;
XLS::OBJ* OBJ = dynamic_cast<XLS::OBJ*>(objects->m_OBJs[i].first.get());
......@@ -516,7 +516,7 @@ void XlsConverter::convert(XLS::OBJECTS* objects)
}
}
for (long i = 0; i <objects->m_TEXTOBJECTs.size(); i++)
for (int i = 0; i <objects->m_TEXTOBJECTs.size(); i++)
{
int ind = objects->m_OBJs[i].second;
XLS::TEXTOBJECT* textObject = dynamic_cast<XLS::TEXTOBJECT*>(objects->m_TEXTOBJECTs[i].first.get());
......@@ -544,7 +544,7 @@ void XlsConverter::convert(XLS::OBJECTS* objects)
}
}
for (long i = 0 ; i < objects->m_CHARTs.size(); i++)
for (int i = 0 ; i < objects->m_CHARTs.size(); i++)
{
int ind = objects->m_OBJs[i].second;
//xlsx_context->get_chart_context().start_drawing();
......
......@@ -75,7 +75,7 @@ std::wstring external_items::add_image(const std::wstring & image, int bin_id)
std::wstring external_items::find_image(int _id, std::wstring & target, bool & isInternal)
{
for (long i=0 ; i <items_.size(); i ++)
for (int i=0 ; i <items_.size(); i ++)
{
if (items_[i].type == typeImage && items_[i].id == _id)
{
......@@ -88,7 +88,7 @@ std::wstring external_items::find_image(int _id, std::wstring & target, bool & i
}
std::wstring external_items::find_image(const std::wstring & target, bool & isInternal)
{
for (long i=0 ; i <items_.size(); i ++)
for (int i=0 ; i <items_.size(); i ++)
{
if (items_[i].type == typeImage && items_[i].uri == target)
{
......
......@@ -75,7 +75,11 @@ void content_types_file::set_media(external_items & _Mediaitems)
simple_element::simple_element(const std::wstring & FileName, const std::wstring & Content) : file_name_(FileName)
{
utf8::utf16to8(Content.begin(), Content.end(), std::back_inserter(content_utf8_));
//utf8::utf16to8(Content.begin(), Content.end(), std::back_inserter(content_utf8_));
//падает на спец символах
content = Content;
}
void simple_element::write(const std::wstring & RootPath)
......@@ -86,9 +90,10 @@ void simple_element::write(const std::wstring & RootPath)
if ( file.CreateFileW(name_) == true)
{
std::string root = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
file.WriteFile((BYTE*)root.c_str(), root.length());
file.WriteFile((BYTE*)content_utf8_.c_str(), content_utf8_.length());
file.CloseFile();
file.WriteFile((BYTE*)root.c_str(), root.length());
//file.WriteFile((BYTE*)content_utf8_.c_str(), content_utf8_.length());
file.WriteStringUTF8(content);
file.CloseFile();
}
}
......@@ -242,4 +247,4 @@ void charts::write(const std::wstring & RootPath)
}
}
}
\ No newline at end of file
}
......@@ -72,7 +72,8 @@ public:
private:
std::wstring file_name_;
std::string content_utf8_;
//std::string content_utf8_;
std::wstring content;
};
......@@ -198,4 +199,4 @@ private:
} // namespace package
}
\ No newline at end of file
}
......@@ -143,7 +143,7 @@ void xlsx_drawing_context::start_shape(int type)
count_object++;
}
void xlsx_drawing_context::set_id(long id)
void xlsx_drawing_context::set_id(int id)
{
if (drawing_state.size() < 1 )return;
drawing_state.back().id = id;
......@@ -528,27 +528,27 @@ void xlsx_drawing_context::set_image(const std::wstring & str)
drawing_state.back().image_target = str;
}
void xlsx_drawing_context::set_crop_top (long val)
void xlsx_drawing_context::set_crop_top (int val)
{
if (drawing_state.size() < 1 )return;
drawing_state.back().image_crop[1] = val * 1.5;
}
void xlsx_drawing_context::set_crop_bottom(long val)
void xlsx_drawing_context::set_crop_bottom(int val)
{
if (drawing_state.size() < 1 )return;
drawing_state.back().image_crop[3] = val* 1.5;
}
void xlsx_drawing_context::set_crop_left (long val)
void xlsx_drawing_context::set_crop_left (int val)
{
if (drawing_state.size() < 1 )return;
drawing_state.back().image_crop[0]= val* 1.5;
}
void xlsx_drawing_context::set_crop_right (long val)
void xlsx_drawing_context::set_crop_right (int val)
{
if (drawing_state.size() < 1 )return;
drawing_state.back().image_crop[2] = val* 1.5;
}
void xlsx_drawing_context::set_rotation (long val)
void xlsx_drawing_context::set_rotation (int val)
{
if (drawing_state.size() < 1 )return;//in degrees
drawing_state.back().rotation = val;
......@@ -567,7 +567,7 @@ void xlsx_drawing_context::set_line_color (int index, int type)
else if (type == 2) drawing_state.back().line.color.bPalette = true;
}
void xlsx_drawing_context::set_line_type (long val)
void xlsx_drawing_context::set_line_type (int val)
{
if (drawing_state.size() < 1 )return;
switch(val)
......@@ -577,7 +577,7 @@ void xlsx_drawing_context::set_line_type (long val)
case 2: drawing_state.back().line.type = L"blipFill"; break;
}
}
void xlsx_drawing_context::set_line_style (long val)
void xlsx_drawing_context::set_line_style (int val)
{
if (drawing_state.size() < 1 )return;
switch(val)
......@@ -590,7 +590,7 @@ void xlsx_drawing_context::set_line_style (long val)
}
}
void xlsx_drawing_context::set_line_width (long val)
void xlsx_drawing_context::set_line_width (int val)
{
if (drawing_state.size() < 1 )return;
drawing_state.back().line.width = val;
......
......@@ -92,7 +92,7 @@ public:
int opacity;
std::wstring type;
std::wstring style;
long width;
int width;
}line;
};
......@@ -115,7 +115,7 @@ public:
void start_image();
void start_shape(int type);
void set_id (long id);
void set_id (int id);
void set_FlipH ();
void set_FlipV ();
void set_shape_id (int id);
......@@ -123,18 +123,18 @@ public:
void set_name (const std::wstring & str);
void set_description(const std::wstring & str);
void set_crop_top (long val);
void set_crop_bottom(long val);
void set_crop_left (long val);
void set_crop_right (long val);
void set_crop_top (int val);
void set_crop_bottom(int val);
void set_crop_left (int val);
void set_crop_right (int val);
void set_rotation (long val);
void set_rotation (int val);
void set_line_color (const std::wstring & color);
void set_line_color (int index, int type);
void set_line_type (long val);
void set_line_style (long val);
void set_line_width (long val);
void set_line_type (int val);
void set_line_style (int val);
void set_line_width (int val);
void set_image (const std::wstring & str);
void set_anchor (const std::wstring & str);
......
......@@ -44,7 +44,11 @@ linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
DEFINES += UNICODE \
_UNICODE
CONFIG(debug, debug|release){
message(Debug)
DEFINES += _DEBUG
}
#################### WINDOWS #####################
win32 {
......
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