Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On Sat, 2013-03-09 at 20:15 -0300, Olivier Hallot wrote:
Em 09-03-2013 17:44, Olivier Hallot escreveu:
I am a bit lost on how to handle the following

 maOrientHlp     ( maCtrlDial, maNfRotate, maCbStacked ),

in line 174 of
http://opengrok.libreoffice.org/xref/core/cui/source/tabpages/align.cxx

given that the arguments are now pointers (e.g. *m_pCtrlDial)

How should I change this to get the ctor working?

Easiest thing to do here is to delay creating the OrientationHelper
until you've got all the data it needs to initialize, i.e. to change 

OrientationHelper maOrientHlp;
to
OrientationHelper* m_pOrientHlp;
in the header

and in the AlignmentTabPage ctor change

AlignmentTabPage::AlignmentTabPage(...)
...
  maOrientHlp     ( maCtrlDial, maNfRotate, maCbStacked ),
...

to

AlignmentTabPage::AlignmentTabPage(...)
...
{
    get(m_pCtrlDial, ...)
    get(m_pNfRotate, ...)
    get(m_pCbStacked,...)
+   m_pOrientHlp = new OrientationHelper(*m_pCtrlDial, *m_pNfRotate,
+       *m_pCbStacked);
}

and in the dtor don't forget to delete it

{
+    delete m_pOrientHlp;
}

with the corresponding maOrientHlp. -> m_pOrientHlp-> and maOrientHlp ->
*m_pOrientHlp changes.

C.


Context


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.