Skip to content

Commit

Permalink
x2t - from #65.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaSubbotina committed May 3, 2018
1 parent a571c88 commit 128529b
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace DocFileFormat
/*========================================================================================================*/

FormattedDiskPageCHPX::FormattedDiskPageCHPX( POLE::Stream* wordStream, int offset, int nWordVersion ):
FormattedDiskPage(), rgb(NULL), grpchpxSize(NULL), grpchpx(NULL)
FormattedDiskPage(), rgb(NULL), grpchpxSize(0), grpchpx(NULL)
{
Type = Character;
WordStream = wordStream;
Expand Down
2 changes: 1 addition & 1 deletion ASCOfficeDocxFile2/DocWrapper/ChartWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ namespace BinXlsxRW{
//как в CsvReader - подозрительный код
WCHAR *pEndPtr;
wcstod(val.c_str(), &pEndPtr);
if (NULL != *pEndPtr)
if (0 != *pEndPtr)
{
// Не число
aSharedStrings.push_back(val);
Expand Down
2 changes: 1 addition & 1 deletion ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ CPPTFileReader::CPPTFileReader(POLE::Storage *pStorage, std::wstring strTemp):
m_pStorage(pStorage),
m_bIsPPTFile(false),
m_nPresentationCodePage(1250),
m_pDocumentStream(NULL), m_pPictureStream(NULL), m_pDocumentSummaryStream(NULL), m_pEncryptedSummaryStream(NULL),
m_pDocumentStream(), m_pPictureStream(), m_pDocumentSummaryStream(), m_pEncryptedSummaryStream(),
m_strTmpDirectory(strTemp),
m_oDocumentInfo()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ CBaseShapePtr CBaseShape::CreateByType(NSBaseShape::ClassType ClassType, int Sha
return CPPTShape::CreateByType((PPTShapes::ShapeType)ShapeType);
}

return NULL;
return CBaseShapePtr();
}

bool CBaseShape::SetType(NSBaseShape::ClassType ClassType, int ShapeType)
Expand Down
4 changes: 2 additions & 2 deletions ASCOfficePPTXFile/PPTXFormat/Logic/SmartArt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ namespace PPTX
}
std::wstring ChartRec::toXML() const
{
if (!id_data.is_init() || NULL == m_bData)
if (!id_data.is_init() || false == m_bData)
return L"";
std::wstring strData = L"<c:chart xmlns:c=\"http://schemas.openxmlformats.org/drawingml/2006/chart\" \
xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:id=\"" + id_data->ToString() + L"\"/>";
Expand All @@ -203,7 +203,7 @@ xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"
}
void ChartRec::toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
{
if (!id_data.is_init() || NULL == m_bData)
if (!id_data.is_init() || false == m_bData)
return;

std::wstring strData = L"<c:chart xmlns:c=\"http://schemas.openxmlformats.org/drawingml/2006/chart\" \
Expand Down
6 changes: 3 additions & 3 deletions ASCOfficeRtfFile/RtfFormatLib/source/RtfProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ class RtfCharProperty: public IRenderableProperty
m_poShading.SetDefault();
m_poBorder.SetDefault();

m_pOldCharProp = RtfCharPropertyPtr(NULL);
m_pOldCharProp = RtfCharPropertyPtr();
}
void Merge( RtfCharProperty& oCharPr )
{
Expand Down Expand Up @@ -2522,7 +2522,7 @@ class RtfRowProperty: public RtfTableProperty, public ItemContainer< RtfCellProp
DEFAULT_PROPERTY( m_nTrAuth)
DEFAULT_PROPERTY( m_nTrDate)

m_pOldRowProperty = RtfRowPropertyPtr(NULL);
m_pOldRowProperty = RtfRowPropertyPtr();
}
bool IsValid()
{
Expand Down Expand Up @@ -2789,7 +2789,7 @@ class RtfParagraphProperty: public IRenderableProperty

m_bHidden = false;
m_bOldList = false;
m_pOldParagraphProp = RtfParagraphPropertyPtr(NULL);
m_pOldParagraphProp = RtfParagraphPropertyPtr();
}
void Merge( RtfParagraphProperty& oParPr )
{
Expand Down
2 changes: 1 addition & 1 deletion ASCOfficeRtfFile/RtfFormatLib/source/RtfSection.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ class RtfSectionProperty: public IRenderableProperty
DEFAULT_PROPERTY( m_nSrAuth)
DEFAULT_PROPERTY( m_nSrDate)

m_pOldSectionProp = RtfSectionPropertyPtr(NULL);
m_pOldSectionProp = RtfSectionPropertyPtr();
}
std::wstring RenderToRtf(RenderParameter oRenderParameter);
std::wstring RenderToOOX(RenderParameter oRenderParameter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,10 @@ SerArPtr SerAr::createSerAr(const unsigned char type)
return SerArPtr(new SerStr);
break;
default:
// EXCEPT::RT::WrongBiffRecord("Unsupported type of SerAr.", "SerAr container");
break;
}

return NULL; // TODO: need fixed
return SerArPtr();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const bool CHARTFORMATS::loadContent(BinProcessor& proc)
if (cf.dataLabExt)
{
m_arChartFormats.push_back(cf);
cf.attachedLABEL = NULL;
cf.attachedLABEL = XLS::BaseObjectPtr();
}
cf.dataLabExt = elements_.front();
}
Expand All @@ -267,7 +267,7 @@ const bool CHARTFORMATS::loadContent(BinProcessor& proc)
if (cf.attachedLABEL)
{
m_arChartFormats.push_back(cf);
cf.dataLabExt = NULL;
cf.dataLabExt = XLS::BaseObjectPtr();
}
cf.attachedLABEL = elements_.front();
}
Expand Down
2 changes: 1 addition & 1 deletion DesktopEditor/cximage/CxImage/ximaenc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ bool CxImage::CheckFormat(CxFile * hFile, uint32_t imagetype)
////////////////////////////////////////////////////////////////////////////////
bool CxImage::CheckFormat(uint8_t * buffer, uint32_t size, uint32_t imagetype)
{
if (buffer==NULL || size==NULL){
if (buffer==NULL || size==0){
strcpy(info.szLastError,"invalid or empty buffer");
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion PdfReader/Src/GState.h
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ namespace PdfReader
int GetFlag(int nPathIndex)
{
if (nPathIndex < 0 || nPathIndex >= m_nPathsCount)
return NULL;
return 0;

return m_pFlags[nPathIndex];
}
Expand Down
2 changes: 1 addition & 1 deletion XlsxSerializerCom/Reader/CSVReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ namespace CSVReader

WCHAR *pEndPtr;
double dValue = wcstod(sText.c_str(), &pEndPtr);
if (NULL != *pEndPtr)
if (0 != *pEndPtr)
{
// Не число
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeInlineStr);
Expand Down

0 comments on commit 128529b

Please sign in to comment.