Re: DialControl widget

2013-03-12 Thread Caolán McNamara
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.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: DialControl widget

2013-03-09 Thread Olivier Hallot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Caolán

Em 05-03-2013 13:05, Caolán McNamara escreveu:
 On Tue, 2013-03-05 at 11:57 -0300, Olivier Hallot wrote:
 Actually I meant: What parent gtk widget should I use? GtkSpin?
 
 Oh right, for the glade placeholder. Doesn't really matter I suppose,
 nothing is a good fit. Maybe a GtkSpinner just because that's round as
 well :-), otherwise a GtkDrawingArea.
 
 C.
 

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?

Thank you

- -- 
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
The Document Foundation, Zimmerstr. 69, 10117 Berlin, Germany
Fundação responsável civilmente, de acordo com o direito civil
Detalhes Legais: http://www.documentfoundation.org/imprint
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJRO58hAAoJEJp3R7nH3vLxPywH/2zYRovGomMqaVEzmU/BsAt6
HNeMR0gTokG58npEmxWpUSQ7lkUHUDe6+ME9XiMlt75Lfa0/QWhjionD9WRyuMIf
+BvSchYDi2pbjzdCOEuEmA2TPGCFqxmBnwDAJOg8ffQavV2OrU9VCQIVCxXE6HlM
gncdpxS/Kz/gH2xsfqIG7iJhNfFgEZHnNnImqjaN/eylITTQWmwDOsQzwGtijvfR
8cGQ+JDJvPE9bWbUpXM0uQhqxAlVy43E/DcWNe/bw8ovUSx9ZR+Offg4Up1lmpMk
5xVCAylQYBLEFSqnuCtPFaGOkm4lPq8wSoaBq8F8m875flvBLcKWUqFAE1+qeEw=
=xl6W
-END PGP SIGNATURE-
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: DialControl widget

2013-03-09 Thread Olivier Hallot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



Em 09-03-2013 17:44, Olivier Hallot escreveu:
 Hi Caolán
 
 Em 05-03-2013 13:05, Caolán McNamara escreveu:
 On Tue, 2013-03-05 at 11:57 -0300, Olivier Hallot wrote:
 Actually I meant: What parent gtk widget should I use? GtkSpin?
 
 Oh right, for the glade placeholder. Doesn't really matter I suppose,
 nothing is a good fit. Maybe a GtkSpinner just because that's round as
 well :-), otherwise a GtkDrawingArea.
 
 C.
 
 
 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?
 
 Thank you

Trying to be more clear.

Actually I have this tentative: The ctor needs maOrientHlp but the
parameters may be uninitialized, right?


- -%---
AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet
rCoreAttrs ) :

SfxTabPage( pParent, CellAlignPage,cui/ui/cellalignment.ui,
rCoreAttrs ),

maOrientHlp (*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked)

{
(snip)
   get(m_pNfRotate,spinDegrees);
   get(m_pCtrlDial,dialcontrol);
   get(m_pCbStacked,checkVertStack);

(snip)
}

- -%---

I get this backtrace on a segfault:

Program received signal SIGSEGV, Segmentation fault.
0x726164ba in Window::IsEnabled (this=0x) at
/home/tdf/git/core/vcl/source/window/window2.cxx:1577
1577return !mpWindowImpl-mbDisabled;
(gdb) bt
#0  0x726164ba in Window::IsEnabled (this=0x)
at /home/tdf/git/core/vcl/source/window/window2.cxx:1577
#1  0x7fffcea070f7 in
svx::OrientationHelper_Impl::OrientationHelper_Impl (this=0x1e4c840,
rCtrlDial=..., rCbStacked=
...) at /home/tdf/git/core/svx/source/dialog/orienthelper.cxx:60
#2  0x7fffcea0757b in svx::OrientationHelper::OrientationHelper
(this=0x1dfb118, rCtrlDial=..., rNfRotation=...,
rCbStacked=...) at
/home/tdf/git/core/svx/source/dialog/orienthelper.cxx:109
#3  0x7fffc9251d25 in svx::AlignmentTabPage::AlignmentTabPage
(this=0x1dfaed0, pParent=0x1dd7dd0, rCoreAttrs=...)
at /home/tdf/git/core/cui/source/tabpages/align.cxx:174
#4  0x7fffc9252d51 in svx::AlignmentTabPage::Create
(pParent=0x1dd7dd0, rAttrSet=...)
at /home/tdf/git/core/cui/source/tabpages/align.cxx:264
#5  0x74fb74e1 in SfxTabDialog::ActivatePageHdl (this=0x1de8760,
pTabCtrl=0x1dd7dd0)
at /home/tdf/git/core/sfx2/source/dialog/tabdlg.cxx:1397






- -- 
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
The Document Foundation, Zimmerstr. 69, 10117 Berlin, Germany
Fundação responsável civilmente, de acordo com o direito civil
Detalhes Legais: http://www.documentfoundation.org/imprint
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJRO8KPAAoJEJp3R7nH3vLxiLUH/1kuCVcE0TydAEJUG8bjfdRw
QbraDwXfLTsbRSwv5GrikLrQ5KheyQwGgBQCYO91FCNPxZdgBYx4/zCT9kPE8l06
UImUWRHn3JeWi2CCzOT3JYKxFmxFdxGB+aBwv0rE0uNaxgoVkNxYxqdzvQVa7PMY
LIS0nYNnjpEaMWrQTH8VKh+8vdcvpT0v7LUp043e9H3wElpUvL7U6XrYB+g4223e
gJAsqhNWDzEqR0Ylcb/NXyY4NKlLbU1w4qSodx+dEauLClZOFbsMTYcagQU0whWd
kk/wbiQrOy6zLX5c2TUmHXj06gwa55oncI4AH65eysL16A8pSw9i623a+TEs0AU=
=rVMu
-END PGP SIGNATURE-
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: DialControl widget

2013-03-05 Thread Olivier Hallot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Em 04-03-2013 08:44, Caolán McNamara escreveu:
 On Sat, 2013-03-02 at 22:38 -0300, Olivier Hallot wrote:
 Hi Caolán, all

 what will be the gtk widget to hold DialControl? DialControl is present
 in Calc cell text alignment.
 
 It'll have to be (yet another) custom widget AFAICS, additional non
 ResId constructor and a makeDialControl entry point
 
 C.
 

Actually I meant: What parent gtk widget should I use? GtkSpin?

Thanks
- -- 
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
The Document Foundation, Zimmerstr. 69, 10117 Berlin, Germany
Fundação responsável civilmente, de acordo com o direito civil
Detalhes Legais: http://www.documentfoundation.org/imprint
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJRNgfEAAoJEJp3R7nH3vLxUkwIALO/Ku2oAhvLjZK5qbRIxE2c
XiiNRwNTW4szn35RBvZnivpbjDsRjBXwDm7UtLcDf1AENakgNi8FZ6wHjoWiyRjz
ZTdJTnjaYlIiJ6netmY1GnQ/U7bu6xdDemc8WEKOgWmuvJeYqHYk6Tvj+GicuGNJ
bqBI6ec/IHNWmo6IozsXqMETJvp89WHRzrfoa+LeqxIlKtYTFOTygs0qeeEhYhNL
uoGH7mv3Y8O/NmKKpRPcgyuL3B+0A5m5AiMybeLWzS5Zp9m3cnu/S4cSjdjlhi2V
uMXQ6HpPjr6WCM+R9+4ZYDfdgP1prwUvXRcDmYJrd4y1wwd1sF1JCQZQGhToVFk=
=spMT
-END PGP SIGNATURE-
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: DialControl widget

2013-03-05 Thread Caolán McNamara
On Tue, 2013-03-05 at 11:57 -0300, Olivier Hallot wrote:
 Actually I meant: What parent gtk widget should I use? GtkSpin?

Oh right, for the glade placeholder. Doesn't really matter I suppose,
nothing is a good fit. Maybe a GtkSpinner just because that's round as
well :-), otherwise a GtkDrawingArea.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: DialControl widget

2013-03-04 Thread Caolán McNamara
On Sat, 2013-03-02 at 22:38 -0300, Olivier Hallot wrote:
 Hi Caolán, all
 
 what will be the gtk widget to hold DialControl? DialControl is present
 in Calc cell text alignment.

It'll have to be (yet another) custom widget AFAICS, additional non
ResId constructor and a makeDialControl entry point

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


DialControl widget

2013-03-02 Thread Olivier Hallot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Caolán, all

what will be the gtk widget to hold DialControl? DialControl is present
in Calc cell text alignment.

Thank you
- -- 
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
The Document Foundation, Zimmerstr. 69, 10117 Berlin, Germany
Fundação responsável civilmente, de acordo com o direito civil
Detalhes Legais: http://www.documentfoundation.org/imprint
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJRMql9AAoJEJp3R7nH3vLxUMAH/izTCkLpkhA2474PeD1/xPyy
pF+OmloYVuALK100N6CIcXKBxHf9ovpaR8Oy8PDE1/Rd1w6Vg6fkCRVTYqO6MG7Y
s2CTg9W/ZAGDpXtvskjLoUn8AariLWZ7W6OYPprfvT3PEzeeNEBlgJtwaMKJQqZt
rKNlVtPxQpuViIVQKnflJ9vuG06FCRh3Jac/moySoencNUiK0rzoHYmhtbJuYo20
Brz20eqJ6kqrOs3CY50FLy2bT39RpqJQtH79Ok2G4owZDomDIhqUR/kqdT82RE2X
B4sAG/euG//VKflbDoaNXKgeccGS2Ms1smzHf/RZW9bPUSoFRhipZhsp3fbeuB8=
=QC+o
-END PGP SIGNATURE-
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice