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/querydesign/QueryDesignView.cxx | |
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/querydesign/QueryDesignView.cxx')
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 624763306d04..3f927076f4a9 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1992,6 +1992,7 @@ namespace (*aIter) = NULL; OTableFields().swap( rUnUsedFields ); } + //------------------------------------------------------------------------------ SqlParseError InitFromParseNodeImpl(OQueryDesignView* _pView,OSelectionBrowseBox* _pSelectionBrw) { @@ -3180,6 +3181,30 @@ void OQueryDesignView::setNoneVisbleRow(sal_Int32 _nRows) { m_pSelectionBox->SetNoneVisbleRow(_nRows); } + +// ----------------------------------------------------------------------------- +void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& i_rFieldDescriptions ) +{ + OQueryController& rController = static_cast< OQueryController& >( getController() ); + + m_pSelectionBox->PreFill(); + m_pSelectionBox->SetReadOnly( rController.isReadOnly() ); + m_pSelectionBox->Fill(); + + for ( const PropertyValue* field = i_rFieldDescriptions.getConstArray(); + field != i_rFieldDescriptions.getConstArray() + i_rFieldDescriptions.getLength(); + ++field + ) + { + ::vos::ORef< OTableFieldDesc > pField( new OTableFieldDesc() ); + pField->Load( *field, true ); + InsertField( pField, sal_True, sal_False ); + } + + rController.getUndoMgr()->Clear(); + m_pSelectionBox->Invalidate(); +} + // ----------------------------------------------------------------------------- bool OQueryDesignView::initByParseIterator( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { |