Commit 5f0620ed authored by ElenaSubbotina's avatar ElenaSubbotina

x2t - delete unused files

parent 150ff1fa
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <string>
#include <map>
#include <string>
#include <algorithm>
#include <math.h>
#include "../../Common/DocxFormat/Source/Common/Color.h"
//#include "../../Common/DocxFormat/Source/DocxFormat/Logic/ColorsTable.h"
#include "Constants.h"
#include "OfficeArt/Common.h"
#include "OfficeArt/Enumerations.h"
#define DPI_DEFAULT 72.0
namespace DOCX
{
class CPointF
{
public:
CPointF () : m_X (0), m_Y (0), m_TX (0), m_TY (0), m_fCorrection (65536.0)
{
}
CPointF (unsigned int dX, unsigned int dY) : m_X (dX), m_Y (dY), m_TX (0), m_TY (0), m_fCorrection (65536.0)
{
}
CPointF (const std::string& value) : m_X (0), m_Y (0), m_TX (0), m_TY (0), m_fCorrection (65536.0)
{
if (0 == value.length())
return;
std::string strText = value;
strText.erase(std::remove(strText.begin(), strText.end(), L' '), strText.end());
double fT = 1.0; //
// MM
size_t from = strText.find("mm");
if (std::string::npos != from)
{
strText.erase(std::remove(strText.begin(), strText.end(), L'm'), strText.end());
m_fCorrection = 36000;
fT = (DPI_DEFAULT * 20.0) / 25.399931;
}
// PT
from = strText.find("pt");
if (std::string::npos != from)
{
strText.erase(std::remove(strText.begin(), strText.end(), L'p'), strText.end());
strText.erase(std::remove(strText.begin(), strText.end(), L't'), strText.end());
m_fCorrection = 12700.0;
fT = 20.0;
}
// DEF
from = strText.find(',');
if (std::string::npos != from)
{
if (0 == from)
{
if (1 == (int)strText.length())
return;
double dX = atof (strText.c_str());
strText = strText.substr(from + 1, ((int)strText.length() - 1) - from);
m_Y = (unsigned int)(dX * m_fCorrection);
m_TX = (int)(dX * fT);
return;
}
double dX = atof (strText.substr(0, from).c_str());
m_X = FormatNum (dX, m_fCorrection);
m_TX = (int)(dX * fT);
strText = strText.substr(from + 1, ((int)strText.length() - 1) - from);
if (0 == (int)strText.length())
return;
double dY = atof (strText.c_str());
m_Y = FormatNum (strText, m_fCorrection);
m_TY = (int)(dY * fT);
return;
}
if (strText.length())
{
double dX = atof (strText.c_str());
m_X = (unsigned int)(dX * m_fCorrection);
m_TX = (int)(dX * fT);
}
}
inline unsigned int X () const
{
return m_X;
}
inline unsigned int Y () const
{
return m_Y;
}
inline int GetTX() const
{
return m_TX;
}
inline int GetTY() const
{
return m_TY;
}
private:
inline unsigned int ToFixed(double dNumber) const
{
if (dNumber < 0.0)
{
return (unsigned int)(((long)dNumber - dNumber) * 65536.0) | (0xffff << 16);
}
if (dNumber > 0.0)
{
return (unsigned int)((dNumber - (long)dNumber) * 65536.0);
}
return 0;
}
inline unsigned int FormatNum (const std::string& strVal, double dMul) const
{
return FormatNum (atof (strVal.c_str()), dMul);
}
inline unsigned int FormatNum (double dVal, double dMul) const
{
dVal = dVal * dMul;
if (dVal > 0.0)
dVal += 0.5;
if (dVal < 0.0)
dVal -= 0.5;
return (unsigned int)dVal;
}
private:
unsigned int m_X;
unsigned int m_Y;
double m_fCorrection;
int m_TX;
int m_TY;
};
class CFPoint
{
public:
CFPoint () : m_dX(0.0), m_dY(0.0)
{
}
CFPoint (const std::string& value, double dX, double dY) : m_dX(dX), m_dY(dY)
{
if (value.length())
{
std::string strText = value;
strText.erase(std::remove(strText.begin(), strText.end(), L' '), strText.end());
if (strText.length())
{
size_t find = strText.find(',');
if (std::string::npos != find)
{
m_dX = atof ((strText.substr(0, find)).c_str());
strText = strText.substr(find + 1, ((int)strText.length() - 1) - find);
if (strText.length())
m_dY = atof (strText.c_str());
}
else
{
m_dX = atof (strText.c_str());
}
}
}
}
inline double X()
{
return m_dX;
}
inline double Y()
{
return m_dY;
}
private:
double m_dX;
double m_dY;
};
class CMatrixF
{
public:
CMatrixF () : m_XToX (0), m_XToY(0), m_YToX(0), m_YToY(0), m_PX(0), m_PY(0)
{
}
CMatrixF (const std::string& str) : m_XToX (0), m_XToY(0), m_YToX(0), m_YToY(0), m_PX(0), m_PY(0)
{
if (0 == str.length())
return;
std::string strText = str;
strText.erase(std::remove(strText.begin(), strText.end(), L' '), strText.end());
//
size_t from = strText.find(',');
if (std::string::npos == from)
return;
if (0 != from)
{
std::string number = strText.substr(0, from);
if (std::string::npos != number.find('f'))
m_XToX = atoi (number.substr(0,number.length()-1).c_str());
else
m_XToX = ToFixed (atof (number.c_str()) );
if (std::string::npos == from)
return;
}
strText = strText.substr(from + 1, strText.length() - 1 - from);
//
from = strText.find(',');
if (0 != from)
{
std::string number = strText.substr(0, from);
if (std::string::npos != number.find('f'))
m_YToX = atoi (number.substr(0,number.length()-1).c_str());
else
m_YToX = ToFixed (atof (number.c_str()) );
if (std::string::npos == from)
return;
}
strText = strText.substr(from + 1, strText.length() - 1 - from);
//
from = strText.find(',');
if (0 != from)
{
std::string number = strText.substr(0, from);
if (std::string::npos != number.find('f'))
m_XToY = atoi (number.substr(0,number.length()-1).c_str());
else
m_XToY = ToFixed (atof (number.c_str()));
if (std::string::npos == from)
return;
}
strText = strText.substr(from + 1, strText.length() - 1 - from);
//
from = strText.find(',');
if (0 != from)
{
std::string number = strText.substr(0, from);
if (std::string::npos != number.find('f'))
m_YToY = atoi (number.substr(0,number.length()-1).c_str());
else
m_YToY = ToFixed (atof (number.c_str()));
if (std::string::npos == from)
return;
}
strText = strText.substr(from + 1, strText.length() - 1 - from);
//
from = strText.find(',');
if (0 != from)
{
std::string number = strText.substr(0, from);
if (std::string::npos != number.find('f'))
m_PX = atoi (number.substr(0,number.length()-1).c_str());
else
m_PX = ToPerspective (atof (number.c_str()));
if (std::string::npos == from)
return;
}
strText = strText.substr(from + 1, strText.length() - 1 - from);
//
from = strText.find(',');
if (0 != from)
{
std::string number = strText.substr(0, from);
double df = atof (number.c_str());
if (std::string::npos != number.find('f'))
m_PY = atoi (number.substr(0,number.length()-1).c_str());
else
m_PY = ToPerspective (atof (number.c_str()));
}
}
inline unsigned int XToX ()
{
return m_XToX;
}
inline unsigned int XToY ()
{
return m_XToY;
}
inline unsigned int YToX ()
{
return m_YToX;
}
inline unsigned int YToY ()
{
return m_YToY;
}
inline unsigned int PX ()
{
return m_PX;
}
inline unsigned int PY ()
{
return m_PY;
}
private:
unsigned int ToFixed(double dNumber)
{
if (dNumber < 0.0)
{
return (unsigned int)(((long)dNumber - dNumber) * 65536.0) | (0xffff << 16);
}
if (dNumber > 0.0)
{
//return (unsigned int)((dNumber - (long)dNumber) * 65536.0);
return (unsigned int)(dNumber * 65536.0);
}
return 0;
}
unsigned int ToPerspective(double dNumber)
{
static const double WEIGHT = 256.0; // если сохраням матрицу как это делает Office 2010 (через свойства Shadow), то вес по умолчанию 0x00000100
if (dNumber < 0.0)
{
return 0xffffffff - (unsigned int)((-1.0 * dNumber * WEIGHT * 65536.0));
}
if (dNumber > 0.0)
{
return (unsigned int)(dNumber * WEIGHT * 65536.0);
}
return 0;
}
private:
unsigned m_XToX;
unsigned m_XToY;
unsigned m_YToX;
unsigned m_YToY;
unsigned m_PX;
unsigned m_PY;
};
class CEmu
{
public:
CEmu() : m_nVal(0)
{
}
CEmu(const std::string& str) : m_nVal(0)
{
if (0 == str.length())
return;
std::string strText = str;
int nCorrection = 1;
strText.erase(std::remove(strText.begin(), strText.end(), L' '), strText.end());
size_t from = strText.find("mm");
if (std::string::npos != from)
{
strText.erase(std::remove(strText.begin(), strText.end(), L'm'), strText.end());
nCorrection = 36000;
}
from = strText.find("pt");
if (std::string::npos != from)
{
strText.erase(std::remove(strText.begin(), strText.end(), L'p'), strText.end());
strText.erase(std::remove(strText.begin(), strText.end(), L't'), strText.end());
nCorrection = 12700;
}
m_nVal = atoi(str.c_str()) * nCorrection;
}
inline int Get()
{
return m_nVal;
}
private:
int m_nVal;
};
}
namespace DOCXDOCUTILS
{
inline unsigned char ColorToIco (const OOX::Logic::Color& oColor)
{
OOX::Logic::ColorsTable colorsTable;
std::string colorName = colorsTable.fromColor(oColor);
if (std::string("auto") == colorName)
colorName = std::string ("000000");
std::map<std::string, unsigned char> colorsMap;
colorsMap.insert( std::pair<std::string, unsigned char>( "auto", 0x00 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "black", 0x01 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "blue", 0x02 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "cyan", 0x03 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "green", 0x04 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "magenta", 0x05 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "red", 0x06 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "yellow", 0x07 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "white", 0x08 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "darkBlue", 0x09 ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "darkCyan", 0x0A ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "darkGreen", 0x0B ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "darkMagenta", 0x0C ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "darkRed", 0x0D ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "darkYellow", 0x0E ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "darkGray", 0x0F ) );
colorsMap.insert( std::pair<std::string, unsigned char>( "lightGray", 0x10 ) );
return colorsMap[colorName];
}
inline unsigned char AlignFromString (const std::wstring& align)
{
//!!!TODO!!!
if (align == std::wstring(L"left"))
return 0;
else if (align == std::wstring(L"center"))
return 1;
else if (align == std::wstring(L"right"))
return 2;
else if (align == std::wstring(L"both"))
return 3;
return 0;
}
inline short StiToIstd (short nDef)
{
if (nDef >= 0 && nDef <= 9)
return nDef;
if (65 == nDef)
return 10;
if (105 == nDef)
return 11;
if (107 == nDef)
return 12;
return -1;
}
inline static std::vector<int> GetValues(const std::string& strValues)
{
std::vector<int> values;
if (strValues.empty())
return values;
int number = 0;
std::string str = strValues;
while(str.length())
{
size_t separator = str.find (',');
if (std::string::npos != separator)
{
std::string snumber = str.substr(0, separator);
if (std::string::npos != snumber.find('f'))
number = (int) (21600.0 * (atof (snumber.substr(0,snumber.length()-1).c_str()) / 65536.0)); // ????
else
number = atoi (snumber.c_str());
values.push_back (number);
str = str.substr(separator + 1, str.length() - separator - 1);
}
else
{
if (std::string::npos != str.find('f'))
number = atoi (str.substr(0,str.length()-1).c_str());
else
number = atoi (str.c_str());
values.push_back (number);
break;
}
}
return values;
}
}
namespace DOCXDOCUTILS
{
inline unsigned int HexString2UInt (const std::string& value)
{
unsigned int summa = 0;
for (int i = 0; i != value.size(); ++i)
summa += HexChar2Int(value[i]) << (4 * (value.size() - i - 1));
return summa;
}
inline unsigned int HexString2UInt2X (const std::string& value)
{
unsigned int summa = 0;
for (int i = 0; i != value.size(); ++i)
{
summa += HexChar2Int(value[i]) << (4 * (value.size() - i - 1));
}
return summa;
}
inline unsigned int HexChar2Int (const char value)
{
if (value >= '0' && value <= '9')
return value - '0';
if (value >= 'a' && value <= 'f')
return 10 + value - 'a';
if (value >= 'A' && value <= 'F')
return 10 + value - 'A';
return 0;
}
inline unsigned int RGBToBGR (const unsigned int& nColor)
{
return ((nColor>>16) & 0xFF) | (0xFF00 & nColor) | (0xFF0000 & (nColor<<16));
}
inline bool GetFillColor(const std::string& value, unsigned int& nColor)
{
nColor = 0;
if (value.length() >= 6)
{
int from = value.find(' ');
if (-1 == from)
{
if ('#' == value[0])
{
nColor = RGBToBGR(HexString2UInt(value.substr(1,value.length()-1)));
return TRUE;
}
nColor = RGBToBGR(HexString2UInt(value));
return TRUE;
}
else
{
if ('#' == value[0])
{
nColor = RGBToBGR(HexString2UInt(value.substr(1,from-1)));
return TRUE;
}
nColor = RGBToBGR(HexString2UInt(value));
return TRUE;
}
}
else
{
if ('#' == value[0] && 4 == value.length()) // #cfc -> CCFFCC
{
nColor = 0;
nColor += HexChar2Int(value[1]);
nColor += HexChar2Int(value[1]) << 4;
nColor += HexChar2Int(value[2]) << 8;
nColor += HexChar2Int(value[2]) << 12;
nColor += HexChar2Int(value[3]) << 16;
nColor += HexChar2Int(value[3]) << 20;
return TRUE;
}
}
return FALSE;
}
inline unsigned int GetFixePointValue (const std::string& value)
{
if (value.length() > 1)
{
std::string strText = value;
if ('f' == strText[strText.length()-1] )
{
std::string number = strText.substr(0,strText.length()-1);
if (number.length ())
return atoi (number.c_str());
}
else
{
return (unsigned int)(atof (strText.c_str()) * 65536.0);
}
}
return 0;
}
inline static int GetArcValue(const std::string& strValue)
{
if (0==strValue.length())
return 0;
if (std::string::npos != strValue.find('f'))
{
return (int) (21600.0 * (atof (strValue.substr(0,strValue.length()-1).c_str()) / 65536.0)); // ????
}
else
{
return (int)(21600.0 * atof (strValue.c_str()));
}
return 0;
}
inline static unsigned int ToFixed2(double dNumber)
{
if (dNumber < 0.0)
{
return (unsigned int)(((long)dNumber - dNumber) * 65536.0) | (0xffff << 16);
}
if (dNumber > 0.0)
{
return (unsigned int)((dNumber - (long)dNumber) * 65536.0);
}
return 0;
}
inline static double GetAngleValue (const std::string& strValue)
{
size_t from = strValue.find("fd");
if (std::string::npos != from)
{
std::string strText = strValue;
strText.erase(std::remove(strText.begin(), strText.end(), L'f'), strText.end());
strText.erase(std::remove(strText.begin(), strText.end(), L'd'), strText.end());
return atof(strText.c_str()) / 65536.0;
}
return atof(strValue.c_str());
}
}
namespace DOCXDOCUTILS // fonts
{
inline ASCDocFileFormat::Constants::FontFamilyType FontFamilyFromString (const std::wstring& sFontFamily)
{
if (sFontFamily == std::wstring(L"auto"))
{
return ASCDocFileFormat::Constants::fontFamilyTypeUnspecified;
}
else if (sFontFamily == std::wstring(L"roman"))
{
return ASCDocFileFormat::Constants::fontFamilyTypeRomanSerif;
}
else if (sFontFamily == std::wstring(L"swiss"))
{
return ASCDocFileFormat::Constants::fontFamilyTypeSwissSansSerif;
}
else if (sFontFamily == std::wstring(L"modern"))
{
return ASCDocFileFormat::Constants::fontFamilyTypeModernMonospace;
}
else if (sFontFamily == std::wstring(L"script"))
{
return ASCDocFileFormat::Constants::fontFamilyTypeScriptCursive;
}
else if (sFontFamily == std::wstring(L"decorative"))
{
return ASCDocFileFormat::Constants::fontFamilyTypeDecorativeFantasy;
}
return ASCDocFileFormat::Constants::fontFamilyTypeUnspecified;
}
inline ASCDocFileFormat::Constants::CharacterPitch FontPitchFromString (const std::wstring& sPitch)
{
if (sPitch == std::wstring(L"variable"))
return ASCDocFileFormat::Constants::characterPitchVariable;
else if (sPitch == std::wstring(L"fixed"))
return ASCDocFileFormat::Constants::characterPitchFixed;
return ASCDocFileFormat::Constants::characterPitchDefault;
}
inline unsigned char FontCharsetFromString (const std::wstring& Charset)
{
if (Charset == std::wstring(L"CC"))
return RUSSIAN_CHARSET;
else if (Charset == std::wstring(L"00"))
return ANSI_CHARSET;
else if (Charset == std::wstring(L"02"))
return SYMBOL_CHARSET;
else if (Charset == std::wstring(L"80"))
return SHIFTJIS_CHARSET;
else if (Charset == std::wstring(L"86"))
return GB2312_CHARSET;
return DEFAULT_CHARSET;
}
}
namespace DOCXDOCUTILS
{
inline unsigned short GetStyleWrapType (const std::string& type)
{
if (type == std::string("none"))
return 3;
if (type == std::string("topAndBottom"))
return 1;
if (type == std::string("square"))
return 2;
if (type == std::string("tight"))
return 4;
if (type == std::string("through"))
return 5;
return 0;
}
}
namespace DOCXDOCUTILS
{
inline bool GetFlipH (const std::string& strFlip)
{
if (strFlip.length())
{
if ((std::string::npos != strFlip.find('x')) || (std::string::npos != strFlip.find('1')))
return true;
}
return false;
}
inline bool GetFlipV (const std::string& strFlip)
{
if (strFlip.length())
{
if ((std::string::npos != strFlip.find('y')) || (std::string::npos != strFlip.find('1')))
return true;
}
return false;
}
}
namespace DOCXDOCUTILS
{
inline std::wstring GetInstrText_FieldCode(std::wstring InstrText, std::wstring& Source)
{
if (0 == InstrText.length())
return std::wstring(L"");
std::wstring instrText = InstrText;
instrText.erase(std::remove(instrText.begin(), instrText.end(), L' '), instrText.end());
if (L'H' == instrText[0])
{
std::wstring::size_type pos = InstrText.find(L"HYPERLINK");
if (std::wstring::npos != pos)
{
Source = InstrText.substr (pos + std::wstring(L"HYPERLINK").length(),InstrText.length() - pos + std::wstring(L"HYPERLINK").length() - 1);
return std::wstring(L"HYPERLINK");
}
}
if (L'P' == instrText[0])
{
if (std::wstring::npos != instrText.find(L"PAGEREF"))
return std::wstring(L"PAGEREF");
if (std::wstring::npos != instrText.find(L"PAGE"))
return std::wstring(L"PAGE");
}
if (L'T' == instrText[0])
{
if (std::wstring::npos != instrText.find(L"TOC"))
return std::wstring(L"TOC");
}
if (L'A' == instrText[0])
{
if (std::wstring::npos != instrText.find(L"ADDRESSBLOCK"))
return std::wstring(L"ADDRESSBLOCK");
}
if (L'G' == instrText[0])
{
if (std::wstring::npos != instrText.find(L"GREETINGLINE"))
return std::wstring(L"GREETINGLINE");
}
if (L'M' == instrText[0])
{
if (std::wstring::npos != instrText.find(L"MERGEFIELD"))
return std::wstring(L"MERGEFIELD");
}
return std::wstring(L"");
}
}
namespace DOCX
{
class CSColor
{
public:
CSColor () : m_nColor (0)
{
}
inline bool Init (const std::string& Color)
{
if (Color.length() <= 0)
return FALSE;
CString color = CString(Color.c_str());
wchar_t wChar = color.GetAt(0);
switch (wChar)
{
case L'a':
if ( color.Find( _T("aliceBlue") ) >= 0) { m_nColor = RGB2(240,248,255); return TRUE; }
else if ( color.Find( _T("antiqueWhite") ) >= 0) { m_nColor = RGB2(250,235,215); return TRUE; }
else if ( color.Find( _T("aqua") ) >= 0) { m_nColor = RGB2(0,255,255); return TRUE; }
else if ( color.Find( _T("aquamarine") ) >= 0) { m_nColor = RGB2(127,255,212); return TRUE; }
else if ( color.Find( _T("azure") ) >= 0) { m_nColor = RGB2(240,255,255); return TRUE; }
break;
case L'b':
if ( color.Find( _T("beige") ) >= 0) { m_nColor = RGB2(245,245,220); return TRUE; }
else if ( color.Find( _T("bisque") ) >= 0) { m_nColor = RGB2(255,228,196); return TRUE; }
else if ( color.Find( _T("black") ) >= 0) { m_nColor = RGB2(0,0,0); return TRUE; }
else if ( color.Find( _T("blanchedAlmond") ) >= 0) { m_nColor = RGB2(255,235,205); return TRUE; }
else if ( color.Find( _T("blue") ) >= 0) { m_nColor = RGB2(0,0,255); return TRUE; }
else if ( color.Find( _T("blueViolet") ) >= 0) { m_nColor = RGB2(138,43,226); return TRUE; }
else if ( color.Find( _T("brown") ) >= 0) { m_nColor = RGB2(165,42,42); return TRUE; }
else if ( color.Find( _T("burlyWood") ) >= 0) { m_nColor = RGB2(222,184,135); return TRUE; }
break;
case L'c':
if ( color.Find( _T("cadetBlue") ) >= 0) { m_nColor = RGB2(95,158,160); return TRUE; }
else if ( color.Find( _T("chartreuse") ) >= 0) { m_nColor = RGB2(127,255,0); return TRUE; }
else if ( color.Find( _T("chocolate") ) >= 0) { m_nColor = RGB2(210,105,30); return TRUE; }
else if ( color.Find( _T("coral") ) >= 0) { m_nColor = RGB2(255,127,80); return TRUE; }
else if ( color.Find( _T("cornflowerBlue") ) >= 0) { m_nColor = RGB2(100,149,237); return TRUE; }
else if ( color.Find( _T("cornsilk") ) >= 0) { m_nColor = RGB2(255,248,220); return TRUE; }
else if ( color.Find( _T("crimson") ) >= 0) { m_nColor = RGB2(220,20,60); return TRUE; }
else if ( color.Find( _T("cyan") ) >= 0) { m_nColor = RGB2(0,255,255); return TRUE; }
break;
case L'd':
if ( color.Find( _T("darkBlue") ) >= 0) { m_nColor = RGB2(0,0,139); return TRUE; }
else if ( color.Find( _T("darkCyan") ) >= 0) { m_nColor = RGB2(0,139,139); return TRUE; }
else if ( color.Find( _T("darkGoldenrod") ) >= 0) { m_nColor = RGB2(184,134,11); return TRUE; }
else if ( color.Find( _T("darkGray") ) >= 0) { m_nColor = RGB2(169,169,169); return TRUE; }
else if ( color.Find( _T("darkGreen") ) >= 0) { m_nColor = RGB2(0,100,0); return TRUE; }
else if ( color.Find( _T("darkGrey") ) >= 0) { m_nColor = RGB2(169,169,169); return TRUE; }
else if ( color.Find( _T("darkKhaki") ) >= 0) { m_nColor = RGB2(189,183,107); return TRUE; }
else if ( color.Find( _T("darkMagenta") ) >= 0) { m_nColor = RGB2(139,0,139); return TRUE; }
else if ( color.Find( _T("darkOliveGreen") ) >= 0) { m_nColor = RGB2(85,107,47); return TRUE; }
else if ( color.Find( _T("darkOrange") ) >= 0) { m_nColor = RGB2(255,140,0); return TRUE; }
else if ( color.Find( _T("darkOrchid") ) >= 0) { m_nColor = RGB2(153,50,204); return TRUE; }
else if ( color.Find( _T("darkRed") ) >= 0) { m_nColor = RGB2(139,0,0); return TRUE; }
else if ( color.Find( _T("darkSalmon") ) >= 0) { m_nColor = RGB2(233,150,122); return TRUE; }
else if ( color.Find( _T("darkSeaGreen") ) >= 0) { m_nColor = RGB2(143,188,143); return TRUE; }
else if ( color.Find( _T("darkSlateBlue") ) >= 0) { m_nColor = RGB2(72,61,139); return TRUE; }
else if ( color.Find( _T("darkSlateGray") ) >= 0) { m_nColor = RGB2(47,79,79); return TRUE; }
else if ( color.Find( _T("darkSlateGrey") ) >= 0) { m_nColor = RGB2(47,79,79); return TRUE; }
else if ( color.Find( _T("darkTurquoise") ) >= 0) { m_nColor = RGB2(0,206,209); return TRUE; }
else if ( color.Find( _T("darkViolet") ) >= 0) { m_nColor = RGB2(148,0,211); return TRUE; }
else if ( color.Find( _T("deepPink") ) >= 0) { m_nColor = RGB2(255,20,147); return TRUE; }
else if ( color.Find( _T("deepSkyBlue") ) >= 0) { m_nColor = RGB2(0,191,255); return TRUE; }
else if ( color.Find( _T("dimGray") ) >= 0) { m_nColor = RGB2(105,105,105); return TRUE; }
else if ( color.Find( _T("dimGrey") ) >= 0) { m_nColor = RGB2(105,105,105); return TRUE; }
else if ( color.Find( _T("dkBlue") ) >= 0) { m_nColor = RGB2(0,0,139); return TRUE; }
else if ( color.Find( _T("dkCyan") ) >= 0) { m_nColor = RGB2(0,139,139); return TRUE; }
else if ( color.Find( _T("dkGoldenrod") ) >= 0) { m_nColor = RGB2(184,134,11); return TRUE; }
else if ( color.Find( _T("dkGray") ) >= 0) { m_nColor = RGB2(169,169,169); return TRUE; }
else if ( color.Find( _T("dkGreen") ) >= 0) { m_nColor = RGB2(0,100,0); return TRUE; }
else if ( color.Find( _T("dkGrey") ) >= 0) { m_nColor = RGB2(169,169,169); return TRUE; }
else if ( color.Find( _T("dkKhaki") ) >= 0) { m_nColor = RGB2(189,183,107); return TRUE; }
else if ( color.Find( _T("dkMagenta") ) >= 0) { m_nColor = RGB2(139,0,139); return TRUE; }
else if ( color.Find( _T("dkOliveGreen") ) >= 0) { m_nColor = RGB2(85,107,47); return TRUE; }
else if ( color.Find( _T("dkOrange") ) >= 0) { m_nColor = RGB2(255,140,0); return TRUE; }
else if ( color.Find( _T("dkOrchid") ) >= 0) { m_nColor = RGB2(153,50,204); return TRUE; }
else if ( color.Find( _T("dkRed") ) >= 0) { m_nColor = RGB2(139,0,0); return TRUE; }
else if ( color.Find( _T("dkSalmon") ) >= 0) { m_nColor = RGB2(233,150,122); return TRUE; }
else if ( color.Find( _T("dkSeaGreen") ) >= 0) { m_nColor = RGB2(143,188,139); return TRUE; }
else if ( color.Find( _T("dkSlateBlue") ) >= 0) { m_nColor = RGB2(72,61,139); return TRUE; }
else if ( color.Find( _T("dkSlateGray") ) >= 0) { m_nColor = RGB2(47,79,79); return TRUE; }
else if ( color.Find( _T("dkSlateGrey") ) >= 0) { m_nColor = RGB2(47,79,79); return TRUE; }
else if ( color.Find( _T("dkTurquoise") ) >= 0) { m_nColor = RGB2(0,206,209); return TRUE; }
else if ( color.Find( _T("dkViolet") ) >= 0) { m_nColor = RGB2(148,0,211); return TRUE; }
else if ( color.Find( _T("dodgerBlue") ) >= 0) { m_nColor = RGB2(30,144,255); return TRUE; }
break;
case L'f':
if ( color.Find( _T("firebrick") ) >= 0) { m_nColor = RGB2(178,34,34); return TRUE; }
else if ( color.Find( _T("floralWhite") ) >= 0) { m_nColor = RGB2(255,250,240); return TRUE; }
else if ( color.Find( _T("forestGreen") ) >= 0) { m_nColor = RGB2(34,139,34); return TRUE; }
else if ( color.Find( _T("fuchsia") ) >= 0) { m_nColor = RGB2(255,0,255); return TRUE; }
break;
case L'g':
if ( color.Find( _T("gainsboro") ) >= 0) { m_nColor = RGB2(220,220,220); return TRUE; }
else if ( color.Find( _T("ghostWhite") ) >= 0) { m_nColor = RGB2(248,248,255); return TRUE; }
else if ( color.Find( _T("gold") ) >= 0) { m_nColor = RGB2(255,215,0); return TRUE; }
else if ( color.Find( _T("goldenrod") ) >= 0) { m_nColor = RGB2(218,165,32); return TRUE; }
else if ( color.Find( _T("gray") ) >= 0) { m_nColor = RGB2(128,128,128); return TRUE; }
else if ( color.Find( _T("green") ) >= 0) { m_nColor = RGB2(0,128,0); return TRUE; }
else if ( color.Find( _T("greenYellow") ) >= 0) { m_nColor = RGB2(173,255,47); return TRUE; }
else if ( color.Find( _T("grey") ) >= 0) { m_nColor = RGB2(128,128,128); return TRUE; }
break;
case L'h':
if ( color.Find( _T("honeydew") ) >= 0) { m_nColor = RGB2(240,255,240); return TRUE; }
else if ( color.Find( _T("hotPink") ) >= 0) { m_nColor = RGB2(255,105,180); return TRUE; }
break;
case L'i':
if ( color.Find( _T("indianRed") ) >= 0) { m_nColor = RGB2(205,92,92); return TRUE; }
else if ( color.Find( _T("indigo") ) >= 0) { m_nColor = RGB2(75,0,130); return TRUE; }
else if ( color.Find( _T("ivory") ) >= 0) { m_nColor = RGB2(255,255,240); return TRUE; }
break;
case L'k':
if ( color.Find( _T("khaki") ) >= 0) { m_nColor = RGB2(240,230,140); return TRUE; }
break;
case L'l':
if ( color.Find( _T("lavender") ) >= 0) { m_nColor = RGB2(230,230,250); return TRUE; }
else if ( color.Find( _T("lavenderBlush") ) >= 0) { m_nColor = RGB2(255,240,245); return TRUE; }
else if ( color.Find( _T("lawnGreen") ) >= 0) { m_nColor = RGB2(124,252,0); return TRUE; }
else if ( color.Find( _T("lemonChiffon") ) >= 0) { m_nColor = RGB2(255,250,205); return TRUE; }
else if ( color.Find( _T("lightBlue") ) >= 0) { m_nColor = RGB2(173,216,230); return TRUE; }
else if ( color.Find( _T("lightCoral") ) >= 0) { m_nColor = RGB2(240,128,128); return TRUE; }
else if ( color.Find( _T("lightCyan") ) >= 0) { m_nColor = RGB2(224,255,255); return TRUE; }
else if ( color.Find( _T("lightGoldenrodYellow")) >= 0) { m_nColor = RGB2(250,250,210); return TRUE; }
else if ( color.Find( _T("lightGray") ) >= 0) { m_nColor = RGB2(211,211,211); return TRUE; }
else if ( color.Find( _T("lightGreen") ) >= 0) { m_nColor = RGB2(144,238,144); return TRUE; }
else if ( color.Find( _T("lightGrey") ) >= 0) { m_nColor = RGB2(211,211,211); return TRUE; }
else if ( color.Find( _T("lightPink") ) >= 0) { m_nColor = RGB2(255,182,193); return TRUE; }
else if ( color.Find( _T("lightSalmon") ) >= 0) { m_nColor = RGB2(255,160,122); return TRUE; }
else if ( color.Find( _T("lightSeaGreen") ) >= 0) { m_nColor = RGB2(32,178,170); return TRUE; }
else if ( color.Find( _T("lightSkyBlue") ) >= 0) { m_nColor = RGB2(135,206,250); return TRUE; }
else if ( color.Find( _T("lightSlateGray") ) >= 0) { m_nColor = RGB2(119,136,153); return TRUE; }
else if ( color.Find( _T("lightSlateGrey") ) >= 0) { m_nColor = RGB2(119,136,153); return TRUE; }
else if ( color.Find( _T("lightSteelBlue") ) >= 0) { m_nColor = RGB2(176,196,222); return TRUE; }
else if ( color.Find( _T("lightYellow") ) >= 0) { m_nColor = RGB2(255,255,224); return TRUE; }
else if ( color.Find( _T("lime") ) >= 0) { m_nColor = RGB2(0,255,0); return TRUE; }
else if ( color.Find( _T("limeGreen") ) >= 0) { m_nColor = RGB2(50,205,50); return TRUE; }
else if ( color.Find( _T("linen") ) >= 0) { m_nColor = RGB2(250,240,230); return TRUE; }
else if ( color.Find( _T("ltBlue") ) >= 0) { m_nColor = RGB2(173,216,230); return TRUE; }
else if ( color.Find( _T("ltCoral") ) >= 0) { m_nColor = RGB2(240,128,128); return TRUE; }
else if ( color.Find( _T("ltCyan") ) >= 0) { m_nColor = RGB2(224,255,255); return TRUE; }
else if ( color.Find( _T("ltGoldenrodYellow") ) >= 0) { m_nColor = RGB2(250,250,120); return TRUE; }
else if ( color.Find( _T("ltGray") ) >= 0) { m_nColor = RGB2(211,211,211); return TRUE; }
else if ( color.Find( _T("ltGreen") ) >= 0) { m_nColor = RGB2(144,238,144); return TRUE; }
else if ( color.Find( _T("ltGrey") ) >= 0) { m_nColor = RGB2(211,211,211); return TRUE; }
else if ( color.Find( _T("ltPink") ) >= 0) { m_nColor = RGB2(255,182,193); return TRUE; }
else if ( color.Find( _T("ltSalmon") ) >= 0) { m_nColor = RGB2(255,160,122); return TRUE; }
else if ( color.Find( _T("ltSeaGreen") ) >= 0) { m_nColor = RGB2(32,178,170); return TRUE; }
else if ( color.Find( _T("ltSkyBlue") ) >= 0) { m_nColor = RGB2(135,206,250); return TRUE; }
else if ( color.Find( _T("ltSlateGray") ) >= 0) { m_nColor = RGB2(119,136,153); return TRUE; }
else if ( color.Find( _T("ltSlateGrey") ) >= 0) { m_nColor = RGB2(119,136,153); return TRUE; }
else if ( color.Find( _T("ltSteelBlue") ) >= 0) { m_nColor = RGB2(176,196,222); return TRUE; }
else if ( color.Find( _T("ltYellow") ) >= 0) { m_nColor = RGB2(255,255,224); return TRUE; }
break;
case L'm':
if ( color.Find( _T("magenta") ) >= 0) { m_nColor = RGB2(255,0,255); return TRUE; }
else if ( color.Find( _T("maroon") ) >= 0) { m_nColor = RGB2(128,0,0); return TRUE; }
else if ( color.Find( _T("medAquamarine") ) >= 0) { m_nColor = RGB2(102,205,170); return TRUE; }
else if ( color.Find( _T("medBlue") ) >= 0) { m_nColor = RGB2(0,0,205); return TRUE; }
else if ( color.Find( _T("mediumAquamarine") ) >= 0) { m_nColor = RGB2(102,205,170); return TRUE; }
else if ( color.Find( _T("mediumBlue") ) >= 0) { m_nColor = RGB2(0,0,205); return TRUE; }
else if ( color.Find( _T("mediumOrchid") ) >= 0) { m_nColor = RGB2(186,85,211); return TRUE; }
else if ( color.Find( _T("mediumPurple") ) >= 0) { m_nColor = RGB2(147,112,219); return TRUE; }
else if ( color.Find( _T("mediumSeaGreen") ) >= 0) { m_nColor = RGB2(60,179,113); return TRUE; }
else if ( color.Find( _T("mediumSlateBlue") ) >= 0) { m_nColor = RGB2(123,104,238); return TRUE; }
else if ( color.Find( _T("mediumSpringGreen") ) >= 0) { m_nColor = RGB2(0,250,154); return TRUE; }
else if ( color.Find( _T("mediumTurquoise") ) >= 0) { m_nColor = RGB2(72,209,204); return TRUE; }
else if ( color.Find( _T("mediumVioletRed") ) >= 0) { m_nColor = RGB2(199,21,133); return TRUE; }
else if ( color.Find( _T("medOrchid") ) >= 0) { m_nColor = RGB2(186,85,211); return TRUE; }
else if ( color.Find( _T("medPurple") ) >= 0) { m_nColor = RGB2(147,112,219); return TRUE; }
else if ( color.Find( _T("medSeaGreen") ) >= 0) { m_nColor = RGB2(60,179,113); return TRUE; }
else if ( color.Find( _T("medSlateBlue") ) >= 0) { m_nColor = RGB2(123,104,238); return TRUE; }
else if ( color.Find( _T("medSpringGreen") ) >= 0) { m_nColor = RGB2(0,250,154); return TRUE; }
else if ( color.Find( _T("medTurquoise") ) >= 0) { m_nColor = RGB2(72,209,204); return TRUE; }
else if ( color.Find( _T("medVioletRed") ) >= 0) { m_nColor = RGB2(199,21,133); return TRUE; }
else if ( color.Find( _T("midnightBlue") ) >= 0) { m_nColor = RGB2(25,25,112); return TRUE; }
else if ( color.Find( _T("mintCream") ) >= 0) { m_nColor = RGB2(245,255,250); return TRUE; }
else if ( color.Find( _T("mistyRose") ) >= 0) { m_nColor = RGB2(255,228,225); return TRUE; }
else if ( color.Find( _T("moccasin") ) >= 0) { m_nColor = RGB2(255,228,181); return TRUE; }
break;
case L'n':
if ( color.Find( _T("navajoWhite") ) >= 0) { m_nColor = RGB2(255,222,173); return TRUE; }
else if ( color.Find( _T("navy") ) >= 0) { m_nColor = RGB2(0,0,128); return TRUE; }
break;
case L'o':
if ( color.Find( _T("oldLace") ) >= 0) { m_nColor = RGB2(253,245,230); return TRUE; }
else if ( color.Find( _T("olive") ) >= 0) { m_nColor = RGB2(128,128,0); return TRUE; }
else if ( color.Find( _T("oliveDrab") ) >= 0) { m_nColor = RGB2(107,142,35); return TRUE; }
else if ( color.Find( _T("orange") ) >= 0) { m_nColor = RGB2(255,165,0); return TRUE; }
else if ( color.Find( _T("orangeRed") ) >= 0) { m_nColor = RGB2(255,69,0); return TRUE; }
else if ( color.Find( _T("orchid") ) >= 0) { m_nColor = RGB2(218,112,214); return TRUE; }
break;
case L'p':
if ( color.Find( _T("paleGoldenrod") ) >= 0) { m_nColor = RGB2(238,232,170); return TRUE; }
else if ( color.Find( _T("paleGreen") ) >= 0) { m_nColor = RGB2(152,251,152); return TRUE; }
else if ( color.Find( _T("paleTurquoise") ) >= 0) { m_nColor = RGB2(175,238,238); return TRUE; }
else if ( color.Find( _T("paleVioletRed") ) >= 0) { m_nColor = RGB2(219,112,147); return TRUE; }
else if ( color.Find( _T("papayaWhip") ) >= 0) { m_nColor = RGB2(255,239,213); return TRUE; }
else if ( color.Find( _T("peachPuff") ) >= 0) { m_nColor = RGB2(255,218,185); return TRUE; }
else if ( color.Find( _T("peru") ) >= 0) { m_nColor = RGB2(205,133,63); return TRUE; }
else if ( color.Find( _T("pink") ) >= 0) { m_nColor = RGB2(255,192,203); return TRUE; }
else if ( color.Find( _T("plum") ) >= 0) { m_nColor = RGB2(221,160,221); return TRUE; }
else if ( color.Find( _T("powderBlue") ) >= 0) { m_nColor = RGB2(176,224,230); return TRUE; }
else if ( color.Find( _T("purple") ) >= 0) { m_nColor = RGB2(128,0,128); return TRUE; }
break;
case L'r':
if ( color.Find( _T("red") ) >= 0) { m_nColor = RGB2(255,0,0); return TRUE; }
else if ( color.Find( _T("rosyBrown") ) >= 0) { m_nColor = RGB2(188,143,143); return TRUE; }
else if ( color.Find( _T("royalBlue") ) >= 0) { m_nColor = RGB2(65,105,225); return TRUE; }
break;
case L's':
if ( color.Find( _T("saddleBrown") ) >= 0) { m_nColor = RGB2(139,69,19); return TRUE; }
else if ( color.Find( _T("salmon") ) >= 0) { m_nColor = RGB2(250,128,114); return TRUE; }
else if ( color.Find( _T("sandyBrown") ) >= 0) { m_nColor = RGB2(244,164,96); return TRUE; }
else if ( color.Find( _T("seaGreen") ) >= 0) { m_nColor = RGB2(46,139,87); return TRUE; }
else if ( color.Find( _T("seaShell") ) >= 0) { m_nColor = RGB2(255,245,238); return TRUE; }
else if ( color.Find( _T("sienna") ) >= 0) { m_nColor = RGB2(160,82,45); return TRUE; }
else if ( color.Find( _T("silver") ) >= 0) { m_nColor = RGB2(192,192,192); return TRUE; }
else if ( color.Find( _T("skyBlue") ) >= 0) { m_nColor = RGB2(135,206,235); return TRUE; }
else if ( color.Find( _T("slateBlue") ) >= 0) { m_nColor = RGB2(106,90,205); return TRUE; }
else if ( color.Find( _T("slateGray") ) >= 0) { m_nColor = RGB2(112,128,144); return TRUE; }
else if ( color.Find( _T("slateGrey") ) >= 0) { m_nColor = RGB2(112,128,144); return TRUE; }
else if ( color.Find( _T("snow") ) >= 0) { m_nColor = RGB2(255,250,250); return TRUE; }
else if ( color.Find( _T("springGreen") ) >= 0) { m_nColor = RGB2(0,255,127); return TRUE; }
else if ( color.Find( _T("steelBlue") ) >= 0) { m_nColor = RGB2(70,130,180); return TRUE; }
break;
case L't':
if ( color.Find( _T("tan") ) >= 0) { m_nColor = RGB2(210,180,140); return TRUE; }
else if ( color.Find( _T("teal") ) >= 0) { m_nColor = RGB2(0,128,128); return TRUE; }
else if ( color.Find( _T("thistle") ) >= 0) { m_nColor = RGB2(216,191,216); return TRUE; }
else if ( color.Find( _T("tomato") ) >= 0) { m_nColor = RGB2(255,99,71); return TRUE; }
else if ( color.Find( _T("turquoise") ) >= 0) { m_nColor = RGB2(64,224,208); return TRUE; }
break;
case L'v':
if ( color.Find( _T("violet") ) >= 0) { m_nColor = RGB2(238,130,238); return TRUE; }
break;
case L'w':
if ( color.Find( _T("wheat") ) >= 0) { m_nColor = RGB2(245,222,179); return TRUE; }
else if ( color.Find( _T("white") ) >= 0) { m_nColor = RGB2(255,255,255); return TRUE; }
else if ( color.Find( _T("whiteSmoke") ) >= 0) { m_nColor = RGB2(245,245,245); return TRUE; }
break;
case L'y':
if ( color.Find( _T("yellow") ) >= 0) { m_nColor = RGB2(255,255,0); return TRUE; }
else if ( color.Find( _T("yellowGreen") ) >= 0) { m_nColor = RGB2(154,205,50); return TRUE; }
break;
}
if (DOCXDOCUTILS::GetFillColor (Color, m_nColor))
return TRUE;
return FALSE;
}
inline int Color()
{
return m_nColor;
}
private:
inline unsigned int RGB2 (unsigned char r, unsigned char g, unsigned char b, unsigned char a = 0xF) // TODO
{
return ( (b<<16) | (g<<8) | (r) );
}
private:
unsigned int m_nColor;
};
}
#ifdef _DEBUG
namespace DOCXDOCUTILS
{
inline void DebugStrPrint (std::wstring strMessage, const std::string& strSource)
{
OutputDebugStringW(strMessage.c_str());
OutputDebugStringA(strSource.c_str());
OutputDebugStringW(L"\n");
}
inline void DebugStrPrint (std::wstring strMessage, const std::wstring& strSource)
{
OutputDebugStringW(strMessage.c_str());
OutputDebugStringW(strSource.c_str());
OutputDebugStringW(L"\n");
}
}
#endif
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "BlipFactory.h"
namespace GdiPlusHelper
{
inline static int CompareStrings (const wchar_t* str1, const wchar_t* str2)
{
CString cstr1; cstr1 = str1;
CString cstr2; cstr2 = str2;
if (cstr1 == cstr2)
return 0;
return 1;
}
//inline static void GetEncoderCLSID (const wchar_t* pFormat, CLSID* pClsid)
//{
// // variables
// UINT nEncoders = 0;
// UINT nSize = 0;
// Gdiplus::ImageCodecInfo* pImageCodecInfo = 0;
// // retrieve encoders info
// Gdiplus::GetImageEncodersSize(&nEncoders, &nSize);
// // check for valid encoders
// if (!nSize)
// throw 0;
// // create encoders info structure of necessary size
// pImageCodecInfo = (Gdiplus::ImageCodecInfo*)(malloc(nSize));
// // check for valid encoder
// if (!pImageCodecInfo)
// throw 0;
// // retrieve all encoders
// Gdiplus::GetImageEncoders(nEncoders, nSize, pImageCodecInfo);
// // locate necessary encoder
// for (UINT nEncoder = 0; nEncoder < nEncoders; ++nEncoder)
// {
// // compare MIME strings
// if (CompareStrings(pImageCodecInfo[nEncoder].MimeType, pFormat) == 0)
// {
// // save CLSID
// *pClsid = pImageCodecInfo[nEncoder].Clsid;
// // clear memory
// free(pImageCodecInfo);
// // all ok
// return;
// }
// }
// // clear memory
// free(pImageCodecInfo);
// // codec not found
// throw 0;
//}
}
namespace OfficeArt
{
OfficeArtBlip* BlipFactory::GetBlipWithPngTransform()
{
//CString strTempPath;
//if (::GetTempPath(_MAX_PATH, strTempPath.GetBuffer(_MAX_PATH)) != 0)
// strTempPath.ReleaseBuffer();
//else
// strTempPath = _T(".");
//CString strTempFile;
//if (::GetTempFileName(strTempPath, _T("file"), 0, strTempFile.GetBuffer(_MAX_PATH)) != 0)
//{
// CString tempFile; tempFile.Format (_T("%s%s"), strTempFile, _T(".png"));
// CGdiPlusInit m_oInitGdiplus;
// if (m_oInitGdiplus.Init())
// {
// Gdiplus::Bitmap oBitmap (m_sFile.c_str());
// if (Gdiplus::Ok == oBitmap.GetLastStatus())
// {
// CLSID guid;
// GdiPlusHelper::GetEncoderCLSID (L"image/png", &guid);
// if (Gdiplus::Ok == oBitmap.Save (tempFile, &guid))
// {
// if (Gdiplus::Ok == oBitmap.GetLastStatus())
// {
// m_sFile = std::wstring (tempFile);
// m_bDeleteFile = TRUE;
// return GetOfficeArtBlip();
// }
// }
// }
// }
//}
return NULL;
}
}
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <fstream>
#include <string>
#include "OfficeArtBlipJPEG.h"
#include "OfficeArtBlipPNG.h"
#include "OfficeArtBlipEMF.h"
#include "OfficeArtBlipWMF.h"
#include "OfficeArtBlipTIFF.h"
#include "OfficeArtFBSE.h"
#include "../../Common/MD4/md4.h"
#include "../../../ASCOfficeUtils/ASCOfficeUtilsLib/OfficeUtils.h"
namespace OfficeArt
{
class BlipFactory
{
public:
BlipFactory () : m_bDeleteFile (FALSE)
{
}
BlipFactory (std::wstring fileName) : m_bDeleteFile (FALSE)
{
m_sFile = std::wstring(fileName);
}
~BlipFactory ()
{
if (m_bDeleteFile)
{
::DeleteFile (m_sFile.c_str());
}
}
inline std::wstring GetFileNameExtension() const
{
std::wstring::size_type dotPosition = m_sFile.find_last_of( _T( '.' ) );
static const std::wstring::size_type npos = -1;
std::wstring extension;
if (dotPosition != npos)
extension = std::wstring( ( m_sFile.begin() + dotPosition + 1 ), m_sFile.end() );
return extension;
}
inline Enumerations::MSOBLIPTYPE GetBlipType() const
{
Enumerations::MSOBLIPTYPE blipType = Enumerations::msoblipUNKNOWN;
std::wstring extension = GetFileNameExtension();
if ( (extension == std::wstring(L"jpg")) || (extension == std::wstring(L"jpeg")) )
{
blipType = Enumerations::msoblipJPEG;
}
else if (extension == std::wstring(L"png") || extension == std::wstring(L"gif"))
{
blipType = Enumerations::msoblipPNG;
}
else if (extension == std::wstring(L"emf"))
{
blipType = Enumerations::msoblipEMF;
}
else if (extension == std::wstring(L"wmf"))
{
blipType = Enumerations::msoblipWMF;
}
else if (extension == std::wstring(L"tiff") || extension == std::wstring(L"tif"))
{
blipType = Enumerations::msoblipTIFF;
}
else if (extension == std::wstring(L"bmp"))
{
blipType = Enumerations::msoblipDIB;
}
return blipType;
}
inline OfficeArtBlip* GetOfficeArtBlip()
{
OfficeArtBlip* officeArtBlip = NULL;
if (!m_sFile.empty())
{
std::string xstr;
std::ifstream xfile(m_sFile.c_str(), std::ios::binary);
//узнаем размер файла, и выделяем память в строке
xfile.seekg( 0, std::ios_base::end );
xstr.resize( xfile.tellg() );
xfile.seekg( 0, std::ios_base::beg );
//копируем данные
xfile.read(const_cast<char*>( xstr.data() ), (std::streamsize)xstr.size());
if ( !xstr.empty() )
{
std::wstring extension = GetFileNameExtension();
if ( extension == std::wstring(L"gif")
|| extension == std::wstring(L"bmp")
|| extension == std::wstring(L"tiff")
|| extension == std::wstring(L"tif") )
{
// MS WORD конвертит исходник в PNG формат ( UUID берет их исходника GIF файла )
// MS WORD конвертит исходник в PNG формат ( UUID берет их исходника TIFF файла )
// MS WORD конвертит исходник в PNG формат ( UUID берет их исходника BMP файла )
m_sOriginalData = xstr;
officeArtBlip = GetBlipWithPngTransform();
}
else if ((extension == std::wstring(L"jpg")) || (extension == std::wstring(L"jpeg")))
{
MD4 md4Code((unsigned char*)xstr.data(), xstr.size());
officeArtBlip = new OfficeArtBlipJPEG((unsigned char*)xstr.data(), xstr.size(), md4Code.GetMD4Bytes());
}
else if (extension == std::wstring(L"png"))
{
if (m_sOriginalData.length())
{
MD4 md4Code((unsigned char*)m_sOriginalData.data(), m_sOriginalData.size());
officeArtBlip = new OfficeArtBlipPNG ((unsigned char*)m_sOriginalData.data(), m_sOriginalData.size(), md4Code.GetMD4Bytes());
}
else
{
MD4 md4Code((unsigned char*)xstr.data(), xstr.size());
officeArtBlip = new OfficeArtBlipPNG ((unsigned char*)xstr.data(), xstr.size(), md4Code.GetMD4Bytes());
}
}
else if (extension == std::wstring(L"emf"))
{
unsigned char* buffer = NULL;
unsigned long comprLen = CompressImage( &buffer, (unsigned char*)xstr.data(), xstr.size());
if ( ( buffer != NULL ) && ( comprLen != 0 ) )
{
MD4 md4Code((unsigned char*)xstr.data(), xstr.size());
//!!!TODO!!!
officeArtBlip = new OfficeArtBlipEMF( OfficeArtMetafileHeader( xstr.size(), RECT( 0, 0, 0, 0 ), POINT( 0, 0 ), comprLen, COMPRESSION_METHOD_DEFLATE ), buffer, md4Code.GetMD4Bytes() );
RELEASEARRAYOBJECTS (buffer);
}
}
else if (extension == std::wstring(L"wmf"))
{
unsigned long comprLen = 0;
unsigned char* buffer = NULL;
std::string metaPlaceableRecord;
std::string wmfData;
metaPlaceableRecord.push_back( (char)0xD7 );
metaPlaceableRecord.push_back( (char)0xCD );
metaPlaceableRecord.push_back( (char)0xC6 );
metaPlaceableRecord.push_back( (char)0x9A );
if ( equal( xstr.begin(), ( xstr.begin() + 4 ), metaPlaceableRecord.begin() ) )
{
wmfData.assign( ( xstr.begin() + 22 ), xstr.end() );
}
else
{
wmfData = xstr;
}
comprLen = CompressImage( &buffer, (unsigned char*)wmfData.data(), wmfData.size() );
if ( ( buffer != NULL ) && ( comprLen != 0 ) )
{
MD4 md4Code( (unsigned char*)wmfData.data(), wmfData.size() );
// TODO : need fix
officeArtBlip = new OfficeArtBlipWMF( OfficeArtMetafileHeader( wmfData.size(), RECT( 0, 0, 0, 0 ), POINT( 0, 0 ), comprLen, COMPRESSION_METHOD_DEFLATE ), buffer, md4Code.GetMD4Bytes() );
RELEASEARRAYOBJECTS (buffer);
}
}
}
}
return officeArtBlip;
}
inline std::vector<unsigned char> Get_rgbUid1 ()
{
if (!m_sFile.empty())
{
std::string xstr;
std::ifstream xfile(m_sFile.c_str(), std::ios::binary);
//узнаем размер файла, и выделяем память в строке
xfile.seekg( 0, std::ios_base::end );
xstr.resize( xfile.tellg() );
xfile.seekg( 0, std::ios_base::beg );
//копируем данные
xfile.read(const_cast<char*>(xstr.data()), (std::streamsize)xstr.size());
if ( !xstr.empty() )
{
std::wstring extension = GetFileNameExtension();
if ((extension == std::wstring(_T("jpg")))
|| (extension == std::wstring(_T("jpeg")))
|| (extension == std::wstring(_T("png")))
|| (extension == std::wstring(_T("gif")))
|| (extension == std::wstring(_T("tiff")))
|| (extension == std::wstring(L"tif"))
|| (extension == std::wstring(L"bmp")) )
{
MD4 MD4Code ((unsigned char*)xstr.data(), xstr.size());
return MD4Code.GetMD4Bytes();
}
else if (extension == std::wstring(_T("emf")))
{
unsigned char* buffer = NULL;
unsigned long comprLen = CompressImage (&buffer, (unsigned char*)xstr.data(), xstr.size());
if ( ( buffer != NULL ) && ( comprLen != 0 ) )
{
MD4 MD4Code ((unsigned char*)xstr.data(), xstr.size());
RELEASEARRAYOBJECTS (buffer);
return MD4Code.GetMD4Bytes();
}
}
else if (extension == std::wstring(_T("wmf")))
{
std::string metaPlaceableRecord;
std::string wmfData;
metaPlaceableRecord.push_back((char)0xD7);
metaPlaceableRecord.push_back((char)0xCD);
metaPlaceableRecord.push_back((char)0xC6);
metaPlaceableRecord.push_back((char)0x9A);
if ( equal( xstr.begin(), ( xstr.begin() + 4 ), metaPlaceableRecord.begin() ) )
{
wmfData.assign( ( xstr.begin() + 22 ), xstr.end() );
}
else
{
wmfData = xstr;
}
unsigned char* buffer = NULL;
unsigned long comprLen = CompressImage( &buffer, (unsigned char*)wmfData.data(), wmfData.size() );
if ( ( buffer != NULL ) && ( comprLen != 0 ) )
{
MD4 MD4Code ((unsigned char*)wmfData.data(), wmfData.size());
RELEASEARRAYOBJECTS (buffer);
return MD4Code.GetMD4Bytes();
}
}
}
}
return std::vector<unsigned char> ();
}
protected:
inline unsigned long CompressImage (unsigned char** buffer, unsigned char* imageData, unsigned int imageSize) const
{
unsigned long comprLen = 0;
if ( ( buffer != NULL ) && ( imageData != NULL ) && ( imageSize != 0 ) )
{
comprLen = imageSize;
*buffer = new unsigned char[comprLen];
HRESULT hr = S_OK;
COfficeUtils* pOfficeUtils = new COfficeUtils(NULL);
if (pOfficeUtils)
{
pOfficeUtils->Compress(*buffer, &comprLen, imageData, imageSize, -1);
delete pOfficeUtils;
pOfficeUtils = NULL;
}
}
return comprLen;
}
OfficeArtBlip* GetBlipWithPngTransform ();
private:
std::wstring m_sFile;
bool m_bDeleteFile;
std::string m_sOriginalData;
};
}
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "ShapeBuilder.h"
namespace ASCDocFileFormat
{
bool COArtBuilder::BuildShapeRun (const OOX::Logic::Pict& oPicture, CShapeRun& oOdbflRun)
{
if (oPicture.rect.is_init())
{
oOdbflRun = BuildOdbflRun <OOX::Logic::Rect> (oPicture.rect, CMapShape(OfficeArt::Enumerations::msosptRectangle));
return TRUE;
}
if (oPicture.oval.is_init())
{
oOdbflRun = BuildOdbflRun <OOX::Logic::Oval> (oPicture.oval, CMapShape(OfficeArt::Enumerations::msosptEllipse));
return TRUE;
}
if (oPicture.roundrect.is_init())
{
oOdbflRun = BuildOdbflRun <OOX::Logic::Roundrect> (oPicture.roundrect, CMapShape(OfficeArt::Enumerations::msosptRoundRectangle));
return TRUE;
}
if (oPicture.line.is_init())
{
oOdbflRun = BuildOdbflRun <OOX::Logic::Line> (oPicture.line, CMapShape(OfficeArt::Enumerations::msosptLine));
return TRUE;
}
if (oPicture.shape.is_init())
{
if (oPicture.shape->imageData.is_init())
return FALSE;
oOdbflRun = BuildOdbflRun <OOX::Logic::Shape> (oPicture.shape, GetRefShape(oPicture));
return TRUE;
}
return FALSE;
}
bool COArtBuilder::BuildImageRun (const OOX::Logic::Shape& oXml, const std::wstring& strFileName, Run& oRun)
{
COArtStorage* pStorage = COArtStorage::Instance();
if (pStorage)
{
COArtImage* pImage = new COArtImage(strFileName, pStorage->GenID (m_nLocation));
if (pImage)
{
CShapeRun oShapeRun (pImage, pImage->GetID(), pStorage->GetOffSetSpa(m_nLocation)); // смещение берем от предыдущего элемента
oShapeRun.UpdateSizes (*oXml.style); // размеры
oShapeRun.SetWrap (oXml.Wrap); // обтекание
//oShapeRun.SetAnchor ((bool)(oXml.anchorlock.is_init()));
oShapeRun.SetUseBehind (*oXml.style);
pImage->SetupFromStyleXml(oXml.style);
pStorage->AddImage (pImage, oShapeRun.GetSpa(), m_nLocation);
oRun.AddRunItem (oShapeRun);
return TRUE;
}
}
return FALSE;
}
bool COArtBuilder::BuildImageRun (const OOX::Image& oXml, const OOX::Logic::Drawing& oXml2, Run& oRun)
{
COArtStorage* pStorage = COArtStorage::Instance();
if (pStorage)
{
//COArtImage* pImage = new COArtImage(std::wstring(oXml.filename().GetPath()), pStorage->GenID (m_nLocation));
COArtImage* pImage = new COArtImage(oXml.GetPath(), pStorage->GenID (m_nLocation));
if (pImage)
{
CShapeRun oShapeRun (pImage, pImage->GetID(), pStorage->GetOffSetSpa(m_nLocation)); // смещение берем от предыдущего элемента
((CImageSettings*)(pImage->GetSettings()))->SetWrapDist(oXml2.Inline);
pImage->SetRotationImage(oXml2);
pImage->SetInternalFlipImage(oXml2);
pImage->SetPositioningImage(oXml2);
oShapeRun.SetImageSize (oXml2);
oShapeRun.SetImageWrap (oXml2.Inline->Wrap);
oShapeRun.SetImageUseBehind (oXml2.Inline->BehindDoc);
oShapeRun.UpdateAnchorPositionImage(oXml2);
pStorage->AddImage (pImage, oShapeRun.GetSpa(), m_nLocation);
oRun.AddRunItem (oShapeRun);
return TRUE;
}
}
return FALSE;
}
CShapeRun COArtBuilder::BuildGroupRun (const OOX::Logic::Group& oXml, COArtGroup* pShape)
{
if (pShape)
{
COArtStorage* pStorage = COArtStorage::Instance();
CShapeRun oShapeRun (pShape, pShape->GetID(), pStorage->GetOffSetSpa(m_nLocation));
oShapeRun.UpdateSizes (*oXml.style);
//oShapeRun.SetWrap (oXmlShape.Wrap);
//oShapeRun.SetAnchor ((bool)(oXmlShape.anchorlock.is_init()));
//oShapeRun.SetUseBehind (*oXml.style);
if (FALSE == oShapeRun.IsInline())
pStorage->AddGroup (pShape, oShapeRun.GetSpa(), m_nLocation);
return oShapeRun;
}
return CShapeRun();
}
}
namespace ASCDocFileFormat
{
COArtShape* COArtBuilder::BuildOArtShape (const OOX::Logic::Shape& oXml, const OOX::Logic::Group& oXmlGroup)
{
COArtShape* pShape = InternalBuildOArtShape <OOX::Logic::Shape> (oXml,GetRefShape(oXml,oXmlGroup));
if (pShape)
{
const OOX::Logic::ShapeStyle& oStyle = (*oXml.style);
pShape->SetupFromStyleXml(oStyle);
Unit<int, Pt> nX (0);
Unit<int, Pt> nY (0);
if (oStyle.leftTop.is_init())
{
nX = *oStyle.leftTop->X;
nY = *oStyle.leftTop->Y;
}
Unit<int, Pt> nWidth (*oStyle.Size->Width);
Unit<int, Pt> nHeight (*oStyle.Size->Height);
pShape->SetChildeAnchorBounds (nX, nY, nWidth, nHeight, pShape->IsAngleBoundFlip());
if (pShape->IsTextureMode())
{
COArtStorage* storage = COArtStorage::Instance();
if (storage)
{
storage->SaveBlipImage(pShape);
}
}
}
return pShape;
}
COArtShape* COArtBuilder::BuildOArtImage (const OOX::Logic::Shape& oXml, const std::wstring& strFileName)
{
if (0 == strFileName.length())
return NULL;
COArtStorage* storage = COArtStorage::Instance();
if (storage)
{
COArtImage* pImage = new COArtImage(strFileName, storage->GenID (m_nLocation));
if (pImage)
{
const OOX::Logic::ShapeStyle& oStyle = (*oXml.style);
pImage->SetRotation(oStyle);
pImage->SetInternalFlip(oStyle);
pImage->SetHidden(oStyle);
Unit<int, Pt> nX (0);
Unit<int, Pt> nY (0);
if (oStyle.leftTop.is_init())
{
nX = *oStyle.leftTop->X;
nY = *oStyle.leftTop->Y;
}
Unit<int, Pt> nWidth (*oStyle.Size->Width);
Unit<int, Pt> nHeight (*oStyle.Size->Height);
pImage->SetChildeAnchorBounds (nX, nY, nWidth, nHeight, pImage->IsAngleBoundFlip());
storage->SaveBlipImage(pImage);
return pImage;
}
}
return NULL;
}
}
namespace ASCDocFileFormat
{
template<class T> CShapeRun COArtBuilder::BuildOdbflRun (const T& oXmlShape, CMapShape& oInnerRef)
{
COArtShape* pShape = InternalBuildOArtShape <T> (oXmlShape,oInnerRef);
if (pShape)
{
COArtStorage* pStorage = COArtStorage::Instance();
CShapeRun oShapeRun (pShape, pShape->GetID(), pStorage->GetOffSetSpa(m_nLocation)); // смещение берем от предыдущего элемента
oShapeRun.UpdateSizes (*oXmlShape.style); // размеры
oShapeRun.SetWrap (oXmlShape.Wrap); // обтекание
oShapeRun.SetAnchor ((bool)(oXmlShape.anchorlock.is_init()));
oShapeRun.SetUseBehind (*oXmlShape.style);
oShapeRun.UpdateAnchorPosition (*oXmlShape.style);
if (typeid(T) == typeid(OOX::Logic::Line)) // для DOC файла точки начала и конца линии устанавливаются в структуре SPA
{
OOX::Logic::Line* pLine = (OOX::Logic::Line*)(&oXmlShape);
if (pLine)
{
if (pLine->from.is_init() && pLine->to.is_init())
{
DOCX::CPointF oFrom(pLine->from);
DOCX::CPointF oTo(pLine->to);
Spa& oSpa = oShapeRun.GetSpa();
oSpa.m_rca.left = oFrom.GetTX();
oSpa.m_rca.top = oFrom.GetTY();
oSpa.m_rca.right = oTo.GetTX();
oSpa.m_rca.bottom = oTo.GetTY();
oSpa.Update();
}
}
}
if (oXmlShape.textbox.is_init()) // Привязка текста к автофигуры
{
m_pLastTbRef = pStorage->GenTbRef(m_nLocation);
if (m_pLastTbRef)
{
pShape->SetTbRef(m_pLastTbRef);
}
}
if (FALSE == oShapeRun.IsInline())
{
pStorage->Add (pShape, oShapeRun.GetSpa(), m_nLocation);
}
return oShapeRun;
}
return CShapeRun();
}
template<class T> COArtShape* COArtBuilder::InternalBuildOArtShape (const T& oXmlShape, CMapShape& oInnerRef)
{
COArtStorage* pStorage = COArtStorage::Instance();
if (pStorage)
{
COArtShape* pShape = new COArtShape(pStorage->GenID (m_nLocation));
if (pShape)
{
int nType = oInnerRef.m_nType;
if (nType == OfficeArt::Enumerations::msosptTextStop) // пока не понятно что делать с такими фигурами
nType = 0;
pShape->SetShapeType (nType);
if (pShape->GetSettings ())
{
// fill
if (oXmlShape.fillstyle.is_init())
pShape->GetSettings ()->GetFillStyle().Read (oXmlShape.fillstyle);
// line
if (oXmlShape.linestyle.is_init())
pShape->GetSettings ()->GetLineStyle().Read (oXmlShape.linestyle);
// shadow
if (oXmlShape.shadow.is_init())
pShape->GetSettings ()->GetShadowStyle().Read (oXmlShape.shadow);
pShape->SetupFromStyleXml(oXmlShape.style);
if (0 == nType)
{
if (oInnerRef.m_strPath.length())
pShape->GetSettings()->GetGeometryStyle().SetPath(oInnerRef.m_strPath, oInnerRef.m_strAdjustValues, oInnerRef.m_strFormulas);
if (oInnerRef.m_strCoordSize.length())
pShape->GetSettings()->GetGeometryStyle().SetRightBottom(oInnerRef.m_strCoordSize);
if (oInnerRef.m_strConnection.length())
pShape->GetSettings()->GetGeometryStyle().SetConnection(oInnerRef.m_strConnection);
if (oInnerRef.m_strSites.length())
pShape->GetSettings()->GetGeometryStyle().SetSites(oInnerRef.m_strSites);
if (oInnerRef.m_strSitesDir.length())
pShape->GetSettings()->GetGeometryStyle().SetSitesDir(oInnerRef.m_strSitesDir);
if (oInnerRef.m_textboxrect.length())
pShape->GetSettings()->GetGeometryStyle().SetInscribe(oInnerRef.m_textboxrect);
}
if (oInnerRef.m_strAdjustValues.length())
pShape->GetSettings()->GetGeometryStyle().SetAdjustValues(oInnerRef.m_strAdjustValues);
if (typeid(T) == typeid(OOX::Logic::Roundrect)) // для DOC файла велична арки пишется в adjust свойство
{
OOX::Logic::Roundrect* roundrect = (OOX::Logic::Roundrect*)(&oXmlShape);
if (roundrect)
{
if(roundrect->arcsize.is_init())
{
pShape->GetSettings()->GetGeometryStyle().SetAdjustValues(roundrect->arcsize, true);
}
}
}
pShape->GetSettings()->SetWrapDist (oXmlShape.style);
}
// имеет место быть заливка картинкой
if (m_strTextureFile.length())
{
pShape->SetTextureFill(TRUE, m_strTextureFile);
m_strTextureFile = L"";
}
return pShape;
}
}
return NULL;
}
}
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "../Common/Singleton.h"
#include "PICFAndOfficeArtData.h"
#include "BinaryStorage.h"
#include "IRunItem.h"
#include "Spa.h"
#include "Run.h"
#include "OfficeArt/OfficeArtFOPT.h"
#include "OfficeArt/OfficeArtFDG.h"
#include "OfficeArt/DrawingContainer.h"
#include "OfficeArt/OfficeArtCOLORREF.h"
#include "OfficeArt/OfficeArtSpContainer.h"
#include "OfficeArt/OfficeArtDgContainer.h"
#include "OfficeArt/OfficeArtClientAnchor.h"
#include "OfficeArt/OfficeArtChildAnchor.h"
#include "OfficeArt/OfficeArtClientTextbox.h"
#include "OfficeArt/OfficeArtClientData.h"
#include "OfficeArt/OfficeArtSpgrContainer.h"
#include "OfficeArt/OfficeArtWordDrawing.h"
#include "OfficeArt/OfficeArtDggContainer.h"
#include "OfficeArt/OfficeArtContent.h"
#include "OfficeArt/OfficeArtFDGGBlock.h"
#include "OfficeArt/OfficeArtBStoreContainer.h"
#include "OfficeArt/OfficeArtSplitMenuColorContainer.h"
#include "OfficeArt/OfficeArtFSPGR.h"
#include "OfficeArt/BlipFactory.h"
#include "OfficeArt/OfficeArtFOPT.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Logic/Pict.h"
//#include "../../Common/DocxFormat/Source/DocxFormat/Logic/DrawingWrap.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Drawing/Drawing.h"
//#include "../../Common/DocxFormat/Source/DocxFormat/Logic/LineStyle.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Media/Media.h"
#include "ShapeSettings.h"
#include "WordStreamWriter.h"
#include "TextBox.h"
using namespace OfficeArt;
using namespace std;
/*
. Пояснение по поводу картинок
. изображения (not embedded) пишутся в общий WordStream после всех символов
. информация об изображениях хранится в FBSE, для (not embedded) храним смещения в стриме WordStream (foDelay)
. привязка изображение к автофигуре идет через свойство Blip::pib
...................................................................................................................
. разница между начальным индексом для объекта из MAIN DOCUMENT и HEADER должна быть 1000
. иначе ворд такие документы открывает без отображения содержимого
...................................................................................................................
. Inline-автофигуры пишутся с дополнительными символами - { SHAPE \\* MERGEFORMAT } // TODO : надо разбираться с бинарниками, в спецификации таких фигур нету
. http://support.microsoft.com/kb/276862
*/
#define MAIN_DOCUMENT 0
#define HEADER_DOCUMENT 1
namespace ASCDocFileFormat
{
class COArtShape
{
public:
COArtShape(int nID) : m_nID (nID), m_pSettings (NULL), m_nTextBoxRef(NULL)
{
m_nShapeType = OfficeArt::Enumerations::msosptNotPrimitive;
m_bHaveBlip = FALSE;
m_bGroup = false;
m_bChild = false;
m_bFlipH = false;
m_bFlipV = false;
m_bHaveSpt = true;
m_bHaveChildAnchor = false;
m_bHaveBounds = false;
m_nChildX = 0;
m_nChildY = 0;
m_nChildWidth = 0;
m_nChildHeight = 0;
m_bTextureMode = FALSE;
m_strTextureFile = L"";
m_BlipPos = 0;
}
virtual ~COArtShape()
{
RELEASEOBJECT (m_pSettings);
}
inline void SetID(int nID)
{
m_nID = nID;
}
inline int GetID()
{
return m_nID;
}
virtual CShapeSettings* GetSettings()
{
if (NULL == m_pSettings)
m_pSettings = new CShapeSettings ();
return m_pSettings;
}
//
inline void SetGroup(bool bGroup)
{
m_bGroup = bGroup;
}
inline bool IsGroup()
{
return m_bGroup;
}
inline void SetChild(bool bChild)
{
m_bChild = bChild;
}
inline void SetChildAnchor(bool bChild)
{
m_bHaveChildAnchor = bChild;
}
inline void SetHaveSpt(bool spt)
{
m_bHaveSpt = spt;
}
inline void SetChildeAnchorBounds (int nX, int nY, int nWidth, int nHeight, bool bAngleFlip = FALSE)
{
if (bAngleFlip)
{
m_nChildX = (int)(nX + nWidth * 0.5 - nHeight * 0.5);
m_nChildY = (int)(nY + nHeight * 0.5 - nWidth * 0.5);
m_nChildWidth = nHeight;
m_nChildHeight = nWidth;
}
else
{
m_nChildX = nX;
m_nChildY = nY;
m_nChildWidth = nWidth;
m_nChildHeight = nHeight;
}
}
inline void SetFlipH(bool bFlipH)
{
m_bFlipH = bFlipH;
}
inline void SetFlipV(bool bFlipV)
{
m_bFlipV = bFlipV;
}
inline void SetShapeType(int nShapeType)
{
m_nShapeType = (OfficeArt::Enumerations::MSOSPT)nShapeType;
}
inline void SetTbRef(CTextBoxRef* pTBRef)
{
if (pTBRef)
{
m_nTextBoxRef = pTBRef;
m_nTextBoxRef->SetID(m_nID);
}
}
//
virtual OfficeArtSpContainer GetShape() // create top-level shape
{
ASCDocFormatUtils::BitSet oShapeSettings (4);
oShapeSettings.SetBit (m_bGroup, 0); // Group - A bit that specifies whether this shape is a group shape.
oShapeSettings.SetBit (m_bChild, 1); // Child - A bit that specifies whether this shape is a child shape.
oShapeSettings.SetBit (0, 2); // Patriarch - A bit that specifies whether this shape is the topmost group shape. Each drawing contains one topmost group shape
oShapeSettings.SetBit (0, 3); // Deleted - A bit that specifies whether this shape has been deleted.
oShapeSettings.SetBit (0, 4); // OleShape - A bit that specifies whether this shape is an OLE object.
oShapeSettings.SetBit (0, 5); // HaveMaster - A bit that specifies whether this shape has a valid master in the hspMaster property, as defined in section
oShapeSettings.SetBit (m_bFlipH, 6); // FlipH - A bit that specifies whether this shape is horizontally flipped.
oShapeSettings.SetBit (m_bFlipV, 7); // FlipV - A bit that specifies whether this shape is vertically flipped.
oShapeSettings.SetBit (0, 8); // Connector - A bit that specifies whether this shape is a connector shape.
oShapeSettings.SetBit (true, 9); // HaveAnchor - A bit that specifies whether this shape has an anchor.
oShapeSettings.SetBit (0, 10); // Background - A bit that specifies whether this shape is a background shape.
oShapeSettings.SetBit (m_bHaveSpt, 11); // HaveSpt - A bit that specifies whether this shape has a shape type property.
OfficeArt::OfficeArtFSP ShapeProp (m_nShapeType, m_nID, FormatUtils::BytesToUInt32 (oShapeSettings.GetBytes(), 0, sizeof(unsigned int)));
OfficeArt::OfficeArtSpContainer oOArtChShape;
// Внимание - порядок добавления объектов очень важен
//OfficeArt::OfficeArtChildAnchor ChildAnchor (m_nLeft, m_nRight, m_nWidth, m_nHeight);
oOArtChShape.PushBack (ShapeProp);
//oOArtChShape.PushBack (ChildAnchor);
if (GetSettings())
{
oOArtChShape.PushBack(GetSettings()->GetPrimaryOptions());
if (GetSettings()->SetupSecondaryOptions())
{
oOArtChShape.PushBack(GetSettings()->GetSecondaryOptions());
}
}
if (m_bHaveChildAnchor)
oOArtChShape.PushBack (OfficeArtChildAnchor(m_nChildX, m_nChildWidth + m_nChildX, m_nChildY, m_nChildHeight + m_nChildY));
if (m_nTextBoxRef)
{
if (m_nTextBoxRef->IsValid())
{
oOArtChShape.PushBack (OfficeArtClientAnchor(0));
oOArtChShape.PushBack (OfficeArtClientData(1));
oOArtChShape.PushBack (OfficeArtClientTextbox(m_nTextBoxRef->GetIndex())); // Index form Array of textBoxes
return oOArtChShape;
}
}
oOArtChShape.PushBack (OfficeArtClientData(1));
return oOArtChShape;
}
inline OfficeArtSpContainer GetSimplyShape()
{
ASCDocFormatUtils::BitSet oShapeSettings (4);
oShapeSettings.SetBit (0, 0); // Group - A bit that specifies whether this shape is a group shape.
oShapeSettings.SetBit (0, 1); // Child - A bit that specifies whether this shape is a child shape.
oShapeSettings.SetBit (0, 2); // Patriarch - A bit that specifies whether this shape is the topmost group shape. Each drawing contains one topmost group shape
oShapeSettings.SetBit (0, 3); // Deleted - A bit that specifies whether this shape has been deleted.
oShapeSettings.SetBit (0, 4); // OleShape - A bit that specifies whether this shape is an OLE object.
oShapeSettings.SetBit (0, 5); // HaveMaster - A bit that specifies whether this shape has a valid master in the hspMaster property, as defined in section
oShapeSettings.SetBit (0, 6); // FlipH - A bit that specifies whether this shape is horizontally flipped.
oShapeSettings.SetBit (0, 7); // FlipV - A bit that specifies whether this shape is vertically flipped.
oShapeSettings.SetBit (0, 8); // Connector - A bit that specifies whether this shape is a connector shape.
oShapeSettings.SetBit (true, 9); // HaveAnchor - A bit that specifies whether this shape has an anchor.
oShapeSettings.SetBit (0, 10); // Background - A bit that specifies whether this shape is a background shape.
oShapeSettings.SetBit (m_bHaveSpt, 11); // HaveSpt - A bit that specifies whether this shape has a shape type property.
OfficeArt::OfficeArtFSP oShapeProp (m_nShapeType, m_nID, FormatUtils::BytesToUInt32 (oShapeSettings.GetBytes(), 0, sizeof(unsigned int)));
OfficeArt::OfficeArtSpContainer oOArtChShape;
oOArtChShape.PushBack(oShapeProp);
oOArtChShape.PushBack(GetSettings()->GetPrimaryOptions());
return oOArtChShape;
}
virtual OfficeArtSpgrContainer GetShapes()
{
return OfficeArtSpgrContainer ();
}
//
inline bool IsAngleBoundFlip() // нужно только для SPA(rca)
{
if (GetSettings ())
return GetSettings ()->GetTransformStyle().IsAngleBoundFlip();
return FALSE;
}
// XML
inline void SetupFromStyleXml (const OOX::Logic::ShapeStyle& oStyle)
{
SetRotation(oStyle);
SetInternalFlip(oStyle);
SetHidden(oStyle);
SetPositioning(oStyle);
SetupInternalTb(oStyle);
}
inline void SetInternalFlip (const OOX::Logic::ShapeStyle& oStyle)
{
if (oStyle.flip.is_init())
{
SetFlipH (DOCXDOCUTILS::GetFlipH(oStyle.flip));
SetFlipV (DOCXDOCUTILS::GetFlipV(oStyle.flip));
}
}
inline void SetRotation (const OOX::Logic::ShapeStyle& oStyle)
{
if (oStyle.rotation.is_init())
{
if (GetSettings())
GetSettings ()->GetTransformStyle().SetRotate (oStyle.rotation);
}
}
inline void SetHidden (const OOX::Logic::ShapeStyle& oStyle)
{
if (oStyle.visibility.is_init())
{
if (GetSettings())
GetSettings()->GetGroupShapeStyle().SetVisible (oStyle.visibility);
}
}
inline void SetPositioning (const OOX::Logic::ShapeStyle& oStyle)
{
if (GetSettings())
{
CGroupShapeStyle& oSgcStyle = GetSettings()->GetGroupShapeStyle();
oSgcStyle.SetPositioning(oStyle.msoPositionHorizontal,
oStyle.msoPositionHorizontalRelative,
oStyle.msoPositionVertical,
oStyle.msoPositionVerticalRelative);
oSgcStyle.SetPercentageSettings(oStyle.msoWidthPercent,
oStyle.msoHeightPercent,
oStyle.msoPositionHorizontalRelative,
oStyle.msoPositionVerticalRelative);
}
}
// TODO : <v:textbox style="layout-flow:vertical"> - Направление шрифта
//
inline void SetTextureFill(bool mode, const std::wstring& textureFile)
{
if (TRUE == mode && textureFile.length() > 0)
{
m_bTextureMode = mode;
m_strTextureFile = textureFile;
if (GetSettings()) GetSettings()->GetFillStyle().SetType(Enumerations::msofillPicture);
}
}
inline bool IsTextureMode() const
{
return m_bTextureMode;
}
// Текстура для автофигуры или просто изображение пишутся в WORD_STREAM, а в FBSE записываем смещение картинки
virtual void SetImageIndex(int index) // индекс картинки в WordStream
{
if (GetSettings())
{
GetSettings()->GetFillStyle().SetBlip(index);
}
}
virtual void SetBlipPos(unsigned int bufpos)
{
m_BlipPos = bufpos;
}
virtual OfficeArtFBSE GetFBSE()
{
OfficeArt::BlipFactory oBlipFactory (m_strTextureFile);
OfficeArt::OfficeArtBlip* blip = oBlipFactory.GetOfficeArtBlip();
if (blip)
{
OfficeArt::OfficeArtFBSE oBlipStoreEntry (FALSE, oBlipFactory.GetBlipType(), oBlipFactory.GetBlipType(), blip->Size(), oBlipFactory.Get_rgbUid1());
oBlipStoreEntry.SetFoDelay(m_BlipPos);
RELEASEOBJECT(blip);
return oBlipStoreEntry;
}
return OfficeArt::OfficeArtFBSE();
}
virtual OfficeArtBlip* CreateBlip()
{
OfficeArt::BlipFactory oBlipFactory (m_strTextureFile.c_str());
return oBlipFactory.GetOfficeArtBlip();
}
protected:
inline void SetupInternalTb(const OOX::Logic::ShapeStyle& oStyle) // Word портит форматирование при сохранение в (*.doc)
{
if (GetSettings())
{
if (oStyle.textAnchor.is_init())
{
CTextStyle& oTbStyle = GetSettings()->GetTextStyle();
oTbStyle.SetAnchor(oStyle.textAnchor);
}
}
}
protected:
int m_nID;
OfficeArt::Enumerations::MSOSPT m_nShapeType;
CShapeSettings* m_pSettings;
bool m_bHaveBlip; // привязка картинки
bool m_bGroup;
bool m_bChild;
bool m_bHaveSpt;
bool m_bHaveChildAnchor;
bool m_bHaveBounds;
bool m_bFlipH;
bool m_bFlipV;
int m_nChildX;
int m_nChildY;
int m_nChildWidth;
int m_nChildHeight;
bool m_bTextureMode;
std::wstring m_strTextureFile;
unsigned int m_BlipPos;
CTextBoxRef* m_nTextBoxRef;
};
class COArtImage : public COArtShape
{
public:
COArtImage (std::wstring strFileName, int nID) : COArtShape (nID)
{
m_nShapeType = OfficeArt::Enumerations::msosptPictureFrame;
m_bHaveBlip = TRUE;
m_strTextureFile = strFileName;
m_BlipPos = 0;
}
virtual CShapeSettings* GetSettings()
{
if (NULL == m_pSettings)
m_pSettings = new CImageSettings ();
return m_pSettings;
}
virtual void SetImageIndex(int index) // индекс картинки в WordStream
{
if (GetSettings())
{
((CImageSettings*)m_pSettings)->GetBlipStyle().SetPib(index);
}
}
//
virtual OfficeArtSpContainer GetShape () // create top-level shape
{
ASCDocFormatUtils::BitSet oShapeSettings (4);
oShapeSettings.SetBit (m_bGroup, 0); // Group - A bit that specifies whether this shape is a group shape.
oShapeSettings.SetBit (m_bChild, 1); // Child - A bit that specifies whether this shape is a child shape.
oShapeSettings.SetBit (0, 2); // Patriarch - A bit that specifies whether this shape is the topmost group shape. Each drawing contains one topmost group shape
oShapeSettings.SetBit (0, 3); // Deleted - A bit that specifies whether this shape has been deleted.
oShapeSettings.SetBit (0, 4); // OleShape - A bit that specifies whether this shape is an OLE object.
oShapeSettings.SetBit (0, 5); // HaveMaster - A bit that specifies whether this shape has a valid master in the hspMaster property, as defined in section
oShapeSettings.SetBit (m_bFlipH, 6); // FlipH - A bit that specifies whether this shape is horizontally flipped.
oShapeSettings.SetBit (m_bFlipV, 7); // FlipV - A bit that specifies whether this shape is vertically flipped.
oShapeSettings.SetBit (0, 8); // Connector - A bit that specifies whether this shape is a connector shape.
oShapeSettings.SetBit (true, 9); // HaveAnchor - A bit that specifies whether this shape has an anchor.
oShapeSettings.SetBit (0, 10); // Background - A bit that specifies whether this shape is a background shape.
oShapeSettings.SetBit (m_bHaveSpt, 11); // HaveSpt - A bit that specifies whether this shape has a shape type property.
OfficeArt::OfficeArtFSP ShapeProp (m_nShapeType, m_nID, FormatUtils::BytesToUInt32 (oShapeSettings.GetBytes(), 0, sizeof(unsigned int)));
OfficeArt::OfficeArtSpContainer oOArtChShape;
oOArtChShape.PushBack (ShapeProp);
if (GetSettings())
{
oOArtChShape.PushBack (GetSettings()->GetPrimaryOptions());
if (GetSettings()->SetupSecondaryOptions())
{
oOArtChShape.PushBack(GetSettings()->GetSecondaryOptions());
}
}
if (m_bHaveChildAnchor)
oOArtChShape.PushBack (OfficeArtChildAnchor(m_nChildX, m_nChildWidth + m_nChildX, m_nChildY, m_nChildHeight + m_nChildY));
//oOArtChShape.PushBack (OfficeArtClientAnchor(0));
oOArtChShape.PushBack (OfficeArtClientData(1));
if (m_nTextBoxRef)
{
if (m_nTextBoxRef->IsValid())
{
oOArtChShape.PushBack (OfficeArtClientTextbox(m_nTextBoxRef->GetIndex())); // Index form Array of textBoxes
}
}
return oOArtChShape;
}
// XML
inline void SetRotationImage (const OOX::Logic::Drawing& oXml)
{
if (oXml.Inline->Graphic->Pic->rot.is_init())
{
if (GetSettings())
GetSettings ()->GetTransformStyle().SetRotate (oXml.Inline->Graphic->Pic->rot, true);
}
}
inline void SetInternalFlipImage (const OOX::Logic::Drawing& oXml)
{
if (oXml.Inline->Graphic->Pic->flipH.is_init())
SetFlipH (DOCXDOCUTILS::GetFlipH(oXml.Inline->Graphic->Pic->flipH));
if (oXml.Inline->Graphic->Pic->flipV.is_init())
SetFlipV (DOCXDOCUTILS::GetFlipV(oXml.Inline->Graphic->Pic->flipV));
}
inline void SetPositioningImage (const OOX::Logic::Drawing& oXml)
{
if (GetSettings())
{
CGroupShapeStyle& oSgcStyle = GetSettings()->GetGroupShapeStyle();
std::string msoPositionHorizontal = std::string ("");
if (oXml.Inline->positionHAlign.is_init())
msoPositionHorizontal = oXml.Inline->positionHAlign;
std::string msoPositionHorizontalRelative = std::string ("");
if (oXml.Inline->positionHRelativeFrom.is_init())
msoPositionHorizontalRelative = oXml.Inline->positionHRelativeFrom;
std::string msoPositionVertical = std::string ("");
if (oXml.Inline->positionVAlign.is_init())
msoPositionVertical = oXml.Inline->positionVAlign;
std::string msoPositionVerticalRelative = std::string ("");
if (oXml.Inline->positionVRelativeFrom.is_init())
msoPositionVerticalRelative = oXml.Inline->positionVRelativeFrom;
oSgcStyle.SetPositioning(msoPositionHorizontal, msoPositionHorizontalRelative, msoPositionVertical, msoPositionVerticalRelative);
}
}
};
class COArtGroup : public COArtShape
{
public:
COArtGroup(int nID) : COArtShape (nID)
{
m_bGroup = true;
m_nBoundWidth = 0;
m_nBoundHeight = 0;
}
~COArtGroup()
{
for (size_t i = 0; i < m_arShapes.size(); ++i)
RELEASEOBJECT(m_arShapes[i]);
}
inline bool IsValid()
{
return ((long)m_arShapes.size() > 0 &&
(((int)m_oCoordSize.X() != 0) && ((int)m_oCoordSize.Y() != 0)) );
}
inline void Append (COArtShape* pShape)
{
if (pShape)
{
pShape->SetChild (true);
pShape->SetChildAnchor (true);
m_arShapes.push_back (pShape);
}
}
virtual OfficeArtSpgrContainer GetShapes ()
{
OfficeArtSpgrContainer oMain; // 0xF003 - OfficeArtSpgrContainer
oMain.PushBack(CreateTopShape(m_nID));
for (size_t i = 0; i < m_arShapes.size(); ++i)
{
if (m_arShapes[i]->IsGroup())
oMain.PushBack(m_arShapes[i]->GetShapes());
else
oMain.PushBack(m_arShapes[i]->GetShape());
}
return oMain;
}
//
inline void SetBounds (const OOX::Logic::ShapeStyle& oStyle)
{
Unit<int, Pt> nX (0);
Unit<int, Pt> nY (0);
if (oStyle.leftTop.is_init())
{
nX = *oStyle.leftTop->X;
nY = *oStyle.leftTop->Y;
}
Unit<int, Pt> nWidth (*oStyle.Size->Width);
Unit<int, Pt> nHeight (*oStyle.Size->Height);
SetChildeAnchorBounds (nX, nY, nWidth, nHeight);
}
inline void SetCoord (const DOCX::CFPoint& oOrigin, const DOCX::CFPoint& oSize)
{
m_oCoordOrigin = oOrigin;
m_oCoordSize = oSize;
}
private:
inline OfficeArtSpContainer CreateTopShape (int nID) // create top-level shape
{
ASCDocFormatUtils::BitSet oShapeSettings (4);
oShapeSettings.SetBit (m_bGroup,0); // Group - A bit that specifies whether this shape is a group shape.
oShapeSettings.SetBit (m_bChild,1); // Child - A bit that specifies whether this shape is a child shape.
oShapeSettings.SetBit (0, 2); // Patriarch - A bit that specifies whether this shape is the topmost group shape. Each drawing contains one topmost group shape
oShapeSettings.SetBit (0, 3); // Deleted - A bit that specifies whether this shape has been deleted.
oShapeSettings.SetBit (0, 4); // OleShape - A bit that specifies whether this shape is an OLE object.
oShapeSettings.SetBit (0, 5); // HaveMaster - A bit that specifies whether this shape has a valid master in the hspMaster property, as defined in section
oShapeSettings.SetBit (m_bFlipH,6); // FlipH - A bit that specifies whether this shape is horizontally flipped.
oShapeSettings.SetBit (m_bFlipV,7); // FlipV - A bit that specifies whether this shape is vertically flipped.
oShapeSettings.SetBit (0, 8); // Connector - A bit that specifies whether this shape is a connector shape.
oShapeSettings.SetBit (true, 9); // HaveAnchor - A bit that specifies whether this shape has an anchor.
oShapeSettings.SetBit (0, 10); // Background - A bit that specifies whether this shape is a background shape.
oShapeSettings.SetBit (0, 11); // HaveSpt - A bit that specifies whether this shape has a shape type property.
OfficeArtFSP ShapeProp (OfficeArt::Enumerations::msosptNotPrimitive, nID, FormatUtils::BytesToUInt32 (oShapeSettings.GetBytes(), 0, sizeof(unsigned int)));
// Внимание - порядок добавления объектов очень важен
OfficeArtSpContainer oShapeGroup;
oShapeGroup.PushBack (OfficeArtFSPGR((int)m_oCoordOrigin.X(),(int)m_oCoordOrigin.Y(),
(int)m_oCoordSize.X() + (int)m_oCoordOrigin.X(),(int)m_oCoordSize.Y() + (int)m_oCoordOrigin.Y() ));
oShapeGroup.PushBack (ShapeProp);
oShapeGroup.PushBack (GetSettings()->GetPrimaryOptions());
if (m_bHaveChildAnchor)
oShapeGroup.PushBack (OfficeArtChildAnchor(m_nChildX, m_nChildWidth + m_nChildX, m_nChildY, m_nChildHeight + m_nChildY));
else
oShapeGroup.PushBack (OfficeArtClientAnchor(0));
oShapeGroup.PushBack (OfficeArtClientData(1));
return oShapeGroup;
}
private:
std::vector <COArtShape*> m_arShapes;
int m_nBoundWidth;
int m_nBoundHeight;
DOCX::CFPoint m_oCoordSize;
DOCX::CFPoint m_oCoordOrigin;
};
}
namespace ASCDocFileFormat
{
class CShapeRun : public IRunItem
{
public:
CShapeRun () : m_bInline(FALSE)
{
}
CShapeRun (COArtShape* pShape, int nID, unsigned int nSSpa, int nX = 0, int nY = 0, int nWidth = 0, int nHeight = 0) : m_oSpa (nID, nX, nY, nWidth, nHeight), ___refShape(NULL), m_bInline(NULL)
{
Init (nSSpa);
___refShape = pShape;
}
//
virtual unsigned long GetTextSize() const
{
return m_sTextType.size();
}
virtual std::wstring GetAllText() const
{
return m_sTextType;
}
virtual std::vector<Prl> GetRunProperties() const
{
return m_arProperties;
}
virtual unsigned int PrlSize () const
{
return m_arProperties.size();
}
virtual IVirtualConstructor* New() const
{
return new CShapeRun();
}
virtual IVirtualConstructor* Clone() const
{
return new CShapeRun(*this);
}
//
inline void UpdateSizes(const OOX::Logic::ShapeStyle& refStyle)
{
Unit<int, Dx> nX (0);
Unit<int, Dx> nY (0);
if (refStyle.Point.is_init())
{
nX = *refStyle.Point->X;
nY = *refStyle.Point->Y;
}
Unit<int, Dx> nWidth (0);
Unit<int, Dx> nHeight (0);
nWidth = *refStyle.Size->Width;
nHeight = *refStyle.Size->Height;
m_oSpa = Spa (m_oSpa.m_lid, nX, nY, nWidth, nHeight);
m_oSpa.Update();
}
inline void UpdateSizes(int nX, int nY, int nWidth, int nHeight)
{
m_oSpa = Spa (m_oSpa.m_lid, nX, nY, nWidth, nHeight);
m_oSpa.Update();
}
inline void SetWrap(const nullable<OOX::Logic::Wrap>& oWrap)
{
if (oWrap.is_init())
{
SetWrap (oWrap->Type);
}
}
inline void SetWrap(std::string oType)
{
if (oType.length())
{
m_oSpa.wr = DOCXDOCUTILS::GetStyleWrapType(oType);
m_oSpa.Update();
}
}
inline void SetAnchor(bool bHaveAnchor)
{
if (bHaveAnchor)
{
m_oSpa.wr = 3;
m_oSpa.fAnchorLock = true;
m_oSpa.fBelowText = false;
m_oSpa.bx = Spa::TEXT;
m_oSpa.by = Spa::TEXT;
m_oSpa.m_rca.left = 0;
m_oSpa.m_rca.top = 0;
m_oSpa.Update();
m_bInline = TRUE;
}
}
inline void UpdateAnchorPosition(const OOX::Logic::ShapeStyle& style)
{
std::string strPsh = style.msoPositionHorizontal;
std::string strPshRel = style.msoPositionHorizontalRelative;
std::string strPsv = style.msoPositionVertical;
std::string strPsvRel = style.msoPositionVerticalRelative;
if (strPsh.length() || strPshRel.length() || strPsv.length() || strPsvRel.length())
{
if (___refShape)
___refShape->GetSettings()->GetFillStyle().SetUseShapeAnchor(true);
}
if (std::string("margin") == strPshRel)
m_oSpa.bx = Spa::MARGIN;
else if (std::string("page") == strPshRel)
m_oSpa.bx = Spa::PAGE;
if (std::string("margin") == strPsvRel)
m_oSpa.by = Spa::MARGIN;
else if (std::string("page") == strPsvRel)
m_oSpa.by = Spa::PAGE;
m_oSpa.Update();
}
inline void UpdateAnchorPositionImage(const OOX::Logic::Drawing& oXml)
{
std::string strPsh;
std::string strPshRel;
std::string strPsv;
std::string strPsvRel;
if (oXml.Inline->positionHAlign.is_init())
strPsh = oXml.Inline->positionHAlign;
if (oXml.Inline->positionHRelativeFrom.is_init())
strPshRel = oXml.Inline->positionHRelativeFrom;
if (oXml.Inline->positionVAlign.is_init())
strPsv = oXml.Inline->positionVAlign;
if (oXml.Inline->positionVRelativeFrom.is_init())
strPsvRel = oXml.Inline->positionVRelativeFrom;
if (std::string("margin") == strPshRel)
m_oSpa.bx = Spa::MARGIN;
else if (std::string("page") == strPshRel)
m_oSpa.bx = Spa::PAGE;
if (std::string("margin") == strPsvRel)
m_oSpa.by = Spa::MARGIN;
else if (std::string("page") == strPsvRel)
m_oSpa.by = Spa::PAGE;
m_oSpa.Update();
}
inline void SetUseBehind(const OOX::Logic::ShapeStyle& refStyle)
{
if (___refShape)
___refShape->GetSettings ()->SetUseBehind(refStyle);
}
//
inline void SetImageSize(const OOX::Logic::Drawing& oDrawing)
{
Unit<int, Dx> wDx = *oDrawing.Inline->Extent->Size->Width;
Unit<int, Dx> hDx = *oDrawing.Inline->Extent->Size->Height;
Unit<int, Dx> nX = *oDrawing.Inline->anchorXY->X;
Unit<int, Dx> nY = *oDrawing.Inline->anchorXY->Y;
UpdateSizes (nX, nY, wDx, hDx);
}
inline void SetImageWrap(const nullable<OOX::Logic::DrawingWrap>& oWrap)
{
if (oWrap.is_init())
{
if (oWrap->Type == std::string("wrapTopAndBottom"))
m_oSpa.wr = 1;
else if (oWrap->Type == std::string("wrapSquare"))
m_oSpa.wr = 2;
else if (oWrap->Type == std::string("wrapTight"))
m_oSpa.wr = 4;
else if (oWrap->Type == std::string("wrapThrough"))
m_oSpa.wr = 5;
else if (oWrap->Type == std::string("wrapNone"))
m_oSpa.wr = 3;
else
m_oSpa.wr = 0;
m_oSpa.Update();
}
}
inline void SetImageUseBehind(const nullable<bool>& oBehindDoc)
{
if (oBehindDoc.is_init())
{
if (___refShape)
___refShape->GetSettings ()->SetUseBehind((bool)oBehindDoc);
}
}
inline Spa& GetSpa()
{
if (___refShape)
{
m_oSpa.SetFlip(___refShape->IsAngleBoundFlip());
}
return m_oSpa;
}
//
inline bool IsInline() const
{
return m_bInline;
}
inline COArtShape* GetReference() const
{
return ___refShape;
}
inline int GetWidth() const
{
return m_oSpa.m_rca.right - m_oSpa.m_rca.left;
}
inline int GetHeight() const
{
return m_oSpa.m_rca.bottom - m_oSpa.m_rca.top;
}
private:
inline void Init (unsigned int nSSpa)
{
m_sTextType = std::wstring(&TextMark::DrawnObject);
m_arProperties.push_back (Prl ((short)DocFileFormat::sprmCFSpec, (unsigned char*)(&CFSpec)));
m_arProperties.push_back (Prl ((short)DocFileFormat::sprmCPicLocation, (unsigned char*)(&nSSpa))); // offset spa in storage from 0
}
private:
static const unsigned char CFSpec = 1;
Spa m_oSpa;
std::wstring m_sTextType;
std::vector <Prl> m_arProperties;
COArtShape* ___refShape; // ONLY FOR INNER SETTER
bool m_bInline;
};
class CInlineShape : public IRunItem, public IOperand // для картинок c обтеканием вокруг текста
{
public:
CInlineShape () : m_oBinPictureInfo(), m_sTextType (std::wstring (&TextMark::Picture))
{
}
CInlineShape (const CShapeRun& oRun) : m_oBinPictureInfo(), m_sTextType (std::wstring (&TextMark::Picture))
{
/*
// ONLY FOR TEST
#ifdef _DEBUG
ASCDocFormatUtils::BitSet oShapeSettings (4);
oShapeSettings.SetBit (0, 0); // Group - A bit that specifies whether this shape is a group shape.
oShapeSettings.SetBit (0, 1); // Child - A bit that specifies whether this shape is a child shape.
oShapeSettings.SetBit (0, 2); // Patriarch - A bit that specifies whether this shape is the topmost group shape. Each drawing contains one topmost group shape
oShapeSettings.SetBit (0, 3); // Deleted - A bit that specifies whether this shape has been deleted.
oShapeSettings.SetBit (0, 4); // OleShape - A bit that specifies whether this shape is an OLE object.
oShapeSettings.SetBit (0, 5); // HaveMaster - A bit that specifies whether this shape has a valid master in the hspMaster property, as defined in section
oShapeSettings.SetBit (0, 6); // FlipH - A bit that specifies whether this shape is horizontally flipped.
oShapeSettings.SetBit (0, 7); // FlipV - A bit that specifies whether this shape is vertically flipped.
oShapeSettings.SetBit (0, 8); // Connector - A bit that specifies whether this shape is a connector shape.
oShapeSettings.SetBit (true, 9); // HaveAnchor - A bit that specifies whether this shape has an anchor.
oShapeSettings.SetBit (0, 10); // Background - A bit that specifies whether this shape is a background shape.
oShapeSettings.SetBit (true, 11); // HaveSpt - A bit that specifies whether this shape has a shape type property.
OfficeArt::OfficeArtFSP ShapeProp (OfficeArt::Enumerations::msosptUpArrow, 1024, FormatUtils::BytesToUInt32 (oShapeSettings.GetBytes(), 0, sizeof(unsigned int)));
OfficeArt::OfficeArtSpContainer shape;
shape.PushBack (ShapeProp);
OfficeArt::OfficeArtRGFOPTE oTable;
OfficeArt::OfficeArtFOPTE oEntry (OfficeArt::OfficeArtFOPTEOPID (OfficeArt::Enumerations::protectionBooleans, false, false), 0x01400140);
oTable.PushComplexProperty (OfficeArt::ComplexOfficeArtProperty (oEntry, NULL));
OfficeArt::OfficeArtFOPTE oCropFromTop (OfficeArt::OfficeArtFOPTEOPID (OfficeArt::Enumerations::cropFromTop, false, false), 0xffff0010);
oTable.PushComplexProperty (OfficeArt::ComplexOfficeArtProperty (oCropFromTop, NULL));
OfficeArt::OfficeArtFOPTE oCropFromBottom (OfficeArt::OfficeArtFOPTEOPID (OfficeArt::Enumerations::cropFromBottom, false, false), 0x0000fff0);
oTable.PushComplexProperty (OfficeArt::ComplexOfficeArtProperty (oCropFromBottom, NULL));
OfficeArt::OfficeArtRGFOPTE oTable2;
OfficeArt::OfficeArtFOPTE oDiagramBooleans (OfficeArt::OfficeArtFOPTEOPID (OfficeArt::Enumerations::diagramBooleans, false, false), 0x00010001);
oTable2.PushComplexProperty (OfficeArt::ComplexOfficeArtProperty (oDiagramBooleans, NULL));
OfficeArt::OfficeArtFOPT fopt (oTable);
shape.PushBack (fopt);
OfficeArt::OfficeArtFOPT fopt2 (oTable2);
shape.PushBack (fopt2);
OfficeArt::OfficeArtClientAnchor anchor (0x80000000);
shape.PushBack (anchor);
#endif
*/
OfficeArt::OfficeArtSpContainer oShape = oRun.GetReference()->GetSimplyShape();
//OfficeArt::OfficeArtClientAnchor oAnchor (0x80000000);
//oShape.PushBack (oAnchor);
OfficeArt::OfficeArtInlineSpContainer oPicture (oShape);
//OfficeArt::OfficeArtInlineSpContainer oPicture (shape);
//OfficeArt::OfficeArtFBSE oBlipStoreEntry (FALSE, OfficeArt::Enumerations::msoblipJPEG, OfficeArt::Enumerations::msoblipJPEG, 0);
//oPicture.PushBack(oBlipStoreEntry);
int IMAGE_RATIO = 1000; // TODO : пересчет
PICMID oBorders (oRun.GetWidth(), oRun.GetHeight(), IMAGE_RATIO, IMAGE_RATIO, Brc80(0), Brc80(0), Brc80(0), Brc80(0));
PICF oPictureInfo (oPicture.Size(), oBorders);
m_oBinPictureInfo = PICFAndOfficeArtData (oPictureInfo, oPicture);
if (BinaryStorageSingleton::Instance())
{
int dataStreamOffset = BinaryStorageSingleton::Instance()->PushData( (const unsigned char*)m_oBinPictureInfo, m_oBinPictureInfo.Size());
m_arProperties.push_back (Prl((short)DocFileFormat::sprmCPicLocation, (unsigned char*)(&dataStreamOffset)));
m_arProperties.push_back (Prl((short)DocFileFormat::sprmCFSpec, (unsigned char*)(&CFSpec)));
}
}
CInlineShape (const CInlineShape& oShape) : m_oBinPictureInfo(oShape.m_oBinPictureInfo), m_sTextType(oShape.m_sTextType), m_arProperties(oShape.m_arProperties)
{
}
virtual ~CInlineShape()
{
}
virtual operator unsigned char*() const
{
return (unsigned char*)(m_oBinPictureInfo);
}
virtual operator const unsigned char*() const
{
return (const unsigned char*)(m_oBinPictureInfo);
}
virtual unsigned int Size() const
{
return m_oBinPictureInfo.Size();
}
virtual IVirtualConstructor* New() const
{
return new CInlineShape();
}
virtual IVirtualConstructor* Clone() const
{
return new CInlineShape(*this);
}
virtual unsigned long GetTextSize() const
{
return m_sTextType.size();
}
virtual wstring GetAllText() const
{
return m_sTextType;
}
virtual std::vector<Prl> GetRunProperties() const
{
std::vector<Prl> prls;
for (std::list<Prl>::const_iterator iter = m_arProperties.begin(); iter != m_arProperties.end(); ++iter)
prls.push_back(*iter);
return prls;
}
virtual unsigned int PrlSize() const
{
return (unsigned int)m_arProperties.size();
}
private:
static const unsigned char CFSpec = 1;
PICFAndOfficeArtData m_oBinPictureInfo;
std::wstring m_sTextType;
std::list<Prl> m_arProperties;
};
}
namespace ASCDocFileFormat
{
class COfficeArtStorage // формирует буфер данных из всех объектов OfficeArt
{
private:
friend class COArtStorage;
public:
COfficeArtStorage () : m_oMainDrawings (MAIN_DOCUMENT), m_oHeaderDrawings(HEADER_DOCUMENT)
{
m_nSize = 0;
m_nID = 1025;
m_nHdID = 2048;
m_nImageID = 0;
m_nMainTbID = 1;
m_nHeadTbID = 1;
}
virtual ~COfficeArtStorage ()
{
Clear ();
}
inline int GenID (int Location)
{
if (HEADER_DOCUMENT == Location)
return ++m_nHdID;
return ++m_nID;
}
//
inline void Add (COArtShape* pShape, const Spa& oSpa, int Location)
{
if (pShape)
{
if (MAIN_DOCUMENT == Location)
{
pShape->SetID(m_nID);
m_arMainShapes.push_back (pShape);
m_arrSpa.push_back (oSpa);
}
if (HEADER_DOCUMENT == Location)
{
pShape->SetID(m_nHdID);
m_arHeaderShapes.push_back (pShape);
m_arrHeadSpa.push_back (oSpa);
}
if (pShape->IsTextureMode())
{
SaveBlipImage(pShape);
}
}
}
inline void AddImage (COArtShape* pImage, const Spa& oSpa, int Location)
{
if (pImage)
{
Add (pImage, oSpa, Location);
SaveBlipImage(pImage);
}
}
inline void AddGroup (COArtGroup* pShape, const Spa& oSpa, int Location)
{
if (pShape)
{
if (MAIN_DOCUMENT == Location)
{
//pShape->SetID(m_nID);
m_arMainShapes.push_back (pShape);
m_arrSpa.push_back (oSpa);
}
if (HEADER_DOCUMENT == Location)
{
//pShape->SetID(m_nHdID);
m_arHeaderShapes.push_back (pShape);
m_arrHeadSpa.push_back (oSpa);
}
}
}
inline void SaveBlipImage (COArtShape* pImage)
{
if (pImage)
{
pImage->SetImageIndex (++m_nImageID);
m_arrRefImages.push_back (pImage);
}
}
//
inline unsigned char* Get()
{
return (unsigned char*)(m_oArtContent);
}
inline unsigned int Size()
{
if ((0 == m_arMainShapes.size()) && (0 == m_arHeaderShapes.size()))
return 0;
return m_oArtContent.Size();
}
// Spa
inline const std::vector<Spa>& GetSpa (int nLocation)
{
if (HEADER_DOCUMENT == nLocation)
return m_arrHeadSpa;
return m_arrSpa;
}
inline unsigned int GetOffSetSpa (int nLocation)
{
unsigned int nSize = 0;
if (MAIN_DOCUMENT == nLocation)
{
for (size_t i = 0; i < m_arrHeadSpa.size(); ++i)
nSize += m_arrHeadSpa[i].Size();
}
if (HEADER_DOCUMENT == nLocation)
{
for (size_t i = 0; i < m_arrHeadSpa.size(); ++i)
nSize += m_arrHeadSpa[i].Size();
}
return nSize;
}
inline bool Compile ()
{
if ((0 == m_arMainShapes.size()) && (0 == m_arHeaderShapes.size()))
return FALSE;
int SavedShapes = 0;
int DrawingsCount = 0;
int IdClusters = 1;
if (m_arMainShapes.size())
{
SavedShapes += m_arMainShapes.size() + 1;
++DrawingsCount;
++IdClusters;
}
if (m_arHeaderShapes.size())
{
SavedShapes += m_arHeaderShapes.size() + 1;
++DrawingsCount;
++IdClusters;
}
OfficeArtFDGGBlock drawingGroup;
drawingGroup.SetHead (OfficeArtFDGG (max(m_nID,m_nHdID), IdClusters, SavedShapes, DrawingsCount ) );
int ClusterID = 0;
if (m_arHeaderShapes.size())
{
++ClusterID;
drawingGroup.PushBack(OfficeArtIDCL (ClusterID, 3));
}
if (m_arMainShapes.size())
{
++ClusterID;
drawingGroup.PushBack(OfficeArtIDCL (ClusterID, 2));
}
OfficeArtSplitMenuColorContainer oSplitColors (0x0000ffff, 0x00ff0000, 0x00808080, 0x100000f7);
m_oDrawingGroupData.PushBack (drawingGroup);
m_oDrawingGroupData.PushBack (oSplitColors);
if (m_arrRefImages.size())
{
m_oDrawingGroupData.PushBack(CreateImageStorage()); // ссылки на индексы изображений пишутся в свойство Pib
}
m_oArtContent.PushBack (m_oDrawingGroupData);
if (m_arHeaderShapes.size())
{
m_oHeaderDrawings.PushBack (CreateDrawing (HEADER_DOCUMENT));
m_oArtContent.PushBack (m_oHeaderDrawings);
}
if (m_arMainShapes.size())
{
m_oMainDrawings.PushBack (CreateDrawing (MAIN_DOCUMENT));
m_oArtContent.PushBack (m_oMainDrawings);
}
return TRUE;
}
//
inline void WriteBlips () // Картинка пишется в WordStream, в FBSE пишем смещение Blip в этом стриме
{
STREAMS::CSWordWriter* pBin = STREAMS::CSWordWriter::Instance();
if (pBin)
{
if (pBin->Get())
{
for (size_t i = 0; i < m_arrRefImages.size(); ++i)
{
OfficeArtBlip* pBlip = m_arrRefImages[i]->CreateBlip();
if (pBlip)
{
unsigned long bufpos = pBin->BufferPos();
if (pBin->Push((*pBlip), pBlip->Size()))
{
m_arrRefImages[i]->SetBlipPos(bufpos);
}
RELEASEOBJECT(pBlip);
}
}
}
}
}
// TB
inline CTextBoxRef* GenTbRef (int nLocation)
{
CTextBoxRef* pTbRef = new CTextBoxRef (GenTbID(nLocation));
if (pTbRef)
{
if (HEADER_DOCUMENT == nLocation)
m_arHeaderTbRef.push_back (pTbRef);
else
m_arMainTbRef.push_back (pTbRef);
}
return pTbRef;
}
inline const std::vector<CTextBoxRef*>& GetTbRefs (int Location)
{
if (HEADER_DOCUMENT == Location)
return m_arHeaderTbRef;
return m_arMainTbRef;
}
private:
inline void Clear ()
{
for (size_t i = 0; i < m_arMainShapes.size(); ++i)
RELEASEOBJECT(m_arMainShapes[i]);
for (size_t i = 0; i < m_arHeaderShapes.size(); ++i)
RELEASEOBJECT(m_arHeaderShapes[i]);
for (size_t i = 0; i < m_arMainTbRef.size(); ++i)
RELEASEOBJECT(m_arMainTbRef[i]);
for (size_t i = 0; i < m_arHeaderTbRef.size(); ++i)
RELEASEOBJECT(m_arHeaderTbRef[i]);
}
//
inline OfficeArtDgContainer CreateDrawing (int Location)
{
OfficeArtDgContainer container;
if (MAIN_DOCUMENT == Location)
{
if (m_arMainShapes.size())
{
OfficeArtFDG drawingData ((OfficeArt::MSOSPID)(m_arMainShapes[0]->GetID() + 1), m_arMainShapes.size() * 2); // 0xF008
container.PushBack(drawingData);
container.PushBack(CreateGroup(Location));
}
}
if (HEADER_DOCUMENT == Location)
{
if (m_arHeaderShapes.size())
{
OfficeArtFDG drawingData ((OfficeArt::MSOSPID)(m_arHeaderShapes[0]->GetID() + 1), m_arHeaderShapes.size() * 2); // 0xF008
container.PushBack(drawingData);
container.PushBack(CreateGroup(Location));
}
}
return container;
}
inline OfficeArtSpgrContainer CreateGroup (int Location) // пока группировка не сделана, структура будет плоской по содержанию элементов
{
OfficeArtSpgrContainer oGroup; // 0xF003 - OfficeArtSpgrContainer
if (MAIN_DOCUMENT == Location)
{
oGroup.PushBack(CreateTopShape(m_arMainShapes[0]->GetID() - 1));
for (size_t i = 0; i < m_arMainShapes.size(); ++i)
{
if (m_arMainShapes[i]->IsGroup())
oGroup.PushBack(m_arMainShapes[i]->GetShapes());
else
oGroup.PushBack(m_arMainShapes[i]->GetShape());
}
}
if (HEADER_DOCUMENT == Location)
{
oGroup.PushBack(CreateTopShape(m_arHeaderShapes[0]->GetID() - 1));
for (size_t i = 0; i < m_arHeaderShapes.size(); ++i)
{
if (m_arHeaderShapes[i]->IsGroup())
oGroup.PushBack(m_arHeaderShapes[i]->GetShapes());
else
oGroup.PushBack(m_arHeaderShapes[i]->GetShape());
}
}
return oGroup;
}
inline OfficeArtSpContainer CreateTopShape (int nID) // create top-level shape
{
FSPGR Coordinates (0,0,0,0);
ASCDocFormatUtils::BitSet oShapeSettings (4);
oShapeSettings.SetBit (true, 0); // Group - A bit that specifies whether this shape is a group shape.
oShapeSettings.SetBit (0, 1); // Child - A bit that specifies whether this shape is a child shape.
oShapeSettings.SetBit (true, 2); // Patriarch - A bit that specifies whether this shape is the topmost group shape. Each drawing contains one topmost group shape
oShapeSettings.SetBit (0, 3); // Deleted - A bit that specifies whether this shape has been deleted.
oShapeSettings.SetBit (0, 4); // OleShape - A bit that specifies whether this shape is an OLE object.
oShapeSettings.SetBit (0, 5); // HaveMaster - A bit that specifies whether this shape has a valid master in the hspMaster property, as defined in section
oShapeSettings.SetBit (0, 6); // FlipH - A bit that specifies whether this shape is horizontally flipped.
oShapeSettings.SetBit (0, 7); // FlipV - A bit that specifies whether this shape is vertically flipped.
oShapeSettings.SetBit (0, 8); // Connector - A bit that specifies whether this shape is a connector shape.
oShapeSettings.SetBit (0, 9); // HaveAnchor - A bit that specifies whether this shape has an anchor.
oShapeSettings.SetBit (0, 10); // Background - A bit that specifies whether this shape is a background shape.
oShapeSettings.SetBit (0, 11); // HaveSpt - A bit that specifies whether this shape has a shape type property.
OfficeArtFSP ShapeProp (OfficeArt::Enumerations::msosptNotPrimitive, nID, FormatUtils::BytesToUInt32 (oShapeSettings.GetBytes(), 0, sizeof(unsigned int)));
OfficeArtSpContainer oShapeGroup;
oShapeGroup.PushBack (Coordinates);
oShapeGroup.PushBack (ShapeProp);
return oShapeGroup;
}
// FBSE
inline OfficeArtBStoreContainer CreateImageStorage () // пишется отдельным паком
{
OfficeArtBStoreContainer container;
for (size_t i = 0; i < m_arrRefImages.size(); ++i)
container.PushBack(m_arrRefImages[i]->GetFBSE());
return container;
}
// TB
inline int GenTbID (int Location)
{
if (HEADER_DOCUMENT == Location)
return m_nHeadTbID++;
return m_nMainTbID++;
}
private:
int m_nID;
int m_nHdID;
int m_nImageID; // Индекс картинки в OfficeArtBStoreContainer
unsigned int m_nSize;
// ODRAW
OfficeArtContent m_oArtContent; // DrawingGroupData(OfficeArtDggContainer) + Drawings(OfficeArtWordDrawing)
OfficeArtDggContainer m_oDrawingGroupData; // DrawingGroupData 0xF000
// MAIN DOCUMENT
std::vector<Spa> m_arrSpa;
OfficeArtWordDrawing m_oMainDrawings; // dgglbl(0)
std::vector<COArtShape*> m_arMainShapes;
// HEADER DOCUMENT
std::vector<Spa> m_arrHeadSpa;
OfficeArtWordDrawing m_oHeaderDrawings; // dgglbl(1)
std::vector<COArtShape*> m_arHeaderShapes;
std::vector<COArtShape*> m_arrRefImages; // FBSE
// TEXT BOXES
int m_nMainTbID;
int m_nHeadTbID;
std::vector<CTextBoxRef*> m_arMainTbRef;
std::vector<CTextBoxRef*> m_arHeaderTbRef;
};
class COArtStorage : public Singleton<COArtStorage>, public COfficeArtStorage
{
protected:
COArtStorage () : COfficeArtStorage() {}
virtual ~COArtStorage() {}
friend class Singleton<COArtStorage>;
};
}
namespace ASCDocFileFormat
{
class COArtBuilder
{
private:
struct CMapShape
{
public:
CMapShape () : m_nType(0)
{
}
CMapShape (int nType) : m_nType(nType)
{
}
CMapShape (std::string ID, int nType) : m_ID(ID), m_nType(nType)
{
}
public:
std::string m_ID;
int m_nType;
std::string m_strPath;
std::string m_strCoordSize;
std::string m_strConnection;
std::string m_strAdjustValues;
std::string m_strSites;
std::string m_strSitesDir;
std::string m_strFormulas;
std::string m_textboxrect;
};
public:
COArtBuilder() : m_nLocation (0), m_pLastTbRef(NULL)
{
}
bool BuildShapeRun (const OOX::Logic::Pict& oPicture, CShapeRun& oShapeRun);
bool BuildImageRun (const OOX::Logic::Shape& oXml, const std::wstring& strFileName, Run& oRun);
bool BuildImageRun (const OOX::Image& oXml, const OOX::Logic::Drawing& oXml2, Run& oRun);
template<class T> bool BuildShapeWithTextureFill (const T& oXml, const std::wstring& strFileName, int Type, const OOX::Logic::Pict& oPicture, Run& oRun)
{
if (typeid(T) == typeid(OOX::Logic::Shape))
{
m_strTextureFile = strFileName;
CShapeRun shapeRun = BuildOdbflRun <OOX::Logic::Shape> (oPicture.shape, GetRefShape(oPicture));
oRun.AddRunItem (shapeRun);
return TRUE;
}
COArtStorage* pStorage = COArtStorage::Instance();
if (pStorage)
{
COArtImage* pImage = new COArtImage(strFileName, pStorage->GenID (m_nLocation));
if (pImage)
{
CShapeRun oShapeRun (pImage, pImage->GetID(), pStorage->GetOffSetSpa(m_nLocation)); // смещение берем от предыдущего элемента
oShapeRun.UpdateSizes (*oXml.style); // размеры
oShapeRun.SetWrap (oXml.Wrap); // обтекание
oShapeRun.SetAnchor ((bool)(oXml.anchorlock.is_init()));
oShapeRun.SetUseBehind (*oXml.style);
pImage->SetupFromStyleXml(oXml.style);
SetupTextureShape <T>(oXml, CMapShape(), pImage);
pImage->SetShapeType(Type);
pStorage->AddImage (pImage, oShapeRun.GetSpa(), m_nLocation);
oRun.AddRunItem (oShapeRun);
return TRUE;
}
}
return FALSE;
}
//
COArtShape* BuildOArtShape (const OOX::Logic::Shape& oXml, const OOX::Logic::Group& oXmlGroup);
COArtShape* BuildOArtImage (const OOX::Logic::Shape& oXml, const std::wstring& strFileName);
//
CShapeRun BuildGroupRun (const OOX::Logic::Group& oXml, COArtGroup* pShape);
template<class T> COArtShape* BuildOArtGroupShape (const T& oXml, int nType)
{
COArtShape* pShape = InternalBuildOArtShape <T> (oXml,CMapShape(nType));
if (pShape)
{
const OOX::Logic::ShapeStyle& oStyle = (*oXml.style);
Unit<int, Pt> nX (0);
Unit<int, Pt> nY (0);
if (oStyle.leftTop.is_init())
{
nX = *oStyle.leftTop->X;
nY = *oStyle.leftTop->Y;
}
Unit<int, Pt> nWidth (*oStyle.Size->Width);
Unit<int, Pt> nHeight (*oStyle.Size->Height);
if (typeid(T) == typeid(OOX::Logic::Line)) // для DOC файла точки начала и конца линии устанавливаются в структуре SPA
{
OOX::Logic::Line* pLine = (OOX::Logic::Line*)(&oXml);
if (pLine)
{
if (pLine->from.is_init() && pLine->to.is_init())
{
DOCX::CPointF oFrom(pLine->from);
DOCX::CPointF oTo(pLine->to);
nX = oFrom.GetTX();
nY = oFrom.GetTY();
nWidth = oTo.GetTX() - oFrom.GetTX();
nHeight = oTo.GetTY() - oFrom.GetTY();
}
}
}
pShape->SetChildeAnchorBounds (nX, nY, nWidth, nHeight, pShape->IsAngleBoundFlip());
}
return pShape;
}
//
inline void SetLocation (int nLocation)
{
// 0 - Main Document
// 1 - Header Document
m_nLocation = nLocation;
}
inline int Location ()
{
return m_nLocation;
}
inline CTextBoxRef* LastTbRef () // если у фигуры есть внутренний контент, индексируем его (обычный список)
{
CTextBoxRef* pLastTbRef = m_pLastTbRef;
m_pLastTbRef = NULL;
return pLastTbRef;
}
//
inline void SetTextureFill (const std::wstring& file)
{
m_strTextureFile = file;
}
private:
template<class T> CShapeRun BuildOdbflRun (const T& oXmlShape, CMapShape& oInnerRef);
template<class T> COArtShape* InternalBuildOArtShape (const T& oXmlShape, CMapShape& oInnerRef);
//
inline CMapShape GetRefShape (const OOX::Logic::Pict& oPicture) // DOCX может содержать ссылки на дубликаты shapetype
{
const OOX::Logic::Shape& shape = oPicture.shape;
map <string, CMapShape>::iterator id = m_oMapShapes.find (shape.Type);
if (id != m_oMapShapes.end())
return id->second;
CMapShape oMapShape;
if (oPicture.shapetype.is_init())
{
const OOX::Logic::ShapeType& shapetype = *oPicture.shapetype;
oMapShape.m_strPath = shapetype.path;
oMapShape.m_strCoordSize = shapetype.coordsize;
if (shapetype.adj.is_init())
oMapShape.m_strAdjustValues = shapetype.adj;
if (shapetype.formulas.is_init())
oMapShape.m_strFormulas = shapetype.formulas->toXML().ToString();
if (shapetype.PathElement.is_init())
{
const OOX::Logic::Path& path = shapetype.PathElement;
if (path.ConnectType.is_init())
oMapShape.m_strConnection = path.ConnectType;
if (path.ConnectLocs.is_init())
oMapShape.m_strSites = path.ConnectLocs;
if (path.ConnectAngles.is_init())
oMapShape.m_strSitesDir = path.ConnectAngles;
if (path.TextBoxRect.is_init())
oMapShape.m_textboxrect = path.TextBoxRect;
}
}
if (shape.path.is_init())
oMapShape.m_strPath = shape.path;
if (shape.coordsize.is_init())
oMapShape.m_strCoordSize = shape.coordsize;
if (shape.adj.is_init())
oMapShape.m_strAdjustValues = shape.adj;
if (oPicture.shapetype.is_init())
{
int nType = (*oPicture.shapetype).Spt;
std::string strID = std::string("#"); strID += oPicture.shapetype->Id;
oMapShape.m_ID = strID;
oMapShape.m_nType = nType;
if (m_oMapShapes.find (strID) == m_oMapShapes.end())
m_oMapShapes [strID] = oMapShape;
}
return oMapShape;
}
inline CMapShape GetRefShape (const OOX::Logic::Shape& oShape, const OOX::Logic::Group& oXmlGroup) // DOCX может содержать ссылки на дубликаты shapetype
{
map <string, CMapShape>::iterator id = m_oMapShapes.find (oShape.Type);
if (id != m_oMapShapes.end())
return id->second;
CMapShape oMapShape;
for (size_t i = 0; i < oXmlGroup.items->size(); ++i)
{
const OOX::Logic::GroupItem& oXmlItem = oXmlGroup.items->operator[](i);
if (oXmlItem.is<OOX::Logic::ShapeType>())
{
const OOX::Logic::ShapeType& shapetype = oXmlItem.as<OOX::Logic::ShapeType>();
std::string strID = std::string("#"); strID += shapetype.Id;
if (strID == oShape.Type)
{
oMapShape.m_strPath = shapetype.path;
oMapShape.m_strCoordSize = shapetype.coordsize;
if (shapetype.adj.is_init())
oMapShape.m_strAdjustValues = shapetype.adj;
if (shapetype.formulas.is_init())
oMapShape.m_strFormulas = shapetype.formulas->toXML().ToString();
if (shapetype.PathElement.is_init())
{
const OOX::Logic::Path& oPath = shapetype.PathElement;
if (oPath.ConnectType.is_init())
oMapShape.m_strConnection = oPath.ConnectType;
if (oPath.ConnectLocs.is_init())
oMapShape.m_strSites = oPath.ConnectLocs;
if (oPath.ConnectAngles.is_init())
oMapShape.m_strSitesDir = oPath.ConnectAngles;
if (oPath.TextBoxRect.is_init())
oMapShape.m_textboxrect = oPath.TextBoxRect;
}
if (oShape.path.is_init())
oMapShape.m_strPath = oShape.path;
if (oShape.coordsize.is_init())
oMapShape.m_strCoordSize = oShape.coordsize;
if (oShape.adj.is_init())
oMapShape.m_strAdjustValues = oShape.adj;
oMapShape.m_ID = strID;
oMapShape.m_nType = shapetype.Spt;
if (m_oMapShapes.find (strID) == m_oMapShapes.end())
m_oMapShapes [strID] = oMapShape;
return oMapShape;
}
}
}
if (oShape.path.is_init())
oMapShape.m_strPath = oShape.path;
if (oShape.coordsize.is_init())
oMapShape.m_strCoordSize = oShape.coordsize;
if (oShape.adj.is_init())
oMapShape.m_strAdjustValues = oShape.adj;
return oMapShape;
}
//
template<class T> void SetupTextureShape (const T& oXmlShape, CMapShape& oInnerRef, COArtImage* pShape)
{
if (pShape)
{
int nType = oInnerRef.m_nType;
if (nType == OfficeArt::Enumerations::msosptTextStop) // пока не понятно что делать с такими фигурами
nType = 0;
pShape->SetShapeType (nType);
if (pShape->GetSettings ())
{
// fill
if (oXmlShape.fillstyle.is_init())
pShape->GetSettings ()->GetFillStyle().Read (oXmlShape.fillstyle);
// line
if (oXmlShape.linestyle.is_init())
pShape->GetSettings ()->GetLineStyle().Read (oXmlShape.linestyle);
// shadow
if (oXmlShape.shadow.is_init())
pShape->GetSettings ()->GetShadowStyle().Read (oXmlShape.shadow);
pShape->SetupFromStyleXml(oXmlShape.style);
if (0 == nType)
{
if (oInnerRef.m_strPath.length())
pShape->GetSettings()->GetGeometryStyle().SetPath(oInnerRef.m_strPath, oInnerRef.m_strAdjustValues, oInnerRef.m_strFormulas);
if (oInnerRef.m_strCoordSize.length())
pShape->GetSettings()->GetGeometryStyle().SetRightBottom(oInnerRef.m_strCoordSize);
if (oInnerRef.m_strConnection.length())
pShape->GetSettings()->GetGeometryStyle().SetConnection(oInnerRef.m_strConnection);
if (oInnerRef.m_strSites.length())
pShape->GetSettings()->GetGeometryStyle().SetSites(oInnerRef.m_strSites);
if (oInnerRef.m_strSitesDir.length())
pShape->GetSettings()->GetGeometryStyle().SetSitesDir(oInnerRef.m_strSitesDir);
if (oInnerRef.m_textboxrect.length())
pShape->GetSettings()->GetGeometryStyle().SetInscribe(oInnerRef.m_textboxrect);
}
if (oInnerRef.m_strAdjustValues.length())
pShape->GetSettings()->GetGeometryStyle().SetAdjustValues (oInnerRef.m_strAdjustValues);
if (typeid(T) == typeid(OOX::Logic::Roundrect)) // для DOC файла велична арки пишется в adjust свойство
{
OOX::Logic::Roundrect* roundrect = (OOX::Logic::Roundrect*)(&oXmlShape);
if (roundrect)
{
if(roundrect->arcsize.is_init())
{
pShape->GetSettings()->GetGeometryStyle().SetAdjustValues (roundrect->arcsize, true);
}
}
}
pShape->GetSettings ()->SetWrapDist (oXmlShape.style);
}
}
}
//
//inline void UpdateAnchorSpa(const OOX::Logic::ShapeStyle& style)
//{
//
//}
private:
int m_nLocation;
std::map <std::string, CMapShape> m_oMapShapes; // < id="_x0000_t13" // o:spt="13" > - v:shapetype - reference for all same shapes
CTextBoxRef* m_pLastTbRef;
std::wstring m_strTextureFile;
};
}
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "ShapePath.h"
namespace ASCDocFileFormat
{
LONG CFormula::Calculate(CFormulasManager* pManager)
{
if ((0 > m_lIndex) || (m_lIndex >= pManager->m_arResults.size()))
return 0;
if (0xFFFFFFFF != pManager->m_arResults[m_lIndex])
{
return pManager->m_arResults[m_lIndex];
}
LONG lResult = 0;
LONG lGuidesCount = pManager->m_arFormulas.size();
LONG lAdjCount = pManager->m_pAdjustments->size();
LONG a1 = m_lParam1;
if (ptFormula == m_eType1)
{
a1 = (m_lParam1 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam1].Calculate(pManager);
}
else if (ptAdjust == m_eType1)
{
a1 = (m_lParam1 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam1];
}
LONG b1 = m_lParam2;
if (ptFormula == m_eType2)
{
b1 = (m_lParam2 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam2].Calculate(pManager);
}
else if (ptAdjust == m_eType2)
{
b1 = (m_lParam2 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam2];
}
LONG c1 = m_lParam3;
if (ptFormula == m_eType3)
{
c1 = (m_lParam3 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam3].Calculate(pManager);
}
else if (ptAdjust == m_eType3)
{
c1 = (m_lParam3 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam3];
}
double a = (double)a1;
double b = (double)b1;
double c = (double)c1;
double dRes = 0.0;
try
{
// теперь нужно просто посчитать
switch (m_eFormulaType)
{
case ftSum: { dRes = a + b - c; break; }
case ftProduct: {
if (0 == c)
c = 1;
dRes = a * b / c;
break;
}
case ftMid: { dRes = (a + b) / 2.0; break; }
case ftAbsolute: { dRes = abs(a); break; }
case ftMin: { dRes = min(a, b); break; }
case ftMax: { dRes = max(a, b); break; }
case ftIf: { dRes = (a > 0) ? b : c; break; }
case ftSqrt: { dRes = sqrt(a); break; }
case ftMod: { dRes = sqrt(a*a + b*b + c*c); break; }
case ftSin: {
//dRes = a * sin(b);
//dRes = a * sin(b / pow2_16);
dRes = a * sin(M_PI * b / (pow2_16 * 180));
break;
}
case ftCos: {
//dRes = a * cos(b);
//dRes = a * cos(b / pow2_16);
dRes = a * cos(M_PI * b / (pow2_16 * 180));
break;
}
case ftTan: {
//dRes = a * tan(b);
dRes = a * tan(M_PI * b / (pow2_16 * 180));
break;
}
case ftAtan2: {
dRes = 180 * pow2_16 * atan2(b,a) / M_PI;
break;
}
case ftSinatan2: { dRes = a * sin(atan2(c,b)); break; }
case ftCosatan2: { dRes = a * cos(atan2(c,b)); break; }
case ftSumangle: {
//dRes = a + b - c;
dRes = a + b * pow2_16 - c * pow2_16;
/*while (23592960 < dRes)
{
dRes -= 23592960;
}
while (-23592960 > dRes)
{
dRes += 23592960;
}*/
break;
}
case ftEllipse: {
if (0 == b)
b = 1;
dRes = c * sqrt(1-(a*a/(b*b)));
break;
}
case ftVal: { dRes = a; break; }
default: break;
};
}
catch (...)
{
dRes = 0;
}
lResult = (LONG)dRes;
pManager->m_arResults[m_lIndex] = lResult;
return lResult;
}
}
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <math.h>
#include "OfficeArt/Common.h"
#include "OfficeArt/MSOArray.h"
#include "OfficeArt/Enumerations.h"
#include "../../Common/DocxFormat/Source/XML/xmlutils.h"
#include "../Common/FormatUtils.h"
#define M_PI 3.14159265358979323846
const double ShapeSize = 43200.0;
const LONG ShapeSizeVML = 21600;
const double RadKoef = M_PI/10800000.0;
#define pow2_16 65536
namespace ASCDocFileFormat
{
enum FormulaType
{
// VML
ftSum = 0, // a + b - c
ftProduct = 1, // a * b / c
ftMid = 2, // (a + b) / 2
ftAbsolute = 3, // abs(a)
ftMin = 4, // min(a,b)
ftMax = 5, // max(a,b)
ftIf = 6, // if a > 0 ? b : c
ftMod = 7, // sqrt(a)
ftAtan2 = 8, // atan2(b,a)
ftSin = 9, // a * sin(b)
ftCos = 10, // a * cos(b)
ftCosatan2 = 11, // a * cos(atan2(c,b))
ftSinatan2 = 12, // a * sin(atan2(c,b))
ftSqrt = 13, // sqrt(a*a + b*b + c*c)
ftSumangle = 14, // a + b° - c°
ftEllipse = 15, // c * sqrt(1-(a/b)2)
ftTan = 16, // a * tan(b)
ftVal = 17 // a
};
enum ParamType
{
ptFormula = 0,
ptAdjust = 1,
ptValue = 2
};
static bool IsDigit(const TCHAR& c)
{
return (((c >= '0') && (c <= '9')) || (c == '-'));
}
static bool IsAlpha(const TCHAR& c)
{
return (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')));
}
static bool IsNumber(CString str)
{
for (int nIndex = 0; nIndex < str.GetLength(); ++nIndex)
{
if (!IsDigit(str[nIndex]))
{
return false;
}
}
return true;
}
static CString ToString(LONG val)
{
CString str = _T("");
str.Format(_T("%d"), val);
return str;
}
static void ParseString(CString strDelimeters, CString strSource, std::vector<CString>* pArrayResults, bool bIsCleared = true)
{
if (NULL == pArrayResults)
return;
if (bIsCleared)
pArrayResults->clear();
CString resToken;
int curPos= 0;
resToken = strSource.Tokenize(strDelimeters, curPos);
while (resToken != _T(""))
{
pArrayResults->push_back(resToken);
resToken = strSource.Tokenize(strDelimeters, curPos);
};
}
static void ParseString(std::vector<char>* pArrayDelimeters, CString strSource, std::vector<CString>* pArrayResults, bool bIsCleared = true)
{
if (NULL == pArrayDelimeters)
return;
CString strDelimeters = _T("");
for (int nIndex = 0; nIndex < pArrayDelimeters->size(); ++nIndex)
strDelimeters += (*pArrayDelimeters)[nIndex];
return ParseString(strDelimeters, strSource, pArrayResults, bIsCleared);
}
inline static void ParsePath(CString strSource, std::vector<CString>* pArrayResults, bool bIsCleared = true)
{
if (NULL == pArrayResults)
return;
CString strPath = strSource;
//strPath.Replace(_T(" "), _T(","));
for (int nIndex = 0; nIndex < strPath.GetLength(); ++nIndex)
{
if (nIndex == (strPath.GetLength() - 1))
continue;
if (IsAlpha(strPath[nIndex]) && (',' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
strPath.Insert(nIndex + 1, '0');
++nIndex;
}
else if ((',' == strPath[nIndex]) && (',' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, '0');
++nIndex;
}
else if ((',' == strPath[nIndex]) && IsAlpha(strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, '0');
++nIndex;
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsAlpha(strPath[nIndex]) && IsDigit(strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsDigit(strPath[nIndex]) && IsAlpha(strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsDigit(strPath[nIndex]) && ('@' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsDigit(strPath[nIndex]) && ('#' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsAlpha(strPath[nIndex]) && ('@' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsAlpha(strPath[nIndex]) && ('#' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsDigit(strPath[nIndex]) && ('$' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsDigit(strPath[nIndex]) && ('?' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsAlpha(strPath[nIndex]) && ('$' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if (IsAlpha(strPath[nIndex]) && ('?' == strPath[nIndex + 1]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
else if ((IsAlpha(strPath[nIndex]) && IsAlpha(strPath[nIndex + 1])) && ('x' == strPath[nIndex]))
{
strPath.Insert(nIndex + 1, ',');
++nIndex;
}
}
ParseString(_T(","), strPath, pArrayResults, bIsCleared);
return;
}
static LONG GetValue(CString strParam, ParamType& ptType, bool& bRes,
long lShapeWidth = ShapeSizeVML, long lShapeHeight = ShapeSizeVML)
{
ptType = ptValue;
bRes = true;
if ('#' == strParam[0])
{
ptType = ptAdjust;
return (LONG)XmlUtils::GetInteger(strParam.Mid(1));
}
else if ('@' == strParam[0])
{
ptType = ptFormula;
return (LONG)XmlUtils::GetInteger(strParam.Mid(1));
}
else if (!IsNumber(strParam))
{
if (_T("width") == strParam)
{
return lShapeWidth;
}
else if (_T("height") == strParam)
{
return lShapeHeight;
}
else if (_T("pixelWidth") == strParam)
{
return lShapeWidth;
}
else if (_T("pixelHeight") == strParam)
{
return lShapeHeight;
}
else if (_T("pixelLineWidth") == strParam || _T("lineDrawn") == strParam)
{
return 1;
}
else
{
bRes = false;
return 0;
}
}
else
{
ptType = ptValue;
return (LONG)XmlUtils::GetInteger(strParam);
}
}
static FormulaType GetFormula(CString strName, bool& bRes)
{
bRes = true;
if (_T("sum") == strName) return ftSum;
else if ((_T("prod") == strName) || (_T("product") == strName)) return ftProduct;
else if (_T("mid") == strName) return ftMid;
else if ((_T("absolute") == strName) || (_T("abs") == strName)) return ftAbsolute;
else if (_T("min") == strName) return ftMin;
else if (_T("max") == strName) return ftMax;
else if (_T("if") == strName) return ftIf;
else if (_T("sqrt") == strName) return ftSqrt;
else if (_T("mod") == strName) return ftMod;
else if (_T("sin") == strName) return ftSin;
else if (_T("cos") == strName) return ftCos;
else if (_T("tan") == strName) return ftTan;
else if (_T("atan2") == strName) return ftAtan2;
else if (_T("sinatan2") == strName) return ftSinatan2;
else if (_T("cosatan2") == strName) return ftCosatan2;
else if (_T("sumangle") == strName) return ftSumangle;
else if (_T("ellipse") == strName) return ftEllipse;
else if (_T("val") == strName) return ftVal;
else bRes = false;
return ftVal;
}
}
namespace ASCDocFileFormat
{
class CFormulasManager;
class CFormula
{
public:
FormulaType m_eFormulaType;
int m_lIndex;
LONG m_lParam1;
ParamType m_eType1;
LONG m_lParam2;
ParamType m_eType2;
LONG m_lParam3;
ParamType m_eType3;
private:
long m_lCountRecurs;
public:
CFormula()
{
m_eFormulaType = ftSum;
m_lIndex = 0;
m_lParam1 = 0; m_eType1 = ptValue;
m_lParam2 = 0; m_eType2 = ptValue;
m_lParam3 = 0; m_eType3 = ptValue;
m_lCountRecurs = 0;
}
CFormula(int nIndex)
{
m_eFormulaType = ftSum;
m_lIndex = nIndex;
m_lParam1 = 0; m_eType1 = ptValue;
m_lParam2 = 0; m_eType2 = ptValue;
m_lParam3 = 0; m_eType3 = ptValue;
m_lCountRecurs = 0;
}
CFormula& operator =(const CFormula& oSrc)
{
m_eFormulaType = oSrc.m_eFormulaType;
m_lIndex = oSrc.m_lIndex;
m_lParam1 = oSrc.m_lParam1;
m_eType1 = oSrc.m_eType1;
m_lParam2 = oSrc.m_lParam2;
m_eType2 = oSrc.m_eType2;
m_lParam3 = oSrc.m_lParam3;
m_eType3 = oSrc.m_eType3;
m_lCountRecurs = 0;
return (*this);
}
void FromString(CString strFormula, long lShapeWidth = ShapeSizeVML, long lShapeHeight = ShapeSizeVML)
{
std::vector<CString> oArrayParams;
ParseString(_T(" "), strFormula, &oArrayParams);
int nCount = oArrayParams.size();
if (0 >= nCount)
return;
bool bRes = true;
m_eFormulaType = GetFormula(oArrayParams[0], bRes);
ParamType ptType = ptValue;
if (1 < nCount)
{
m_lParam1 = GetValue(oArrayParams[1], ptType, bRes, lShapeWidth, lShapeHeight);
m_eType1 = ptType;
}
if (2 < nCount)
{
m_lParam2 = GetValue(oArrayParams[2], ptType, bRes, lShapeWidth, lShapeHeight);
m_eType2 = ptType;
}
if (3 < nCount)
{
m_lParam3 = GetValue(oArrayParams[3], ptType, bRes, lShapeWidth, lShapeHeight);
m_eType3 = ptType;
}
}
LONG Calculate(CFormulasManager* pManager);
};
class CFormulasManager
{
public:
std::vector<LONG>* m_pAdjustments;
std::vector<LONG> m_arResults;
std::vector<CFormula> m_arFormulas;
long m_lShapeWidth;
long m_lShapeHeight;
public:
CFormulasManager() : m_arFormulas(), m_arResults()
{
m_pAdjustments = NULL;
m_lShapeWidth = ShapeSizeVML;
m_lShapeHeight = ShapeSizeVML;
}
CFormulasManager& operator =(const CFormulasManager& oSrc)
{
m_pAdjustments = oSrc.m_pAdjustments;
m_lShapeWidth = oSrc.m_lShapeWidth;
m_lShapeHeight = oSrc.m_lShapeHeight;
m_arResults.clear();
for (int nIndex = 0; nIndex < oSrc.m_arResults.size(); ++nIndex)
{
m_arResults.push_back(oSrc.m_arResults[nIndex]);
}
m_arFormulas.clear();
for (int nIndex = 0; nIndex < oSrc.m_arFormulas.size(); ++nIndex)
{
m_arFormulas.push_back(oSrc.m_arFormulas[nIndex]);
}
return (*this);
}
void RemoveAll()
{
m_pAdjustments = NULL;
m_lShapeWidth = ShapeSizeVML;
m_lShapeHeight = ShapeSizeVML;
m_arFormulas.clear();
m_arResults.clear();
}
void Clear(std::vector<LONG>* pAdjusts)
{
m_pAdjustments = pAdjusts;
//m_arFormulas.RemoveAll();
//m_arResults.RemoveAll();
for (int nIndex = 0; nIndex < m_arResults.size(); ++nIndex)
{
m_arResults[nIndex] = 0xFFFFFFFF;
}
}
void AddFormula(CString strFormula)
{
CFormula oFormula(m_arFormulas.size());
oFormula.FromString(strFormula, m_lShapeWidth, m_lShapeHeight);
m_arFormulas.push_back(oFormula);
m_arResults.push_back(0xFFFFFFFF);
}
void AddFormula(CFormula oFormula)
{
oFormula.m_lIndex = m_arFormulas.size();
m_arFormulas.push_back(oFormula);
m_arResults.push_back(0xFFFFFFFF);
}
void CalculateResults()
{
for (int index = 0; index < m_arFormulas.size(); ++index)
{
LONG lResult = m_arFormulas[index].Calculate(this);
}
//m_pAdjustments = NULL;
//m_arFormulas.RemoveAll();
}
};
}
namespace ASCDocFileFormat
{
// TODO : add escape segments
class CPathSegment
{
public:
enum MSOPATHTYPE
{
msopathLineTo,
msopathCurveTo,
msopathMoveTo,
msopathClose,
msopathEnd,
msopathEscape,
msopathClientEscape,
msopathInvalid
};
enum MSOPATHESCAPE
{
msopathEscapeExtension = 0x00000000,
msopathEscapeAngleEllipseTo = 0x00000001,
msopathEscapeAngleEllipse = 0x00000002,
msopathEscapeArcTo = 0x00000003,
msopathEscapeArc = 0x00000004,
msopathEscapeClockwiseArcTo = 0x00000005,
msopathEscapeClockwiseArc = 0x00000006,
msopathEscapeEllipticalQuadrantX = 0x00000007,
msopathEscapeEllipticalQuadrantY = 0x00000008,
msopathEscapeQuadraticBezier = 0x00000009,
msopathEscapeNoFill = 0x0000000A,
msopathEscapeNoLine = 0x0000000B,
msopathEscapeAutoLine = 0x0000000C,
msopathEscapeAutoCurve = 0x0000000D,
msopathEscapeCornerLine = 0x0000000E,
msopathEscapeCornerCurve = 0x0000000F,
msopathEscapeSmoothLine = 0x00000010,
msopathEscapeSmoothCurve = 0x00000011,
msopathEscapeSymmetricLine = 0x00000012,
msopathEscapeSymmetricCurve = 0x00000013,
msopathEscapeFreeform = 0x00000014,
msopathEscapeFillColor = 0x00000015,
msopathEscapeLineColor = 0x00000016
};
public:
CPathSegment () : m_oBits(2)
{
}
CPathSegment (CString Command, int Segments) : m_oBits(2)
{
m_oBits.SetBits<int>(Segments, 0, 13);
if (CString("m") == Command)
m_oBits.SetBits<unsigned short>(msopathMoveTo, 13, 3);
if (CString("l") == Command)
m_oBits.SetBits<unsigned short>(msopathLineTo, 13, 3);
if (CString("c") == Command)
m_oBits.SetBits<unsigned short>(msopathCurveTo, 13, 3);
if (CString("e") == Command)
m_oBits.SetBits<unsigned short>(msopathEnd, 13, 3);
if (CString("x") == Command)
m_oBits.SetBits<unsigned short>(msopathClose, 13, 3);
}
CPathSegment (CString Command, int Escape, int Segments) : m_oBits(2)
{
m_oBits.SetBits<int>(Segments, 0, 13);
if (CString("nf") == Command)
m_oBits.SetBits<MSOPATHESCAPE>(msopathEscapeNoFill, 13, 3);
if (CString("ns") == Command)
m_oBits.SetBits<MSOPATHESCAPE>(msopathEscapeNoLine, 13, 3);
//m_oBits.SetBits<int>(Escape, 3, 5);
//m_oBits.SetBits<int>(Segments, 8, 8);
}
inline unsigned short Get()
{
return FormatUtils::BytesToUInt16 (m_oBits.GetBytes(), 0, sizeof(unsigned short));
}
private:
ASCDocFormatUtils::BitSet m_oBits;
};
class CShapePath
{
public:
CShapePath () : m_bIsSimple (TRUE)
{
m_nType = -1;
}
inline bool IsValid ()
{
return (m_nType >= 0) && (m_oPoints.GetSize() > 0) && (m_oSegments.GetSize() > 0);
}
inline bool IsSimple ()
{
return m_bIsSimple;
}
inline bool Build (const std::string& strPath, const std::string& strAdj, const std::string& strFormulas)
{
m_oManager.RemoveAll();
m_oPoints.Clear ();
m_oSegments.Clear ();
if (0==strPath.length())
return FALSE;
std::vector<CString> oArray;
ParsePath(CString(strPath.c_str()), &oArray);
if (oArray.size())
{
m_nType = 1;
ParamType eParamType = ptValue;
LONG lValue;
bool bRes = true;
CString strCommand;
OfficeArt::CPoint32 point;
OfficeArt::CPoint32 movePt;
LoadAdjustValuesList (CString(strAdj.c_str()));
m_oManager.m_pAdjustments = &m_arAdjustments;
LoadGuidesList (CString(strFormulas.c_str()));
if (m_arAdjustments.size())
m_oManager.CalculateResults();
CString oldCommand = L"";
for (int nIndex = 0; nIndex < oArray.size(); ++nIndex)
{
lValue = GetFormatedValue (nIndex, oArray);
if (IsCommand(oArray[nIndex]))
{
//ATLTRACE (L"COMMAND : %s\n",oArray[nIndex]);
strCommand = oArray[nIndex];
if (CString("x") == strCommand)
{
m_oSegments.Add(CPathSegment(strCommand,1).Get());
}
else if (CString("e") == strCommand)
{
m_oSegments.Add(CPathSegment(strCommand,0).Get());
}
else if (CString("n") == oldCommand)
{
if (CString("s") == strCommand)
{
//m_oSegments.Add(CPathSegment(L"ns", 1, 0).Get());
}
else if (CString("f") == strCommand)
{
//m_oSegments.Add(CPathSegment(L"nf", 1, 0).Get());
}
}
oldCommand = strCommand;
}
else
{
if (CString("m") == strCommand || CString("l") == strCommand || CString("r") == strCommand || CString("c") == strCommand || CString("v") == strCommand)
{
LONG nValue0 = GetFormatedValue (nIndex, oArray);
LONG nValue1 = GetFormatedValue (nIndex + 1, oArray);
OfficeArt::CPoint32 curPoint = OfficeArt::CPoint32(nValue0,nValue1);
if (CString("m") == strCommand)
{
movePt = curPoint;
m_oSegments.Add(CPathSegment(CString("m"),0).Get());
m_oPoints.Add(curPoint);
++nIndex;
}
else if(CString("r") == strCommand)
{
curPoint.X += point.X;
curPoint.Y += point.Y;
m_oPoints.Add(curPoint);
m_oSegments.Add(CPathSegment(CString("l"),1).Get());
++nIndex;
}
else if(CString("c") == strCommand)
{
m_bHaveCurves = TRUE;
LONG nValue2 = GetFormatedValue (nIndex + 2, oArray);
LONG nValue3 = GetFormatedValue (nIndex + 3, oArray);
LONG nValue4 = GetFormatedValue (nIndex + 4, oArray);
LONG nValue5 = GetFormatedValue (nIndex + 5, oArray);
OfficeArt::CPoint32 curPoint2 = OfficeArt::CPoint32(nValue2, nValue3);
OfficeArt::CPoint32 curPoint3 = OfficeArt::CPoint32(nValue4, nValue5);
m_oPoints.Add(curPoint);
m_oPoints.Add(curPoint2);
m_oPoints.Add(curPoint3);
m_oSegments.Add(CPathSegment(CString("c"),1).Get());
nIndex += 5;
point = curPoint3;
continue;
}
else if(CString("v") == strCommand)
{
m_bHaveCurves = TRUE;
LONG nValue2 = GetFormatedValue (nIndex + 2, oArray);
LONG nValue3 = GetFormatedValue (nIndex + 3, oArray);
LONG nValue4 = GetFormatedValue (nIndex + 4, oArray);
LONG nValue5 = GetFormatedValue (nIndex + 5, oArray);
OfficeArt::CPoint32 curPoint2 = OfficeArt::CPoint32(nValue2, nValue3);
OfficeArt::CPoint32 curPoint3 = OfficeArt::CPoint32(nValue4,nValue5);
curPoint.X += point.X;
curPoint.Y += point.Y;
curPoint2.X += point.X;
curPoint2.Y += point.Y;
curPoint3.X += point.X;
curPoint3.Y += point.Y;
m_oPoints.Add(curPoint);
m_oPoints.Add(curPoint2);
m_oPoints.Add(curPoint3);
m_oSegments.Add(CPathSegment(CString("c"),1).Get());
nIndex += 5;
point = curPoint3;
continue;
}
else
{
m_oPoints.Add(curPoint);
m_oSegments.Add(CPathSegment(strCommand,1).Get());
++nIndex;
}
point = curPoint;
}
else
{
m_bIsSimple = FALSE;
}
}
}
return TRUE;
}
return FALSE;
}
inline int GetType () const
{
if (m_bHaveCurves)
return 3;
return m_nType;
}
inline OfficeArt::CMSOArray<OfficeArt::CPoint32>& GetPoints()
{
return m_oPoints;
}
inline OfficeArt::CMSOArray<unsigned short>& GetSegments()
{
return m_oSegments;
}
// FORMULA
inline bool LoadAdjustValuesList(const CString& xml)
{
m_arAdjustments.clear ();
std::vector<CString> arAdj;
ParseString(_T(","), xml, &arAdj);
m_arAdjustments.clear();
for (int nIndex = 0; nIndex < arAdj.size(); ++nIndex)
m_arAdjustments.push_back((LONG)XmlUtils::GetInteger(arAdj[nIndex]));
return true;
}
inline bool LoadGuidesList(const CString& strXml)
{
XmlUtils::CXmlNode oNodeGuides;
if (oNodeGuides.FromXmlString(strXml))
{
XmlUtils::CXmlNodes oList;
if (oNodeGuides.GetNodes(_T("f"), oList))
{
int lCount = oList.GetCount();
for (int nIndex = 0; nIndex < lCount; ++nIndex)
{
XmlUtils::CXmlNode oNodeFormula;
oList.GetAt(nIndex, oNodeFormula);
m_oManager.AddFormula(oNodeFormula.GetAttributeOrValue(_T("eqn")));
}
}
return true;
}
return false;
}
private:
inline LONG GetFormatedValue(LONG nIndex, const std::vector<CString>& oArray)
{
ParamType eParamType = ptValue;
bool bRes = true;
LONG lValue = GetValue (oArray[nIndex], eParamType, bRes);
switch (eParamType)
{
case ptFormula:
{
lValue = m_oManager.m_arResults[lValue];
break;
}
case ptAdjust:
{
lValue = (*(m_oManager.m_pAdjustments))[lValue];
break;
}
default:
break;
};
return lValue;
}
inline static void ParsePath (const CString& strSource, std::vector<CString>* pArrayResults, bool bIsCleared = true)
{
if (NULL == pArrayResults)
return;
CString strPath = strSource;
int nIndexOld = 0;
int nLength = strPath.GetLength();
for (int nIndex = 0; nIndex < nLength; ++nIndex)
{
if (nIndex == (nLength - 1))
{
pArrayResults->push_back(strPath.Mid(nIndexOld));
}
TCHAR strChar = strPath[nIndex];
TCHAR strChar2 = strPath[nIndex + 1];
if (' ' == strChar)
strChar = ',';
if (' ' == strChar2)
strChar2 = ',';
if (IsAlpha(strChar) && (',' == strChar2))
{
pArrayResults->push_back(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
pArrayResults->push_back(_T("0")); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
}
else if (IsDigit(strChar) && (',' == strChar2))
{
pArrayResults->push_back(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
}
else if ((',' == strChar) && (',' == strChar2))
{
pArrayResults->push_back(_T("0"));
}
else if ((',' == strChar) && IsAlpha(strChar2))
{
pArrayResults->push_back(_T("0"));
nIndexOld = nIndex + 1;
}
else if ((',' == strChar) && IsDigit(strChar2))
{
nIndexOld = nIndex + 1;
}
else if (IsAlpha(strChar) && IsDigit(strChar2))
{
pArrayResults->push_back(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
nIndexOld = nIndex + 1;
}
else if (IsDigit(strChar) && IsAlpha(strChar2))
{
pArrayResults->push_back(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
nIndexOld = nIndex + 1;
}
else if (IsDigit(strChar) && ('@' == strChar2))
{
pArrayResults->push_back(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
++nIndex;
nIndexOld = nIndex;
}
else if (IsDigit(strChar) && ('#' == strChar2))
{
pArrayResults->push_back(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
++nIndex;
nIndexOld = nIndex;
}
else if (IsAlpha(strChar) && ('@' == strChar2))
{
pArrayResults->push_back(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
++nIndex;
nIndexOld = nIndex;
}
else if (IsAlpha(strChar) && ('#' == strChar2))
{
pArrayResults->push_back(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
++nIndex;
nIndexOld = nIndex;
}
else if (('x' == strChar) && IsAlpha(strChar2))
{
pArrayResults->push_back(_T("x")); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
nIndexOld = nIndex + 1;
}
else if (IsAlpha(strChar) && IsAlpha(strChar2))
{
//if ((('n'==strChar) && ('f'==strChar2)) || (('n'==strChar) && ('s'==strChar2)))
//{
// pArrayResults->Add(strPath.Mid(nIndexOld, nIndex - nIndexOld + 2)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
// ++nIndex;
// nIndexOld = nIndex + 1;
//}
//else
{
pArrayResults->push_back(strPath.Mid(nIndexOld, nIndex - nIndexOld + 1)); //ATLTRACE (L"COMMAND : %s\n",pArrayResults->operator[](pArrayResults->GetSize()-1) );
nIndexOld = nIndex + 1;
}
}
}
return;
}
inline static bool IsDigit (const TCHAR& c)
{
return (((c >= '0') && (c <= '9')) || (c == '-'));
}
inline static bool IsAlpha (const TCHAR& c)
{
return (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')));
}
inline static bool IsNumber (const CString& str)
{
for (int nIndex = 0; nIndex < str.GetLength(); ++nIndex)
{
if (!IsDigit(str[nIndex]))
{
return false;
}
}
return true;
}
inline static bool IsCommand (const CString& str)
{
if (str == CString(_T("m")) || str == CString(_T("l")) || str == CString(_T("x")) ||
str == CString(_T("e")) || str == CString(_T("r")) || str == CString(_T("c")) || str == CString(_T("v")) ||
str == CString(_T("nf")) || str == CString(_T("ns")) || str == CString(_T("n")) || str == CString(_T("s")) || str == CString(_T("f")) )
return true;
return false;
}
inline static LONG GetValue (const CString& strParam, ParamType& ptType, bool& bRes, long lShapeWidth = ShapeSizeVML, long lShapeHeight = ShapeSizeVML)
{
ptType = ptValue;
bRes = true;
if ('#' == strParam[0])
{
ptType = ptAdjust;
return (LONG)XmlUtils::GetInteger(strParam.Mid(1));
}
else if ('@' == strParam[0])
{
ptType = ptFormula;
return (LONG)XmlUtils::GetInteger(strParam.Mid(1));
}
else if (!IsNumber(strParam))
{
if (_T("width") == strParam)
{
return lShapeWidth;
}
else if (_T("height") == strParam)
{
return lShapeHeight;
}
else
{
bRes = false;
return 0;
}
}
else
{
ptType = ptValue;
return (LONG)XmlUtils::GetInteger(strParam);
}
}
public:
int m_nType;
bool m_bIsSimple;
bool m_bHaveCurves;
OfficeArt::CMSOArray<OfficeArt::CPoint32> m_oPoints;
OfficeArt::CMSOArray<unsigned short> m_oSegments;
CFormulasManager m_oManager;
std::vector<long> m_arAdjustments;
std::vector<double> Guides;
};
}
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
// AVSOfficeDocxFile2.cpp : Implementation of DLL Exports.
#include "stdafx.h"
#include "resource.h"
#include "DocxFile2.h"
#include "XlsxFile2.h"
#include "PptxFile.h"
// The module attribute causes DllMain, DllRegisterServer and DllUnregisterServer to be automatically implemented for you
[ module(dll, uuid = "{A1EEE61A-FAA7-47af-B078-4E955623B9CA}",
name = "ASCOfficeDocxFile2",
helpstring = "ASCOfficeDocxFile2 1.0 Type Library",
resource_name = "IDR_ASCOFFICEDOCXFILE2") ];
\ No newline at end of file
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define COMPONENT_NAME "OfficeDocxFile2"
#include "../Common/FileInfo.h"
#include "version.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Russian resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
#ifdef _WIN32
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
#pragma code_page(1251)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // Russian resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION INTVER
PRODUCTVERSION INTVER
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", COMPANY_NAME
VALUE "FileDescription", FILE_DESCRIPTION_ACTIVEX
VALUE "FileVersion", STRVER
VALUE "InternalName", COMPONENT_FILE_NAME_DLL
VALUE "LegalCopyright", LEGAL_COPYRIGHT
VALUE "OriginalFilename", COMPONENT_FILE_NAME_DLL
VALUE "ProductName", FILE_DESCRIPTION_ACTIVEX
VALUE "ProductVersion", STRVER
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// REGISTRY
//
IDR_ASCOFFICEDOCXFILE2 REGISTRY "ASCOfficeDocxFile2.rgs"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_PROJNAME "ASCOfficeDocxFile2"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
HKCR
{
NoRemove AppID
{
'%APPID%' = s 'ASCOfficeDocxFile2'
'ASCOfficeDocxFile2.DLL'
{
val AppID = s '%APPID%'
}
}
}

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeDocxFile2", "ASCOfficeDocxFile2.vcxproj", "{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\Common\DocxFormat\Projects\DocxFormat2005.vcxproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcxproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCHTMLRenderer", "..\ASCHTMLRenderer\ASCHTMLRendererLib.vcxproj", "{DC24710E-8DF2-4A7A-B7C3-2313E294143C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\Common\DocxFormat\Source\XML\libxml2\win_build\libxml2.vcxproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeUtilsLib", "..\ASCOfficeUtils\ASCOfficeUtilsLib\Win\ASCOfficeUtilsLib.vcxproj", "{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Debug|Win32.ActiveCfg = Debug|Win32
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Debug|Win32.Build.0 = Debug|Win32
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Debug|x64.ActiveCfg = Debug|x64
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Debug|x64.Build.0 = Debug|x64
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Release|Win32.ActiveCfg = Release|Win32
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Release|Win32.Build.0 = Release|Win32
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Release|x64.ActiveCfg = Release|x64
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Release|x64.Build.0 = Release|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.ActiveCfg = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.Build.0 = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|x64.ActiveCfg = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|x64.Build.0 = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.ActiveCfg = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.Build.0 = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|x64.ActiveCfg = Release|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.ActiveCfg = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.Build.0 = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.ActiveCfg = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.Build.0 = Release|x64
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug|Win32.ActiveCfg = Debug|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug|Win32.Build.0 = Debug|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug|x64.ActiveCfg = Debug|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release|Win32.ActiveCfg = Release|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release|Win32.Build.0 = Release|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release|x64.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.Build.0 = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.ActiveCfg = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.ActiveCfg = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.Build.0 = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|x64.ActiveCfg = Debug|x64
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|x64.Build.0 = Debug|x64
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.ActiveCfg = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.Build.0 = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|x64.ActiveCfg = Release|x64
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="ASCOfficeDocxFile2"
ProjectGUID="{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}"
RootNamespace="ASCOfficeDocxFile2"
Keyword="AtlProj"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
UseOfATL="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
TargetEnvironment="1"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeDocxFile2.tlb"
HeaderFileName="DocxFile2.h"
DLLDataFileName=""
InterfaceIdentifierFileName="ASCOfficeDocxFile2_i.c"
ProxyFileName="ASCOfficeDocxFile2_p.c"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm1000"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\Common\DocxFormat\Source\XML\libxml2\XML\include&quot;;&quot;$(SolutionDir)\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_AVSOFFICESTUDIO_XMLUTILS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
OutputFile="$(OutDir)/ASCOfficeDocxFile2.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Lib/Debug&quot;"
IgnoreDefaultLibraryNames=""
MergedIDLBaseFileName="_ASCOfficeDocxFile2.idl"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(OutDir)/ASCOfficeDocxFile2.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
UseOfATL="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
TargetEnvironment="3"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeDocxFile2.tlb"
HeaderFileName="DocxFile2.h"
DLLDataFileName=""
InterfaceIdentifierFileName="ASCOfficeDocxFile2_i.c"
ProxyFileName="ASCOfficeDocxFile2_p.c"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm1000"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\Common\DocxFormat\Source\XML\libxml2\XML\include&quot;;&quot;$(SolutionDir)\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_AVSOFFICESTUDIO_XMLUTILS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
OutputFile="$(OutDir)/ASCOfficeDocxFile2.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Lib/Debug&quot;"
IgnoreDefaultLibraryNames="LIBCMTD.lib"
MergedIDLBaseFileName="_ASCOfficeDocxFile2.idl"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(OutDir)/ASCOfficeDocxFile2.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
UseOfATL="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="..\Redist\VersionControl.exe &quot;$(ProjectDir)\version.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="1"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeDocxFile2.tlb"
HeaderFileName="DocxFile2.h"
DLLDataFileName=""
InterfaceIdentifierFileName="ASCOfficeDocxFile2_i.c"
ProxyFileName="ASCOfficeDocxFile2_p.c"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm1000"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\Common\DocxFormat\Source\XML\libxml2\XML\include&quot;;&quot;$(SolutionDir)\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;BUILD_CONFIG_FULL_VERSION;DONT_WRITE_EMBEDDED_FONTS"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="comsvcs.lib comsuppw.lib gdiplus.lib"
OutputFile="$(OutDir)/$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Lib/Release&quot;"
IgnoreDefaultLibraryNames="LIBC.lib;LIBCMT"
MergedIDLBaseFileName="_ASCOfficeDocxFile2.idl"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/ASCOfficeDocxFile2.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\Redist&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
UseOfATL="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="..\Redist\VersionControl.exe &quot;$(ProjectDir)\version.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="3"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeDocxFile2.tlb"
HeaderFileName="DocxFile2.h"
DLLDataFileName=""
InterfaceIdentifierFileName="ASCOfficeDocxFile2_i.c"
ProxyFileName="ASCOfficeDocxFile2_p.c"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm1000"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\Common\DocxFormat\Source\XML\libxml2\XML\include&quot;;&quot;$(SolutionDir)\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;BUILD_CONFIG_FULL_VERSION;DONT_WRITE_EMBEDDED_FONTS"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="comsvcs.lib comsuppw.lib gdiplus.lib"
OutputFile="$(OutDir)/$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Lib/Release&quot;"
IgnoreDefaultLibraryNames="LIBC.lib;LIBCMT.lib"
MergedIDLBaseFileName="_ASCOfficeDocxFile2.idl"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/ASCOfficeDocxFile2.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\Redist\x64&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="ReleaseASC|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
ExcludedFromBuild="true"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="1"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeDocxFile2.tlb"
HeaderFileName="DocxFile2.h"
DLLDataFileName=""
InterfaceIdentifierFileName="ASCOfficeDocxFile2_i.c"
ProxyFileName="ASCOfficeDocxFile2_p.c"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm1000"
AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects&quot;;&quot;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects/Font/FreeType&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Source/DocxFormat&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_ATL_CSTRING;USE_AVSOFFICESTUDIO_XMLUTILS"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;ASCBUILD"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="comsvcs.lib comsuppw.lib gdiplus.lib DocxFormat.lib"
OutputFile="$(OutDir)/ASCOfficeDocxFile2.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="$(SolutionDir)/../Common/DocxFormat/Lib/Release"
IgnoreDefaultLibraryNames="LIBC.lib"
MergedIDLBaseFileName="_ASCOfficeDocxFile2.idl"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/ASCOfficeDocxFile2.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\..\..\..\ASC\Redist\ASCOfficeStudio&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="ReleaseASC|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
ExcludedFromBuild="true"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="3"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeDocxFile2.tlb"
HeaderFileName="DocxFile2.h"
DLLDataFileName=""
InterfaceIdentifierFileName="ASCOfficeDocxFile2_i.c"
ProxyFileName="ASCOfficeDocxFile2_p.c"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm1000"
AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects&quot;;&quot;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects/Font/FreeType&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Source/DocxFormat&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_ATL_CSTRING;USE_AVSOFFICESTUDIO_XMLUTILS"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;ASCBUILD"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="comsvcs.lib comsuppw.lib gdiplus.lib DocxFormat.lib"
OutputFile="$(OutDir)/ASCOfficeDocxFile2.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="$(SolutionDir)/../Common/DocxFormat/Lib/Release"
IgnoreDefaultLibraryNames="LIBC.lib"
MergedIDLBaseFileName="_ASCOfficeDocxFile2.idl"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/ASCOfficeDocxFile2.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\..\..\..\ASC\Redist\ASCOfficeStudio&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="ReleaseOpenSource|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="1"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeDocxFile2.tlb"
HeaderFileName="DocxFile2.h"
DLLDataFileName=""
InterfaceIdentifierFileName="ASCOfficeDocxFile2_i.c"
ProxyFileName="ASCOfficeDocxFile2_p.c"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm1000"
AdditionalIncludeDirectories="&quot;$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/XML/include&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects&quot;;&quot;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects/Font/FreeType&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Source/DocxFormat&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_ATL_CSTRING;USE_AVSOFFICESTUDIO_XMLUTILS;BUILD_CONFIG_OPENSOURCE_VERSION"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="comsvcs.lib comsuppw.lib gdiplus.lib"
OutputFile="$(OutDir)/$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Lib/$(ConfigurationName)&quot;"
IgnoreDefaultLibraryNames="LIBC.lib"
MergedIDLBaseFileName="_ASCOfficeDocxFile2.idl"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/ASCOfficeDocxFile2.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="copy to Redist"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\Redist&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="ReleaseOpenSource|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="3"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeDocxFile2.tlb"
HeaderFileName="DocxFile2.h"
DLLDataFileName=""
InterfaceIdentifierFileName="ASCOfficeDocxFile2_i.c"
ProxyFileName="ASCOfficeDocxFile2_p.c"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm1000"
AdditionalIncludeDirectories="&quot;$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/XML/include&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects&quot;;&quot;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects/Font/FreeType&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Source/DocxFormat&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_ATL_CSTRING;USE_AVSOFFICESTUDIO_XMLUTILS;BUILD_CONFIG_OPENSOURCE_VERSION"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="comsvcs.lib comsuppw.lib gdiplus.lib"
OutputFile="$(OutDir)/$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release&quot;;&quot;$(SolutionDir)/../Common/DocxFormat/Lib/$(ConfigurationName)&quot;"
IgnoreDefaultLibraryNames="LIBC.lib"
MergedIDLBaseFileName="_ASCOfficeDocxFile2.idl"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/ASCOfficeDocxFile2.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="copy to Redist"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\Redist&quot;&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="res"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\ASCOfficeDocxFile2.rc"
>
</File>
<File
RelativePath=".\ASCOfficeDocxFile2.rgs"
>
</File>
</Filter>
<Filter
Name="_"
>
<File
RelativePath=".\ASCOfficeDocxFile2.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseASC|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseASC|x64"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseOpenSource|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseOpenSource|x64"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\Resource.h"
>
</File>
<File
RelativePath=".\stdafx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseASC|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseASC|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseOpenSource|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseOpenSource|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
ObjectFile="$(IntDir)\"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\version.h"
>
</File>
</Filter>
<Filter
Name="DocWrapper"
>
<File
RelativePath=".\DocWrapper\FontProcessor.cpp"
>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\DocWrapper\FontProcessor.h"
>
</File>
</Filter>
<Filter
Name="XLSX"
>
<File
RelativePath=".\DocWrapper\XlsxSerializer.cpp"
>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\DocWrapper\XlsxSerializer.h"
>
</File>
<Filter
Name="Common"
>
<File
RelativePath="..\XlsxSerializerCom\Common\BinReaderWriterDefines.h"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Common\Common.cpp"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Common\Common.h"
>
</File>
</Filter>
<Filter
Name="Reader"
>
<File
RelativePath="..\XlsxSerializerCom\Writer\BinaryCommonReader.h"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Writer\BinaryReader.h"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\CSVReader.cpp"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\CSVReader.h"
>
</File>
</Filter>
<Filter
Name="Writer"
>
<File
RelativePath="..\XlsxSerializerCom\Reader\BinaryWriter.h"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\ChartFromToBinary.cpp"
>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\ChartFromToBinary.h"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\CommonWriter.cpp"
>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\CommonWriter.h"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Writer\CSVWriter.cpp"
>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\XlsxSerializerCom\Writer\CSVWriter.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="DOCX"
>
<File
RelativePath=".\DocWrapper\DocxSerializer.cpp"
>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\DocWrapper\DocxSerializer.h"
>
</File>
<Filter
Name="Reader"
>
<File
RelativePath=".\BinReader\ReaderClasses.h"
>
</File>
<File
RelativePath=".\BinReader\Readers.h"
>
</File>
<Filter
Name="OOXWriter"
>
<File
RelativePath=".\BinReader\ChartWriter.h"
>
</File>
<File
RelativePath=".\BinReader\CommentsWriter.h"
>
</File>
<File
RelativePath=".\BinReader\ContentTypesWriter.h"
>
</File>
<File
RelativePath=".\BinReader\DocumentRelsWriter.h"
>
</File>
<File
RelativePath=".\BinReader\DocumentWriter.h"
>
</File>
<File
RelativePath=".\BinReader\FileWriter.h"
>
</File>
<File
RelativePath=".\BinReader\fontTableWriter.h"
>
</File>
<File
RelativePath=".\BinReader\HeaderFooterWriter.h"
>
</File>
<File
RelativePath=".\BinReader\MediaWriter.h"
>
</File>
<File
RelativePath=".\BinReader\NumberingWriter.h"
>
</File>
<File
RelativePath=".\BinReader\SettingWriter.h"
>
</File>
<File
RelativePath=".\BinReader\StylesWriter.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="Common"
>
<File
RelativePath=".\BinReader\FileDownloader.h"
>
</File>
</Filter>
<Filter
Name="Writer"
>
<File
RelativePath=".\BinWriter\BinEquationWriter.h"
>
</File>
<File
RelativePath=".\BinWriter\BinReaderWriterDefines.h"
>
</File>
<File
RelativePath=".\BinWriter\BinWriters.h"
>
</File>
</Filter>
</Filter>
<File
RelativePath=".\DocxFile2.h"
>
</File>
<File
RelativePath=".\PptxFile.h"
>
</File>
<File
RelativePath=".\stdafx.h"
>
</File>
<File
RelativePath=".\XlsxFile2.h"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseASC|Win32">
<Configuration>ReleaseASC</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseASC|x64">
<Configuration>ReleaseASC</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseOpenSource|Win32">
<Configuration>ReleaseOpenSource</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseOpenSource|x64">
<Configuration>ReleaseOpenSource</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}</ProjectGuid>
<RootNamespace>ASCOfficeDocxFile2</RootNamespace>
<Keyword>AtlProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfAtl>false</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>false</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfAtl>false</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>false</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<PreBuildEventUseInBuild>false</PreBuildEventUseInBuild>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<PreBuildEventUseInBuild>false</PreBuildEventUseInBuild>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)ASCOfficeDocxFile2.tlb</TypeLibraryName>
<HeaderFileName>DocxFile2.h</HeaderFileName>
<DllDataFileName />
<InterfaceIdentifierFileName>ASCOfficeDocxFile2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>ASCOfficeDocxFile2_p.c</ProxyFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)\..\Common\DocxFormat\Source\XML\libxml2\XML\include;$(SolutionDir)\..\DesktopEditor\freetype-2.5.2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_AVSOFFICESTUDIO_XMLUTILS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0419</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)ASCOfficeDocxFile2.dll</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release;$(SolutionDir)/../Common/DocxFormat/Lib/Debug;$(SolutionDir)/../SDK/lib/win_32/DEBUG;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<MergedIDLBaseFileName>_ASCOfficeDocxFile2.idl</MergedIDLBaseFileName>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(OutDir)ASCOfficeDocxFile2.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>graphics.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Message>Performing registration</Message>
<Command>regsvr32 /s /c "$(TargetPath)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>X64</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)ASCOfficeDocxFile2.tlb</TypeLibraryName>
<HeaderFileName>DocxFile2.h</HeaderFileName>
<DllDataFileName />
<InterfaceIdentifierFileName>ASCOfficeDocxFile2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>ASCOfficeDocxFile2_p.c</ProxyFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)\..\Common\DocxFormat\Source\XML\libxml2\XML\include;$(SolutionDir)\..\DesktopEditor\freetype-2.5.2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_AVSOFFICESTUDIO_XMLUTILS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0419</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)ASCOfficeDocxFile2.dll</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release;$(SolutionDir)/../Common/DocxFormat/Lib/Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBCMTD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<MergedIDLBaseFileName>_ASCOfficeDocxFile2.idl</MergedIDLBaseFileName>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(OutDir)ASCOfficeDocxFile2.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<PostBuildEvent>
<Message>Performing registration</Message>
<Command>regsvr32 /s /c "$(TargetPath)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command>..\Redist\VersionControl.exe "$(ProjectDir)\version.h"</Command>
</PreBuildEvent>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)ASCOfficeDocxFile2.tlb</TypeLibraryName>
<HeaderFileName>DocxFile2.h</HeaderFileName>
<DllDataFileName />
<InterfaceIdentifierFileName>ASCOfficeDocxFile2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>ASCOfficeDocxFile2_p.c</ProxyFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\Common\DocxFormat\Source\XML\libxml2\XML\include;$(SolutionDir)\..\DesktopEditor\freetype-2.5.2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;BUILD_CONFIG_FULL_VERSION;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0419</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>comsvcs.lib;comsuppw.lib;gdiplus.lib;graphics.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release;$(SolutionDir)/../Common/DocxFormat/Lib/Release;$(SolutionDir)/../SDK/lib/win_32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC.lib;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<MergedIDLBaseFileName>_ASCOfficeDocxFile2.idl</MergedIDLBaseFileName>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(OutDir)ASCOfficeDocxFile2.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Message>Performing registration</Message>
<Command>regsvr32 /s /c "$(TargetPath)"
copy "$(TargetPath)" "$(SolutionDir)..\Redist"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>..\Redist\VersionControl.exe "$(ProjectDir)\version.h"</Command>
</PreBuildEvent>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>X64</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)ASCOfficeDocxFile2.tlb</TypeLibraryName>
<HeaderFileName>DocxFile2.h</HeaderFileName>
<DllDataFileName />
<InterfaceIdentifierFileName>ASCOfficeDocxFile2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>ASCOfficeDocxFile2_p.c</ProxyFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\Common\DocxFormat\Source\XML\libxml2\XML\include;$(SolutionDir)\..\DesktopEditor\freetype-2.5.2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;BUILD_CONFIG_FULL_VERSION;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0419</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>comsvcs.lib;comsuppw.lib;gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release;$(SolutionDir)/../Common/DocxFormat/Lib/Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC.lib;LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<MergedIDLBaseFileName>_ASCOfficeDocxFile2.idl</MergedIDLBaseFileName>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(OutDir)ASCOfficeDocxFile2.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<PostBuildEvent>
<Message>Performing registration</Message>
<Command>regsvr32 /s /c "$(TargetPath)"
copy "$(TargetPath)" "$(SolutionDir)..\Redist\x64"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|Win32'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)ASCOfficeDocxFile2.tlb</TypeLibraryName>
<HeaderFileName>DocxFile2.h</HeaderFileName>
<DllDataFileName />
<InterfaceIdentifierFileName>ASCOfficeDocxFile2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>ASCOfficeDocxFile2_p.c</ProxyFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects/Font/FreeType;$(SolutionDir)/../Common/DocxFormat/Source/DocxFormat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_ATL_CSTRING;USE_AVSOFFICESTUDIO_XMLUTILS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;ASCBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0419</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>comsvcs.lib;comsuppw.lib;gdiplus.lib;DocxFormat.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)ASCOfficeDocxFile2.dll</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)/../Common/DocxFormat/Lib/Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<MergedIDLBaseFileName>_ASCOfficeDocxFile2.idl</MergedIDLBaseFileName>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(OutDir)ASCOfficeDocxFile2.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Message>Performing registration</Message>
<Command>regsvr32 /s /c "$(TargetPath)"
copy "$(TargetPath)" "$(SolutionDir)..\..\..\..\ASC\Redist\ASCOfficeStudio"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|x64'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>X64</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)ASCOfficeDocxFile2.tlb</TypeLibraryName>
<HeaderFileName>DocxFile2.h</HeaderFileName>
<DllDataFileName />
<InterfaceIdentifierFileName>ASCOfficeDocxFile2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>ASCOfficeDocxFile2_p.c</ProxyFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects/Font/FreeType;$(SolutionDir)/../Common/DocxFormat/Source/DocxFormat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_ATL_CSTRING;USE_AVSOFFICESTUDIO_XMLUTILS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;ASCBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0419</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>comsvcs.lib;comsuppw.lib;gdiplus.lib;DocxFormat.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)ASCOfficeDocxFile2.dll</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)/../Common/DocxFormat/Lib/Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<MergedIDLBaseFileName>_ASCOfficeDocxFile2.idl</MergedIDLBaseFileName>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(OutDir)ASCOfficeDocxFile2.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<PostBuildEvent>
<Message>Performing registration</Message>
<Command>regsvr32 /s /c "$(TargetPath)"
copy "$(TargetPath)" "$(SolutionDir)..\..\..\..\ASC\Redist\ASCOfficeStudio"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|Win32'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)ASCOfficeDocxFile2.tlb</TypeLibraryName>
<HeaderFileName>DocxFile2.h</HeaderFileName>
<DllDataFileName />
<InterfaceIdentifierFileName>ASCOfficeDocxFile2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>ASCOfficeDocxFile2_p.c</ProxyFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/XML/include;$(SolutionDir);$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects/Font/FreeType;$(SolutionDir)/../Common/DocxFormat/Source/DocxFormat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_ATL_CSTRING;USE_AVSOFFICESTUDIO_XMLUTILS;BUILD_CONFIG_OPENSOURCE_VERSION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0419</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>comsvcs.lib;comsuppw.lib;gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release;$(SolutionDir)/../Common/DocxFormat/Lib/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<MergedIDLBaseFileName>_ASCOfficeDocxFile2.idl</MergedIDLBaseFileName>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(OutDir)ASCOfficeDocxFile2.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Message>copy to Redist</Message>
<Command>copy "$(TargetPath)" "$(SolutionDir)..\Redist"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|x64'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>X64</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)ASCOfficeDocxFile2.tlb</TypeLibraryName>
<HeaderFileName>DocxFile2.h</HeaderFileName>
<DllDataFileName />
<InterfaceIdentifierFileName>ASCOfficeDocxFile2_i.c</InterfaceIdentifierFileName>
<ProxyFileName>ASCOfficeDocxFile2_p.c</ProxyFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/XML/include;$(SolutionDir);$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects;$(SolutionDir)/../../AVSImageStudio3/AVSGraphics/Objects/Font/FreeType;$(SolutionDir)/../Common/DocxFormat/Source/DocxFormat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;USE_ATL_CSTRING;USE_AVSOFFICESTUDIO_XMLUTILS;BUILD_CONFIG_OPENSOURCE_VERSION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0419</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>comsvcs.lib;comsuppw.lib;gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release;$(SolutionDir)/../Common/DocxFormat/Lib/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<MergedIDLBaseFileName>_ASCOfficeDocxFile2.idl</MergedIDLBaseFileName>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(OutDir)ASCOfficeDocxFile2.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<PostBuildEvent>
<Message>copy to Redist</Message>
<Command>copy "$(TargetPath)" "$(SolutionDir)..\Redist"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ResourceCompile Include="ASCOfficeDocxFile2.rc" />
</ItemGroup>
<ItemGroup>
<None Include="ASCOfficeDocxFile2.rgs" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\XlsxSerializerCom\Common\Common.cpp" />
<ClCompile Include="..\XlsxSerializerCom\Reader\ChartFromToBinary.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="..\XlsxSerializerCom\Reader\CommonWriter.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="..\XlsxSerializerCom\Reader\CSVReader.cpp" />
<ClCompile Include="..\XlsxSerializerCom\Writer\CSVWriter.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="ASCOfficeDocxFile2.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|Win32'">$(IntDir)</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|x64'">$(IntDir)</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|Win32'">$(IntDir)</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|x64'">$(IntDir)</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)</ObjectFileName>
</ClCompile>
<ClCompile Include="DocWrapper\DocxSerializer.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="DocWrapper\FontProcessor.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="DocWrapper\XlsxSerializer.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)</ObjectFileName>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)</ObjectFileName>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|Win32'">Create</PrecompiledHeader>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|Win32'">$(IntDir)</ObjectFileName>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|x64'">Create</PrecompiledHeader>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseASC|x64'">$(IntDir)</ObjectFileName>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|Win32'">Create</PrecompiledHeader>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|Win32'">$(IntDir)</ObjectFileName>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|x64'">Create</PrecompiledHeader>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseOpenSource|x64'">$(IntDir)</ObjectFileName>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)</ObjectFileName>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)</ObjectFileName>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\XlsxSerializerCom\Common\BinReaderWriterDefines.h" />
<ClInclude Include="..\XlsxSerializerCom\Common\Common.h" />
<ClInclude Include="..\XlsxSerializerCom\Reader\BinaryWriter.h" />
<ClInclude Include="..\XlsxSerializerCom\Reader\ChartFromToBinary.h" />
<ClInclude Include="..\XlsxSerializerCom\Reader\CommonWriter.h" />
<ClInclude Include="..\XlsxSerializerCom\Reader\CSVReader.h" />
<ClInclude Include="..\XlsxSerializerCom\Writer\BinaryCommonReader.h" />
<ClInclude Include="..\XlsxSerializerCom\Writer\BinaryReader.h" />
<ClInclude Include="..\XlsxSerializerCom\Writer\CSVWriter.h" />
<ClInclude Include="BinReader\ChartWriter.h" />
<ClInclude Include="BinReader\CommentsWriter.h" />
<ClInclude Include="BinReader\ContentTypesWriter.h" />
<ClInclude Include="BinReader\DocumentRelsWriter.h" />
<ClInclude Include="BinReader\DocumentWriter.h" />
<ClInclude Include="BinReader\FileDownloader.h" />
<ClInclude Include="BinReader\FileWriter.h" />
<ClInclude Include="BinReader\fontTableWriter.h" />
<ClInclude Include="BinReader\HeaderFooterWriter.h" />
<ClInclude Include="BinReader\MediaWriter.h" />
<ClInclude Include="BinReader\NumberingWriter.h" />
<ClInclude Include="BinReader\ReaderClasses.h" />
<ClInclude Include="BinReader\Readers.h" />
<ClInclude Include="BinReader\SettingWriter.h" />
<ClInclude Include="BinReader\StylesWriter.h" />
<ClInclude Include="BinWriter\BinEquationWriter.h" />
<ClInclude Include="BinWriter\BinReaderWriterDefines.h" />
<ClInclude Include="BinWriter\BinWriters.h" />
<ClInclude Include="DocWrapper\DocxSerializer.h" />
<ClInclude Include="DocWrapper\FontProcessor.h" />
<ClInclude Include="DocWrapper\XlsxSerializer.h" />
<ClInclude Include="DocxFile2.h" />
<ClInclude Include="PptxFile.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="version.h" />
<ClInclude Include="XlsxFile2.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ASCHTMLRenderer\ASCHTMLRendererLib.vcxproj">
<Project>{dc24710e-8df2-4a7a-b7c3-2313e294143c}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcxproj">
<Project>{36636678-ae25-4be6-9a34-2561d1bcf302}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\ASCOfficeUtils\ASCOfficeUtilsLib\Win\ASCOfficeUtilsLib.vcxproj">
<Project>{3f3cb5a1-bb01-49c1-9342-4a69e30f9ef6}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\Common\DocxFormat\Projects\DocxFormat2005.vcxproj">
<Project>{a100103a-353e-45e8-a9b8-90b87cc5c0b0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\Common\DocxFormat\Source\XML\libxml2\win_build\libxml2.vcxproj">
<Project>{21663823-de45-479b-91d0-b4fef4916ef0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="res">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="_">
<UniqueIdentifier>{3710d9f5-676c-4632-a22d-632057708e84}</UniqueIdentifier>
</Filter>
<Filter Include="DocWrapper">
<UniqueIdentifier>{da428055-8b24-49ac-a8fd-fb7567370761}</UniqueIdentifier>
</Filter>
<Filter Include="XLSX">
<UniqueIdentifier>{2b0ee265-23a7-4758-b2e7-9f335c2932c6}</UniqueIdentifier>
</Filter>
<Filter Include="XLSX\Common">
<UniqueIdentifier>{d3849c02-1f95-40b4-9885-3850ac887162}</UniqueIdentifier>
</Filter>
<Filter Include="XLSX\Reader">
<UniqueIdentifier>{6e356698-1762-48ec-aabe-e67cd986841e}</UniqueIdentifier>
</Filter>
<Filter Include="XLSX\Writer">
<UniqueIdentifier>{a6d705d7-de56-4085-ad90-9a64fb2a6377}</UniqueIdentifier>
</Filter>
<Filter Include="DOCX">
<UniqueIdentifier>{819e4322-0635-4959-bee0-bd7258b92b82}</UniqueIdentifier>
</Filter>
<Filter Include="DOCX\Reader">
<UniqueIdentifier>{710f68a2-18f0-40c6-8e32-5474b8301127}</UniqueIdentifier>
</Filter>
<Filter Include="DOCX\Reader\OOXWriter">
<UniqueIdentifier>{fb8f2ef8-d3e2-4bae-a746-4dd375a45521}</UniqueIdentifier>
</Filter>
<Filter Include="DOCX\Common">
<UniqueIdentifier>{845568f5-8012-46bf-a6d7-63610040f153}</UniqueIdentifier>
</Filter>
<Filter Include="DOCX\Writer">
<UniqueIdentifier>{276e338e-bf55-47f1-8fd6-d73552eed0d4}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ASCOfficeDocxFile2.rc">
<Filter>res</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="ASCOfficeDocxFile2.rgs">
<Filter>res</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ASCOfficeDocxFile2.cpp">
<Filter>_</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>_</Filter>
</ClCompile>
<ClCompile Include="DocWrapper\FontProcessor.cpp">
<Filter>DocWrapper</Filter>
</ClCompile>
<ClCompile Include="DocWrapper\XlsxSerializer.cpp">
<Filter>XLSX</Filter>
</ClCompile>
<ClCompile Include="..\XlsxSerializerCom\Common\Common.cpp">
<Filter>XLSX\Common</Filter>
</ClCompile>
<ClCompile Include="..\XlsxSerializerCom\Reader\CSVReader.cpp">
<Filter>XLSX\Reader</Filter>
</ClCompile>
<ClCompile Include="..\XlsxSerializerCom\Reader\ChartFromToBinary.cpp">
<Filter>XLSX\Writer</Filter>
</ClCompile>
<ClCompile Include="..\XlsxSerializerCom\Reader\CommonWriter.cpp">
<Filter>XLSX\Writer</Filter>
</ClCompile>
<ClCompile Include="..\XlsxSerializerCom\Writer\CSVWriter.cpp">
<Filter>XLSX\Writer</Filter>
</ClCompile>
<ClCompile Include="DocWrapper\DocxSerializer.cpp">
<Filter>DOCX</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Resource.h">
<Filter>_</Filter>
</ClInclude>
<ClInclude Include="version.h">
<Filter>_</Filter>
</ClInclude>
<ClInclude Include="DocWrapper\FontProcessor.h">
<Filter>DocWrapper</Filter>
</ClInclude>
<ClInclude Include="DocWrapper\XlsxSerializer.h">
<Filter>XLSX</Filter>
</ClInclude>
<ClInclude Include="..\XlsxSerializerCom\Common\BinReaderWriterDefines.h">
<Filter>XLSX\Common</Filter>
</ClInclude>
<ClInclude Include="..\XlsxSerializerCom\Common\Common.h">
<Filter>XLSX\Common</Filter>
</ClInclude>
<ClInclude Include="..\XlsxSerializerCom\Writer\BinaryCommonReader.h">
<Filter>XLSX\Reader</Filter>
</ClInclude>
<ClInclude Include="..\XlsxSerializerCom\Writer\BinaryReader.h">
<Filter>XLSX\Reader</Filter>
</ClInclude>
<ClInclude Include="..\XlsxSerializerCom\Reader\CSVReader.h">
<Filter>XLSX\Reader</Filter>
</ClInclude>
<ClInclude Include="..\XlsxSerializerCom\Reader\BinaryWriter.h">
<Filter>XLSX\Writer</Filter>
</ClInclude>
<ClInclude Include="..\XlsxSerializerCom\Reader\ChartFromToBinary.h">
<Filter>XLSX\Writer</Filter>
</ClInclude>
<ClInclude Include="..\XlsxSerializerCom\Reader\CommonWriter.h">
<Filter>XLSX\Writer</Filter>
</ClInclude>
<ClInclude Include="..\XlsxSerializerCom\Writer\CSVWriter.h">
<Filter>XLSX\Writer</Filter>
</ClInclude>
<ClInclude Include="DocWrapper\DocxSerializer.h">
<Filter>DOCX</Filter>
</ClInclude>
<ClInclude Include="BinReader\ReaderClasses.h">
<Filter>DOCX\Reader</Filter>
</ClInclude>
<ClInclude Include="BinReader\Readers.h">
<Filter>DOCX\Reader</Filter>
</ClInclude>
<ClInclude Include="BinReader\ChartWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\CommentsWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\ContentTypesWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\DocumentRelsWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\DocumentWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\FileWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\fontTableWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\HeaderFooterWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\MediaWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\NumberingWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\SettingWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\StylesWriter.h">
<Filter>DOCX\Reader\OOXWriter</Filter>
</ClInclude>
<ClInclude Include="BinReader\FileDownloader.h">
<Filter>DOCX\Common</Filter>
</ClInclude>
<ClInclude Include="BinWriter\BinEquationWriter.h">
<Filter>DOCX\Writer</Filter>
</ClInclude>
<ClInclude Include="BinWriter\BinReaderWriterDefines.h">
<Filter>DOCX\Writer</Filter>
</ClInclude>
<ClInclude Include="BinWriter\BinWriters.h">
<Filter>DOCX\Writer</Filter>
</ClInclude>
<ClInclude Include="DocxFile2.h" />
<ClInclude Include="PptxFile.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="XlsxFile2.h" />
</ItemGroup>
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeDocxFile2", "ASCOfficeDocxFile2.vcxproj", "{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}"
ProjectSection(ProjectDependencies) = postProject
{DC24710E-8DF2-4A7A-B7C3-2313E294143C} = {DC24710E-8DF2-4A7A-B7C3-2313E294143C}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6} = {3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\Common\DocxFormat\Projects\DocxFormat2005.vcxproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcxproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCHTMLRenderer", "..\ASCHTMLRenderer\ASCHTMLRendererLib.vcxproj", "{DC24710E-8DF2-4A7A-B7C3-2313E294143C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\Common\DocxFormat\Source\XML\libxml2\win_build\libxml2.vcxproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeUtilsLib", "..\ASCOfficeUtils\ASCOfficeUtilsLib\Win\ASCOfficeUtilsLib.vcxproj", "{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Debug|Win32.ActiveCfg = Debug|Win32
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Debug|Win32.Build.0 = Debug|Win32
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Debug|x64.ActiveCfg = Debug|x64
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Debug|x64.Build.0 = Debug|x64
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Release|Win32.ActiveCfg = Release|Win32
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Release|Win32.Build.0 = Release|Win32
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Release|x64.ActiveCfg = Release|x64
{D02A88E6-5B2B-4A15-A4F6-C057F698FC53}.Release|x64.Build.0 = Release|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.ActiveCfg = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.Build.0 = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|x64.ActiveCfg = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|x64.Build.0 = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.ActiveCfg = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.Build.0 = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|x64.ActiveCfg = Release|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.ActiveCfg = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.Build.0 = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.ActiveCfg = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.Build.0 = Release|x64
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug|Win32.ActiveCfg = Debug|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug|Win32.Build.0 = Debug|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug|x64.ActiveCfg = Debug|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release|Win32.ActiveCfg = Release|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release|Win32.Build.0 = Release|Win32
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release|x64.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.Build.0 = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.ActiveCfg = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.ActiveCfg = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.Build.0 = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|x64.ActiveCfg = Debug|x64
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|x64.Build.0 = Debug|x64
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.ActiveCfg = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.Build.0 = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|x64.ActiveCfg = Release|x64
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
EndGlobal
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "resource.h" // main symbols
#include "DocWrapper/DocxSerializer.h"
#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
#error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
#endif
// IAVSOfficeDocxFile2
[ object, uuid("98B1ECA8-9575-4eec-B327-8F8BA3FA232C"), dual, pointer_default(unique) ]
__interface IAVSOfficeDocxFile2: IDispatch
{
[id(1)] HRESULT OpenFile([in] BSTR bsInputDir, [in] BSTR bsFileDst);
[id(2)] HRESULT GetJfdoc([in] BSTR bsInputDir, [out] BSTR* bsJfdoc);
[id(3)] HRESULT SetMediaDir([in] BSTR bsMediaDir);
[id(4)] HRESULT SetFontDir([in] BSTR bsFontDir);
[id(5)] HRESULT SetUseSystemFonts([in] BOOL useSystemFonts);
[id(6)] HRESULT GetBinaryContent([in] BSTR bsTxContent, [out, satype("BYTE")] SAFEARRAY** ppBinary);
[id(10)] HRESULT Write([in] BSTR bstrFileIn, [in] BSTR bstrFileOut);
[id(20)] HRESULT GetXmlContent([in, satype("BYTE")] SAFEARRAY* pBinaryObj, [in] LONG lStart, [in] LONG lLength, [out] BSTR* bsXml);
[id(2000 + 0)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue);
[id(2001 + 1)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue);
};
// _IAVSOfficeDocxFile2Events
[uuid("C3CF75C3-28FE-4b2c-A770-5952ADF4EAC2"), dispinterface]
__interface _IAVSOfficeDocxFile2Events
{
};
// CAVSOfficeDocxFile2
[ coclass, default(IAVSOfficeDocxFile2), threading(apartment), event_source(com), vi_progid("DocxFile2"), progid("DocxFile2.Rend.1"), version(1.0), uuid("CD07583A-6362-454f-A14E-542AE706FFBC") ]
class ATL_NO_VTABLE CAVSOfficeDocxFile2 : public IAVSOfficeDocxFile2
{
public:
__event __interface _IAVSOfficeDocxFile2Events;
private:
BinDocxRW::CDocxSerializer m_oCDocxSerializer;
IUnknown* m_pThis;
public:
DECLARE_PROTECT_FINAL_CONSTRUCT()
CAVSOfficeDocxFile2()
{
m_pThis = NULL;
}
~CAVSOfficeDocxFile2()
{
RELEASEINTERFACE(m_pThis);
}
public:
STDMETHOD(OpenFile)(BSTR bsInputDir, BSTR bsFileDst)
{
bool bRes = m_oCDocxSerializer.saveToFile(CString(bsFileDst), CString(bsInputDir), CString(_T("")));
return bRes ? S_OK : S_FALSE;
}
STDMETHOD(GetJfdoc)(BSTR bsInputDir, BSTR* bsJfdoc)
{
return S_OK;
}
STDMETHOD(SetMediaDir)(BSTR bsMediaDir)
{
return S_OK;
}
STDMETHOD(SetFontDir)(BSTR bsFontDir)
{
m_oCDocxSerializer.setFontDir(CString(bsFontDir));
return S_OK;
}
STDMETHOD(SetUseSystemFonts)(BOOL useSystemFonts)
{
//DocWrapper::FontProcessor::useSystemFonts = (useSystemFonts == TRUE);
return S_OK;
}
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue)
{
CString sParamName; sParamName = ParamName;
if (_T("EmbeddedFontsDirectory") == sParamName && ParamValue.vt == VT_BSTR)
{
m_oCDocxSerializer.setEmbeddedFontsDir(CString(ParamValue.bstrVal));
return S_OK;
}
else if (_T("FontDir") == sParamName && ParamValue.vt == VT_BSTR)
{
m_oCDocxSerializer.setFontDir(CString(ParamValue.bstrVal));
}
else if (_T("SaveChartAsImg") == sParamName && ParamValue.vt == VT_BOOL)
{
m_oCDocxSerializer.setSaveChartAsImg(VARIANT_FALSE != ParamValue.boolVal);
}
else if (_T("NoBase64Save") == sParamName && ParamValue.vt == VT_BOOL)
{
m_oCDocxSerializer.setIsNoBase64Save(VARIANT_FALSE != ParamValue.boolVal);
}
return S_OK;
}
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue)
{
return S_OK;
}
STDMETHOD(GetBinaryContent)(BSTR bsTxContent, SAFEARRAY** ppBinary)
{
unsigned char* pData = NULL;
long lDataSize = 0;
bool bRes = true;
//m_oCDocxSerializer.getBinaryContent(CString(bsTxContent), &pData, lDataSize);
if(NULL != pData && lDataSize > 0)
{
SAFEARRAYBOUND rgsabound[1];
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = lDataSize;
LPSAFEARRAY pArray = SafeArrayCreate(VT_UI1, 1, rgsabound);
BYTE* pDataD = (BYTE*)pArray->pvData;
BYTE* pDataS = pData;
memcpy(pDataD, pDataS, lDataSize);
*ppBinary = pArray;
}
RELEASEARRAYOBJECTS(pData);
return bRes ? S_OK : S_FALSE;
}
STDMETHOD(Write)(BSTR bstrFileIn, BSTR bstrDirectoryOut)
{
CString sDirectoryOut = bstrDirectoryOut;
CString sThemePath;
CString sMediaPath;
CString sEmbedPath;
if (!m_oCDocxSerializer.CreateDocxFolders(sDirectoryOut, sThemePath, sMediaPath, sEmbedPath))
return S_FALSE;
bool bRes = m_oCDocxSerializer.loadFromFile(CString(bstrFileIn), CString(bstrDirectoryOut), CString(_T("")), CString(sThemePath.GetString()), CString(sMediaPath.GetString()), sEmbedPath);
return bRes ? S_OK : S_FALSE;
}
STDMETHOD(GetXmlContent)(SAFEARRAY* pBinaryObj, LONG lStart, LONG lLength, BSTR* bsXml)
{
CString sRes;
bool bRes = true;
//m_oCDocxSerializer.getXmlContent((BYTE*)pBinaryObj->pvData, pBinaryObj->rgsabound[0].cElements, lStart, lLength, sRes);
(*bsXml) = sRes.AllocSysString();
return bRes ? S_OK : S_FALSE;
}
private:
};
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
// CAVSOfficePPTXFile.h : Declaration of the CAVSOfficePPTXFile
#pragma once
#include "stdafx.h"
#include "resource.h" // main symbols
#include "../Common/OfficeFileTemplate.h"
#include "../ASCOfficePPTXFile/ASCOfficePPTXFile.h"
#include "../Common/DocxFormat/Source/SystemUtility/File.h"
#include "../ASCOfficeUtils/ASCOfficeUtilsLib/OfficeUtils.h"
bool comExtractFile(void* pArg, CString& sFile, CString& sDir);
bool comCompressFile(void* pArg, CString& sDir, CString& sFile);
bool comProgress(void* pArg, long ID, long Percent);
// IAVSOfficePPTXFile
[object, uuid("096DBAB4-3E54-4e14-99F4-B57D97081C61"), dual, pointer_default(unique)]
__interface IAVSOfficePPTXFile : IAVSOfficeFileTemplate
{
// [id(3), helpstring("method SaveAsDrawingXML")] HRESULT SaveAsDrawingXML([in] BSTR sSrcFileName, [in] BSTR sDestPath, [in] BSTR sDestXMLFileName);
[propget, id(4), helpstring("property TempDirectory")] HRESULT TempDirectory([out, retval] BSTR* pVal);
[propput, id(4), helpstring("property TempDirectory")] HRESULT TempDirectory([in] BSTR newVal);
[id(5), helpstring("method GetDVDXml")] HRESULT GetDVDXml([out,retval] BSTR* pbstrPTTXml);
[id(6), helpstring("method GetBluRayXml")] HRESULT GetBluRayXml([out,retval] BSTR* pbstrDVDXml);
[propget, id(7), helpstring("property DrawingXml")] HRESULT DrawingXml([out, retval] BSTR* pVal);
[id(2000 + 0)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue);
[id(2001 + 1)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue);
};
// IAVSOfficePPTXFile2
[object, uuid("68603ED6-0BB4-4330-9A80-D06B855D6DAA"), dual, pointer_default(unique)]
__interface IAVSOfficePPTXFile2 : IDispatch
{
[id(10000 + 0)] HRESULT OpenFileToPPTY([in] BSTR bsInputDir, [in] BSTR bsFileDst);
[id(10000 + 1)] HRESULT OpenDirectoryToPPTY([in] BSTR bsInputDir, [in] BSTR bsFileDst);
[id(10000 + 2)] HRESULT SetMediaDir([in] BSTR bsMediaDir);
[id(10000 + 3)] HRESULT SetFontDir([in] BSTR bsFontDir);
[id(10000 + 4)] HRESULT SetUseSystemFonts([in] VARIANT_BOOL useSystemFonts);
[id(10000 + 5)] HRESULT ConvertPPTYToPPTX([in] BSTR bsInputFile, [in] BSTR bsFileDst, [in] BSTR bsThemesFolder);
[id(10000 + 6)] HRESULT SetThemesDir([in] BSTR bsThemesPath);
};
// CAVSOfficePPTXFile
[coclass, uuid("A3B9F270-175E-4982-B302-55ED6DF6361E"), event_source(com), threading(apartment), vi_progid("AVSOfficePPTXFile.OfficePPTXFile"), progid("AVSOfficePPTXFile.OfficePPTXFile.1"), version(1.0), registration_script("control.rgs")]
class ATL_NO_VTABLE CAVSOfficePPTXFile
: public IAVSOfficePPTXFile
, public IAVSOfficePPTXFile2
{
private:
CPPTXFile m_oCPPTXFile;
public:
__event __interface _IAVSOfficeFileTemplateEvents2;
CAVSOfficePPTXFile() : m_oCPPTXFile(comExtractFile, comCompressFile, comProgress, this)
{
}
~CAVSOfficePPTXFile()
{
}
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
public:
HRESULT LoadFromFile(BSTR sSrcFileName, BSTR sDstPath, BSTR sXMLOptions)
{
return m_oCPPTXFile.LoadFromFile(sSrcFileName, sDstPath, sXMLOptions);
}
public:
HRESULT SaveToFile(BSTR sDstFileName, BSTR sSrcPath, BSTR sXMLOptions)
{
return m_oCPPTXFile.SaveToFile(sDstFileName, sSrcPath, sXMLOptions);
}
public:
STDMETHOD(get_TempDirectory)(BSTR* pVal)
{
return m_oCPPTXFile.get_TempDirectory(pVal);
}
STDMETHOD(put_TempDirectory)(BSTR newVal)
{
return m_oCPPTXFile.put_TempDirectory(newVal);
}
public:
STDMETHOD(GetDVDXml)(BSTR* pbstrPTTXml)
{
return m_oCPPTXFile.GetDVDXml(pbstrPTTXml);
}
STDMETHOD(GetBluRayXml)(BSTR* pbstrDVDXml)
{
return m_oCPPTXFile.GetBluRayXml(pbstrDVDXml);
}
public:
STDMETHOD(get_DrawingXml)(BSTR* pVal)
{
return m_oCPPTXFile.get_DrawingXml(pVal);
}
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue)
{
return m_oCPPTXFile.SetAdditionalParam(ParamName, ParamValue);
}
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue)
{
return m_oCPPTXFile.GetAdditionalParam(ParamName, ParamValue);
}
// to PPTY
STDMETHOD(SetMediaDir)(BSTR bsMediaDir)
{
return m_oCPPTXFile.SetMediaDir(bsMediaDir);
}
STDMETHOD(SetFontDir)(BSTR bsFontDir)
{
return m_oCPPTXFile.SetFontDir(bsFontDir);
}
STDMETHOD(SetThemesDir)(BSTR bsDir)
{
return m_oCPPTXFile.SetThemesDir(bsDir);
}
STDMETHOD(SetUseSystemFonts)(VARIANT_BOOL useSystemFonts)
{
return m_oCPPTXFile.SetUseSystemFonts(useSystemFonts);
}
STDMETHOD(OpenFileToPPTY)(BSTR bsInput, BSTR bsOutput)
{
return m_oCPPTXFile.OpenFileToPPTY(bsInput, bsOutput);
}
STDMETHOD(OpenDirectoryToPPTY)(BSTR bsInput, BSTR bsOutput)
{
return m_oCPPTXFile.OpenDirectoryToPPTY(bsInput, bsOutput);
}
STDMETHOD(ConvertPPTYToPPTX)(BSTR bsInput, BSTR bsOutput, BSTR bsThemesFolder)
{
return m_oCPPTXFile.ConvertPPTYToPPTX(bsInput, bsOutput, bsThemesFolder);
}
//void LoadResourceFile(HINSTANCE hInst, LPCTSTR sResName, LPCTSTR sResType, const CString& strDstFile)
//{
// HRSRC hrRes = FindResource(hInst, sResName, sResType);
// if (!hrRes)
// return;
// HGLOBAL hGlobal = LoadResource(hInst, hrRes);
// DWORD sz = SizeofResource(hInst, hrRes);
// void* ptrRes = LockResource(hGlobal);
// CFile oFile;
// oFile.CreateFile(strDstFile);
// oFile.WriteFile(ptrRes, sz);
// UnlockResource(hGlobal);
// FreeResource(hGlobal);
//}
};
bool comExtractFile(void* pArg, CString& sFile, CString& sDir)
{
COfficeUtils oCOfficeUtils(NULL);
return S_OK == oCOfficeUtils.ExtractToDirectory(string2std_string(sFile), string2std_string(sDir), NULL, 0) ? true : false;
}
bool comCompressFile(void* pArg, CString& sDir, CString& sFile)
{
COfficeUtils oCOfficeUtils(NULL);
return S_OK == oCOfficeUtils.CompressFileOrDirectory(string2std_string(sDir), string2std_string(sFile), -1) ? true : false;
}
bool comProgress(void* pArg, long ID, long Percent)
{
CAVSOfficePPTXFile* pCAVSOfficePPTXFile = static_cast<CAVSOfficePPTXFile*>(pArg);
SHORT res = 0;
pCAVSOfficePPTXFile->OnProgressEx(ID, Percent, &res);
return (res != 0);
}
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by AVSOfficeDocxFile2.rc
//
#define IDS_PROJNAME 100
#define IDR_ASCOFFICEDOCXFILE2 101
#define IDB_DEFAULT_DOC_RELS 201
#define IDB_DEFAULT_DOC_APP 202
#define IDB_DEFAULT_DOC_CORE 203
#define IDB_DEFAULT_DOC_THEME 204
#define IDB_DEFAULT_DOC_WEBSETTINGS 205
#define IDB_DEFAULT_XLSX_THEME 206
#define IDB_XML_NOTESTHEME 207
#define IDB_XML_NOTESMASTER 208
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 401
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "resource.h"
#include "../Common/OfficeFileTemplate.h"
#include "DocWrapper/XlsxSerializer.h"
#include "../XlsxSerializerCom/Common/Common.h"
#include "../XlsxSerializerCom/Common/BinReaderWriterDefines.h"
#include "../DesktopEditor/common/Directory.h"
[
object,
uuid("B7AD8AA6-A103-4260-82BE-338C32543B90"),
dual, helpstring("IAVSOfficeXlsxSerizer Interface"),
pointer_default(unique)
]
__interface IAVSOfficeXlsxSerizer : public IAVSOfficeFileTemplate
{
[id(20)] HRESULT SetFontDir([in] BSTR bsFontDir);
[id(30)] HRESULT LoadChart([in] BSTR bsFilename, [out, satype("BYTE")] SAFEARRAY** ppBinary);
[id(31)] HRESULT SaveChart([in, satype("BYTE")] SAFEARRAY* pBinaryObj, [in] LONG lStart, [in] LONG lLength, [in] BSTR bsFilename, [in] BSTR bsContentTypePath, [out] BSTR* bsContentTypeElement);
[id(32)] HRESULT SetDrawingConverter([in] IUnknown* pDocument);
[id(120)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue);
[id(130)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue);
};
[
coclass,
default(IAVSOfficeXlsxSerizer),
event_receiver(native),
threading(apartment),
vi_progid("ASCOfficeXlsxSerizer.AVSDocume"),
progid("ASCOfficeXlsxSerizer.AVSDocu.1"),
version(1.0),
uuid("BDE1A2A6-2EE0-4507-BD2E-0C42DA4101C2"),
helpstring("ASCOfficeXlsxSerizer Class")
]
class ATL_NO_VTABLE CAVSOfficeXlsxSerizer : public IAVSOfficeXlsxSerizer
{
private:
BinXlsxRW::CXlsxSerializer m_oXlsxSerializer;
IUnknown* m_pThis;
public:
CAVSOfficeXlsxSerizer()
{
}
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
public:
STDMETHOD(LoadFromFile)(BSTR sSrcFileName, BSTR bstrDstPath, BSTR bstrXMLOptions)
{
CString sDstPath = bstrDstPath;
CString sMediaPath;
CString sEmbedPath;
m_oXlsxSerializer.CreateXlsxFolders(CString(bstrXMLOptions), sDstPath, sMediaPath, sEmbedPath);
bool bRes = m_oXlsxSerializer.loadFromFile(CString(sSrcFileName), sDstPath, CString(bstrXMLOptions), sMediaPath, sEmbedPath);
return bRes ? S_OK : S_FALSE;
}
STDMETHOD(SaveToFile)(BSTR sDstFileName, BSTR sSrcPath, BSTR sXMLOptions)
{
bool bRes = m_oXlsxSerializer.saveToFile(CString(sDstFileName), CString(sSrcPath), CString(sXMLOptions)) ? S_OK : S_FALSE;
return bRes ? S_OK : S_FALSE;
}
STDMETHOD(LoadChart)(BSTR bsFilename, SAFEARRAY** ppBinary)
{
unsigned char* pData = NULL;
long lDataSize = 0;
bool bRes = true;
//m_oXlsxSerializer.loadChart(CString(bsFilename), &pData, lDataSize);
if(NULL != pData && lDataSize > 0)
{
SAFEARRAYBOUND rgsabound[1];
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = lDataSize;
LPSAFEARRAY pArray = SafeArrayCreate(VT_UI1, 1, rgsabound);
BYTE* pDataD = (BYTE*)pArray->pvData;
BYTE* pDataS = pData;
memcpy(pDataD, pDataS, lDataSize);
*ppBinary = pArray;
}
RELEASEARRAYOBJECTS(pData);
return bRes ? S_OK : S_FALSE;
}
STDMETHOD(SaveChart)(SAFEARRAY* pBinaryObj, LONG lStart, LONG lLength, BSTR bsFilename, BSTR bsContentTypePath, BSTR* bsContentTypeElement)
{
CString* sContentTypeElement = NULL;
bool bRes = true;
//m_oXlsxSerializer.saveChart(pBinaryObj, lStart, lLength, CString(bsFilename), CString(bsContentTypePath), &sContentTypeElement);
if(NULL != sContentTypeElement)
*bsContentTypeElement = sContentTypeElement->AllocSysString();
return bRes ? S_OK : S_FALSE;
}
STDMETHOD(SetDrawingConverter)(IUnknown* pDocument)
{
//m_oXlsxSerializer.setDrawingConverter(pDocument);
return S_OK;
}
STDMETHOD(SetFontDir)(BSTR bsFontDir)
{
m_oXlsxSerializer.setFontDir(CString(bsFontDir));
return S_OK;
}
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue)
{
CString sParamName; sParamName = ParamName;
if (_T("EmbeddedFontsDirectory") == sParamName && ParamValue.vt == VT_BSTR)
{
m_oXlsxSerializer.setEmbeddedFontsDir(CString(ParamValue.bstrVal));
return S_OK;
}
return S_OK;
}
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue)
{
return S_OK;
}
private:
};
\ No newline at end of file
/*********************************************************
DllData file -- generated by MIDL compiler
DO NOT ALTER THIS FILE
This file is regenerated by MIDL on every IDL file compile.
To completely reconstruct this file, delete it and rerun MIDL
on all the IDL files in this DLL, specifying this file for the
/dlldata command line option
*********************************************************/
#define PROXY_DELEGATION
#include <rpcproxy.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_PROXY_FILE( _ASCOfficeDocxFile2 )
PROXYFILE_LIST_START
/* Start of list */
REFERENCE_PROXY_FILE( _ASCOfficeDocxFile2 ),
/* End of list */
PROXYFILE_LIST_END
DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
#ifdef __cplusplus
} /*extern "C" */
#endif
/* end of generated dlldata file */
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
// stdafx.cpp : source file that includes just the standard includes
// AVSOfficeDocxFile2.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once
#ifndef STRICT
#define STRICT
#endif
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0500 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target Windows 2000 or later.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
#endif
#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#define _CRT_SECURE_NO_DEPRECATE
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
// turns off ATL's hiding of some common and often safely ignored warning messages
#define _ATL_ALL_WARNINGS
#include <windows.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <atltypes.h>
#include <atlctl.h>
#include <atlhost.h>
using namespace ATL;
#include "../Common/ASCUtils.h"
#include <Gdiplus.h>
#pragma comment(lib, "gdiplus.lib")
using namespace Gdiplus;
#ifdef BUILD_CONFIG_OPENSOURCE_VERSION
#import "../Redist/OfficeCore.dll" named_guids raw_interfaces_only rename_namespace("OfficeCore")
#ifndef _DEFINE_NAMESPACE_ASC_GRAPHICS_
#define _DEFINE_NAMESPACE_ASC_GRAPHICS_
namespace ASCGraphics
{
typedef OfficeCore::IWinFonts IASCFontManager;
const GUID CLSID_CASCFontManager = OfficeCore::CLSID_CWinFonts;
const GUID IID_IASCFontManager = OfficeCore::IID_IWinFonts;
}
#endif
#else
//#import "../Redist/ASCGraphics.dll" named_guids raw_interfaces_only rename_namespace("ASCGraphics")
#import "../Redist/ASCFontConverter.dll" named_guids raw_interfaces_only rename_namespace("Fonts")
#endif
//#import "../Redist/ASCOfficeUtils.dll" named_guids raw_interfaces_only rename_namespace("OfficeUtils")
//#import "../Redist/ASCOfficePPTXFile.dll" named_guids raw_interfaces_only rename_namespace("PPTXFile"), exclude("_IAVSOfficeFileTemplateEvents"), exclude("_IAVSOfficeFileTemplateEvents2"), exclude("IASCRenderer")
#include "../Common/DocxFormat/Source/DocxFormat/Docx.h"
#include "../Common/DocxFormat/Source/XlsxFormat/Xlsx.h"
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#define WIN32_LEAN_AND_MEAN
#include "WritingElement.h"
#include "Docx.h"
#include "DocMeasurer/FontProcessor.h"
#include "Docx.h"
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
//2
//0
//2
//330
#define INTVER 2,0,2,330
#define STRVER "2,0,2,330\0"
......@@ -448,7 +448,7 @@ void odt_conversion_context::set_master_page_name(std::wstring master_name)
int odt_conversion_context::get_current_section_columns()
{
if (sections_.size() > 0)
sections_.back().count_columns;
return sections_.back().count_columns;
else return 1;
}
void odt_conversion_context::add_section(bool continuous)
......
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "Elements.h"
class CAudioPart
{
public:
CString m_strFile;
double m_dStartTime;
double m_dEndTime;
double m_dClipStartTime;
double m_dClipEndTime;
double m_dAudioDuration;
bool m_bLoop;
bool m_bStop;
bool m_bIsTransition;
double m_dAmplify;
public:
CAudioPart()
{
m_strFile = _T("");
m_dStartTime = 0.0;
m_dEndTime = -1.0;
m_dClipStartTime = 0.0;
m_dClipEndTime = -1.0;
m_dAudioDuration = 0.0;
m_bLoop = false;
m_bStop = false;
m_bIsTransition = false;
m_dAmplify = 100.0;
}
~CAudioPart()
{
}
CAudioPart(const CAudioPart& oSrc)
{
*this = oSrc;
}
CAudioPart& operator=(const CAudioPart& oSrc)
{
m_strFile = oSrc.m_strFile;
m_dStartTime = oSrc.m_dStartTime;
m_dEndTime = oSrc.m_dEndTime;
m_dClipStartTime = oSrc.m_dClipStartTime;
m_dClipEndTime = oSrc.m_dClipEndTime;
m_dAudioDuration = oSrc.m_dAudioDuration;
m_bLoop = oSrc.m_bLoop;
m_bStop = oSrc.m_bStop;
m_bIsTransition = oSrc.m_bIsTransition;
m_dAmplify = oSrc.m_dAmplify;
return *this;
}
CAudioPart(CAudioElement* pAudioElem)
{
if (NULL == pAudioElem)
{
m_strFile = _T("");
m_dStartTime = 0.0;
m_dEndTime = -1.0;
m_dClipStartTime = 0.0;
m_dClipEndTime = -1.0;
m_dAudioDuration = 0.0;
m_bLoop = false;
m_bStop = false;
m_bIsTransition = false;
m_dAmplify = 100.0;
}
else
{
m_strFile = pAudioElem->m_strFileName;
m_dStartTime = pAudioElem->m_dStartTime;
m_dEndTime = pAudioElem->m_dEndTime;
m_dClipStartTime = pAudioElem->m_dClipStartTime;
m_dClipEndTime = pAudioElem->m_dClipEndTime;
m_dAudioDuration = pAudioElem->m_dAudioDuration;
m_bLoop = pAudioElem->m_bLoop;
m_bStop = false;
m_bIsTransition = false;
m_dAmplify = 100.0;
}
}
public:
void CalculateDuration()
{
if (0.0 < m_dAudioDuration || _T("") == m_strFile)
return;
VideoFile::IVideoFile3* pVideoFile = NULL;
if (SUCCEEDED(CoCreateInstance(VideoFile::CLSID_CVideoFile3, NULL, CLSCTX_ALL, VideoFile::IID_IVideoFile3, (void**)(&pVideoFile))))
{
if (NULL != pVideoFile)
{
BSTR bsFile = m_strFile.AllocSysString();
if (S_OK == pVideoFile->OpenFile(bsFile))
{
pVideoFile->get_audioDuration(&m_dAudioDuration);
}
SysFreeString(bsFile);
RELEASEINTERFACE(pVideoFile);
}
}
}
};
class CAudioOverlay
{
public:
CAtlArray<CAudioPart> m_arParts;
double m_dAllDuration;
public:
CAudioOverlay() : m_arParts(), m_dAllDuration(0.0)
{
}
~CAudioOverlay()
{
}
CAudioOverlay(const CAudioOverlay& oSrc)
{
*this = oSrc;
}
CAudioOverlay& operator=(const CAudioOverlay& oSrc)
{
m_arParts.Copy(oSrc.m_arParts);
m_dAllDuration = oSrc.m_dAllDuration;
return *this;
}
public:
void Calculate()
{
size_t nCount = m_arParts.GetCount();
// нормализуем для начала
for (size_t i = 0; i < nCount; ++i)
{
CAudioPart* pPart = &m_arParts[i];
pPart->CalculateDuration();
if (pPart->m_dStartTime < 0.0)
pPart->m_dStartTime = 0.0;
pPart->m_dEndTime = pPart->m_dStartTime + pPart->m_dAudioDuration;
if (pPart->m_dEndTime > m_dAllDuration)
{
pPart->m_dEndTime = m_dAllDuration;
}
if (pPart->m_bLoop)
{
pPart->m_dEndTime = m_dAllDuration;
}
}
// пересчет
for (size_t i = 0; i < nCount; ++i)
{
CAudioPart* pPart = &m_arParts[i];
if (pPart->m_bIsTransition)
{
if (pPart->m_bStop)
{
// нужно остановить всю музыку до этого
for (size_t j = 0; j < nCount; ++j)
{
if (j == i)
continue;
CAudioPart* pMem = &m_arParts[j];
if (pMem->m_dStartTime <= pPart->m_dStartTime && pMem->m_dEndTime > pPart->m_dStartTime)
{
pMem->m_dEndTime = pPart->m_dStartTime;
}
}
}
if (pPart->m_bLoop)
{
// зацикливаем до первого встречания аудио
double dMin = m_dAllDuration;
for (size_t j = 0; j < nCount; ++j)
{
if (j == i)
continue;
CAudioPart* pMem = &m_arParts[j];
if (pMem->m_dStartTime > pPart->m_dEndTime)
{
if (dMin > pMem->m_dStartTime)
dMin = pMem->m_dStartTime;
}
}
pPart->m_dEndTime = dMin;
}
}
else
{
if (pPart->m_bLoop)
{
pPart->m_dEndTime = m_dAllDuration;
}
}
}
}
CString GetAudioOverlay()
{
CString strRes = _T("");
size_t nCount = m_arParts.GetCount();
for (size_t i = 0; i < nCount; ++i)
{
CAudioPart* pPart = &m_arParts[i];
CString strOverlay1 = _T("");
CString strOverlay2 = _T("");
strOverlay1.Format(_T("<AudioSource StartTime='%lf' Duration='%lf' Amplify='%lf'>"),
pPart->m_dStartTime, pPart->m_dEndTime - pPart->m_dStartTime, pPart->m_dAmplify);
int lIndex = pPart->m_strFile.Find(L"file:///");
if (0 == lIndex)
{
pPart->m_strFile = pPart->m_strFile.Mid(8);
pPart->m_strFile.Replace('/', '\\');
pPart->m_strFile.Replace(L"%20", L" ");
}
CString strFile_ = pPart->m_strFile;
CorrectXmlString(strFile_);
strOverlay2.Format(_T("<Source StartTime='%lf' EndTime='%lf'"), pPart->m_dClipStartTime, pPart->m_dClipEndTime);
strOverlay2 += _(" FilePath=\"") + strFile_ + _T("\">");
strOverlay2 += _T("</AudioSource>");
strOverlay1 += strOverlay2;
strRes += strOverlay1;
}
return strRes;
}
};
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
//#include "stdafx.h"
#include "Directory.h"
//#include <strsafe.h>
//#include <shlobj.h>
namespace FileSystem {
LPCTSTR Directory::GetCurrentDirectory() {
static const int bufferSize = MAX_PATH;
LPTSTR directory = new TCHAR[bufferSize];
DWORD lenght = ::GetCurrentDirectory(bufferSize, directory);
if (lenght == 0) {
delete[] directory;
directory = NULL;
}
return directory;
}
String Directory::GetCurrentDirectoryS() {
LPCTSTR directory = GetCurrentDirectory();
if (directory == NULL)
return String();
return String(directory);
}
bool Directory::CreateDirectory(LPCTSTR path) {
bool directoryCreated = false;
if (::CreateDirectory(path, NULL) == TRUE)
directoryCreated = true;
return directoryCreated;
}
bool Directory::CreateDirectory(const String& path) {
return CreateDirectory(path.c_str());
}
bool Directory::CreateDirectories(LPCTSTR path)
{
int codeResult = ERROR_SUCCESS;
codeResult = ::CreateDirectory (path, NULL);
//codeResult = SHCreateDirectory (NULL, path);
bool created = false;
if (codeResult == ERROR_SUCCESS)
created = true;
return created;
}
StringArray Directory::GetFilesInDirectory(LPCTSTR path, const bool& andSubdirectories) {
size_t pathLength = 0;
StringCchLength(path, MAX_PATH, &pathLength);
++pathLength;
size_t pathToFilesLength = pathLength + 3;
LPTSTR pathToFiles = new TCHAR[pathToFilesLength];
StringCchCopy(pathToFiles, pathLength, path);
StringCchCat(pathToFiles, pathToFilesLength, TEXT("\\*"));
WIN32_FIND_DATA findData;
HANDLE findResult = FindFirstFile(pathToFiles, &findData);
delete[] pathToFiles;
if (findResult == INVALID_HANDLE_VALUE)
return StringArray();
StringArray files;
do {
if (andSubdirectories || !(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
String file = findData.cFileName;
files.insert(files.end(), file);
}
} while (FindNextFile(findResult, &findData));
FindClose(findResult);
return files;
}
StringArray Directory::GetFilesInDirectory(const String& path, const bool& andSubdirectories) {
LPCTSTR pathW = path.c_str();
return GetFilesInDirectory(pathW, andSubdirectories);
}
int Directory::GetFilesCount(const CString& path, const bool& recursive) {
CString pathMask = path + _T("\\*");
WIN32_FIND_DATA findData;
HANDLE findResult = FindFirstFile(pathMask, &findData);
int filesCount = 0;
do {
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
if (!recursive)
continue;
if ((CString) findData.cFileName == _T("."))
continue;
if ((CString) findData.cFileName == _T(".."))
continue;
CString innerPath = path + _T('\\') + (CString) findData.cFileName;
filesCount += GetFilesCount(innerPath, recursive);
}
else
++filesCount;
} while (FindNextFile(findResult, &findData));
FindClose(findResult);
return filesCount;
}
}
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "Settings.h"
#if defined(_WIN32) || defined (_WIN64)
#include <windows.h>
#else
#endif
namespace FileSystem {
class Directory {
public:
static LPCTSTR GetCurrentDirectory();
static String GetCurrentDirectoryS();
static bool CreateDirectory(LPCTSTR path);
static bool CreateDirectory(const String& path);
static bool CreateDirectories(LPCTSTR path);
static StringArray GetFilesInDirectory(LPCTSTR path, const bool& andSubdirectories = false);
static StringArray GetFilesInDirectory(const String& path, const bool& andSubdirectories = false);
static int GetFilesCount(const std::wstring& path, const bool& recursive = false);
};
}
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
using namespace NSOfficeDrawing;
enum BrushType
{
BrushTypeSolid = 1000,
BrushTypeHorizontal = 2001,
BrushTypeVertical = 2002,
BrushTypeDiagonal1 = 2003,
BrushTypeDiagonal2 = 2004,
BrushTypeCenter = 2005,
BrushTypePathGradient1 = 2006,
BrushTypePathGradient2 = 2007,
BrushTypeCylinderHor = 2008,
BrushTypeCylinderVer = 2009,
BrushTypeTexture = 3008,
BrushTypeHatch1 = 4009,
BrushTypeHatch53 = 4061
};
enum BrushTextureMode
{
BrushTextureModeStretch = 0,
BrushTextureModeTile = 1,
BrushTextureModeTileCenter = 2
};
class CColor_
{
public:
BYTE R;
BYTE G;
BYTE B;
BYTE A;
public:
CColor_()
{
R = 0;
G = 0;
B = 0;
A = 0;
}
CColor_& operator =(const CColor_& oSrc)
{
R = oSrc.R;
G = oSrc.G;
B = oSrc.B;
A = oSrc.A;
return (*this);
}
CColor_& operator =(const DWORD& oSrc)
{
R = (BYTE)(oSrc >> 8);
G = (BYTE)(oSrc >> 16);
B = (BYTE)(oSrc >> 24);
A = (BYTE)oSrc;
return (*this);
}
CString ToString()
{
DWORD dwColor = 0;
/*dwColor |= A;
dwColor |= (R << 8);
dwColor |= (G << 16);
dwColor |= (B << 24);*/
dwColor |= R;
dwColor |= (G << 8);
dwColor |= (B << 16);
return NSAttributes::ToString((int)dwColor);
}
};
class CPen_
{
public:
CColor_ m_oColor;
int m_nWidth;
BYTE m_nAlpha;
public:
CPen_() : m_oColor()
{
m_oColor = 0;
m_nWidth = 1;
m_nAlpha = 255;
}
~CPen_()
{
}
CString ToString()
{
return AddEffectForGroup(_T("ImagePaint-SetPen"), _T("color='")
+ m_oColor.ToString() + _T("' alpha='") + NSAttributes::ToString((int)m_nAlpha)
+ _T("' size='") + NSAttributes::ToString(m_nWidth) + _T("'"));
}
CString ToString2()
{
return AddEffectForGroup(_T("pen"), _T("pen-color='")
+ m_oColor.ToString() + _T("' pen-alpha='") + NSAttributes::ToString((int)m_nAlpha)
+ _T("' pen-size='") + NSAttributes::ToString(m_nWidth) + _T("'"));
}
CPen_& operator =(const CPen_& oSrc)
{
m_oColor = oSrc.m_oColor;
m_nWidth = oSrc.m_nWidth;
m_nAlpha = oSrc.m_nAlpha;
return (*this);
}
};
class CBrush_
{
public:
int m_nBrushType;
CColor_ m_oColor1;
CColor_ m_oColor2;
BYTE m_Alpha1;
BYTE m_Alpha2;
CStringW m_sTexturePath;
int m_nTextureMode;
int m_nRectable;
BYTE m_nTextureAlpha;
RECT m_rcBounds;
public:
CBrush_()
{
m_nBrushType = (int)BrushTypeSolid;
m_oColor1 = 0xFFFFFFFF;
m_oColor2 = 0xFFFFFFFF;
m_Alpha1 = 255;
m_Alpha2 = 255;
m_sTexturePath = "";
m_nTextureMode = 0;
m_nRectable = 0;
m_nTextureAlpha = 255;
m_rcBounds.left = 0;
m_rcBounds.top = 0;
m_rcBounds.right = 0;
m_rcBounds.bottom = 0;
}
CBrush_& operator =(const CBrush_& oSrc)
{
m_nBrushType = oSrc.m_nBrushType;
m_oColor1 = oSrc.m_oColor1;
m_oColor2 = oSrc.m_oColor2;
m_Alpha1 = oSrc.m_Alpha1;
m_Alpha2 = oSrc.m_Alpha2;
m_sTexturePath = oSrc.m_sTexturePath;
m_nTextureMode = oSrc.m_nTextureMode;
m_nRectable = oSrc.m_nRectable;
m_nTextureAlpha = oSrc.m_nTextureAlpha;
m_rcBounds.left = oSrc.m_rcBounds.left;
m_rcBounds.top = oSrc.m_rcBounds.top;
m_rcBounds.right = oSrc.m_rcBounds.right;
m_rcBounds.bottom = oSrc.m_rcBounds.bottom;
return (*this);
}
CString ToString()
{
return AddEffectForGroup(_T("ImagePaint-SetBrush"),
_T("type='") + NSAttributes::ToString(m_nBrushType)
+ _T("' color1='") + m_oColor1.ToString() + _T("' color2='") + m_oColor2.ToString()
+ _T("' alpha1='") + NSAttributes::ToString(m_Alpha1) + _T("' alpha2='") + NSAttributes::ToString(m_Alpha2)
+ _T("' texturepath='") + (CString)m_sTexturePath + _T("' texturealpha='") + NSAttributes::ToString(m_nTextureAlpha)
+ "' texturemode='" + NSAttributes::ToString(m_nTextureMode) + _T("'"));
//+ "' rectable='0' rect-left='" + Bounds.Left.ToString() + "' rect-top='" + Bounds.Top.ToString()
//+ "' rect-width='" + Bounds.Right.ToString() + "' rect-height='" + Bounds.Bottom.ToString() + "'");
}
CString ToString2()
{
return AddEffectForGroup(_T("brush"),
_T("brush-type='") + NSAttributes::ToString(m_nBrushType)
+ _T("' brush-color1='") + m_oColor1.ToString() + _T("' brush-color2='") + m_oColor2.ToString()
+ _T("' brush-alpha1='") + NSAttributes::ToString(m_Alpha1) + _T("' brush-alpha2='") + NSAttributes::ToString(m_Alpha2)
+ _T("' brush-texturepath='") + (CString)m_sTexturePath + _T("' brush-texturealpha='") + NSAttributes::ToString(m_nTextureAlpha)
+ "' brush-texturemode='" + NSAttributes::ToString(m_nTextureMode) + _T("'"));
//+ "' rectable='0' rect-left='" + Bounds.Left.ToString() + "' rect-top='" + Bounds.Top.ToString()
//+ "' rect-width='" + Bounds.Right.ToString() + "' rect-height='" + Bounds.Bottom.ToString() + "'");
}
};
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "File.h"
namespace FileSystem {
bool File::Exists(LPCTSTR path) {
WIN32_FIND_DATA findData;
ZeroMemory(&findData, sizeof(findData));
HANDLE handle = ::FindFirstFile(path, &findData);
bool fileExists = true;
if (handle == INVALID_HANDLE_VALUE)
fileExists = false;
FindClose(handle);
return fileExists;
}
bool File::Exists(const String& path) {
return Exists(path.c_str());
}
void File::Create(LPCTSTR path) {
CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
}
void File::Create(const String& path) {
Create(path.c_str());
}
}
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "Settings.h"
#include <windows.h>
namespace FileSystem {
class File {
public:
static bool Exists(LPCTSTR path);
static bool Exists(const String& path);
static void Create(LPCTSTR path);
static void Create(const String& path);
};
}
\ No newline at end of file
......@@ -165,10 +165,10 @@ namespace PPTX
return smart_ptr<OOX::File>(new OOX::Image(filename));
}
else if(strT == OOX::FileTypes::Data)
return smart_ptr<OOX::File>(new OOX::CDiagramData(relation.Target()));
return smart_ptr<OOX::File>(new OOX::CDiagramData(filename));
else if(strT == OOX::FileTypes::DiagDrawing)
return smart_ptr<OOX::File>(new OOX::CDiagramDrawing(relation.Target()));
return smart_ptr<OOX::File>(new OOX::CDiagramDrawing(filename));
else if(strT == OOX::FileTypes::HyperLink)
return smart_ptr<OOX::File>(new OOX::HyperLink(relation.Target()));
......
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "Timing.h"
namespace PPTX
{
namespace Logic
{
Timing::Timing()
{
}
Timing::~Timing()
{
}
Timing::Timing(const XmlUtils::CXmlNode& node)
{
fromXML(node);
}
const Timing& Timing::operator =(const XmlUtils::CXmlNode& node)
{
fromXML(node);
return *this;
}
void Timing::fromXML(const XmlUtils::CXmlNode& node)
{
// const XML::XElement element(node);
}
CString Timing::toXML() const
{
return XML::XElement(ns.p + _T("timing"));
}
} // namespace Logic
} // namespace PPTX
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef PPTX_LOGIC_TIMING_INCLUDE_H_
#define PPTX_LOGIC_TIMING_INCLUDE_H_
#include "./../WrapperWritingElement.h"
#include "property.h"
#include "nullable.h"
namespace PPTX
{
namespace Logic
{
class Timing : public WrapperWritingElement
{
public:
Timing();
virtual ~Timing();
explicit Timing(const XmlUtils::CXmlNode& node);
const Timing& operator =(const XmlUtils::CXmlNode& node);
public:
virtual void fromXML(const XmlUtils::CXmlNode& node);
virtual CString toXML() const;
public:
//tnLst (Time Node List) ยง19.5.87
//bldLst (Build List) ยง19.5.14
protected:
virtual void FillParentPointersForChilds(){};
};
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_TIMING_INCLUDE_H_
\ No newline at end of file
......@@ -88,7 +88,6 @@ SOURCES += \
../../../PPTXFormat/Logic/SpPr.cpp \
../../../PPTXFormat/Logic/SpTree.cpp \
../../../PPTXFormat/Logic/SpTreeElem.cpp \
#../../../PPTXFormat/Logic/Timing.cpp \
../../../PPTXFormat/Logic/TxBody.cpp \
../../../PPTXFormat/Logic/UniColor.cpp \
../../../PPTXFormat/Logic/UniEffect.cpp \
......@@ -499,7 +498,6 @@ HEADERS += pptxformatlib.h \
../../../Editor/PresentationDrawingsDef.h \
../../../Editor/DefaultNotesMaster.h \
../../../Editor/DefaultNotesTheme.h \
../../Settings.h \
../../../../Common/DocxFormat/Source/Base/Nullable.h \
../../../../Common/DocxFormat/Source/XML/xmlutils.h \
../../../../HtmlRenderer/include/ASCSVGWriter.h \
......
......@@ -57,7 +57,6 @@
#include "../../../PPTXFormat/Logic/SpPr.cpp"
#include "../../../PPTXFormat/Logic/SpTree.cpp"
#include "../../../PPTXFormat/Logic/SpTreeElem.cpp"
//#include "../../../PPTXFormat/Logic/Timing.cpp"
#include "../../../PPTXFormat/Logic/TxBody.cpp"
#include "../../../PPTXFormat/Logic/UniColor.cpp"
#include "../../../PPTXFormat/Logic/UniEffect.cpp"
......
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <string>
#include <vector>
namespace FileSystem {
#ifdef UNICODE
typedef std::wstring String;
#else
typedef std::wstring String;
#endif
typedef std::vector<String> StringArray;
}
......@@ -54,9 +54,6 @@ public:
HRESULT txt_LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstPath, const std::wstring & sXMLOptions);
HRESULT txt_SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcPath, const std::wstring & sXMLOptions);
//HRESULT xml_LoadFromFile(CString sSrcFileName, CString sDstPath, CString sXMLOptions);
//HRESULT xml_SaveToFile (CString sDstFileName, CString sSrcPath, CString sXMLOptions);
CTxtXmlFile();
private:
......

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\..\..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\DesktopEditor\freetype-2.5.2\builds\windows\vc2005\freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\..\DesktopEditor\freetype-2.5.2\builds\windows\vc2005\freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\DesktopEditor\fontengine\font_engine_vs2005.vcproj", "{C739151F-5384-41DF-A1A6-F089E2C1AD56}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\..\..\DesktopEditor\fontengine\font_engine_vs2005.vcproj", "{C739151F-5384-41DF-A1A6-F089E2C1AD56}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\..\..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
ProjectSection(ProjectDependencies) = postProject
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
......@@ -22,38 +22,38 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\DesktopEditor
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\..\..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mng", "..\DesktopEditor\cximage\mng\mng_vs2005.vcproj", "{40A69F40-063E-43FD-8543-455495D8733E}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mng", "..\..\..\DesktopEditor\cximage\mng\mng_vs2005.vcproj", "{40A69F40-063E-43FD-8543-455495D8733E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\DesktopEditor\cximage\png\png_vs2005.vcproj", "{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\..\..\DesktopEditor\cximage\png\png_vs2005.vcproj", "{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\DesktopEditor\cximage\tiff\Tiff_vs2005.vcproj", "{0588563C-F05C-428C-B21A-DD74756628B3}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\..\DesktopEditor\cximage\tiff\Tiff_vs2005.vcproj", "{0588563C-F05C-428C-B21A-DD74756628B3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\DesktopEditor\cximage\jpeg\Jpeg_vs2005.vcproj", "{818753F2-DBB9-4D3B-898A-A604309BE470}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\..\..\DesktopEditor\cximage\jpeg\Jpeg_vs2005.vcproj", "{818753F2-DBB9-4D3B-898A-A604309BE470}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpsd", "..\DesktopEditor\cximage\libpsd\libpsd_vs2005.vcproj", "{9A037A69-D1DF-4505-AB2A-6CB3641C476E}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpsd", "..\..\..\DesktopEditor\cximage\libpsd\libpsd_vs2005.vcproj", "{9A037A69-D1DF-4505-AB2A-6CB3641C476E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdcr", "..\DesktopEditor\cximage\raw\libdcr_vs2005.vcproj", "{DF861D33-9BC1-418C-82B1-581F590FE169}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdcr", "..\..\..\DesktopEditor\cximage\raw\libdcr_vs2005.vcproj", "{DF861D33-9BC1-418C-82B1-581F590FE169}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\..\..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
ProjectSection(ProjectDependencies) = postProject
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtfFormatLib", "..\ASCOfficeRtfFile\RtfFormatLib\Win32\RtfFormatLib.vcproj", "{AF2D00A7-A351-4700-AE88-C1D9ADE29345}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtfFormatLib", "..\..\..\ASCOfficeRtfFile\RtfFormatLib\Win32\RtfFormatLib.vcproj", "{AF2D00A7-A351-4700-AE88-C1D9ADE29345}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatLib", "..\ASCOfficeDocFile\DocFormatLib\Win32\DocFormatLib.vcproj", "{C5371405-338F-4B70-83BD-2A5CDF64F383}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatLib", "..\..\..\ASCOfficeDocFile\DocFormatLib\Win32\DocFormatLib.vcproj", "{C5371405-338F-4B70-83BD-2A5CDF64F383}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TxtFormatLib", "..\ASCOfficeTxtFile\TxtXmlFormatLib\Win32\TxtXmlFormatLib.vcproj", "{DACBE6CA-E089-47D1-8CE7-C7DB59C15417}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TxtFormatLib", "..\..\..\ASCOfficeTxtFile\TxtXmlFormatLib\Win32\TxtXmlFormatLib.vcproj", "{DACBE6CA-E089-47D1-8CE7-C7DB59C15417}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\..\..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTFormatLib", "..\ASCOfficePPTFile\PPTFormatLib\Win32\PPTFormatLib.vcproj", "{7B27E40E-F70A-4A74-A77C-0944D7931D15}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTFormatLib", "..\..\..\ASCOfficePPTFile\PPTFormatLib\Win32\PPTFormatLib.vcproj", "{7B27E40E-F70A-4A74-A77C-0944D7931D15}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "X2tTest", "..\X2tConverter\test\win32Test\X2tTest.vcproj", "{355A22F4-1394-4B82-B2F1-FF0ECFB9E3EF}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "X2tTest", "X2tTest.vcproj", "{355A22F4-1394-4B82-B2F1-FF0ECFB9E3EF}"
ProjectSection(ProjectDependencies) = postProject
{C5371405-338F-4B70-83BD-2A5CDF64F383} = {C5371405-338F-4B70-83BD-2A5CDF64F383}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
......@@ -82,29 +82,29 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "X2tTest", "..\X2tConverter\
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsFormat", "..\ASCOfficeXlsFile2\source\win32\XlsFormat.vcproj", "{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsFormat", "..\..\..\ASCOfficeXlsFile2\source\win32\XlsFormat.vcproj", "{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsXlsxConverter", "..\ASCOfficeXlsFile2\source\win32\XlsXlsxConverter.vcproj", "{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsXlsxConverter", "..\..\..\ASCOfficeXlsFile2\source\win32\XlsXlsxConverter.vcproj", "{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfCommon", "..\ASCOfficeOdfFile\win32\cpcommon.vcproj", "{609ED938-3CA8-4BED-B363-25096D4C4812}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfCommon", "..\..\..\ASCOfficeOdfFile\win32\cpcommon.vcproj", "{609ED938-3CA8-4BED-B363-25096D4C4812}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormatReaderLib", "..\ASCOfficeOdfFile\win32\cpodf.vcproj", "{50E20601-4A8D-4AFB-8870-63828D328429}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormatReaderLib", "..\..\..\ASCOfficeOdfFile\win32\cpodf.vcproj", "{50E20601-4A8D-4AFB-8870-63828D328429}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml_wrapper", "..\ASCOfficeOdfFile\win32\cpxml.vcproj", "{41BED424-4EAF-4053-8A5F-1E2A387D53D1}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml_wrapper", "..\..\..\ASCOfficeOdfFile\win32\cpxml.vcproj", "{41BED424-4EAF-4053-8A5F-1E2A387D53D1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormulasConvert", "..\ASCOfficeOdfFile\win32\formulasconvert.vcproj", "{94954A67-A853-43B1-A727-6EF2774C5A6A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormulasConvert", "..\..\..\ASCOfficeOdfFile\win32\formulasconvert.vcproj", "{94954A67-A853-43B1-A727-6EF2774C5A6A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormatWriterLib", "..\ASCOfficeOdfFileW\source\win32\OdfFormat.vcproj", "{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormatWriterLib", "..\..\..\ASCOfficeOdfFileW\source\win32\OdfFormat.vcproj", "{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Oox2OdfConverter", "..\ASCOfficeOdfFileW\source\win32\Oox2OdfConverter.vcproj", "{BEE01B53-244A-44E6-8947-ED9342D9247E}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Oox2OdfConverter", "..\..\..\ASCOfficeOdfFileW\source\win32\Oox2OdfConverter.vcproj", "{BEE01B53-244A-44E6-8947-ED9342D9247E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeFileCrypt", "..\OfficeCryptReader\win32\ECMACryptReader.vcproj", "{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeFileCrypt", "..\..\..\OfficeCryptReader\win32\ECMACryptReader.vcproj", "{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptlib", "..\Common\3dParty\cryptopp\cryptlib.vcproj", "{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptlib", "..\..\..\Common\3dParty\cryptopp\cryptlib.vcproj", "{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agg2d", "..\DesktopEditor\agg-2.4\agg_vs2005.vcproj", "{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agg2d", "..\..\..\DesktopEditor\agg-2.4\agg_vs2005.vcproj", "{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\DesktopEditor\xml\build\vs2005\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\..\..\DesktopEditor\xml\build\vs2005\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......
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