Browse Source

Format: Make some private memeber public

master
Debao Zhang 11 years ago
parent
commit
8e20f8b12e
  1. 29
      src/xlsx/xlsxformat.cpp
  2. 33
      src/xlsx/xlsxformat.h

29
src/xlsx/xlsxformat.cpp

@ -493,7 +493,8 @@ void Format::setFontIndex(int index)
d->font_index_valid = true; d->font_index_valid = true;
} }
/* Internal /*!
* \internal
*/ */
QByteArray Format::fontKey() const QByteArray Format::fontKey() const
{ {
@ -895,7 +896,7 @@ void Format::setBorderIndex(int index)
d->border_index = index; d->border_index = index;
} }
/* Internal /*! \internal
*/ */
QByteArray Format::borderKey() const QByteArray Format::borderKey() const
{ {
@ -1004,7 +1005,8 @@ void Format::setFillIndex(int index)
d->fill_index = index; d->fill_index = index;
} }
/* Internal /*!
* \internal
*/ */
QByteArray Format::fillKey() const QByteArray Format::fillKey() const
{ {
@ -1106,6 +1108,9 @@ bool Format::isEmpty() const
return d->property.isEmpty(); return d->property.isEmpty();
} }
/*!
* \internal
*/
QByteArray Format::formatKey() const QByteArray Format::formatKey() const
{ {
if (isEmpty()) if (isEmpty())
@ -1134,11 +1139,19 @@ void Format::setXfIndex(int index)
d->xf_indexValid = true; d->xf_indexValid = true;
} }
/*!
* \internal
*/
int Format::xfIndex() const int Format::xfIndex() const
{ {
if (!d)
return -1;
return d->xf_index; return d->xf_index;
} }
/*!
* \internal
*/
bool Format::xfIndexValid() const bool Format::xfIndexValid() const
{ {
if (!d) if (!d)
@ -1152,11 +1165,21 @@ void Format::setDxfIndex(int index)
d->dxf_indexValid = true; d->dxf_indexValid = true;
} }
/*!
* \internal
* Returns the index in the styles dxfs.
*/
int Format::dxfIndex() const int Format::dxfIndex() const
{ {
if (!d)
return -1;
return d->dxf_index; return d->dxf_index;
} }
/*!
* \internal
* Returns whether the dxf index is valid or not.
*/
bool Format::dxfIndexValid() const bool Format::dxfIndexValid() const
{ {
if (!d) if (!d)

33
src/xlsx/xlsxformat.h

@ -230,22 +230,6 @@ public:
QString stringProperty(int propertyId) const; QString stringProperty(int propertyId) const;
QColor colorProperty(int propertyId) const; QColor colorProperty(int propertyId) const;
private:
friend class Styles;
friend class Worksheet;
friend class WorksheetPrivate;
friend class RichStringPrivate;
friend class SharedStrings;
friend class ::FormatTest;
friend Q_XLSX_EXPORT QDebug operator<<(QDebug, const Format &f);
void fixNumberFormat(int id, const QString &format);
bool fontIndexValid() const;
int fontIndex() const;
void setFontIndex(int index);
QByteArray fontKey() const;
bool hasNumFmtData() const; bool hasNumFmtData() const;
bool hasFontData() const; bool hasFontData() const;
bool hasFillData() const; bool hasFillData() const;
@ -253,22 +237,31 @@ private:
bool hasAlignmentData() const; bool hasAlignmentData() const;
bool hasProtectionData() const; bool hasProtectionData() const;
bool fontIndexValid() const;
int fontIndex() const;
QByteArray fontKey() const;
bool borderIndexValid() const; bool borderIndexValid() const;
QByteArray borderKey() const; QByteArray borderKey() const;
int borderIndex() const; int borderIndex() const;
void setBorderIndex(int index);
bool fillIndexValid() const; bool fillIndexValid() const;
QByteArray fillKey() const; QByteArray fillKey() const;
int fillIndex() const; int fillIndex() const;
void setFillIndex(int index);
QByteArray formatKey() const; QByteArray formatKey() const;
bool xfIndexValid() const; bool xfIndexValid() const;
int xfIndex() const; int xfIndex() const;
void setXfIndex(int index);
bool dxfIndexValid() const; bool dxfIndexValid() const;
int dxfIndex() const; int dxfIndex() const;
private:
friend class Styles;
friend class ::FormatTest;
friend Q_XLSX_EXPORT QDebug operator<<(QDebug, const Format &f);
void fixNumberFormat(int id, const QString &format);
void setFontIndex(int index);
void setBorderIndex(int index);
void setFillIndex(int index);
void setXfIndex(int index);
void setDxfIndex(int index); void setDxfIndex(int index);
int theme() const; int theme() const;

Loading…
Cancel
Save