diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-08 09:29:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-08 10:40:42 +0100 |
commit | aa93c3c9a02c6c51b3908a3c2d8334bdfdbe2eed (patch) | |
tree | b5775ce522043c76d5842739c1a4caeeb06e7b4e /filter/source | |
parent | d02de50c4c1af7b28e39f10a07b61010ea0910ef (diff) |
convert pdf export general page to .ui
Change-Id: I94d86f9807e67bd4f352321fde1c83913b5a4fed
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/pdf/impdialog.cxx | 316 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.hrc | 37 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.hxx | 89 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.src | 272 |
4 files changed, 179 insertions, 535 deletions
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index d4d43beb8384..76ac1ebd43ca 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -471,71 +471,46 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData() } // ----------------------------------------------------------------------------- -ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent, - const SfxItemSet& rCoreSet - ) : - SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_GENER ), rCoreSet ), - - maFlPages( this, PDFFilterResId( FL_PAGES ) ), - maRbAll( this, PDFFilterResId( RB_ALL ) ), - maRbRange( this, PDFFilterResId( RB_RANGE ) ), - maRbSelection( this, PDFFilterResId( RB_SELECTION ) ), - maEdPages( this, PDFFilterResId( ED_PAGES ) ), - - maFlCompression( this, PDFFilterResId( FL_IMAGES ) ), - maRbLosslessCompression( this, PDFFilterResId( RB_LOSSLESSCOMPRESSION ) ), - maRbJPEGCompression( this, PDFFilterResId( RB_JPEGCOMPRESSION ) ), - maFtQuality( this, PDFFilterResId( FT_QUALITY ) ), - maNfQuality( this, PDFFilterResId( NF_QUALITY ) ), - maCbReduceImageResolution( this, PDFFilterResId( CB_REDUCEIMAGERESOLUTION ) ), - maCoReduceImageResolution( this, PDFFilterResId( CO_REDUCEIMAGERESOLUTION ) ), - - m_aVerticalLine(this, PDFFilterResId(FL_GENERAL_VERTICAL)), - - maFlGeneral( this, PDFFilterResId( FL_GENERAL ) ), - maCbPDFA1b( this, PDFFilterResId( CB_PDFA_1B_SELECT ) ), - - maCbTaggedPDF( this, PDFFilterResId( CB_TAGGEDPDF ) ), - mbTaggedPDFUserSelection( sal_False ), - - maCbExportFormFields( this, PDFFilterResId( CB_EXPORTFORMFIELDS ) ), - mbExportFormFieldsUserSelection( sal_False ), - maFtFormsFormat( this, PDFFilterResId( FT_FORMSFORMAT ) ), - maLbFormsFormat( this, PDFFilterResId( LB_FORMSFORMAT ) ), - maCbAllowDuplicateFieldNames( this, PDFFilterResId( CB_ALLOWDUPLICATEFIELDNAMES ) ), - - maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ), - maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ), - maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ), - maCbViewPDF( this, PDFFilterResId( CB_VIEWPDF ) ), - maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ), - maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ), - maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ), - maFtAddStreamDescription( this, PDFFilterResId( FT_ADDSTREAMDESCRIPTION ) ), - - maFlWatermark( this, PDFFilterResId( FL_WATERMARK ) ), - maCbWatermark( this, PDFFilterResId( CB_WATERMARK ) ), - maFtWatermark( this, PDFFilterResId(FT_WATERMARK)), - maEdWatermark( this, PDFFilterResId(ED_WATERMARK)), - mbIsPresentation( sal_False ), - mbIsWriter( sal_False), - mpaParent( 0 ) +ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(Window* pParent, const SfxItemSet& rCoreSet) + : SfxTabPage(pParent, "PdfGeneralPage","filter/ui/pdfgeneralpage.ui", rCoreSet) + + , mbTaggedPDFUserSelection(false) + , mbExportFormFieldsUserSelection(false) + , mbIsPresentation(false) + , mbIsWriter(false) + , mpaParent(0) { - FreeResource(); - - // pb: #i91991# maCbExportEmptyPages double-spaced if necessary - Size aSize = maCbExportEmptyPages.GetSizePixel(); - Size aMinSize = maCbExportEmptyPages.CalcMinimumSize(); - if ( aSize.Width() > aMinSize.Width() ) - { - Size aNewSize = maCbExportNotes.GetSizePixel(); - maCbExportEmptyPages.SetSizePixel( aNewSize ); - } - - maEdPages.SetAccessibleName(maRbRange.GetText()); - maEdPages.SetAccessibleRelationLabeledBy(&maRbRange); - - maCbExportEmptyPages.SetStyle( maCbExportEmptyPages.GetStyle() | WB_VCENTER ); + get(mpRbAll, "all"); + get(mpRbRange, "range"); + get(mpRbSelection, "selection"); + get(mpEdPages, "pages"); + + get(mpRbLosslessCompression, "losslesscompress"); + get(mpRbJPEGCompression, "jpegcompress"); + get(mpQualityFrame, "qualityframe"); + get(mpNfQuality, "quality"); + get(mpCbReduceImageResolution, "reduceresolution"); + get(mpCoReduceImageResolution, "resolution"); + + get(mpCbAddStream, "embed"); + get(mpCbPDFA1b, "pdfa"); + get(mpCbTaggedPDF, "tagged"); + get(mpCbExportFormFields, "forms"); + + get(mpFormsFrame, "formsframe"); + get(mpLbFormsFormat, "format"); + get(mpCbAllowDuplicateFieldNames, "allowdups"); + + get(mpCbExportBookmarks, "bookmarks"); + get(mpCbExportHiddenSlides, "hiddenpages"); + get(mpCbExportNotes, "comments"); + get(mpCbExportNotesPages, "notes"); + get(mpCbExportEmptyPages, "emptypages"); + get(mpCbViewPDF, "viewpdf"); + + get(mpCbWatermark, "watermark"); + get(mpFtWatermark, "watermarklabel"); + get(mpEdWatermark, "watermarkentry"); } // ----------------------------------------------------------------------------- @@ -549,137 +524,125 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent mpaParent = paParent; //init this class data - maRbRange.SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, TogglePagesHdl ) ); + mpRbRange->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, TogglePagesHdl ) ); - maRbAll.Check(); + mpRbAll->Check(); TogglePagesHdl( NULL ); - maNfQuality.SetUnit( FUNIT_PERCENT ); - maNfQuality.SetMin( 1, FUNIT_PERCENT ); - maNfQuality.SetMax( 100, FUNIT_PERCENT ); - - maRbSelection.Enable( paParent->mbSelectionPresent ); + mpRbSelection->Enable( paParent->mbSelectionPresent ); mbIsPresentation = paParent->mbIsPresentation; mbIsWriter = paParent->mbIsWriter; - maCbExportEmptyPages.Enable( mbIsWriter ); + mpCbExportEmptyPages->Enable( mbIsWriter ); - maRbLosslessCompression.SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleCompressionHdl ) ); + mpRbLosslessCompression->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleCompressionHdl ) ); const sal_Bool bUseLosslessCompression = paParent->mbUseLosslessCompression; if ( bUseLosslessCompression ) - maRbLosslessCompression.Check(); + mpRbLosslessCompression->Check(); else - maRbJPEGCompression.Check(); + mpRbJPEGCompression->Check(); - maNfQuality.SetValue( paParent->mnQuality, FUNIT_PERCENT ); - maNfQuality.Enable( bUseLosslessCompression == sal_False ); + mpNfQuality->SetValue( paParent->mnQuality, FUNIT_PERCENT ); + mpQualityFrame->Enable(bUseLosslessCompression == false); - maCbReduceImageResolution.SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl ) ); + mpCbReduceImageResolution->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl ) ); const sal_Bool bReduceImageResolution = paParent->mbReduceImageResolution; - maCbReduceImageResolution.Check( bReduceImageResolution ); + mpCbReduceImageResolution->Check( bReduceImageResolution ); OUString aStrRes = OUString::number( paParent->mnMaxImageResolution ) + " DPI"; - maCoReduceImageResolution.SetText( aStrRes ); - maCoReduceImageResolution.Enable( bReduceImageResolution ); - maCbWatermark.SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleWatermarkHdl ) ); - maFtWatermark.Enable(false ); - maEdWatermark.Enable( false ); - maCbPDFA1b.SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleExportPDFAHdl) ); + mpCoReduceImageResolution->SetText( aStrRes ); + mpCoReduceImageResolution->Enable( bReduceImageResolution ); + mpCbWatermark->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleWatermarkHdl ) ); + mpFtWatermark->Enable(false ); + mpEdWatermark->Enable( false ); + mpCbPDFA1b->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleExportPDFAHdl) ); switch( paParent->mnPDFTypeSelection ) { default: - case 0: maCbPDFA1b.Check( sal_False ); // PDF 1.4 + case 0: mpCbPDFA1b->Check( sal_False ); // PDF 1.4 break; - case 1: maCbPDFA1b.Check(); // PDF/A-1a + case 1: mpCbPDFA1b->Check(); // PDF/A-1a break; } ToggleExportPDFAHdl( NULL ); - maCbExportFormFields.SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl ) ); + mpCbExportFormFields->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl ) ); // get the form values, for use with PDF/A-1 selection interface mbTaggedPDFUserSelection = paParent->mbUseTaggedPDF; mbExportFormFieldsUserSelection = paParent->mbExportFormFields; - if( !maCbPDFA1b.IsChecked() ) + if( !mpCbPDFA1b->IsChecked() ) {// the value for PDF/A set by the ToggleExportPDFAHdl method called before - maCbTaggedPDF.Check( mbTaggedPDFUserSelection ); - maCbExportFormFields.Check( mbExportFormFieldsUserSelection ); + mpCbTaggedPDF->Check( mbTaggedPDFUserSelection ); + mpCbExportFormFields->Check( mbExportFormFieldsUserSelection ); } - maLbFormsFormat.SelectEntryPos( (sal_uInt16)paParent->mnFormsType ); - maLbFormsFormat.Enable( paParent->mbExportFormFields ); - maCbAllowDuplicateFieldNames.Check( paParent->mbAllowDuplicateFieldNames ); - maCbAllowDuplicateFieldNames.Enable( paParent->mbExportFormFields ); + mpLbFormsFormat->SelectEntryPos( (sal_uInt16)paParent->mnFormsType ); + mpCbAllowDuplicateFieldNames->Check( paParent->mbAllowDuplicateFieldNames ); + mpFormsFrame->Enable( paParent->mbExportFormFields ); - maCbExportBookmarks.Check( paParent->mbExportBookmarks ); + mpCbExportBookmarks->Check( paParent->mbExportBookmarks ); - maCbExportNotes.Check( paParent->mbExportNotes ); - maCbViewPDF.Check( paParent->mbViewPDF); + mpCbExportNotes->Check( paParent->mbExportNotes ); + mpCbViewPDF->Check( paParent->mbViewPDF); if ( mbIsPresentation ) { - maCbExportNotesPages.Show( sal_True ); - maCbExportNotesPages.Check( paParent->mbExportNotesPages ); - maCbExportHiddenSlides.Show( sal_True); - maCbExportHiddenSlides.Check( paParent->mbExportHiddenSlides ); - + mpCbExportNotesPages->Show(true); + mpCbExportNotesPages->Check(paParent->mbExportNotesPages); + mpCbExportHiddenSlides->Show(true); + mpCbExportHiddenSlides->Check(paParent->mbExportHiddenSlides); } else { - long nCheckBoxHeight = - maCbExportNotesPages.LogicToPixel( Size( 13, 13 ), MAP_APPFONT ).Height(); - - Point aPos = maCbExportEmptyPages.GetPosPixel(); - maCbExportEmptyPages.SetPosPixel( Point( aPos.X(), aPos.Y() - nCheckBoxHeight ) ); - maCbExportNotesPages.Show( sal_False ); - maCbExportNotesPages.Check( sal_False ); - maCbExportHiddenSlides.Show( sal_False); - maCbExportHiddenSlides.Check( sal_False ); + mpCbExportNotesPages->Show(false); + mpCbExportNotesPages->Check(false); + mpCbExportHiddenSlides->Show(false); + mpCbExportHiddenSlides->Check(false); } - maCbExportEmptyPages.Check( !paParent->mbIsSkipEmptyPages ); + mpCbExportEmptyPages->Check(!paParent->mbIsSkipEmptyPages); - maCbAddStream.Show( sal_True ); - maCbAddStream.Check( paParent->mbAddStream ); - maFtAddStreamDescription.Show( sal_True ); + mpCbAddStream->Show(true); + mpCbAddStream->Check(paParent->mbAddStream); - maCbAddStream.SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleAddStreamHdl ) ); + mpCbAddStream->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleAddStreamHdl ) ); // init addstream dependencies - ToggleAddStreamHdl( NULL ); + ToggleAddStreamHdl(NULL); } // ----------------------------------------------------------------------------- void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent ) { // updating the FilterData sequence and storing FilterData to configuration - paParent->mbUseLosslessCompression = maRbLosslessCompression.IsChecked(); - paParent->mnQuality = static_cast<sal_Int32>(maNfQuality.GetValue()); - paParent->mbReduceImageResolution = maCbReduceImageResolution.IsChecked(); - paParent->mnMaxImageResolution = maCoReduceImageResolution.GetText().toInt32(); - paParent->mbExportNotes = maCbExportNotes.IsChecked(); - paParent->mbViewPDF = maCbViewPDF.IsChecked(); + paParent->mbUseLosslessCompression = mpRbLosslessCompression->IsChecked(); + paParent->mnQuality = static_cast<sal_Int32>(mpNfQuality->GetValue()); + paParent->mbReduceImageResolution = mpCbReduceImageResolution->IsChecked(); + paParent->mnMaxImageResolution = mpCoReduceImageResolution->GetText().toInt32(); + paParent->mbExportNotes = mpCbExportNotes->IsChecked(); + paParent->mbViewPDF = mpCbViewPDF->IsChecked(); if ( mbIsPresentation ) - paParent->mbExportNotesPages = maCbExportNotesPages.IsChecked(); - paParent->mbExportBookmarks = maCbExportBookmarks.IsChecked(); + paParent->mbExportNotesPages = mpCbExportNotesPages->IsChecked(); + paParent->mbExportBookmarks = mpCbExportBookmarks->IsChecked(); if ( mbIsPresentation ) - paParent->mbExportHiddenSlides = maCbExportHiddenSlides.IsChecked(); + paParent->mbExportHiddenSlides = mpCbExportHiddenSlides->IsChecked(); - paParent->mbIsSkipEmptyPages = !maCbExportEmptyPages.IsChecked(); - paParent->mbAddStream = maCbAddStream.IsVisible() && maCbAddStream.IsChecked(); + paParent->mbIsSkipEmptyPages = !mpCbExportEmptyPages->IsChecked(); + paParent->mbAddStream = mpCbAddStream->IsVisible() && mpCbAddStream->IsChecked(); paParent->mbIsRangeChecked = sal_False; - if( maRbRange.IsChecked() ) + if( mpRbRange->IsChecked() ) { paParent->mbIsRangeChecked = sal_True; - paParent->msPageRange = maEdPages.GetText(); //FIXME all right on other languages ? + paParent->msPageRange = mpEdPages->GetText(); //FIXME all right on other languages ? } - else if( maRbSelection.IsChecked() ) + else if( mpRbSelection->IsChecked() ) { - paParent->mbSelectionIsChecked = maRbSelection.IsChecked(); + paParent->mbSelectionIsChecked = mpRbSelection->IsChecked(); } paParent->mnPDFTypeSelection = 0; - if( maCbPDFA1b.IsChecked() ) + if( mpCbPDFA1b->IsChecked() ) { paParent->mnPDFTypeSelection = 1; paParent->mbUseTaggedPDF = mbTaggedPDFUserSelection; @@ -687,18 +650,18 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent ) } else { - paParent->mbUseTaggedPDF = maCbTaggedPDF.IsChecked(); - paParent->mbExportFormFields = maCbExportFormFields.IsChecked(); + paParent->mbUseTaggedPDF = mpCbTaggedPDF->IsChecked(); + paParent->mbExportFormFields = mpCbExportFormFields->IsChecked(); } - paParent->maWatermarkText = maEdWatermark.GetText(); + paParent->maWatermarkText = mpEdWatermark->GetText(); /* * FIXME: the entries are only implicitly defined by the resource file. Should there * ever be an additional form submit format this could get invalid. */ - paParent->mnFormsType = (sal_Int32) maLbFormsFormat.GetSelectEntryPos(); - paParent->mbAllowDuplicateFieldNames = maCbAllowDuplicateFieldNames.IsChecked(); + paParent->mnFormsType = (sal_Int32) mpLbFormsFormat->GetSelectEntryPos(); + paParent->mbAllowDuplicateFieldNames = mpCbAllowDuplicateFieldNames->IsChecked(); } // ----------------------------------------------------------------------------- @@ -711,41 +674,40 @@ SfxTabPage* ImpPDFTabGeneralPage::Create( Window* pParent, // ----------------------------------------------------------------------------- IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePagesHdl) { - maEdPages.Enable( maRbRange.IsChecked() ); - if ( maRbRange.IsChecked() ) - maEdPages.GrabFocus(); + mpEdPages->Enable( mpRbRange->IsChecked() ); + if ( mpRbRange->IsChecked() ) + mpEdPages->GrabFocus(); return 0; } // ----------------------------------------------------------------------------- IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl) { - maLbFormsFormat.Enable( maCbExportFormFields.IsChecked() ); - maCbAllowDuplicateFieldNames.Enable( maCbExportFormFields.IsChecked() ); + mpFormsFrame->Enable(mpCbExportFormFields->IsChecked()); return 0; } // ----------------------------------------------------------------------------- IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleCompressionHdl) { - maNfQuality.Enable( maRbJPEGCompression.IsChecked() ); + mpQualityFrame->Enable(mpRbJPEGCompression->IsChecked()); return 0; } // ----------------------------------------------------------------------------- IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl) { - maCoReduceImageResolution.Enable( maCbReduceImageResolution.IsChecked() ); + mpCoReduceImageResolution->Enable( mpCbReduceImageResolution->IsChecked() ); return 0; } IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleWatermarkHdl) { - maEdWatermark.Enable( maCbWatermark.IsChecked() ); - maFtWatermark.Enable (maCbWatermark.IsChecked() ); - if ( maCbWatermark.IsChecked() ) - maEdWatermark.GrabFocus(); + mpEdWatermark->Enable( mpCbWatermark->IsChecked() ); + mpFtWatermark->Enable (mpCbWatermark->IsChecked() ); + if ( mpCbWatermark->IsChecked() ) + mpEdWatermark->GrabFocus(); return 0; } @@ -753,21 +715,21 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleWatermarkHdl) // ----------------------------------------------------------------------------- IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAddStreamHdl) { - if( maCbAddStream.IsVisible() ) + if( mpCbAddStream->IsVisible() ) { - if( maCbAddStream.IsChecked() ) + if( mpCbAddStream->IsChecked() ) { - maRbAll.Check(); - maRbRange.Enable( sal_False ); - maRbSelection.Enable( sal_False ); - maEdPages.Enable( sal_False ); - maRbAll.Enable( sal_False ); + mpRbAll->Check(); + mpRbRange->Enable( sal_False ); + mpRbSelection->Enable( sal_False ); + mpEdPages->Enable( sal_False ); + mpRbAll->Enable( sal_False ); } else { - maRbAll.Enable( sal_True ); - maRbRange.Enable( sal_True ); - maRbSelection.Enable( sal_True ); + mpRbAll->Enable( sal_True ); + mpRbRange->Enable( sal_True ); + mpRbSelection->Enable( sal_True ); } } return 0; @@ -781,39 +743,37 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportPDFAHdl) if( mpaParent && mpaParent->GetTabPage( RID_PDF_TAB_SECURITY ) ) { pSecPage = static_cast<ImpPDFTabSecurityPage*>(mpaParent->GetTabPage( RID_PDF_TAB_SECURITY )); - pSecPage->ImplPDFASecurityControl( !maCbPDFA1b.IsChecked() ); + pSecPage->ImplPDFASecurityControl( !mpCbPDFA1b->IsChecked() ); } //PDF/A-1 needs tagged PDF, so force disable the control, will be forced in pdfexport. - sal_Bool bPDFA1Sel = maCbPDFA1b.IsChecked(); - maFtFormsFormat.Enable( !bPDFA1Sel ); - maLbFormsFormat.Enable( !bPDFA1Sel ); - maCbAllowDuplicateFieldNames.Enable( !bPDFA1Sel ); + bool bPDFA1Sel = mpCbPDFA1b->IsChecked(); + mpFormsFrame->Enable(bPDFA1Sel); if(bPDFA1Sel) { //store the values of subordinate controls - mbTaggedPDFUserSelection = maCbTaggedPDF.IsChecked(); - maCbTaggedPDF.Check(); - maCbTaggedPDF.Enable( sal_False ); - mbExportFormFieldsUserSelection = maCbExportFormFields.IsChecked(); - maCbExportFormFields.Check( sal_False ); - maCbExportFormFields.Enable( sal_False ); + mbTaggedPDFUserSelection = mpCbTaggedPDF->IsChecked(); + mpCbTaggedPDF->Check(); + mpCbTaggedPDF->Enable(false); + mbExportFormFieldsUserSelection = mpCbExportFormFields->IsChecked(); + mpCbExportFormFields->Check(false); + mpCbExportFormFields->Enable(false); } else { //retrieve the values of subordinate controls - maCbTaggedPDF.Enable(); - maCbTaggedPDF.Check( mbTaggedPDFUserSelection ); - maCbExportFormFields.Check( mbExportFormFieldsUserSelection ); - maCbExportFormFields.Enable(); + mpCbTaggedPDF->Enable(); + mpCbTaggedPDF->Check( mbTaggedPDFUserSelection ); + mpCbExportFormFields->Check( mbExportFormFieldsUserSelection ); + mpCbExportFormFields->Enable(); } // PDF/A-1 doesn't allow launch action, so enable/disable the selection on // Link page if( mpaParent && mpaParent->GetTabPage( RID_PDF_TAB_LINKS ) ) - ( ( ImpPDFTabLinksPage* )mpaParent->GetTabPage( RID_PDF_TAB_LINKS ) )->ImplPDFALinkControl( !maCbPDFA1b.IsChecked() ); + ( ( ImpPDFTabLinksPage* )mpaParent->GetTabPage( RID_PDF_TAB_LINKS ) )->ImplPDFALinkControl( !mpCbPDFA1b->IsChecked() ); // if a password was set, inform the user that this will not be used in PDF/A case - if( maCbPDFA1b.IsChecked() && pSecPage && pSecPage->hasPassword() ) + if( mpCbPDFA1b->IsChecked() && pSecPage && pSecPage->hasPassword() ) { WarningBox aBox( this, PDFFilterResId( RID_PDF_WARNPDFAPASSWORD ) ); aBox.Execute(); @@ -1401,7 +1361,7 @@ void ImpPDFTabLinksPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent ) if( paParent && paParent->GetTabPage( RID_PDF_TAB_GENER ) ) ImplPDFALinkControl( !( ( ImpPDFTabGeneralPage* )paParent-> - GetTabPage( RID_PDF_TAB_GENER ) )->maCbPDFA1b.IsChecked() ); + GetTabPage( RID_PDF_TAB_GENER ) )->mpCbPDFA1b->IsChecked() ); } // ----------------------------------------------------------------------------- diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc index 207482b27ad0..f55071b48e53 100644 --- a/filter/source/pdf/impdialog.hrc +++ b/filter/source/pdf/impdialog.hrc @@ -52,43 +52,6 @@ //ATTENTION: maximum allowed value is( RID_PDF_DIALOG_START + 19) -//controls for General tab page -#define FL_PAGES 1 -#define RB_ALL 2 -#define RB_RANGE 3 -#define RB_SELECTION 4 -#define ED_PAGES 5 -#define BT_OK 6 -#define BT_CANCEL 7 -#define BT_HELP 8 -#define FL_IMAGES 9 -#define RB_LOSSLESSCOMPRESSION 10 -#define RB_JPEGCOMPRESSION 11 -#define FT_QUALITY 12 -#define NF_QUALITY 13 -#define CB_REDUCEIMAGERESOLUTION 14 -#define CO_REDUCEIMAGERESOLUTION 15 -#define FL_GENERAL 16 -#define CB_TAGGEDPDF 17 -#define CB_EXPORTNOTES 18 -#define CB_EXPORTBOOKMARKS 19 -#define CB_EXPORTFORMFIELDS 20 -#define FT_FORMSFORMAT 21 -#define LB_FORMSFORMAT 22 -#define CB_ALLOWDUPLICATEFIELDNAMES 23 -#define CB_EXPORTEMPTYPAGES 24 -#define CB_ADDSTREAM 25 -#define CB_PDFA_1B_SELECT 26 -#define CB_EXPORTNOTESPAGES 27 -#define FT_ADDSTREAMDESCRIPTION 29 -#define CB_EXPORTHIDDENSLIDES 30 -#define FL_WATERMARK 31 -#define CB_WATERMARK 32 -#define FT_WATERMARK 33 -#define ED_WATERMARK 34 -#define CB_VIEWPDF 35 - - #define FL_GENERAL_VERTICAL 157 #define FL_INITVIEW_VERTICAL 158 #define FL_VPREFER_VERTICAL 158 diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index 832e6d2906ec..8d97e2c57fc3 100644 --- a/filter/source/pdf/impdialog.hxx +++ b/filter/source/pdf/impdialog.hxx @@ -176,54 +176,47 @@ protected: //class tab page general class ImpPDFTabGeneralPage : public SfxTabPage { - friend class ImpPDFTabLinksPage; + friend class ImpPDFTabLinksPage; - FixedLine maFlPages; - RadioButton maRbAll; - RadioButton maRbRange; - RadioButton maRbSelection; - Edit maEdPages; - - FixedLine maFlCompression; - RadioButton maRbLosslessCompression; - RadioButton maRbJPEGCompression; - FixedText maFtQuality; - MetricField maNfQuality; - CheckBox maCbReduceImageResolution; - ComboBox maCoReduceImageResolution; - - FixedLine m_aVerticalLine; - - FixedLine maFlGeneral; - CheckBox maCbPDFA1b; - CheckBox maCbTaggedPDF; - sal_Bool mbTaggedPDFUserSelection; - - CheckBox maCbExportFormFields; - sal_Bool mbExportFormFieldsUserSelection; - FixedText maFtFormsFormat; - ListBox maLbFormsFormat; - CheckBox maCbAllowDuplicateFieldNames; - - CheckBox maCbExportBookmarks; - CheckBox maCbExportHiddenSlides; - CheckBox maCbExportNotes; - CheckBox maCbViewPDF; - CheckBox maCbExportNotesPages; - - CheckBox maCbExportEmptyPages; - CheckBox maCbAddStream; - FixedText maFtAddStreamDescription; - - FixedLine maFlWatermark; - CheckBox maCbWatermark; - FixedText maFtWatermark; - Edit maEdWatermark; + RadioButton* mpRbAll; + RadioButton* mpRbRange; + RadioButton* mpRbSelection; + Edit* mpEdPages; - sal_Bool mbIsPresentation; - sal_Bool mbIsWriter; + RadioButton* mpRbLosslessCompression; + RadioButton* mpRbJPEGCompression; + VclContainer* mpQualityFrame; + MetricField* mpNfQuality; + CheckBox* mpCbReduceImageResolution; + ComboBox* mpCoReduceImageResolution; + + CheckBox* mpCbPDFA1b; + CheckBox* mpCbTaggedPDF; + bool mbTaggedPDFUserSelection; + + CheckBox* mpCbExportFormFields; + bool mbExportFormFieldsUserSelection; + VclContainer* mpFormsFrame; + ListBox* mpLbFormsFormat; + CheckBox* mpCbAllowDuplicateFieldNames; -const ImpPDFTabDialog* mpaParent; + CheckBox* mpCbExportBookmarks; + CheckBox* mpCbExportHiddenSlides; + CheckBox* mpCbExportNotes; + CheckBox* mpCbViewPDF; + CheckBox* mpCbExportNotesPages; + + CheckBox* mpCbExportEmptyPages; + CheckBox* mpCbAddStream; + + CheckBox* mpCbWatermark; + FixedText* mpFtWatermark; + Edit* mpEdWatermark; + + bool mbIsPresentation; + bool mbIsWriter; + + const ImpPDFTabDialog* mpaParent; DECL_LINK( TogglePagesHdl, void* ); DECL_LINK( ToggleCompressionHdl, void* ); @@ -242,9 +235,9 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - void GetFilterConfigItem( ImpPDFTabDialog* paParent ); - void SetFilterConfigItem( const ImpPDFTabDialog* paParent ); - sal_Bool IsPdfaSelected() { return maCbPDFA1b.IsChecked(); }; + void GetFilterConfigItem(ImpPDFTabDialog* paParent); + void SetFilterConfigItem(const ImpPDFTabDialog* paParent); + bool IsPdfaSelected() const { return mpCbPDFA1b->IsChecked(); } }; //class tab page viewer diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index 871d88e0af9a..34c3b1028a4e 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -40,278 +40,6 @@ String STR_PDF_EXPORT_ODPWD Text[ en-US ] = "Set permission password"; }; -////////////////////////////////////////////////////////////// -//tab page for PDF Export, general preferences -TabPage RID_PDF_TAB_GENER -{ - HelpId = HID_FILTER_PDF_OPTIONS ; - Hide = TRUE ; - Text[ en-US ] = "General"; - TAB_PDF_SIZE; - - FixedLine FL_PAGES - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 164 , 8 ) ; - Text[ en-US ] = "Range"; - }; - RadioButton RB_ALL - { - HelpID = "filter:RadioButton:RID_PDF_TAB_GENER:RB_ALL"; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - Text[ en-US ] = "~All"; - }; - RadioButton RB_RANGE - { - HelpID = "filter:RadioButton:RID_PDF_TAB_GENER:RB_RANGE"; - Pos = MAP_APPFONT ( 12 , 27 ) ; - Size = MAP_APPFONT ( 101 , 10 ) ; - Text[ en-US ] = "~Pages"; - }; - Edit ED_PAGES - { - HelpID = "filter:Edit:RID_PDF_TAB_GENER:ED_PAGES"; - Border = TRUE ; - Pos = MAP_APPFONT ( 116, 26 ) ; - Size = MAP_APPFONT ( 48 , 12 ) ; - }; - RadioButton RB_SELECTION - { - HelpID = "filter:RadioButton:RID_PDF_TAB_GENER:RB_SELECTION"; - Pos = MAP_APPFONT ( 12 , 40 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - Text[ en-US ] = "~Selection"; - }; - FixedLine FL_IMAGES - { - Pos = MAP_APPFONT ( 6 , 53 ) ; - Size = MAP_APPFONT ( 164 , 8 ) ; - Text[ en-US ] = "Images"; - }; - RadioButton RB_LOSSLESSCOMPRESSION - { - HelpID = "filter:RadioButton:RID_PDF_TAB_GENER:RB_LOSSLESSCOMPRESSION"; - Pos = MAP_APPFONT ( 12 , 64 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - Text[ en-US ] = "~Lossless compression"; - }; - RadioButton RB_JPEGCOMPRESSION - { - HelpID = "filter:RadioButton:RID_PDF_TAB_GENER:RB_JPEGCOMPRESSION"; - Pos = MAP_APPFONT ( 12 , 76 ) ; - Size = MAP_APPFONT ( 158, 10 ) ; - Text[ en-US ] = "~JPEG compression"; - }; - FixedText FT_QUALITY - { - Pos = MAP_APPFONT ( 30 , 89 ) ; - Size = MAP_APPFONT ( 83, 10 ) ; - Text[ en-US ] = "~Quality"; - }; - MetricField NF_QUALITY - { - HelpID = "filter:MetricField:RID_PDF_TAB_GENER:NF_QUALITY"; - Border = TRUE ; - Pos = MAP_APPFONT ( 116, 88 ) ; - Size = MAP_APPFONT ( 48, 12 ) ; - TabStop = TRUE ; - Spin = TRUE ; - StrictFormat = TRUE ; - Last = 100 ; - Repeat = TRUE ; - }; - CheckBox CB_REDUCEIMAGERESOLUTION - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_REDUCEIMAGERESOLUTION"; - Pos = MAP_APPFONT ( 12 , 103 ) ; - Size = MAP_APPFONT ( 101 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "~Reduce image resolution"; - }; - ComboBox CO_REDUCEIMAGERESOLUTION - { - HelpID = "filter:ComboBox:RID_PDF_TAB_GENER:CO_REDUCEIMAGERESOLUTION"; - Pos = MAP_APPFONT ( 116 , 102 ) ; - Size = MAP_APPFONT ( 48 , 50 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - StringList = - { - "75 DPI" ; - "150 DPI" ; - "300 DPI" ; - "600 DPI" ; - "1200 DPI" ; - }; - }; - - FixedLine FL_WATERMARK - { - Pos = MAP_APPFONT ( 6 , 123 ) ; - Size = MAP_APPFONT ( 164 , 10 ) ; - Text[ en-US ] = "Watermark"; - }; - - CheckBox CB_WATERMARK - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_SIGNWITHWATERMARK"; - Pos = MAP_APPFONT ( 6, 135 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "Sign with Watermark"; - }; - - FixedText FT_WATERMARK - { - Pos = MAP_APPFONT ( 6 , 150) ; - Size = MAP_APPFONT ( 90 , 8 ) ; - Text [ en-US ] = "Watermark Text"; - }; - - Edit ED_WATERMARK - { - HelpID = "filter:Edit:RID_PDF_TAB_GENER:EDIT_WATERMARKTEXT"; - Pos = MAP_APPFONT ( 15, 160 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; - Border = TRUE; - - }; - - - FixedLine FL_GENERAL_VERTICAL - { - Pos = MAP_APPFONT ( 175 , 3 ) ; - Size = MAP_APPFONT ( 4 , 190 ) ; - Vert = TRUE; - }; - - FixedLine FL_GENERAL - { - Pos = MAP_APPFONT ( 182 , 3 ) ; - Size = MAP_APPFONT ( 164 , 8 ) ; - Text[ en-US ] = "General"; - }; - CheckBox CB_ADDSTREAM - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_ADDSTREAM"; - Pos = MAP_APPFONT ( 188 , 14 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "Em~bed OpenDocument file"; - }; - FixedText FT_ADDSTREAMDESCRIPTION - { - Pos = MAP_APPFONT( 206 , 23 ) ; - Size = MAP_APPFONT( 140, 16 ) ; - Wordbreak = TRUE ; - Text[ en-US ] = "Makes this PDF easily editable in %PRODUCTNAME" ; - }; - CheckBox CB_PDFA_1B_SELECT - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_PDFA_1B_SELECT"; - Pos = MAP_APPFONT ( 188, 40 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "P~DF/A-1a"; - }; - CheckBox CB_TAGGEDPDF - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_TAGGEDPDF"; - Pos = MAP_APPFONT ( 188 , 53 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "~Tagged PDF"; - }; - CheckBox CB_EXPORTFORMFIELDS - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTFORMFIELDS"; - Pos = MAP_APPFONT ( 188 , 66 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "~Create PDF form"; - }; - FixedText FT_FORMSFORMAT - { - Pos = MAP_APPFONT ( 206 , 79 ) ; - Size = MAP_APPFONT ( 93, 8 ) ; - Text[ en-US ] = "Submit ~format"; - }; - ListBox LB_FORMSFORMAT - { - HelpID = "filter:ListBox:RID_PDF_TAB_GENER:LB_FORMSFORMAT"; - Border = TRUE ; - Pos = MAP_APPFONT ( 302, 77 ) ; - Size = MAP_APPFONT ( 38, 48 ) ; - DeltaLang = < Default ; Default ; Default ; Default ; > ; - TabStop = TRUE ; - DropDown = TRUE ; - StringList = - { - < "FDF" ; Default; > ; - < "PDF" ; > ; - < "HTML" ; > ; - < "XML" ; > ; - }; - }; - CheckBox CB_ALLOWDUPLICATEFIELDNAMES - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_ALLOWDUPLICATEFIELDNAMES"; - Pos = MAP_APPFONT( 206, 92 ); - Size = MAP_APPFONT( 128, 10 ); - TabStop = TRUE; - Text [ en-US ] = "Allow duplicate field ~names"; - }; - CheckBox CB_EXPORTBOOKMARKS - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTBOOKMARKS"; - Pos = MAP_APPFONT ( 188 , 105 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "Export ~bookmarks"; - }; - CheckBox CB_EXPORTNOTES - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTNOTES"; - Pos = MAP_APPFONT ( 188 , 118 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "~Export comments"; - }; - CheckBox CB_EXPORTNOTESPAGES - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTNOTESPAGES"; - Pos = MAP_APPFONT ( 188 , 131 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "Export ~notes pages"; - }; - CheckBox CB_EXPORTHIDDENSLIDES - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTHIDDENSLIDES"; - Pos = MAP_APPFONT ( 188 , 144 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "Export ~hidden pages"; - }; - CheckBox CB_EXPORTEMPTYPAGES - { - HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTEMPTYPAGES"; - Pos = MAP_APPFONT ( 188 , 157 ) ; - Size = MAP_APPFONT ( 158 , 16 ) ; - TabStop = TRUE ; - WordBreak = TRUE ; - Text[ en-US ] = "Exp~ort automatically inserted blank pages"; - }; - CheckBox CB_VIEWPDF - { - Pos = MAP_APPFONT ( 188 , 181 ) ; - Size = MAP_APPFONT ( 158 , 10 ) ; - TabStop = TRUE ; - Text[ en-US ] = "~View PDF after Export"; - }; -}; - WarningBox RID_PDF_WARNPDFAPASSWORD { Title[en-US] = "PDF/A Export"; |