Changeset View
Changeset View
Standalone View
Standalone View
words/part/KWPageManager.cpp
Show All 26 Lines | |||||
27 | #include <KoShape.h> | 27 | #include <KoShape.h> | ||
28 | 28 | | |||
29 | #include <WordsDebug.h> | 29 | #include <WordsDebug.h> | ||
30 | 30 | | |||
31 | #define DEBUG_PAGES | 31 | #define DEBUG_PAGES | ||
32 | 32 | | |||
33 | KWPageManagerPrivate::KWPageManagerPrivate() | 33 | KWPageManagerPrivate::KWPageManagerPrivate() | ||
34 | : lastId(0), | 34 | : lastId(0), | ||
35 | defaultPageStyle(QLatin1String("Standard"), QLatin1String("Default")) // don't translate cause both strings are used as identifier! | 35 | defaultPageStyle(QLatin1String("Standard")) // don't translate, used as identifier! | ||
36 | { | 36 | { | ||
37 | } | 37 | } | ||
38 | 38 | | |||
39 | qreal KWPageManagerPrivate::pageOffset(int pageNum/*, bool bottom*/) const | 39 | qreal KWPageManagerPrivate::pageOffset(int pageNum/*, bool bottom*/) const | ||
40 | { | 40 | { | ||
41 | #if 0 | 41 | #if 0 | ||
42 | Q_ASSERT(pageNum >= 0); | 42 | Q_ASSERT(pageNum >= 0); | ||
43 | qreal offset = 0.0; | 43 | qreal offset = 0.0; | ||
▲ Show 20 Lines • Show All 360 Lines • ▼ Show 20 Line(s) | |||||
404 | { | 404 | { | ||
405 | return d->defaultPageStyle; | 405 | return d->defaultPageStyle; | ||
406 | } | 406 | } | ||
407 | 407 | | |||
408 | void KWPageManager::clearPageStyles() | 408 | void KWPageManager::clearPageStyles() | ||
409 | { | 409 | { | ||
410 | d->pageStyles.clear(); | 410 | d->pageStyles.clear(); | ||
411 | d->pageStyleNames.clear(); | 411 | d->pageStyleNames.clear(); | ||
412 | d->defaultPageStyle = KWPageStyle(QLatin1String("Standard"), QLatin1String("Default")); // don't translate cause both strings are used as identifier! | 412 | d->defaultPageStyle = KWPageStyle(QLatin1String("Standard")); // don't translate, used as identifier! | ||
413 | addPageStyle(d->defaultPageStyle); | 413 | addPageStyle(d->defaultPageStyle); | ||
414 | } | 414 | } | ||
415 | 415 | | |||
416 | const KWPage KWPageManager::begin() const | 416 | const KWPage KWPageManager::begin() const | ||
417 | { | 417 | { | ||
418 | if (d->pages.isEmpty()) | 418 | if (d->pages.isEmpty()) | ||
419 | return KWPage(); | 419 | return KWPage(); | ||
420 | return KWPage(d, d->pageNumbers.constBegin().value()); | 420 | return KWPage(d, d->pageNumbers.constBegin().value()); | ||
Show All 36 Lines |