I was looking as this piece of code in KoTextEditor.cpp
void KoTextEditor::newLine() { d->updateState(KoTextEditor::Private::Custom, i18n("Line Break")); if (d->caret.hasSelection()) d->deleteInlineObjects(); KoTextDocument koDocument(d->document); KoStyleManager *styleManager = koDocument.styleManager(); KoParagraphStyle *nextStyle = 0; KoParagraphStyle *currentStyle = 0; if (styleManager) { int id = d->caret.blockFormat().intProperty(KoParagraphStyle::StyleId); currentStyle = styleManager->paragraphStyle(id); if (currentStyle == 0) // not a style based parag. Lets make the next one correct. nextStyle = styleManager->defaultParagraphStyle(); else nextStyle = styleManager->paragraphStyle(currentStyle->nextStyle()); Q_ASSERT(nextStyle); if (currentStyle == nextStyle) nextStyle = 0; } . . . } Here the parameter passed to styleManager->paragraphStyle(id) is a integer whereas its signature shows that it is a const QString....Is this the right way to call or am I missing something? //snippet from KoStyleManager.cpp KoParagraphStyle *KoStyleManager::paragraphStyle(const QString &name) const { foreach(KoParagraphStyle *style, d->paragStyles) { qDebug()<<Q_FUNC_INFO<<" name "<<name<<"style->name "<<style->name(); if (style->name() == name) return style; } return 0; } -- My blog http://gkbhat.blogspot.com
_______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel