Browse Source

Eliminate some compile warnings

master
Debao Zhang 11 years ago
parent
commit
e76bed2ebc
  1. 2
      src/xlsx/xlsxooxmlfile.cpp
  2. 8
      src/xlsx/xlsxworksheet.cpp

2
src/xlsx/xlsxooxmlfile.cpp

@ -32,7 +32,7 @@
QT_BEGIN_NAMESPACE_XLSX QT_BEGIN_NAMESPACE_XLSX
OOXmlFilePrivate::OOXmlFilePrivate(OOXmlFile *q) OOXmlFilePrivate::OOXmlFilePrivate(OOXmlFile *q)
:q_ptr(q), relationships(new Relationships) :relationships(new Relationships), q_ptr(q)
{ {
} }

8
src/xlsx/xlsxworksheet.cpp

@ -660,14 +660,14 @@ bool Worksheet::writeInlineString(const QString &row_column, const QString &valu
bool Worksheet::writeInlineString(int row, int column, const QString &value, const Format &format) bool Worksheet::writeInlineString(int row, int column, const QString &value, const Format &format)
{ {
Q_D(Worksheet); Q_D(Worksheet);
int error = 0; //int error = 0;
QString content = value; QString content = value;
if (d->checkDimensions(row, column)) if (d->checkDimensions(row, column))
return false; return false;
if (value.size() > XLSX_STRING_MAX) { if (value.size() > XLSX_STRING_MAX) {
content = value.left(XLSX_STRING_MAX); content = value.left(XLSX_STRING_MAX);
error = -2; //error = -2;
} }
Format fmt = format.isValid() ? format : d->cellFormat(row, column); Format fmt = format.isValid() ? format : d->cellFormat(row, column);
@ -937,7 +937,7 @@ bool Worksheet::writeHyperlink(int row, int column, const QUrl &url, const Forma
if (d->checkDimensions(row, column)) if (d->checkDimensions(row, column))
return false; return false;
int error = 0; //int error = 0;
QString urlString = url.toString(); QString urlString = url.toString();
@ -947,7 +947,7 @@ bool Worksheet::writeHyperlink(int row, int column, const QUrl &url, const Forma
displayString.replace(QLatin1String("mailto:"), QString()); displayString.replace(QLatin1String("mailto:"), QString());
if (displayString.size() > XLSX_STRING_MAX) { if (displayString.size() > XLSX_STRING_MAX) {
displayString = displayString.left(XLSX_STRING_MAX); displayString = displayString.left(XLSX_STRING_MAX);
error = -2; //error = -2;
} }
/* /*

Loading…
Cancel
Save