summaryrefslogtreecommitdiff
path: root/embedserv/source
diff options
context:
space:
mode:
authorAndreas Bille <abi@openoffice.org>2003-04-04 08:31:56 +0000
committerAndreas Bille <abi@openoffice.org>2003-04-04 08:31:56 +0000
commit57ac1efcf774919cb6ad58ccbbbc8ba29c36a7e4 (patch)
treec58d8ff47934856b9f85056517ed36a22275a663 /embedserv/source
parent977853ced949b95a0b96a918e929e9fc7393e6f3 (diff)
#i2822# statuslistener
Diffstat (limited to 'embedserv/source')
-rw-r--r--embedserv/source/embed/docholder.cxx13
-rwxr-xr-xembedserv/source/embed/ed_ioleobject.cxx8
-rw-r--r--embedserv/source/embed/intercept.cxx23
-rw-r--r--embedserv/source/inc/docholder.hxx10
-rw-r--r--embedserv/source/inc/intercept.hxx10
5 files changed, 42 insertions, 22 deletions
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx
index ed95bc4b342a..330e7508b44f 100644
--- a/embedserv/source/embed/docholder.cxx
+++ b/embedserv/source/embed/docholder.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docholder.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: mav $ $Date: 2003-04-02 15:44:17 $
+ * last change: $Author: abi $ $Date: 2003-04-04 09:31:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -259,7 +259,7 @@ uno::Reference< frame::XFrame > DocumentHolder::DocumentFrame()
xDPI(m_xFrame,uno::UNO_QUERY);
if(xDPI.is())
xDPI->registerDispatchProviderInterceptor(
- new Interceptor(m_pOLEInterface));
+ new Interceptor(m_pOLEInterface,this));
}
return m_xFrame;
@@ -435,6 +435,13 @@ void DocumentHolder::setTitle(const rtl::OUString& aDocumentName)
m_aDocumentNamePart = aDocumentName;
}
+
+void DocumentHolder::setContainerName(const rtl::OUString& aContainerName)
+{
+ m_aContainerName = aContainerName;
+}
+
+
void DocumentHolder::hide()
{
if(m_xFrame.is())
diff --git a/embedserv/source/embed/ed_ioleobject.cxx b/embedserv/source/embed/ed_ioleobject.cxx
index 131a7cf7c915..7d5d93e1f33f 100755
--- a/embedserv/source/embed/ed_ioleobject.cxx
+++ b/embedserv/source/embed/ed_ioleobject.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ed_ioleobject.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: mav $ $Date: 2003-04-02 15:44:17 $
+ * last change: $Author: abi $ $Date: 2003-04-04 09:31:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -92,7 +92,9 @@ STDMETHODIMP EmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, LPCOLES
m_pDocHolder->setTitle(
rtl::OUString(
(sal_Unicode*)szContainerObj));
-// RTL_CONSTASCII_USTRINGPARAM(szContainerObj));
+ m_pDocHolder->setContainerName(
+ rtl::OUString(
+ (sal_Unicode*)szContainerApp));
return S_OK;
}
diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx
index bf107b02bfac..532f54534e0c 100644
--- a/embedserv/source/embed/intercept.cxx
+++ b/embedserv/source/embed/intercept.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: intercept.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: abi $ $Date: 2003-04-04 09:03:46 $
+ * last change: $Author: abi $ $Date: 2003-04-04 09:31:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,7 +65,9 @@
#ifndef _EMBEDDOC_HXX_
#include "embeddoc.hxx"
#endif
-
+#ifndef _DOCHOLDER_HXX_
+#include "docholder.hxx"
+#endif
using namespace ::com::sun::star;
@@ -160,8 +162,11 @@ void SAL_CALL Interceptor::dispose()
-Interceptor::Interceptor(EmbedDocument_Impl* pOLEInterface)
+Interceptor::Interceptor(
+ EmbedDocument_Impl* pOLEInterface,
+ DocumentHolder* pDocH)
: m_pOLEInterface(pOLEInterface),
+ m_pDocH(pDocH),
m_pStatCL(0),
m_pDisposeEventListeners(0)
{
@@ -227,8 +232,9 @@ Interceptor::addStatusListener(
RTL_CONSTASCII_USTRINGPARAM("Update"));
aStateEvent.IsEnabled = sal_True;
aStateEvent.Requery = sal_False;
- aStateEvent.State <<= rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("update"));
+ aStateEvent.State <<= (rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("($1) ")) +
+ m_pDocH->getTitle());
Control->statusChanged(aStateEvent);
{
@@ -253,8 +259,9 @@ Interceptor::addStatusListener(
RTL_CONSTASCII_USTRINGPARAM("Close and Return"));
aStateEvent.IsEnabled = sal_True;
aStateEvent.Requery = sal_False;
- aStateEvent.State <<= rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("closeandreturn"));
+ aStateEvent.State <<= (rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("($2) ")) +
+ m_pDocH->getContainerName());
Control->statusChanged(aStateEvent);
diff --git a/embedserv/source/inc/docholder.hxx b/embedserv/source/inc/docholder.hxx
index 146bca82b01d..d2880952031f 100644
--- a/embedserv/source/inc/docholder.hxx
+++ b/embedserv/source/inc/docholder.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docholder.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: mav $ $Date: 2003-04-02 15:44:18 $
+ * last change: $Author: abi $ $Date: 2003-04-04 09:31:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,7 +97,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
- ::rtl::OUString m_aDocumentNamePart,m_aFilterName;
+ ::rtl::OUString m_aContainerName,m_aDocumentNamePart,m_aFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > DocumentFrame();
@@ -115,6 +115,10 @@ public:
void resizeWin( const SIZEL& rNewSize );
void setTitle(const rtl::OUString& aDocumentName);
+ rtl::OUString getTitle() const { return m_aDocumentNamePart; }
+
+ void setContainerName(const rtl::OUString& aContainerName);
+ rtl::OUString getContainerName() const { return m_aContainerName; }
void show();
diff --git a/embedserv/source/inc/intercept.hxx b/embedserv/source/inc/intercept.hxx
index 9ecc786dadff..02b9cef97c80 100644
--- a/embedserv/source/inc/intercept.hxx
+++ b/embedserv/source/inc/intercept.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: intercept.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: abi $ $Date: 2003-04-04 09:03:46 $
+ * last change: $Author: abi $ $Date: 2003-04-04 09:31:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -84,7 +84,7 @@
class StatusChangeListenerContainer;
class EmbedDocument_Impl;
-
+class DocumentHolder;
class Interceptor
: public ::cppu::WeakImplHelper3<
@@ -94,7 +94,7 @@ class Interceptor
{
public:
- Interceptor(EmbedDocument_Impl* pOLEInterface);
+ Interceptor(EmbedDocument_Impl* pOLEInterface,DocumentHolder* pDocH);
~Interceptor();
// overwritten to release the statuslistner.
@@ -207,7 +207,7 @@ private:
osl::Mutex m_aMutex;
EmbedDocument_Impl* m_pOLEInterface;
-
+ DocumentHolder* m_pDocH;
::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatchProvider;