diff options
author | Christian Lippka <cl@openoffice.org> | 2010-06-18 15:27:12 +0200 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2010-06-18 15:27:12 +0200 |
commit | f5dca43c9a814b8955edf6968443737e521162dc (patch) | |
tree | 1f37c56b0d784071366c1b2715b8dcb13f160f85 /svx | |
parent | cc7090d4a96f70b56920302a48895100a0d7c671 (diff) |
#i102353# correct page number and page count field when printing handouts
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/svdmodel.hxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 12 | ||||
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 1 |
3 files changed, 16 insertions, 3 deletions
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx index fc8d401f94e7..328efedd98f0 100644 --- a/svx/inc/svx/svdmodel.hxx +++ b/svx/inc/svx/svdmodel.hxx @@ -276,7 +276,7 @@ public: SdrOutlinerCache* mpOutlinerCache; SdrModelImpl* mpImpl; UINT16 mnCharCompressType; - UINT16 nReserveUInt5; + UINT16 mnHandoutPageCount; UINT16 nReserveUInt6; UINT16 nReserveUInt7; FASTBOOL mbModelLocked; @@ -298,6 +298,10 @@ public: SvNumberFormatter* mpNumberFormatter; public: const SvNumberFormatter& GetNumberFormatter() const; + + UINT16 getHandoutPageCount() const { return mnHandoutPageCount; } + void setHandoutPageCount( UINT16 nHandoutPageCount ) { mnHandoutPageCount = nHandoutPageCount; } + protected: virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel(); diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 2320944afd03..089f75aa8ade 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -77,8 +77,16 @@ namespace if(pPage && pPage->GetModel()) { - const sal_uInt16 nPageCount(pPage->GetModel()->GetPageCount()); - nRetval = ((sal_Int16)nPageCount - 1) / 2; + if( (pPage->GetPageNum() == 0) && !pPage->IsMasterPage() ) + { + // handout page! + return pPage->GetModel()->getHandoutPageCount(); + } + else + { + const sal_uInt16 nPageCount(pPage->GetModel()->GetPageCount()); + nRetval = ((sal_Int16)nPageCount - 1) / 2; + } } return nRetval; diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 2fcdfdffbb8a..8ab385fa329c 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -178,6 +178,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe mpOutlinerCache = NULL; mbKernAsianPunctuation = sal_False; mbAddExtLeading = sal_False; + mnHandoutPageCount = 0; SvxAsianConfig aAsian; mnCharCompressType = aAsian.GetCharDistanceCompression(); |