sc/inc/document.hxx | 2 +- sc/source/core/data/column2.cxx | 4 +++- sc/source/core/data/documen2.cxx | 5 +++-- sc/source/core/data/documen8.cxx | 3 +-- sc/source/ui/Accessibility/AccessibleText.cxx | 4 ++-- sc/source/ui/unoobj/textuno.cxx | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-)
New commits: commit 0e12a4055de19271e8756a323df684c0985c8e3a Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Aug 7 14:39:22 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Aug 7 16:54:56 2019 +0200 tdf#126673 Auto-fit column and auto-fit row don't work with line break Revert "tdf#94677 Calc is slow opening large CSV, avoid reset SetUpdateMode" This reverts commit c47d0174f2c6c3ebcb3b33276d0277e7aceac330. Change-Id: I38e065d44dfb9d08498176b8231aff14ff51d91c Reviewed-on: https://gerrit.libreoffice.org/77109 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index f47177c2bd5e..bebbd4fafb9a 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(bool bUpdateMode); + std::unique_ptr<ScFieldEditEngine> CreateFieldEditEngine(); void DisposeFieldEditEngine(std::unique_ptr<ScFieldEditEngine>& rpEditEngine); /** diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 4bfacdde4190..151673e278af 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -363,8 +363,9 @@ long ScColumn::GetNeededSize( MapMode aHMMMode( MapUnit::Map100thMM, Point(), rZoomX, rZoomY ); // save in document ? - std::unique_ptr<ScFieldEditEngine> pEngine = pDocument->CreateFieldEditEngine(/*bUpdateMode*/false); + std::unique_ptr<ScFieldEditEngine> pEngine = pDocument->CreateFieldEditEngine(); + pEngine->SetUpdateMode( false ); bool bTextWysiwyg = ( pDev->GetOutDevType() == OUTDEV_PRINTER ); EEControlBits nCtrl = pEngine->GetControlWord(); if ( bTextWysiwyg ) @@ -455,6 +456,7 @@ 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 15d95a9f77b3..b87d73a8da56 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(bool bUpdateMode) +std::unique_ptr<ScFieldEditEngine> ScDocument::CreateFieldEditEngine() { std::unique_ptr<ScFieldEditEngine> pNewEditEngine; if (!pCacheFieldEditEngine) @@ -1105,7 +1105,8 @@ std::unique_ptr<ScFieldEditEngine> ScDocument::CreateFieldEditEngine(bool bUpdat { // #i66209# previous use might not have restored update mode, // ensure same state as for a new EditEngine (UpdateMode = true) - pCacheFieldEditEngine->SetUpdateMode(bUpdateMode); + if ( !pCacheFieldEditEngine->GetUpdateMode() ) + pCacheFieldEditEngine->SetUpdateMode(true); } pNewEditEngine = std::move(pCacheFieldEditEngine); diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index c32edc078c31..acacc91ba421 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(/*bUpdateMode*/true); + pEditEngine = rDoc.CreateFieldEditEngine(); } else { @@ -1228,7 +1228,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() if ( mpDocSh ) { ScDocument& rDoc = mpDocSh->GetDocument(); - mpEditEngine = rDoc.CreateFieldEditEngine(/*bUpdateMode*/true); + mpEditEngine = rDoc.CreateFieldEditEngine(); } else { diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 3ef1645d2542..c62d834a4475 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -802,7 +802,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() if ( pDocShell ) { ScDocument& rDoc = pDocShell->GetDocument(); - pEditEngine = rDoc.CreateFieldEditEngine(/*bUpdateMode*/true); + pEditEngine = rDoc.CreateFieldEditEngine(); } else { commit d1cddc4775f03a52bb8fa2229dc5624d8cc5a3ce Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Aug 7 14:04:15 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Aug 7 16:54:46 2019 +0200 tdf#126685 CRASH: selecting all in sheet regression from commit 7282014e362a1529a36c88eb308df8ed359c2cfa Date: Fri Feb 1 15:15:16 2019 +0100 tdf#50916 Makes numbers of columns dynamic. We need to clamp the columns whenever we change sheet/table Change-Id: I5cf22b2a7cf2f6473b8340289bcddd75ed0ad70b Reviewed-on: https://gerrit.libreoffice.org/77105 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index b1459942f83f..2bd74756266d 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -649,13 +649,12 @@ bool ScDocument::IdleCalcTextWidth() // true = try next again bNewTab = true; } - aScope.setCol(pTab->ClampToAllocatedColumns(aScope.Col())); - if ( nRestart < 2 ) { if ( bNewTab ) { pTab = maTabs[aScope.Tab()].get(); + aScope.setCol(pTab->ClampToAllocatedColumns(aScope.Col())); pStyle = static_cast<ScStyleSheet*>(aScope.getStylePool()->Find( pTab->aPageStyle, SfxStyleFamily::Page)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits