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

X2tConverter добавлен PptFile

PptFile поправлен под iOs

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62409 954022d7-b5bf-4e40-9824-e11837661b57
parent 0c289e39
......@@ -37,7 +37,7 @@ INCLUDEPATH += \
/usr/include/libxml2 \
INCLUDEPATH += \
../../../../DesktopEditor/freetype-2.5.2/include
../../../DesktopEditor/freetype-2.5.2/include
LIBS += -lxml2
......@@ -161,38 +161,38 @@ HEADERS += \
../Records/Drawing/ShapeContainer.h \
../Records/Drawing/ShapeProperties.h \
../Records/Drawing/TextBox.h \
../../../../ASCPresentationEditor/PPTXWriter/Converter.h \
../../../../ASCPresentationEditor/PPTXWriter/CSS.h \
../../../../ASCPresentationEditor/PPTXWriter/ImageManager.h \
../../../../ASCPresentationEditor/PPTXWriter/ShapeWriter.h \
../../../../ASCPresentationEditor/PPTXWriter/StylesWriter.h \
../../../../ASCOfficeDocFile/pole/pole.h \
../../../../ASCPresentationEditor/OfficeDrawing/Element.h \
../../../../ASCPresentationEditor/OfficeDrawing/ElementProperties.h \
../../../../ASCPresentationEditor/OfficeDrawing/Elements.h \
../../../../ASCPresentationEditor/OfficeDrawing/Layout.h \
../../../../ASCPresentationEditor/OfficeDrawing/Slide.h \
../../../../ASCPresentationEditor/OfficeDrawing/SVGConverter.h \
../../../../ASCPresentationEditor/OfficeDrawing/SVGFramework.h \
../../../../ASCPresentationEditor/OfficeDrawing/SVGTransformer.h \
../../../../ASCPresentationEditor/OfficeDrawing/TextAttributesEx.h \
../../../../ASCPresentationEditor/OfficeDrawing/TextStructures.h \
../../../../ASCPresentationEditor/OfficeDrawing/Theme.h \
../PPTFormatLib.h
../../../ASCPresentationEditor/PPTXWriter/Converter.h \
../../../ASCPresentationEditor/PPTXWriter/CSS.h \
../../../ASCPresentationEditor/PPTXWriter/ImageManager.h \
../../../ASCPresentationEditor/PPTXWriter/ShapeWriter.h \
../../../ASCPresentationEditor/PPTXWriter/StylesWriter.h \
../../../ASCPresentationEditor/OfficeDrawing/Element.h \
../../../ASCPresentationEditor/OfficeDrawing/ElementProperties.h \
../../../ASCPresentationEditor/OfficeDrawing/Elements.h \
../../../ASCPresentationEditor/OfficeDrawing/Layout.h \
../../../ASCPresentationEditor/OfficeDrawing/Slide.h \
../../../ASCPresentationEditor/OfficeDrawing/SVGConverter.h \
../../../ASCPresentationEditor/OfficeDrawing/SVGFramework.h \
../../../ASCPresentationEditor/OfficeDrawing/SVGTransformer.h \
../../../ASCPresentationEditor/OfficeDrawing/TextAttributesEx.h \
../../../ASCPresentationEditor/OfficeDrawing/TextStructures.h \
../../../ASCPresentationEditor/OfficeDrawing/Theme.h \
../PPTFormatLib.h \
../../../Common/3dParty/pole/pole.h
SOURCES += \
../Reader/PPTDocumentInfoOneUser.cpp \
../Reader/Records.cpp \
../Reader/SlidePersist.cpp \
../Records/Animations/AnimationTypes.cpp \
../../../../ASCPresentationEditor/PPTXWriter/Converter.cpp \
../../../../ASCPresentationEditor/PPTXWriter/ShapeWriter.cpp \
../../../../ASCOfficeDocFile/pole/pole.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/Elements.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/Layout.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/SVGConverter.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/SVGFramework.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/SVGTransformer.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/TextAttributesEx.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/Theme.cpp \
../PPTFormatLib.cpp
../../../ASCPresentationEditor/PPTXWriter/Converter.cpp \
../../../ASCPresentationEditor/PPTXWriter/ShapeWriter.cpp \
../../../ASCPresentationEditor/OfficeDrawing/Elements.cpp \
../../../ASCPresentationEditor/OfficeDrawing/Layout.cpp \
../../../ASCPresentationEditor/OfficeDrawing/SVGConverter.cpp \
../../../ASCPresentationEditor/OfficeDrawing/SVGFramework.cpp \
../../../ASCPresentationEditor/OfficeDrawing/SVGTransformer.cpp \
../../../ASCPresentationEditor/OfficeDrawing/TextAttributesEx.cpp \
../../../ASCPresentationEditor/OfficeDrawing/Theme.cpp \
../PPTFormatLib.cpp \
../../../Common/3dParty/pole/pole.cpp
......@@ -20,7 +20,7 @@ COfficePPTFile::~COfficePPTFile()
CloseFile();
}
BOOL COfficePPTFile::OpenFile(CString sFileName)
bool COfficePPTFile::OpenFile(CString sFileName)
{
CloseFile();
......@@ -46,7 +46,7 @@ BOOL COfficePPTFile::OpenFile(CString sFileName)
return TRUE;
}
BOOL COfficePPTFile::CloseFile()
bool COfficePPTFile::CloseFile()
{
m_Status = NULLMODE;
......@@ -61,7 +61,7 @@ HRESULT COfficePPTFile::LoadFromFile(CString sSrcFileName, CString sDstPath, CSt
m_strTempDirectory = FileSystem::Directory::GetTempPath();
}
BOOL bRes = OpenFile(sSrcFileName);
bool bRes = OpenFile(sSrcFileName);
if (!bRes)
{
CloseFile();
......
......@@ -52,9 +52,9 @@ public:
HRESULT GetAdditionalParam (CString sParamName, VARIANT* ParamValue);
private:
BOOL OpenFile(CString sFileName);
bool OpenFile(CString sFileName);
BOOL CloseFile();
bool CloseFile();
CString GetDirectory(CString strFileName);
};
......
......@@ -56,7 +56,7 @@ public:
CPPTUserInfo* pInfo = new CPPTUserInfo();
pInfo->m_strFileDirectory = m_strFileDirectory;
BOOL bRes = pInfo->ReadFromStream(&oUserAtom, pStream, strFolderMem);
bool bRes = pInfo->ReadFromStream(&oUserAtom, pStream, strFolderMem);
offsetToEdit = pInfo->m_oUser.m_nOffsetLastEdit;
......@@ -126,4 +126,4 @@ public:
}
return lRes;
}
};
\ No newline at end of file
};
......@@ -25,7 +25,7 @@ m_arEmptyPictures()
m_nWriteSlideTime = 0.0;
m_strFileDirectory = _T("");
m_bIsSetupEmpty = FALSE;
m_bIsSetupEmpty = false;
}
CPPTUserInfo::~CPPTUserInfo()
......@@ -72,7 +72,7 @@ void CPPTUserInfo::Clear()
m_arEmptyPictures.clear();
}
BOOL CPPTUserInfo::ReadFromStream(CRecordUserEditAtom* pUser, POLE::Stream* pStream, CStringW strFolderMem)
bool CPPTUserInfo::ReadFromStream(CRecordUserEditAtom* pUser, POLE::Stream* pStream, CStringW strFolderMem)
{
m_oUser.FromAtom(pUser);
......@@ -85,7 +85,7 @@ BOOL CPPTUserInfo::ReadFromStream(CRecordUserEditAtom* pUser, POLE::Stream* pStr
if (RECORD_TYPE_PERSISTPTRINCREMENTALBLOCK != oHeader.RecType)
{
return FALSE;
return false;
}
CRecordPersistDirectoryAtom oPersist;
......@@ -95,14 +95,14 @@ BOOL CPPTUserInfo::ReadFromStream(CRecordUserEditAtom* pUser, POLE::Stream* pStr
std::map<DWORD, DWORD>::iterator pPair = m_mapOffsetInPIDs.find(m_oUser.m_nDocumentRef);
if (pPair == m_mapOffsetInPIDs.end())
return FALSE;
return false;
StreamUtils::StreamSeek(pPair->second, pStream);
oHeader.ReadFromStream(pStream);
if (RECORD_TYPE_DOCUMENT != oHeader.RecType)
{
return FALSE;
return false;
}
m_oDocument.ReadFromStream(oHeader, pStream);
......@@ -802,9 +802,9 @@ void CPPTUserInfo::LoadNoMainMaster(DWORD dwMasterID, const LONG& lOriginWidth,
if (0 == oArraySlideAtoms.size())
return;
BOOL bMasterColorScheme = oArraySlideAtoms[0]->m_bMasterScheme;
BOOL bMasterBackGround = oArraySlideAtoms[0]->m_bMasterBackground;
BOOL bMasterObjects = oArraySlideAtoms[0]->m_bMasterObjects;
bool bMasterColorScheme = oArraySlideAtoms[0]->m_bMasterScheme;
bool bMasterBackGround = oArraySlideAtoms[0]->m_bMasterBackground;
bool bMasterObjects = oArraySlideAtoms[0]->m_bMasterObjects;
DWORD dwID = (DWORD)oArraySlideAtoms[0]->m_nMasterIDRef;
......
......@@ -55,8 +55,8 @@ public:
std::map<DWORD, CSlideShowSlideInfoAtom> m_mapTransitions;
// "" -
std::vector<BOOL> m_arEmptyPictures;
BOOL m_bIsSetupEmpty;
std::vector<bool> m_arEmptyPictures;
bool m_bIsSetupEmpty;
CString m_strFileDirectory;
......@@ -75,7 +75,7 @@ public:
void Clear();
BOOL ReadFromStream(CRecordUserEditAtom* pUser, POLE::Stream* pStream, CStringW strFolderMem);
bool ReadFromStream(CRecordUserEditAtom* pUser, POLE::Stream* pStream, CStringW strFolderMem);
void FromDocument();
void NormalizeCoords(long lWidth, long lHeight);
......@@ -119,10 +119,10 @@ public:
pPF->spaceBefore = (LONG)0;
pPF->spaceAfter = (LONG)0;
pCF->FontBold = FALSE;
pCF->FontItalic = FALSE;
pCF->FontUnderline = FALSE;
pCF->FontStrikeout = FALSE;
pCF->FontBold = false;
pCF->FontItalic = false;
pCF->FontUnderline = false;
pCF->FontStrikeout = false;
pCF->Size = 18;
pCF->BaseLineOffset = (double)0;
......@@ -281,4 +281,4 @@ public:
void AddAnimation (DWORD dwSlideID, double Width, double Height, IElement* pElement);
void AddAudioTransition (DWORD dwSlideID, CTransition* pTransition, const CString& strFilePath);
};
\ No newline at end of file
};
......@@ -5,8 +5,8 @@
#include <atlbase.h>
#include <atlstr.h>
#else
#include "../../../../DesktopEditor/common/ASCVariant.h"
#include "../../../../Common/DocxFormat/Source/Base/ASCString.h"
#include "../../../DesktopEditor/common/ASCVariant.h"
#include "../../../Common/DocxFormat/Source/Base/ASCString.h"
#endif
typedef BYTE BOOL1;
......
......@@ -16,7 +16,7 @@ class CPPTFileReader
public:
CPPTFileReader(POLE::Storage *pStg, CStringW strTemp):
m_pPowerPointStg(pStg),
m_bIsPPTFile(FALSE),
m_bIsPPTFile(false),
m_pDocStream(NULL),
m_pPictureStream(NULL),
m_lImagesCount(0),
......@@ -63,7 +63,7 @@ public:
FileSystem::Directory::DeleteDirectory(m_strMemoryForder);
}
BOOL IsPowerPoint()
bool IsPowerPoint()
{
return m_bIsPPTFile;
}
......@@ -82,7 +82,7 @@ public:
//m_oDocumentInfo.m_arUsers[0]->m_oDocument.GetRecordsByType(&oArrayBSE, true, false);
// ...
BOOL bRes = SavePictures();
bool bRes = SavePictures();
if (m_oDocumentInfo.m_arUsers.size() > 0)
......@@ -105,10 +105,10 @@ public:
protected:
BOOL ReadCurrentUser(POLE::Stream *pStm)
bool ReadCurrentUser(POLE::Stream *pStm)
{
SRecordHeader oHeader;
BOOL isPP = FALSE;
bool isPP = false;
if( oHeader.ReadFromStream(pStm))
{
......@@ -169,7 +169,7 @@ protected:
// xml
if ( oHeader.ReadFromStream(pStm) == FALSE )
if ( oHeader.ReadFromStream(pStm) == false )
break;
oHeader.ToXmlWriter(&oWriter, pStm);
......@@ -182,13 +182,13 @@ protected:
return 0;
}
BOOL SavePictures()
bool SavePictures()
{
POLE::Stream* pStream = GetPictureStream();
if (NULL == pStream)
{
return FALSE;
return false;
}
SRecordHeader oHeader;
......@@ -210,7 +210,7 @@ protected:
CMetaFileBuffer oMetaFile;
if (oHeader.ReadFromStream(pStream) == FALSE )
if (oHeader.ReadFromStream(pStream) == false )
{
break;
}
......@@ -457,13 +457,13 @@ private:
POLE::Stream * m_pDocStream;
POLE::Stream * m_pPictureStream;
POLE::Storage* m_pPowerPointStg;
BOOL m_bIsPPTFile;
bool m_bIsPPTFile;
public:
//
CStringW m_strMemoryForder;
std::vector<BOOL> m_arLoadImageFlags;
std::vector<bool> m_arLoadImageFlags;
DWORD m_lImagesCount;
public:
......
......@@ -11,20 +11,20 @@ using namespace NSPresentationEditor;
namespace NSZLib
{
static BOOL Decompress(const BYTE* pSrcBuffer, const ULONG& lSrcBufferLen,
static bool Decompress(const BYTE* pSrcBuffer, const ULONG& lSrcBufferLen,
BYTE* pDstBuffer, ULONG& lDstBufferLen)
{
try
{
if (Z_OK == uncompress(pDstBuffer, &lDstBufferLen, pSrcBuffer, lSrcBufferLen))
{
return TRUE;
return true;
}
}
catch(...)
{
}
return FALSE;
return false;
}
}
/**************************************************************
......@@ -295,7 +295,7 @@ public:
class CMetaFileBuffer
{
public:
BOOL m_bIsValid;
bool m_bIsValid;
private:
BYTE* m_pMetaHeader;
......@@ -307,7 +307,7 @@ private:
public:
CMetaFileBuffer()
{
m_bIsValid = FALSE;
m_bIsValid = false;
m_pMetaHeader = NULL;
m_pMetaFile = NULL;
......@@ -327,7 +327,7 @@ public:
m_lMetaHeaderSize = lSize;
}
void SetData(BYTE* pCompress, LONG lCompressSize, LONG lUncompressSize, BOOL bIsCompressed)
void SetData(BYTE* pCompress, LONG lCompressSize, LONG lUncompressSize, bool bIsCompressed)
{
if (!bIsCompressed)
{
......@@ -338,7 +338,7 @@ public:
{
ULONG lSize = lUncompressSize;
m_pMetaFile = new BYTE[lUncompressSize];
BOOL bRes = NSZLib::Decompress(pCompress, (ULONG)lCompressSize, m_pMetaFile, lSize);
bool bRes = NSZLib::Decompress(pCompress, (ULONG)lCompressSize, m_pMetaFile, lSize);
if (bRes)
{
m_lMetaFileSize = (LONG)lSize;
......@@ -593,9 +593,9 @@ public:
{
WORD bulletFlag = StreamUtils::ReadWORD(pStream);
if (bulletFlag & 0x0F)
m_oRun.hasBullet = (BOOL)(0x01 == (bulletFlag & 0x01));
m_oRun.hasBullet = (bool)(0x01 == (bulletFlag & 0x01));
else
m_oRun.hasBullet = (BOOL)FALSE;
m_oRun.hasBullet = false;
}
if (bulletChar_)
......@@ -626,7 +626,7 @@ public:
m_oRun.bulletColor = oColor;
}
if (TRUE) // ,
if (true) // ,
m_oRun.bulletColor.reset();
if (textAlignment_)
......@@ -751,13 +751,13 @@ public:
WORD fontStyle = StreamUtils::ReadWORD(pStream);
if (0x01 == (0x01 & fontStyle))
m_oRun.FontBold = (BOOL)TRUE;
m_oRun.FontBold = true;
if (0x02 == (0x02 & fontStyle))
m_oRun.FontItalic = (BOOL)TRUE;
m_oRun.FontItalic = true;
if (0x04 == (0x04 & fontStyle))
m_oRun.FontUnderline = (BOOL)TRUE;
m_oRun.FontUnderline = true;
if (0x10 == (0x10 & fontStyle))
m_oRun.FontShadow = (BOOL)TRUE;
m_oRun.FontShadow = true;
}
if (typeface_)
......
......@@ -18,7 +18,7 @@ struct SRecordHeader
RecVersion = RecInstance = RecType = RecLen = 0;
}
BOOL ReadFromStream(POLE::Stream * pStream)
bool ReadFromStream(POLE::Stream * pStream)
{
RecVersion = RecInstance = RecType = RecLen = 0;
......@@ -44,23 +44,23 @@ struct SRecordHeader
RecLen = sz;
}
return TRUE;
return true;
}
BOOL IsContainer()
bool IsContainer()
{
/*if ((RecVersion == PSFLAG_CONTAINER) || ((RecVersion & 0x0F) == 0x0F))
{
return TRUE;
}*/
if (1064 == RecType)
return FALSE;
return false;
if (RecVersion == 0x0F)
{
return TRUE;
return true;
}
return FALSE;
return false;
}
SRecordHeader& operator =(const SRecordHeader& oSrc)
......
......@@ -51,7 +51,7 @@ public:
std::vector<CTextFullSettings> m_arTextPlaceHolders;
std::map<LONG, CElementInfo> m_mapElements;
//std::unordered_map<LONG, CElementInfo> m_mapElements;
std::vector<BOOL>* m_parEmptyPictures;
std::vector<bool>* m_parEmptyPictures;
nullable_base<NSPresentationEditor::CTextStyles> m_pStyles[9];
......@@ -107,4 +107,4 @@ public:
}
return lIndex - lResult;
}
};
\ No newline at end of file
};
......@@ -4,8 +4,8 @@
#include <atlbase.h>
#include <atlstr.h>
#else
#include "../../../../DesktopEditor/common/ASCVariant.h"
#include "../../../../Common/DocxFormat/Source/Base/ASCString.h"
#include "../../../DesktopEditor/common/ASCVariant.h"
#include "../../../Common/DocxFormat/Source/Base/ASCString.h"
#endif
#include <vector>
......
......@@ -101,7 +101,7 @@ public:
return oWriter.GetXmlString();
}
BOOL IsSupported()
bool IsSupported()
{
return (NO_ENCRYPT == m_nToken);
}
......
......@@ -14,7 +14,7 @@ public:
{
}
void SetUpEmptyInfos(std::vector<BOOL>* pArray)
void SetUpEmptyInfos(std::vector<bool>* pArray)
{
if (NULL == pArray)
return;
......@@ -29,4 +29,4 @@ public:
}
}
}
};
\ No newline at end of file
};
......@@ -81,7 +81,7 @@ public:
LONG lW2 = m_rcGroupClientAnchor.right - m_rcGroupClientAnchor.left;
LONG lH2 = m_rcGroupClientAnchor.bottom - m_rcGroupClientAnchor.top;
BOOL bIsRecalc = ((lW1 > 0) && (lH1 > 0) && (lW2 > 0) && (lH2 > 0));
bool bIsRecalc = ((lW1 > 0) && (lH1 > 0) && (lW2 > 0) && (lH2 > 0));
if (bIsRecalc)
{
for (int nIndex = 0; nIndex < oArrayShapes.size(); ++nIndex)
......@@ -108,7 +108,7 @@ public:
LONG lWidthClient = m_rcGroupClientAnchor.right - m_rcGroupClientAnchor.left;
LONG lHeightClient = m_rcGroupClientAnchor.bottom - m_rcGroupClientAnchor.top;
BOOL bIsRecalc = ((lWidthClient > 0) && (lHeightClient > 0) && (lWidthClient > 0) && (lHeightGroup > 0));
bool bIsRecalc = ((lWidthClient > 0) && (lHeightClient > 0) && (lWidthClient > 0) && (lHeightGroup > 0));
if (bIsRecalc)
{
......@@ -133,4 +133,4 @@ public:
{
return CRecordsContainer::ToString();
}
};
\ No newline at end of file
};
......@@ -779,18 +779,18 @@ public:
}
if (bUseItalic)
{
pParentShape->m_oText.m_oAttributes.m_oFont.Italic = (BOOL)bItalic;
pParentShape->m_oText.m_oAttributes.m_oFont.Italic = bItalic;
//pElemProps->SetAt(CElementProperty::epFontItalic, bItalic);
}
if (bUseBold)
{
pParentShape->m_oText.m_oAttributes.m_oFont.Bold = (BOOL)bBold;
pParentShape->m_oText.m_oAttributes.m_oFont.Bold = bBold;
//pElemProps->SetAt(CElementProperty::epFontBold, bBold);
}
if (bUseVertical)
{
pParentShape->m_oText.m_bVertical = (true == bVertical) ? TRUE : FALSE;
pParentShape->m_oText.m_bVertical = (true == bVertical) ? true : false;
}
break;
}
......@@ -1065,7 +1065,7 @@ public:
{
// shape
CShapeElement* pShape = new CShapeElement(NSBaseShape::ppt, eType);
if (TRUE)//if (/* */OOXMLShapes::sptCustom != pShape->m_oShape.m_eType)
if (true)//if (/* */OOXMLShapes::sptCustom != pShape->m_oShape.m_eType)
{
CExFilesInfo::ExFilesType exType = CExFilesInfo::eftNone;
CExFilesInfo* pTextureInfo = pMapIDs->Lock(0xFFFFFFFF, exType);
......@@ -1415,8 +1415,8 @@ protected:
// - (.. )
// - - .. -
//
BOOL bIsPersistPresentSettings = FALSE;
BOOL bIsOwnPresentSettings = FALSE;
bool bIsPersistPresentSettings = false;
bool bIsOwnPresentSettings = false;
NSOfficePPT::TextType eTypeMaster = NSOfficePPT::NoPresent;
NSOfficePPT::TextType eTypePersist = NSOfficePPT::NoPresent;
......@@ -1862,7 +1862,7 @@ protected:
++nIndexSpan;
}
pParagraph->m_arSpans[nIndexSpan].m_oRun.Color = oColor;
pParagraph->m_arSpans[nIndexSpan].m_oRun.FontUnderline = (BOOL)TRUE;
pParagraph->m_arSpans[nIndexSpan].m_oRun.FontUnderline = (bool)true;
pParagraph->m_arSpans[nIndexSpan].m_strText = strText.Mid(lStart_ - lCurrentStart, lEnd_ - lStart_ + 1);
if (lEnd_ < lCurrentEnd)
{
......
......@@ -126,7 +126,7 @@ public:
return oWriter.GetXmlString();
}
BOOL IsSlide()
bool IsSlide()
{
for (int nIndex = 0; nIndex < m_arRecords.size(); ++nIndex)
{
......
......@@ -95,8 +95,6 @@ SOURCES += pptxformatlib.cpp \
../../../../Common/DocxFormat/Source/SystemUtility/FileSystem/DirectoryPosix.cpp \
../../../../Common/DocxFormat/Source/SystemUtility/FileSystem/FilePosix.cpp \
../../../PPTXFormat/Logic/Controls.cpp
#../../../Directory.cpp \
#../../File.cpp
HEADERS += pptxformatlib.h \
../../../ASCOfficeDrawingConverter.h \
......
......@@ -57,7 +57,7 @@ NSPresentationEditor::CSVGConverter::~CSVGConverter()
HRESULT NSPresentationEditor::CSVGConverter::get_Type(LONG* lType)
{
if (NULL == lType)
return S_FALSE;
return S_FALSE;
*lType = c_nSVGConverter;
return S_OK;
......@@ -291,7 +291,7 @@ HRESULT NSPresentationEditor::CSVGConverter::put_BrushAlpha2(const LONG& lAlpha)
}
HRESULT NSPresentationEditor::CSVGConverter::get_BrushTexturePath(std::wstring* bsPath)
{
if (bsPath == NULL) return S_FALSE;
if (bsPath == NULL) return S_FALSE;
*bsPath = string2std_string(m_oBrush.TexturePath);
return S_OK;
}
......@@ -699,14 +699,14 @@ HRESULT NSPresentationEditor::CSVGConverter::PathCommandText(const std::wstring&
}
HRESULT NSPresentationEditor::CSVGConverter::PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
{
BOOL bGid = m_oFont.StringGID;
bool bGid = m_oFont.StringGID;
if (NULL != bsGidText)
{
m_oFont.StringGID = TRUE;
m_oFont.StringGID = true;
PathCommandText(bsGidText, x, y, w, h, baselineOffset);
}
m_oFont.StringGID = FALSE;
m_oFont.StringGID = false;
PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset);
m_oFont.StringGID = bGid;
......@@ -734,8 +734,8 @@ HRESULT NSPresentationEditor::CSVGConverter::SetCommandParams(double dAngle, dou
if ((dWidth <= 1) || (dHeight <= 1))
lFlags = 0;
BOOL bFlipX = (0 != (c_nParamFlipX & lFlags));
BOOL bFlipY = (0 != (c_nParamFlipY & lFlags));
bool bFlipX = (0 != (c_nParamFlipX & lFlags));
bool bFlipY = (0 != (c_nParamFlipY & lFlags));
double m11 = bFlipX ? -1.0 : 1.0;
double m22 = bFlipY ? -1.0 : 1.0;
......
......@@ -28,7 +28,7 @@ NSPresentationEditor::CShapeWriter::CShapeWriter()
HRESULT NSPresentationEditor::CShapeWriter::get_Type(LONG* lType)
{
if (NULL == lType)
return S_FALSE;
return S_FALSE;
*lType = c_nSVGConverter;
return S_OK;
......@@ -462,12 +462,12 @@ HRESULT NSPresentationEditor::CShapeWriter::put_ShadowAlpha(LONG val)
m_oShadow.Alpha = val;
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::get_ShadowVisible(BOOL* val)
HRESULT NSPresentationEditor::CShapeWriter::get_ShadowVisible(bool* val)
{
*val = m_oShadow.Visible;
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::put_ShadowVisible(BOOL val)
HRESULT NSPresentationEditor::CShapeWriter::put_ShadowVisible(bool val)
{
m_oShadow.Visible = val;
return S_OK;
......@@ -524,7 +524,7 @@ HRESULT NSPresentationEditor::CShapeWriter::CommandDrawText(const std::wstring&
if (c_nHyperlinkType == m_lCurrentCommandType)
return S_OK;
if (TRUE)
if (true)
{
PathCommandEnd();
BeginCommand(c_nPathType);
......@@ -575,7 +575,7 @@ HRESULT NSPresentationEditor::CShapeWriter::CommandString(const LONG& lType, con
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
{
if (TRUE)
if (true)
{
PathCommandEnd();
BeginCommand(c_nPathType);
......@@ -744,14 +744,14 @@ HRESULT NSPresentationEditor::CShapeWriter::PathCommandText(const std::wstring&
}
HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
{
BOOL bGid = m_oFont.StringGID;
bool bGid = m_oFont.StringGID;
if (NULL != bsGidText)
{
m_oFont.StringGID = TRUE;
m_oFont.StringGID = true;
PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset);
}
m_oFont.StringGID = FALSE;
m_oFont.StringGID = false;
PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset);
m_oFont.StringGID = bGid;
......@@ -776,8 +776,8 @@ HRESULT NSPresentationEditor::CShapeWriter::SetCommandParams(double dAngle, doub
if ((dWidth <= 1) || (dHeight <= 1))
lFlags = 0;
BOOL bFlipX = (0 != (c_nParamFlipX & lFlags));
BOOL bFlipY = (0 != (c_nParamFlipY & lFlags));
bool bFlipX = (0 != (c_nParamFlipX & lFlags));
bool bFlipY = (0 != (c_nParamFlipY & lFlags));
double m11 = bFlipX ? -1.0 : 1.0;
double m22 = bFlipY ? -1.0 : 1.0;
......
......@@ -395,8 +395,8 @@ namespace NSPresentationEditor
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);
HRESULT get_ShadowVisible (bool* val);
HRESULT put_ShadowVisible (bool val);
// edge -------------------------------------------------------------------------------------
HRESULT SetEdgeText (BSTR bsXML);
HRESULT get_EdgeVisible (LONG* val);
......
......@@ -64,7 +64,7 @@ SOURCES += docxformatlib.cpp \
../Source/XML/stringcommon.cpp \
../Source/MathEquation/MathEquation.cpp \
../Source/Base/unicode_util.cpp \
../Common/3dParty/pole/pole.cpp
../../3dParty/pole/pole.cpp
HEADERS += docxformatlib.h \
../Source/Base/Base.h \
......
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