loplugin: defaultparams

Change-Id: Ia66788f5db2da8c6259cd08f655b3cb7cb12ed59
This commit is contained in:
Noel Grandin 2015-08-12 15:09:51 +02:00
parent 4c6d1a2636
commit 56af9ab6bb
30 changed files with 93 additions and 98 deletions

View File

@ -485,7 +485,7 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc
aNewName = aName;
else
{
if(sTableName.indexOf('.',0) != -1)
if(sTableName.indexOf('.') != -1)
{
OUString aCatlog,aSchema,aTable;
::dbtools::qualifiedNameComponents(m_xMetaData,sTableName,aCatlog,aSchema,aTable,::dbtools::eInDataManipulation);
@ -789,7 +789,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
OUString sSQL( aSQL.makeStringAndClear() );
// normalize the statement so that it doesn't contain any application-level features anymore
OUString sError;
const boost::scoped_ptr< OSQLParseNode > pStatementTree( m_aSqlParser.parseTree( sError, sSQL, false ) );
const boost::scoped_ptr< OSQLParseNode > pStatementTree( m_aSqlParser.parseTree( sError, sSQL ) );
OSL_ENSURE( pStatementTree.get(), "OSingleSelectQueryComposer::getColumns: could not parse the column retrieval statement!" );
if ( pStatementTree.get() )
if ( !pStatementTree->parseNodeToExecutableStatement( sSQL, m_xConnection, m_aSqlParser, NULL ) )
@ -1588,7 +1588,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
OUString sRealName,sTableName;
xColumn->getPropertyValue(PROPERTY_REALNAME) >>= sRealName;
xColumn->getPropertyValue(PROPERTY_TABLENAME) >>= sTableName;
if(sTableName.indexOf('.',0) != -1)
if(sTableName.indexOf('.') != -1)
{
OUString aCatlog,aSchema,aTable;
::dbtools::qualifiedNameComponents(m_xMetaData,sTableName,aCatlog,aSchema,aTable,::dbtools::eInDataManipulation);

View File

@ -201,7 +201,7 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (Ru
}
catch ( const Exception& )
{
setColumnsOutOfDate( true );
setColumnsOutOfDate();
throw;
}
}

View File

@ -563,7 +563,7 @@ namespace
try
{
Reference< XStorage > xContainerStorage( _rModel.getStorage( _eType, ElementModes::READWRITE ) );
Reference< XStorage > xContainerStorage( _rModel.getStorage( _eType ) );
// note the READWRITE here: If the storage already existed before, then the OpenMode will
// be ignored, anyway.
// If the storage did not yet exist, then it will be created. If the database document

View File

@ -765,7 +765,7 @@ void ODocumentDefinition::impl_showOrHideComponent_throw( const bool i_bShow )
case EmbedStates::ACTIVE:
{
Reference< XModel > xEmbeddedDoc( impl_getComponent_throw( true ), UNO_QUERY_THROW );
Reference< XModel > xEmbeddedDoc( impl_getComponent_throw(), UNO_QUERY_THROW );
Reference< XController > xEmbeddedController( xEmbeddedDoc->getCurrentController(), UNO_SET_THROW );
Reference< XFrame > xEmbeddedFrame( xEmbeddedController->getFrame(), UNO_SET_THROW );
Reference< XWindow > xEmbeddedWindow( xEmbeddedFrame->getContainerWindow(), UNO_SET_THROW );
@ -1802,7 +1802,7 @@ Reference< util::XCloseable > ODocumentDefinition::impl_getComponent_throw( cons
Reference< util::XCloseable > ODocumentDefinition::getComponent() throw (RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
return impl_getComponent_throw( true );
return impl_getComponent_throw();
}
namespace

View File

@ -382,7 +382,7 @@ namespace dbaccess
// find a free sub storage name, and create Yet Another Sub Storage
const OUString& rBaseName( lcl_getComponentStorageBaseName( m_eType ) );
const OUString sStorName = ::dbtools::createUniqueName( xComponentsStorage.get(), rBaseName, true );
const OUString sStorName = ::dbtools::createUniqueName( xComponentsStorage.get(), rBaseName );
const Reference< XStorage > xObjectStor( xComponentsStorage->openStorageElement(
sStorName, ElementModes::READWRITE ), UNO_QUERY_THROW );

View File

@ -197,7 +197,7 @@ namespace dbmm
break;
case STATE_BACKUP_DBDOC:
enableState( STATE_MIGRATE, true );
enableState( STATE_MIGRATE );
// Note that the state is automatically disabled if the current page
// (SaveDBDocPage) returns false in its canAdvance, not caring that
// we enabled it here.
@ -294,7 +294,7 @@ namespace dbmm
// re-enable the UI
enableButtons( WizardButtonFlags::FINISH | WizardButtonFlags::NEXT, true );
enableState( STATE_SUMMARY, true );
enableState( STATE_SUMMARY );
updateTravelUI();
m_pData->bMigrationIsRunning = false;

View File

@ -1493,16 +1493,16 @@ void OApplicationController::describeSupportedFeatures()
// this one should not appear under Tools->Customize->Keyboard
implDescribeSupportedFeature( ".uno:DBNewReportWithPreSelection",
SID_APP_NEW_REPORT_PRE_SEL,CommandGroup::INTERNAL );
implDescribeSupportedFeature( ".uno:DBDSImport", SID_DB_APP_DSIMPORT, CommandGroup::INTERNAL);
implDescribeSupportedFeature( ".uno:DBDSExport", SID_DB_APP_DSEXPORT, CommandGroup::INTERNAL);
implDescribeSupportedFeature( ".uno:DBDBAdmin", SID_DB_APP_DBADMIN, CommandGroup::INTERNAL);
SID_APP_NEW_REPORT_PRE_SEL );
implDescribeSupportedFeature( ".uno:DBDSImport", SID_DB_APP_DSIMPORT);
implDescribeSupportedFeature( ".uno:DBDSExport", SID_DB_APP_DSEXPORT);
implDescribeSupportedFeature( ".uno:DBDBAdmin", SID_DB_APP_DBADMIN);
// status info
implDescribeSupportedFeature( ".uno:DBStatusType", SID_DB_APP_STATUS_TYPE, CommandGroup::INTERNAL);
implDescribeSupportedFeature( ".uno:DBStatusDBName", SID_DB_APP_STATUS_DBNAME, CommandGroup::INTERNAL);
implDescribeSupportedFeature( ".uno:DBStatusUserName", SID_DB_APP_STATUS_USERNAME, CommandGroup::INTERNAL);
implDescribeSupportedFeature( ".uno:DBStatusHostName", SID_DB_APP_STATUS_HOSTNAME, CommandGroup::INTERNAL);
implDescribeSupportedFeature( ".uno:DBStatusType", SID_DB_APP_STATUS_TYPE);
implDescribeSupportedFeature( ".uno:DBStatusDBName", SID_DB_APP_STATUS_DBNAME);
implDescribeSupportedFeature( ".uno:DBStatusUserName", SID_DB_APP_STATUS_USERNAME);
implDescribeSupportedFeature( ".uno:DBStatusHostName", SID_DB_APP_STATUS_HOSTNAME);
}
OApplicationView* OApplicationController::getContainer() const

View File

@ -56,7 +56,7 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent)
pEntry->SetUserData( new ElementType( aCategories[i].eType ) );
}
SetChoiceWithCursor( true );
SetChoiceWithCursor();
SetSelectionMode(SINGLE_SELECTION);
}

View File

@ -2587,7 +2587,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
// not really loaded
m_pCurrentlyDisplayed = _pEntry;
// tell the new entry it has been selected
selectPath(m_pCurrentlyDisplayed, true);
selectPath(m_pCurrentlyDisplayed);
// get the name of the data source currently selected
ensureConnection( m_pCurrentlyDisplayed, pConData->xConnection );
@ -3757,7 +3757,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSo
{ // a table or query belonging to the deleted data source is currently being displayed.
OSL_ENSURE( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) == pDataSourceEntry,
"SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (1)!" );
unloadAndCleanup( true );
unloadAndCleanup();
}
else
OSL_ENSURE(

View File

@ -926,7 +926,7 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
pFormatText = CreateText(STR_FORMAT);
pFormatSample = VclPtr<OPropEditCtrl>::Create( this, STR_HELP_FORMAT_CODE, -1, WB_BORDER );
pFormatSample->SetReadOnly(true);
pFormatSample->SetReadOnly();
pFormatSample->Enable(false);
InitializeControl(pFormatSample,HID_TAB_ENT_FORMAT_SAMPLE,false);

View File

@ -394,7 +394,7 @@ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, bool _bChecked,
{
// remove the mark for all ancestors of the entry
if (GetModel()->HasParent(_pEntry))
implEmphasize(GetParent(_pEntry), false, false, true);
implEmphasize(GetParent(_pEntry), false, false);
}
}

View File

@ -205,7 +205,7 @@ namespace dbaui
INetURLObject aSelectedDirectory( sSelectedDirectory, INetURLObject::WAS_ENCODED, RTL_TEXTENCODING_UTF8 );
// for UI purpose, we don't want to have the path encoded
sSelectedDirectory = aSelectedDirectory.GetMainURL( INetURLObject::DECODE_WITH_CHARSET, RTL_TEXTENCODING_UTF8 );
sSelectedDirectory = aSelectedDirectory.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
setURLNoPrefix( sSelectedDirectory );
SetRoadmapStateValue(true);

View File

@ -116,18 +116,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD
{
case KeyRule::NO_ACTION:
case KeyRule::RESTRICT:
m_pRB_NoCascUpd->Check( true );
m_pRB_NoCascUpd->Check();
break;
case KeyRule::CASCADE:
m_pRB_CascUpd->Check( true );
m_pRB_CascUpd->Check();
break;
case KeyRule::SET_NULL:
m_pRB_CascUpdNull->Check( true );
m_pRB_CascUpdNull->Check();
break;
case KeyRule::SET_DEFAULT:
m_pRB_CascUpdDefault->Check( true );
m_pRB_CascUpdDefault->Check();
break;
}
@ -136,18 +136,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD
{
case KeyRule::NO_ACTION:
case KeyRule::RESTRICT:
m_pRB_NoCascDel->Check( true );
m_pRB_NoCascDel->Check();
break;
case KeyRule::CASCADE:
m_pRB_CascDel->Check( true );
m_pRB_CascDel->Check();
break;
case KeyRule::SET_NULL:
m_pRB_CascDelNull->Check( true );
m_pRB_CascDelNull->Check();
break;
case KeyRule::SET_DEFAULT:
m_pRB_CascDelDefault->Check( true );
m_pRB_CascDelDefault->Check();
break;
}
}

View File

@ -109,7 +109,7 @@ namespace dbaui
m_pAccessTextFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
m_pAccessCSVFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
m_pAccessOtherFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
m_pAccessCSVFiles->Check(true);
m_pAccessCSVFiles->Check();
struct SectionDescriptor
{
@ -393,12 +393,12 @@ namespace dbaui
void OTextConnectionHelper::SetExtension(const OUString& _rVal)
{
if (_rVal == "txt")
m_pAccessTextFiles->Check(true);
m_pAccessTextFiles->Check();
else if (_rVal == "csv")
m_pAccessCSVFiles->Check(true);
m_pAccessCSVFiles->Check();
else
{
m_pAccessOtherFiles->Check(true);
m_pAccessOtherFiles->Check();
m_pExtensionExample->SetText(_rVal);
}
}

View File

@ -63,7 +63,7 @@ namespace dbaui
,m_pItemSetHelper(NULL)
{
SetExchangeSupport(true);
SetExchangeSupport();
}
SfxTabPage::sfxpg OGenericAdministrationPage::DeactivatePage(SfxItemSet* _pSet)

View File

@ -382,7 +382,7 @@ void OAddTableDlg::impl_switchTo( ObjectList _eList )
switch ( _eList )
{
case Tables:
m_pTableList->Show( true ); m_pCaseTables->Check( true );
m_pTableList->Show( true ); m_pCaseTables->Check();
m_pQueryList->Show( false ); m_pCaseQueries->Check( false );
m_xCurrentList.reset( new TableListFacade( *m_pTableList, m_rContext.getConnection() ) );
m_pTableList->GrabFocus();
@ -390,7 +390,7 @@ void OAddTableDlg::impl_switchTo( ObjectList _eList )
case Queries:
m_pTableList->Show( false ); m_pCaseTables->Check( false );
m_pQueryList->Show( true ); m_pCaseQueries->Check( true );
m_pQueryList->Show( true ); m_pCaseQueries->Check();
m_xCurrentList.reset( new QueryListFacade( *m_pQueryList, m_rContext.getConnection() ) );
m_pQueryList->GrabFocus();
break;

View File

@ -106,7 +106,7 @@ namespace dbaui
// check whether this must be a tristate check box
const SfxPoolItem& rItem = _rCoreAttrs.Get( nItemId );
if ( rItem.ISA( OptionalBoolItem ) )
(*setting->ppControl)->EnableTriState( true );
(*setting->ppControl)->EnableTriState();
}
}

View File

@ -84,7 +84,7 @@ ODbTypeWizDialog::ODbTypeWizDialog(vcl::Window* _pParent
SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT));
defaultButton(WizardButtonFlags::NEXT);
enableButtons(WizardButtonFlags::FINISH, false);
enableAutomaticNextButtonState( true );
enableAutomaticNextButtonState();
m_pPrevPage->SetHelpId(HID_DBWIZ_PREVIOUS);
m_pNextPage->SetHelpId(HID_DBWIZ_NEXT);

View File

@ -329,7 +329,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath()
OSL_ENSURE( nCreateNewDBIndex != -1, "ODbTypeWizDialogSetup::activateDatabasePath: the GeneralPage should have prevented this!" );
activatePath( static_cast< PathId >( nCreateNewDBIndex + 1 ), true );
enableState(PAGE_DBSETUPWIZARD_FINAL, true );
enableState(PAGE_DBSETUPWIZARD_FINAL );
enableButtons( WizardButtonFlags::FINISH, true);
}
break;
@ -994,7 +994,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
// wants us to load could be a non-database document. Instead, we asynchronously
// open the selected document. Thus, the wizard's return value is RET_CANCEL,
// which means to not continue loading the database document
if ( !OWizardMachine::Finish( RET_CANCEL ) )
if ( !OWizardMachine::Finish() )
return false;
try

View File

@ -339,7 +339,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(false); // enable non valid sql chars as well
m_pImpl->m_pTitle->setCheck(); // enable non valid sql chars as well
}
void OSaveAsDlg::implInit()

View File

@ -564,7 +564,7 @@ namespace dbaui
OSL_ENSURE(!m_bEditAgain, "DbaIndexDialog::OnCloseDialog: somebody was faster than hell!");
// this means somebody entered a new name, which was invalid, which cause us to posted us an event,
// and before the event arrived the user clicked onto "close". VERY fast, this user ....
m_pIndexList->EndEditing(false);
m_pIndexList->EndEditing();
if (m_bEditAgain)
// could not commit the new name (started a new - asynchronous - edit trial)
return 1L;
@ -778,7 +778,7 @@ namespace dbaui
m_pIndexList->EndSelection();
if (m_pIndexList->IsEditingActive())
m_pIndexList->EndEditing(false);
m_pIndexList->EndEditing();
// commit the old data
if (m_pIndexList->FirstSelected() != m_pPreviousSelection)

View File

@ -212,7 +212,7 @@ namespace dbaui
{
if ((1 == _rTableFilter.getLength()) && _rTableFilter[0] == "%")
{ // all tables visible
CheckAll(true);
CheckAll();
}
else
implCheckTables( _rTableFilter );

View File

@ -70,14 +70,14 @@ OCopyTable::OCopyTable(vcl::Window * pParent)
get(m_pFT_KeyName, "keynamelabel");
get(m_pEdKeyName, "keyname");
m_pEdTableName->SetMaxTextLen(EDIT_NOLIMIT);
m_pEdTableName->SetMaxTextLen();
if ( m_pParent->m_xDestConnection.is() )
{
if ( !m_pParent->supportsViews() )
m_pRB_View->Disable();
m_pCB_UseHeaderLine->Check(true);
m_pCB_UseHeaderLine->Check();
m_bPKeyAllowed = m_pParent->supportsPrimaryKey();
m_pCB_PrimaryColumn->Enable(m_bPKeyAllowed);
@ -341,26 +341,26 @@ void OCopyTable::setCreateStyleAction()
switch(m_pParent->getOperation())
{
case CopyTableOperation::CopyDefinitionAndData:
m_pRB_DefData->Check(true);
m_pRB_DefData->Check();
RadioChangeHdl(m_pRB_DefData);
break;
case CopyTableOperation::CopyDefinitionOnly:
m_pRB_Def->Check(true);
m_pRB_Def->Check();
RadioChangeHdl(m_pRB_Def);
break;
case CopyTableOperation::AppendData:
m_pRB_AppendData->Check(true);
m_pRB_AppendData->Check();
SetAppendDataRadio();
break;
case CopyTableOperation::CreateAsView:
if ( m_pRB_View->IsEnabled() )
{
m_pRB_View->Check(true);
m_pRB_View->Check();
RadioChangeHdl(m_pRB_View);
}
else
{
m_pRB_DefData->Check(true);
m_pRB_DefData->Check();
RadioChangeHdl(m_pRB_DefData);
}
}

View File

@ -275,7 +275,7 @@ IMPL_LINK_NOARG( OWizNameMatching, TableListClickHdl )
if ( nNewPos - nPos == 1 )
--nNewPos;
m_pCTRL_RIGHT->MakeVisible(m_pCTRL_RIGHT->GetEntry(nNewPos), true);
m_pCTRL_RIGHT->Select(pOldEntry,true);
m_pCTRL_RIGHT->Select(pOldEntry);
}
}
else if(!pOldEntry)
@ -283,7 +283,7 @@ IMPL_LINK_NOARG( OWizNameMatching, TableListClickHdl )
pOldEntry = m_pCTRL_RIGHT->GetEntry(nPos);
if(pOldEntry)
{
m_pCTRL_RIGHT->Select(pOldEntry,true);
m_pCTRL_RIGHT->Select(pOldEntry);
}
}
}
@ -309,7 +309,7 @@ IMPL_LINK_NOARG( OWizNameMatching, TableListRightSelectHdl )
if ( nNewPos - nPos == 1 )
nNewPos--;
m_pCTRL_LEFT->MakeVisible(m_pCTRL_LEFT->GetEntry(nNewPos), true);
m_pCTRL_LEFT->Select(pOldEntry,true);
m_pCTRL_LEFT->Select(pOldEntry);
}
}
else if(!pOldEntry)
@ -317,7 +317,7 @@ IMPL_LINK_NOARG( OWizNameMatching, TableListRightSelectHdl )
pOldEntry = m_pCTRL_LEFT->GetEntry(nPos);
if(pOldEntry)
{
m_pCTRL_LEFT->Select(pOldEntry,true);
m_pCTRL_LEFT->Select(pOldEntry);
}
}
}

View File

@ -917,14 +917,14 @@ void OJoinTableView::SelectConn(OTableConnection* pConn)
SvTreeListEntry* pSourceEntry = pSourceBox->GetEntryFromText((*aIter)->GetData()->GetSourceFieldName());
if (pSourceEntry)
{
pSourceBox->Select(pSourceEntry, true);
pSourceBox->Select(pSourceEntry);
pSourceBox->MakeVisible(pSourceEntry);
}
SvTreeListEntry* pDestEntry = pDestBox->GetEntryFromText((*aIter)->GetData()->GetDestFieldName());
if (pDestEntry)
{
pDestBox->Select(pDestEntry, true);
pDestBox->Select(pDestEntry);
pDestBox->MakeVisible(pDestEntry);
}

