Resolves: tdf#137617 Use document address convention to create names

... from selection.

Change-Id: I0b170f36cfdb592e7cebae0246fba12c0180e2c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104854
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104867
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index c66ddeb..3d840ad 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -5190,7 +5190,8 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
        ScRangeData::MakeValidName(&rDoc, aName);
        if (!aName.isEmpty())
        {
            OUString aContent(ScRange( nX1, nY1, nTab, nX2, nY2, nTab ).Format(rDoc, ScRefFlags::RANGE_ABS_3D));
            OUString aContent( ScRange( nX1, nY1, nTab, nX2, nY2, nTab ).Format(
            rDoc, ScRefFlags::RANGE_ABS_3D, ScAddress::Details( rDoc.GetAddressConvention(), nPosY, nPosX)));

            bool bInsert = false;
            ScRangeData* pOld = rList.findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName));