tdf#94677 Calc is slow opening large CSV, avoid reset SetUpdateMode

Avoid resetting SetUpdateMode in CreateFieldEditEngine while calculating
row height.

This takes the time from 1m25 to 49s for me.

Change-Id: If406eac1a8b031f1734d9c2376c413dfa22d89f8
Reviewed-on: https://gerrit.libreoffice.org/74630
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index bebbd4f..f47177c 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -634,7 +634,7 @@

    void                        Clear( bool bFromDestructor = false );

    std::unique_ptr<ScFieldEditEngine> CreateFieldEditEngine();
    std::unique_ptr<ScFieldEditEngine> CreateFieldEditEngine(bool bUpdateMode);
    void                        DisposeFieldEditEngine(std::unique_ptr<ScFieldEditEngine>& rpEditEngine);

    /**
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 0a54f87..b4dfbfa 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -363,9 +363,8 @@
        MapMode aHMMMode( MapUnit::Map100thMM, Point(), rZoomX, rZoomY );

        // save in document ?
        std::unique_ptr<ScFieldEditEngine> pEngine = pDocument->CreateFieldEditEngine();
        std::unique_ptr<ScFieldEditEngine> pEngine = pDocument->CreateFieldEditEngine(/*bUpdateMode*/false);

        pEngine->SetUpdateMode( false );
        bool bTextWysiwyg = ( pDev->GetOutDevType() == OUTDEV_PRINTER );
        EEControlBits nCtrl = pEngine->GetControlWord();
        if ( bTextWysiwyg )
@@ -456,7 +455,6 @@

        bool bEngineVertical = pEngine->IsVertical();
        pEngine->SetVertical( bAsianVertical );
        pEngine->SetUpdateMode( true );

        bool bEdWidth = bWidth;
        if ( eOrient != SvxCellOrientation::Standard && eOrient != SvxCellOrientation::Stacked )
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index b87d73a..15d95a9 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1091,7 +1091,7 @@
    *pChangeViewSettings=rNew;
}

std::unique_ptr<ScFieldEditEngine> ScDocument::CreateFieldEditEngine()
std::unique_ptr<ScFieldEditEngine> ScDocument::CreateFieldEditEngine(bool bUpdateMode)
{
    std::unique_ptr<ScFieldEditEngine> pNewEditEngine;
    if (!pCacheFieldEditEngine)
@@ -1105,8 +1105,7 @@
        {
            // #i66209# previous use might not have restored update mode,
            // ensure same state as for a new EditEngine (UpdateMode = true)
            if ( !pCacheFieldEditEngine->GetUpdateMode() )
                pCacheFieldEditEngine->SetUpdateMode(true);
             pCacheFieldEditEngine->SetUpdateMode(bUpdateMode);
        }

        pNewEditEngine = std::move(pCacheFieldEditEngine);
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index acacc91..c32edc0 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1011,7 +1011,7 @@
        if ( pDocShell )
        {
            ScDocument& rDoc = pDocShell->GetDocument();
            pEditEngine = rDoc.CreateFieldEditEngine();
            pEditEngine = rDoc.CreateFieldEditEngine(/*bUpdateMode*/true);
        }
        else
        {
@@ -1228,7 +1228,7 @@
        if ( mpDocSh )
        {
            ScDocument& rDoc = mpDocSh->GetDocument();
            mpEditEngine = rDoc.CreateFieldEditEngine();
            mpEditEngine = rDoc.CreateFieldEditEngine(/*bUpdateMode*/true);
        }
        else
        {
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index 252a0bf..86d3049 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -812,7 +812,7 @@
        if ( pDocShell )
        {
            ScDocument& rDoc = pDocShell->GetDocument();
            pEditEngine = rDoc.CreateFieldEditEngine();
            pEditEngine = rDoc.CreateFieldEditEngine(/*bUpdateMode*/true);
        }
        else
        {