View File

@ -1482,7 +1482,7 @@ namespace
aDragLeft->SetField(aCondition);
aDragLeft->SetFunctionType(FKT_CONDITION);
eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,false,true).is() ? eOk : eTooManyColumns;
eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,false).is() ? eOk : eTooManyColumns;
}
else //! TODO not supported yet
eErrorCode = eStatementTooComplex;
@ -1523,7 +1523,6 @@ namespace
pFunction->parseNodeToStr( aColumnName,
xConnection,
&rController.getParser().getContext(),
true,
true); // quote is to true because we need quoted elements inside the function
// don't display the column name
aCondition = aCondition.copy(aColumnName.getLength());
@ -2015,7 +2014,7 @@ namespace
OQueryTableWindow* pExistentWin = pTableView->FindTable( sAlias );
if ( !pExistentWin )
{
pTableView->AddTabWin( sComposedName, sAlias, false ); // don't create data here
pTableView->AddTabWin( sComposedName, sAlias ); // don't create data here
}
else
{
@ -2223,7 +2222,6 @@ namespace
pParamRef->parseNodeToStr( sFieldName,
xConnection,
&rController.getParser().getContext(),
true,
true); // quote is to true because we need quoted elements inside the function
}
aInfo->SetDataType(DataType::DOUBLE);
@ -2257,7 +2255,6 @@ namespace
pColumnRef->parseNodeToStr( aColumns,
xConnection,
&rController.getParser().getContext(),
true,
true); // quote is to true because we need quoted elements inside the function
aInfo->SetTabWindow( NULL );
@ -2419,7 +2416,6 @@ namespace
pArgument->parseNodeToStr( sGroupByExpression,
xConnection,
&rController.getParser().getContext(),
true,
true); // quote is to true because we need quoted elements inside the function
_pView->fillFunctionInfo(pArgument,sGroupByExpression,aDragInfo);
aDragInfo->SetFunctionType(FKT_OTHER);

View File

