diff options
author | Philipp Riemer <ruderphilipp@gmail.com> | 2012-08-10 20:50:33 +0200 |
---|---|---|
committer | Philipp Riemer <ruderphilipp@gmail.com> | 2012-08-10 20:56:25 +0200 |
commit | 25a56559db5d7dbf6ebee979b0b1aaf6be2a64e3 (patch) | |
tree | 5e3202806f3d275844b4c86f4b7ac727d4bfe197 /dbaccess | |
parent | 2058908d8ce86c9fec6db3ef3bc0be2ec20d1547 (diff) |
cleaned-up comments
Files were originally touched by b803fa2579256979bac83f0b193f2c30d524d76b.
This is just a follow-up patch.
Change-Id: I1e35d5e3c3d193bb5dfdb4b743328d8d22466a4d
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/marktree.cxx | 35 | ||||
-rw-r--r-- | dbaccess/source/ui/control/sqledit.cxx | 21 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 42 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/adtabdlg.cxx | 60 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbfindex.cxx | 50 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/queryfilter.cxx | 35 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/queryorder.cxx | 19 |
7 files changed, 53 insertions, 209 deletions
diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx index 830f1381ec73..7efa2491b516 100644 --- a/dbaccess/source/ui/control/marktree.cxx +++ b/dbaccess/source/ui/control/marktree.cxx @@ -17,23 +17,19 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "marktree.hxx" #include "dbu_control.hrc" #include <vcl/svapp.hxx> -//......................................................................... namespace dbaui { using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -//......................................................................... + using namespace ::com::sun::star::lang; + #define SPACEBETWEENENTRIES 4 -//======================================================================== -//= OMarkableTreeListBox -//======================================================================== + DBG_NAME(OMarkableTreeListBox) -//------------------------------------------------------------------------ + OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, WinBits nWinStyle ) : DBTreeListBox(pParent,_rxORB,nWinStyle) { @@ -41,7 +37,7 @@ OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, const Reference< XM InitButtonData(); } -//------------------------------------------------------------------------ + OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, const ResId& rResId) : DBTreeListBox(pParent,_rxORB,rResId) { @@ -49,14 +45,14 @@ OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, const Reference< XM InitButtonData(); } -//------------------------------------------------------------------------ + OMarkableTreeListBox::~OMarkableTreeListBox() { delete m_pCheckButton; DBG_DTOR(OMarkableTreeListBox,NULL); } -//------------------------------------------------------------------------ + void OMarkableTreeListBox::Paint(const Rectangle& _rRect) { if (!IsEnabled()) @@ -74,13 +70,13 @@ void OMarkableTreeListBox::Paint(const Rectangle& _rRect) else DBTreeListBox::Paint(_rRect); } -//------------------------------------------------------------------------ + void OMarkableTreeListBox::InitButtonData() { m_pCheckButton = new SvLBoxButtonData( this ); EnableCheckButton( m_pCheckButton ); } -//------------------------------------------------------------------------ + void OMarkableTreeListBox::KeyInput( const KeyEvent& rKEvt ) { // nur wenn space @@ -102,9 +98,8 @@ void OMarkableTreeListBox::KeyInput( const KeyEvent& rKEvt ) } else DBTreeListBox::KeyInput(rKEvt); - } -//------------------------------------------------------------------------ + SvButtonState OMarkableTreeListBox::implDetermineState(SvLBoxEntry* _pEntry) { SvButtonState eState = GetCheckButtonState(_pEntry); @@ -167,11 +162,9 @@ SvButtonState OMarkableTreeListBox::implDetermineState(SvLBoxEntry* _pEntry) // finally set the entry to the state we just determined SetCheckButtonState(_pEntry, eState); - // outta here return eState; } -//------------------------------------------------------------------------ void OMarkableTreeListBox::CheckButtons() { SvLBoxEntry* pEntry = GetModel()->First(); @@ -181,7 +174,7 @@ void OMarkableTreeListBox::CheckButtons() pEntry = GetModel()->NextSibling(pEntry); } } -//------------------------------------------------------------------------ + void OMarkableTreeListBox::CheckButtonHdl() { checkedButton_noBroadcast(GetHdlEntry()); @@ -189,7 +182,6 @@ void OMarkableTreeListBox::CheckButtonHdl() m_aCheckButtonHandler.Call(this); } -//------------------------------------------------------------------------ void OMarkableTreeListBox::checkedButton_noBroadcast(SvLBoxEntry* _pEntry) { SvButtonState eState = GetCheckButtonState( _pEntry); @@ -223,9 +215,6 @@ void OMarkableTreeListBox::checkedButton_noBroadcast(SvLBoxEntry* _pEntry) CheckButtons(); } -//------------------------------------------------------------------------ -//......................................................................... -} // namespace dbaui -//......................................................................... +} // namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 289960a3e95c..307ee8b43851 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -33,14 +33,9 @@ #include "querycontroller.hxx" #include "undosqledit.hxx" #include "QueryDesignView.hxx" - #include <svl/smplhint.hxx> namespace css = ::com::sun::star; - -////////////////////////////////////////////////////////////////////////// -// OSqlEdit -//------------------------------------------------------------------------------ using namespace dbaui; class OSqlEdit::ChangesListener: @@ -110,7 +105,6 @@ OSqlEdit::OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle ) : EnableFocusSelectionHide( sal_False ); } -//------------------------------------------------------------------------------ OSqlEdit::~OSqlEdit() { DBG_DTOR(OSqlEdit,NULL); @@ -126,7 +120,7 @@ OSqlEdit::~OSqlEdit() } m_ColorConfig.RemoveListener(this); } -//------------------------------------------------------------------------------ + void OSqlEdit::KeyInput( const KeyEvent& rKEvt ) { DBG_CHKTHIS(OSqlEdit,NULL); @@ -145,7 +139,6 @@ void OSqlEdit::KeyInput( const KeyEvent& rKEvt ) m_bAccelAction = sal_False; } -//------------------------------------------------------------------------------ sal_Bool OSqlEdit::IsInAccelAct() { DBG_CHKTHIS(OSqlEdit,NULL); @@ -156,7 +149,6 @@ sal_Bool OSqlEdit::IsInAccelAct() return m_bAccelAction; } -//------------------------------------------------------------------------------ void OSqlEdit::GetFocus() { DBG_CHKTHIS(OSqlEdit,NULL); @@ -164,7 +156,6 @@ void OSqlEdit::GetFocus() MultiLineEditSyntaxHighlight::GetFocus(); } -//------------------------------------------------------------------------------ IMPL_LINK_NOARG(OSqlEdit, OnUndoActionTimer) { String aText =GetText(); @@ -185,7 +176,7 @@ IMPL_LINK_NOARG(OSqlEdit, OnUndoActionTimer) return 0L; } -//------------------------------------------------------------------------------ + IMPL_LINK_NOARG(OSqlEdit, OnInvalidateTimer) { OJoinController& rController = m_pView->getContainerWindow()->getDesignView()->getController(); @@ -195,7 +186,7 @@ IMPL_LINK_NOARG(OSqlEdit, OnInvalidateTimer) m_timerInvalidate.Start(); return 0L; } -//------------------------------------------------------------------------------ + IMPL_LINK(OSqlEdit, ModifyHdl, void*, /*EMPTYTAG*/) { if (m_timerUndoActionCreation.IsActive()) @@ -214,7 +205,6 @@ IMPL_LINK(OSqlEdit, ModifyHdl, void*, /*EMPTYTAG*/) return 0; } -//------------------------------------------------------------------------------ void OSqlEdit::SetText(const String& rNewText) { DBG_CHKTHIS(OSqlEdit,NULL); @@ -227,14 +217,14 @@ void OSqlEdit::SetText(const String& rNewText) MultiLineEditSyntaxHighlight::SetText(rNewText); m_strOrigText =rNewText; } -// ----------------------------------------------------------------------------- + void OSqlEdit::stopTimer() { m_bStopTimer = sal_True; if (m_timerInvalidate.IsActive()) m_timerInvalidate.Stop(); } -// ----------------------------------------------------------------------------- + void OSqlEdit::startTimer() { m_bStopTimer = sal_False; @@ -268,6 +258,5 @@ void OSqlEdit::ImplSetFont() aSettings.SetStyleSettings(aStyleSettings); SetSettings(aSettings); } -//============================================================================== /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index d057f1332efa..d5879597a8b3 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -16,15 +16,13 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "moduledbu.hxx" +#include "moduledbu.hxx" #include "TextConnectionHelper.hxx" - #include "sqlmessage.hxx" #include "dbu_dlg.hrc" #include "dbu_resource.hrc" #include "AutoControls.hrc" - #include <svl/itemset.hxx> #include <svl/stritem.hxx> #include <svl/eitem.hxx> @@ -42,32 +40,21 @@ #include "dbadmin.hxx" #include <comphelper/string.hxx> #include <comphelper/types.hxx> - #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> - #include <svl/filenotation.hxx> - #include <unotools/localfilehelper.hxx> #include <unotools/ucbhelper.hxx> #include <ucbhelper/commandenvironment.hxx> #include "finteraction.hxx" - #include "DBSetupConnectionPages.hxx" - #include <unotools/pathoptions.hxx> - #include <svtools/roadmapwizard.hxx> - namespace dbaui { - - //======================================================================== - //= OTextConnectionPageSetup - //======================================================================== DBG_NAME(OTextConnectionHelper) -//------------------------------------------------------------------------ + OTextConnectionHelper::OTextConnectionHelper( Window* pParent, const short _nAvailableSections ) :Control( pParent, WB_DIALOGCONTROL ) ,m_aFTExtensionHeader (this, ModuleRes(FT_AUTOEXTENSIONHEADER)) @@ -214,29 +201,24 @@ DBG_NAME(OTextConnectionHelper) Show(); } - // ----------------------------------------------------------------------- OTextConnectionHelper::~OTextConnectionHelper() { DBG_DTOR(OTextConnectionHelper,NULL); } - - // ----------------------------------------------------------------------- IMPL_LINK(OTextConnectionHelper, OnControlModified, Control*, /*EMPTYARG*/) { callModifiedHdl(); return 0L; } - // ----------------------------------------------------------------------- IMPL_LINK(OTextConnectionHelper, OnEditModified, Edit*, /*_pEdit*/) { m_aGetExtensionHandler.Call(this); return 0L; } - IMPL_LINK(OTextConnectionHelper, OnSetExtensionHdl, RadioButton*, /*_pRadioButton*/) { sal_Bool bDoEnable = m_aRBAccessOtherFiles.IsChecked(); @@ -246,8 +228,6 @@ DBG_NAME(OTextConnectionHelper) return 0L; } - - // ----------------------------------------------------------------------- void OTextConnectionHelper::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<ComboBox>(&m_aFieldSeparator)); @@ -257,7 +237,7 @@ DBG_NAME(OTextConnectionHelper) _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aRowHeader)); _rControlList.push_back(new OSaveValueWrapper<ListBox>(&m_aCharSet)); } - // ----------------------------------------------------------------------- + void OTextConnectionHelper::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFieldSeparatorLabel)); @@ -269,7 +249,6 @@ DBG_NAME(OTextConnectionHelper) _rControlList.push_back(new ODisableWrapper<ListBox>(&m_aCharSet)); } - // ----------------------------------------------------------------------- void OTextConnectionHelper::implInitControls(const SfxItemSet& _rSet, sal_Bool _bValid) { if ( !_bValid ) @@ -308,9 +287,6 @@ DBG_NAME(OTextConnectionHelper) } } - - - // ----------------------------------------------------------------------- sal_Bool OTextConnectionHelper::prepareLeave() { LocalResourceAccess aStringResAccess(PAGE_TEXT, RSC_TABPAGE); @@ -386,8 +362,6 @@ DBG_NAME(OTextConnectionHelper) return 0; } - - // ----------------------------------------------------------------------- sal_Bool OTextConnectionHelper::FillItemSet( SfxItemSet& rSet, const sal_Bool _bChangedSomething ) { sal_Bool bChangedSomething = _bChangedSomething; @@ -445,7 +419,6 @@ DBG_NAME(OTextConnectionHelper) return bChangedSomething; } - void OTextConnectionHelper::SetExtension(const String& _rVal) { if (_rVal.EqualsAscii("txt")) @@ -459,7 +432,6 @@ DBG_NAME(OTextConnectionHelper) } } - String OTextConnectionHelper::GetExtension() { String sExtension; @@ -476,8 +448,6 @@ DBG_NAME(OTextConnectionHelper) return sExtension; } - - //------------------------------------------------------------------------ String OTextConnectionHelper::GetSeparator( const ComboBox& rBox, const String& rList ) { sal_Unicode nTok = '\t'; @@ -494,7 +464,6 @@ DBG_NAME(OTextConnectionHelper) return rtl::OUString(); } - //------------------------------------------------------------------------ void OTextConnectionHelper::SetSeparator( ComboBox& rBox, const String& rList, const String& rVal ) { char nTok = '\t'; @@ -522,9 +491,6 @@ DBG_NAME(OTextConnectionHelper) rBox.SetText( rVal.Copy(0, 1) ); } } - -//......................................................................... -} // namespace dbaui -//......................................................................... +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 10e0836565cb..580791a345a0 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "adtabdlg.hxx" #include "adtabdlg.hrc" #include "sqlmessage.hxx" @@ -39,7 +38,6 @@ #include <com/sun/star/container/XNameAccess.hpp> #include "UITools.hxx" #include "imageprovider.hxx" - #include <comphelper/containermultiplexer.hxx> #include "cppuhelper/basemutex.hxx" #include <algorithm> @@ -54,16 +52,12 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; using namespace dbtools; -//============================================================================== -//= TableObjectListFacade -//============================================================================== +// TableObjectListFacade ------------------------------------------------------- TableObjectListFacade::~TableObjectListFacade() { } -//============================================================================== -//= TableListFacade -//============================================================================== +// TableListFacade ------------------------------------------------------------- class TableListFacade : public ::cppu::BaseMutex , public TableObjectListFacade , public ::comphelper::OContainerListener @@ -84,7 +78,6 @@ public: } virtual ~TableListFacade(); - private: virtual void updateTableObjectList( bool _bAllowViews ); virtual String getSelectedName( String& _out_rAliasName ) const; @@ -100,7 +93,7 @@ TableListFacade::~TableListFacade() if ( m_pContainerListener.is() ) m_pContainerListener->dispose(); } -//------------------------------------------------------------------------------ + String TableListFacade::getSelectedName( String& _out_rAliasName ) const { SvLBoxEntry* pEntry = m_rTableList.FirstSelected(); @@ -142,21 +135,21 @@ String TableListFacade::getSelectedName( String& _out_rAliasName ) const _out_rAliasName = aTableName; return aComposedName; } -// ----------------------------------------------------------------------------- + void TableListFacade::_elementInserted( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { updateTableObjectList(m_bAllowViews); } -// ----------------------------------------------------------------------------- + void TableListFacade::_elementRemoved( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { updateTableObjectList(m_bAllowViews); } -// ----------------------------------------------------------------------------- + void TableListFacade::_elementReplaced( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { } -//------------------------------------------------------------------------------ + void TableListFacade::updateTableObjectList( bool _bAllowViews ) { m_bAllowViews = _bAllowViews; @@ -222,16 +215,13 @@ void TableListFacade::updateTableObjectList( bool _bAllowViews ) } } -//------------------------------------------------------------------------------ bool TableListFacade::isLeafSelected() const { SvLBoxEntry* pEntry = m_rTableList.FirstSelected(); return pEntry && !m_rTableList.GetModel()->HasChildren( pEntry ); } -//============================================================================== -//= QueryListFacade -//============================================================================== +// QueryListFacade ------------------------------------------------------------- class QueryListFacade : public ::cppu::BaseMutex , public TableObjectListFacade , public ::comphelper::OContainerListener @@ -249,6 +239,7 @@ public: { } virtual ~QueryListFacade(); + private: virtual void updateTableObjectList( bool _bAllowViews ); virtual String getSelectedName( String& _out_rAliasName ) const; @@ -258,29 +249,29 @@ private: virtual void _elementRemoved( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException); virtual void _elementReplaced( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException); }; + QueryListFacade::~QueryListFacade() { if ( m_pContainerListener.is() ) m_pContainerListener->dispose(); } -// ----------------------------------------------------------------------------- + void QueryListFacade::_elementInserted( const container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException) { ::rtl::OUString sName; if ( _rEvent.Accessor >>= sName ) m_rQueryList.InsertEntry( sName ); } -// ----------------------------------------------------------------------------- + void QueryListFacade::_elementRemoved( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { updateTableObjectList(true); } -// ----------------------------------------------------------------------------- + void QueryListFacade::_elementReplaced( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { } -//------------------------------------------------------------------------------ void QueryListFacade::updateTableObjectList( bool /*_bAllowViews*/ ) { m_rQueryList.Clear(); @@ -312,7 +303,6 @@ void QueryListFacade::updateTableObjectList( bool /*_bAllowViews*/ ) } } -//------------------------------------------------------------------------------ String QueryListFacade::getSelectedName( String& _out_rAliasName ) const { String sSelected; @@ -322,17 +312,13 @@ String QueryListFacade::getSelectedName( String& _out_rAliasName ) const return sSelected; } -//------------------------------------------------------------------------------ bool QueryListFacade::isLeafSelected() const { SvLBoxEntry* pEntry = m_rQueryList.FirstSelected(); return pEntry && !m_rQueryList.GetModel()->HasChildren( pEntry ); } -//============================================================================== -//= OAddTableDlg -//============================================================================== -//------------------------------------------------------------------------------ +// OAddTableDlg ---------------------------------------------------------------- OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) :ModelessDialog( pParent, ModuleRes(DLG_JOIN_TABADD) ) ,m_aCaseTables( this, ModuleRes( RB_CASE_TABLES ) ) @@ -352,7 +338,6 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) m_aTableList.SetHelpId( HID_JOINSH_ADDTAB_TABLELIST ); m_aQueryList.SetHelpId( HID_JOINSH_ADDTAB_QUERYLIST ); - ////////////////////////////////////////////////////////////////////// m_aCaseTables.SetClickHdl( LINK( this, OAddTableDlg, OnTypeSelected ) ); m_aCaseQueries.SetClickHdl( LINK( this, OAddTableDlg, OnTypeSelected ) ); aAddButton.SetClickHdl( LINK( this, OAddTableDlg, AddClickHdl ) ); @@ -362,7 +347,6 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) m_aQueryList.SetDoubleClickHdl( LINK( this, OAddTableDlg, TableListDoubleClickHdl ) ); m_aQueryList.SetSelectHdl( LINK( this, OAddTableDlg, TableListSelectHdl ) ); - ////////////////////////////////////////////////////////////////////// m_aTableList.EnableInplaceEditing( sal_False ); m_aTableList.SetStyle(m_aTableList.GetStyle() | WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL ); m_aTableList.EnableCheckButton( NULL ); // do not show any buttons @@ -370,11 +354,9 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) m_aTableList.notifyHiContrastChanged(); m_aTableList.suppressEmptyFolders(); - ////////////////////////////////////////////////////////////////////// m_aQueryList.EnableInplaceEditing( sal_False ); m_aQueryList.SetSelectionMode( SINGLE_SELECTION ); - ////////////////////////////////////////////////////////////////////// if ( !m_rContext.allowQueries() ) { m_aCaseTables.Hide(); @@ -396,13 +378,11 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) SetText( getDialogTitleForContext( m_rContext ) ); } -//------------------------------------------------------------------------------ OAddTableDlg::~OAddTableDlg() { m_rContext.onWindowClosing( this ); } -//------------------------------------------------------------------------------ void OAddTableDlg::impl_switchTo( ObjectList _eList ) { switch ( _eList ) @@ -424,7 +404,6 @@ void OAddTableDlg::impl_switchTo( ObjectList _eList ) m_pCurrentList->updateTableObjectList( m_rContext.allowViews() ); } -//------------------------------------------------------------------------------ void OAddTableDlg::Update() { if ( !m_pCurrentList.get() ) @@ -433,7 +412,6 @@ void OAddTableDlg::Update() m_pCurrentList->updateTableObjectList( m_rContext.allowViews() ); } -//------------------------------------------------------------------------------ void OAddTableDlg::impl_addTable() { if ( m_pCurrentList->isLeafSelected() ) @@ -445,14 +423,12 @@ void OAddTableDlg::impl_addTable() } } -//------------------------------------------------------------------------------ IMPL_LINK( OAddTableDlg, AddClickHdl, Button*, /*pButton*/ ) { TableListDoubleClickHdl(NULL); return 0; } -//------------------------------------------------------------------------------ IMPL_LINK( OAddTableDlg, TableListDoubleClickHdl, void*, /*EMPTY_ARG*/ ) { if ( impl_isAddAllowed() ) @@ -466,20 +442,17 @@ IMPL_LINK( OAddTableDlg, TableListDoubleClickHdl, void*, /*EMPTY_ARG*/ ) return 0L; // not handled } -//------------------------------------------------------------------------------ IMPL_LINK( OAddTableDlg, TableListSelectHdl, void*, /*EMPTY_ARG*/ ) { aAddButton.Enable( m_pCurrentList->isLeafSelected() ); return 0; } -//------------------------------------------------------------------------------ IMPL_LINK( OAddTableDlg, CloseClickHdl, Button*, /*pButton*/ ) { return Close(); } -//------------------------------------------------------------------------------ IMPL_LINK( OAddTableDlg, OnTypeSelected, void*, /*EMPTY_ARG*/ ) { if ( m_aCaseTables.IsChecked() ) @@ -489,20 +462,17 @@ IMPL_LINK( OAddTableDlg, OnTypeSelected, void*, /*EMPTY_ARG*/ ) return 0; } -//------------------------------------------------------------------------------ sal_Bool OAddTableDlg::Close() { m_rContext.onWindowClosing( this ); return ModelessDialog::Close(); } -//------------------------------------------------------------------------------ bool OAddTableDlg::impl_isAddAllowed() { return m_rContext.allowAddition(); } -//------------------------------------------------------------------------------ String OAddTableDlg::getDialogTitleForContext( IAddTableDialogContext& _rContext ) { String sTitle; @@ -516,6 +486,4 @@ String OAddTableDlg::getDialogTitleForContext( IAddTableDialogContext& _rContext return sTitle; } -// ----------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index c398ab46bae6..88e66164f7f9 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -17,9 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbfindex.hxx" - #include <tools/config.hxx> #include <sfx2/app.hxx> #include "moduledbu.hxx" @@ -33,22 +31,17 @@ #include <svl/filenotation.hxx> #include <rtl/strbuf.hxx> - -//......................................................................... namespace dbaui { -//......................................................................... - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::svt; const rtl::OString aGroupIdent(RTL_CONSTASCII_STRINGPARAM("dBase III")); -////////////////////////////////////////////////////////////////////////// -// Klasse ODbaseIndexDialog +// ODbaseIndexDialog ---------------------------------------------------------- DBG_NAME(ODbaseIndexDialog) -//------------------------------------------------------------------------- + ODbaseIndexDialog::ODbaseIndexDialog( Window * pParent, String aDataSrcName ) : ModalDialog( pParent, ModuleRes(DLG_DBASE_INDEXES) ), aPB_OK( this, ModuleRes( PB_OK ) ), @@ -86,14 +79,12 @@ ODbaseIndexDialog::ODbaseIndexDialog( Window * pParent, String aDataSrcName ) FreeResource(); } -//------------------------------------------------------------------------- ODbaseIndexDialog::~ODbaseIndexDialog() { DBG_DTOR(ODbaseIndexDialog,NULL); } -//------------------------------------------------------------------------- sal_Bool ODbaseIndexDialog::GetTable(const String& _rName, TableInfoListIterator& _rPosition) { for ( _rPosition = m_aTableInfoList.begin(); @@ -115,7 +106,6 @@ sal_Bool ODbaseIndexDialog::GetTable(const String& _rName, TableInfoListIterator return sal_False; } -//------------------------------------------------------------------------- void ODbaseIndexDialog::checkButtons() { aIB_Add.Enable(0 != aLB_FreeIndexes.GetSelectEntryCount()); @@ -125,7 +115,6 @@ void ODbaseIndexDialog::checkButtons() aIB_RemoveAll.Enable(0 != aLB_TableIndexes.GetEntryCount()); } -//------------------------------------------------------------------------- OTableIndex ODbaseIndexDialog::implRemoveIndex(const String& _rName, TableIndexList& _rList, ListBox& _rDisplay, sal_Bool _bMustExist) { OTableIndex aReturn; @@ -160,7 +149,6 @@ OTableIndex ODbaseIndexDialog::implRemoveIndex(const String& _rName, TableIndexL return aReturn; } -//------------------------------------------------------------------------- void ODbaseIndexDialog::implInsertIndex(const OTableIndex& _rIndex, TableIndexList& _rList, ListBox& _rDisplay) { _rList.push_front( _rIndex ); @@ -168,7 +156,6 @@ void ODbaseIndexDialog::implInsertIndex(const OTableIndex& _rIndex, TableIndexLi _rDisplay.SelectEntryPos(0); } -//------------------------------------------------------------------------- OTableIndex ODbaseIndexDialog::RemoveTableIndex( const String& _rTableName, const String& _rIndexName, sal_Bool _bMustExist ) { OTableIndex aReturn; @@ -181,7 +168,6 @@ OTableIndex ODbaseIndexDialog::RemoveTableIndex( const String& _rTableName, cons return implRemoveIndex(_rIndexName, aTablePos->aIndexList, aLB_TableIndexes, _bMustExist); } -//------------------------------------------------------------------------- void ODbaseIndexDialog::InsertTableIndex( const String& _rTableName, const OTableIndex& _rIndex) { TableInfoListIterator aTablePos; @@ -191,7 +177,6 @@ void ODbaseIndexDialog::InsertTableIndex( const String& _rTableName, const OTabl implInsertIndex(_rIndex, aTablePos->aIndexList, aLB_TableIndexes); } -//------------------------------------------------------------------------- IMPL_LINK( ODbaseIndexDialog, OKClickHdl, PushButton*, /*pButton*/ ) { // let all tables write their INF file @@ -206,7 +191,6 @@ IMPL_LINK( ODbaseIndexDialog, OKClickHdl, PushButton*, /*pButton*/ ) return 0; } -//------------------------------------------------------------------------- IMPL_LINK( ODbaseIndexDialog, AddClickHdl, PushButton*, /*pButton*/ ) { String aSelection = aLB_FreeIndexes.GetSelectEntry(); @@ -218,7 +202,6 @@ IMPL_LINK( ODbaseIndexDialog, AddClickHdl, PushButton*, /*pButton*/ ) return 0; } -//------------------------------------------------------------------------- IMPL_LINK( ODbaseIndexDialog, RemoveClickHdl, PushButton*, /*pButton*/ ) { String aSelection = aLB_TableIndexes.GetSelectEntry(); @@ -230,7 +213,6 @@ IMPL_LINK( ODbaseIndexDialog, RemoveClickHdl, PushButton*, /*pButton*/ ) return 0; } -//------------------------------------------------------------------------- IMPL_LINK( ODbaseIndexDialog, AddAllClickHdl, PushButton*, /*pButton*/ ) { sal_uInt16 nCnt = aLB_FreeIndexes.GetEntryCount(); @@ -243,7 +225,6 @@ IMPL_LINK( ODbaseIndexDialog, AddAllClickHdl, PushButton*, /*pButton*/ ) return 0; } -//------------------------------------------------------------------------- IMPL_LINK( ODbaseIndexDialog, RemoveAllClickHdl, PushButton*, /*pButton*/ ) { sal_uInt16 nCnt = aLB_TableIndexes.GetEntryCount(); @@ -256,14 +237,12 @@ IMPL_LINK( ODbaseIndexDialog, RemoveAllClickHdl, PushButton*, /*pButton*/ ) return 0; } -//------------------------------------------------------------------------- IMPL_LINK( ODbaseIndexDialog, OnListEntrySelected, ListBox*, /*NOTINTERESTEDIN*/ ) { checkButtons(); return 0; } -//------------------------------------------------------------------------- IMPL_LINK( ODbaseIndexDialog, TableSelectHdl, ComboBox*, pComboBox ) { // search the table @@ -286,7 +265,6 @@ IMPL_LINK( ODbaseIndexDialog, TableSelectHdl, ComboBox*, pComboBox ) return 0; } -//------------------------------------------------------------------------- void ODbaseIndexDialog::Init() { aPB_OK.Disable(); @@ -300,13 +278,11 @@ void ODbaseIndexDialog::Init() aIB_AddAll.Disable(); aIB_RemoveAll.Disable(); - /////////////////////////////////////////////////////////////////////////// // All indizes are first added to a list of free indizes. // Afterwards, check the index of each table in the Inf-file. // These indizes are removed from the list of free indizes and // entered in the indexlist of the the table. - /////////////////////////////////////////////////////////////////////////// // if the string does not contain a path, cut the string INetURLObject aURL; aURL.SetSmartProtocol(INET_PROT_FILE); @@ -316,7 +292,6 @@ void ODbaseIndexDialog::Init() } aURL.SetSmartURL(m_aDSN); - // String aFileName = aURL.PathToFileName(); m_aDSN = aURL.GetMainURL(INetURLObject::NO_DECODE); ::ucbhelper::Content aFile; @@ -331,7 +306,6 @@ void ODbaseIndexDialog::Init() return; } - /////////////////////////////////////////////////////////////////////////// // first assume for all indexes they're free Sequence< ::rtl::OUString> aFolderContent( ::utl::LocalFileHelper::GetFolderContents(m_aDSN,bFolder)); @@ -365,7 +339,6 @@ void ODbaseIndexDialog::Init() Config aInfFile( aTransformer.get(OFileNotation::N_SYSTEM) ); aInfFile.SetGroup( aGroupIdent ); - /////////////////////////////////////////////////////////////////////////// // fill the indexes list rtl::OString aNDX; sal_uInt16 nKeyCnt = aInfFile.GetKeyCount(); @@ -389,7 +362,6 @@ void ODbaseIndexDialog::Init() // do this later below. We may not have encountered the index file, yet, thus we may not // know the index as beeing free, yet } - } } } @@ -413,7 +385,6 @@ void ODbaseIndexDialog::Init() checkButtons(); } -//------------------------------------------------------------------------- void ODbaseIndexDialog::SetCtrls() { // ComboBox Tabellen @@ -438,7 +409,6 @@ void ODbaseIndexDialog::SetCtrls() if( rTabInfo.aIndexList.size() ) aLB_TableIndexes.SelectEntryPos( 0 ); - } // ListBox of the free indizes @@ -451,14 +421,11 @@ void ODbaseIndexDialog::SetCtrls() if( m_aFreeIndexList.size() ) aLB_FreeIndexes.SelectEntryPos( 0 ); - TableSelectHdl(&aCB_Tables); checkButtons(); } -////////////////////////////////////////////////////////////////////////// -// Class OTableInfo -//------------------------------------------------------------------------- +// OTableInfo ------------------------------------------------------------------ void OTableInfo::WriteInfFile( const String& rDSN ) const { // INF-Datei oeffnen @@ -528,15 +495,14 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const catch (const Exception& e ) { (void)e; // make compiler happy - // simply silent this. The strange algorithm here does a lot of things even if no files at all were - // created or accessed, so it's possible that the file we're trying to delete does not even exist, - // and this is a valid condition. + // simply silent this. The strange algorithm here does a lot of + // things even if no files at all were created or accessed, so it's + // possible that the file we're trying to delete does not even + // exist, and this is a valid condition. } } } -//......................................................................... -} // namespace dbaui -//......................................................................... +} // namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index e4775b4d9af0..affc779bc843 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "queryfilter.hxx" #include "moduledbu.hxx" #include <com/sun/star/sdbc/DataType.hpp> @@ -52,14 +51,12 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::beans; -//------------------------------------------------------------------------------ void Replace_OS_PlaceHolder(String& aString) { while (aString.SearchAndReplace( '*', '%' ) != STRING_NOTFOUND) ; while (aString.SearchAndReplace( '?', '_' ) != STRING_NOTFOUND) ; } -//------------------------------------------------------------------------------ void Replace_SQL_PlaceHolder(String& aString) { while (aString.SearchAndReplace( '%', '*' ) != STRING_NOTFOUND) ; @@ -67,7 +64,7 @@ void Replace_SQL_PlaceHolder(String& aString) } DBG_NAME(DlgFilterCrit); -//------------------------------------------------------------------------------ + DlgFilterCrit::DlgFilterCrit(Window * pParent, const Reference< XMultiServiceFactory >& _rxORB, const Reference< XConnection>& _rxConnection, @@ -202,7 +199,7 @@ DlgFilterCrit::DlgFilterCrit(Window * pParent, FreeResource(); } -//------------------------------------------------------------------------------ + DlgFilterCrit::~DlgFilterCrit() { DBG_DTOR(DlgFilterCrit,NULL); @@ -211,7 +208,6 @@ DlgFilterCrit::~DlgFilterCrit() #define LbText(x) ((x).GetSelectEntry()) #define LbPos(x) ((x).GetSelectEntryPos()) -//------------------------------------------------------------------------------ sal_Int32 DlgFilterCrit::GetOSQLPredicateType( const String& _rSelectedPredicate ) const { sal_Int32 nPredicateIndex = -1; @@ -262,7 +258,7 @@ sal_Int32 DlgFilterCrit::GetOSQLPredicateType( const String& _rSelectedPredicate return nPredicateType; } -//------------------------------------------------------------------------------ + sal_uInt16 DlgFilterCrit::GetSelectionPos(sal_Int32 eType,const ListBox& rListBox) const { sal_uInt16 nPos; @@ -305,7 +301,7 @@ sal_uInt16 DlgFilterCrit::GetSelectionPos(sal_Int32 eType,const ListBox& rListBo } return nPos; } -// ----------------------------------------------------------------------------- + sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rComp,const Edit& _rValue,PropertyValue& _rFilter) const { sal_Bool bHaving = sal_False; @@ -325,7 +321,8 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom xColumn->getPropertyValue(PROPERTY_TABLENAME) >>= sTableName; if ( !sTableName.isEmpty() ) { - // properly quote all parts of the table name, so e.g. <schema>.<table> becomes "<schema>"."<table>" + // properly quote all parts of the table name, so + // e.g. <schema>.<table> becomes "<schema>"."<table>" ::rtl::OUString aCatlog,aSchema,aTable; ::dbtools::qualifiedNameComponents( m_xMetaData, sTableName, aCatlog, aSchema, aTable, ::dbtools::eInDataManipulation ); sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, sal_True, ::dbtools::eInDataManipulation ); @@ -367,7 +364,6 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom return bHaving; } -//------------------------------------------------------------------------------ Reference< XPropertySet > DlgFilterCrit::getColumn( const ::rtl::OUString& _rFieldName ) const { Reference< XPropertySet > xColumn; @@ -406,7 +402,7 @@ Reference< XPropertySet > DlgFilterCrit::getColumn( const ::rtl::OUString& _rFie return xColumn; } -//------------------------------------------------------------------------------ + Reference< XPropertySet > DlgFilterCrit::getQueryColumn( const ::rtl::OUString& _rFieldName ) const { Reference< XPropertySet > xColumn; @@ -424,7 +420,6 @@ Reference< XPropertySet > DlgFilterCrit::getQueryColumn( const ::rtl::OUString& return xColumn; } -//------------------------------------------------------------------------------ Reference< XPropertySet > DlgFilterCrit::getMatchingColumn( const Edit& _rValueInput ) const { // the name @@ -449,7 +444,6 @@ Reference< XPropertySet > DlgFilterCrit::getMatchingColumn( const Edit& _rValueI return getColumn( sField ); } -//------------------------------------------------------------------------------ IMPL_LINK( DlgFilterCrit, PredicateLoseFocus, Edit*, _pField ) { OSL_ENSURE( _pField, "DlgFilterCrit::PredicateLoseFocus: invalid event source!" ); @@ -469,8 +463,6 @@ IMPL_LINK( DlgFilterCrit, PredicateLoseFocus, Edit*, _pField ) return 0L; } -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Bool _bOr ) { DBG_CHKTHIS(DlgFilterCrit,NULL); @@ -529,7 +521,6 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Boo pPredicateListControl = &aLB_WHERECOMP1; pPredicateValueControl = &aET_WHEREVALUE1; break; - case 1: aLB_WHERECOND2.SelectEntryPos( _bOr ? 1 : 0 ); @@ -537,7 +528,6 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Boo pPredicateListControl = &aLB_WHERECOMP2; pPredicateValueControl = &aET_WHEREVALUE2; break; - case 2: aLB_WHERECOND3.SelectEntryPos( _bOr ? 1 : 0 ); @@ -568,7 +558,6 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Boo } } -//------------------------------------------------------------------------------ void DlgFilterCrit::SelectField( ListBox& rBox, const String& rField ) { DBG_CHKTHIS(DlgFilterCrit,NULL); @@ -586,7 +575,6 @@ void DlgFilterCrit::SelectField( ListBox& rBox, const String& rField ) rBox.SelectEntryPos(0); } -//------------------------------------------------------------------------------ void DlgFilterCrit::EnableLines() { DBG_CHKTHIS(DlgFilterCrit,NULL); @@ -688,10 +676,8 @@ void DlgFilterCrit::EnableLines() ((LbPos(aLB_WHERECOMP3) == aLB_WHERECOMP3.GetEntryCount()-1) || (LbPos(aLB_WHERECOMP3) == aLB_WHERECOMP3.GetEntryCount()-2)) ) aET_WHEREVALUE3.Disable(); - } -//------------------------------------------------------------------------------ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox ) { String aName; @@ -750,16 +736,13 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox ) return 0; } - - -//------------------------------------------------------------------------------ IMPL_LINK_INLINE_START( DlgFilterCrit, ListSelectCompHdl, ListBox *, /*pListBox*/ ) { EnableLines(); return 0; } IMPL_LINK_INLINE_END( DlgFilterCrit, ListSelectCompHdl, ListBox *, pListBox ) -//------------------------------------------------------------------------------ + void DlgFilterCrit::BuildWherePart() { DBG_CHKTHIS(DlgFilterCrit,NULL); @@ -839,7 +822,7 @@ void DlgFilterCrit::BuildWherePart() DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void DlgFilterCrit::fillLines(const Sequence<Sequence<PropertyValue > >& _aValues) { const Sequence<PropertyValue >* pOrIter = _aValues.getConstArray(); diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index fa05721e823c..67216909840c 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -19,9 +19,7 @@ #include "queryorder.hrc" #include "queryorder.hxx" - #include "dbustrings.hrc" - #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> #include <com/sun/star/sdbc/ColumnSearch.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -31,12 +29,9 @@ #include <connectivity/dbtools.hxx> #include <comphelper/extract.hxx> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> - #include <tools/diagnose_ex.h> - #include <algorithm> - using namespace dbaui; using namespace connectivity; using namespace ::com::sun::star::uno; @@ -48,7 +43,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::beans; DBG_NAME(DlgOrderCrit) -//------------------------------------------------------------------------------ + DlgOrderCrit::DlgOrderCrit( Window * pParent, const Reference< XConnection>& _rxConnection, const Reference< XSingleSelectQueryComposer >& _rxComposer, @@ -140,16 +135,13 @@ DlgOrderCrit::DlgOrderCrit( Window * pParent, aLB_ORDERFIELD2.SetSelectHdl(LINK(this,DlgOrderCrit,FieldListSelectHdl)); FreeResource(); - } -//------------------------------------------------------------------------------ DlgOrderCrit::~DlgOrderCrit() { DBG_DTOR(DlgOrderCrit,NULL); } -//------------------------------------------------------------------------------ IMPL_LINK_INLINE_START( DlgOrderCrit, FieldListSelectHdl, ListBox *, /*pListBox*/ ) { DBG_CHKTHIS(DlgOrderCrit,NULL); @@ -158,7 +150,6 @@ IMPL_LINK_INLINE_START( DlgOrderCrit, FieldListSelectHdl, ListBox *, /*pListBox* } IMPL_LINK_INLINE_END( DlgOrderCrit, FieldListSelectHdl, ListBox *, pListBox ) -//------------------------------------------------------------------------------ void DlgOrderCrit::impl_initializeOrderList_nothrow() { try @@ -191,7 +182,6 @@ void DlgOrderCrit::impl_initializeOrderList_nothrow() } } -//------------------------------------------------------------------------------ void DlgOrderCrit::EnableLines() { DBG_CHKTHIS(DlgOrderCrit,NULL); @@ -225,7 +215,6 @@ void DlgOrderCrit::EnableLines() } } -//------------------------------------------------------------------------------ ::rtl::OUString DlgOrderCrit::GetOrderList( ) const { DBG_CHKTHIS(DlgOrderCrit,NULL); @@ -278,16 +267,10 @@ void DlgOrderCrit::EnableLines() return sOrder; } -//------------------------------------------------------------------------------ void DlgOrderCrit::BuildOrderPart() { DBG_CHKTHIS(DlgOrderCrit,NULL); m_xQueryComposer->setOrder(GetOrderList()); } -// ----------------------------------------------------------------------------- - - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |