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"?>
<!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>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......
......@@ -88,18 +88,6 @@ static std::string stringWstingToUtf8String (const std::wstring& aaSrc)
std::wstring aSrc = aaSrc;
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 nDstLength = 4*nLength + 1;
UTF8 *pStrUtf8 = new UTF8 [nDstLength];
......
......@@ -214,7 +214,9 @@ namespace OOX
case OOX::et_w_sym:
{
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;
case OOX::et_w_t:
......
......@@ -192,7 +192,7 @@ namespace OOX
namespace OOX
{
static const CPath c_oContentTypeFileName = L"[Content_Types].xml";
static const CPath c_oContentTypeFileName (_T("[Content_Types].xml"));
class CContentTypes
{
......
......@@ -56,15 +56,18 @@ namespace OOX
}
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)
{
//while ( NULL != pos )
{
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_mContainer.GetNext( 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>();
if ( !pExt.IsInit() )
......@@ -72,21 +75,24 @@ namespace OOX
OOX::CPath oDefDir = pFile->DefaultDirectory();
OOX::CPath oName = pFile->DefaultFileName();
CAtlMap<CString, size_t>::CPair* pNamePair = mNamePair.Lookup( oName.m_strFilename );
if ( NULL == pNamePair )
mNamePair.SetAt( oName.m_strFilename, 1 );
//CAtlMap<CString, size_t>::CPair* pNamePair = mNamePair.Lookup( oName.m_strFilename );
std::map<CString, size_t>::const_iterator pNamePair = mNamePair.find ( oName.m_strFilename );
if (pNamePair == mNamePair.end())
mNamePair [oName.m_strFilename] = 1 ;
else
oName = oName + pNamePair->m_key;
OOX::CSystemUtility::CreateDirectories( oCurrent / oDefDir );
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
{
oRels.Registration( pPair->m_key, pExt );
oRels.Registration( it->first /*pPair->m_key*/, pExt );
}
}
}
}
......
......@@ -30,7 +30,8 @@ namespace OOX
}
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;
protected:
......@@ -87,4 +88,4 @@ namespace OOX
} // namespace OOX
#endif // OOX_XLSXIFILE_CONTAINER_INCLUDE_H_
\ No newline at end of file
#endif // OOX_XLSXIFILE_CONTAINER_INCLUDE_H_
......@@ -862,8 +862,9 @@ namespace OOX
XmlUtils::CXmlNode oAbstractNumNode;
if ( oAbstractNumList.GetAt( nIndex, oAbstractNumNode ) )
{
OOX::Numbering::CAbstractNum oAbstractNum = oAbstractNumNode;
m_arrAbstractNum.Add( oAbstractNum );
//OOX::Numbering::CAbstractNum oAbstractNum = oAbstractNumNode;
m_arrAbstractNum.push_back( /*oAbstractNum*/ new OOX::Numbering::CAbstractNum (oAbstractNumNode) );
}
}
......@@ -875,8 +876,8 @@ namespace OOX
XmlUtils::CXmlNode oNumNode;
if ( oNumList.GetAt( nIndex, oNumNode ) )
{
OOX::Numbering::CNum oNum = oNumNode;
m_arrNum.Add( oNum );
//OOX::Numbering::CNum oNum = oNumNode;
m_arrNum.push_back( /*oNum*/ new OOX::Numbering::CNum (oNumNode) );
}
}
......@@ -894,8 +895,8 @@ namespace OOX
XmlUtils::CXmlNode oNumNode;
if ( oNumPicList.GetAt( nIndex, oNumNode ) )
{
OOX::Numbering::CNumPicBullet oNum = oNumNode;
m_arrNumPicBullet.Add( oNum );
//OOX::Numbering::CNumPicBullet oNum = oNumNode;
m_arrNumPicBullet.push_back( /*oNum*/ new OOX::Numbering::CNumPicBullet (oNumNode) );
}
}
}
......@@ -962,4 +963,4 @@ namespace OOX
};
} // namespace OOX
#endif // OOX_NUMBERING_FILE_INCLUDE_H_
\ No newline at end of file
#endif // OOX_NUMBERING_FILE_INCLUDE_H_
......@@ -202,8 +202,9 @@ namespace OOX
{
if ( oNodes.GetAt( nIndex, oRelNode ) )
{
Rels::CRelationShip oRel = oRelNode;
m_arrRelations.Add( oRel );
//Rels::CRelationShip oRel = oRelNode;
Rels::CRelationShip *oRel = new Rels::CRelationShip (oRelNode);
m_arrRelations.push_back( oRel );
}
}
}
......
......@@ -28,18 +28,18 @@ namespace SimpleTypes
virtual EOptimizeForBrowserTarget FromString(CString &sValue)
{
if ( _T("W3C XHTML+CSS1") == sValue ) m_eValue = optforbrowserXhtmlCSS1;
else if ( _T("W3C HTML4+CSS1") == sValue ) m_eValue = optforbrowserHtml4CSS1;
else if ( _T("W3C XHTML+CSS2") == sValue ) m_eValue = optforbrowserXhtmlCSS2;
else if ( _T("W3C HTML4+CSS2") == sValue ) m_eValue = optforbrowserHtml4CSS2;
else m_eValue = eDefValue;
if ( _T("W3C XHTML+CSS1") == sValue ) this->m_eValue = optforbrowserXhtmlCSS1;
else if ( _T("W3C HTML4+CSS1") == sValue ) this->m_eValue = optforbrowserHtml4CSS1;
else if ( _T("W3C XHTML+CSS2") == sValue ) this->m_eValue = optforbrowserXhtmlCSS2;
else if ( _T("W3C HTML4+CSS2") == sValue ) this->m_eValue = optforbrowserHtml4CSS2;
else this->m_eValue = eDefValue;
return m_eValue;
return this->m_eValue;
}
virtual CString ToString() const
{
switch(m_eValue)
switch(this->m_eValue)
{
case optforbrowserXhtmlCSS1 : return _T("W3C XHTML+CSS1");
case optforbrowserHtml4CSS1 : return _T("W3C HTML4+CSS1 ");
......
......@@ -806,8 +806,8 @@ namespace OOX
XmlUtils::CXmlNode oStyleNode;
if ( oStyleList.GetAt( nStlyeIndex, oStyleNode ) )
{
OOX::CStyle oStyle = oStyleNode;
m_arrStyle.Add( oStyle );
//OOX::CStyle oStyle = oStyleNode;
m_arrStyle.push_back( /*oStyle*/ new OOX::CStyle (oStyleNode) );
}
}
}
......@@ -857,4 +857,4 @@ namespace OOX
};
} // namespace OOX
#endif // OOX_STYLES_INCLUDE_H_
\ No newline at end of file
#endif // OOX_STYLES_INCLUDE_H_
......@@ -7,6 +7,7 @@
#include "../Drawing/DrawingStyles.h"
#include "../Drawing/DrawingShared.h"
#include "../../SystemUtility/SystemUtility.h"
namespace OOX
{
......@@ -180,4 +181,4 @@ namespace OOX
};
} // namespace OOX
#endif // OOX_THEME_THEME_INCLUDE_H_
\ No newline at end of file
#endif // OOX_THEME_THEME_INCLUDE_H_
......@@ -48,6 +48,18 @@ namespace OOX
Normalize();
return *this;
}
CPath& CPath::operator=(LPCSTR oSrc)
{
m_strFilename = oSrc;
Normalize();
return *this;
}
CPath& CPath::operator=(LPCWSTR oSrc)
{
m_strFilename = oSrc;
Normalize();
return *this;
}
AVSINLINE CString CPath::GetExtention(bool bIsPoint) const
{
......
......@@ -19,6 +19,8 @@ namespace OOX
CPath& operator=(const CPath& oSrc);
CPath& operator=(const CString& oSrc);
CPath& operator=(LPCSTR oSrc);
CPath& operator=(LPCWSTR oSrc);
friend CPath operator/(const CPath& path1, const CPath& path2)
{
......
......@@ -4,7 +4,9 @@
#include "../Base/Nullable.h"
//#include "../SystemUtility/File.h"
//#include "../SystemUtility/FileSystem/Directory.h"
#include "../../../DesktopEditor/common/File.h"
//#include "../../../DesktopEditor/common/Directory.h"
#include "../SystemUtility/SystemUtility.h"
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