diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 9dbd3591af39..6653e532c2e6 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -6417,9 +6417,14 @@ SvxPaperBinItem PagePaperBin SID_ATTR_PAGE_PAPERBIN GroupId = SfxGroupId::Format; ] - +// PaperFormat takes page format number from (paper.hxx) enum Paper +// If AttributePageSize is also specified PaperFormat is ignored +// AttributePageSize parameter is added to keep backward compatibility of API SvxSizeItem AttributePageSize SID_ATTR_PAGE_SIZE - +( + SvxSizeItem AttributePageSize SID_ATTR_PAGE_SIZE, + SfxUInt16Item PaperFormat FN_PARAM_1 +) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index ff061b87c506..b87584fc586e 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -69,6 +69,7 @@ #include #include #include +#include // 50 cm 28350 #define MAXHEIGHT 28350 @@ -319,6 +320,14 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) aSize.SetSize(rSizeItem.GetSize()); rMaster.SetFormatAttr(aSize); } + else if (rSet.GetItemState(FN_PARAM_1) == SfxItemState::SET) + { + const sal_uInt16 nSizeItem = rSet.GetItem(FN_PARAM_1)->GetValue(); + SwFormatFrameSize aSize(SwFrameSize::Fixed); + aSize.SetSize(SvxPaperInfo::GetPaperSize(static_cast(nSizeItem))); + rMaster.SetFormatAttr(aSize); + } + // Evaluate header attributes if( const SvxSetItem* pHeaderSetItem = rSet.GetItemIfSet( SID_ATTR_PAGE_HEADERSET, false ) )