summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx94
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx6
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx17
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx35
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx324
-rw-r--r--dbaccess/source/ui/inc/JoinController.hxx6
-rw-r--r--dbaccess/source/ui/inc/RelationController.hxx6
-rw-r--r--dbaccess/source/ui/inc/TableController.hxx6
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx12
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc8
-rw-r--r--dbaccess/source/ui/inc/exsrcbrw.hxx6
-rw-r--r--dbaccess/source/ui/inc/querycontroller.hxx6
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx6
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx6
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx6
16 files changed, 269 insertions, 281 deletions
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 189ac58b1bd3..fdaa1ff9042b 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: brwctrlr.cxx,v $
*
- * $Revision: 1.56 $
+ * $Revision: 1.57 $
*
- * last change: $Author: fs $ $Date: 2001-10-29 15:14:28 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:41:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1117,8 +1117,8 @@ void SbaXDataBrowserController::elementReplaced(const ::com::sun::star::containe
// -----------------------------------------------------------------------
sal_Bool SbaXDataBrowserController::suspend(sal_Bool bSuspend) throw( RuntimeException )
{
- m_bSuspending = sal_True;
-
+// m_bSuspending = sal_True;
+//
// have a pending open operation ?
if (PendingLoad())
{
@@ -1163,10 +1163,9 @@ sal_Bool SbaXDataBrowserController::suspend(sal_Bool bSuspend) throw( RuntimeExc
m_aAsyncGetCellFocus.CancelCall();
m_aAsyncInvalidateAll.CancelCall();
- sal_uInt16 nReturn = SaveData(sal_True, sal_False);
-
- m_bSuspending = sal_False;
- return nReturn != 0;
+ sal_Bool bSuccess = SaveModified();
+// m_bSuspending = sal_False;
+ return bSuccess;
}
// -----------------------------------------------------------------------
void SbaXDataBrowserController::disposing()
@@ -1414,7 +1413,7 @@ sal_Bool SbaXDataBrowserController::confirmDelete(const ::com::sun::star::sdb::R
return sal_True;
}
//------------------------------------------------------------------------------
-FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId)
+FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
{
FeatureState aReturn;
// (disabled automatically)
@@ -1831,7 +1830,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId)
// the options not supported by the data source will be removed automatically
else
{
- if (!SaveData(sal_True, sal_False))
+ if ( !SaveModified( ) )
// give the user a chance to save the current record (if neccessary)
break;
@@ -1846,7 +1845,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId)
break;
case ID_BROWSER_SEARCH:
- if (SaveData(sal_True, sal_False))
+ if ( SaveModified( ) )
ExecuteSearch();
break;
@@ -1981,7 +1980,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId)
break;
case ID_BROWSER_REFRESH:
- if (SaveData(sal_True, sal_False))
+ if ( SaveModified( ) )
{
if (!reloadForm(Reference< XLoadable >(getRowSet(), UNO_QUERY)))
criticalFail();
@@ -2057,7 +2056,8 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bCommit)
bResult = sal_False;
}
- OGenericUnoController::SaveModified();
+ InvalidateFeature(ID_BROWSER_SAVEDOC);
+ InvalidateFeature(ID_BROWSER_UNDO);
return bResult;
}
@@ -2141,40 +2141,40 @@ IMPL_LINK(SbaXDataBrowserController, OnInvalidateClipboard, void*, EMPTYARG)
return 0L;
}
-//------------------------------------------------------------------
-sal_uInt16 SbaXDataBrowserController::SaveData(sal_Bool bUI, sal_Bool bForBrowsing)
-{
- if (!getBrowserView())
- return sal_True;
-
- if (!isValidCursor())
- return sal_True;
-
- if (bUI && GetState(ID_BROWSER_SAVEDOC).bEnabled)
- {
- getBrowserView()->getVclControl()->GrabFocus();
-
- QueryBox aQry(getBrowserView()->getVclControl(), ModuleRes(QUERY_BRW_SAVEMODIFIED));
- if (bForBrowsing)
- aQry.AddButton(ResId(RID_STR_NEW_TASK), RET_NEWTASK,
- BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
-
- switch (aQry.Execute())
- {
- case RET_NO:
- Execute(ID_BROWSER_UNDO);
- return sal_True;
- case RET_CANCEL:
- return sal_False;
- case RET_NEWTASK:
- return RET_NEWTASK;
- }
- }
-
-
- return OGenericUnoController::SaveData(bUI,bForBrowsing);
-}
-
+// ------------------------------------------------------------------------------
+//sal_uInt16 SbaXDataBrowserController::SaveData(sal_Bool bUI, sal_Bool bForBrowsing)
+//{
+// if (!getBrowserView())
+// return sal_True;
+//
+// if (!isValidCursor())
+// return sal_True;
+//
+// if (bUI && GetState(ID_BROWSER_SAVEDOC).bEnabled)
+// {
+// getBrowserView()->getVclControl()->GrabFocus();
+//
+// QueryBox aQry(getBrowserView()->getVclControl(), ModuleRes(QUERY_BRW_SAVEMODIFIED));
+// if (bForBrowsing)
+// aQry.AddButton(ResId(RID_STR_NEW_TASK), RET_NEWTASK,
+// BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
+//
+// switch (aQry.Execute())
+// {
+// case RET_NO:
+// Execute(ID_BROWSER_UNDO);
+// return sal_True;
+// case RET_CANCEL:
+// return sal_False;
+// case RET_NEWTASK:
+// return RET_NEWTASK;
+// }
+// }
+//
+//
+// return OGenericUnoController::SaveData(bUI,bForBrowsing);
+//}
+//
// -------------------------------------------------------------------------
Reference< XPropertySet > SbaXDataBrowserController::getBoundField(sal_uInt16 nViewPos) const
{
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index 3b8e71f77e1a..33b457e03c3d 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dsEntriesNoExp.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: oj $ $Date: 2001-09-20 12:57:49 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:40:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -114,7 +114,7 @@ String SbaTableQueryBrowser::GetEntryText( SvLBoxEntry* _pEntry )
}
// -----------------------------------------------------------------------------
-SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( SvLBoxEntry* _pEntry )
+SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( SvLBoxEntry* _pEntry ) const
{
if (!_pEntry)
return etUnknown;
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index b9c1d7b335c7..6452fa94ec08 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dsbrowserDnD.cxx,v $
*
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: oj $ $Date: 2001-12-07 13:13:04 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:40:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1028,10 +1028,10 @@ namespace dbaui
if(xRename.is())
{
xRename->rename(sNewName);
- nRet = 1;
+ nRet = 1;
if(etQuery != eType)
{// special handling for tables and views
- xProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema;
+ xProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema;
xProp->getPropertyValue(PROPERTY_CATALOGNAME) >>= sCatalog;
::dbtools::composeTableName(xMeta,sCatalog,sSchema,sNewName,sName,sal_False);
sOldName = sName;
@@ -1105,19 +1105,19 @@ namespace dbaui
return 0;
}
// -----------------------------------------------------------------------------
- sal_Bool SbaTableQueryBrowser::isEntryCutAllowed(SvLBoxEntry* _pEntry)
+ sal_Bool SbaTableQueryBrowser::isEntryCutAllowed(SvLBoxEntry* _pEntry) const
{
// at the momoent this isn't allowed
return sal_False;
}
// -----------------------------------------------------------------------------
- sal_Bool SbaTableQueryBrowser::isEntryCopyAllowed(SvLBoxEntry* _pEntry)
+ sal_Bool SbaTableQueryBrowser::isEntryCopyAllowed(SvLBoxEntry* _pEntry) const
{
EntryType eType = getEntryType(_pEntry);
return (eType == etTable || eType == etQuery || eType == etView);
}
// -----------------------------------------------------------------------------
- sal_Bool SbaTableQueryBrowser::isEntryPasteAllowed(SvLBoxEntry* _pEntry)
+ sal_Bool SbaTableQueryBrowser::isEntryPasteAllowed(SvLBoxEntry* _pEntry) const
{
sal_Bool bAllowed = sal_False;
EntryType eType = getEntryType(_pEntry);
@@ -1218,6 +1218,9 @@ namespace dbaui
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.34 2001/12/07 13:13:04 oj
+ * #95728# insert try catch
+ *
* Revision 1.33 2001/11/23 14:51:40 oj
* #95142# check eState of parser
*
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 0fc6f6b70c85..e967394f01b9 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: exsrcbrw.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: fs $ $Date: 2001-10-16 14:43:19 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:40:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -347,18 +347,17 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows
::com::sun::star::util::URL aNewUrl = aURL;
// split the ::com::sun::star::util::URL
- Reference< ::com::sun::star::util::XURLTransformer > xTransformer(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer")), UNO_QUERY);
- OSL_ENSURE(xTransformer.is(), "SbaExternalSourceBrowser::queryDispatch : could not create an URLTransformer !");
- if (xTransformer.is())
- xTransformer->parseStrict(aNewUrl);
+ OSL_ENSURE( m_xUrlTransformer.is(), "SbaExternalSourceBrowser::queryDispatch : could not create an URLTransformer !" );
+ if ( m_xUrlTransformer.is() )
+ m_xUrlTransformer->parseStrict( aNewUrl );
// set a new mark
aNewUrl.Mark = ::rtl::OUString::createFromAscii("DB/FormGridView");
// this controller is instantiated when somebody dispatches the ".component:DB/FormGridView" in any
// frame, so we use "FormGridView" as mark that a dispatch request came from this view
- if (xTransformer.is())
- xTransformer->assemble(aNewUrl);
+ if (m_xUrlTransformer.is())
+ m_xUrlTransformer->assemble(aNewUrl);
Reference< ::com::sun::star::frame::XDispatchProvider > xFrameDispatcher(m_xCurrentFrame, UNO_QUERY);
if (xFrameDispatcher.is())
@@ -530,16 +529,16 @@ void SbaExternalSourceBrowser::stopListening()
}
//------------------------------------------------------------------
-sal_uInt16 SbaExternalSourceBrowser::SaveData(sal_Bool bUI, sal_Bool bForBrowsing)
-{
- if (m_bSuspending)
- // don't ask the user if we're beeing suspended currently
- // this is the responsibility of our owner, as we are only an external view to an existing form
- // 73384 - 22.02.00 - FS
- return (sal_uInt16)sal_True;
-
- return SbaXDataBrowserController::SaveData(bUI, bForBrowsing);
-}
+//sal_uInt16 SbaExternalSourceBrowser::SaveData(sal_Bool bUI, sal_Bool bForBrowsing)
+//{
+// if (m_bSuspending)
+// // don't ask the user if we're beeing suspended currently
+// // this is the responsibility of our owner, as we are only an external view to an existing form
+// // 73384 - 22.02.00 - FS
+// return (sal_uInt16)sal_True;
+//
+// return SbaXDataBrowserController::SaveData(bUI, bForBrowsing);
+//}
//==================================================================
//==================================================================
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 5f74c2f79789..42eb9ebd1baf 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: genericcontroller.cxx,v $
*
- * $Revision: 1.30 $
+ * $Revision: 1.31 $
*
- * last change: $Author: oj $ $Date: 2001-11-22 13:17:07 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:40:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -147,10 +147,18 @@ using namespace ::dbtools;
using namespace ::dbaui;
using namespace ::comphelper;
-::rtl::OUString URL_CONFIRM_DELETION(::rtl::OUString::createFromAscii(".uno:FormSlots/ConfirmDeletion"));
+// -------------------------------------------------------------------------
+#define ALL_FEATURES -1
+
+// -------------------------------------------------------------------------
+const ::rtl::OUString& getConfirmDeletionURL()
+{
+ static const ::rtl::OUString sConfirmDeletionURL( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormSlots/ConfirmDeletion" ) );
+ return sConfirmDeletionURL;
+}
// -------------------------------------------------------------------------
-OGenericUnoController::OGenericUnoController(const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM)
+OGenericUnoController::OGenericUnoController(const Reference< XMultiServiceFactory >& _rM)
:OGenericUnoController_COMPBASE(m_aMutex)
,m_aAsyncInvalidateAll(LINK(this, OGenericUnoController, OnAsyncInvalidateAll))
,m_aAsyncCloseTask(LINK(this, OGenericUnoController, OnAsyncCloseTask))
@@ -161,7 +169,7 @@ OGenericUnoController::OGenericUnoController(const Reference< ::com::sun::star::
{
try
{
- m_xUrlTransformer = Reference< ::com::sun::star::util::XURLTransformer > (_rM->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer")), UNO_QUERY);
+ m_xUrlTransformer = Reference< XURLTransformer > (_rM->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer")), UNO_QUERY);
}
catch(Exception&)
{
@@ -214,25 +222,24 @@ IMPL_LINK(OGenericUnoController, OnAsyncInvalidateAll, void*, EMPTYARG)
return 0L;
}
// -----------------------------------------------------------------------------
-Reference< XWindow > OGenericUnoController::getComponentWindow()
+Reference< XWindow > OGenericUnoController::getComponentWindow() const
{
- return VCLUnoHelper::GetInterface(getView());
+ return VCLUnoHelper::GetInterface( getView() );
}
// -------------------------------------------------------------------------
void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException)
{
- Reference< ::com::sun::star::awt::XWindow > xParent;
- Reference< ::com::sun::star::frame::XFrame > xFrame;
+ Reference< XWindow > xParent;
+ Reference< XFrame > xFrame;
PropertyValue aValue;
const Any* pBegin = aArguments.getConstArray();
const Any* pEnd = pBegin + aArguments.getLength();
- ::rtl::OUString aFrameName = ::rtl::OUString::createFromAscii("Frame");
- for(;pBegin != pEnd;++pBegin)
+ for ( ; pBegin != pEnd; ++pBegin )
{
- if((*pBegin >>= aValue) && aValue.Name == aFrameName)
+ if ( ( *pBegin >>= aValue ) && ( 0 == aValue.Name.compareToAscii( "Frame" ) ) )
{
if((aValue.Value >>= xFrame) && xFrame.is())
{
@@ -308,33 +315,46 @@ Sequence< sal_Int8 > SAL_CALL OGenericUnoController::getImplementationId( ) thr
}
// -------------------------------------------------------------------------
+sal_Bool OGenericUnoController::startFrameListening( )
+{
+ if ( m_xCurrentFrame.is() )
+ m_xCurrentFrame->addFrameActionListener( static_cast< XFrameActionListener* >( this ) );
+ return m_xCurrentFrame.is();
+}
+
+// -------------------------------------------------------------------------
+void OGenericUnoController::stopFrameListening( )
+{
+ if ( m_xCurrentFrame.is() )
+ m_xCurrentFrame->removeFrameActionListener( static_cast< XFrameActionListener* >( this ) );
+}
+
+// -------------------------------------------------------------------------
void OGenericUnoController::disposing(const EventObject& Source) throw( RuntimeException )
{
// our frame ?
- Reference< ::com::sun::star::frame::XFrame > xSourceFrame(Source.Source, UNO_QUERY);
- if (m_xCurrentFrame.is() && (xSourceFrame == m_xCurrentFrame))
- m_xCurrentFrame->removeFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this);
+ Reference< XFrame > xSourceFrame(Source.Source, UNO_QUERY);
+ if ( xSourceFrame == m_xCurrentFrame )
+ stopFrameListening( );
}
//------------------------------------------------------------------------
void OGenericUnoController::modified(const EventObject& aEvent) throw( RuntimeException )
{
m_bCurrentlyModified = sal_True;
- InvalidateFeature(::rtl::OUString::createFromAscii(".uno:Save"));
+ InvalidateFeature(ID_BROWSER_SAVEDOC);
InvalidateFeature(ID_BROWSER_UNDO);
}
// -----------------------------------------------------------------------
-void OGenericUnoController::attachFrame(const Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( RuntimeException )
+void OGenericUnoController::attachFrame(const Reference< XFrame > & xFrame) throw( RuntimeException )
{
- if (m_xCurrentFrame.is())
- m_xCurrentFrame->removeFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this);
+ stopFrameListening( );
m_xCurrentFrame = xFrame;
- if (m_xCurrentFrame.is())
- {
- m_xCurrentFrame->addFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this);
+
+ if ( startFrameListening( ) )
m_bFrameUiActive = m_xCurrentFrame->isActive();
- }
}
+
// -----------------------------------------------------------------------
sal_Bool OGenericUnoController::ImplInvalidateTBItem(sal_uInt16 nId, const FeatureState& rState)
{
@@ -364,7 +384,7 @@ sal_Bool OGenericUnoController::ImplInvalidateTBItem(sal_uInt16 nId, const Featu
}
// -----------------------------------------------------------------------
-void OGenericUnoController::ImplBroadcastFeatureState(const ::rtl::OUString& _rFeature, const Reference< ::com::sun::star::frame::XStatusListener > & xListener, sal_Bool _bIgnoreCache)
+void OGenericUnoController::ImplBroadcastFeatureState(const ::rtl::OUString& _rFeature, const Reference< XStatusListener > & xListener, sal_Bool _bIgnoreCache)
{
sal_uInt16 nFeat = (sal_uInt16)m_aSupportedFeatures[_rFeature];
FeatureState aFeatState(GetState(nFeat));
@@ -409,11 +429,11 @@ void OGenericUnoController::ImplBroadcastFeatureState(const ::rtl::OUString& _rF
}
rCachedState = aFeatState;
- ::com::sun::star::frame::FeatureStateEvent aEvent;
+ FeatureStateEvent aEvent;
aEvent.FeatureURL.Complete = _rFeature;
if (m_xUrlTransformer.is())
m_xUrlTransformer->parseStrict(aEvent.FeatureURL);
- aEvent.Source = (::com::sun::star::frame::XDispatch*)this;
+ aEvent.Source = (XDispatch*)this;
aEvent.IsEnabled = aFeatState.bEnabled;
aEvent.Requery = aFeatState.bRequery;
aEvent.State = aFeatState.aState;
@@ -422,7 +442,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const ::rtl::OUString& _rF
if (xListener.is())
xListener->statusChanged(aEvent);
else
- { // no -> iterate through all listeners responsible for the ::com::sun::star::util::URL
+ { // no -> iterate through all listeners responsible for the URL
DispatchIterator iterSearch = m_arrStatusListener.begin();
DispatchIterator iterEnd = m_arrStatusListener.end();
@@ -440,27 +460,11 @@ void OGenericUnoController::ImplBroadcastFeatureState(const ::rtl::OUString& _rF
}
// -----------------------------------------------------------------------
-void OGenericUnoController::InvalidateFeature(const ::rtl::OUString& _rURLPath, const Reference< ::com::sun::star::frame::XStatusListener > & _xListener, sal_Bool _bForceBroadcast)
+void OGenericUnoController::InvalidateFeature(const ::rtl::OUString& _rURLPath, const Reference< XStatusListener > & _xListener, sal_Bool _bForceBroadcast)
{
- FeaturePair aPair;
- aPair.nId = m_aSupportedFeatures[_rURLPath];
- aPair.xListener = _xListener;
- aPair.bForceBroadcast = _bForceBroadcast;
-
- sal_Bool bWasEmpty = sal_False;
- {
- ::osl::MutexGuard aGuard( m_aFeatureMutex);
- bWasEmpty = m_aFeaturesToInvalidate.empty();
- m_aFeaturesToInvalidate.push_back(aPair);
- }
- if(bWasEmpty)
- {
- m_aAsyncInvalidateAll.Call();
- return;
- }
-
- // ImplBroadcastFeatureState(rURLPath, xListener, _bForceBroadcast);
+ InvalidateFeature( m_aSupportedFeatures[_rURLPath], _xListener, _bForceBroadcast );
}
+
// -----------------------------------------------------------------------------
void OGenericUnoController::InvalidateFeature_Impl()
{
@@ -479,26 +483,26 @@ void OGenericUnoController::InvalidateFeature_Impl()
}
while(!bEmpty)
{
- if(aNextFeature.nId == -1)
+ if ( ALL_FEATURES == aNextFeature.nId )
{
InvalidateAll_Impl();
break;
}
else
{
- sal_Bool bFound = sal_False;
- SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.begin();
- for(;aIter != m_aSupportedFeatures.end();++aIter)
- {
- if(aIter->second == aNextFeature.nId)
- {
- ImplBroadcastFeatureState(aIter->first,aNextFeature.xListener, aNextFeature.bForceBroadcast);
- bFound = sal_True;
- break;
- }
- }
- if(!bFound)
+ SupportedFeatures::iterator aFeaturePos = ::std::find_if(
+ m_aSupportedFeatures.begin(),
+ m_aSupportedFeatures.end(),
+ ::std::bind2nd( SupportedFeaturesFunc(), aNextFeature.nId )
+ );
+
+ if ( m_aSupportedFeatures.end() != aFeaturePos )
+ // we really know this feature
+ ImplBroadcastFeatureState( aFeaturePos->first, aNextFeature.xListener, aNextFeature.bForceBroadcast );
+ else
+ // we don't know this feature -> at least give the TB a chance
ImplInvalidateTBItem((sal_uInt16)aNextFeature.nId, GetState((sal_uInt16)aNextFeature.nId));
+
}
::osl::MutexGuard aGuard( m_aFeatureMutex);
@@ -514,58 +518,30 @@ void OGenericUnoController::InvalidateFeature_Impl()
}
// -----------------------------------------------------------------------
-void OGenericUnoController::InvalidateFeature(sal_uInt16 _nId, const Reference< ::com::sun::star::frame::XStatusListener > & _xListener, sal_Bool _bForceBroadcast)
+void OGenericUnoController::InvalidateFeature(sal_uInt16 _nId, const Reference< XStatusListener > & _xListener, sal_Bool _bForceBroadcast)
{
FeaturePair aPair;
aPair.nId = _nId;
aPair.xListener = _xListener;
aPair.bForceBroadcast = _bForceBroadcast;
- sal_Bool bWasEmpty = sal_False;
+ sal_Bool bWasEmpty;
{
::osl::MutexGuard aGuard( m_aFeatureMutex);
bWasEmpty = m_aFeaturesToInvalidate.empty();
m_aFeaturesToInvalidate.push_back(aPair);
}
- if(bWasEmpty)
- {
+
+ if ( bWasEmpty )
m_aAsyncInvalidateAll.Call();
- return;
- }
-// sal_Bool bFound = sal_False;
-// SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.begin();
-// for(;aIter != m_aSupportedFeatures.end();++aIter)
-// {
-// if(aIter->second == _nId)
-// {
-// ImplBroadcastFeatureState(aIter->first,_xListener, _bForceBroadcast);
-// bFound = sal_True;
-// break;
-// }
-// }
-// if(!bFound)
-// ImplInvalidateTBItem(_nId, GetState(_nId));
}
// -----------------------------------------------------------------------
void OGenericUnoController::InvalidateAll()
{
- FeaturePair aPair;
- aPair.nId = -1;
- aPair.xListener = NULL;
- aPair.bForceBroadcast = sal_True;
- sal_Bool bWasEmpty = sal_False;
- {
- ::osl::MutexGuard aGuard( m_aFeatureMutex);
- bWasEmpty = m_aFeaturesToInvalidate.empty();
- m_aFeaturesToInvalidate.push_back(aPair);
- }
- if(bWasEmpty)
- {
- m_aAsyncInvalidateAll.Call();
- return;
- }
+ InvalidateFeature( ALL_FEATURES, NULL, sal_True );
}
+
// -----------------------------------------------------------------------------
void OGenericUnoController::InvalidateAll_Impl()
{
@@ -575,7 +551,7 @@ void OGenericUnoController::InvalidateAll_Impl()
SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.begin();
for(;aIter != m_aSupportedFeatures.end();++aIter)
{
- ImplBroadcastFeatureState(aIter->first, Reference< ::com::sun::star::frame::XStatusListener > (), sal_True);
+ ImplBroadcastFeatureState(aIter->first, Reference< XStatusListener > (), sal_True);
}
// ------------------------------
@@ -583,9 +559,13 @@ void OGenericUnoController::InvalidateAll_Impl()
ToolBox* pTB = getView() ? getView()->getToolBox() : NULL;
if (pTB)
{
- for (i=0; i<pTB->GetItemCount(); ++i)
- if (pTB->GetItemId(i))
- InvalidateFeature(pTB->GetItemId(i));
+ sal_uInt16 nCount = pTB->GetItemCount();
+ for ( i = 0; i < nCount; ++i )
+ {
+ sal_uInt16 nId = pTB->GetItemId(i);
+ if ( nId )
+ InvalidateFeature( nId );
+ }
}
{
@@ -598,63 +578,74 @@ void OGenericUnoController::InvalidateAll_Impl()
}
// -----------------------------------------------------------------------
-Reference< ::com::sun::star::frame::XDispatch > OGenericUnoController::queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException )
+Reference< XDispatch > OGenericUnoController::queryDispatch(const URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException )
{
- if (aURL.Complete.equals(URL_CONFIRM_DELETION))
- return (::com::sun::star::frame::XDispatch*)this;
+ Reference< XDispatch > xReturn;
- if (m_aSupportedFeatures.find(aURL.Complete) != m_aSupportedFeatures.end())
- return (::com::sun::star::frame::XDispatch*)this;
-
- if (m_xSlaveDispatcher.is())
- return m_xSlaveDispatcher->queryDispatch(aURL, aTargetFrameName, nSearchFlags);
+ // URL's we can handle ourself?
+ if ( aURL.Complete.equals( getConfirmDeletionURL() )
+ || ( m_aSupportedFeatures.find( aURL.Complete ) != m_aSupportedFeatures.end() )
+ )
+ {
+ xReturn = static_cast< XDispatch* >( this );
+ }
+ // no? -> ask the slave dispatcher
+ else if ( m_xSlaveDispatcher.is() )
+ {
+ xReturn = m_xSlaveDispatcher->queryDispatch(aURL, aTargetFrameName, nSearchFlags);
+ }
- return Reference< ::com::sun::star::frame::XDispatch > ();
+ // outta here
+ return xReturn;
}
// -----------------------------------------------------------------------
-Sequence< Reference< ::com::sun::star::frame::XDispatch > > OGenericUnoController::queryDispatches(const Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw( RuntimeException )
+Sequence< Reference< XDispatch > > OGenericUnoController::queryDispatches(const Sequence< DispatchDescriptor >& aDescripts) throw( RuntimeException )
{
- Sequence< Reference< ::com::sun::star::frame::XDispatch > > aReturn;
- if (!aDescripts.getLength())
- return aReturn;
-
- aReturn.realloc(aDescripts.getLength());
- Reference< ::com::sun::star::frame::XDispatch > * pReturn = aReturn.getArray();
+ Sequence< Reference< XDispatch > > aReturn;
+ sal_Int32 nLen = aDescripts.getLength();
+ if ( nLen )
+ {
+ aReturn.realloc( nLen );
+ Reference< XDispatch >* pReturn = aReturn.getArray();
+ const Reference< XDispatch >* pReturnEnd = aReturn.getArray() + nLen;
+ const DispatchDescriptor* pDescripts = aDescripts.getConstArray();
- const ::com::sun::star::frame::DispatchDescriptor* pDescripts = aDescripts.getConstArray();
- for (sal_uInt16 i=0; i<aDescripts.getLength(); ++i, ++pDescripts, ++pReturn)
- *pReturn = queryDispatch(pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags);
+ for ( ; pReturn != pReturnEnd; ++ pReturn, ++pDescripts )
+ {
+ *pReturn = queryDispatch( pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags );
+ }
+ }
return aReturn;
}
// -----------------------------------------------------------------------
-Reference< ::com::sun::star::frame::XDispatchProvider > OGenericUnoController::getSlaveDispatchProvider(void) throw( RuntimeException )
+Reference< XDispatchProvider > OGenericUnoController::getSlaveDispatchProvider(void) throw( RuntimeException )
{
return m_xSlaveDispatcher;
}
// -----------------------------------------------------------------------
-void OGenericUnoController::setSlaveDispatchProvider(const Reference< ::com::sun::star::frame::XDispatchProvider > & _xNewProvider) throw( RuntimeException )
+void OGenericUnoController::setSlaveDispatchProvider(const Reference< XDispatchProvider > & _xNewProvider) throw( RuntimeException )
{
m_xSlaveDispatcher = _xNewProvider;
}
// -----------------------------------------------------------------------
-Reference< ::com::sun::star::frame::XDispatchProvider > OGenericUnoController::getMasterDispatchProvider(void) throw( RuntimeException )
+Reference< XDispatchProvider > OGenericUnoController::getMasterDispatchProvider(void) throw( RuntimeException )
{
return m_xMasterDispatcher;
}
// -----------------------------------------------------------------------
-void OGenericUnoController::setMasterDispatchProvider(const Reference< ::com::sun::star::frame::XDispatchProvider > & _xNewProvider) throw( RuntimeException )
+void OGenericUnoController::setMasterDispatchProvider(const Reference< XDispatchProvider > & _xNewProvider) throw( RuntimeException )
{
m_xMasterDispatcher = _xNewProvider;
}
// -----------------------------------------------------------------------
-void OGenericUnoController::dispatch(const ::com::sun::star::util::URL& aURL, const Sequence< PropertyValue >& aArgs) throw(RuntimeException)
+void OGenericUnoController::dispatch(const URL& aURL, const Sequence< PropertyValue >& aArgs) throw(RuntimeException)
{
SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find(aURL.Complete);
if (aIter != m_aSupportedFeatures.end())
@@ -662,9 +653,9 @@ void OGenericUnoController::dispatch(const ::com::sun::star::util::URL& aURL, co
}
// -----------------------------------------------------------------------
-void OGenericUnoController::addStatusListener(const Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& _rURL) throw(RuntimeException)
+void OGenericUnoController::addStatusListener(const Reference< XStatusListener > & aListener, const URL& _rURL) throw(RuntimeException)
{
- // remeber the listener together with the ::com::sun::star::util::URL
+ // remeber the listener together with the URL
m_arrStatusListener.insert(m_arrStatusListener.end(), DispatchTarget(_rURL, aListener));
// initially broadcast the state
ImplBroadcastFeatureState(_rURL.Complete, aListener, sal_True);
@@ -672,13 +663,12 @@ void OGenericUnoController::addStatusListener(const Reference< ::com::sun::star:
}
// -----------------------------------------------------------------------
-void OGenericUnoController::removeStatusListener(const Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& _rURL) throw(RuntimeException)
+void OGenericUnoController::removeStatusListener(const Reference< XStatusListener > & aListener, const URL& _rURL) throw(RuntimeException)
{
DispatchIterator iterSearch = m_arrStatusListener.begin();
- DispatchIterator iterEnd = m_arrStatusListener.end();
sal_Bool bRemoveForAll = (_rURL.Complete.getLength() == 0);
- while (iterSearch != iterEnd)
+ while ( iterSearch != m_arrStatusListener.end() )
{
DispatchTarget& rCurrent = *iterSearch;
if ( (rCurrent.xListener == aListener)
@@ -687,18 +677,10 @@ void OGenericUnoController::removeStatusListener(const Reference< ::com::sun::st
)
)
{
+ m_arrStatusListener.erase( iterSearch );
if (!bRemoveForAll)
- { // remove the listener only for the given ::com::sun::star::util::URL, so we can exit the loop after deletion
- m_arrStatusListener.erase(iterSearch);
+ // remove the listener only for the given URL, so we can exit the loop after deletion
break;
- }
- else
- { // we have to remove the listener for all URLs, so a simple erase isn't sufficient (as the iterator may be invalid then)
- sal_Int32 nOffset = iterSearch - m_arrStatusListener.begin();
- m_arrStatusListener.erase(iterSearch);
- iterSearch = m_arrStatusListener.begin() + nOffset;
- iterEnd = m_arrStatusListener.end();
- }
}
else
++iterSearch;
@@ -750,8 +732,7 @@ void OGenericUnoController::disposing()
// check out from all the objects we are listening
// the frame
- if (m_xCurrentFrame.is())
- m_xCurrentFrame->removeFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this);
+ stopFrameListening( );
}
// -----------------------------------------------------------------------
@@ -767,21 +748,21 @@ void OGenericUnoController::removeEventListener(const Reference< XEventListener
}
//------------------------------------------------------------------------------
-void OGenericUnoController::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException )
+void OGenericUnoController::frameAction(const FrameActionEvent& aEvent) throw( RuntimeException )
{
- if ((::com::sun::star::frame::XFrame*)aEvent.Frame.get() == (::com::sun::star::frame::XFrame*)m_xCurrentFrame.get())
+ if ((XFrame*)aEvent.Frame.get() == (XFrame*)m_xCurrentFrame.get())
m_bFrameUiActive = (aEvent.Action == FrameAction_FRAME_UI_ACTIVATED);
}
//------------------------------------------------------------------------------
void OGenericUnoController::EmptyWindow()
{
- // dispatch en empty ::com::sun::star::util::URL so we will be cleaned up
-// Reference< ::com::sun::star::frame::XDispatchProvider > xProvider(m_xCurrentFrame, UNO_QUERY);
+ // dispatch en empty URL so we will be cleaned up
+// Reference< XDispatchProvider > xProvider(m_xCurrentFrame, UNO_QUERY);
// if (xProvider.is())
// {
-// Reference< ::com::sun::star::frame::XDispatch > xDispatcher = xProvider->queryDispatch(::com::sun::star::util::URL(), m_xCurrentFrame->getName(), 0);
+// Reference< XDispatch > xDispatcher = xProvider->queryDispatch(URL(), m_xCurrentFrame->getName(), 0);
// if (xDispatcher.is())
-// xDispatcher->dispatch(::com::sun::star::util::URL(), Sequence< PropertyValue >());
+// xDispatcher->dispatch(URL(), Sequence< PropertyValue >());
// }
if(m_xCurrentFrame.is())
{
@@ -802,7 +783,7 @@ void OGenericUnoController::AddSupportedFeatures()
}
//------------------------------------------------------------------------------
-FeatureState OGenericUnoController::GetState(sal_uInt16 nId)
+FeatureState OGenericUnoController::GetState(sal_uInt16 nId) const
{
FeatureState aReturn;
// (disabled automatically)
@@ -838,13 +819,11 @@ FeatureState OGenericUnoController::GetState(sal_uInt16 nId)
}
//------------------------------------------------------------------------------
-sal_Bool OGenericUnoController::SaveModified(sal_Bool bCommit)
+sal_Bool OGenericUnoController::SaveModified( sal_Bool bCommit )
{
- sal_Bool bResult = sal_True;
- InvalidateFeature(::rtl::OUString::createFromAscii(".uno:Save"));
- InvalidateFeature(ID_BROWSER_UNDO);
-
- return bResult;
+ InvalidateFeature( ID_BROWSER_SAVEDOC );
+ InvalidateFeature( ID_BROWSER_UNDO );
+ return sal_True;
}
//------------------------------------------------------------------------------
@@ -872,21 +851,26 @@ IMPL_LINK(OGenericUnoController, OnToolBoxSelected, ToolBox*, pToolBox)
return 0L;
}
//------------------------------------------------------------------
-sal_uInt16 OGenericUnoController::SaveData(sal_Bool bUI, sal_Bool bForBrowsing)
-{
- return (sal_uInt16)SaveModified();
-}
+//sal_uInt16 OGenericUnoController::SaveData(sal_Bool bUI, sal_Bool bForBrowsing)
+//{
+// return (sal_uInt16)SaveModified();
+//}
// -------------------------------------------------------------------------
-URL OGenericUnoController::getURLForId(sal_Int32 _nId)
+URL OGenericUnoController::getURLForId(sal_Int32 _nId) const
{
URL aReturn;
- if (m_xUrlTransformer.is())
+ if ( m_xUrlTransformer.is() )
{
- SupportedFeatures::iterator aIter = ::std::find_if(m_aSupportedFeatures.begin(),m_aSupportedFeatures.end(),::std::bind2nd(SupportedFeaturesFunc(),_nId));
- if(m_aSupportedFeatures.end() != aIter && aIter->first.getLength())
+ SupportedFeatures::const_iterator aIter = ::std::find_if(
+ m_aSupportedFeatures.begin(),
+ m_aSupportedFeatures.end(),
+ ::std::bind2nd( SupportedFeaturesFunc(), _nId )
+ );
+
+ if ( m_aSupportedFeatures.end() != aIter && aIter->first.getLength() )
{
aReturn.Complete = aIter->first;
- m_xUrlTransformer->parseStrict(aReturn);
+ m_xUrlTransformer->parseStrict( aReturn );
}
}
return aReturn;
@@ -896,11 +880,13 @@ URL OGenericUnoController::getURLForId(sal_Int32 _nId)
sal_Bool SAL_CALL OGenericUnoController::supportsService(const ::rtl::OUString& ServiceName) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames());
+
const ::rtl::OUString* pArray = aSupported.getConstArray();
- for (sal_Int32 i = 0; i < aSupported.getLength(); ++i, ++pArray)
- if (pArray->equals(ServiceName))
- return sal_True;
- return sal_False;
+ const ::rtl::OUString* pArrayEnd = aSupported.getConstArray() + aSupported.getLength();
+
+ for ( ;( pArray != pArrayEnd ) && !pArray->equals( ServiceName ); ++pArray )
+ ;
+ return pArray != pArrayEnd;
}
// -----------------------------------------------------------------------------
@@ -952,7 +938,7 @@ void OGenericUnoController::showError(const SQLExceptionInfo& _rInfo)
}
// -----------------------------------------------------------------------------
-void OGenericUnoController::loadMenu(const Reference< ::com::sun::star::frame::XFrame >& _xFrame)
+void OGenericUnoController::loadMenu(const Reference< XFrame >& _xFrame)
{
String sMenuName = getMenu();
if(sMenuName.Len())
@@ -965,12 +951,10 @@ void OGenericUnoController::loadMenu(const Reference< ::com::sun::star::frame::X
URL aURL;
aURL.Complete = aMenuRes;
- Reference< XMultiServiceFactory > xMgr = getORB();
- Reference< XURLTransformer > xTrans ( xMgr->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer") ), UNO_QUERY );
- if( xTrans.is() )
+ if ( m_xUrlTransformer.is() )
{
// Datei laden
- xTrans->parseStrict( aURL );
+ m_xUrlTransformer->parseStrict( aURL );
Reference< XDispatchProvider > xProv( _xFrame, UNO_QUERY );
if ( xProv.is() )
@@ -1013,7 +997,7 @@ void SAL_CALL OGenericUnoController::restoreViewData(const Any& Data) throw( Run
{
}
// -----------------------------------------------------------------------------
-sal_Bool SAL_CALL OGenericUnoController::attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException )
+sal_Bool SAL_CALL OGenericUnoController::attachModel(const Reference< XModel > & xModel) throw( RuntimeException )
{
return sal_False;
}
diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx
index bb93dcec4820..54a2b284e6d5 100644
--- a/dbaccess/source/ui/inc/JoinController.hxx
+++ b/dbaccess/source/ui/inc/JoinController.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: JoinController.hxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2001-10-23 12:30:27 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:38:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -115,7 +115,7 @@ namespace dbaui
// state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
- virtual FeatureState GetState(sal_uInt16 nId);
+ virtual FeatureState GetState(sal_uInt16 nId) const;
// execute a feature
virtual void Execute(sal_uInt16 nId);
diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx
index dcb696ad4192..f9c85e865ec3 100644
--- a/dbaccess/source/ui/inc/RelationController.hxx
+++ b/dbaccess/source/ui/inc/RelationController.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RelationController.hxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2001-10-23 12:30:27 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:38:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -85,7 +85,7 @@ namespace dbaui
// all the features which should be handled by this class
virtual void AddSupportedFeatures();
// state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
- virtual FeatureState GetState(sal_uInt16 nId);
+ virtual FeatureState GetState(sal_uInt16 nId) const;
// execute a feature
virtual void Execute(sal_uInt16 nId);
virtual ToolBox* CreateToolBox(Window* pParent);
diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx
index f23c85f07cef..75e2e8d453e2 100644
--- a/dbaccess/source/ui/inc/TableController.hxx
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableController.hxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: oj $ $Date: 2001-10-18 12:04:12 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:38:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -141,7 +141,7 @@ namespace dbaui
// all the features which should be handled by this class
virtual void AddSupportedFeatures();
// state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
- virtual FeatureState GetState(sal_uInt16 nId);
+ virtual FeatureState GetState(sal_uInt16 nId) const;
// execute a feature
virtual void Execute(sal_uInt16 nId);
virtual ToolBox* CreateToolBox(Window* pParent);
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index fd54f14b838f..e19f7b098b48 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: brwctrlr.hxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: fs $ $Date: 2001-10-29 15:13:10 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:39:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -312,7 +312,7 @@ namespace dbaui
// all the features which should be handled by this class
virtual void AddSupportedFeatures();
// state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
- virtual FeatureState GetState(sal_uInt16 nId);
+ virtual FeatureState GetState(sal_uInt16 nId) const;
// execute a feature
virtual void Execute(sal_uInt16 nId);
@@ -382,14 +382,14 @@ namespace dbaui
// commit the current column (i.e. cell)
virtual sal_Bool SaveModified(sal_Bool bCommit = sal_True);
// save the modified record
- virtual sal_uInt16 SaveData(sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False);
- // save all data if modified, eventually ask the user
+// virtual sal_uInt16 SaveData(sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False);
+ // save all data if modified, maybe ask the user
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getBoundField(sal_uInt16 nViewPos = (sal_uInt16)-1) const;
// a PropertySet corresponding to the cursor field a column is bound to
// if nViewPos is (sal_uInt16)-1 (the default) then the field for the current column will be retrieved
- sal_Bool PendingLoad() { return m_pLoadThread != NULL; }
+ sal_Bool PendingLoad() const { return m_pLoadThread != NULL; }
// is there an asyncronous load operation in progress ?
void enterFormAction();
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 08096e310cd1..02901427e025 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: dbu_resource.hrc,v $
*
- * $Revision: 1.64 $
+ * $Revision: 1.65 $
*
- * last change: $Author: oj $ $Date: 2001-10-05 06:57:19 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:38:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -217,6 +217,7 @@
#define IMG_PKEYICON RID_IMAGE_START + 12
#define BOOKMARK_TREE_ICON RID_IMAGE_START + 13
#define BOOKMARKFOLDER_TREE_ICON RID_IMAGE_START + 14
+#define IMG_DATABASE_CONNECTED RID_IMAGE_START + 15
//========================================================================
// image lists
@@ -470,6 +471,9 @@
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.64 2001/10/05 06:57:19 oj
+ * #84000# impl multiselction for queries and link docs
+ *
* Revision 1.63 2001/10/02 07:55:26 oj
* #87728# drag&drop of table row and tableinformation repaired
*
diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx
index d0054e724fbf..23fd19789008 100644
--- a/dbaccess/source/ui/inc/exsrcbrw.hxx
+++ b/dbaccess/source/ui/inc/exsrcbrw.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: exsrcbrw.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: hr $ $Date: 2001-09-13 14:14:47 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:38:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -142,8 +142,6 @@ namespace dbaui
virtual sal_Bool LoadForm();
- virtual sal_uInt16 SaveData(sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False);
-
void Attach(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xMaster);
void ClearView();
diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx
index 48b8d3586677..c2fecc2431a5 100644
--- a/dbaccess/source/ui/inc/querycontroller.hxx
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: querycontroller.hxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: oj $ $Date: 2001-10-23 12:30:27 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:38:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -162,7 +162,7 @@ namespace dbaui
// all the features which should be handled by this class
virtual void AddSupportedFeatures();
// state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
- virtual FeatureState GetState(sal_uInt16 nId);
+ virtual FeatureState GetState(sal_uInt16 nId) const;
// execute a feature
virtual void Execute(sal_uInt16 nId);
virtual ToolBox* CreateToolBox(Window* pParent);
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 2b4b5bc42639..005523d18334 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: JoinController.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: oj $ $Date: 2001-10-23 12:30:24 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:43:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -297,7 +297,7 @@ void OJoinController::SaveTabWinPosSize(OTableWindow* pTabWin, long nOffsetX, lo
}
// -----------------------------------------------------------------------------
-FeatureState OJoinController::GetState(sal_uInt16 _nId)
+FeatureState OJoinController::GetState(sal_uInt16 _nId) const
{
FeatureState aReturn;
// (disabled automatically)
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index c4d499abdddf..301e2cb5a0d9 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: querycontroller.cxx,v $
*
- * $Revision: 1.66 $
+ * $Revision: 1.67 $
*
- * last change: $Author: oj $ $Date: 2001-11-12 10:34:55 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:42:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -312,7 +312,7 @@ void OQueryController::clearFields()
OTableFields().swap(m_vTableFieldDesc);
}
// -----------------------------------------------------------------------------
-FeatureState OQueryController::GetState(sal_uInt16 _nId)
+FeatureState OQueryController::GetState(sal_uInt16 _nId) const
{
FeatureState aReturn;
aReturn.bEnabled = sal_True;
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 37ee4d181e01..e33bfea52e23 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RelationController.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: oj $ $Date: 2001-11-09 08:29:37 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:42:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -256,7 +256,7 @@ ORelationController::~ORelationController()
DBG_DTOR(ORelationController,NULL);
}
// -----------------------------------------------------------------------------
-FeatureState ORelationController::GetState(sal_uInt16 _nId)
+FeatureState ORelationController::GetState(sal_uInt16 _nId) const
{
FeatureState aReturn;
aReturn.bEnabled = m_bRelationsPossible;
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index ac2b85caa4a6..2b2e78a9ffe5 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableController.cxx,v $
*
- * $Revision: 1.60 $
+ * $Revision: 1.61 $
*
- * last change: $Author: oj $ $Date: 2001-11-12 10:33:47 $
+ * last change: $Author: fs $ $Date: 2002-01-24 17:42:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -291,7 +291,7 @@ void OTableController::disposing()
delete *aIter;
}
// -----------------------------------------------------------------------------
-FeatureState OTableController::GetState(sal_uInt16 _nId)
+FeatureState OTableController::GetState(sal_uInt16 _nId) const
{
FeatureState aReturn;
// (disabled automatically)