diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-16 15:21:07 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-16 15:21:07 +0100 |
commit | 155487cc3f15c1db017e260c77f2e3d9041e0bb4 (patch) | |
tree | 81ac5bb55eceb44738c735ef0c3fe3a3caffacd8 /dbaccess/source/ui/inc | |
parent | 44ce7ccd50206e7784130ee418fc6a01bb8aa0cc (diff) |
autorecovery: recover query designer settings
not yet finished:
- query designer needs to be loaded hidden, and shown when the main window is shown
- recovering table windows is not correct, yet (windows which have been added to the UI,
but do not yet add to the "latest known" statement, are not restored (probably)
- closing the recovered, and modified, query designer somehow does not ask for saving
Diffstat (limited to 'dbaccess/source/ui/inc')
-rw-r--r-- | dbaccess/source/ui/inc/JoinController.hxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/QueryDesignView.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/QueryViewSwitch.hxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableFieldDescription.hxx | 13 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/querycontainerwindow.hxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/querycontroller.hxx | 9 |
6 files changed, 26 insertions, 12 deletions
diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx index 72e61c4bab3d..6561e7b9f282 100644 --- a/dbaccess/source/ui/inc/JoinController.hxx +++ b/dbaccess/source/ui/inc/JoinController.hxx @@ -87,16 +87,16 @@ 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 diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx index 6a97719e0c27..cf501441e4ee 100644 --- a/dbaccess/source/ui/inc/QueryDesignView.hxx +++ b/dbaccess/source/ui/inc/QueryDesignView.hxx @@ -167,6 +167,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 c0692ba48af0..abeccbac4ce2 100644 --- a/dbaccess/source/ui/inc/QueryViewSwitch.hxx +++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx @@ -78,6 +78,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); @@ -96,6 +97,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/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx index dd4489821331..64d17909fcce 100644 --- a/dbaccess/source/ui/inc/TableFieldDescription.hxx +++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx @@ -58,7 +58,8 @@ 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 @@ -136,18 +137,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( ::comphelper::NamedValueCollection& o_rSettings ); + 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/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx index 44af65ed2b2a..8d7bb4f7999f 100644 --- a/dbaccess/source/ui/inc/querycontainerwindow.hxx +++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx @@ -118,6 +118,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 eeabaa13192b..c119095c28bb 100644 --- a/dbaccess/source/ui/inc/querycontroller.hxx +++ b/dbaccess/source/ui/inc/querycontroller.hxx @@ -130,8 +130,8 @@ namespace dbaui void executeQuery(); bool doSaveAsDoc(sal_Bool _bSaveAs); - void saveViewSettings( ::comphelper::NamedValueCollection& o_rViewSettings, const bool i_includngCriteria ) const; - void loadViewSettings( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rViewData ); + 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; @@ -175,6 +175,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; } @@ -231,7 +234,7 @@ namespace dbaui 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 ); |