office-gobmx/include/vcl/notebookbar
Maxim Monastirsky 881774e9e3 Related: tdf#125040 NB: rework print preview context
Current implementation broadcasts the context change before the
new controller was set on the frame (via XFrame::setComponent).
This isn't going to work for anything LayoutManager based, as
it responds to frame events by recreating all toolbars, so the
newly created toolbar won't see the context sent for the old
controller.

Solve that by delaying the context change to SfxShell::Activate,
like anywhere else in the codebase. And make NB listen to frame
events, so it could also switch listening to the new controller.

Also fixed a crash when switching to print preview in Writer with
the navigator in the sidebar being active. Ideally we shouldn't
even try to create sidebar panels in print preview, as the sidebar
as a whole is disabled. But left that for a future investigation.

Change-Id: I07759c676d2a2eb6f752fe778b559b15d2d759ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135492
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-06-12 10:38:27 +02:00
..
notebookbar.hxx
NotebookBarAddonsMerger.hxx