diff options
Diffstat (limited to 'chart2/source/controller')
4 files changed, 23 insertions, 33 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 86571ffeea7b..785a1d16528c 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -583,7 +583,7 @@ bool DataBrowser::MayMoveLeftColumns() const return ! IsReadOnly() && ( nColIdx > 1 ) && ( nColIdx <= ColCount() - 2 ) - && m_apDataBrowserModel.get() + && m_apDataBrowserModel && !m_apDataBrowserModel->isCategoriesColumn( nColIdx ); } @@ -600,7 +600,7 @@ bool DataBrowser::MayMoveRightColumns() const return ! IsReadOnly() && ( nColIdx > 0 ) && ( nColIdx < ColCount()-2 ) - && m_apDataBrowserModel.get() + && m_apDataBrowserModel && !m_apDataBrowserModel->isCategoriesColumn( nColIdx ); } @@ -701,7 +701,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const { aResult = OUString::number(static_cast< sal_Int32 >( nRow ) + 1); } - else if( nRow >= 0 && m_apDataBrowserModel.get()) + else if( nRow >= 0 && m_apDataBrowserModel) { sal_Int32 nColIndex = static_cast< sal_Int32 >( nColumnId ) - 1; @@ -758,8 +758,7 @@ double DataBrowser::GetCellNumber( long nRow, sal_uInt16 nColumnId ) const double fResult; ::rtl::math::setNan( & fResult ); - if(( nColumnId >= 1 ) && ( nRow >= 0 ) && - m_apDataBrowserModel.get()) + if(( nColumnId >= 1 ) && ( nRow >= 0 ) && m_apDataBrowserModel) { fResult = m_apDataBrowserModel->getCellNumber( static_cast< sal_Int32 >( nColumnId ) - 1, nRow ); @@ -878,8 +877,7 @@ void DataBrowser::InsertColumn() { sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders ); - if( nColIdx >= 0 && - m_apDataBrowserModel.get()) + if( nColIdx >= 0 && m_apDataBrowserModel) { // save changes made to edit-field if( IsModified() ) @@ -894,8 +892,7 @@ void DataBrowser::InsertTextColumn() { sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders ); - if( nColIdx >= 0 && - m_apDataBrowserModel.get()) + if( nColIdx >= 0 && m_apDataBrowserModel) { // save changes made to edit-field if( IsModified() ) @@ -910,8 +907,7 @@ void DataBrowser::RemoveColumn() { sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders ); - if( nColIdx >= 0 && - m_apDataBrowserModel.get()) + if( nColIdx >= 0 && m_apDataBrowserModel) { // save changes made to edit-field if( IsModified() ) @@ -927,8 +923,7 @@ void DataBrowser::InsertRow() { sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow()); - if( nRowIdx >= 0 && - m_apDataBrowserModel.get()) + if( nRowIdx >= 0 && m_apDataBrowserModel) { // save changes made to edit-field if( IsModified() ) @@ -943,8 +938,7 @@ void DataBrowser::RemoveRow() { sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow()); - if( nRowIdx >= 0 && - m_apDataBrowserModel.get()) + if( nRowIdx >= 0 && m_apDataBrowserModel) { // save changes made to edit-field if( IsModified() ) @@ -960,8 +954,7 @@ void DataBrowser::MoveLeftColumn() { sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders ); - if( !(nColIdx > 0 && - m_apDataBrowserModel.get())) + if( !(nColIdx > 0 && m_apDataBrowserModel)) return; // save changes made to edit-field @@ -982,8 +975,7 @@ void DataBrowser::MoveRightColumn() { sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders ); - if( !(nColIdx >= 0 && - m_apDataBrowserModel.get())) + if( !(nColIdx >= 0 && m_apDataBrowserModel)) return; // save changes made to edit-field @@ -1004,8 +996,7 @@ void DataBrowser::MoveUpRow() { sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow()); - if( !(nRowIdx > 0 && - m_apDataBrowserModel.get())) + if( !(nRowIdx > 0 && m_apDataBrowserModel)) return; // save changes made to edit-field @@ -1026,8 +1017,7 @@ void DataBrowser::MoveDownRow() { sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow()); - if( !(nRowIdx >= 0 && - m_apDataBrowserModel.get())) + if( !(nRowIdx >= 0 && m_apDataBrowserModel)) return; // save changes made to edit-field diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index b8511f21896c..aaa1c6eedb8b 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -230,7 +230,7 @@ void ErrorBarResources::UpdateControlStates() bool bShowRange = m_xRbRange->get_active(); bool bCanChooseRange = ( bShowRange && - m_apRangeSelectionHelper.get() && + m_apRangeSelectionHelper && m_apRangeSelectionHelper->hasRangeSelection()); m_xMfPositive->set_visible( ! bShowRange ); @@ -700,7 +700,7 @@ void ErrorBarResources::isRangeFieldContentValid(weld::Entry& rEdit) { OUString aRange( rEdit.get_text()); bool bIsValid = ( aRange.isEmpty() ) || - ( m_apRangeSelectionHelper.get() && + ( m_apRangeSelectionHelper && m_apRangeSelectionHelper->verifyCellRange( aRange )); if( bIsValid || !rEdit.get_sensitive()) diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 4a70f339df97..aa21b77fb451 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -501,10 +501,10 @@ void ControllerCommandDispatch::initialize() if( m_xSelectionSupplier.is() ) m_xSelectionSupplier->addSelectionChangeListener( this ); - if( m_apModelState.get() && xModel.is()) + if( m_apModelState && xModel.is()) m_apModelState->update( xModel ); - if( m_apControllerState.get() && xModel.is()) + if( m_apControllerState && xModel.is()) m_apControllerState->update( m_xChartController.get(), xModel ); updateCommandAvailability(); @@ -793,14 +793,14 @@ void SAL_CALL ControllerCommandDispatch::modified( const lang::EventObject& aEve bool bUpdateCommandAvailability = false; // Update the "ModelState" Struct. - if( m_apModelState.get() && m_xChartController.is()) + if( m_apModelState && m_xChartController.is()) { m_apModelState->update( m_xChartController->getModel()); bUpdateCommandAvailability = true; } // Update the "ControllerState" Struct. - if( m_apControllerState.get() && m_xChartController.is()) + if( m_apControllerState && m_xChartController.is()) { m_apControllerState->update( m_xChartController.get(), m_xChartController->getModel()); bUpdateCommandAvailability = true; @@ -823,7 +823,7 @@ void SAL_CALL ControllerCommandDispatch::modified( const lang::EventObject& aEve void SAL_CALL ControllerCommandDispatch::selectionChanged( const lang::EventObject& aEvent ) { // Update the "ControllerState" Struct. - if( m_apControllerState.get() && m_xChartController.is()) + if( m_apControllerState && m_xChartController.is()) { m_apControllerState->update( m_xChartController.get(), m_xChartController->getModel()); updateCommandAvailability(); diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index 1271a77c9cf0..46e601954e34 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -288,7 +288,7 @@ void SAL_CALL ElementSelectorToolbarController::release() throw () } void SAL_CALL ElementSelectorToolbarController::statusChanged( const frame::FeatureStateEvent& rEvent ) { - if( m_apSelectorListBox.get() ) + if( m_apSelectorListBox ) { SolarMutexGuard aSolarMutexGuard; if ( rEvent.FeatureURL.Path == "ChartElementSelector" ) @@ -303,7 +303,7 @@ void SAL_CALL ElementSelectorToolbarController::statusChanged( const frame::Feat uno::Reference< awt::XWindow > SAL_CALL ElementSelectorToolbarController::createItemWindow( const uno::Reference< awt::XWindow >& xParent ) { uno::Reference< awt::XWindow > xItemWindow; - if( !m_apSelectorListBox.get() ) + if( !m_apSelectorListBox ) { VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( xParent ); if( pParent ) @@ -311,7 +311,7 @@ uno::Reference< awt::XWindow > SAL_CALL ElementSelectorToolbarController::create m_apSelectorListBox.reset(VclPtr<SelectorListBox>::Create(pParent)); } } - if( m_apSelectorListBox.get() ) + if( m_apSelectorListBox ) xItemWindow = VCLUnoHelper::GetInterface( m_apSelectorListBox.get() ); return xItemWindow; } |