summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-18 12:14:29 +0200
committerNoel Grandin <noel@peralex.com>2014-06-24 11:34:21 +0200
commite2080e70fe8b085f18e868e46340454720fa94ca (patch)
tree4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /sc/source/ui/dbgui
parentf910280b8704ed9c289150a4ca3c8d60e15d0d97 (diff)
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx12
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx2
3 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 3bd36c39c5ff..67a973255831 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -69,10 +69,10 @@ ScConsolidateDlg::ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, Window
rArgSet.Get( rArgSet.GetPool()->
GetWhich( SID_CONSOLIDATE ) )
).GetData() ),
- pViewData ( ((ScTabViewShell*)SfxViewShell::Current())->
+ rViewData ( ((ScTabViewShell*)SfxViewShell::Current())->
GetViewData() ),
pDoc ( ((ScTabViewShell*)SfxViewShell::Current())->
- GetViewData()->GetDocument() ),
+ GetViewData().GetDocument() ),
pRangeUtil ( new ScRangeUtil ),
pAreaData ( NULL ),
nAreaDataCount ( 0 ),
@@ -113,7 +113,7 @@ ScConsolidateDlg::~ScConsolidateDlg()
void ScConsolidateDlg::Init()
{
- OSL_ENSURE( pViewData && pDoc && pRangeUtil, "Error in Ctor" );
+ OSL_ENSURE( pDoc && pRangeUtil, "Error in Ctor" );
OUString aStr;
sal_uInt16 i=0;
@@ -299,11 +299,11 @@ void ScConsolidateDlg::Deactivate()
bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd )
{
- if ( !pRangeUtil || !pDoc || !pViewData ||
+ if ( !pRangeUtil || !pDoc ||
((pEd != pEdDataArea) && (pEd != pEdDestArea)) )
return false;
- SCTAB nTab = pViewData->GetTabNo();
+ SCTAB nTab = rViewData.GetTabNo();
bool bEditOk = false;
OUString theCompleteStr;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
@@ -357,7 +357,7 @@ IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl)
if ( nDataAreaCount > 0 )
{
ScRefAddress aDestAddress;
- SCTAB nTab = pViewData->GetTabNo();
+ SCTAB nTab = rViewData.GetTabNo();
OUString aDestPosStr( pEdDestArea->GetText() );
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index d3a0c9c5a8e8..b253b28d9a78 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -148,7 +148,7 @@ void ScNewScenarioDlg::SetScenarioData( const OUString& rName, const OUString& r
IMPL_LINK_NOARG(ScNewScenarioDlg, OkHdl)
{
OUString aName = comphelper::string::strip(m_pEdName->GetText(), ' ');
- ScDocument* pDoc = ((ScTabViewShell*)SfxViewShell::Current())->GetViewData()->GetDocument();
+ ScDocument* pDoc = ((ScTabViewShell*)SfxViewShell::Current())->GetViewData().GetDocument();
m_pEdName->SetText( aName );
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index 3eda96fc61f7..6333016fc1b9 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -215,7 +215,7 @@ ScImportOptionsDlg::ScImportOptionsDlg(
m_pCbFormulas->Show();
ScTabViewShell* pViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current());
bool bFormulas = (pViewSh ?
- pViewSh->GetViewData()->GetOptions().GetOption( VOPT_FORMULAS) :
+ pViewSh->GetViewData().GetOptions().GetOption( VOPT_FORMULAS) :
false);
m_pCbFormulas->Check( bFormulas );
}