summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-01-23 06:34:08 +0000
committerOliver Bolte <obo@openoffice.org>2007-01-23 06:34:08 +0000
commit63c9a01a2ce92230d778a0bc3695c03563ccc864 (patch)
treea7e6ab7b83cad3591a0bb09ff9e6e9664cb3531d
parentcebe9e5a1aae78fc1ef297daa62c3fcb7d8c860f (diff)
INTEGRATION: CWS fwk59 (1.26.4); FILE MERGED
2007/01/17 15:04:10 mav 1.26.4.2: #i73522# register later 2007/01/16 14:59:33 mav 1.26.4.1: #i73522# register as a modify listener
-rw-r--r--embedserv/source/embed/docholder.cxx32
1 files changed, 30 insertions, 2 deletions
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx
index 744aadf126ec..7415f1e4959b 100644
--- a/embedserv/source/embed/docholder.cxx
+++ b/embedserv/source/embed/docholder.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: docholder.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: rt $ $Date: 2006-12-05 12:51:07 $
+ * last change: $Author: obo $ $Date: 2007-01-23 07:34:08 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -682,6 +682,14 @@ void DocumentHolder::DisconnectFrameDocument()
{
try
{
+ uno::Reference< util::XModifyBroadcaster > xModifiable( m_xDocument, uno::UNO_QUERY_THROW );
+ xModifiable->removeModifyListener( (util::XModifyListener*)this );
+ }
+ catch( uno::Exception& )
+ {}
+
+ try
+ {
uno::Reference< util::XCloseBroadcaster > xBroadcaster(
m_xDocument, uno::UNO_QUERY_THROW );
xBroadcaster->removeCloseListener( (util::XCloseListener*)this );
@@ -702,6 +710,14 @@ void DocumentHolder::DisconnectFrameDocument()
void DocumentHolder::CloseDocument()
{
+ try
+ {
+ uno::Reference< util::XModifyBroadcaster > xModifiable( m_xDocument, uno::UNO_QUERY_THROW );
+ xModifiable->removeModifyListener( (util::XModifyListener*)this );
+ }
+ catch( uno::Exception& )
+ {}
+
uno::Reference< util::XCloseBroadcaster > xBroadcaster(
m_xDocument, uno::UNO_QUERY );
if ( xBroadcaster.is() )
@@ -962,6 +978,18 @@ void DocumentHolder::show()
{
OSL_ENSURE( sal_False, "Can not adjust the frame!\n" );
}
+
+
+ if ( !m_bLink )
+ {
+ try
+ {
+ uno::Reference< util::XModifyBroadcaster > xModifiable( m_xDocument, uno::UNO_QUERY_THROW );
+ xModifiable->addModifyListener( (util::XModifyListener*)this );
+ }
+ catch( uno::Exception& )
+ {}
+ }
}
if ( !m_bLink )