diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/document.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/column2.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/documen2.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleText.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 2 |
5 files changed, 7 insertions, 10 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index bebbd4fafb9a..f47177c2bd5e 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -634,7 +634,7 @@ public: 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 0a54f877c0b1..b4dfbfac64aa 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -363,9 +363,8 @@ long ScColumn::GetNeededSize( 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 @@ long ScColumn::GetNeededSize( 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 b87d73a8da56..15d95a9f77b3 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -1091,7 +1091,7 @@ void ScDocument::SetChangeViewSettings(const ScChangeViewSettings& rNew) *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 @@ std::unique_ptr<ScFieldEditEngine> ScDocument::CreateFieldEditEngine() { // #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 acacc91ba421..c32edc078c31 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -1011,7 +1011,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder() if ( pDocShell ) { ScDocument& rDoc = pDocShell->GetDocument(); - pEditEngine = rDoc.CreateFieldEditEngine(); + pEditEngine = rDoc.CreateFieldEditEngine(/*bUpdateMode*/true); } else { @@ -1228,7 +1228,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() 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 252a0bfee513..86d304906672 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -812,7 +812,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() if ( pDocShell ) { ScDocument& rDoc = pDocShell->GetDocument(); - pEditEngine = rDoc.CreateFieldEditEngine(); + pEditEngine = rDoc.CreateFieldEditEngine(/*bUpdateMode*/true); } else { |