[Libreoffice-commits] core.git: sc/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 23 14:36:32 UTC 2019


 sc/source/ui/app/inputhdl.cxx |    2 +-
 sc/source/ui/app/inputwin.cxx |    2 +-
 sc/source/ui/app/scmod.cxx    |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6055814a98a764117cd95adf2bbab91fa34456c2
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Oct 23 14:10:27 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 23 16:34:24 2019 +0200

    sc: rowcol: tdf#50916 convert app
    
    Change-Id: I1b93d831fff69db26f3078bf21915ebe285e89f8
    Reviewed-on: https://gerrit.libreoffice.org/81382
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 219081a0da31..82542d243623 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3124,7 +3124,7 @@ void ScInputHandler::CancelHandler()
     if (pExecuteSh)
         pExecuteSh->StopEditShell();
 
-    aCursorPos.Set(MAXCOL+1,0,0); // Invalid flag
+    aCursorPos.Set(pExecuteSh->GetViewData().GetDocument()->MaxCol()+1,0,0); // Invalid flag
     mpEditEngine->SetText(OUString());
 
     if ( !pLastState && pExecuteSh )
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 6e8ee9bc2cb6..4fd72988df22 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2175,7 +2175,7 @@ static ScNameInputType lcl_GetInputType( const OUString& rText )
         else if ( ScRangeUtil::MakeRangeFromName( rText, pDoc, nTab, aRange, RUTL_DBASE, eConv ) )
             eRet = SC_NAME_INPUT_DATABASE;
         else if ( comphelper::string::isdigitAsciiString( rText ) &&
-                  ( nNumeric = rText.toInt32() ) > 0 && nNumeric <= MAXROW+1 )
+                  ( nNumeric = rText.toInt32() ) > 0 && nNumeric <= pDoc->MaxRow()+1 )
             eRet = SC_NAME_INPUT_ROW;
         else if ( pDoc->GetTable( rText, nNameTab ) )
             eRet = SC_NAME_INPUT_SHEET;
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 5e58bc2c3404..739d13322051 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -249,7 +249,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, Configura
 
                 SCTAB nTabCount = pDocSh->GetDocument().GetTableCount();
                 for (SCTAB nTab=0; nTab<nTabCount; nTab++)
-                    pDocSh->AdjustRowHeight( 0, MAXROW, nTab );
+                    pDocSh->AdjustRowHeight( 0, pDocSh->GetDocument().MaxRow(), nTab );
             }
             pObjSh = SfxObjectShell::GetNext( *pObjSh );
         }
@@ -1270,7 +1270,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
                 pOneDocSh->CalcOutputFactor();
                 SCTAB nTabCount = pOneDocSh->GetDocument().GetTableCount();
                 for (SCTAB nTab=0; nTab<nTabCount; nTab++)
-                    pOneDocSh->AdjustRowHeight( 0, MAXROW, nTab );
+                    pOneDocSh->AdjustRowHeight( 0, pDocSh->GetDocument().MaxRow(), nTab );
             }
             pObjSh = SfxObjectShell::GetNext( *pObjSh );
         }


More information about the Libreoffice-commits mailing list