Question about fp_TableContainer

From: Vincent Kang <vincent.abiword_at_gmail.com>
Date: Thu Aug 02 2012 - 03:14:52 CEST

Hi,

In my last implementation about Setting Table Height&Width.
I am using " m_vecProps.addOrReplaceProp("table-width", width); "
the table will update when redraw.

Another way, I also want to set the Table Height and Width at that
time that users kill focus . So I get 'fp_TableContainer' in
ap_Dialog_FormatTable. Is there a better way to get fp_TableContainer
in ap_Dialog_FormatTable? thanks

ap_Dialog_FormatTable.cpp

http://www.abisource.com/viewvc/abiword/branches/gsoc2012dialogs/src/wp/ap/xp/ap_Dialog_FormatTable.cpp?r1=31621&r2=31633
//update height & width

706 XAP_Frame *frame = XAP_App::getApp()->getLastFocussedFrame();
707 if (!frame) return;
708 FV_View * pView = static_cast<FV_View
*>(frame->getCurrentView());
709 fl_BlockLayout * pBL = pView->getCurrentBlock();
710 fl_TableLayout * pTL = static_cast<fl_TableLayout
*>(pBL->myContainingLayout());
711 fp_TableContainer * pTab =
static_cast<fp_TableContainer *>(pTL->getFirstContainer());
712 pTab->setWidth(UT_convertInchesToDimension(m_width,DIM_PT));

Vincent
Received on Thu Aug 2 03:15:01 2012

This archive was generated by hypermail 2.1.8 : Thu Aug 02 2012 - 03:15:01 CEST