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

XlsFile2 восстановление win build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64125 954022d7-b5bf-4e40-9824-e11837661b57
parent e281ec8d
#pragma once #pragma once
#include <string>
#include <string> #include <string>
#include <boost/optional.hpp> #include <boost/optional.hpp>
......
...@@ -225,7 +225,9 @@ const std::wstring guid2bstr(const _GUID_ guid) ...@@ -225,7 +225,9 @@ const std::wstring guid2bstr(const _GUID_ guid)
std::wstring guid_ret; std::wstring guid_ret;
#if defined(_WIN64) || defined(_WIN64) #if defined(_WIN64) || defined(_WIN64)
LPOLESTR guid_str; LPOLESTR guid_str;
if(S_OK != StringFromIID(guid, &guid_str)) GUID guid1={};
memcpy(&guid1, &guid, sizeof(GUID));
if(S_OK != StringFromIID(guid1,&guid_str))
{ {
// The only case is E_OUTOFMEMORY, so just throw anything // The only case is E_OUTOFMEMORY, so just throw anything
throw;// EXCEPT::LE::WhatIsTheFuck("StringFromIID failed.", "guid2bstr"); throw;// EXCEPT::LE::WhatIsTheFuck("StringFromIID failed.", "guid2bstr");
...@@ -250,7 +252,9 @@ const std::string guid2str(const _GUID_ guid) ...@@ -250,7 +252,9 @@ const std::string guid2str(const _GUID_ guid)
const bool bstr2guid(const std::wstring & guid_str, _GUID_& guid) const bool bstr2guid(const std::wstring & guid_str, _GUID_& guid)
{ {
#if defined(_WIN64) || defined(_WIN64) #if defined(_WIN64) || defined(_WIN64)
HRESULT res = IIDFromString((LPWSTR)(guid_str.c_str()), &guid);
GUID guid1={};
HRESULT res = IIDFromString((LPWSTR)(guid_str.c_str()), &guid1);
if(S_OK != res) if(S_OK != res)
{ {
switch(res) switch(res)
...@@ -261,6 +265,7 @@ const bool bstr2guid(const std::wstring & guid_str, _GUID_& guid) ...@@ -261,6 +265,7 @@ const bool bstr2guid(const std::wstring & guid_str, _GUID_& guid)
throw;// EXCEPT::LE::WhatIsTheFuck("IIDFromString failed.", "bstr2guid"); throw;// EXCEPT::LE::WhatIsTheFuck("IIDFromString failed.", "bstr2guid");
} }
} }
else memcpy(&guid, &guid1, sizeof(guid1));
#else #else
//todooooo //todooooo
...@@ -334,9 +339,12 @@ const std::wstring unescape_ST_Xstring(const std::wstring& wstr) ...@@ -334,9 +339,12 @@ const std::wstring unescape_ST_Xstring(const std::wstring& wstr)
while(true) while(true)
{ {
const auto it_range = boost::make_iterator_range(x_pos_noncopied, wstr_end); #ifdef __linux__
const auto it_range = boost::make_iterator_range(x_pos_noncopied, wstr_end);
x_pos_next = boost::algorithm::find_first(it_range, L"_x").begin(); x_pos_next = boost::algorithm::find_first(it_range, L"_x").begin();
#else
x_pos_next = boost::algorithm::find_first(boost::make_iterator_range(x_pos_noncopied, wstr_end), L"_x").begin();
#endif
if ( wstr_end == x_pos_next) break; if ( wstr_end == x_pos_next) break;
if(!boost::regex_search(x_pos_next, wstr_end, match_hex)) if(!boost::regex_search(x_pos_next, wstr_end, match_hex))
{ {
......
...@@ -68,6 +68,8 @@ ...@@ -68,6 +68,8 @@
#endif #endif
#endif /* WINVER >= 0x0400 */ #endif /* WINVER >= 0x0400 */
} DEVMODE; } DEVMODE;
#else
#include <windows.h>
#endif #endif
namespace XLS namespace XLS
......
...@@ -84,6 +84,7 @@ public: ...@@ -84,6 +84,7 @@ public:
ForwardOnlyParam<Type> operator= (const ForwardOnlyParam<Type>& other) ForwardOnlyParam<Type> operator= (const ForwardOnlyParam<Type>& other)
{ {
BiffAttributeSimple<Type>::val = other.val; BiffAttributeSimple<Type>::val = other.val;
return *this;
} }
}; };
...@@ -102,6 +103,7 @@ public: ...@@ -102,6 +103,7 @@ public:
BackwardOnlyParam<Type> operator= (const BackwardOnlyParam<Type>& other) BackwardOnlyParam<Type> operator= (const BackwardOnlyParam<Type>& other)
{ {
BiffAttributeSimple<Type>::val = other.val; BiffAttributeSimple<Type>::val = other.val;
return *this;
} }
}; };
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
_UINT32 dwLowDateTime; _UINT32 dwLowDateTime;
_UINT32 dwHighDateTime; _UINT32 dwHighDateTime;
} FILETIME; } FILETIME;
#else
#include <windows.h>
#endif #endif
namespace OSHARED namespace OSHARED
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
long right; long right;
long bottom; long bottom;
} RECT; } RECT;
#else
#include <windows.h>
#endif #endif
namespace XLS namespace XLS
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
PACL Dacl; PACL Dacl;
} SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR; } SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
#else
#include <windows.h>
#endif #endif
namespace XLS namespace XLS
......
...@@ -17,7 +17,7 @@ public: ...@@ -17,7 +17,7 @@ public:
virtual const std::wstring toString() const; virtual const std::wstring toString() const;
private: private:
const SerType fixed_type = typeSerBool; const static SerType fixed_type = typeSerBool;
unsigned char f; unsigned char f;
}; };
......
...@@ -18,7 +18,7 @@ public: ...@@ -18,7 +18,7 @@ public:
virtual const std::wstring toString() const; virtual const std::wstring toString() const;
private: private:
const SerType fixed_type = typeSerErr; const static SerType fixed_type = typeSerErr;
BErr err; BErr err;
}; };
......
...@@ -15,7 +15,7 @@ public: ...@@ -15,7 +15,7 @@ public:
virtual const std::wstring toString() const; virtual const std::wstring toString() const;
private: private:
const SerType fixed_type = typeSerNil; const static SerType fixed_type = typeSerNil;
}; };
} // namespace XLS } // namespace XLS
...@@ -17,7 +17,7 @@ public: ...@@ -17,7 +17,7 @@ public:
virtual const std::wstring toString() const; virtual const std::wstring toString() const;
private: private:
const SerType fixed_type = typeSerNum; const static SerType fixed_type = typeSerNum;
double xnum; double xnum;
}; };
......
...@@ -18,7 +18,7 @@ public: ...@@ -18,7 +18,7 @@ public:
virtual const std::wstring toString() const; virtual const std::wstring toString() const;
private: private:
const SerType fixed_type = typeSerStr; const static SerType fixed_type = typeSerStr;
XLUnicodeString string_; XLUnicodeString string_;
}; };
......
...@@ -243,14 +243,14 @@ BaseObjectPtr CELLTABLE::clone() ...@@ -243,14 +243,14 @@ BaseObjectPtr CELLTABLE::clone()
// CELLTABLE = 1*(1*Row *CELL 1*DBCell) *EntExU2 // CELLTABLE = 1*(1*Row *CELL 1*DBCell) *EntExU2
const bool CELLTABLE::loadContent(BinProcessor& proc) const bool CELLTABLE::loadContent(BinProcessor& proc)
{ {
CELL_GROUP cell_group(shared_formulas_locations_ref_); CELL_GROUP cell_group1(shared_formulas_locations_ref_);
if(!proc.mandatory(cell_group1))
if(!proc.mandatory(cell_group))
{ {
return false; return false;
} }
m_count_CELL_GROUP = proc.repeated(cell_group, 0, 0); CELL_GROUP cell_group2(shared_formulas_locations_ref_);
m_count_CELL_GROUP = proc.repeated(cell_group2, 0, 0);
proc.repeated<EntExU2>(0, 0); proc.repeated<EntExU2>(0, 0);
......
...@@ -2,18 +2,8 @@ ...@@ -2,18 +2,8 @@
#include <string> #include <string>
#if defined(_WIN32) || defined(_WIN64) #include <tchar.h>
#include <tchar.h>
#else
#ifdef UNICODE
#define __T(x) L##x
#else // UNICODE
#define __T(x) x
#endif // UNICODE
#define _T(x) __T(x)
#define _TEXT(x) __T(x)
#endif
namespace oox namespace oox
{ {
...@@ -440,4 +430,4 @@ namespace oox ...@@ -440,4 +430,4 @@ namespace oox
} }
return _T(""); return _T("");
} }
} }
\ No newline at end of file
...@@ -3929,14 +3929,6 @@ ...@@ -3929,14 +3929,6 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\PictFmlaKey.h" RelativePath="..\XlsFormat\Logic\Biff_structures\PictFmlaKey.h"
> >
</File> </File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\Property.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\Property.h"
>
</File>
<File <File
RelativePath="..\XlsFormat\Logic\Biff_structures\PropertyBag.cpp" RelativePath="..\XlsFormat\Logic\Biff_structures\PropertyBag.cpp"
> >
...@@ -4577,6 +4569,14 @@ ...@@ -4577,6 +4569,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\SharedParsedFormula.h" RelativePath="..\XlsFormat\Logic\Biff_structures\SharedParsedFormula.h"
> >
</File> </File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\SharedProperty.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\SharedProperty.h"
>
</File>
<File <File
RelativePath="..\XlsFormat\Logic\Biff_structures\SheetExtOptional.cpp" RelativePath="..\XlsFormat\Logic\Biff_structures\SheetExtOptional.cpp"
> >
...@@ -7237,47 +7237,11 @@ ...@@ -7237,47 +7237,11 @@
Name="Structures" Name="Structures"
> >
<File <File
RelativePath="..\XlsFormat\Logic\SummaryInformationStream\Structures\CodePage.cpp" RelativePath="..\XlsFormat\Logic\SummaryInformationStream\Structures\CodePageOle.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath="..\XlsFormat\Logic\SummaryInformationStream\Structures\CodePage.h" RelativePath="..\XlsFormat\Logic\SummaryInformationStream\Structures\CodePageOle.h"
> >
</File> </File>
<File <File
......
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