Commit 4fcc2101 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

X2t Converter подключение txt &ppt

fix bugs ppt

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62503 954022d7-b5bf-4e40-9824-e11837661b57
parent 009f2b44
......@@ -20,17 +20,17 @@ COfficePPTFile::~COfficePPTFile()
CloseFile();
}
bool COfficePPTFile::OpenFile(CString sFileName)
bool COfficePPTFile::OpenFile(std::wstring sFileName)
{
CloseFile();
POLE::Storage *pStgFrom = new POLE::Storage(sFileName);
POLE::Storage *pStgFrom = new POLE::Storage(sFileName.c_str());
if (pStgFrom == NULL) return FALSE;
pStgFrom->open(false,false);
m_pReader = new CPPTFileReader(pStgFrom, m_strTempDirectory);
((CPPTFileReader*)m_pReader)->m_oDocumentInfo.m_strFileDirectory = GetDirectory(sFileName);
((CPPTFileReader*)m_pReader)->m_oDocumentInfo.m_strFileDirectory = GetDirectory(sFileName.c_str());
if (!((CPPTFileReader*)m_pReader)->IsPowerPoint())
{
......@@ -54,11 +54,11 @@ bool COfficePPTFile::CloseFile()
m_pReader = NULL;
return S_OK;
}
HRESULT COfficePPTFile::LoadFromFile(CString sSrcFileName, CString sDstPath, CString sXMLOptions)
HRESULT COfficePPTFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath)
{
if (m_strTempDirectory.GetLength() < 1)
if (m_strTempDirectory.length() < 1)
{
m_strTempDirectory = FileSystem::Directory::GetTempPath();
m_strTempDirectory = FileSystem::Directory::GetTempPath().GetBuffer();
}
bool bRes = OpenFile(sSrcFileName);
......@@ -78,40 +78,20 @@ HRESULT COfficePPTFile::LoadFromFile(CString sSrcFileName, CString sDstPath, CSt
if (m_strEditorXml.GetLength() <1) return S_FALSE;
if (sDstPath.GetLength() > 0)
if (sDstPath.length() > 0)
{
bool bNeedPPTXFile = false;
#if !(defined(_WIN32) || defined (_WIN64)) || defined(_DEBUG)
bNeedPPTXFile = true;
#endif
NSPresentationEditor::CDocument oPresentationEditor;
NSPresentationEditor::CPPTXWriter oPPTXWriter;
oPresentationEditor.LoadFromXML(m_strEditorXml);
oPPTXWriter.m_strTempDirectory = sDstPath;
oPPTXWriter.m_strTempDirectory = std_string2string(sDstPath);
if (bNeedPPTXFile)
{
oPPTXWriter.m_strTempDirectory = FileSystem::Directory::CreateDirectoryWithUniqueName(m_strTempDirectory);
}
oPPTXWriter.CreateFile(&oPresentationEditor);
oPPTXWriter.CloseFile();
if (bNeedPPTXFile)
{
COfficeUtils oOfficeUtils(NULL);
std::wstring bstrSrcPath = string2std_string(oPPTXWriter.m_strTempDirectory);
std::wstring bstrDstPath = string2std_string(sDstPath);
oOfficeUtils.CompressFileOrDirectory( bstrSrcPath, bstrDstPath, -1 );
FileSystem::Directory::DeleteDirectory(oPPTXWriter.m_strTempDirectory);
}
}
//CloseFile(); нельзя тута- поскольку в Win32 используется PresentationEditor для конвертации xml -> pptx
......
......@@ -32,27 +32,27 @@ private:
std::vector<CString> m_arUserSources;
CString m_strEditorXml;
CString m_strTempDirectory;
std::wstring m_strTempDirectory;
public:
HRESULT put_TempDirectory(CString sDir)
HRESULT put_TempDirectory(std::wstring sDir)
{
m_strTempDirectory = sDir;
return S_OK;
}
CString get_TempDirectory()
std::wstring get_TempDirectory()
{
return m_strTempDirectory;
}
HRESULT LoadFromFile(CString sSrcFileName, CString sDstPath, CString sXMLOptions);
HRESULT LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath);
HRESULT GetAdditionalParam (CString sParamName, VARIANT* ParamValue);
private:
bool OpenFile(CString sFileName);
bool OpenFile(std::wstring sFileName);
bool CloseFile();
......
......@@ -88,7 +88,7 @@ public:
m_arUsers[i]->FromDocument();
}
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
SaveXmlInfo();
#endif
}
......
......@@ -12,10 +12,10 @@
typedef BYTE BOOL1;
#define PSFLAG_CONTAINER 0xFF
#ifdef _DEBUG
#define PPT_DUMP_LOG FALSE // TRUE - xml
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
#define PPT_DUMP_LOG FALSE // TRUE - xml
#else
#define PPT_DUMP_LOG FALSE //
#define PPT_DUMP_LOG FALSE //
#endif
#define PPT_DEFAULT_SLIDE_DURATION 5000
......
......@@ -6,10 +6,6 @@
#include "../../Reader/Records.h"
#include "../../../../ASCPresentationEditor/OfficeDrawing/Document.h"
#ifdef _DEBUG
#define _DEBUG_LOG // _DEBUG_LOG
#endif
#define __USE_ANIMATION__
#define CHECK_RECORD_3X(VER,INSTANCE,TYPE) ATLASSERT(m_oHeader.RecVersion==##VER&&m_oHeader.RecInstance==##INSTANCE&&m_oHeader.RecType==##TYPE);
......@@ -30,7 +26,7 @@ namespace debug
inline static void trace (CString& str)
{
#if defined(_WIN32) || defined (_WIN64)
ATLTRACE (_T("%s\n"), str);
ATLTRACE (_T("%ls\n"), str);
#endif
}
};
......@@ -332,7 +328,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
buildType = StreamUtils::ReadDWORD ( pStream );
......@@ -345,9 +341,8 @@ namespace Animations
fUIExpanded = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x0 && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == RT_BuildAtom && m_oHeader.RecLen == 0x00000010; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -384,7 +379,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
paraBuild = StreamUtils::ReadDWORD ( pStream );
......@@ -400,9 +395,8 @@ namespace Animations
delayTime = StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x1 && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == RT_ParaBuildAtom && m_oHeader.RecLen == 0x00000010; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -451,15 +445,14 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
level = StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x0 && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == RT_LevelInfoAtom && m_oHeader.RecLen == 0x00000004; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -514,7 +507,7 @@ namespace Animations
{
m_oHeader = thisHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
CHECK_RECORD_3X(0xF,0x0,RT_ParaBuild);
#endif
SRecordHeader oHeader;
......@@ -604,7 +597,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
CHECK_RECORD_3X(0xF,0x0,RT_BuildList);
#endif
LONG lPos = 0;
......@@ -700,7 +693,6 @@ namespace Animations
StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -708,7 +700,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000002;
}
#endif
virtual CString ToString()
{
......@@ -738,7 +729,6 @@ namespace Animations
m_Value = ( 0x1 == StreamUtils::ReadBYTE ( pStream ) );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -746,8 +736,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000002;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -780,7 +768,6 @@ namespace Animations
m_Value = StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -788,8 +775,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000005;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -822,7 +807,6 @@ namespace Animations
m_Value = StreamUtils::ReadFLOAT ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -830,8 +814,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000005;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -860,7 +842,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
......@@ -884,7 +866,6 @@ namespace Animations
}
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -892,7 +873,6 @@ namespace Animations
// && m_oHeader.RecLen % 2 == 0x00000001;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -937,7 +917,6 @@ namespace Animations
}
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0xF &&
......@@ -945,8 +924,6 @@ namespace Animations
m_oHeader.RecInstance == 0x001;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -977,7 +954,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
// LONG lPos = 0; StreamUtils::StreamPosition(lPos, pStream);
......@@ -1018,9 +995,8 @@ namespace Animations
// StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x0 && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == 0xF127 && m_oHeader.RecLen == 0x00000020; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -1062,7 +1038,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
// LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -1082,7 +1058,6 @@ namespace Animations
// StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -1091,8 +1066,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000014;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -1456,7 +1429,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
LONG lPos = 0;
......@@ -1531,7 +1504,8 @@ namespace Animations
case TL_TPID_ZoomToFullScreen :
pRecord = new TimeZoomToFullScreen ();
break;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
default : assert (0);
break;
#endif
......@@ -1572,14 +1546,13 @@ namespace Animations
StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0xF &&
m_oHeader.RecInstance == 0x0 &&
m_oHeader.RecType == 0xF13D;
}
#endif
inline bool IsEmpty ()
{
return m_nEmtyNode;
......@@ -1656,7 +1629,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -1664,14 +1637,12 @@ namespace Animations
StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0xF &&
m_oHeader.RecInstance == 0x0 &&
m_oHeader.RecType == 0xF13D;
}
#endif
void ClearNodes ()
{
}
......@@ -1704,7 +1675,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
m_Type = (TimeVisualElementEnum) StreamUtils::ReadDWORD ( pStream );
......@@ -1714,7 +1685,6 @@ namespace Animations
m_nData2 = StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -1723,7 +1693,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000014;
}
#endif
virtual CString ToString()
{
......@@ -1769,13 +1738,12 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
m_Type = (TimeVisualElementEnum) StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -1784,7 +1752,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000004;
}
#endif
virtual CString ToString()
{
......@@ -1819,7 +1786,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
// LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -1843,7 +1810,6 @@ namespace Animations
// StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0xF &&
......@@ -1851,8 +1817,6 @@ namespace Animations
m_oHeader.RecType == 0xF13C;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -1887,7 +1851,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
// LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -1904,7 +1868,6 @@ namespace Animations
// StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -1913,8 +1876,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000010;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -1970,7 +1931,7 @@ namespace Animations
havePropertyList = false;
haveStringList = false;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -2068,9 +2029,8 @@ namespace Animations
//StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0xF && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == 0xF12A; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -2120,7 +2080,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
// LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -2137,7 +2097,6 @@ namespace Animations
// StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -2146,8 +2105,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000008;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -2184,7 +2141,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
// LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -2230,7 +2187,6 @@ namespace Animations
// StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0xF &&
......@@ -2238,7 +2194,6 @@ namespace Animations
m_oHeader.RecType == 0xF12D;
}
#endif
virtual CString ToString()
{
......@@ -2280,7 +2235,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
m_TriggerObject = ( TriggerObjectEnum )StreamUtils::ReadDWORD ( pStream );
......@@ -2290,7 +2245,6 @@ namespace Animations
m_nTimeDelay = StreamUtils::ReadLONG ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -2299,8 +2253,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000010;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -2333,7 +2285,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
// LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -2356,7 +2308,6 @@ namespace Animations
// StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0xF &&
......@@ -2364,7 +2315,6 @@ namespace Animations
m_oHeader.RecType == 0xF125;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -2399,7 +2349,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
iterateInterval = StreamUtils::ReadDWORD ( pStream );
......@@ -2415,9 +2365,8 @@ namespace Animations
fIterateIntervalTypePropertyUsed = ( 0x08 == ( 0x08 & ((BYTE)Value) ) );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x0 && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == RT_TimeIterateData && m_oHeader.RecLen == 0x00000014; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -2461,9 +2410,7 @@ namespace Animations
{
virtual void ReadFromStream ( SRecordHeader & oHeader, POLE::Stream* pStream )
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
DWORD Value = StreamUtils::ReadDWORD ( pStream );
......@@ -2486,7 +2433,6 @@ namespace Animations
m_nBehaviorOrigin = StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -2495,7 +2441,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000020;
}
#endif
virtual CString ToString()
{
......@@ -2552,7 +2497,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -2583,7 +2528,6 @@ namespace Animations
//StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0xF &&
......@@ -2591,8 +2535,6 @@ namespace Animations
m_oHeader.RecType == 0xF12E;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -2632,7 +2574,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
DWORD Value = StreamUtils::ReadDWORD ( pStream );
......@@ -2643,7 +2585,6 @@ namespace Animations
m_ValueType = (TimeAnimateBehaviorValueTypeEnum)StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -2651,7 +2592,6 @@ namespace Animations
m_oHeader.RecType == 0xF13A &&
m_oHeader.RecLen == 0x00000008;
}
#endif
virtual CString ToString()
{
......@@ -2684,7 +2624,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
......@@ -2706,9 +2646,9 @@ namespace Animations
StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0xF && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == RT_TimeSetBehaviorContainer; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -2747,7 +2687,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
m_nCalcMode = StreamUtils::ReadDWORD ( pStream );
......@@ -2764,7 +2704,6 @@ namespace Animations
m_ValueType = (TimeAnimateBehaviorValueTypeEnum)StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -2772,7 +2711,6 @@ namespace Animations
m_oHeader.RecType == 0xF134 &&
m_oHeader.RecLen == 0x0000000C;
}
#endif
virtual CString ToString()
{
......@@ -2817,13 +2755,12 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
m_nTime = StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -2831,7 +2768,6 @@ namespace Animations
m_oHeader.RecType == 0xF143 &&
m_oHeader.RecLen == 0x00000004;
}
#endif
virtual CString ToString()
{
......@@ -2904,7 +2840,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
LONG lPos = 0;
......@@ -2932,14 +2868,12 @@ namespace Animations
StreamUtils::StreamSeek ( lPos + m_oHeader.RecLen, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0xF &&
m_oHeader.RecInstance == 0x0 &&
m_oHeader.RecType == 0xF13F;
}
#endif
virtual CString ToString()
{
......@@ -2970,7 +2904,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
SRecordHeader ReadHeader;
......@@ -3006,14 +2940,13 @@ namespace Animations
m_oBehavior.ReadFromStream ( ReadHeader, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0xF &&
m_oHeader.RecInstance == 0x0 &&
m_oHeader.RecType == 0xF12B;
}
#endif
virtual CString ToString()
{
......@@ -3072,7 +3005,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
DWORD src = StreamUtils::ReadDWORD ( pStream );
......@@ -3089,9 +3022,9 @@ namespace Animations
rotationDirection = StreamUtils::ReadDWORD ( pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x0 && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == 0xF138 && m_oHeader.RecLen == 0x00000014; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -3133,7 +3066,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
SRecordHeader ReadHeader;
......@@ -3145,9 +3078,8 @@ namespace Animations
behavior.ReadFromStream ( ReadHeader, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0xF && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == 0xF12F; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -3178,7 +3110,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
DWORD src = StreamUtils::ReadDWORD ( pStream );
......@@ -3199,9 +3131,9 @@ namespace Animations
fZoomContents = ( 0x01 == ( 0x01 & ((BYTE)src) ) );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x0 && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == 0xF139 && m_oHeader.RecLen == 0x00000020; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -3250,7 +3182,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
SRecordHeader ReadHeader;
......@@ -3262,9 +3194,9 @@ namespace Animations
behavior.ReadFromStream ( ReadHeader, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0xF && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == 0xF130; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -3322,7 +3254,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
flag = StreamUtils::ReadDWORD ( pStream );
......@@ -3338,9 +3270,9 @@ namespace Animations
pStream->read ((unsigned char*) &colorTo , sizeof ( TimeAnimateColor ) );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x0 && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == RT_TimeColorBehavior && m_oHeader.RecLen == 0x00000034; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -3381,7 +3313,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
SRecordHeader ReadHeader;
......@@ -3392,9 +3324,9 @@ namespace Animations
behavior.ReadFromStream (ReadHeader, pStream );
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0xF && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == RT_TimeColorBehaviorContainer; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -3426,16 +3358,16 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
type = StreamUtils::ReadDWORD(pStream);
value = StreamUtils::ReadFLOAT(pStream);
}
#ifdef _DEBUG
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x0 && m_oHeader.RecType == RT_TimeModifierAtom && m_oHeader.RecLen == 0x00000008; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -3500,7 +3432,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
SRecordHeader rHeader;
......@@ -3567,16 +3499,15 @@ namespace Animations
}
}
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE ( _T("SlaveContainer : UNKNOW RECORD : 0x%x\n"), nRecord );
#endif
StreamUtils::StreamSkip ( ReadHeader.RecLen, pStream );
}
}
#ifdef _DEBUG
virtual bool IsCorrect() { return m_oHeader.RecVersion == 0xF && m_oHeader.RecInstance == 0x01 && m_oHeader.RecType == 0xF145; }
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -3686,7 +3617,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
CHECK_RECORD_3X (0xF,0x01,RT_TimeExtTimeNodeContainer);
#endif
LONG lPos = 0;
......@@ -3897,7 +3828,7 @@ namespace Animations
continue;
}
}
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE ( _T("ExtTimeNodeContainer : UNKNOW RECORD : 0x%x\n"), nRecord );
#endif
StreamUtils::StreamSkip ( ReadHeader.RecLen, pStream );
......@@ -4043,7 +3974,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
pStream->read ((unsigned char*) &m_FileTime, sizeof ( FILETIME ) );
......@@ -4055,7 +3986,6 @@ namespace Animations
#endif
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -4064,7 +3994,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000008;
}
#endif
virtual CString ToString()
{
......@@ -4094,7 +4023,7 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
DWORD Value = 0L;
......@@ -4104,7 +4033,6 @@ namespace Animations
m_bOverrideMasterAnimation = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -4113,8 +4041,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000004;
}
#endif
virtual CString ToString()
{
XmlUtils::CXmlWriter oWriter;
......@@ -4144,14 +4070,13 @@ namespace Animations
{
m_oHeader = oHeader;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
assert ( IsCorrect () );
#endif
DWORD Value;
pStream->read ( (unsigned char*) &Value, sizeof ( DWORD ) );
}
#ifdef _DEBUG
virtual bool IsCorrect ( )
{
return m_oHeader.RecVersion == 0x0 &&
......@@ -4160,7 +4085,6 @@ namespace Animations
m_oHeader.RecLen == 0x00000004;
}
#endif
virtual CString ToString()
{
......@@ -4234,14 +4158,14 @@ namespace Animations
m_nDuration = (std::max) ( m_nDuration, m_oTop.dTime + m_oTop.dDuration );
#ifdef _DEBUG_LOG_
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE ( _T("Push : %d, begin : %d, duration : %d\n"), nType, (int)m_oTop.dTime, (int)m_oTop.dDuration );
#endif
}
inline void Pop ()
{
#ifdef _DEBUG_LOG_
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE ( _T("Pop \n") );
#endif
if ( (int)m_arrEffects.size() )
......@@ -4376,7 +4300,7 @@ namespace Animations
{
Clear ();
#ifdef _DEBUG_LOG
#if defined(_DEBUG_LOG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE(_T("======================================== Slide ========================================\n"));
#endif
m_bSaveEffect = false;
......@@ -4388,7 +4312,7 @@ namespace Animations
UpdateParagraph ();
#ifdef _DEBUG_LOG
#if defined(_DEBUG_LOG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE(_T("duration : %f,\n"), GetTime () );
ATLTRACE(_T("=======================================================================================\n"));
#endif
......@@ -4497,8 +4421,8 @@ namespace Animations
m_bSaveEffect = true;
}
#ifdef _DEBUG_LOG
// ATLTRACE ( _T("idObj : %d, effect : %s\t\t"), nID, Helpers::GetEffectNameByID ( m_oTopEffect.m_nEffectType, m_oTopEffect.m_nEffectID ) );
#if defined(_DEBUG_LOG) && (defined(_WIN32) || defined(_WIN64))
// ATLTRACE ( _T("idObj : %d, effect : %ls\t\t"), nID, Helpers::GetEffectNameByID ( m_oTopEffect.m_nEffectType, m_oTopEffect.m_nEffectID ) );
// ATLTRACE ( _T("dbg - NodeType : %d, count : %d\n"), nNodeType, (int)pNode->rgExtTimeNodeChildren.size() );
#endif
}
......@@ -4616,7 +4540,8 @@ namespace Animations
oEffect.m_bRemoveEmptyBlocks = true; // ALWAYS
EffectToMap (oEffect);
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
//ATLTRACE ( _T("REF : %d, EffectType : %d, EffectID : %d, EffectDir : %d, Group : %d, Begin : %f, Dur : %f, ShapeIgnore : %d, TextBlock : %d\n"),
// oEffect.m_nRefID, oEffect.m_nEffectType, oEffect.m_nEffectID, oEffect.m_nEffectDir, oEffect.m_nEffectNodeType, oEffect.m_nBeginTime, oEffect.m_nDuration, oEffect.m_bIgnoreShape, oEffect.m_nTextSequence);
ATLTRACE (_T("REF : %d, [ %f, %f ]\n"), oEffect.m_nRefID, oEffect.m_nBeginTime, oEffect.m_nDuration);
......@@ -4924,7 +4849,8 @@ namespace Animations
if (oEffect.m_nTextSequence == m_arParIndexer.at(ind))
{
oEffect.m_nTextSequence = ind;
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
//ATLTRACE ( _T("REF : %d, EffectType : %d, EffectID : %d, EffectDir : %d, Group : %d, Begin : %f, Dur : %f, ShapeIgnore : %d, TextBlock : %d\n"),
// oEffect.m_nRefID, oEffect.m_nEffectType, oEffect.m_nEffectID, oEffect.m_nEffectDir, oEffect.m_nEffectNodeType, oEffect.m_nBeginTime, oEffect.m_nDuration, oEffect.m_bIgnoreShape, oEffect.m_nTextSequence);
#endif
......
......@@ -68,7 +68,7 @@ public:
m_nRelVersion = StreamUtils::ReadDWORD(pStream);
m_strUNICODEUserName = StreamUtils::ReadCStringW(pStream, m_nLenUserName);
m_strUNICODEUserName = StreamUtils::ReadCStringW(pStream, m_nLenUserName );
}
virtual CString ToString()
......
......@@ -30,7 +30,37 @@ public:
{
m_oHeader = oHeader;
m_strFaceName = StreamUtils::ReadCStringW(pStream, 32);
//face name - utf16 string with 0, 64 bytes always allocated
unsigned char utf16FaceName[64+2] = {};
ULONG lReadByte = pStream->read(utf16FaceName, 64);
if (sizeof(wchar_t) == 4)
{
int lLen = 0;
for (lLen = 0; lLen < lReadByte; lLen +=2)
if (utf16FaceName[lLen] == 0)break;
lLen/=2;
UTF32 *pStrUtf32 = new UTF32 [lLen + 1];
pStrUtf32[lLen] = 0 ;
const UTF16 *pStrUtf16_Conv = (const UTF16 *) utf16FaceName;
UTF32 *pStrUtf32_Conv = pStrUtf32;
if (conversionOK == ConvertUTF16toUTF32 ( &pStrUtf16_Conv, &pStrUtf16_Conv[lLen]
, &pStrUtf32_Conv, &pStrUtf32 [lLen]
, strictConversion))
{
m_strFaceName = CString((wchar_t*)pStrUtf32, lLen);
}
delete [] pStrUtf32;
}
else
{
m_strFaceName = CString((wchar_t*)utf16FaceName, lReadByte/2);
}
m_lfCharSet = StreamUtils::ReadBYTE(pStream);
BYTE Mem = 0;
......
......@@ -49,7 +49,7 @@
#define RENDER_RTF_BOOL( prop, sResult, sName)\
if( 0 == prop )\
sResult.AppendFormat( _T("\\%s0"), sName );\
sResult.AppendFormat( _T("\\%ls0"), sName );\
else if( PROP_DEF != prop )\
sResult.AppendFormat( _T("\\%ls"), sName );
......@@ -638,7 +638,7 @@ private:
CString sTheme;
if( true == GetStringByTheme( sTheme, m_eTheme ) )
{
sResult.AppendFormat(_T("theme%sColor = \"%ls\" theme%sShade = \"%d\" theme%sTint = \"%d\""),
sResult.AppendFormat(_T("theme%lsColor = \"%ls\" theme%lsShade = \"%d\" theme%lsTint = \"%d\""),
sParam.GetBuffer(), sTheme.GetBuffer(), sParam.GetBuffer(), m_byteShade ,sParam.GetBuffer(), m_byteTint);
}
}
......
......@@ -366,7 +366,7 @@ namespace NSPresentationEditor
CString element;
element.Format ( _T("<VideoStream left='%d' top='%d' right='%d' bottom='%d' angle='%f' loop='%d' ")
_T(" widthmetric='%d' heightmetric='%d' ")
_T(" file='%s' begin='%f' end='%f' >"),
_T(" file='%ls' begin='%f' end='%f' >"),
(LONG)m_rcBounds.left, (LONG)m_rcBounds.top, (LONG)m_rcBounds.right, (LONG)m_rcBounds.bottom, m_dRotate, m_bLoop,
m_oMetric.m_lMillimetresHor, m_oMetric.m_lMillimetresVer,
strFileName, m_dClipStartTime, m_dClipEndTime );
......@@ -407,7 +407,7 @@ namespace NSPresentationEditor
CorrectXmlString(strFileName);
CString source;
source.Format(_T("<Source StartTime='%lf' EndTime='%lf' FilePath='%s'/>"), m_dClipStartTime, m_dClipEndTime, strFileName);
source.Format(_T("<Source StartTime='%lf' EndTime='%lf' FilePath='%ls'/>"), m_dClipStartTime, m_dClipEndTime, strFileName);
element += source;
CString animations;
......@@ -480,7 +480,7 @@ namespace NSPresentationEditor
lFlags |= 0x0002;
CString strEffect = _T("");
strEffect.Format(_T("<ImagePaint-DrawImageFromFile left='%d' top='%d' right='%d' bottom='%d' angle='%lf' flags='%d' filepath='%s' metric='0' backcolor='-1' scaletype='-1' scalecolor='255' widthmetric='%d' heightmetric='%d'>\
strEffect.Format(_T("<ImagePaint-DrawImageFromFile left='%d' top='%d' right='%d' bottom='%d' angle='%lf' flags='%d' filepath='%ls' metric='0' backcolor='-1' scaletype='-1' scalecolor='255' widthmetric='%d' heightmetric='%d'>\
<timeline type='1' begin='%lf' end='%lf' fadein='0' fadeout='0' completeness='1.0' /></ImagePaint-DrawImageFromFile>"),
(LONG)m_rcBounds.left, (LONG)m_rcBounds.top, (LONG)m_rcBounds.right, (LONG)m_rcBounds.bottom,
m_dRotate, lFlags, m_strFileName,
......@@ -499,7 +499,7 @@ namespace NSPresentationEditor
lFlags |= 0x0002;
CString strEffect = _T("");
strEffect.Format(_T("<ImagePaint-DrawImageFromFile left='%d' top='%d' right='%d' bottom='%d' angle='%lf' flags='%d' filepath='%s' metric='0' backcolor='-1' scaletype='-1' scalecolor='255' widthmetric='%d' heightmetric='%d'>\
strEffect.Format(_T("<ImagePaint-DrawImageFromFile left='%d' top='%d' right='%d' bottom='%d' angle='%lf' flags='%d' filepath='%ls' metric='0' backcolor='-1' scaletype='-1' scalecolor='255' widthmetric='%d' heightmetric='%d'>\
<timeline type='1' begin='%lf' end='%lf' fadein='0' fadeout='0' completeness='1.0' /></ImagePaint-DrawImageFromFile>"),
(LONG)m_rcBounds.left, (LONG)m_rcBounds.top, (LONG)m_rcBounds.right, (LONG)m_rcBounds.bottom,
m_dRotate, lFlags, m_strFileName,
......@@ -1603,7 +1603,7 @@ namespace NSPresentationEditor
CorrectXmlString(strFileName);
CString source;
source.Format(_T("<Source StartTime='%lf' EndTime='%lf' FilePath='%s' loop='%d' />"), m_dClipStartTime, m_dClipEndTime, strFileName, m_bLoop);
source.Format(_T("<Source StartTime='%lf' EndTime='%lf' FilePath='%ls' loop='%d' />"), m_dClipStartTime, m_dClipEndTime, strFileName, m_bLoop);
element += source;
CString animations;
......
......@@ -947,7 +947,7 @@ namespace SVG
PathParser& oPath = element->GetPath ();
for (long i = 0; i < (long)element->GetSize (); ++i)
{
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
WCHAR Code = element->GetCode(i);
#endif
if (_T('Z') == element->GetCode(i) || _T('z') == element->GetCode(i))
......@@ -1301,7 +1301,7 @@ namespace SVG
for (long i = 0; i < (long)element->GetSize (); ++i)
{
#ifdef _DEBUG
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
WCHAR Code = element->GetCode (i);
#endif
if ( _T('Z') == element->GetCode (i) || _T('z') == element->GetCode (i) )
......@@ -2549,7 +2549,7 @@ namespace SVG
// m_render->DrawImage(m_pFrame, t.X - Width * mul.X, t.Y, Width * mul.X, Height * mul.Y);
// }
// m_sLivePath.Format (_T("%s\\%s.png"), FileUtils::GetTempFolder(), m_pattern->nodeId());
// m_sLivePath.Format (_T("%ls\\%ls.png"), FileUtils::GetTempFolder(), m_pattern->nodeId());
// SaveImage(m_pPatternFrame, m_sLivePath);
// }
......
......@@ -2700,7 +2700,7 @@ namespace SVG
CString Source = path.Tokenize ( Tokens, To );
// ATLTRACE ( _T("%c : - %s\n"), symbol, Source );
// ATLTRACE ( _T("%c : - %ls\n"), symbol, Source );
std::vector<double> Values;
if (StrUtils::DoubleValues(Source, Values))
......@@ -2881,7 +2881,7 @@ namespace SVG
CString Source = path.Tokenize ( Tokens, To );
// ATLTRACE ( _T("%c : - %s\n"), symbol, Source );
// ATLTRACE ( _T("%c : - %ls\n"), symbol, Source );
std::vector<double> Values;
if (StrUtils::DoubleValues(Source, Values))
......@@ -3200,7 +3200,7 @@ namespace SVG
{
if (0 == m_sXml.GetLength())
{
m_sXml.Format(_T("<linearGradient x1='%f' y1='%f' x2='%f' y2='%f' gradientUnits ='%s' gradientTransform='matrix(%f, %f, %f, %f, %f, %f)' sourceType='svg' >"),
m_sXml.Format(_T("<linearGradient x1='%f' y1='%f' x2='%f' y2='%f' gradientUnits ='%ls' gradientTransform='matrix(%f, %f, %f, %f, %f, %f)' sourceType='svg' >"),
m_begin.X, m_begin.Y, m_end.X, m_end.Y, m_gradientUnits,
m_gradientTransform[0], m_gradientTransform[1],
m_gradientTransform[3], m_gradientTransform[4],
......@@ -3316,7 +3316,7 @@ namespace SVG
{
if (0 == m_sXml.GetLength())
{
m_sXml.Format(_T("<radialGradient cx='%f' cy='%f' fx='%f' fy='%f' r='%f' gradientUnits='%s' gradientTransform='matrix(%f, %f, %f, %f, %f, %f)' sourceType='svg' >"),
m_sXml.Format(_T("<radialGradient cx='%f' cy='%f' fx='%f' fy='%f' r='%f' gradientUnits='%ls' gradientTransform='matrix(%f, %f, %f, %f, %f, %f)' sourceType='svg' >"),
m_c.X, m_c.Y, m_f.X, m_f.Y, m_R,
m_gradientUnits,
m_gradientTransform[0], m_gradientTransform[1],
......@@ -3406,8 +3406,8 @@ namespace SVG
// link
virtual bool RefreshXLinkSource (IRefStorage* pStorage)
{
#ifdef _DEBUG
// ATLTRACE (L"NOT IMPLEMENTED - RefreshXLinkSource: id - %s\n", nodeId());
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
// ATLTRACE (L"NOT IMPLEMENTED - RefreshXLinkSource: id - %ls\n", nodeId());
#endif
return false;
}
......@@ -4097,7 +4097,7 @@ namespace SVG
// GetSystemTime ( &oTime );
// CString fileName;
// fileName.Format (_T("%s\\%d%d%d%d%d%d%s"), sTempPath, oTime.wYear, oTime.wDay, oTime.wHour, oTime.wMinute, oTime.wSecond, oTime.wMilliseconds, strExts );
// fileName.Format (_T("%ls\\%d%d%d%d%d%d%ls"), sTempPath, oTime.wYear, oTime.wDay, oTime.wHour, oTime.wMinute, oTime.wSecond, oTime.wMilliseconds, strExts );
// CImageManager::CopyFile(strInput, fileName, NULL, NULL);
......@@ -4316,7 +4316,7 @@ namespace SVG
{
m_pRefLink = pRefLink;
// ATLTRACE(_T("RefLink for object : %s - %s\n"), nodeId(), m_pRefLink->nodeId());
// ATLTRACE(_T("RefLink for object : %ls - %ls\n"), nodeId(), m_pRefLink->nodeId());
return true;
}
......@@ -4523,8 +4523,9 @@ namespace SVG
{
if (L"clipPath" == oXml.GetName ())
return false;
#ifdef _DEBUG
ATLTRACE (L"[svg] ClipPath-NodeName : %s\n", oXml.GetName());
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE (L"[svg] ClipPath-NodeName : %ls\n", oXml.GetName());
#endif
DrawElement* pClip = m_oBuilder.Build (oXml.GetName());
......@@ -4675,8 +4676,8 @@ namespace SVG
}
inline bool Load(XmlUtils::CXmlNode& oXml)
{
#ifdef _DEBUG
ATLTRACE (L"[svg] Pattern-NodeName : %s\n", oXml.GetName());
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE (L"[svg] Pattern-NodeName : %ls\n", oXml.GetName());
#endif
DrawElement* element = m_oBuilder.Build (oXml.GetName());
......@@ -4985,8 +4986,9 @@ namespace SVG
if (m_model->HashRef(pReference, true))
UpdateSymbol(pReference, oXml);
#ifdef _DEBUG
ATLTRACE(L"[svg] ref element (g) - : %s\n", strXmlNode);
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE(L"[svg] ref element (g) - : %ls\n", strXmlNode);
#endif
return true;
}
......@@ -5000,8 +5002,9 @@ namespace SVG
inline DrawElement* Create(XmlUtils::CXmlNode& oXml, bool bAddStorage = true)
{
CString strXmlNode = oXml.GetName();
#ifdef _DEBUG
ATLTRACE(L"[svg] render element (g) - : %s\n", strXmlNode);
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE(L"[svg] render element (g) - : %ls\n", strXmlNode);
#endif
DrawElement* element = m_oDrawBuilder.Build(strXmlNode);
if (element)
......@@ -5050,7 +5053,7 @@ namespace SVG
element->FromXml(oXml, m_oUs);
// ATLTRACE(L"GraphicsContainer : %s - push : %s\n", m_nodeId, oXmlNode.GetName());
// ATLTRACE(L"GraphicsContainer : %ls - push : %ls\n", m_nodeId, oXmlNode.GetName());
if (bAddStorage)
m_arrGroup.push_back(element);
......@@ -5223,8 +5226,8 @@ namespace SVG
const Style& style = pRef->GetStyle();
if (style.GetFillUrlRef().GetLength() && (NULL == style.GetFill()))
{
#ifdef _DEBUG
ATLTRACE (_T("[svg] NEED JOIN FILL STYLE : id - %s"), pRef->nodeId());
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE (_T("[svg] NEED JOIN FILL STYLE : id - %ls"), pRef->nodeId());
#endif
}
}
......@@ -5239,7 +5242,7 @@ namespace SVG
if (index > (long)m_arrGroup.size())
return NULL;
// ATLTRACE ( _T("get : %s\n"), m_arrGroup [nIndex]->nodeId () );
// ATLTRACE ( _T("get : %ls\n"), m_arrGroup [nIndex]->nodeId () );
return m_arrGroup [index];
}
......@@ -5249,7 +5252,7 @@ namespace SVG
}
virtual bool Push (ISvgRef* Elem)
{
// ATLTRACE ( _T("push : %s\n"), Elem->nodeId () );
// ATLTRACE ( _T("push : %ls\n"), Elem->nodeId () );
if (!Elem) return false;
m_arrGroup.push_back(Elem);
......@@ -5266,7 +5269,7 @@ namespace SVG
if (m_arrRef.end() == pPair)
{
ISvgRef* search = pPair->second;
//ATLTRACE(_T("IRefStorage - Hash : %s, %d\n"), element->nodeId(), element->nodeType());
//ATLTRACE(_T("IRefStorage - Hash : %ls, %d\n"), element->nodeId(), element->nodeType());
m_arrRef.insert(std::pair<CString, ISvgRef*>(element->nodeId(), element));
......@@ -5857,7 +5860,9 @@ namespace SVG
}
inline bool Explore (XmlUtils::CXmlNode& oXml)
{
CString strXmlNode = oXml.GetName(); // ATLTRACE ( L"%s\n", strXmlNode);
CString strXmlNode = oXml.GetName();
// ATLTRACE ( L"%ls\n", strXmlNode);
bool ExploreLayer = false;
bool readInnerNodes = true;
......@@ -5915,7 +5920,7 @@ namespace SVG
}
// ATLTRACE ( L"Node : %s\n", oXml.GetName() );
// ATLTRACE ( L"Node : %ls\n", oXml.GetName() );
ExploreLayer = true;
......@@ -6098,7 +6103,7 @@ namespace SVG
return false;
}
// ATLTRACE ( L"LoadElement : %s\n", strXmlNode );
// ATLTRACE ( L"LoadElement : %ls\n", strXmlNode );
if (m_model)
{
......@@ -6148,8 +6153,8 @@ namespace SVG
return false;
}
#ifdef _DEBUG
ATLTRACE (L"[svg] render element : %s\n", strXmlNode);
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE (L"[svg] render element : %ls\n", strXmlNode);
#endif
DrawElement* element = m_oDrawBuilder.Build (strXmlNode);
......
......@@ -426,7 +426,7 @@ namespace NSPresentationEditor
if (pTextElement->m_oShape.m_oText.m_bIsSlideFontRef && (0 <= lFontRef) && (lFontRef < (LONG)pTheme->m_arFonts.size()))
{
CString strRef = _T("");
strRef.Format(_T("s_font%d { font-index:%d;font-family:%s; }\n"),
strRef.Format(_T("s_font%d { font-index:%d;font-family:%ls; }\n"),
pTextElement->m_lID, lFontRef, pTheme->m_arFonts[lFontRef].Name);
strFontRefs += strRef;
}
......
......@@ -34,7 +34,7 @@ namespace NSPresentationEditor
{
CString strFormat = _T("");
strFormat.Format(_T(".font%u { font-family:%s;tmdocs_charset:%d;tmdocs_monospace:%d;tmdocs_panose:%s; }\n"),
strFormat.Format(_T(".font%u { font-family:%ls;tmdocs_charset:%d;tmdocs_monospace:%d;tmdocs_panose:%ls; }\n"),
i + 1, m_arFonts[i].Name, m_arFonts[i].Charset, m_arFonts[i].Monospace, m_arFonts[i].Panose);
oWriter.WriteString(strFormat);
......@@ -50,7 +50,7 @@ namespace NSPresentationEditor
{
CString strFormat = _T("");
strFormat.Format(_T(".font_d%u { font-family:%s; }\n"), i + 1, m_arFonts[i].Name);
strFormat.Format(_T(".font_d%u { font-family:%ls; }\n"), i + 1, m_arFonts[i].Name);
oWriter.WriteString(strFormat);
}
......
......@@ -324,7 +324,7 @@ namespace StreamUtils
{
lDWord = ((pMem[3] << 24) | (pMem[2] << 16) | (pMem[1] << 8) | pMem[0]);
}
return lDWord;
return 0xFFFFFFFF & lDWord;
}
static SHORT ReadSHORT(POLE::Stream* pStream)
{
......
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