Commit fb720ff5 authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander Trofimov

added compounddocument and mathequation to linux build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58602 954022d7-b5bf-4e40-9824-e11837661b57
parent 7e557bce
......@@ -62,112 +62,12 @@ SOURCES += docxformatlib.cpp \
../Source/XlsxFormat/Common.cpp \
../Source/XlsxFormat/FileFactory_Spreadsheet.cpp \
../Source/XlsxFormat/IFileContainer_Spreadsheet.cpp \
#../Source/XML/libxml2/XML/macos/src/libxml2_GUSIConfig.cp \
#../Source/XML/libxml2/XML/doc/examples/io1.c \
#../Source/XML/libxml2/XML/doc/examples/io2.c \
#../Source/XML/libxml2/XML/doc/examples/parse1.c \
#../Source/XML/libxml2/XML/doc/examples/parse2.c \
#../Source/XML/libxml2/XML/doc/examples/parse3.c \
#../Source/XML/libxml2/XML/doc/examples/parse4.c \
#../Source/XML/libxml2/XML/doc/examples/reader1.c \
#../Source/XML/libxml2/XML/doc/examples/reader2.c \
#../Source/XML/libxml2/XML/doc/examples/reader3.c \
#../Source/XML/libxml2/XML/doc/examples/reader4.c \
#../Source/XML/libxml2/XML/doc/examples/testWriter.c \
#../Source/XML/libxml2/XML/doc/examples/tree1.c \
#../Source/XML/libxml2/XML/doc/examples/tree2.c \
#../Source/XML/libxml2/XML/doc/examples/xpath1.c \
#../Source/XML/libxml2/XML/doc/examples/xpath2.c \
#../Source/XML/libxml2/XML/doc/tutorial/includeaddattribute.c \
#../Source/XML/libxml2/XML/doc/tutorial/includeaddkeyword.c \
#../Source/XML/libxml2/XML/doc/tutorial/includeconvert.c \
#../Source/XML/libxml2/XML/doc/tutorial/includegetattribute.c \
#../Source/XML/libxml2/XML/doc/tutorial/includekeyword.c \
#../Source/XML/libxml2/XML/doc/tutorial/includexpath.c \
#../Source/XML/libxml2/XML/example/gjobread.c \
#../Source/XML/libxml2/XML/macos/src/macos_main.c \
#../Source/XML/libxml2/XML/python/libxml.c \
#../Source/XML/libxml2/XML/python/types.c \
#../Source/XML/libxml2/XML/win32/wince/wincecompat.c \
#../Source/XML/libxml2/XML/buf.c \
#../Source/XML/libxml2/XML/c14n.c \
#../Source/XML/libxml2/XML/catalog.c \
#../Source/XML/libxml2/XML/chvalid.c \
#../Source/XML/libxml2/XML/debugXML.c \
#../Source/XML/libxml2/XML/dict.c \
#../Source/XML/libxml2/XML/DOCBparser.c \
#../Source/XML/libxml2/XML/encoding.c \
#../Source/XML/libxml2/XML/entities.c \
#../Source/XML/libxml2/XML/error.c \
#../Source/XML/libxml2/XML/globals.c \
#../Source/XML/libxml2/XML/hash.c \
#../Source/XML/libxml2/XML/HTMLparser.c \
#../Source/XML/libxml2/XML/HTMLtree.c \
#../Source/XML/libxml2/XML/legacy.c \
#../Source/XML/libxml2/XML/list.c \
#../Source/XML/libxml2/XML/nanoftp.c \
#../Source/XML/libxml2/XML/nanohttp.c \
#../Source/XML/libxml2/XML/parser.c \
#../Source/XML/libxml2/XML/parserInternals.c \
#../Source/XML/libxml2/XML/pattern.c \
#../Source/XML/libxml2/XML/relaxng.c \
#../Source/XML/libxml2/XML/rngparser.c \
#../Source/XML/libxml2/XML/runsuite.c \
#../Source/XML/libxml2/XML/runtest.c \
#../Source/XML/libxml2/XML/runxmlconf.c \
#../Source/XML/libxml2/XML/SAX.c \
#../Source/XML/libxml2/XML/SAX2.c \
#../Source/XML/libxml2/XML/schematron.c \
#../Source/XML/libxml2/XML/testapi.c \
#../Source/XML/libxml2/XML/testAutomata.c \
#../Source/XML/libxml2/XML/testC14N.c \
#../Source/XML/libxml2/XML/testchar.c \
#../Source/XML/libxml2/XML/testdict.c \
#../Source/XML/libxml2/XML/testdso.c \
#../Source/XML/libxml2/XML/testHTML.c \
#../Source/XML/libxml2/XML/testlimits.c \
#../Source/XML/libxml2/XML/testModule.c \
#../Source/XML/libxml2/XML/testOOM.c \
#../Source/XML/libxml2/XML/testOOMlib.c \
#../Source/XML/libxml2/XML/testReader.c \
#../Source/XML/libxml2/XML/testrecurse.c \
#../Source/XML/libxml2/XML/testRegexp.c \
#../Source/XML/libxml2/XML/testRelax.c \
#../Source/XML/libxml2/XML/testSAX.c \
#../Source/XML/libxml2/XML/testSchemas.c \
#../Source/XML/libxml2/XML/testThreads.c \
#../Source/XML/libxml2/XML/testThreadsWin32.c \
#../Source/XML/libxml2/XML/testURI.c \
#../Source/XML/libxml2/XML/testXPath.c \
#../Source/XML/libxml2/XML/threads.c \
#../Source/XML/libxml2/XML/tree.c \
#../Source/XML/libxml2/XML/trio.c \
#../Source/XML/libxml2/XML/trionan.c \
#../Source/XML/libxml2/XML/triostr.c \
#../Source/XML/libxml2/XML/uri.c \
#../Source/XML/libxml2/XML/valid.c \
#../Source/XML/libxml2/XML/xinclude.c \
#../Source/XML/libxml2/XML/xlink.c \
#../Source/XML/libxml2/XML/xmlcatalog.c \
#../Source/XML/libxml2/XML/xmlIO.c \
#../Source/XML/libxml2/XML/xmllint.c \
#../Source/XML/libxml2/XML/xmlmemory.c \
#../Source/XML/libxml2/XML/xmlmodule.c \
#../Source/XML/libxml2/XML/xmlreader.c \
#../Source/XML/libxml2/XML/xmlregexp.c \
#../Source/XML/libxml2/XML/xmlsave.c \
#../Source/XML/libxml2/XML/xmlschemas.c \
#../Source/XML/libxml2/XML/xmlschemastypes.c \
#../Source/XML/libxml2/XML/xmlstring.c \
#../Source/XML/libxml2/XML/xmlunicode.c \
#../Source/XML/libxml2/XML/xmlwriter.c \
#../Source/XML/libxml2/XML/xpath.c \
#../Source/XML/libxml2/XML/xpointer.c \
#../Source/XML/libxml2/XML/xzlib.c \
../Source/XML/libxml2/libxml2.cpp
../Source/XML/libxml2/libxml2.cpp \
../Source/XML/stringcommon.cpp \
../Source/MathEquation/MathEquation.cpp
HEADERS += docxformatlib.h \
#../Source/Base/Base.h \
../Source/Base/Base.h \
../Source/Base/Nullable.h \
../Source/Base/SmartPtr.h \
../Source/Common/AbstractConverter.h \
......@@ -420,7 +320,24 @@ HEADERS += docxformatlib.h \
../Source/XML/Utils.h \
../Source/XML/XmlSimple.h \
../Source/XML/xmlutils.h \
../Source/Base/ASCString.h
../Source/Base/ASCString.h \
../Source/CompoundDocument/detail/alloctable.hpp \
../Source/CompoundDocument/detail/dirtree.hpp \
../Source/CompoundDocument/detail/header.hpp \
../Source/CompoundDocument/detail/storage.hpp \
../Source/CompoundDocument/detail/stream.hpp \
../Source/CompoundDocument/detail/util.hpp \
../Source/CompoundDocument/pole.h \
../Source/DocxFormat/Drawing/DrawingShapeElements.h \
../Source/DocxFormat/Drawing/DrawingText.h \
../Source/DocxFormat/Drawing/DrawingTextProperties.h \
../Source/XML/stringcommon.h \
../Source/MathEquation/LEStream.h \
../Source/MathEquation/MathEquation.h \
../Source/MathEquation/OutputDev.h \
../Source/MathEquation/String.h \
../Source/MathEquation/StringOutput.h \
../Source/MathEquation/Types.h
unix {
target.path = /usr/lib
INSTALLS += target
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-09-30T17:25:21. -->
<!-- Written by QtCreator 3.1.1, 2014-10-01T16:36:48. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......@@ -57,7 +57,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.3.0 GCC 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.3.0 GCC 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.53.gcc_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
......
......@@ -34,6 +34,7 @@
#include <vector>
#include <cassert>
#include "util.hpp"
#include <cstring>
namespace POLE
{
......
......@@ -30,6 +30,7 @@
// header.hpp
#pragma once
#include "alloctable.hpp"
#include <cstring>
namespace POLE
{
......
......@@ -34,6 +34,7 @@
#include <list>
#include "header.hpp"
#include "dirtree.hpp"
#include <cstring>
#include "../../../../../DesktopEditor/common/File.h"
......@@ -89,13 +90,21 @@ public:
void get_entry_childrens(size_t index, std::vector<size_t> result) const
{
_dirtree->children(index, result);
std::vector<ULONG32> result_ulong;
result_ulong.assign (result.begin(), result.end());
_dirtree->children(index, result_ulong);
}
void children( size_t index, std::vector<size_t>& result ) const
{
if (_dirtree)
_dirtree->children(index, result);
{
std::vector<ULONG32> result_ulong;
result_ulong.assign (result.begin(), result.end());
_dirtree->children(index, result_ulong);
}
}
// Operations
......
......@@ -185,13 +185,13 @@ public: // Attributes
// Returns the read pointer.
std::streampos tellg() const
{
return impl ? impl->tellg() : 0;
return impl ? impl->tellg() : std::streampos();
}
// Returns the write pointer.
std::streampos tellp() const
{
return impl ? impl->tellp() : 0;
return impl ? impl->tellp() : std::streampos();
}
// Return the Eof state of the stream
......
#ifndef _MATHEQUATION_LESTREAM
#define _MATHEQUATION_LESTREAM
#include "..\CompoundDocument\pole.h"
#include "../CompoundDocument/pole.h"
#include "Types.h"
namespace MathEquation
......@@ -36,6 +36,35 @@ public :
delete pBuffer;
}
uint8_t ReadUInt8()
{
if (pCur + 1 >= pEnd)
return 0;
uint8_t unResult = pCur[0];
pCur++;
return unResult;
}
uint16_t ReadUInt16()
{
if (pCur + 2 >= pEnd)
return 0;
uint16_t ushResult = (pCur[0]) | ((pCur[1]) << 8);
pCur += 2;
return ushResult;
}
uint32_t ReadUInt32()
{
if (pCur + 4 >= pEnd)
return 0;
uint32_t unResult = (uint32_t)((pCur[0]<< 0) | ((pCur[1]) << 8) | ((pCur[2]) << 16) | ((pCur[3]) << 24));
pCur += 4;
return unResult;
}
void operator>>(uint8_t &nValue)
{
nValue = ReadUInt8();
......@@ -58,7 +87,7 @@ public :
void operator>>(int16_t &nValue)
{
nValue = Read_UInt16();
nValue = ReadUInt16();
}
bool IsValid() const
......@@ -77,34 +106,7 @@ public :
return false;
}
uint8_t ReadUInt8()
{
if (pCur + 1 >= pEnd)
return 0;
uint8_t unResult = pCur[0];
pCur++;
return unResult;
}
uint16_t ReadUInt16()
{
if (pCur + 2 >= pEnd)
return 0;
uint16_t ushResult = (pCur[0]) | ((pCur[1]) << 8);
pCur += 2;
return ushResult;
}
uint32_t ReadUInt32()
{
if (pCur + 4 >= pEnd)
return 0;
uint32_t unResult = (uint32_t)((pCur[0]<< 0) | ((pCur[1]) << 8) | ((pCur[2]) << 16) | ((pCur[3]) << 24));
pCur += 4;
return unResult;
}
uint32_t Tell()
{
......@@ -125,4 +127,4 @@ private:
}
#endif
\ No newline at end of file
#endif
#ifndef _MATH_EQUATION_READER_H
#define _MATH_EQUATION_READER_H
#include "..\CompoundDocument\pole.h"
#include "../CompoundDocument/pole.h"
#include "Types.h"
#include "LEStream.h"
#include "String.h"
......@@ -10,7 +10,7 @@
using namespace POLE;
namespace MathEquation
namespace MathEquation
{
class CEquationReader
{
......
#ifndef _MATH_EQUATION_STRING_H
#define _MATH_EQUATION_STRING_H
#include <string>
namespace MathEquation
{
#define STRING_NOTFOUND std::string::npos
class String
{
public:
String() {}
String(const char* val) : Value(val){}
String(std::string val) : Value(val){}
String &operator=(String &other)
{
Value = other.Value;
return (*this);
}
String &operator+=(const String &other)
{
Value += other.Value;
return (*this);
}
String &operator+=(const char* sChars)
{
Value += std::string(sChars);
return (*this);
}
String &operator+=(const char unChar)
{
char oChars[2];
oChars[0] = unChar; oChars[1] = 0x00;
Value += std::string((char*)&oChars);
return (*this);
}
void Append(const char* str)
{
Value.append(str);
}
void Append(String str)
{
Value.append(str.Value);
}
void Append(unsigned short ushUnicode)
{
char oChars[2];
oChars[0] = ushUnicode; oChars[1] = 0x00;
Value += std::string((char*)&oChars);
}
void AppendAscii(const char *sChars)
{
Value += std::string(sChars);
}
void Erase(int nPos = 0, int nLen = std::string::npos)
{
Value.erase(nPos, nLen);
}
int Len()
{
return (int)Value.length();
}
BYTE GetChar(int nPos)
{
return Value[nPos];
}
void InsertAscii(const char* str, int nPos)
{
Value.insert(nPos, str);
}
void Insert(String str, int nPos)
{
Value.insert(nPos, str.Value);
}
int SearchBackward(char nChar)
{
return (int)Value.rfind(nChar);
}
static String CreateFromInt32(int nValue)
{
char intStr[32];
_itoa_s(nValue, (char *)&intStr, 32, 10);
return String(intStr);
}
std::string GetValue()
{
return Value;
}
private:
std::string Value;
#define STRING_NOTFOUND std::string::npos
class String
{
public:
String() {}
String(const char* val) : Value(val){}
String(std::string val) : Value(val){}
String &operator=(String &other)
{
Value = other.Value;
return (*this);
}
String &operator+=(const String &other)
{
Value += other.Value;
return (*this);
}
String &operator+=(const char* sChars)
{
Value += std::string(sChars);
return (*this);
}
String &operator+=(const char unChar)
{
char oChars[2];
oChars[0] = unChar; oChars[1] = 0x00;
Value += std::string((char*)&oChars);
return (*this);
}
void Append(const char* str)
{
Value.append(str);
}
void Append(String str)
{
Value.append(str.Value);
}
void Append(unsigned short ushUnicode)
{
char oChars[2];
oChars[0] = ushUnicode; oChars[1] = 0x00;
Value += std::string((char*)&oChars);
}
void AppendAscii(const char *sChars)
{
Value += std::string(sChars);
}
void Erase(int nPos = 0, int nLen = std::string::npos)
{
Value.erase(nPos, nLen);
}
int Len()
{
return (int)Value.length();
}
BYTE GetChar(int nPos)
{
return Value[nPos];
}
void InsertAscii(const char* str, int nPos)
{
Value.insert(nPos, str);
}
void Insert(String str, int nPos)
{
Value.insert(nPos, str.Value);
}
int SearchBackward(char nChar)
{
return (int)Value.rfind(nChar);
}
static String CreateFromInt32(int nValue)
{
//char intStr[32];
//_itoa_s(nValue, (char *)&intStr, 32, 10);
return std::to_string(nValue);;
//return String(intStr);
}
std::string GetValue()
{
return Value;
}
private:
std::string Value;
};
}
#endif
\ No newline at end of file
#endif
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