summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2001-05-11 09:45:43 +0000
committerDaniel Boelzle <dbo@openoffice.org>2001-05-11 09:45:43 +0000
commitf0012f0a432f3d4a4681ad319dc3a9b668c52402 (patch)
treeeee34e8c2018aba0ecf5053225fa77ba242fe17b
parentce160e46307b3cbfdf7d64a3913652fa702ee91f (diff)
disposing of context
-rw-r--r--toolkit/workben/unodialog.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/toolkit/workben/unodialog.cxx b/toolkit/workben/unodialog.cxx
index 6614f66efa8d..1e296edae28a 100644
--- a/toolkit/workben/unodialog.cxx
+++ b/toolkit/workben/unodialog.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodialog.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: dbo $ $Date: 2001-05-10 14:52:37 $
+ * last change: $Author: dbo $ $Date: 2001-05-11 10:45:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -297,6 +297,22 @@ void Main( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMult
Reference< XComponent > xT( xToolkit, uno::UNO_QUERY );
xT->dispose();
+
+ Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY );
+ if (xProps.is())
+ {
+ try
+ {
+ Reference< lang::XComponent > xComp;
+ if (xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xComp)
+ {
+ xComp->dispose();
+ }
+ }
+ catch (beans::UnknownPropertyException &)
+ {
+ }
+ }
}
void MyWin::Paint( const Rectangle& r )