summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sw/source/ui/inc/unodispatch.hxx6
-rw-r--r--sw/source/ui/inc/unotxvw.hxx5
-rw-r--r--sw/source/ui/inc/view.hxx6
-rw-r--r--sw/source/ui/inc/wrtsh.hxx8
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx68
-rw-r--r--sw/source/ui/uiview/view.cxx10
-rw-r--r--sw/source/ui/uno/unodispatch.cxx41
-rw-r--r--sw/source/ui/uno/unotxvw.cxx27
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx81
9 files changed, 97 insertions, 155 deletions
diff --git a/sw/source/ui/inc/unodispatch.hxx b/sw/source/ui/inc/unodispatch.hxx
index 27bf9b34b03b..e6afe78e7c06 100644
--- a/sw/source/ui/inc/unodispatch.hxx
+++ b/sw/source/ui/inc/unodispatch.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodispatch.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: os $ $Date: 2001-03-13 10:45:47 $
+ * last change: $Author: os $ $Date: 2001-07-12 13:10:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -149,6 +149,8 @@ public:
//XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ static const sal_Char* GetDBChangeURL();
};
#endif
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index 609d69e0b8a8..ed11006825bc 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unotxvw.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: os $ $Date: 2001-06-05 07:44:35 $
+ * last change: $Author: os $ $Date: 2001-07-12 13:10:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -182,6 +182,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
void NotifySelChanged();
+ void NotifyDBChanged();
SwView* GetView() {return pView;}
void Invalidate();
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 53188627489d..15cf54964555 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: view.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: jp $ $Date: 2001-04-30 15:59:40 $
+ * last change: $Author: os $ $Date: 2001-07-12 13:10:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -600,6 +600,8 @@ public:
SwView(SfxViewFrame* pFrame, SfxViewShell*);
~SwView();
+
+ void NotifyDBChanged();
};
// ----------------- inline Methoden ----------------------
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 7ebfd9e79b6a..37aa4a6ba6c9 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: wrtsh.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: jp $ $Date: 2001-05-07 08:51:42 $
+ * last change: $Author: os $ $Date: 2001-07-12 13:10:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -262,6 +262,9 @@ typedef FASTBOOL (SwWrtShell:: *FNSimpleMove)();
void Edit();
BOOL IsNoEdit() const { return bNoEdit; }
+ // change current data base and notify
+ void ChgDBData(const SwDBData& SwDBData);
+
// Loeschen
long DelToEndOfLine();
long DelToStartOfLine();
@@ -572,6 +575,7 @@ private:
FASTBOOL MoveBookMark( BookMarkMove eFuncId,
USHORT nPos = 0,
BOOL bStart = TRUE );
+
};
inline void SwWrtShell::ResetCursorStack()
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index cf57342de58f..754e723cd62b 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: uivwimp.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: jp $ $Date: 2001-07-04 18:18:43 $
+ * last change: $Author: os $ $Date: 2001-07-12 13:10:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -287,9 +287,6 @@ void SwView_Impl::AddClipboardListener()
pClipEvtLstnr->AddRemoveListener( TRUE );
}
}
-
-
-
// ------------------------- SwScannerEventListener ---------------------
SwScannerEventListener::~SwScannerEventListener()
@@ -378,64 +375,3 @@ JP 4.7.2001: change for WebTop - get Clipboard from the Window.
}
-/*------------------------------------------------------------------------
-
- $Log: not supported by cvs2svn $
- Revision 1.3 2001/04/30 15:59:56 jp
- use Clipboard state listener instead of polling
-
- Revision 1.2 2000/11/07 14:38:25 os
- Dispatch interface for database component
-
- Revision 1.1.1.1 2000/09/18 17:14:49 hr
- initial import
-
- Revision 1.14 2000/09/18 16:06:11 willem.vandorp
- OpenOffice header added.
-
- Revision 1.13 2000/09/07 15:59:32 os
- change: SFX_DISPATCHER/SFX_BINDINGS removed
-
- Revision 1.12 2000/06/26 10:44:13 jp
- must change: GetAppWindow->GetDefaultDevice
-
- Revision 1.11 2000/05/29 08:03:23 os
- new scanner interface
-
- Revision 1.10 2000/05/09 14:43:13 os
- BASIC interface partially removed
-
- Revision 1.9 2000/03/23 07:50:24 os
- UNO III
-
- Revision 1.8 1999/01/27 08:58:26 OS
- #56371# TF_ONE51
-
-
- Rev 1.7 27 Jan 1999 09:58:26 OS
- #56371# TF_ONE51
-
- Rev 1.6 30 Sep 1998 11:37:50 OS
- #52654# ueberfluessigen Aufruf entfernt
-
- Rev 1.5 02 Jun 1998 15:51:16 OS
- TF_STARONE raus; Ctor nicht mehr inline
-
- Rev 1.4 03 Apr 1998 14:38:28 OS
- UnoObject fuer die View reaktiviert
-
- Rev 1.3 04 Feb 1998 17:28:44 OS
- Starone raus
-
- Rev 1.2 29 Jan 1998 09:21:06 OS
- TF_STARONE
-
- Rev 1.1 19 Jan 1998 14:59:14 OS
- UNO-Aenderungen
-
- Rev 1.0 16 Dec 1997 11:58:48 OS
- Impl-Pointer fuer UNO
-
-------------------------------------------------------------------------*/
-
-
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 88f6cd8a1646..fe6633d166a4 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: view.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: os $ $Date: 2001-07-09 10:52:27 $
+ * last change: $Author: os $ $Date: 2001-07-12 13:10:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1670,4 +1670,10 @@ BOOL SwView::IsPasteSpecialAllowed()
}
return bPasteSpecialState;
}
+/* -----------------------------12.07.01 13:25--------------------------------
+ ---------------------------------------------------------------------------*/
+void SwView::NotifyDBChanged()
+{
+ GetViewImpl()->GetUNOObject_Impl()->NotifyDBChanged();
+}
diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx
index e99207ecc94a..8d70b53cfa84 100644
--- a/sw/source/ui/uno/unodispatch.cxx
+++ b/sw/source/ui/uno/unodispatch.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodispatch.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: os $ $Date: 2001-06-25 14:02:45 $
+ * last change: $Author: os $ $Date: 2001-07-12 13:10:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -103,7 +103,7 @@ const char* cURLFormLetter = ".uno:DataSourceBrowser/FormLetter";
const char* cURLInsertContent = ".uno:DataSourceBrowser/InsertContent";//data into fields
const char* cURLInsertColumns = ".uno:DataSourceBrowser/InsertColumns";//data into text
const char* cURLDocumentDataSource = ".uno:DataSourceBrowser/DocumentDataSource";//current data source of the document
-
+const sal_Char* cInternalDBChangeNotification = ".uno::Writer/DataSourceChanged";
/*-- 07.11.00 13:25:51---------------------------------------------------
-----------------------------------------------------------------------*/
@@ -273,10 +273,36 @@ void SwXDispatch::dispatch(
{
pNewDBMgr->ExecuteFormLetter(rSh, aArgs);
}
- else if (aURL.Complete.compareToAscii(cURLDocumentDataSource))
+ else if(!aURL.Complete.compareToAscii(cURLDocumentDataSource))
{
OSL_ENSURE(sal_False, "SwXDispatch::dispatch: this URL is not to be dispatched!");
}
+ else if(!aURL.Complete.compareToAscii(cInternalDBChangeNotification))
+ {
+ FeatureStateEvent aEvent;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Source = *(cppu::OWeakObject*)this;
+
+ const SwDBData& rData = m_pView->GetWrtShell().GetDBDesc();
+ ::svx::ODataAccessDescriptor aDescriptor;
+ aDescriptor[::svx::daDataSource] <<= rData.sDataSource;
+ aDescriptor[::svx::daCommand] <<= rData.sCommand;
+ aDescriptor[::svx::daCommandType] <<= rData.nCommandType;
+
+ aEvent.State <<= aDescriptor.createPropertyValueSequence();
+ aEvent.IsEnabled = rData.sDataSource.getLength() > 0;
+
+ StatusListenerList::iterator aListIter = m_aListenerList.begin();
+ for(aListIter = m_aListenerList.begin(); aListIter != m_aListenerList.end(); ++aListIter)
+ {
+ StatusStruct_Impl aStatus = *aListIter;
+ if(!aStatus.aURL.Complete.compareToAscii(cURLDocumentDataSource))
+ {
+ aEvent.FeatureURL = aStatus.aURL;
+ aStatus.xListener->statusChanged( aEvent );
+ }
+ }
+ }
else
throw RuntimeException();
@@ -405,4 +431,11 @@ void SwXDispatch::disposing( const EventObject& rSource ) throw(RuntimeException
}
m_pView = 0;
}
+/* -----------------------------12.07.01 13:30--------------------------------
+
+ ---------------------------------------------------------------------------*/
+const sal_Char* SwXDispatch::GetDBChangeURL()
+{
+ return cInternalDBChangeNotification;
+}
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index f21b30b46e28..562673d09585 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unotxvw.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: os $ $Date: 2001-07-04 08:53:50 $
+ * last change: $Author: os $ $Date: 2001-07-12 13:10:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,6 +81,9 @@
#ifndef _UNOTXVW_HXX
#include <unotxvw.hxx>
#endif
+#ifndef _UNODISPATCH_HXX
+#include <unodispatch.hxx>
+#endif
#ifndef _UNOMAP_HXX
#include <unomap.hxx>
#endif
@@ -182,6 +185,8 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::view;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::frame;
using namespace rtl;
SV_IMPL_PTRARR( SelectionChangeListenerArr, XSelectionChangeListenerPtr );
@@ -1001,6 +1006,24 @@ void SwXTextView::NotifySelChanged()
(*pObj)->selectionChanged(aEvent);
}
}
+/* -----------------------------12.07.01 13:26--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void SwXTextView::NotifyDBChanged()
+{
+ URL aURL;
+ aURL.Complete = C2U(SwXDispatch::GetDBChangeURL());
+
+ sal_uInt16 nCount = aSelChangedListeners.Count();
+ for ( sal_uInt16 i = nCount; i--; )
+ {
+ Reference< view::XSelectionChangeListener > *pObj = aSelChangedListeners[i];
+ Reference<XDispatch> xDispatch((*pObj), UNO_QUERY);
+ if(xDispatch.is())
+ xDispatch->dispatch(aURL, Sequence<PropertyValue>(0));
+ }
+}
+
/* -----------------------------06.04.00 11:07--------------------------------
---------------------------------------------------------------------------*/
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index b74aafbecbdb..6f683b03e218 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: wrtsh1.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: ama $ $Date: 2001-07-05 14:43:51 $
+ * last change: $Author: os $ $Date: 2001-07-12 13:10:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1551,78 +1551,13 @@ void SwWrtShell::NewCoreSelection()
}
// --------------
+void SwWrtShell::ChgDBData(const SwDBData& aDBData)
+{
+ SwEditShell::ChgDBData(aDBData);
+ //notify the db-beamer if available
+ GetView().NotifyDBChanged();
+}
-/*************************************************************************
-
- $Log: not supported by cvs2svn $
- Revision 1.10 2001/04/24 10:07:58 ama
- Fix #77923#: Automatic contour refreshing after OLE editing
-
- Revision 1.9 2001/03/09 17:16:29 jp
- remove SvData usage
-
- Revision 1.8 2001/03/01 12:33:03 jp
- Bug #74707#: use new flag CheckForOLEInCaption
-
- Revision 1.7 2001/02/23 12:45:30 os
- Complete use of DefaultNumbering component
-
- Revision 1.6 2000/11/14 18:28:14 jp
- use moduleoptions
-
- Revision 1.5 2000/10/27 14:29:47 os
- sba includes removed
-
- Revision 1.4 2000/10/25 15:36:07 jp
- use CharClass/BreakIt instead of old WordSelection
-
- Revision 1.3 2000/10/25 12:06:30 jp
- Spellchecker/Hyphenator are not longer member of the shells
-
- Revision 1.2 2000/10/06 13:41:54 jp
- should changes: don't use IniManager
-
- Revision 1.1.1.1 2000/09/18 17:14:53 hr
- initial import
-
- Revision 1.342 2000/09/18 16:06:27 willem.vandorp
- OpenOffice header added.
-
- Revision 1.341 2000/08/17 11:36:19 jp
- remove the SW graphicmanager
-
- Revision 1.340 2000/08/04 10:54:03 jp
- Soft-/HardHyphens & HardBlanks changed from attribute to unicode character; remove unused methods
-
- Revision 1.339 2000/07/04 15:19:25 tl
- XHyphenator1 => XHyphenator
-
- Revision 1.338 2000/06/27 17:42:38 jp
- Bug #76332#: internal SplitNode don't insert a new node before a table
-
- Revision 1.337 2000/06/26 13:28:29 os
- InsertDBColumnCntnt removed
-
- Revision 1.336 2000/05/19 12:58:39 jp
- use WordSelection class for check chars
-
- Revision 1.335 2000/05/19 11:00:26 jp
- Changes for Unicode
-
- Revision 1.334 2000/04/20 12:51:14 os
- GetName() returns String&
-
- Revision 1.333 2000/04/19 11:18:25 os
- UNICODE
-
- Revision 1.332 2000/03/30 13:26:18 os
- UNO III
-
- Revision 1.331 2000/03/23 07:51:11 os
- UNO III
-
-*************************************************************************/
-