<div dir="ltr">Hi All,<div><br></div><div>This is the most challenging hack I've done and I'm looking for some pointers. </div><div><br></div><div>I am trying to make it so that pushing "Ok" on print dialog saves the component options. This is currently done in Writer (although imperfectly) within sw -- </div>
<div><br></div><div><a href="http://opengrok.libreoffice.org/xref/core/sw/source/ui/uno/unotxdoc.cxx#2439">http://opengrok.libreoffice.org/xref/core/sw/source/ui/uno/unotxdoc.cxx#2439</a><br></div><div><br></div><div style>
Imperfectly in that the code is called too often:</div><div style><br></div><div style>a) when you open print dialog</div><div style>b) when you push ok</div><div style>c) when you change any option</div><div><br></div><div style>
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.</div><div style><br></div><div style>I am relatively sure that this has to be moved to vcl level in order for the above code to work correctly (only gets called when you push ok) and to make it so that we can set it up where every component works the same. I'm thinking here:</div>
<div style><br></div><div style><a href="http://opengrok.libreoffice.org/xref/core/vcl/source/window/printdlg.cxx#469">http://opengrok.libreoffice.org/xref/core/vcl/source/window/printdlg.cxx#469</a><br></div><div style><br>
</div><div style>looks relatively nice and cohesive.</div><div style><br></div><div style>I'm looking to find out:</div><div style><br></div><div style>a) am I on the right track (ie. is moving the code really the best way to tackle this)</div>
<div style>b) if so, pointers would be helpful, a lot of undeclared stuff happens when I make the change so I'm assuming I'm going to either have to include a bunch of hxx files from sw (not good?) or create new hxx files somewhere else that does similar things as the ones in hxx although possibly more generalized.</div>
<div style><br></div><div style><br></div><div style>Best Regards (apologies if I wasn't clear)</div><div style><br></div><div style>Joel</div><div><div><br></div>-- <br><b><font face="garamond, serif" size="4">Joel Madero</font></b><div>
<font face="garamond, serif">LibO QA Volunteer</font></div><div><font face="garamond, serif"><a href="mailto:jmadero.dev@gmail.com" target="_blank">jmadero.dev@gmail.com</a></font></div><div><br></div>
</div></div>