@ -517,7 +517,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
if(!pEntry->IsVisible() && pEntry->GetOrderDir() != ORDER_NONE && !m_bOrderByUnRelated)
{
// a column has to visible in order to show up in ORDER BY
pEntry->SetVisible(true);
pEntry->SetVisible();
m_pVisibleCell->GetBox().Check(pEntry->IsVisible());
m_pVisibleCell->GetBox().SaveValue();
m_pVisibleCell->GetBox().Disable();
@ -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(false);
_pEntry->SetGroupBy();
notifyFunctionFieldChanged(sOldLocalizedFunctionName,_pEntry->GetFunction(),_bListAction,_nColumnId);
}
}
@ -667,7 +667,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _
OUString devnull;
pParseNode = rParser.parseTree( devnull, _sFieldName, true );
if (pParseNode == NULL)
pParseNode = rParser.parseTree( devnull, _sFieldName, false );
pParseNode = rParser.parseTree( devnull, _sFieldName );
if (pParseNode != NULL && SQL_ISRULE(pParseNode, select_statement))
_sFieldName = "(" + _sFieldName + ")";
}
@ -748,7 +748,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _
aSelEntry = FindFirstFreeCol(nColumnPostion);
if ( !aSelEntry.is() )
{
AppendNewCol(1);
AppendNewCol();
aSelEntry = FindFirstFreeCol(nColumnPostion);
}
++nColumnPostion;
@ -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(false);
aSelEntry->SetGroupBy();
}
// append undo action
@ -839,7 +839,6 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _
pColumnRef->parseNodeToStr( sFunction,
xConnection,
&rController.getParser().getContext(),
true,
true); // quote is to true because we need quoted elements inside the function
getDesignView()->fillFunctionInfo(pColumnRef,sFunction,aSelEntry);
@ -852,7 +851,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _
sal_uInt32 nFunCount = pColumnRef->count();
OUString sParameters;
for(sal_uInt32 function = 0; function < nFunCount; ++function)
pColumnRef->getChild(function)->parseNodeToStr( sParameters, xConnection, &rParser.getContext(), true, true );
pColumnRef->getChild(function)->parseNodeToStr( sParameters, xConnection, &rParser.getContext(), true );
sOldAlias = aSelEntry->GetAlias();
sal_Int32 nNewFunctionType = aSelEntry->GetFunctionType() | FKT_NUMERIC | FKT_OTHER;
@ -919,7 +918,7 @@ bool OSelectionBrowseBox::SaveModified()
}
else
{
pEntry->SetVisible(true);
pEntry->SetVisible();
m_pVisibleCell->GetBox().Check();
}
break;
@ -1020,7 +1019,7 @@ bool OSelectionBrowseBox::SaveModified()
pEntry->SetOrderDir(EOrderDir(nIdx));
if(!m_bOrderByUnRelated)
{
pEntry->SetVisible(true);
pEntry->SetVisible();
m_pVisibleCell->GetBox().Check();
RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId());
}
@ -1047,7 +1046,7 @@ bool OSelectionBrowseBox::SaveModified()
if ( !m_bGroupByUnRelated && !pEntry->IsVisible() )
{
// we have to change the visblie flag, so we must append also an undo action
pEntry->SetVisible(true);
pEntry->SetVisible();
m_pVisibleCell->GetBox().Check();
appendUndoAction("0","1",BROW_VIS_ROW,bListAction);
RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId());
@ -1189,7 +1188,7 @@ bool OSelectionBrowseBox::SaveModified()
if ( pEntry.is() && bWasEmpty && !pEntry->IsEmpty() && !bError )
{
// Default to visible
pEntry->SetVisible(true);
pEntry->SetVisible();
appendUndoAction("0","1",BROW_VIS_ROW,bListAction);
RowModified(BROW_VIS_ROW, GetCurColumnId());
@ -1263,7 +1262,7 @@ void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId)
getFields().push_back(pEntry);
EditBrowseBox::RemoveColumn( _nColumnId );
InsertDataColumn( _nColumnId , OUString(), DEFAULT_SIZE, HeaderBarItemBits::STDSTYLE, HEADERBAR_APPEND);
InsertDataColumn( _nColumnId , OUString(), DEFAULT_SIZE, HeaderBarItemBits::STDSTYLE);
// Neuzeichnen
Rectangle aInvalidRect = GetInvalidRect( _nColumnId );
@ -1410,7 +1409,7 @@ OTableFieldDescRef OSelectionBrowseBox::AppendNewCol( sal_uInt16 nCnt)
sal_uInt16 nColumnId = sal::static_int_cast< sal_uInt16 >(getFields().size());
pEmptyEntry->SetColumnId( nColumnId );
InsertDataColumn( nColumnId , OUString(), DEFAULT_SIZE, HeaderBarItemBits::STDSTYLE, HEADERBAR_APPEND);
InsertDataColumn( nColumnId , OUString(), DEFAULT_SIZE, HeaderBarItemBits::STDSTYLE);
}
return getFields()[nCount];
@ -1492,7 +1491,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n
{
if (FindFirstFreeCol(_nColumnPosition) == NULL) // no more free columns
{
AppendNewCol(1);
AppendNewCol();
_nColumnPosition = sal::static_int_cast< sal_uInt16 >(
getFields().size());
}
@ -1660,7 +1659,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
{
if ( pEntry->isNumericOrAggreateFunction() && rInfo->IsGroupBy() )
{
pEntry->SetGroupBy(false);
pEntry->SetGroupBy();
aIter = rFields.end();
break;
}
@ -1670,7 +1669,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
{
pEntry->SetGroupBy(rInfo->IsGroupBy());
if(!m_bGroupByUnRelated && pEntry->IsGroupBy())
pEntry->SetVisible(true);
pEntry->SetVisible();
break;
}
}
@ -1682,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(false);
pTmp->SetGroupBy();
}
}
@ -1738,11 +1737,11 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O
pEntry->IsGroupBy() == rInfo->IsGroupBy() )
{
if ( pEntry->isNumericOrAggreateFunction() && rInfo->IsGroupBy() )
pEntry->SetGroupBy(false);
pEntry->SetGroupBy();
else
{
if(!m_bGroupByUnRelated && pEntry->IsGroupBy())
pEntry->SetVisible(true);
pEntry->SetVisible();
}
if (pEntry->GetCriteria(nLevel).isEmpty() )
{
@ -1787,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(false);
pTmp->SetGroupBy();
if ( pTmp.is() )
{
pTmp->SetCriteria( nLevel, rValue);
@ -1834,7 +1833,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
else
{
if ( !m_bOrderByUnRelated )
pEntry->SetVisible(true);
pEntry->SetVisible();
pEntry->SetOrderDir( eDir );
m_nLastSortColumn = nPos;
}
@ -1849,7 +1848,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
{
m_nLastSortColumn = pTmp->GetColumnId() - 1;
if ( !m_bOrderByUnRelated && !bAppend )
pTmp->SetVisible(true);
pTmp->SetVisible();
pTmp->SetOrderDir( eDir );
}
}
@ -1884,7 +1883,7 @@ void OSelectionBrowseBox::CellModified()
pEntry->GetOrderDir() != ORDER_NONE)
{
m_pVisibleCell->GetBox().Check();
pEntry->SetVisible(true);
pEntry->SetVisible();
}
else
pEntry->SetVisible(m_pVisibleCell->GetBox().IsChecked());
@ -2290,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(false);
pEntry->SetGroupBy();
if ( sGroupFunctionName.equalsIgnoreAsciiCase(strNewText) )
pEntry->SetGroupBy(true);

View File

@ -177,7 +177,7 @@ IMPL_LINK_NOARG_TYPED( OTableWindowListBox, ScrollUpHdl, Timer*, void )
{
ScrollOutputArea( -1 );
pEntry = GetEntry( m_aMousePos );
Select( pEntry, true );
Select( pEntry );
}
}
@ -191,7 +191,7 @@ IMPL_LINK_NOARG_TYPED( OTableWindowListBox, ScrollDownHdl, Timer*, void )
{
ScrollOutputArea( 1 );
pEntry = GetEntry( m_aMousePos );
Select( pEntry, true );
Select( pEntry );
}
}
@ -265,7 +265,7 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt )
// automatically select right entry when dragging
if ((FirstSelected() != pEntry) || (FirstSelected() && NextSelected(FirstSelected())))
SelectAll(false);
Select(pEntry, true);
Select(pEntry);
// one cannot drop on the first (*) entry
if(!( m_pTabWin->GetData()->IsShowAll() && (pEntry==First()) ))
@ -336,7 +336,7 @@ void OTableWindowListBox::GetFocus()
{
if ( FirstSelected() )
Select(FirstSelected(), false);
Select(GetCurEntry(), true);
Select(GetCurEntry());
}
else
ShowFocusRect(FirstSelected());

View File

@ -840,7 +840,7 @@ void OTableEditorCtrl::DeleteRows()
{
// Remove rows
m_pRowList->erase( m_pRowList->begin()+nIndex );
RowRemoved( nIndex, 1, true );
RowRemoved( nIndex, 1 );
// Insert the empty row at the end
m_pRowList->push_back( ::boost::shared_ptr<OTableRow>(new OTableRow()));
@ -1366,7 +1366,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
}
else if ( GetSelectRowCount() > 0 )
{
::Rectangle aColRect( GetFieldRectPixel( FirstSelectedRow(), HANDLE_ID, true ) );
::Rectangle aColRect( GetFieldRectPixel( FirstSelectedRow(), HANDLE_ID ) );
aMenuPos = aColRect.TopCenter();
}

View File

@ -254,7 +254,7 @@ void OTableEditorInsUndoAct::Undo()
pOriginalRows->erase(pOriginalRows->begin()+i);
}
pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size(), true );
pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size() );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Undo();
@ -303,7 +303,7 @@ void OTableEditorInsNewUndoAct::Undo()
pOriginalRows->erase(pOriginalRows->begin()+i);
}
pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, true );
pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Undo();