On Mon, 2013-06-03 at 21:35 -0300, Olivier Hallot wrote:
Hi Caolán
I am trying to convert the paragraph drop caps tab page into the new
widgets UI, but I found a code layout that does not fit into the usual
scheme.
In other situations, the custom widget is defined in another file and
they go to the dll. But here the picture SwDropCapsPict belongs to the
same file and I don't know how to connect to the widget.
-------------------%<----------------------------
SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage(pParent,
"DropCapPage","modules/swriter/ui/dropcappage.ui", rSet),
//pPict (new SwDropCapsPict(this, SW_RES(CNT_PICT))),
bModified(sal_False),
bFormat(sal_True),
rSh(::GetActiveView()->GetWrtShell())
{
get(m_pDropCapsBox,"checkCB_SWITCH");
one thing you can do is something like....
{
get(m_pDropCapsBox,"checkCB_SWITCH");
pPict = new SwDropCapsPict(get<VclContainer>("parent_in_ui"),
WB_BORDER)
....
}
if container is a grid then use pPict->set_grid_top/left_attach to put
it into the right place
Either way you'll probably have to adapt SwDropCapsPict to have a
GetOptimalSize to return something sensible, e.g.
LogicToPixel(size_in_old_src, MapMode(MAP_APPFONT));
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.