<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px">Hi All!</span><br></div><div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div><span style="font-family:arial;font-size:small">I'm working on converting the palette popup window (</span><b>SvxColorWindow_Impl</b>, looks like this in my branch right now: <a href="http://i.imgur.com/4XAbRaH.png" target="_blank">http://i.imgur.com/4XAbRaH.png</a><span style="font-family:arial;font-size:small">) to use the widget layout, and I kind of got it working. It places the widgets based on a .ui file, but a <b>ComboBox</b> makes LO crash at the slightest provocation.</span></div>
<div><br></div><div><div style="font-size:13px;font-family:arial,sans-serif"><span style="font-family:arial;font-size:small">To make <b>SvxColorWindow_Impl</b> use the widget layout, I did some research, and I drew this inheritance diagram: </span><a href="http://i.imgur.com/KK2GegK.jpg" style="font-family:arial;font-size:small" target="_blank">http://i.imgur.com/KK2GegK.jpg</a></div>
<div style="font-size:13px;font-family:arial,sans-serif">I made <b>FloatingWindow</b> also inherit from <b>VclBuilderContainer</b>, like <b>Dialog</b>, and added new ctors to <b>FloatingWindow</b> and <b>SfxPopupWindow</b>, that take two extra string parameters for the .ui file location and the id of the root widget.</div>
<div style="font-size:13px;font-family:arial,sans-serif"><span style="font-family:arial;font-size:small">I hardcoded the .ui path for <b>SvxColorWindow_Impl</b> in its ctor, since it's supposed to be a leaf in the inheritance tree.</span><br>
</div><div>I also copypasted <b>GetOptimalSize</b>, <b>SetPosSizePixel</b>, <b>SetSizePixel</b> and <b>SetPosPixel</b> from <b>TabPage</b> to <b>FloatingWindow</b>.</div></div><div>This made the popup window show up, if I disabled parts of the code that called methods on the <b>ComboBox</b>.<br>
</div><div><span style="font-family:arial;font-size:small"><br>
</span></div><div><span style="font-family:arial;font-size:small">The <b>ComboBox</b> is initialized with <b>get</b>, as all other widgets.</span></div><div><span style="font-family:arial;font-size:small">I found that <b>mpFloatWin</b> in <b>ComboBox</b> gets set to <b>0xcccccccccccccccc</b>, so I think it's not initialized properly. (I'm giving <b>get</b> the correct id from the .ui, so that's not it.)</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">If I call either </span><b><span style="font-family:arial,sans-serif;font-size:13px">AdaptDropDownLineCountToMaximu</span></b><span style="font-family:arial,sans-serif;font-size:13px"><b>m</b> or <b>InsertEntry</b> in the ctor of </span><b>SvxColorWindow_Impl</b>, LO crashes immediately when the popup window is opened.<br>
</div><div style="font-family:arial,sans-serif;font-size:13px"><div style="font-family:arial;font-size:small">Are there any well known/typical reasons why this would happen?</div><div><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">
If anyone has any insights, please share them! Thank you!<font face="arial, sans-serif"><br>
</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font face="arial, sans-serif"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font face="arial, sans-serif">All the best,</font></div>
<div style="font-family:arial,sans-serif;font-size:13px"><font face="arial, sans-serif">Krisztian</font></div></div></div>