summaryrefslogtreecommitdiff
path: root/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2025-02-08 13:32:33 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2025-02-08 13:41:41 +0100
commitca31eac04b10fec6bf27a801b9164ec419062763 (patch)
treeb7aabc80a5ee349778bd48c32a807436a3e3ca76 /lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
parent74a1f82aebdd9cc05244f7313ff4d06261f3087a (diff)
tdf#165099: do not notify change listeners about temporary changes
Commit bc09a4f1ce1f6a714f7827a404aa6317b503d307 (Disable subpixel AA in GraphicExporter::filter unconditionally, 2024-12-04) had changed GraphicExporter::filter to set application settings unconditionally, instead of only when AA was explicitly set. That uncovered a problem that the change may trigger a rebuild of sidebars; and in slideshow case, it may make the rebuilt sidebars to capture the temporary view created for the slideshow. 1. Slideshow is built; in SlideShow::StartFullscreenPresentation, it creates a new component with a frame, which eventually creates a new sd::DrawController; 2. Slideshow draws its slide(s); in slideshow::internal::getMetaFile, GraphicExporter::filter is called, which would change application settings; 3. Application::SetSettings eventually trigger WindowEventHandler in sfx2::sidebar::SidebarController, with WindowDataChanged; 4. SidebarController::maContextChangeUpdate is called asynchronously, i.e., after all the draw is finished; eventually this will call SidebarController::UpdateConfigurations for SdSlideTransitionDeck, which forces rebuild of the deck; 5. sd::SlideTransitionPane::Initialize resets its mxView to current controller, which is the sd::DrawController created on step 1 for the slideshow; 6. sd::SlideShow::end closes its frame, eventually disposing frame's controller (calling sd::DrawController::dispose); note that this controller is still referenced from sidebar. After that, the sidebar interactions will crash because of unhandled exception thrown from DrawController::ThrowIfDisposed. Note that the change in the abovementioned commit only uncovered the problem; before that change it could still crash, when AA was set in the GraphicExporter::filter call. This change makes sure to not notify listeners in the #3 above, when the change of the settings is only temporary (for the duration of a export). This is similar to the existing bTemporary argument that is already passed to SetAntiAliasing from GraphicExporter::filter. This allows to avoid the unwanted sidebar rebuild; and also, this should improve the filter call performance. The hope is, that this wouldn't modify the result; but if some components, that listen to the change notifications, happen to affect the export, we likely would need to change their behavior to always use Application::GetSettings. It seems to me, that after this change, clicking the first time on a transition after a slideshow will not select it. Seems like another pre-existing problem; it flickered before selection even before the change; likely needs a separate fix. Change-Id: Ia0ba19401ca805c2190926623c1c708cf26a313b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181288 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx')
0 files changed, 0 insertions, 0 deletions