From 6e50a95326d0eaf82cf979db6dd79f39a03ea80f Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 18 Jun 2010 15:27:12 +0200 Subject: #i102353# correct page number and page count field when printing handouts --- sd/source/ui/unoidl/unopage.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'sd/source/ui/unoidl/unopage.cxx') diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 0a7469d22373..06fe0ede70e5 100755 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -355,6 +355,7 @@ SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPa SdUnoSearchReplaceShape(this), mpModel ( _pModel ), mpSdrModel(0), + mnTempPageNumber(0), mpPropSet ( _pSet ), mbIsImpressDocument(false) { @@ -897,9 +898,18 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName break; } + case WID_PAGE_NUMBER: + if( (GetPage()->GetPageKind() == PK_HANDOUT) && !GetPage()->IsMasterPage() ) + { + if( !(aValue >>= mnTempPageNumber) ) + throw lang::IllegalArgumentException(); + + break; + } + throw beans::PropertyVetoException(); + case WID_PAGE_LDBITMAP: case WID_PAGE_LDNAME: - case WID_PAGE_NUMBER: case WID_PAGE_ISDARK: throw beans::PropertyVetoException(); @@ -1026,9 +1036,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) } else { - // for pages with number 0 (Handout Master, Handout page) - // return 0 - aAny <<= (sal_Int16)0; + aAny <<= mnTempPageNumber; } } break; -- cgit