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

linux build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58302 954022d7-b5bf-4e40-9824-e11837661b57
parent 4fcb5472
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-09-15T20:00:39. --> <!-- Written by QtCreator 3.1.1, 2014-09-16T18:17:09. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>
......
...@@ -88,18 +88,6 @@ static std::string stringWstingToUtf8String (const std::wstring& aaSrc) ...@@ -88,18 +88,6 @@ static std::string stringWstingToUtf8String (const std::wstring& aaSrc)
std::wstring aSrc = aaSrc; std::wstring aSrc = aaSrc;
UTF32 *pStrUtf32 = (UTF32 *) &aSrc[0]; UTF32 *pStrUtf32 = (UTF32 *) &aSrc[0];
const UTF32 *pStrUtf32Test = reinterpret_cast<const UTF32 *> (aSrc.c_str());
wchar_t *pStrUtf32Test2 = &aSrc[0];
void *pStrUtf32Test3 = pStrUtf32Test2;
UTF32 *pStrUtf32Test4 = (UTF32 *) pStrUtf32Test3;
uint32_t *pStrUtf32Test5 = (uint32_t *) pStrUtf32Test3;
uint64_t pStrUtf32Test6 = (uint64_t) pStrUtf32Test3;
uint64_t *pStrUtf32Test7 = (uint64_t *) pStrUtf32Test3;
UTF32 *pStrUtf32Test8 = (UTF32 *) pStrUtf32Test6;
uint32_t nLength = aSrc.length(); uint32_t nLength = aSrc.length();
uint32_t nDstLength = 4*nLength + 1; uint32_t nDstLength = 4*nLength + 1;
UTF8 *pStrUtf8 = new UTF8 [nDstLength]; UTF8 *pStrUtf8 = new UTF8 [nDstLength];
......
...@@ -214,7 +214,9 @@ namespace OOX ...@@ -214,7 +214,9 @@ namespace OOX
case OOX::et_w_sym: case OOX::et_w_sym:
{ {
OOX::Logic::CSym* oSym = static_cast<OOX::Logic::CSym*>(item); OOX::Logic::CSym* oSym = static_cast<OOX::Logic::CSym*>(item);
sRes.AppendChar(0x0FFF & oSym->m_oChar->GetValue()); TCHAR oNewChar = 0x0FFF & oSym->m_oChar->GetValue();
sRes += oNewChar;
//sRes.AppendChar(0x0FFF & oSym->m_oChar->GetValue());
} }
break; break;
case OOX::et_w_t: case OOX::et_w_t:
......
...@@ -192,7 +192,7 @@ namespace OOX ...@@ -192,7 +192,7 @@ namespace OOX
namespace OOX namespace OOX
{ {
static const CPath c_oContentTypeFileName = L"[Content_Types].xml"; static const CPath c_oContentTypeFileName (_T("[Content_Types].xml"));
class CContentTypes class CContentTypes
{ {
......
...@@ -56,15 +56,18 @@ namespace OOX ...@@ -56,15 +56,18 @@ namespace OOX
} }
void IFileContainer::Write(OOX::CRels& oRels, const OOX::CPath& oCurrent, const OOX::CPath& oDir, OOX::CContentTypes& oContent) const void IFileContainer::Write(OOX::CRels& oRels, const OOX::CPath& oCurrent, const OOX::CPath& oDir, OOX::CContentTypes& oContent) const
{ {
CAtlMap<CString, size_t> mNamePair; // CAtlMap<CString, size_t> mNamePair;
std::map<CString, size_t> mNamePair;
POSITION pos = m_mContainer.GetStartPosition(); //POSITION pos = m_mContainer.GetStartPosition();
while ( NULL != pos ) for (std::map<CString, size_t>::const_iterator it = mNamePair.begin(); it != mNamePair.end(); ++it)
{ {
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_mContainer.GetNext( pos ); //while ( NULL != pos )
{
//const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_mContainer.GetNext( pos );
smart_ptr<OOX::File> pFile = pPair->m_value; smart_ptr<OOX::File> pFile = it->second; //pPair->m_value;
smart_ptr<OOX::External> pExt = pFile.smart_dynamic_cast<OOX::External>(); smart_ptr<OOX::External> pExt = pFile.smart_dynamic_cast<OOX::External>();
if ( !pExt.IsInit() ) if ( !pExt.IsInit() )
...@@ -72,19 +75,22 @@ namespace OOX ...@@ -72,19 +75,22 @@ namespace OOX
OOX::CPath oDefDir = pFile->DefaultDirectory(); OOX::CPath oDefDir = pFile->DefaultDirectory();
OOX::CPath oName = pFile->DefaultFileName(); OOX::CPath oName = pFile->DefaultFileName();
CAtlMap<CString, size_t>::CPair* pNamePair = mNamePair.Lookup( oName.m_strFilename ); //CAtlMap<CString, size_t>::CPair* pNamePair = mNamePair.Lookup( oName.m_strFilename );
if ( NULL == pNamePair ) std::map<CString, size_t>::const_iterator pNamePair = mNamePair.find ( oName.m_strFilename );
mNamePair.SetAt( oName.m_strFilename, 1 );
if (pNamePair == mNamePair.end())
mNamePair [oName.m_strFilename] = 1 ;
else else
oName = oName + pNamePair->m_key; oName = oName + pNamePair->m_key;
OOX::CSystemUtility::CreateDirectories( oCurrent / oDefDir ); OOX::CSystemUtility::CreateDirectories( oCurrent / oDefDir );
pFile->write( oCurrent / oDefDir / oName, oDir / oDefDir, oContent ); pFile->write( oCurrent / oDefDir / oName, oDir / oDefDir, oContent );
oRels.Registration( pPair->m_key, pFile->type(), oDefDir / oName ); oRels.Registration( it->first /*pPair->m_key*/, pFile->type(), oDefDir / oName );
} }
else else
{ {
oRels.Registration( pPair->m_key, pExt ); oRels.Registration( it->first /*pPair->m_key*/, pExt );
}
} }
} }
} }
......
...@@ -30,7 +30,8 @@ namespace OOX ...@@ -30,7 +30,8 @@ namespace OOX
} }
protected: protected:
CAtlMap<CString, smart_ptr<OOX::File>> m_mContainer; //CAtlMap<CString, smart_ptr<OOX::File>> m_mContainer;
std::map<CString, smart_ptr<OOX::File>> m_mContainer;
size_t m_lMaxRid; size_t m_lMaxRid;
protected: protected:
......
...@@ -862,8 +862,9 @@ namespace OOX ...@@ -862,8 +862,9 @@ namespace OOX
XmlUtils::CXmlNode oAbstractNumNode; XmlUtils::CXmlNode oAbstractNumNode;
if ( oAbstractNumList.GetAt( nIndex, oAbstractNumNode ) ) if ( oAbstractNumList.GetAt( nIndex, oAbstractNumNode ) )
{ {
OOX::Numbering::CAbstractNum oAbstractNum = oAbstractNumNode; //OOX::Numbering::CAbstractNum oAbstractNum = oAbstractNumNode;
m_arrAbstractNum.Add( oAbstractNum );
m_arrAbstractNum.push_back( /*oAbstractNum*/ new OOX::Numbering::CAbstractNum (oAbstractNumNode) );
} }
} }
...@@ -875,8 +876,8 @@ namespace OOX ...@@ -875,8 +876,8 @@ namespace OOX
XmlUtils::CXmlNode oNumNode; XmlUtils::CXmlNode oNumNode;
if ( oNumList.GetAt( nIndex, oNumNode ) ) if ( oNumList.GetAt( nIndex, oNumNode ) )
{ {
OOX::Numbering::CNum oNum = oNumNode; //OOX::Numbering::CNum oNum = oNumNode;
m_arrNum.Add( oNum ); m_arrNum.push_back( /*oNum*/ new OOX::Numbering::CNum (oNumNode) );
} }
} }
...@@ -894,8 +895,8 @@ namespace OOX ...@@ -894,8 +895,8 @@ namespace OOX
XmlUtils::CXmlNode oNumNode; XmlUtils::CXmlNode oNumNode;
if ( oNumPicList.GetAt( nIndex, oNumNode ) ) if ( oNumPicList.GetAt( nIndex, oNumNode ) )
{ {
OOX::Numbering::CNumPicBullet oNum = oNumNode; //OOX::Numbering::CNumPicBullet oNum = oNumNode;
m_arrNumPicBullet.Add( oNum ); m_arrNumPicBullet.push_back( /*oNum*/ new OOX::Numbering::CNumPicBullet (oNumNode) );
} }
} }
} }
......
...@@ -202,8 +202,9 @@ namespace OOX ...@@ -202,8 +202,9 @@ namespace OOX
{ {
if ( oNodes.GetAt( nIndex, oRelNode ) ) if ( oNodes.GetAt( nIndex, oRelNode ) )
{ {
Rels::CRelationShip oRel = oRelNode; //Rels::CRelationShip oRel = oRelNode;
m_arrRelations.Add( oRel ); Rels::CRelationShip *oRel = new Rels::CRelationShip (oRelNode);
m_arrRelations.push_back( oRel );
} }
} }
} }
......
...@@ -28,18 +28,18 @@ namespace SimpleTypes ...@@ -28,18 +28,18 @@ namespace SimpleTypes
virtual EOptimizeForBrowserTarget FromString(CString &sValue) virtual EOptimizeForBrowserTarget FromString(CString &sValue)
{ {
if ( _T("W3C XHTML+CSS1") == sValue ) m_eValue = optforbrowserXhtmlCSS1; if ( _T("W3C XHTML+CSS1") == sValue ) this->m_eValue = optforbrowserXhtmlCSS1;
else if ( _T("W3C HTML4+CSS1") == sValue ) m_eValue = optforbrowserHtml4CSS1; else if ( _T("W3C HTML4+CSS1") == sValue ) this->m_eValue = optforbrowserHtml4CSS1;
else if ( _T("W3C XHTML+CSS2") == sValue ) m_eValue = optforbrowserXhtmlCSS2; else if ( _T("W3C XHTML+CSS2") == sValue ) this->m_eValue = optforbrowserXhtmlCSS2;
else if ( _T("W3C HTML4+CSS2") == sValue ) m_eValue = optforbrowserHtml4CSS2; else if ( _T("W3C HTML4+CSS2") == sValue ) this->m_eValue = optforbrowserHtml4CSS2;
else m_eValue = eDefValue; else this->m_eValue = eDefValue;
return m_eValue; return this->m_eValue;
} }
virtual CString ToString() const virtual CString ToString() const
{ {
switch(m_eValue) switch(this->m_eValue)
{ {
case optforbrowserXhtmlCSS1 : return _T("W3C XHTML+CSS1"); case optforbrowserXhtmlCSS1 : return _T("W3C XHTML+CSS1");
case optforbrowserHtml4CSS1 : return _T("W3C HTML4+CSS1 "); case optforbrowserHtml4CSS1 : return _T("W3C HTML4+CSS1 ");
......
...@@ -806,8 +806,8 @@ namespace OOX ...@@ -806,8 +806,8 @@ namespace OOX
XmlUtils::CXmlNode oStyleNode; XmlUtils::CXmlNode oStyleNode;
if ( oStyleList.GetAt( nStlyeIndex, oStyleNode ) ) if ( oStyleList.GetAt( nStlyeIndex, oStyleNode ) )
{ {
OOX::CStyle oStyle = oStyleNode; //OOX::CStyle oStyle = oStyleNode;
m_arrStyle.Add( oStyle ); m_arrStyle.push_back( /*oStyle*/ new OOX::CStyle (oStyleNode) );
} }
} }
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "../Drawing/DrawingStyles.h" #include "../Drawing/DrawingStyles.h"
#include "../Drawing/DrawingShared.h" #include "../Drawing/DrawingShared.h"
#include "../../SystemUtility/SystemUtility.h"
namespace OOX namespace OOX
{ {
......
...@@ -43,6 +43,18 @@ namespace OOX ...@@ -43,6 +43,18 @@ namespace OOX
return *this; return *this;
} }
CPath& CPath::operator=(const CString& oSrc) CPath& CPath::operator=(const CString& oSrc)
{
m_strFilename = oSrc;
Normalize();
return *this;
}
CPath& CPath::operator=(LPCSTR oSrc)
{
m_strFilename = oSrc;
Normalize();
return *this;
}
CPath& CPath::operator=(LPCWSTR oSrc)
{ {
m_strFilename = oSrc; m_strFilename = oSrc;
Normalize(); Normalize();
......
...@@ -19,6 +19,8 @@ namespace OOX ...@@ -19,6 +19,8 @@ namespace OOX
CPath& operator=(const CPath& oSrc); CPath& operator=(const CPath& oSrc);
CPath& operator=(const CString& oSrc); CPath& operator=(const CString& oSrc);
CPath& operator=(LPCSTR oSrc);
CPath& operator=(LPCWSTR oSrc);
friend CPath operator/(const CPath& path1, const CPath& path2) friend CPath operator/(const CPath& path1, const CPath& path2)
{ {
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
#include "../Base/Nullable.h" #include "../Base/Nullable.h"
//#include "../SystemUtility/File.h" //#include "../SystemUtility/File.h"
//#include "../SystemUtility/FileSystem/Directory.h"
#include "../../../DesktopEditor/common/File.h" #include "../../../DesktopEditor/common/File.h"
//#include "../../../DesktopEditor/common/Directory.h"
#include "../SystemUtility/SystemUtility.h" #include "../SystemUtility/SystemUtility.h"
namespace XmlUtils namespace XmlUtils
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment