bug 74702

classic Classic list List threaded Threaded
4 messages Options
Adrien Ollier Adrien Ollier
Reply | Threaded
Open this post in threaded view
|

bug 74702

Hello everybody,

still related to bug #74702, I have two problems:

  1. there is function XParaPortionList::RefDevIsVirtual() that uses attribute XParaPortionList::eRefDevIsVirtual which is of type OutDevType which must be removed.
    XParaPortionList::eRefDevIsVirtual is never set (https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/editobj2.hxx?r=f2373813), so may I delete XParaPortionList::eRefDevIsVirtual, XParaPortionList::RefDevIsVirtual() and the call to XParaPortionList::RefDevIsVirtual() in editeng/source/editeng/impedit4.cxx line 1174?
  2. In editeng/source/editeng/impedit2.cxx it is required to cast an OutputDevice* to a vcl::PDFWriterImpl* to know the real type of pOut (and test if the resulting pointer is nullptr or not). This requires to include vcl/source/gdi/pdfwriter_impl.hxx but this file is not in the common directory for inclusion. How can I include vcl/source/gdi/pdfwriter_impl.hxx?
Thank you by advance.
Best regards,
Adrien Ollier

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Kaganski Mike Kaganski Mike
Reply | Threaded
Open this post in threaded view
|

Re: bug 74702

Hi Adrien,

First of all, it's best to have a tentative change in gerrit, with your
proposed changes, to have better overview. Please create if you haven't
yet, and post the link here. Thanks!

On 22.04.2019 11:58, Adrien Ollier wrote:
>  2. In editeng/source/editeng/impedit2.cxx it is required to cast an
>     OutputDevice* to a vcl::PDFWriterImpl* to know the real type of pOut
>     (and test if the resulting pointer is nullptr or not). This requires
>     to include vcl/source/gdi/pdfwriter_impl.hxx but this file is not in
>     the common directory for inclusion. How can I include
>     vcl/source/gdi/pdfwriter_impl.hxx?

I couldn't find something like "pOut" in
editeng/source/editeng/impedit2.cxx - so which of the 4300 lines of the
file you mean? ;-)

--
Best regards,
Mike Kaganski
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Jan-Marek Glogowski Jan-Marek Glogowski
Reply | Threaded
Open this post in threaded view
|

Re: bug 74702

In reply to this post by Adrien Ollier
Hi Adrien,

Am 22.04.19 um 10:58 schrieb Adrien Ollier:
>   1.  there is function XParaPortionList::RefDevIsVirtual() that uses attribute XParaPortionList::eRefDevIsVirtual which is of type OutDevType which must be removed.
> XParaPortionList::eRefDevIsVirtual is never set (https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/editobj2.hxx?r=f2373813), so may I delete XParaPortionList::eRefDevIsVirtual, XParaPortionList::RefDevIsVirtual() and the call to XParaPortionList::RefDevIsVirtual() in editeng/source/editeng/impedit4.cxx line 1174?

RefDevIsVirtual uses eRefDevType. Please see the constructor of
XParaPortionList. And GetOutDevType is non-virtual inline, so I would guess
RefDevIsVirtual could just use that, instead of copying the value. meOutDevType
is const, so no really need for a copy. I doubt it's performance-sensitive and
the code has been in the "initial import" git commit in 2000.

Quite probably it's the same for GetRefMapMode, but that isn't const, so
something might try to test the value against the OutputDevice one to detect
changes and handle that. I doubt it, but that needs to be checked.

>   2.  In editeng/source/editeng/impedit2.cxx it is required to cast an OutputDevice* to a vcl::PDFWriterImpl* to know the real type of pOut (and test if the resulting pointer is nullptr or not). This requires to include vcl/source/gdi/pdfwriter_impl.hxx but this file is not in the common directory for inclusion. How can I include vcl/source/gdi/pdfwriter_impl.hxx?

If that is really needed, the header has to be moved to include/vcl. But as Mike
I couldn't quick-grep the code you're referring to.

I've added a comment to the bug to help people understand the task.

Otherwise I agree with Mike: please post a patch to Gerrit, preferably one that
already compiles.

Jan-Marek
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Kaganski Mike Kaganski Mike
Reply | Threaded
Open this post in threaded view
|

Re: bug 74702

In reply to this post by Kaganski Mike
Hi Adrien,

On 22.04.2019 12:43, Adrien Ollier wrote:
> sorry I meant impedit3.cxx, lines 2805 and 2806.
>
> Ok I'll try to make some changes in gerrit.

Nice, looking forward to see it mentioned here in the thread.

Please note that answering someone's answer directly, without CCing the
mailing list, excludes the message from common discussion. E.g, consider
how this your reply didn't allow others to also know that you actually
meant impedit3, and that made others (see Jan-Marek's reply) to waste
time again. Please always reply to list, or to all, instead of private
replies.

--
Best regards,
Mike Kaganski
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice