Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit ad92912f authored by Jan Hambrecht's avatar Jan Hambrecht

fix memory leaks: a default shape might have fill, border or shadow

alerady set, so we have to delete these before setting new one while loading

svn path=/trunk/koffice/; revision=1035362
parent f9a9e8d4
......@@ -935,6 +935,8 @@ QString KoShape::saveStyle(KoGenStyle &style, KoShapeSavingContext &context) con
void KoShape::loadStyle(const KoXmlElement & element, KoShapeLoadingContext &context)
KoStyleStack &styleStack = context.odfLoadingContext().styleStack();;
......@@ -947,6 +949,18 @@ void KoShape::loadStyle(const KoXmlElement & element, KoShapeLoadingContext &con
if(d->fill && !d->fill->removeUser()) {
delete d->fill;
d->fill = 0;
if(d->border && !d->border->removeUser()) {
delete d->border;
d->border = 0;
if(d->shadow && !d->shadow->removeUser()) {
delete d->shadow;
d->shadow = 0;
setBackground(loadOdfFill(element, context));
setBorder(loadOdfStroke(element, context));
setShadow(loadOdfShadow(element, context));
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