sd/source/ui/sidebar/SlideBackground.cxx | 12 ++++++++++++ sd/source/ui/sidebar/SlideBackground.hxx | 1 + 2 files changed, 13 insertions(+)
New commits: commit 0fac2a731ef2d33f4909c62d80f3274863ada3c1 Author: Mohit Marathe <[email protected]> AuthorDate: Tue Oct 7 16:06:15 2025 +0530 Commit: Mohit Marathe <[email protected]> CommitDate: Fri Oct 24 17:01:37 2025 +0200 sd: update Format combobox selection upon page change Signed-off-by: Mohit Marathe <[email protected]> Change-Id: I662f86e8a58845be688fe95825f2673c0532e1a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192059 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index fc0e032e1a79..45d75c65a253 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -610,6 +610,7 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, SID_DISPLAY_MASTER_OBJECTS, 0 }; updateMasterSlideSelection(); + updatePaperSizeBoxSelection(); GetBindings()->Invalidate( SidArray ); } break; @@ -687,6 +688,17 @@ void SlideBackground::updateMasterSlideSelection() } } +void SlideBackground::updatePaperSizeBoxSelection() +{ + ViewShell* pMainViewShell = mrBase.GetMainViewShell().get(); + SdPage* pPage = pMainViewShell ? pMainViewShell->getCurrentPage() : nullptr; + if (pPage != nullptr) + { + Paper ePaper = SvxPaperInfo::GetSvxPaper(pPage->GetSize(), MapUnit::Map100thMM); + mxPaperSizeBox->set_active_id(ePaper); + } +} + SlideBackground::~SlideBackground() { removeListener(); diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx index 8d5932629bcd..144996f27bff 100644 --- a/sd/source/ui/sidebar/SlideBackground.hxx +++ b/sd/source/ui/sidebar/SlideBackground.hxx @@ -173,6 +173,7 @@ private: void ExecuteMarginULChange(const ::tools::Long mnPageTopMargin, const ::tools::Long mnPageBottomMargin); void populateMasterSlideDropdown(); void updateMasterSlideSelection(); + void updatePaperSizeBoxSelection(); static FieldUnit GetCurrentUnit(SfxItemState eState, const SfxPoolItem* pState);
