Commit b6d453a3 authored by C. Boemann's avatar C. Boemann
Browse files

Don't override paragraph setting just because there is no content

BUG:288649
parent 0e007735
......@@ -787,11 +787,6 @@ void KoTextLoader::loadBody(const KoXmlElement &bodyElem, QTextCursor &cursor)
}
}
endBody();
if ((document->isEmpty()) && (d->styleManager)) {
QTextBlock block = document->begin();
d->styleManager->defaultParagraphStyle()->applyStyle(block);
}
}
rootCallChecker--;
......
......@@ -111,7 +111,7 @@ void KoTextShapeData::setDocument(QTextDocument *document, bool transferOwnershi
if (! d->document->useDesignMetrics())
d->document->setUseDesignMetrics(true);
if (d->document->isEmpty()) { // apply app default style for first parag
if (d->document->isEmpty() && !d->document->firstBlock().blockFormat().hasProperty(KoParagraphStyle::StyleId)) { // apply app default style for first parag
KoTextDocument doc(d->document);
KoStyleManager *sm = doc.styleManager();
if (sm) {
......
Supports Markdown
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