Commit 61163c6e authored by Alexey Golubev's avatar Alexey Golubev

Merge branch 'release/onlyoffice-documentbuilder-4.0.3'

parents ee5e5da2 7d8c7f9a
......@@ -41,25 +41,23 @@
#include <set>
#include <map>
#include <limits.h>
#include <math.h>
#include "utf8.h"
#if defined(_WIN32) || defined(_WIN64)
#include <atlbase.h>
#include <atlstr.h>
#include <windows.h>
#else
#include "../../DesktopEditor/common/ASCVariant.h"
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
#include <string.h>
#endif
#include "../../DesktopEditor/common/Types.h"
#include "../../Common/DocxFormat/Source/XML/stringcommon.h"
#include "../../Common/DocxFormat/Source/Base/unicode_util.h"
#include "../../UnicodeConverter/UnicodeConverter.h"
#include <boost/format.hpp>
namespace DocFormatUtils
{
typedef unsigned char Bool8;
......@@ -131,11 +129,11 @@ namespace DocFormatUtils
{
switch(data[pos])
{
case '&': buffer.append(_T("&amp;")); break;
case '\"': buffer.append(_T("&quot;")); break;
case '\'': buffer.append(_T("&apos;")); break;
case '<': buffer.append(_T("&lt;")); break;
case '>': buffer.append(_T("&gt;")); break;
case '&': buffer.append(L"&amp;"); break;
case '\"': buffer.append(L"&quot;"); break;
case '\'': buffer.append(L"&apos;"); break;
case '<': buffer.append(L"&lt;"); break;
case '>': buffer.append(L"&gt;"); break;
default:
{
if ( false == IsUnicodeSymbol( data[pos] ) )
......@@ -163,11 +161,11 @@ namespace DocFormatUtils
{
switch(data[pos])
{
case '&': buffer.append(_T("&amp;")); break;
case '\"': buffer.append(_T("&quot;")); break;
case '\'': buffer.append(_T("&apos;")); break;
case '<': buffer.append(_T("&lt;")); break;
case '>': buffer.append(_T("&gt;")); break;
case '&': buffer.append(L"&amp;"); break;
case '\"': buffer.append(L"&quot;"); break;
case '\'': buffer.append(L"&apos;"); break;
case '<': buffer.append(L"&lt;"); break;
case '>': buffer.append(L"&gt;"); break;
default: buffer.append(&data[pos], 1); break;
}
}
......@@ -285,33 +283,33 @@ namespace DocFormatUtils
switch ( c )
{
case _T( '&' ):
case L'&':
{
result = std::wstring( _T( "&amp;" ) );
result = std::wstring( L"&amp;" );
}
break;
case _T( '<' ):
case L'<':
{
result = std::wstring( _T( "&lt;" ) );
result = std::wstring( L"&lt;" );
}
break;
case _T( '>' ):
case L'>':
{
result = std::wstring( _T( "&gt;" ) );
result = std::wstring( L"&gt;" );
}
break;
case _T( '\"' ):
case L'\"':
{
result = std::wstring( _T( "&quot;" ) );
result = std::wstring( L"&quot;" );
}
break;
case _T( '\'' ):
case L'\'':
{
result = std::wstring( _T( "&apos;" ) );
result = std::wstring( L"&apos;" );
}
break;
......@@ -768,10 +766,13 @@ namespace DocFormatUtils
static inline std::wstring IntToWideString(int value)
{
CString strValue;
strValue.Format(_T("%d"), value);
return string2std_string(strValue);
#if defined(_WIN32) || defined (_WIN64)
wchar_t buff[33] ={};
_itow(value, buff, 10);
return std::wstring(buff);
#else
return (std::to_wstring(value));
#endif
}
static inline std::wstring DoubleToWideString(double value)
{
......@@ -782,17 +783,6 @@ namespace DocFormatUtils
return std::wstring(src.str());
}
static inline std::string IntToString(int value, int radix = 10)
{
const int size = 33;
char strValue[size];
itoa(value, strValue, radix);
return std::string(strValue);
}
static inline std::string DoubleToString(double value)
{
std::stringstream src;
......@@ -807,7 +797,7 @@ namespace DocFormatUtils
std::wstring out;
if ( mapArray == NULL )
{
out = std::wstring( _T( "" ) );
out = std::wstring( L"" );
}
if ( value < size1 )
......@@ -825,31 +815,37 @@ namespace DocFormatUtils
{
// const int size = 33;
// wchar_t strValue[size] = _T( "\0" );
// wchar_t strValue[size] = L"\0";
// if ( format != NULL )
// {
if ( format == NULL ) return L"";
// swprintf_s( strValue, size, format, value );
// }
CString format_str;
format_str.Format(format , value);
//// }
// CString format_str;
// format_str.Format(format , value);
return string2std_string( format_str );
std::wstringstream sstream;
sstream << boost::wformat(format) % value;
return sstream.str();
//return string2std_string( format_str );
}
static inline std::wstring DoubleToFormattedWideString( double value, wchar_t* format )
{
std::wstring wstr;
if ( format == NULL ) return L"";
//std::wstring wstr;
if ( format != NULL )
{
CString strValue;
strValue.Format(format, value);
//if ( format != NULL )
//{
// CString strValue;
// strValue.Format(format, value);
wstr = string2std_string( strValue );
}
// wstr = string2std_string( strValue );
//}
return wstr;
//return wstr;
std::wstringstream sstream;
sstream << boost::wformat(format) % value;
return sstream.str();
}
static inline void SetBytes( unsigned char *bytes, int value )
......
......@@ -35,13 +35,8 @@
#include <map>
#include <list>
#if defined(_WIN32) || defined(_WIN64)
#include <atlbase.h>
#include <atlstr.h>
#else
#include "../../DesktopEditor/common/ASCVariant.h"
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
#endif
#include "../../DesktopEditor/common/File.h"
inline static std::wstring ReplaceString(std::wstring subject, const std::wstring& search, const std::wstring& replace)
{
......@@ -118,12 +113,12 @@ namespace XMLTools
std::basic_string<T> GetXMLString()
{
std::basic_string<T> xmlString( _T( "" ) );
std::basic_string<T> xmlString( L"" );
xmlString += m_Name;
xmlString += std::basic_string<T>( _T( "=\"" ) );
xmlString += std::basic_string<T>( L"=\"" );
xmlString += m_Value;
xmlString += std::basic_string<T>( _T( "\"" ) );
xmlString += std::basic_string<T>( L"\"" );
return xmlString;
}
......@@ -165,7 +160,7 @@ namespace XMLTools
/*========================================================================================================*/
XMLElement( const T* prefix, const T* localName ) : m_Name( std::basic_string<T>( prefix ) + std::basic_string<T>( _T( ":" ) ) + std::basic_string<T>( localName ) ), m_ElementText( _T( "" ) )
XMLElement( const T* prefix, const T* localName ) : m_Name( std::basic_string<T>( prefix ) + std::basic_string<T>( L":" ) + std::basic_string<T>( localName ) ), m_ElementText( L"" )
{
}
......@@ -341,25 +336,25 @@ namespace XMLTools
std::basic_string<T> GetXMLString()
{
std::basic_string<T> xmlString( _T( "" ) );
std::basic_string<T> xmlString( L"");
bool bIsNameExists = ( m_Name != std::basic_string<T>( _T( "" ) ) );
bool bIsTextExists = ( m_ElementText != std::basic_string<T>( _T( "" ) ) );
bool bIsNameExists = ( m_Name != std::basic_string<T>( L"") );
bool bIsTextExists = ( m_ElementText != std::basic_string<T>( L"") );
if ( bIsNameExists )
{
xmlString += std::basic_string<T>( _T( "<" ) ) + m_Name;
xmlString += std::basic_string<T>( L"<" ) + m_Name;
}
if ( ( bIsNameExists ) && ( m_AttributeMap.size() > 0 ) )
{
for ( AttMapIterator iter = m_AttributeMap.begin(); iter != m_AttributeMap.end(); iter++ )
{
xmlString += std::basic_string<T>( _T( " " ) );
xmlString += std::basic_string<T>( L" " );
xmlString += iter->first;
xmlString += std::basic_string<T>( _T( "=\"" ) );
xmlString += std::basic_string<T>( L"=\"" );
xmlString += iter->second;
xmlString += std::basic_string<T>( _T( "\"" ) );
xmlString += std::basic_string<T>( L"\"" );
}
}
......@@ -367,7 +362,7 @@ namespace XMLTools
{
if ( bIsNameExists )
{
xmlString += std::basic_string<T>( _T( ">" ) );
xmlString += std::basic_string<T>( L">" );
}
for ( ElementsIterator iter = m_Elements.begin(); iter != m_Elements.end(); iter++ )
......@@ -382,16 +377,16 @@ namespace XMLTools
if ( bIsNameExists )
{
xmlString += std::basic_string<T>( _T( "</" ) );
xmlString += std::basic_string<T>( L"</" );
xmlString += m_Name;
xmlString += std::basic_string<T>( _T( ">" ) );
xmlString += std::basic_string<T>( L">" );
}
}
else
{
if ( bIsNameExists )
{
xmlString += std::basic_string<T>( _T( "/>" ) );
xmlString += std::basic_string<T>( L"/>" );
}
}
......@@ -413,4 +408,141 @@ namespace XMLTools
}
};
class CStringXmlWriter
{
std::wstring m_str;
public:
CStringXmlWriter(){}
std::wstring GetXmlString()
{
return m_str;
}
void SetXmlString(const std::wstring& strValue)
{
m_str = strValue;
}
bool SaveToFile(const std::wstring& strFilePath, bool bEncodingToUTF8 = false)
{
NSFile::CFileBinary file;
if (!file.CreateFileW(strFilePath)) return false;
if (bEncodingToUTF8)
file.WriteStringUTF8(m_str);
else
{
std::string s(m_str.begin(), m_str.end());
file.WriteFile((unsigned char*)s.c_str(), s.length());
}
file.CloseFile();
return true;
}
void WriteString(const std::wstring & strValue)
{
m_str += strValue;
}
void WriteInteger(int Value, int Base = 10)
{
#if defined(_WIN32) || defined (_WIN64)
wchar_t buff[33] ={};
_itow(Value, buff, Base);
m_str += std::wstring(buff);
#else
m_str += std::to_wstring(Value);
#endif
}
void WriteDouble(double Value)
{
#if defined(_WIN32) || defined (_WIN64)
int *dec = NULL, *sign = NULL;
char *str = _fcvt( Value , 4, dec, sign);
if (str)
{
std::string sA(str);
delete []str;
m_str += std::wstring(sA.begin(), sA.end());
}
else
{
m_str += L"0";
}
#else
m_str += std::to_wstring(Value);
#endif
}
void WriteBoolean(bool Value)
{
if (Value)
m_str += L"true";
else
m_str += L"false";
}
void WriteNodeBegin(const std::wstring& strNodeName, bool bAttributed = false)
{
m_str += L"<" + strNodeName;
if (!bAttributed)
m_str += L">";
}
void WriteNodeEnd(const std::wstring& strNodeName, bool bEmptyNode = false, bool bEndNode = true)
{
if (bEmptyNode)
{
if (bEndNode)
m_str += L"/>";
else
m_str += L">";
}
else
m_str += L"</" + strNodeName + L">";
}
void WriteNode(const std::wstring& strNodeName, const std::wstring& strNodeValue)
{
if (strNodeValue.length() == 0)
m_str += L"<" + strNodeName + L"/>";
else
m_str += L"<" + strNodeName + L">" + strNodeValue + L"</" + strNodeName + L">";
}
void WriteNode(const std::wstring& strNodeName, int nValue, int nBase = 10, const std::wstring& strTextBeforeValue = L"", const std::wstring& strTextAfterValue = L"")
{
WriteNodeBegin(strNodeName);
WriteString(strTextBeforeValue);
WriteInteger(nValue, nBase);
WriteString(strTextAfterValue);
WriteNodeEnd(strNodeName);
}
void WriteNode(const std::wstring& strNodeName, double dValue)
{
WriteNodeBegin(strNodeName);
WriteDouble(dValue);
WriteNodeEnd(strNodeName);
}
void WriteAttribute(const std::wstring& strAttributeName, const std::wstring& strAttributeValue)
{
m_str += L" " + strAttributeName + L"=\"" + strAttributeValue + L"\"";
}
void WriteAttribute(const std::wstring& strAttributeName, int nValue, int nBase = 10, const std::wstring& strTextBeforeValue = L"", const std::wstring& strTextAfterValue = L"")
{
WriteString(L" " + strAttributeName + L"=");
WriteString(L"\"");
WriteString(strTextBeforeValue);
WriteInteger(nValue, nBase);
WriteString(strTextAfterValue);
WriteString(L"\"");
}
void WriteAttribute(const std::wstring& strAttributeName, double dValue)
{
WriteString(L" " + strAttributeName + L"=");
WriteString(L"\"");
WriteDouble(dValue);
WriteString(L"\"");
}
};
}
......@@ -31,19 +31,19 @@
*/
#pragma once
#include "../../Common/DocxFormat/Source/XML/xmlutils.h"
#include "../Common/XmlTools.h"
namespace DocFileFormat
{
class AbstractOpenXmlMapping
{
public:
AbstractOpenXmlMapping (XmlUtils::CXmlWriter* pWriter) : m_pXmlWriter(pWriter)
AbstractOpenXmlMapping (XMLTools::CStringXmlWriter* pWriter) : m_pXmlWriter(pWriter)
{
}
inline XmlUtils::CXmlWriter* GetXMLWriter()
inline XMLTools::CStringXmlWriter* GetXMLWriter()
{
return m_pXmlWriter;
}
......@@ -55,6 +55,6 @@ namespace DocFileFormat
protected:
XmlUtils::CXmlWriter* m_pXmlWriter;
XMLTools::CStringXmlWriter* m_pXmlWriter;
};
}
......@@ -61,7 +61,7 @@ namespace DocFileFormat
return m_BookmarkId;
}
AnnotationReferenceDescriptor() : m_UserInitials( _T( "" ) ), m_AuthorIndex(0), m_BookmarkId(0)
AnnotationReferenceDescriptor() : m_AuthorIndex(0), m_BookmarkId(0)
{
}
......
......@@ -34,7 +34,7 @@
namespace DocFileFormat
{
CharacterPropertiesMapping::CharacterPropertiesMapping( XmlUtils::CXmlWriter* writer, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded)
CharacterPropertiesMapping::CharacterPropertiesMapping( XMLTools::CStringXmlWriter* writer, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded)
: PropertiesMapping( writer ), _isRunStyleNeeded(isRunStyleNeeded), _isOwnRPr(true), _isRTL(false)
{
_doc = doc;
......@@ -294,11 +294,13 @@ namespace DocFileFormat
case sprmCCv:
{
CString rgbColor;
std::wstringstream sstream;
rgbColor.Format( _T( "%02x%02x%02x" ), /*R*/iter->Arguments[0], /*G*/iter->Arguments[1], /*B*/iter->Arguments[2] );
colorVal->SetValue( rgbColor.GetString() );
sstream << boost::wformat(L"%02x%02x%02x") % iter->Arguments[0] % /*G*/iter->Arguments[1] % /*B*/iter->Arguments[2];
colorVal->SetValue(sstream.str().c_str());
//CString rgbColor;
//rgbColor.Format( _T( "%02x%02x%02x" ), /*R*/iter->Arguments[0], /*G*/iter->Arguments[1], /*B*/iter->Arguments[2] );
//colorVal->SetValue( rgbColor.GetString() );
}break;
case sprmCOldHighlight:
......
......@@ -46,15 +46,15 @@ namespace DocFileFormat
{
static const wchar_t SuperscriptIndex[3][12] =
{
_T( "baseline" ),
_T( "superscript" ),
_T( "subscript" )
L"baseline",
L"superscript",
L"subscript"
};
class CharacterPropertiesMapping: public PropertiesMapping, public IMapping
{
public:
CharacterPropertiesMapping( XmlUtils::CXmlWriter* writer, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded = true );
CharacterPropertiesMapping( XMLTools::CStringXmlWriter* writer, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded = true );
CharacterPropertiesMapping( XMLTools::XMLElement<wchar_t>* rPr, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded = true );
virtual ~CharacterPropertiesMapping();
void Apply( IVisitable* chpx );
......@@ -74,7 +74,7 @@ namespace DocFileFormat
virtual void appendFlagElement( XMLTools::XMLElement<wchar_t>* node, const SinglePropertyModifier& sprm, const wchar_t* elementName, bool unique );
private:
XmlUtils::CXmlWriter pRunPr;
XMLTools::CStringXmlWriter pRunPr;
WordDocument* _doc;
XMLTools::XMLElement<wchar_t>* _rPr;
......
......@@ -32,12 +32,12 @@
#pragma once
#if defined(_WIN32) || defined(_WIN64)
#include <atlbase.h>
#include <atlstr.h>
#include <tchar.h>
#else
#include "../../DesktopEditor/common/ASCVariant.h"
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
#endif
#include <string>
namespace OpenXmlContentTypes
{
......
......@@ -42,7 +42,7 @@
namespace DocFileFormat
{
DocumentMapping::DocumentMapping(ConversionContext* context, IMapping* caller):_skipRuns(0), _lastValidPapx(NULL), _lastValidSepx(NULL), _writeInstrText(false),
_fldCharCounter(0), AbstractOpenXmlMapping( new XmlUtils::CXmlWriter() ), _sectionNr(0), _footnoteNr(0),
_fldCharCounter(0), AbstractOpenXmlMapping( new XMLTools::CStringXmlWriter() ), _sectionNr(0), _footnoteNr(0),
_endnoteNr(0), _commentNr(0), _caller(caller)
{
m_document = NULL;
......@@ -55,7 +55,7 @@ namespace DocFileFormat
_isTextBoxContent = false;
}
DocumentMapping::DocumentMapping(ConversionContext* context, XmlUtils::CXmlWriter* writer, IMapping* caller):_skipRuns(0), _lastValidPapx(NULL), _lastValidSepx(NULL), _writeInstrText(false),
DocumentMapping::DocumentMapping(ConversionContext* context, XMLTools::CStringXmlWriter* writer, IMapping* caller):_skipRuns(0), _lastValidPapx(NULL), _lastValidSepx(NULL), _writeInstrText(false),
_fldCharCounter(0), AbstractOpenXmlMapping(writer), _sectionNr(0), _footnoteNr(0), _endnoteNr(0),
_commentNr(0), _caller(caller)
{
......@@ -535,6 +535,7 @@ namespace DocFileFormat
std::wstring TOC ( _T( " TOC" ) );
std::wstring HYPERLINK ( _T( " HYPERLINK" ) );
std::wstring PAGEREF ( _T( " PAGEREF" ) );
std::wstring PAGE ( _T( "PAGE" ) );
bool bChart = search( f.begin(), f.end(), chart.begin(), chart.end()) != f.end();
bool bEMBED = search( f.begin(), f.end(), EMBED.begin(), EMBED.end()) != f.end();
......@@ -548,6 +549,7 @@ namespace DocFileFormat
bool bPAGEREF = search( f.begin(), f.end(), PAGEREF.begin(), PAGEREF.end()) != f.end();
bool bQUOTE = search( f.begin(), f.end(), QUOTE.begin(), QUOTE.end()) != f.end();
bool bEquation = search( f.begin(), f.end(), Equation.begin(), Equation.end()) != f.end();
bool bPAGE = !bPAGEREF && search( f.begin(), f.end(), PAGE.begin(), PAGE.end()) != f.end();
if ( bFORM )
{
......@@ -588,12 +590,12 @@ namespace DocFileFormat
_fldCharCounter++;
}
else if ( bHYPERLINK && bPAGEREF )
else if ( (bHYPERLINK && bPAGEREF) || bPAGE)
{
int cpFieldSep2 = cpFieldStart, cpFieldSep1 = cpFieldStart;
std::vector<std::wstring> toc;
if (search( f.begin(), f.end(), TOC.begin(), TOC.end()) != f.end())
if ((search( f.begin(), f.end(), TOC.begin(), TOC.end()) != f.end()) || bPAGE)
{
m_pXmlWriter->WriteNodeBegin( _T( "w:fldChar" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:fldCharType" ), _T( "begin" ) );
......@@ -658,7 +660,7 @@ namespace DocFileFormat
chpxObj->Convert(rPr);
RELEASEOBJECT(rPr);
}
XmlUtils::CXmlWriter OleWriter;
XMLTools::CStringXmlWriter OleWriter;
VMLPictureMapping oVmlMapper (m_context, &OleWriter, true, _caller);
if (m_document->bOlderVersion)
......
......@@ -69,7 +69,7 @@ namespace DocFileFormat
public:
DocumentMapping(ConversionContext* context, IMapping* caller);
DocumentMapping(ConversionContext* context, XmlUtils::CXmlWriter* writer, IMapping* caller);
DocumentMapping(ConversionContext* context, XMLTools::CStringXmlWriter* writer, IMapping* caller);
virtual ~DocumentMapping();
virtual void Apply( IVisitable* visited ) = 0;
......
......@@ -76,16 +76,14 @@ namespace DocFileFormat
DocumentTypographyInfo():
fKerningPunct(false), iJustification(0), iLevelOfKinsoku(0), f2on1(false), fOldDefineLineBaseOnGrid(false),
iCustomKsu(0), fJapaneseUseLevel2(false), cchFollowingPunct(0), cchLeadingPunct(0), rgxchFPunct( _T( "" ) ),
rgxchLPunct( _T( "" ) )
iCustomKsu(0), fJapaneseUseLevel2(false), cchFollowingPunct(0), cchLeadingPunct(0)
{
}
/// Parses the bytes to retrieve a DocumentTypographyInfo
DocumentTypographyInfo( unsigned char* bytes, int size ):
fKerningPunct(false), iJustification(0), iLevelOfKinsoku(0), f2on1(false), fOldDefineLineBaseOnGrid(false),
iCustomKsu(0), fJapaneseUseLevel2(false), cchFollowingPunct(0), cchLeadingPunct(0), rgxchFPunct( _T( "" ) ),
rgxchLPunct( _T( "" ) )
iCustomKsu(0), fJapaneseUseLevel2(false), cchFollowingPunct(0), cchLeadingPunct(0)
{
if ( size == 310 )
{
......
......@@ -110,13 +110,13 @@ namespace DocFileFormat
{
if ((int) newObject->xszFtn.at(0) < 31) //DDToneWebService.doc
{
newObject->xszFtn = _T("");
newObject->xszFtn = L"";
}
}
if (newObject->xszFtn.length() < 2 && szAlt < 1)//programo.doc
{
newObject->xszFtn = _T("font");
newObject->xszFtn = L"font";
}
RELEASEARRAYOBJECTS( bytes );
......
......@@ -34,7 +34,7 @@
namespace DocFileFormat
{
FontTableMapping::FontTableMapping( ConversionContext* ctx ): AbstractOpenXmlMapping( new XmlUtils::CXmlWriter() )
FontTableMapping::FontTableMapping( ConversionContext* ctx ): AbstractOpenXmlMapping( new XMLTools::CStringXmlWriter() )
{
_ctx = ctx;
}
......
......@@ -37,164 +37,164 @@ namespace Global
{
static const wchar_t ColorIdentifier[17][12] =
{
_T( "auto" ),
_T( "black" ),
_T( "blue" ),
_T( "cyan" ),
_T( "green" ),
_T( "magenta" ),
_T( "red" ),
_T( "yellow" ),
_T( "white" ),
_T( "darkBlue" ),
_T( "darkCyan" ),
_T( "darkGreen" ),
_T( "darkMagenta" ),
_T( "darkRed" ),
_T( "darkYellow" ),
_T( "darkGray" ),
_T( "lightGray" )
L"auto",
L"black",
L"blue",
L"cyan",
L"green",
L"magenta",
L"red",
L"yellow",
L"white",
L"darkBlue",
L"darkCyan",
L"darkGreen",
L"darkMagenta",
L"darkRed",
L"darkYellow",
L"darkGray",
L"lightGray"
};
static const wchar_t UnderlineCode[56][16] =
{
_T( "none" ),
_T( "single" ),
_T( "words" ),
_T( "double" ),
_T( "dotted" ),
_T( "notUsed1" ),
_T( "thick" ),
_T( "dash" ),
_T( "notUsed2" ),
_T( "dotDash" ),
_T( "dotDotDash" ),
_T( "wave" ),
_T( "notUsed3" ),
_T( "notUsed4" ),
_T( "notUsed5" ),
_T( "notUsed6" ),
_T( "notUsed7" ),
_T( "notUsed8" ),
_T( "notUsed9" ),
_T( "notUsed10" ),
_T( "dottedHeavy" ),
_T( "notUsed11" ),
_T( "notUsed12" ),
_T( "dashedHeavy" ),
_T( "notUsed13" ),
_T( "dashDotHeavy" ),
_T( "dashDotDotHeavy" ),
_T( "wavyHeavy" ),
_T( "notUsed14" ),
_T( "notUsed15" ),
_T( "notUsed16" ),
_T( "notUsed17" ),
_T( "notUsed18" ),
_T( "notUsed19" ),
_T( "notUsed20" ),
_T( "notUsed21" ),
_T( "notUsed22" ),
_T( "notUsed23" ),
_T( "notUsed24" ),
_T( "dashLong" ),
_T( "notUsed25" ),
_T( "notUsed26" ),
_T( "notUsed27" ),
_T( "wavyDouble" ),
_T( "notUsed28" ),
_T( "notUsed29" ),
_T( "notUsed30" ),
_T( "notUsed31" ),
_T( "notUsed32" ),
_T( "notUsed33" ),
_T( "notUsed34" ),
_T( "notUsed35" ),
_T( "notUsed36" ),
_T( "notUsed37" ),
_T( "notUsed38" ),
_T( "dashLongHeavy" )
L"none",
L"single",
L"words",
L"double",
L"dotted",
L"notUsed1",
L"thick",
L"dash",
L"notUsed2",
L"dotDash",
L"dotDotDash",
L"wave",
L"notUsed3",
L"notUsed4",
L"notUsed5",
L"notUsed6",
L"notUsed7",
L"notUsed8",
L"notUsed9",
L"notUsed10",
L"dottedHeavy",
L"notUsed11",
L"notUsed12",
L"dashedHeavy",
L"notUsed13",
L"dashDotHeavy",
L"dashDotDotHeavy",
L"wavyHeavy",
L"notUsed14",
L"notUsed15",
L"notUsed16",
L"notUsed17",
L"notUsed18",
L"notUsed19",
L"notUsed20",
L"notUsed21",
L"notUsed22",
L"notUsed23",
L"notUsed24",
L"dashLong",
L"notUsed25",
L"notUsed26",
L"notUsed27",
L"wavyDouble",
L"notUsed28",
L"notUsed29",
L"notUsed30",
L"notUsed31",
L"notUsed32",
L"notUsed33",
L"notUsed34",
L"notUsed35",
L"notUsed36",
L"notUsed37",
L"notUsed38",
L"dashLongHeavy"
};
static const wchar_t TabLeader[8][11] =
{
_T( "none" ),
_T( "dot" ),
_T( "hyphen" ),
_T( "underscore" ),
_T( "heavy" ),
_T( "middleDot" ),
_T( "none" ),
_T( "none" )
L"none",
L"dot",
L"hyphen",
L"underscore",
L"heavy",
L"middleDot",
L"none",
L"none"
};
static const wchar_t TabStop[7][8] =
{
_T( "left" ),
_T( "center"),
_T( "right" ),
_T( "decimal" ),
_T( "bar" ),
_T( "clear" ),
_T( "num" )
L"left",
L"center",
L"right",
L"decimal",
L"bar",
L"clear",
L"num"
};
static const wchar_t TextAnimation[7][16] =
{
_T( "none" ),
_T( "lights" ),
_T( "blinkBackground" ),
_T( "sparkle" ),
_T( "antsBlack" ),
_T( "antsRed" ),
_T( "shimmer" )
L"none",
L"lights",
L"blinkBackground",
L"sparkle",
L"antsBlack",
L"antsRed",
L"shimmer"
};
static const wchar_t JustificationCode[10][15] =
{
_T( "start" ),
_T( "center" ),
_T( "end" ),
_T( "both" ),
_T( "distribute" ),
_T( "mediumKashida" ),
_T( "numTab" ),
_T( "highKashida" ),
_T( "lowKashida" ),
_T( "thaiDistribute" )
L"start",
L"center",
L"end",
L"both",
L"distribute",
L"mediumKashida",
L"numTab",
L"highKashida",
L"lowKashida",
L"thaiDistribute"
};
static const wchar_t VerticalPositionCode[4][7] =
{
_T( "margin" ),
_T( "page" ),
_T( "text" ),
_T( "none" )
L"margin",
L"page",
L"text",
L"none"
};
static const wchar_t HorizontalPositionCode[4][7] =
{
_T( "text" ),
_T( "margin" ),
_T( "page" ),
_T( "none" )
L"text",
L"margin",
L"page",
L"none"
};
static const wchar_t TextFrameWrapping[6][10] =
{
_T( "auto" ),
_T( "notBeside" ),
_T( "around" ),
_T( "none" ),
_T( "tight" ),
_T( "through" )
L"auto",
L"notBeside",
L"around",
L"none",
L"tight",
L"through"
};
static const wchar_t TextFrameDropCapLocation[3][7] =
{
_T( "none" ),
_T( "drop" ),
_T( "margin" )
L"none",
L"drop",
L"margin"
};
typedef enum _DashStyle
......@@ -214,17 +214,17 @@ namespace Global
static const wchar_t DashStyleMap[11][16] =
{
_T( "solid" ),
_T( "shortdash" ),
_T( "shortdot" ),
_T( "shortdashdot" ),
_T( "shortdashdotdot" ),
_T( "dot" ),
_T( "dash" ),
_T( "longdash" ),
_T( "dashdot" ),
_T( "longdashdot" ),
_T( "longdashdotdot" )
L"solid",
L"shortdash",
L"shortdot",
L"shortdashdot",
L"shortdashdotdot",
L"dot",
L"dash",
L"longdash",
L"dashdot",
L"longdashdot",
L"longdashdotdot"
};
typedef enum _TextFlow
......@@ -238,12 +238,12 @@ namespace Global
static const wchar_t TextFlowMap[6][6] =
{
_T( "lrTb" ),
_T( "tbRl" ),
_T( "lrTb" ),//его на самом деле нету (2.9.323 TextFlow)
_T( "btLr" ),
_T( "lrTbV" ),
_T( "tbRlV" ),
L"lrTb",
L"tbRl",
L"lrTb",//его на самом деле нету (2.9.323 TextFlow)
L"btLr",
L"lrTbV",
L"tbRlV",
};
typedef enum _VerticalMergeFlag
......@@ -262,9 +262,9 @@ namespace Global
static const wchar_t VerticalAlignMap[3][7] =
{
_T( "top" ),
_T( "center" ),
_T( "bottom" )
L"top",
L"center",
L"bottom"
};
typedef enum _CellWidthType
......@@ -277,10 +277,10 @@ namespace Global
static const wchar_t CellWidthTypeMap[4][5] =
{
_T( "nil" ),
_T( "auto" ),
_T( "pct" ),
_T( "dxa" )
L"nil",
L"auto",
L"pct",
L"dxa"
};
typedef enum _BlipUsage
......
......@@ -35,7 +35,7 @@
namespace DocFileFormat
{
LanguageIdMapping::LanguageIdMapping (XmlUtils::CXmlWriter* pWriter, LanguageType type) : PropertiesMapping (pWriter)
LanguageIdMapping::LanguageIdMapping (XMLTools::CStringXmlWriter* pWriter, LanguageType type) : PropertiesMapping (pWriter)
{
_type = type;
}
......@@ -65,25 +65,25 @@ namespace DocFileFormat
{
case Default:
{
att = new XMLTools::XMLAttribute<wchar_t>( _T( "w:val" ), langcode.c_str() );
att = new XMLTools::XMLAttribute<wchar_t>( L"w:val", langcode.c_str() );
}
break;
case EastAsian:
{
att = new XMLTools::XMLAttribute<wchar_t>( _T( "w:eastAsia" ), langcode.c_str() );
att = new XMLTools::XMLAttribute<wchar_t>( L"w:eastAsia", langcode.c_str() );
}
break;
case Complex:
{
att = new XMLTools::XMLAttribute<wchar_t>( _T( "w:bidi" ), langcode.c_str() );
att = new XMLTools::XMLAttribute<wchar_t>( L"w:bidi", langcode.c_str() );
}
break;
default:
{
att = new XMLTools::XMLAttribute<wchar_t>( _T( "w:val" ), langcode.c_str() );
att = new XMLTools::XMLAttribute<wchar_t>( L"w:val", langcode.c_str() );
}
break;
}
......
......@@ -48,7 +48,7 @@ namespace DocFileFormat
class LanguageIdMapping : public PropertiesMapping, public IMapping
{
public:
LanguageIdMapping( XmlUtils::CXmlWriter* writer, LanguageType type );
LanguageIdMapping( XMLTools::CStringXmlWriter* writer, LanguageType type );
LanguageIdMapping( XMLTools::XMLElement<wchar_t>* parentElement, LanguageType type );
virtual ~LanguageIdMapping();
void Apply( IVisitable* lid );
......
......@@ -46,9 +46,9 @@ namespace DocFileFormat
static const wchar_t FollowingCharMap[3][8] =
{
_T( "tab" ),
_T( "space" ),
_T( "nothing" )
L"tab" ,
L"space" ,
L"nothing"
};
class ListLevel
......
......@@ -150,16 +150,6 @@ public:
//------------------------------------------------------------------------------------------------------
//ATL::CAtlFile oFile;
//if (SUCCEEDED(oFile.Create(L"d:\\blop.dat",GENERIC_WRITE, FILE_SHARE_WRITE, CREATE_ALWAYS)))
//{
// DWORD nFileBuff = 0L;
// oFile.Write (pBytes, count, &nFileBuff);
// oFile.Close();
//}
//------------------------------------------------------------------------------------------------------
if ( !isResultNeeded )
{
RELEASEARRAYOBJECTS (pBytes);
......
......@@ -34,7 +34,7 @@
namespace DocFileFormat
{
NumberingMapping::NumberingMapping(ConversionContext* context) : AbstractOpenXmlMapping(new XmlUtils::CXmlWriter()), m_context(context), m_document(NULL), m_xmldocument(NULL)
NumberingMapping::NumberingMapping(ConversionContext* context) : AbstractOpenXmlMapping(new XMLTools::CStringXmlWriter()), m_context(context), m_document(NULL), m_xmldocument(NULL)
{
if (m_context)
{
......@@ -548,7 +548,7 @@ namespace DocFileFormat
{
if (!lvl) return;
XmlUtils::CXmlWriter oWriterTemp; //Временный writer,что не нарушать последовательность записи
XMLTools::CStringXmlWriter oWriterTemp; //Временный writer,что не нарушать последовательность записи
//rPr
RevisionData rev(lvl->grpprlChpx);
CharacterPropertiesMapping cpMapping(&oWriterTemp, m_document, &rev, lvl->grpprlPapx, false);
......
......@@ -157,7 +157,7 @@ class CMetaFileBuffer
{
public:
bool m_bIsValid;
CString m_sExtension;
std::wstring m_sExtension;
private:
BYTE* m_pMetaHeader;
BYTE* m_pMetaFile;
......
......@@ -33,8 +33,8 @@
#include "ProtectionBooleanProperties.h"
#include "../IVisitable.h"
#include "../../Common/XmlTools.h"
#include "../../../Common/DocxFormat/Source/XML/xmlutils.h"
#include <list>
......@@ -256,9 +256,9 @@ namespace DocFileFormat
static const wchar_t JoinStyleMap[3][6] =
{
_T( "miter" ),
_T( "round" ),
_T( "bevel" )
L"miter" ,
L"round" ,
L"bevel"
};
class Handle
......
......@@ -42,23 +42,23 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = round;
Path = _T( "wr-21600,,21600,43200,,,21600,21600nfewr-21600,,21600,43200,,,21600,21600l,21600nsxe" );
Path = L"wr-21600,,21600,43200,,,21600,21600nfewr-21600,,21600,43200,,,21600,21600l,21600nsxe";
Formulas.push_back( _T( "val #2" ) );
Formulas.push_back( _T( "val #3" ) );
Formulas.push_back( _T( "val #4" ) );
Formulas.push_back( L"val #2");
Formulas.push_back( L"val #3");
Formulas.push_back( L"val #4");
AdjustmentValues = _T( "-5898240,,,21600,21600" );
ConnectorLocations = _T( "0,0;21600,21600;0,21600" );
AdjustmentValues = L"-5898240,,,21600,21600";
ConnectorLocations = L"0,0;21600,21600;0,21600";
Handle HandleOne;
HandleOne.position = _T( "@2,#0" );
HandleOne.polar = _T( "@0,@1" );
HandleOne.position = L"@2,#0";
HandleOne.polar = L"@0,@1";
Handles.push_back( HandleOne );
Handle HandleTwo;
HandleOne.position = _T( "@2,#1" );
HandleOne.polar = _T( "@0,@1" );
HandleOne.position = L"@2,#1";
HandleOne.polar = L"@0,@1";
Handles.push_back( HandleTwo );
}
};
......
......@@ -42,28 +42,28 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0e");
Path = (L"m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0e");
Formulas.push_back(_T("val #0"));
Formulas.push_back(_T("sum width 0 #0"));
Formulas.push_back(_T("sum height 0 #0"));
Formulas.push_back(_T("prod width 1 2"));
Formulas.push_back(_T("prod height 1 2"));
Formulas.push_back(_T("prod #0 1 2"));
Formulas.push_back(_T("prod #0 3 2"));
Formulas.push_back(_T("sum @1 @5 0"));
Formulas.push_back(_T("sum @2 @5 0"));
Formulas.push_back((L"val #0"));
Formulas.push_back((L"sum width 0 #0"));
Formulas.push_back((L"sum height 0 #0"));
Formulas.push_back((L"prod width 1 2"));
Formulas.push_back((L"prod height 1 2"));
Formulas.push_back((L"prod #0 1 2"));
Formulas.push_back((L"prod #0 3 2"));
Formulas.push_back((L"sum @1 @5 0"));
Formulas.push_back((L"sum @2 @5 0"));
AdjustmentValues = _T("2700");
ConnectorLocations = _T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0");
TextBoxRectangle = _T("@0,@0,@1,@2");
AdjustmentValues = (L"2700");
ConnectorLocations = (L"0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0");
TextBoxRectangle = (L"@0,@0,@1,@2");
Handle one;
one.position = _T("#0,topLeft");
one.xrange = _T("0,10800");
one.position = (L"#0,topLeft");
one.xrange = (L"0,10800");
Handles.push_back (one);
Limo = _T("10800,10800");
Limo = (L"10800,10800");
}
};
}
......@@ -42,60 +42,60 @@ namespace DocFileFormat
{
ShapeConcentricFill = false;
Joins = miter;
Path = _T("al10800,10800@0@0@2@14,10800,10800,10800,10800@3@15xe");
Path = (L"al10800,10800@0@0@2@14,10800,10800,10800,10800@3@15xe");
Formulas.push_back(_T("val #1"));
Formulas.push_back(_T("val #0"));
Formulas.push_back(_T("sum 0 0 #0"));
Formulas.push_back(_T("sumangle #0 0 180"));
Formulas.push_back(_T("sumangle #0 0 90"));
Formulas.push_back(_T("prod @4 2 1"));
Formulas.push_back(_T("sumangle #0 90 0"));
Formulas.push_back(_T("prod @6 2 1"));
Formulas.push_back(_T("abs #0"));
Formulas.push_back(_T("sumangle @8 0 90"));
Formulas.push_back(_T("if @9 @7 @5"));
Formulas.push_back(_T("sumangle @10 0 360"));
Formulas.push_back(_T("if @10 @11 @10"));
Formulas.push_back(_T("sumangle @12 0 360"));
Formulas.push_back(_T("if @12 @13 @12"));
Formulas.push_back(_T("sum 0 0 @14"));
Formulas.push_back(_T("val 10800"));
Formulas.push_back(_T("sum 10800 0 #1"));
Formulas.push_back(_T("prod #1 1 2"));
Formulas.push_back(_T("sum @18 5400 0"));
Formulas.push_back(_T("cos @19 #0"));
Formulas.push_back(_T("sin @19 #0"));
Formulas.push_back(_T("sum @20 10800 0"));
Formulas.push_back(_T("sum @21 10800 0"));
Formulas.push_back(_T("sum 10800 0 @20"));
Formulas.push_back(_T("sum #1 10800 0"));
Formulas.push_back(_T("if @9 @17 @25"));
Formulas.push_back(_T("if @9 0 21600"));
Formulas.push_back(_T("cos 10800 #0"));
Formulas.push_back(_T("sin 10800 #0"));
Formulas.push_back(_T("sin #1 #0"));
Formulas.push_back(_T("sum @28 10800 0"));
Formulas.push_back(_T("sum @29 10800 0"));
Formulas.push_back(_T("sum @30 10800 0"));
Formulas.push_back(_T("if @4 0 @31"));
Formulas.push_back(_T("if #0 @34 0"));
Formulas.push_back(_T("if @6 @35 @31"));
Formulas.push_back(_T("sum 21600 0 @36"));
Formulas.push_back(_T("if @4 0 @33"));
Formulas.push_back(_T("if #0 @38 @32"));
Formulas.push_back(_T("if @6 @39 0"));
Formulas.push_back(_T("if @4 @32 21600"));
Formulas.push_back(_T("if @6 @41 @33"));
Formulas.push_back((L"val #1"));
Formulas.push_back((L"val #0"));
Formulas.push_back((L"sum 0 0 #0"));
Formulas.push_back((L"sumangle #0 0 180"));
Formulas.push_back((L"sumangle #0 0 90"));
Formulas.push_back((L"prod @4 2 1"));
Formulas.push_back((L"sumangle #0 90 0"));
Formulas.push_back((L"prod @6 2 1"));
Formulas.push_back((L"abs #0"));
Formulas.push_back((L"sumangle @8 0 90"));
Formulas.push_back((L"if @9 @7 @5"));
Formulas.push_back((L"sumangle @10 0 360"));
Formulas.push_back((L"if @10 @11 @10"));
Formulas.push_back((L"sumangle @12 0 360"));
Formulas.push_back((L"if @12 @13 @12"));
Formulas.push_back((L"sum 0 0 @14"));
Formulas.push_back((L"val 10800"));
Formulas.push_back((L"sum 10800 0 #1"));
Formulas.push_back((L"prod #1 1 2"));
Formulas.push_back((L"sum @18 5400 0"));
Formulas.push_back((L"cos @19 #0"));
Formulas.push_back((L"sin @19 #0"));
Formulas.push_back((L"sum @20 10800 0"));
Formulas.push_back((L"sum @21 10800 0"));
Formulas.push_back((L"sum 10800 0 @20"));
Formulas.push_back((L"sum #1 10800 0"));
Formulas.push_back((L"if @9 @17 @25"));
Formulas.push_back((L"if @9 0 21600"));
Formulas.push_back((L"cos 10800 #0"));
Formulas.push_back((L"sin 10800 #0"));
Formulas.push_back((L"sin #1 #0"));
Formulas.push_back((L"sum @28 10800 0"));
Formulas.push_back((L"sum @29 10800 0"));
Formulas.push_back((L"sum @30 10800 0"));
Formulas.push_back((L"if @4 0 @31"));
Formulas.push_back((L"if #0 @34 0"));
Formulas.push_back((L"if @6 @35 @31"));
Formulas.push_back((L"sum 21600 0 @36"));
Formulas.push_back((L"if @4 0 @33"));
Formulas.push_back((L"if #0 @38 @32"));
Formulas.push_back((L"if @6 @39 0"));
Formulas.push_back((L"if @4 @32 21600"));
Formulas.push_back((L"if @6 @41 @33"));
AdjustmentValues = _T("11796480,5400");
ConnectorLocations = _T("10800,@27;@22,@23;10800,@26;@24,@23");
TextBoxRectangle = _T("@36,@40,@37,@42");
AdjustmentValues = (L"11796480,5400");
ConnectorLocations = (L"10800,@27;@22,@23;10800,@26;@24,@23");
TextBoxRectangle = (L"@36,@40,@37,@42");
Handle one;
one.position = _T("#1,#0");
one.polar = _T("10800,10800");
one.radiusrange = _T("0,10800");
one.position = (L"#1,#0");
one.polar = (L"10800,10800");
one.radiusrange = (L"0,10800");
Handles.push_back (one);
}
};
......
......@@ -45,23 +45,23 @@ namespace DocFileFormat
this->Joins = round;
this->Path = _T( "m10800,qx0@1l0@2qy10800,21600,21600@2l21600@1qy10800,xem0@1qy10800@0,21600@1nfe" );
this->Path = L"m10800,qx0@1l0@2qy10800,21600,21600@2l21600@1qy10800,xem0@1qy10800@0,21600@1nfe";
this->Formulas.push_back( _T( "val #0" ) );
this->Formulas.push_back( _T( "prod #0 1 2" ) );
this->Formulas.push_back( _T( "sum height 0 @1" ) );
this->Formulas.push_back( L"val #0" );
this->Formulas.push_back( L"prod #0 1 2" );
this->Formulas.push_back( L"sum height 0 @1" );
this->AdjustmentValues = _T( "5400" );
this->AdjustmentValues = L"5400";
this->ConnectorLocations = _T( "10800,@0;10800,0;0,10800;10800,21600;21600,10800" );
this->ConnectorLocations = L"10800,@0;10800,0;0,10800;10800,21600;21600,10800";
this->ConnectorAngles = _T( "270,270,180,90,0" );
this->ConnectorAngles = L"270,270,180,90,0";
this->TextBoxRectangle = _T( "0,@0,21600,@2" );
this->TextBoxRectangle = L"0,@0,21600,@2";
Handle HandleOne;
HandleOne.position = _T( "center,#0" );
HandleOne.yrange = _T( "0,10800" );
HandleOne.position = L"center,#0";
HandleOne.yrange = L"0,10800";
this->Handles.push_back( HandleOne );
}
......
......@@ -42,8 +42,8 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T("m,l21600,r,21600e");
//AdjustmentValues = _T("10800");
Path = L"m,l21600,r,21600e";
//AdjustmentValues = L"10800";
Filled = true;
}
......@@ -56,15 +56,15 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T("m,l@0,0@0,21600,21600,21600e");
AdjustmentValues = _T("10800");
Path = L"m,l@0,0@0,21600,21600,21600e";
AdjustmentValues = L"10800";
Filled = true;
Formulas.push_back(_T("val #0"));
Formulas.push_back(L"val #0");
Handle one;
one.position = _T("#0,center");
one.position = L"#0,center";
Handles.push_back (one);
}
};
......@@ -76,15 +76,15 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T("m,l@0,0@0,21600,21600,21600e");
AdjustmentValues = _T("10800");
Path = L"m,l@0,0@0,21600,21600,21600e";
AdjustmentValues = L"10800";
Filled = true;
Formulas.push_back(_T("val #0"));
Formulas.push_back(L"val #0");
Handle one;
one.position = _T("#0,center");
one.position = L"#0,center";
Handles.push_back (one);
}
};
......@@ -96,15 +96,15 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T("m,l@0,0@0,21600,21600,21600e");
AdjustmentValues = _T("10800");
Path = L"m,l@0,0@0,21600,21600,21600e";
AdjustmentValues = L"10800";
Filled = true;
Formulas.push_back(_T("val #0"));
Formulas.push_back(L"val #0");
Handle one;
one.position = _T("#0,center");
one.position = L"#0,center";
Handles.push_back (one);
}
};
......@@ -117,16 +117,16 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T("m,c@0,0@1,5400@1,10800@1,16200@2,21600,21600,21600e");
Path = L"m,c@0,0@1,5400@1,10800@1,16200@2,21600,21600,21600e";
Filled = true;
Formulas.push_back(_T("mid #0 0"));
Formulas.push_back(_T("val #0"));
Formulas.push_back(_T("mid #0 21600"));
Formulas.push_back(L"mid #0 0");
Formulas.push_back(L"val #0");
Formulas.push_back(L"mid #0 21600");
Handle one;
one.position = _T("#0,center");
one.position = L"#0,center";
Handles.push_back (one);
}
};
......@@ -137,16 +137,16 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T("m,c@0,0@1,5400@1,10800@1,16200@2,21600,21600,21600e");
Path = L"m,c@0,0@1,5400@1,10800@1,16200@2,21600,21600,21600e";
Filled = true;
Formulas.push_back(_T("mid #0 0"));
Formulas.push_back(_T("val #0"));
Formulas.push_back(_T("mid #0 21600"));
Formulas.push_back(L"mid #0 0");
Formulas.push_back(L"val #0");
Formulas.push_back(L"mid #0 21600");
Handle one;
one.position = _T("#0,center");
one.position = L"#0,center";
Handles.push_back (one);
}
};
......@@ -157,16 +157,16 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T("m,c@0,0@1,5400@1,10800@1,16200@2,21600,21600,21600e");
Path = L"m,c@0,0@1,5400@1,10800@1,16200@2,21600,21600,21600e";
Filled = true;
Formulas.push_back(_T("mid #0 0"));
Formulas.push_back(_T("val #0"));
Formulas.push_back(_T("mid #0 21600"));
Formulas.push_back(L"mid #0 0");
Formulas.push_back(L"val #0");
Formulas.push_back(L"mid #0 21600");
Handle one;
one.position = _T("#0,center");
one.position = L"#0,center";
Handles.push_back (one);
}
};
......@@ -177,16 +177,16 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T("m,c@0,0@1,5400@1,10800@1,16200@2,21600,21600,21600e");
Path = L"m,c@0,0@1,5400@1,10800@1,16200@2,21600,21600,21600e";
Filled = true;
Formulas.push_back(_T("mid #0 0"));
Formulas.push_back(_T("val #0"));
Formulas.push_back(_T("mid #0 21600"));
Formulas.push_back(L"mid #0 0");
Formulas.push_back(L"val #0");
Formulas.push_back(L"mid #0 21600");
Handle one;
one.position = _T("#0,center");
one.position = L"#0,center";
Handles.push_back (one);
}
};
......
......@@ -45,31 +45,31 @@ namespace DocFileFormat
this->Joins = miter;
this->Path = _T( "m@0,l0@0,,21600@1,21600,21600@2,21600,xem0@0nfl@1@0,21600,em@1@0nfl@1,21600e" );
this->Path = L"m@0,l0@0,,21600@1,21600,21600@2,21600,xem0@0nfl@1@0,21600,em@1@0nfl@1,21600e";
this->Formulas.push_back( _T( "val #0" ) );
this->Formulas.push_back( _T( "sum width 0 #0" ) );
this->Formulas.push_back( _T( "sum height 0 #0" ) );
this->Formulas.push_back( _T( "mid height #0" ) );
this->Formulas.push_back( _T( "prod @1 1 2" ) );
this->Formulas.push_back( _T( "prod @2 1 2" ) );
this->Formulas.push_back( _T( "mid width #0" ) );
this->Formulas.push_back( L"val #0");
this->Formulas.push_back( L"sum width 0 #0");
this->Formulas.push_back( L"sum height 0 #0");
this->Formulas.push_back( L"mid height #0");
this->Formulas.push_back( L"prod @1 1 2");
this->Formulas.push_back( L"prod @2 1 2");
this->Formulas.push_back( L"mid width #0");
this->AdjustmentValues = _T( "5400" );
this->AdjustmentValues = L"5400";
this->ConnectorLocations = _T( "@6,0;@4,@0;0,@3;@4,21600;@1,@3;21600,@5" );
this->ConnectorLocations = L"@6,0;@4,@0;0,@3;@4,21600;@1,@3;21600,@5";
this->ConnectorAngles = _T( "270,270,180,90,0,0" );
this->ConnectorAngles = L"270,270,180,90,0,0";
this->TextBoxRectangle = _T( "0,@0,@1,21600" );
this->TextBoxRectangle = L"0,@0,@1,21600";
Handle HandleOne;
HandleOne.position = _T( "topLeft,#0" );
HandleOne.switchHandle = _T( "true" );
HandleOne.yrange = _T( "0,21600" );
HandleOne.position = L"topLeft,#0";
HandleOne.switchHandle = L"true";
HandleOne.yrange = L"0,21600";
this->Handles.push_back( HandleOne );
this->Limo = _T( "10800,10800" );
this->Limo = L"10800,10800";
}
virtual ~CubeType()
......
......@@ -45,11 +45,11 @@ namespace DocFileFormat
this->Joins = miter;
this->Path = _T( "m10800,l,10800,10800,21600,21600,10800xe" );
this->Path = L"m10800,l,10800,10800,21600,21600,10800xe";
this->ConnectorLocations = _T( "Rectangle" );
this->ConnectorLocations = L"Rectangle";
this->TextBoxRectangle = _T( "5400,5400,16200,16200" );
this->TextBoxRectangle = L"5400,5400,16200,16200";
}
virtual ~DiamondType()
......
......@@ -42,22 +42,22 @@ namespace DocFileFormat
{
ShapeConcentricFill = false;
Joins = round;
Path = _T("m,10800qy10800,,21600,10800,10800,21600,,10800xm@0,10800qy10800@2@1,10800,10800@0@0,10800xe");
Path = L"m,10800qy10800,,21600,10800,10800,21600,,10800xm@0,10800qy10800@2@1,10800,10800@0@0,10800xe";
Formulas.push_back(_T("val #0" ) );
Formulas.push_back(_T("sum width 0 #0" ) );
Formulas.push_back(_T("sum height 0 #0" ) );
Formulas.push_back(_T("prod @0 2929 10000" ) );
Formulas.push_back(_T("sum width 0 @3" ) );
Formulas.push_back(_T("sum height 0 @3" ) );
Formulas.push_back(L"val #0" ) ;
Formulas.push_back(L"sum width 0 #0" ) ;
Formulas.push_back(L"sum height 0 #0" );
Formulas.push_back(L"prod @0 2929 10000" );
Formulas.push_back(L"sum width 0 @3" ) ;
Formulas.push_back(L"sum height 0 @3" );
AdjustmentValues = _T("5400");
ConnectorLocations = _T("10800,0;3163,3163;0,10800;3163,18437;10800,21600;18437,18437;21600,10800;18437,3163");
TextBoxRectangle = _T("3163,3163,18437,18437");
AdjustmentValues = L"5400";
ConnectorLocations = L"10800,0;3163,3163;0,10800;3163,18437;10800,21600;18437,18437;21600,10800;18437,3163";
TextBoxRectangle = L"3163,3163,18437,18437";
Handle HandleOne;
HandleOne.position = _T("#0,center");
HandleOne.xrange = _T("0,10800");
HandleOne.position = L"#0,center";
HandleOne.xrange = L"0,10800";
Handles.push_back(HandleOne);
}
};
......
......@@ -42,12 +42,12 @@ namespace DocFileFormat
{
ShapeConcentricFill = true;
Joins = miter;
Path = _T( "m10860,2187c10451,1746,9529,1018,9015,730,7865,152,6685,,5415,,4175,152,2995,575,1967,1305,1150,2187,575,3222,242,4220,,5410,242,6560,575,7597l10860,21600,20995,7597v485,-1037,605,-2187,485,-3377c21115,3222,20420,2187,19632,1305,18575,575,17425,152,16275,,15005,,13735,152,12705,730v-529,288,-1451,1016,-1845,1457xe" );
Path = (L"m10860,2187c10451,1746,9529,1018,9015,730,7865,152,6685,,5415,,4175,152,2995,575,1967,1305,1150,2187,575,3222,242,4220,,5410,242,6560,575,7597l10860,21600,20995,7597v485,-1037,605,-2187,485,-3377c21115,3222,20420,2187,19632,1305,18575,575,17425,152,16275,,15005,,13735,152,12705,730v-529,288,-1451,1016,-1845,1457xe" );
AdjustmentValues = _T( "21600" );
ConnectorLocations = _T( "10860,2187;2928,10800;10860,21600;18672,10800" );
ConnectorAngles = _T( "270,180,90,0" );
TextBoxRectangle = _T( "5037,2277,16557,13677" );
AdjustmentValues = (L"21600" );
ConnectorLocations = (L"10860,2187;2928,10800;10860,21600;18672,10800" );
ConnectorAngles = (L"270,180,90,0" );
TextBoxRectangle = (L"5037,2277,16557,13677" );
}
};
}
......@@ -44,21 +44,21 @@ namespace DocFileFormat
this->ShapeConcentricFill = true;
this->Joins = miter;
this->Path = _T( "m@0,l,21600r21600,xe" );
this->Path = L"m@0,l,21600r21600,xe" ;
this->Formulas.push_back( _T( "val #0" ) );
this->Formulas.push_back( _T( "prod #0 1 2" ) );
this->Formulas.push_back( _T( "sum @1 10800 0") );
this->Formulas.push_back( L"val #0" );
this->Formulas.push_back( L"prod #0 1 2" );
this->Formulas.push_back( L"sum @1 10800 0");
this->AdjustmentValues = _T( "10800" );
this->AdjustmentValues = L"10800" ;
this->ConnectorLocations = _T( "@0,0;@1,10800;0,21600;10800,21600;21600,21600;@2,10800" );
this->ConnectorLocations = L"@0,0;@1,10800;0,21600;10800,21600;21600,21600;@2,10800";
this->TextBoxRectangle = _T( "0,10800,10800,18000;5400,10800,16200,18000;10800,10800,21600,18000;0,7200,7200,21600;7200,7200,14400,21600;14400,7200,21600,21600" );
this->TextBoxRectangle = L"0,10800,10800,18000;5400,10800,16200,18000;10800,10800,21600,18000;0,7200,7200,21600;7200,7200,14400,21600;14400,7200,21600,21600";
Handle HandleOne;
HandleOne.position = _T( "#0,topLeft" );
HandleOne.xrange = _T( "0,21600" );
HandleOne.position = L"#0,topLeft";
HandleOne.xrange = L"0,21600";
this->Handles.push_back( HandleOne );
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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