Commits

Anonymous committed 266f579

mib20: OfficeDocumentManager: add close listeners when building initial document list

Comments (0)

Files changed (1)

ucb/source/ucp/tdoc/tdoc_docmgr.cxx

 
                         m_aDocs[ aDocId ]
                             = StorageInfo( aTitle, xStorage, xModel );
+
+                        uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster(
+                            xModel, uno::UNO_QUERY );
+                        OSL_ENSURE( xCloseBroadcaster.is(),
+                            "buildDocumentsList: got no close broadcaster!" );
+
+                        if ( xCloseBroadcaster.is() )
+                            xCloseBroadcaster->addCloseListener( m_xDocCloseListener );
                     }
                 }
             }