Need Guidance on bug fdo#37222

Anurag Kanungo anuragkanungo at gmail.com
Tue Apr 30 02:03:01 PDT 2013


Hi,
Thanks for the guidance ,

please check https://gerrit.libreoffice.org/3693

I was able to export the pdf file , so i created a checkbox in " export as
pdf " dialog stating "View pdf after export "

So, if a user ticks it , pdf file is exported  and opened
       else file is only exported

but for this i used a global variable ,

As i wasn't able to find out that how to pass a value that checkbox is
ticked or not from the impdialog.cxx  to pdffilter.cxx

impdialog.cxx >> contains checkbox code

pdffilter.cxx >> contians opening a pdf code

Please guide ,
May be it could be too easy , but i wasn't able to figure out , so i used
global variable .



On Mon, Apr 29, 2013 at 9:55 PM, Tomaž Vajngerl <quikee at gmail.com> wrote:

> Hi,
>
> Please, unless explicitly asked, always make sure that LO development
> mailing list is in the CC of the mail when replying (or "reply to all").
>
> Actually you have to go to pdffilter.cxx -> PDFFilter::implExport. You
> will have to get the "URL" from the rDescriptor which contains the location
> and filename of the PDF that will be saved. To get it you have to do
> something similar to how "OutputStream", "FilterData",
> "StatusIndicator",... are done:
>
> if ( pValue[ i ].Name == "URL" )
>    pValue[ i ].Value >>= aUrl;
>
> aUrl should be a OUString.
>
> Regards, Tomaž
>
>
>
>
>
>  On Mon, Apr 29, 2013 at 4:10 PM, Anurag Kanungo <anuragkanungo at gmail.com>wrote:
>
>> Hi,
>>
>> Thank you for the reply,
>>
>> Well i used,
>>
>>
>> Reference<XSystemShellExecute>
>> xSystemShellExecute(SystemShellExecute::create(
>> ::comphelper::getProcessComponentContext() ) );
>>  xSystemShellExecute->execute(rFile, "",
>> SystemShellExecuteFlags::URIS_ONLY );
>>
>> in sal_Bool PDFExport::Export( const OUString& rFile, const Sequence<
>> PropertyValue >& rFilterData )
>>
>>
>> after including the header and namespace for xSystemShell
>>
>> but on executing(Export a pdf file) , it shows rFile to be a tmp file,
>>
>> gvfs-open: file:///tmp/lu305f9i.tmp/lu305faq.tmp: error opening location:
>> Error when getting information for file '/tmp/lu305f9i.tmp/lu305faq.tmp':
>> No such file or directory
>>
>>
>> How to get the exact file path, which is entered by user .
>>
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Apr 28, 2013 at 2:55 PM, Tomaž Vajngerl <quikee at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> system("xdg-open abc.pdf"); is not good enough - this won't work on OSX
>>> or Windows.
>>>
>>> You have to use XSystemShellExecute:
>>> Reference<XSystemShellExecute>
>>> xSystemShellExecute(SystemShellExecute::create(
>>> ::comphelper::getProcessComponentContext() ) );
>>> xSystemShellExecute->execute( aFileName, OUString(),
>>> SystemShellExecuteFlags::URIS_ONLY );
>>>
>>> see svx/source/core/extedit.cxx method ExternalToolEdit::threadWorker as
>>> an example where it is used.
>>>
>>> As for path and filename in PDFExport::Export you get "rFile" as
>>> parameter - this is the location where the file will be written to.
>>>
>>> Regards, Tomaž
>>>
>>>
>>>
>>>
>>> On Sat, Apr 27, 2013 at 1:34 AM, Anurag Kanungo <anuragkanungo at gmail.com
>>> > wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> In bug
>>>>
>>>> https://bugs.freedesktop.org/show_bug.cgi?id=37222
>>>>
>>>> I was trying to resolve the bug , and got a little progress that
>>>> whenever a user
>>>> exports the pdf , i am able to open a particular fixed pdf file .
>>>>
>>>> In file filter/source/pdf/pdfexport.cxx,
>>>>
>>>> i used there system("xdg-open abc.pdf");       //xdg-open because it
>>>> can work with any desktop environment (i guess)
>>>>
>>>> so it will always open abc.pdf file .
>>>>
>>>>
>>>>
>>>> I am not able to open the newly saved pdf file , as i require the
>>>> location and the name of the new pdf to open it ,
>>>> and i also require to convert string to const char* , as
>>>> string.c_str(); doesn't worked there .
>>>>
>>>> Thank You .
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> LibreOffice mailing list
>>>> LibreOffice at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130430/ff22b861/attachment.html>


More information about the LibreOffice mailing list