diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-01 14:21:06 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-02 07:14:20 +0000 |
commit | 5e7cf50756232b08964dfb15d027697b4eba004f (patch) | |
tree | 6dd2019c2945b1cd55d7663f30789c9a1db90617 /dbaccess | |
parent | fd3d1bbaa9ab338f374fd20798fca71a888c9ab7 (diff) |
SetXXX(bool) with a default value of false are just wrong
Change-Id: I4888d0474199bb10ca81d1ad03118a150f574671
Reviewed-on: https://gerrit.libreoffice.org/18235
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/dlgsave.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/SqlNameEdit.hxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableFieldDescription.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 14 |
4 files changed, 10 insertions, 11 deletions
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index dbb78c608a93..50d2342a1d60 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -338,7 +338,7 @@ void OSaveAsDlg::implInitOnlyTitle(const OUString& _rLabel) m_pImpl->m_pSchema->Hide(); m_pImpl->m_pTitle->SetText(m_pImpl->m_aName); - m_pImpl->m_pTitle->setCheck(); // enable non valid sql chars as well + m_pImpl->m_pTitle->setCheck(false); // enable non valid sql chars as well } void OSaveAsDlg::implInit() diff --git a/dbaccess/source/ui/inc/SqlNameEdit.hxx b/dbaccess/source/ui/inc/SqlNameEdit.hxx index 2c1ecd27aa9f..03ba4018ce8f 100644 --- a/dbaccess/source/ui/inc/SqlNameEdit.hxx +++ b/dbaccess/source/ui/inc/SqlNameEdit.hxx @@ -45,8 +45,7 @@ namespace dbaui { m_sAllowedChars = _rAllowedChars; } - // default is false because it is initialized with true - void setCheck(bool _bCheck = false) + void setCheck(bool _bCheck) { m_bCheck = _bCheck; } diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx index adc5ab3d7cd0..9ab6078fab08 100644 --- a/dbaccess/source/ui/inc/TableFieldDescription.hxx +++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx @@ -79,7 +79,7 @@ namespace dbaui bool IsGroupBy() const { return m_bGroupBy;} void SetVisible( bool bVis=true ) { m_bVisible = bVis; } - void SetGroupBy( bool bGb=false ) { m_bGroupBy = bGb; } + void SetGroupBy( bool bGb ) { m_bGroupBy = bGb; } void SetTabWindow( vcl::Window* pWin ){ m_pTabWindow = pWin; } void SetField( const OUString& rF ) { m_aFieldName = rF; } void SetFieldAlias( const OUString& rF ) { m_aFieldAlias = rF; } diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 983233b14f66..98285bf3e1eb 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -574,7 +574,7 @@ void OSelectionBrowseBox::clearEntryFunctionField(const OUString& _sFieldName,OT // append undo action for the function field _pEntry->SetFunctionType(FKT_NONE); _pEntry->SetFunction(OUString()); - _pEntry->SetGroupBy(); + _pEntry->SetGroupBy(false); notifyFunctionFieldChanged(sOldLocalizedFunctionName,_pEntry->GetFunction(),_bListAction,_nColumnId); } } @@ -821,7 +821,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _ if ( aSelEntry->IsGroupBy() ) { sOldLocalizedFunctionName = m_aFunctionStrings.getToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1, ';'); - aSelEntry->SetGroupBy(); + aSelEntry->SetGroupBy(false); } // append undo action @@ -1659,7 +1659,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt { if ( pEntry->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) { - pEntry->SetGroupBy(); + pEntry->SetGroupBy(false); aIter = rFields.end(); break; } @@ -1681,7 +1681,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt { OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false ); if ( (pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy()) ) // the GroupBy is inherited from rInfo - pTmp->SetGroupBy(); + pTmp->SetGroupBy(false); } } @@ -1737,7 +1737,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O pEntry->IsGroupBy() == rInfo->IsGroupBy() ) { if ( pEntry->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) - pEntry->SetGroupBy(); + pEntry->SetGroupBy(false); else { if(!m_bGroupByUnRelated && pEntry->IsGroupBy()) @@ -1786,7 +1786,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O { OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false ); if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // the GroupBy was inherited from rInfo - pTmp->SetGroupBy(); + pTmp->SetGroupBy(false); if ( pTmp.is() ) { pTmp->SetCriteria( nLevel, rValue); @@ -2289,7 +2289,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con nFunctionType &= ~FKT_AGGREGATE; pEntry->SetFunctionType(nFunctionType); if ( pEntry->IsGroupBy() && !sGroupFunctionName.equalsIgnoreAsciiCase(strNewText) ) - pEntry->SetGroupBy(); + pEntry->SetGroupBy(false); if ( sGroupFunctionName.equalsIgnoreAsciiCase(strNewText) ) pEntry->SetGroupBy(true); |