diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-29 16:13:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 08:27:52 +0200 |
commit | 5f646281f777019a4e91c467f1d6f8a7f2083ffd (patch) | |
tree | 742667b0a19517c75f1397df86ba45dd7e18b231 /sc/source/ui/dbgui/consdlg.cxx | |
parent | a5be8e97b7699c7d12fa3ae5404af7b2eb50fafb (diff) |
loplugin:flatten in sc/ui
Change-Id: I4e12da123924b1036c1348ad1b04eef1826ae26a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99703
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/dbgui/consdlg.cxx')
-rw-r--r-- | sc/source/ui/dbgui/consdlg.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index db55aaa0c657..7f6252fe248a 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -232,26 +232,26 @@ void ScConsolidateDlg::FillAreaLists() void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument& rDocP ) { - if ( m_pRefInputEdit ) - { - if ( rRef.aStart != rRef.aEnd ) - RefInputStart( m_pRefInputEdit ); + if ( !m_pRefInputEdit ) + return; - OUString aStr; - ScRefFlags nFmt = ScRefFlags::RANGE_ABS_3D; //!!! nCurTab is still missing - const formula::FormulaGrammar::AddressConvention eConv = rDocP.GetAddressConvention(); + if ( rRef.aStart != rRef.aEnd ) + RefInputStart( m_pRefInputEdit ); - if ( rRef.aStart.Tab() != rRef.aEnd.Tab() ) - nFmt |= ScRefFlags::TAB2_3D; + OUString aStr; + ScRefFlags nFmt = ScRefFlags::RANGE_ABS_3D; //!!! nCurTab is still missing + const formula::FormulaGrammar::AddressConvention eConv = rDocP.GetAddressConvention(); - if ( m_pRefInputEdit == m_xEdDataArea.get()) - aStr = rRef.Format(rDocP, nFmt, eConv); - else if ( m_pRefInputEdit == m_xEdDestArea.get() ) - aStr = rRef.aStart.Format(nFmt, &rDocP, eConv); + if ( rRef.aStart.Tab() != rRef.aEnd.Tab() ) + nFmt |= ScRefFlags::TAB2_3D; - m_pRefInputEdit->SetRefString( aStr ); - ModifyHdl( *m_pRefInputEdit ); - } + if ( m_pRefInputEdit == m_xEdDataArea.get()) + aStr = rRef.Format(rDocP, nFmt, eConv); + else if ( m_pRefInputEdit == m_xEdDestArea.get() ) + aStr = rRef.aStart.Format(nFmt, &rDocP, eConv); + + m_pRefInputEdit->SetRefString( aStr ); + ModifyHdl( *m_pRefInputEdit ); } void ScConsolidateDlg::Close() |