So to close bug #74702, we require to keep the real type of any OutputDevice* a function gets as
argument.
If we are in a function g(OutputDevice*), we must rewind to its caller f(OutputDevice*), and so on
until a(OutputDevice*) which is called after creation of an instance of a subclass of OutputDevice.
As you understand, it is very hard because there are many and many functions to modify and to
rewind to get the real type of the OutputDevice* (OutputDevice subclass) that was passed as
parameter.
An alternative is to use dynamic_cast and test the result. This solution does not require so much
changes but is less elegant and efficient.
Community, which solution do you prefer?
I could try the first solution but to do so I need you to understand that keeping the real type of
an object is crucial, essential. And to get this achevied, I need your cooperation for modifying
functions that do not return the real type of an newly created object into a function that returns
the real type of the object.
Example is OutputDevice* Application::GetDefaultDevice() which calls ImplGetDefaultWindow() which
returns a vcl::Window*.
Application::GetDefaultDevice should return a vcl::Window* so that functions that act differently
for Windows can be used instead of functions that take any OutputDevice but that are in trouble
when they require to do something special with Windows.
I hope that all of you understand that it is important you to know this information so that you do
not break all my work.
Best regards,
Adrien Ollier
Context
- tdf#74702 2/2 · Adrien Ollier
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.