diff options
Diffstat (limited to 'sw/source/core/view/printdata.cxx')
-rwxr-xr-x | sw/source/core/view/printdata.cxx | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 39bd4d91290c..d67b820fc91a 100755 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -1,8 +1,8 @@ -/************************************************************************** +/************************************************************************** * * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,7 +78,7 @@ SwRenderData::~SwRenderData() DBG_ASSERT( !m_pPostItShell, "m_pPostItShell should already have been deleted" ); DBG_ASSERT( !m_pPostItDoc, "m_pPostItDoc should already have been deleted" ); DBG_ASSERT( !m_pPostItFields, " should already have been deleted" ); -} +} void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev ) @@ -96,7 +96,7 @@ void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, m_pPostItShell = new ViewShell( *m_pPostItDoc, 0, &aViewOpt, pOutDev ); } - + void SwRenderData::DeletePostItData() { @@ -109,7 +109,7 @@ void SwRenderData::DeletePostItData() m_pPostItShell = 0; m_pPostItFields = 0; } -} +} bool SwRenderData::NeedNewViewOptionAdjust( const SwWrtShell& rCompare ) const { @@ -125,7 +125,7 @@ void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &r } m_pViewOptionAdjust = new SwViewOptionAdjust_Impl( rSh, rViewOptions ); } - + void SwRenderData::ViewOptionAdjust( const SwPrtOptions *pPrtOptions ) { @@ -139,20 +139,20 @@ void SwRenderData::ViewOptionAdjustStop() { delete m_pViewOptionAdjust; m_pViewOptionAdjust = 0; - } + } } -void SwRenderData::MakeSwPrtOptions( +void SwRenderData::MakeSwPrtOptions( SwPrtOptions &rOptions, const SwDocShell *pDocShell, const SwPrintUIOptions *pOpt, - const SwRenderData *pData, + const SwRenderData *pData, bool bIsPDFExport ) { if (!pDocShell || !pOpt || !pData) return; - + // get default print options const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell); BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId ); @@ -174,7 +174,7 @@ void SwRenderData::MakeSwPrtOptions( rOptions.bPrintProspectRTL = pOpt->IsPrintProspectRTL(); // bPrintSingleJobs <-- not set here; mail merge and or configuration // bModified <-- not set here; mail merge only - rOptions.bPrintBlackFont = pOpt->IsPrintWithBlackTextColor(); + rOptions.bPrintBlackFont = pOpt->IsPrintWithBlackTextColor(); rOptions.bPrintHiddenText = pOpt->IsPrintHiddenText(); rOptions.bPrintTextPlaceholder = pOpt->IsPrintTextPlaceholders(); rOptions.nPrintPostIts = pOpt->GetPrintPostItsType(); @@ -184,7 +184,7 @@ void SwRenderData::MakeSwPrtOptions( rOptions.SetPrintUIOptions( pOpt ); rOptions.SetRenderData( pData ); - // rOptions.aMulti is not used anymore in the XRenderable API + // rOptions.aMulti is not used anymore in the XRenderable API // Thus we set it to a dummy value here. rOptions.aMulti = MultiSelection( Range( 1, 1 ) ); @@ -195,15 +195,15 @@ void SwRenderData::MakeSwPrtOptions( if (bIsPDFExport) rOptions.bPrintSelection = FALSE; } - + ////////////////////////////////////////////////////////////////////// -SwPrintUIOptions::SwPrintUIOptions( - bool bWeb, - bool bSwSrcView, - bool bHasSelection, - bool bHasPostIts, +SwPrintUIOptions::SwPrintUIOptions( + bool bWeb, + bool bSwSrcView, + bool bHasSelection, + bool bHasPostIts, const SwPrintData &rDefaultPrintData ) : m_pLast( NULL ), m_rDefaultPrintData( rDefaultPrintData ) @@ -213,7 +213,7 @@ SwPrintUIOptions::SwPrintUIOptions( DBG_ASSERT( aLocalizedStrings.Count() >= 44, "resource incomplete" ); if( aLocalizedStrings.Count() < 44 ) // bad resource ? return; - + // printing HTML sources does not have any valid UI options. // Its just the source code that gets printed ... if (bSwSrcView) @@ -221,7 +221,7 @@ SwPrintUIOptions::SwPrintUIOptions( m_aUIProperties.realloc( 0 ); return; } - + // check if CTL is enabled SvtLanguageOptions aLangOpt; bool bCTL = aLangOpt.IsCTLFontEnabled(); @@ -237,10 +237,10 @@ SwPrintUIOptions::SwPrintUIOptions( SvtModuleOptions aModOpt; String aAppGroupname( aLocalizedStrings.GetString( 0 ) ); aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), - aModOpt.GetModuleName( SvtModuleOptions::E_SWRITER ) ); + aModOpt.GetModuleName( SvtModuleOptions::E_SWRITER ) ); m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() ); - // create sub section for Contents + // create sub section for Contents m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() ); // create a bool option for background @@ -322,7 +322,7 @@ SwPrintUIOptions::SwPrintUIOptions( rtl::OUString(), aPrintRangeOpt ); - + // create a choice for the content to create rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); uno::Sequence< rtl::OUString > aChoices( bHasSelection ? 3 : 2 ); @@ -348,7 +348,7 @@ SwPrintUIOptions::SwPrintUIOptions( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), rtl::OUString(), aPageRangeOpt - ); + ); // print content selection vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt; aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) ); @@ -376,7 +376,7 @@ SwPrintUIOptions::SwPrintUIOptions( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), aAnnotOpt ); - + // create subsection for Page settings vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt; aPageSetOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) ); @@ -397,7 +397,7 @@ SwPrintUIOptions::SwPrintUIOptions( // 0 : all pages (left & right) // 1 : left pages // 2 : right pages - DBG_ASSERT( rDefaultPrintData.IsPrintLeftPage() || rDefaultPrintData.IsPrintRightPage(), + DBG_ASSERT( rDefaultPrintData.IsPrintLeftPage() || rDefaultPrintData.IsPrintRightPage(), "unexpected value combination" ); sal_Int16 nPagesChoice = 0; if (rDefaultPrintData.IsPrintLeftPage() && !rDefaultPrintData.IsPrintRightPage()) @@ -407,12 +407,12 @@ SwPrintUIOptions::SwPrintUIOptions( m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 32 ), aRLHelp, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintLeftRightPages" ) ), - aRLChoices, - nPagesChoice, + aRLChoices, + nPagesChoice, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ) ); } - + // create a bool option for brochure bDefaultVal = rDefaultPrintData.IsPrintProspect(); rtl::OUString aBrochurePropertyName( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ); @@ -422,7 +422,7 @@ SwPrintUIOptions::SwPrintUIOptions( bDefaultVal, aPageSetOpt ); - + if (bCTL) { // create a bool option for brochure RTL dependent on brochure @@ -438,13 +438,13 @@ SwPrintUIOptions::SwPrintUIOptions( m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( rtl::OUString(), uno::Sequence< rtl::OUString >(), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ), - aBRTLChoices, - nBRTLChoice, + aBRTLChoices, + nBRTLChoice, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), aBrochureRTLOpt ); } - + DBG_ASSERT( nIdx == nNumProps, "number of added properties is not as expected" ); } @@ -453,7 +453,7 @@ SwPrintUIOptions::SwPrintUIOptions( SwPrintUIOptions::~SwPrintUIOptions() { } - + bool SwPrintUIOptions::IsPrintLeftPages() const { // take care of different property names for the option. @@ -484,7 +484,7 @@ bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const // take care of different property names for the option. bool bRes = bIsPDFExport ? - !getBoolValue( "IsSkipEmptyPages", sal_True ) : + !getBoolValue( "IsSkipEmptyPages", sal_True ) : getBoolValue( "PrintEmptyPages", sal_True ); return bRes; } @@ -538,7 +538,7 @@ bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< bea bChanged = bChanged || (pOut != m_pLast); if( pOut ) m_pLast = pOut; - + return bChanged; } |