Commit 27dba224 authored by Thomas Zander's avatar Thomas Zander

Fix removing of listStyle to use refcounting instead of bluntly deleting.

svn path=/trunk/koffice/; revision=650386
parent 87476d42
......@@ -40,12 +40,16 @@ public:
delete stylesPrivate;
stylesPrivate = 0;
charStyle = 0; // QObject will delete it.
if(listStyle) {
listStyle->removeUser();
if(listStyle->userCount() == 0)
delete listStyle;
listStyle = 0;
}
removeListStyle();
}
void removeListStyle() {
if(listStyle == 0)
return;
listStyle->removeUser();
if(listStyle->userCount() == 0)
delete listStyle;
listStyle = 0;
}
QString name;
......@@ -249,7 +253,7 @@ void KoParagraphStyle::setListStyle(const KoListStyle &style) {
}
void KoParagraphStyle::removeListStyle() {
delete d->listStyle; d->listStyle = 0;
d->removeListStyle();
}
static KoParagraphStyle::BorderStyle oasisBorderStyle(const QString& borderstyle) {
......
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