sc/inc/address.hxx | 2 +- sc/source/core/tool/address.cxx | 6 +++--- sc/source/ui/app/inputhdl.cxx | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit c6f67ba90352c6506d5131a5f7ecca1f727ce377 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Nov 14 13:24:46 2019 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Nov 14 21:22:39 2019 +0100 Details always dereferences ScDocument argument Change-Id: If56c03af49606ffe6b5d4d782bd4a848aa79d8c2 Reviewed-on: https://gerrit.libreoffice.org/82695 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index c879cdc6a6d0..f38b216ecdb3 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -216,7 +216,7 @@ public: eConv(eConvP), nRow(0), nCol(0) {} /* Use the formula::FormulaGrammar::AddressConvention associated with rAddr::Tab() */ - Details( const ScDocument* pDoc, const ScAddress & rAddr ); + Details( const ScDocument& rDoc, const ScAddress& rAddr ); }; SC_DLLPUBLIC static const Details detailsOOOa1; diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 142d5f42fd84..6823277912ab 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -42,9 +42,9 @@ using namespace css; const ScAddress::Details ScAddress::detailsOOOa1( formula::FormulaGrammar::CONV_OOO, 0, 0 ); -ScAddress::Details::Details ( const ScDocument* pDoc, - const ScAddress & rAddr ) : - eConv( pDoc->GetAddressConvention() ), +ScAddress::Details::Details ( const ScDocument& rDoc, + const ScAddress& rAddr ) : + eConv( rDoc.GetAddressConvention() ), nRow( rAddr.Row() ), nCol( rAddr.Col() ) {} diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 8f9e7fd9b733..62ea17b0cc69 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -377,7 +377,7 @@ handle_r1c1: if ( nPos > nStart ) { OUString aTest = rFormula.copy( nStart, nPos-nStart ); - const ScAddress::Details aAddrDetails( &rDoc, aCursorPos ); + const ScAddress::Details aAddrDetails( rDoc, aCursorPos ); ScRefFlags nFlags = aRange.ParseAny( aTest, &rDoc, aAddrDetails ); if ( nFlags & ScRefFlags::VALID ) { @@ -569,7 +569,7 @@ void ScInputHandler::UpdateRange( sal_uInt16 nIndex, const ScRange& rNew ) ScRange aJustified = rNew; aJustified.PutInOrder(); // Always display Ref in the Formula the right way ScDocument* pDoc = pDocView->GetViewData().GetDocument(); - const ScAddress::Details aAddrDetails( pDoc, aCursorPos ); + const ScAddress::Details aAddrDetails( *pDoc, aCursorPos ); OUString aNewStr(aJustified.Format(rData.nFlags, pDoc, aAddrDetails)); ESelection aOldSel( 0, nOldStart, 0, nOldEnd ); SfxItemSet aSet( mpEditEngine->GetEmptyItemSet() ); @@ -3232,7 +3232,7 @@ void ScInputHandler::SetReference( const ScRange& rRef, const ScDocument& rDoc ) // Create string from reference, in the syntax of the document being edited. OUString aRefStr; - const ScAddress::Details aAddrDetails( pThisDoc, aCursorPos ); + const ScAddress::Details aAddrDetails( *pThisDoc, aCursorPos ); if (bOtherDoc) { // Reference to other document @@ -3837,7 +3837,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, if ( pInputWin || comphelper::LibreOfficeKit::isActive()) // Named range input { OUString aPosStr; - const ScAddress::Details aAddrDetails( &rDoc, aCursorPos ); + const ScAddress::Details aAddrDetails( rDoc, aCursorPos ); // Is the range a name? //! Find by Timer? _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
