remove print/cout logs.

we need a comprehensive logging interface for this.

right now, leave as "LOG:" to replace later.

Change-Id: I25321223cd48ec13a1de5e4140cfea75a2f42866
This commit is contained in:
Hermet Park 2020-08-18 20:35:13 +09:00
parent a5beca7369
commit 70b4703707
5 changed files with 16 additions and 14 deletions

View file

@ -300,7 +300,7 @@ bool fillGenColorTable(SwFill* fill, const Fill* fdata, const Matrix* transform,
return _prepareRadial(fill, static_cast<const RadialGradient*>(fdata), transform);
}
cout << "What type of gradient?!" << endl;
//LOG: What type of gradient?!
return false;
}

View file

@ -193,11 +193,11 @@ static void _horizLine(RleWorker& rw, SwCoord x, SwCoord y, SwCoord area, SwCoor
//span has ushort coordinates. check limit overflow
if (x >= SHRT_MAX) {
cout << "x(" << x << ") coordinate overflow!" << endl;
//LOG: x coordinate overflow!
x = SHRT_MAX;
}
if (y >= SHRT_MAX) {
cout << "y(" << y << ") coordinate overflow!" << endl;
//LOG: y coordinate overflow!
y = SHRT_MAX;
}
@ -616,7 +616,7 @@ static bool _decomposeOutline(RleWorker& rw)
return true;
invalid_outline:
cout << "Invalid Outline!" << endl;
//LOG: Invalid Outline!
return false;
}

View file

@ -812,7 +812,9 @@ static void _exportBorderOutline(SwStroke& stroke, SwOutline* outline, uint32_t
if (*src & SW_STROKE_TAG_POINT) *tags = SW_CURVE_TYPE_POINT;
else if (*src & SW_STROKE_TAG_CUBIC) *tags = SW_CURVE_TYPE_CUBIC;
else cout << "what type of stroke outline??" << endl;
else {
//LOG: What type of stroke outline??
}
if (*src & SW_STROKE_TAG_END) {
*cntrs = idx;

View file

@ -86,7 +86,7 @@ struct Picture::Impl
if (loader) loader->close();
loader = LoaderMgr::loader();
if (!loader || !loader->open(path.c_str())) {
cout << "Non supported format: " << path.c_str() << endl;
//LOG: Non supported format
return Result::NonSupport;
}
if (!loader->read()) return Result::Unknown;
@ -98,7 +98,7 @@ struct Picture::Impl
if (loader) loader->close();
loader = LoaderMgr::loader();
if (!loader || !loader->open(data, size)) {
cout << "Non supported load data" << endl;
//LOG: Non supported load data
return Result::NonSupport;
}
if (!loader->read()) return Result::Unknown;

View file

@ -1118,7 +1118,7 @@ static SvgNode* _createEllipseNode(SvgLoaderData* loader, SvgNode* parent, const
}
static void _attrParsePolygonPoints(const char* str, float** points, int* ptCount)
static bool _attrParsePolygonPoints(const char* str, float** points, int* ptCount)
{
float tmp[50];
int tmpCount = 0;
@ -1147,11 +1147,11 @@ static void _attrParsePolygonPoints(const char* str, float** points, int* ptCoun
}
*ptCount = count;
*points = pointArray;
return;
return true;
error_alloc:
printf("ERR : allocation for point array failed. out of memory");
abort();
//LOG: allocation for point array failed. out of memory
return false;
}
@ -1168,7 +1168,7 @@ static bool _attrParsePolygonNode(void* data, const char* key, const char* value
else polygon = &(node->node.polyline);
if (!strcmp(key, "points")) {
_attrParsePolygonPoints(value, &polygon->points, &polygon->pointsCount);
return _attrParsePolygonPoints(value, &polygon->points, &polygon->pointsCount);
} else if (!strcmp(key, "style")) {
return simpleXmlParseW3CAttribute(value, _parseStyleAttr, loader);
} else if (!strcmp(key, "id")) {
@ -2298,7 +2298,7 @@ bool SvgLoader::header()
this->vw = loaderData.doc->node.doc.vw;
this->vh = loaderData.doc->node.doc.vh;
} else {
cout << "ERROR : No SVG File. There is no <svg/>" <<endl;
//LOG: No SVG File. There is no <svg/>
return false;
}
@ -2322,7 +2322,7 @@ bool SvgLoader::open(const char* path)
if (!f.is_open())
{
cout << "ERROR: Failed to open file = " << path;
//LOG: Failed to open file
return false;
} else {
getline(f, filePath, '\0');