Compare commits

..

41 Commits

Author SHA1 Message Date
00255297c8 stable iOS converter 2017-01-13 12:15:39 +03:00
74a0fd2928 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop
* 'develop' of https://github.com/ONLYOFFICE/core:
  NSString: + stringWithUtf8Buffer method
2017-01-12 16:25:56 +03:00
ce7487a14d RtfFormatLib for iOS 2017-01-12 16:25:50 +03:00
95d9d8bc8e NSString: + stringWithUtf8Buffer method 2017-01-12 15:39:02 +03:00
dce0b43c11 HtmlFile for iOS 2017-01-12 14:47:42 +03:00
d7a981a84e PPTFileLib & TxtxXmlFileLib for iOS 2017-01-12 14:33:57 +03:00
bb52ddba2b coautoring events 2017-01-12 12:44:57 +03:00
a82814d565 count good changes detection error 2017-01-10 17:17:55 +03:00
bab37e1634 Merge tag 'staropramen' into develop
staropramen
2017-01-10 12:24:03 +03:00
06dea5685a Merge branch 'hotfix/staropramen' 2017-01-10 12:23:50 +03:00
105a23d5bc DocxRenderer (not worked) 2017-01-08 19:10:35 +03:00
ef76c80014 XlsFormat - fix errors fmt & old comments 2016-12-28 19:27:34 +03:00
bb6e95ce20 DocFormatReader - refactoring + fix errors 2016-12-27 19:32:09 +03:00
69d9823847 x2t - fix users files 2016-12-27 16:37:29 +03:00
fb10c56bd3 RtfFormatWriter - fix fields, XlsFormatReader - data valdation 2016-12-27 14:02:36 +03:00
4f24ed375e XlsFormatReader - dataValidations 2016-12-26 19:32:21 +03:00
036c3b3740 XlsFormatReader - decrypter ... 2016-12-26 15:01:48 +03:00
dddaeb3eeb previous commit bug 2016-12-26 12:04:59 +03:00
f75b0704a7 ... 2016-12-26 03:23:08 +03:00
baefae258b x2t refactoring qt projects .... 2016-12-25 23:46:39 +03:00
4f46ac6e69 .. 2016-12-25 23:23:15 +03:00
f634d1cfe5 x2t refactoring qt projects ... 2016-12-25 22:25:34 +03:00
a810253b22 opne/save drawing docPr 2016-12-24 18:00:48 +03:00
05e42b1908 write images to pdf bug 2016-12-24 15:21:37 +03:00
4ea7f5f9ed for docx background 2016-12-24 13:48:57 +03:00
50a1f3f5a7 x2t - refactoring qt projects 2016-12-23 19:54:30 +03:00
2710cabdc9 XlsFormatReader - delete unuseds, fix extended crypt, .. 2016-12-23 18:07:30 +03:00
1d55b1223c . 2016-12-23 18:06:18 +03:00
ac959e32af open/save ole object in a14 format xlsx 2016-12-23 16:00:57 +03:00
1c2524f5fb FontsGen - fix build 2016-12-23 14:38:15 +03:00
c0e4b02138 Merge tag 'v4.2.3' into develop
v4.2.3 v4.2.3
2016-12-23 14:22:08 +03:00
eb29cee9ad Merge branch 'hotfix/v4.2.3' 2016-12-23 14:22:04 +03:00
5720891452 macOS 10.11 2016-12-22 18:48:28 +03:00
96f7cd9017 . 2016-12-22 17:56:34 +03:00
c7ef8e9b1d . 2016-12-22 15:34:32 +03:00
1a2f9afac7 x2t linux build, version up 2016-12-22 15:12:06 +03:00
2c945b7166 x2t - refactoring (delete double conversions string) 2016-12-21 19:29:18 +03:00
ef69fc4b34 Merge pull request #17 from ONLYOFFICE/hotfix/v4.2.3
Hotfix/v4.2.3
2016-12-16 12:25:59 +03:00
6e3b7b1146 thumbnail error with aspect 2016-12-16 12:17:10 +03:00
f925e5cae9 save zip if convert thumbnail with first=false 2016-12-14 18:51:03 +03:00
80d95d41c5 save to pdf (only first page support) 2016-12-14 16:56:56 +03:00
1474 changed files with 27325 additions and 15369 deletions

View File

@ -125,7 +125,7 @@ namespace DocFormatUtils
if(bDeleteNoUnicode)
{
for(size_t pos = 0; pos != data.size(); ++pos)
for(size_t pos = 0; pos < data.size(); ++pos)
{
switch(data[pos])
{
@ -157,7 +157,7 @@ namespace DocFormatUtils
}
else
{
for(size_t pos = 0; pos != data.size(); ++pos)
for(size_t pos = 0; pos < data.size(); ++pos)
{
switch(data[pos])
{
@ -166,6 +166,8 @@ namespace DocFormatUtils
case '\'': buffer.append(L"&apos;"); break;
case '<': buffer.append(L"&lt;"); break;
case '>': buffer.append(L"&gt;"); break;
case '\0':
return buffer;
default: buffer.append(&data[pos], 1); break;
}
}
@ -503,6 +505,7 @@ namespace DocFormatUtils
{
STLCollection->push_back(result[i]);
}
return true;
}
template<class T> static bool GetSTLCollectionFromUtf8( T *STLCollection, unsigned char *bytes, int size)

View File

@ -57,11 +57,11 @@ namespace XMLTools
class XMLAttribute
========================================================================================================*/
template <class T> class XMLAttribute
class XMLAttribute
{
private:
std::basic_string<T> m_Name;
std::basic_string<T> m_Value;
std::wstring m_Name;
std::wstring m_Value;
public:
@ -69,56 +69,40 @@ namespace XMLTools
{
}
/*========================================================================================================*/
XMLAttribute( const T* name ) : m_Name(name)
XMLAttribute( const std::wstring & name ) : m_Name(name)
{
}
/*========================================================================================================*/
XMLAttribute( const T* name, const T* value ) : m_Name(name), m_Value(value)
XMLAttribute( const std::wstring & name, const std::wstring & value ) : m_Name(name), m_Value(value)
{
}
~XMLAttribute()
{
}
/*========================================================================================================*/
~XMLAttribute()
void SetValue( const std::wstring & value )
{
m_Value = std::wstring( value );
}
/*========================================================================================================*/
void SetValue( const T* value )
{
m_Value = std::basic_string<T>( value );
}
/*========================================================================================================*/
std::basic_string<T> GetName() const
std::wstring GetName() const
{
return m_Name;
}
/*========================================================================================================*/
std::basic_string<T> GetValue() const
std::wstring GetValue() const
{
return m_Value;
}
/*========================================================================================================*/
std::basic_string<T> GetXMLString()
std::wstring GetXMLString()
{
std::basic_string<T> xmlString( L"" );
std::wstring xmlString( L"" );
xmlString += m_Name;
xmlString += std::basic_string<T>( L"=\"" );
xmlString += std::wstring( L"=\"" );
xmlString += m_Value;
xmlString += std::basic_string<T>( L"\"" );
xmlString += std::wstring( L"\"" );
return xmlString;
}
@ -128,86 +112,63 @@ namespace XMLTools
class XMLElement
========================================================================================================*/
template <class T> class XMLElement
class XMLElement
{
typedef std::pair< std::basic_string<T>, std::basic_string<T> > AttributeValuePair;
typedef std::pair< std::wstring, std::wstring> AttributeValuePair;
private:
std::basic_string<T> m_Name;
std::basic_string<T> m_ElementText;
std::map<std::basic_string<T>, std::basic_string<T>> m_AttributeMap;
std::map<std::basic_string<T>, int> m_ChildMap; //for uniq
std::list<XMLElement<T>> m_Elements;
std::wstring m_Name;
std::wstring m_ElementText;
std::map<std::wstring, std::wstring> m_AttributeMap;
std::map<std::wstring, int> m_ChildMap; //for uniq
std::list<XMLElement> m_Elements;
typedef typename std::list<XMLElement<T>>::iterator ElementsIterator;
typedef typename std::list<XMLElement<T>>::const_iterator ElementsIteratorConst;
typedef std::list<XMLElement>::iterator ElementsIterator;
typedef std::list<XMLElement>::const_iterator ElementsIteratorConst;
typedef typename std::map<std::basic_string<T>, std::basic_string<T>>::iterator AttMapIterator;
typedef typename std::map<std::basic_string<T>, std::basic_string<T>>::const_iterator AttMapIteratorConst;
typedef std::map<std::wstring, std::wstring>::iterator AttMapIterator;
typedef std::map<std::wstring, std::wstring>::const_iterator AttMapIteratorConst;
public:
XMLElement()
XMLElement() {}
XMLElement( const std::wstring & name ) : m_Name(name)
{
}
/*========================================================================================================*/
XMLElement( const T* name ) : m_Name(name)
XMLElement( const std::wstring & prefix, const std::wstring & localName ) :
m_Name( std::wstring( prefix ) + std::wstring( L":" ) + std::wstring( localName ) ), m_ElementText( L"" )
{
}
~XMLElement() {}
/*========================================================================================================*/
XMLElement( const T* prefix, const T* localName ) : m_Name( std::basic_string<T>( prefix ) + std::basic_string<T>( L":" ) + std::basic_string<T>( localName ) ), m_ElementText( L"" )
void AppendText( const std::wstring & text )
{
m_ElementText = std::wstring( text );
}
/*========================================================================================================*/
~XMLElement()
void AppendTextSymbol( const wchar_t symbol )
{
m_ElementText += std::wstring( &symbol );
}
/*========================================================================================================*/
void AppendText( const T* text )
{
m_ElementText = std::basic_string<T>( text );
}
/*========================================================================================================*/
void AppendTextSymbol( const T symbol )
{
m_ElementText += std::basic_string<T>( &symbol );
}
/*========================================================================================================*/
void AppendAttribute( const XMLAttribute<T>& attribute )
void AppendAttribute( const XMLAttribute& attribute )
{
AttributeValuePair p( attribute.GetName(), attribute.GetValue() );
m_AttributeMap.insert( p );
}
/*========================================================================================================*/
void AppendAttribute( const T* name, const T* value )
void AppendAttribute( const std::wstring & name, const std::wstring & value )
{
AttributeValuePair p( std::basic_string<T>( const_cast<T*>( name ) ), std::basic_string<T>( const_cast<T*>( value ) ) );
AttributeValuePair p( name , value );
m_AttributeMap.insert( p );
}
/*========================================================================================================*/
void AppendChild( const XMLElement<T>& element, bool uniq = false)
void AppendChild( const XMLElement& element, bool uniq = false)
{
if (m_ChildMap.find(element.GetName()) != m_ChildMap.end())
{
@ -215,21 +176,17 @@ namespace XMLTools
}
else
{
m_ChildMap.insert(m_ChildMap.end(), std::pair<std::basic_string<T>, int>(element.GetName(), 0));
m_ChildMap.insert(m_ChildMap.end(), std::pair<std::wstring, int>(element.GetName(), 0));
}
m_Elements.push_back( element );
}
/*========================================================================================================*/
void RemoveChild( const XMLElement<T>& element )
void RemoveChild( const XMLElement& element )
{
m_Elements.remove( element );
}
/*========================================================================================================*/
bool FindChild( const XMLElement<T>& element )
bool FindChild( const XMLElement& element )
{
bool result = false;
@ -246,15 +203,13 @@ namespace XMLTools
return result;
}
/*========================================================================================================*/
bool FindChildByName( const T* elementName ) const
bool FindChildByName( const std::wstring & elementName ) const
{
bool result = false;
for ( ElementsIterator iter = m_Elements.begin(); iter != m_Elements.end(); iter++ )
for ( ElementsIteratorConst iter = m_Elements.begin(); iter != m_Elements.end(); iter++ )
{
if ( iter->m_Name == std::basic_string<T>( elementName ) )
if ( iter->m_Name == std::wstring( elementName ) )
{
result = true;
@ -265,9 +220,7 @@ namespace XMLTools
return result;
}
/*========================================================================================================*/
bool RemoveChildByName( const std::basic_string<T>& elementName )
bool RemoveChildByName( const std::wstring& elementName )
{
bool result = false;
@ -286,9 +239,7 @@ namespace XMLTools
return result;
}
/*========================================================================================================*/
bool operator == ( const XMLElement<T>& element ) const
bool operator == ( const XMLElement& element ) const
{
bool result = false;
@ -319,7 +270,7 @@ namespace XMLTools
}
else
{
ElementsIteratorConst thisIter = m_Elements.begin();
ElementsIteratorConst thisIter = m_Elements.begin();
ElementsIteratorConst elementIter = element.m_Elements.begin();
for ( ; thisIter != m_Elements.end(); thisIter++, elementIter++ )
@ -336,34 +287,34 @@ namespace XMLTools
/*========================================================================================================*/
std::basic_string<T> GetName() const
std::wstring GetName() const
{
return m_Name;
}
/*========================================================================================================*/
std::basic_string<T> GetXMLString()
std::wstring GetXMLString()
{
std::basic_string<T> xmlString( L"");
std::wstring xmlString( L"");
bool bIsNameExists = ( m_Name != std::basic_string<T>( L"") );
bool bIsTextExists = ( m_ElementText != std::basic_string<T>( L"") );
bool bIsNameExists = ( m_Name != std::wstring( L"") );
bool bIsTextExists = ( m_ElementText != std::wstring( L"") );
if ( bIsNameExists )
{
xmlString += std::basic_string<T>( L"<" ) + m_Name;
xmlString += std::wstring( L"<" ) + m_Name;
}
if ( ( bIsNameExists ) && ( m_AttributeMap.size() > 0 ) )
{
for ( AttMapIterator iter = m_AttributeMap.begin(); iter != m_AttributeMap.end(); iter++ )
{
xmlString += std::basic_string<T>( L" " );
xmlString += std::wstring( L" " );
xmlString += iter->first;
xmlString += std::basic_string<T>( L"=\"" );
xmlString += std::wstring( L"=\"" );
xmlString += iter->second;
xmlString += std::basic_string<T>( L"\"" );
xmlString += std::wstring( L"\"" );
}
}
@ -371,7 +322,7 @@ namespace XMLTools
{
if ( bIsNameExists )
{
xmlString += std::basic_string<T>( L">" );
xmlString += std::wstring( L">" );
}
for ( ElementsIterator iter = m_Elements.begin(); iter != m_Elements.end(); iter++ )
@ -386,16 +337,16 @@ namespace XMLTools
if ( bIsNameExists )
{
xmlString += std::basic_string<T>( L"</" );
xmlString += std::wstring( L"</" );
xmlString += m_Name;
xmlString += std::basic_string<T>( L">" );
xmlString += std::wstring( L">" );
}
}
else
{
if ( bIsNameExists )
{
xmlString += std::basic_string<T>( L"/>" );
xmlString += std::wstring( L"/>" );
}
}

View File

@ -38,7 +38,7 @@ namespace DocFileFormat
: PropertiesMapping( writer ), _isRunStyleNeeded(isRunStyleNeeded), _isOwnRPr(true), _isRTL(false)
{
_doc = doc;
_rPr = new XMLTools::XMLElement<wchar_t>( _T( "w:rPr" ) );
_rPr = new XMLTools::XMLElement( _T( "w:rPr" ) );
_revisionData = rev;
_currentPapx = currentPapx;
_styleChpx = styleChpx;
@ -46,7 +46,7 @@ namespace DocFileFormat
_webHidden = false;
}
CharacterPropertiesMapping::CharacterPropertiesMapping( XMLTools::XMLElement<wchar_t>* rPr, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded )
CharacterPropertiesMapping::CharacterPropertiesMapping( XMLTools::XMLElement* rPr, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded )
: PropertiesMapping( NULL ), _isRunStyleNeeded(isRunStyleNeeded), _isOwnRPr(false), _isRTL(false)
{
_doc = doc;
@ -77,7 +77,7 @@ namespace DocFileFormat
// apend revision changes
if (_revisionData->Type == Changed)
{
XMLTools::XMLElement<wchar_t> rPrChange( _T( "w:rPrChange" ) );
XMLTools::XMLElement rPrChange( _T( "w:rPrChange" ) );
//todooo date - _revisionData->Dttm.Convert( new DateMapping( rPrChange ) );
@ -85,7 +85,7 @@ namespace DocFileFormat
if (author_str)
{
XMLTools::XMLAttribute<wchar_t> author( _T( "w:author" ), FormatUtils::XmlEncode(*author_str).c_str());
XMLTools::XMLAttribute author( _T( "w:author" ), FormatUtils::XmlEncode(*author_str));
rPrChange.AppendAttribute( author );
}
@ -98,7 +98,7 @@ namespace DocFileFormat
//write properties
if ( ( m_pXmlWriter != NULL ) && ( ( _rPr->GetChildCount() > 0 ) || ( _rPr->GetAttributeCount() > 0 ) ) )
{
m_pXmlWriter->WriteString( _rPr->GetXMLString().c_str() );
m_pXmlWriter->WriteString( _rPr->GetXMLString());
}
}
@ -116,16 +116,16 @@ namespace DocFileFormat
/*========================================================================================================*/
void CharacterPropertiesMapping::convertSprms( std::list<SinglePropertyModifier>* sprms, XMLTools::XMLElement<wchar_t>* parent )
void CharacterPropertiesMapping::convertSprms( std::list<SinglePropertyModifier>* sprms, XMLTools::XMLElement* parent )
{
XMLTools::XMLElement<wchar_t> * rFonts = new XMLTools::XMLElement<wchar_t> ( _T( "w:rFonts" ) );
XMLTools::XMLElement<wchar_t> * color = new XMLTools::XMLElement<wchar_t> ( _T( "w:color" ) );
XMLTools::XMLAttribute<wchar_t> * colorVal = new XMLTools::XMLAttribute<wchar_t> ( _T( "w:val" ) );
XMLTools::XMLElement<wchar_t> * lang = new XMLTools::XMLElement<wchar_t> ( _T( "w:lang" ) );
XMLTools::XMLElement * rFonts = new XMLTools::XMLElement ( _T( "w:rFonts" ) );
XMLTools::XMLElement * color = new XMLTools::XMLElement ( _T( "w:color" ) );
XMLTools::XMLAttribute * colorVal = new XMLTools::XMLAttribute ( _T( "w:val" ) );
XMLTools::XMLElement * lang = new XMLTools::XMLElement ( _T( "w:lang" ) );
if (_webHidden)
{
XMLTools::XMLElement<wchar_t> * webHidden = new XMLTools::XMLElement<wchar_t> ( _T( "w:webHidden" ) );
XMLTools::XMLElement * webHidden = new XMLTools::XMLElement ( _T( "w:webHidden" ) );
parent->AppendChild( *webHidden );
RELEASEOBJECT( webHidden );
}
@ -144,7 +144,7 @@ namespace DocFileFormat
_currentIstd = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
if (_currentIstd < _doc->Styles->Styles->size())
{
appendValueElement( parent, _T( "rStyle" ), StyleSheetMapping::MakeStyleId( _doc->Styles->Styles->at( _currentIstd ) ).c_str(), true );
appendValueElement( parent, _T( "rStyle" ), StyleSheetMapping::MakeStyleId( _doc->Styles->Styles->at( _currentIstd ) ), true );
}
}
}break;
@ -232,7 +232,7 @@ namespace DocFileFormat
case sprmOldCIss:
case sprmCIss:
appendValueElement( parent, _T( "vertAlign" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &SuperscriptIndex[0][0], 3, 12 ).c_str(), true );
appendValueElement( parent, _T( "vertAlign" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &SuperscriptIndex[0][0], 3, 12 ), true );
break;
case sprmCRgLid0_80:
@ -274,7 +274,7 @@ namespace DocFileFormat
case sprmCBrc80:
case sprmCBrc:
{ //borders
XMLTools::XMLElement<wchar_t> bdr( _T( "w:bdr" ) );
XMLTools::XMLElement bdr( _T( "w:bdr" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
appendBorderAttributes( &bc, &bdr );
parent->AppendChild( bdr );
@ -292,7 +292,7 @@ namespace DocFileFormat
case sprmCIco:
case sprmCIcoBi:
{//color
colorVal->SetValue( FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ).c_str() );
colorVal->SetValue( FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ));
}break;
case sprmCCv:
@ -300,25 +300,22 @@ namespace DocFileFormat
std::wstringstream sstream;
sstream << boost::wformat(L"%02x%02x%02x") % iter->Arguments[0] % /*G*/iter->Arguments[1] % /*B*/iter->Arguments[2];
colorVal->SetValue(sstream.str().c_str());
//CString rgbColor;
//rgbColor.Format( _T( "%02x%02x%02x" ), /*R*/iter->Arguments[0], /*G*/iter->Arguments[1], /*B*/iter->Arguments[2] );
//colorVal->SetValue( rgbColor.GetString() );
colorVal->SetValue(sstream.str());
}break;
case sprmCOldHighlight:
{
appendValueElement( parent, _T( "highlight" ), FormatUtils::MapValueToWideString( iter->Arguments[1], &Global::ColorIdentifier[0][0], 17, 12 ).c_str(), true );
appendValueElement( parent, _T( "highlight" ), FormatUtils::MapValueToWideString( iter->Arguments[1], &Global::ColorIdentifier[0][0], 17, 12 ), true );
}break;
case sprmCHighlight:
{
appendValueElement( parent, _T( "highlight" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ).c_str(), true );
appendValueElement( parent, _T( "highlight" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ), true );
}break;
case sprmOldCDxaSpace:
case sprmCDxaSpace:
{
appendValueElement( parent, _T( "spacing" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str(), true );
appendValueElement( parent, _T( "spacing" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}break;
case sprmCFtcBi :
@ -335,20 +332,20 @@ namespace DocFileFormat
case sprmCHpsBi :
{
appendValueElement( parent, _T( "szCs" ),
FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str(), true );
FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}
break;
// Font Size in points (2~3276) default 20-half-points
case sprmOldCHps :
{
appendValueElement (parent, _T( "sz" ),
FormatUtils::IntToWideString (FormatUtils::BytesToUChar (iter->Arguments, 0, iter->argumentsSize) ).c_str(),
FormatUtils::IntToWideString (FormatUtils::BytesToUChar (iter->Arguments, 0, iter->argumentsSize) ),
true );
}break;
case sprmCHps :
{
appendValueElement (parent, _T( "sz" ),
FormatUtils::IntToWideString (FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize) ).c_str(), true );
FormatUtils::IntToWideString (FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize) ), true );
}break;
case sprmCMajority :
@ -369,7 +366,7 @@ namespace DocFileFormat
case sprmOldCHpsKern:
case sprmCHpsKern:
{
appendValueElement( parent, _T( "kern" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str(), true );
appendValueElement( parent, _T( "kern" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}break;
case sprmOldCFtc:
@ -379,10 +376,10 @@ namespace DocFileFormat
if( nIndex < _doc->FontTable->Data.size() )
{
XMLTools::XMLAttribute<wchar_t>* ascii = new XMLTools::XMLAttribute<wchar_t>( _T( "w:ascii" ) );
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( _T( "w:ascii" ) );
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
m_sAsciiFont = ffn->xszFtn;
ascii->SetValue( FormatUtils::XmlEncode(m_sAsciiFont).c_str() );
ascii->SetValue( FormatUtils::XmlEncode(m_sAsciiFont, true));
rFonts->AppendAttribute( *ascii );
RELEASEOBJECT( ascii );
}
@ -393,10 +390,10 @@ namespace DocFileFormat
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
if( nIndex >= 0 && nIndex < _doc->FontTable->Data.size() )
{
XMLTools::XMLAttribute<wchar_t>* eastAsia = new XMLTools::XMLAttribute<wchar_t>( _T( "w:eastAsia" ) );
XMLTools::XMLAttribute* eastAsia = new XMLTools::XMLAttribute( _T( "w:eastAsia" ) );
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
m_sEastAsiaFont = ffn->xszFtn;
eastAsia->SetValue( FormatUtils::XmlEncode(m_sEastAsiaFont).c_str() );
eastAsia->SetValue( FormatUtils::XmlEncode(m_sEastAsiaFont));
rFonts->AppendAttribute( *eastAsia );
RELEASEOBJECT( eastAsia );
}
@ -408,10 +405,10 @@ namespace DocFileFormat
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
if( nIndex>=0 && nIndex < _doc->FontTable->Data.size() )
{
XMLTools::XMLAttribute<wchar_t>* ansi = new XMLTools::XMLAttribute<wchar_t>( _T( "w:hAnsi" ) );
XMLTools::XMLAttribute* ansi = new XMLTools::XMLAttribute( _T( "w:hAnsi" ) );
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
m_shAnsiFont = ffn->xszFtn;
ansi->SetValue( FormatUtils::XmlEncode(m_shAnsiFont).c_str() );
ansi->SetValue( FormatUtils::XmlEncode(m_shAnsiFont));
rFonts->AppendAttribute( *ansi );
RELEASEOBJECT( ansi );
}
@ -420,18 +417,18 @@ namespace DocFileFormat
case sprmOldCKul:
case sprmCKul:
{ //Underlining
appendValueElement( parent, _T( "u" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16 ).c_str(), true );
appendValueElement( parent, _T( "u" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16 ), true );
}
break;
case sprmCCharScale:
{ //char width
appendValueElement( parent, _T( "w" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str(), true );
appendValueElement( parent, _T( "w" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}break;
case sprmCSfxText:
{ //animation
appendValueElement( parent, _T( "effect" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16 ).c_str(), true );
appendValueElement( parent, _T( "effect" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16 ), true );
}break;
case sprmCIdctHint:
@ -485,8 +482,8 @@ namespace DocFileFormat
if (!m_sDefaultFont.empty() && m_sAsciiFont.empty() && m_sEastAsiaFont.empty() && m_shAnsiFont.empty())
{//????
XMLTools::XMLAttribute<wchar_t>* ascii = new XMLTools::XMLAttribute<wchar_t>( _T( "w:ascii" ) );
ascii->SetValue( FormatUtils::XmlEncode(m_sDefaultFont).c_str() );
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( _T( "w:ascii" ) );
ascii->SetValue( FormatUtils::XmlEncode(m_sDefaultFont));
//rFonts->AppendAttribute( *ascii );
RELEASEOBJECT( ascii );
}
@ -520,14 +517,14 @@ namespace DocFileFormat
/// CHPX flags are special flags because the can be 0,1,128 and 129,
/// so this method overrides the appendFlagElement method.
void CharacterPropertiesMapping::appendFlagElement( XMLTools::XMLElement<wchar_t>* node, const SinglePropertyModifier& sprm, const wchar_t* elementName, bool unique )
void CharacterPropertiesMapping::appendFlagElement( XMLTools::XMLElement* node, const SinglePropertyModifier& sprm, const wchar_t* elementName, bool unique )
{
unsigned char flag = sprm.Arguments[0];
if( flag != 128 )
{
XMLTools::XMLElement<wchar_t>* ele = new XMLTools::XMLElement<wchar_t>( _T( "w" ), elementName );
XMLTools::XMLAttribute<wchar_t>* val = new XMLTools::XMLAttribute<wchar_t>( _T( "w:val" ) );
XMLTools::XMLElement* ele = new XMLTools::XMLElement( _T( "w" ), elementName );
XMLTools::XMLAttribute* val = new XMLTools::XMLAttribute( _T( "w:val" ) );
if ( unique )
{

View File

@ -55,7 +55,7 @@ namespace DocFileFormat
{
public:
CharacterPropertiesMapping( XMLTools::CStringXmlWriter* writer, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded = true );
CharacterPropertiesMapping( XMLTools::XMLElement<wchar_t>* rPr, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded = true );
CharacterPropertiesMapping( XMLTools::XMLElement* rPr, WordDocument* doc, RevisionData* rev, ParagraphPropertyExceptions* currentPapx, bool styleChpx, bool isRunStyleNeeded = true );
virtual ~CharacterPropertiesMapping();
void Apply( IVisitable* chpx );
bool CheckIsSymbolFont();
@ -63,7 +63,7 @@ namespace DocFileFormat
bool _webHidden;
bool _isRTL;
private:
void convertSprms( std::list<SinglePropertyModifier>* sprms, XMLTools::XMLElement<wchar_t>* parent );
void convertSprms( std::list<SinglePropertyModifier>* sprms, XMLTools::XMLElement* parent );
std::list<CharacterPropertyExceptions*> buildHierarchy( const StyleSheet* styleSheet, unsigned short istdStart );
bool applyToggleHierachy( const SinglePropertyModifier& sprm );
bool toogleValue( bool currentValue, unsigned char toggle );
@ -71,13 +71,13 @@ namespace DocFileFormat
protected:
/// CHPX flags are special flags because the can be 0,1,128 and 129,
/// so this method overrides the appendFlagElement method.
virtual void appendFlagElement( XMLTools::XMLElement<wchar_t>* node, const SinglePropertyModifier& sprm, const wchar_t* elementName, bool unique );
virtual void appendFlagElement( XMLTools::XMLElement* node, const SinglePropertyModifier& sprm, const wchar_t* elementName, bool unique );
private:
XMLTools::CStringXmlWriter pRunPr;
WordDocument* _doc;
XMLTools::XMLElement<wchar_t>* _rPr;
XMLTools::XMLElement* _rPr;
unsigned short _currentIstd;
RevisionData* _revisionData;
bool _styleChpx;

View File

@ -73,10 +73,10 @@ namespace DocFileFormat
AnnotationReferenceDescriptor* atrdPre10 = static_cast<AnnotationReferenceDescriptor*>(m_document->AnnotationsReferencePlex->Elements[index]);
m_pXmlWriter->WriteNodeBegin( _T( "w:comment" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( index ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( index ));
m_pXmlWriter->WriteAttribute( _T( "w:author" ),
FormatUtils::XmlEncode(m_document->AnnotationOwners->at( atrdPre10->GetAuthorIndex() ) ).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:initials" ), atrdPre10->GetUserInitials().c_str() );
FormatUtils::XmlEncode(m_document->AnnotationOwners->at( atrdPre10->GetAuthorIndex() ) ));
m_pXmlWriter->WriteAttribute( _T( "w:initials" ), atrdPre10->GetUserInitials());
//!!!TODO!!!
/*//ATRDpost10 is optional and not saved in all files

View File

@ -33,11 +33,9 @@
#if defined(_WIN32) || defined(_WIN64)
#include <tchar.h>
#else
#include "../../DesktopEditor/common/ASCVariant.h"
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
#endif
#include <string>
#include "../../DesktopEditor/common/ASCVariant.h"
namespace OpenXmlContentTypes
{

View File

@ -346,7 +346,7 @@ namespace DocFileFormat
{
std::wstring id = FormatUtils::IntToFormattedWideString(FormatUtils::BytesToInt32(iter->Arguments, 0, iter->argumentsSize), _T("%08x"));
m_context->AddRsid(id);
m_pXmlWriter->WriteAttribute(_T("w:rsidP"), id.c_str());
m_pXmlWriter->WriteAttribute(_T("w:rsidP"), id);
break;
}
@ -380,7 +380,7 @@ namespace DocFileFormat
WideString* author = dynamic_cast<WideString*>(m_document->RevisionAuthorTable->operator[](rev.Isbt));
//if it's a inserted run
m_pXmlWriter->WriteNodeBegin(_T("w:ins"), true);
m_pXmlWriter->WriteAttribute(_T("w:author"), FormatUtils::XmlEncode(*author).c_str());
m_pXmlWriter->WriteAttribute(_T("w:author"), FormatUtils::XmlEncode(*author));
m_pXmlWriter->WriteNodeEnd(_T(""), true, false);
//rev.Dttm.Convert(new DateMapping(m_pXmlWriter));
}
@ -392,21 +392,21 @@ namespace DocFileFormat
if (0 != rev.Rsid)
{
std::wstring rsid = FormatUtils::IntToFormattedWideString(rev.Rsid, _T("%08x"));
m_pXmlWriter->WriteAttribute(_T("w:rsidR"), rsid.c_str());
m_pXmlWriter->WriteAttribute(_T("w:rsidR"), rsid);
m_context->AddRsid(rsid);
}
if (0 != rev.RsidDel)
{
std::wstring rsidDel = FormatUtils::IntToFormattedWideString(rev.RsidDel, _T("%08x"));
m_pXmlWriter->WriteAttribute(_T("w:rsidDel"), rsidDel.c_str());
m_pXmlWriter->WriteAttribute(_T("w:rsidDel"), rsidDel);
m_context->AddRsid(rsidDel);
}
if (0 != rev.RsidProp)
{
std::wstring rsidProp = FormatUtils::IntToFormattedWideString(rev.RsidProp, _T("%08x"));
m_pXmlWriter->WriteAttribute(_T("w:rsidRPr"), rsidProp.c_str());
m_pXmlWriter->WriteAttribute(_T("w:rsidRPr"), rsidProp);
m_context->AddRsid(rsidProp);
}
@ -447,7 +447,7 @@ namespace DocFileFormat
if (!_writeAfterRun.empty())
{
m_pXmlWriter->WriteString(_writeAfterRun.c_str());
m_pXmlWriter->WriteString(_writeAfterRun);
_writeAfterRun.clear();
}
}
@ -491,9 +491,9 @@ namespace DocFileFormat
text.clear();
XMLTools::XMLElement<wchar_t> elem(_T("w:tab"));
XMLTools::XMLElement elem(_T("w:tab"));
m_pXmlWriter->WriteString(elem.GetXMLString().c_str());
m_pXmlWriter->WriteString(elem.GetXMLString());
}
else if (TextMark::HardLineBreak == code)
{
@ -501,11 +501,11 @@ namespace DocFileFormat
text.clear();
XMLTools::XMLElement<wchar_t> elem(_T("w:br"));
XMLTools::XMLElement elem(_T("w:br"));
elem.AppendAttribute(_T("w:type"), _T("textWrapping"));
elem.AppendAttribute(_T("w:clear"), _T("all"));
m_pXmlWriter->WriteString(elem.GetXMLString().c_str());
m_pXmlWriter->WriteString(elem.GetXMLString());
}
else if (TextMark::ParagraphEnd == code)
{
@ -520,10 +520,10 @@ namespace DocFileFormat
text.clear();
XMLTools::XMLElement<wchar_t> elem(_T("w:br"));
XMLTools::XMLElement elem(_T("w:br"));
elem.AppendAttribute(_T("w:type"), _T("page"));
m_pXmlWriter->WriteString(elem.GetXMLString().c_str());
m_pXmlWriter->WriteString(elem.GetXMLString());
}
}
else if (TextMark::ColumnBreak == code)
@ -532,10 +532,10 @@ namespace DocFileFormat
text.clear();
XMLTools::XMLElement<wchar_t> elem(_T("w:br"));
XMLTools::XMLElement elem(_T("w:br"));
elem.AppendAttribute(_T("w:type"), _T("column"));
m_pXmlWriter->WriteString(elem.GetXMLString().c_str());
m_pXmlWriter->WriteString(elem.GetXMLString());
}
else if (TextMark::FieldBeginMark == code)
{
@ -698,8 +698,8 @@ namespace DocFileFormat
OleObject ole ( chpxObj, m_document->GetStorage(), m_document->bOlderVersion);
oleWriter.WriteNodeBegin (_T( "w:object" ), true);
oleWriter.WriteAttribute( _T( "w:dxaOrig" ), FormatUtils::IntToWideString( ( ole.pictureDesciptor.dxaGoal + ole.pictureDesciptor.dxaOrigin ) ).c_str() );
oleWriter.WriteAttribute( _T( "w:dyaOrig" ), FormatUtils::IntToWideString( ( ole.pictureDesciptor.dyaGoal + ole.pictureDesciptor.dyaOrigin ) ).c_str() );
oleWriter.WriteAttribute( _T( "w:dxaOrig" ), FormatUtils::IntToWideString( ( ole.pictureDesciptor.dxaGoal + ole.pictureDesciptor.dxaOrigin ) ));
oleWriter.WriteAttribute( _T( "w:dyaOrig" ), FormatUtils::IntToWideString( ( ole.pictureDesciptor.dyaGoal + ole.pictureDesciptor.dyaOrigin ) ));
oleWriter.WriteNodeEnd( _T( "" ), true, false );
ole.pictureDesciptor.Convert(&oVmlMapper);
@ -714,8 +714,8 @@ namespace DocFileFormat
PictureDescriptor pic(chpxObj, m_document->DataStream, 0x7fffffff, m_document->bOlderVersion);
oleWriter.WriteNodeBegin (_T( "w:object" ), true);
oleWriter.WriteAttribute( _T( "w:dxaOrig" ), FormatUtils::IntToWideString( ( pic.dxaGoal + pic.dxaOrigin ) ).c_str() );
oleWriter.WriteAttribute( _T( "w:dyaOrig" ), FormatUtils::IntToWideString( ( pic.dyaGoal + pic.dyaOrigin ) ).c_str() );
oleWriter.WriteAttribute( _T( "w:dxaOrig" ), FormatUtils::IntToWideString( ( pic.dxaGoal + pic.dxaOrigin ) ) );
oleWriter.WriteAttribute( _T( "w:dyaOrig" ), FormatUtils::IntToWideString( ( pic.dyaGoal + pic.dyaOrigin ) ) );
oleWriter.WriteNodeEnd( _T( "" ), true, false );
pic.Convert(&oVmlMapper);
@ -751,7 +751,7 @@ namespace DocFileFormat
if (!oVmlMapper.m_isEmbedded && oVmlMapper.m_isEquation)
{
//нельзя в Run писать oMath
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml.c_str());
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml);
_writeAfterRun = oVmlMapper.m_equationXml;
}
else
@ -777,10 +777,10 @@ namespace DocFileFormat
{
if (_fldCharCounter > 0)
{
XMLTools::XMLElement<wchar_t> elem( _T( "w:fldChar" ) );
XMLTools::XMLElement elem( _T( "w:fldChar" ) );
elem.AppendAttribute( _T( "w:fldCharType" ), _T( "separate" ) );
m_pXmlWriter->WriteString( elem.GetXMLString().c_str() );
m_pXmlWriter->WriteString( elem.GetXMLString() );
}
if (_embeddedObject) _skipRuns += 2;
}
@ -788,10 +788,10 @@ namespace DocFileFormat
{
if (_fldCharCounter > 0)
{
XMLTools::XMLElement<wchar_t> elem( _T( "w:fldChar" ) );
XMLTools::XMLElement elem( _T( "w:fldChar" ) );
elem.AppendAttribute( _T( "w:fldCharType" ), _T( "end" ) );
m_pXmlWriter->WriteString( elem.GetXMLString().c_str() );
m_pXmlWriter->WriteString( elem.GetXMLString());
_fldCharCounter--;
}
@ -812,8 +812,8 @@ namespace DocFileFormat
Symbol s = getSymbol( chpx );
m_pXmlWriter->WriteNodeBegin(_T("w:sym"), true);
m_pXmlWriter->WriteAttribute(_T("w:font"), FormatUtils::XmlEncode(s.FontName).c_str());
m_pXmlWriter->WriteAttribute(_T("w:char"), FormatUtils::XmlEncode(s.HexValue).c_str());
m_pXmlWriter->WriteAttribute(_T("w:font"), FormatUtils::XmlEncode(s.FontName));
m_pXmlWriter->WriteAttribute(_T("w:char"), FormatUtils::XmlEncode(s.HexValue));
m_pXmlWriter->WriteNodeEnd(_T(""), true);
}
else if ((TextMark::DrawnObject == code) && fSpec)
@ -903,7 +903,7 @@ namespace DocFileFormat
else if (oVmlMapper.m_isEquation)
{
//нельзя в Run писать oMath
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml.c_str());
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml);
_writeAfterRun = oVmlMapper.m_equationXml;
bFormula = true;
}
@ -925,7 +925,7 @@ namespace DocFileFormat
if ((m_document->FootnoteReferenceCharactersPlex != NULL) && (m_document->FootnoteReferenceCharactersPlex->IsCpExists(cp)))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:footnoteReference" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString(_footnoteNr++ ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString(_footnoteNr++ ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
}
else if ((m_document->IndividualFootnotesPlex != NULL) && (m_document->IndividualFootnotesPlex->IsCpExists(cp - m_document->FIB->m_RgLw97.ccpText)))
@ -936,7 +936,7 @@ namespace DocFileFormat
else if ((m_document->EndnoteReferenceCharactersPlex != NULL) && (m_document->EndnoteReferenceCharactersPlex->IsCpExists(cp)))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:endnoteReference" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString(_endnoteNr++ ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString(_endnoteNr++ ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
}
else if ((m_document->IndividualEndnotesPlex != NULL) &&
@ -951,7 +951,7 @@ namespace DocFileFormat
if (typeid(*this) != typeid(CommentsMapping))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:commentReference" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( _commentNr ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( _commentNr ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
}
else
@ -976,7 +976,7 @@ namespace DocFileFormat
writeTextStart(textType, true/*preserve_space*/);
m_pXmlWriter->WriteString(text.c_str());
m_pXmlWriter->WriteString(text);
writeTextEnd(textType);
}
@ -993,7 +993,7 @@ namespace DocFileFormat
writeTextStart( textType, preserve_space );
m_pXmlWriter->WriteString( text.c_str() );
m_pXmlWriter->WriteString( text);
writeTextEnd( textType );
}
@ -1003,7 +1003,7 @@ namespace DocFileFormat
{
std::wstring str = ( std::wstring( _T( "w:" ) ) + textType );
m_pXmlWriter->WriteNodeBegin( str.c_str(), true );
m_pXmlWriter->WriteNodeBegin( str, true );
if (preserve_space)
{
m_pXmlWriter->WriteAttribute( _T( "xml:space" ), _T( "preserve" ) );
@ -1015,7 +1015,7 @@ namespace DocFileFormat
{
std::wstring str = ( std::wstring( _T( "w:" ) ) + textType );
m_pXmlWriter->WriteNodeEnd( str.c_str() );
m_pXmlWriter->WriteNodeEnd( str );
}
// Searches for bookmarks in the list of characters.
@ -1570,12 +1570,12 @@ namespace DocFileFormat
if ((bookmarkName != NULL) && (*bookmarkName != _T("_PictureBullets")))
{
XMLTools::XMLElement<wchar_t> bookmarkElem(_T("w:bookmarkStart"));
XMLTools::XMLElement bookmarkElem(_T("w:bookmarkStart"));
bookmarkElem.AppendAttribute(_T("w:id"), FormatUtils::IntToWideString(id).c_str());
bookmarkElem.AppendAttribute(_T("w:name"), bookmarkName->c_str());
bookmarkElem.AppendAttribute(_T("w:id"), FormatUtils::IntToWideString(id));
bookmarkElem.AppendAttribute(_T("w:name"), *bookmarkName);
m_pXmlWriter->WriteString(bookmarkElem.GetXMLString().c_str());
m_pXmlWriter->WriteString(bookmarkElem.GetXMLString());
return true;
}
@ -1591,11 +1591,11 @@ namespace DocFileFormat
if ( ( bookmarkName != NULL ) && ( *bookmarkName != _T( "_PictureBullets" ) ) )
{
XMLTools::XMLElement<wchar_t> bookmarkElem( _T( "w:bookmarkEnd" ) );
XMLTools::XMLElement bookmarkElem( _T( "w:bookmarkEnd" ) );
bookmarkElem.AppendAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ).c_str() );
bookmarkElem.AppendAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ));
m_pXmlWriter->WriteString( bookmarkElem.GetXMLString().c_str() );
m_pXmlWriter->WriteString( bookmarkElem.GetXMLString());
return true;
}

View File

@ -70,7 +70,7 @@ namespace DocFileFormat
while ( cp <= ( m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn + m_document->FIB->m_RgLw97.ccpHdr + m_document->FIB->m_RgLw97.ccpAtn + m_document->FIB->m_RgLw97.ccpEdn - 2 ) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:endnote" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
while ( ( cp - m_document->FIB->m_RgLw97.ccpText - m_document->FIB->m_RgLw97.ccpFtn - m_document->FIB->m_RgLw97.ccpHdr - m_document->FIB->m_RgLw97.ccpAtn ) < (*m_document->IndividualEndnotesPlex)[id + 1] )

View File

@ -59,34 +59,39 @@ namespace DocFileFormat
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
int sz_fonts = table->Data.size();
int sz_fonts = table->Data.size();
int users_fonts = 0;
for ( std::vector<ByteStructure*>::iterator iter = table->Data.begin(); iter != table->Data.end(); iter++ )
{
FontFamilyName* font = dynamic_cast<FontFamilyName*>( *iter );
m_pXmlWriter->WriteNodeBegin( _T( "w:font" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:name" ), FormatUtils::XmlEncode(font->xszFtn, true).c_str());
std::wstring name_ = FormatUtils::XmlEncode(font->xszFtn, true);
if (name_.empty())
name_ = L"UserFont_" + std::to_wstring(++users_fonts);
m_pXmlWriter->WriteAttribute( _T( "w:name" ), name_);
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
//alternative name
if ( ( font->xszAlt != std::wstring( _T( "" ) ) ) && ( font->xszAlt.length() > 0 ) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:altName" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(font->xszAlt, true).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(font->xszAlt, true));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:altName" ) );
}
//charset
m_pXmlWriter->WriteNodeBegin( _T("w:charset" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( font->chs, _T( "%02x" ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( font->chs, _T( "%02x" ) ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:charset" ) );
//font family
m_pXmlWriter->WriteNodeBegin( _T("w:family"), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString( font->ff, &FontFamily[0][0], 6, 11 ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString( font->ff, &FontFamily[0][0], 6, 11 ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:family" ) );
@ -100,13 +105,13 @@ namespace DocFileFormat
wstr += FormatUtils::IntToFormattedWideString( font->panose[i], _T( "%02x" ) );
}
m_pXmlWriter->WriteAttribute( _T( "w:val" ), wstr.c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), wstr);
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:panose1" ) );
//pitch
m_pXmlWriter->WriteNodeBegin( _T("w:pitch"), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString( font->prq, &FontPitch[0][0], 3, 9 ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString( font->prq, &FontPitch[0][0], 3, 9 ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:pitch" ) );
@ -121,12 +126,12 @@ namespace DocFileFormat
//font signature
m_pXmlWriter->WriteNodeBegin( _T("w:sig"), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:usb0" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield0, _T( "%08x" ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:usb1" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield1, _T( "%08x" ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:usb2" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield2, _T( "%08x" ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:usb3" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield3, _T( "%08x" ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:csb0" ), FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield0, _T( "%08x" ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:csb1" ), FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield1, _T( "%08x" ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:usb0" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield0, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:usb1" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield1, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:usb2" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield2, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:usb3" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield3, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:csb0" ), FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield0, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:csb1" ), FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield1, _T( "%08x" ) ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:sig" ) );

View File

@ -77,9 +77,14 @@ namespace DocFileFormat
{
//this PAPX is for a table
//cp = writeTable( cp, tai.iTap );
int start_table_cp = cp;
Table table( this, cp, ( ( tai.iTap > 0 ) ? ( 1 ) : ( 0 ) ) );
table.Convert( this );
cp = table.GetCPEnd();
if (cp == start_table_cp)
cp++;
}
else
{

View File

@ -70,7 +70,7 @@ namespace DocFileFormat
while ( cp <= ( m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn - 2 ) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:footnote" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
while ( ( cp - m_document->FIB->m_RgLw97.ccpText ) < (*m_document->IndividualFootnotesPlex)[id + 1] )

View File

@ -40,7 +40,7 @@ namespace DocFileFormat
_type = type;
}
LanguageIdMapping::LanguageIdMapping (XMLTools::XMLElement<wchar_t>* parentElement, LanguageType type) : PropertiesMapping(NULL)
LanguageIdMapping::LanguageIdMapping (XMLTools::XMLElement* parentElement, LanguageType type) : PropertiesMapping(NULL)
{
_parent = parentElement;
_type = type;
@ -59,31 +59,31 @@ namespace DocFileFormat
{
std::wstring langcode = getLanguageCode( dynamic_cast<LanguageId*>( lid ) );
XMLTools::XMLAttribute<wchar_t>* att = NULL;
XMLTools::XMLAttribute* att = NULL;
switch ( _type )
{
case Default:
{
att = new XMLTools::XMLAttribute<wchar_t>( L"w:val", langcode.c_str() );
att = new XMLTools::XMLAttribute( L"w:val", langcode);
}
break;
case EastAsian:
{
att = new XMLTools::XMLAttribute<wchar_t>( L"w:eastAsia", langcode.c_str() );
att = new XMLTools::XMLAttribute( L"w:eastAsia", langcode);
}
break;
case Complex:
{
att = new XMLTools::XMLAttribute<wchar_t>( L"w:bidi", langcode.c_str() );
att = new XMLTools::XMLAttribute( L"w:bidi", langcode);
}
break;
default:
{
att = new XMLTools::XMLAttribute<wchar_t>( L"w:val", langcode.c_str() );
att = new XMLTools::XMLAttribute( L"w:val", langcode);
}
break;
}
@ -91,7 +91,7 @@ namespace DocFileFormat
if (m_pXmlWriter)
{
// !!!TODO!!!
m_pXmlWriter->WriteString( att->GetXMLString().c_str() );
m_pXmlWriter->WriteString( att->GetXMLString());
}
else if ( _parent != NULL )
{

View File

@ -49,14 +49,14 @@ namespace DocFileFormat
{
public:
LanguageIdMapping( XMLTools::CStringXmlWriter* writer, LanguageType type );
LanguageIdMapping( XMLTools::XMLElement<wchar_t>* parentElement, LanguageType type );
LanguageIdMapping( XMLTools::XMLElement* parentElement, LanguageType type );
virtual ~LanguageIdMapping();
void Apply( IVisitable* lid );
static std::wstring getLanguageCode( LanguageId* lid );
private:
LanguageType _type;
XMLTools::XMLElement<wchar_t>* _parent;
LanguageType _type;
XMLTools::XMLElement* _parent;
};
}

View File

@ -83,12 +83,12 @@ namespace DocFileFormat
{
//start abstractNum
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNum" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:abstractNumId" ), FormatUtils::IntToWideString( i ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:abstractNumId" ), FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
//nsid
m_pXmlWriter->WriteNodeBegin( _T( "w:nsid" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->lsid, _T( "%08x" ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->lsid, _T( "%08x" ) ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
//multiLevelType
@ -111,7 +111,7 @@ namespace DocFileFormat
//template
m_pXmlWriter->WriteNodeBegin( _T( "w:tmpl" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->tplc, _T( "%08x" ) ).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->tplc, _T( "%08x" ) ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
// writes the levels
@ -131,12 +131,12 @@ namespace DocFileFormat
{
//start abstractNum
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNum" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:abstractNumId" ), FormatUtils::IntToWideString( i ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:abstractNumId" ), FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
////nsid
//m_pXmlWriter->WriteNodeBegin( _T( "w:nsid" ), TRUE );
//m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->lsid, _T( "%08x" ) ).c_str() );
//m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->lsid, _T( "%08x" ) ));
//m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
//multiLevelType
@ -160,26 +160,26 @@ namespace DocFileFormat
//start num
m_pXmlWriter->WriteNodeBegin( _T( "w:num" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:numId" ), FormatUtils::IntToWideString(i + 1).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:numId" ), FormatUtils::IntToWideString(i + 1));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
int index = FindIndexbyId( rglst->listData, lfo->lsid );
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNumId" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( index ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( index ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
for (std::vector<ListFormatOverrideLevel*>::const_iterator iter = lfo->rgLfoLvl.begin(); iter != lfo->rgLfoLvl.end(); ++iter)
{
m_pXmlWriter->WriteNodeBegin( _T( "w:lvlOverride" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString( (*iter)->ilvl ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString( (*iter)->ilvl ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
if ( ( (*iter)->fStartAt ) && ( !(*iter)->fFormatting ) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:startOverride" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( (*iter)->iStartAt ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( (*iter)->iStartAt ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
}
@ -197,12 +197,12 @@ namespace DocFileFormat
for (std::list<NumberingDescriptor>::iterator iter = rglst->listNumbering.begin(); iter != rglst->listNumbering.end(); ++iter, ++i)
{
m_pXmlWriter->WriteNodeBegin( _T( "w:num" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:numId" ), FormatUtils::IntToWideString(i+1).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:numId" ), FormatUtils::IntToWideString(i+1));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNumId" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( i ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeEnd(_T( "w:num"));
@ -255,8 +255,10 @@ namespace DocFileFormat
if (!FormatUtils::IsControlSymbol(xchBullet))
{
ret.push_back(lvl->xst[0]);
ret.push_back(L'\0');
ret.push_back(lvl->xst[0]);//??? xchBullet
}
else
{
}
}
}
@ -487,20 +489,20 @@ namespace DocFileFormat
//--------------------------------------------------------------------------------
m_pXmlWriter->WriteNodeBegin( _T( "w:lvl" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString(level).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString(level));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( _T( "w:start" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString(lvl.iStartAt).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString(lvl.iStartAt));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( _T( "w:numFmt" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), GetNumberFormatWideString(lvl.nfc, true).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), GetNumberFormatWideString(lvl.nfc, true));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
//// suffix
// m_pXmlWriter->WriteNodeBegin( _T( "w:suff" ), TRUE );
// m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl.ixchFollow, &FollowingCharMap[0][0], 3, 8).c_str());
// m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl.ixchFollow, &FollowingCharMap[0][0], 3, 8));
// m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
// Number level text
@ -516,13 +518,13 @@ namespace DocFileFormat
if (!lvlText.empty())
{
m_pXmlWriter->WriteNodeBegin(_T("w:lvlText"), TRUE);
m_pXmlWriter->WriteAttribute(_T("w:val"), lvlText.c_str());
m_pXmlWriter->WriteAttribute(_T("w:val"), lvlText);
m_pXmlWriter->WriteNodeEnd(_T( ""), TRUE);
}
// jc
m_pXmlWriter->WriteNodeBegin( _T( "w:lvlJc" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl.jc, &LevelJustificationMap[0][0], 3, 7).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl.jc, &LevelJustificationMap[0][0], 3, 7));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
// pPr
m_pXmlWriter->WriteNodeBegin( _T( "w:pPr" ), FALSE );
@ -535,8 +537,8 @@ namespace DocFileFormat
{
m_pXmlWriter->WriteNodeBegin( _T( "w:rFonts" ), TRUE );
// w:hint="default"
m_pXmlWriter->WriteAttribute(_T("w:hAnsi"), fontFamily.c_str());
m_pXmlWriter->WriteAttribute(_T("w:ascii"), fontFamily.c_str());
m_pXmlWriter->WriteAttribute(_T("w:hAnsi"), fontFamily);
m_pXmlWriter->WriteAttribute(_T("w:ascii"), fontFamily);
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
}
m_pXmlWriter->WriteNodeEnd(_T("w:rPr"));
@ -557,25 +559,25 @@ namespace DocFileFormat
// Проверяем шрифт
m_pXmlWriter->WriteNodeBegin( _T( "w:lvl" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString(level).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString(level));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
// starts at
m_pXmlWriter->WriteNodeBegin( _T( "w:start" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString(lvl->iStartAt).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString(lvl->iStartAt));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
// number format
m_pXmlWriter->WriteNodeBegin( _T( "w:numFmt" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), GetNumberFormatWideString(lvl->nfc).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), GetNumberFormatWideString(lvl->nfc));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
// suffix
m_pXmlWriter->WriteNodeBegin( _T( "w:suff" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl->ixchFollow, &FollowingCharMap[0][0], 3, 8).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl->ixchFollow, &FollowingCharMap[0][0], 3, 8));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
// style
@ -585,14 +587,14 @@ namespace DocFileFormat
if (styleIndex != ListData::ISTD_NIL)
{
m_pXmlWriter->WriteNodeBegin( _T( "w:pStyle" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex))).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex))));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
}
// Number level text
m_pXmlWriter->WriteNodeBegin(_T("w:lvlText"), TRUE);
m_pXmlWriter->WriteAttribute(_T("w:val"), GetLvlText(lvl, cpMapping.CheckIsSymbolFont()).c_str());
m_pXmlWriter->WriteAttribute(_T("w:val"), GetLvlText(lvl, cpMapping.CheckIsSymbolFont()));
m_pXmlWriter->WriteNodeEnd(_T( ""), TRUE);
WriteLevelPictureBullet(lvl->grpprlChpx);
@ -606,7 +608,7 @@ namespace DocFileFormat
}
// jc
m_pXmlWriter->WriteNodeBegin( _T( "w:lvlJc" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl->jc, &LevelJustificationMap[0][0], 3, 7).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl->jc, &LevelJustificationMap[0][0], 3, 7));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
// pPr
bool isBidi = false;
@ -638,7 +640,7 @@ namespace DocFileFormat
if ((pict.mfp.mm > 98) && (pict.shapeContainer != NULL))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:numPicBullet" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:numPicBulletId" ), FormatUtils::IntToWideString( iter->first ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:numPicBulletId" ), FormatUtils::IntToWideString( iter->first ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( _T( "w:pict" ) );
@ -670,7 +672,7 @@ namespace DocFileFormat
{
if (grpprlChpx)
{
unsigned int cp = 0;
unsigned int index = 0;
bool isPictureBullet = false;
for (std::list<SinglePropertyModifier>::const_iterator iter = grpprlChpx->grpprl->begin(); iter != grpprlChpx->grpprl->end(); ++iter)
@ -679,7 +681,7 @@ namespace DocFileFormat
{
case sprmCPbiIBullet:
{
cp = FormatUtils::BytesToUInt32(iter->Arguments, 0, iter->argumentsSize);
index = FormatUtils::BytesToUInt32(iter->Arguments, 0, iter->argumentsSize);
}break;
case sprmCPbiGrf:
@ -692,7 +694,7 @@ namespace DocFileFormat
if (isPictureBullet)
{
m_pXmlWriter->WriteNodeBegin(_T("w:lvlPicBulletId"), TRUE);
m_pXmlWriter->WriteAttribute(_T("w:val"), FormatUtils::IntToWideString(cp).c_str());
m_pXmlWriter->WriteAttribute(_T("w:val"), FormatUtils::IntToWideString(index));
m_pXmlWriter->WriteNodeEnd(_T(""), TRUE);
}
}

View File

@ -71,9 +71,9 @@ namespace DocFileFormat
{
int relID = m_context->_docx->RegisterExternalOLEObject(_caller, ole->ClipboardFormat, ole->Link);
m_pXmlWriter->WriteAttribute( _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString( relID ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString( relID ) ));
m_pXmlWriter->WriteAttribute( _T( "Type" ), _T( "Link" ) );
m_pXmlWriter->WriteAttribute( _T( "UpdateMode" ), ole->UpdateMode.c_str() );
m_pXmlWriter->WriteAttribute( _T( "UpdateMode" ), ole->UpdateMode);
}
else
{
@ -84,16 +84,16 @@ namespace DocFileFormat
else
relID = m_context->_docx->RegisterOLEObject(_caller, ole->ClipboardFormat);
m_pXmlWriter->WriteAttribute( _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString( relID ) ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString( relID ) ));
m_pXmlWriter->WriteAttribute( _T( "Type" ), _T( "Embed" ) );
copyEmbeddedObject( ole );
}
m_pXmlWriter->WriteAttribute( _T( "ProgID" ), ole->Program.c_str() );
m_pXmlWriter->WriteAttribute( _T( "ShapeID" ), _shapeId.c_str() );
m_pXmlWriter->WriteAttribute( _T( "ProgID" ), ole->Program);
m_pXmlWriter->WriteAttribute( _T( "ShapeID" ), _shapeId);
m_pXmlWriter->WriteAttribute( _T( "DrawAspect" ), _T( "Content" ) );
m_pXmlWriter->WriteAttribute( _T( "ObjectID" ), ole->ObjectId.c_str() );
m_pXmlWriter->WriteAttribute( _T( "ObjectID" ), ole->ObjectId);
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "o:OLEObject" ) );

View File

@ -224,7 +224,7 @@ namespace DocFileFormat
{
HeaderRelationshipsFiles.push_back( RelationshipsFile( ( std::wstring( _T( "word/_rels/header" ) ) + FormatUtils::IntToWideString( ++_headerCounter ) + std::wstring( _T( ".xml.rels" ) ) ) ) );
return AddPart( _T( "word" ), ( std::wstring( _T( "header" ) ) + FormatUtils::IntToWideString( _headerCounter ) + std::wstring( _T( ".xml" ) ) ).c_str(), WordprocessingMLContentTypes::Header, OpenXmlRelationshipTypes::Header );
return AddPart( _T( "word" ), ( std::wstring( _T( "header" ) ) + FormatUtils::IntToWideString( _headerCounter ) + std::wstring( _T( ".xml" ) ) ), WordprocessingMLContentTypes::Header, OpenXmlRelationshipTypes::Header );
}
int OpenXmlPackage::AddHeaderPart( const std::wstring& fileName, const std::wstring& relationshipType, const std::wstring& targetMode )
@ -245,7 +245,7 @@ namespace DocFileFormat
{
FooterRelationshipsFiles.push_back( RelationshipsFile( ( std::wstring( _T( "word/_rels/footer" ) ) + FormatUtils::IntToWideString( ++_footerCounter ) + std::wstring( _T( ".xml.rels" ) ) ) ) );
return AddPart( _T( "word" ), ( std::wstring( _T( "footer" ) ) + FormatUtils::IntToWideString( _footerCounter ) + std::wstring( _T( ".xml" ) ) ).c_str(), WordprocessingMLContentTypes::Footer, OpenXmlRelationshipTypes::Footer );
return AddPart( _T( "word" ), ( std::wstring( _T( "footer" ) ) + FormatUtils::IntToWideString( _footerCounter ) + std::wstring( _T( ".xml" ) ) ), WordprocessingMLContentTypes::Footer, OpenXmlRelationshipTypes::Footer );
}
int OpenXmlPackage::AddFooterPart( const std::wstring& fileName, const std::wstring& relationshipType, const std::wstring& targetMode )
@ -322,13 +322,13 @@ namespace DocFileFormat
for ( std::list<Relationship>::const_iterator iter = relationshipsFile.Relationships.begin(); iter != relationshipsFile.Relationships.end(); iter++ )
{
writer.WriteNodeBegin( _T( "Relationship" ), TRUE );
writer.WriteAttribute( _T( "Id" ), iter->Id.c_str() );
writer.WriteAttribute( _T( "Type" ), iter->Type.c_str() );
writer.WriteAttribute( _T( "Target" ), iter->Target.c_str() );
writer.WriteAttribute( _T( "Id" ), iter->Id );
writer.WriteAttribute( _T( "Type" ), iter->Type );
writer.WriteAttribute( _T( "Target" ), iter->Target );
if ( !iter->TargetMode.empty() )
{
writer.WriteAttribute( _T( "TargetMode" ), iter->TargetMode.c_str() );
writer.WriteAttribute( _T( "TargetMode" ), iter->TargetMode );
}
writer.WriteNodeEnd( _T( "" ), TRUE );
@ -358,16 +358,16 @@ namespace DocFileFormat
for ( std::map<std::wstring, std::wstring>::iterator iter = DocumentContentTypesFile._defaultTypes.begin(); iter != DocumentContentTypesFile._defaultTypes.end(); iter++ )
{
writer.WriteNodeBegin( _T( "Default" ), TRUE );
writer.WriteAttribute( _T( "Extension" ), iter->first.c_str() );
writer.WriteAttribute( _T( "ContentType" ), DocumentContentTypesFile._defaultTypes[iter->first].c_str() );
writer.WriteAttribute( _T( "Extension" ), iter->first );
writer.WriteAttribute( _T( "ContentType" ), DocumentContentTypesFile._defaultTypes[iter->first] );
writer.WriteNodeEnd( _T( "" ), TRUE );
}
for ( std::map<std::wstring, std::wstring>::iterator iter = DocumentContentTypesFile._partOverrides.begin(); iter != DocumentContentTypesFile._partOverrides.end(); iter++ )
{
writer.WriteNodeBegin( _T( "Override" ), TRUE );
writer.WriteAttribute( _T( "PartName" ), iter->first.c_str() );
writer.WriteAttribute( _T( "ContentType" ), DocumentContentTypesFile._partOverrides[iter->first].c_str() );
writer.WriteAttribute( _T( "PartName" ), iter->first );
writer.WriteAttribute( _T( "ContentType" ), DocumentContentTypesFile._partOverrides[iter->first] );
writer.WriteNodeEnd( _T( "" ), TRUE );
}

View File

@ -42,8 +42,8 @@ namespace DocFileFormat
m_document = document;
m_context = context;
_pPr = new XMLTools::XMLElement<wchar_t>( _T( "w:pPr" ) );
_framePr = new XMLTools::XMLElement<wchar_t>( _T( "w:framePr" ) );
_pPr = new XMLTools::XMLElement( _T( "w:pPr" ) );
_framePr = new XMLTools::XMLElement( _T( "w:framePr" ) );
_paraEndChpx = paraEndChpx;
_isBidi = isBidi;
@ -57,8 +57,8 @@ namespace DocFileFormat
m_document = document;
m_context = context;
_pPr = new XMLTools::XMLElement<wchar_t>( _T( "w:pPr" ) );
_framePr = new XMLTools::XMLElement<wchar_t>( _T( "w:framePr" ) );
_pPr = new XMLTools::XMLElement( _T( "w:pPr" ) );
_framePr = new XMLTools::XMLElement( _T( "w:framePr" ) );
_paraEndChpx = paraEndChpx;
_isBidi = isBidi;
@ -82,21 +82,21 @@ namespace DocFileFormat
{
ParagraphPropertyExceptions* papx = static_cast<ParagraphPropertyExceptions*>( visited );
XMLTools::XMLElement<wchar_t> ind ( _T( "w:ind" ) );
XMLTools::XMLElement<wchar_t> numPr ( _T( "w:numPr" ) );
XMLTools::XMLElement<wchar_t> pBdr ( _T( "w:pBdr" ) );
XMLTools::XMLElement<wchar_t> spacing ( _T( "w:spacing" ) );
XMLTools::XMLElement<wchar_t>* jc = NULL;
XMLTools::XMLElement ind ( _T( "w:ind" ) );
XMLTools::XMLElement numPr ( _T( "w:numPr" ) );
XMLTools::XMLElement pBdr ( _T( "w:pBdr" ) );
XMLTools::XMLElement spacing ( _T( "w:spacing" ) );
XMLTools::XMLElement* jc = NULL;
if ( _isParagraphStyleNeeded )
{
//append style id , do not append "Normal" style (istd 0)
XMLTools::XMLElement<wchar_t> pStyle( _T( "w:pStyle" ) );
XMLTools::XMLAttribute<wchar_t> styleId( _T( "w:val" ), StyleIdentifierMap[0] );
XMLTools::XMLElement pStyle( _T( "w:pStyle" ) );
XMLTools::XMLAttribute styleId( _T( "w:val" ), StyleIdentifierMap[0] );
if ( papx->istd < m_document->Styles->Styles->size() )
{
styleId.SetValue( FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId( m_document->Styles->Styles->at( papx->istd ) )).c_str() );
styleId.SetValue( FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId( m_document->Styles->Styles->at( papx->istd ) )) );
}
pStyle.AppendAttribute( styleId );
@ -106,7 +106,7 @@ namespace DocFileFormat
//append formatting of paragraph end mark
if ( _paraEndChpx != NULL )
{
XMLTools::XMLElement<wchar_t>* rPr = new XMLTools::XMLElement<wchar_t>( _T( "w:rPr" ) );
XMLTools::XMLElement* rPr = new XMLTools::XMLElement( _T( "w:rPr" ) );
//append properties
RevisionData* rev = new RevisionData( _paraEndChpx );
@ -116,7 +116,7 @@ namespace DocFileFormat
//append delete infos
if ( rev->Type == Deleted )
{
XMLTools::XMLElement<wchar_t> del( _T( "w:del" ) );
XMLTools::XMLElement del( _T( "w:del" ) );
rPr->AppendChild( del );
}
@ -139,7 +139,7 @@ namespace DocFileFormat
{
case sprmPIpgp:
{
appendValueElement(_pPr, _T( "divId" ), FormatUtils::IntToWideString( FormatUtils::BytesToUInt32(iter->Arguments, 0, iter->argumentsSize)).c_str(), true);
appendValueElement(_pPr, _T( "divId" ), FormatUtils::IntToWideString( FormatUtils::BytesToUInt32(iter->Arguments, 0, iter->argumentsSize)), true);
}break;
case sprmPFAutoSpaceDE:
@ -242,7 +242,7 @@ namespace DocFileFormat
flValue *= -1;
}
appendValueAttribute( &ind, flName.c_str(), flValue );
appendValueAttribute( &ind, flName, flValue );
}break;
case sprmPDxcLeft1:
@ -283,10 +283,10 @@ namespace DocFileFormat
{
LineSpacingDescriptor lspd( iter->Arguments, iter->argumentsSize );
XMLTools::XMLAttribute<wchar_t> line( _T( "w:line" ), FormatUtils::IntToWideString( abs( lspd.dyaLine ) ).c_str() );
XMLTools::XMLAttribute line( _T( "w:line" ), FormatUtils::IntToWideString( abs( lspd.dyaLine ) ));
spacing.AppendAttribute( line );
XMLTools::XMLAttribute<wchar_t> lineRule( _T( "w:lineRule" ), _T( "auto" ) );
XMLTools::XMLAttribute lineRule( _T( "w:lineRule" ), _T( "auto" ) );
if( ( !lspd.fMultLinespace ) && ( lspd.dyaLine < 0 ) )
{
@ -311,10 +311,10 @@ namespace DocFileFormat
iter->Arguments[0] = (iter->Arguments[0] == 0 ? 2 : 0);
}
RELEASEOBJECT( jc );
jc = new XMLTools::XMLElement<wchar_t>( L"w:jc" );
jc = new XMLTools::XMLElement( L"w:jc" );
if ( jc )
{
XMLTools::XMLAttribute<wchar_t> jcVal( L"w:val", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15 ).c_str() );
XMLTools::XMLAttribute jcVal( L"w:val", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15 ));
jc->AppendAttribute( jcVal );
}
}break;
@ -325,7 +325,7 @@ namespace DocFileFormat
//case 0x4424:
case sprmPBrcTop80:
{
XMLTools::XMLElement<wchar_t> topBorder( _T( "w:top" ) );
XMLTools::XMLElement topBorder( _T( "w:top" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
@ -340,7 +340,7 @@ namespace DocFileFormat
//case 0x4425:
case sprmPBrcLeft80:
{
XMLTools::XMLElement<wchar_t> leftBorder( _T( "w:left" ) );
XMLTools::XMLElement leftBorder( _T( "w:left" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
@ -355,7 +355,7 @@ namespace DocFileFormat
//case 0x4426:
case sprmPBrcBottom80:
{
XMLTools::XMLElement<wchar_t> bottomBorder( _T( "w:bottom" ) );
XMLTools::XMLElement bottomBorder( _T( "w:bottom" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
@ -370,7 +370,7 @@ namespace DocFileFormat
//case 0x4427:
case sprmPBrcRight80:
{
XMLTools::XMLElement<wchar_t> rightBorder( _T( "w:right" ) );
XMLTools::XMLElement rightBorder( _T( "w:right" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
@ -385,7 +385,7 @@ namespace DocFileFormat
//case 0x4428:
case sprmPBrcBetween80:
{
XMLTools::XMLElement<wchar_t> betweenBorder( _T( "w:between" ) );
XMLTools::XMLElement betweenBorder( _T( "w:between" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
@ -400,7 +400,7 @@ namespace DocFileFormat
//case 0x4629:
case sprmPBrcBar80:
{
XMLTools::XMLElement<wchar_t> barBorder( _T( "w:bar" ) );
XMLTools::XMLElement barBorder( _T( "w:bar" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
@ -438,10 +438,13 @@ namespace DocFileFormat
}break;
case sprmOldPNLvlAnm:
{
{
short level = FormatUtils::BytesToUChar( iter->Arguments, 0, iter->argumentsSize) - 1;
if (level > 0 && level < 10)
appendValueElement( _pPr, _T( "outlineLvl" ), level, false );
appendValueElement( _pPr, _T( "outlineLvl" ), level, false );
}break;
case sprmOldPFNoLineNumb:
{
}break;
@ -480,7 +483,7 @@ namespace DocFileFormat
case sprmPChgTabsPapx:
case sprmPChgTabs:
{
case sprmPChgTabsPapx:
XMLTools::XMLElement tabs( _T( "w:tabs" ) );
int pos = 0;
@ -491,14 +494,14 @@ namespace DocFileFormat
for( int i=0; i < itbdDelMax; i++ )
{
XMLTools::XMLElement tab( _T( "w:tab" ) );
//clear
XMLTools::XMLElement<wchar_t> tab( _T( "w:tab" ) );
XMLTools::XMLAttribute tabsVal( _T( "w:val" ), _T( "clear" ) );
tab.AppendAttribute( tabsVal );
//position
tab.AppendAttribute( tabsVal );
XMLTools::XMLAttribute tabsPos( _T( "w:pos" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, pos, iter->argumentsSize ) ) );
tab.AppendAttribute( tabsPos );
tabs.AppendChild( tab );
@ -515,26 +518,26 @@ namespace DocFileFormat
}
//read the added tabs
}
unsigned char itbdAddMax = pos < iter->argumentsSize ? iter->Arguments[pos] : 0;
//read the added tabs
if (itbdAddMax > 0) pos++;
for ( int i = 0; i < itbdAddMax; i++ )
{
TabDescriptor tbd( iter->Arguments[pos + ( itbdAddMax * 2 ) + i] );
{
XMLTools::XMLElement tab( _T( "w:tab" ) );
//justification
XMLTools::XMLElement<wchar_t> tab( _T( "w:tab" ) );
XMLTools::XMLAttribute tabsVal( _T( "w:val" ), FormatUtils::MapValueToWideString( tbd.jc, &Global::TabStop[0][0], 7, 8 ) );
tab.AppendAttribute( tabsVal );
//tab leader type
tab.AppendAttribute( tabsVal );
XMLTools::XMLAttribute leader( _T( "w:leader" ), FormatUtils::MapValueToWideString( tbd.tlc, &Global::TabLeader[0][0], 8, 11 ) );
tab.AppendAttribute( leader );
//position
tab.AppendAttribute( leader );
XMLTools::XMLAttribute tabsPos( _T( "w:pos" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, ( pos + (i * 2) ), iter->argumentsSize ) ) );
tab.AppendAttribute( tabsPos );
tabs.AppendChild( tab );
@ -551,14 +554,14 @@ namespace DocFileFormat
//position code
unsigned char flag = iter->Arguments[0];
//position code
unsigned char flag = iter->Arguments[0];
appendValueAttribute (_framePr, _T( "w:hAnchor" ), FormatUtils::MapValueToWideString( ( ( flag & 0xC0 ) >> 6 ), &Global::HorizontalPositionCode[0][0], 4, 7 ) );
appendValueAttribute (_framePr, _T( "w:vAnchor" ), FormatUtils::MapValueToWideString( ( ( flag & 0x30 ) >> 4 ), &Global::VerticalPositionCode[0][0], 4, 7 ) );
}
break;
case sprmOldPWr:
case sprmPWr:
appendValueAttribute( _framePr, _T( "w:wrap" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextFrameWrapping[0][0], 6, 10 ) );
break;
case sprmOldPDxaAbs:
@ -595,7 +598,7 @@ namespace DocFileFormat
{
short pDcs = FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize );
{
appendValueAttribute( _framePr, _T( "w:dropCap" ), FormatUtils::MapValueToWideString( ( pDcs & 0x07 ), &Global::TextFrameDropCapLocation[0][0], 3, 7 ) );
appendValueAttribute( _framePr, _T( "w:lines" ), (unsigned char)( ( pDcs & 0xF8 ) >> 3 ) );
}
@ -632,7 +635,7 @@ namespace DocFileFormat
//append section properties
if ( _sepx != NULL )
{
//append section properties
XMLTools::XMLElement sectPr( _T( "w:sectPr" ) );
SectionPropertiesMapping* sectionPropertiesMapping = new SectionPropertiesMapping( &sectPr, m_context, _sectionNr );
_sepx->Convert( sectionPropertiesMapping );
@ -678,7 +681,7 @@ namespace DocFileFormat
//write Properties
if ( ( _pPr->GetChildCount() > 0 ) || ( _pPr->GetAttributeCount() > 0 ) )
{
//write Properties
m_pXmlWriter->WriteString( _pPr->GetXMLString() );
}
}
m_pXmlWriter->WriteString( _pPr->GetXMLString().c_str() );
}

View File

@ -57,8 +57,8 @@ namespace DocFileFormat
WordDocument* m_document;
ConversionContext* m_context;
XMLTools::XMLElement<wchar_t>* _pPr;
XMLTools::XMLElement<wchar_t>* _framePr;
XMLTools::XMLElement* _pPr;
XMLTools::XMLElement* _framePr;
SectionPropertyExceptions* _sepx;
CharacterPropertyExceptions* _paraEndChpx;
int _sectionNr;

View File

@ -244,22 +244,22 @@ namespace DocFileFormat
/*========================================================================================================*/
void PropertiesMapping::appendFlagAttribute( XMLTools::XMLElement<wchar_t>* node, const SinglePropertyModifier& sprm, const wchar_t* attributeName )
void PropertiesMapping::appendFlagAttribute( XMLTools::XMLElement* node, const SinglePropertyModifier& sprm, const std::wstring & attributeName )
{
XMLTools::XMLAttribute<wchar_t> att( attributeName, FormatUtils::IntToWideString( sprm.Arguments[0] ).c_str());
XMLTools::XMLAttribute att( attributeName, FormatUtils::IntToWideString( sprm.Arguments[0] ));
node->AppendAttribute( att );
}
/*========================================================================================================*/
void PropertiesMapping::appendFlagElement( XMLTools::XMLElement<wchar_t>* node, const SinglePropertyModifier& sprm, const wchar_t* elementName, bool unique )
void PropertiesMapping::appendFlagElement( XMLTools::XMLElement* node, const SinglePropertyModifier& sprm, const std::wstring & elementName, bool unique )
{
XMLTools::XMLElement<wchar_t> ele( L"w", elementName );
XMLTools::XMLElement ele( L"w", elementName );
if ( sprm.Arguments[0] == 0 )
{
XMLTools::XMLAttribute<wchar_t> val( L"w:val" , L"off" );
XMLTools::XMLAttribute val( L"w:val" , L"off" );
ele.AppendAttribute( val );
}
@ -274,58 +274,58 @@ namespace DocFileFormat
/*========================================================================================================*/
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, const wchar_t* attributeValue )
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement* node, const std::wstring & attributeName, const std::wstring & attributeValue )
{
XMLTools::XMLAttribute<wchar_t> att( attributeName, attributeValue );
XMLTools::XMLAttribute att( attributeName, attributeValue );
node->AppendAttribute( att );
}
/*========================================================================================================*/
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, int attributeValue )
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement* node, const std::wstring & attributeName, int attributeValue )
{
XMLTools::XMLAttribute<wchar_t> att( attributeName, FormatUtils::IntToWideString( attributeValue ).c_str());
XMLTools::XMLAttribute att( attributeName, FormatUtils::IntToWideString( attributeValue ));
node->AppendAttribute( att );
}
/*========================================================================================================*/
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, short attributeValue )
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement* node, const std::wstring & attributeName, short attributeValue )
{
XMLTools::XMLAttribute<wchar_t> att( attributeName, FormatUtils::IntToWideString( attributeValue ).c_str());
XMLTools::XMLAttribute att( attributeName, FormatUtils::IntToWideString( attributeValue ));
node->AppendAttribute( att );
}
/*========================================================================================================*/
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, unsigned short attributeValue )
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement* node, const std::wstring & attributeName, unsigned short attributeValue )
{
XMLTools::XMLAttribute<wchar_t> att( attributeName, FormatUtils::IntToWideString( attributeValue ).c_str());
XMLTools::XMLAttribute att( attributeName, FormatUtils::IntToWideString( attributeValue ));
node->AppendAttribute( att );
}
/*========================================================================================================*/
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, unsigned char attributeValue )
void PropertiesMapping::appendValueAttribute( XMLTools::XMLElement* node, const std::wstring & attributeName, unsigned char attributeValue )
{
XMLTools::XMLAttribute<wchar_t> att( attributeName, FormatUtils::IntToWideString( attributeValue ).c_str());
XMLTools::XMLAttribute att( attributeName, FormatUtils::IntToWideString( attributeValue ));
node->AppendAttribute( att );
}
/*========================================================================================================*/
void PropertiesMapping::appendValueElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, const wchar_t* elementValue, bool unique )
void PropertiesMapping::appendValueElement( XMLTools::XMLElement* node, const std::wstring & elementName, const std::wstring & elementValue, bool unique )
{
XMLTools::XMLElement<wchar_t>* ele = new XMLTools::XMLElement<wchar_t>( L"w" , elementName );
XMLTools::XMLElement* ele = new XMLTools::XMLElement( L"w" , elementName );
if( ( elementValue != NULL ) && ( wcscmp( elementValue, L"" ) != 0 ))
if(!elementValue.empty())
{
XMLTools::XMLAttribute<wchar_t>* val = new XMLTools::XMLAttribute<wchar_t>( L"w:val" );
XMLTools::XMLAttribute* val = new XMLTools::XMLAttribute( L"w:val" );
val->SetValue( elementValue );
@ -347,15 +347,15 @@ namespace DocFileFormat
/*========================================================================================================*/
void PropertiesMapping::appendValueElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, short elementValue, bool unique )
void PropertiesMapping::appendValueElement( XMLTools::XMLElement* node, const std::wstring & elementName, short elementValue, bool unique )
{
XMLTools::XMLElement<wchar_t>* ele = new XMLTools::XMLElement<wchar_t>( L"w" , elementName );
XMLTools::XMLElement* ele = new XMLTools::XMLElement( L"w" , elementName );
std::wstring strValue = FormatUtils::IntToWideString( elementValue );
if ( strValue != std::wstring( L""))
{
XMLTools::XMLAttribute<wchar_t>* val = new XMLTools::XMLAttribute<wchar_t>( L"w:val", strValue.c_str());
XMLTools::XMLAttribute* val = new XMLTools::XMLAttribute( L"w:val", strValue);
ele->AppendAttribute( *val );
RELEASEOBJECT( val );
}
@ -373,15 +373,15 @@ namespace DocFileFormat
/*========================================================================================================*/
void PropertiesMapping::appendValueElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, unsigned short elementValue, bool unique )
void PropertiesMapping::appendValueElement( XMLTools::XMLElement* node, const std::wstring & elementName, unsigned short elementValue, bool unique )
{
XMLTools::XMLElement<wchar_t>* ele = new XMLTools::XMLElement<wchar_t>( L"w" , elementName );
XMLTools::XMLElement* ele = new XMLTools::XMLElement( L"w" , elementName );
std::wstring strValue = FormatUtils::IntToWideString( elementValue );
if ( strValue != std::wstring( L"" ))
{
XMLTools::XMLAttribute<wchar_t>* val = new XMLTools::XMLAttribute<wchar_t>( L"w:val", strValue.c_str());
XMLTools::XMLAttribute* val = new XMLTools::XMLAttribute( L"w:val", strValue);
ele->AppendAttribute( *val );
RELEASEOBJECT( val );
}
@ -399,15 +399,15 @@ namespace DocFileFormat
/*========================================================================================================*/
void PropertiesMapping::appendValueElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, unsigned char elementValue, bool unique )
void PropertiesMapping::appendValueElement( XMLTools::XMLElement* node, const std::wstring & elementName, unsigned char elementValue, bool unique )
{
XMLTools::XMLElement<wchar_t>* ele = new XMLTools::XMLElement<wchar_t>( L"w", elementName );
XMLTools::XMLElement* ele = new XMLTools::XMLElement( L"w", elementName );
std::wstring strValue = FormatUtils::IntToWideString( elementValue );
if ( strValue != std::wstring( L"" ))
{
XMLTools::XMLAttribute<wchar_t>* val = new XMLTools::XMLAttribute<wchar_t>( L"w:val", strValue.c_str());
XMLTools::XMLAttribute* val = new XMLTools::XMLAttribute( L"w:val", strValue);
ele->AppendAttribute( *val );
RELEASEOBJECT( val );
}
@ -425,9 +425,9 @@ namespace DocFileFormat
/*========================================================================================================*/
void PropertiesMapping::appendBorderAttributes( BorderCode* brc, XMLTools::XMLElement<wchar_t>* border )
void PropertiesMapping::appendBorderAttributes( BorderCode* brc, XMLTools::XMLElement* border )
{
XMLTools::XMLAttribute<wchar_t> val( L"w:val" );
XMLTools::XMLAttribute val( L"w:val" );
if ( brc->fNil )
{
@ -436,22 +436,22 @@ namespace DocFileFormat
}
else
{
val.SetValue( getBorderType( brc->brcType ).c_str());
val.SetValue( getBorderType( brc->brcType ));
border->AppendAttribute( val );
XMLTools::XMLAttribute<wchar_t> color( L"w:color" );
color.SetValue( RGBColor( brc->cv, RedFirst ).SixDigitHexCode.c_str());
XMLTools::XMLAttribute color( L"w:color" );
color.SetValue( RGBColor( brc->cv, RedFirst ).SixDigitHexCode);
border->AppendAttribute( color );
XMLTools::XMLAttribute<wchar_t> space( L"w:space" , FormatUtils::IntToWideString( brc->dptSpace ).c_str());
XMLTools::XMLAttribute space( L"w:space" , FormatUtils::IntToWideString( brc->dptSpace ));
border->AppendAttribute( space );
XMLTools::XMLAttribute<wchar_t> sz( L"w:sz", FormatUtils::IntToWideString( brc->dptLineWidth ).c_str());
XMLTools::XMLAttribute sz( L"w:sz", FormatUtils::IntToWideString( brc->dptLineWidth ));
border->AppendAttribute( sz );
if ( brc->fShadow )
{
XMLTools::XMLAttribute<wchar_t> shadow( L"w:shadow" );
XMLTools::XMLAttribute shadow( L"w:shadow" );
shadow.SetValue( L"1" );
border->AppendAttribute( shadow );
}
@ -460,14 +460,14 @@ namespace DocFileFormat
/*========================================================================================================*/
void PropertiesMapping::appendShading( XMLTools::XMLElement<wchar_t>* parent, const ShadingDescriptor& desc )
void PropertiesMapping::appendShading( XMLTools::XMLElement* parent, const ShadingDescriptor& desc )
{
if ( ( parent != NULL ) && ( desc.shadingSpecialValue == shadingSpecialValueNormal ))
{
XMLTools::XMLElement<wchar_t> shd( L"w:shd" );
XMLTools::XMLElement shd( L"w:shd" );
//fill color
XMLTools::XMLAttribute<wchar_t> fill( L"w:fill" );
XMLTools::XMLAttribute fill( L"w:fill" );
if ( desc.shadingType == shadingTypeShd )
{
@ -477,18 +477,18 @@ namespace DocFileFormat
}
else
{
fill.SetValue( RGBColor( (int)desc.cvBack, RedLast ).SixDigitHexCode.c_str());
fill.SetValue( RGBColor( (int)desc.cvBack, RedLast ).SixDigitHexCode);
}
}
else
{
fill.SetValue( FormatUtils::MapValueToWideString( desc.icoBack, &Global::ColorIdentifier[0][0], 17, 12 ).c_str());
fill.SetValue( FormatUtils::MapValueToWideString( desc.icoBack, &Global::ColorIdentifier[0][0], 17, 12 ));
}
shd.AppendAttribute( fill );
//foreground color
XMLTools::XMLAttribute<wchar_t> color( L"w:color" );
XMLTools::XMLAttribute color( L"w:color" );
if ( desc.shadingType == shadingTypeShd )
{
@ -498,19 +498,19 @@ namespace DocFileFormat
}
else
{
color.SetValue( RGBColor( (int)desc.cvFore, RedLast ).SixDigitHexCode.c_str());
color.SetValue( RGBColor( (int)desc.cvFore, RedLast ).SixDigitHexCode);
}
}
else
{
color.SetValue( FormatUtils::MapValueToWideString( desc.icoFore, &Global::ColorIdentifier[0][0], 17, 12 ).c_str());
color.SetValue( FormatUtils::MapValueToWideString( desc.icoFore, &Global::ColorIdentifier[0][0], 17, 12 ));
}
shd.AppendAttribute( color );
//pattern
XMLTools::XMLAttribute<wchar_t> val( L"w:val" );
val.SetValue( getShadingPattern( desc ).c_str());
XMLTools::XMLAttribute val( L"w:val" );
val.SetValue( getShadingPattern( desc ));
shd.AppendAttribute( val );
parent->RemoveChildByName( L"w:shd" );
@ -759,12 +759,12 @@ namespace DocFileFormat
/*========================================================================================================*/
void PropertiesMapping::appendDxaElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, const wchar_t* elementValue, bool unique )
void PropertiesMapping::appendDxaElement( XMLTools::XMLElement* node, const std::wstring & elementName, const std::wstring & elementValue, bool unique )
{
XMLTools::XMLElement<wchar_t> ele( L"w", elementName );
XMLTools::XMLAttribute<wchar_t> val( L"w:w", elementValue );
XMLTools::XMLElement ele( L"w", elementName );
XMLTools::XMLAttribute val( L"w:w", elementValue );
ele.AppendAttribute( val );
XMLTools::XMLAttribute<wchar_t> type( L"w:type", L"dxa" );
XMLTools::XMLAttribute type( L"w:type", L"dxa" );
ele.AppendAttribute( type );
if ( unique )
@ -777,7 +777,7 @@ namespace DocFileFormat
/*========================================================================================================*/
void PropertiesMapping::addOrSetBorder( XMLTools::XMLElement<wchar_t>* pBdr, const XMLTools::XMLElement<wchar_t>* border )
void PropertiesMapping::addOrSetBorder( XMLTools::XMLElement* pBdr, const XMLTools::XMLElement* border )
{
if ( ( pBdr != NULL ) && ( border != NULL ))
{

View File

@ -51,24 +51,26 @@ namespace DocFileFormat
protected:
static void init();
void appendFlagAttribute( XMLTools::XMLElement<wchar_t>* node, const SinglePropertyModifier& sprm, const wchar_t* attributeName );
virtual void appendFlagElement( XMLTools::XMLElement<wchar_t>* node, const SinglePropertyModifier& sprm, const wchar_t* elementName, bool unique );
void appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, const wchar_t* attributeValue );
void appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, int attributeValue );
void appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, short attributeValue );
void appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, unsigned short attributeValue );
void appendValueAttribute( XMLTools::XMLElement<wchar_t>* node, const wchar_t* attributeName, unsigned char attributeValue );
void appendValueElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, const wchar_t* elementValue, bool unique );
void appendValueElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, short elementValue, bool unique );
void appendValueElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, unsigned short elementValue, bool unique );
void appendValueElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, unsigned char elementValue, bool unique );
void appendBorderAttributes( BorderCode* brc, XMLTools::XMLElement<wchar_t>* border );
void appendShading( XMLTools::XMLElement<wchar_t>* parent, const ShadingDescriptor& desc );
std::wstring getBorderType( unsigned char type );
std::wstring getShadingPattern( const ShadingDescriptor& shd );
void appendDxaElement( XMLTools::XMLElement<wchar_t>* node, const wchar_t* elementName, const wchar_t* elementValue, bool unique );
void addOrSetBorder( XMLTools::XMLElement<wchar_t>* pBdr, const XMLTools::XMLElement<wchar_t>* border );
virtual void appendFlagElement( XMLTools::XMLElement* node, const SinglePropertyModifier& sprm, const std::wstring & elementName, bool unique );
void appendFlagAttribute ( XMLTools::XMLElement* node, const SinglePropertyModifier& sprm, const std::wstring & attributeName );
void appendValueAttribute ( XMLTools::XMLElement* node, const std::wstring & attributeName, const std::wstring & attributeValue );
void appendValueAttribute ( XMLTools::XMLElement* node, const std::wstring & attributeName, int attributeValue );
void appendValueAttribute ( XMLTools::XMLElement* node, const std::wstring & ttributeName, short attributeValue );
void appendValueAttribute ( XMLTools::XMLElement* node, const std::wstring & attributeName, unsigned short attributeValue );
void appendValueAttribute ( XMLTools::XMLElement* node, const std::wstring & attributeName, unsigned char attributeValue );
void appendValueElement ( XMLTools::XMLElement* node, const std::wstring & elementName, const std::wstring & elementValue, bool unique );
void appendValueElement ( XMLTools::XMLElement* node, const std::wstring & elementName, short elementValue, bool unique );
void appendValueElement ( XMLTools::XMLElement* node, const std::wstring & elementName, unsigned short elementValue, bool unique );
void appendValueElement ( XMLTools::XMLElement* node, const std::wstring & elementName, unsigned char elementValue, bool unique );
void appendShading ( XMLTools::XMLElement* parent, const ShadingDescriptor& desc );
void appendDxaElement ( XMLTools::XMLElement* node, const std::wstring & elementName, const std::wstring & elementValue, bool unique );
void addOrSetBorder ( XMLTools::XMLElement* pBdr, const XMLTools::XMLElement* border );
void appendBorderAttributes ( BorderCode* brc, XMLTools::XMLElement* border );
std::wstring getBorderType ( unsigned char type );
std::wstring getShadingPattern ( const ShadingDescriptor& shd );
protected:
XMLTools::CStringXmlWriter* m_pXmlWriter;

View File

@ -59,28 +59,15 @@ namespace DocFileFormat
{
unsigned char* bytes = FormatUtils::GetBytes( cv );
// wchar_t rgbColor6[7];
// wchar_t rgbColor8[9];
//CString rgbColor6;
//CString rgbColor8;
std::wstringstream rgbColor6, rgbColor8;
if( order == RedFirst )
{
//R
this->Red = bytes[0];
//G
this->Green = bytes[1];
//B
this->Green = bytes[1];
this->Blue = bytes[2];
//Alpha
this->Alpha = bytes[3];
this->Alpha = bytes[3];
//rgbColor6.Format( _T( "%02x%02x%02x" ), /*R*/this->Red, /*G*/this->Green, /*B*/this->Blue );
//rgbColor8.Format( _T( "%02x%02x%02x%02x" ), /*R*/this->Red, /*G*/this->Green, /*B*/this->Blue, /*A*/this->Alpha );
//SixDigitHexCode = string2std_string( rgbColor6 );
//EightDigitHexCode = string2std_string( rgbColor8 );
rgbColor6 << boost::wformat( L"%02x%02x%02x" ) % /*R*/this->Red % /*G*/this->Green % /*B*/this->Blue;
rgbColor8 << boost::wformat( L"%02x%02x%02x%02x" ) % /*R*/this->Red % /*G*/this->Green % /*B*/this->Blue % /*A*/this->Alpha;
@ -89,20 +76,11 @@ namespace DocFileFormat
}
else if ( order == RedLast )
{
//R
this->Red = bytes[2];
//G
this->Green = bytes[1];
//B
this->Blue = bytes[0];
//Alpha
this->Alpha = bytes[3];
this->Alpha = bytes[3];
//rgbColor6.Format( _T( "%02x%02x%02x" ), /*R*/this->Red, /*G*/this->Green, /*B*/this->Blue );
//rgbColor8.Format( _T( "%02x%02x%02x%02x" ), /*R*/this->Red, /*G*/this->Green, /*B*/this->Blue, /*A*/this->Alpha );
//SixDigitHexCode = string2std_string( rgbColor6 );
//EightDigitHexCode = string2std_string( rgbColor8 );
rgbColor6 << boost::wformat( L"%02x%02x%02x" ) % /*R*/this->Red % /*G*/this->Green % /*B*/this->Blue;
rgbColor8 << boost::wformat( L"%02x%02x%02x%02x" ) % /*R*/this->Red % /*G*/this->Green % /*B*/this->Blue % /*A*/this->Alpha;

View File

@ -38,7 +38,7 @@ namespace DocFileFormat
SectionPropertiesMapping::SectionPropertiesMapping (XMLTools::CStringXmlWriter* pWriter, ConversionContext* pContext, int nSelectProperties) : PropertiesMapping (pWriter)
{
m_bDeleteNode = TRUE;
m_pXmlNode = new XMLTools::XMLElement<wchar_t> (_T("w:sectPr"));
m_pXmlNode = new XMLTools::XMLElement (_T("w:sectPr"));
m_nColumns = 0;
m_arrWidth = NULL;
@ -53,7 +53,7 @@ namespace DocFileFormat
_type = std::wstring (_T("nextPage"));
}
SectionPropertiesMapping::SectionPropertiesMapping (XMLTools::XMLElement<wchar_t>* pBaseNode, ConversionContext* pContext, int nSelectProperties) : PropertiesMapping(NULL)
SectionPropertiesMapping::SectionPropertiesMapping (XMLTools::XMLElement* pBaseNode, ConversionContext* pContext, int nSelectProperties) : PropertiesMapping(NULL)
{
m_bDeleteNode = FALSE;
m_pXmlNode = pBaseNode;
@ -87,16 +87,16 @@ namespace DocFileFormat
{
SectionPropertyExceptions* sepx = static_cast<SectionPropertyExceptions*>(visited);
XMLTools::XMLElement<wchar_t> pgSz (_T("w:pgSz"));
XMLTools::XMLElement<wchar_t> pgMar (_T("w:pgMar"));
XMLTools::XMLElement<wchar_t> lnNumType (_T("w:lnNumType"));
XMLTools::XMLElement<wchar_t> cols (_T("w:cols"));
XMLTools::XMLElement<wchar_t> docGrid (_T("w:docGrid"));
XMLTools::XMLElement<wchar_t> pgBorders (_T("w:pgBorders"));
XMLTools::XMLElement<wchar_t> paperSrc (_T("w:paperSrc"));
XMLTools::XMLElement<wchar_t> footnotePr(_T("w:footnotePr"));
XMLTools::XMLElement<wchar_t> endnotePr (_T("w:endnotePr"));
XMLTools::XMLElement<wchar_t> pgNumType (_T("w:pgNumType"));
XMLTools::XMLElement pgSz (_T("w:pgSz"));
XMLTools::XMLElement pgMar (_T("w:pgMar"));
XMLTools::XMLElement lnNumType (_T("w:lnNumType"));
XMLTools::XMLElement cols (_T("w:cols"));
XMLTools::XMLElement docGrid (_T("w:docGrid"));
XMLTools::XMLElement pgBorders (_T("w:pgBorders"));
XMLTools::XMLElement paperSrc (_T("w:paperSrc"));
XMLTools::XMLElement footnotePr(_T("w:footnotePr"));
XMLTools::XMLElement endnotePr (_T("w:endnotePr"));
XMLTools::XMLElement pgNumType (_T("w:pgNumType"));
HeaderAndFooterTable* pTable = _ctx->_doc->headerAndFooterTable;
@ -157,7 +157,7 @@ namespace DocFileFormat
case sprmSDxaLeft:
{
_marLeft = FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize );
appendValueAttribute( &pgMar, _T( "w:left" ), FormatUtils::IntToWideString( _marLeft ).c_str() );
appendValueAttribute( &pgMar, _T( "w:left" ), FormatUtils::IntToWideString( _marLeft ) );
}
break;
@ -165,38 +165,38 @@ namespace DocFileFormat
case sprmSDxaRight:
{
_marRight = FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize );
appendValueAttribute( &pgMar, _T( "w:right" ), FormatUtils::IntToWideString( _marRight ).c_str() );
appendValueAttribute( &pgMar, _T( "w:right" ), FormatUtils::IntToWideString( _marRight ) );
}
break;
case sprmOldSDyaTop:
case sprmSDyaTop:
//top margin
appendValueAttribute( &pgMar, _T( "w:top" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &pgMar, _T( "w:top" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
case sprmOldSDyaBottom:
case sprmSDyaBottom:
//bottom margin
appendValueAttribute( &pgMar, _T( "w:bottom" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &pgMar, _T( "w:bottom" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
case sprmOldSDzaGutter:
case sprmSDzaGutter:
//gutter margin
appendValueAttribute( &pgMar, _T( "w:gutter" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &pgMar, _T( "w:gutter" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
case sprmOldSDyaHdrTop:
case sprmSDyaHdrTop:
//header margin
appendValueAttribute( &pgMar, _T( "w:header"), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &pgMar, _T( "w:header"), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
case sprmOldSDyaHdrBottom:
case sprmSDyaHdrBottom:
//footer margin
appendValueAttribute( &pgMar, _T( "w:footer" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &pgMar, _T( "w:footer" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
//page size and orientation
@ -204,30 +204,30 @@ namespace DocFileFormat
case sprmSXaPage:
{
_pgWidth = FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize );
appendValueAttribute( &pgSz, _T( "w:w" ), FormatUtils::IntToWideString( _pgWidth ).c_str() );
appendValueAttribute( &pgSz, _T( "w:w" ), FormatUtils::IntToWideString( _pgWidth ) );
}
break;
case sprmOldSYaPage:
case sprmSYaPage:
appendValueAttribute( &pgSz, _T( "w:h" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &pgSz, _T( "w:h" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
case sprmOldSBOrientation:
case sprmSBOrientation:
//orientation
appendValueAttribute( &pgSz, _T( "w:orient" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &PageOrientationMap[0][0], 3, 10 ).c_str() );
appendValueAttribute( &pgSz, _T( "w:orient" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &PageOrientationMap[0][0], 3, 10 ) );
break;
//paper source
case sprmOldSDmBinFirst:
case sprmSDmBinFirst:
appendValueAttribute( &paperSrc, _T( "w:first" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &paperSrc, _T( "w:first" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
case sprmOldSDmBinOther:
case sprmSDmBinOther:
appendValueAttribute( &paperSrc, _T( "w:other" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &paperSrc, _T( "w:other" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
//page borders
@ -235,7 +235,7 @@ namespace DocFileFormat
case sprmSBrcTop:
{
//top
XMLTools::XMLElement<wchar_t> topBorder( _T( "w:top" ) );
XMLTools::XMLElement topBorder( _T( "w:top" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
appendBorderAttributes( &bc, &topBorder );
addOrSetBorder( &pgBorders, &topBorder);
@ -245,7 +245,7 @@ namespace DocFileFormat
case sprmSBrcLeft80:
case sprmSBrcLeft:
{
XMLTools::XMLElement<wchar_t> leftBorder( _T( "w:left" ) );
XMLTools::XMLElement leftBorder( _T( "w:left" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
appendBorderAttributes( &bc, &leftBorder);
addOrSetBorder( &pgBorders, &leftBorder);
@ -256,7 +256,7 @@ namespace DocFileFormat
case sprmSBrcBottom:
{
//left
XMLTools::XMLElement<wchar_t> bottomBorder( _T( "w:bottom" ) );
XMLTools::XMLElement bottomBorder( _T( "w:bottom" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
appendBorderAttributes( &bc, &bottomBorder );
addOrSetBorder( &pgBorders, &bottomBorder);
@ -267,7 +267,7 @@ namespace DocFileFormat
case sprmSBrcRight:
{
//left
XMLTools::XMLElement<wchar_t> rightBorder( _T( "w:right" ) );
XMLTools::XMLElement rightBorder( _T( "w:right" ) );
BorderCode bc( iter->Arguments, iter->argumentsSize );
appendBorderAttributes( &bc, &rightBorder);
addOrSetBorder( &pgBorders, &rightBorder);
@ -276,12 +276,12 @@ namespace DocFileFormat
case sprmSRncFtn:
//restart code
appendValueElement( &footnotePr, _T( "numRestart" ), FormatUtils::MapValueToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ), &FootnoteRestartCodeMap[0][0], 3, 11 ).c_str(), true );
appendValueElement( &footnotePr, _T( "numRestart" ), FormatUtils::MapValueToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ), &FootnoteRestartCodeMap[0][0], 3, 11 ), true );
break;
case sprmSRncEdn:
//restart code
appendValueElement( &endnotePr, _T( "numRestart" ), FormatUtils::MapValueToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ), &EndnoteRestartCodeMap[0][0], 3, 11 ).c_str(), true );
appendValueElement( &endnotePr, _T( "numRestart" ), FormatUtils::MapValueToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ), &EndnoteRestartCodeMap[0][0], 3, 11 ), true );
break;
case sprmSFpc:
@ -305,31 +305,31 @@ namespace DocFileFormat
}break;
case sprmSNfcFtnRef:
appendValueElement( &footnotePr, _T( "numFmt" ), NumberingMapping::GetNumberFormatWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str(), true );
appendValueElement( &footnotePr, _T( "numFmt" ), NumberingMapping::GetNumberFormatWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
break;
case sprmSNfcEdnRef:
appendValueElement( &endnotePr, _T( "numFmt" ), NumberingMapping::GetNumberFormatWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str(), true );
appendValueElement( &endnotePr, _T( "numFmt" ), NumberingMapping::GetNumberFormatWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
break;
case sprmSNFtn:
appendValueElement( &footnotePr, _T( "numStart" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str(), true );
appendValueElement( &footnotePr, _T( "numStart" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
break;
case sprmSNEdn:
appendValueElement( &endnotePr, _T( "numStart" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str(), true );
appendValueElement( &endnotePr, _T( "numStart" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
break;
case sprmSDyaLinePitch:
appendValueAttribute( &docGrid, _T( "w:linePitch" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &docGrid, _T( "w:linePitch" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
case sprmSDxtCharSpace:
appendValueAttribute( &docGrid, _T( "w:charSpace" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt32( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute( &docGrid, _T( "w:charSpace" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt32( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
case sprmSClm:
appendValueAttribute( &docGrid, _T( "w:type" ), FormatUtils::MapValueToWideString( FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize ), &DocGridTypeMap[0][0], 4, 14 ).c_str() );
appendValueAttribute( &docGrid, _T( "w:type" ), FormatUtils::MapValueToWideString( FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize ), &DocGridTypeMap[0][0], 4, 14 ) );
break;
case sprmOldSCcolumns:
@ -340,14 +340,14 @@ namespace DocFileFormat
RELEASEARRAYOBJECTS (m_arrSpace);
m_arrSpace = new short [m_nColumns];
appendValueAttribute (&cols, _T( "w:num" ), FormatUtils::IntToWideString (m_nColumns).c_str());
appendValueAttribute (&cols, _T( "w:num" ), FormatUtils::IntToWideString (m_nColumns));
}
break;
case sprmOldSDxaColumns:
case sprmSDxaColumns:
//evenly spaced columns
appendValueAttribute (&cols, _T( "w:space" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ).c_str() );
appendValueAttribute (&cols, _T( "w:space" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
break;
case sprmOldSDxaColWidth:
@ -403,12 +403,12 @@ namespace DocFileFormat
case sprmOldSVjc:
case sprmSVjc:
appendValueElement (m_pXmlNode, _T( "vAlign" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &TextVerticalAlignment[0][0], 4, 7 ).c_str(), true );
appendValueElement (m_pXmlNode, _T( "vAlign" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &TextVerticalAlignment[0][0], 4, 7 ), true );
break;
case sprmOldSNfcPgn:
case sprmSNfcPgn:
appendValueAttribute( &pgNumType, _T( "w:fmt" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &PageNumberFormatCodeMap[0][0], 42, 29 ).c_str() );
appendValueAttribute( &pgNumType, _T( "w:fmt" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &PageNumberFormatCodeMap[0][0], 42, 29 ) );
break;
case sprmOldSPgnStart:
@ -439,7 +439,7 @@ namespace DocFileFormat
SLncOperand mode = (SLncOperand)FormatUtils::BytesToUChar (iter->Arguments, 0, iter->argumentsSize);
mode = (SLncOperand)(std::min)((std::max)(mode,lncPerPage),lncContinue);
appendValueAttribute (&lnNumType, _T("w:restart"), LineNumberRestart[mode].c_str() );
appendValueAttribute (&lnNumType, _T("w:restart"), LineNumberRestart[mode] );
}
break;
@ -461,12 +461,12 @@ namespace DocFileFormat
}
if (bWasSprmSFPgnRestart && false == wsSprmSPgnStart.empty() )
appendValueAttribute( &pgNumType, _T( "w:start" ), wsSprmSPgnStart.c_str() );
appendValueAttribute( &pgNumType, _T( "w:start" ), wsSprmSPgnStart );
// build the columns
if (m_arrWidth)
{
XMLTools::XMLAttribute<wchar_t> equalWidth( _T( "w:equalWidth" ), _T( "0" ) );
XMLTools::XMLAttribute equalWidth( _T( "w:equalWidth" ), _T( "0" ) );
cols.AppendAttribute( equalWidth );
//calculate the width of the last column:
@ -486,9 +486,9 @@ namespace DocFileFormat
for (int i = 0; i < m_nColumns; ++i)
{
XMLTools::XMLElement<wchar_t> col (_T( "w:col" ));
XMLTools::XMLAttribute<wchar_t> w (_T( "w:w" ), FormatUtils::IntToWideString (m_arrWidth[i]).c_str());
XMLTools::XMLAttribute<wchar_t> space (_T( "w:space" ), FormatUtils::IntToWideString (m_arrSpace[i]).c_str());
XMLTools::XMLElement col (_T( "w:col" ));
XMLTools::XMLAttribute w (_T( "w:w" ), FormatUtils::IntToWideString (m_arrWidth[i]));
XMLTools::XMLAttribute space (_T( "w:space" ), FormatUtils::IntToWideString (m_arrSpace[i]));
col.AppendAttribute (w);
col.AppendAttribute (space);
@ -496,7 +496,7 @@ namespace DocFileFormat
}
}
appendValueElement (m_pXmlNode, _T( "type" ), _type.c_str(), true );
appendValueElement (m_pXmlNode, _T( "type" ), _type, true );
if (footnotePr.GetChildCount())
m_pXmlNode->AppendChild (footnotePr);
@ -529,12 +529,12 @@ namespace DocFileFormat
m_pXmlNode->AppendChild (pgNumType);
if (m_pXmlWriter)
m_pXmlWriter->WriteString (m_pXmlNode->GetXMLString().c_str() );
m_pXmlWriter->WriteString (m_pXmlNode->GetXMLString() );
}
void SectionPropertiesMapping::AppendRef (XMLTools::XMLElement<wchar_t> *parent, const wchar_t* element, const wchar_t* refType, const wchar_t* refId)
void SectionPropertiesMapping::AppendRef (XMLTools::XMLElement *parent, const std::wstring& element, const std::wstring& refType, const std::wstring& refId)
{
XMLTools::XMLElement<wchar_t> headerRef (_T("w"), element);
XMLTools::XMLElement headerRef (_T("w"), element);
headerRef.AppendAttribute (_T("w:type"), refType);
headerRef.AppendAttribute (_T("r:id"), refId);
@ -576,7 +576,7 @@ namespace DocFileFormat
}
}
AppendRef (m_pXmlNode, StoryType.c_str(), Story.c_str(), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString(nRelID) ).c_str() );
AppendRef (m_pXmlNode, StoryType, Story, ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString(nRelID) ) );
return TRUE;
}

View File

@ -158,7 +158,7 @@ namespace DocFileFormat
// Creates a new SectionPropertiesMapping which writes the properties to the given writer
SectionPropertiesMapping (XMLTools::CStringXmlWriter* writer, ConversionContext* ctx, int nSelectProperties);
// Creates a new SectionPropertiesMapping which appends the properties to a given node.
SectionPropertiesMapping (XMLTools::XMLElement<wchar_t>* sectPr, ConversionContext* ctx, int nSelectProperties);
SectionPropertiesMapping (XMLTools::XMLElement* sectPr, ConversionContext* ctx, int nSelectProperties);
virtual ~SectionPropertiesMapping();
// Converts the given SectionPropertyExceptions
@ -167,11 +167,11 @@ namespace DocFileFormat
const std::wstring & get_section_type();
private:
void AppendRef (XMLTools::XMLElement<wchar_t>* pBaseNode, const wchar_t* element, const wchar_t* refType, const wchar_t* refId);
void AppendRef (XMLTools::XMLElement* pBaseNode, const std::wstring& element, const std::wstring& refType, const std::wstring& refId);
bool WriteSectionStory (CharacterRange* pRange, const std::wstring& StoryType, const std::wstring& Story);
XMLTools::XMLElement<wchar_t>* m_pXmlNode;
XMLTools::XMLElement* m_pXmlNode;
bool m_bDeleteNode;
int m_nColumns;

View File

@ -56,11 +56,11 @@ namespace DocFileFormat
//zoom
m_oXmlWriter.WriteNodeBegin ( L"w:zoom", TRUE );
m_oXmlWriter.WriteAttribute ( L"w:percent", FormatUtils::IntToWideString( dop->wScaleSaved ).c_str() );
m_oXmlWriter.WriteAttribute ( L"w:percent", FormatUtils::IntToWideString( dop->wScaleSaved ) );
if ( dop->zkSaved != 0 )
{
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::MapValueToWideString( dop->zkSaved, &ZoomTypeMap[0][0], 3, 9 ).c_str() );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::MapValueToWideString( dop->zkSaved, &ZoomTypeMap[0][0], 3, 9 ) );
}
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
@ -95,7 +95,7 @@ namespace DocFileFormat
}
//proof state
XMLTools::XMLElement<wchar_t> proofState( L"w:proofState" );
XMLTools::XMLElement proofState( L"w:proofState" );
if ( dop->fGramAllClean )
{
@ -104,31 +104,31 @@ namespace DocFileFormat
if ( proofState.GetAttributeCount() > 0 )
{
m_oXmlWriter.WriteString( proofState.GetXMLString().c_str() );
m_oXmlWriter.WriteString( proofState.GetXMLString() );
}
//stylePaneFormatFilter
if ( dop->grfFmtFilter != 0 )
{
m_oXmlWriter.WriteNodeBegin( L"w:stylePaneFormatFilter", TRUE );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( dop->grfFmtFilter, L"%04x" ).c_str() );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( dop->grfFmtFilter, L"%04x" ) );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
//default tab stop
m_oXmlWriter.WriteNodeBegin( L"w:defaultTabStop", TRUE );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dxaTab ).c_str() );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dxaTab ) );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
//drawing grid
if( dop->dogrid != NULL )
{
m_oXmlWriter.WriteNodeBegin( L"w:displayHorizontalDrawingGridEvery", TRUE );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dogrid->dxGridDisplay ).c_str() );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dogrid->dxGridDisplay ) );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:displayVerticalDrawingGridEvery", TRUE );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dogrid->dyGridDisplay ).c_str() );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dogrid->dyGridDisplay ) );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
if ( dop->dogrid->fFollowMargins == false )
@ -149,26 +149,26 @@ namespace DocFileFormat
}
//footnote properties
XMLTools::XMLElement<wchar_t> footnotePr( L"w:footnotePr" );
XMLTools::XMLElement footnotePr( L"w:footnotePr" );
if ( dop->nFtn != 0 )
{
appendValueAttribute( &footnotePr, L"w:numStart", FormatUtils::IntToWideString( dop->nFtn ).c_str() );
appendValueAttribute( &footnotePr, L"w:numStart", FormatUtils::IntToWideString( dop->nFtn ) );
}
if ( dop->rncFtn != 0 )
{
appendValueAttribute( &footnotePr, L"w:numRestart", FormatUtils::IntToWideString( dop->rncFtn ).c_str() );
appendValueAttribute( &footnotePr, L"w:numRestart", FormatUtils::IntToWideString( dop->rncFtn ) );
}
if ( dop->Fpc != 0 )
{
appendValueAttribute( &footnotePr, L"w:pos", FormatUtils::MapValueToWideString( dop->Fpc, &FootnotePositionMap[0][0], 4, 12 ).c_str() );
appendValueAttribute( &footnotePr, L"w:pos", FormatUtils::MapValueToWideString( dop->Fpc, &FootnotePositionMap[0][0], 4, 12 ) );
}
if ( footnotePr.GetAttributeCount() > 0 )
{
m_oXmlWriter.WriteString( footnotePr.GetXMLString().c_str() );
m_oXmlWriter.WriteString( footnotePr.GetXMLString() );
}
@ -549,4 +549,4 @@ namespace DocFileFormat
m_oXmlWriter.WriteNodeEnd( L"w:compat" );
}
}
}

View File

@ -86,7 +86,7 @@ namespace DocFileFormat
{
m_pXmlWriter->WriteNodeBegin( _T( "w:style" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:type" ), FormatUtils::MapValueToWideString( (*iter)->stk, &StyleKindMap[0][0], 5, 10 ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:type" ), FormatUtils::MapValueToWideString( (*iter)->stk, &StyleKindMap[0][0], 5, 10 ));
//!!!TODO: There is NO default styles in DOC file. So, we can't choose one of them!!!
/*if ( ( (*iter)->sti != Null ) && ( (*iter)->sti != User ) )
@ -95,19 +95,19 @@ namespace DocFileFormat
m_pXmlWriter->WriteAttribute( _T( "w:default" ), _T( "1" ) );
}*/
m_pXmlWriter->WriteAttribute( _T( "w:styleId" ), FormatUtils::XmlEncode(MakeStyleId( *iter )).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:styleId" ), FormatUtils::XmlEncode(MakeStyleId( *iter )));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
// <w:name val="" />
m_pXmlWriter->WriteNodeBegin( _T( "w:name" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(getStyleName( *iter ), true ).c_str());
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(getStyleName( *iter ), true ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
// <w:basedOn val="" />
if ( ( (*iter)->istdBase != 4095 ) && ( (*iter)->istdBase < sheet->Styles->size() ) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:basedOn" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(MakeStyleId( sheet->Styles->at( (*iter)->istdBase ) )).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(MakeStyleId( sheet->Styles->at( (*iter)->istdBase ) )));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
}
@ -115,7 +115,7 @@ namespace DocFileFormat
if ( (*iter)->istdNext < sheet->Styles->size() )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:next" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(MakeStyleId( sheet->Styles->at( (*iter)->istdNext ) )).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(MakeStyleId( sheet->Styles->at( (*iter)->istdNext ) )));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
}
@ -123,7 +123,7 @@ namespace DocFileFormat
if ( (*iter)->istdLink < sheet->Styles->size() )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:link" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(MakeStyleId( sheet->Styles->at( (*iter)->istdLink ) )).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(MakeStyleId( sheet->Styles->at( (*iter)->istdLink ) )));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
}
@ -242,19 +242,19 @@ namespace DocFileFormat
FontFamilyName* ffnAscii = static_cast<FontFamilyName*>( m_document->FontTable->operator [] ( sheet->stshi->rgftcStandardChpStsh[0] ) );
if (ffnAscii)
m_pXmlWriter->WriteAttribute( _T( "w:ascii" ), FormatUtils::XmlEncode(ffnAscii->xszFtn).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:ascii" ), FormatUtils::XmlEncode(ffnAscii->xszFtn, true));
FontFamilyName* ffnAsia = static_cast<FontFamilyName*>( m_document->FontTable->operator [] ( sheet->stshi->rgftcStandardChpStsh[1] ) );
if (ffnAsia)
m_pXmlWriter->WriteAttribute( _T( "w:eastAsia" ), FormatUtils::XmlEncode(ffnAsia->xszFtn).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:eastAsia" ), FormatUtils::XmlEncode(ffnAsia->xszFtn, true));
FontFamilyName* ffnAnsi = static_cast<FontFamilyName*>( m_document->FontTable->operator [] ( sheet->stshi->rgftcStandardChpStsh[2] ) );
if (ffnAnsi)
m_pXmlWriter->WriteAttribute( _T( "w:hAnsi" ), FormatUtils::XmlEncode(ffnAnsi->xszFtn).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:hAnsi" ), FormatUtils::XmlEncode(ffnAnsi->xszFtn, true));
FontFamilyName* ffnComplex = static_cast<FontFamilyName*>( m_document->FontTable->operator [] ( sheet->stshi->rgftcStandardChpStsh[3] ) );
if (ffnComplex)
m_pXmlWriter->WriteAttribute( _T( "w:cs" ), FormatUtils::XmlEncode(ffnComplex->xszFtn).c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:cs" ), FormatUtils::XmlEncode(ffnComplex->xszFtn, true));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:rFonts" ) );
@ -263,7 +263,7 @@ namespace DocFileFormat
std::wstring langcode = LanguageIdMapping::getLanguageCode( &langid );
m_pXmlWriter->WriteNodeBegin( _T( "w:lang" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), langcode.c_str() );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), langcode);
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:lang" ) );

View File

@ -49,9 +49,9 @@ namespace DocFileFormat
_brcRight = NULL;
_brcBottom = NULL;
_tcPr = new XMLTools::XMLElement<wchar_t>(L"w:tcPr");
_tcMar = new XMLTools::XMLElement<wchar_t>(L"w:tcMar");
_tcBorders = new XMLTools::XMLElement<wchar_t>(L"w:tcBorders");
_tcPr = new XMLTools::XMLElement(L"w:tcPr");
_tcMar = new XMLTools::XMLElement(L"w:tcMar");
_tcBorders = new XMLTools::XMLElement(L"w:tcBorders");
_ftsWidth = Global::nil;
}
@ -89,7 +89,7 @@ namespace DocFileFormat
_tGrid = tdef.rgdxaCenter;
_tcDef = tdef.rgTc80[(std::min)(_cellIndex, (int)tdef.rgTc80.size() - 1)]; // NOTE: fix for crash
appendValueElement( _tcPr, L"textDirection", FormatUtils::MapValueToWideString( _tcDef.textFlow, &Global::TextFlowMap[0][0], 6, 6 ).c_str(), false );
appendValueElement( _tcPr, L"textDirection", FormatUtils::MapValueToWideString( _tcDef.textFlow, &Global::TextFlowMap[0][0], 6, 6 ), false );
if ( _tcDef.vertMerge == Global::fvmMerge )
{
@ -100,7 +100,7 @@ namespace DocFileFormat
appendValueElement( _tcPr, L"vMerge", L"restart", false );
}
appendValueElement( _tcPr, L"vAlign", FormatUtils::MapValueToWideString( _tcDef.vertAlign, &Global::VerticalAlignMap[0][0], 3, 7 ).c_str(), false );
appendValueElement( _tcPr, L"vAlign", FormatUtils::MapValueToWideString( _tcDef.vertAlign, &Global::VerticalAlignMap[0][0], 3, 7 ), false );
if ( _tcDef.fFitText )
{
@ -145,22 +145,22 @@ namespace DocFileFormat
{
if ( FormatUtils::GetBitFromInt( iter->Arguments[2], 0 ) == true )
{
appendDxaElement( _tcMar, L"top", FormatUtils::IntToWideString( wMargin ).c_str(), true );
appendDxaElement( _tcMar, L"top", FormatUtils::IntToWideString( wMargin ), true );
}
if ( FormatUtils::GetBitFromInt( iter->Arguments[2], 1 ) == true )
{
appendDxaElement( _tcMar, L"left", FormatUtils::IntToWideString( wMargin ).c_str(), true );
appendDxaElement( _tcMar, L"left", FormatUtils::IntToWideString( wMargin ), true );
}
if ( FormatUtils::GetBitFromInt( iter->Arguments[2], 2 ) == true )
{
appendDxaElement( _tcMar, L"bottom", FormatUtils::IntToWideString( wMargin ).c_str(), true );
appendDxaElement( _tcMar, L"bottom", FormatUtils::IntToWideString( wMargin ), true );
}
if ( FormatUtils::GetBitFromInt( iter->Arguments[2], 3 ) == true )
{
appendDxaElement( _tcMar, L"right", FormatUtils::IntToWideString( wMargin ).c_str(), true );
appendDxaElement( _tcMar, L"right", FormatUtils::IntToWideString( wMargin ), true );
}
}
}
@ -210,7 +210,7 @@ namespace DocFileFormat
if ((_cellIndex >= first) && (_cellIndex < lim))
{
appendValueElement(_tcPr, L"vAlign", FormatUtils::MapValueToWideString( (VerticalCellAlignment)iter->Arguments[2], &VerticalCellAlignmentMap[0][0], 3, 7 ).c_str(), true );
appendValueElement(_tcPr, L"vAlign", FormatUtils::MapValueToWideString( (VerticalCellAlignment)iter->Arguments[2], &VerticalCellAlignmentMap[0][0], 3, 7 ), true );
}
}
break;
@ -222,7 +222,7 @@ namespace DocFileFormat
if ( ( _cellIndex >= first ) && ( _cellIndex < lim ) )
{
appendValueElement( _tcPr, L"tcFitText", FormatUtils::IntToWideString( iter->Arguments[2] ).c_str(), true );
appendValueElement( _tcPr, L"tcFitText", FormatUtils::IntToWideString( iter->Arguments[2] ), true );
}
}
break;
@ -271,10 +271,11 @@ namespace DocFileFormat
}
//width
XMLTools::XMLElement<wchar_t> tcW( L"w:tcW" );
XMLTools::XMLAttribute<wchar_t> tcWType( L"w:type", FormatUtils::MapValueToWideString( _ftsWidth, &Global::CellWidthTypeMap[0][0], 4, 5 ).c_str() );
XMLTools::XMLAttribute<wchar_t> tcWVal( L"w:w", FormatUtils::IntToWideString( _width ).c_str() );
tcW.AppendAttribute( tcWType );
XMLTools::XMLElement tcW ( L"w:tcW" );
XMLTools::XMLAttribute tcWType ( L"w:type", FormatUtils::MapValueToWideString( _ftsWidth, &Global::CellWidthTypeMap[0][0], 4, 5 ) );
XMLTools::XMLAttribute tcWVal ( L"w:w", FormatUtils::IntToWideString( _width ) );
tcW.AppendAttribute( tcWType );
tcW.AppendAttribute( tcWVal );
_tcPr->AppendChild( tcW );
@ -298,7 +299,7 @@ namespace DocFileFormat
}
}
appendValueElement( _tcPr, L"gridSpan", FormatUtils::IntToWideString( _gridSpan ).c_str(), true );
appendValueElement( _tcPr, L"gridSpan", FormatUtils::IntToWideString( _gridSpan ), true );
}
//append margins
@ -310,28 +311,28 @@ namespace DocFileFormat
//append borders
if (_brcTop)
{
XMLTools::XMLElement<wchar_t> topBorder( L"w:top" );
XMLTools::XMLElement topBorder( L"w:top" );
appendBorderAttributes(_brcTop, &topBorder);
addOrSetBorder(_tcBorders, &topBorder );
}
if (_brcLeft )
{
XMLTools::XMLElement<wchar_t> leftBorder( L"w:left" );
XMLTools::XMLElement leftBorder( L"w:left" );
appendBorderAttributes(_brcLeft, &leftBorder);
addOrSetBorder(_tcBorders, &leftBorder);
}
if (_brcBottom)
{
XMLTools::XMLElement<wchar_t> bottomBorder( L"w:bottom" );
XMLTools::XMLElement bottomBorder( L"w:bottom" );
appendBorderAttributes(_brcBottom, &bottomBorder);
addOrSetBorder(_tcBorders, &bottomBorder);
}
if (_brcRight)
{
XMLTools::XMLElement<wchar_t> rightBorder( L"w:right" );
XMLTools::XMLElement rightBorder( L"w:right" );
appendBorderAttributes( _brcRight, &rightBorder );
addOrSetBorder( _tcBorders, &rightBorder );
}
@ -343,7 +344,7 @@ namespace DocFileFormat
//write Properties
if ((_tcPr->GetChildCount() > 0) || (_tcPr->GetAttributeCount() > 0))
m_pXmlWriter->WriteString(_tcPr->GetXMLString().c_str());
m_pXmlWriter->WriteString(_tcPr->GetXMLString());
}
void TableCellPropertiesMapping::apppendCellShading (unsigned char* sprmArg, int size, int cellIndex)

View File

@ -77,9 +77,9 @@ namespace DocFileFormat
int _gridIndex;
int _cellIndex;
XMLTools::XMLElement<wchar_t>* _tcPr;
XMLTools::XMLElement<wchar_t>* _tcMar;
XMLTools::XMLElement<wchar_t>* _tcBorders;
XMLTools::XMLElement* _tcPr;
XMLTools::XMLElement* _tcMar;
XMLTools::XMLElement* _tcBorders;
const std::vector<short>* _grid;
std::vector<short> _tGrid;

View File

@ -40,8 +40,8 @@ namespace DocFileFormat
_isTableStyleNeeded(isTableStyleNeeded)
{
_styles = styles;
_tblPr = new XMLTools::XMLElement<wchar_t>( _T( "w:tblPr" ) );
_tblBorders = new XMLTools::XMLElement<wchar_t>( _T( "w:tblBorders" ) );
_tblPr = new XMLTools::XMLElement( _T( "w:tblPr" ) );
_tblBorders = new XMLTools::XMLElement( _T( "w:tblBorders" ) );
_grid = grid;
}
TablePropertiesMapping::~TablePropertiesMapping()
@ -63,10 +63,10 @@ namespace DocFileFormat
{
TablePropertyExceptions* tapx = static_cast<TablePropertyExceptions*>( visited );
XMLTools::XMLElement<wchar_t> tblCellMar ( _T( "w:tblCellMar" ) );
XMLTools::XMLElement<wchar_t> tblLayout ( _T( "w:tblLayout" ) );
XMLTools::XMLElement<wchar_t> tblpPr ( _T( "w:tblpPr" ) );
XMLTools::XMLAttribute<wchar_t> layoutType ( _T( "w:type" ), _T( "fixed" ) );
XMLTools::XMLElement tblCellMar ( _T( "w:tblCellMar" ) );
XMLTools::XMLElement tblLayout ( _T( "w:tblLayout" ) );
XMLTools::XMLElement tblpPr ( _T( "w:tblpPr" ) );
XMLTools::XMLAttribute layoutType ( _T( "w:type" ), _T( "fixed" ) );
bool bLayoutFixed = true;
short tblIndent = 0;
@ -109,10 +109,10 @@ namespace DocFileFormat
unsigned char fts = iter->Arguments[0];
short width = FormatUtils::BytesToInt16( iter->Arguments, 1, iter->argumentsSize );
XMLTools::XMLElement<wchar_t> tblW( _T( "w:tblW" ) );
XMLTools::XMLElement tblW( _T( "w:tblW" ) );
XMLTools::XMLAttribute<wchar_t> w( _T( "w:w" ), FormatUtils::IntToWideString( width ).c_str() );
XMLTools::XMLAttribute<wchar_t> type( _T( "w:type" ), FormatUtils::MapValueToWideString( fts, &WidthType[0][0], 4, 5 ).c_str() );
XMLTools::XMLAttribute w( _T( "w:w" ), FormatUtils::IntToWideString( width ) );
XMLTools::XMLAttribute type( _T( "w:type" ), FormatUtils::MapValueToWideString( fts, &WidthType[0][0], 4, 5 ) );
tblW.AppendAttribute( type );
tblW.AppendAttribute( w );
@ -126,7 +126,7 @@ namespace DocFileFormat
case sprmTJcRow:
{ //justification
appendValueElement( _tblPr, _T( "jc" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15 ).c_str(), true );
appendValueElement( _tblPr, _T( "jc" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15 ), true );
}
break;
@ -150,7 +150,7 @@ namespace DocFileFormat
if( id != std::wstring( _T( "TableNormal" )) && !id.empty() )
{
appendValueElement( _tblPr, _T( "tblStyle" ), id.c_str(), true );
appendValueElement( _tblPr, _T( "tblStyle" ), id, true );
}
}
}
@ -168,7 +168,7 @@ namespace DocFileFormat
case sprmTTlp:
{ //table look
appendValueElement( _tblPr, _T( "tblLook" ), FormatUtils::IntToFormattedWideString( FormatUtils::BytesToInt16( iter->Arguments, 2, iter->argumentsSize ), _T( "%04x" ) ).c_str(), true );
appendValueElement( _tblPr, _T( "tblLook" ), FormatUtils::IntToFormattedWideString( FormatUtils::BytesToInt16( iter->Arguments, 2, iter->argumentsSize ), _T( "%04x" ) ), true );
}
break;
@ -194,7 +194,7 @@ namespace DocFileFormat
if ( FormatUtils::BitmaskToBool( (int)grfbrc, 0x01 ) )
{
appendDxaElement( &tblCellMar, _T( "top" ), strValue.c_str(), true );
appendDxaElement( &tblCellMar, _T( "top" ), strValue, true );
}
if ( FormatUtils::BitmaskToBool( (int)grfbrc, 0x02 ) )
@ -204,7 +204,7 @@ namespace DocFileFormat
if ( FormatUtils::BitmaskToBool( (int)grfbrc, 0x04 ) )
{
appendDxaElement( &tblCellMar, _T( "bottom" ), strValue.c_str(), true );
appendDxaElement( &tblCellMar, _T( "bottom" ), strValue, true );
}
if ( FormatUtils::BitmaskToBool( (int)grfbrc, 0x08 ) )
@ -238,7 +238,7 @@ namespace DocFileFormat
tblOverlapVal = std::wstring( _T( "never" ) );
}
appendValueElement( _tblPr, _T( "tblOverlap" ), tblOverlapVal.c_str(), true );
appendValueElement( _tblPr, _T( "tblOverlap" ), tblOverlapVal, true );
}
break;
@ -332,11 +332,11 @@ namespace DocFileFormat
{
unsigned char flag = ( iter->Arguments[0] & 0x30 ) >> 4;
appendValueAttribute( &tblpPr, _T( "w:vertAnchor" ), FormatUtils::MapValueToWideString( flag, &Global::VerticalPositionCode[0][0], 4, 7 ).c_str() );
appendValueAttribute( &tblpPr, _T( "w:vertAnchor" ), FormatUtils::MapValueToWideString( flag, &Global::VerticalPositionCode[0][0], 4, 7 ) );
flag = ( iter->Arguments[0] & 0xC0 ) >> 6;
appendValueAttribute( &tblpPr, _T( "w:horzAnchor" ), FormatUtils::MapValueToWideString( flag, &Global::HorizontalPositionCode[0][0], 4, 7 ).c_str() );
appendValueAttribute( &tblpPr, _T( "w:horzAnchor" ), FormatUtils::MapValueToWideString( flag, &Global::HorizontalPositionCode[0][0], 4, 7 ) );
}
break;
@ -381,12 +381,12 @@ namespace DocFileFormat
//indent
if ( tblIndent != 0 )
{
XMLTools::XMLElement<wchar_t> tblInd( _T( "w:tblInd" ) );
XMLTools::XMLElement tblInd( _T( "w:tblInd" ) );
XMLTools::XMLAttribute<wchar_t> tblIndW( _T( "w:w" ),FormatUtils::IntToWideString( tblIndent ).c_str() );
XMLTools::XMLAttribute tblIndW( _T( "w:w" ),FormatUtils::IntToWideString( tblIndent ) );
tblInd.AppendAttribute( tblIndW );
XMLTools::XMLAttribute<wchar_t> tblIndType( _T( "w:type" ), _T( "dxa" ) );
XMLTools::XMLAttribute tblIndType( _T( "w:type" ), _T( "dxa" ) );
tblInd.AppendAttribute( tblIndType );
_tblPr->AppendChild( tblInd );
@ -401,42 +401,42 @@ namespace DocFileFormat
//set borders
if ( brcTop != NULL )
{
XMLTools::XMLElement<wchar_t> topBorder( _T( "w:top" ) );
XMLTools::XMLElement topBorder( _T( "w:top" ) );
appendBorderAttributes( brcTop, &topBorder );
addOrSetBorder( _tblBorders, &topBorder );
}
if ( brcLeft != NULL )
{
XMLTools::XMLElement<wchar_t> leftBorder( _T( "w:left" ) );
XMLTools::XMLElement leftBorder( _T( "w:left" ) );
appendBorderAttributes( brcLeft, &leftBorder );
addOrSetBorder( _tblBorders, &leftBorder );
}
if ( brcBottom != NULL )
{
XMLTools::XMLElement<wchar_t> bottomBorder( _T( "w:bottom" ) );
XMLTools::XMLElement bottomBorder( _T( "w:bottom" ) );
appendBorderAttributes( brcBottom, &bottomBorder );
addOrSetBorder( _tblBorders, &bottomBorder );
}
if ( brcRight != NULL )
{
XMLTools::XMLElement<wchar_t> rightBorder( _T( "w:right" ) );
XMLTools::XMLElement rightBorder( _T( "w:right" ) );
appendBorderAttributes( brcRight, &rightBorder );
addOrSetBorder( _tblBorders, &rightBorder );
}
if ( brcHorz != NULL )
{
XMLTools::XMLElement<wchar_t> insideHBorder( _T( "w:insideH" ) );
XMLTools::XMLElement insideHBorder( _T( "w:insideH" ) );
appendBorderAttributes( brcHorz, &insideHBorder );
addOrSetBorder( _tblBorders, &insideHBorder );
}
if ( brcVert != NULL )
{
XMLTools::XMLElement<wchar_t> insideVBorder( _T( "w:insideV" ) );
XMLTools::XMLElement insideVBorder( _T( "w:insideV" ) );
appendBorderAttributes( brcVert, &insideVBorder );
addOrSetBorder( _tblBorders, &insideVBorder );
}
@ -453,20 +453,20 @@ namespace DocFileFormat
//append margins
if ( ( marginLeft == 0 ) && ( gabHalf != 0 ) )
{
appendDxaElement( &tblCellMar, _T( "left" ), FormatUtils::IntToWideString( gabHalf ).c_str(), true );
appendDxaElement( &tblCellMar, _T( "left" ), FormatUtils::IntToWideString( gabHalf ), true );
}
else
{
appendDxaElement( &tblCellMar, _T( "left" ), FormatUtils::IntToWideString( marginLeft ).c_str(), true );
appendDxaElement( &tblCellMar, _T( "left" ), FormatUtils::IntToWideString( marginLeft ), true );
}
if ( ( marginRight == 0 ) && ( gabHalf != 0 ) )
{
appendDxaElement( &tblCellMar, _T( "right" ), FormatUtils::IntToWideString( gabHalf ).c_str(), true );
appendDxaElement( &tblCellMar, _T( "right" ), FormatUtils::IntToWideString( gabHalf ), true );
}
else
{
appendDxaElement( &tblCellMar, _T( "right" ), FormatUtils::IntToWideString( marginRight ).c_str(), true );
appendDxaElement( &tblCellMar, _T( "right" ), FormatUtils::IntToWideString( marginRight ), true );
}
_tblPr->AppendChild( tblCellMar );
@ -474,11 +474,11 @@ namespace DocFileFormat
//write Properties
if ( ( _tblPr->GetChildCount() > 0 ) || ( _tblPr->GetAttributeCount() > 0 ) )
{
m_pXmlWriter->WriteString( _tblPr->GetXMLString().c_str() );
m_pXmlWriter->WriteString( _tblPr->GetXMLString() );
}
//append the grid
_tblGrid = new XMLTools::XMLElement<wchar_t>( _T( "w:tblGrid" ) );
_tblGrid = new XMLTools::XMLElement( _T( "w:tblGrid" ) );
//Если _grid состоит из одних DocFormatUtils::gc_nZeroWidth и layout != "fixed", значит это doc полученный нами при конвертации из html. Таблицу размеров писать не нужно
bool bWriteGridCol = false;
@ -499,13 +499,13 @@ namespace DocFileFormat
{
for ( unsigned int i = 0; i < _grid->size(); i++ )
{
XMLTools::XMLElement<wchar_t> gridCol( _T( "w:gridCol" ) );
XMLTools::XMLAttribute<wchar_t> gridColW( _T( "w:w" ), FormatUtils::IntToWideString( _grid->at( i ) ).c_str() );
XMLTools::XMLElement gridCol( _T( "w:gridCol" ) );
XMLTools::XMLAttribute gridColW( _T( "w:w" ), FormatUtils::IntToWideString( _grid->at( i ) ) );
gridCol.AppendAttribute( gridColW );
_tblGrid->AppendChild( gridCol );
}
}
m_pXmlWriter->WriteString( _tblGrid->GetXMLString().c_str() );
m_pXmlWriter->WriteString( _tblGrid->GetXMLString() );
}
}

View File

@ -77,9 +77,9 @@ namespace DocFileFormat
private:
XMLTools::XMLElement<wchar_t>* _tblPr;
XMLTools::XMLElement<wchar_t>* _tblGrid;
XMLTools::XMLElement<wchar_t>* _tblBorders;
XMLTools::XMLElement* _tblPr;
XMLTools::XMLElement* _tblGrid;
XMLTools::XMLElement* _tblBorders;
StyleSheet* _styles;
std::vector<short>* _grid;

View File

@ -37,9 +37,9 @@ namespace DocFileFormat
{
TableRowPropertiesMapping::TableRowPropertiesMapping (XMLTools::CStringXmlWriter* pWriter, CharacterPropertyExceptions* rowEndChpx) : PropertiesMapping(pWriter), _trPr(NULL), _tblPrEx(NULL), _rowEndChpx(NULL)
{
_trPr = new XMLTools::XMLElement<wchar_t>(L"w:trPr");
_tblPrEx = new XMLTools::XMLElement<wchar_t>(L"w:tblPrEx");
//_tblBorders = new XMLTools::XMLElement<wchar_t>(L"w:tblBorders");
_trPr = new XMLTools::XMLElement(L"w:trPr");
_tblPrEx = new XMLTools::XMLElement(L"w:tblPrEx");
//_tblBorders = new XMLTools::XMLElement(L"w:tblBorders");
_rowEndChpx = rowEndChpx;
}
@ -58,7 +58,7 @@ namespace DocFileFormat
if ( ( _rowEndChpx != NULL ) && ( rev.Type == Deleted ) )
{
XMLTools::XMLElement<wchar_t> del( L"w:del" );
XMLTools::XMLElement del( L"w:del" );
_trPr->AppendChild( del );
}
@ -81,7 +81,7 @@ namespace DocFileFormat
if ( fHeader )
{
XMLTools::XMLElement<wchar_t> header( L"w:tblHeader" );
XMLTools::XMLElement header( L"w:tblHeader" );
_trPr->AppendChild( header );
}
}
@ -89,11 +89,11 @@ namespace DocFileFormat
case sprmTWidthAfter:
{ //width after
XMLTools::XMLElement<wchar_t> wAfter( L"w:wAfter" );
XMLTools::XMLAttribute<wchar_t> wAfterValue( L"w:w", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 1, iter->argumentsSize ) ).c_str() );
XMLTools::XMLElement wAfter( L"w:wAfter" );
XMLTools::XMLAttribute wAfterValue( L"w:w", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 1, iter->argumentsSize ) ) );
wAfter.AppendAttribute( wAfterValue );
XMLTools::XMLAttribute<wchar_t> wAfterType( L"w:type", L"dxa" );
XMLTools::XMLAttribute wAfterType( L"w:type", L"dxa" );
wAfter.AppendAttribute( wAfterType );
_trPr->AppendChild( wAfter, true );
}
@ -105,11 +105,11 @@ namespace DocFileFormat
if ( before != 0 )
{
XMLTools::XMLElement<wchar_t> wBefore( L"w:wBefore" );
XMLTools::XMLAttribute<wchar_t> wBeforeValue( L"w:w", FormatUtils::IntToWideString( before ).c_str() );
XMLTools::XMLElement wBefore( L"w:wBefore" );
XMLTools::XMLAttribute wBeforeValue( L"w:w", FormatUtils::IntToWideString( before ) );
wBefore.AppendAttribute( wBeforeValue );
XMLTools::XMLAttribute<wchar_t> wBeforeType( L"w:type", L"dxa" );
XMLTools::XMLAttribute wBeforeType( L"w:type", L"dxa" );
wBefore.AppendAttribute( wBeforeType );
_trPr->AppendChild( wBefore, true );
}
@ -119,16 +119,16 @@ namespace DocFileFormat
case sprmOldTDyaRowHeight:
case sprmTDyaRowHeight:
{ //row height
XMLTools::XMLElement<wchar_t> rowHeight( L"w:trHeight" );
XMLTools::XMLAttribute<wchar_t> rowHeightVal( L"w:val" );
XMLTools::XMLAttribute<wchar_t> rowHeightRule( L"w:hRule" );
XMLTools::XMLElement rowHeight( L"w:trHeight" );
XMLTools::XMLAttribute rowHeightVal( L"w:val" );
XMLTools::XMLAttribute rowHeightRule( L"w:hRule" );
short rH = FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize );
if ( rH > 0 )
{
rowHeightRule.SetValue( L"atLeast" );
rowHeightVal.SetValue( FormatUtils::IntToWideString( rH ).c_str() );
rowHeightVal.SetValue( FormatUtils::IntToWideString( rH ) );
rowHeight.AppendAttribute( rowHeightVal );
}
else if( rH == 0 )
@ -139,7 +139,7 @@ namespace DocFileFormat
{
rowHeightRule.SetValue( L"exact" );
rH *= -1;
rowHeightVal.SetValue( FormatUtils::IntToWideString( rH ).c_str() );
rowHeightVal.SetValue( FormatUtils::IntToWideString( rH ) );
rowHeight.AppendAttribute( rowHeightVal );
}
@ -158,7 +158,7 @@ namespace DocFileFormat
//div id
case sprmTIpgp:
{
appendValueElement( _trPr, L"divId", FormatUtils::IntToWideString( FormatUtils::BytesToInt32( iter->Arguments, 0, iter->argumentsSize ) ).c_str(), true );
appendValueElement( _trPr, L"divId", FormatUtils::IntToWideString( FormatUtils::BytesToInt32( iter->Arguments, 0, iter->argumentsSize ) ), true );
}break;
//borders 80 exceptions
@ -260,7 +260,7 @@ namespace DocFileFormat
//write Properties
if ( ( _trPr->GetChildCount() > 0 ) || ( _trPr->GetAttributeCount() > 0 ) )
{
m_pXmlWriter->WriteString( _trPr->GetXMLString().c_str() );
m_pXmlWriter->WriteString( _trPr->GetXMLString() );
}
}
}

View File

@ -44,9 +44,9 @@ namespace DocFileFormat
class TableRowPropertiesMapping: public PropertiesMapping, public IMapping
{
private:
XMLTools::XMLElement<wchar_t>* _trPr;
XMLTools::XMLElement<wchar_t>* _tblPrEx;
//XMLTools::XMLElement<wchar_t>* _tblBorders;
XMLTools::XMLElement* _trPr;
XMLTools::XMLElement* _tblPrEx;
//XMLTools::XMLElement* _tblBorders;
//BorderCode brcLeft, brcTop, brcBottom, brcRight, brcHorz, brcVert;
CharacterPropertyExceptions* _rowEndChpx;
@ -55,4 +55,4 @@ namespace DocFileFormat
virtual ~TableRowPropertiesMapping();
virtual void Apply( IVisitable* visited );
};
}
}

View File

@ -149,7 +149,7 @@ namespace DocFileFormat
file.WriteFile((BYTE*)xmlString.c_str(), xmlString.size());
file.CloseFile();
OOX::CPath path(sTempXmlFile.c_str());
OOX::CPath path(sTempXmlFile);
OOX::CDocument docEmbedded(path, path);
bool res = false;
@ -194,9 +194,9 @@ namespace DocFileFormat
if ( b != NULL )
{
b->operator += ( propName );
b->operator += ( _T( ":" ) );
b->operator += ( L":" );
b->operator += ( propValue );
b->operator +=( _T( ";" ) );
b->operator +=( L";" );
}
}
@ -213,7 +213,7 @@ namespace DocFileFormat
m_isEquation = false;
m_isEmbedded = false;
m_imageData = new XMLTools::XMLElement<wchar_t>( _T( "v:imagedata" ) );
m_imageData = new XMLTools::XMLElement( L"v:imagedata" );
}
VMLPictureMapping::~VMLPictureMapping()
@ -256,24 +256,24 @@ namespace DocFileFormat
{
type.SetType(msosptPictureFrame);
}
m_pXmlWriter->WriteNodeBegin( _T( "v:shape" ), true );
m_pXmlWriter->WriteNodeBegin( L"v:shape", true );
m_pXmlWriter->WriteAttribute( _T( "type" ), std::wstring( _T( "#" ) + VMLShapeTypeMapping::GenerateTypeId(&type)).c_str());
m_pXmlWriter->WriteAttribute( L"type", std::wstring( L"#" + VMLShapeTypeMapping::GenerateTypeId(&type)));
count_vml_objects++;
if (m_shapeId.empty())
m_shapeId = std::wstring(L"_x0000_s") + FormatUtils::IntToWideString(1024 + count_vml_objects);
m_shapeId = L"_x0000_s" + FormatUtils::IntToWideString(1024 + count_vml_objects);
m_pXmlWriter->WriteAttribute( _T( "id" ), m_shapeId.c_str() );
m_pXmlWriter->WriteAttribute( L"id", m_shapeId);
if (m_isOlePreview)
{
m_pXmlWriter->WriteAttribute( _T( "o:ole" ), _T( "" ) );
m_pXmlWriter->WriteAttribute( L"o:ole", L"" );
}
else if (m_isBullete)
{
m_pXmlWriter->WriteAttribute( _T( "o:bullet" ), _T( "1" ) );
m_pXmlWriter->WriteAttribute( L"o:bullet", L"1" );
}
//todooo oбъединить с shape_mapping
@ -304,25 +304,25 @@ namespace DocFileFormat
case borderBottomColor:
{
RGBColor bottomColor( (int)iter->op, RedFirst );
m_pXmlWriter->WriteAttribute( _T( "o:borderbottomcolor" ), ( std::wstring( _T( "#" ) ) + bottomColor.SixDigitHexCode ).c_str() );
m_pXmlWriter->WriteAttribute( L"o:borderbottomcolor", L"#" + bottomColor.SixDigitHexCode);
}
break;
case borderLeftColor:
{
RGBColor leftColor( (int)iter->op, RedFirst );
m_pXmlWriter->WriteAttribute( _T( "o:borderleftcolor" ), ( std::wstring( _T( "#" ) ) + leftColor.SixDigitHexCode ).c_str() );
m_pXmlWriter->WriteAttribute( L"o:borderleftcolor", L"#" + leftColor.SixDigitHexCode);
}
break;
case borderRightColor:
{
RGBColor rightColor( (int)iter->op, RedFirst );
m_pXmlWriter->WriteAttribute( _T( "o:borderrightcolor" ), ( std::wstring( _T( "#" ) ) + rightColor.SixDigitHexCode ).c_str() );
m_pXmlWriter->WriteAttribute( L"o:borderrightcolor", L"#" + rightColor.SixDigitHexCode);
}
break;
case borderTopColor:
{
RGBColor topColor( (int)iter->op, RedFirst );
m_pXmlWriter->WriteAttribute( _T( "o:bordertopcolor" ), ( std::wstring( _T( "#" ) ) + topColor.SixDigitHexCode ).c_str() );
m_pXmlWriter->WriteAttribute( L"o:bordertopcolor", L"#" + topColor.SixDigitHexCode);
}
break;
//CROPPING
@ -330,28 +330,28 @@ namespace DocFileFormat
{
//cast to signed integer
int cropBottom = (int)iter->op;
appendValueAttribute(m_imageData, _T( "cropbottom" ), ( FormatUtils::IntToWideString( cropBottom ) + std::wstring( _T( "f" ) ) ).c_str() );
appendValueAttribute(m_imageData, L"cropbottom", FormatUtils::IntToWideString( cropBottom ) + L"f" );
}
break;
case cropFromLeft:
{
//cast to signed integer
int cropLeft = (int)iter->op;
appendValueAttribute(m_imageData, _T( "cropleft" ), ( FormatUtils::IntToWideString( cropLeft ) + std::wstring( _T( "f" ) ) ).c_str());
appendValueAttribute(m_imageData, L"cropleft", FormatUtils::IntToWideString( cropLeft ) + L"f" );
}
break;
case cropFromRight:
{
//cast to signed integer
int cropRight = (int)iter->op;
appendValueAttribute(m_imageData, _T( "cropright" ), ( FormatUtils::IntToWideString( cropRight ) + std::wstring( _T( "f" ) ) ).c_str());
appendValueAttribute(m_imageData, L"cropright", FormatUtils::IntToWideString( cropRight ) + L"f" );
}
break;
case cropFromTop:
{
//cast to signed integer
int cropTop = (int)iter->op;
appendValueAttribute(m_imageData, _T( "croptop" ), ( FormatUtils::IntToWideString( cropTop ) + std::wstring( _T( "f" ) ) ).c_str());
appendValueAttribute(m_imageData, L"croptop", FormatUtils::IntToWideString( cropTop ) + L"f" );
}
break;
//------------------------------------------------------------
@ -365,23 +365,23 @@ namespace DocFileFormat
std::wstring v = strHeight;
strHeight = strWidth; strWidth = v;
appendStyleProperty(&strStyle, _T( "rotation" ), FormatUtils::DoubleToWideString(dAngle));
appendStyleProperty(&strStyle, L"rotation", FormatUtils::DoubleToWideString(dAngle));
}break;
case posh:
{
appendStyleProperty(&strStyle, _T("mso-position-horizontal"), VMLShapeMapping::mapHorizontalPosition((PositionHorizontal)iter->op));
appendStyleProperty(&strStyle, L"mso-position-horizontal", VMLShapeMapping::mapHorizontalPosition((PositionHorizontal)iter->op));
}break;
case posrelh:
{
appendStyleProperty(&strStyle, _T("mso-position-horizontal-relative"), VMLShapeMapping::mapHorizontalPositionRelative((PositionHorizontalRelative)iter->op));
appendStyleProperty(&strStyle, L"mso-position-horizontal-relative", VMLShapeMapping::mapHorizontalPositionRelative((PositionHorizontalRelative)iter->op));
}break;
case posv:
{
appendStyleProperty(&strStyle, _T("mso-position-vertical"), VMLShapeMapping::mapVerticalPosition((PositionVertical)iter->op));
appendStyleProperty(&strStyle, L"mso-position-vertical", VMLShapeMapping::mapVerticalPosition((PositionVertical)iter->op));
}break;
case posrelv:
{
appendStyleProperty(&strStyle, _T("mso-position-vertical-relative"), VMLShapeMapping::mapVerticalPositionRelative((PositionVerticalRelative)iter->op));
appendStyleProperty(&strStyle, L"mso-position-vertical-relative", VMLShapeMapping::mapVerticalPositionRelative((PositionVerticalRelative)iter->op));
}break;
case groupShapeBooleans:
{
@ -390,52 +390,53 @@ namespace DocFileFormat
if (groupShapeBooleans.fUsefBehindDocument && groupShapeBooleans.fBehindDocument)
{
//The shape is behind the text, so the z-index must be negative.
appendStyleProperty(&strStyle, _T( "z-index" ), _T( "-1" ) );
appendStyleProperty(&strStyle, L"z-index", L"-1" );
}
//else if (!m_isInlinePicture)
//{
// appendStyleProperty( &strStyle, _T( "z-index" ), FormatUtils::IntToWideString(zIndex + 0x7ffff));
// appendStyleProperty( &strStyle, L"z-index", FormatUtils::IntToWideString(zIndex + 0x7ffff));
//}
if (groupShapeBooleans.fHidden && groupShapeBooleans.fUsefHidden)
{
appendStyleProperty(&strStyle, _T( "visibility" ), _T( "hidden" ));
appendStyleProperty(&strStyle, L"visibility", L"hidden");
}
}
break;
}
}
strStyle += _T( "width:" ) + strWidth + _T( "pt;" ) + _T( "height:" ) + strHeight + _T( "pt;" );
m_pXmlWriter->WriteAttribute( _T( "style" ), strStyle.c_str() );
strStyle += L"width:" + strWidth + L"pt;" + L"height:" + strHeight + L"pt;";
m_pXmlWriter->WriteAttribute( L"style", strStyle);
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
if (CopyPicture(pict))
{
//v:imageData
appendValueAttribute(m_imageData, _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString(m_nImageId) ).c_str());
appendValueAttribute(m_imageData, _T( "o:title" ) , _T( "" ));
m_pXmlWriter->WriteString(m_imageData->GetXMLString().c_str());
appendValueAttribute(m_imageData, L"r:id", L"rId" + FormatUtils::IntToWideString(m_nImageId));
appendValueAttribute(m_imageData, L"o:title", L"" );
m_pXmlWriter->WriteString(m_imageData->GetXMLString());
}
//borders
writePictureBorder( _T( "bordertop" ), pict->brcTop );
writePictureBorder( _T( "borderleft" ), pict->brcLeft );
writePictureBorder( _T( "borderbottom" ), pict->brcBottom );
writePictureBorder( _T( "borderright" ), pict->brcRight );
{//borders
writePictureBorder( L"bordertop", pict->brcTop );
writePictureBorder( L"borderleft", pict->brcLeft );
writePictureBorder( L"borderbottom", pict->brcBottom );
writePictureBorder( L"borderright", pict->brcRight );
}
m_pXmlWriter->WriteNodeEnd( _T( "v:shape" ) );
m_pXmlWriter->WriteNodeEnd( L"v:shape" );
}
void VMLPictureMapping::writePictureBorder( const std::wstring & name, const BorderCode* brc )
{
if (!brc || name.empty()) return;
m_pXmlWriter->WriteNodeBegin( ( std::wstring( _T( "w10:" ) ) + name).c_str(), true );
m_pXmlWriter->WriteAttribute( _T( "type" ), getBorderType( brc->brcType ).c_str() );
m_pXmlWriter->WriteAttribute( _T( "width" ), FormatUtils::IntToWideString( brc->dptLineWidth ).c_str() );
m_pXmlWriter->WriteNodeEnd ( _T( "" ), true );
m_pXmlWriter->WriteNodeBegin( L"w10:" + name, true );
m_pXmlWriter->WriteAttribute( L"type", getBorderType( brc->brcType ));
m_pXmlWriter->WriteAttribute( L"width", FormatUtils::IntToWideString( brc->dptLineWidth ));
m_pXmlWriter->WriteNodeEnd ( L"", true );
}
bool VMLPictureMapping::CopyPicture (PictureDescriptor* pict)
@ -534,26 +535,26 @@ namespace DocFileFormat
switch (nType)
{
case Global::msoblipDIB:
return std::wstring(_T(".bmp"));
return std::wstring(L".bmp");
case Global::msoblipEMF:
return std::wstring(_T(".emf"));
return std::wstring(L".emf");
case Global::msoblipJPEG:
case Global::msoblipCMYKJPEG:
return std::wstring(_T(".jpg"));
return std::wstring(L".jpg");
case Global::msoblipPNG:
return std::wstring(_T(".png"));
return std::wstring(L".png");
case Global::msoblipTIFF:
return std::wstring(_T(".tif"));
return std::wstring(L".tif");
case Global::msoblipWMF:
return std::wstring(_T(".wmf"));
return std::wstring(L".wmf");
default:
return std::wstring(_T(".png"));
return std::wstring(L".png");
}
}
@ -565,17 +566,17 @@ namespace DocFileFormat
return std::wstring(OpenXmlContentTypes::Emf);
//case msoblipGIF:
// return wstring( _T( "image/gif" ) );
// return wstring( L"image/gif" );
//case msoblipICON:
// return wstring( _T( "image/x-icon" ) );
// return wstring( L"image/x-icon" );
case Global::msoblipJPEG:
case Global::msoblipCMYKJPEG:
return std::wstring(OpenXmlContentTypes::Jpeg);
//case msoblipPCX:
// return wstring( _T( "image/pcx" ) );
// return wstring( L"image/pcx" );
case Global::msoblipPNG:
return std::wstring(OpenXmlContentTypes::Png);

View File

@ -84,7 +84,7 @@ namespace DocFileFormat
bool m_isOlePreview;
bool m_isInlinePicture;
XMLTools::XMLElement<wchar_t>* m_imageData;
XMLTools::XMLElement* m_imageData;
};
}

View File

@ -73,12 +73,12 @@ namespace DocFileFormat
m_pict = pPicture;
m_nImageId = 0;
m_imagedata = XMLTools::XMLElement<wchar_t>(L"v:imagedata");
m_fill = XMLTools::XMLElement<wchar_t>(L"v:fill");
m_stroke = XMLTools::XMLElement<wchar_t>(L"v:stroke");
m_shadow = XMLTools::XMLElement<wchar_t>(L"v:shadow");
m_3dstyle = XMLTools::XMLElement<wchar_t>(L"o:extrusion");
m_textpath = XMLTools::XMLElement<wchar_t>(L"v:textpath");
m_imagedata = XMLTools::XMLElement(L"v:imagedata");
m_fill = XMLTools::XMLElement(L"v:fill");
m_stroke = XMLTools::XMLElement(L"v:stroke");
m_shadow = XMLTools::XMLElement(L"v:shadow");
m_3dstyle = XMLTools::XMLElement(L"o:extrusion");
m_textpath = XMLTools::XMLElement(L"v:textpath");
Record* recBs = NULL;
if ((m_context) && (m_context->_doc))
@ -149,10 +149,10 @@ namespace DocFileFormat
m_shapeId = GetShapeID(shape);
m_pXmlWriter->WriteNodeBegin( L"v:group", true );
m_pXmlWriter->WriteAttribute( L"id", m_shapeId .c_str());
m_pXmlWriter->WriteAttribute( L"style", FormatUtils::XmlEncode(buildStyle(shape, anchor, options, container->Index)).c_str() );
m_pXmlWriter->WriteAttribute( L"coordorigin", ( FormatUtils::IntToWideString(gsr->rcgBounds.topLeftAngle.x) + L"," + FormatUtils::IntToWideString( gsr->rcgBounds.topLeftAngle.y)).c_str() );
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString(gsr->rcgBounds.size.cx) + L"," + FormatUtils::IntToWideString(gsr->rcgBounds.size.cy)).c_str() );
m_pXmlWriter->WriteAttribute( L"id", m_shapeId);
m_pXmlWriter->WriteAttribute( L"style", FormatUtils::XmlEncode(buildStyle(shape, anchor, options, container->Index)));
m_pXmlWriter->WriteAttribute( L"coordorigin", ( FormatUtils::IntToWideString(gsr->rcgBounds.topLeftAngle.x) + L"," + FormatUtils::IntToWideString( gsr->rcgBounds.topLeftAngle.y)));
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString(gsr->rcgBounds.size.cx) + L"," + FormatUtils::IntToWideString(gsr->rcgBounds.size.cy)));
// Write wrap coords
std::list<OptionEntry>::const_iterator end = options.end();
@ -164,7 +164,7 @@ namespace DocFileFormat
{
std::wstring wrapCoords = getWrapCoords(*iter);
if (wrapCoords.length())
m_pXmlWriter->WriteAttribute(L"wrapcoords", wrapCoords.c_str());
m_pXmlWriter->WriteAttribute(L"wrapcoords", wrapCoords);
}
break;
}
@ -205,7 +205,7 @@ namespace DocFileFormat
if (wrap != L"through")
{
m_pXmlWriter->WriteNodeBegin( L"w10:wrap", true );
m_pXmlWriter->WriteAttribute( L"type", wrap.c_str() );
m_pXmlWriter->WriteAttribute( L"type", wrap);
m_pXmlWriter->WriteNodeEnd ( L"w10:wrap", true );
}
}
@ -246,16 +246,16 @@ namespace DocFileFormat
if (pShape->GetShapeType())
{
freeform = false;
m_pXmlWriter->WriteAttribute( L"type", (std::wstring(L"#") + VMLShapeTypeMapping::GenerateTypeId(pShape->GetShapeType())).c_str());
m_pXmlWriter->WriteAttribute( L"type", (std::wstring(L"#") + VMLShapeTypeMapping::GenerateTypeId(pShape->GetShapeType())));
m_pXmlWriter->WriteAttribute( L"style", FormatUtils::XmlEncode(buildStyle(pShape, pAnchor, options, pContainer->Index)).c_str());
m_pXmlWriter->WriteAttribute( L"style", FormatUtils::XmlEncode(buildStyle(pShape, pAnchor, options, pContainer->Index)));
}
if (pShape->is<LineType>())
{
//append "from" and "to" attributes
m_pXmlWriter->WriteAttribute(L"from", GetLineFrom(pAnchor).c_str());
m_pXmlWriter->WriteAttribute(L"to", GetLineTo(pAnchor).c_str());
m_pXmlWriter->WriteAttribute(L"from", GetLineFrom(pAnchor));
m_pXmlWriter->WriteAttribute(L"to", GetLineTo(pAnchor));
}
if (m_isBullete)
@ -410,7 +410,7 @@ namespace DocFileFormat
if (!wrapCoords.empty())
{
m_pXmlWriter->WriteAttribute( L"wrapcoords", wrapCoords.c_str() );
m_pXmlWriter->WriteAttribute( L"wrapcoords", wrapCoords);
}
}break;
case geoRight:
@ -433,7 +433,7 @@ namespace DocFileFormat
{
RGBColor lineColor((int)iter->op, RedFirst);
if ( !pShape->fBackground )
m_pXmlWriter->WriteAttribute( L"strokecolor", (std::wstring(L"#") + lineColor.SixDigitHexCode).c_str());
m_pXmlWriter->WriteAttribute( L"strokecolor", (std::wstring(L"#") + lineColor.SixDigitHexCode));
}break;
case lineWidth:
{
@ -445,67 +445,67 @@ namespace DocFileFormat
}break;
case lineDashing:
{
appendValueAttribute(&m_stroke, L"dashstyle", FormatUtils::MapValueToWideString( iter->op, &Global::DashStyleMap[0][0], 11, 16 ).c_str() );
appendValueAttribute(&m_stroke, L"dashstyle", FormatUtils::MapValueToWideString( iter->op, &Global::DashStyleMap[0][0], 11, 16 ) );
}break;
case lineStyle:
{
appendValueAttribute(&m_stroke, L"linestyle", getLineStyle( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"linestyle", getLineStyle( iter->op ));
}break;
case lineEndArrowhead:
{
appendValueAttribute(&m_stroke, L"endarrow", getArrowStyle( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"endarrow", getArrowStyle( iter->op ));
}break;
case lineEndArrowLength:
{
appendValueAttribute(&m_stroke, L"endarrowlength", getArrowLength( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"endarrowlength", getArrowLength( iter->op ));
}break;
case lineEndArrowWidth:
{
appendValueAttribute(&m_stroke, L"endarrowwidth", getArrowWidth( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"endarrowwidth", getArrowWidth( iter->op ));
}break;
case lineStartArrowhead:
{
appendValueAttribute(&m_stroke, L"startarrow", getArrowStyle( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"startarrow", getArrowStyle( iter->op ));
}break;
case lineStartArrowLength:
{
appendValueAttribute(&m_stroke, L"startarrowlength", getArrowLength( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"startarrowlength", getArrowLength( iter->op ));
}break;
case lineStartArrowWidth:
{
appendValueAttribute(&m_stroke, L"startarrowwidth", getArrowWidth( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"startarrowwidth", getArrowWidth( iter->op ));
}break;
// FILL
case fillColor:
{
RGBColor fillColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"fillcolor", ( std::wstring( L"#" ) + fillColor.SixDigitHexCode ).c_str());
m_pXmlWriter->WriteAttribute(L"fillcolor", ( std::wstring( L"#" ) + fillColor.SixDigitHexCode ));
}break;
case fillBackColor:
{
RGBColor fillBackColor( (int)iter->op, RedFirst );
appendValueAttribute(&m_fill, L"color2", ( std::wstring( L"#" ) + fillBackColor.SixDigitHexCode ).c_str());
appendValueAttribute(&m_fill, L"color2", ( std::wstring( L"#" ) + fillBackColor.SixDigitHexCode ));
}break;
case fillAngle:
{
FixedPointNumber fllAngl( iter->op );
appendValueAttribute(&m_fill, L"angle", FormatUtils::DoubleToWideString( fllAngl.ToAngle() ).c_str());
appendValueAttribute(&m_fill, L"angle", FormatUtils::DoubleToWideString( fllAngl.ToAngle() ));
}break;
case fillShadeType:
{
appendValueAttribute(&m_fill, L"method", getFillMethod( iter->op ).c_str());
appendValueAttribute(&m_fill, L"method", getFillMethod( iter->op ));
}break;
case fillShadeColors:
{
appendValueAttribute(&m_fill, L"colors", getFillColorString( iter->opComplex, iter->op ).c_str());
appendValueAttribute(&m_fill, L"colors", getFillColorString( iter->opComplex, iter->op ));
}break;
case fillFocus:
{
appendValueAttribute(&m_fill, L"focus", ( FormatUtils::IntToWideString( iter->op ) + L"%" ).c_str());
appendValueAttribute(&m_fill, L"focus", ( FormatUtils::IntToWideString( iter->op ) + L"%" ));
}break;
case fillType:
{
appendValueAttribute(&m_fill, L"type", getFillType( iter->op ).c_str());
appendValueAttribute(&m_fill, L"type", getFillType( iter->op ));
}break;
case fillBlip:
{
@ -523,28 +523,28 @@ namespace DocFileFormat
if ( (pFillBlip != NULL) && copyPicture(pFillBlip) )
{
appendValueAttribute(&m_fill, L"r:id", std::wstring(( L"rId" ) + FormatUtils::IntToWideString(m_nImageId) ).c_str());
appendValueAttribute(&m_fill, L"r:id", std::wstring(( L"rId" ) + FormatUtils::IntToWideString(m_nImageId) ));
}
}break;
case fillOpacity:
{
appendValueAttribute(&m_fill, L"opacity", ( FormatUtils::IntToWideString( iter->op ) + L"f" ).c_str());
appendValueAttribute(&m_fill, L"opacity", ( FormatUtils::IntToWideString( iter->op ) + L"f" ));
}
break;
case fillBackOpacity:
{
appendValueAttribute(&m_fill, L"opacity2", (FormatUtils::IntToWideString(iter->op) + L"f").c_str());
appendValueAttribute(&m_fill, L"opacity2", (FormatUtils::IntToWideString(iter->op) + L"f"));
}break;
// SHADOW
case shadowType:
{
appendValueAttribute(&m_shadow, L"type", getShadowType(iter->op).c_str());
appendValueAttribute(&m_shadow, L"type", getShadowType(iter->op));
}break;
case shadowColor:
{
RGBColor shadowColor((int)iter->op, RedFirst);
appendValueAttribute(&m_shadow, L"color", ( std::wstring( L"#" ) + shadowColor.SixDigitHexCode ).c_str());
appendValueAttribute(&m_shadow, L"color", ( std::wstring( L"#" ) + shadowColor.SixDigitHexCode ));
}break;
case shadowOffsetX:
{
@ -574,7 +574,7 @@ namespace DocFileFormat
{
double shadowOpa = (iter->op / pow( (double)2, (double)16));
appendValueAttribute(&m_shadow, L"opacity", FormatUtils::DoubleToFormattedWideString( shadowOpa, L"%.2f" ).c_str());
appendValueAttribute(&m_shadow, L"opacity", FormatUtils::DoubleToFormattedWideString( shadowOpa, L"%.2f" ));
}break;
case shadowStyleBooleanProperties:
{
@ -595,7 +595,7 @@ namespace DocFileFormat
BlipStoreEntry* oBlip = static_cast<BlipStoreEntry*>(m_pBlipStore->Children[index]);
if (copyPicture(oBlip))
{
appendValueAttribute(&m_imagedata, L"r:id", ( std::wstring( L"rId" ) + FormatUtils::IntToWideString(m_nImageId) ).c_str());
appendValueAttribute(&m_imagedata, L"r:id", ( std::wstring( L"rId" ) + FormatUtils::IntToWideString(m_nImageId) ));
}
}
}break;
@ -604,7 +604,7 @@ namespace DocFileFormat
std::wstring name;
FormatUtils::GetSTLCollectionFromBytes<std::wstring>(&name, iter->opComplex, iter->op, ENCODING_UTF16);
if (!name.empty())
appendValueAttribute(&m_imagedata, L"o:title", FormatUtils::XmlEncode(name).c_str());
appendValueAttribute(&m_imagedata, L"o:title", FormatUtils::XmlEncode(name));
}break;
// 3D STYLE
case f3D:
@ -616,37 +616,37 @@ namespace DocFileFormat
{
EmuValue backwardValue( (int)iter->op );
std::wstring depth = FormatUtils::DoubleToWideString( backwardValue.ToPoints() ) + L"pt";
appendValueAttribute(&m_3dstyle, L"backdepth", depth.c_str());
appendValueAttribute(&m_3dstyle, L"backdepth", depth);
}break;
case c3DAmbientIntensity:
{
std::wstring intens = FormatUtils::IntToWideString((int)iter->op) + L"f";
appendValueAttribute(&m_3dstyle, L"brightness", intens.c_str());
appendValueAttribute(&m_3dstyle, L"brightness", intens);
}break;
case c3DSpecularAmt:
{
std::wstring amt = FormatUtils::IntToWideString((int)iter->op) + L"f";
appendValueAttribute(&m_3dstyle, L"specularity", amt.c_str());
appendValueAttribute(&m_3dstyle, L"specularity", amt);
}break;
case c3DDiffuseAmt:
{
std::wstring amt = FormatUtils::IntToWideString((int)iter->op) + L"f";
appendValueAttribute(&m_3dstyle, L"diffusity", amt.c_str());
appendValueAttribute(&m_3dstyle, L"diffusity", amt);
}break;
case c3DKeyIntensity:
{
std::wstring amt = FormatUtils::IntToWideString((int)iter->op);
appendValueAttribute(&m_3dstyle, L"lightlevel", amt.c_str());
appendValueAttribute(&m_3dstyle, L"lightlevel", amt);
}break;
case c3DExtrusionColor:
{
std::wstring color = FormatUtils::IntToFormattedWideString(iter->op, L"#%06x");
appendValueAttribute(&m_3dstyle, L"color", color.c_str());
appendValueAttribute(&m_3dstyle, L"color", color);
}break;
case c3DSkewAngle:
{
FixedPointNumber skewAngle( iter->op );
appendValueAttribute(&m_3dstyle, L"skewangle", FormatUtils::DoubleToWideString( skewAngle.ToAngle() ).c_str());
appendValueAttribute(&m_3dstyle, L"skewangle", FormatUtils::DoubleToWideString( skewAngle.ToAngle() ));
}break;
case c3DXViewpoint:
{
@ -706,10 +706,10 @@ namespace DocFileFormat
if (0 <= text.find(L"\n"))
{
m_textpath.AppendText(text.c_str());
m_textpath.AppendText(text);
}
text = ReplaceString(text, L"\n", L"&#xA;");
appendValueAttribute(&m_textpath, L"string", text.c_str());
appendValueAttribute(&m_textpath, L"string", text);
}break;
case gtextFont:
{
@ -772,7 +772,7 @@ namespace DocFileFormat
std::wstring path = ParsePath(options);
if (false == path.empty())
m_pXmlWriter->WriteAttribute (L"path", path.c_str());
m_pXmlWriter->WriteAttribute (L"path", path);
}break;
default:
{
@ -786,7 +786,7 @@ namespace DocFileFormat
std::wstring path = ParsePath(options);
if (false == path.empty())
m_pXmlWriter->WriteAttribute (L"path", path.c_str());
m_pXmlWriter->WriteAttribute (L"path", path);
}
if ( !filled )
@ -806,7 +806,7 @@ namespace DocFileFormat
if ( ( xCoord > 0 ) && ( yCoord > 0 ) )
{
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString( xCoord ) + L"," + FormatUtils::IntToWideString( yCoord ) ).c_str() );
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString( xCoord ) + L"," + FormatUtils::IntToWideString( yCoord ) ));
}
int nCode = 0;
@ -819,7 +819,7 @@ namespace DocFileFormat
{
if (nAdjValues)
{
m_pXmlWriter->WriteAttribute(L"arcsize", adjValues[0].c_str());
m_pXmlWriter->WriteAttribute(L"arcsize", adjValues[0]);
}
}
else
@ -831,7 +831,7 @@ namespace DocFileFormat
for (int i = 1; i < nAdjValues; ++i)
adjTag += std::wstring(L",") + adjValues[i];
m_pXmlWriter->WriteAttribute(L"adj", adjTag.c_str());
m_pXmlWriter->WriteAttribute(L"adj", adjTag);
}
}
@ -853,7 +853,7 @@ namespace DocFileFormat
}
if ( !offset.empty() )
{
appendValueAttribute(&m_shadow, L"offset", offset.c_str());
appendValueAttribute(&m_shadow, L"offset", offset);
}
std::wstring offset2;
@ -873,13 +873,13 @@ namespace DocFileFormat
if (!offset2.empty())
{
appendValueAttribute(&m_shadow, L"offset2", offset2.c_str());
appendValueAttribute(&m_shadow, L"offset2", offset2);
}
//build shadow origin
if ( ( ShadowOriginX != 0 ) && ( ShadowOriginY != 0 ) )
{
appendValueAttribute(&m_shadow, L"origin", (FormatUtils::DoubleToWideString(shadowOriginX) + std::wstring(L"," ) + FormatUtils::DoubleToWideString(shadowOriginY)).c_str());
appendValueAttribute(&m_shadow, L"origin", (FormatUtils::DoubleToWideString(shadowOriginX) + std::wstring(L"," ) + FormatUtils::DoubleToWideString(shadowOriginY)));
}
// write shadow
@ -890,7 +890,7 @@ namespace DocFileFormat
appendValueAttribute(&m_shadow, L"on", L"t" );
}
m_pXmlWriter->WriteString(m_shadow.GetXMLString().c_str());
m_pXmlWriter->WriteString(m_shadow.GetXMLString());
}
//write 3d style
if (m_3dstyle.GetAttributeCount() > 0)
@ -918,7 +918,7 @@ namespace DocFileFormat
viewPoint += FormatUtils::IntToWideString( ViewPointZ ) + L"pt";
}
appendValueAttribute(&m_3dstyle, L"viewpoint", viewPoint.c_str());
appendValueAttribute(&m_3dstyle, L"viewpoint", viewPoint);
}
// write the viewpointorigin
if ( ( viewPointOriginX != 0 ) || ( viewPointOriginY != 0 ) )
@ -936,10 +936,10 @@ namespace DocFileFormat
viewPointOrigin += FormatUtils::DoubleToFormattedWideString( viewPointOriginY, L"%.2f" );
}
appendValueAttribute(&m_3dstyle, L"viewpointorigin", viewPointOrigin.c_str());
appendValueAttribute(&m_3dstyle, L"viewpointorigin", viewPointOrigin);
}
m_pXmlWriter->WriteString(m_3dstyle.GetXMLString().c_str());
m_pXmlWriter->WriteString(m_3dstyle.GetXMLString());
}
// write wrap
if (m_pSpa)
@ -949,19 +949,19 @@ namespace DocFileFormat
if (wrap != L"through")
{
m_pXmlWriter->WriteNodeBegin( L"w10:wrap", true );
m_pXmlWriter->WriteAttribute( L"type", wrap.c_str() );
m_pXmlWriter->WriteAttribute( L"type", wrap );
m_pXmlWriter->WriteNodeEnd ( L"w10:wrap", true );
}
}
// write fill
if (m_fill.GetAttributeCount())
{
m_pXmlWriter->WriteString(m_fill.GetXMLString().c_str());
m_pXmlWriter->WriteString(m_fill.GetXMLString());
}
// write imagedata
if (m_imagedata.GetAttributeCount())
{
m_pXmlWriter->WriteString(m_imagedata.GetXMLString().c_str());
m_pXmlWriter->WriteString(m_imagedata.GetXMLString());
}
if ( pShape->fBackground )
@ -972,13 +972,13 @@ namespace DocFileFormat
// write stroke
if (m_stroke.GetAttributeCount())
{
m_pXmlWriter->WriteString(m_stroke.GetXMLString().c_str());
m_pXmlWriter->WriteString(m_stroke.GetXMLString());
}
// text path
if (m_textpath.GetAttributeCount())
{
appendValueAttribute(&m_textpath, L"style", FormatUtils::XmlEncode(m_textPathStyle).c_str());
m_pXmlWriter->WriteString(m_textpath.GetXMLString().c_str());
appendValueAttribute(&m_textpath, L"style", FormatUtils::XmlEncode(m_textPathStyle));
m_pXmlWriter->WriteString(m_textpath.GetXMLString());
}
if (freeform)
{
@ -1942,7 +1942,7 @@ namespace DocFileFormat
DrawingPrimitive *primitive = dynamic_cast<DrawingPrimitive *>(primitives->at(index));
m_pXmlWriter->WriteNodeBegin(primitive->strVmlType.c_str(), true );
m_pXmlWriter->WriteNodeBegin(primitive->strVmlType, true );
if (primitive->type == 0x0007)
{
@ -1993,7 +1993,7 @@ namespace DocFileFormat
}
}
m_pXmlWriter->WriteNodeEnd( primitive->strVmlType.c_str() );
m_pXmlWriter->WriteNodeEnd( primitive->strVmlType );
index++;
return index;
@ -2009,8 +2009,8 @@ namespace DocFileFormat
std::wstring strId = std::wstring(L"_x0000_s") + FormatUtils::IntToWideString(1024 + count_vml_objects);
count_vml_objects++;
//m_pXmlWriter->WriteAttribute ( L"id") , strId.c_str());
m_pXmlWriter->WriteAttribute ( L"o:spid", strId.c_str());
//m_pXmlWriter->WriteAttribute ( L"id") , strId);
m_pXmlWriter->WriteAttribute ( L"o:spid", strId);
std::wstring strStyle = L"position:absolute;visibility:visible;mso-wrap-style:square;";
@ -2025,8 +2025,8 @@ namespace DocFileFormat
std::wstring strStart = FormatUtils::IntToWideString(line->xaStart + primitive->xa) + L"," + FormatUtils::IntToWideString(line->yaStart + primitive->ya);
std::wstring strEnd = FormatUtils::IntToWideString(line->xaEnd + primitive->xa) + L"," + FormatUtils::IntToWideString(line->yaEnd + primitive->ya);
m_pXmlWriter->WriteAttribute(L"from", strStart.c_str() );
m_pXmlWriter->WriteAttribute(L"to", strEnd.c_str());
m_pXmlWriter->WriteAttribute(L"from", strStart);
m_pXmlWriter->WriteAttribute(L"to", strEnd);
}
else
{
@ -2054,8 +2054,8 @@ namespace DocFileFormat
std::wstring strSize = FormatUtils::IntToWideString(primitive->dxa) + L"," + FormatUtils::IntToWideString(primitive->dya);
std::wstring strOrigin = FormatUtils::IntToWideString(primitive->xa) + L"," + FormatUtils::IntToWideString(primitive->ya);
m_pXmlWriter->WriteAttribute( L"coordsize", strSize.c_str());
//m_pXmlWriter->WriteAttribute( L"coordorigin"), strOrigin.c_str());
m_pXmlWriter->WriteAttribute( L"coordsize", strSize);
//m_pXmlWriter->WriteAttribute( L"coordorigin"), strOrigin);
}
else
{
@ -2070,23 +2070,23 @@ namespace DocFileFormat
if (primitive->type > 1)
{
m_pXmlWriter->WriteAttribute( L"fillColor", FormatUtils::IntToFormattedWideString(primitive->fillFore, L"#%06x").c_str());
m_pXmlWriter->WriteAttribute( L"fillColor", FormatUtils::IntToFormattedWideString(primitive->fillFore, L"#%06x"));
}
m_pXmlWriter->WriteAttribute( L"style", strStyle.c_str());
m_pXmlWriter->WriteAttribute( L"style", strStyle);
std::wstring strStrokeWeight = FormatUtils::IntToWideString(primitive->lineWeight / 20) + L"pt";
if (primitive->lineWeight > 20)
m_pXmlWriter->WriteAttribute( L"strokeweight", strStrokeWeight.c_str());
m_pXmlWriter->WriteAttribute( L"strokeweight", strStrokeWeight);
if (primitive->type > 0)
m_pXmlWriter->WriteAttribute( L"strokecolor", FormatUtils::IntToFormattedWideString(primitive->lineColor, L"#%06x").c_str());
m_pXmlWriter->WriteAttribute( L"strokecolor", FormatUtils::IntToFormattedWideString(primitive->lineColor, L"#%06x"));
m_pXmlWriter->WriteNodeEnd( L"", true, false );
if (primitive->type > 1 && primitive->fillPattern > 1)
{
m_pXmlWriter->WriteNodeBegin(L"v:fill", true );
m_pXmlWriter->WriteAttribute( L"color2", FormatUtils::IntToFormattedWideString(primitive->fillBack, L"#%06x").c_str());
m_pXmlWriter->WriteAttribute( L"color2", FormatUtils::IntToFormattedWideString(primitive->fillBack, L"#%06x"));
m_pXmlWriter->WriteAttribute( L"type", L"pattern");
m_pXmlWriter->WriteNodeEnd( L"", true, false );
m_pXmlWriter->WriteNodeEnd( L"v:fill" );
@ -2096,7 +2096,7 @@ namespace DocFileFormat
{
m_pXmlWriter->WriteNodeBegin(L"v:stroke", true );
std::wstring strDashStyle = FormatUtils::IntToWideString(primitive->lineStyle) + L" 1";
m_pXmlWriter->WriteAttribute( L"dashstyle", strDashStyle.c_str());
m_pXmlWriter->WriteAttribute( L"dashstyle", strDashStyle);
m_pXmlWriter->WriteNodeEnd( L"", true, false );
m_pXmlWriter->WriteNodeEnd( L"v:stroke" );
}

View File

@ -133,11 +133,11 @@ namespace DocFileFormat
ConversionContext* m_context;
PictureDescriptor* m_pict;
XMLTools::XMLElement<wchar_t> m_fill;
XMLTools::XMLElement<wchar_t> m_stroke;
XMLTools::XMLElement<wchar_t> m_shadow;
XMLTools::XMLElement<wchar_t> m_imagedata;
XMLTools::XMLElement<wchar_t> m_3dstyle;
XMLTools::XMLElement<wchar_t> m_textpath;
XMLTools::XMLElement m_fill;
XMLTools::XMLElement m_stroke;
XMLTools::XMLElement m_shadow;
XMLTools::XMLElement m_imagedata;
XMLTools::XMLElement m_3dstyle;
XMLTools::XMLElement m_textpath;
};
}

View File

@ -38,7 +38,7 @@ namespace DocFileFormat
{
VMLShapeTypeMapping::VMLShapeTypeMapping (XMLTools::CStringXmlWriter* pWriter, bool isInlineShape) : PropertiesMapping(pWriter), _lock(NULL), _isInlineShape(isInlineShape)
{
this->_lock = new XMLTools::XMLElement<wchar_t>( L"o:lock");
this->_lock = new XMLTools::XMLElement( L"o:lock");
appendValueAttribute( this->_lock, L"v:ext", L"edit");
}
@ -58,21 +58,21 @@ namespace DocFileFormat
m_pXmlWriter->WriteNodeBegin( L"v:shapetype", true );
// ID
m_pXmlWriter->WriteAttribute( L"id", GenerateTypeId( pShape ).c_str() );
m_pXmlWriter->WriteAttribute( L"id", GenerateTypeId( pShape ));
// Coordinate System
m_pXmlWriter->WriteAttribute( L"coordsize", L"21600,21600");
// Shape Code
m_pXmlWriter->WriteAttribute( L"o:spt", FormatUtils::IntToWideString( pShape->GetTypeCode() ).c_str() );
m_pXmlWriter->WriteAttribute( L"o:spt", FormatUtils::IntToWideString( pShape->GetTypeCode() ));
// Adj
if (pShape->AdjustmentValues.length())
m_pXmlWriter->WriteAttribute( L"adj", pShape->AdjustmentValues.c_str() );
m_pXmlWriter->WriteAttribute( L"adj", pShape->AdjustmentValues);
// Path
if (!pShape->Path.empty())
m_pXmlWriter->WriteAttribute( L"path", pShape->Path.c_str() );
m_pXmlWriter->WriteAttribute( L"path", pShape->Path);
else if (_isInlineShape)
m_pXmlWriter->WriteAttribute( L"path", L"m@4@5l@4@11@9@11@9@5xe");
@ -99,12 +99,12 @@ namespace DocFileFormat
if (!pShape->Textpath.empty())
{
m_pXmlWriter->WriteNodeBegin( L"v:textpath", true );
m_pXmlWriter->WriteString( pShape->Textpath.c_str() );
m_pXmlWriter->WriteString( pShape->Textpath );
m_pXmlWriter->WriteNodeEnd( L"", true );
}
// Stroke
m_pXmlWriter->WriteNodeBegin( L"v:stroke", true );
m_pXmlWriter->WriteAttribute( L"joinstyle", FormatUtils::MapValueToWideString( pShape->Joins, &JoinStyleMap[0][0], 3, 6 ).c_str() );
m_pXmlWriter->WriteAttribute( L"joinstyle", FormatUtils::MapValueToWideString( pShape->Joins, &JoinStyleMap[0][0], 3, 6 ));
m_pXmlWriter->WriteNodeEnd( L"", true );
// Formulas
@ -115,7 +115,7 @@ namespace DocFileFormat
for ( std::list<std::wstring>::iterator iter = pShape->Formulas.begin(); iter != pShape->Formulas.end(); iter++ )
{
m_pXmlWriter->WriteNodeBegin( L"v:f", true );
m_pXmlWriter->WriteAttribute( L"eqn", iter->c_str() );
m_pXmlWriter->WriteAttribute( L"eqn", *iter );
m_pXmlWriter->WriteNodeEnd( L"", true );
}
@ -147,19 +147,19 @@ namespace DocFileFormat
m_pXmlWriter->WriteAttribute( L"gradientshapeok", L"t" );
if (pShape->Limo.length())
m_pXmlWriter->WriteAttribute( L"limo", pShape->Limo.c_str() );
m_pXmlWriter->WriteAttribute( L"limo", pShape->Limo );
if (pShape->ConnectorLocations.length())
{
m_pXmlWriter->WriteAttribute( L"o:connecttype", L"custom");
m_pXmlWriter->WriteAttribute( L"o:connectlocs", pShape->ConnectorLocations.c_str() );
m_pXmlWriter->WriteAttribute( L"o:connectlocs", pShape->ConnectorLocations);
}
if (pShape->TextBoxRectangle.length())
m_pXmlWriter->WriteAttribute( L"textboxrect", pShape->TextBoxRectangle.c_str() );
m_pXmlWriter->WriteAttribute( L"textboxrect", pShape->TextBoxRectangle);
if (pShape->ConnectorAngles.length())
m_pXmlWriter->WriteAttribute( L"o:connectangles", pShape->ConnectorAngles.c_str() );
m_pXmlWriter->WriteAttribute( L"o:connectangles", pShape->ConnectorAngles);
}
WordArtTextType* wordArt = dynamic_cast<WordArtTextType*>(pShape);
if (wordArt)
@ -177,7 +177,7 @@ namespace DocFileFormat
if ( _lock->GetAttributeCount() > 1 )
{
m_pXmlWriter->WriteString( _lock->GetXMLString().c_str() );
m_pXmlWriter->WriteString( _lock->GetXMLString() );
}
// Handles
@ -190,22 +190,22 @@ namespace DocFileFormat
m_pXmlWriter->WriteNodeBegin( L"v:h", true );
if (iter->position.length())
m_pXmlWriter->WriteAttribute( L"position", iter->position.c_str() );
m_pXmlWriter->WriteAttribute( L"position", iter->position);
if (iter->switchHandle.length())
m_pXmlWriter->WriteAttribute( L"switch", iter->switchHandle.c_str() );
m_pXmlWriter->WriteAttribute( L"switch", iter->switchHandle);
if (iter->xrange.length())
m_pXmlWriter->WriteAttribute( L"xrange", iter->xrange.c_str() );
m_pXmlWriter->WriteAttribute( L"xrange", iter->xrange);
if (iter->yrange.length())
m_pXmlWriter->WriteAttribute( L"yrange", iter->yrange.c_str() );
m_pXmlWriter->WriteAttribute( L"yrange", iter->yrange);
if (iter->polar.length())
m_pXmlWriter->WriteAttribute( L"polar", iter->polar.c_str() );
m_pXmlWriter->WriteAttribute( L"polar", iter->polar);
if (iter->radiusrange.length())
m_pXmlWriter->WriteAttribute( L"radiusrange", iter->radiusrange.c_str() );
m_pXmlWriter->WriteAttribute( L"radiusrange", iter->radiusrange );
m_pXmlWriter->WriteNodeEnd( L"", true );
}

View File

@ -42,8 +42,8 @@ namespace DocFileFormat
class VMLShapeTypeMapping: public PropertiesMapping, public IMapping
{
private:
XMLTools::XMLElement<wchar_t> *_lock;
bool _isInlineShape;
XMLTools::XMLElement * _lock;
bool _isInlineShape;
public:
VMLShapeTypeMapping(XMLTools::CStringXmlWriter* writer, bool isInlineShape = false );

View File

@ -371,9 +371,9 @@ namespace DocFileFormat
if ( ( bookmarkName != NULL ) && ( *bookmarkName == L"_PictureBullets" ) )
{
for (unsigned int j = BookmarkStartEndCPs[i].first, k = 0; j < this->Text->size(); ++j, ++k )
for (unsigned int j = BookmarkStartEndCPs[i].first, k = 0; j < Text->size(); ++j, ++k )
{
if ( this->Text->at( j ) == 1 )
if ( Text->at( j ) == 1 )
{
PictureBulletsCPsMap.insert (std::make_pair( k, j ));
}
@ -424,7 +424,7 @@ namespace DocFileFormat
int cp = SectionPlex->CharacterPositions[i + 1];
//Get the SEPX
VirtualStreamReader wordReader( this->WordDocumentStream, sed->fcSepx, bOlderVersion);
VirtualStreamReader wordReader( WordDocumentStream, sed->fcSepx, bOlderVersion);
//!!!TODO: cbSepx is the size in bytes of the rest properties part!!!
short cbSepx = wordReader.ReadInt16();
@ -672,7 +672,7 @@ namespace DocFileFormat
//last fkp?
//use full table
if ( i++ == ( this->AllChpxFkps->size() - 1 ) )
if ( i++ == ( AllChpxFkps->size() - 1 ) )
{
max = fkp->rgfcSize;
}

View File

@ -183,7 +183,7 @@ namespace DocFileFormat
void WordprocessingDocument::SaveDocument()
{
std::wstring pathWord = m_strOutputPath + FILE_SEPARATOR_STR + _T( "word" ) ;
//OOX::CPath pathWord = CString(m_strOutputPath.c_str()) + FILE_SEPARATOR_STR + _T( "word" );
//OOX::CPath pathWord = CString(m_strOutputPath) + FILE_SEPARATOR_STR + _T( "word" );
//FileSystem::Directory::CreateDirectory( pathWord.GetPath() );
NSDirectory::CreateDirectory( pathWord );

View File

@ -32,14 +32,12 @@
#ifndef DOC_FORMAT_LIB
#define DOC_FORMAT_LIB
#include <string>
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
#else
#include "../../DesktopEditor/common/ASCVariant.h"
#endif
#include "../../DesktopEditor/common/ASCVariant.h"
struct ProgressCallback;
class COfficeDocFile

View File

@ -32,7 +32,7 @@ INCLUDEPATH += \
../../../DesktopEditor/xml/libxml2/include
core_mac {
QMAKE_MAC_SDK = macosx10.11
#QMAKE_MAC_SDK = macosx10.11
}
SOURCES += \
@ -43,10 +43,12 @@ SOURCES += \
../../DocDocxConverter/Spa.cpp \
../../DocDocxConverter/OleObject.cpp
build_fast {
core_release {
SOURCES += \
docformatlib_converter.cpp
} else {
}
core_debug {
SOURCES += \
../../DocDocxConverter/AnnotationReferenceDescriptor.cpp \
../../DocDocxConverter/CharacterPropertiesMapping.cpp \

View File

@ -29,6 +29,7 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "../../DocDocxConverter/AnnotationReferenceDescriptor.cpp"
#include "../../DocDocxConverter/CharacterPropertiesMapping.cpp"
#include "../../DocDocxConverter/Converter.cpp"

View File

@ -0,0 +1,920 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
6967B2F91E27C26800A129E2 /* DocFormatLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B2F71E27C26800A129E2 /* DocFormatLib.cpp */; };
6967B3E11E27C2D500A129E2 /* pole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B3DF1E27C2D500A129E2 /* pole.cpp */; };
6967B4C31E27C52700A129E2 /* AnnotationReferenceDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B3E71E27C52700A129E2 /* AnnotationReferenceDescriptor.cpp */; };
6967B4C41E27C52700A129E2 /* CharacterPropertiesMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B3ED1E27C52700A129E2 /* CharacterPropertiesMapping.cpp */; };
6967B4C51E27C52700A129E2 /* Converter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B3F41E27C52700A129E2 /* Converter.cpp */; };
6967B4C61E27C52700A129E2 /* DocumentMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B3F71E27C52700A129E2 /* DocumentMapping.cpp */; };
6967B4C71E27C52700A129E2 /* DocumentProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B3F91E27C52700A129E2 /* DocumentProperties.cpp */; };
6967B4C81E27C52700A129E2 /* DrawingPrimitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B3FD1E27C52700A129E2 /* DrawingPrimitives.cpp */; };
6967B4C91E27C52700A129E2 /* EncryptionHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4001E27C52700A129E2 /* EncryptionHeader.cpp */; };
6967B4CA1E27C52700A129E2 /* FontFamilyName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4071E27C52700A129E2 /* FontFamilyName.cpp */; };
6967B4CB1E27C52700A129E2 /* FontTableMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4091E27C52700A129E2 /* FontTableMapping.cpp */; };
6967B4CC1E27C52700A129E2 /* FooterMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B40B1E27C52700A129E2 /* FooterMapping.cpp */; };
6967B4CD1E27C52700A129E2 /* FormattedDiskPageCHPX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4101E27C52700A129E2 /* FormattedDiskPageCHPX.cpp */; };
6967B4CE1E27C52700A129E2 /* FormattedDiskPagePAPX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4121E27C52700A129E2 /* FormattedDiskPagePAPX.cpp */; };
6967B4CF1E27C52700A129E2 /* HeaderAndFooterTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4151E27C52700A129E2 /* HeaderAndFooterTable.cpp */; };
6967B4D01E27C52700A129E2 /* HeaderMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4171E27C52700A129E2 /* HeaderMapping.cpp */; };
6967B4D11E27C52700A129E2 /* LanguageIdMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B41D1E27C52700A129E2 /* LanguageIdMapping.cpp */; };
6967B4D21E27C52700A129E2 /* ListData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4201E27C52700A129E2 /* ListData.cpp */; };
6967B4D31E27C52700A129E2 /* ListLevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4251E27C52700A129E2 /* ListLevel.cpp */; };
6967B4D41E27C52700A129E2 /* ListTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4271E27C52700A129E2 /* ListTable.cpp */; };
6967B4D51E27C52700A129E2 /* MainDocumentMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4291E27C52700A129E2 /* MainDocumentMapping.cpp */; };
6967B4D61E27C52700A129E2 /* NumberingMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B42C1E27C52700A129E2 /* NumberingMapping.cpp */; };
6967B4D71E27C52700A129E2 /* Record.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4471E27C52700A129E2 /* Record.cpp */; };
6967B4D81E27C52700A129E2 /* RecordFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4491E27C52700A129E2 /* RecordFactory.cpp */; };
6967B4D91E27C52700A129E2 /* ShapeTypeFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4511E27C52700A129E2 /* ShapeTypeFactory.cpp */; };
6967B4DA1E27C52700A129E2 /* OleObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B47A1E27C52700A129E2 /* OleObject.cpp */; };
6967B4DB1E27C52700A129E2 /* OpenXmlPackage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B47D1E27C52700A129E2 /* OpenXmlPackage.cpp */; };
6967B4DC1E27C52700A129E2 /* ParagraphHeight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B47F1E27C52700A129E2 /* ParagraphHeight.cpp */; };
6967B4DD1E27C52700A129E2 /* ParagraphPropertiesMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4811E27C52700A129E2 /* ParagraphPropertiesMapping.cpp */; };
6967B4DE1E27C52700A129E2 /* ParagraphPropertyExceptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4831E27C52700A129E2 /* ParagraphPropertyExceptions.cpp */; };
6967B4DF1E27C52700A129E2 /* PictureDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4851E27C52700A129E2 /* PictureDescriptor.cpp */; };
6967B4E01E27C52700A129E2 /* PieceTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4881E27C52700A129E2 /* PieceTable.cpp */; };
6967B4E11E27C52700A129E2 /* PropertiesMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B48B1E27C52700A129E2 /* PropertiesMapping.cpp */; };
6967B4E21E27C52700A129E2 /* PropertyExceptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B48D1E27C52700A129E2 /* PropertyExceptions.cpp */; };
6967B4E31E27C52700A129E2 /* RevisionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B48F1E27C52700A129E2 /* RevisionData.cpp */; };
6967B4E41E27C52700A129E2 /* SectionPropertiesMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4931E27C52700A129E2 /* SectionPropertiesMapping.cpp */; };
6967B4E51E27C52700A129E2 /* SettingsMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4961E27C52700A129E2 /* SettingsMapping.cpp */; };
6967B4E61E27C52700A129E2 /* SinglePropertyModifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4991E27C52700A129E2 /* SinglePropertyModifier.cpp */; };
6967B4E71E27C52700A129E2 /* Spa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B49B1E27C52700A129E2 /* Spa.cpp */; };
6967B4E81E27C52700A129E2 /* StyleSheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4A01E27C52700A129E2 /* StyleSheet.cpp */; };
6967B4E91E27C52700A129E2 /* StyleSheetDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4A21E27C52700A129E2 /* StyleSheetDescription.cpp */; };
6967B4EA1E27C52700A129E2 /* StyleSheetInformation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4A41E27C52700A129E2 /* StyleSheetInformation.cpp */; };
6967B4EB1E27C52700A129E2 /* StyleSheetMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4A61E27C52700A129E2 /* StyleSheetMapping.cpp */; };
6967B4EC1E27C52700A129E2 /* TableCellPropertiesMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4A91E27C52700A129E2 /* TableCellPropertiesMapping.cpp */; };
6967B4ED1E27C52700A129E2 /* TableMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4AC1E27C52700A129E2 /* TableMapping.cpp */; };
6967B4EE1E27C52700A129E2 /* TablePropertiesMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4AE1E27C52700A129E2 /* TablePropertiesMapping.cpp */; };
6967B4EF1E27C52700A129E2 /* TableRowPropertiesMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4B11E27C52700A129E2 /* TableRowPropertiesMapping.cpp */; };
6967B4F01E27C52700A129E2 /* TextboxMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4B41E27C52700A129E2 /* TextboxMapping.cpp */; };
6967B4F11E27C52700A129E2 /* VMLPictureMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4B81E27C52700A129E2 /* VMLPictureMapping.cpp */; };
6967B4F21E27C52700A129E2 /* VMLShapeMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4BA1E27C52700A129E2 /* VMLShapeMapping.cpp */; };
6967B4F31E27C52700A129E2 /* VMLShapeTypeMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4BC1E27C52700A129E2 /* VMLShapeTypeMapping.cpp */; };
6967B4F41E27C52700A129E2 /* WordDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4BF1E27C52700A129E2 /* WordDocument.cpp */; };
6967B4F51E27C52700A129E2 /* WordprocessingDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B4C11E27C52700A129E2 /* WordprocessingDocument.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
6967B2E91E27C23A00A129E2 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
6967B2EB1E27C23A00A129E2 /* libDocFormatLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libDocFormatLib.a; sourceTree = BUILT_PRODUCTS_DIR; };
6967B2F71E27C26800A129E2 /* DocFormatLib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DocFormatLib.cpp; path = ../../DocFormatLib.cpp; sourceTree = "<group>"; };
6967B2F81E27C26800A129E2 /* DocFormatLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DocFormatLib.h; path = ../../DocFormatLib.h; sourceTree = "<group>"; };
6967B2FB1E27C2A100A129E2 /* Aggregat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Aggregat.h; sourceTree = "<group>"; };
6967B2FC1E27C2A100A129E2 /* Callback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Callback.h; sourceTree = "<group>"; };
6967B2FD1E27C2A100A129E2 /* FormatUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormatUtils.h; sourceTree = "<group>"; };
6967B2FE1E27C2A100A129E2 /* IOperand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOperand.h; sourceTree = "<group>"; };
6967B2FF1E27C2A100A129E2 /* IVirtualConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IVirtualConstructor.h; sourceTree = "<group>"; };
6967B3001E27C2A100A129E2 /* LanguageCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguageCodes.h; sourceTree = "<group>"; };
6967B3011E27C2A100A129E2 /* Singleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Singleton.h; sourceTree = "<group>"; };
6967B3021E27C2A100A129E2 /* SPRMCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPRMCodes.h; sourceTree = "<group>"; };
6967B3031E27C2A100A129E2 /* TargetOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetOptions.h; sourceTree = "<group>"; };
6967B3041E27C2A100A129E2 /* TextMark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextMark.h; sourceTree = "<group>"; };
6967B3051E27C2A100A129E2 /* utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf8.h; sourceTree = "<group>"; };
6967B3061E27C2A100A129E2 /* XmlTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XmlTools.h; sourceTree = "<group>"; };
6967B3DF1E27C2D500A129E2 /* pole.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pole.cpp; path = ../../../../Common/3dParty/pole/pole.cpp; sourceTree = "<group>"; };
6967B3E01E27C2D500A129E2 /* pole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pole.h; path = ../../../../Common/3dParty/pole/pole.h; sourceTree = "<group>"; };
6967B3E51E27C52700A129E2 /* AbstractOpenXmlMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractOpenXmlMapping.h; sourceTree = "<group>"; };
6967B3E61E27C52700A129E2 /* AnnotationOwnerList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnotationOwnerList.h; sourceTree = "<group>"; };
6967B3E71E27C52700A129E2 /* AnnotationReferenceDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnnotationReferenceDescriptor.cpp; sourceTree = "<group>"; };
6967B3E81E27C52700A129E2 /* AnnotationReferenceDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnotationReferenceDescriptor.h; sourceTree = "<group>"; };
6967B3E91E27C52700A129E2 /* AutoSummaryInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoSummaryInfo.h; sourceTree = "<group>"; };
6967B3EA1E27C52700A129E2 /* BookmarkFirst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookmarkFirst.h; sourceTree = "<group>"; };
6967B3EB1E27C52700A129E2 /* BorderCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BorderCode.h; sourceTree = "<group>"; };
6967B3EC1E27C52700A129E2 /* ByteStructure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteStructure.h; sourceTree = "<group>"; };
6967B3ED1E27C52700A129E2 /* CharacterPropertiesMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CharacterPropertiesMapping.cpp; sourceTree = "<group>"; };
6967B3EE1E27C52700A129E2 /* CharacterPropertiesMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterPropertiesMapping.h; sourceTree = "<group>"; };
6967B3EF1E27C52700A129E2 /* CharacterPropertyExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterPropertyExceptions.h; sourceTree = "<group>"; };
6967B3F01E27C52700A129E2 /* CharacterRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterRange.h; sourceTree = "<group>"; };
6967B3F11E27C52700A129E2 /* CommentsMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommentsMapping.h; sourceTree = "<group>"; };
6967B3F21E27C52700A129E2 /* ContentTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentTypes.h; sourceTree = "<group>"; };
6967B3F31E27C52700A129E2 /* ConversionContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConversionContext.h; sourceTree = "<group>"; };
6967B3F41E27C52700A129E2 /* Converter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Converter.cpp; sourceTree = "<group>"; };
6967B3F51E27C52700A129E2 /* Converter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Converter.h; sourceTree = "<group>"; };
6967B3F61E27C52700A129E2 /* DateAndTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateAndTime.h; sourceTree = "<group>"; };
6967B3F71E27C52700A129E2 /* DocumentMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentMapping.cpp; sourceTree = "<group>"; };
6967B3F81E27C52700A129E2 /* DocumentMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentMapping.h; sourceTree = "<group>"; };
6967B3F91E27C52700A129E2 /* DocumentProperties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentProperties.cpp; sourceTree = "<group>"; };
6967B3FA1E27C52700A129E2 /* DocumentProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentProperties.h; sourceTree = "<group>"; };
6967B3FB1E27C52700A129E2 /* DocumentTypographyInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentTypographyInfo.h; sourceTree = "<group>"; };
6967B3FC1E27C52700A129E2 /* DrawingObjectGrid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingObjectGrid.h; sourceTree = "<group>"; };
6967B3FD1E27C52700A129E2 /* DrawingPrimitives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingPrimitives.cpp; sourceTree = "<group>"; };
6967B3FE1E27C52700A129E2 /* DrawingPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingPrimitives.h; sourceTree = "<group>"; };
6967B3FF1E27C52700A129E2 /* EmuValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmuValue.h; sourceTree = "<group>"; };
6967B4001E27C52700A129E2 /* EncryptionHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EncryptionHeader.cpp; sourceTree = "<group>"; };
6967B4011E27C52700A129E2 /* EncryptionHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EncryptionHeader.h; sourceTree = "<group>"; };
6967B4021E27C52700A129E2 /* EndnoteDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EndnoteDescriptor.h; sourceTree = "<group>"; };
6967B4031E27C52700A129E2 /* EndnotesMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EndnotesMapping.h; sourceTree = "<group>"; };
6967B4041E27C52700A129E2 /* FieldCharacter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FieldCharacter.h; sourceTree = "<group>"; };
6967B4051E27C52700A129E2 /* FileInformationBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileInformationBlock.h; sourceTree = "<group>"; };
6967B4061E27C52700A129E2 /* FixedPointNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FixedPointNumber.h; sourceTree = "<group>"; };
6967B4071E27C52700A129E2 /* FontFamilyName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFamilyName.cpp; sourceTree = "<group>"; };
6967B4081E27C52700A129E2 /* FontFamilyName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontFamilyName.h; sourceTree = "<group>"; };
6967B4091E27C52700A129E2 /* FontTableMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontTableMapping.cpp; sourceTree = "<group>"; };
6967B40A1E27C52700A129E2 /* FontTableMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontTableMapping.h; sourceTree = "<group>"; };
6967B40B1E27C52700A129E2 /* FooterMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FooterMapping.cpp; sourceTree = "<group>"; };
6967B40C1E27C52700A129E2 /* FooterMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FooterMapping.h; sourceTree = "<group>"; };
6967B40D1E27C52700A129E2 /* FootnoteDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FootnoteDescriptor.h; sourceTree = "<group>"; };
6967B40E1E27C52700A129E2 /* FootnotesMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FootnotesMapping.h; sourceTree = "<group>"; };
6967B40F1E27C52700A129E2 /* FormattedDiskPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormattedDiskPage.h; sourceTree = "<group>"; };
6967B4101E27C52700A129E2 /* FormattedDiskPageCHPX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormattedDiskPageCHPX.cpp; sourceTree = "<group>"; };
6967B4111E27C52700A129E2 /* FormattedDiskPageCHPX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormattedDiskPageCHPX.h; sourceTree = "<group>"; };
6967B4121E27C52700A129E2 /* FormattedDiskPagePAPX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormattedDiskPagePAPX.cpp; sourceTree = "<group>"; };
6967B4131E27C52700A129E2 /* FormattedDiskPagePAPX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormattedDiskPagePAPX.h; sourceTree = "<group>"; };
6967B4141E27C52700A129E2 /* Global.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Global.h; sourceTree = "<group>"; };
6967B4151E27C52700A129E2 /* HeaderAndFooterTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeaderAndFooterTable.cpp; sourceTree = "<group>"; };
6967B4161E27C52700A129E2 /* HeaderAndFooterTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeaderAndFooterTable.h; sourceTree = "<group>"; };
6967B4171E27C52700A129E2 /* HeaderMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeaderMapping.cpp; sourceTree = "<group>"; };
6967B4181E27C52700A129E2 /* HeaderMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeaderMapping.h; sourceTree = "<group>"; };
6967B4191E27C52700A129E2 /* IBinaryReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBinaryReader.h; sourceTree = "<group>"; };
6967B41A1E27C52700A129E2 /* IMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMapping.h; sourceTree = "<group>"; };
6967B41B1E27C52700A129E2 /* IVisitable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IVisitable.h; sourceTree = "<group>"; };
6967B41C1E27C52700A129E2 /* LanguageId.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguageId.h; sourceTree = "<group>"; };
6967B41D1E27C52700A129E2 /* LanguageIdMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LanguageIdMapping.cpp; sourceTree = "<group>"; };
6967B41E1E27C52700A129E2 /* LanguageIdMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguageIdMapping.h; sourceTree = "<group>"; };
6967B41F1E27C52700A129E2 /* LineSpacingDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineSpacingDescriptor.h; sourceTree = "<group>"; };
6967B4201E27C52700A129E2 /* ListData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ListData.cpp; sourceTree = "<group>"; };
6967B4211E27C52700A129E2 /* ListData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListData.h; sourceTree = "<group>"; };
6967B4221E27C52700A129E2 /* ListFormatOverride.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListFormatOverride.h; sourceTree = "<group>"; };
6967B4231E27C52700A129E2 /* ListFormatOverrideLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListFormatOverrideLevel.h; sourceTree = "<group>"; };
6967B4241E27C52700A129E2 /* ListFormatOverrideTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListFormatOverrideTable.h; sourceTree = "<group>"; };
6967B4251E27C52700A129E2 /* ListLevel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ListLevel.cpp; sourceTree = "<group>"; };
6967B4261E27C52700A129E2 /* ListLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListLevel.h; sourceTree = "<group>"; };
6967B4271E27C52700A129E2 /* ListTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ListTable.cpp; sourceTree = "<group>"; };
6967B4281E27C52700A129E2 /* ListTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListTable.h; sourceTree = "<group>"; };
6967B4291E27C52700A129E2 /* MainDocumentMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MainDocumentMapping.cpp; sourceTree = "<group>"; };
6967B42A1E27C52700A129E2 /* MainDocumentMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainDocumentMapping.h; sourceTree = "<group>"; };
6967B42B1E27C52700A129E2 /* MemoryStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryStream.h; sourceTree = "<group>"; };
6967B42C1E27C52700A129E2 /* NumberingMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NumberingMapping.cpp; sourceTree = "<group>"; };
6967B42D1E27C52700A129E2 /* NumberingMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NumberingMapping.h; sourceTree = "<group>"; };
6967B42E1E27C52700A129E2 /* OfficeArtContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OfficeArtContent.h; sourceTree = "<group>"; };
6967B4301E27C52700A129E2 /* BitmapBlip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitmapBlip.h; sourceTree = "<group>"; };
6967B4311E27C52700A129E2 /* BlipStoreContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlipStoreContainer.h; sourceTree = "<group>"; };
6967B4321E27C52700A129E2 /* BlipStoreEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlipStoreEntry.h; sourceTree = "<group>"; };
6967B4331E27C52700A129E2 /* ChildAnchor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildAnchor.h; sourceTree = "<group>"; };
6967B4341E27C52700A129E2 /* ClientAnchor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientAnchor.h; sourceTree = "<group>"; };
6967B4351E27C52700A129E2 /* ClientData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientData.h; sourceTree = "<group>"; };
6967B4361E27C52700A129E2 /* DiagramBooleanProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiagramBooleanProperties.h; sourceTree = "<group>"; };
6967B4371E27C52700A129E2 /* DrawingContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingContainer.h; sourceTree = "<group>"; };
6967B4381E27C52700A129E2 /* DrawingGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingGroup.h; sourceTree = "<group>"; };
6967B4391E27C52700A129E2 /* DrawingGroupRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingGroupRecord.h; sourceTree = "<group>"; };
6967B43A1E27C52700A129E2 /* DrawingRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingRecord.h; sourceTree = "<group>"; };
6967B43B1E27C52700A129E2 /* FillStyleBooleanProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FillStyleBooleanProperties.h; sourceTree = "<group>"; };
6967B43C1E27C52700A129E2 /* GeometryBooleanProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeometryBooleanProperties.h; sourceTree = "<group>"; };
6967B43D1E27C52700A129E2 /* GeometryTextBooleanProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeometryTextBooleanProperties.h; sourceTree = "<group>"; };
6967B43E1E27C52700A129E2 /* GroupContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupContainer.h; sourceTree = "<group>"; };
6967B43F1E27C52700A129E2 /* GroupShapeBooleanProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupShapeBooleanProperties.h; sourceTree = "<group>"; };
6967B4401E27C52700A129E2 /* GroupShapeRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupShapeRecord.h; sourceTree = "<group>"; };
6967B4411E27C52700A129E2 /* LineStyleBooleanProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineStyleBooleanProperties.h; sourceTree = "<group>"; };
6967B4421E27C52700A129E2 /* MetafilePictBlip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MetafilePictBlip.h; sourceTree = "<group>"; };
6967B4431E27C52700A129E2 /* OfficeArtClientTextbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OfficeArtClientTextbox.h; sourceTree = "<group>"; };
6967B4441E27C52700A129E2 /* PathParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathParser.h; sourceTree = "<group>"; };
6967B4451E27C52700A129E2 /* PathSegment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathSegment.h; sourceTree = "<group>"; };
6967B4461E27C52700A129E2 /* ProtectionBooleanProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProtectionBooleanProperties.h; sourceTree = "<group>"; };
6967B4471E27C52700A129E2 /* Record.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Record.cpp; sourceTree = "<group>"; };
6967B4481E27C52700A129E2 /* Record.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Record.h; sourceTree = "<group>"; };
6967B4491E27C52700A129E2 /* RecordFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RecordFactory.cpp; sourceTree = "<group>"; };
6967B44A1E27C52700A129E2 /* RecordFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordFactory.h; sourceTree = "<group>"; };
6967B44B1E27C52700A129E2 /* RegularContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegularContainer.h; sourceTree = "<group>"; };
6967B44C1E27C52700A129E2 /* ShadowStyleBooleanProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadowStyleBooleanProperties.h; sourceTree = "<group>"; };
6967B44D1E27C52700A129E2 /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = "<group>"; };
6967B44E1E27C52700A129E2 /* ShapeContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeContainer.h; sourceTree = "<group>"; };
6967B44F1E27C52700A129E2 /* ShapeOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeOptions.h; sourceTree = "<group>"; };
6967B4501E27C52700A129E2 /* ShapeType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeType.h; sourceTree = "<group>"; };
6967B4511E27C52700A129E2 /* ShapeTypeFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShapeTypeFactory.cpp; sourceTree = "<group>"; };
6967B4521E27C52700A129E2 /* ShapeTypeFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeTypeFactory.h; sourceTree = "<group>"; };
6967B4541E27C52700A129E2 /* ArcType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArcType.h; sourceTree = "<group>"; };
6967B4551E27C52700A129E2 /* ArrowType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrowType.h; sourceTree = "<group>"; };
6967B4561E27C52700A129E2 /* BevelType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BevelType.h; sourceTree = "<group>"; };
6967B4571E27C52700A129E2 /* BlockArcType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlockArcType.h; sourceTree = "<group>"; };
6967B4581E27C52700A129E2 /* BracketsType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BracketsType.h; sourceTree = "<group>"; };
6967B4591E27C52700A129E2 /* CalloutsType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalloutsType.h; sourceTree = "<group>"; };
6967B45A1E27C52700A129E2 /* CanType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanType.h; sourceTree = "<group>"; };
6967B45B1E27C52700A129E2 /* Connector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Connector.h; sourceTree = "<group>"; };
6967B45C1E27C52700A129E2 /* CubeType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CubeType.h; sourceTree = "<group>"; };
6967B45D1E27C52700A129E2 /* DiamondType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiamondType.h; sourceTree = "<group>"; };
6967B45E1E27C52700A129E2 /* DonutType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DonutType.h; sourceTree = "<group>"; };
6967B45F1E27C52700A129E2 /* FlowChartType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlowChartType.h; sourceTree = "<group>"; };
6967B4601E27C52700A129E2 /* FoldedCornerlType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoldedCornerlType.h; sourceTree = "<group>"; };
6967B4611E27C52700A129E2 /* HeartType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeartType.h; sourceTree = "<group>"; };
6967B4621E27C52700A129E2 /* HexagonType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HexagonType.h; sourceTree = "<group>"; };
6967B4631E27C52700A129E2 /* IsoscelesTriangleType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IsoscelesTriangleType.h; sourceTree = "<group>"; };
6967B4641E27C52700A129E2 /* LightningBoltType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LightningBoltType.h; sourceTree = "<group>"; };
6967B4651E27C52700A129E2 /* LineType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineType.h; sourceTree = "<group>"; };
6967B4661E27C52700A129E2 /* MoonType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoonType.h; sourceTree = "<group>"; };
6967B4671E27C52700A129E2 /* NoSmokingType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoSmokingType.h; sourceTree = "<group>"; };
6967B4681E27C52700A129E2 /* OctagonType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OctagonType.h; sourceTree = "<group>"; };
6967B4691E27C52700A129E2 /* OvalType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OvalType.h; sourceTree = "<group>"; };
6967B46A1E27C52700A129E2 /* ParallelogramType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParallelogramType.h; sourceTree = "<group>"; };
6967B46B1E27C52700A129E2 /* PentagonType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PentagonType.h; sourceTree = "<group>"; };
6967B46C1E27C52700A129E2 /* PictureFrameType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PictureFrameType.h; sourceTree = "<group>"; };
6967B46D1E27C52700A129E2 /* PlaqueType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaqueType.h; sourceTree = "<group>"; };
6967B46E1E27C52700A129E2 /* PlusType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlusType.h; sourceTree = "<group>"; };
6967B46F1E27C52700A129E2 /* RectangleType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RectangleType.h; sourceTree = "<group>"; };
6967B4701E27C52700A129E2 /* RightTriangleType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RightTriangleType.h; sourceTree = "<group>"; };
6967B4711E27C52700A129E2 /* RoundedRectangleType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundedRectangleType.h; sourceTree = "<group>"; };
6967B4721E27C52700A129E2 /* SmileyFaceType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmileyFaceType.h; sourceTree = "<group>"; };
6967B4731E27C52700A129E2 /* StarType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StarType.h; sourceTree = "<group>"; };
6967B4741E27C52700A129E2 /* SunType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SunType.h; sourceTree = "<group>"; };
6967B4751E27C52700A129E2 /* TextboxType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextboxType.h; sourceTree = "<group>"; };
6967B4761E27C52700A129E2 /* TrapezoidType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrapezoidType.h; sourceTree = "<group>"; };
6967B4771E27C52700A129E2 /* WordArtText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WordArtText.h; sourceTree = "<group>"; };
6967B4781E27C52700A129E2 /* SplitMenuColorContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SplitMenuColorContainer.h; sourceTree = "<group>"; };
6967B4791E27C52700A129E2 /* UnknownRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnknownRecord.h; sourceTree = "<group>"; };
6967B47A1E27C52700A129E2 /* OleObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OleObject.cpp; sourceTree = "<group>"; };
6967B47B1E27C52700A129E2 /* OleObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OleObject.h; sourceTree = "<group>"; };
6967B47C1E27C52700A129E2 /* OleObjectMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OleObjectMapping.h; sourceTree = "<group>"; };
6967B47D1E27C52700A129E2 /* OpenXmlPackage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenXmlPackage.cpp; sourceTree = "<group>"; };
6967B47E1E27C52700A129E2 /* OpenXmlPackage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenXmlPackage.h; sourceTree = "<group>"; };
6967B47F1E27C52700A129E2 /* ParagraphHeight.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParagraphHeight.cpp; sourceTree = "<group>"; };
6967B4801E27C52700A129E2 /* ParagraphHeight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParagraphHeight.h; sourceTree = "<group>"; };
6967B4811E27C52700A129E2 /* ParagraphPropertiesMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParagraphPropertiesMapping.cpp; sourceTree = "<group>"; };
6967B4821E27C52700A129E2 /* ParagraphPropertiesMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParagraphPropertiesMapping.h; sourceTree = "<group>"; };
6967B4831E27C52700A129E2 /* ParagraphPropertyExceptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParagraphPropertyExceptions.cpp; sourceTree = "<group>"; };
6967B4841E27C52700A129E2 /* ParagraphPropertyExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParagraphPropertyExceptions.h; sourceTree = "<group>"; };
6967B4851E27C52700A129E2 /* PictureDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PictureDescriptor.cpp; sourceTree = "<group>"; };
6967B4861E27C52700A129E2 /* PictureDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PictureDescriptor.h; sourceTree = "<group>"; };
6967B4871E27C52700A129E2 /* PieceDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PieceDescriptor.h; sourceTree = "<group>"; };
6967B4881E27C52700A129E2 /* PieceTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PieceTable.cpp; sourceTree = "<group>"; };
6967B4891E27C52700A129E2 /* PieceTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PieceTable.h; sourceTree = "<group>"; };
6967B48A1E27C52700A129E2 /* Plex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Plex.h; sourceTree = "<group>"; };
6967B48B1E27C52700A129E2 /* PropertiesMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertiesMapping.cpp; sourceTree = "<group>"; };
6967B48C1E27C52700A129E2 /* PropertiesMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PropertiesMapping.h; sourceTree = "<group>"; };
6967B48D1E27C52700A129E2 /* PropertyExceptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertyExceptions.cpp; sourceTree = "<group>"; };
6967B48E1E27C52700A129E2 /* PropertyExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PropertyExceptions.h; sourceTree = "<group>"; };
6967B48F1E27C52700A129E2 /* RevisionData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RevisionData.cpp; sourceTree = "<group>"; };
6967B4901E27C52700A129E2 /* RevisionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RevisionData.h; sourceTree = "<group>"; };
6967B4911E27C52700A129E2 /* RGBColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RGBColor.h; sourceTree = "<group>"; };
6967B4921E27C52700A129E2 /* SectionDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SectionDescriptor.h; sourceTree = "<group>"; };
6967B4931E27C52700A129E2 /* SectionPropertiesMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SectionPropertiesMapping.cpp; sourceTree = "<group>"; };
6967B4941E27C52700A129E2 /* SectionPropertiesMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SectionPropertiesMapping.h; sourceTree = "<group>"; };
6967B4951E27C52700A129E2 /* SectionPropertyExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SectionPropertyExceptions.h; sourceTree = "<group>"; };
6967B4961E27C52700A129E2 /* SettingsMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SettingsMapping.cpp; sourceTree = "<group>"; };
6967B4971E27C52700A129E2 /* SettingsMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsMapping.h; sourceTree = "<group>"; };
6967B4981E27C52700A129E2 /* ShadingDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadingDescriptor.h; sourceTree = "<group>"; };
6967B4991E27C52700A129E2 /* SinglePropertyModifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SinglePropertyModifier.cpp; sourceTree = "<group>"; };
6967B49A1E27C52700A129E2 /* SinglePropertyModifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SinglePropertyModifier.h; sourceTree = "<group>"; };
6967B49B1E27C52700A129E2 /* Spa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Spa.cpp; sourceTree = "<group>"; };
6967B49C1E27C52700A129E2 /* Spa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Spa.h; sourceTree = "<group>"; };
6967B49D1E27C52700A129E2 /* SprmTDefTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SprmTDefTable.h; sourceTree = "<group>"; };
6967B49E1E27C52700A129E2 /* StringTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringTable.h; sourceTree = "<group>"; };
6967B49F1E27C52700A129E2 /* StructuredStorageReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructuredStorageReader.h; sourceTree = "<group>"; };
6967B4A01E27C52700A129E2 /* StyleSheet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleSheet.cpp; sourceTree = "<group>"; };
6967B4A11E27C52700A129E2 /* StyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleSheet.h; sourceTree = "<group>"; };
6967B4A21E27C52700A129E2 /* StyleSheetDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleSheetDescription.cpp; sourceTree = "<group>"; };
6967B4A31E27C52700A129E2 /* StyleSheetDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleSheetDescription.h; sourceTree = "<group>"; };
6967B4A41E27C52700A129E2 /* StyleSheetInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleSheetInformation.cpp; sourceTree = "<group>"; };
6967B4A51E27C52700A129E2 /* StyleSheetInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleSheetInformation.h; sourceTree = "<group>"; };
6967B4A61E27C52700A129E2 /* StyleSheetMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleSheetMapping.cpp; sourceTree = "<group>"; };
6967B4A71E27C52700A129E2 /* StyleSheetMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleSheetMapping.h; sourceTree = "<group>"; };
6967B4A81E27C52700A129E2 /* TabDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TabDescriptor.h; sourceTree = "<group>"; };
6967B4A91E27C52700A129E2 /* TableCellPropertiesMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TableCellPropertiesMapping.cpp; sourceTree = "<group>"; };
6967B4AA1E27C52700A129E2 /* TableCellPropertiesMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableCellPropertiesMapping.h; sourceTree = "<group>"; };
6967B4AB1E27C52700A129E2 /* TableInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableInfo.h; sourceTree = "<group>"; };
6967B4AC1E27C52700A129E2 /* TableMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TableMapping.cpp; sourceTree = "<group>"; };
6967B4AD1E27C52700A129E2 /* TableMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableMapping.h; sourceTree = "<group>"; };
6967B4AE1E27C52700A129E2 /* TablePropertiesMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TablePropertiesMapping.cpp; sourceTree = "<group>"; };
6967B4AF1E27C52700A129E2 /* TablePropertiesMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TablePropertiesMapping.h; sourceTree = "<group>"; };
6967B4B01E27C52700A129E2 /* TablePropertyExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TablePropertyExceptions.h; sourceTree = "<group>"; };
6967B4B11E27C52700A129E2 /* TableRowPropertiesMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TableRowPropertiesMapping.cpp; sourceTree = "<group>"; };
6967B4B21E27C52700A129E2 /* TableRowPropertiesMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableRowPropertiesMapping.h; sourceTree = "<group>"; };
6967B4B31E27C52700A129E2 /* Tbkd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tbkd.h; sourceTree = "<group>"; };
6967B4B41E27C52700A129E2 /* TextboxMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextboxMapping.cpp; sourceTree = "<group>"; };
6967B4B51E27C52700A129E2 /* TextboxMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextboxMapping.h; sourceTree = "<group>"; };
6967B4B61E27C52700A129E2 /* TwipsValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TwipsValue.h; sourceTree = "<group>"; };
6967B4B71E27C52700A129E2 /* VirtualStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VirtualStreamReader.h; sourceTree = "<group>"; };
6967B4B81E27C52700A129E2 /* VMLPictureMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VMLPictureMapping.cpp; sourceTree = "<group>"; };
6967B4B91E27C52700A129E2 /* VMLPictureMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMLPictureMapping.h; sourceTree = "<group>"; };
6967B4BA1E27C52700A129E2 /* VMLShapeMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VMLShapeMapping.cpp; sourceTree = "<group>"; };
6967B4BB1E27C52700A129E2 /* VMLShapeMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMLShapeMapping.h; sourceTree = "<group>"; };
6967B4BC1E27C52700A129E2 /* VMLShapeTypeMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VMLShapeTypeMapping.cpp; sourceTree = "<group>"; };
6967B4BD1E27C52700A129E2 /* VMLShapeTypeMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMLShapeTypeMapping.h; sourceTree = "<group>"; };
6967B4BE1E27C52700A129E2 /* WideString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WideString.h; sourceTree = "<group>"; };
6967B4BF1E27C52700A129E2 /* WordDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WordDocument.cpp; sourceTree = "<group>"; };
6967B4C01E27C52700A129E2 /* WordDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WordDocument.h; sourceTree = "<group>"; };
6967B4C11E27C52700A129E2 /* WordprocessingDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WordprocessingDocument.cpp; sourceTree = "<group>"; };
6967B4C21E27C52700A129E2 /* WordprocessingDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WordprocessingDocument.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
6967B2E81E27C23A00A129E2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
6967B2E21E27C23A00A129E2 = {
isa = PBXGroup;
children = (
6967B2ED1E27C23A00A129E2 /* DocFormatLib */,
6967B2EC1E27C23A00A129E2 /* Products */,
);
sourceTree = "<group>";
};
6967B2EC1E27C23A00A129E2 /* Products */ = {
isa = PBXGroup;
children = (
6967B2EB1E27C23A00A129E2 /* libDocFormatLib.a */,
);
name = Products;
sourceTree = "<group>";
};
6967B2ED1E27C23A00A129E2 /* DocFormatLib */ = {
isa = PBXGroup;
children = (
6967B3E41E27C52700A129E2 /* DocDocxConverter */,
6967B3E21E27C2D700A129E2 /* pole */,
6967B2FA1E27C2A100A129E2 /* Common */,
6967B2F71E27C26800A129E2 /* DocFormatLib.cpp */,
6967B2F81E27C26800A129E2 /* DocFormatLib.h */,
);
path = DocFormatLib;
sourceTree = "<group>";
};
6967B2FA1E27C2A100A129E2 /* Common */ = {
isa = PBXGroup;
children = (
6967B2FB1E27C2A100A129E2 /* Aggregat.h */,
6967B2FC1E27C2A100A129E2 /* Callback.h */,
6967B2FD1E27C2A100A129E2 /* FormatUtils.h */,
6967B2FE1E27C2A100A129E2 /* IOperand.h */,
6967B2FF1E27C2A100A129E2 /* IVirtualConstructor.h */,
6967B3001E27C2A100A129E2 /* LanguageCodes.h */,
6967B3011E27C2A100A129E2 /* Singleton.h */,
6967B3021E27C2A100A129E2 /* SPRMCodes.h */,
6967B3031E27C2A100A129E2 /* TargetOptions.h */,
6967B3041E27C2A100A129E2 /* TextMark.h */,
6967B3051E27C2A100A129E2 /* utf8.h */,
6967B3061E27C2A100A129E2 /* XmlTools.h */,
);
name = Common;
path = ../../../Common;
sourceTree = "<group>";
};
6967B3E21E27C2D700A129E2 /* pole */ = {
isa = PBXGroup;
children = (
6967B3DF1E27C2D500A129E2 /* pole.cpp */,
6967B3E01E27C2D500A129E2 /* pole.h */,
);
name = pole;
sourceTree = "<group>";
};
6967B3E41E27C52700A129E2 /* DocDocxConverter */ = {
isa = PBXGroup;
children = (
6967B3E51E27C52700A129E2 /* AbstractOpenXmlMapping.h */,
6967B3E61E27C52700A129E2 /* AnnotationOwnerList.h */,
6967B3E71E27C52700A129E2 /* AnnotationReferenceDescriptor.cpp */,
6967B3E81E27C52700A129E2 /* AnnotationReferenceDescriptor.h */,
6967B3E91E27C52700A129E2 /* AutoSummaryInfo.h */,
6967B3EA1E27C52700A129E2 /* BookmarkFirst.h */,
6967B3EB1E27C52700A129E2 /* BorderCode.h */,
6967B3EC1E27C52700A129E2 /* ByteStructure.h */,
6967B3ED1E27C52700A129E2 /* CharacterPropertiesMapping.cpp */,
6967B3EE1E27C52700A129E2 /* CharacterPropertiesMapping.h */,
6967B3EF1E27C52700A129E2 /* CharacterPropertyExceptions.h */,
6967B3F01E27C52700A129E2 /* CharacterRange.h */,
6967B3F11E27C52700A129E2 /* CommentsMapping.h */,
6967B3F21E27C52700A129E2 /* ContentTypes.h */,
6967B3F31E27C52700A129E2 /* ConversionContext.h */,
6967B3F41E27C52700A129E2 /* Converter.cpp */,
6967B3F51E27C52700A129E2 /* Converter.h */,
6967B3F61E27C52700A129E2 /* DateAndTime.h */,
6967B3F71E27C52700A129E2 /* DocumentMapping.cpp */,
6967B3F81E27C52700A129E2 /* DocumentMapping.h */,
6967B3F91E27C52700A129E2 /* DocumentProperties.cpp */,
6967B3FA1E27C52700A129E2 /* DocumentProperties.h */,
6967B3FB1E27C52700A129E2 /* DocumentTypographyInfo.h */,
6967B3FC1E27C52700A129E2 /* DrawingObjectGrid.h */,
6967B3FD1E27C52700A129E2 /* DrawingPrimitives.cpp */,
6967B3FE1E27C52700A129E2 /* DrawingPrimitives.h */,
6967B3FF1E27C52700A129E2 /* EmuValue.h */,
6967B4001E27C52700A129E2 /* EncryptionHeader.cpp */,
6967B4011E27C52700A129E2 /* EncryptionHeader.h */,
6967B4021E27C52700A129E2 /* EndnoteDescriptor.h */,
6967B4031E27C52700A129E2 /* EndnotesMapping.h */,
6967B4041E27C52700A129E2 /* FieldCharacter.h */,
6967B4051E27C52700A129E2 /* FileInformationBlock.h */,
6967B4061E27C52700A129E2 /* FixedPointNumber.h */,
6967B4071E27C52700A129E2 /* FontFamilyName.cpp */,
6967B4081E27C52700A129E2 /* FontFamilyName.h */,
6967B4091E27C52700A129E2 /* FontTableMapping.cpp */,
6967B40A1E27C52700A129E2 /* FontTableMapping.h */,
6967B40B1E27C52700A129E2 /* FooterMapping.cpp */,
6967B40C1E27C52700A129E2 /* FooterMapping.h */,
6967B40D1E27C52700A129E2 /* FootnoteDescriptor.h */,
6967B40E1E27C52700A129E2 /* FootnotesMapping.h */,
6967B40F1E27C52700A129E2 /* FormattedDiskPage.h */,
6967B4101E27C52700A129E2 /* FormattedDiskPageCHPX.cpp */,
6967B4111E27C52700A129E2 /* FormattedDiskPageCHPX.h */,
6967B4121E27C52700A129E2 /* FormattedDiskPagePAPX.cpp */,
6967B4131E27C52700A129E2 /* FormattedDiskPagePAPX.h */,
6967B4141E27C52700A129E2 /* Global.h */,
6967B4151E27C52700A129E2 /* HeaderAndFooterTable.cpp */,
6967B4161E27C52700A129E2 /* HeaderAndFooterTable.h */,
6967B4171E27C52700A129E2 /* HeaderMapping.cpp */,
6967B4181E27C52700A129E2 /* HeaderMapping.h */,
6967B4191E27C52700A129E2 /* IBinaryReader.h */,
6967B41A1E27C52700A129E2 /* IMapping.h */,
6967B41B1E27C52700A129E2 /* IVisitable.h */,
6967B41C1E27C52700A129E2 /* LanguageId.h */,
6967B41D1E27C52700A129E2 /* LanguageIdMapping.cpp */,
6967B41E1E27C52700A129E2 /* LanguageIdMapping.h */,
6967B41F1E27C52700A129E2 /* LineSpacingDescriptor.h */,
6967B4201E27C52700A129E2 /* ListData.cpp */,
6967B4211E27C52700A129E2 /* ListData.h */,
6967B4221E27C52700A129E2 /* ListFormatOverride.h */,
6967B4231E27C52700A129E2 /* ListFormatOverrideLevel.h */,
6967B4241E27C52700A129E2 /* ListFormatOverrideTable.h */,
6967B4251E27C52700A129E2 /* ListLevel.cpp */,
6967B4261E27C52700A129E2 /* ListLevel.h */,
6967B4271E27C52700A129E2 /* ListTable.cpp */,
6967B4281E27C52700A129E2 /* ListTable.h */,
6967B4291E27C52700A129E2 /* MainDocumentMapping.cpp */,
6967B42A1E27C52700A129E2 /* MainDocumentMapping.h */,
6967B42B1E27C52700A129E2 /* MemoryStream.h */,
6967B42C1E27C52700A129E2 /* NumberingMapping.cpp */,
6967B42D1E27C52700A129E2 /* NumberingMapping.h */,
6967B42E1E27C52700A129E2 /* OfficeArtContent.h */,
6967B42F1E27C52700A129E2 /* OfficeDrawing */,
6967B47A1E27C52700A129E2 /* OleObject.cpp */,
6967B47B1E27C52700A129E2 /* OleObject.h */,
6967B47C1E27C52700A129E2 /* OleObjectMapping.h */,
6967B47D1E27C52700A129E2 /* OpenXmlPackage.cpp */,
6967B47E1E27C52700A129E2 /* OpenXmlPackage.h */,
6967B47F1E27C52700A129E2 /* ParagraphHeight.cpp */,
6967B4801E27C52700A129E2 /* ParagraphHeight.h */,
6967B4811E27C52700A129E2 /* ParagraphPropertiesMapping.cpp */,
6967B4821E27C52700A129E2 /* ParagraphPropertiesMapping.h */,
6967B4831E27C52700A129E2 /* ParagraphPropertyExceptions.cpp */,
6967B4841E27C52700A129E2 /* ParagraphPropertyExceptions.h */,
6967B4851E27C52700A129E2 /* PictureDescriptor.cpp */,
6967B4861E27C52700A129E2 /* PictureDescriptor.h */,
6967B4871E27C52700A129E2 /* PieceDescriptor.h */,
6967B4881E27C52700A129E2 /* PieceTable.cpp */,
6967B4891E27C52700A129E2 /* PieceTable.h */,
6967B48A1E27C52700A129E2 /* Plex.h */,
6967B48B1E27C52700A129E2 /* PropertiesMapping.cpp */,
6967B48C1E27C52700A129E2 /* PropertiesMapping.h */,
6967B48D1E27C52700A129E2 /* PropertyExceptions.cpp */,
6967B48E1E27C52700A129E2 /* PropertyExceptions.h */,
6967B48F1E27C52700A129E2 /* RevisionData.cpp */,
6967B4901E27C52700A129E2 /* RevisionData.h */,
6967B4911E27C52700A129E2 /* RGBColor.h */,
6967B4921E27C52700A129E2 /* SectionDescriptor.h */,
6967B4931E27C52700A129E2 /* SectionPropertiesMapping.cpp */,
6967B4941E27C52700A129E2 /* SectionPropertiesMapping.h */,
6967B4951E27C52700A129E2 /* SectionPropertyExceptions.h */,
6967B4961E27C52700A129E2 /* SettingsMapping.cpp */,
6967B4971E27C52700A129E2 /* SettingsMapping.h */,
6967B4981E27C52700A129E2 /* ShadingDescriptor.h */,
6967B4991E27C52700A129E2 /* SinglePropertyModifier.cpp */,
6967B49A1E27C52700A129E2 /* SinglePropertyModifier.h */,
6967B49B1E27C52700A129E2 /* Spa.cpp */,
6967B49C1E27C52700A129E2 /* Spa.h */,
6967B49D1E27C52700A129E2 /* SprmTDefTable.h */,
6967B49E1E27C52700A129E2 /* StringTable.h */,
6967B49F1E27C52700A129E2 /* StructuredStorageReader.h */,
6967B4A01E27C52700A129E2 /* StyleSheet.cpp */,
6967B4A11E27C52700A129E2 /* StyleSheet.h */,
6967B4A21E27C52700A129E2 /* StyleSheetDescription.cpp */,
6967B4A31E27C52700A129E2 /* StyleSheetDescription.h */,
6967B4A41E27C52700A129E2 /* StyleSheetInformation.cpp */,
6967B4A51E27C52700A129E2 /* StyleSheetInformation.h */,
6967B4A61E27C52700A129E2 /* StyleSheetMapping.cpp */,
6967B4A71E27C52700A129E2 /* StyleSheetMapping.h */,
6967B4A81E27C52700A129E2 /* TabDescriptor.h */,
6967B4A91E27C52700A129E2 /* TableCellPropertiesMapping.cpp */,
6967B4AA1E27C52700A129E2 /* TableCellPropertiesMapping.h */,
6967B4AB1E27C52700A129E2 /* TableInfo.h */,
6967B4AC1E27C52700A129E2 /* TableMapping.cpp */,
6967B4AD1E27C52700A129E2 /* TableMapping.h */,
6967B4AE1E27C52700A129E2 /* TablePropertiesMapping.cpp */,
6967B4AF1E27C52700A129E2 /* TablePropertiesMapping.h */,
6967B4B01E27C52700A129E2 /* TablePropertyExceptions.h */,
6967B4B11E27C52700A129E2 /* TableRowPropertiesMapping.cpp */,
6967B4B21E27C52700A129E2 /* TableRowPropertiesMapping.h */,
6967B4B31E27C52700A129E2 /* Tbkd.h */,
6967B4B41E27C52700A129E2 /* TextboxMapping.cpp */,
6967B4B51E27C52700A129E2 /* TextboxMapping.h */,
6967B4B61E27C52700A129E2 /* TwipsValue.h */,
6967B4B71E27C52700A129E2 /* VirtualStreamReader.h */,
6967B4B81E27C52700A129E2 /* VMLPictureMapping.cpp */,
6967B4B91E27C52700A129E2 /* VMLPictureMapping.h */,
6967B4BA1E27C52700A129E2 /* VMLShapeMapping.cpp */,
6967B4BB1E27C52700A129E2 /* VMLShapeMapping.h */,
6967B4BC1E27C52700A129E2 /* VMLShapeTypeMapping.cpp */,
6967B4BD1E27C52700A129E2 /* VMLShapeTypeMapping.h */,
6967B4BE1E27C52700A129E2 /* WideString.h */,
6967B4BF1E27C52700A129E2 /* WordDocument.cpp */,
6967B4C01E27C52700A129E2 /* WordDocument.h */,
6967B4C11E27C52700A129E2 /* WordprocessingDocument.cpp */,
6967B4C21E27C52700A129E2 /* WordprocessingDocument.h */,
);
name = DocDocxConverter;
path = ../../../DocDocxConverter;
sourceTree = "<group>";
};
6967B42F1E27C52700A129E2 /* OfficeDrawing */ = {
isa = PBXGroup;
children = (
6967B4301E27C52700A129E2 /* BitmapBlip.h */,
6967B4311E27C52700A129E2 /* BlipStoreContainer.h */,
6967B4321E27C52700A129E2 /* BlipStoreEntry.h */,
6967B4331E27C52700A129E2 /* ChildAnchor.h */,
6967B4341E27C52700A129E2 /* ClientAnchor.h */,
6967B4351E27C52700A129E2 /* ClientData.h */,
6967B4361E27C52700A129E2 /* DiagramBooleanProperties.h */,
6967B4371E27C52700A129E2 /* DrawingContainer.h */,
6967B4381E27C52700A129E2 /* DrawingGroup.h */,
6967B4391E27C52700A129E2 /* DrawingGroupRecord.h */,
6967B43A1E27C52700A129E2 /* DrawingRecord.h */,
6967B43B1E27C52700A129E2 /* FillStyleBooleanProperties.h */,
6967B43C1E27C52700A129E2 /* GeometryBooleanProperties.h */,
6967B43D1E27C52700A129E2 /* GeometryTextBooleanProperties.h */,
6967B43E1E27C52700A129E2 /* GroupContainer.h */,
6967B43F1E27C52700A129E2 /* GroupShapeBooleanProperties.h */,
6967B4401E27C52700A129E2 /* GroupShapeRecord.h */,
6967B4411E27C52700A129E2 /* LineStyleBooleanProperties.h */,
6967B4421E27C52700A129E2 /* MetafilePictBlip.h */,
6967B4431E27C52700A129E2 /* OfficeArtClientTextbox.h */,
6967B4441E27C52700A129E2 /* PathParser.h */,
6967B4451E27C52700A129E2 /* PathSegment.h */,
6967B4461E27C52700A129E2 /* ProtectionBooleanProperties.h */,
6967B4471E27C52700A129E2 /* Record.cpp */,
6967B4481E27C52700A129E2 /* Record.h */,
6967B4491E27C52700A129E2 /* RecordFactory.cpp */,
6967B44A1E27C52700A129E2 /* RecordFactory.h */,
6967B44B1E27C52700A129E2 /* RegularContainer.h */,
6967B44C1E27C52700A129E2 /* ShadowStyleBooleanProperties.h */,
6967B44D1E27C52700A129E2 /* Shape.h */,
6967B44E1E27C52700A129E2 /* ShapeContainer.h */,
6967B44F1E27C52700A129E2 /* ShapeOptions.h */,
6967B4501E27C52700A129E2 /* ShapeType.h */,
6967B4511E27C52700A129E2 /* ShapeTypeFactory.cpp */,
6967B4521E27C52700A129E2 /* ShapeTypeFactory.h */,
6967B4531E27C52700A129E2 /* Shapetypes */,
6967B4781E27C52700A129E2 /* SplitMenuColorContainer.h */,
6967B4791E27C52700A129E2 /* UnknownRecord.h */,
);
path = OfficeDrawing;
sourceTree = "<group>";
};
6967B4531E27C52700A129E2 /* Shapetypes */ = {
isa = PBXGroup;
children = (
6967B4541E27C52700A129E2 /* ArcType.h */,
6967B4551E27C52700A129E2 /* ArrowType.h */,
6967B4561E27C52700A129E2 /* BevelType.h */,
6967B4571E27C52700A129E2 /* BlockArcType.h */,
6967B4581E27C52700A129E2 /* BracketsType.h */,
6967B4591E27C52700A129E2 /* CalloutsType.h */,
6967B45A1E27C52700A129E2 /* CanType.h */,
6967B45B1E27C52700A129E2 /* Connector.h */,
6967B45C1E27C52700A129E2 /* CubeType.h */,
6967B45D1E27C52700A129E2 /* DiamondType.h */,
6967B45E1E27C52700A129E2 /* DonutType.h */,
6967B45F1E27C52700A129E2 /* FlowChartType.h */,
6967B4601E27C52700A129E2 /* FoldedCornerlType.h */,
6967B4611E27C52700A129E2 /* HeartType.h */,
6967B4621E27C52700A129E2 /* HexagonType.h */,
6967B4631E27C52700A129E2 /* IsoscelesTriangleType.h */,
6967B4641E27C52700A129E2 /* LightningBoltType.h */,
6967B4651E27C52700A129E2 /* LineType.h */,
6967B4661E27C52700A129E2 /* MoonType.h */,
6967B4671E27C52700A129E2 /* NoSmokingType.h */,
6967B4681E27C52700A129E2 /* OctagonType.h */,
6967B4691E27C52700A129E2 /* OvalType.h */,
6967B46A1E27C52700A129E2 /* ParallelogramType.h */,
6967B46B1E27C52700A129E2 /* PentagonType.h */,
6967B46C1E27C52700A129E2 /* PictureFrameType.h */,
6967B46D1E27C52700A129E2 /* PlaqueType.h */,
6967B46E1E27C52700A129E2 /* PlusType.h */,
6967B46F1E27C52700A129E2 /* RectangleType.h */,
6967B4701E27C52700A129E2 /* RightTriangleType.h */,
6967B4711E27C52700A129E2 /* RoundedRectangleType.h */,
6967B4721E27C52700A129E2 /* SmileyFaceType.h */,
6967B4731E27C52700A129E2 /* StarType.h */,
6967B4741E27C52700A129E2 /* SunType.h */,
6967B4751E27C52700A129E2 /* TextboxType.h */,
6967B4761E27C52700A129E2 /* TrapezoidType.h */,
6967B4771E27C52700A129E2 /* WordArtText.h */,
);
path = Shapetypes;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
6967B2EA1E27C23A00A129E2 /* DocFormatLib */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6967B2F41E27C23A00A129E2 /* Build configuration list for PBXNativeTarget "DocFormatLib" */;
buildPhases = (
6967B2E71E27C23A00A129E2 /* Sources */,
6967B2E81E27C23A00A129E2 /* Frameworks */,
6967B2E91E27C23A00A129E2 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = DocFormatLib;
productName = DocFormatLib;
productReference = 6967B2EB1E27C23A00A129E2 /* libDocFormatLib.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
6967B2E31E27C23A00A129E2 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0820;
ORGANIZATIONNAME = OnlyOffce;
TargetAttributes = {
6967B2EA1E27C23A00A129E2 = {
CreatedOnToolsVersion = 8.2;
DevelopmentTeam = 2WH24U26GJ;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 6967B2E61E27C23A00A129E2 /* Build configuration list for PBXProject "DocFormatLib" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 6967B2E21E27C23A00A129E2;
productRefGroup = 6967B2EC1E27C23A00A129E2 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
6967B2EA1E27C23A00A129E2 /* DocFormatLib */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
6967B2E71E27C23A00A129E2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6967B4D11E27C52700A129E2 /* LanguageIdMapping.cpp in Sources */,
6967B4E61E27C52700A129E2 /* SinglePropertyModifier.cpp in Sources */,
6967B4C91E27C52700A129E2 /* EncryptionHeader.cpp in Sources */,
6967B4D71E27C52700A129E2 /* Record.cpp in Sources */,
6967B4ED1E27C52700A129E2 /* TableMapping.cpp in Sources */,
6967B4F31E27C52700A129E2 /* VMLShapeTypeMapping.cpp in Sources */,
6967B4E31E27C52700A129E2 /* RevisionData.cpp in Sources */,
6967B4D41E27C52700A129E2 /* ListTable.cpp in Sources */,
6967B4F41E27C52700A129E2 /* WordDocument.cpp in Sources */,
6967B4CD1E27C52700A129E2 /* FormattedDiskPageCHPX.cpp in Sources */,
6967B4F11E27C52700A129E2 /* VMLPictureMapping.cpp in Sources */,
6967B4D21E27C52700A129E2 /* ListData.cpp in Sources */,
6967B4E21E27C52700A129E2 /* PropertyExceptions.cpp in Sources */,
6967B4C31E27C52700A129E2 /* AnnotationReferenceDescriptor.cpp in Sources */,
6967B4D31E27C52700A129E2 /* ListLevel.cpp in Sources */,
6967B4CB1E27C52700A129E2 /* FontTableMapping.cpp in Sources */,
6967B4EC1E27C52700A129E2 /* TableCellPropertiesMapping.cpp in Sources */,
6967B4D81E27C52700A129E2 /* RecordFactory.cpp in Sources */,
6967B4C61E27C52700A129E2 /* DocumentMapping.cpp in Sources */,
6967B4CA1E27C52700A129E2 /* FontFamilyName.cpp in Sources */,
6967B4F21E27C52700A129E2 /* VMLShapeMapping.cpp in Sources */,
6967B4C71E27C52700A129E2 /* DocumentProperties.cpp in Sources */,
6967B4EF1E27C52700A129E2 /* TableRowPropertiesMapping.cpp in Sources */,
6967B4E01E27C52700A129E2 /* PieceTable.cpp in Sources */,
6967B4E81E27C52700A129E2 /* StyleSheet.cpp in Sources */,
6967B4EA1E27C52700A129E2 /* StyleSheetInformation.cpp in Sources */,
6967B4D91E27C52700A129E2 /* ShapeTypeFactory.cpp in Sources */,
6967B4D01E27C52700A129E2 /* HeaderMapping.cpp in Sources */,
6967B4DA1E27C52700A129E2 /* OleObject.cpp in Sources */,
6967B4D61E27C52700A129E2 /* NumberingMapping.cpp in Sources */,
6967B4CE1E27C52700A129E2 /* FormattedDiskPagePAPX.cpp in Sources */,
6967B4DF1E27C52700A129E2 /* PictureDescriptor.cpp in Sources */,
6967B4C41E27C52700A129E2 /* CharacterPropertiesMapping.cpp in Sources */,
6967B4F01E27C52700A129E2 /* TextboxMapping.cpp in Sources */,
6967B4DC1E27C52700A129E2 /* ParagraphHeight.cpp in Sources */,
6967B4DD1E27C52700A129E2 /* ParagraphPropertiesMapping.cpp in Sources */,
6967B4E11E27C52700A129E2 /* PropertiesMapping.cpp in Sources */,
6967B4C51E27C52700A129E2 /* Converter.cpp in Sources */,
6967B4E91E27C52700A129E2 /* StyleSheetDescription.cpp in Sources */,
6967B4E41E27C52700A129E2 /* SectionPropertiesMapping.cpp in Sources */,
6967B4EE1E27C52700A129E2 /* TablePropertiesMapping.cpp in Sources */,
6967B4D51E27C52700A129E2 /* MainDocumentMapping.cpp in Sources */,
6967B4E51E27C52700A129E2 /* SettingsMapping.cpp in Sources */,
6967B4DB1E27C52700A129E2 /* OpenXmlPackage.cpp in Sources */,
6967B4CF1E27C52700A129E2 /* HeaderAndFooterTable.cpp in Sources */,
6967B4F51E27C52700A129E2 /* WordprocessingDocument.cpp in Sources */,
6967B2F91E27C26800A129E2 /* DocFormatLib.cpp in Sources */,
6967B4CC1E27C52700A129E2 /* FooterMapping.cpp in Sources */,
6967B4C81E27C52700A129E2 /* DrawingPrimitives.cpp in Sources */,
6967B4E71E27C52700A129E2 /* Spa.cpp in Sources */,
6967B3E11E27C2D500A129E2 /* pole.cpp in Sources */,
6967B4EB1E27C52700A129E2 /* StyleSheetMapping.cpp in Sources */,
6967B4DE1E27C52700A129E2 /* ParagraphPropertyExceptions.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
6967B2F21E27C23A00A129E2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
6967B2F31E27C23A00A129E2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
6967B2F51E27C23A00A129E2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = 2WH24U26GJ;
GCC_PREPROCESSOR_DEFINITIONS = (
UNICODE,
_UNICODE,
_USE_XMLLITE_READER_,
USE_LITE_READER,
USE_ATL_CSTRING,
_USE_LIBXML2_READER_,
LIBXML_READER_ENABLED,
_IOS,
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
/usr/include/,
/usr/include/libxml2/,
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/include",
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/devel",
"$(PROJECT_DIR)/../../../DesktopEditor/agg-2.4/include",
"$(PROJECT_DIR)/../../../Common/3dParty/pole",
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
6967B2F61E27C23A00A129E2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = 2WH24U26GJ;
GCC_PREPROCESSOR_DEFINITIONS = (
UNICODE,
_UNICODE,
_USE_XMLLITE_READER_,
USE_LITE_READER,
USE_ATL_CSTRING,
_USE_LIBXML2_READER_,
LIBXML_READER_ENABLED,
_IOS,
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
/usr/include/,
/usr/include/libxml2/,
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/include",
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/devel",
"$(PROJECT_DIR)/../../../DesktopEditor/agg-2.4/include",
"$(PROJECT_DIR)/../../../Common/3dParty/pole",
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
6967B2E61E27C23A00A129E2 /* Build configuration list for PBXProject "DocFormatLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6967B2F21E27C23A00A129E2 /* Debug */,
6967B2F31E27C23A00A129E2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6967B2F41E27C23A00A129E2 /* Build configuration list for PBXNativeTarget "DocFormatLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6967B2F51E27C23A00A129E2 /* Debug */,
6967B2F61E27C23A00A129E2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 6967B2E31E27C23A00A129E2 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:DocFormatLib.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1 @@
DO NOT REMOVE FOLDER FOR XCODE

View File

@ -42,16 +42,16 @@ namespace Writers
{
public:
std::wstring content;
CString filename;
std::wstring filename;
int index;
};
std::vector<ChartElem*> m_aCharts;
ContentTypesWriter& m_oContentTypesWriter;
ContentTypesWriter& m_oContentTypesWriter;
int nChartCount;
public:
CString m_sDir;
std::wstring m_sDir;
public:
ChartWriter(CString sDir, ContentTypesWriter& oContentTypesWriter):m_sDir(sDir),m_oContentTypesWriter(oContentTypesWriter)
ChartWriter(std::wstring sDir, ContentTypesWriter& oContentTypesWriter):m_sDir(sDir),m_oContentTypesWriter(oContentTypesWriter)
{
nChartCount = 0;
}
@ -71,7 +71,7 @@ namespace Writers
if(false == IsEmpty())
{
OOX::CPath pathChartDir = m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("charts");
FileSystem::Directory::CreateDirectory(string2std_string(pathChartDir.GetPath()));
FileSystem::Directory::CreateDirectory(pathChartDir.GetPath());
for(int i = 0, length = m_aCharts.size(); i < length; ++i)
{
@ -80,25 +80,26 @@ namespace Writers
OOX::CPath filePath = pathChartDir + FILE_SEPARATOR_STR + elem->filename;
NSFile::CFileBinary oFile;
oFile.CreateFileW(string2std_string(filePath.GetPath()));
oFile.CreateFileW(filePath.GetPath());
oFile.WriteStringUTF8(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n");
oFile.WriteStringUTF8(elem->content);
oFile.CloseFile();
//Content_Types
CString sRelPath = _T("/word/charts/") + elem->filename;
m_oContentTypesWriter.AddOverride(sRelPath, CString(_T("application/vnd.openxmlformats-officedocument.drawingml.chart+xml")));
std::wstring sRelPath = L"/word/charts/" + elem->filename;
m_oContentTypesWriter.AddOverride(sRelPath, L"application/vnd.openxmlformats-officedocument.drawingml.chart+xml");
}
}
}
void AddChart(std::wstring& content, CString& sRelsName, CString& sFileName, int& index)
void AddChart(std::wstring& content, std::wstring& sRelsName, std::wstring& sFileName, int& index)
{
ChartElem* pChartElem = new ChartElem();
pChartElem->content = content;
pChartElem->index = nChartCount + 1;
nChartCount++;
pChartElem->filename.Format(_T("chart%d.xml"), pChartElem->index);
sRelsName = _T("charts/") + pChartElem->filename;
pChartElem->filename = L"chart" + std::to_wstring(pChartElem->index) + L".xml";
sRelsName = L"charts/" + pChartElem->filename;
sFileName = pChartElem->filename;
index = pChartElem->index;

View File

@ -36,18 +36,18 @@
namespace Writers
{
static CString g_string_ct_Start = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">");
static CString g_string_ct_Ext = _T("<Default Extension=\"bin\" ContentType=\"application/vnd.openxmlformats-officedocument.oleObject\"/><Default Extension=\"bmp\" ContentType=\"image/bmp\"/><Default Extension=\"jpg\" ContentType=\"image/jpeg\"/><Default Extension=\"jpeg\" ContentType=\"image/jpeg\"/><Default Extension=\"jpe\" ContentType=\"image/jpeg\"/><Default Extension=\"png\" ContentType=\"image/png\"/><Default Extension=\"gif\" ContentType=\"image/gif\"/><Default Extension=\"emf\" ContentType=\"image/x-emf\"/><Default Extension=\"wmf\" ContentType=\"image/x-wmf\"/><Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\"/><Default Extension=\"xml\" ContentType=\"application/xml\"/><Default Extension=\"xlsx\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"/>");
static CString g_string_ct_Override = _T("<Override PartName=\"/word/document.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\"/><Override PartName=\"/word/styles.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\"/><Override PartName=\"/word/settings.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\"/><Override PartName=\"/word/webSettings.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml\"/><Override PartName=\"/word/fontTable.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml\"/><Override PartName=\"/word/theme/theme1.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.theme+xml\"/><Override PartName=\"/docProps/core.xml\" ContentType=\"application/vnd.openxmlformats-package.core-properties+xml\"/><Override PartName=\"/docProps/app.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.extended-properties+xml\"/>");
static CString g_string_ct_End = _T("</Types>");
static std::wstring g_string_ct_Start = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">";
static std::wstring g_string_ct_Ext = L"<Default Extension=\"bin\" ContentType=\"application/vnd.openxmlformats-officedocument.oleObject\"/><Default Extension=\"bmp\" ContentType=\"image/bmp\"/><Default Extension=\"jpg\" ContentType=\"image/jpeg\"/><Default Extension=\"jpeg\" ContentType=\"image/jpeg\"/><Default Extension=\"jpe\" ContentType=\"image/jpeg\"/><Default Extension=\"png\" ContentType=\"image/png\"/><Default Extension=\"gif\" ContentType=\"image/gif\"/><Default Extension=\"emf\" ContentType=\"image/x-emf\"/><Default Extension=\"wmf\" ContentType=\"image/x-wmf\"/><Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\"/><Default Extension=\"xml\" ContentType=\"application/xml\"/><Default Extension=\"xlsx\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"/>";
static std::wstring g_string_ct_Override = L"<Override PartName=\"/word/document.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\"/><Override PartName=\"/word/styles.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\"/><Override PartName=\"/word/settings.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\"/><Override PartName=\"/word/webSettings.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml\"/><Override PartName=\"/word/fontTable.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml\"/><Override PartName=\"/word/theme/theme1.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.theme+xml\"/><Override PartName=\"/docProps/core.xml\" ContentType=\"application/vnd.openxmlformats-package.core-properties+xml\"/><Override PartName=\"/docProps/app.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.extended-properties+xml\"/>";
static std::wstring g_string_ct_End = L"</Types>";
class ContentTypesWriter
{
XmlUtils::CStringWriter m_oWriter;
CString m_sDir;
std::wstring m_sDir;
XmlUtils::CStringWriter m_oAdditional;
public:
ContentTypesWriter(CString sDir):m_sDir(sDir)
ContentTypesWriter(std::wstring sDir) : m_sDir(sDir)
{
}
void Write()
@ -58,7 +58,7 @@ namespace Writers
m_oWriter.Write(m_oAdditional);
m_oWriter.WriteString(g_string_ct_End);
OOX::CPath filePath = m_sDir + _T("/[Content_Types].xml");
OOX::CPath filePath = m_sDir + L"/[Content_Types].xml";
CFile oFile;
oFile.CreateFile(filePath.GetPath());
@ -66,12 +66,12 @@ namespace Writers
oFile.WriteStringUTF8(m_oWriter.GetData());
oFile.CloseFile();
}
void AddOverride(const CString& PartName, const CString& ContentType)
void AddOverride(const std::wstring& PartName, const std::wstring& ContentType)
{
CString sOverride;sOverride.Format(_T("<Override PartName=\"%ls\" ContentType=\"%ls\"/>"),PartName , ContentType);
std::wstring sOverride = L"<Override PartName=\"" + PartName+ L"\ ContentType=\"" + ContentType + L"\"/>";
m_oAdditional.WriteString(sOverride);
}
void AddOverrideRaw(const CString& sXml)
void AddOverrideRaw(const std::wstring& sXml)
{
m_oAdditional.WriteString(sXml);
}

View File

@ -39,26 +39,26 @@ namespace Writers
class MediaWriter
{
XmlUtils::CStringWriter m_oWriter;
CString m_sDir;
CString m_sMediaDir;
std::wstring m_sDir;
std::wstring m_sMediaDir;
public:
std::vector<CString> m_aImageNames;
std::vector<std::wstring> m_aImageNames;
long nImageCount;
public:
MediaWriter(CString sDir):m_sDir(sDir)
MediaWriter(std::wstring sDir):m_sDir(sDir)
{
nImageCount = 0;
OOX::CPath filePath = m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("media");
OOX::CPath filePath = m_sDir + FILE_SEPARATOR_STR + L"word" + FILE_SEPARATOR_STR + L"media";
m_sMediaDir = filePath.GetPath();
}
CString AddImageGetNewPath()
std::wstring AddImageGetNewPath()
{
OOX::CSystemUtility::CreateDirectories(m_sMediaDir);
CString sNewImgName;sNewImgName.Format(_T("image%d.jpg"), (nImageCount + 1));
CString sNewImg = m_sMediaDir + FILE_SEPARATOR_STR + sNewImgName;
std::wstring sNewImgName = L"image" + std::to_wstring(nImageCount + 1) + L".jpg";
std::wstring sNewImg = m_sMediaDir + FILE_SEPARATOR_STR + sNewImgName;
nImageCount++;
return sNewImg;
}
@ -72,23 +72,23 @@ namespace Writers
DWORD dwSizeRead = (DWORD)fread((void*)pData, 1, size, pFile);
if(dwSizeRead > 0)
{
CString sNewImagePath = AddImageGetNewPath();
std::wstring sNewImagePath = AddImageGetNewPath();
NSFile::CFileBinary oFile;
oFile.CreateFileW(string2std_string(sNewImagePath));
oFile.CreateFileW(sNewImagePath);
oFile.WriteFile(pData, dwSizeRead);
oFile.CloseFile();
CString sFilename = NSSystemPath::GetFileName(string2std_string(sNewImagePath)).c_str();
std::wstring sFilename = NSSystemPath::GetFileName(sNewImagePath);
m_aImageNames.push_back(sFilename);
}
RELEASEARRAYOBJECTS(pData);
}
}
void AddImage(const CString& sImg)
void AddImage(const std::wstring& sImg)
{
OOX::CPath pathNewImg = AddImageGetNewPath();
NSFile::CFileBinary::Copy(string2std_string(sImg), string2std_string(pathNewImg.GetPath()));
CString sFilename = NSSystemPath::GetFileName(string2std_string(pathNewImg.GetPath())).c_str();
NSFile::CFileBinary::Copy(sImg, pathNewImg.GetPath());
std::wstring sFilename = NSSystemPath::GetFileName(pathNewImg.GetPath()).c_str();
m_aImageNames.push_back(sFilename);
}
};

View File

@ -98,11 +98,11 @@ public:
long nMHeader = SerializeCommon::Round(Header * g_dKoef_mm_to_twips);
long nMFooter = SerializeCommon::Round(Footer * g_dKoef_mm_to_twips);
if(!sHeaderFooterReference.IsEmpty())
sRes.Append(sHeaderFooterReference);
sRes += sHeaderFooterReference;
if(!footnotePr.IsEmpty())
sRes.Append(footnotePr);
sRes += footnotePr;
if(!endnotePr.IsEmpty())
sRes.Append(endnotePr);
sRes += endnotePr;
if(bSectionType)
{
CString sType;
@ -126,18 +126,18 @@ public:
sRes.AppendFormat(_T(" w:header=\"%d\""), nMHeader);
if(bFooter)
sRes.AppendFormat(_T(" w:footer=\"%d\""), nMFooter);
sRes.Append(_T("/>"));
sRes += L"/>";
if(!pgBorders.IsEmpty())
sRes.Append(pgBorders);
sRes += pgBorders;
if(bPageNumStart)
sRes.AppendFormat(_T("<w:pgNumType w:start=\"%d\"/>"), PageNumStart);
if(!cols.IsEmpty())
sRes.Append(cols);
sRes.Append(_T("<w:docGrid w:linePitch=\"360\"/>"));
sRes += cols;
sRes += L"<w:docGrid w:linePitch=\"360\"/>";
if(bTitlePg && TitlePg)
sRes.Append(_T("<w:titlePg/>"));
sRes += L"<w:titlePg/>";
if(!sectPrChange.IsEmpty())
sRes.Append(sectPrChange);
sRes += sectPrChange;
return sRes;
}
};
@ -292,9 +292,9 @@ public:
if(ThemeColor.bColor)
sBackground += L" w:themeColor=\"" + ThemeColor.ToStringColor() + L"\"";
if(ThemeColor.bTint)
sBackground += L" w:themeColorTint=\"" + ThemeColor.ToStringTint() + L"\"";
sBackground += L" w:themeTint=\"" + ThemeColor.ToStringTint() + L"\"";
if(ThemeColor.bShade)
sBackground += L" w:themeColorShade=\"" + ThemeColor.ToStringShade() + L"\"";
sBackground += L" w:themeShade=\"" + ThemeColor.ToStringShade() + L"\"";
}
if (!bColor && !bThemeColor)
@ -330,13 +330,13 @@ public:
CString sShd;
if(bColor || (bThemeColor && ThemeColor.IsNoEmpty()))
{
sShd.Append(_T("<w:shd w:val=\"clear\" w:color=\"auto\""));
sShd += L"<w:shd w:val=\"clear\" w:color=\"auto\"";
if(bColor)
sShd.AppendFormat(_T(" w:fill=\"%ls\""), (const TCHAR *) Color.ToString());
if(bThemeColor && ThemeColor.IsNoEmpty())
{
if(ThemeColor.Auto && !bColor)
sShd.Append(_T(" w:fill=\"auto\""));
sShd += L" w:fill=\"auto\"";
if(ThemeColor.bColor)
sShd.AppendFormat(_T(" w:themeFill=\"%ls\""), (const TCHAR *) ThemeColor.ToStringColor());
if(ThemeColor.bTint)
@ -344,7 +344,7 @@ public:
if(ThemeColor.bShade)
sShd.AppendFormat(_T(" w:themeFillShade=\"%ls\""), (const TCHAR *) ThemeColor.ToStringShade());
}
sShd.Append(_T("/>"));
sShd += (_T("/>"));
}
return sShd;
}
@ -533,9 +533,9 @@ public:
{
switch(FontHint)
{
case 0: sFont.Append(_T(" w:hint=\"cs\""));break;
case 2: sFont.Append(_T(" w:hint=\"eastAsia\""));break;
default:sFont.Append(_T(" w:hint=\"default\""));break;
case 0: sFont += L" w:hint=\"cs\""; break;
case 2: sFont += L" w:hint=\"eastAsia\""; break;
default:sFont += L" w:hint=\"default\""; break;
}
}
sFont += _T("/>");
@ -612,7 +612,7 @@ public:
if(bThemeColor && ThemeColor.IsNoEmpty())
{
if(ThemeColor.Auto && !bColor)
sColor.Append(_T(" w:val=\"auto\""));
sColor += L" w:val=\"auto\"";
if(ThemeColor.bColor)
sColor.AppendFormat(_T(" w:themeColor=\"%ls\""), (const TCHAR *) ThemeColor.ToStringColor());
if(ThemeColor.bTint)
@ -620,7 +620,7 @@ public:
if(ThemeColor.bShade)
sColor.AppendFormat(_T(" w:themeShade=\"%ls\""), (const TCHAR *) ThemeColor.ToStringShade());
}
sColor.Append(_T("/>"));
sColor += L"/>";
pCStringWriter->WriteString(sColor);
}
if(bSpacing)
@ -1316,7 +1316,7 @@ public:
docLvlText* item = Text[i];
if(item->bText)
{
sText.Append(item->Text);
sText += (item->Text);
}
else if(item->bNumber)
{
@ -1543,20 +1543,20 @@ public:
sStart.Format(_T("<w:hyperlink r:id=\"%ls\""), (const TCHAR *) sCorrect_rId);
if(false == tooltip.IsEmpty())
{
sStart.Append(_T(" w:tooltip=\""));
sStart.Append(sCorrect_tooltip);
sStart.Append(_T("\""));
sStart += L" w:tooltip=\"";
sStart += sCorrect_tooltip;
sStart += L"\"";
}
if(false == anchor.IsEmpty())
{
sStart.Append(_T(" w:anchor=\""));
sStart.Append(sCorrect_anchor);
sStart.Append(_T("\""));
sStart += L" w:anchor=\"";
sStart += sCorrect_anchor;
sStart += L"\"";
}
sStart.Append(_T(" w:history=\"1\">"));
sStart += L" w:history=\"1\">";
wr.WriteString(sStart);
wr.Write(writer);
wr.WriteString(CString(_T("</w:hyperlink>")));
wr.WriteString(L"</w:hyperlink>");
}
}
};
@ -1629,17 +1629,17 @@ public:
CString writeRef(const CString& sBefore, const CString& sRef, const CString& sAfter)
{
CString sRes;
sRes.Append(writeRef(this, sBefore, sRef, sAfter));
sRes += (writeRef(this, sBefore, sRef, sAfter));
for(int i = 0, length = replies.size(); i < length; ++i)
sRes.Append(writeRef(replies[i], sBefore, sRef, sAfter));
sRes += (writeRef(replies[i], sBefore, sRef, sAfter));
return sRes;
}
CString writeTemplates(funcArg fReadFunction)
{
CString sRes;
sRes.Append(fReadFunction(this));
sRes += (fReadFunction(this));
for(int i = 0, length = replies.size(); i < length; ++i)
sRes.Append(fReadFunction(replies[i]));
sRes += (fReadFunction(replies[i]));
return sRes;
}
static CString writeRef(CComment* pComment, const CString& sBefore, const CString& sRef, const CString& sAfter)
@ -1650,9 +1650,9 @@ public:
pComment->bIdFormat = true;
pComment->IdFormat = pComment->m_oFormatIdCounter.getNextId();
}
sRes.Append(sBefore);
sRes += (sBefore);
sRes.AppendFormat(_T("<%ls w:id=\"%d\"/>"), (const TCHAR *) sRef, pComment->IdFormat);
sRes.Append(sAfter);
sRes += (sAfter);
return sRes;
}
static bool writeContentWritePart(CComment* pComment, CString& sText, int nPrevIndex, int nCurIndex, bool bFirst, CString& sRes)
@ -1672,8 +1672,8 @@ public:
}
CString sFormat = _T("<w:p w14:paraId=\"%ls\" w14:textId=\"%ls\"><w:pPr><w:spacing w:line=\"240\" w:after=\"0\" w:lineRule=\"auto\" w:before=\"0\"/><w:ind w:firstLine=\"0\" w:left=\"0\" w:right=\"0\"/><w:jc w:val=\"left\"/></w:pPr><w:r><w:rPr><w:rFonts w:eastAsia=\"Arial\" w:ascii=\"Arial\" w:hAnsi=\"Arial\" w:cs=\"Arial\"/><w:sz w:val=\"22\"/></w:rPr><w:t xml:space=\"preserve\">");
sRes.AppendFormat((const TCHAR *) sFormat, (const TCHAR *) sId, (const TCHAR *) sId);
sRes.Append(sPart);
sRes.Append(_T("</w:t></w:r></w:p>"));
sRes += (sPart);
sRes += (_T("</w:t></w:r></w:p>"));
return bFirst;
}
static CString writeContent(CComment* pComment)
@ -1689,9 +1689,9 @@ public:
if(false == pComment->UserName.IsEmpty())
{
CString sUserName = XmlUtils::EncodeXmlString(pComment->UserName);
sRes.Append(_T(" w:author=\""));
sRes.Append(sUserName);
sRes.Append(_T("\""));
sRes += (_T(" w:author=\""));
sRes += (sUserName);
sRes += (_T("\""));
//делаем initials
int nTokenPos = 0;
CString strToken = pComment->UserName.Tokenize(_T(" "), nTokenPos);
@ -1706,18 +1706,18 @@ public:
if(false == pComment->Date.IsEmpty())
{
CString sDate = XmlUtils::EncodeXmlString(pComment->Date);
sRes.Append(_T(" w:date=\""));
sRes.Append(sDate);
sRes.Append(_T("\""));
sRes += (_T(" w:date=\""));
sRes += (sDate);
sRes += (_T("\""));
}
if(false == sInitials.IsEmpty())
{
sInitials = XmlUtils::EncodeXmlString(sInitials);
sRes.Append(_T(" w:initials=\""));
sRes.Append(sInitials);
sRes.Append(_T("\""));
sRes += (_T(" w:initials=\""));
sRes += (sInitials);
sRes += (_T("\""));
}
sRes.Append(_T(">"));
sRes += (_T(">"));
if(false == pComment->Text.IsEmpty())
{
CString sText = pComment->Text;
@ -1735,7 +1735,7 @@ public:
}
writeContentWritePart(pComment, sText, nPrevIndex, sText.GetLength(), bFirst, sRes);
}
sRes.Append(_T("</w:comment>"));
sRes += (_T("</w:comment>"));
return sRes;
}
static CString writeContentExt(CComment* pComment)
@ -1763,11 +1763,11 @@ public:
{
CString sUserName = XmlUtils::EncodeXmlString(pComment->UserName);
CString sUserId = XmlUtils::EncodeXmlString(pComment->UserId);
sRes.Append(_T("<w15:person w15:author=\""));
sRes.Append(sUserName);
sRes.Append(_T("\"><w15:presenceInfo w15:providerId=\"Teamlab\" w15:userId=\""));
sRes.Append(sUserId);
sRes.Append(_T("\"/></w15:person>"));
sRes += (_T("<w15:person w15:author=\""));
sRes += (sUserName);
sRes += (_T("\"><w15:presenceInfo w15:providerId=\"Teamlab\" w15:userId=\""));
sRes += (sUserId);
sRes += (_T("\"/></w15:person>"));
}
return sRes;
}
@ -1823,7 +1823,7 @@ public:
CString sRes;
for (std::map<int, CComment*>::const_iterator it = m_mapComments.begin(); it != m_mapComments.end(); ++it)
{
sRes.Append(it->second->writeTemplates(CComment::writeContent));
sRes += (it->second->writeTemplates(CComment::writeContent));
}
return sRes;
}
@ -1832,7 +1832,7 @@ public:
CString sRes;
for (std::map<int, CComment*>::const_iterator it = m_mapComments.begin(); it != m_mapComments.end(); ++it)
{
sRes.Append(it->second->writeTemplates(CComment::writeContentExt));
sRes += (it->second->writeTemplates(CComment::writeContentExt));
}
return sRes;
}
@ -1841,7 +1841,7 @@ public:
CString sRes;
for (std::map<CString, CComment*>::const_iterator it = m_mapAuthors.begin(); it != m_mapAuthors.end(); ++it)
{
sRes.Append(it->second->writePeople(it->second));
sRes += (it->second->writePeople(it->second));
}
return sRes;
}
@ -1921,6 +1921,7 @@ public:
CString sSizeRelV;
int m_nDocPr;
CString sGraphicFramePr;
CString sDocPr;
CDrawingPropertyWrap DrawingPropertyWrap;
@ -2015,9 +2016,9 @@ public:
sXml.AppendFormat(_T("<wp:effectExtent l=\"%lld\" t=\"%lld\" r=\"%lld\" b=\"%lld\"/>"), emuEffectExtentL, emuEffectExtentT, emuEffectExtentR, emuEffectExtentB);
}
if(bChart)
if(!sDocPr.IsEmpty())
{
sXml.AppendFormat(_T("<wp:docPr id=\"%d\" name=\"Chart %d\"/>"), m_nDocPr, m_nDocPr);
sXml += (sDocPr);
}
else
{
@ -2025,11 +2026,11 @@ public:
}
if(!sGraphicFramePr.IsEmpty())
{
sXml.Append(sGraphicFramePr);
sXml += (sGraphicFramePr);
}
else
{
sXml.Append(_T("<wp:cNvGraphicFramePr/>"));
sXml += (_T("<wp:cNvGraphicFramePr/>"));
}
if(bChart)
{
@ -2037,7 +2038,7 @@ public:
}
else
{
sXml.Append(_T("</wp:inline>"));
sXml += (_T("</wp:inline>"));
}
}
}
@ -2074,7 +2075,7 @@ public:
nLayoutInCell = 0;
if(bChart)
sXml.Append(_T("<w:drawing>"));
sXml += (_T("<w:drawing>"));
sXml.AppendFormat(_T("<wp:anchor xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" distT=\"%lld\" distB=\"%lld\" distL=\"%lld\" distR=\"%lld\" simplePos=\"%d\" relativeHeight=\"%u\" behindDoc=\"%d\" locked=\"0\" layoutInCell=\"%d\" allowOverlap=\"1\">"), emuDistT, emuDistB, emuDistL, emuDistR, nSimplePos, nRelativeHeight, nBehindDoc, nLayoutInCell);
__int64 emuX = 0;
@ -2214,7 +2215,7 @@ public:
sXml.AppendFormat(_T("<wp:lineTo x=\"%lld\" y=\"%lld\"/>"), emuX, emuY);
}
}
sXml.Append(_T("</wp:wrapPolygon>"));
sXml += (_T("</wp:wrapPolygon>"));
sXml.AppendFormat(_T("</wp:%ls>"), (const TCHAR *) sTagName);
}
else
@ -2224,30 +2225,30 @@ public:
c_oSerImageType2::WrapThrough == DrawingPropertyWrap.WrappingType ||
c_oSerImageType2::WrapTight == DrawingPropertyWrap.WrappingType)
{
sXml.Append(_T("<wp:wrapSquare wrapText=\"bothSides\"/>"));
sXml += (_T("<wp:wrapSquare wrapText=\"bothSides\"/>"));
}
else
sXml.AppendFormat(_T("<wp:%ls/>"), (const TCHAR *) sTagName);
}
}
else
sXml.Append(_T("<wp:wrapNone/>"));
sXml += (_T("<wp:wrapNone/>"));
if(bChart)
{
sXml.AppendFormat(_T("<wp:docPr id=\"%d\" name=\"Chart %d\"/>"), m_nDocPr, m_nDocPr);
}
if(!sDocPr.IsEmpty())
{
sXml += (sDocPr);
}
else
{
sXml.AppendFormat(_T("<wp:docPr id=\"%d\" name=\"\"/>"), m_nDocPr);
}
if(!sGraphicFramePr.IsEmpty())
{
sXml.Append(sGraphicFramePr);
sXml += (sGraphicFramePr);
}
else
{
sXml.Append(_T("<wp:cNvGraphicFramePr/>"));
sXml += (_T("<wp:cNvGraphicFramePr/>"));
}
if(bChart)
{
@ -2256,17 +2257,17 @@ public:
if(!sSizeRelH.IsEmpty())
{
sXml.Append(sSizeRelH);
sXml += (sSizeRelH);
}
if(!sSizeRelV.IsEmpty())
{
sXml.Append(sSizeRelV);
sXml += (sSizeRelV);
}
sXml.Append(_T("</wp:anchor>"));
sXml += (_T("</wp:anchor>"));
if(bChart)
sXml.Append(_T("</w:drawing>"));
sXml += (_T("</w:drawing>"));
}
}
return sXml;
@ -2296,41 +2297,41 @@ public:
CString Write(bool bBandSize, bool bLayout)
{
CString sRes;
sRes.Append(_T("<w:tblPr>"));
sRes += (_T("<w:tblPr>"));
if(false == Style.IsEmpty())
sRes.Append(Style);
sRes += (Style);
if(false == tblpPr.IsEmpty())
sRes.Append(tblpPr);
sRes += (tblpPr);
if(!RowBandSize.IsEmpty())
sRes.Append(RowBandSize);
sRes += (RowBandSize);
if(!ColBandSize.IsEmpty())
sRes.Append(ColBandSize);
sRes += (ColBandSize);
if(false == TableW.IsEmpty())
sRes.Append(TableW);
sRes += (TableW);
if(false == Jc.IsEmpty())
sRes.Append(Jc);
sRes += (Jc);
if(false == TableCellSpacing.IsEmpty())
sRes.Append(TableCellSpacing);
sRes += (TableCellSpacing);
if(false == TableInd.IsEmpty())
sRes.Append(TableInd);
sRes += (TableInd);
if(false == TableBorders.IsEmpty())
sRes.Append(TableBorders);
sRes += (TableBorders);
if(false == Shd.IsEmpty())
sRes.Append(Shd);
sRes += (Shd);
if(bLayout)
{
if(false == Layout.IsEmpty())
sRes.Append(Layout);
sRes += (Layout);
else if(g_nCurFormatVersion < 4)
sRes.Append(_T("<w:tblLayout w:type=\"fixed\"/>"));
sRes += (_T("<w:tblLayout w:type=\"fixed\"/>"));
}
if(false == TableCellMar.IsEmpty())
sRes.Append(TableCellMar);
sRes += (TableCellMar);
if(false == Look.IsEmpty())
sRes.Append(Look);
sRes += (Look);
if(!tblPrChange.IsEmpty())
sRes.Append(tblPrChange);
sRes.Append(_T("</w:tblPr>"));
sRes += (tblPrChange);
sRes += (_T("</w:tblPr>"));
return sRes;
}
};
@ -2548,17 +2549,17 @@ public:
sStart.Format(_T("<w:hyperlink r:id=\"%ls\""), (const TCHAR *) sCorrect_rId);
if(false == sTooltip.IsEmpty())
{
sStart.Append(_T(" w:tooltip=\""));
sStart.Append(sCorrect_tooltip);
sStart.Append(_T("\""));
sStart += (_T(" w:tooltip=\""));
sStart += (sCorrect_tooltip);
sStart += (_T("\""));
}
if(false == sAnchor.IsEmpty())
{
sStart.Append(_T(" w:anchor=\""));
sStart.Append(sCorrect_anchor);
sStart.Append(_T("\""));
sStart += (_T(" w:anchor=\""));
sStart += (sCorrect_anchor);
sStart += (_T("\""));
}
sStart.Append(_T(" w:history=\"1\">"));
sStart += (_T(" w:history=\"1\">"));
wr.WriteString(sStart);
wr.Write(writer);
wr.WriteString(CString(_T("</w:hyperlink>")));
@ -2579,8 +2580,8 @@ public:
{
CString sCorrect_Instr = XmlUtils::EncodeXmlString(sInstr);
CString sStart(_T("<w:fldSimple w:instr=\""));
sStart.Append(sCorrect_Instr);
sStart.Append(_T("\">"));
sStart += (sCorrect_Instr);
sStart += (_T("\">"));
wr.WriteString(sStart);
wr.Write(writer);
wr.WriteString(CString(_T("</w:fldSimple>")));

View File

@ -33,13 +33,14 @@
#define READERS
#include "FileWriter.h"
#include "../BinWriter/BinReaderWriterDefines.h"
#include "ReaderClasses.h"
#include "../BinWriter/BinReaderWriterDefines.h"
#include "../../XlsxSerializerCom/Writer/BinaryReader.h"
#include "../../DesktopEditor/common/ASCVariant.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Docx.h"
#include "../DocWrapper/XlsxSerializer.h"
#include "../../DesktopEditor/common/ASCVariant.h"
namespace BinDocxRW {
@ -791,9 +792,9 @@ public:
CString sStyleName(m_oBufferedStream.GetString3(length));
sStyleName = XmlUtils::EncodeXmlString(sStyleName);
CString sStyle;
sStyle.Append(_T("<w:pStyle w:val=\""));
sStyle.Append(sStyleName);
sStyle.Append(_T("\" />"));
sStyle += L"<w:pStyle w:val=\"";
sStyle += sStyleName;
sStyle += L"\" />";
pCStringWriter->WriteString(sStyle);
}break;
case c_oSerProp_pPrType::numPr:
@ -1677,9 +1678,9 @@ public:
res = Read1(length, &Binary_tblPrReader::ReadCellMargins, this, &oTempWriter);
if(oTempWriter.GetCurSize() > 0)
{
pWiterTblPr->TableCellMar.Append(CString(_T("<w:tblCellMar>")));
pWiterTblPr->TableCellMar.Append(oTempWriter.GetData());
pWiterTblPr->TableCellMar.Append(CString(_T("</w:tblCellMar>")));
pWiterTblPr->TableCellMar += L"<w:tblCellMar>";
pWiterTblPr->TableCellMar += oTempWriter.GetData();
pWiterTblPr->TableCellMar += L"</w:tblCellMar>";
}
}
else if( c_oSerProp_tblPrType::TableBorders == type )
@ -1690,9 +1691,9 @@ public:
{
XmlUtils::CStringWriter oTempWriter;
odocBorders.Write(&oTempWriter, false);
pWiterTblPr->TableBorders.Append(CString(_T("<w:tblBorders>")));
pWiterTblPr->TableBorders.Append(oTempWriter.GetData());
pWiterTblPr->TableBorders.Append(CString(_T("</w:tblBorders>")));
pWiterTblPr->TableBorders += L"<w:tblBorders>";
pWiterTblPr->TableBorders += oTempWriter.GetData();
pWiterTblPr->TableBorders += L"</w:tblBorders>";
}
}
else if( c_oSerProp_tblPrType::Shd == type )
@ -1709,17 +1710,17 @@ public:
{
XmlUtils::CStringWriter oTempWriter;
res = Read2(length, &Binary_tblPrReader::Read_tblpPr, this, &oTempWriter);
pWiterTblPr->tblpPr.Append(CString(_T("<w:tblpPr w:vertAnchor=\"page\" w:horzAnchor=\"page\"")));
pWiterTblPr->tblpPr.Append(oTempWriter.GetData());
pWiterTblPr->tblpPr.Append(CString(_T("/>")));
pWiterTblPr->tblpPr += L"<w:tblpPr w:vertAnchor=\"page\" w:horzAnchor=\"page\"";
pWiterTblPr->tblpPr += oTempWriter.GetData();
pWiterTblPr->tblpPr += L"/>";
}
else if( c_oSerProp_tblPrType::tblpPr2 == type )
{
XmlUtils::CStringWriter oTempWriter;
res = Read2(length, &Binary_tblPrReader::Read_tblpPr2, this, &oTempWriter);
pWiterTblPr->tblpPr.Append(CString(_T("<w:tblpPr")));
pWiterTblPr->tblpPr.Append(oTempWriter.GetData());
pWiterTblPr->tblpPr.Append(CString(_T("/>")));
pWiterTblPr->tblpPr += L"<w:tblpPr";
pWiterTblPr->tblpPr += oTempWriter.GetData();
pWiterTblPr->tblpPr += L"/>";
}
else if( c_oSerProp_tblPrType::Style == type )
{
@ -1887,10 +1888,10 @@ public:
CString sXml;
switch(m_oBufferedStream.GetUChar())
{
case 0:sXml.Append(_T(" w:horzAnchor=\"margin\""));break;
case 1:sXml.Append(_T(" w:horzAnchor=\"page\""));break;
case 2:sXml.Append(_T(" w:horzAnchor=\"text\""));break;
default:sXml.Append(_T(" w:horzAnchor=\"text\""));break;
case 0:sXml += (_T(" w:horzAnchor=\"margin\""));break;
case 1:sXml += (_T(" w:horzAnchor=\"page\""));break;
case 2:sXml += (_T(" w:horzAnchor=\"text\""));break;
default:sXml += (_T(" w:horzAnchor=\"text\""));break;
}
pCStringWriter->WriteString(sXml);
}
@ -1906,12 +1907,12 @@ public:
CString sXml;
switch(m_oBufferedStream.GetUChar())
{
case 0:sXml.Append(_T(" w:tblpXSpec=\"center\""));break;
case 1:sXml.Append(_T(" w:tblpXSpec=\"inside\""));break;
case 2:sXml.Append(_T(" w:tblpXSpec=\"left\""));break;
case 3:sXml.Append(_T(" w:tblpXSpec=\"outside\""));break;
case 4:sXml.Append(_T(" w:tblpXSpec=\"right\""));break;
default:sXml.Append(_T(" w:tblpXSpec=\"left\""));break;
case 0:sXml += (_T(" w:tblpXSpec=\"center\""));break;
case 1:sXml += (_T(" w:tblpXSpec=\"inside\""));break;
case 2:sXml += (_T(" w:tblpXSpec=\"left\""));break;
case 3:sXml += (_T(" w:tblpXSpec=\"outside\""));break;
case 4:sXml += (_T(" w:tblpXSpec=\"right\""));break;
default:sXml += (_T(" w:tblpXSpec=\"left\""));break;
}
pCStringWriter->WriteString(sXml);
}
@ -1920,10 +1921,10 @@ public:
CString sXml;
switch(m_oBufferedStream.GetUChar())
{
case 0:sXml.Append(_T(" w:vertAnchor=\"margin\""));break;
case 1:sXml.Append(_T(" w:vertAnchor=\"page\""));break;
case 2:sXml.Append(_T(" w:vertAnchor=\"text\""));break;
default:sXml.Append(_T(" w:vertAnchor=\"text\""));break;
case 0:sXml += (_T(" w:vertAnchor=\"margin\""));break;
case 1:sXml += (_T(" w:vertAnchor=\"page\""));break;
case 2:sXml += (_T(" w:vertAnchor=\"text\""));break;
default:sXml += (_T(" w:vertAnchor=\"text\""));break;
}
pCStringWriter->WriteString(sXml);
}
@ -1939,13 +1940,13 @@ public:
CString sXml;
switch(m_oBufferedStream.GetUChar())
{
case 0:sXml.Append(_T(" w:tblpYSpec=\"bottom\""));break;
case 1:sXml.Append(_T(" w:tblpYSpec=\"center\""));break;
case 2:sXml.Append(_T(" w:tblpYSpec=\"inline\""));break;
case 3:sXml.Append(_T(" w:tblpYSpec=\"inside\""));break;
case 4:sXml.Append(_T(" w:tblpYSpec=\"outside\""));break;
case 5:sXml.Append(_T(" w:tblpYSpec=\"top\""));break;
default:sXml.Append(_T(" w:tblpYSpec=\"top\""));break;
case 0:sXml += (_T(" w:tblpYSpec=\"bottom\""));break;
case 1:sXml += (_T(" w:tblpYSpec=\"center\""));break;
case 2:sXml += (_T(" w:tblpYSpec=\"inline\""));break;
case 3:sXml += (_T(" w:tblpYSpec=\"inside\""));break;
case 4:sXml += (_T(" w:tblpYSpec=\"outside\""));break;
case 5:sXml += (_T(" w:tblpYSpec=\"top\""));break;
default:sXml += (_T(" w:tblpYSpec=\"top\""));break;
}
pCStringWriter->WriteString(sXml);
}
@ -2936,11 +2937,11 @@ public:
{
m_oFileWriter.m_oMediaWriter.AddImage2(pFileNative);
}
else if(NSFile::CFileBinary::Exists(string2std_string(sFilePath)))
else if(NSFile::CFileBinary::Exists(sFilePath))
{
m_oFileWriter.m_oMediaWriter.AddImage(sFilePath);
if(bDeleteFile)
NSFile::CFileBinary::Remove(string2std_string(sFilePath));
NSFile::CFileBinary::Remove(sFilePath);
}
}
else
@ -3057,36 +3058,36 @@ public:
{
switch(i)
{
case 0: sSchemeMapping.Append(_T(" w:accent1"));break;
case 1: sSchemeMapping.Append(_T(" w:accent2"));break;
case 2: sSchemeMapping.Append(_T(" w:accent3"));break;
case 3: sSchemeMapping.Append(_T(" w:accent4"));break;
case 4: sSchemeMapping.Append(_T(" w:accent5"));break;
case 5: sSchemeMapping.Append(_T(" w:accent6"));break;
case 6: sSchemeMapping.Append(_T(" w:bg1"));break;
case 7: sSchemeMapping.Append(_T(" w:bg2"));break;
case 8: sSchemeMapping.Append(_T(" w:followedHyperlink"));break;
case 9: sSchemeMapping.Append(_T(" w:hyperlink"));break;
case 10: sSchemeMapping.Append(_T(" w:t1"));break;
case 11: sSchemeMapping.Append(_T(" w:t2"));break;
case 0: sSchemeMapping += (_T(" w:accent1"));break;
case 1: sSchemeMapping += (_T(" w:accent2"));break;
case 2: sSchemeMapping += (_T(" w:accent3"));break;
case 3: sSchemeMapping += (_T(" w:accent4"));break;
case 4: sSchemeMapping += (_T(" w:accent5"));break;
case 5: sSchemeMapping += (_T(" w:accent6"));break;
case 6: sSchemeMapping += (_T(" w:bg1"));break;
case 7: sSchemeMapping += (_T(" w:bg2"));break;
case 8: sSchemeMapping += (_T(" w:followedHyperlink"));break;
case 9: sSchemeMapping += (_T(" w:hyperlink"));break;
case 10: sSchemeMapping += (_T(" w:t1"));break;
case 11: sSchemeMapping += (_T(" w:t2"));break;
}
switch(aSchemeMapping[i])
{
case 0: sSchemeMapping.Append(_T("=\"accent1\""));break;
case 1: sSchemeMapping.Append(_T("=\"accent2\""));break;
case 2: sSchemeMapping.Append(_T("=\"accent3\""));break;
case 3: sSchemeMapping.Append(_T("=\"accent4\""));break;
case 4: sSchemeMapping.Append(_T("=\"accent5\""));break;
case 5: sSchemeMapping.Append(_T("=\"accent6\""));break;
case 6: sSchemeMapping.Append(_T("=\"dark1\""));break;
case 7: sSchemeMapping.Append(_T("=\"dark2\""));break;
case 8: sSchemeMapping.Append(_T("=\"followedHyperlink\""));break;
case 9: sSchemeMapping.Append(_T("=\"hyperlink\""));break;
case 10: sSchemeMapping.Append(_T("=\"light1\""));break;
case 11: sSchemeMapping.Append(_T("=\"light2\""));break;
case 0: sSchemeMapping += (_T("=\"accent1\""));break;
case 1: sSchemeMapping += (_T("=\"accent2\""));break;
case 2: sSchemeMapping += (_T("=\"accent3\""));break;
case 3: sSchemeMapping += (_T("=\"accent4\""));break;
case 4: sSchemeMapping += (_T("=\"accent5\""));break;
case 5: sSchemeMapping += (_T("=\"accent6\""));break;
case 6: sSchemeMapping += (_T("=\"dark1\""));break;
case 7: sSchemeMapping += (_T("=\"dark2\""));break;
case 8: sSchemeMapping += (_T("=\"followedHyperlink\""));break;
case 9: sSchemeMapping += (_T("=\"hyperlink\""));break;
case 10: sSchemeMapping += (_T("=\"light1\""));break;
case 11: sSchemeMapping += (_T("=\"light2\""));break;
}
}
sSchemeMapping.Append(_T("/>"));
sSchemeMapping += (_T("/>"));
m_oSettingWriter.AddSetting(sSchemeMapping);
m_oFileWriter.m_pDrawingConverter->LoadClrMap(sSchemeMapping);
}
@ -3435,9 +3436,9 @@ public:
sFontName = XmlUtils::EncodeXmlString(sFontName);
CString sVal;
sVal.Append(_T("<m:mathFont m:val=\""));
sVal.Append(sFontName);
sVal.Append(_T("\" />"));
sVal += (_T("<m:mathFont m:val=\""));
sVal += (sFontName);
sVal += (_T("\" />"));
m_oFileWriter.m_oSettingWriter.AddSetting(sVal);
}
else
@ -4080,9 +4081,9 @@ public:
if (lVal)
{
CString sXml; sXml.Format(_T(" m:val=\"%d\""), lVal);
sVal.Append(sXml);
sVal += (sXml);
}
sVal.Append(_T(" />"));
sVal += (_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -4156,9 +4157,9 @@ public:
{
CString sChr = GetMathText (length);
CString sVal;
sVal.Append(_T("<m:begChr m:val=\""));
sVal.Append(sChr);
sVal.Append(_T("\" />"));
sVal += (_T("<m:begChr m:val=\""));
sVal += (sChr);
sVal += (_T("\" />"));
GetRunStringWriter().WriteString(sVal);
}
@ -4293,9 +4294,9 @@ public:
if (lVal)
{
CString sXml; sXml.Format(_T(" m:alnAt=\"%d\""), lVal);
sVal.Append(sXml);
sVal += (sXml);
}
sVal.Append(_T(" />"));
sVal += (_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else if ( c_oSer_OMathBottomNodesValType::Val == type )
@ -4319,9 +4320,9 @@ public:
if (lVal)
{
CString sXml; sXml.Format(_T(" m:val=\"%d\""), lVal);
sVal.Append(sXml);
sVal += (sXml);
}
sVal.Append(_T(" />"));
sVal += (_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -4340,9 +4341,9 @@ public:
if (lVal)
{
CString sXml; sXml.Format(_T(" m:val=\"%d\""), lVal);
sVal.Append(sXml);
sVal += (sXml);
}
sVal.Append(_T(" />"));
sVal += (_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -4357,9 +4358,9 @@ public:
{
CString sChr = GetMathText (length);
CString sVal;
sVal.Append(_T("<m:chr m:val=\""));
sVal.Append(sChr);
sVal.Append(_T("\" />"));
sVal += (_T("<m:chr m:val=\""));
sVal += (sChr);
sVal += (_T("\" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -4377,9 +4378,9 @@ public:
if (lVal)
{
CString sXml; sXml.Format(_T(" m:val=\"%d\""), lVal);
sVal.Append(sXml);
sVal += (sXml);
}
sVal.Append(_T(" />"));
sVal += (_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -4397,9 +4398,9 @@ public:
if (lVal)
{
CString sXml; sXml.Format(_T(" m:val=\"%d\""), lVal);
sVal.Append(sXml);
sVal += (sXml);
}
sVal.Append(_T(" />"));
sVal += (_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -4545,9 +4546,9 @@ public:
{
CString sChr = GetMathText (length);
CString sVal;
sVal.Append(_T("<m:endChr m:val=\""));
sVal.Append(sChr);
sVal.Append(_T("\" />"));
sVal += (_T("<m:endChr m:val=\""));
sVal += (sChr);
sVal += (_T("\" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -5565,9 +5566,9 @@ public:
if (lVal)
{
CString sXml; sXml.Format(_T(" m:val=\"%d\""), lVal);
sVal.Append(sXml);
sVal += (sXml);
}
sVal.Append(_T(" />"));
sVal += (_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -5585,9 +5586,9 @@ public:
if (lVal)
{
CString sXml; sXml.Format(_T(" m:val=\"%d\""), lVal);
sVal.Append(sXml);
sVal += (sXml);
}
sVal.Append(_T(" />"));
sVal += (_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -5625,9 +5626,9 @@ public:
{
CString sChr = GetMathText (length);
CString sVal;
sVal.Append(_T("<m:sepChr m:val=\""));
sVal.Append(sChr);
sVal.Append(_T("\" />"));
sVal += (_T("<m:sepChr m:val=\""));
sVal += (sChr);
sVal += (_T("\" />"));
GetRunStringWriter().WriteString(sVal);
}
else
@ -6316,20 +6317,14 @@ public:
CString sDrawingProperty = oCDrawingProperty.Write();
if(false == sDrawingProperty.IsEmpty())
{
VARIANT var;
var.vt = VT_I4;
var.lVal = m_oFileWriter.m_oChartWriter.getChartCount();
m_oFileWriter.m_pDrawingConverter->SetAdditionalParam(CString(_T("DocumentChartsCount")), var);
m_oFileWriter.m_pDrawingConverter->SetDocumentChartsCount(m_oFileWriter.m_oChartWriter.getChartCount());
long nCurPos = m_oBufferedStream.GetPos();
CString* bstrDrawingXml = NULL;
m_oFileWriter.m_pDrawingConverter->SaveObjectEx(oCDrawingProperty.DataPos, oCDrawingProperty.DataLength, sDrawingProperty, XMLWRITER_DOC_TYPE_DOCX, &bstrDrawingXml);
m_oBufferedStream.Seek(nCurPos);
VARIANT vt;
m_oFileWriter.m_pDrawingConverter->GetAdditionalParam(CString(_T("DocumentChartsCount")), &vt);
if(VT_I4 == vt.vt)
m_oFileWriter.m_oChartWriter.setChartCount(vt.lVal);
m_oFileWriter.m_oChartWriter.setChartCount(m_oFileWriter.m_pDrawingConverter->GetDocumentChartsCount());
if(NULL != bstrDrawingXml && false == bstrDrawingXml->IsEmpty())
{
@ -6577,30 +6572,15 @@ public:
}
else if( c_oSerBackgroundType::pptxDrawing == type )
{
CDrawingProperty oCDrawingProperty(m_oFileWriter.getNextDocPr());
oCDrawingProperty.bType = oCDrawingProperty.bHeight = oCDrawingProperty.bWidth = true;
oCDrawingProperty.Type = c_oAscWrapStyle::Inline;
CDrawingProperty oCDrawingProperty(m_oFileWriter.getNextDocPr());
res = Read2(length, &Binary_DocumentTableReader::ReadPptxDrawing, this, &oCDrawingProperty);
CString sDrawingProperty = oCDrawingProperty.Write();
BYTE type = m_oBufferedStream.GetUChar();
long lenType = m_oBufferedStream.GetUChar();
int nRealLen = m_oBufferedStream.GetLong();
CString* bstrDrawingXml = NULL;
long nCurPos = m_oBufferedStream.GetPos();
m_oFileWriter.m_pDrawingConverter->SaveObjectEx(nCurPos, nRealLen, sDrawingProperty, XMLWRITER_DOC_TYPE_DOCX, &bstrDrawingXml);
if(NULL != bstrDrawingXml && false == bstrDrawingXml->IsEmpty())
{
pBackground->sObject = *bstrDrawingXml;
}
RELEASEOBJECT(bstrDrawingXml);
m_oBufferedStream.Seek(nCurPos + nRealLen);
if (oCDrawingProperty.bDataPos && oCDrawingProperty.bDataLength)
{
long nCurPos = m_oBufferedStream.GetPos();
pBackground->sObject = m_oFileWriter.m_pDrawingConverter->SaveObjectBackground(oCDrawingProperty.DataPos, oCDrawingProperty.DataLength);
m_oBufferedStream.Seek(nCurPos);
}
}
else
res = c_oSerConstants::ReadUnknown;
@ -6653,14 +6633,14 @@ public:
//save xlsx
std::wstring sXlsxFilename = L"Microsoft_Excel_Worksheet" + std::to_wstring(m_oFileWriter.m_oChartWriter.getChartCount() + 1) + L".xlsx";
std::wstring sXlsxPath = string2std_string(pathChartsWorksheetDir.GetPath() + FILE_SEPARATOR_STR) + sXlsxFilename;
std::wstring sXlsxPath = pathChartsWorksheetDir.GetPath() + FILE_SEPARATOR_STR + sXlsxFilename;
BinXlsxRW::CXlsxSerializer oXlsxSerializer;
oXlsxSerializer.writeChartXlsx(sXlsxPath, *pChartSpace);
std::wstring sChartsWorksheetRelsName = L"../embeddings/" + sXlsxFilename;
long rIdXlsx;
CString bstrChartsWorksheetRelType = OOX::Spreadsheet::FileTypes::ChartsWorksheet.RelationType();
m_oFileWriter.m_pDrawingConverter->WriteRels(bstrChartsWorksheetRelType, std_string2string(sChartsWorksheetRelsName), CString(), &rIdXlsx);
m_oFileWriter.m_pDrawingConverter->WriteRels(bstrChartsWorksheetRelType, sChartsWorksheetRelsName, CString(), &rIdXlsx);
pChartSpace->m_oChartSpace.m_externalData = new OOX::Spreadsheet::CT_ExternalData();
pChartSpace->m_oChartSpace.m_externalData->m_id = new std::wstring();
@ -6673,14 +6653,15 @@ public:
NSStringUtils::CStringBuilder sw;
pChartSpace->toXML(sw);
CString sFilename;
CString sRelsName;
std::wstring sFilename;
std::wstring sRelsName;
int nChartIndex;
std::wstring sContent = sw.GetData();
m_oFileWriter.m_oChartWriter.AddChart(sContent, sRelsName, sFilename, nChartIndex);
m_oFileWriter.m_oChartWriter.AddChart(sContent, sRelsName, sFilename, nChartIndex);
m_oFileWriter.m_oContentTypesWriter.AddOverrideRaw(oSaveParams.sAdditionalContentTypes);
OOX::CPath pathChartsRels = pathChartsRelsDir.GetPath() + FILE_SEPARATOR_STR + sFilename + _T(".rels");
OOX::CPath pathChartsRels = pathChartsRelsDir.GetPath() + FILE_SEPARATOR_STR + sFilename + L".rels";
m_oFileWriter.m_pDrawingConverter->SaveDstContentRels(pathChartsRels.GetPath());
long rIdChart;
@ -6818,6 +6799,13 @@ public:
oGraphicFramePr.m_oGraphicFrameLocks.reset(pLocking);
pDrawingProperty->sGraphicFramePr = oGraphicFramePr.toXML();
}
else if ( c_oSerImageType2::DocPr == type )
{
OOX::Drawing::CNonVisualDrawingProps pNonVisualDrawingProps;
pNonVisualDrawingProps.m_eType = OOX::et_wp_docPr;
res = Read1(length, &Binary_DocumentTableReader::ReadDocPr, this, &pNonVisualDrawingProps);
pDrawingProperty->sDocPr = pNonVisualDrawingProps.toXML();
}
else
res = c_oSerConstants::ReadUnknown;
return res;
@ -6860,6 +6848,39 @@ public:
res = c_oSerConstants::ReadUnknown;
return res;
}
int ReadDocPr(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
OOX::Drawing::CNonVisualDrawingProps* pNonVisualDrawingProps = static_cast<OOX::Drawing::CNonVisualDrawingProps*>(poResult);
if ( c_oSerDocPr::Id == type )
{
pNonVisualDrawingProps->m_oId.Init();
pNonVisualDrawingProps->m_oId->SetValue(m_oBufferedStream.GetLong());
}
else if ( c_oSerDocPr::Name == type )
{
pNonVisualDrawingProps->m_sName.Init();
pNonVisualDrawingProps->m_sName->Append(m_oBufferedStream.GetString3(length));
}
else if ( c_oSerDocPr::Hidden == type )
{
pNonVisualDrawingProps->m_oHidden.Init();
pNonVisualDrawingProps->m_oHidden->FromBool(m_oBufferedStream.GetBool());
}
else if ( c_oSerDocPr::Title == type )
{
pNonVisualDrawingProps->m_sTitle.Init();
pNonVisualDrawingProps->m_sTitle->Append(m_oBufferedStream.GetString3(length));
}
else if ( c_oSerDocPr::Descr == type )
{
pNonVisualDrawingProps->m_sDescr.Init();
pNonVisualDrawingProps->m_sDescr->Append(m_oBufferedStream.GetString3(length));
}
else
res = c_oSerConstants::ReadUnknown;
return res;
}
int ReadEffectExtent(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;

View File

@ -57,7 +57,7 @@ namespace Writers
if(sFontDir.IsEmpty())
m_oApplicationFonts.Initialize();
else
m_oApplicationFonts.InitializeFromFolder(string2std_string(sFontDir));
m_oApplicationFonts.InitializeFromFolder(sFontDir);
CFontList* pFontList = m_oApplicationFonts.GetList();
if(NULL != pFontList)
{

View File

@ -198,7 +198,7 @@ namespace MathEquation
// nCurPos = WriteItemStart(BinDocxRW::c_oSerRunType::rPr);
CString sFontName;
//sFontName.Format(_T("%lS"), pFont->sName.c_str());
sFontName.Insert(0, _T("Cambria Math"));
if (sFontName)
{

View File

@ -557,7 +557,8 @@ extern int g_nCurFormatVersion;
SizeRelH = 27,
SizeRelV = 28,
Embedded = 29,
GraphicFramePr = 30
GraphicFramePr = 30,
DocPr = 31
};}
namespace c_oSerEffectExtent{enum c_oSerEffectExtent
{
@ -986,6 +987,14 @@ extern int g_nCurFormatVersion;
PrEndPos = 10,
PrRef = 11
};}
namespace c_oSerDocPr{enum c_oSerDocPr
{
Id = 0,
Name = 1,
Hidden = 2,
Title = 3,
Descr = 4
};}
}
#endif // #ifndef DOCX_BIN_READER_WRITER_DEFINES

View File

@ -5538,6 +5538,14 @@ namespace BinDocxRW
WriteNvGraphicFramePr(pInline.m_oCNvGraphicFramePr.get());
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if(pInline.m_oDocPr.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DocPr);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
nCurPos = m_oBcw.WriteItemWithLengthStart();
WriteDocPr(pInline.m_oDocPr.get());
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
}
}
else if(img.m_oAnchor.IsInit() )
@ -5713,6 +5721,14 @@ namespace BinDocxRW
WriteNvGraphicFramePr(pAnchor.m_oCNvGraphicFramePr.get());
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if(pAnchor.m_oDocPr.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DocPr);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
nCurPos = m_oBcw.WriteItemWithLengthStart();
WriteDocPr(pAnchor.m_oDocPr.get());
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
}
}
if(bDeleteDrawing)
@ -5761,6 +5777,40 @@ namespace BinDocxRW
}
}
}
void WriteDocPr(const OOX::Drawing::CNonVisualDrawingProps& oDocPr)
{
int nCurPos;
if(oDocPr.m_oId.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerDocPr::Id);
m_oBcw.m_oStream.WriteLONG(oDocPr.m_oId->GetValue());
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if(oDocPr.m_sName.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerDocPr::Name);
m_oBcw.m_oStream.WriteStringW3(oDocPr.m_sName.get());
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if(oDocPr.m_oHidden.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerDocPr::Hidden);
m_oBcw.m_oStream.WriteBOOL(oDocPr.m_oHidden->ToBool());
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if(oDocPr.m_sTitle.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerDocPr::Title);
m_oBcw.m_oStream.WriteStringW3(oDocPr.m_sTitle.get());
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if(oDocPr.m_sDescr.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerDocPr::Descr);
m_oBcw.m_oStream.WriteStringW3(oDocPr.m_sDescr.get());
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
}
void WriteEffectExtent(const OOX::Drawing::CEffectExtent& oEffectExtent)
{
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::Left);
@ -6350,6 +6400,7 @@ namespace BinDocxRW
for(int i = 0, length = Content.size(); i < length; i++)
{
OOX::WritingElement* item = Content[i];
if(OOX::et_w_tc == item->getType())
{
OOX::Logic::CTc* tc = static_cast<OOX::Logic::CTc*>(item);

View File

@ -248,7 +248,7 @@ namespace BinXlsxRW{
pTable->m_oTable->m_oDisplayName.Init();
pTable->m_oTable->m_oDisplayName->append(L"Table1");
pTable->m_oTable->m_oRef.Init();
pTable->m_oTable->m_oRef->SetValue(std_string2string(OOX::Spreadsheet::CCell::combineRef(m_nRow1 - 1, m_nCol1 - 1) + L":" + OOX::Spreadsheet::CCell::combineRef(m_nRow2 - 1, m_nCol2 - 1)));
pTable->m_oTable->m_oRef->SetValue(OOX::Spreadsheet::CCell::combineRef(m_nRow1 - 1, m_nCol1 - 1) + L":" + OOX::Spreadsheet::CCell::combineRef(m_nRow2 - 1, m_nCol2 - 1));
pTable->m_oTable->m_oTotalsRowCount.Init();
pTable->m_oTable->m_oTotalsRowCount->SetValue(0);
pTable->m_oTable->m_oTableBorderDxfId.Init();

View File

@ -50,48 +50,45 @@ BinDocxRW::CDocxSerializer::CDocxSerializer()
}
bool BinDocxRW::CDocxSerializer::ConvertDocxToDoct(const CString& sSrcFileName, const CString& sDstFileName, const CString& sTmpDir, const CString& sXMLOptions)
{
std::wstring strDirSrc = NSSystemPath::Combine(string2std_string(sTmpDir), _T("from"));
std::wstring strDirDst = NSSystemPath::Combine(string2std_string(sTmpDir), _T("to"));
std::wstring strEditorBin = NSSystemPath::Combine(strDirDst, _T("Editor.bin"));
std::wstring strDirSrc = NSSystemPath::Combine(sTmpDir, L"from");
std::wstring strDirDst = NSSystemPath::Combine(sTmpDir, L"to");
std::wstring strEditorBin = NSSystemPath::Combine(strDirDst, L"Editor.bin");
NSDirectory::CreateDirectory(strDirSrc);
NSDirectory::CreateDirectory(strDirDst);
CString sDirSrc = std_string2string(strDirSrc);
CString sEditorBin = std_string2string(strEditorBin);
COfficeUtils oCOfficeUtils(NULL);
if(S_OK == oCOfficeUtils.ExtractToDirectory(string2std_string(sSrcFileName), strDirSrc, NULL, 0))
if(saveToFile(sEditorBin, sDirSrc, sXMLOptions))
if(S_OK == oCOfficeUtils.CompressFileOrDirectory(strDirDst, string2std_string(sDstFileName), -1))
if(S_OK == oCOfficeUtils.ExtractToDirectory(sSrcFileName, strDirSrc, NULL, 0))
if(saveToFile(strEditorBin, strDirSrc, sXMLOptions))
if(S_OK == oCOfficeUtils.CompressFileOrDirectory(strDirDst, sDstFileName, -1))
return true;
return false;
}
bool BinDocxRW::CDocxSerializer::ConvertDoctToDocx(const CString& sSrcFileName, const CString& sDstFileName, const CString& sTmpDir, const CString& sXMLOptions)
{
std::wstring strDirSrc = NSSystemPath::Combine(string2std_string(sTmpDir), _T("from"));
std::wstring strEditorBin = NSSystemPath::Combine(strDirSrc, _T("Editor.bin"));
std::wstring strDirDst = NSSystemPath::Combine(string2std_string(sTmpDir), _T("to"));
std::wstring strDirSrc = NSSystemPath::Combine(sTmpDir, L"from");
std::wstring strEditorBin = NSSystemPath::Combine(strDirSrc, L"Editor.bin");
std::wstring strDirDst = NSSystemPath::Combine(sTmpDir, L"to");
NSDirectory::CreateDirectory(strDirSrc);
NSDirectory::CreateDirectory(strDirDst);
CString sEditorBin = std_string2string(strEditorBin);
CString sEditorBin = strEditorBin;
COfficeUtils oCOfficeUtils(NULL);
if(S_OK == oCOfficeUtils.ExtractToDirectory(string2std_string(sSrcFileName), strDirSrc, NULL, 0))
if(S_OK == oCOfficeUtils.ExtractToDirectory(sSrcFileName, strDirSrc, NULL, 0))
{
CString sMediaPath;
CString sThemePath;
CString sEmbedPath;
CreateDocxFolders(std_string2string(strDirDst), sThemePath, sMediaPath, sEmbedPath);
CreateDocxFolders(strDirDst, sThemePath, sMediaPath, sEmbedPath);
if(loadFromFile(sEditorBin, std_string2string(strDirDst), sXMLOptions, sThemePath, sMediaPath, sEmbedPath))
if(loadFromFile(sEditorBin, strDirDst, sXMLOptions, sThemePath, sMediaPath, sEmbedPath))
{
if(S_OK == oCOfficeUtils.CompressFileOrDirectory(strDirDst, string2std_string(sDstFileName), -1))
if(S_OK == oCOfficeUtils.CompressFileOrDirectory(strDirDst, sDstFileName, -1))
return true;
}
}
@ -102,7 +99,7 @@ bool BinDocxRW::CDocxSerializer::saveToFile(const CString& sSrcFileName, const C
OOX::CPath pathMain(sSrcFileName);
OOX::CPath pathMedia = pathMain.GetDirectory() + FILE_SEPARATOR_STR + _T("media");
NSDirectory::CreateDirectory(string2std_string(pathMedia.GetPath()));
NSDirectory::CreateDirectory(pathMedia.GetPath());
COfficeFontPicker* pFontPicker = new COfficeFontPicker();
pFontPicker->Init(m_sFontDir);
@ -116,7 +113,7 @@ bool BinDocxRW::CDocxSerializer::saveToFile(const CString& sSrcFileName, const C
NSFontCutter::CEmbeddedFontsManager* pEmbeddedFontsManager = NULL;
if(false == m_sEmbeddedFontsDir.IsEmpty())
{
NSDirectory::CreateDirectory(string2std_string(m_sEmbeddedFontsDir));
NSDirectory::CreateDirectory(m_sEmbeddedFontsDir);
pFontPicker->SetEmbeddedFontsDirectory(m_sEmbeddedFontsDir);
@ -146,7 +143,7 @@ bool BinDocxRW::CDocxSerializer::saveToFile(const CString& sSrcFileName, const C
if (m_bIsNoBase64Save)
{
NSFile::CFileBinary oFile;
oFile.CreateFileW(string2std_string(sSrcFileName));
oFile.CreateFileW(sSrcFileName);
oFile.WriteFile(pbBinBuffer, nBinBufferLen);
oFile.CloseFile();
}
@ -158,8 +155,8 @@ bool BinDocxRW::CDocxSerializer::saveToFile(const CString& sSrcFileName, const C
if(true == Base64_1::Base64Encode(pbBinBuffer, nBinBufferLen, pbBase64Buffer, &nBase64BufferLen))
{
NSFile::CFileBinary oFile;
oFile.CreateFileW(string2std_string(sSrcFileName));
oFile.WriteStringUTF8(string2std_string(oBinaryFileWriter.WriteFileHeader(nBinBufferLen)));
oFile.CreateFileW(sSrcFileName);
oFile.WriteStringUTF8(oBinaryFileWriter.WriteFileHeader(nBinBufferLen));
oFile.WriteFile(pbBase64Buffer, nBase64BufferLen);
oFile.CloseFile();
}
@ -175,32 +172,32 @@ bool BinDocxRW::CDocxSerializer::CreateDocxFolders(CString strDirectory, CString
bool res = true;
// rels
OOX::CPath pathRels = strDirectory + FILE_SEPARATOR_STR + _T("_rels");
if (!NSDirectory::CreateDirectory(pathRels.GetPath().GetBuffer())) res = false;
if (!NSDirectory::CreateDirectory(pathRels.GetPath())) res = false;
// word
OOX::CPath pathWord = strDirectory + FILE_SEPARATOR_STR + _T("word");
if (!NSDirectory::CreateDirectory(pathWord.GetPath().GetBuffer())) res = false;
if (!NSDirectory::CreateDirectory(pathWord.GetPath())) res = false;
// documentRels
OOX::CPath pathWordRels = pathWord + FILE_SEPARATOR_STR + _T("_rels");
if (!NSDirectory::CreateDirectory(pathWordRels.GetPath().GetBuffer()))res = false;
if (!NSDirectory::CreateDirectory(pathWordRels.GetPath()))res = false;
//media
OOX::CPath pathMedia = pathWord + FILE_SEPARATOR_STR + _T("media");
if (!NSDirectory::CreateDirectory(pathMedia.GetPath().GetBuffer())) res = false;
if (!NSDirectory::CreateDirectory(pathMedia.GetPath())) res = false;
sMediaPath = pathMedia.GetPath();
//embeddings
OOX::CPath pathEmbeddings = pathWord + FILE_SEPARATOR_STR + _T("embeddings");
if (!NSDirectory::CreateDirectory(pathEmbeddings.GetPath().GetBuffer()))res = false;
if (!NSDirectory::CreateDirectory(pathEmbeddings.GetPath()))res = false;
sEmbedPath = pathEmbeddings.GetPath();
// theme
OOX::CPath pathTheme = pathWord + FILE_SEPARATOR_STR + _T("theme");
if (!NSDirectory::CreateDirectory(pathTheme.GetPath().GetBuffer())) res = false;
if (!NSDirectory::CreateDirectory(pathTheme.GetPath())) res = false;
OOX::CPath pathThemeRels = pathTheme + FILE_SEPARATOR_STR + _T("_rels");
if (!NSDirectory::CreateDirectory(pathThemeRels.GetPath().GetBuffer())) res = false;
if (!NSDirectory::CreateDirectory(pathThemeRels.GetPath())) res = false;
pathTheme = pathTheme + FILE_SEPARATOR_STR + _T("theme1.xml");
sThemePath = pathTheme.GetPath();
@ -212,7 +209,7 @@ bool BinDocxRW::CDocxSerializer::loadFromFile(const CString& sSrcFileName, const
bool bResultOk = false;
NSFile::CFileBinary oFile;
if(oFile.OpenFile(string2std_string(sSrcFileName)))
if(oFile.OpenFile(sSrcFileName))
{
DWORD nBase64DataSize = 0;
BYTE* pBase64Data = new BYTE[oFile.GetFileSize()];
@ -286,19 +283,10 @@ bool BinDocxRW::CDocxSerializer::loadFromFile(const CString& sSrcFileName, const
m_pCurFileWriter = new Writers::FileWriter(sDstPath, m_sFontDir, false, nVersion, m_bSaveChartAsImg, &oDrawingConverter, sThemePath);
//папка с картинками
std::wstring strFileInDir = NSSystemPath::GetDirectoryName(string2std_string(sSrcFileName));
std::wstring strFileInDir = NSSystemPath::GetDirectoryName(sSrcFileName);
CString sFileInDir = strFileInDir.c_str();
VARIANT var;
var.vt = VT_BSTR;
#if defined(_WIN32) || defined (_WIN64)
var.bstrVal = sFileInDir.AllocSysString();
oDrawingConverter.SetAdditionalParam(CString(L"SourceFileDir"), var);
RELEASESYSSTRING(var.bstrVal);
#else
var.bstrVal = sFileInDir.GetString();
oDrawingConverter.SetAdditionalParam(CString(L"SourceFileDir"), var);
#endif
oDrawingConverter.SetSourceFileDir(sFileInDir);
//default theme
m_pCurFileWriter->m_oDefaultTheme.Write(sThemePath);
@ -335,10 +323,7 @@ bool BinDocxRW::CDocxSerializer::loadFromFile(const CString& sSrcFileName, const
delete pCore;
}
/////////////////////////////////////////////////////////////////////////////////////
VARIANT vt;
oDrawingConverter.GetAdditionalParam(CString(_T("ContentTypes")), &vt);
if(VT_BSTR == vt.vt)
m_pCurFileWriter->m_oContentTypesWriter.AddOverrideRaw(CString(vt.bstrVal));
m_pCurFileWriter->m_oContentTypesWriter.AddOverrideRaw(oDrawingConverter.GetContentTypes());
m_pCurFileWriter->m_oCommentsWriter.Write();
m_pCurFileWriter->m_oChartWriter.Write();

View File

@ -95,13 +95,14 @@ namespace DocWrapper {
sFontName = pTheme->GetMinorFont();
}
if(sFontName.IsEmpty() && oRFont.IsInit() && oRFont->m_sVal.IsInit())
sFontName = std_string2string(oRFont->ToString2());
sFontName = oRFont->ToString2();
if(sFontName.IsEmpty())
sFontName = CString(gc_sNoNameFont);
//подбор перенесен в js
return sFontName;
oFontSelectFormat.wsName = new std::wstring;
*oFontSelectFormat.wsName = string2std_string(sFontName);
oFontSelectFormat.wsName = new std::wstring(sFontName);
if(oCharset.IsInit() && oCharset->m_oCharset.IsInit())
{
SimpleTypes::Spreadsheet::EFontCharset eCharset = oCharset->m_oCharset->GetValue();
@ -121,7 +122,7 @@ namespace DocWrapper {
CString sRes;
CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelectFormat);
if(NULL != pFontInfo)
sRes = std_string2string(pFontInfo->m_wsFontName);
sRes = pFontInfo->m_wsFontName;
else
sRes = gc_sDefaultFontName;
fontMap[sFontName] = sRes;
@ -135,12 +136,12 @@ namespace DocWrapper {
sFontName = CString(gc_sNoNameFont);
else
sFontName = font.m_sName;
oFontSelectFormat.wsName = new std::wstring;
*oFontSelectFormat.wsName = string2std_string(sFontName);
oFontSelectFormat.wsName = new std::wstring(sFontName);
if (font.m_oAltName.IsInit() && font.m_oAltName->GetLength() > 0)
{
oFontSelectFormat.wsAltName = new std::wstring;
*oFontSelectFormat.wsAltName = string2std_string(*font.m_oAltName);
oFontSelectFormat.wsAltName = new std::wstring(*font.m_oAltName);
}
if(font.m_oCharset.IsInit())
{
@ -216,7 +217,7 @@ namespace DocWrapper {
CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelectFormat);
if(NULL != pFontInfo)
fontMap[sFontName] = std_string2string(pFontInfo->m_wsFontName);
fontMap[sFontName] = pFontInfo->m_wsFontName;
else
fontMap[sFontName] = gc_sDefaultFontName;
}

View File

@ -54,7 +54,7 @@ namespace BinXlsxRW{
{
}
void CXlsxSerializer::CreateXlsxFolders(CString& sXmlOptions, CString sDstPath, CString& sMediaPath, CString& sEmbedPath)
void CXlsxSerializer::CreateXlsxFolders(const std::wstring& sXmlOptions, const std::wstring& sDstPath, std::wstring& sMediaPath, std::wstring& sEmbedPath)
{
OOX::CPath pathMediaDir = sDstPath + FILE_SEPARATOR_STR + _T("xl") + FILE_SEPARATOR_STR + _T("media");
OOX::CPath pathEmbedDir = sDstPath + FILE_SEPARATOR_STR + _T("xl") + FILE_SEPARATOR_STR + _T("embeddings");
@ -68,11 +68,11 @@ namespace BinXlsxRW{
OOX::CPath pathThemeThemeRelsDir = pathThemeDir + FILE_SEPARATOR_STR + _T("_rels");
NSDirectory::CreateDirectory(string2std_string(pathXlDir.GetPath()));
NSDirectory::CreateDirectory(string2std_string(pathThemeDir.GetPath()));
NSDirectory::CreateDirectory(string2std_string(pathThemeThemeRelsDir.GetPath()));
NSDirectory::CreateDirectory(string2std_string(pathMediaDir.GetPath()));
NSDirectory::CreateDirectory(string2std_string(pathEmbedDir.GetPath()));
NSDirectory::CreateDirectory(pathXlDir.GetPath());
NSDirectory::CreateDirectory(pathThemeDir.GetPath());
NSDirectory::CreateDirectory(pathThemeThemeRelsDir.GetPath());
NSDirectory::CreateDirectory(pathMediaDir.GetPath());
NSDirectory::CreateDirectory(pathEmbedDir.GetPath());
//Create Default Theme
{
@ -83,32 +83,22 @@ namespace BinXlsxRW{
sMediaPath = pathMediaDir.GetPath();
sEmbedPath = pathEmbedDir.GetPath();
}
bool CXlsxSerializer::loadFromFile(const CString& sSrcFileName, const CString& sDstPath, const CString& sXMLOptions, const CString& sMediaDir, const CString& sEmbedDir)
bool CXlsxSerializer::loadFromFile(const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedDir)
{
NSBinPptxRW::CDrawingConverter oOfficeDrawingConverter;
oOfficeDrawingConverter.SetMediaDstPath(sMediaDir);
oOfficeDrawingConverter.SetEmbedDstPath(sEmbedDir);
//папка с бинарников
std::wstring strFileInDir = NSSystemPath::GetDirectoryName(string2std_string(sSrcFileName));
CString sFileInDir = strFileInDir.c_str();
std::wstring strFileInDir = NSSystemPath::GetDirectoryName(sSrcFileName);
VARIANT var;
var.vt = VT_BSTR;
#if defined(_WIN32) || defined (_WIN64)
var.bstrVal = sFileInDir.AllocSysString();
oOfficeDrawingConverter.SetAdditionalParam(CString(L"SourceFileDir2"), var);
RELEASESYSSTRING(var.bstrVal);
#else
var.bstrVal = sFileInDir.GetString();
oOfficeDrawingConverter.SetAdditionalParam(CString(L"SourceFileDir2"), var);
#endif
oOfficeDrawingConverter.SetSourceFileDir(strFileInDir, 2);
BinXlsxRW::BinaryFileReader oBinaryFileReader;
oBinaryFileReader.ReadFile(sSrcFileName, sDstPath, &oOfficeDrawingConverter, sXMLOptions);
return true;
}
bool CXlsxSerializer::saveToFile(const CString& sDstFileName, const CString& sSrcPath, const CString& sXMLOptions)
bool CXlsxSerializer::saveToFile(const std::wstring& sDstFileName, const std::wstring& sSrcPath, const std::wstring& sXMLOptions)
{
COfficeFontPicker* pFontPicker = new COfficeFontPicker();
pFontPicker->Init(m_sFontDir);
@ -119,7 +109,7 @@ namespace BinXlsxRW{
NSFontCutter::CEmbeddedFontsManager* pEmbeddedFontsManager = NULL;
if(false == m_sEmbeddedFontsDir.IsEmpty())
{
NSDirectory::CreateDirectory(string2std_string(m_sEmbeddedFontsDir));
NSDirectory::CreateDirectory(m_sEmbeddedFontsDir);
pFontPicker->SetEmbeddedFontsDirectory(m_sEmbeddedFontsDir);
pEmbeddedFontsManager = pFontPicker->GetNativeCutter();
@ -149,7 +139,7 @@ namespace BinXlsxRW{
RELEASEOBJECT(pFontPicker);
return true;
}
bool CXlsxSerializer::loadChart(CString& sChartPath, NSBinPptxRW::CBinaryFileWriter& oBufferedStream, long& lDataSize)
bool CXlsxSerializer::loadChart(const std::wstring& sChartPath, NSBinPptxRW::CBinaryFileWriter& oBufferedStream, long& lDataSize)
{
bool bRes = false;
//todo передать нормальный oRootPath
@ -174,7 +164,7 @@ namespace BinXlsxRW{
}
return bRes;
}
bool CXlsxSerializer::saveChart(NSBinPptxRW::CBinaryFileReader& oBufferedStream, long lLength, CString& sFilepath, CString& sContentTypePath, CString** sContentTypeElement, const long& lChartNumber)
bool CXlsxSerializer::saveChart(NSBinPptxRW::CBinaryFileReader& oBufferedStream, long lLength, const std::wstring& sFilepath, const std::wstring& sContentTypePath, std::wstring** sContentTypeElement, const long& lChartNumber)
{
bool bRes = false;
*sContentTypeElement = NULL;
@ -182,40 +172,42 @@ namespace BinXlsxRW{
{
m_pExternalDrawingConverter->SetDstContentRels();
//получаем sThemePath из bsFilename предполагая что папка theme находится на уровень выше bsFilename
CString sThemePath;
CString sEmbedingPath;
CString sFilenameReverse = sFilepath;sFilenameReverse.MakeReverse();
//получаем sThemePath из bsFilename предполагая что папка theme находится на уровень выше bsFilename
std::wstring sThemePath;
std::wstring sEmbedingPath;
CString sFilenameReverse = sFilepath; sFilenameReverse.MakeReverse();
int nIndex = sFilenameReverse.Find(FILE_SEPARATOR_CHAR);
nIndex = sFilenameReverse.Find(FILE_SEPARATOR_CHAR, nIndex + 1);
if(-1 != nIndex)
{
CString sFilepathLeft = sFilepath.Left(sFilepath.GetLength() - nIndex);
sThemePath = sFilepathLeft + _T("theme");
sEmbedingPath = sFilepathLeft + _T("embeddings");
CString sFilepathLeft = sFilepath.substr(0, sFilepath.length() - nIndex);
sThemePath = sFilepathLeft + L"theme";
sEmbedingPath = sFilepathLeft + L"embeddings";
}
//todo theme path
BinXlsxRW::SaveParams oSaveParams(sThemePath);
OOX::Spreadsheet::CChartSpace oChartSpace;
BinXlsxRW::BinaryChartReader oBinaryChartReader(oBufferedStream, oSaveParams, m_pExternalDrawingConverter);
//todo theme path
BinXlsxRW::SaveParams oSaveParams(sThemePath);
OOX::Spreadsheet::CChartSpace oChartSpace;
BinXlsxRW::BinaryChartReader oBinaryChartReader(oBufferedStream, oSaveParams, m_pExternalDrawingConverter);
oBinaryChartReader.ReadCT_ChartSpace(lLength, &oChartSpace.m_oChartSpace);
if(oChartSpace.isValid())
{
//todo не делать embeddings, если пишем xlsx
//save xlsx
if(!sEmbedingPath.IsEmpty())
if(!sEmbedingPath.empty())
{
std::wstring sXlsxFilename = L"Microsoft_Excel_Worksheet" + std::to_wstring(lChartNumber) + L".xlsx";
std::wstring sXlsxPath = string2std_string(sEmbedingPath + FILE_SEPARATOR_STR) + sXlsxFilename;
std::wstring sXlsxPath = sEmbedingPath + FILE_SEPARATOR_STR + sXlsxFilename;
writeChartXlsx(sXlsxPath, oChartSpace);
std::wstring sChartsWorksheetRelsName = L"../embeddings/" + sXlsxFilename;
long rId;
CString bstrChartsWorksheetRelType = OOX::Spreadsheet::FileTypes::ChartsWorksheet.RelationType();
m_pExternalDrawingConverter->WriteRels(bstrChartsWorksheetRelType, std_string2string(sChartsWorksheetRelsName), CString(), &rId);
m_pExternalDrawingConverter->WriteRels(bstrChartsWorksheetRelType, sChartsWorksheetRelsName, CString(), &rId);
oChartSpace.m_oChartSpace.m_externalData = new OOX::Spreadsheet::CT_ExternalData();
oChartSpace.m_oChartSpace.m_externalData->m_id = new std::wstring();
@ -225,9 +217,9 @@ namespace BinXlsxRW{
oChartSpace.m_oChartSpace.m_externalData->m_autoUpdate->m_val = new bool(false);
}
std::wstring strFilepath = string2std_string(sFilepath);
CString strDir = std_string2string(NSSystemPath::GetDirectoryName(strFilepath));
CString strFilename = std_string2string(NSSystemPath::GetFileName(strFilepath));
std::wstring strFilepath = sFilepath;
CString strDir = NSSystemPath::GetDirectoryName(strFilepath);
CString strFilename = NSSystemPath::GetFileName(strFilepath);
OOX::CPath pathRelsDir = strDir + FILE_SEPARATOR_STR + _T("_rels");
@ -239,22 +231,23 @@ namespace BinXlsxRW{
m_pExternalDrawingConverter->SaveDstContentRels(pathRelsFile.GetPath());
CString sContentType(sContentTypePath);
sContentType.Append(strFilename);
sContentType += strFilename;
(*sContentTypeElement) = new CString();
(*sContentTypeElement)->Format(_T("<Override PartName=\"%ls\" ContentType=\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\"/>"), sContentType);
(*sContentTypeElement)->Append(oSaveParams.sAdditionalContentTypes);
std::wstring sContent = L"<Override PartName=\"" + sContentType + L"\" ContentType=\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\"/>";
sContent += oSaveParams.sAdditionalContentTypes;
(*sContentTypeElement) = new std::wstring(sContent);
bRes = true;
}
}
return bRes;
}
void CXlsxSerializer::setFontDir(CString& sFontDir)
void CXlsxSerializer::setFontDir(const std::wstring& sFontDir)
{
m_sFontDir = sFontDir;
}
void CXlsxSerializer::setEmbeddedFontsDir(CString& sEmbeddedFontsDir)
void CXlsxSerializer::setEmbeddedFontsDir(const std::wstring& sEmbeddedFontsDir)
{
m_sEmbeddedFontsDir = sEmbeddedFontsDir;
}
@ -275,7 +268,7 @@ namespace BinXlsxRW{
CString sXmlOptions = _T("");
CString sMediaPath;// will be filled by 'CreateXlsxFolders' method
CString sEmbedPath; // will be filled by 'CreateXlsxFolders' method
CreateXlsxFolders (sXmlOptions, std_string2string(sTempDir), sMediaPath, sEmbedPath);
CreateXlsxFolders (sXmlOptions, sTempDir, sMediaPath, sEmbedPath);
//заполняем Xlsx
OOX::Spreadsheet::CXlsx oXlsx;
helper.toXlsx(oXlsx);

View File

@ -60,19 +60,19 @@ namespace BinXlsxRW {
CXlsxSerializer();
~CXlsxSerializer();
void CreateXlsxFolders(CString& sXmlOptions, CString sDstPath, CString& sMediaPath, CString& sEmbedPath);
void CreateXlsxFolders (const std::wstring& sXmlOptions, const std::wstring& sDstPath, std::wstring& sMediaPath, std::wstring& sEmbedPath);
bool loadFromFile(const CString& sSrcFileName, const CString& sDstPath, const CString& sXMLOptions, const CString& sMediaDir, const CString& sEmbedPath);
bool saveToFile(const CString& sSrcFileName, const CString& sDstPath, const CString& sXMLOptions);
bool loadFromFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedPath);
bool saveToFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions);
bool loadChart(CString& sChartPath, NSBinPptxRW::CBinaryFileWriter& oBufferedStream, long& lDataSize);
bool saveChart(NSBinPptxRW::CBinaryFileReader& oBufferedStream, long lLength, CString& sFilename, CString& sContentTypePath, CString** sContentTypeElement, const long& lChartNumber);
bool loadChart (const std::wstring& sChartPath, NSBinPptxRW::CBinaryFileWriter& oBufferedStream, long& lDataSize);
bool saveChart (NSBinPptxRW::CBinaryFileReader& oBufferedStream, long lLength, const std::wstring& sFilename, const std::wstring& sContentTypePath, std::wstring** sContentTypeElement, const long& lChartNumber);
void setFontDir(CString& sFontDir);
void setEmbeddedFontsDir(CString& sEmbeddedFontsDir);
void setFontDir (const std::wstring& sFontDir);
void setEmbeddedFontsDir(const std::wstring& sEmbeddedFontsDir);
void setDrawingConverter(NSBinPptxRW::CDrawingConverter* pDrawingConverter);
void writeChartXlsx(const std::wstring& sDstFile ,const OOX::Spreadsheet::CChartSpace& oChart);
void writeChartXlsx (const std::wstring& sDstFile ,const OOX::Spreadsheet::CChartSpace& oChart);
};
}
#endif // #ifndef XLSX_SERIALIZER

View File

@ -31,16 +31,17 @@ INCLUDEPATH += \
../../DesktopEditor/xml/libxml2/include \
SOURCES += ../DocWrapper/DocxSerializer.cpp \
SOURCES += \
../DocWrapper/DocxSerializer.cpp \
../DocWrapper/FontProcessor.cpp \
../DocWrapper/XlsxSerializer.cpp \
../BinWriter/BinWriters.cpp \
../DocWrapper/ChartWriter.cpp \
../BinWriter/BinWriters.cpp \
../../XlsxSerializerCom/Common/Common.cpp \
../../XlsxSerializerCom/Reader/ChartFromToBinary.cpp \
../../XlsxSerializerCom/Reader/CommonWriter.cpp \
../../XlsxSerializerCom/Reader/CSVReader.cpp \
../../XlsxSerializerCom/Writer/CSVWriter.cpp \
../DocWrapper/ChartWriter.cpp \
../../OfficeCryptReader/source/ECMACryptReader.cpp \
../../OfficeCryptReader/source/CryptTransform.cpp

View File

@ -385,6 +385,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
/usr/include/libxml2,
"$(PROJECT_DIR)/../../DesktopEditor/freetype-2.5.2/include",
"$(PROJECT_DIR)/../../Common/3dParty/boost/boost_1_58_0",
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = ASCOfficeDocxFile2Lib_ios;
@ -420,6 +421,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
/usr/include/libxml2,
"$(PROJECT_DIR)/../../DesktopEditor/freetype-2.5.2/include",
"$(PROJECT_DIR)/../../Common/3dParty/boost/boost_1_58_0",
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = ASCOfficeDocxFile2Lib_ios;

View File

@ -34,21 +34,15 @@ CONFIG(debug, debug|release){
DEFINES += _DEBUG
}
build_fast {
core_release {
SOURCES += \
odffilereaderlib_odf_datatypes.cpp \
odffilereaderlib_odf.cpp \
odffilereaderlib_docx.cpp \
odffilereaderlib_pptx.cpp \
odffilereaderlib_xlsx.cpp \
odffilereaderlib_converter.cpp
} else {
odffilereaderlib_oox.cpp
}
core_debug {
SOURCES += \
../src/conversionelement.cpp \
../src/xml/attributes.cpp \
../src/xml/sax.cpp \
../src/xml/sax_xmllite.cpp \
../src/xml/utils.cpp \
../src/xml/xmlchar.cpp \
../src/odf/abstract_xml.cpp \
../src/odf/anim_elements.cpp \
../src/odf/calcs_styles.cpp \
@ -114,6 +108,15 @@ SOURCES += \
../src/odf/templates.cpp \
../src/odf/text_content.cpp \
../src/odf/text_elements.cpp \
../src/odf/math_elementaries.cpp \
../src/odf/math_layout_elements.cpp \
../src/odf/math_limit_elements.cpp \
../src/odf/math_table_elements.cpp \
../src/odf/math_token_elements.cpp \
../src/odf/datatypes/mathvariant.cpp \
../src/odf/calcext_elements.cpp \
../src/odf/table_database_ranges.cpp \
../src/odf/math_elements.cpp \
../src/odf/datatypes/anchortype.cpp \
../src/odf/datatypes/backgroundcolor.cpp \
../src/odf/datatypes/bool.cpp \
@ -204,6 +207,8 @@ SOURCES += \
../src/odf/datatypes/wrapoption.cpp \
../src/odf/datatypes/writingmode.cpp \
../src/odf/datatypes/xlink.cpp \
../src/docx/xlsx_conditionalFormatting.cpp \
../src/docx/xlsx_dxfs.cpp \
../src/docx/docx_content_type.cpp \
../src/docx/docx_conversion_context.cpp \
../src/docx/docx_drawing.cpp \
@ -272,27 +277,22 @@ SOURCES += \
../src/docx/xlsx_table_state.cpp \
../src/docx/xlsx_textcontext.cpp \
../src/docx/xlsx_utils.cpp \
../src/docx/xlsx_xf.cpp \
../src/common/CPColorUtils.cpp \
../src/common/CPString.cpp \
../src/common/readdocelement.cpp \
../src/ConvertOO2OOX.cpp \
../src/odf/math_elements.cpp
../src/docx/xlsx_xf.cpp
}
SOURCES += \
../formulasconvert/formulasconvert_oox.cpp \
../src/odf/math_elementaries.cpp \
../src/odf/math_layout_elements.cpp \
../src/odf/math_limit_elements.cpp \
../src/odf/math_table_elements.cpp \
../src/odf/math_token_elements.cpp \
../src/odf/datatypes/mathvariant.cpp \
../formulasconvert/formulasconvert_odf.cpp \
../src/odf/calcext_elements.cpp \
../src/odf/table_database_ranges.cpp \
../src/docx/xlsx_conditionalFormatting.cpp \
../src/docx/xlsx_dxfs.cpp
../src/conversionelement.cpp \
../src/xml/attributes.cpp \
../src/xml/sax.cpp \
../src/xml/sax_xmllite.cpp \
../src/xml/utils.cpp \
../src/xml/xmlchar.cpp \
../src/common/CPColorUtils.cpp \
../src/common/CPString.cpp \
../src/common/readdocelement.cpp \
../src/ConvertOO2OOX.cpp
HEADERS += \
../formulasconvert/formulasconvert.h \
@ -357,6 +357,16 @@ HEADERS += \
../src/odf/text_content.h \
../src/odf/text_elements.h \
../src/odf/visitor.h \
../src/ConvertOO2OOX.h \
../src/odf/math_elements.h \
../src/odf/math_elementaries.h \
../src/odf/math_layout_elements.h \
../src/odf/math_limit_elements.h \
../src/odf/math_table_elements.h \
../src/odf/math_token_elements.h \
../src/odf/datatypes/mathvariant.h \
../src/odf/calcext_elements.h \
../src/odf/table_database_ranges.h \
../src/odf/datatypes/anchortype.h \
../src/odf/datatypes/backgroundcolor.h \
../src/odf/datatypes/bool.h \
@ -456,6 +466,8 @@ HEADERS += \
../src/docx/docx_drawing.h \
../src/docx/docx_package.h \
../src/docx/docx_table_context.h \
../src/docx/xlsx_conditionalFormatting.h \
../src/docx/xlsx_dxfs.h \
../src/docx/drawing_object_description.h \
../src/docx/headers_footers.h \
../src/docx/hyperlinks.h \
@ -551,16 +563,5 @@ HEADERS += \
../include/cpdoccore/xml/simple_xml_writer.h \
../include/cpdoccore/xml/utils.h \
../include/cpdoccore/xml/xmlchar.h \
../include/cpdoccore/xml/xmlelement.h \
../src/ConvertOO2OOX.h \
../src/odf/math_elements.h \
../src/odf/math_elementaries.h \
../src/odf/math_layout_elements.h \
../src/odf/math_limit_elements.h \
../src/odf/math_table_elements.h \
../src/odf/math_token_elements.h \
../src/odf/datatypes/mathvariant.h \
../src/odf/calcext_elements.h \
../src/odf/table_database_ranges.h \
../src/docx/xlsx_conditionalFormatting.h \
../src/docx/xlsx_dxfs.h
../include/cpdoccore/xml/xmlelement.h

View File

@ -1,41 +0,0 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
*
* 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 "../src/conversionelement.cpp"
#include "../src/xml/attributes.cpp"
#include "../src/xml/sax.cpp"
#include "../src/xml/sax_xmllite.cpp"
#include "../src/xml/utils.cpp"
#include "../src/xml/xmlchar.cpp"
#include "../src/common/CPColorUtils.cpp"
#include "../src/common/CPString.cpp"
#include "../src/common/readdocelement.cpp"
#include "../src/ConvertOO2OOX.cpp"

View File

@ -1,61 +0,0 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
*
* 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 "../src/docx/docx_content_type.cpp"
#include "../src/docx/docx_conversion_context.cpp"
#include "../src/docx/docx_drawing.cpp"
#include "../src/docx/docx_package.cpp"
#include "../src/docx/docx_rels.cpp"
#include "../src/docx/docx_table_context.cpp"
#include "../src/docx/headers_footers.cpp"
#include "../src/docx/hyperlinks.cpp"
#include "../src/docx/measuredigits.cpp"
#include "../src/docx/mediaitems.cpp"
#include "../src/docx/mediaitems_utils.cpp"
#include "../src/docx/namespaces.cpp"
#include "../src/docx/oox_chart_axis.cpp"
#include "../src/docx/oox_chart_context.cpp"
#include "../src/docx/oox_chart_legend.cpp"
#include "../src/docx/oox_chart_series.cpp"
#include "../src/docx/oox_chart_shape.cpp"
#include "../src/docx/oox_conversion_context.cpp"
#include "../src/docx/oox_data_labels.cpp"
#include "../src/docx/oox_drawing.cpp"
#include "../src/docx/oox_drawing_fills.cpp"
#include "../src/docx/oox_layout.cpp"
#include "../src/docx/oox_package.cpp"
#include "../src/docx/oox_plot_area.cpp"
#include "../src/docx/oox_title.cpp"
#include "../src/docx/oox_types_chart.cpp"
#include "../src/odf/draw_frame_docx.cpp"
#include "../src/odf/draw_shapes_docx.cpp"
#include "../src/odf/style_paragraph_properties_docx.cpp"
#include "../src/odf/table_docx.cpp"

View File

@ -37,8 +37,14 @@
#include "../src/odf/documentcontext.cpp"
#include "../src/odf/draw_common.cpp"
#include "../src/odf/draw_frame.cpp"
#include "../src/odf/draw_frame_docx.cpp"
#include "../src/odf/draw_frame_pptx.cpp"
#include "../src/odf/draw_frame_xlsx.cpp"
#include "../src/odf/draw_page.cpp"
#include "../src/odf/draw_shapes.cpp"
#include "../src/odf/draw_shapes_docx.cpp"
#include "../src/odf/draw_shapes_pptx.cpp"
#include "../src/odf/draw_shapes_xlsx.cpp"
#include "../src/odf/font_face.cpp"
#include "../src/odf/header_footer.cpp"
#include "../src/odf/list.cpp"
@ -48,7 +54,6 @@
#include "../src/odf/odf_content_xml.cpp"
#include "../src/odf/odfcontext.cpp"
#include "../src/odf/odf_document.cpp"
#include "../src/odf/odf_document_impl.cpp"
#include "../src/odf/office_annotation.cpp"
#include "../src/odf/office_binary_data.cpp"
#include "../src/odf/office_body.cpp"
@ -69,6 +74,8 @@
#include "../src/odf/style_graphic_properties.cpp"
#include "../src/odf/style_map.cpp"
#include "../src/odf/style_paragraph_properties.cpp"
#include "../src/odf/style_paragraph_properties_docx.cpp"
#include "../src/odf/style_paragraph_properties_pptx.cpp"
#include "../src/odf/style_presentation.cpp"
#include "../src/odf/style_regions.cpp"
#include "../src/odf/styles.cpp"
@ -79,98 +86,20 @@
#include "../src/odf/svg_parser.cpp"
#include "../src/odf/table.cpp"
#include "../src/odf/table_calculation_settings.cpp"
#include "../src/odf/table_docx.cpp"
#include "../src/odf/table_named_expressions.cpp"
#include "../src/odf/table_pptx.cpp"
#include "../src/odf/table_xlsx.cpp"
#include "../src/odf/templates.cpp"
#include "../src/odf/text_content.cpp"
#include "../src/odf/text_elements.cpp"
#include "../src/odf/datatypes/anchortype.cpp"
#include "../src/odf/datatypes/backgroundcolor.cpp"
#include "../src/odf/datatypes/bool.cpp"
#include "../src/odf/datatypes/bordermodel.cpp"
#include "../src/odf/datatypes/borderstyle.cpp"
#include "../src/odf/datatypes/borderwidths.cpp"
#include "../src/odf/datatypes/calcext_type.cpp"
#include "../src/odf/datatypes/chartdatalabelnumber.cpp"
#include "../src/odf/datatypes/charterrorcategory.cpp"
#include "../src/odf/datatypes/chartinterpolation.cpp"
#include "../src/odf/datatypes/chartlabelarrangement.cpp"
#include "../src/odf/datatypes/chartregressiontype.cpp"
#include "../src/odf/datatypes/chartseriessource.cpp"
#include "../src/odf/datatypes/chartsolidtype.cpp"
#include "../src/odf/datatypes/chartsymbol.cpp"
#include "../src/odf/datatypes/clockvalue.cpp"
#include "../src/odf/datatypes/color.cpp"
#include "../src/odf/datatypes/common_attlists.cpp"
#include "../src/odf/datatypes/direction.cpp"
#include "../src/odf/datatypes/drawfill.cpp"
#include "../src/odf/datatypes/dropcaplength.cpp"
#include "../src/odf/datatypes/fillimagerefpoint.cpp"
#include "../src/odf/datatypes/fobreak.cpp"
#include "../src/odf/datatypes/fontfamilygeneric.cpp"
#include "../src/odf/datatypes/fontpitch.cpp"
#include "../src/odf/datatypes/fontrelief.cpp"
#include "../src/odf/datatypes/fontsize.cpp"
#include "../src/odf/datatypes/fontstretch.cpp"
#include "../src/odf/datatypes/fontstyle.cpp"
#include "../src/odf/datatypes/fontvariant.cpp"
#include "../src/odf/datatypes/fontweight.cpp"
#include "../src/odf/datatypes/gradientstyle.cpp"
#include "../src/odf/datatypes/hatchstyle.cpp"
#include "../src/odf/datatypes/hyphenationkeep.cpp"
#include "../src/odf/datatypes/hyphenationladdercount.cpp"
#include "../src/odf/datatypes/iconset_type.cpp"
#include "../src/odf/datatypes/keeptogether.cpp"
#include "../src/odf/datatypes/layoutgridmode.cpp"
#include "../src/odf/datatypes/length.cpp"
#include "../src/odf/datatypes/lengthorpercent.cpp"
#include "../src/odf/datatypes/letterspacing.cpp"
#include "../src/odf/datatypes/linebreak.cpp"
#include "../src/odf/datatypes/linemode.cpp"
#include "../src/odf/datatypes/linestyle.cpp"
#include "../src/odf/datatypes/linetype.cpp"
#include "../src/odf/datatypes/linewidth.cpp"
#include "../src/odf/datatypes/markerstyle.cpp"
#include "../src/odf/datatypes/noteclass.cpp"
#include "../src/odf/datatypes/officevaluetype.cpp"
#include "../src/odf/datatypes/pageusage.cpp"
#include "../src/odf/datatypes/percent.cpp"
#include "../src/odf/datatypes/percentorscale.cpp"
#include "../src/odf/datatypes/presentationclass.cpp"
#include "../src/odf/datatypes/punctuationwrap.cpp"
#include "../src/odf/datatypes/rotationalign.cpp"
#include "../src/odf/datatypes/runthrough.cpp"
#include "../src/odf/datatypes/scripttype.cpp"
#include "../src/odf/datatypes/shadowtype.cpp"
#include "../src/odf/datatypes/smil_transitiontype.cpp"
#include "../src/odf/datatypes/stylefamily.cpp"
#include "../src/odf/datatypes/stylehorizontalpos.cpp"
#include "../src/odf/datatypes/stylehorizontalrel.cpp"
#include "../src/odf/datatypes/styleleadercolor.cpp"
#include "../src/odf/datatypes/styleposition.cpp"
#include "../src/odf/datatypes/style_ref.cpp"
#include "../src/odf/datatypes/stylerepeat.cpp"
#include "../src/odf/datatypes/styletype.cpp"
#include "../src/odf/datatypes/styleverticalpos.cpp"
#include "../src/odf/datatypes/styleverticalrel.cpp"
#include "../src/odf/datatypes/stylewrap.cpp"
#include "../src/odf/datatypes/stylewrapcontourmode.cpp"
#include "../src/odf/datatypes/tablealign.cpp"
#include "../src/odf/datatypes/tablecentering.cpp"
#include "../src/odf/datatypes/tablemode.cpp"
#include "../src/odf/datatypes/tablevisibility.cpp"
#include "../src/odf/datatypes/targetframename.cpp"
#include "../src/odf/datatypes/textalign.cpp"
#include "../src/odf/datatypes/textalignsource.cpp"
#include "../src/odf/datatypes/textautospace.cpp"
#include "../src/odf/datatypes/textcombine.cpp"
#include "../src/odf/datatypes/textdisplay.cpp"
#include "../src/odf/datatypes/textemphasize.cpp"
#include "../src/odf/datatypes/textposition.cpp"
#include "../src/odf/datatypes/textrotationscale.cpp"
#include "../src/odf/datatypes/texttransform.cpp"
#include "../src/odf/datatypes/underlinecolor.cpp"
#include "../src/odf/datatypes/verticalalign.cpp"
#include "../src/odf/datatypes/wrapoption.cpp"
#include "../src/odf/datatypes/writingmode.cpp"
#include "../src/odf/datatypes/xlink.cpp"
#include "../src/odf/math_elementaries.cpp"
#include "../src/odf/math_layout_elements.cpp"
#include "../src/odf/math_limit_elements.cpp"
#include "../src/odf/math_table_elements.cpp"
#include "../src/odf/math_token_elements.cpp"
#include "../src/odf/datatypes/mathvariant.cpp"
#include "../src/odf/calcext_elements.cpp"
#include "../src/odf/table_database_ranges.cpp"
#include "../src/odf/math_elements.cpp"
#include "../src/odf/odf_document_impl.cpp"

View File

@ -0,0 +1,121 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
*
* 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 "../src/odf/datatypes/anchortype.cpp"
#include "../src/odf/datatypes/backgroundcolor.cpp"
#include "../src/odf/datatypes/bool.cpp"
#include "../src/odf/datatypes/bordermodel.cpp"
#include "../src/odf/datatypes/borderstyle.cpp"
#include "../src/odf/datatypes/borderwidths.cpp"
#include "../src/odf/datatypes/calcext_type.cpp"
#include "../src/odf/datatypes/chartdatalabelnumber.cpp"
#include "../src/odf/datatypes/charterrorcategory.cpp"
#include "../src/odf/datatypes/chartinterpolation.cpp"
#include "../src/odf/datatypes/chartlabelarrangement.cpp"
#include "../src/odf/datatypes/chartregressiontype.cpp"
#include "../src/odf/datatypes/chartseriessource.cpp"
#include "../src/odf/datatypes/chartsolidtype.cpp"
#include "../src/odf/datatypes/chartsymbol.cpp"
#include "../src/odf/datatypes/clockvalue.cpp"
#include "../src/odf/datatypes/color.cpp"
#include "../src/odf/datatypes/common_attlists.cpp"
#include "../src/odf/datatypes/direction.cpp"
#include "../src/odf/datatypes/drawfill.cpp"
#include "../src/odf/datatypes/dropcaplength.cpp"
#include "../src/odf/datatypes/fillimagerefpoint.cpp"
#include "../src/odf/datatypes/fobreak.cpp"
#include "../src/odf/datatypes/fontfamilygeneric.cpp"
#include "../src/odf/datatypes/fontpitch.cpp"
#include "../src/odf/datatypes/fontrelief.cpp"
#include "../src/odf/datatypes/fontsize.cpp"
#include "../src/odf/datatypes/fontstretch.cpp"
#include "../src/odf/datatypes/fontstyle.cpp"
#include "../src/odf/datatypes/fontvariant.cpp"
#include "../src/odf/datatypes/fontweight.cpp"
#include "../src/odf/datatypes/gradientstyle.cpp"
#include "../src/odf/datatypes/hatchstyle.cpp"
#include "../src/odf/datatypes/hyphenationkeep.cpp"
#include "../src/odf/datatypes/hyphenationladdercount.cpp"
#include "../src/odf/datatypes/iconset_type.cpp"
#include "../src/odf/datatypes/keeptogether.cpp"
#include "../src/odf/datatypes/layoutgridmode.cpp"
#include "../src/odf/datatypes/length.cpp"
#include "../src/odf/datatypes/lengthorpercent.cpp"
#include "../src/odf/datatypes/letterspacing.cpp"
#include "../src/odf/datatypes/linebreak.cpp"
#include "../src/odf/datatypes/linemode.cpp"
#include "../src/odf/datatypes/linestyle.cpp"
#include "../src/odf/datatypes/linetype.cpp"
#include "../src/odf/datatypes/linewidth.cpp"
#include "../src/odf/datatypes/markerstyle.cpp"
#include "../src/odf/datatypes/noteclass.cpp"
#include "../src/odf/datatypes/officevaluetype.cpp"
#include "../src/odf/datatypes/pageusage.cpp"
#include "../src/odf/datatypes/percent.cpp"
#include "../src/odf/datatypes/percentorscale.cpp"
#include "../src/odf/datatypes/presentationclass.cpp"
#include "../src/odf/datatypes/punctuationwrap.cpp"
#include "../src/odf/datatypes/rotationalign.cpp"
#include "../src/odf/datatypes/runthrough.cpp"
#include "../src/odf/datatypes/scripttype.cpp"
#include "../src/odf/datatypes/shadowtype.cpp"
#include "../src/odf/datatypes/smil_transitiontype.cpp"
#include "../src/odf/datatypes/stylefamily.cpp"
#include "../src/odf/datatypes/stylehorizontalpos.cpp"
#include "../src/odf/datatypes/stylehorizontalrel.cpp"
#include "../src/odf/datatypes/styleleadercolor.cpp"
#include "../src/odf/datatypes/styleposition.cpp"
#include "../src/odf/datatypes/style_ref.cpp"
#include "../src/odf/datatypes/stylerepeat.cpp"
#include "../src/odf/datatypes/styletype.cpp"
#include "../src/odf/datatypes/styleverticalpos.cpp"
#include "../src/odf/datatypes/styleverticalrel.cpp"
#include "../src/odf/datatypes/stylewrap.cpp"
#include "../src/odf/datatypes/stylewrapcontourmode.cpp"
#include "../src/odf/datatypes/tablealign.cpp"
#include "../src/odf/datatypes/tablecentering.cpp"
#include "../src/odf/datatypes/tablemode.cpp"
#include "../src/odf/datatypes/tablevisibility.cpp"
#include "../src/odf/datatypes/targetframename.cpp"
#include "../src/odf/datatypes/textalign.cpp"
#include "../src/odf/datatypes/textalignsource.cpp"
#include "../src/odf/datatypes/textautospace.cpp"
#include "../src/odf/datatypes/textcombine.cpp"
#include "../src/odf/datatypes/textdisplay.cpp"
#include "../src/odf/datatypes/textemphasize.cpp"
#include "../src/odf/datatypes/textposition.cpp"
#include "../src/odf/datatypes/textrotationscale.cpp"
#include "../src/odf/datatypes/texttransform.cpp"
#include "../src/odf/datatypes/underlinecolor.cpp"
#include "../src/odf/datatypes/verticalalign.cpp"
#include "../src/odf/datatypes/wrapoption.cpp"
#include "../src/odf/datatypes/writingmode.cpp"
#include "../src/odf/datatypes/xlink.cpp"

View File

@ -1,68 +1,102 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
*
* 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 "../src/docx/xlsx_utils.cpp"
#include "../src/odf/draw_frame_xlsx.cpp"
#include "../src/odf/draw_shapes_xlsx.cpp"
#include "../src/odf/table_xlsx.cpp"
#include "../src/docx/xlsx_alignment.cpp"
#include "../src/docx/xlsx_border.cpp"
#include "../src/docx/xlsx_borders.cpp"
#include "../src/docx/xlsx_cell_format.cpp"
#include "../src/docx/xlsx_cell_style.cpp"
#include "../src/docx/xlsx_cell_styles.cpp"
#include "../src/docx/xlsx_color.cpp"
#include "../src/docx/xlsx_comments.cpp"
#include "../src/docx/xlsx_comments_context.cpp"
#include "../src/docx/xlsx_complex_number_format.cpp"
#include "../src/docx/xlsxconversioncontext.cpp"
#include "../src/docx/xlsx_defined_names.cpp"
#include "../src/docx/xlsx_drawing.cpp"
#include "../src/docx/xlsx_drawing_context.cpp"
#include "../src/docx/xlsx_drawings.cpp"
#include "../src/docx/xlsx_fill.cpp"
#include "../src/docx/xlsx_fills.cpp"
#include "../src/docx/xlsx_font.cpp"
#include "../src/docx/xlsx_fonts.cpp"
#include "../src/docx/xlsx_hyperlinks.cpp"
#include "../src/docx/xlsx_merge_cells.cpp"
#include "../src/docx/xlsx_numFmts.cpp"
#include "../src/docx/xlsx_num_format_context.cpp"
#include "../src/docx/xlsx_output_xml.cpp"
#include "../src/docx/xlsx_package.cpp"
#include "../src/docx/xlsx_protection.cpp"
#include "../src/docx/xlsx_sharedstrings.cpp"
#include "../src/docx/xlsx_styles.cpp"
#include "../src/docx/xlsx_tablecontext.cpp"
#include "../src/docx/xlsx_table_metrics.cpp"
#include "../src/docx/xlsx_table_state.cpp"
#include "../src/docx/xlsx_textcontext.cpp"
#include "../src/docx/xlsx_xf.cpp"
/*
* (c) Copyright Ascensio System SIA 2010-2016
*
* 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 "../src/docx/xlsx_conditionalFormatting.cpp"
#include "../src/docx/xlsx_dxfs.cpp"
#include "../src/docx/docx_content_type.cpp"
#include "../src/docx/docx_conversion_context.cpp"
#include "../src/docx/docx_drawing.cpp"
#include "../src/docx/docx_package.cpp"
#include "../src/docx/docx_table_context.cpp"
#include "../src/docx/headers_footers.cpp"
#include "../src/docx/hyperlinks.cpp"
#include "../src/docx/measuredigits.cpp"
#include "../src/docx/mediaitems.cpp"
#include "../src/docx/namespaces.cpp"
#include "../src/docx/oox_chart_axis.cpp"
#include "../src/docx/oox_chart_context.cpp"
#include "../src/docx/oox_chart_legend.cpp"
#include "../src/docx/oox_chart_series.cpp"
#include "../src/docx/oox_chart_shape.cpp"
#include "../src/docx/oox_conversion_context.cpp"
#include "../src/docx/oox_data_labels.cpp"
#include "../src/docx/oox_drawing.cpp"
#include "../src/docx/oox_drawing_fills.cpp"
#include "../src/docx/oox_layout.cpp"
#include "../src/docx/oox_package.cpp"
#include "../src/docx/oox_plot_area.cpp"
#include "../src/docx/oox_title.cpp"
#include "../src/docx/oox_types_chart.cpp"
#include "../src/docx/oox_rels.cpp"
#include "../src/docx/pptx_comments.cpp"
#include "../src/docx/pptx_comments_context.cpp"
#include "../src/docx/pptx_conversion_context.cpp"
#include "../src/docx/pptx_drawing.cpp"
#include "../src/docx/pptx_drawings.cpp"
#include "../src/docx/pptx_output_xml.cpp"
#include "../src/docx/pptx_package.cpp"
#include "../src/docx/pptx_slide_context.cpp"
#include "../src/docx/pptx_table_context.cpp"
#include "../src/docx/pptx_text_context.cpp"
#include "../src/docx/xlsx_alignment.cpp"
#include "../src/docx/xlsx_border.cpp"
#include "../src/docx/xlsx_borders.cpp"
#include "../src/docx/xlsx_cell_format.cpp"
#include "../src/docx/xlsx_cell_style.cpp"
#include "../src/docx/xlsx_cell_styles.cpp"
#include "../src/docx/xlsx_color.cpp"
#include "../src/docx/xlsx_comments.cpp"
#include "../src/docx/xlsx_comments_context.cpp"
#include "../src/docx/xlsx_complex_number_format.cpp"
#include "../src/docx/xlsxconversioncontext.cpp"
#include "../src/docx/xlsx_defined_names.cpp"
#include "../src/docx/xlsx_drawing.cpp"
#include "../src/docx/xlsx_drawing_context.cpp"
#include "../src/docx/xlsx_drawings.cpp"
#include "../src/docx/xlsx_fill.cpp"
#include "../src/docx/xlsx_fills.cpp"
#include "../src/docx/xlsx_font.cpp"
#include "../src/docx/xlsx_fonts.cpp"
#include "../src/docx/xlsx_hyperlinks.cpp"
#include "../src/docx/xlsx_merge_cells.cpp"
#include "../src/docx/xlsx_numFmts.cpp"
#include "../src/docx/xlsx_num_format_context.cpp"
#include "../src/docx/xlsx_output_xml.cpp"
#include "../src/docx/xlsx_package.cpp"
#include "../src/docx/xlsx_protection.cpp"
#include "../src/docx/xlsx_sharedstrings.cpp"
#include "../src/docx/xlsx_styles.cpp"
#include "../src/docx/xlsx_tablecontext.cpp"
#include "../src/docx/xlsx_table_metrics.cpp"
#include "../src/docx/xlsx_table_state.cpp"
#include "../src/docx/xlsx_textcontext.cpp"
#include "../src/docx/xlsx_utils.cpp"
#include "../src/docx/xlsx_xf.cpp"

View File

@ -1,45 +0,0 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
*
* 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 "../src/odf/draw_frame_pptx.cpp"
#include "../src/odf/draw_shapes_pptx.cpp"
#include "../src/odf/style_paragraph_properties_pptx.cpp"
#include "../src/odf/table_pptx.cpp"
#include "../src/docx/pptx_comments.cpp"
#include "../src/docx/pptx_comments_context.cpp"
#include "../src/docx/pptx_conversion_context.cpp"
#include "../src/docx/pptx_drawing.cpp"
#include "../src/docx/pptx_drawings.cpp"
#include "../src/docx/pptx_output_xml.cpp"
#include "../src/docx/pptx_package.cpp"
#include "../src/docx/pptx_slide_context.cpp"
#include "../src/docx/pptx_table_context.cpp"
#include "../src/docx/pptx_text_context.cpp"

View File

@ -38,24 +38,9 @@ namespace cpdoccore {
namespace oox {
static const int _odf_to_docx_ShapeType[]=
{ 4,4,4,34,};
static const std::wstring _docxShapeType[]=
{
L"rect",
L"rect",
L"rect",
L"ellipse",
L"ellipse",
L"line",
L"custGeom"
};
namespace {
}
void serialize_wrap_top_bottom(std::wostream & strm, _docx_drawing const & val)
{

View File

@ -148,7 +148,7 @@ std::wstring mediaitems::detectImageFileExtension(std::wstring &fileName)
CFile file;
std::wstring sExt;
if (file.OpenFile(std_string2string(fileName)) == S_OK)
if (file.OpenFile(fileName) == S_OK)
{
BYTE buffer[128];
int buffer_size = 128;

View File

@ -38,20 +38,6 @@ namespace cpdoccore {
namespace oox {
static const int _odf_to_docx_ShapeType[]=
{ 4,4,4,34,};
static const std::wstring _docxShapeType[]=
{
L"rect",
L"rect",
L"rect",
L"ellipse",
L"ellipse",
L"line",
L"custGeom"
};
void pptx_serialize_text(std::wostream & strm, _pptx_drawing & val)
{
_CP_OPT(std::wstring) strTextContent;

View File

@ -188,9 +188,7 @@ std::wstring cellType2Str(XlsxCellType::type type)
boost::int64_t convertDate(int Year, int Month, int Day)
{
using namespace boost::gregorian;
boost::int64_t daysFrom1900 = date_duration(date(Year, Month, Day) - date(1900, 1, 1)).days() + 1;
boost::int64_t daysFrom1900 = boost::gregorian::date_duration(boost::gregorian::date(Year, Month, Day) - boost::gregorian::date(1900, 1, 1)).days() + 1;
if (Year <= 1900 &&
Month <= 2 &&
@ -225,9 +223,9 @@ bool parseDate(const std::wstring & Date, int & Year, int & Month, int & Day)
boost::match_results<std::wstring::const_iterator> res;
if (boost::regex_match(Date, res, r))
{
Year = boost::lexical_cast<int>(res[1].str());
Month = boost::lexical_cast<int>(res[2].str());
Day = boost::lexical_cast<int>(res[3].str());
Year = boost::lexical_cast<int>(res[1].str());
Month = boost::lexical_cast<int>(res[2].str());
Day = boost::lexical_cast<int>(res[3].str());
int Hours, Minutes, Sec, FSec;
if (res[4].matched)
@ -259,7 +257,7 @@ bool parseTime(const std::wstring & Time, int & Hours, int & Minutes, double & s
boost::match_results<std::wstring::const_iterator> res;
if (boost::regex_match(Time, res, r))
{
Hours = boost::lexical_cast<int>(res[1].str());
Hours = boost::lexical_cast<int>(res[1].str());
Minutes = boost::lexical_cast<int>(res[2].str());
seconds = boost::lexical_cast<int>(res[3].str());

View File

@ -85,6 +85,7 @@
#include "documentcontext.h"
#include "../progressCallback.h"
#define PROGRESSEVENT_ID 0
namespace cpdoccore {
@ -146,6 +147,7 @@ odf_document::Impl::Impl(const std::wstring & folderPath, const ProgressCallback
UpdateProgress(400000);
}
bool odf_document::Impl::UpdateProgress(long nComplete)
{
if (pCallBack)
@ -160,6 +162,7 @@ bool odf_document::Impl::UpdateProgress(long nComplete)
return false;
}
void odf_document::Impl::parse_fonts()
{
do

View File

@ -110,7 +110,7 @@ std::wstring process_border(const border_style & borderStyle,
return res;
}
std::wstring process_margin(const _CP_OPT(length_or_percent) & margin, double Mul)
std::wstring docx_process_margin(const _CP_OPT(length_or_percent) & margin, double Mul)
{
if (margin)
{
@ -288,8 +288,8 @@ void paragraph_format_properties::docx_convert(oox::docx_conversion_context & Co
std::wstring w_after, w_before;
std::wstring w_line, w_lineRule;
w_after = process_margin(fo_margin_bottom_, 20.0);
w_before = process_margin(fo_margin_top_, 20.0);
w_after = docx_process_margin(fo_margin_bottom_, 20.0);
w_before = docx_process_margin(fo_margin_top_, 20.0);
// TODO : здесь 240 берется из корневого стиля? надо не константу использовать а брать оттуда
// в xsl преобразованиях так же написано
@ -341,9 +341,9 @@ void paragraph_format_properties::docx_convert(oox::docx_conversion_context & Co
// TODO auto indent
std::wstring w_left, w_right, w_hanging, w_firstLine;
w_left = process_margin(fo_margin_left_, 20.0);
w_right = process_margin(fo_margin_right_, 20.0);
w_firstLine = process_margin(fo_text_indent_, 20.0);
w_left = docx_process_margin(fo_margin_left_, 20.0);
w_right = docx_process_margin(fo_margin_right_, 20.0);
w_firstLine = docx_process_margin(fo_text_indent_, 20.0);
if (w_left.empty()) w_left = L"0";
if (w_right.empty()) w_right = L"0";

View File

@ -106,7 +106,7 @@ std::wstring process_border(border_style & borderStyle,
return res;
}
std::wstring process_margin(const _CP_OPT(length_or_percent) & margin, length::unit unit, double Mul)
std::wstring pptx_process_margin(const _CP_OPT(length_or_percent) & margin, length::unit unit, double Mul)
{
if (margin)
{
@ -156,9 +156,9 @@ void paragraph_format_properties::xlsx_convert(std::wostream & strm, bool in_dra
// TODO auto indent
std::wstring w_left, w_right, w_firstLine;
w_left = process_margin(fo_margin_left_, length::emu, 1.);
w_right = process_margin(fo_margin_right_, length::emu, 1.);
w_firstLine = process_margin(fo_text_indent_,length::emu, 1.);
w_left = pptx_process_margin(fo_margin_left_, length::emu, 1.);
w_right = pptx_process_margin(fo_margin_right_, length::emu, 1.);
w_firstLine = pptx_process_margin(fo_text_indent_,length::emu, 1.);
//if (w_left.empty()) w_left = L"0";
//if (w_right.empty()) w_right = L"0";
@ -227,7 +227,7 @@ void paragraph_format_properties::xlsx_convert(std::wostream & strm, bool in_dra
{
if (fo_margin_bottom_->get_type() == length_or_percent::Length)
{
std::wstring w_before = process_margin(fo_margin_top_, length::pt, 100.0);
std::wstring w_before = pptx_process_margin(fo_margin_top_, length::pt, 100.0);
CP_XML_NODE(L"a:spcPts")
{
CP_XML_ATTR(L"val",w_before);
@ -250,7 +250,7 @@ void paragraph_format_properties::xlsx_convert(std::wostream & strm, bool in_dra
{
if (fo_margin_bottom_->get_type() == length_or_percent::Length)
{
std::wstring w_after = process_margin(fo_margin_bottom_, length::pt, 100.0);
std::wstring w_after = pptx_process_margin(fo_margin_bottom_, length::pt, 100.0);
CP_XML_NODE(L"a:spcPts")
{
CP_XML_ATTR(L"val",w_after);
@ -281,9 +281,9 @@ void paragraph_format_properties::pptx_convert(oox::pptx_conversion_context & Co
// TODO auto indent
std::wstring w_left, w_right, w_firstLine;
w_left = process_margin(fo_margin_left_, length::emu, 1.);
w_right = process_margin(fo_margin_right_, length::emu, 1.);
w_firstLine = process_margin(fo_text_indent_,length::emu, 1.);
w_left = pptx_process_margin(fo_margin_left_, length::emu, 1.);
w_right = pptx_process_margin(fo_margin_right_, length::emu, 1.);
w_firstLine = pptx_process_margin(fo_text_indent_,length::emu, 1.);
//if (w_left.empty()) w_left = L"0";
//if (w_right.empty()) w_right = L"0";
@ -460,7 +460,7 @@ void paragraph_format_properties::pptx_convert(oox::pptx_conversion_context & Co
{
if (fo_margin_bottom_->get_type() == length_or_percent::Length)
{
std::wstring w_before = process_margin(fo_margin_top_, length::pt, 100.0);
std::wstring w_before = pptx_process_margin(fo_margin_top_, length::pt, 100.0);
CP_XML_NODE(L"a:spcPts")
{
CP_XML_ATTR(L"val",w_before);
@ -483,7 +483,7 @@ void paragraph_format_properties::pptx_convert(oox::pptx_conversion_context & Co
{
if (fo_margin_bottom_->get_type() == length_or_percent::Length)
{
std::wstring w_after = process_margin(fo_margin_bottom_, length::pt, 100.0);
std::wstring w_after = pptx_process_margin(fo_margin_bottom_, length::pt, 100.0);
CP_XML_NODE(L"a:spcPts")
{
CP_XML_ATTR(L"val",w_after);

View File

@ -29,14 +29,16 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
typedef void (*OnProgressCallback)( void* lpParam, long nID, long nPercent );
typedef void (*OnProgressExCallback)( void* lpParam, long nID, long nPercent, short* Cancel );
typedef void (*OnProgressCallbackOdf) ( void* lpParam, long nID, long nPercent );
typedef void (*OnProgressExCallbackOdf)( void* lpParam, long nID, long nPercent, short* Cancel ) ;
struct ProgressCallback
{
OnProgressCallback OnProgress;
OnProgressExCallback OnProgressEx;
OnProgressCallbackOdf OnProgress;
OnProgressExCallbackOdf OnProgressEx;
void* caller;
};

View File

@ -1720,10 +1720,6 @@
RelativePath="..\..\Common\DocxFormat\Source\SystemUtility\FileSystem\Directory.cpp"
>
</File>
<File
RelativePath="..\..\Common\DocxFormat\Source\XML\stringcommon.cpp"
>
</File>
</Files>
<Globals>
</Globals>

View File

@ -35,10 +35,12 @@ CONFIG(debug, debug|release){
DEFINES += _DEBUG
}
build_fast {
core_release {
SOURCES += \
odffilewriterlib_all.cpp
} else {
odffilewriterlib_odf.cpp
}
core_debug {
SOURCES += \
../source/OdfFormat/abstract_xml.cpp \
../source/OdfFormat/calcext_elements.cpp \
@ -93,17 +95,18 @@ SOURCES += \
../source/OdfFormat/table_database_ranges.cpp \
../source/OdfFormat/table_named_expressions.cpp \
../source/OdfFormat/text_elements.cpp \
../source/Oox2OdfConverter/ConvertDiagram.cpp \
../source/Oox2OdfConverter/Converter.cpp \
../source/Oox2OdfConverter/ConverterChart.cpp \
../source/Oox2OdfConverter/ConvertVml.cpp \
../source/Oox2OdfConverter/DocxConverter.cpp \
../source/Oox2OdfConverter/XlsxConverter.cpp \
../source/OdfFormat/odf_settings_context.cpp \
../source/OdfFormat/office_settings.cpp \
../source/OdfFormat/mediaitems_utils.cpp
}
SOURCES += \
../source/Oox2OdfConverter/ConvertDiagram.cpp \
../source/Oox2OdfConverter/Converter.cpp \
../source/Oox2OdfConverter/ConverterChart.cpp \
../source/Oox2OdfConverter/ConvertVml.cpp \
../source/Oox2OdfConverter/DocxConverter.cpp \
../source/Oox2OdfConverter/XlsxConverter.cpp
HEADERS += \
../source/OdfFormat/abstract_xml.h \

View File

@ -1,90 +1,86 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
*
* 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 "../source/OdfFormat/abstract_xml.cpp"
#include "../source/OdfFormat/calcext_elements.cpp"
#include "../source/OdfFormat/draw_base.cpp"
#include "../source/OdfFormat/draw_frame.cpp"
#include "../source/OdfFormat/draw_shapes.cpp"
#include "../source/OdfFormat/header_footer.cpp"
#include "../source/OdfFormat/list.cpp"
#include "../source/OdfFormat/mediaitems.cpp"
#include "../source/OdfFormat/mediaitems_utils.cpp"
#include "../source/OdfFormat/number_style.cpp"
#include "../source/OdfFormat/object_package.cpp"
#include "../source/OdfFormat/odf_chart_context.cpp"
#include "../source/OdfFormat/odf_comment_context.cpp"
#include "../source/OdfFormat/odf_conversion_context.cpp"
#include "../source/OdfFormat/odf_drawing_context.cpp"
#include "../source/OdfFormat/odf_lists_styles_context.cpp"
#include "../source/OdfFormat/odf_number_styles_context.cpp"
#include "../source/OdfFormat/odf_page_layout_context.cpp"
#include "../source/OdfFormat/odf_page_layout_state.cpp"
#include "../source/OdfFormat/odf_rels.cpp"
#include "../source/OdfFormat/odf_style_context.cpp"
#include "../source/OdfFormat/odf_style_state.cpp"
#include "../source/OdfFormat/odf_table_context.cpp"
#include "../source/OdfFormat/odf_table_styles_context.cpp"
#include "../source/OdfFormat/odf_text_context.cpp"
#include "../source/OdfFormat/ods_conversion_context.cpp"
#include "../source/OdfFormat/ods_table_context.cpp"
#include "../source/OdfFormat/ods_table_state.cpp"
#include "../source/OdfFormat/odt_conversion_context.cpp"
#include "../source/OdfFormat/office_annotation.cpp"
#include "../source/OdfFormat/office_body.cpp"
#include "../source/OdfFormat/office_chart.cpp"
#include "../source/OdfFormat/office_elements_create.cpp"
#include "../source/OdfFormat/office_spreadsheet.cpp"
#include "../source/OdfFormat/office_text.cpp"
#include "../source/OdfFormat/oox_shape_defines.cpp"
#include "../source/OdfFormat/paragraph_elements.cpp"
#include "../source/OdfFormat/style_chart_properties.cpp"
#include "../source/OdfFormat/style_graphic_properties.cpp"
#include "../source/OdfFormat/style_map.cpp"
#include "../source/OdfFormat/style_page_layout_properties.cpp"
#include "../source/OdfFormat/style_paragraph_properties.cpp"
#include "../source/OdfFormat/styles.cpp"
#include "../source/OdfFormat/style_section_properties.cpp"
#include "../source/OdfFormat/styles_list.cpp"
#include "../source/OdfFormat/styles_lite_container.cpp"
#include "../source/OdfFormat/style_table_properties.cpp"
#include "../source/OdfFormat/style_text_properties.cpp"
#include "../source/OdfFormat/svg_creator.cpp"
#include "../source/OdfFormat/table.cpp"
#include "../source/OdfFormat/table_database_ranges.cpp"
#include "../source/OdfFormat/table_named_expressions.cpp"
#include "../source/OdfFormat/text_elements.cpp"
#include "../source/Oox2OdfConverter/ConvertDiagram.cpp"
#include "../source/Oox2OdfConverter/Converter.cpp"
#include "../source/Oox2OdfConverter/ConverterChart.cpp"
#include "../source/Oox2OdfConverter/ConvertVml.cpp"
#include "../source/Oox2OdfConverter/DocxConverter.cpp"
#include "../source/Oox2OdfConverter/XlsxConverter.cpp"
/*
* (c) Copyright Ascensio System SIA 2010-2016
*
* 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 "../source/OdfFormat/calcext_elements.cpp"
#include "../source/OdfFormat/draw_base.cpp"
#include "../source/OdfFormat/draw_frame.cpp"
#include "../source/OdfFormat/draw_shapes.cpp"
#include "../source/OdfFormat/header_footer.cpp"
#include "../source/OdfFormat/list.cpp"
#include "../source/OdfFormat/mediaitems.cpp"
#include "../source/OdfFormat/number_style.cpp"
#include "../source/OdfFormat/object_package.cpp"
#include "../source/OdfFormat/odf_chart_context.cpp"
#include "../source/OdfFormat/odf_comment_context.cpp"
#include "../source/OdfFormat/odf_notes_context.cpp"
#include "../source/OdfFormat/odf_conversion_context.cpp"
#include "../source/OdfFormat/odf_drawing_context.cpp"
#include "../source/OdfFormat/odf_lists_styles_context.cpp"
#include "../source/OdfFormat/odf_number_styles_context.cpp"
#include "../source/OdfFormat/odf_page_layout_context.cpp"
#include "../source/OdfFormat/odf_page_layout_state.cpp"
#include "../source/OdfFormat/odf_rels.cpp"
#include "../source/OdfFormat/odf_style_context.cpp"
#include "../source/OdfFormat/odf_style_state.cpp"
#include "../source/OdfFormat/odf_table_context.cpp"
#include "../source/OdfFormat/odf_table_styles_context.cpp"
#include "../source/OdfFormat/odf_text_context.cpp"
#include "../source/OdfFormat/ods_conversion_context.cpp"
#include "../source/OdfFormat/ods_table_context.cpp"
#include "../source/OdfFormat/ods_table_state.cpp"
#include "../source/OdfFormat/odt_conversion_context.cpp"
#include "../source/OdfFormat/office_annotation.cpp"
#include "../source/OdfFormat/office_body.cpp"
#include "../source/OdfFormat/office_chart.cpp"
#include "../source/OdfFormat/office_elements_create.cpp"
#include "../source/OdfFormat/office_spreadsheet.cpp"
#include "../source/OdfFormat/office_text.cpp"
#include "../source/OdfFormat/oox_shape_defines.cpp"
#include "../source/OdfFormat/paragraph_elements.cpp"
#include "../source/OdfFormat/style_chart_properties.cpp"
#include "../source/OdfFormat/style_graphic_properties.cpp"
#include "../source/OdfFormat/style_map.cpp"
#include "../source/OdfFormat/style_page_layout_properties.cpp"
#include "../source/OdfFormat/style_paragraph_properties.cpp"
#include "../source/OdfFormat/styles.cpp"
#include "../source/OdfFormat/style_section_properties.cpp"
#include "../source/OdfFormat/styles_list.cpp"
#include "../source/OdfFormat/styles_lite_container.cpp"
#include "../source/OdfFormat/style_table_properties.cpp"
#include "../source/OdfFormat/style_text_properties.cpp"
#include "../source/OdfFormat/svg_creator.cpp"
#include "../source/OdfFormat/table.cpp"
#include "../source/OdfFormat/table_database_ranges.cpp"
#include "../source/OdfFormat/table_named_expressions.cpp"
#include "../source/OdfFormat/text_elements.cpp"
#include "../source/OdfFormat/odf_settings_context.cpp"
#include "../source/OdfFormat/office_settings.cpp"
#include "../source/OdfFormat/mediaitems_utils.cpp"

View File

@ -321,7 +321,7 @@ void OoxConverter::convert(OOX::Vml::CShape *vml_shape)
if (vml_shape->m_oPath.IsInit())
{
odf_context()->drawing_context()->set_path(string2std_string(vml_shape->m_oPath->GetValue()));
odf_context()->drawing_context()->set_path(vml_shape->m_oPath->GetValue());
}
OOX::Vml::CVmlCommonElements *vml_common = static_cast<OOX::Vml::CVmlCommonElements *>(vml_shape);
@ -352,7 +352,7 @@ void OoxConverter::convert(OOX::Vml::CImageData *vml_image_data)
odf_context()->drawing_context()->start_area_properties();
odf_context()->drawing_context()->start_bitmap_style();
odf_context()->drawing_context()->set_bitmap_link(string2std_string(pathImage));
odf_context()->drawing_context()->set_bitmap_link(pathImage);
odf_context()->drawing_context()->set_image_style_repeat(1);//stretch
double gain = vml_image_data->m_oGain.GetValue();
@ -405,7 +405,7 @@ void OoxConverter::convert(OOX::Vml::CFill *vml_fill)
if (pathImage.GetLength() > 0)
{
odf_context()->drawing_context()->set_bitmap_link(string2std_string(pathImage));
odf_context()->drawing_context()->set_bitmap_link(pathImage);
_graphics_utils_::GetResolution(pathImage, Width, Height);
}
odf_context()->drawing_context()->set_image_style_repeat(1);
@ -429,9 +429,9 @@ void OoxConverter::convert(OOX::Vml::CFill *vml_fill)
_CP_OPT(double) no_set;
if (vml_fill->m_oColor.IsInit())
odf_context()->drawing_context()->set_gradient_start(string2std_string(vml_fill->m_oColor->ToString()),no_set);
odf_context()->drawing_context()->set_gradient_start(vml_fill->m_oColor->ToString(), no_set);
if (vml_fill->m_oColor2.IsInit())
odf_context()->drawing_context()->set_gradient_end(string2std_string(vml_fill->m_oColor2->ToString()),no_set);
odf_context()->drawing_context()->set_gradient_end(vml_fill->m_oColor2->ToString(), no_set);
if (vml_fill->m_oFocusPosition.IsInit())
odf_context()->drawing_context()->set_gradient_center(vml_fill->m_oFocusPosition->GetX(), vml_fill->m_oFocusPosition->GetY());
@ -442,9 +442,9 @@ void OoxConverter::convert(OOX::Vml::CFill *vml_fill)
{
odf_context()->drawing_context()->start_hatch_style();
if (vml_fill->m_oColor2.IsInit())
odf_context()->drawing_context()->set_hatch_line_color(string2std_string(vml_fill->m_oColor2->ToString()));
odf_context()->drawing_context()->set_hatch_line_color(vml_fill->m_oColor2->ToString());
if (vml_fill->m_oColor.IsInit())
odf_context()->drawing_context()->set_hatch_area_color(string2std_string(vml_fill->m_oColor->ToString()));
odf_context()->drawing_context()->set_hatch_area_color(vml_fill->m_oColor->ToString());
else
odf_context()->drawing_context()->set_hatch_area_color(L"#ffffff");
@ -454,7 +454,7 @@ void OoxConverter::convert(OOX::Vml::CFill *vml_fill)
case SimpleTypes::filltypeSolid:
default:
if (vml_fill->m_oColor.IsInit())
odf_context()->drawing_context()->set_solid_fill(string2std_string(vml_fill->m_oColor->ToString()));
odf_context()->drawing_context()->set_solid_fill(vml_fill->m_oColor->ToString());
break;
}
}
@ -557,7 +557,7 @@ void OoxConverter::convert(OOX::Vml::CShadow *vml_shadow)
if (vml_shadow == NULL) return;
if (vml_shadow->m_oOn.GetValue() == false) return;
std::wstring hexColor = string2std_string(vml_shadow->m_oColor.ToString());
std::wstring hexColor = vml_shadow->m_oColor.ToString();
_CP_OPT(double) opacity;
if (vml_shadow->m_oOpacity.IsInit()) opacity = 100 - 100 * vml_shadow->m_oOpacity->GetValue();
@ -587,7 +587,7 @@ void OoxConverter::convert(OOX::Vml::CStroke *vml_stroke)
if (vml_stroke->m_oColor.IsInit())
{
std::wstring hexColor = string2std_string(vml_stroke->m_oColor->ToString());
std::wstring hexColor = vml_stroke->m_oColor->ToString();
if (hexColor.length() < 1)hexColor = L"000000";
odf_context()->drawing_context()->set_solid_fill(hexColor);
}
@ -675,7 +675,7 @@ void OoxConverter::convert(OOX::Vml::CTextPath *vml_textpath)
odf_context()->text_context()->start_paragraph(false);
odf_context()->text_context()->start_span(false);
odf_context()->text_context()->add_text_content(string2std_string(vml_textpath->m_sString.get()));
odf_context()->text_context()->add_text_content(vml_textpath->m_sString.get());
odf_context()->text_context()->end_span();
odf_context()->text_context()->end_paragraph();
@ -795,7 +795,7 @@ void OoxConverter::convert(OOX::Vml::CVmlCommonElements *vml_common)
SimpleTypes::CHexColor<> *oRgbColor = new SimpleTypes::CHexColor<>(ucR,ucG,ucB);
if (oRgbColor)
{
odf_context()->drawing_context()->set_solid_fill(string2std_string(oRgbColor->ToString().Right(6)));
odf_context()->drawing_context()->set_solid_fill(oRgbColor->ToString().Right(6));
delete oRgbColor;
}
}
@ -812,7 +812,7 @@ void OoxConverter::convert(OOX::Vml::CVmlCommonElements *vml_common)
if (oRgbColor)
{
odf_context()->drawing_context()->start_area_properties();
odf_context()->drawing_context()->set_solid_fill(string2std_string(oRgbColor->ToString().Right(6)));
odf_context()->drawing_context()->set_solid_fill(oRgbColor->ToString().Right(6));
odf_context()->drawing_context()->end_area_properties();
delete oRgbColor;
}

View File

@ -332,7 +332,7 @@ void OoxConverter::convert(OOX::Drawing::CLockedCanvas *oox_canvas)
if (oox_canvas->m_oNvGroupSpPr.IsInit() && oox_canvas->m_oNvGroupSpPr->m_oCNvPr.IsInit())
{
if (oox_canvas->m_oNvGroupSpPr->m_oCNvPr->m_sName.IsInit())
odf_context()->drawing_context()->set_group_name(string2std_string(*oox_canvas->m_oNvGroupSpPr->m_oCNvPr->m_sName));
odf_context()->drawing_context()->set_group_name(*oox_canvas->m_oNvGroupSpPr->m_oCNvPr->m_sName);
if (oox_canvas->m_oNvGroupSpPr->m_oCNvPr->m_oId.IsInit())
odf_context()->drawing_context()->set_group_z_order(oox_canvas->m_oNvGroupSpPr->m_oCNvPr->m_oId->GetValue());
}
@ -427,9 +427,9 @@ void OoxConverter::convert(OOX::Drawing::CFontCollection *style_font, CString *s
if (style_font == NULL) return;
_CP_OPT(std::wstring) font_latin, font_cs, font_ea;
if (style_font->m_oCs.m_oTypeFace.IsInit()) font_cs = string2std_string(style_font->m_oCs.m_oTypeFace->GetValue());
if (style_font->m_oEa.m_oTypeFace.IsInit()) font_ea = string2std_string(style_font->m_oEa.m_oTypeFace->GetValue());
if (style_font->m_oLatin.m_oTypeFace.IsInit()) font_latin = string2std_string(style_font->m_oLatin.m_oTypeFace->GetValue());
if (style_font->m_oCs.m_oTypeFace.IsInit()) font_cs = style_font->m_oCs.m_oTypeFace->GetValue();
if (style_font->m_oEa.m_oTypeFace.IsInit()) font_ea = style_font->m_oEa.m_oTypeFace->GetValue();
if (style_font->m_oLatin.m_oTypeFace.IsInit()) font_latin = style_font->m_oLatin.m_oTypeFace->GetValue();
odf_context()->drawing_context()->set_textarea_font(font_latin,font_ea,font_cs);
@ -595,7 +595,7 @@ void OoxConverter::convert(OOX::Drawing::CNonVisualDrawingProps * oox_cnvPr)
if (oox_cnvPr->m_sName.IsInit())
{
std::wstring name = string2std_string(oox_cnvPr->m_sName.get());
std::wstring name = oox_cnvPr->m_sName.get();
odf_context()->drawing_context()->set_name(name);
}
@ -684,7 +684,7 @@ void OoxConverter::convert(OOX::Drawing::CPresetGeometry2D *oox_prst_geom)
for (unsigned int i=0; i<oox_prst_geom->m_oAvLst->m_arrGd.size(); i++)
{
if (oox_prst_geom->m_oAvLst->m_arrGd[i] == NULL) continue;
odf_context()->drawing_context()->add_modifier(string2std_string(oox_prst_geom->m_oAvLst->m_arrGd[i]->m_oFmla.GetValue()));
odf_context()->drawing_context()->add_modifier(oox_prst_geom->m_oAvLst->m_arrGd[i]->m_oFmla.GetValue());
}
}
}
@ -798,7 +798,7 @@ void OoxConverter::convert(OOX::Drawing::CBlipFillProperties *oox_bitmap_fill, C
if (pathImage.GetLength() > 0)
{
odf_context()->drawing_context()->set_bitmap_link(string2std_string(pathImage));
odf_context()->drawing_context()->set_bitmap_link(pathImage);
_graphics_utils_::GetResolution(pathImage, Width, Height);
}
else
@ -1021,7 +1021,7 @@ void OoxConverter::convert(OOX::Drawing::Colors::CColorTransform *oox_Clr, s
SimpleTypes::CHexColor<SimpleTypes::hexcolorRGB> *oRgbColor = new SimpleTypes::CHexColor<SimpleTypes::hexcolorRGB>(ucR,ucG,ucB);
if (oRgbColor)
{
hexString = string2std_string(oRgbColor->ToString().Right(6));
hexString = oRgbColor->ToString().Right(6);
delete oRgbColor;
}
if (ucA !=255)opacity = (ucA/255.)* 100.;
@ -1076,7 +1076,7 @@ void OoxConverter::convert(OOX::Drawing::CSchemeColor *oox_ShemeClr, std::ws
SimpleTypes::CHexColor<SimpleTypes::hexcolorRGB> *oRgbColor = new SimpleTypes::CHexColor<SimpleTypes::hexcolorRGB>(ucR,ucG,ucB);
if (oRgbColor)
{
hexString = string2std_string(oRgbColor->ToString().Right(6));
hexString = oRgbColor->ToString().Right(6);
delete oRgbColor;
}
if (ucA !=255)opacity = (ucA/255.)* 100.;
@ -1170,7 +1170,7 @@ void OoxConverter::convert(OOX::Drawing::CTextBodyProperties *oox_bodyPr)
for (unsigned int i=0; i< oox_bodyPr->m_oPrstTxWrap->m_oAvLst->m_arrGd.size(); i++)
{
if (oox_bodyPr->m_oPrstTxWrap->m_oAvLst->m_arrGd[i] == NULL) continue;
odf_context()->drawing_context()->add_modifier(string2std_string(oox_bodyPr->m_oPrstTxWrap->m_oAvLst->m_arrGd[i]->m_oFmla.GetValue()));
odf_context()->drawing_context()->add_modifier(oox_bodyPr->m_oPrstTxWrap->m_oAvLst->m_arrGd[i]->m_oFmla.GetValue());
}
}
}
@ -1220,7 +1220,7 @@ void OoxConverter::convert(OOX::Drawing::CRunProperty * oox_run_pr, odf_writer::
if (oox_run_pr->m_oLatinFont.IsInit())
{
if (oox_run_pr->m_oLatinFont->m_oTypeFace.IsInit())
text_properties->content().fo_font_family_ = string2std_string(oox_run_pr->m_oLatinFont->m_oTypeFace->GetValue());
text_properties->content().fo_font_family_ = oox_run_pr->m_oLatinFont->m_oTypeFace->GetValue();
else
{
text_properties->content().fo_font_family_ = L"Calibri";//default_font; ????
@ -1229,7 +1229,7 @@ void OoxConverter::convert(OOX::Drawing::CRunProperty * oox_run_pr, odf_writer::
if (oox_run_pr->m_oAsianFont.IsInit())
{
if (oox_run_pr->m_oAsianFont->m_oTypeFace.IsInit())
text_properties->content().style_font_family_asian_ = string2std_string(oox_run_pr->m_oAsianFont->m_oTypeFace->GetValue());
text_properties->content().style_font_family_asian_ = oox_run_pr->m_oAsianFont->m_oTypeFace->GetValue();
else
{
}
@ -1237,7 +1237,7 @@ void OoxConverter::convert(OOX::Drawing::CRunProperty * oox_run_pr, odf_writer::
if (oox_run_pr->m_oComplexFont.IsInit())
{
if (oox_run_pr->m_oComplexFont->m_oTypeFace.IsInit())
text_properties->content().style_font_family_complex_ = string2std_string(oox_run_pr->m_oComplexFont->m_oTypeFace->GetValue());
text_properties->content().style_font_family_complex_ = oox_run_pr->m_oComplexFont->m_oTypeFace->GetValue();
else
{
}
@ -1252,9 +1252,9 @@ void OoxConverter::convert(OOX::Drawing::CRunProperty * oox_run_pr, odf_writer::
oox_language = oox_language.Left(res);
}
text_properties->content().fo_language_ = string2std_string(oox_language);
text_properties->content().fo_language_ = oox_language;
if (oox_country.GetLength() > 0)
text_properties->content().fo_country_ = string2std_string(oox_country);
text_properties->content().fo_country_ = oox_country;
}
if (oox_run_pr->m_oSpace.IsInit())
@ -1320,7 +1320,7 @@ void OoxConverter::convert(OOX::Drawing::CRun *oox_run)
odf_context()->text_context()->start_span(styled);
if (oox_run->m_oText.IsInit())
{
odf_context()->text_context()->add_text_content( string2std_string(oox_run->m_oText->m_sText));
odf_context()->text_context()->add_text_content( oox_run->m_oText->m_sText);
}
odf_context()->text_context()->end_span();
}

View File

@ -455,7 +455,7 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_Bar3DChart *chart)
odf_context()->chart_context()->set_chart_bar_gap_width(*chart->m_gapWidth->m_val);
//if (chart->m_overlap && chart->m_overlap->m_val)
// odf_context()->chart_context()->set_chart_bar_overlap(string2std_string(*chart->m_overlap->m_val));
// odf_context()->chart_context()->set_chart_bar_overlap(*chart->m_overlap->m_val);
odf_context()->chart_context()->start_group_series();
convert(chart->m_dLbls);
@ -1043,7 +1043,7 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_SerTx* ser_tx)
convert(ser_tx->m_strRef->m_strCache, false, true);
}
//if (ser_tx->m_v)odf_context()->chart_context()->set_series_name(string2std_string(*ser_tx->m_v));
//if (ser_tx->m_v)odf_context()->chart_context()->set_series_name(*ser_tx->m_v);
}
void OoxConverter::convert(OOX::Spreadsheet::CT_AxDataSource* cat, int type)

View File

@ -472,7 +472,7 @@ void DocxConverter::convert(OOX::Logic::CParagraph *oox_paragraph)
{
if (oox_paragraph->m_oParagraphProperty->m_oPStyle.IsInit() && oox_paragraph->m_oParagraphProperty->m_oPStyle->m_sVal.IsInit())
{
std::wstring style_name = string2std_string(*oox_paragraph->m_oParagraphProperty->m_oPStyle->m_sVal);
std::wstring style_name = *oox_paragraph->m_oParagraphProperty->m_oPStyle->m_sVal;
odf_writer::odf_style_state_ptr style_state;
if (odt_context->styles_context()->find_odf_style_state(style_name, odf_types::style_family::Paragraph, style_state) && style_state)
@ -786,10 +786,10 @@ void DocxConverter::convert(OOX::Logic::CSym *oox_sym)
if (oox_sym->m_oChar.IsInit() == false) return;
if (oox_sym->m_oFont.IsInit())
odt_context->text_context()->set_symbol_font(string2std_string(*oox_sym->m_oFont));
odt_context->text_context()->set_symbol_font(*oox_sym->m_oFont);
odt_context->text_context()->set_symbol_text(oox_sym->m_oChar->GetValue());
//odt_context->text_context()->add_text_content(std::wstring(L"/") + string2std_string(oox_sym->m_oChar->ToString()));
//odt_context->text_context()->add_text_content(std::wstring(L"/") + oox_sym->m_oChar->ToString());
}
void DocxConverter::convert(OOX::Logic::CFldChar *oox_fld)
{
@ -816,7 +816,7 @@ void DocxConverter::convert(OOX::Logic::CFldSimple *oox_fld)
odt_context->start_field(true);
{
if (oox_fld->m_sInstr.IsInit())
odt_context->set_field_instr(string2std_string(oox_fld->m_sInstr.get2()));
odt_context->set_field_instr(oox_fld->m_sInstr.get2());
for (unsigned int i=0; i< oox_fld->m_arrItems.size(); i++)
{
@ -829,7 +829,7 @@ void DocxConverter::convert(OOX::Logic::CInstrText *oox_instrText)
{
if (oox_instrText == NULL) return;
odt_context->set_field_instr(string2std_string(oox_instrText->m_sText));
odt_context->set_field_instr(oox_instrText->m_sText);
}
void DocxConverter::convert(OOX::Logic::CDelText *oox_delText)
@ -842,7 +842,7 @@ void DocxConverter::convert(OOX::Logic::CDelText *oox_delText)
{
}
}
odt_context->add_text_content(string2std_string(oox_delText->m_sText));
odt_context->add_text_content(oox_delText->m_sText);
}
void DocxConverter::convert(OOX::Logic::CIns *oox_ins)
{
@ -1034,7 +1034,7 @@ int DocxConverter::convert(OOX::Logic::CTblPrChange *oox_table_prop_change)
if (oox_table_prop_change->m_pTblPr->m_oTblStyle.IsInit() && oox_table_prop_change->m_pTblPr->m_oTblStyle->m_sVal.IsInit())
{//настройка предустановленного стиля
std::wstring base_style_name = string2std_string(*oox_table_prop_change->m_pTblPr->m_oTblStyle->m_sVal);
std::wstring base_style_name = *oox_table_prop_change->m_pTblPr->m_oTblStyle->m_sVal;
table_styled = odt_context->styles_context()->table_styles().start_table(base_style_name);
}
@ -1093,7 +1093,7 @@ void DocxConverter::convert(OOX::Logic::CParagraphProperty *oox_paragraph_pr, cp
if (oox_paragraph_pr->m_oPStyle.IsInit() && oox_paragraph_pr->m_oPStyle->m_sVal.IsInit())
{
std::wstring style_name = string2std_string(*oox_paragraph_pr->m_oPStyle->m_sVal);
std::wstring style_name = *oox_paragraph_pr->m_oPStyle->m_sVal;
odt_context->styles_context()->last_state()->set_parent_style_name(style_name);
/////////////////////////find parent properties
@ -2043,7 +2043,7 @@ void DocxConverter::convert(OOX::Logic::CRunProperty *oox_run_pr, odf_writer::st
if (oox_run_pr->m_oRStyle.IsInit() && oox_run_pr->m_oRStyle->m_sVal.IsInit())
{
odt_context->styles_context()->last_state()->set_parent_style_name(string2std_string(*oox_run_pr->m_oRStyle->m_sVal));
odt_context->styles_context()->last_state()->set_parent_style_name(*oox_run_pr->m_oRStyle->m_sVal);
}
if (oox_run_pr->m_oBold.IsInit())
{
@ -2157,15 +2157,15 @@ void DocxConverter::convert(OOX::Logic::CRunProperty *oox_run_pr, odf_writer::st
if (oox_run_pr->m_oRFonts.IsInit())
{
if (oox_run_pr->m_oRFonts->m_sAscii.IsInit())
text_properties->content().fo_font_family_ = string2std_string(oox_run_pr->m_oRFonts->m_sAscii.get());
text_properties->content().fo_font_family_ = oox_run_pr->m_oRFonts->m_sAscii.get();
else convert(oox_run_pr->m_oRFonts->m_oAsciiTheme.GetPointer(), text_properties->content().fo_font_family_);
if (oox_run_pr->m_oRFonts->m_sCs.IsInit())
text_properties->content().style_font_family_complex_ = string2std_string(oox_run_pr->m_oRFonts->m_sCs.get());
text_properties->content().style_font_family_complex_ = oox_run_pr->m_oRFonts->m_sCs.get();
else convert(oox_run_pr->m_oRFonts->m_oCsTheme.GetPointer(), text_properties->content().style_font_family_complex_);
if (oox_run_pr->m_oRFonts->m_sEastAsia.IsInit())
text_properties->content().style_font_family_asian_= string2std_string(oox_run_pr->m_oRFonts->m_sEastAsia.get());
text_properties->content().style_font_family_asian_= oox_run_pr->m_oRFonts->m_sEastAsia.get();
else convert(oox_run_pr->m_oRFonts->m_oEastAsiaTheme.GetPointer(), text_properties->content().style_font_family_asian_);
//nullable<CString > m_sHAnsi;
@ -2207,11 +2207,13 @@ void DocxConverter::convert(OOX::Logic::CRunProperty *oox_run_pr, odf_writer::st
BYTE ucG = oox_run_pr->m_oHighlight->m_oVal->Get_G();
SimpleTypes::CHexColor<> *oRgbColor = new SimpleTypes::CHexColor<>(ucR,ucG,ucB);
if (oRgbColor)
{
text_properties->content().fo_background_color_ = odf_types::color(std::wstring(L"#") + string2std_string(oRgbColor->ToString().Right(6)));
{
std::wstring strColor = L"#" + oRgbColor->ToString().Right(6);
text_properties->content().fo_background_color_ = odf_types::color(strColor);
delete oRgbColor;
}
}
if (oox_run_pr->m_oShd.IsInit())
{
_CP_OPT(odf_types::color) odf_color;
@ -2243,21 +2245,21 @@ void DocxConverter::convert(SimpleTypes::CTheme<>* oox_font_theme, _CP_OPT(std::
case SimpleTypes::themeMajorHAnsi :
if (docx_theme->m_oThemeElements.m_oFontScheme.m_oMajorFont.m_oLatin.m_oTypeFace.IsInit())
{
font = string2std_string(docx_theme->m_oThemeElements.m_oFontScheme.m_oMajorFont.m_oLatin.m_oTypeFace->GetValue());
font = docx_theme->m_oThemeElements.m_oFontScheme.m_oMajorFont.m_oLatin.m_oTypeFace->GetValue();
if (font.length() > 0) odf_font_name = font;
}
break;
case SimpleTypes::themeMajorBidi:
if (docx_theme->m_oThemeElements.m_oFontScheme.m_oMajorFont.m_oCs.m_oTypeFace.IsInit())
{
font = string2std_string(docx_theme->m_oThemeElements.m_oFontScheme.m_oMajorFont.m_oCs.m_oTypeFace->GetValue());
font = docx_theme->m_oThemeElements.m_oFontScheme.m_oMajorFont.m_oCs.m_oTypeFace->GetValue();
if (font.length() > 0) odf_font_name = font;
}
break;
case SimpleTypes::themeMajorEastAsia:
if (docx_theme->m_oThemeElements.m_oFontScheme.m_oMajorFont.m_oEa.m_oTypeFace.IsInit())
{
font = string2std_string(docx_theme->m_oThemeElements.m_oFontScheme.m_oMajorFont.m_oEa.m_oTypeFace->GetValue());
font = docx_theme->m_oThemeElements.m_oFontScheme.m_oMajorFont.m_oEa.m_oTypeFace->GetValue();
if (font.length() > 0) odf_font_name = font;
}
break;
@ -2265,21 +2267,21 @@ void DocxConverter::convert(SimpleTypes::CTheme<>* oox_font_theme, _CP_OPT(std::
case SimpleTypes::themeMinorHAnsi:
if (docx_theme->m_oThemeElements.m_oFontScheme.m_oMinorFont.m_oLatin.m_oTypeFace.IsInit())
{
font = string2std_string(docx_theme->m_oThemeElements.m_oFontScheme.m_oMinorFont.m_oLatin.m_oTypeFace->GetValue());
font = docx_theme->m_oThemeElements.m_oFontScheme.m_oMinorFont.m_oLatin.m_oTypeFace->GetValue();
if (font.length() > 0) odf_font_name = font;
}
break;
case SimpleTypes::themeMinorBidi:
if (docx_theme->m_oThemeElements.m_oFontScheme.m_oMinorFont.m_oCs.m_oTypeFace.IsInit())
{
font = string2std_string(docx_theme->m_oThemeElements.m_oFontScheme.m_oMinorFont.m_oCs.m_oTypeFace->GetValue());
font = docx_theme->m_oThemeElements.m_oFontScheme.m_oMinorFont.m_oCs.m_oTypeFace->GetValue();
if (font.length() > 0) odf_font_name = font;
}
break;
case SimpleTypes::themeMinorEastAsia:
if (docx_theme->m_oThemeElements.m_oFontScheme.m_oMinorFont.m_oEa.m_oTypeFace.IsInit())
{
font = string2std_string(docx_theme->m_oThemeElements.m_oFontScheme.m_oMinorFont.m_oEa.m_oTypeFace->GetValue());
font = docx_theme->m_oThemeElements.m_oFontScheme.m_oMinorFont.m_oEa.m_oTypeFace->GetValue();
if (font.length() > 0) odf_font_name = font;
}
break;
@ -2299,7 +2301,7 @@ void DocxConverter::convert(OOX::Logic::CText *oox_text)
}
//odt_context->text_context()->add_text_space(26);
}
odt_context->add_text_content(string2std_string(oox_text->m_sText));
odt_context->add_text_content(oox_text->m_sText);
}
void DocxConverter::convert(OOX::Logic::CAlternateContent *oox_alt_content)
{
@ -2778,7 +2780,7 @@ void DocxConverter::convert(OOX::Drawing::CPicture * oox_picture)
}
_graphics_utils_::GetResolution(pathImage, Width, Height);
}
odt_context->start_image(string2std_string(pathImage));
odt_context->start_image(pathImage);
{
if (oox_picture->m_oBlipFill.m_oTile.IsInit())
{
@ -2928,7 +2930,7 @@ void DocxConverter::convert(OOX::Logic::CGroupShape *oox_group_shape)
if (oox_group_shape->m_oCNvPr.IsInit())
{
if (oox_group_shape->m_oCNvPr->m_sName.IsInit())
odt_context->drawing_context()->set_group_name(string2std_string(*oox_group_shape->m_oCNvPr->m_sName));
odt_context->drawing_context()->set_group_name(*oox_group_shape->m_oCNvPr->m_sName);
if (oox_group_shape->m_oCNvPr->m_oId.IsInit())
odt_context->drawing_context()->set_group_z_order(oox_group_shape->m_oCNvPr->m_oId->GetValue());
}
@ -3104,8 +3106,10 @@ void DocxConverter::convert(SimpleTypes::CHexColor<> *color,
{
SimpleTypes::CHexColor<> *oRgbColor = new SimpleTypes::CHexColor<>(ucR,ucG,ucB);
if (oRgbColor)
{
odf_color = odf_types::color(std::wstring(L"#") + string2std_string(oRgbColor->ToString().Right(6)));
{
std::wstring strColor = L"#" + oRgbColor->ToString().Right(6);
odf_color = odf_types::color(strColor);
delete oRgbColor;
}
}
@ -3488,9 +3492,9 @@ void DocxConverter::convert(OOX::Numbering::CLvl* oox_num_lvl)
if (oox_num_lvl->m_oLvlText.IsInit() && oox_num_lvl->m_oLvlText->m_sVal.IsInit())
{
if (type_list == 2)
odt_context->styles_context()->lists_styles().set_bullet_char(string2std_string(oox_num_lvl->m_oLvlText->m_sVal.get()));
odt_context->styles_context()->lists_styles().set_bullet_char(oox_num_lvl->m_oLvlText->m_sVal.get());
else if (type_list == 1)
odt_context->styles_context()->lists_styles().set_numeric_format(string2std_string(oox_num_lvl->m_oLvlText->m_sVal.get()));
odt_context->styles_context()->lists_styles().set_numeric_format(oox_num_lvl->m_oLvlText->m_sVal.get());
}
if (oox_num_lvl->m_oLvlPicBulletId.IsInit() && oox_num_lvl->m_oLvlPicBulletId->m_oVal.IsInit())
{
@ -3532,7 +3536,7 @@ void DocxConverter::convert_table_style(OOX::CStyle *oox_style)
{
if (oox_style == NULL)return;
std::wstring oox_name = oox_style->m_sStyleId.IsInit() ? string2std_string(*oox_style->m_sStyleId) : L"";
std::wstring oox_name = oox_style->m_sStyleId.IsInit() ? *oox_style->m_sStyleId : L"";
odt_context->styles_context()->table_styles().start_style(oox_name);
//общие
@ -3648,13 +3652,13 @@ void DocxConverter::convert(OOX::CStyle *oox_style)
return;
}
std::wstring oox_name = oox_style->m_sStyleId.IsInit() ? string2std_string(*oox_style->m_sStyleId) : L"";
std::wstring oox_name = oox_style->m_sStyleId.IsInit() ? *oox_style->m_sStyleId : L"";
odt_context->styles_context()->create_style(oox_name,family, false, true, -1);
if (oox_style->m_oName.IsInit() && oox_style->m_oName->m_sVal.IsInit())
odt_context->styles_context()->last_state()->set_display_name(string2std_string(*oox_style->m_oName->m_sVal));
odt_context->styles_context()->last_state()->set_display_name(*oox_style->m_oName->m_sVal);
if (oox_style->m_oRunPr.IsInit())
{
@ -3708,7 +3712,7 @@ void DocxConverter::convert(OOX::CStyle *oox_style)
}
}
if (oox_style->m_oBasedOn.IsInit() && oox_style->m_oBasedOn->m_sVal.IsInit())
odt_context->styles_context()->last_state()->set_parent_style_name(string2std_string(*oox_style->m_oBasedOn->m_sVal));
odt_context->styles_context()->last_state()->set_parent_style_name(*oox_style->m_oBasedOn->m_sVal);
//nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue>> m_oQFormat;
//nullable<ComplexTypes::Word::CString_ > m_oAliases;
@ -3788,8 +3792,8 @@ void DocxConverter::convert_comment(int oox_comm_id)
{
odt_context->start_comment_content();
{
if (oox_comment->m_oAuthor.IsInit()) odt_context->comment_context()->set_author (string2std_string(*oox_comment->m_oAuthor));
if (oox_comment->m_oDate.IsInit()) odt_context->comment_context()->set_date (string2std_string(oox_comment->m_oDate->GetValue()));
if (oox_comment->m_oAuthor.IsInit()) odt_context->comment_context()->set_author (*oox_comment->m_oAuthor);
if (oox_comment->m_oDate.IsInit()) odt_context->comment_context()->set_date (oox_comment->m_oDate->GetValue());
if (oox_comment->m_oInitials.IsInit()) {}
for (unsigned int i = 0; i <oox_comment->m_arrItems.size(); i++)
@ -3895,7 +3899,7 @@ void DocxConverter::convert(OOX::Logic::CTbl *oox_table)
if (oox_table->m_oTableProperties && (oox_table->m_oTableProperties->m_oTblStyle.IsInit() && oox_table->m_oTableProperties->m_oTblStyle->m_sVal.IsInit()))
{//настройка предустановленного стиля
std::wstring base_style_name = string2std_string(*oox_table->m_oTableProperties->m_oTblStyle->m_sVal);
std::wstring base_style_name = *oox_table->m_oTableProperties->m_oTblStyle->m_sVal;
styled_table = odt_context->styles_context()->table_styles().start_table(base_style_name);
}

View File

@ -181,7 +181,7 @@ void XlsxConverter::convert_sheets()
if(pSheet->m_oRid.IsInit())
{
CString sSheetRId = pSheet->m_oRid.get2().ToString();
std::map<std::wstring, OOX::Spreadsheet::CWorksheet*>::iterator pItWorksheet = arrWorksheets.find(string2std_string(sSheetRId));
std::map<std::wstring, OOX::Spreadsheet::CWorksheet*>::iterator pItWorksheet = arrWorksheets.find(sSheetRId);
if (pItWorksheet->second)
{
@ -656,7 +656,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CRPr *oox_run_pr)
if (oox_run_pr->m_oRFont.IsInit())
{
//text_properties->content().style_font_name_ = string2std_string(oox_run_pr->m_oRFont->m_sVal.get());
//text_properties->content().style_font_name_ = oox_run_pr->m_oRFont->m_sVal.get();
text_properties->content().fo_font_family_ = oox_run_pr->m_oRFont->m_sVal.get();
}
@ -1795,7 +1795,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CGroupShape* oox_group_shape)
if (oox_group_shape->m_oNvGroupSpPr->m_oCNvPr.IsInit())
{
if (oox_group_shape->m_oNvGroupSpPr->m_oCNvPr->m_sName.IsInit())
ods_context->drawing_context()->set_group_name(string2std_string(*oox_group_shape->m_oNvGroupSpPr->m_oCNvPr->m_sName));
ods_context->drawing_context()->set_group_name(*oox_group_shape->m_oNvGroupSpPr->m_oCNvPr->m_sName);
if (oox_group_shape->m_oNvGroupSpPr->m_oCNvPr->m_oId.IsInit())
ods_context->drawing_context()->set_group_z_order(oox_group_shape->m_oNvGroupSpPr->m_oCNvPr->m_oId->GetValue());
}
@ -2024,7 +2024,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CPic* oox_picture)
}
_graphics_utils_::GetResolution(pathImage, Width, Height);
}
ods_context->start_image(string2std_string(pathImage));
ods_context->start_image(pathImage);
{
if (oox_picture->m_oBlipFill->m_oTile.IsInit())
{
@ -2077,7 +2077,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CConditionalFormatting *oox_cond_f
if (oox_cond_fmt->m_oSqRef.IsInit())
{
ods_context->current_table().start_conditional_format(string2std_string(oox_cond_fmt->m_oSqRef->GetValue()));
ods_context->current_table().start_conditional_format(oox_cond_fmt->m_oSqRef->GetValue());
for (unsigned int i=0; i< oox_cond_fmt->m_arrItems.size(); i++)
convert(oox_cond_fmt->m_arrItems[i]);//rule
@ -2190,12 +2190,12 @@ void XlsxConverter::convert(OOX::Spreadsheet::CAutofilter *oox_filter)
std::wstring ref, sort_ref;
bool sort = false, caseSensitive = false;
if (oox_filter->m_oRef.IsInit())
ref = string2std_string(oox_filter->m_oRef->GetValue());
ref = oox_filter->m_oRef->GetValue();
if (oox_filter->m_oSortState.IsInit())
{
sort = true;
if (oox_filter->m_oSortState->m_oRef.IsInit())
sort_ref = string2std_string(oox_filter->m_oSortState->m_oRef->GetValue());
sort_ref = oox_filter->m_oSortState->m_oRef->GetValue();
if (oox_filter->m_oSortState->m_oCaseSensitive.IsInit() && oox_filter->m_oSortState->m_oCaseSensitive->GetValue()==1)
caseSensitive = true;
}

View File

@ -170,12 +170,13 @@ HEADERS += \
../../../ASCOfficePPTXFile/Editor/Drawing/Theme.h \
../../../Common/3dParty/pole/pole.h
build_fast {
core_release {
SOURCES += \
pptformatlib_logic.cpp
} else {
}
core_debug {
SOURCES += \
../PPTFormatLib.cpp \
../Reader/ReadStructures.cpp \
../Reader/PPTDocumentInfoOneUser.cpp \
../Reader/Records.cpp \
@ -183,13 +184,14 @@ SOURCES += \
../Records/Animations/AnimationTypes.cpp \
../Records/Drawing/ArtBlip.cpp \
../PPTXWriter/Converter.cpp \
../PPTXWriter/ShapeWriter.cpp \
../../../ASCOfficePPTXFile/Editor/Drawing/Elements.cpp \
../../../ASCOfficePPTXFile/Editor/Drawing/Layout.cpp \
../../../ASCOfficePPTXFile/Editor/Drawing/TextAttributesEx.cpp
../PPTXWriter/ShapeWriter.cpp
}
SOURCES += \
../PPTFormatLib.cpp \
../../../ASCOfficePPTXFile/Editor/Drawing/Elements.cpp \
../../../ASCOfficePPTXFile/Editor/Drawing/Layout.cpp \
../../../ASCOfficePPTXFile/Editor/Drawing/TextAttributesEx.cpp \
../../../Common/3dParty/pole/pole.cpp
core_windows {

View File

@ -29,15 +29,13 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "../PPTFormatLib.cpp"
#include "../Reader/ReadStructures.cpp"
#include "../Reader/PPTDocumentInfoOneUser.cpp"
#include "../Reader/Records.cpp"
#include "../Reader/SlidePersist.cpp"
#include "../Records/Animations/AnimationTypes.cpp"
#include "../Records/Drawing/ArtBlip.cpp"
#include "../PPTXWriter/Converter.cpp"
#include "../PPTXWriter/ShapeWriter.cpp"
#include "../../../ASCOfficePPTXFile/Editor/Drawing/Elements.cpp"
#include "../../../ASCOfficePPTXFile/Editor/Drawing/Layout.cpp"
#include "../../../ASCOfficePPTXFile/Editor/Drawing/TextAttributesEx.cpp"

View File

@ -0,0 +1,621 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
6967B0881E279D8D00A129E2 /* PPTFormatLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0071E279D8D00A129E2 /* PPTFormatLib.cpp */; };
6967B0891E279D8D00A129E2 /* Converter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B00A1E279D8D00A129E2 /* Converter.cpp */; };
6967B08A1E279D8D00A129E2 /* ShapeWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B00D1E279D8D00A129E2 /* ShapeWriter.cpp */; };
6967B08B1E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0151E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp */; };
6967B08C1E279D8D00A129E2 /* ReadStructures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0191E279D8D00A129E2 /* ReadStructures.cpp */; };
6967B08D1E279D8D00A129E2 /* Records.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B01B1E279D8D00A129E2 /* Records.cpp */; };
6967B08E1E279D8D00A129E2 /* SlidePersist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B01F1E279D8D00A129E2 /* SlidePersist.cpp */; };
6967B08F1E279D8D00A129E2 /* AnimationTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0241E279D8D00A129E2 /* AnimationTypes.cpp */; };
6967B0901E279D8D00A129E2 /* ArtBlip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B0311E279D8D00A129E2 /* ArtBlip.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
6967AFF91E279D3900A129E2 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
6967AFFB1E279D3900A129E2 /* libPPTFormatLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPPTFormatLib.a; sourceTree = BUILT_PRODUCTS_DIR; };
6967B0071E279D8D00A129E2 /* PPTFormatLib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PPTFormatLib.cpp; path = ../../PPTFormatLib.cpp; sourceTree = "<group>"; };
6967B0081E279D8D00A129E2 /* PPTFormatLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPTFormatLib.h; path = ../../PPTFormatLib.h; sourceTree = "<group>"; };
6967B00A1E279D8D00A129E2 /* Converter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Converter.cpp; sourceTree = "<group>"; };
6967B00B1E279D8D00A129E2 /* Converter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Converter.h; sourceTree = "<group>"; };
6967B00C1E279D8D00A129E2 /* ImageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageManager.h; sourceTree = "<group>"; };
6967B00D1E279D8D00A129E2 /* ShapeWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShapeWriter.cpp; sourceTree = "<group>"; };
6967B00E1E279D8D00A129E2 /* ShapeWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeWriter.h; sourceTree = "<group>"; };
6967B00F1E279D8D00A129E2 /* StylesWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StylesWriter.h; sourceTree = "<group>"; };
6967B0111E279D8D00A129E2 /* AudioOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioOverlay.h; sourceTree = "<group>"; };
6967B0121E279D8D00A129E2 /* ClassesAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassesAtom.h; sourceTree = "<group>"; };
6967B0131E279D8D00A129E2 /* CommonZLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonZLib.h; sourceTree = "<group>"; };
6967B0141E279D8D00A129E2 /* PPTDocumentInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPTDocumentInfo.h; sourceTree = "<group>"; };
6967B0151E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPTDocumentInfoOneUser.cpp; sourceTree = "<group>"; };
6967B0161E279D8D00A129E2 /* PPTDocumentInfoOneUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPTDocumentInfoOneUser.h; sourceTree = "<group>"; };
6967B0171E279D8D00A129E2 /* PPTFileDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPTFileDefines.h; sourceTree = "<group>"; };
6967B0181E279D8D00A129E2 /* PPTFileReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPTFileReader.h; sourceTree = "<group>"; };
6967B0191E279D8D00A129E2 /* ReadStructures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadStructures.cpp; sourceTree = "<group>"; };
6967B01A1E279D8D00A129E2 /* ReadStructures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadStructures.h; sourceTree = "<group>"; };
6967B01B1E279D8D00A129E2 /* Records.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Records.cpp; sourceTree = "<group>"; };
6967B01C1E279D8D00A129E2 /* Records.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Records.h; sourceTree = "<group>"; };
6967B01D1E279D8D00A129E2 /* Slide.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Slide.h; sourceTree = "<group>"; };
6967B01E1E279D8D00A129E2 /* SlideInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideInfo.h; sourceTree = "<group>"; };
6967B01F1E279D8D00A129E2 /* SlidePersist.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SlidePersist.cpp; sourceTree = "<group>"; };
6967B0201E279D8D00A129E2 /* SlidePersist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlidePersist.h; sourceTree = "<group>"; };
6967B0221E279D8D00A129E2 /* AnimationInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationInfoAtom.h; sourceTree = "<group>"; };
6967B0241E279D8D00A129E2 /* AnimationTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationTypes.cpp; sourceTree = "<group>"; };
6967B0251E279D8D00A129E2 /* AnimationTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationTypes.h; sourceTree = "<group>"; };
6967B0261E279D8D00A129E2 /* BlipEntityAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlipEntityAtom.h; sourceTree = "<group>"; };
6967B0271E279D8D00A129E2 /* BookmarkEntityAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookmarkEntityAtom.h; sourceTree = "<group>"; };
6967B0281E279D8D00A129E2 /* BookmarkSeedAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookmarkSeedAtom.h; sourceTree = "<group>"; };
6967B0291E279D8D00A129E2 /* ColorSchemeAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorSchemeAtom.h; sourceTree = "<group>"; };
6967B02A1E279D8D00A129E2 /* CString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CString.h; sourceTree = "<group>"; };
6967B02B1E279D8D00A129E2 /* CurrentUserAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurrentUserAtom.h; sourceTree = "<group>"; };
6967B02C1E279D8D00A129E2 /* DocRoutingSlipAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocRoutingSlipAtom.h; sourceTree = "<group>"; };
6967B02D1E279D8D00A129E2 /* DocumentAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentAtom.h; sourceTree = "<group>"; };
6967B02E1E279D8D00A129E2 /* DocumentRecords.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentRecords.h; sourceTree = "<group>"; };
6967B02F1E279D8D00A129E2 /* DocumentTextInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentTextInfo.h; sourceTree = "<group>"; };
6967B0311E279D8D00A129E2 /* ArtBlip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArtBlip.cpp; sourceTree = "<group>"; };
6967B0321E279D8D00A129E2 /* ArtBlip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArtBlip.h; sourceTree = "<group>"; };
6967B0331E279D8D00A129E2 /* BlipStoreContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlipStoreContainer.h; sourceTree = "<group>"; };
6967B0341E279D8D00A129E2 /* BlipStoreEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlipStoreEntry.h; sourceTree = "<group>"; };
6967B0351E279D8D00A129E2 /* ChildAnchor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildAnchor.h; sourceTree = "<group>"; };
6967B0361E279D8D00A129E2 /* ClientAnchor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientAnchor.h; sourceTree = "<group>"; };
6967B0371E279D8D00A129E2 /* DrawingContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingContainer.h; sourceTree = "<group>"; };
6967B0381E279D8D00A129E2 /* DrawingGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingGroup.h; sourceTree = "<group>"; };
6967B0391E279D8D00A129E2 /* DrawingRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingRecord.h; sourceTree = "<group>"; };
6967B03A1E279D8D00A129E2 /* GroupShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupShape.h; sourceTree = "<group>"; };
6967B03B1E279D8D00A129E2 /* GroupShapeContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupShapeContainer.h; sourceTree = "<group>"; };
6967B03C1E279D8D00A129E2 /* RegGroupItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegGroupItems.h; sourceTree = "<group>"; };
6967B03D1E279D8D00A129E2 /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = "<group>"; };
6967B03E1E279D8D00A129E2 /* ShapeContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeContainer.h; sourceTree = "<group>"; };
6967B03F1E279D8D00A129E2 /* ShapeProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeProperties.h; sourceTree = "<group>"; };
6967B0401E279D8D00A129E2 /* TextBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBox.h; sourceTree = "<group>"; };
6967B0411E279D8D00A129E2 /* EndDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EndDocument.h; sourceTree = "<group>"; };
6967B0421E279D8D00A129E2 /* ExCDAudioContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExCDAudioContainer.h; sourceTree = "<group>"; };
6967B0431E279D8D00A129E2 /* ExControlAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExControlAtom.h; sourceTree = "<group>"; };
6967B0441E279D8D00A129E2 /* ExHyperlinkAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExHyperlinkAtom.h; sourceTree = "<group>"; };
6967B0451E279D8D00A129E2 /* ExMediaAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExMediaAtom.h; sourceTree = "<group>"; };
6967B0461E279D8D00A129E2 /* ExMIDIAudioContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExMIDIAudioContainer.h; sourceTree = "<group>"; };
6967B0471E279D8D00A129E2 /* ExObjListAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExObjListAtom.h; sourceTree = "<group>"; };
6967B0481E279D8D00A129E2 /* ExObjListContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExObjListContainer.h; sourceTree = "<group>"; };
6967B0491E279D8D00A129E2 /* ExObjRefAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExObjRefAtom.h; sourceTree = "<group>"; };
6967B04A1E279D8D00A129E2 /* ExOleEmbedAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExOleEmbedAtom.h; sourceTree = "<group>"; };
6967B04B1E279D8D00A129E2 /* ExOleLinkAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExOleLinkAtom.h; sourceTree = "<group>"; };
6967B04C1E279D8D00A129E2 /* ExOleObjAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExOleObjAtom.h; sourceTree = "<group>"; };
6967B04D1E279D8D00A129E2 /* ExVideoContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExVideoContainer.h; sourceTree = "<group>"; };
6967B04E1E279D8D00A129E2 /* ExWAVAudioEmbeddedContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExWAVAudioEmbeddedContainer.h; sourceTree = "<group>"; };
6967B04F1E279D8D00A129E2 /* ExWAVAudioLinkContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExWAVAudioLinkContainer.h; sourceTree = "<group>"; };
6967B0501E279D8D00A129E2 /* FontEntityAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontEntityAtom.h; sourceTree = "<group>"; };
6967B0511E279D8D00A129E2 /* GridSpacing10Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridSpacing10Atom.h; sourceTree = "<group>"; };
6967B0521E279D8D00A129E2 /* GuideAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GuideAtom.h; sourceTree = "<group>"; };
6967B0531E279D8D00A129E2 /* HeadersFootersAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeadersFootersAtom.h; sourceTree = "<group>"; };
6967B0541E279D8D00A129E2 /* InteractiveInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteractiveInfoAtom.h; sourceTree = "<group>"; };
6967B0551E279D8D00A129E2 /* KinsokuAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KinsokuAtom.h; sourceTree = "<group>"; };
6967B0561E279D8D00A129E2 /* MasterPersistAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MasterPersistAtom.h; sourceTree = "<group>"; };
6967B0571E279D8D00A129E2 /* MasterTextPropAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MasterTextPropAtom.h; sourceTree = "<group>"; };
6967B0581E279D8D00A129E2 /* MetafileBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MetafileBlob.h; sourceTree = "<group>"; };
6967B0591E279D8D00A129E2 /* MouseTextInteractiveInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MouseTextInteractiveInfoAtom.h; sourceTree = "<group>"; };
6967B05A1E279D8D00A129E2 /* NamedShowSlidesAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedShowSlidesAtom.h; sourceTree = "<group>"; };
6967B05B1E279D8D00A129E2 /* NormalViewSetInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NormalViewSetInfoAtom.h; sourceTree = "<group>"; };
6967B05C1E279D8D00A129E2 /* NotesAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotesAtom.h; sourceTree = "<group>"; };
6967B05D1E279D8D00A129E2 /* NotesPersistAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotesPersistAtom.h; sourceTree = "<group>"; };
6967B05E1E279D8D00A129E2 /* NoZoomViewInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoZoomViewInfoAtom.h; sourceTree = "<group>"; };
6967B05F1E279D8D00A129E2 /* OutlineTextRefAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutlineTextRefAtom.h; sourceTree = "<group>"; };
6967B0601E279D8D00A129E2 /* PersistDirectoryAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistDirectoryAtom.h; sourceTree = "<group>"; };
6967B0611E279D8D00A129E2 /* PlaceHolderAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaceHolderAtom.h; sourceTree = "<group>"; };
6967B0621E279D8D00A129E2 /* RecordsIncluder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordsIncluder.h; sourceTree = "<group>"; };
6967B0631E279D8D00A129E2 /* RoundTripColorMappingAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripColorMappingAtom.h; sourceTree = "<group>"; };
6967B0641E279D8D00A129E2 /* RoundTripCompositeMainMasterId12Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripCompositeMainMasterId12Atom.h; sourceTree = "<group>"; };
6967B0651E279D8D00A129E2 /* RoundTripNewPlaceholderId12Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripNewPlaceholderId12Atom.h; sourceTree = "<group>"; };
6967B0661E279D8D00A129E2 /* RoundTripOriginalMainMasterId12Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripOriginalMainMasterId12Atom.h; sourceTree = "<group>"; };
6967B0671E279D8D00A129E2 /* RoundTripThemeAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundTripThemeAtom.h; sourceTree = "<group>"; };
6967B0681E279D8D00A129E2 /* ShapeFlags10Atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeFlags10Atom.h; sourceTree = "<group>"; };
6967B0691E279D8D00A129E2 /* ShapeFlagsAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeFlagsAtom.h; sourceTree = "<group>"; };
6967B06A1E279D8D00A129E2 /* SlideAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideAtom.h; sourceTree = "<group>"; };
6967B06B1E279D8D00A129E2 /* SlideColorSchemeAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideColorSchemeAtom.h; sourceTree = "<group>"; };
6967B06C1E279D8D00A129E2 /* SlideContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideContainer.h; sourceTree = "<group>"; };
6967B06D1E279D8D00A129E2 /* SlideListWithText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideListWithText.h; sourceTree = "<group>"; };
6967B06E1E279D8D00A129E2 /* SlidePersistAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlidePersistAtom.h; sourceTree = "<group>"; };
6967B06F1E279D8D00A129E2 /* SlideViewInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideViewInfoAtom.h; sourceTree = "<group>"; };
6967B0701E279D8D00A129E2 /* SoundCollAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundCollAtom.h; sourceTree = "<group>"; };
6967B0711E279D8D00A129E2 /* SoundCollectionContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundCollectionContainer.h; sourceTree = "<group>"; };
6967B0721E279D8D00A129E2 /* SoundContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundContainer.h; sourceTree = "<group>"; };
6967B0731E279D8D00A129E2 /* SoundDataBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundDataBlob.h; sourceTree = "<group>"; };
6967B0741E279D8D00A129E2 /* SSDocInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSDocInfoAtom.h; sourceTree = "<group>"; };
6967B0751E279D8D00A129E2 /* SSlideLayoutAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSlideLayoutAtom.h; sourceTree = "<group>"; };
6967B0761E279D8D00A129E2 /* SSSlideInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSSlideInfoAtom.h; sourceTree = "<group>"; };
6967B0771E279D8D00A129E2 /* StyleTextPropAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleTextPropAtom.h; sourceTree = "<group>"; };
6967B0781E279D8D00A129E2 /* TextBookmarkAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBookmarkAtom.h; sourceTree = "<group>"; };
6967B0791E279D8D00A129E2 /* TextBytesAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBytesAtom.h; sourceTree = "<group>"; };
6967B07A1E279D8D00A129E2 /* TextCFExceptionAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCFExceptionAtom.h; sourceTree = "<group>"; };
6967B07B1E279D8D00A129E2 /* TextCharsAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCharsAtom.h; sourceTree = "<group>"; };
6967B07C1E279D8D00A129E2 /* TextFullSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextFullSettings.h; sourceTree = "<group>"; };
6967B07D1E279D8D00A129E2 /* TextHeaderAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextHeaderAtom.h; sourceTree = "<group>"; };
6967B07E1E279D8D00A129E2 /* TextInteractiveInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextInteractiveInfoAtom.h; sourceTree = "<group>"; };
6967B07F1E279D8D00A129E2 /* TextMasterStyleAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextMasterStyleAtom.h; sourceTree = "<group>"; };
6967B0801E279D8D00A129E2 /* TextPFExceptionAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPFExceptionAtom.h; sourceTree = "<group>"; };
6967B0811E279D8D00A129E2 /* TextRulerAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextRulerAtom.h; sourceTree = "<group>"; };
6967B0821E279D8D00A129E2 /* TextSIExceptionAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextSIExceptionAtom.h; sourceTree = "<group>"; };
6967B0831E279D8D00A129E2 /* TextSpecInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextSpecInfoAtom.h; sourceTree = "<group>"; };
6967B0841E279D8D00A129E2 /* UserEditAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserEditAtom.h; sourceTree = "<group>"; };
6967B0851E279D8D00A129E2 /* VBAInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VBAInfoAtom.h; sourceTree = "<group>"; };
6967B0861E279D8D00A129E2 /* ViewInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewInfoAtom.h; sourceTree = "<group>"; };
6967B0871E279D8D00A129E2 /* ZoomViewInfoAtom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZoomViewInfoAtom.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
6967AFF81E279D3900A129E2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
6967AFF21E279D3900A129E2 = {
isa = PBXGroup;
children = (
6967AFFD1E279D3900A129E2 /* PPTFormatLib */,
6967AFFC1E279D3900A129E2 /* Products */,
);
sourceTree = "<group>";
};
6967AFFC1E279D3900A129E2 /* Products */ = {
isa = PBXGroup;
children = (
6967AFFB1E279D3900A129E2 /* libPPTFormatLib.a */,
);
name = Products;
sourceTree = "<group>";
};
6967AFFD1E279D3900A129E2 /* PPTFormatLib */ = {
isa = PBXGroup;
children = (
6967B0071E279D8D00A129E2 /* PPTFormatLib.cpp */,
6967B0081E279D8D00A129E2 /* PPTFormatLib.h */,
6967B0091E279D8D00A129E2 /* PPTXWriter */,
6967B0101E279D8D00A129E2 /* Reader */,
6967B0211E279D8D00A129E2 /* Records */,
);
path = PPTFormatLib;
sourceTree = "<group>";
};
6967B0091E279D8D00A129E2 /* PPTXWriter */ = {
isa = PBXGroup;
children = (
6967B00A1E279D8D00A129E2 /* Converter.cpp */,
6967B00B1E279D8D00A129E2 /* Converter.h */,
6967B00C1E279D8D00A129E2 /* ImageManager.h */,
6967B00D1E279D8D00A129E2 /* ShapeWriter.cpp */,
6967B00E1E279D8D00A129E2 /* ShapeWriter.h */,
6967B00F1E279D8D00A129E2 /* StylesWriter.h */,
);
name = PPTXWriter;
path = ../../PPTXWriter;
sourceTree = "<group>";
};
6967B0101E279D8D00A129E2 /* Reader */ = {
isa = PBXGroup;
children = (
6967B0111E279D8D00A129E2 /* AudioOverlay.h */,
6967B0121E279D8D00A129E2 /* ClassesAtom.h */,
6967B0131E279D8D00A129E2 /* CommonZLib.h */,
6967B0141E279D8D00A129E2 /* PPTDocumentInfo.h */,
6967B0151E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp */,
6967B0161E279D8D00A129E2 /* PPTDocumentInfoOneUser.h */,
6967B0171E279D8D00A129E2 /* PPTFileDefines.h */,
6967B0181E279D8D00A129E2 /* PPTFileReader.h */,
6967B0191E279D8D00A129E2 /* ReadStructures.cpp */,
6967B01A1E279D8D00A129E2 /* ReadStructures.h */,
6967B01B1E279D8D00A129E2 /* Records.cpp */,
6967B01C1E279D8D00A129E2 /* Records.h */,
6967B01D1E279D8D00A129E2 /* Slide.h */,
6967B01E1E279D8D00A129E2 /* SlideInfo.h */,
6967B01F1E279D8D00A129E2 /* SlidePersist.cpp */,
6967B0201E279D8D00A129E2 /* SlidePersist.h */,
);
name = Reader;
path = ../../Reader;
sourceTree = "<group>";
};
6967B0211E279D8D00A129E2 /* Records */ = {
isa = PBXGroup;
children = (
6967B0221E279D8D00A129E2 /* AnimationInfoAtom.h */,
6967B0231E279D8D00A129E2 /* Animations */,
6967B0261E279D8D00A129E2 /* BlipEntityAtom.h */,
6967B0271E279D8D00A129E2 /* BookmarkEntityAtom.h */,
6967B0281E279D8D00A129E2 /* BookmarkSeedAtom.h */,
6967B0291E279D8D00A129E2 /* ColorSchemeAtom.h */,
6967B02A1E279D8D00A129E2 /* CString.h */,
6967B02B1E279D8D00A129E2 /* CurrentUserAtom.h */,
6967B02C1E279D8D00A129E2 /* DocRoutingSlipAtom.h */,
6967B02D1E279D8D00A129E2 /* DocumentAtom.h */,
6967B02E1E279D8D00A129E2 /* DocumentRecords.h */,
6967B02F1E279D8D00A129E2 /* DocumentTextInfo.h */,
6967B0301E279D8D00A129E2 /* Drawing */,
6967B0411E279D8D00A129E2 /* EndDocument.h */,
6967B0421E279D8D00A129E2 /* ExCDAudioContainer.h */,
6967B0431E279D8D00A129E2 /* ExControlAtom.h */,
6967B0441E279D8D00A129E2 /* ExHyperlinkAtom.h */,
6967B0451E279D8D00A129E2 /* ExMediaAtom.h */,
6967B0461E279D8D00A129E2 /* ExMIDIAudioContainer.h */,
6967B0471E279D8D00A129E2 /* ExObjListAtom.h */,
6967B0481E279D8D00A129E2 /* ExObjListContainer.h */,
6967B0491E279D8D00A129E2 /* ExObjRefAtom.h */,
6967B04A1E279D8D00A129E2 /* ExOleEmbedAtom.h */,
6967B04B1E279D8D00A129E2 /* ExOleLinkAtom.h */,
6967B04C1E279D8D00A129E2 /* ExOleObjAtom.h */,
6967B04D1E279D8D00A129E2 /* ExVideoContainer.h */,
6967B04E1E279D8D00A129E2 /* ExWAVAudioEmbeddedContainer.h */,
6967B04F1E279D8D00A129E2 /* ExWAVAudioLinkContainer.h */,
6967B0501E279D8D00A129E2 /* FontEntityAtom.h */,
6967B0511E279D8D00A129E2 /* GridSpacing10Atom.h */,
6967B0521E279D8D00A129E2 /* GuideAtom.h */,
6967B0531E279D8D00A129E2 /* HeadersFootersAtom.h */,
6967B0541E279D8D00A129E2 /* InteractiveInfoAtom.h */,
6967B0551E279D8D00A129E2 /* KinsokuAtom.h */,
6967B0561E279D8D00A129E2 /* MasterPersistAtom.h */,
6967B0571E279D8D00A129E2 /* MasterTextPropAtom.h */,
6967B0581E279D8D00A129E2 /* MetafileBlob.h */,
6967B0591E279D8D00A129E2 /* MouseTextInteractiveInfoAtom.h */,
6967B05A1E279D8D00A129E2 /* NamedShowSlidesAtom.h */,
6967B05B1E279D8D00A129E2 /* NormalViewSetInfoAtom.h */,
6967B05C1E279D8D00A129E2 /* NotesAtom.h */,
6967B05D1E279D8D00A129E2 /* NotesPersistAtom.h */,
6967B05E1E279D8D00A129E2 /* NoZoomViewInfoAtom.h */,
6967B05F1E279D8D00A129E2 /* OutlineTextRefAtom.h */,
6967B0601E279D8D00A129E2 /* PersistDirectoryAtom.h */,
6967B0611E279D8D00A129E2 /* PlaceHolderAtom.h */,
6967B0621E279D8D00A129E2 /* RecordsIncluder.h */,
6967B0631E279D8D00A129E2 /* RoundTripColorMappingAtom.h */,
6967B0641E279D8D00A129E2 /* RoundTripCompositeMainMasterId12Atom.h */,
6967B0651E279D8D00A129E2 /* RoundTripNewPlaceholderId12Atom.h */,
6967B0661E279D8D00A129E2 /* RoundTripOriginalMainMasterId12Atom.h */,
6967B0671E279D8D00A129E2 /* RoundTripThemeAtom.h */,
6967B0681E279D8D00A129E2 /* ShapeFlags10Atom.h */,
6967B0691E279D8D00A129E2 /* ShapeFlagsAtom.h */,
6967B06A1E279D8D00A129E2 /* SlideAtom.h */,
6967B06B1E279D8D00A129E2 /* SlideColorSchemeAtom.h */,
6967B06C1E279D8D00A129E2 /* SlideContainer.h */,
6967B06D1E279D8D00A129E2 /* SlideListWithText.h */,
6967B06E1E279D8D00A129E2 /* SlidePersistAtom.h */,
6967B06F1E279D8D00A129E2 /* SlideViewInfoAtom.h */,
6967B0701E279D8D00A129E2 /* SoundCollAtom.h */,
6967B0711E279D8D00A129E2 /* SoundCollectionContainer.h */,
6967B0721E279D8D00A129E2 /* SoundContainer.h */,
6967B0731E279D8D00A129E2 /* SoundDataBlob.h */,
6967B0741E279D8D00A129E2 /* SSDocInfoAtom.h */,
6967B0751E279D8D00A129E2 /* SSlideLayoutAtom.h */,
6967B0761E279D8D00A129E2 /* SSSlideInfoAtom.h */,
6967B0771E279D8D00A129E2 /* StyleTextPropAtom.h */,
6967B0781E279D8D00A129E2 /* TextBookmarkAtom.h */,
6967B0791E279D8D00A129E2 /* TextBytesAtom.h */,
6967B07A1E279D8D00A129E2 /* TextCFExceptionAtom.h */,
6967B07B1E279D8D00A129E2 /* TextCharsAtom.h */,
6967B07C1E279D8D00A129E2 /* TextFullSettings.h */,
6967B07D1E279D8D00A129E2 /* TextHeaderAtom.h */,
6967B07E1E279D8D00A129E2 /* TextInteractiveInfoAtom.h */,
6967B07F1E279D8D00A129E2 /* TextMasterStyleAtom.h */,
6967B0801E279D8D00A129E2 /* TextPFExceptionAtom.h */,
6967B0811E279D8D00A129E2 /* TextRulerAtom.h */,
6967B0821E279D8D00A129E2 /* TextSIExceptionAtom.h */,
6967B0831E279D8D00A129E2 /* TextSpecInfoAtom.h */,
6967B0841E279D8D00A129E2 /* UserEditAtom.h */,
6967B0851E279D8D00A129E2 /* VBAInfoAtom.h */,
6967B0861E279D8D00A129E2 /* ViewInfoAtom.h */,
6967B0871E279D8D00A129E2 /* ZoomViewInfoAtom.h */,
);
name = Records;
path = ../../Records;
sourceTree = "<group>";
};
6967B0231E279D8D00A129E2 /* Animations */ = {
isa = PBXGroup;
children = (
6967B0241E279D8D00A129E2 /* AnimationTypes.cpp */,
6967B0251E279D8D00A129E2 /* AnimationTypes.h */,
);
path = Animations;
sourceTree = "<group>";
};
6967B0301E279D8D00A129E2 /* Drawing */ = {
isa = PBXGroup;
children = (
6967B0311E279D8D00A129E2 /* ArtBlip.cpp */,
6967B0321E279D8D00A129E2 /* ArtBlip.h */,
6967B0331E279D8D00A129E2 /* BlipStoreContainer.h */,
6967B0341E279D8D00A129E2 /* BlipStoreEntry.h */,
6967B0351E279D8D00A129E2 /* ChildAnchor.h */,
6967B0361E279D8D00A129E2 /* ClientAnchor.h */,
6967B0371E279D8D00A129E2 /* DrawingContainer.h */,
6967B0381E279D8D00A129E2 /* DrawingGroup.h */,
6967B0391E279D8D00A129E2 /* DrawingRecord.h */,
6967B03A1E279D8D00A129E2 /* GroupShape.h */,
6967B03B1E279D8D00A129E2 /* GroupShapeContainer.h */,
6967B03C1E279D8D00A129E2 /* RegGroupItems.h */,
6967B03D1E279D8D00A129E2 /* Shape.h */,
6967B03E1E279D8D00A129E2 /* ShapeContainer.h */,
6967B03F1E279D8D00A129E2 /* ShapeProperties.h */,
6967B0401E279D8D00A129E2 /* TextBox.h */,
);
path = Drawing;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
6967AFFA1E279D3900A129E2 /* PPTFormatLib */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6967B0041E279D3900A129E2 /* Build configuration list for PBXNativeTarget "PPTFormatLib" */;
buildPhases = (
6967AFF71E279D3900A129E2 /* Sources */,
6967AFF81E279D3900A129E2 /* Frameworks */,
6967AFF91E279D3900A129E2 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = PPTFormatLib;
productName = PPTFormatLib;
productReference = 6967AFFB1E279D3900A129E2 /* libPPTFormatLib.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
6967AFF31E279D3900A129E2 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0820;
ORGANIZATIONNAME = OnlyOffce;
TargetAttributes = {
6967AFFA1E279D3900A129E2 = {
CreatedOnToolsVersion = 8.2;
DevelopmentTeam = 2WH24U26GJ;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 6967AFF61E279D3900A129E2 /* Build configuration list for PBXProject "PPTFormatLib" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 6967AFF21E279D3900A129E2;
productRefGroup = 6967AFFC1E279D3900A129E2 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
6967AFFA1E279D3900A129E2 /* PPTFormatLib */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
6967AFF71E279D3900A129E2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6967B08F1E279D8D00A129E2 /* AnimationTypes.cpp in Sources */,
6967B08E1E279D8D00A129E2 /* SlidePersist.cpp in Sources */,
6967B0891E279D8D00A129E2 /* Converter.cpp in Sources */,
6967B0881E279D8D00A129E2 /* PPTFormatLib.cpp in Sources */,
6967B08D1E279D8D00A129E2 /* Records.cpp in Sources */,
6967B08A1E279D8D00A129E2 /* ShapeWriter.cpp in Sources */,
6967B08C1E279D8D00A129E2 /* ReadStructures.cpp in Sources */,
6967B08B1E279D8D00A129E2 /* PPTDocumentInfoOneUser.cpp in Sources */,
6967B0901E279D8D00A129E2 /* ArtBlip.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
6967B0021E279D3900A129E2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
6967B0031E279D3900A129E2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
6967B0051E279D3900A129E2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = 2WH24U26GJ;
GCC_PREPROCESSOR_DEFINITIONS = (
UNICODE,
_UNICODE,
_USE_LIBXML2_READER_,
_USE_XMLLITE_READER_,
USE_LITE_READER,
LIBXML_READER_ENABLED,
MAC,
unix,
_IOS,
DONT_WRITE_EMBEDDED_FONTS,
BUILD_CONFIG_FULL_VERSION,
_SVG_CONVERT_TO_IMAGE_,
_PRESENTATION_WRITER_,
ENABLE_PPT_TO_PPTX_CONVERT,
PPT_DEF,
PPTX_DEF,
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
/usr/include/,
/usr/include/libxml2/,
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
"$(PROJECT_DIR)/../../../DesktopEditor/xml/libxml2/include",
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/include",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
6967B0061E279D3900A129E2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = 2WH24U26GJ;
GCC_PREPROCESSOR_DEFINITIONS = (
UNICODE,
_UNICODE,
_USE_LIBXML2_READER_,
_USE_XMLLITE_READER_,
USE_LITE_READER,
LIBXML_READER_ENABLED,
MAC,
unix,
_IOS,
DONT_WRITE_EMBEDDED_FONTS,
BUILD_CONFIG_FULL_VERSION,
_SVG_CONVERT_TO_IMAGE_,
_PRESENTATION_WRITER_,
ENABLE_PPT_TO_PPTX_CONVERT,
PPT_DEF,
PPTX_DEF,
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
/usr/include/,
/usr/include/libxml2/,
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
"$(PROJECT_DIR)/../../../DesktopEditor/xml/libxml2/include",
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/include",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
6967AFF61E279D3900A129E2 /* Build configuration list for PBXProject "PPTFormatLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6967B0021E279D3900A129E2 /* Debug */,
6967B0031E279D3900A129E2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6967B0041E279D3900A129E2 /* Build configuration list for PBXNativeTarget "PPTFormatLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6967B0051E279D3900A129E2 /* Debug */,
6967B0061E279D3900A129E2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 6967AFF31E279D3900A129E2 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:PPTFormatLib.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1 @@
DO NOT REMOVE FOLDER FOR XCODE

View File

@ -60,7 +60,7 @@ bool COfficePPTFile::OpenFile(std::wstring sFileName)
pStgFrom->open(false,false);
m_pReader = new CPPTFileReader(pStgFrom, std_string2string(m_strTempDirectory));
m_pReader = new CPPTFileReader(pStgFrom, m_strTempDirectory);
((CPPTFileReader*)m_pReader)->m_oDocumentInfo.m_strFileDirectory = GetDirectory(sFileName.c_str());
if (!((CPPTFileReader*)m_pReader)->IsPowerPoint())
@ -85,6 +85,7 @@ bool COfficePPTFile::CloseFile()
m_pReader = NULL;
return S_OK;
}
HRESULT COfficePPTFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath)
{
if (m_strTempDirectory.length() < 1)
@ -102,7 +103,7 @@ HRESULT COfficePPTFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDs
if (!((CPPTFileReader*)m_pReader)->m_oDocumentInfo.m_arUsers.empty())
{
NSPresentationEditor::CPPTXWriter oPPTXWriter;
oPPTXWriter.m_strTempDirectory = std_string2string(sDstPath);
oPPTXWriter.m_strTempDirectory = sDstPath;
oPPTXWriter.CreateFile(((CPPTFileReader*)m_pReader)->m_oDocumentInfo.m_arUsers[0]);
@ -112,13 +113,7 @@ HRESULT COfficePPTFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDs
return S_OK;
}
HRESULT COfficePPTFile::GetAdditionalParam (CString sParamName, VARIANT* ParamValue)
{
if (NULL == ParamValue)
return S_FALSE;
return S_OK;
}
CString COfficePPTFile::GetDirectory(CString strFileName)
{

View File

@ -31,12 +31,7 @@
*/
#pragma once
#if defined(_WIN32) || defined (_WIN64)
#else
#include "../../../DesktopEditor/common/ASCVariant.h"
#endif
#include "../../../Common/DocxFormat/Source/Base/ASCString.h"
#include "../../../DesktopEditor/common/ASCVariant.h"
#include <vector>
@ -78,8 +73,6 @@ public:
HRESULT LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath);
HRESULT GetAdditionalParam (CString sParamName, VARIANT* ParamValue);
private:
bool OpenFile(std::wstring sFileName);

View File

@ -66,7 +66,7 @@ namespace NSPresentationEditor
<cp:revision>1</cp:revision>\
</cp:coreProperties>");
}
};
}
NSPresentationEditor::CPPTXWriter::CPPTXWriter()
@ -77,7 +77,7 @@ NSPresentationEditor::CPPTXWriter::CPPTXWriter()
m_pDocument = NULL;
m_pUserInfo = NULL;
m_pShapeWriter = new CShapeWriter();
m_pShapeWriter = new CShapeWriter();
}
NSPresentationEditor::CPPTXWriter::~CPPTXWriter()
@ -571,9 +571,8 @@ void NSPresentationEditor::CPPTXWriter::WriteThemes()
for (int i = 0 ; i < pTheme->m_arExtraColorScheme.size(); i++)
{
CString str;
str.Format(_T(" %d"), i + 1);
WriteColorScheme(oStringWriter, pTheme->m_sThemeName + string2std_string(str), pTheme->m_arExtraColorScheme[i], true); //extra
std::wstring str = L" " + std::to_wstring(i + 1);
WriteColorScheme(oStringWriter, pTheme->m_sThemeName + str, pTheme->m_arExtraColorScheme[i], true); //extra
}
oStringWriter.WriteString(std::wstring(L"</a:extraClrSchemeLst>"));
@ -941,4 +940,4 @@ void NSPresentationEditor::CPPTXWriter::WriteSlides()
CRelsGenerator::StartNotes((int)nIndexS, m_strTempDirectory, m_pDocument->m_arSlides[nIndexS]->m_strComment);
WriteSlide((int)nIndexS);
}
}
}

View File

@ -42,7 +42,7 @@ namespace NSPresentationEditor
private:
std::map<std::wstring, std::wstring> m_mapImages;
LONG m_lIndexNextImage;
long m_lIndexNextImage;
std::wstring m_strDstMedia;
public:
@ -81,29 +81,28 @@ namespace NSPresentationEditor
if (strExts == _T(".tmp")) strExts = _T(".png");
CString strImage = _T("");
strImage.Format(_T("image%d"), m_lIndexNextImage++);
std::wstring strImage = L"image" + std::to_wstring(m_lIndexNextImage++);
std::wstring strOutput = m_strDstMedia + string2std_string(strImage) + strExts;
strImage = _T("../media/") + strImage + std_string2string(strExts);
std::wstring strOutput = m_strDstMedia + strImage + strExts;
strImage = _T("../media/") + strImage + strExts;
// теперь нужно скопировать картинку
if (strOutput != strInput)
{
if (CDirectory::CopyFile(std_string2string(strInput), std_string2string(strOutput), NULL, NULL) == false)
if (CDirectory::CopyFile(strInput, strOutput) == false)
{
return L"";
}
}
m_mapImages[strInput] = string2std_string(strImage);
m_mapImages[strInput] = strImage;
return strImage;
}
AVSINLINE bool IsNeedDownload(const std::wstring& strFile)
{
int n1 = strFile.find(_T("www"));
int n2 = strFile.find(_T("http"));
int n3 = strFile.find(_T("ftp"));
int n1 = strFile.find(L"www");
int n2 = strFile.find(L"http");
int n3 = strFile.find(L"ftp");
if (((n1 >= 0) && (n1 < 10)) || ((n2 >= 0) && (n2 < 10)) || ((n3 >= 0) && (n3 < 10)))
return true;
@ -280,16 +279,18 @@ namespace NSPresentationEditor
}
m_mapHyperlinks[strHyperlink] = m_lNextRelsID;
CString strRid = _T("");
strRid.Format(_T("rId%d"), m_lNextRelsID++);
CString strRid;
strRid.Format(L"rId%d", m_lNextRelsID++);
std::wstring strRels = _T("<Relationship Id=\"") ;
std::wstring strRels = L"<Relationship Id=\"";
strRels += string2std_string(strRid) + _T("\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\" Target=\"");
strRels += strHyperlink + _T("\"/>");
strRels += strRid + L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\" Target=\"";
strRels += strHyperlink + L"\"/>";
m_oWriter.WriteString(strRels);
}
return strRid;
}
AVSINLINE CString WriteHyperlinkImage(const std::wstring& strImage, bool bExternal = true)
{
@ -304,17 +305,15 @@ namespace NSPresentationEditor
m_mapImages[strImage] = m_lNextRelsID;
CString strRid = _T("");
strRid.Format(_T("rId%d"), m_lNextRelsID++);
std::wstring strRels = _T("<Relationship Id=\"") ;
strRels += string2std_string(strRid) + _T("\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\" Target=\"");
strRels += strImage + _T("\"");
std::wstring strRid = L"rId" + std::to_wstring(m_lNextRelsID++);
std::wstring strRels = L"<Relationship Id=\"" + strRid + L"\"";
strRels += L" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\"";
strRels += L" Target=\"" + strImage + L"\"";
if (bExternal)
strRels += std::wstring(L" TargetMode=\"External\"");
strRels += std::wstring(L"/>");
strRels += L" TargetMode=\"External\"";
strRels += L"/>";
m_oWriter.WriteString(strRels);

View File

@ -40,13 +40,15 @@
#endif
void CStylesWriter::ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLevel, NSPresentationEditor::CMetricInfo& oMetricInfo,
NSPresentationEditor::CStringWriter& oWriter, const int& nLevel)
NSPresentationEditor::CStringWriter& oWriter, const int& nLevel)
{//дублирование CTextPFRun и CTextCFRun с ShapeWriter - todooo - вынести отдельно
CString str1;
if (nLevel == 9)
str1 = _T("<a:defPPr");
else
str1.Format(_T("<a:lvl%dpPr"), nLevel + 1);
{
str1 = L"<a:lvl" + std::to_wstring(nLevel + 1) + L"pPr";
}
oWriter.WriteString(str1);
@ -54,57 +56,53 @@ void CStylesWriter::ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLe
if (pPF->textDirection.is_init())
{
if (pPF->textDirection.get() == 1) oWriter.WriteString(std::wstring(L" rtl=\"1\""));
else oWriter.WriteString(std::wstring(L" rtl=\"0\""));
if (pPF->textDirection.get() == 1) oWriter.WriteString(L" rtl=\"1\"");
else oWriter.WriteString(L" rtl=\"0\"");
}
if (pPF->fontAlign.is_init())
{
CString strProp = GetFontAlign(pPF->fontAlign.get());
oWriter.WriteString(std::wstring(L" fontAlgn=\"") + string2std_string(strProp) + _T("\""));
std::wstring strProp = GetFontAlign(pPF->fontAlign.get());
oWriter.WriteString(L" fontAlgn=\"" + strProp + L"\"");
}
if (pPF->leftMargin.is_init())
{
CString strProp;
strProp.Format(_T(" marL=\"%d\""), pPF->leftMargin.get());
oWriter.WriteString(strProp);
std::wstring strProp = std::to_wstring(pPF->leftMargin.get());
oWriter.WriteString(L" marL=\"" + strProp + L"\"");
if (pPF->indent.is_init() == false)
pPF->indent = (LONG)0;
pPF->indent = (LONG)0;
}
if (pPF->indent.is_init())
{
CString strProp;
strProp.Format(_T(" indent=\"%d\""), pPF->indent.get());
oWriter.WriteString(strProp);
std::wstring strProp = std::to_wstring(pPF->indent.get());
oWriter.WriteString(L" indent=\"" + strProp + L"\"");
}
if (pPF->textAlignment.is_init())
{
CString strProp = GetTextAlign(pPF->textAlignment.get());
oWriter.WriteString(std::wstring(L" algn=\"") + string2std_string(strProp) + _T("\""));
std::wstring strProp = GetTextAlign(pPF->textAlignment.get());
oWriter.WriteString(L" algn=\"" + strProp + L"\"");
}
if (pPF->defaultTabSize.is_init())
{
CString strProp;
strProp.Format(_T(" defTabSz=\"%d\""), pPF->defaultTabSize.get());
oWriter.WriteString(strProp);
std::wstring strProp = std::to_wstring(pPF->defaultTabSize.get());
oWriter.WriteString(L" defTabSz=\"" + strProp + L"\"");
}
CString str2 = _T(">");
oWriter.WriteString(str2);
oWriter.WriteString(L">");
if (pPF->tabStops.size() > 0)
{
oWriter.WriteString(std::wstring(L"<a:tabLst>"));
oWriter.WriteString(L"<a:tabLst>");
for (int t = 0 ; t < pPF->tabStops.size(); t++)
{
CString strTabPos; strTabPos.Format(L"%d", pPF->tabStops[t].first) ;
oWriter.WriteString(std::wstring(L"<a:tab pos=\"") + string2std_string(strTabPos) + _T("\""));
std::wstring strTabPos = std::to_wstring(pPF->tabStops[t].first);
oWriter.WriteString(L"<a:tab pos=\"" + strTabPos + L"\"");
if (pPF->tabStops[t].second == 1) oWriter.WriteString(std::wstring(L" algn=\"ctr\"/>"));
else if (pPF->tabStops[t].second == 2) oWriter.WriteString(std::wstring(L" algn=\"r\"/>"));
else if (pPF->tabStops[t].second == 3) oWriter.WriteString(std::wstring(L" algn=\"dec\"/>"));
else oWriter.WriteString(std::wstring(L" algn=\"l\"/>"));
if (pPF->tabStops[t].second == 1) oWriter.WriteString(L" algn=\"ctr\"/>");
else if (pPF->tabStops[t].second == 2) oWriter.WriteString(L" algn=\"r\"/>");
else if (pPF->tabStops[t].second == 3) oWriter.WriteString(L" algn=\"dec\"/>");
else oWriter.WriteString(L" algn=\"l\"/>");
}
oWriter.WriteString(std::wstring(L"</a:tabLst>"));
oWriter.WriteString(L"</a:tabLst>");
}
if (pPF->hasBullet.is_init())
@ -113,112 +111,101 @@ void CStylesWriter::ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLe
{
if (pPF->bulletColor.is_init())
{
oWriter.WriteString(std::wstring(L"<a:buClr>"));
oWriter.WriteString(L"<a:buClr>");
oWriter.WriteString(NSPresentationEditor::CShapeWriter::ConvertColor(pPF->bulletColor.get(), 255));
oWriter.WriteString(std::wstring(L"</a:buClr>"));
oWriter.WriteString(L"</a:buClr>");
}
if (pPF->bulletSize.is_init())
{
if (pPF->bulletSize.get() > 24 && pPF->bulletSize.get() < 401)
{
CString str;
str.Format(_T("<a:buSzPct val=\"%d\"/>"), pPF->bulletSize.get() * 1000 );
oWriter.WriteString(str);
std::wstring strProp = std::to_wstring(pPF->bulletSize.get() * 1000 );
oWriter.WriteString(L"<a:buSzPct val=\"" + strProp + L"\"/>");
}
if (pPF->bulletSize.get() < 0 && pPF->bulletSize.get() > -4001)
{
CString str;
str.Format(_T("<a:buSzPts val=\"%d\"/>"), - pPF->bulletSize.get() );
oWriter.WriteString(str);
std::wstring strProp = std::to_wstring(- pPF->bulletSize.get() );
oWriter.WriteString(L"<a:buSzPts val=\"" + strProp + L"\"/>");
}
}
if (pPF->bulletFontProperties.is_init())
{
oWriter.WriteString(std::wstring(L"<a:buFont typeface=\"") + pPF->bulletFontProperties->strFontName + _T("\"/>"));
oWriter.WriteString(L"<a:buFont typeface=\"" + pPF->bulletFontProperties->strFontName + L"\"/>");
}
if (pPF->bulletChar.is_init())
{
wchar_t bu = pPF->bulletChar.get();
oWriter.WriteString(std::wstring(L"<a:buChar char=\""));
oWriter.WriteString(L"<a:buChar char=\"");
oWriter.WriteStringXML(std::wstring(&bu, 1));
oWriter.WriteString(std::wstring(L"\"/>"));
oWriter.WriteString(L"\"/>");
}
}
else
{
CString strB = _T("<a:buNone/>");
oWriter.WriteString(strB);
oWriter.WriteString(L"<a:buNone/>");
}
}
double dKoef1 = 3.52777778;
if (pPF->lineSpacing.is_init())
{
LONG val = pPF->lineSpacing.get();
LONG val = pPF->lineSpacing.get();
if (val > 0)
{
CString str = _T("");
str.Format(_T("<a:lnSpc><a:spcPts val=\"%d\"/></a:lnSpc>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
oWriter.WriteString(str);
std::wstring str = std::to_wstring( (int)(val * 0.125 * 100/*/ dKoef1*/));
oWriter.WriteString(L"<a:lnSpc><a:spcPts val=\"" + str + L"\"/></a:lnSpc>");
}
else if (val < 0 && val > -13200)
{
CString str = _T("");
str.Format(_T("<a:lnSpc><a:spcPct val=\"%d\"/></a:lnSpc>"), -val * 1000);
oWriter.WriteString(str);
std::wstring str = std::to_wstring(-val * 1000);
oWriter.WriteString(L"<a:lnSpc><a:spcPct val=\"" + str + L"\"/></a:lnSpc>");
}
}
if (pPF->spaceAfter.is_init())
{
LONG val = pPF->spaceAfter.get();
LONG val = pPF->spaceAfter.get();
if (val > 0)
{
CString str = _T("");
str.Format(_T("<a:spcAft><a:spcPts val=\"%d\"/></a:spcAft>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
oWriter.WriteString(str);
std::wstring str = std::to_wstring((int)(val * 0.125 * 100/*/ dKoef1*/));
oWriter.WriteString(L"<a:spcAft><a:spcPts val=\"" + str + L"\"/></a:spcAft>");
}
else if (val < 0 && val > -13200)
{
CString str = _T("");
str.Format(_T("<a:spcAft><a:spcPct val=\"%d\"/></a:spcAft>"), -val * 1000);
oWriter.WriteString(str);
std::wstring str = std::to_wstring(-val * 1000);
oWriter.WriteString(L"<a:spcAft><a:spcPct val=\"" + str + L"\"/></a:spcAft>");
}
}
if (pPF->spaceBefore.is_init())
{
LONG val = pPF->spaceBefore.get();
LONG val = pPF->spaceBefore.get();
if (val > 0)
{
CString str = _T("");
str.Format(_T("<a:spcBef><a:spcPts val=\"%d\"/></a:spcBef>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
oWriter.WriteString(str);
std::wstring str = std::to_wstring((int)(val * 0.125 * 100/*/ dKoef1*/));
oWriter.WriteString(L"<a:spcBef><a:spcPts val=\"" + str + L"\"/></a:spcBef>");
}
else if (val < 0 && val > -13200)
{
CString str = _T("");
str.Format(_T("<a:spcBef><a:spcPct val=\"%d\"/></a:spcBef>"), -val * 1000);
oWriter.WriteString(str);
std::wstring str = std::to_wstring(-val * 1000);
oWriter.WriteString(L"<a:spcBef><a:spcPct val=\"" + str + L"\"/></a:spcBef>");
}
}
CString strCF1 = _T("<a:defRPr");
oWriter.WriteString(strCF1);
oWriter.WriteString(L"<a:defRPr");
NSPresentationEditor::CTextCFRun* pCF = &oLevel.m_oCFRun;
if (pCF->Size.is_init())
{
CString strProp = _T("");
strProp.Format(_T(" sz=\"%d\""), (int)(100 * pCF->Size.get()));
oWriter.WriteString(strProp);
std::wstring str = std::to_wstring((int)(100 * pCF->Size.get()));
oWriter.WriteString(L" sz=\"" + str + L"\"");
}
if (pCF->FontBold.is_init())
{
if (pCF->FontBold.get())
oWriter.WriteString(std::wstring(L" b=\"1\""));
oWriter.WriteString(L" b=\"1\"");
else
oWriter.WriteString(std::wstring(L" b=\"0\""));
oWriter.WriteString(L" b=\"0\"");
}
if (pCF->FontItalic.is_init())
{
@ -240,51 +227,46 @@ void CStylesWriter::ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLe
{
if (pCF->Color->m_lSchemeIndex != -1)
{
CString strProp = _T("<a:solidFill><a:schemeClr val=\"") + GetColorInScheme(pCF->Color->m_lSchemeIndex) + _T("\"/></a:solidFill>");
oWriter.WriteString(strProp);
oWriter.WriteString(L"<a:solidFill><a:schemeClr val=\"" + GetColorInScheme(pCF->Color->m_lSchemeIndex) + L"\"/></a:solidFill>");
}
else
{
CString strColor = _T("");
CString strColor;
strColor.Format(_T("%06x"), pCF->Color->GetLONG_RGB());
CString strProp = _T("<a:solidFill><a:srgbClr val=\"") + strColor + _T("\"/></a:solidFill>");
oWriter.WriteString(strProp);
oWriter.WriteString(L"<a:solidFill><a:srgbClr val=\"" + strColor + L"\"/></a:solidFill>");
}
}
if (pCF->Typeface.is_init())
{
if (0 == pCF->Typeface.get())
{
CString strProp = _T("<a:latin typeface=\"+mj-lt\"/>");
oWriter.WriteString(strProp);
oWriter.WriteString(L"<a:latin typeface=\"+mj-lt\"/>");
}
else
{
CString strProp = _T("<a:latin typeface=\"+mn-lt\"/>");
oWriter.WriteString(strProp);
oWriter.WriteString(L"<a:latin typeface=\"+mn-lt\"/>");
}
}
else if ((pCF->FontProperties.is_init()) && (!pCF->FontProperties->strFontName.empty()))
{
oWriter.WriteString(std::wstring(L"<a:latin typeface=\"") + pCF->FontProperties->strFontName + _T("\"/>"));
oWriter.WriteString(L"<a:latin typeface=\"" + pCF->FontProperties->strFontName + L"\"/>");
}
if (pCF->FontPropertiesEA.is_init())
{
oWriter.WriteString(std::wstring(L"<a:ea typeface=\"") + pCF->FontPropertiesEA->strFontName + _T("\"/>"));
oWriter.WriteString(L"<a:ea typeface=\"" + pCF->FontPropertiesEA->strFontName + L"\"/>");
}
if (pCF->FontPropertiesSym.is_init())
{
oWriter.WriteString(std::wstring(L"<a:sym typeface=\"") + pCF->FontPropertiesSym->strFontName + _T("\"/>"));
oWriter.WriteString(L"<a:sym typeface=\"" + pCF->FontPropertiesSym->strFontName + L"\"/>");
}
CString strCF2 = _T("</a:defRPr>");
oWriter.WriteString(strCF2);
oWriter.WriteString(L"</a:defRPr>");
CString str3 = _T("");
CString str3;
if (nLevel == 9)
str3 = _T("</a:defPPr>");
str3 = L"</a:defPPr>";
else
str3.Format(_T("</a:lvl%dpPr>"), nLevel + 1);
str3 = L"</a:lvl" + std::to_wstring(nLevel + 1) + L"pPr>";
oWriter.WriteString(str3);
}
@ -319,15 +301,14 @@ CString NSPresentationEditor::CShapeWriter::ConvertLine(CPen & pen)
{
NSPresentationEditor::CStringWriter line_writer;
CString strLine = _T("");
strLine.Format(_T("<a:ln w=\"%d\">"), (int)(pen.Size * 36000));
line_writer.WriteString(strLine);
std::wstring str = std::to_wstring( (int)(pen.Size * 36000));
line_writer.WriteString(L"<a:ln w=\"" + str + L"\">");
line_writer.WriteString(std::wstring(L"<a:solidFill>"));
line_writer.WriteString(L"<a:solidFill>");
line_writer.WriteString(ConvertColor(pen.Color, pen.Alpha));
line_writer.WriteString(std::wstring(L"</a:solidFill>"));
line_writer.WriteString(L"</a:solidFill>");
line_writer.WriteString(std::wstring(L"<a:round/><a:headEnd/><a:tailEnd/></a:ln>"));
line_writer.WriteString(L"<a:round/><a:headEnd/><a:tailEnd/></a:ln>");
return line_writer.GetData();
}
@ -339,25 +320,25 @@ CString NSPresentationEditor::CShapeWriter::ConvertBrush(CBrush & brush)
{
if (m_pImageElement)//фон для картинки с празрачностью
{
brush_writer.WriteString(std::wstring(L"<a:noFill/>"));
brush_writer.WriteString(L"<a:noFill/>");
}
else
{
CString strRid = m_pRels->WriteImage(brush.TexturePath);
std::wstring strRid = m_pRels->WriteImage(brush.TexturePath);
brush_writer.WriteString(std::wstring(L"<a:blipFill dpi=\"0\" rotWithShape=\"1\"><a:blip r:embed=\"") + string2std_string(strRid) + _T("\"/><a:srcRect/>"));
brush_writer.WriteString(L"<a:blipFill dpi=\"0\" rotWithShape=\"1\"><a:blip r:embed=\"" + strRid + L"\"/><a:srcRect/>");
if ( brush.TextureMode == c_BrushTextureModeTile)
brush_writer.WriteString(std::wstring(L"<a:tile/>"));
brush_writer.WriteString(L"<a:tile/>");
else
brush_writer.WriteString(std::wstring(L"<a:stretch><a:fillRect/></a:stretch>"));
brush_writer.WriteString(L"<a:stretch><a:fillRect/></a:stretch>");
brush_writer.WriteString(std::wstring(L"</a:blipFill>"));
brush_writer.WriteString(L"</a:blipFill>");
}
}
else if ( brush.Type == c_BrushTypeNoFill)
{
brush_writer.WriteString(std::wstring(L"<a:noFill/>"));
brush_writer.WriteString(L"<a:noFill/>");
}
else if ( brush.Type == c_BrushTypePathGradient1 ||
brush.Type == c_BrushTypePathGradient2 ||
@ -365,30 +346,30 @@ CString NSPresentationEditor::CShapeWriter::ConvertBrush(CBrush & brush)
brush.Type == c_BrushTypeHorizontal ||
brush.Type == c_BrushTypeVertical )
{
brush_writer.WriteString(std::wstring(L"<a:gradFill><a:gsLst>"));
brush_writer.WriteString(L"<a:gradFill><a:gsLst>");
if (brush.ColorsPosition.empty() == false)
{
for (int i = 0; i < brush.ColorsPosition.size(); i++)
{
CString strPos; strPos.Format(L"%d", (int)(brush.ColorsPosition[i].second * 1000));
std::wstring str = std::to_wstring( (int)(brush.ColorsPosition[i].second * 1000));
brush_writer.WriteString(std::wstring(L"<a:gs pos=\"") + string2std_string(strPos)+ L"\">");
brush_writer.WriteString(L"<a:gs pos=\"" + str + L"\">");
brush_writer.WriteString(ConvertColor(brush.ColorsPosition[i].first, 255));
brush_writer.WriteString(std::wstring(L"</a:gs>"));
brush_writer.WriteString(L"</a:gs>");
}
}
else
{
brush_writer.WriteString(std::wstring(L"<a:gs pos=\"0\">"));
brush_writer.WriteString(L"<a:gs pos=\"0\">");
brush_writer.WriteString(ConvertColor(brush.Color1, brush.Alpha1));
brush_writer.WriteString(std::wstring(L"</a:gs>"));
brush_writer.WriteString(L"</a:gs>");
brush_writer.WriteString(std::wstring(L"<a:gs pos=\"100000\">"));
brush_writer.WriteString(L"<a:gs pos=\"100000\">");
brush_writer.WriteString(ConvertColor(brush.Color2, brush.Alpha2));
brush_writer.WriteString(std::wstring(L"</a:gs>"));
brush_writer.WriteString(L"</a:gs>");
}
brush_writer.WriteString(std::wstring(L"</a:gsLst>"));
brush_writer.WriteString(std::wstring(L"<a:lin ang=\""));
brush_writer.WriteString(L"</a:gsLst>");
brush_writer.WriteString(L"<a:lin ang=\"");
{
if (brush.LinearAngle < -180) brush.LinearAngle += 180;
if (brush.LinearAngle > 180) brush.LinearAngle -= 180;
@ -397,22 +378,22 @@ CString NSPresentationEditor::CShapeWriter::ConvertBrush(CBrush & brush)
if (val < 0) val = 0;
if (val > 360) val -= 360;
CString str; str.Format(_T("%d"), val * 60000);
std::wstring str = std::to_wstring(val * 60000);
brush_writer.WriteString(str);
}
brush_writer.WriteString(std::wstring(L"\" scaled=\"1\"/>"));
brush_writer.WriteString(std::wstring(L"</a:gradFill>"));
brush_writer.WriteString(L"\" scaled=\"1\"/>");
brush_writer.WriteString(L"</a:gradFill>");
}
else if(brush.Type == c_BrushTypePattern)
{//типов нету в ппт - вместо них шаблон-картинка
brush_writer.WriteString(std::wstring(L"<a:pattFill prst=\"pct80\">"));
brush_writer.WriteString(std::wstring(L"<a:fgClr>"));
brush_writer.WriteString(L"<a:pattFill prst=\"pct80\">");
brush_writer.WriteString(L"<a:fgClr>");
brush_writer.WriteString(ConvertColor(brush.Color1, brush.Alpha1));
brush_writer.WriteString(std::wstring(L"</a:fgClr>"));
brush_writer.WriteString(std::wstring(L"<a:bgClr>"));
brush_writer.WriteString(L"</a:fgClr>");
brush_writer.WriteString(L"<a:bgClr>");
brush_writer.WriteString(ConvertColor(brush.Color2, brush.Alpha2));
brush_writer.WriteString(std::wstring(L"</a:bgClr>"));
brush_writer.WriteString(std::wstring(L"</a:pattFill>"));
brush_writer.WriteString(L"</a:bgClr>");
brush_writer.WriteString(L"</a:pattFill>");
}
else
{
@ -463,81 +444,80 @@ CString NSPresentationEditor::CShapeWriter::ConvertShadow(CShadow & shadow)
}
}
CString strDir = _T("");
CString strDist = _T("");
std::wstring strDir;
std::wstring strDist;
if (shadow.DistanceY != 0 && shadow.DistanceX != 0)
{
if (shadow.DistanceY < 0 && shadow.DistanceX < 0) dir /=2;
strDir.Format(_T(" dir=\"%d\""), (int)(dir * 60000));
strDist.Format(_T(" dist=\"%d\""), (int)(dist * 36000));
strDir = L" dir=\"" + std::to_wstring((int)(dir * 60000)) + L"\"";
strDist = L" dist=\"" + std::to_wstring((int)(dist * 36000)) + L"\"";
}
CString strSY = _T("");
std::wstring strSY;
if (shadow.ScaleYToY < 1 || shadow.ScaleYToY > 1)
{
if (shadow.ScaleYToX < 1)shadow.ScaleYToY = -shadow.ScaleYToY;
strSY.Format(_T(" sy=\"%d\""), (int)(shadow.ScaleYToY * 100000));
strSY = L" sy=\"" + std::to_wstring((int)(shadow.ScaleYToY * 100000)) + L"\"";
}
CString strSX = _T("");
std::wstring strSX;
if (shadow.ScaleYToX < 1 || shadow.ScaleYToX > 1)
{
//strSX.Format(_T(" sx=\"%d\""), (int)(shadow.ScaleYToX * 100000));
strSX.Format(_T(" kx=\"%d\""), (int)((shadow.ScaleYToX + 0.5) * 360000));
strSX = L" kx=\"" + std::to_wstring((int)((shadow.ScaleYToX + 0.5) * 360000)) + L"\"";
}
NSPresentationEditor::CStringWriter shadow_writer;
shadow_writer.WriteString(std::wstring(L"<a:effectLst>"));
shadow_writer.WriteString(L"<a:effectLst>");
if (!Preset.empty())
{
shadow_writer.WriteString(std::wstring(L"<a:prstShdw"));
shadow_writer.WriteString(std::wstring(L" prst=\"") + Preset + std::wstring(L"\""));
shadow_writer.WriteString(L"<a:prstShdw");
shadow_writer.WriteString(L" prst=\"" + Preset + L"\"");
//shadow_writer.WriteString(std::wstring(L" rotWithShape=\"0\" algn=\"ctr\""));
shadow_writer.WriteString(strDir);
shadow_writer.WriteString(strDist);
shadow_writer.WriteString(std::wstring(L">"));
shadow_writer.WriteString(L">");
shadow_writer.WriteString(ConvertColor(shadow.Color,shadow.Alpha));
shadow_writer.WriteString(std::wstring(L"</a:prstShdw>"));
shadow_writer.WriteString(L"</a:prstShdw>");
}
else if (Inner)
{
shadow_writer.WriteString(std::wstring(L"<a:innerShdw"));
shadow_writer.WriteString(std::wstring(L" rotWithShape=\"0\""));
if (strSX.IsEmpty() && strSY.IsEmpty())
shadow_writer.WriteString(L"<a:innerShdw");
shadow_writer.WriteString(L" rotWithShape=\"0\"");
if (strSX.empty() && strSY.empty())
{
shadow_writer.WriteString(std::wstring(L" algn=\"ctr\""));
shadow_writer.WriteString(L" algn=\"ctr\"");
}
shadow_writer.WriteString(strSX);
shadow_writer.WriteString(strSY);
shadow_writer.WriteString(strDir);
shadow_writer.WriteString(strDist);
shadow_writer.WriteString(std::wstring(L">"));
shadow_writer.WriteString(L">");
shadow_writer.WriteString(ConvertColor(shadow.Color,shadow.Alpha));
shadow_writer.WriteString(std::wstring(L"</a:innerShdw>"));
shadow_writer.WriteString(L"</a:innerShdw>");
}
else
{
shadow_writer.WriteString(std::wstring(L"<a:outerShdw"));
shadow_writer.WriteString(std::wstring(L" rotWithShape=\"0\""));
if (strSX.IsEmpty() && strSY.IsEmpty())
shadow_writer.WriteString(L"<a:outerShdw");
shadow_writer.WriteString(L" rotWithShape=\"0\"");
if (strSX.empty() && strSY.empty())
{
shadow_writer.WriteString(std::wstring(L" algn=\"ctr\""));
shadow_writer.WriteString(L" algn=\"ctr\"");
}
shadow_writer.WriteString(strSX);
shadow_writer.WriteString(strSY);
shadow_writer.WriteString(strDir);
shadow_writer.WriteString(strDist);
shadow_writer.WriteString(std::wstring(L">"));
shadow_writer.WriteString(L">");
shadow_writer.WriteString(ConvertColor(shadow.Color,shadow.Alpha));
shadow_writer.WriteString(std::wstring(L"</a:outerShdw>"));
shadow_writer.WriteString(L"</a:outerShdw>");
}
shadow_writer.WriteString(std::wstring(L"</a:effectLst>"));
shadow_writer.WriteString(L"</a:effectLst>");
return shadow_writer.GetData();
}
@ -548,14 +528,14 @@ CString NSPresentationEditor::CShapeWriter::ConvertColor(CColor & color, long a
{
if (255 == alpha)
{
CString str = _T("");
str.Format(_T("<a:srgbClr val=\"%06X\"/>"), color.GetLONG_RGB());
CString str;
str.Format(L"<a:srgbClr val=\"%06X\"/>", color.GetLONG_RGB());
color_writer.WriteString(str);
}
else
{
CString str = _T("");
str.Format(_T("<a:srgbClr val=\"%06X\"><a:alpha val=\"%d\"/></a:srgbClr>"), color.GetLONG_RGB(), (int)(alpha * 100000 / 255));
CString str;
str.Format(L"<a:srgbClr val=\"%06X\"><a:alpha val=\"%d\"/></a:srgbClr>", color.GetLONG_RGB(), (int)(alpha * 100000 / 255));
color_writer.WriteString(str);
}
}
@ -563,16 +543,12 @@ CString NSPresentationEditor::CShapeWriter::ConvertColor(CColor & color, long a
{
if (255 == alpha)
{
CString str = _T("<a:schemeClr val=\"") + CStylesWriter::GetColorInScheme(color.m_lSchemeIndex) + _T("\"/>");
color_writer.WriteString(str);
color_writer.WriteString(L"<a:schemeClr val=\"" + CStylesWriter::GetColorInScheme(color.m_lSchemeIndex) + L"\"/>");
}
else
{
CString strAlpha; strAlpha.Format(_T("%d"), (int)(alpha * 100000 / 255));
CString str = _T("<a:schemeClr val=\"") + CStylesWriter::GetColorInScheme(color.m_lSchemeIndex) + _T("\"><a:alpha val=\"") + strAlpha + _T("\"/></a:schemeClr>");
color_writer.WriteString(str);
std::wstring strAlpha = std::to_wstring((int)(alpha * 100000 / 255));
color_writer.WriteString(L"<a:schemeClr val=\"" + CStylesWriter::GetColorInScheme(color.m_lSchemeIndex) + L"\"><a:alpha val=\"" + strAlpha + L"\"/></a:schemeClr>");
}
}
return color_writer.GetData();
@ -581,12 +557,12 @@ void NSPresentationEditor::CShapeWriter::WriteImageInfo()
{
m_oWriter.WriteString(std::wstring(L"<p:nvPicPr>"));
CString strShapeID;
strShapeID.Format(_T("%d"), m_lNextShapeID);
std::wstring strShapeID = std::to_wstring(m_lNextShapeID);
m_oWriter.WriteString(std::wstring(L"<p:cNvPr id=\"") +string2std_string(strShapeID) + L"\"" );
m_oWriter.WriteString(std::wstring(L"<p:cNvPr id=\"") + strShapeID + L"\"" );
if (m_pImageElement->m_sName.empty()) m_pImageElement->m_sName = std::wstring(L"Image ") + string2std_string(strShapeID);
if (m_pImageElement->m_sName.empty())
m_pImageElement->m_sName = std::wstring(L"Image ") + strShapeID;
if (m_pImageElement->m_bHidden) m_oWriter.WriteString(std::wstring(L" hidden=\"1\""));
@ -609,12 +585,12 @@ void NSPresentationEditor::CShapeWriter::WriteImageInfo()
{
m_oWriter.WriteString(std::wstring(L"<p:nvPr><p:ph"));
if (m_pImageElement->m_lPlaceholderType > 0)
m_oWriter.WriteString(std::wstring(L" type=\"") + GetPhType(m_pImageElement->m_lPlaceholderType) +_T("\""));
m_oWriter.WriteString(std::wstring(L" type=\"") + GetPhType(m_pImageElement->m_lPlaceholderType) + L"\"");
if (-1 != m_pImageElement->m_lPlaceholderID)
{
CString strIdx; strIdx.Format(_T("%d"), m_pImageElement->m_lPlaceholderID );
m_oWriter.WriteString(std::wstring(L" idx=\"") + string2std_string(strIdx) + _T("\""));
std::wstring strIdx = std::to_wstring(m_pImageElement->m_lPlaceholderID );
m_oWriter.WriteString(std::wstring(L" idx=\"") + strIdx + L"\"");
}
m_oWriter.WriteString(std::wstring(L"/></p:nvPr>"));
@ -632,16 +608,14 @@ void NSPresentationEditor::CShapeWriter::WriteShapeInfo()
{
m_oWriter.WriteString(std::wstring(L"<p:nvSpPr>"));
CString strShapeID = _T("");
if (m_pShapeElement->m_lID < 0)
m_pShapeElement->m_lID = m_lNextShapeID;
strShapeID.Format(L"%d", m_pShapeElement->m_lID);
std::wstring strShapeID = std::to_wstring(m_pShapeElement->m_lID);
m_oWriter.WriteString(std::wstring(L"<p:cNvPr id=\"") + string2std_string(strShapeID) + L"\"");
m_oWriter.WriteString(std::wstring(L"<p:cNvPr id=\"") + strShapeID + L"\"");
if (m_pShapeElement->m_sName.empty()) m_pShapeElement->m_sName = std::wstring(L"Shape ") + string2std_string(strShapeID);
if (m_pShapeElement->m_sName.empty()) m_pShapeElement->m_sName = std::wstring(L"Shape ") + strShapeID;
if (m_pShapeElement->m_bHidden) m_oWriter.WriteString(std::wstring(L" hidden=\"1\""));
@ -684,8 +658,8 @@ void NSPresentationEditor::CShapeWriter::WriteShapeInfo()
if ( m_pShapeElement->m_lPlaceholderID != -1)
{
CString strIdx; strIdx.Format(_T("%d"), m_pShapeElement->m_lPlaceholderID );
m_oWriter.WriteString(std::wstring(L" idx=\"") + string2std_string(strIdx) + _T("\""));
std::wstring strIdx = std::to_wstring( m_pShapeElement->m_lPlaceholderID );
m_oWriter.WriteString(std::wstring(L" idx=\"") + strIdx + L"\"");
}
if (m_pShapeElement->m_lPlaceholderSizePreset > 1 && !isTitlePlaceholder(m_pShapeElement->m_lPlaceholderType))
@ -732,25 +706,24 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
// m_oWriter.WriteString(std::wstring(L" lIns=\"0\" tIns=\"0\" rIns=\"0\" bIns=\"0\""));
if (m_pShapeElement->m_oShape.m_oText.m_oAttributes.m_nTextAlignVertical == 0 )
m_oWriter.WriteString(" anchor=\"t\"");
m_oWriter.WriteString(L" anchor=\"t\"");
else if (m_pShapeElement->m_oShape.m_oText.m_oAttributes.m_nTextAlignVertical == 2 )
m_oWriter.WriteString(" anchor=\"b\"");
m_oWriter.WriteString(L" anchor=\"b\"");
else if (m_pShapeElement->m_oShape.m_oText.m_oAttributes.m_nTextAlignVertical == 1 )
{
m_oWriter.WriteString(" anchor=\"ctr\"");
m_oWriter.WriteString(" anchorCtr=\"0\"");
m_oWriter.WriteString(L" anchor=\"ctr\"");
m_oWriter.WriteString(L" anchorCtr=\"0\"");
}
if (m_pShapeElement->m_oShape.m_oText.m_oAttributes.m_dTextRotate > 0)
{
CString strProp;
strProp.Format(_T(" rot=\"%d\""), (int)(m_pShapeElement->m_oShape.m_oText.m_oAttributes.m_dTextRotate * 60000));
m_oWriter.WriteString(strProp);
std::wstring strProp = std::to_wstring((int)(m_pShapeElement->m_oShape.m_oText.m_oAttributes.m_dTextRotate * 60000));
m_oWriter.WriteString(L" rot=\"" + strProp + L"\"");
}
if (m_pShapeElement->m_oShape.m_oText.m_bVertical)
{
m_oWriter.WriteString(" vert=\"eaVert\"");
m_oWriter.WriteString(L" vert=\"eaVert\"");
}
m_oWriter.WriteString(std::wstring(L">"));
m_oWriter.WriteString(L">");
if (m_bWordArt)
{
@ -769,29 +742,30 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
case oox::msosptTextFadeUp:
{
double kf = 4.63; //"волшебный"
strVal.Format(L"%d", (int)(kf * pPPTShape->m_arAdjustments[i]));
m_oWriter.WriteString(std::wstring(L"<a:gd name=\"adj\" fmla=\"val "));
m_oWriter.WriteString(strVal + _T("\"/>"));
std::wstring strVal = std::to_wstring((int)(kf * pPPTShape->m_arAdjustments[i]));
m_oWriter.WriteString(L"<a:gd name=\"adj\" fmla=\"val ");
m_oWriter.WriteString(strVal + L"\"/>");
}break;
}
}
m_oWriter.WriteString(std::wstring(L"</a:avLst>"));
m_oWriter.WriteString(std::wstring(L"</a:prstTxWarp>"));
m_oWriter.WriteString(L"</a:avLst>");
m_oWriter.WriteString(L"</a:prstTxWarp>");
}
if (m_pShapeElement->m_oShape.m_oText.m_bAutoFit)
{
m_oWriter.WriteString(std::wstring(L"<a:spAutoFit/>"));
m_oWriter.WriteString(L"<a:spAutoFit/>");
}
m_oWriter.WriteString(std::wstring(L"</a:bodyPr>"));
m_oWriter.WriteString(L"</a:bodyPr>");
if (0 == nCount)
{
m_oWriter.WriteString(std::wstring(L"<a:lstStyle/><a:p><a:endParaRPr dirty=\"0\"/></a:p></p:txBody>"));
m_oWriter.WriteString(L"<a:lstStyle/><a:p><a:endParaRPr dirty=\"0\"/></a:p></p:txBody>");
return;
}
m_oWriter.WriteString(std::wstring(L"<a:lstStyle>"));
m_oWriter.WriteString(L"<a:lstStyle>");
if (!m_bWordArt)
{
@ -810,9 +784,8 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
// if (pParagraph->m_arSpans.size() == 1 && pParagraph->m_arSpans[0].m_strText.empty()) break;
//}
CString _str1 = _T("");
_str1.Format(_T("<a:p><a:pPr lvl=\"%d\""), pParagraph->m_lTextLevel);
m_oWriter.WriteString(_str1);
std::wstring _str1 = std::to_wstring(pParagraph->m_lTextLevel);
m_oWriter.WriteString(L"<a:p><a:pPr lvl=\"" + _str1 + L"\"");
NSPresentationEditor::CTextPFRun* pPF = &pParagraph->m_oPFRun;
@ -823,38 +796,34 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
}
if (pPF->fontAlign.is_init())
{
CString strProp = CStylesWriter::GetFontAlign(pPF->fontAlign.get());
m_oWriter.WriteString(std::wstring(L" fontAlgn=\"") + string2std_string(strProp) + _T("\""));
std::wstring strProp = CStylesWriter::GetFontAlign(pPF->fontAlign.get());
m_oWriter.WriteString(std::wstring(L" fontAlgn=\"") + strProp + L"\"");
}
if (pPF->leftMargin.is_init())
{
CString strProp;
strProp.Format(_T(" marL=\"%d\""), pPF->leftMargin.get());
m_oWriter.WriteString(strProp);
CString strProp = std::to_wstring( pPF->leftMargin.get() );
m_oWriter.WriteString(L" marL=\"" + strProp + L"\"");
if (pPF->indent.is_init() == false)
pPF->indent = (LONG)0;
}
if (pPF->indent.is_init())
{
int ind = pPF->indent.get();
CString strProp = _T("");
strProp.Format(_T(" indent=\"%d\""), pPF->indent.get());
m_oWriter.WriteString(strProp);
std::wstring strProp = std::to_wstring(pPF->indent.get());
m_oWriter.WriteString(L" indent=\"" + strProp + L"\"");
}
if (pPF->textAlignment.is_init())
{
CString strProp = CStylesWriter::GetTextAlign(pPF->textAlignment.get());
m_oWriter.WriteString(std::wstring(L" algn=\"") + string2std_string(strProp) + _T("\""));
m_oWriter.WriteString(L" algn=\"" + strProp + L"\"");
}
if (pPF->defaultTabSize.is_init())
{
CString strProp = _T("");
strProp.Format(_T(" defTabSz=\"%d\""), pPF->defaultTabSize.get());
m_oWriter.WriteString(strProp);
std::wstring strProp= std::to_wstring( pPF->defaultTabSize.get());
m_oWriter.WriteString(L" defTabSz=\"" + strProp + L"\"");
}
CString _str2 = _T(">");
m_oWriter.WriteString(_str2);
m_oWriter.WriteString(L">");
double dKoef1 = 3.52777778; // :-) чё это не понятно ...
if (pPF->lineSpacing.is_init())
@ -864,16 +833,13 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
//1 inch = 576 master unit -> 1 master unit = 0.125 pt
if (val > 0)//The absolute value specifies spacing in master units.
{
CString str = _T("");
str.Format(_T("<a:lnSpc><a:spcPts val=\"%d\"/></a:lnSpc>"), (int)(val* 0.125 * 100/*/ dKoef1*/));
m_oWriter.WriteString(str);
std::wstring strProp = std::to_wstring( (int)(val* 0.125 * 100/*/ dKoef1*/));
m_oWriter.WriteString(L"<a:lnSpc><a:spcPts val=\"" + strProp + L"\"/></a:lnSpc>");
}
else if (val < 0 && val > -13200)
{//0 to 13200, inclusive - The value specifies spacing as a percentage of the text line height.
CString str = _T("");
str.Format(_T("<a:lnSpc><a:spcPct val=\"%d\"/></a:lnSpc>"), -val * 1000);
m_oWriter.WriteString(str);
std::wstring strProp = std::to_wstring( -val * 1000);
m_oWriter.WriteString(L"<a:lnSpc><a:spcPct val=\"" + strProp + L"\"/></a:lnSpc>");
}
}
if (pPF->spaceAfter.is_init())
@ -881,15 +847,13 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
LONG val = pPF->spaceAfter.get();
if (val > 0)
{
CString str = _T("");
str.Format(_T("<a:spcAft><a:spcPts val=\"%d\"/></a:spcAft>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
m_oWriter.WriteString(str);
std::wstring strProp = std::to_wstring((int)(val * 0.125 * 100/*/ dKoef1*/));
m_oWriter.WriteString(L"<a:spcAft><a:spcPts val=\"" + strProp + L"\"/></a:spcAft>");
}
else if (val < 0 && val > -13200)
{
CString str;
str.Format(_T("<a:spcAft><a:spcPct val=\"%d\"/></a:spcAft>"), -val * 1000);
m_oWriter.WriteString(str);
std::wstring strProp = std::to_wstring(-val * 1000);
m_oWriter.WriteString(L"<a:spcAft><a:spcPct val=\"" + strProp + L"\"/></a:spcAft>");
}
}
if (pPF->spaceBefore.is_init())
@ -897,15 +861,13 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
LONG val = pPF->spaceBefore.get();
if (val > 0)
{
CString str = _T("");
str.Format(_T("<a:spcBef><a:spcPts val=\"%d\"/></a:spcBef>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
m_oWriter.WriteString(str);
std::wstring strProp = std::to_wstring((int)(val * 0.125 * 100/*/ dKoef1*/));
m_oWriter.WriteString(L"<a:spcBef><a:spcPts val=\"" + strProp + L"\"/></a:spcBef>");
}
else if (val < 0 && val > -13200)
{
CString str;
str.Format(_T("<a:spcBef><a:spcPct val=\"%d\"/></a:spcBef>"), -val * 1000);
m_oWriter.WriteString(str);
std::wstring strProp = std::to_wstring(-val * 1000);
m_oWriter.WriteString(L"<a:spcBef><a:spcPct val=\"" + strProp + L"\"/></a:spcBef>");
}
}
@ -923,15 +885,13 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
{
if (pPF->bulletSize.get() > 24 && pPF->bulletSize.get() < 401)
{
CString str;
str.Format(_T("<a:buSzPct val=\"%d\"/>"), pPF->bulletSize.get() * 1000 );
m_oWriter.WriteString(str);
std::wstring strProp = std::to_wstring(pPF->bulletSize.get() * 1000 );
m_oWriter.WriteString(L"<a:buSzPct val=\"" + strProp + L"\"/>");
}
if (pPF->bulletSize.get() < 0 && pPF->bulletSize.get() > -4001)
{
CString str;
str.Format(_T("<a:buSzPts val=\"%d\"/>"), - pPF->bulletSize.get() );
m_oWriter.WriteString(str);
std::wstring strProp = std::to_wstring(- pPF->bulletSize.get() );
m_oWriter.WriteString(L"<a:buSzPts val=\"" + strProp + L"\"/>");
}
}
if (pPF->bulletFontProperties.is_init())
@ -1198,8 +1158,8 @@ CString NSPresentationEditor::CShapeWriter::ConvertShape()
oInfo.m_bFlipH = m_pShapeElement->m_bFlipH;
oInfo.m_bFlipV = m_pShapeElement->m_bFlipV;
oInfo.m_lOriginalWidth = (LONG)m_pShapeElement->m_rcBoundsOriginal.GetWidth();
oInfo.m_lOriginalHeight = (LONG)m_pShapeElement->m_rcBoundsOriginal.GetHeight();
oInfo.m_lOriginalWidth = (LONG)m_pShapeElement->m_rcBoundsOriginal.GetWidth();
oInfo.m_lOriginalHeight = (LONG)m_pShapeElement->m_rcBoundsOriginal.GetHeight();
m_oWriter.WriteString(std::wstring(L"<p:spPr>"));
@ -1320,8 +1280,8 @@ CString NSPresentationEditor::CShapeWriter::ConvertImage()
oInfo.m_bFlipH = m_pImageElement->m_bFlipH;
oInfo.m_bFlipV = m_pImageElement->m_bFlipV;
oInfo.m_lOriginalWidth = (LONG)m_pImageElement->m_rcBoundsOriginal.GetWidth();
oInfo.m_lOriginalHeight = (LONG)m_pImageElement->m_rcBoundsOriginal.GetHeight();
oInfo.m_lOriginalWidth = (LONG)m_pImageElement->m_rcBoundsOriginal.GetWidth();
oInfo.m_lOriginalHeight = (LONG)m_pImageElement->m_rcBoundsOriginal.GetHeight();
m_oWriter.WriteString(std::wstring(L"<p:blipFill>"));
@ -1472,7 +1432,7 @@ HRESULT NSPresentationEditor::CShapeWriter::get_DpiY(double* dDpiY)
return S_OK;
}
// pen --------------------------------------------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::SetPen(BSTR bsXML)
HRESULT NSPresentationEditor::CShapeWriter::SetPen(std::wstring bsXML)
{
//m_oPen.FromXmlString((CString)bsXML);
return S_OK;
@ -1590,7 +1550,7 @@ HRESULT NSPresentationEditor::CShapeWriter::PenDashPattern(double* pPattern, LON
return S_OK;
}
// brush ------------------------------------------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::SetBrush(BSTR bsXML)
HRESULT NSPresentationEditor::CShapeWriter::SetBrush(std::wstring bsXML)
{
//m_oBrush.FromXmlString((CString)bsXML);
return S_OK;
@ -1710,7 +1670,7 @@ HRESULT NSPresentationEditor::CShapeWriter::put_BrushGradientColors(LONG* lColor
return S_OK;
}
// font -------------------------------------------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::SetFont(BSTR bsXML)
HRESULT NSPresentationEditor::CShapeWriter::SetFont(std::wstring bsXML)
{
//m_oFont.FromXmlString((CString)bsXML);
return S_OK;
@ -1734,7 +1694,7 @@ HRESULT NSPresentationEditor::CShapeWriter::get_FontPath(std::wstring* bsName)
}
HRESULT NSPresentationEditor::CShapeWriter::put_FontPath(const std::wstring& bsName)
{
m_oFont.Path = std_string2string(bsName);
m_oFont.Path = bsName;
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::get_FontSize(double* dSize)
@ -1787,7 +1747,7 @@ HRESULT NSPresentationEditor::CShapeWriter::put_FontFaceIndex(const int& lFaceIn
return S_OK;
}
// shadow -----------------------------------------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::SetShadow(BSTR bsXML)
HRESULT NSPresentationEditor::CShapeWriter::SetShadow(std::wstring bsXML)
{
//m_oShadow.FromXmlString((CString)bsXML);
return S_OK;
@ -1853,7 +1813,7 @@ HRESULT NSPresentationEditor::CShapeWriter::put_ShadowVisible(bool val)
return S_OK;
}
// edge -------------------------------------------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::SetEdgeText(BSTR bsXML)
HRESULT NSPresentationEditor::CShapeWriter::SetEdgeText(std::wstring bsXML)
{
//m_oEdge.FromXmlString((CString)bsXML);
return S_OK;
@ -2213,13 +2173,4 @@ HRESULT NSPresentationEditor::CShapeWriter::put_ClipMode(const LONG& lMode)
m_lClipMode = lMode;
return S_OK;
}
// additiaonal params ----------------------------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::SetAdditionalParam(BSTR ParamName, VARIANT ParamValue)
{
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::GetAdditionalParam(BSTR ParamName, VARIANT* ParamValue)
{
return S_OK;
}
// --------------------------------------------------------------------------------------------

View File

@ -37,7 +37,7 @@
namespace NSPresentationEditor
{
static inline LONG GetPPTXPlaceHolderType(const int & lType)
static inline LONG GetPPTXPlaceHolderType(const int & lType)
{
switch (lType)
{
@ -150,7 +150,7 @@ namespace NSPresentationEditor
NSPresentationEditor::CRelsGenerator* m_pRels;
LONG m_lNextShapeID;
LONG m_lNextShapeID;
bool m_bWordArt;
bool m_bTextBox;
@ -212,9 +212,9 @@ namespace NSPresentationEditor
CString ConvertLine (CPen & pen);
CString ConvertShadow (CShadow & shadow);
CString ConvertBrush (CBrush & brush);
static CString ConvertColor (CColor & color, long alpha);
static CString ConvertColor (CColor & color, long alpha);
// тип рендерера-----------------------------------------------------------------------------
virtual HRESULT get_Type(LONG* lType) ;
virtual HRESULT get_Type(LONG* lType) ;
//-------- Функции для работы со страницей --------------------------------------------------
virtual HRESULT NewPage() ;
virtual HRESULT get_Height(double* dHeight);
@ -225,10 +225,10 @@ namespace NSPresentationEditor
virtual HRESULT get_DpiY(double* dDpiY) ;
// pen --------------------------------------------------------------------------------------
virtual HRESULT get_PenColor(LONG* lColor) ;
virtual HRESULT put_PenColor(const LONG& lColor);
virtual HRESULT get_PenAlpha(LONG* lAlpha) ;
virtual HRESULT put_PenAlpha(const LONG& lAlpha);
virtual HRESULT get_PenColor(LONG* lColor) ;
virtual HRESULT put_PenColor(const LONG& lColor);
virtual HRESULT get_PenAlpha(LONG* lAlpha) ;
virtual HRESULT put_PenAlpha(const LONG& lAlpha);
virtual HRESULT get_PenSize(double* dSize) ;
virtual HRESULT put_PenSize(const double& dSize);
virtual HRESULT get_PenDashStyle(BYTE* val) ;
@ -241,35 +241,35 @@ namespace NSPresentationEditor
virtual HRESULT put_PenLineJoin(const BYTE& val);
virtual HRESULT get_PenDashOffset(double* dOffset);
virtual HRESULT put_PenDashOffset(const double& dOffset);
virtual HRESULT get_PenAlign(LONG* lAlign) ;
virtual HRESULT put_PenAlign(const LONG& lAlign);
virtual HRESULT get_PenAlign(LONG* lAlign) ;
virtual HRESULT put_PenAlign(const LONG& lAlign);
virtual HRESULT get_PenMiterLimit(double* dOffset);
virtual HRESULT put_PenMiterLimit(const double& dOffset);
virtual HRESULT PenDashPattern(double* pPattern, LONG lCount);
virtual HRESULT PenDashPattern(double* pPattern, LONG lCount);
// brush ------------------------------------------------------------------------------------
virtual HRESULT get_BrushType(LONG* lType) ;
virtual HRESULT put_BrushType(const LONG& lType) ;
virtual HRESULT get_BrushColor1(LONG* lColor) ;
virtual HRESULT put_BrushColor1(const LONG& lColor) ;
virtual HRESULT get_BrushAlpha1(LONG* lAlpha) ;
virtual HRESULT put_BrushAlpha1(const LONG& lAlpha) ;
virtual HRESULT get_BrushColor2(LONG* lColor) ;
virtual HRESULT put_BrushColor2(const LONG& lColor) ;
virtual HRESULT get_BrushAlpha2(LONG* lAlpha) ;
virtual HRESULT put_BrushAlpha2(const LONG& lAlpha) ;
virtual HRESULT get_BrushType(LONG* lType) ;
virtual HRESULT put_BrushType(const LONG& lType) ;
virtual HRESULT get_BrushColor1(LONG* lColor) ;
virtual HRESULT put_BrushColor1(const LONG& lColor) ;
virtual HRESULT get_BrushAlpha1(LONG* lAlpha) ;
virtual HRESULT put_BrushAlpha1(const LONG& lAlpha) ;
virtual HRESULT get_BrushColor2(LONG* lColor) ;
virtual HRESULT put_BrushColor2(const LONG& lColor) ;
virtual HRESULT get_BrushAlpha2(LONG* lAlpha) ;
virtual HRESULT put_BrushAlpha2(const LONG& lAlpha) ;
virtual HRESULT get_BrushTexturePath(std::wstring* bsPath);
virtual HRESULT put_BrushTexturePath(const std::wstring& bsPath);
virtual HRESULT get_BrushTextureMode(LONG* lMode) ;
virtual HRESULT put_BrushTextureMode(const LONG& lMode) ;
virtual HRESULT get_BrushTextureAlpha(LONG* lTxAlpha) ;
virtual HRESULT put_BrushTextureAlpha(const LONG& lTxAlpha);
virtual HRESULT get_BrushTextureMode(LONG* lMode) ;
virtual HRESULT put_BrushTextureMode(const LONG& lMode) ;
virtual HRESULT get_BrushTextureAlpha(LONG* lTxAlpha) ;
virtual HRESULT put_BrushTextureAlpha(const LONG& lTxAlpha);
virtual HRESULT get_BrushLinearAngle(double* dAngle) ;
virtual HRESULT put_BrushLinearAngle(const double& dAngle);
virtual HRESULT BrushRect(const INT& val, const double& left, const double& top, const double& width, const double& height);
virtual HRESULT BrushBounds(const double& left, const double& top, const double& width, const double& height);
virtual HRESULT put_BrushGradientColors(LONG* lColors, double* pPositions, LONG nCount);
virtual HRESULT put_BrushGradientColors(LONG* lColors, double* pPositions, LONG nCount);
// font -------------------------------------------------------------------------------------
virtual HRESULT get_FontName(std::wstring* bsName);
@ -278,8 +278,8 @@ namespace NSPresentationEditor
virtual HRESULT put_FontPath(const std::wstring& bsName);
virtual HRESULT get_FontSize(double* dSize) ;
virtual HRESULT put_FontSize(const double& dSize);
virtual HRESULT get_FontStyle(LONG* lStyle) ;
virtual HRESULT put_FontStyle(const LONG& lStyle);
virtual HRESULT get_FontStyle(LONG* lStyle) ;
virtual HRESULT put_FontStyle(const LONG& lStyle);
virtual HRESULT get_FontStringGID(INT* bGID) ;
virtual HRESULT put_FontStringGID(const INT& bGID);
virtual HRESULT get_FontCharSpace(double* dSpace);
@ -307,7 +307,7 @@ namespace NSPresentationEditor
virtual HRESULT PathCommandArcTo(const double& x, const double& y, const double& w, const double& h, const double& startAngle, const double& sweepAngle);
virtual HRESULT PathCommandClose() ;
virtual HRESULT PathCommandEnd() ;
virtual HRESULT DrawPath(const LONG& nType) ;
virtual HRESULT DrawPath(const LONG& nType) ;
virtual HRESULT PathCommandStart() ;
virtual HRESULT PathCommandGetCurrentPoint(double* x, double* y);
@ -329,48 +329,45 @@ namespace NSPresentationEditor
virtual HRESULT ResetTransform();
// -----------------------------------------------------------------------------------------
virtual HRESULT get_ClipMode(LONG* plMode);
virtual HRESULT put_ClipMode(const LONG& lMode) ;
virtual HRESULT get_ClipMode(LONG* plMode);
virtual HRESULT put_ClipMode(const LONG& lMode) ;
// additiaonal params ----------------------------------------------------------------------
virtual HRESULT CommandLong(const LONG& lType, const LONG& lCommand);
virtual HRESULT CommandDouble(const LONG& lType, const double& dCommand) ;
virtual HRESULT CommandString(const LONG& lType, const std::wstring& sCommand);
virtual HRESULT CommandLong(const LONG& lType, const LONG& lCommand);
virtual HRESULT CommandDouble(const LONG& lType, const double& dCommand) ;
virtual HRESULT CommandString(const LONG& lType, const std::wstring& sCommand);
//////////////////////////////////////////////////////////////////////////////////////////////////
// shadow -----------------------------------------------------------------------------------
HRESULT SetShadow (BSTR bsXML);
HRESULT get_ShadowDistanceX (double* val);
HRESULT put_ShadowDistanceX (double val);
HRESULT get_ShadowDistanceY (double* val);
HRESULT put_ShadowDistanceY (double val);
HRESULT get_ShadowBlurSize (double* val);
HRESULT put_ShadowBlurSize (double val);
HRESULT get_ShadowColor (LONG* val);
HRESULT put_ShadowColor (LONG val);
HRESULT get_ShadowAlpha (LONG* val);
HRESULT put_ShadowAlpha (LONG val);
// shadow -----------------------------------------------------------------------------------
HRESULT SetShadow (std::wstring bsXML);
HRESULT get_ShadowDistanceX (double* val);
HRESULT put_ShadowDistanceX (double val);
HRESULT get_ShadowDistanceY (double* val);
HRESULT put_ShadowDistanceY (double val);
HRESULT get_ShadowBlurSize (double* val);
HRESULT put_ShadowBlurSize (double val);
HRESULT get_ShadowColor (LONG* val);
HRESULT put_ShadowColor (LONG val);
HRESULT get_ShadowAlpha (LONG* val);
HRESULT put_ShadowAlpha (LONG val);
HRESULT get_ShadowVisible (bool* val);
HRESULT put_ShadowVisible (bool val);
// edge -------------------------------------------------------------------------------------
HRESULT SetEdgeText (BSTR bsXML);
HRESULT get_EdgeVisible (LONG* val);
HRESULT put_EdgeVisible (LONG val);
HRESULT get_EdgeColor (LONG* val);
HRESULT put_EdgeColor (LONG val);
HRESULT get_EdgeAlpha (LONG* val);
HRESULT put_EdgeAlpha (LONG val);
HRESULT get_EdgeDist (double* val);
HRESULT put_EdgeDist (double val);
// edge -------------------------------------------------------------------------------------
HRESULT SetEdgeText (std::wstring bsXML);
HRESULT get_EdgeVisible (LONG* val);
HRESULT put_EdgeVisible (LONG val);
HRESULT get_EdgeColor (LONG* val);
HRESULT put_EdgeColor (LONG val);
HRESULT get_EdgeAlpha (LONG* val);
HRESULT put_EdgeAlpha (LONG val);
HRESULT get_EdgeDist (double* val);
HRESULT put_EdgeDist (double val);
HRESULT SetFont(BSTR bsXML);
HRESULT SetPen(BSTR bsXML);
HRESULT SetBrush(BSTR bsXML);
// additiaonal params ----------------------------------------------------------------------
HRESULT SetAdditionalParam (BSTR ParamName, VARIANT ParamValue);
HRESULT GetAdditionalParam (BSTR ParamName, VARIANT* ParamValue);
public:
void SetRelsGenerator(CRelsGenerator* pGenerator)
HRESULT SetFont(std::wstring bsXML);
HRESULT SetPen(std::wstring bsXML);
HRESULT SetBrush(std::wstring bsXML);
public:
void SetRelsGenerator(CRelsGenerator* pGenerator)
{
m_pRels = pGenerator;
}
@ -417,12 +414,12 @@ namespace NSPresentationEditor
double m_dTransformAngle;
LONG m_lCurrentCommandType; // текущая команда
LONG m_lCurrentCommandType; // текущая команда
double m_dDpiX;
double m_dDpiY;
LONG m_lClipMode;
LONG m_lClipMode;
CPen m_oPen; // настройки всей графики (скопирован ашник из AVSGraphics)
CBrush m_oBrush;
@ -443,7 +440,7 @@ namespace NSPresentationEditor
m_oFullTransform.TransformPoint(x, y);
CString str = _T("");
str.Format(_T("<a:moveTo><a:pt x=\"%d\" y=\"%d\"/></a:moveTo>"), (LONG)x, (LONG)y);
str.Format(_T("<a:moveTo><a:pt x=\"%d\" y=\"%d\"/></a:moveTo>"), (LONG)x, (LONG)y);
m_oWriterPath.WriteString(str);
}
inline void LineTo(const double& dX, const double& dY)
@ -453,7 +450,7 @@ namespace NSPresentationEditor
m_oFullTransform.TransformPoint(x, y);
CString str = _T("");
str.Format(_T("<a:lnTo><a:pt x=\"%d\" y=\"%d\"/></a:lnTo>"), (LONG)x, (LONG)y);
str.Format(_T("<a:lnTo><a:pt x=\"%d\" y=\"%d\"/></a:lnTo>"), (LONG)x, (LONG)y);
m_oWriterPath.WriteString(str);
}
inline void CurveTo(const double& x1, const double& y1, const double& x2, const double& y2, const double& x3, const double& y3)
@ -472,7 +469,7 @@ namespace NSPresentationEditor
CString str = _T("");
str.Format(_T("<a:cubicBezTo><a:pt x=\"%d\" y=\"%d\"/><a:pt x=\"%d\" y=\"%d\"/><a:pt x=\"%d\" y=\"%d\"/></a:cubicBezTo>"),
(LONG)_x1, (LONG)_y1, (LONG)_x2, (LONG)_y2, (LONG)_x3, (LONG)_y3);
(LONG)_x1, (LONG)_y1, (LONG)_x2, (LONG)_y2, (LONG)_x3, (LONG)_y3);
m_oWriterPath.WriteString(str);
}
void Start()

View File

@ -34,89 +34,58 @@
class CStylesWriter
{
public:
AVSINLINE static CString GetTextAnchor(const WORD& value)
AVSINLINE static std::wstring GetTextAnchor(const WORD& value)
{
if (0 == value)
return _T("t");
if (1 == value)
return _T("ctr");
if (2 == value)
return _T("b");
return _T("t");
if (0 == value) return L"t";
if (1 == value) return L"ctr";
if (2 == value) return L"b";
return L"t";
}
AVSINLINE static CString GetTextAlign(const WORD& value)
AVSINLINE static std::wstring GetTextAlign(const WORD& value)
{
if (0 == value)
return _T("l");
if (1 == value)
return _T("ctr");
if (2 == value)
return _T("r");
if (3 == value)
return _T("just");
if (4 == value)
return _T("dist");
if (5 == value)
return _T("thaiDist");
if (6 == value)
return _T("justLow");
return _T("l");
if (0 == value) return L"l";
if (1 == value) return L"ctr";
if (2 == value) return L"r";
if (3 == value) return L"just";
if (4 == value) return L"dist";
if (5 == value) return L"thaiDist";
if (6 == value) return L"justLow";
return L"l";
}
//oArrayMem.push_back(oScheme[0]);//0
//oArrayMem.push_back(oScheme[1]);//1
//oArrayMem.push_back(oScheme[2]);//2
//oArrayMem.push_back(oScheme[3]);//3
//oArrayMem.push_back(oScheme[0]);//4
//oArrayMem.push_back(oScheme[4]);//5 //accent1
//oArrayMem.push_back(oScheme[5]);//6 //accent2
//oArrayMem.push_back(oScheme[0]);//7 //accent3
//oArrayMem.push_back(oScheme[5]);//8 //accent4
//oArrayMem.push_back(oScheme[4]);//9 //accent5
//oArrayMem.push_back(oScheme[7]);//10 //accent6
//oArrayMem.push_back(oScheme[6]);//11 //hlink
//oArrayMem.push_back(oScheme[7]);//12 //folHlink
//oArrayMem.push_back(oScheme[0]);//13 //lt1
//oArrayMem.push_back(oScheme[1]);//14 //dk1
//oArrayMem.push_back(oScheme[2]);//15 //lt2
//oArrayMem.push_back(oScheme[3]);//16 //dk2
AVSINLINE static CString GetColorInScheme(const LONG& lIndex)
AVSINLINE static std::wstring GetColorInScheme(const LONG& lIndex)
{
switch (lIndex)
{
case 0: return _T("phClr");
case 1: return _T("bg1");
case 2: return _T("tx1");
case 3: return _T("bg2");
case 4: return _T("tx2");
case 5: return _T("accent1");
case 6: return _T("accent2");
case 7: return _T("accent3");
case 8: return _T("accent4");
case 9: return _T("accent5");
case 10: return _T("accent6");
case 11: return _T("hlink");
case 12: return _T("folHlink");
case 13: return _T("lt1");
case 14: return _T("dk1");
case 15: return _T("lt2");
case 16: return _T("dk2");
case 0: return L"phClr";
case 1: return L"bg1";
case 2: return L"tx1";
case 3: return L"bg2";
case 4: return L"tx2";
case 5: return L"accent1";
case 6: return L"accent2";
case 7: return L"accent3";
case 8: return L"accent4";
case 9: return L"accent5";
case 10: return L"accent6";
case 11: return L"hlink";
case 12: return L"folHlink";
case 13: return L"lt1";
case 14: return L"dk1";
case 15: return L"lt2";
case 16: return L"dk2";
break;
};
return _T("none");
return L"none";
}
AVSINLINE static CString GetFontAlign(const WORD& value)
AVSINLINE static std::wstring GetFontAlign(const WORD& value)
{
if (0 == value)
return _T("base");
if (1 == value)
return _T("t");
if (2 == value)
return _T("ctr");
if (3 == value)
return _T("b");
return _T("auto");
if (0 == value) return L"base";
if (1 == value) return L"t";
if (2 == value) return L"ctr";
if (3 == value) return L"b";
return L"auto";
}
static CString ConvertStyles(NSPresentationEditor::CTextStyles& oStyles, NSPresentationEditor::CMetricInfo& oMetricInfo, int nCount = 10)

View File

@ -31,16 +31,15 @@
*/
#pragma once
#include <string>
#if defined(_WIN32) || defined (_WIN64)
#include <windows.h>
#else
#include "../../../DesktopEditor/common/ASCVariant.h"
#endif
#include "../../../DesktopEditor/common/ASCVariant.h"
typedef BYTE BOOL1;
#define PSFLAG_CONTAINER 0xFF
#define PSFLAG_CONTAINER 0xFF
#define PPT_DEFAULT_SLIDE_DURATION 5000
/////////////////////////////////////////////////////////////////////////

View File

@ -183,7 +183,7 @@ public:
bool m_bIsCompressed;
bool m_bIsValid;
CString m_sExtension;
std::wstring m_sExtension;
private:
BYTE* m_pMetaHeader;
BYTE* m_pMetaFile;

View File

@ -31,12 +31,7 @@
*/
#pragma once
#if defined(_WIN32) || defined (_WIN64)
#else
#include "../../../DesktopEditor/common/ASCVariant.h"
#endif
#include "../../../Common/DocxFormat/Source/Base/ASCString.h"
#include "../../../DesktopEditor/common/ASCVariant.h"
#include <vector>
/**************************************************************

View File

@ -113,7 +113,7 @@ public:
oPersist.m_nPsrRef = pAtom->m_arSlides[index]->m_nPsrRef;
oPersist.m_nSlideID = pAtom->m_arSlides[index]->m_nSlideID;
oPersist.m_arTextAttrs.Append(pAtom->m_arTextPlaceHolders[index]);
oPersist.m_arTextAttrs += pAtom->m_arTextPlaceHolders[index];
pArray->Add(oPersist);
}
@ -189,4 +189,4 @@ public:
}
}
}
};
};

Some files were not shown because too many files have changed in this diff Show More