summaryrefslogtreecommitdiff
path: root/xmlscript/test
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2001-05-11 12:53:34 +0000
committerDaniel Boelzle <dbo@openoffice.org>2001-05-11 12:53:34 +0000
commitff7f2f4effac78433427b7f0cdea15b511f05c95 (patch)
tree1757619309aa5d675b2bf3648a5c030743c723d7 /xmlscript/test
parent419d51d521e3b7989a8f0b1982e134ad7444e322 (diff)
disposing context
Diffstat (limited to 'xmlscript/test')
-rw-r--r--xmlscript/test/imexp.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index cf75b3bcfdcf..d3bc4cd125dc 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: imexp.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: dbo $ $Date: 2001-05-10 09:20:42 $
+ * last change: $Author: dbo $ $Date: 2001-05-11 13:53:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -334,10 +334,21 @@ void MyApp::Main()
OSL_ENSURE( 0, aStr.getStr() );
}
- Reference< lang::XComponent > xComp( xMSF, UNO_QUERY );
- if (xComp.is())
+ // dispose component context
+ Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
+ if (xProps.is())
{
- xComp->dispose();
+ try
+ {
+ Reference< lang::XComponent > xComp;
+ if (xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xComp)
+ {
+ xComp->dispose();
+ }
+ }
+ catch (beans::UnknownPropertyException &)
+ {
+ }
}
}