<div dir="ltr"><div>It is the Dialog box which is opened after clicking on Export as PDF ,<br><br></div>Screen shot is attached<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 30, 2013 at 2:08 PM, Anurag Kanungo (via Code Review) <span dir="ltr"><<a href="mailto:gerrit@gerrit.libreoffice.org" target="_blank">gerrit@gerrit.libreoffice.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Hi,<br>
<br>
I have submitted a patch for review:<br>
<br>
</div> <a href="https://gerrit.libreoffice.org/3693" target="_blank">https://gerrit.libreoffice.org/3693</a><br>
<div class="im"><br>
To pull it, you can do:<br>
<br>
</div> git pull ssh://<a href="http://gerrit.libreoffice.org:29418/core" target="_blank">gerrit.libreoffice.org:29418/core</a> refs/changes/93/3693/1<br>
<div class="im"><br>
fdo#37222 and fdo#37219 Open pdf after Export and added to recent documents.<br>
<br>
</div>Added an checkbox option "view pdf after Export" in Export Dialog Box .<br>
<br>
If a user ticks it , pdf file will be opened after export<br>
else only export will be done .<br>
<br>
Change-Id: Ibc4bf200c67d090d61e6024519b9057f9f8bfd6f<br>
---<br>
M filter/source/pdf/impdialog.cxx<br>
M filter/source/pdf/impdialog.hrc<br>
M filter/source/pdf/impdialog.hxx<br>
M filter/source/pdf/impdialog.src<br>
M filter/source/pdf/pdffilter.cxx<br>
5 files changed, 29 insertions(+), 0 deletions(-)<br>
<br>
<br>
<br>
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx<br>
index 9ddf052..d70d17f 100644<br>
--- a/filter/source/pdf/impdialog.cxx<br>
+++ b/filter/source/pdf/impdialog.cxx<br>
@@ -39,6 +39,7 @@<br>
<br>
#include <boost/shared_ptr.hpp><br>
<br>
+extern int pdfview;<br>
static ResMgr& getPDFFilterResMgr()<br>
{<br>
static ResMgr *pRes = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILanguageTag());<br>
@@ -80,6 +81,7 @@<br>
mnMaxImageResolution( 300 ),<br>
mbUseTaggedPDF( sal_False ),<br>
mbExportNotes( sal_True ),<br>
+ mbVIEWPDF( sal_False ),<br>
mbExportNotesPages( sal_False ),<br>
mbUseTransitionEffects( sal_False ),<br>
mbIsSkipEmptyPages( sal_True ),<br>
@@ -511,6 +513,7 @@<br>
maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),<br>
maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ),<br>
maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),<br>
+ maCbVIEWPDF( this, PDFFilterResId( CB_VIEWPDF ) ),<br>
maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ),<br>
maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),<br>
maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),<br>
@@ -702,6 +705,12 @@<br>
paParent->mbExportFormFields = maCbExportFormFields.IsChecked();<br>
paParent->mbEmbedStandardFonts = maCbEmbedStandardFonts.IsChecked();<br>
}<br>
+<br>
+ if( maCbVIEWPDF.IsChecked() )<br>
+ pdfview=1;<br>
+ else<br>
+ pdfview=0;<br>
+<br>
paParent->maWatermarkText = maEdWatermark.GetText();<br>
<br>
/*<br>
diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc<br>
index 03b6d55..938b622 100644<br>
--- a/filter/source/pdf/impdialog.hrc<br>
+++ b/filter/source/pdf/impdialog.hrc<br>
@@ -87,6 +87,7 @@<br>
#define CB_WATERMARK 32<br>
#define FT_WATERMARK 33<br>
#define ED_WATERMARK 34<br>
+#define CB_VIEWPDF 35<br>
<br>
<br>
//controls for open options tab page<br>
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx<br>
index 11a3f38..3b0d96c 100644<br>
--- a/filter/source/pdf/impdialog.hxx<br>
+++ b/filter/source/pdf/impdialog.hxx<br>
@@ -94,6 +94,7 @@<br>
sal_Bool mbUseTaggedPDF;<br>
sal_Int32 mnPDFTypeSelection;<br>
sal_Bool mbExportNotes;<br>
+ sal_Bool mbVIEWPDF;<br>
sal_Bool mbExportNotesPages;<br>
sal_Bool mbUseTransitionEffects;<br>
sal_Bool mbIsSkipEmptyPages;<br>
@@ -210,6 +211,7 @@<br>
CheckBox maCbExportBookmarks;<br>
CheckBox maCbExportHiddenSlides;<br>
CheckBox maCbExportNotes;<br>
+ CheckBox maCbVIEWPDF;<br>
CheckBox maCbExportNotesPages;<br>
<br>
CheckBox maCbExportEmptyPages;<br>
diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src<br>
index 8d74616..1d6e202 100644<br>
--- a/filter/source/pdf/impdialog.src<br>
+++ b/filter/source/pdf/impdialog.src<br>
@@ -278,6 +278,13 @@<br>
TabStop = TRUE ;<br>
Text[ en-US ] = "~Export comments";<br>
};<br>
+ CheckBox CB_VIEWPDF<br>
+ {<br>
+ Pos = MAP_APPFONT ( 188 , 131 ) ;<br>
+ Size = MAP_APPFONT ( 158 , 10 ) ;<br>
+ TabStop = TRUE ;<br>
+ Text[ en-US ] = "~View Pdf after Export";<br>
+ };<br>
CheckBox CB_EXPORTNOTESPAGES<br>
{<br>
HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTNOTESPAGES";<br>
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx<br>
index 9aadfed..8c660b9 100644<br>
--- a/filter/source/pdf/pdffilter.cxx<br>
+++ b/filter/source/pdf/pdffilter.cxx<br>
@@ -24,7 +24,11 @@<br>
<div class="im"> #include <vcl/window.hxx><br>
#include <svl/outstrm.hxx><br>
#include <vcl/FilterConfigItem.hxx><br>
+#include <com/sun/star/system/SystemShellExecute.hpp><br>
+#include <com/sun/star/system/SystemShellExecuteFlags.hpp><br>
<br>
</div>+using namespace css::system;<br>
+int pdfview;<br>
<div class="im"> // -------------<br>
// - PDFFilter -<br>
</div> // -------------<br>
<div class="im">@@ -51,6 +55,7 @@<br>
sal_Bool bRet = sal_False;<br>
Reference< task::XStatusIndicator > xStatusIndicator;<br>
Reference< task::XInteractionHandler > xIH;<br>
+ OUString aUrl;<br>
<br>
for ( sal_Int32 i = 0 ; ( i < nLength ) && !xOStm.is(); ++i)<br>
{<br>
@@ -62,6 +67,8 @@<br>
pValue[ i ].Value >>= xStatusIndicator;<br>
else if ( pValue[i].Name == "InteractionHandler" )<br>
pValue[i].Value >>= xIH;<br>
+ else if ( pValue[ i ].Name == "URL" )<br>
+ pValue[ i ].Value >>= aUrl;<br>
}<br>
<br>
/* we don't get FilterData if we are exporting directly<br>
</div>@@ -133,6 +140,9 @@<br>
}<br>
}<br>
<br>
+if(pdfview==1) {<br>
<div class="im">+ Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) ); //Open the newly exported pdf<br>
+ xSystemShellExecute->execute(aUrl, "", SystemShellExecuteFlags::URIS_ONLY ); }<br>
return bRet;<br>
}<br>
<br>
<br>
</div>--<br>
To view, visit <a href="https://gerrit.libreoffice.org/3693" target="_blank">https://gerrit.libreoffice.org/3693</a><br>
<div class="im">To unsubscribe, visit <a href="https://gerrit.libreoffice.org/settings" target="_blank">https://gerrit.libreoffice.org/settings</a><br>
<br>
</div>Gerrit-MessageType: newchange<br>
Gerrit-Change-Id: Ibc4bf200c67d090d61e6024519b9057f9f8bfd6f<br>
<div class="im HOEnZb">Gerrit-PatchSet: 1<br>
Gerrit-Project: core<br>
Gerrit-Branch: master<br>
Gerrit-Owner: Anurag Kanungo <<a href="mailto:anuragkanungo@gmail.com">anuragkanungo@gmail.com</a>><br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/libreoffice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
</div></div></blockquote></div><br></div>