diff options
-rw-r--r-- | sc/inc/rangenam.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/rangenam.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index 3239031dc5ab..5d8ba1be6773 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -153,7 +153,7 @@ public: void ValidateTabRefs(); - static void MakeValidName( const ScDocument* pDoc, OUString& rName ); + static void MakeValidName( const ScDocument& rDoc, OUString& rName ); SC_DLLPUBLIC static IsNameValidType IsNameValid( const OUString& rName, const ScDocument* pDoc ); diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 93037c73b538..a02191038db2 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -419,7 +419,7 @@ void ScRangeData::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nLocal aPos.SetTab(rCxt.getNewTab(aPos.Tab())); } -void ScRangeData::MakeValidName( const ScDocument* pDoc, OUString& rName ) +void ScRangeData::MakeValidName( const ScDocument& rDoc, OUString& rName ) { // strip leading invalid characters @@ -451,8 +451,8 @@ void ScRangeData::MakeValidName( const ScDocument* pDoc, OUString& rName ) ScAddress::Details details( static_cast<FormulaGrammar::AddressConvention>( nConv ) ); // Don't check Parse on VALID, any partial only VALID may result in // #REF! during compile later! - while (aRange.Parse(rName, pDoc, details) != ScRefFlags::ZERO || - aAddr.Parse(rName, pDoc, details) != ScRefFlags::ZERO) + while (aRange.Parse(rName, &rDoc, details) != ScRefFlags::ZERO || + aAddr.Parse(rName, &rDoc, details) != ScRefFlags::ZERO) { // Range Parse is partially valid also with invalid sheet name, // Address Parse ditto, during compile name would generate a #REF! diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 2d60e831cef8..ab353c1699f1 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -5208,7 +5208,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, return; OUString aName = rDoc.GetString(nPosX, nPosY, nTab); - ScRangeData::MakeValidName(&rDoc, aName); + ScRangeData::MakeValidName(rDoc, aName); if (aName.isEmpty()) return; |