Resolves: tdf#133189 values not updated when units changed

Change-Id: I7028974e9a916a630f5530c65952103ada702212
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94696
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 7a13c65..969d7d8 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -198,8 +198,12 @@ void PageFormatPanel::NotifyItemUpdate(
            if (eFUnit != meFUnit)
            {
                meFUnit = eFUnit;
                auto nHeight = mxPaperHeight->GetCoreValue(meUnit);
                mxPaperHeight->SetFieldUnit(meFUnit);
                mxPaperHeight->SetMetricValue(nHeight, meUnit);
                auto nWidth = mxPaperWidth->GetCoreValue(meUnit);
                mxPaperWidth->SetFieldUnit(meFUnit);
                mxPaperWidth->SetMetricValue(nWidth, meUnit);
                SetMarginFieldUnit();
                UpdateMarginBox();
            }