merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0143-sc-fit-to-width-height-skip-breaks.diff
blobf0eb9a661d89887a4854646d8c90425104c1b5c7
1 diff --git sc/source/core/data/table5.cxx sc/source/core/data/table5.cxx
2 index 72be7a5..e9a678f 100644
3 --- sc/source/core/data/table5.cxx
4 +++ sc/source/core/data/table5.cxx
5 @@ -126,6 +126,15 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
6 DBG_ASSERT( pItem->ISA(SfxUInt16Item), "falsches Item" );
7 bSkipBreaks = ( ((const SfxUInt16Item*)pItem)->GetValue() > 0 );
9 +
10 + if (!bSkipBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, false, &pItem) == SFX_ITEM_SET)
11 + {
12 + const ScPageScaleToItem& rScaleToItem = static_cast<const ScPageScaleToItem&>(
13 + pStyleSet->Get(ATTR_PAGE_SCALETO));
14 + if (rScaleToItem.GetWidth() > 0 || rScaleToItem.GetHeight() > 0)
15 + // when fitting to a fixed width x height, ignore manual breaks.
16 + bSkipBreaks = true;
17 + }
19 //--------------------------------------------------------------------------