Kaydet (Commit) 440e2031 authored tarafından Matúš Kukan's avatar Matúš Kukan Kaydeden (comit) Andras Timar

bnc#882627: Allow to edit spacing to contents even with no borders visible.

SfxItemSet::MergeValue changes some items from SFX_ITEM_DEFAULT state to
SFX_ITEM_SET which I think is a bug but this patch avoids the problem too.
The issue was: visible changes in some tables, after changing e.g.
borders spacing, because the cells had wrong SfxItemSet after the process.

Change-Id: I676b211e1a4a1d7341c385d63503aa740718ed5d
(cherry picked from commit b1d8df61)
Signed-off-by: 's avatarAndras Timar <andras.timar@collabora.com>
üst efec628c
......@@ -38,7 +38,7 @@ SvxFormatCellsDialog::SvxFormatCellsDialog( Window* pParent, const SfxItemSet* p
{
AddTabPage("name", RID_SVXPAGE_CHAR_NAME);
AddTabPage("effects", RID_SVXPAGE_CHAR_EFFECTS);
AddTabPage("border", RID_SVXPAGE_BORDER );
m_nBorderPageId = AddTabPage("border", RID_SVXPAGE_BORDER );
m_nAreaPageId = AddTabPage("area", RID_SVXPAGE_AREA);
}
......@@ -57,6 +57,11 @@ void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
rAreaPage.Construct();
rAreaPage.ActivatePage( mrOutAttrs );
}
else if (nId == m_nBorderPageId)
{
SvxBorderTabPage& rBorderPage = ((SvxBorderTabPage&)rPage);
rBorderPage.SetTableMode();
}
else
SfxTabDialog::PageCreated( nId, rPage );
}
......
......@@ -52,6 +52,7 @@ public:
void HideShadowControls();
virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
void SetTableMode();
protected:
virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
......
......@@ -36,6 +36,7 @@ private:
XBitmapListRef mpBitmapList;
sal_uInt16 m_nAreaPageId;
sal_uInt16 m_nBorderPageId;
protected:
virtual void Apply();
......
......@@ -1219,6 +1219,9 @@ void SvxBorderTabPage::PageCreated(const SfxAllItemSet& aSet)
HideShadowControls();
}
void SvxBorderTabPage::SetTableMode()
{
nSWMode = SW_BORDER_MODE_TABLE;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -738,7 +738,7 @@ void SvxTableController::onFormatTable( SfxRequest& rReq )
SvxBoxInfoItem aBoxInfoItem( static_cast< const SvxBoxInfoItem& >( aNewAttr.Get( SDRATTR_TABLE_BORDER_INNER ) ) );
MergeAttrFromSelectedCells(aNewAttr, false);
MergeAttrFromSelectedCells(aNewAttr, true);
FillCommonBorderAttrFromSelectedCells( aBoxItem, aBoxInfoItem );
aNewAttr.Put( aBoxItem );
aNewAttr.Put( aBoxInfoItem );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment