summaryrefslogtreecommitdiffstats
path: root/basic
diff options
context:
space:
mode:
Diffstat (limited to 'basic')
-rw-r--r--basic/source/uno/dlgcont.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index cc03680f4cb6..5a125444dfc9 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -248,6 +248,9 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e
}
}
}
+ Reference< XComponent > xDialogModelComp(xDialogModel, UNO_QUERY);
+ if (xDialogModelComp)
+ xDialogModelComp->dispose();
}
}
}
@@ -327,6 +330,11 @@ Any SfxDialogLibraryContainer::importLibraryElement
// to avoid creating the DialogModel here!
Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, mxContext, mxOwnerDocument );
aRetAny <<= xISP;
+
+ Reference< XComponent > xDialogModelComp(xDialogModel, UNO_QUERY);
+ if (xDialogModelComp)
+ xDialogModelComp->dispose();
+
return aRetAny;
}