Commit 3585e39f authored by Denis Kuplyakov's avatar Denis Kuplyakov
Browse files

Fixed some minor issues

Fixed some formatting, deleted some unused includes and predefines,
corrected spelling in comments.
parent 03967f29
......@@ -28,7 +28,6 @@
class KoInlineTextObjectManager;
class KoTextDocumentLayout;
class QTextFrame;
class KoInlineCite;
class KoOdfBibliographyConfiguration;
......
......@@ -62,7 +62,7 @@ class KOTEXT_EXPORT KoParagraphStyle : public KoCharacterStyle
Q_OBJECT
public:
enum Property {
// Every 10 properties, the decimal number shown indicates the decimal offstet over the QTextFormat::UserProperty enum value
// Every 10 properties, the decimal number shown indicates the decimal offset over the QTextFormat::UserProperty enum value
StyleId = QTextFormat::UserProperty + 1,
// Linespacing properties
PercentLineHeight, ///< this propery is used for a percentage of the highest character on that line
......
......@@ -57,12 +57,21 @@
class KoStyleManager::Private
{
public:
Private() : defaultCharacterStyle(0), defaultParagraphStyle(0), defaultListStyle(0), defaultOutlineStyle(0), outlineStyle(0), undoStack(0), changeCommand(0)
Private()
: defaultCharacterStyle(0)
, defaultParagraphStyle(0)
, defaultListStyle(0)
, defaultOutlineStyle(0)
, outlineStyle(0)
, undoStack(0)
, changeCommand(0)
{
}
~Private() {
qDeleteAll(automaticListStyles);
}
static int s_stylesNumber; // For giving out unique numbers to the styles for referencing
QHash<int, KoCharacterStyle*> charStyles;
......@@ -76,7 +85,7 @@ public:
QHash<int, KoSectionStyle *> sectionStyles;
QHash<int, KoParagraphStyle *> unusedParagraphStyles;
QHash<int, KoTextTableTemplate *> tableTemplates;
QList<ChangeFollower*> documentUpdaterProxies;
QList<ChangeFollower *> documentUpdaterProxies;
KoCharacterStyle *defaultCharacterStyle;
......
......@@ -146,7 +146,7 @@ public:
*/
void add(KoTableCellStyle *style);
/**
* Add a new sewction style, automatically giving it a new styleId.
* Add a new section style, automatically giving it a new styleId.
*/
void add(KoSectionStyle *style);
......
......@@ -220,14 +220,14 @@ KoPointedAt KoTextLayoutArea::hitTest(const QPointF &p, Qt::HitTestAccuracy accu
//and finally test the footnotes
point -= QPointF(0, bottom() - d->footNotesHeight);
while (footNoteIndex<d->footNoteAreas.length()) {
while (footNoteIndex < d->footNoteAreas.length()) {
// check if p is over foot notes area
if (point.y() > 0 && point.y() < d->footNoteAreas[footNoteIndex]->bottom()
- d->footNoteAreas[footNoteIndex]->top()) {
pointedAt = d->footNoteAreas[footNoteIndex]->hitTest(point, accuracy);
return pointedAt;
}
point -= QPointF(0,d->footNoteAreas[footNoteIndex]->bottom() - d->footNoteAreas[footNoteIndex]->top());
point -= QPointF(0, d->footNoteAreas[footNoteIndex]->bottom() - d->footNoteAreas[footNoteIndex]->top());
++footNoteIndex;
}
return pointedAt;
......
......@@ -41,7 +41,7 @@
StylesWidget::StylesWidget(QWidget *parent, bool paragraphMode, Qt::WindowFlags f)
: QFrame(parent, f),
m_styleManager(0),
m_styleThumbnailer(0),
m_styleThumbnailer(0),
m_stylesModel(new StylesModel(0, StylesModel::ParagraphStyle)),
m_stylesDelegate(new StylesDelegate()),
m_blockSignals(false),
......@@ -70,7 +70,8 @@ StylesWidget::~StylesWidget()
QSize StylesWidget::sizeHint() const
{
return QSize(widget.stylesView->sizeHint().width() + 2*widget.stylesView->verticalScrollBar()->width(), widget.stylesView->sizeHint().height());
return QSize(widget.stylesView->sizeHint().width() + 2 * widget.stylesView->verticalScrollBar()->width(),
widget.stylesView->sizeHint().height());
}
void StylesWidget::setStyleManager(KoStyleManager *sm)
......
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