summaryrefslogtreecommitdiff
path: root/filter/source
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/pdf/impdialog.cxx7
-rw-r--r--filter/source/pdf/impdialog.hrc1
-rw-r--r--filter/source/pdf/impdialog.hxx2
-rw-r--r--filter/source/pdf/impdialog.src9
-rw-r--r--filter/source/pdf/pdfexport.cxx3
-rw-r--r--filter/source/pdf/pdfexport.hxx1
-rw-r--r--filter/source/pdf/pdffilter.cxx13
7 files changed, 35 insertions, 1 deletions
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 9ddf0520bb9b..d26532813b17 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -80,6 +80,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
mnMaxImageResolution( 300 ),
mbUseTaggedPDF( sal_False ),
mbExportNotes( sal_True ),
+ mbViewPDF( sal_False ),
mbExportNotesPages( sal_False ),
mbUseTransitionEffects( sal_False ),
mbIsSkipEmptyPages( sal_True ),
@@ -192,6 +193,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
if ( mbIsPresentation )
mbExportNotesPages = maConfigItem.ReadBool( "ExportNotesPages", sal_False );
mbExportNotes = maConfigItem.ReadBool( "ExportNotes", sal_False );
+ mbViewPDF = maConfigItem.ReadBool( "ViewPDFAfterExport", sal_False );
mbExportBookmarks = maConfigItem.ReadBool( "ExportBookmarks", sal_True );
if ( mbIsPresentation )
@@ -360,6 +362,7 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
if ( mbIsPresentation )
maConfigItem.WriteBool( "ExportNotesPages", mbExportNotesPages );
maConfigItem.WriteBool( "ExportNotes", mbExportNotes );
+ maConfigItem.WriteBool( "ViewPDFAfterExport", mbViewPDF );
maConfigItem.WriteBool( "ExportBookmarks", mbExportBookmarks );
if ( mbIsPresentation )
@@ -511,6 +514,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
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 ) ),
@@ -624,6 +628,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
maCbExportBookmarks.Check( paParent->mbExportBookmarks );
maCbExportNotes.Check( paParent->mbExportNotes );
+ maCbViewPDF.Check( paParent->mbViewPDF);
if ( mbIsPresentation )
{
@@ -668,6 +673,7 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
paParent->mbReduceImageResolution = maCbReduceImageResolution.IsChecked();
paParent->mnMaxImageResolution = maCoReduceImageResolution.GetText().toInt32();
paParent->mbExportNotes = maCbExportNotes.IsChecked();
+ paParent->mbViewPDF = maCbViewPDF.IsChecked();
if ( mbIsPresentation )
paParent->mbExportNotesPages = maCbExportNotesPages.IsChecked();
paParent->mbExportBookmarks = maCbExportBookmarks.IsChecked();
@@ -702,6 +708,7 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
paParent->mbExportFormFields = maCbExportFormFields.IsChecked();
paParent->mbEmbedStandardFonts = maCbEmbedStandardFonts.IsChecked();
}
+
paParent->maWatermarkText = maEdWatermark.GetText();
/*
diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc
index 03b6d55f092d..938b622bcc72 100644
--- a/filter/source/pdf/impdialog.hrc
+++ b/filter/source/pdf/impdialog.hrc
@@ -87,6 +87,7 @@
#define CB_WATERMARK 32
#define FT_WATERMARK 33
#define ED_WATERMARK 34
+#define CB_VIEWPDF 35
//controls for open options tab page
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 11a3f3869a21..4049d53ad73b 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -94,6 +94,7 @@ protected:
sal_Bool mbUseTaggedPDF;
sal_Int32 mnPDFTypeSelection;
sal_Bool mbExportNotes;
+ sal_Bool mbViewPDF;
sal_Bool mbExportNotesPages;
sal_Bool mbUseTransitionEffects;
sal_Bool mbIsSkipEmptyPages;
@@ -210,6 +211,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage
CheckBox maCbExportBookmarks;
CheckBox maCbExportHiddenSlides;
CheckBox maCbExportNotes;
+ CheckBox maCbViewPDF;
CheckBox maCbExportNotesPages;
CheckBox maCbExportEmptyPages;
diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src
index 8d7461656dc6..ec33d1f6cdd9 100644
--- a/filter/source/pdf/impdialog.src
+++ b/filter/source/pdf/impdialog.src
@@ -182,7 +182,7 @@ TabPage RID_PDF_TAB_GENER
FixedLine FL_GENERAL_VERTICAL
{
Pos = MAP_APPFONT ( 175 , 3 ) ;
- Size = MAP_APPFONT ( 4 , 171 ) ;
+ Size = MAP_APPFONT ( 4 , 190 ) ;
Vert = TRUE;
};
@@ -311,6 +311,13 @@ TabPage RID_PDF_TAB_GENER
TabStop = TRUE ;
Text[ en-US ] = "E~mbed standard fonts";
};
+ 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
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 23eea9744b24..e771a0d249b0 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -98,6 +98,7 @@ PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc,
mbUseTaggedPDF ( sal_False ),
mnPDFTypeSelection ( 0 ),
mbExportNotes ( sal_True ),
+ mbViewPDF ( sal_True ),
mbExportNotesPages ( sal_False ),
mbEmbedStandardFonts ( sal_False ),//in preparation for i54636 and i76458.
//already used for i59651 (PDF/A-1)
@@ -457,6 +458,8 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
rFilterData[ nData ].Value >>= mnPDFTypeSelection;
else if ( rFilterData[ nData ].Name == "ExportNotes" )
rFilterData[ nData ].Value >>= mbExportNotes;
+ else if ( rFilterData[ nData ].Name == "ViewPDFAfterExport" )
+ rFilterData[ nData ].Value >>= mbViewPDF;
else if ( rFilterData[ nData ].Name == "ExportNotesPages" )
rFilterData[ nData ].Value >>= mbExportNotesPages;
else if ( rFilterData[ nData ].Name == "EmbedStandardFonts" )
diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx
index a69de13f6536..0398e2ffa592 100644
--- a/filter/source/pdf/pdfexport.hxx
+++ b/filter/source/pdf/pdfexport.hxx
@@ -47,6 +47,7 @@ private:
sal_Bool mbUseTaggedPDF;
sal_Int32 mnPDFTypeSelection;
sal_Bool mbExportNotes;
+ sal_Bool mbViewPDF;
sal_Bool mbExportNotesPages;
sal_Bool mbEmbedStandardFonts;
sal_Bool mbUseTransitionEffects;
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index 9aadfedf207a..f09ae0a9f955 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -24,7 +24,10 @@
#include <vcl/window.hxx>
#include <svl/outstrm.hxx>
#include <vcl/FilterConfigItem.hxx>
+#include <com/sun/star/system/SystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
+using namespace css::system;
// -------------
// - PDFFilter -
// -------------
@@ -51,6 +54,10 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
sal_Bool bRet = sal_False;
Reference< task::XStatusIndicator > xStatusIndicator;
Reference< task::XInteractionHandler > xIH;
+ OUString aUrl;
+
+ FilterConfigItem aItem( "Office.Common/Filter/PDF/Export/" );
+ sal_Bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", sal_False );
for ( sal_Int32 i = 0 ; ( i < nLength ) && !xOStm.is(); ++i)
{
@@ -62,6 +69,8 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
pValue[ i ].Value >>= xStatusIndicator;
else if ( pValue[i].Name == "InteractionHandler" )
pValue[i].Value >>= xIH;
+ else if ( pValue[ i ].Name == "URL" )
+ pValue[ i ].Value >>= aUrl;
}
/* we don't get FilterData if we are exporting directly
@@ -133,6 +142,10 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
}
}
+ if(aViewPDF==sal_True) {
+ Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) ); //Open the newly exported pdf
+ xSystemShellExecute->execute(aUrl, "", SystemShellExecuteFlags::URIS_ONLY ); }
+
return bRet;
}