Moving Code From /core/sw... to /core/vcl

Jan Holesovsky kendy at suse.cz
Mon Feb 4 02:18:26 PST 2013


Hi Joel,

Joel Madero píše v Út 29. 01. 2013 v 09:19 -0800:


> This is the most challenging hack I've done and I'm looking for some
> pointers. 

So - I tried to have a look, see my comments below, but Caolan will be
able to give you a better advice, I'm sure :-)

> So the option gets saved on pushing the radio button vs. when you push
> ok -- leading it to be that pushing Cancel on print dialog doesn't
> discard changes.

There is definitely lots of encapsulation breaking in unotxdoc.cxx ;-) -
but instead of moving to vcl/, I think it would be better to move the
code responsible for saving the settings to SwPrintUIOptions
(sw/inc/printdata.hxx, sw/source/core/view/printdata.cxx).

If you make it virtual, derived from a virtual method you would add to
PrinterOptionsHelper, you could add its call where it is necessary in
vcl/source/gdi/print3.cxx (as a call to PrinterOptionsHelper method, but
thanks to being virtual, the SwPrintUIOptions version would be called
accordingly).  Does this make sense, or you already tried, and already
failed from some reason I don't see quickly?

The code responsible for all this seems unnecessarily complicated to me,
so I am sorry if my quick read is actually misleading - but in general,
you don't want to move parts of sw/ to vcl, more so if it meant
including headers from sw in vcl.

Thanks for working on this! :-)

All the best,
Kendy



More information about the LibreOffice mailing list