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

XlsFile2 linux build prepare

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64101 954022d7-b5bf-4e40-9824-e11837661b57
parent f5e2b208
#include "../DocFormatLib/DocFormatLib.h"
#include "../Win32/ASCOfficeCriticalSection.h"
#include <iostream>
#include "../Win32/version.h"
static std::wstring utf8_to_unicode(const char *src)
{
if (src == NULL) return _T("");
std::string temp = src;
unsigned int nLength = temp.length();
UTF32 *pStrUtf32 = new UTF32 [nLength+1];
memset ((void *) pStrUtf32, 0, sizeof (UTF32) * (nLength+1));
UTF8 *pStrUtf8 = (UTF8 *) src;
// this values will be modificated
const UTF8 *pStrUtf8_Conv = pStrUtf8;
UTF32 *pStrUtf32_Conv = pStrUtf32;
ConversionResult eUnicodeConversionResult = ConvertUTF8toUTF32 (&pStrUtf8_Conv,
&pStrUtf8[nLength]
, &pStrUtf32_Conv
, &pStrUtf32 [nLength]
, strictConversion);
if (conversionOK != eUnicodeConversionResult)
{
delete [] pStrUtf32;
return L"";
}
std::wstring wsEntryName ((wchar_t *) pStrUtf32);
delete [] pStrUtf32;
return wsEntryName;
}
ASCOfficeCriticalSection g_oCriticalSection;
int main(int argc, char *argv[])
{
// check arguments
if (argc < 3)
{
// print out help topic
std::cout << std::endl;
std::cout << std::endl;
std::cout << "-------------------------------------------------------------------------------" << std::endl;
std::cout << "\t\tDoc/Docx file converter. Version: " << STRVER << std::endl;
std::cout << "-------------------------------------------------------------------------------" << std::endl;
std::cout << std::endl;
std::cout << "USAGE: ASCDocConverter \"path_to_file_1\" \"path_to_file_2\" " << std::endl;
std::cout << "WHERE:" << std::endl;
std::cout << "\t\"path_to_file_1\" is a path to file to be converted" << std::endl;
std::cout << "\t\"path_to_file_2\" is a path to the corresponding output file" << std::endl << std::endl;
return 1;
}
CString sArg1, sArg2, sExePath;
sExePath = utf8_to_unicode(argv [0]);
sArg1 = utf8_to_unicode(argv [1]);
sArg2 = utf8_to_unicode(argv [2]);
CString sXMLOptions = _T("");
{// doc->docx
COfficeDocFile docFile;
HRESULT hRes = docFile.LoadFromFile(sArg1, sArg2, sXMLOptions);
if (hRes != S_OK)return 2;
}
return 0;
}
#-------------------------------------------------
#
# Project created by QtCreator 2014-12-16T18:25:28
#
#-------------------------------------------------
QT -= core
QT -= gui
QMAKE_CXXFLAGS += -std=c++11 -Wall -Wno-ignored-qualifiers
DEFINES += UNICODE \
_UNICODE \
_LINUX_QT \
LINUX
TARGET = ASCXlsConverter
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
INCLUDEPATH += \
/usr/include/libxml2
SOURCES += \
XlsFileConverter.cpp
CONFIG(debug, debug|release){
message(Debug)
linux-g++{
message(64 bit)
unix:!macx: LIBS += -L$$PWD/../../ASCOfficeUtils/ASCOfficeUtilsLib/build-ASCOfficeUtilsLib-Desktop64-Debug/ -lASCOfficeUtilsLib
unix:!macx: PRE_TARGETDEPS += $$PWD/../../ASCOfficeUtils/ASCOfficeUtilsLib/build-ASCOfficeUtilsLib-Desktop64-Debug/libASCOfficeUtilsLib.a
unix:!macx: LIBS += -L$$PWD/../../Common/DocxFormat/build-DocxFormatLib-Desktop64-Debug/ -lDocxFormatLib
unix:!macx: PRE_TARGETDEPS += $$PWD/../../Common/DocxFormat/build-DocxFormatLib-Desktop64-Debug/libDocxFormatLib.a
unix:!macx: LIBS += -L$$PWD/../../DesktopEditor/Qt_build/graphics/build-graphics-Desktop64-Debug/ -lgraphics
unix:!macx: PRE_TARGETDEPS += $$PWD/../../DesktopEditor/Qt_build/graphics/build-graphics-Desktop64-Debug/libgraphics.a
}
else{
message(32 bit)
unix:!macx: LIBS += -L$$PWD/../../ASCOfficeUtils/ASCOfficeUtilsLib/build-ASCOfficeUtilsLib-Desktop-Debug/ -lASCOfficeUtilsLib
unix:!macx: PRE_TARGETDEPS += $$PWD/../../ASCOfficeUtils/ASCOfficeUtilsLib/build-ASCOfficeUtilsLib-Desktop-Debug/libASCOfficeUtilsLib.a
unix:!macx: LIBS += -L$$PWD/../../Common/DocxFormat/build-DocxFormatLib-Desktop-Debug/ -lDocxFormatLib
unix:!macx: PRE_TARGETDEPS += $$PWD/../../Common/DocxFormat/build-DocxFormatLib-Desktop-Debug/libDocxFormatLib.a
unix:!macx: LIBS += -L$$PWD/../../DesktopEditor/Qt_build/graphics/build-graphics-Desktop-Debug/ -lgraphics
unix:!macx: PRE_TARGETDEPS += $$PWD/../../DesktopEditor/Qt_build/graphics/build-graphics-Desktop-Debug/libgraphics.a
}
}
CONFIG(release, debug|release){
message(Release)
linux-g++{
message(64 bit)
unix:!macx: LIBS += -L$$PWD/../../ASCOfficeUtils/ASCOfficeUtilsLib/build-ASCOfficeUtilsLib-Desktop64-Release/ -lASCOfficeUtilsLib
unix:!macx: PRE_TARGETDEPS += $$PWD/../../ASCOfficeUtils/ASCOfficeUtilsLib/build-ASCOfficeUtilsLib-Desktop64-Release/libASCOfficeUtilsLib.a
unix:!macx: LIBS += -L$$PWD/../../Common/DocxFormat/build-DocxFormatLib-Desktop64-Release/ -lDocxFormatLib
unix:!macx: PRE_TARGETDEPS += $$PWD/../../Common/DocxFormat/build-DocxFormatLib-Desktop64-Release/libDocxFormatLib.a
unix:!macx: LIBS += -L$$PWD/../../DesktopEditor/Qt_build/graphics/build-graphics-Desktop64-Release/ -lgraphics
unix:!macx: PRE_TARGETDEPS += $$PWD/../../DesktopEditor/Qt_build/graphics/build-graphics-Desktop64-Release/libgraphics.a
}
else{
message(32 bit)
unix:!macx: LIBS += -L$$PWD/../../ASCOfficeUtils/ASCOfficeUtilsLib/build-ASCOfficeUtilsLib-Desktop-Release/ -lASCOfficeUtilsLib
unix:!macx: PRE_TARGETDEPS += $$PWD/../../ASCOfficeUtils/ASCOfficeUtilsLib/build-ASCOfficeUtilsLib-Desktop-Release/libASCOfficeUtilsLib.a
unix:!macx: LIBS += -L$$PWD/../../Common/DocxFormat/build-DocxFormatLib-Desktop-Release/ -lDocxFormatLib
unix:!macx: PRE_TARGETDEPS += $$PWD/../../Common/DocxFormat/build-DocxFormatLib-Desktop-Release/libDocxFormatLib.a
unix:!macx: LIBS += -L$$PWD/../../DesktopEditor/Qt_build/graphics/build-graphics-Desktop-Release/ -lgraphics
unix:!macx: PRE_TARGETDEPS += $$PWD/../../DesktopEditor/Qt_build/graphics/build-graphics-Desktop-Release/libgraphics.a
}
}
#pragma once
#include <string>
#include <boost/optional.hpp>
#include <boost/shared_ptr.hpp>
#define _CP_OPT(V) boost::optional<V>
#define _CP_PTR(V) boost::shared_ptr<V>
#define _CP_OPT(V1) boost::optional<V1>
#define _CP_PTR(V2) boost::shared_ptr<V2>
#include "BetterVariantT.h"
//#include <Exception/AttributeDataWrong.h>
namespace AUX
{;
BetterVariantT::BetterVariantT(const _variant_t& varSrc)
: _variant_t(varSrc)
{
}
// Extracts a VT_R8 into a double
//
BetterVariantT::operator double() const
{
if (V_VT(this) == VT_R8) {
return V_R8(this);
}
_variant_t varDest;
if(FAILED(::VariantChangeTypeEx(static_cast<VARIANT*>(&varDest),
const_cast<VARIANT*>(static_cast<const VARIANT*>(this)), 1252, 0, VT_R8)))
{
throw;// EXCEPT::LE::WrongIntermediateXMLFormat("Type mismatch", __FUNCTION__);
}
return V_R8(&varDest);
}
} // namespace AUX
#pragma once
#include <comutil.h>
namespace AUX
{;
class BetterVariantT : public _variant_t
{
public:
BetterVariantT(const _variant_t& varSrc) ;
operator double() const ; // Extracts a double from a VT_R8
};
} // namespace AUX
......@@ -4,13 +4,14 @@
#include <boost/shared_ptr.hpp>
namespace XLS
{;
{
class CFStream;
typedef boost::shared_ptr<CFStream> CFStreamPtr;
class CFRecord;
typedef boost::shared_ptr<CFRecord> CFRecordPtr;
typedef std::list<CFRecordPtr> CFRecordPtrList;
......
......@@ -2,9 +2,47 @@
#include "CFRecord.h"
#include "CFStream.h"
#ifdef __linux__
#include <string.h>
#endif
namespace XLS
{;
template<class T>
CFRecord& operator<<(CFRecord& record, std::vector<T>& vec)
{
for(typename std::vector<T>::iterator it = vec.begin(); it != vec.end(); ++it)
{
record << *it;
}
return record;
}
template<class T>
CFRecord& operator>>(CFRecord & record, std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
str.clear();
T symbol;
do
{
record.loadAnyData(symbol);
str += symbol;
} while (symbol);
return record;
}
template<class T>
CFRecord& operator<<(CFRecord & record, std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
for(typename std::basic_string<T, std::char_traits<T>, std::allocator<T> >::iterator it = str.begin(); it != str.end(); ++it)
{
record << *it;
}
record.storeAnyData(static_cast<T>(0));
return record;
}
char CFRecord::intData[MAX_RECORD_SIZE];
// Create a record and read its data from the stream
......@@ -80,7 +118,7 @@ void CFRecord::commitData()
throw;// EXCEPT::RT::WrongBiffRecord("Too much data written to CFRecord.", getTypeString());
}
data_ = new char[size_];
memcpy_s(data_, size_, intData, size_);
memcpy(data_, intData, size_);
}
}
......@@ -330,8 +368,12 @@ void CFRecord::registerDelayedFilePointerAndOffsetSource(const unsigned int offs
void CFRecord::storeLongData(const char* buf, const size_t size)
{
checkFitWrite(size);
memcpy_s(&intData[size_], getMaxRecordSize() - size_, buf, size);
size_ += size;
if (getMaxRecordSize() - size_ >= size)
{
memcpy(&intData[size_], buf, size);
size_ += size;
}
}
......
......@@ -5,8 +5,8 @@
#include "BinSmartPointers.h"
#include "../Logic/GlobalWorkbookInfo.h"
#include <common.h>
#include <Auxiliary/HelpFunc.h>
#include "../../Common/common.h"
#include "../Auxiliary/HelpFunc.h"
namespace XLS
......@@ -167,47 +167,17 @@ CFRecord& operator>>(CFRecord& record, std::vector<T>& vec)
}
// moved out of the class to be higher in priority than the universal operator
template<class T>
CFRecord& operator<<(CFRecord& record, std::vector<T>& vec)
{
for(std::vector<T>::iterator it = vec.begin(), itEnd = vec.end(); it != itEnd; ++it)
{
record << *it;
}
return record;
}
// moved out of the class to be higher in priority than the universal operator
template<class T>
CFRecord& operator>>(CFRecord & record, std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
str.clear();
T symbol;
do
{
record.loadAnyData(symbol);
str += symbol;
} while (symbol);
return record;
}
CFRecord& operator<<(CFRecord& record, std::vector<T>& vec);
template<class T>
CFRecord& operator>>(CFRecord & record, std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str);
// moved out of the class to be higher in priority than the universal operator
template<class T>
CFRecord& operator<<(CFRecord & record, std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
for(std::basic_string<T, std::char_traits<T>, std::allocator<T> >::iterator it = str.begin(), itEnd = str.end(); it != itEnd; ++it)
{
record << *it;
}
record.storeAnyData(static_cast<T>(0));
return record;
}
CFRecord& operator<<(CFRecord & record, std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str);
// moved out of the class to be higher in priority than the universal operator
template<class T>
CFRecord& operator>>(CFRecord & record, _CP_OPT(T)& val)
{
......
......@@ -2,8 +2,7 @@
#include "CFStreamCacheReader.h"
#include "CFRecord.h"
#include "CFStream.h"
#include <Logic/Biff_records/BOF.h>
//#include <Exception/RequestedRecordNotFound.h>
#include "../Logic/Biff_records/BOF.h"
......
......@@ -2,8 +2,8 @@
#include "CFRecordType.h"
#include "BinSmartPointers.h"
#include <Logic/GlobalWorkbookInfo.h>
#include <Logic/Biff_structures/ODRAW/OfficeArtRecordHeader.h>
#include "../Logic/GlobalWorkbookInfo.h"
#include "../Logic/Biff_structures/ODRAW/OfficeArtRecordHeader.h"
namespace XLS
{;
......
#pragma once
#include "BinSmartPointers.h"
#include "..\Logic\GlobalWorkbookInfo.h"
#include "../Logic/GlobalWorkbookInfo.h"
namespace XLS
{;
......
......@@ -51,4 +51,4 @@ void error(const std::string& message)
}
}; // namespace Log
}
......@@ -11,6 +11,6 @@ namespace Log
void warning(const std::wstring& message);
void error(const std::string& message);
}; // namespace Log
}
......@@ -17,30 +17,35 @@ Logger::~Logger()
void Logger::writeLine(const std::string& type, const std::string& str)
{
time_t now;
static wchar_t time_stamp[16] ={};
#if defined(_WIN32) || defined(_WIN64)
time_t now;
tm local;
time(&now);
localtime_s(&local, &now);
static wchar_t time_stamp[16];
swprintf_s(time_stamp, 15, L"%02d:%02d:%02d ", local.tm_hour, local.tm_min, local.tm_sec);
#else
m_log << time_stamp << std::wstring(type.begin(),type.end()) << ": " << std::wstring(str.begin(),str.end()) << std::endl;
std::cout << time_stamp << type << ": " << str << std::endl;
#endif
}
void Logger::writeLine(const std::wstring& type, const std::wstring& str)
{
time_t now;
static wchar_t time_stamp[16]={};
#if defined(_WIN32) || defined(_WIN64)
time_t now;
tm local;
time(&now);
localtime_s(&local, &now);
static wchar_t time_stamp[16];
swprintf_s(time_stamp, 15, L"%02d:%02d:%02d ", local.tm_hour, local.tm_min, local.tm_sec);
#else
m_log << time_stamp << type << L": " << str << std::endl;
std::wcout << time_stamp << type << L": " << str << std::endl;
#endif
}
Logger& Logger::getLogger()
{
......
......@@ -4,11 +4,11 @@
#include <list>
#include <sstream>
#include "Logging/Log.h"
#include "../Logging/Log.h"
#include "XlsElementsType.h" //
namespace XLS
{;
{
class CFStream;
class BinProcessor;
......@@ -33,7 +33,7 @@ public:
//virtual void toFrom(BinProcessor& proc) = 0; // This function shall contain only mark functions and is the universal XML serialiser
virtual const std::wstring & getClassName() const = 0; // Must be overridden in every deriver. The return value must be a reference to a static variable inside the getter
virtual const std::string & getClassName() const = 0; // Must be overridden in every deriver. The return value must be a reference to a static variable inside the getter
void add_child (BaseObjectPtr e) {elements_.push_back(e);}
......@@ -43,18 +43,18 @@ public:
virtual int serialize(std::wostream & _stream)
{
std::wstringstream s;
s << std::wstring(L"This element - ") << getClassName() << std::wstring(L"- not serialize");
std::stringstream s;
s << std::string("This element - ") << getClassName() << std::string("- not serialize");
Log::warning(s.str());
return 0;
}
};
#define BASE_OBJECT_DEFINE_CLASS_NAME(class_name)\
public: const std::wstring & getClassName() const { static std::wstring str(L# class_name); return str; };\
public: const std::string & getClassName() const { static std::string str(#class_name); return str; };\
virtual ElementType get_type() { return type; }
#define BASE_OBJECT_DEFINE_CLASS_TYPE(class_name) public: const int & getClassType() const { static std::wstring str(L# class_name); return str; }
#define BASE_OBJECT_DEFINE_CLASS_TYPE(class_name) public: const int & getClassType() const { static std::string str(#class_name); return str; }
typedef enum
{
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/FormatRun.h>
#include "../../Logic/Biff_structures/FormatRun.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/LongRGB.h>
#include "../../Logic/Biff_structures/LongRGB.h""
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/CellRangeRef.h>
#include <Logic/Biff_structures/ArrayParsedFormula.h>
#include "../Biff_structures/CellRangeRef.h"
#include "../Biff_structures/ArrayParsedFormula.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/AFDOper.h>
#include "../Biff_structures/AFDOper.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecordContinued.h"
#include <Logic/Biff_structures/FrtRefHeader.h>
#include <Logic/Biff_structures/BiffString.h>
#include <Logic/Biff_structures/FrtRefHeader.h>
#include <Logic/Biff_structures/AFDOper.h>
#include <Logic/Biff_structures/AF12Criteria.h>
#include "../Biff_structures/FrtRefHeader.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/FrtRefHeader.h"
#include "../Biff_structures/AFDOper.h"
#include "../Biff_structures/AF12Criteria.h"
namespace XLS
{;
......
#include "BOF.h"
#include <Binary/CFStream.h>
#include "../../Binary/CFStream.h"
namespace XLS
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/ChartParsedFormula.h>
#include "../../Logic/Biff_structures/ChartParsedFormula.h"
namespace XLS
{;
......
#include "BiffRecord.h"
#include <Binary/CFStream.h>
#include "Binary/CFStreamCacheReader.h"
#include "Binary/CFStreamCacheWriter.h"
#include "../../Binary/CFStream.h"
#include "../../Binary/CFStreamCacheReader.h"
#include "../../Binary/CFStreamCacheWriter.h"
namespace XLS
......@@ -46,9 +46,6 @@ const bool BiffRecord::read(CFStreamCacheReader& reader, BaseObject* parent, con
Log::warning(STR::int2str(record->getDataSize() - record->getRdPtr(), 10) + " unsigned chars were not processed while reading from " + record->getTypeString());
}
// XML generation
//BiffStructurePtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//toFrom(BinReaderProcessor(reader, parent/*own_tag*/, is_mandatory));
parent->add_child(this->clone());
}
......
#pragma once
#include <Logic/BaseObject.h>
#include <Logic/Biff_structures/BitMarkedStructs.h>
#include <Logic/BinProcessor.h>
#include "../BaseObject.h"
#include "../Biff_structures/BitMarkedStructs.h"
#include "../BinProcessor.h"
namespace XLS
{;
......
#include "BiffRecordContinued.h"
#include "Binary/CFStreamCacheReader.h"
#include "Binary/CFStreamCacheWriter.h"
#include "../../Binary/CFStreamCacheReader.h"
#include "../../Binary/CFStreamCacheWriter.h"
namespace XLS
......
#pragma once
#include <Logic/Biff_records/BiffRecord.h>
#include "../Biff_records/BiffRecord.h"
namespace XLS
{;
......
#include "BiffRecordSplit.h"
#include "Binary/CFStreamCacheReader.h"
#include "Binary/CFStreamCacheWriter.h"
#include "../../Binary/CFStreamCacheReader.h"
#include "../../Binary/CFStreamCacheWriter.h"
namespace XLS
......
#pragma once
#include <Logic/Biff_records/BiffRecordContinued.h>
//#include <Binary/BinSmartPointers.h>
#include "../../Logic/Biff_records/BiffRecordContinued.h"
namespace XLS
{;
{
// Logical representation of a record in BIFF8 that is followed by a number of Continue records
// and the whole content is split into several records not following each other
......
#include "Blank.h"
#include <simple_xml_writer.h>
#include "../Common/simple_xml_writer.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/CellOffsetResender.h>
#include <Logic/Biff_structures/Cell.h>
#include "../../Logic/Biff_structures/CellOffsetResender.h"
#include "../../Logic/Biff_structures/Cell.h"
namespace XLS
{;
......
#include "BookExt.h"
#include <Logic/Biff_structures/FrtHeader.h>
#include "../../Logic/Biff_structures/FrtHeader.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/BookExt_Conditional11.h>
#include <Logic/Biff_structures/BookExt_Conditional12.h>
#include "../../Logic/Biff_structures/BookExt_Conditional11.h"
#include "../../Logic/Biff_structures/BookExt_Conditional12.h"
namespace XLS
{;
......
#include "BoolErr.h"
#include <simple_xml_writer.h>
#include "../Common/simple_xml_writer.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/CellOffsetResender.h>
#include <Logic/Biff_structures/Cell.h>
#include <Logic/Biff_structures/Bes.h>
#include "../../Logic/Biff_structures/CellOffsetResender.h"
#include "../../Logic/Biff_structures/Cell.h"
#include "../../Logic/Biff_structures/Bes.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/BiffString.h>
#include "../../Logic/Biff_structures/BiffString.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/DXFN.h>
#include <Logic/Biff_structures/CFParsedFormulaNoCCE.h>
#include "../../Logic/Biff_structures/DXFN.h"
#include "../../Logic/Biff_structures/CFParsedFormulaNoCCE.h"
namespace XLS
{;
......
#include "CF12.h"
#include <Logic/Biff_structures/CFMultistate.h>
#include "../../Logic/Biff_structures/CFMultistate.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/FrtRefHeader.h>
#include <Logic/Biff_structures/DXFN12.h>
#include <Logic/Biff_structures/CFParsedFormulaNoCCE.h>
#include <Logic/Biff_structures/CFParsedFormula.h>
#include <Logic/Biff_structures/CFExTemplateParams.h>
#include "../../Logic/Biff_structures/FrtRefHeader.h"
#include "../../Logic/Biff_structures/DXFN12.h"
#include "../../Logic/Biff_structures/CFParsedFormulaNoCCE.h"
#include "../../Logic/Biff_structures/CFParsedFormula.h"
#include "../../Logic/Biff_structures/CFExTemplateParams.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/FrtRefHeaderU.h>
#include <Logic/Biff_structures/CFExNonCF12.h>
#include "../../Logic/Biff_structures/FrtRefHeaderU.h"
#include "../../Logic/Biff_structures/CFExNonCF12.h"
namespace XLS
{;
......
#include "CRN.h"
#include <Logic/Biff_structures/SerAr.h>
#include "../../Logic/Biff_structures/SerAr.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/SerAr.h>
#include "../../Logic/Biff_structures/SerAr.h"
namespace XLS
{;
......
#include "CatLab.h"
#include <Logic/Biff_structures/FrtHeaderOld.h>
#include "../../Logic/Biff_structures/FrtHeaderOld.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/FrtRefHeaderU.h>
#include "../../Logic/Biff_structures/FrtRefHeaderU.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/FixedPoint.h>
#include "../../Logic/Biff_structures/FixedPoint.h"
namespace XLS
{;
......
#include "ChartFrtInfo.h"
#include <Logic/Biff_structures/FrtHeaderOld.h>
#include "../../Logic/Biff_structures/FrtHeaderOld.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/BiffString.h>
#include "../../Logic/Biff_structures/BiffString.h"
namespace XLS
{;
......
#include "Compat12.h"
#include <Logic/Biff_structures/FrtHeader.h>
#include "../../Logic/Biff_structures/FrtHeader.h"
namespace XLS
{;
......
#include "CompressPictures.h"
#include <Logic/Biff_structures/FrtHeader.h>
#include "../../Logic/Biff_structures/FrtHeader.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/SqRefU.h>
#include "../../Logic/Biff_structures/SqRefU.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/CondFmtStructure.h>
#include <Logic/Biff_structures/FrtRefHeaderU.h>
#include "../../Logic/Biff_structures/CondFmtStructure.h"
#include "../../Logic/Biff_structures/FrtRefHeaderU.h"
namespace XLS
{;
{
// Logical representation of CondFmt12 record in BIFF8
......@@ -29,11 +29,6 @@ public:
//-----------------------------
FrtRefHeaderU frtRefHeaderU;
CondFmtStructure mainCF;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_COMPLEX(frtRefHeaderU)
//BO_ATTRIB_MARKUP_COMPLEX(mainCF)
//BO_ATTRIB_MARKUP_END
};
......
#include "CrtLayout12.h"
#include <Logic/Biff_structures/FrtHeader.h>
#include "../../Logic/Biff_structures/FrtHeader.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/HideObjEnum.h>
#include "../Biff_structures/HideObjEnum.h"
namespace XLS
{;
......
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/FrtHeader.h>
#include <Logic/Biff_structures/List12BlockLevel.h>
#include <Logic/Biff_structures/List12TableStyleClientInfo.h>
#include <Logic/Biff_structures/List12DisplayName.h>
#include "../Biff_structures/FrtHeader.h"
#include "../Biff_structures/List12BlockLevel.h"
#include "../Biff_structures/List12TableStyleClientInfo.h">"
#include "../Biff_structures/List12DisplayName.h"
namespace XLS
{;
......
#include "Template.h"
#include <Binary/CFStream.h>
#include "../../Binary/CFStream.h"
namespace XLS
{;
......
#include "AF12Criteria.h"
#include <Binary/CFRecord.h>
namespace XLS
{;
......
#pragma once
#include <Logic/Biff_records/BiffRecord.h>
#include <Logic/Biff_structures/BiffString.h>
#include "../Biff_records/BiffRecord.h"
#include "BiffString.h"
#include "AFDOper.h"
namespace XLS
......@@ -29,4 +29,4 @@ public:
typedef boost::shared_ptr<AF12Criteria> AF12CriteriaPtr;
} // namespace XLS
\ No newline at end of file
} // namespace XLS
#pragma once
#include <Logic/Biff_records/BiffRecord.h>
#include <Logic/Biff_structures/BiffString.h>
#include "../Biff_records/BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "AFDOperStr.h"
namespace XLS
......@@ -29,4 +30,4 @@ public:
bool m_bAutoFilter;
};
} // namespace XLS
\ No newline at end of file
} // namespace XLS
#include "AFDOperRk.h"
#include <Binary/CFRecord.h>
namespace XLS
{;
......
#include "AFDOperStr.h"
#include <Binary/CFRecord.h>
namespace XLS
{;
......
#pragma once
#include <Logic/Biff_records/BiffRecord.h>
#include <Logic/Biff_structures/BiffString.h>
#include "../Biff_records/BiffRecord.h"
#include "BiffString.h"
namespace XLS
......@@ -29,4 +29,4 @@ public:
bool m_bAutoFilter;
};
} // namespace XLS
\ No newline at end of file
} // namespace XLS
#include "AddinUdf.h"
#include <Binary/CFRecord.h>
namespace XLS
{;
{
BiffStructurePtr AddinUdf::clone()
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/BiffString.h>
#include "../../Logic/Biff_structures/BiffString.h"
namespace XLS
{;
......
#include "AntiMoniker.h"
#include <Binary/CFRecord.h>
namespace OSHARED
{;
......
#include "ArrayParsedFormula.h"
#include <Binary/CFRecord.h>
//#include <Exception/UnexpectedProgramPath.h>
#include "../../Binary/CFRecord.h"
namespace XLS
{;
{
ArrayParsedFormula::ArrayParsedFormula(const bool is_part_of_a_revision, const CellRef& cell_base_ref)
: is_part_of_a_revision_(is_part_of_a_revision),
......
#include "Bes.h"
#include <Binary/CFRecord.h>
#include <boost/algorithm/string.hpp>
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/Boolean.h>
#include "../../Logic/Biff_structures/Boolean.h"
namespace XLS
{;
class CFRecord;
{
class Bes : public BiffStructure
{
......
#pragma once
#include <Binary/CFRecord.h>
#include "BiffStructure.h"
namespace XLS
{;
{
class BiffAttribute : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(BiffAttribute)
public:
BiffAttribute() {};
BiffAttribute(const std::wstring name_init) : attrib_name(name_init) {};
BiffAttribute() {}
BiffAttribute(const std::wstring name_init) : attrib_name(name_init) {}
void setName(const std::wstring name_init)
{
......@@ -29,56 +28,45 @@ template<class Type>
class BiffAttributeSimple : public BiffAttribute
{
public:
BiffAttributeSimple<Type>() {};
BiffAttributeSimple<Type>(const Type& val_init) : val(val_init) {};
BiffAttributeSimple<Type>(const Type& val_init, const std::wstring & attrib_name) : val(val_init), BiffAttribute(attrib_name) {};
BiffAttributeSimple() {}
BiffAttributeSimple<Type>(const Type& val_init) : val(val_init) {}
BiffAttributeSimple<Type>(const Type& val_init, const std::wstring & attrib_name) : val(val_init), BiffAttribute(attrib_name) {}
_CP_OPT(Type) & value() {return val;}
_CP_OPT(Type) & value() {return val;}
BiffStructurePtr clone()
{
return BiffStructurePtr(new BiffAttributeSimple<Type>(*this));
};
////virtual void toXML(BiffStructurePtr & parent, const std::wstring & attrib_name)
//{
// parent->setAttribute(attrib_name, static_cast<Type>(val));
//};
////virtual const bool fromXML(MSXML2::IXMLDOMElementPtr xml_tag, const std::wstring & attrib_name)
//{
// val = getStructAttribute(xml_tag, attrib_name);
// return true;
//};
return BiffStructurePtr(new BiffAttributeSimple<Type>(*this));
}
virtual void load(CFRecord& record)
{
record >> val;
};
}
virtual void store(CFRecord& record)
{
record << val;
};
}
operator const Type () const { return (val ? static_cast<Type>(*val) : (Type)0); };
operator const _variant_t () const { return static_cast<Type>(val); };
operator const Type () const { return (val ? static_cast<Type>(*val) : (Type)0); }
BiffAttributeSimple<Type> operator= (const BiffAttributeSimple<Type>& other)
BiffAttributeSimple<Type> operator= (const BiffAttributeSimple<Type>& other)
{
val = other.val;
return *this;
};
}
BiffAttributeSimple<Type> operator= (const Type& other_val)
BiffAttributeSimple<Type> operator= (const Type& other_val)
{
val = other_val;
return *this;
};
}
//const bool operator== (const Type & F2){return (val == F2);}
//const bool operator== (const Type & F2){return (val == F2);}
bool operator==(const Type & F2){return (val == F2);}
bool operator==(const Type & F2){return (val == F2);}
protected:
_CP_OPT(Type) val;
boost::optional<Type> val;
};
//BiffAttributeSimple<std::wstring>::operator ==(const Type &F2)
......@@ -87,19 +75,17 @@ template<class Type>
class ForwardOnlyParam : public BiffAttributeSimple<Type>
{
public:
ForwardOnlyParam() {};
ForwardOnlyParam(const Type& val_init) : BiffAttributeSimple(val_init) {};
ForwardOnlyParam() {}
ForwardOnlyParam(const Type& val_init)
{
BiffAttributeSimple<Type>::val = val_init;
}
ForwardOnlyParam<Type> operator= (const ForwardOnlyParam<Type>& other)
ForwardOnlyParam<Type> operator= (const ForwardOnlyParam<Type>& other)
{
return BiffAttributeSimple<Type>::operator=(other);
};
////virtual const bool fromXML(MSXML2::IXMLDOMElementPtr xml_tag)
//{
// // do nothing
// return true;
//};
BiffAttributeSimple<Type>::val = other.val;
}
};
......@@ -107,18 +93,17 @@ template<class Type>
class BackwardOnlyParam : public BiffAttributeSimple<Type>
{
public:
BackwardOnlyParam() {};
BackwardOnlyParam(const Type& val_init) : BiffAttributeSimple(val_init) {};
BackwardOnlyParam() {}
BackwardOnlyParam(const Type& val_init)
{
BiffAttributeSimple<Type>::val = val_init;
}
BackwardOnlyParam<Type> operator= (const BackwardOnlyParam<Type>& other)
BackwardOnlyParam<Type> operator= (const BackwardOnlyParam<Type>& other)
{
return BiffAttributeSimple<Type>::operator=(other);
};
return BiffAttributeSimple<Type>::operator=(other);
}
////virtual void toXML(BiffStructurePtr & parent)
//{
// // do nothing
//};
};
......
#include "BiffString.h"
//#include <Exception/UnexpectedProgramPath.h>
//#include <Exception/StructureSizeNotSet.h>
namespace XLS
{;
{
BiffString::BiffString()
......@@ -33,10 +31,6 @@ BiffString::~BiffString()
}
BiffString::operator const _variant_t () const
{
return _variant_t(str_.c_str());
}
BiffString::operator const std::wstring () const
......@@ -58,41 +52,6 @@ BiffStructurePtr BiffString::clone()
return BiffStructurePtr(new BiffString(*this));
}
//// Attribute version
//void BiffString::toXML(BiffStructurePtr & parent, const std::wstring & attrib_name)
//{
// parent->setAttribute(attrib_name, getEscaped_ST_Xstring());
//}
//
//
//// Attribute version
//const bool BiffString::fromXML(MSXML2::IXMLDOMElementPtr xml_tag, const std::wstring & attrib_name)
//{
// str_ = getStructAttribute(xml_tag, attrib_name);
// str_ = STR::unescape_ST_Xstring(static_cast<wchar_t*>(str_)).c_str();
// cch_ = str_.length();
// return true;
//}
/*
void BiffString::toXML(BiffStructurePtr & parent, const std::string& tag_name)
{
MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(tag_name.c_str(), parent);
own_tag->setAttribute(L"str", str_);
}
const bool BiffString::fromXML(BiffStructurePtr & parent, const std::string& tag_name)
{
#pragma message("####################### BiffString record has no BiffStructure::fromXML() implemented")
Log::error(" Error!!! BiffString record has no BiffStructure::fromXML() implemented.");
return false;
}
*/
void BiffString::store(CFRecord& record)
{
throw;// EXCEPT::LE::WhatIsTheFuck("Wrong usage of BiffString. The function must not be called.", __FUNCTION__);
......
#pragma once
#include "BiffAttribute.h"
#include <Binary/CFRecord.h>
namespace XLS
{;
{
typedef enum
{
......@@ -31,8 +30,7 @@ public:
BiffString(const std::wstring & str);
~BiffString();
operator const _variant_t () const;
operator const std::wstring () const;
std::wstring & value() {return str_;}
......@@ -76,21 +74,21 @@ template<class cchType, AW_DETERMINATION det_id, CCH_SOURCE cch_where>
class XLUnicodeString_T : public BiffString
{
public:
XLUnicodeString_T() {};
XLUnicodeString_T() {}
//XLUnicodeString_T(const XLUnicodeString_T& other) : struct_size(other.struct_size), str_(other.str_), cch_(other.cch_) {};
XLUnicodeString_T(const size_t size) : BiffString(size) {};
XLUnicodeString_T(const std::wstring & str) : BiffString(str) {};
XLUnicodeString_T(const size_t size) : BiffString(size) {}
XLUnicodeString_T(const std::wstring & str) : BiffString(str) {}
XLUnicodeString_T operator=(const std::wstring & str)
{
std::wstring temp(str);
std::swap(str_, temp);
cch_ = str.length();
return *this;
};
}
const size_t getStructSizeWouldWritten() const // Number of unsigned chars that would be written
{
return recalculateStructSize();
};
}
private:
const size_t recalculateStructSize() const
......
#include "BiffStructure.h"
#include <Binary/CFRecord.h>
namespace XLS
{;
{
// this function will never be called ( look at operator>>(CFRecord& record, T& val))
void BiffStructure_NoVtbl::store(CFRecord& record)
......@@ -32,52 +31,6 @@ bool DiffBiff(BiffStructure& val)
return false;
}
//
//const AUX::BetterVariantT BiffStructure::getStructAttribute(BiffStructurePtr & parent, const std::wstring & attrib_name)
//{
// _variant_t var = parent->getAttribute(attrib_name);
// if(VT_NULL == var.vt)
// {
// throw;// EXCEPT::LE::AttributeNotFound(static_cast<char*>(attrib_name), static_cast<char*>(parent->GetnodeName()));
// }
// return var;
//}
//
//
//MSXML2::IXMLDOMElementPtr BiffStructure::getStructNode(BiffStructurePtr & parent, const std::wstring & tag_name)
//{
// MSXML2::IXMLDOMElementPtr node = parent->selectSingleNode(tag_name + L"[position() = 1]");
// if(node)
// {
//
// }
// return node;
//}
//
//
//// This is a stub for that descendants of BiffStructure those are not nested from BiffStructure
//void BiffStructure::toXML(BiffStructurePtr & parent)
//{
// // Can only be called by mistake;
// throw;// EXCEPT::LE::WrongAPIUsage("The specified function is not overridden in '" + std::string(static_cast<char*>(getClassName())) + "' class.", __FUNCTION__);
//}
//
//
//// This is a stub for that descendants of BiffStructure those are not nested from BiffAttribute
//const bool BiffStructure::fromXML(BiffStructurePtr & parent)
//{
// // Can only be called by mistake;
// throw;// EXCEPT::LE::WrongAPIUsage("The specified function is not overridden in '" + std::string(static_cast<char*>(getClassName())) + "' class.", __FUNCTION__);
//}
//
//
//// This is a stub for that descendants of BiffStructure those are not nested from BiffAttribute
//const bool BiffStructure::fromXML(BiffStructurePtr & parent, const size_t position, const bool is_mandatory)
//{
// // Can only be called by mistake;
// throw;// EXCEPT::LE::WrongAPIUsage("The specified function is not overridden in '" + std::string(static_cast<char*>(getClassName())) + "' class.", __FUNCTION__);
//}
//
}// namespace XLS
......@@ -6,15 +6,14 @@
#include "../XlsElementsType.h"
#include <Auxiliary/BetterVariantT.h>
#include <Logging/Log.h>
#include "../../Logging/Log.h"
#include "../../Binary/CFRecord.h"
namespace XLS
{;
class CFRecord;
namespace XLS
{
class BiffStructure_NoVtbl
{
......@@ -41,19 +40,19 @@ public:
virtual int serialize(std::wostream & _stream)
{
std::wstringstream s;
s << std::wstring(L"This element - ") << getClassName() << std::wstring(L"- not serialize");
std::stringstream s;
s << std::string("This element - ") << getClassName() << std::string("- not serialize");
Log::warning(s.str());
return 0;
}
virtual const std::wstring & getClassName() const = 0; // Must be overridden in every deriver. The return value must be a reference to a static variable inside the getter
virtual const std::string & getClassName() const = 0; // Must be overridden in every deriver. The return value must be a reference to a static variable inside the getter
};
#define BASE_STRUCTURE_DEFINE_CLASS_NAME(class_name)\
public: \
const std::wstring & getClassName() const { static std::wstring str(L# class_name); return str; };\
const std::string & getClassName() const { static std::string str(#class_name); return str;};\
virtual XLS::ElementType get_type() { return type; }
......
......@@ -3,7 +3,7 @@
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
#include "BiffStructure.h"
#include "BiffAttribute.h"
#include <Auxiliary/HelpFunc.h>
#include "../../Auxiliary/HelpFunc.h"
#include "Boolean.h"
#pragma pack(1)
......@@ -63,18 +63,7 @@ struct RkNumber : public BiffStructure_NoVtbl
unsigned int fX100 : 1;
unsigned int fInt : 1;
unsigned int num : 30;
operator _variant_t()
{
if(fInt)
{
//return fX100 ? num / 100 : num;
return fX100 ? num / 100.0 : num;
}
else
{
return fX100 ? toDouble() / 100.0 : toDouble();
}
}
std::wstring value()
{
if(fInt)
......@@ -95,8 +84,8 @@ private:
double full;
struct
{
UINT64 remainder : 34;
UINT64 significant : 30;
_UINT64 remainder : 34;
_UINT64 significant : 30;
};
} val;
val.significant = num;
......@@ -109,7 +98,7 @@ private:
struct BErr : public BiffStructure_NoVtbl
{
unsigned char err;
BErr() {};
BErr() {}
BErr(const std::wstring str)
{
if(std::wstring (L"#NULL!") == str)
......@@ -145,10 +134,6 @@ struct BErr : public BiffStructure_NoVtbl
throw;// EXCEPT::RT::WrongBiffRecord("Unsupported type of BErr.", "unknown");
}
};
operator const _variant_t()
{
return toString().c_str();
}
const std::wstring toString() const
{
......
#pragma once
#include "BiffAttribute.h"
//#include <Exception/WrongIntermediateXMLFormat.h>
namespace XLS
{;
class CFRecord;
{
template<class Type>
struct Boolean : public BiffAttributeSimple<Type>
{
Boolean<Type>() {};
Boolean<Type>(const Type& val) : BiffAttributeSimple<Type>(val) {};
Boolean<Type>() {}
Boolean<Type>(const Type& val) : BiffAttributeSimple<Type>(val) {}
BiffStructurePtr clone()
{
return BiffStructurePtr(new Boolean<Type>(*this));
};
operator const _variant_t() const { return toString().c_str(); };
}
operator const bool()
{
return static_cast<Type>(1) == val;
};
return static_cast<Type>(1) == BiffAttributeSimple<Type>::val.get();
}
operator const Type()
{
return val;
};
operator const std::wstring() const { return toString();};
return BiffAttributeSimple<Type>::val.get();
}
operator const std::wstring() const { return toString();}
const std::wstring toString() const
{
return static_cast<Type>(1) == val ? L"true" : L"false";
};
return static_cast<Type>(1) == BiffAttributeSimple<Type>::val ? L"true" : L"false";
}
Boolean<Type> operator=(const Boolean<Type>& other)
{
val = other.val;
BiffAttributeSimple<Type>::val = other.val;
return *this;
};
}
////virtual void toXML(MSXML2::IXMLDOMElementPtr xml_tag, const std::wstring & attrib_name)
//{
// xml_tag->setAttribute(attrib_name, toString().c_str());
//};
////virtual const bool fromXML(MSXML2::IXMLDOMElementPtr xml_tag, const std::wstring & attrib_name)
//{
// std::wstring raw_val = getStructAttribute(xml_tag, attrib_name);
// if(std::wstring (L"0") == raw_val || std::wstring (L"false") == raw_val || std::wstring (L"FALSE") == raw_val)
// {
// val = static_cast<Type>(0);
// return true;
// }
// if(std::wstring (L"1") == raw_val || std::wstring (L"true") == raw_val || std::wstring (L"TRUE") == raw_val)
// {
// val = static_cast<Type>(1);
// return true;
// }
// throw;// EXCEPT::LE::WrongIntermediateXMLFormat(std::string("Format of @") + static_cast<char*>(attrib_name) + " attribute of <" +
// static_cast<char*>(xml_tag->GetnodeName()) + "> tag is not boolean. Received value: \"" +
// static_cast<char*>(raw_val) + "\"", __FUNCTION__);
//};
};
} // namespace XLS
......
......@@ -22,35 +22,6 @@ BiffStructurePtr CFColor::clone()
return BiffStructurePtr(new CFColor(*this));
}
//
//void CFColor::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"xclrType", xclrType.type);
// switch(xclrType.type)
// {
// case XColorType::XCLRINDEXED:
// own_tag->setAttribute(L"xclrValue", icv);
// break;
// case XColorType::XCLRRGB:
// rgb.toXML(own_tag);
// break;
// case XColorType::XCLRTHEMED:
// own_tag->setAttribute(L"xclrValue", theme);
// break;
// }
// own_tag->setAttribute(L"numTint", numTint);
//}
//
//
//const bool CFColor::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### CFColor record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! CFColor record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void CFColor::store(CFRecord& record)
{
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/DXFN12.h>
#include <Logic/Biff_structures/CFExTemplateParams.h>
#include "DXFN12.h"
#include "CFExTemplateParams.h"
namespace XLS
{;
{
class CFRecord;
......
......@@ -2,7 +2,7 @@
#include "BiffStructure.h"
#include "CellRef.h"
#include <Logic/Biff_structures/BitMarkedStructs.h>
#include "../../Logic/Biff_structures/BitMarkedStructs.h"
namespace XLS
{;
......
......@@ -170,11 +170,6 @@ void CellRangeRef::fromString(const std::wstring& str)
}
CellRangeRef::operator const _variant_t () const
{
return toString().c_str();
}
CellRangeRef::operator const std::wstring () const
{
......
......@@ -29,7 +29,6 @@ public:
const std::wstring toString(const bool useShortForm = true) const;
void fromString(const std::wstring& str);
operator const _variant_t() const;
operator const std::wstring () const;
const CellRef getTopLeftCell() const;
......@@ -48,8 +47,8 @@ public:
void operator+=(const CellRef& appended_ref);
void operator-=(const CellRef& subtracted_ref);
virtual void load(CFRecord& record) {};
virtual void store(CFRecord& record) {};
virtual void load(CFRecord& record) {}
virtual void store(CFRecord& record) {}
long rowFirst;
long rowLast;
......@@ -78,40 +77,40 @@ template<class NameProducer, class RwType, class ColType, RELATIVE_INFO rel_info
class CellRangeRef_T : public CellRangeRef
{
public:
CellRangeRef_T(const std::wstring & str_ref) : CellRangeRef(str_ref) {};
CellRangeRef_T() {};
CellRangeRef_T(const std::wstring & str_ref) : CellRangeRef(str_ref) {}
CellRangeRef_T() {}
template<class otherNameProducer, class otherRwType, class otherColType, RELATIVE_INFO otherRel_info>
CellRangeRef_T(CellRangeRef_T<otherNameProducer, otherRwType, otherColType, otherRel_info>& other)
: CellRangeRef(other)
{
};
}
CellRangeRef_T(CellRangeRef& other)
: CellRangeRef(other)
{
};
}
virtual const std::wstring & getClassName() const { return NameProducer()();}
virtual const std::string & getClassName() const { return NameProducer()();}
CellRangeRef_T operator+(const CellRef& appended_ref)
{
CellRangeRef_T ret_val(*this);
ret_val +=(appended_ref);
return ret_val;
};
}
CellRangeRef_T operator-(const CellRef& subtracted_ref)
{
CellRangeRef_T ret_val(*this);
ret_val -=(subtracted_ref);
return ret_val;
};
}
BiffStructurePtr clone()
{
return BiffStructurePtr(new CellRangeRef_T(*this));
};
}
virtual void load(CFRecord& record)
{
......
......@@ -73,11 +73,6 @@ void CellRef::fromString(const std::wstring& str)
}
CellRef::operator const _variant_t () const
{
return toString().c_str();
}
CellRef::operator const std::wstring () const
{
......
......@@ -21,7 +21,6 @@ public:
const std::wstring toString() const;
void fromString(const std::wstring& str);
operator const _variant_t () const;
operator const std::wstring () const;
void operator+=(const CellRef& appended_ref);
......@@ -55,9 +54,9 @@ typedef boost::shared_ptr<CellRangeRef> CellRangeRefPtr;
class name ## _name \
{\
public:\
const std::wstring & operator() ()\
const std::string & operator() ()\
{\
static std::wstring name_str(L#name); \
static std::string name_str(#name); \
return name_str;\
};\
};
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/SqRefU.h>
#include "SqRefU.h"
namespace XLS
{;
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/Stxp.h>
#include <Logic/Biff_structures/BiffString.h>
#include <Logic/Biff_structures/Boolean.h>
#include "Stxp.h"
#include "BiffString.h"
#include "Boolean.h"
namespace XLS
{;
......
......@@ -23,22 +23,6 @@ BiffStructurePtr DXFId::clone()
}
//void DXFId::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"index", index);
//}
//
//
//const bool DXFId::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### DXFId record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! DXFId record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void DXFId::store(CFRecord& record)
{
record << index;
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/DXFNum.h>
#include <Logic/Biff_structures/DXFFntD.h>
#include <Logic/Biff_structures/DXFALC.h>
#include <Logic/Biff_structures/DXFBdr.h>
#include <Logic/Biff_structures/DXFPat.h>
#include <Logic/Biff_structures/DXFProt.h>
#include "DXFNum.h"
#include "DXFFntD.h"
#include "DXFALC.h"
#include "DXFBdr.h"
#include "DXFPat.h"
#include "DXFProt.h"
namespace XLS
{;
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/DXFN.h>
#include <Logic/Biff_structures/XFExtNoFRT.h>
#include "DXFN.h"
#include "XFExtNoFRT.h"
namespace XLS
{;
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/DXFNumUsr.h>
#include <Logic/Biff_structures/BitMarkedStructs.h>
#include "DXFNumUsr.h"
#include "BitMarkedStructs.h"
namespace XLS
{;
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/BiffString.h>
#include "BiffString.h"
namespace XLS
{;
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/BitMarkedStructs.h>
#include "BitMarkedStructs.h"
namespace XLS
{;
......
......@@ -12,26 +12,6 @@ BiffStructurePtr DropDownObjId::clone()
}
//void DropDownObjId::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"id", id);
//}
//
//
//const bool DropDownObjId::fromXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = parent->selectSingleNode(getClassName());
// if(!own_tag)
// {
// return false;
// }
// id = getStructAttribute(own_tag, L"id");
// return true;
//}
void DropDownObjId::store(CFRecord& record)
{
record << id;
......
......@@ -11,26 +11,6 @@ XLS::BiffStructurePtr EncryptionHeader::clone()
return XLS::BiffStructurePtr(new EncryptionHeader(*this));
}
//
//void EncryptionHeader::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// Flags.toXML(own_tag);
// own_tag->setAttribute(L"AlgID", AlgID);
// own_tag->setAttribute(L"AlgIDHash", AlgIDHash);
// own_tag->setAttribute(L"KeySize", KeySize);
// own_tag->setAttribute(L"ProviderType", ProviderType);
// own_tag->setAttribute(L"CSPName", CSPName.c_str());
//}
//
//
//const bool EncryptionHeader::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### EncryptionHeader record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! EncryptionHeader record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void EncryptionHeader::store(XLS::CFRecord& record)
......
......@@ -11,25 +11,6 @@ XLS::BiffStructurePtr EncryptionHeaderFlags::clone()
return XLS::BiffStructurePtr(new EncryptionHeaderFlags(*this));
}
//
//void EncryptionHeaderFlags::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"fCryptoAPI", fCryptoAPI);
// own_tag->setAttribute(L"fDocProps", fDocProps);
// own_tag->setAttribute(L"fExternal", fExternal);
// own_tag->setAttribute(L"fAES", fAES);
//}
//
//
//const bool EncryptionHeaderFlags::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### EncryptionHeaderFlags record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! EncryptionHeaderFlags record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void EncryptionHeaderFlags::store(XLS::CFRecord& record)
{
......
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/FullColorExt.h>
#include <Logic/Biff_structures/XFExtGradient.h>
#include "FullColorExt.h"
#include "XFExtGradient.h"
namespace XLS
{;
......
......@@ -11,22 +11,6 @@ BiffStructurePtr ExtPtgErr::clone()
return BiffStructurePtr(new ExtPtgErr(*this));
}
//
//void ExtPtgErr::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"err", err);
//}
//
//
//const bool ExtPtgErr::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### ExtPtgErr record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! ExtPtgErr record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void ExtPtgErr::store(CFRecord& record)
{
......
......@@ -17,25 +17,6 @@ BiffStructurePtr ExtPtgRef3D::clone()
return BiffStructurePtr(new ExtPtgRef3D(*this));
}
//void ExtPtgRef3D::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"itabFirst", iTabs.itabFirst);
// own_tag->setAttribute(L"itabLast", iTabs.itabLast);
// own_tag->setAttribute(L"loc", loc + cell_base_ref);
//}
//
//
//const bool ExtPtgRef3D::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### ExtPtgRef3D record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! ExtPtgRef3D record has no BiffStructure::fromXML() implemented.");
// return false;
//}
//
void ExtPtgRef3D::store(CFRecord& record)
{
record << iTabs << loc;
......
......@@ -11,23 +11,6 @@ BiffStructurePtr ExtPtgRefErr3D::clone()
return BiffStructurePtr(new ExtPtgRefErr3D(*this));
}
//
//void ExtPtgRefErr3D::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"itabFirst", iTabs.itabFirst);
// own_tag->setAttribute(L"itabLast", iTabs.itabLast);
//}
//
//
//const bool ExtPtgRefErr3D::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### ExtPtgRefErr3D record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! ExtPtgRefErr3D record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void ExtPtgRefErr3D::store(CFRecord& record)
{
......
......@@ -12,22 +12,6 @@ BiffStructurePtr ExternDdeLinkNoOper::clone()
}
//void ExternDdeLinkNoOper::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"linkName", linkName);
//}
//
//
//const bool ExternDdeLinkNoOper::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### ExternDdeLinkNoOper record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! ExternDdeLinkNoOper record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void ExternDdeLinkNoOper::store(CFRecord& record)
{
#pragma message("####################### ExternDdeLinkNoOper record has no BiffStructure::store() implemented")
......
......@@ -11,24 +11,6 @@ BiffStructurePtr ExternOleDdeLink::clone()
return BiffStructurePtr(new ExternOleDdeLink(*this));
}
//
//void ExternOleDdeLink::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"lStgName", lStgName);
// own_tag->setAttribute(L"linkName", linkName);
// moper.toXML(own_tag);
//}
//
//
//const bool ExternOleDdeLink::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### ExternOleDdeLink record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! ExternOleDdeLink record has no BiffStructure::fromXML() implemented.");
// return false;
//}
//
void ExternOleDdeLink::store(CFRecord& record)
{
......
......@@ -22,25 +22,6 @@ BiffStructurePtr FactoidData::clone()
return BiffStructurePtr(new FactoidData(*this));
}
//void FactoidData::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"fDelete", fDelete);
// own_tag->setAttribute(L"fXMLBased", fXMLBased);
// propertyBag.toXML(own_tag);
//}
//const bool FactoidData::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### FactoidData record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! FactoidData record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void FactoidData::store(CFRecord& record)
{
#pragma message("####################### FactoidData record has no BiffStructure::store() implemented")
......
......@@ -23,29 +23,6 @@ BiffStructurePtr FeatFormulaErr2::clone()
}
//void FeatFormulaErr2::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"ffecCalcError", grffecIgnore.ffecCalcError);
// own_tag->setAttribute(L"ffecEmptyCellRef", grffecIgnore.ffecEmptyCellRef);
// own_tag->setAttribute(L"ffecNumStoredAsText", grffecIgnore.ffecNumStoredAsText);
// own_tag->setAttribute(L"ffecInconsistRange", grffecIgnore.ffecInconsistRange);
// own_tag->setAttribute(L"ffecInconsistFmla", grffecIgnore.ffecInconsistFmla);
// own_tag->setAttribute(L"ffecTextDateInsuff", grffecIgnore.ffecTextDateInsuff);
// own_tag->setAttribute(L"ffecUnprotFmla", grffecIgnore.ffecUnprotFmla);
// own_tag->setAttribute(L"ffecDataValidation", grffecIgnore.ffecDataValidation);
//}
//
//
//const bool FeatFormulaErr2::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### FeatFormulaErr2 record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! FeatFormulaErr2 record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void FeatFormulaErr2::store(CFRecord& record)
{
record << grffecIgnore;
......
......@@ -24,28 +24,6 @@ BiffStructurePtr FeatProtection::clone()
return BiffStructurePtr(new FeatProtection(*this));
}
//
//void FeatProtection::toXML(BiffStructurePtr & parent)
//{
// MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
//
// own_tag->setAttribute(L"fSD", fSD);
// own_tag->setAttribute(L"wPassword", STR::int2hex_wstr(wPassword, 2).c_str()); // Cut password size since it is really 2-unsigned chars
// own_tag->setAttribute(L"stTitle", stTitle);
// if(sdContainer_set)
// {
// sdContainer.toXML(own_tag);
// }
//}
//
//
//const bool FeatProtection::fromXML(BiffStructurePtr & parent)
//{
//#pragma message("####################### FeatProtection record has no BiffStructure::fromXML() implemented")
// Log::error(" Error!!! FeatProtection record has no BiffStructure::fromXML() implemented.");
// return false;
//}
void FeatProtection::store(CFRecord& record)
{
......
This diff is collapsed.
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