diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-01-21 13:49:22 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-01-21 13:49:22 +0100 |
commit | a934a163b50c787074eca3e5463ddab9fbd9b413 (patch) | |
tree | b4fe00ef54597533059ca383e28e8ddbe5c9996c /sd/source/ui/unoidl/unopage.cxx | |
parent | beef7ed3c16db7f41b5f2ff5ec1dd271e046c137 (diff) | |
parent | 5c2d284b0f9973aada365a8f464f1152671bd629 (diff) |
resync to DEV300_m70
Diffstat (limited to 'sd/source/ui/unoidl/unopage.cxx')
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index fc6c8d869046..6ab0cd4ba47e 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -317,6 +317,7 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind ) { MAP_CHAR_LEN(UNO_NAME_PAGE_TOP), WID_PAGE_TOP, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_HEIGHT), WID_PAGE_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_ORIENTATION), WID_PAGE_ORIENT, &::getCppuType((const view::PaperOrientation*)0),0, 0}, + { MAP_CHAR_LEN(UNO_NAME_PAGE_NUMBER), WID_PAGE_NUMBER, &::getCppuType((const sal_Int16*)0), beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_LAYOUT), WID_PAGE_LAYOUT, &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, @@ -996,7 +997,21 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) aAny <<= (sal_Int16)( GetPage()->GetAutoLayout() ); break; case WID_PAGE_NUMBER: - aAny <<= (sal_Int16)((sal_uInt16)((GetPage()->GetPageNum()-1)>>1) + 1); + { + const sal_uInt16 nPageNumber(GetPage()->GetPageNum()); + + if(nPageNumber > 0) + { + // for all other pages calculate the number + aAny <<= (sal_Int16)((sal_uInt16)((nPageNumber-1)>>1) + 1); + } + else + { + // for pages with number 0 (Handout Master, Handout page) + // return 0 + aAny <<= (sal_Int16)0; + } + } break; case WID_PAGE_DURATION: aAny <<= (sal_Int32)(GetPage()->GetTime()); |