Sorry!
My mail editor works bad.It's difficult to make the mail easy to read.
I send the mail again.
----------------------------------------------------------------------------
Hello!
I'm chensuchun.I need some help and advices.
When a table is formated with thick lines around the table and thin lines
insidethe table, if you ask OO.o to add a row at the end of the table it's
createdwith a thick line between it and the rest of the table instead of
respecting the"thick lines around the table, thin lines inside" rule.
I want to fix it as "thick lines around the table ,thin lines inside"after
insert rows at the end of the table,but I find it is difficult to get
SvxBoxInfoItem of the table in function BOOL lcl_CopyCol( const _FndBox*&
rpFndBox, void* pPara ).
so I modify the insert-operation source code (in file
sw/source/ui/shells/tabsh.cxx) as following:
case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{
///-->get the SvxBoxInfoItem of the table before insert
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
::lcl_TableParamToItemSet( aCoreSet, rSh );
SvxBoxInfoItem aBoxInfo((const SvxBoxInfoItem&)
aCoreSet.Get(SID_ATTR_BORDER_INNER));
///<--End
///do the insert operation
BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
USHORT nCount = 0;
BOOL bAfter = TRUE;
if (pItem)
{
nCount = ((const SfxInt16Item* )pItem)->GetValue();
if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE,
&pItem))
bAfter = ((const SfxBoolItem* )pItem)->GetValue();
}
else if( !rReq.IsAPI() )
++nCount;
if( nCount )
{
if( bColumn )
rSh.InsertCol( nCount, bAfter );
else if ( !rSh.IsInRepeatedHeadline() )
rSh.InsertRow( nCount, bAfter );
bCallDone = TRUE;
///-->after inserting,reset the table border according to the
SvxBoxInfoItem
/// get before
SfxItemSet aSet( GetPool(), RES_BOX, RES_BOX,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
0);
aSet.Put( aBoxInfo );
ItemSetToTableParam( aSet, rSh );
///<--
break;
}
nSlot = bColumn ? FN_TABLE_INSERT_COL_DLG : FN_TABLE_INSERT_ROW_DLG;
}
Is this modification right,or it would cause other problem or affect other
operation?How to solve this problem if the modification is wrong ?
Thanks for help or advices!
Kind regards!
chensuchun
-------------------------------------------------------------------
惠普商用台式机dc5750,高性能,低功耗!(
http://ad4.sina.com.cn/sina/limeng3/mail_zhuiyu/2006/mail_zhuiyu_20061225.html )
===================================================================
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )