diff options
Diffstat (limited to 'sfx2/source/dialog/printopt.cxx')
-rw-r--r-- | sfx2/source/dialog/printopt.cxx | 61 |
1 files changed, 4 insertions, 57 deletions
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 80902204fa88..6a818149f605 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -42,19 +42,11 @@ #include <sfx2/viewsh.hxx> #include <sfx2/printopt.hxx> -// ----------- -// - statics - -// ----------- - static USHORT aDPIArray[] = { 72, 96, 150, 200, 300, 600 }; static BOOL bOutputForPrinter = TRUE; #define DPI_COUNT (sizeof(aDPIArray)/sizeof(aDPIArray[0 ])) -// -------------------------------- -// - SfxCommonPrintOptionsTabPage - -// -------------------------------- - SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage( pParent, SfxResId( TP_COMMONPRINTOPTIONS ), rSet ), @@ -107,8 +99,7 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, con aReduceGradientsStripesRB.SetToggleHdl( LINK( this, SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl ) ); aReduceBitmapsResolutionRB.SetToggleHdl( LINK( this, SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl ) ); - // --> PB 2008-06-09 #i89164# - // calculate dynamically the width of radiobutton and listbox + // #i89164# calculate dynamically the width of radiobutton and listbox const long nOffset = 10; Size aOldSize = aReduceBitmapsResolutionRB.GetSizePixel(); Size aNewSize = aReduceBitmapsResolutionRB.GetOptimalSize( WINDOWSIZE_PREFERRED ); @@ -123,24 +114,17 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, con aNewSize.Width() += nOffset; aNewSize.Height() = aOldSize.Height(); aReduceBitmapsResolutionLB.SetPosSizePixel( aPos, aNewSize ); - // <-- } -// ----------------------------------------------------------------------------- - SfxCommonPrintOptionsTabPage::~SfxCommonPrintOptionsTabPage() { } -// ----------------------------------------------------------------------------- - SfxTabPage* SfxCommonPrintOptionsTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) { return( new SfxCommonPrintOptionsTabPage( pParent, rAttrSet ) ); } -// ----------------------------------------------------------------------------- - Window* SfxCommonPrintOptionsTabPage::GetParentLabeledBy( const Window* pWindow ) const { if ( pWindow == (Window *)&aReduceGradientsStepCountNF ) @@ -161,8 +145,6 @@ Window* SfxCommonPrintOptionsTabPage::GetParentLabelFor( const Window* pWindow ) return SfxTabPage::GetParentLabelFor( pWindow ); } -// ----------------------------------------------------------------------------- - BOOL SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { SvtPrintWarningOptions aWarnOptions; @@ -187,8 +169,6 @@ BOOL SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) return bModified; } -// ----------------------------------------------------------------------------- - void SfxCommonPrintOptionsTabPage::Reset( const SfxItemSet& /*rSet*/ ) { SvtPrintWarningOptions aWarnOptions; @@ -209,13 +189,10 @@ void SfxCommonPrintOptionsTabPage::Reset( const SfxItemSet& /*rSet*/ ) ImplUpdateControls( aPrinterOutputRB.IsChecked() ? &maPrinterOptions : &maPrintFileOptions ); - // --> OD 2008-06-25 #i63982# + // #i63982# ImplSetAccessibleNames(); - // <-- } -// ----------------------------------------------------------------------------- - int SfxCommonPrintOptionsTabPage::DeactivatePage( SfxItemSet* pItemSet ) { if( pItemSet ) @@ -224,8 +201,6 @@ int SfxCommonPrintOptionsTabPage::DeactivatePage( SfxItemSet* pItemSet ) return LEAVE_PAGE; } -// ----------------------------------------------------------------------------- - void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCurrentOptions ) { aReduceTransparencyCB.Check( pCurrentOptions->IsReduceTransparency() ); @@ -279,8 +254,6 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu ClickReduceBitmapsCBHdl( &aReduceBitmapsCB ); } -// ----------------------------------------------------------------------------- - void SfxCommonPrintOptionsTabPage::ImplSetAccessibleNames() { static const String cSeparator = String::CreateFromAscii( " - " ); @@ -379,8 +352,6 @@ void SfxCommonPrintOptionsTabPage::ImplSetAccessibleNames() aTransparencyCB.SetAccessibleName( sAccessibleName ); } -// ----------------------------------------------------------------------------- - void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOptions ) { pCurrentOptions->SetReduceTransparency( aReduceTransparencyCB.IsChecked() ); @@ -397,8 +368,6 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt pCurrentOptions->SetConvertToGreyscales( aConvertToGreyscalesCB.IsChecked() ); } -// ----------------------------------------------------------------------------- - IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox*, pBox ) { (void)pBox; //unused @@ -412,8 +381,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox* return 0; } -// ----------------------------------------------------------------------------- - IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, pBox ) { (void)pBox; //unused @@ -428,8 +395,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, p return 0; } -// ----------------------------------------------------------------------------- - IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBox ) { (void)pBox; //unused @@ -446,8 +411,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBo return 0; } -// ----------------------------------------------------------------------------- - IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, RadioButton*, pButton ) { (void)pButton; //unused @@ -458,8 +421,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, Radi return 0; } -// ----------------------------------------------------------------------------- - IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, RadioButton*, pButton ) { (void)pButton; //unused @@ -470,8 +431,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, Rad return 0; } -// ----------------------------------------------------------------------------- - IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*, pButton ) { if( pButton->IsChecked() ) @@ -479,9 +438,8 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*, aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) ); ImplUpdateControls( &maPrinterOptions ); bOutputForPrinter = TRUE; - // --> OD 2008-06-25 #i63982# + // #i63982# ImplSetAccessibleNames(); - // <-- } else ImplSaveControls( &maPrinterOptions ); @@ -489,8 +447,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*, return 0; } -// ----------------------------------------------------------------------------- - IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton*, pButton ) { if( pButton->IsChecked() ) @@ -498,9 +454,8 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) ); ImplUpdateControls( &maPrintFileOptions ); bOutputForPrinter = FALSE; - // --> OD 2008-06-25 #i63982# + // #i63982# ImplSetAccessibleNames(); - // <-- } else ImplSaveControls( &maPrintFileOptions ); @@ -508,10 +463,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton return 0; } -// ------------------------------- -// - TransparencyPrintWarningBox - -// ------------------------------- - TransparencyPrintWarningBox::TransparencyPrintWarningBox( Window* pParent ) : ModalDialog( pParent, SfxResId( RID_WARN_PRINTTRANSPARENCY ) ), aWarnFI ( this, SfxResId( FI_PRINTTRANSWARN ) ), @@ -529,14 +480,10 @@ TransparencyPrintWarningBox::TransparencyPrintWarningBox( Window* pParent ) : aNoBtn.SetClickHdl( LINK( this, TransparencyPrintWarningBox, ClickNoBtn ) ); } -// ----------------------------------------------------------------------------- - TransparencyPrintWarningBox::~TransparencyPrintWarningBox() { } -// ----------------------------------------------------------------------------- - IMPL_LINK( TransparencyPrintWarningBox, ClickNoBtn, PushButton*, pButton ) { (void)pButton; //unused |