summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/inc
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/inc')
-rw-r--r--dbaccess/source/ui/inc/JoinController.hxx15
-rw-r--r--dbaccess/source/ui/inc/QueryDesignView.hxx4
-rw-r--r--dbaccess/source/ui/inc/QueryViewSwitch.hxx5
-rw-r--r--dbaccess/source/ui/inc/RelationController.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableController.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableFieldDescription.hxx18
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx71
-rw-r--r--dbaccess/source/ui/inc/databaseobjectview.hxx27
-rw-r--r--dbaccess/source/ui/inc/linkeddocuments.hxx47
-rw-r--r--dbaccess/source/ui/inc/querycontainerwindow.hxx1
-rw-r--r--dbaccess/source/ui/inc/querycontroller.hxx41
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx5
12 files changed, 107 insertions, 131 deletions
diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx
index 7faaf11c3fea..41ee2458fa2f 100644
--- a/dbaccess/source/ui/inc/JoinController.hxx
+++ b/dbaccess/source/ui/inc/JoinController.hxx
@@ -49,6 +49,11 @@
#endif
#include <boost/shared_ptr.hpp>
+namespace comphelper
+{
+ class NamedValueCollection;
+}
+
class VCLXWindow;
namespace dbaui
{
@@ -79,22 +84,22 @@ namespace dbaui
virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
/** loads the information for the windows.
- @param _aViewProps
+ @param i_rViewSettings
The properties which comes from the layout information.
*/
- void loadTableWindows(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _aViewProps);
+ void loadTableWindows( const ::comphelper::NamedValueCollection& i_rViewSettings );
/** loads the information for one window.
@param _rTable
The properties which comes from the layout information.
*/
- void loadTableWindow(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _rTable);
+ void loadTableWindow( const ::comphelper::NamedValueCollection& i_rTableWindowSettings );
/** saves the TableWindows structure in a sequence of property values
@param _rViewProps
Contains the new sequence.
*/
- void saveTableWindows(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _rViewProps);
+ void saveTableWindows( ::comphelper::NamedValueCollection& o_rViewSettings ) const;
virtual ~OJoinController();
public:
@@ -109,7 +114,7 @@ namespace dbaui
// ---------------------------------------------------------------
// OSingleDocumentController overridables
virtual void reconnect( sal_Bool _bUI );
- virtual void setModified( sal_Bool _bModified = sal_True );
+ virtual void impl_onModifyChanged();
// ---------------------------------------------------------------
// own overridables
diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx
index a4cb46074b2a..5f117815ce5f 100644
--- a/dbaccess/source/ui/inc/QueryDesignView.hxx
+++ b/dbaccess/source/ui/inc/QueryDesignView.hxx
@@ -164,6 +164,10 @@ namespace dbaui
*/
bool initByParseIterator( ::dbtools::SQLExceptionInfo* _pErrorInfo );
+ void initByFieldDescriptions(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rFieldDescriptions
+ );
+
::connectivity::OSQLParseNode* getPredicateTreeFromEntry( OTableFieldDescRef pEntry,
const String& _sCriteria,
::rtl::OUString& _rsErrorMessage,
diff --git a/dbaccess/source/ui/inc/QueryViewSwitch.hxx b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
index 3d0f53aeafbe..57ff2b5b29ff 100644
--- a/dbaccess/source/ui/inc/QueryViewSwitch.hxx
+++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
@@ -75,6 +75,7 @@ namespace dbaui
old state)
*/
bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo );
+ void forceInitialView();
sal_Bool isSlotEnabled(sal_Int32 _nSlotId);
void setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable);
void setNoneVisbleRow(sal_Int32 _nRows);
@@ -93,6 +94,10 @@ namespace dbaui
protected:
// return the Rectangle where I can paint myself
virtual void resizeDocumentView(Rectangle& rRect);
+
+ private:
+ void impl_forceSQLView();
+ bool impl_postViewSwitch( const bool i_bGraphicalDesign, const bool i_bSuccess );
};
}
#endif // DBAUI_QUERYVIEWSWITCH_HXX
diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx
index ef54bf5a02ae..8837a4216042 100644
--- a/dbaccess/source/ui/inc/RelationController.hxx
+++ b/dbaccess/source/ui/inc/RelationController.hxx
@@ -57,7 +57,7 @@ namespace dbaui
// execute a feature
virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
- ORelationDesignView* getRelationView() { return static_cast<ORelationDesignView*>(m_pView); }
+ ORelationDesignView* getRelationView() { return static_cast<ORelationDesignView*>( getView() ); }
void loadData();
TTableWindowData::value_type existsTable(const ::rtl::OUString& _rComposedTableName,sal_Bool _bCase) const;
diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx
index 45966de004c6..f2e55a709671 100644
--- a/dbaccess/source/ui/inc/TableController.hxx
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -127,7 +127,7 @@ namespace dbaui
inline sal_Bool isAutoIncrementValueEnabled() const { return m_bAllowAutoIncrementValue; }
inline const ::rtl::OUString& getAutoIncrementValue() const { return m_sAutoIncrementValue; }
- virtual void setModified(sal_Bool _bModified=sal_True);
+ virtual void impl_onModifyChanged();
// const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();}
// need for undo's and redo's
diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx
index e626658d919a..7160edbbfbfb 100644
--- a/dbaccess/source/ui/inc/TableFieldDescription.hxx
+++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx
@@ -44,13 +44,19 @@
#include <vos/ref.hxx>
#endif
+namespace comphelper
+{
+ class NamedValueCollection;
+}
+
class Window;
namespace dbaui
{
class OTableFieldDesc : public ::vos::OReference
{
private:
- ::std::vector< ::rtl::OUString> m_vecCriteria;
+ ::std::vector< ::rtl::OUString >
+ m_aCriteria;
::rtl::OUString m_aTableName;
::rtl::OUString m_aAliasName; // table range
@@ -128,18 +134,18 @@ namespace dbaui
sal_Bool HasCriteria() const
{
- ::std::vector< ::rtl::OUString>::const_iterator aIter = m_vecCriteria.begin();
- ::std::vector< ::rtl::OUString>::const_iterator aEnd = m_vecCriteria.end();
+ ::std::vector< ::rtl::OUString>::const_iterator aIter = m_aCriteria.begin();
+ ::std::vector< ::rtl::OUString>::const_iterator aEnd = m_aCriteria.end();
for(;aIter != aEnd;++aIter)
if(aIter->getLength())
break;
return aIter != aEnd;
}
- const ::std::vector< ::rtl::OUString>& GetCriteria() const { return m_vecCriteria;}
+ const ::std::vector< ::rtl::OUString>& GetCriteria() const { return m_aCriteria; }
- void Load(const ::com::sun::star::beans::PropertyValue& _rProperty);
- void Save(::com::sun::star::beans::PropertyValue& _rProperty);
+ void Load( const ::com::sun::star::beans::PropertyValue& i_rSettings, const bool i_bIncludingCriteria );
+ void Save( ::comphelper::NamedValueCollection& o_rSettings, const bool i_bIncludingCriteria );
};
//------------------------------------------------------------------
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index 5f079796c899..4cf229677acb 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -53,7 +53,6 @@
#include <svtools/transfer.hxx>
#include <osl/mutex.hxx>
#include <vos/thread.hxx>
-#include <svl/cancel.hxx>
#include <cppuhelper/implbase9.hxx>
#include <svtools/cliplistener.hxx>
@@ -121,7 +120,6 @@ namespace dbaui
::rtl::OUString m_sModuleIdentifier;
// members for asynchronous load operations
- ::vos::OThread* m_pLoadThread; // the thread wherein the form is loaded
FormControllerImpl* m_pFormControllerImpl; // implementing the XFormController
ULONG m_nPendingLoadFinished; // the event used to tell ourself that the load is finished
@@ -165,7 +163,7 @@ namespace dbaui
public:
SbaXDataBrowserController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
- UnoDataBrowserView* getBrowserView() const { return static_cast< UnoDataBrowserView*>(m_pView); }
+ UnoDataBrowserView* getBrowserView() const { return static_cast< UnoDataBrowserView*>(getView()); }
// late construction
virtual sal_Bool Construct(Window* pParent);
@@ -318,9 +316,6 @@ namespace dbaui
// 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() const { return m_pLoadThread != NULL; }
- // is there an asyncronous load operation in progress ?
-
void enterFormAction();
void leaveFormAction();
@@ -361,74 +356,10 @@ namespace dbaui
DECL_LINK(OnFoundData, FmFoundRecordInformation*);
DECL_LINK(OnCanceledNotFound, FmFoundRecordInformation*);
- // callbacks for the completed loading process
- DECL_LINK(OnOpenFinished, void*);
- DECL_LINK(OnOpenFinishedMainThread, void*);
- // OnOpenFinsihed is called in a foreign thread (the one which does the loading) so it simply posts the
- // OnOpenFinishedMainThread-link (which will be called in the main thread, then) as user event.
- // (the alternative would be to lock the SolarMutex in OnOpenFinished to avoid problems with the needed updates,
- // but playing with this mutex seems very hazardous to me ....)
DECL_LINK(OnAsyncGetCellFocus, void*);
DECL_LINK( OnAsyncDisplayError, void* );
};
-
- //==================================================================
- // LoadFormThread - a thread for asynchronously loading a form
- //==================================================================
- class LoadFormThread : public ::vos::OThread
- {
- ::osl::Mutex m_aAccessSafety; // for securing the multi-thread access
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet; // the data source to be loaded
-
- Link m_aTerminationHandler; // the handler to be called upon termination
- sal_Bool m_bCanceled; // StopIt has been called ?
- String m_sStopperCaption; // the caption for the ThreadStopper
-
- // a ThreadStopper will be instantiated so that the open can be canceled via the UI
- class ThreadStopper : protected SfxCancellable
- {
- LoadFormThread* m_pOwner;
-
- public:
- ThreadStopper(LoadFormThread* pOwner, const String& rTitle);
- virtual ~ThreadStopper() { }
-
- virtual void Cancel();
-
- virtual void OwnerTerminated();
- // Normally the Owner (a LoadFormThread) would delete the stopper when terminated.
- // Unfortunally the application doesn't remove the 'red light' when a SfxCancellable is deleted
- // if it (the app) can't acquire the solar mutex. The deletion is IGNORED then. So we have to make
- // sure that a) the stopper is deleted from inside the main thread (where the solar mutex is locked)
- // and b) that in the time between the termination of the thread and the deletion of the stopper
- // the latter doesn't access the former.
- // The OwnerTerminated cares for both aspects.
- // SO DON'T DELETE THE STOPPER EXPLICITLY !
-
- protected:
- // HACK HACK HACK HACK HACK : this should be private, but MSVC doesn't accept the LINK-macro then ....
- DECL_LINK(OnDeleteInMainThread, ThreadStopper*);
- };
- friend class LoadFormThread::ThreadStopper;
-
- public:
- LoadFormThread(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & _xRowSet, const String& _rStopperCaption) : m_xRowSet(_xRowSet), m_sStopperCaption(_rStopperCaption) { }
-
- virtual void SAL_CALL run();
- virtual void SAL_CALL onTerminated();
-
- void SetTerminationHdl(const Link& aTermHdl) { m_aTerminationHandler = aTermHdl; }
- // the handler will be called synchronously (the parameter is a pointer to the thread)
- // if no termination handler is set, the thread disposes the data source and deletes
- // itself upon termination
-
- // cancels the process. to be called from another thread (of course ;)
- void StopIt();
-
- // ask if the load canceled
- sal_Bool WasCanceled() const { return m_bCanceled; }
- };
}
#endif // _SBA_BWRCTRLR_HXX
diff --git a/dbaccess/source/ui/inc/databaseobjectview.hxx b/dbaccess/source/ui/inc/databaseobjectview.hxx
index 6c7644a6ad20..782555b106af 100644
--- a/dbaccess/source/ui/inc/databaseobjectview.hxx
+++ b/dbaccess/source/ui/inc/databaseobjectview.hxx
@@ -64,6 +64,7 @@
#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
#endif
+#include <comphelper/namedvaluecollection.hxx>
#include <boost/shared_ptr.hpp>
@@ -90,10 +91,11 @@ namespace dbaui
m_xApplication;
::rtl::OUString m_sComponentURL;
+
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
doDispatch(
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDispatchArguments
+ const ::comphelper::NamedValueCollection& i_rDispatchArgs
);
protected:
@@ -113,11 +115,11 @@ namespace dbaui
virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > doCreateView(
const ::com::sun::star::uno::Any& _rDataSource,
const ::rtl::OUString& _rObjectName,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rCreationArgs
+ const ::comphelper::NamedValueCollection& i_rCreationArgs
);
virtual void fillDispatchArgs(
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDispatchArguments,
+ ::comphelper::NamedValueCollection& i_rDispatchArgs,
const ::com::sun::star::uno::Any& _rDataSource,
const ::rtl::OUString& _rObjectName
);
@@ -155,7 +157,8 @@ namespace dbaui
*/
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
createNew(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource >& _xDataSource
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource >& _xDataSource,
+ const ::comphelper::NamedValueCollection& i_rDispatchArgs = ::comphelper::NamedValueCollection()
);
/** opens a view for an existent object
@@ -173,7 +176,7 @@ namespace dbaui
openExisting(
const ::com::sun::star::uno::Any& _aDataSource,
const ::rtl::OUString& _rName,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArgs
+ const ::comphelper::NamedValueCollection& i_rDispatchArgs
);
};
@@ -183,12 +186,11 @@ namespace dbaui
class QueryDesigner : public DatabaseObjectView
{
protected:
- sal_Int32 m_nCommandType;
- sal_Bool m_bPreferSQLView;
+ sal_Int32 m_nCommandType;
protected:
virtual void fillDispatchArgs(
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDispatchArguments,
+ ::comphelper::NamedValueCollection& i_rDispatchArgs,
const ::com::sun::star::uno::Any& _aDataSource,
const ::rtl::OUString& _rObjectName
);
@@ -198,8 +200,7 @@ namespace dbaui
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& _rxApplication,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxParentFrame,
- bool _bCreateView,
- sal_Bool _bPreferSQLView
+ bool _bCreateView
);
};
@@ -210,7 +211,7 @@ namespace dbaui
{
protected:
virtual void fillDispatchArgs(
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDispatchArguments,
+ ::comphelper::NamedValueCollection& i_rDispatchArgs,
const ::com::sun::star::uno::Any& _aDataSource,
const ::rtl::OUString& _rObjectName
);
@@ -218,7 +219,7 @@ namespace dbaui
virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > doCreateView(
const ::com::sun::star::uno::Any& _rDataSource,
const ::rtl::OUString& _rObjectName,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rCreationArgs
+ const ::comphelper::NamedValueCollection& i_rCreationArgs
);
public:
@@ -251,7 +252,7 @@ namespace dbaui
protected:
virtual void fillDispatchArgs(
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDispatchArguments,
+ ::comphelper::NamedValueCollection& i_rDispatchArgs,
const ::com::sun::star::uno::Any& _aDataSource,
const ::rtl::OUString& _rQualifiedName
);
diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx
index 45e291365e65..3c1b574d3300 100644
--- a/dbaccess/source/ui/inc/linkeddocuments.hxx
+++ b/dbaccess/source/ui/inc/linkeddocuments.hxx
@@ -52,6 +52,7 @@
#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
#include <com/sun/star/ucb/XContent.hpp>
#endif
+#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
#ifndef _LINK_HXX
#include <tools/link.hxx>
#endif
@@ -80,8 +81,8 @@ namespace dbaui
m_xDocumentContainer;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
m_xConnection;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
- m_xParentFrame;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >
+ m_xDocumentUI;
Window* m_pDialogParent;
String m_sCurrentlyEditing;
::rtl::OUString
@@ -89,13 +90,13 @@ namespace dbaui
public:
OLinkedDocumentsAccess(
- Window* _pDialogParent
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxParentFrame
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection
- ,const ::rtl::OUString& _sDataSourceName
- );
+ Window* _pDialogParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& i_rDocumentUI,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
+ const ::rtl::OUString& _sDataSourceName
+ );
~OLinkedDocumentsAccess();
inline sal_Bool isConnected() const { return m_xConnection.is(); }
@@ -110,30 +111,21 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
newDocument(
- sal_Int32 _nNewFormId,
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _xDefinition,
- const sal_Int32 _nCommandType,
- const ::rtl::OUString& _sObjectName
+ sal_Int32 i_nActionID,
+ const ::comphelper::NamedValueCollection& i_rCreationArgs,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_rDefinition
);
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
- newFormWithPilot(
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _xDefinition,
+ void newFormWithPilot(
const sal_Int32 _nCommandType = -1,
const ::rtl::OUString& _rObjectName = ::rtl::OUString()
);
-
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
- newReportWithPilot(
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _xDefinition,
+ void newReportWithPilot(
const sal_Int32 _nCommandType = -1,
const ::rtl::OUString& _rObjectName = ::rtl::OUString()
);
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
- newQueryWithPilot();
-
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
- newTableWithPilot();
+ void newQueryWithPilot();
+ void newTableWithPilot();
enum RESULT
{
@@ -145,15 +137,14 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
impl_open(
const ::rtl::OUString& _rLinkName,
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _xDefinition,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDefinition,
ElementOpenMode _eOpenMode,
const ::comphelper::NamedValueCollection& _rAdditionalArgs
);
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
+ void
impl_newWithPilot(
const char* _pWizardService,
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDefinition,
const sal_Int32 _nCommandType,
const ::rtl::OUString& _rObjectName
);
diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx
index bb618e9724e0..f2ecf7728a69 100644
--- a/dbaccess/source/ui/inc/querycontainerwindow.hxx
+++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx
@@ -115,6 +115,7 @@ namespace dbaui
bool reset( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { return m_pViewSwitch->reset( _pErrorInfo ); }
bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo );
+ void forceInitialView();
virtual void GetFocus();
diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx
index 0fefaf888786..ec36e6ed3e6e 100644
--- a/dbaccess/source/ui/inc/querycontroller.hxx
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -53,6 +53,11 @@
#include <connectivity/sqlparse.hxx>
#include <svl/undo.hxx>
+namespace comphelper
+{
+ class NamedValueCollection;
+}
+
class VCLXWindow;
namespace dbaui
{
@@ -122,8 +127,8 @@ namespace dbaui
void executeQuery();
bool doSaveAsDoc(sal_Bool _bSaveAs);
- void saveViewSettings(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _rViewProps);
- void loadViewSettings(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _rViewProps);
+ void saveViewSettings( ::comphelper::NamedValueCollection& o_rViewSettings, const bool i_includingCriteria ) const;
+ void loadViewSettings( const ::comphelper::NamedValueCollection& o_rViewSettings );
::rtl::OUString translateStatement( bool _bFireStatementChange = true );
::rtl::OUString getDefaultName() const;
@@ -139,7 +144,7 @@ namespace dbaui
virtual void reconnect( sal_Bool _bUI );
virtual ::rtl::OUString getPrivateTitle( ) const;
- OQueryContainerWindow* getContainer() const { return static_cast< OQueryContainerWindow* >( getView() ); }
+ OQueryContainerWindow* getContainer() const { return static_cast< OQueryContainerWindow* >( getView() ); }
public:
OQueryController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
@@ -150,7 +155,7 @@ namespace dbaui
void clearFields();
- virtual void setModified(sal_Bool _bModified=sal_True);
+ virtual void impl_onModifyChanged();
// should the statement be parsed by our own sql parser
sal_Bool isEsacpeProcessing() const { return m_bEscapeProcessing; }
@@ -167,6 +172,9 @@ namespace dbaui
sal_Int32 getColWidth(sal_uInt16 _nColPos) const;
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >&
+ getFieldInformation() const { return m_aFieldInformation; }
+
::connectivity::OSQLParser& getParser() { return m_aSqlParser; }
::connectivity::OSQLParseTreeIterator& getParseIterator() { return *m_pSqlIterator; }
@@ -192,18 +200,38 @@ namespace dbaui
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+ // XController
+ virtual ::com::sun::star::uno::Any SAL_CALL getViewData(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL restoreViewData(const ::com::sun::star::uno::Any& Data) throw( ::com::sun::star::uno::RuntimeException );
+
private:
virtual void onLoadedMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager);
// OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
+ // OPropertySetHelper
+ virtual sal_Bool SAL_CALL convertFastPropertyValue(
+ ::com::sun::star::uno::Any& rConvertedValue,
+ ::com::sun::star::uno::Any& rOldValue,
+ sal_Int32 nHandle,
+ const ::com::sun::star::uno::Any& rValue
+ ) throw (::com::sun::star::lang::IllegalArgumentException);
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
+ sal_Int32 nHandle,
+ const ::com::sun::star::uno::Any& rValue
+ ) throw (::com::sun::star::uno::Exception );
+ virtual void SAL_CALL getFastPropertyValue(
+ ::com::sun::star::uno::Any& rValue,
+ sal_Int32 nHandle
+ ) const;
+
virtual OJoinDesignView* getJoinView();
// ask the user if the design should be saved when it is modified
virtual short saveModified();
virtual void reset();
virtual void impl_initialize();
- void impl_reset();
+ void impl_reset( const bool i_bIgnoreQuerySettings = false );
/// tells the user that we needed to switch to SQL view automatically
void impl_showAutoSQLViewError( const ::com::sun::star::uno::Any& _rErrorDetails );
@@ -222,6 +250,9 @@ namespace dbaui
private:
DECL_LINK( OnExecuteAddTable, void* );
+
+ private:
+ using OQueryController_PBase::getFastPropertyValue;
};
}
#endif // DBAUI_QUERYCONTROLLER_HXX
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index c2bf83454440..d271b0b907ee 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -371,7 +371,7 @@ namespace dbaui
*/
void closeConnection(SvLBoxEntry* _pEntry,sal_Bool _bDisposeConnection = sal_True);
- sal_Bool populateTree(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xNameAccess, SvLBoxEntry* _pParent, EntryType _eEntryType);
+ void populateTree(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xNameAccess, SvLBoxEntry* _pParent, EntryType _eEntryType);
void initializeTreeModel();
/** search in the tree for query- or tablecontainer equal to this interface and return
@@ -430,8 +430,9 @@ namespace dbaui
sal_Bool _bSelectDirect = sal_False
);
+ SvLBoxEntry* implGetConnectionEntry(SvLBoxEntry* _pEntry) const;
/// inserts an entry into the tree
- void implAppendEntry(
+ SvLBoxEntry* implAppendEntry(
SvLBoxEntry* _pParent,
const String& _rName,
void* _pUserData,