diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-06-03 14:11:39 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-06-17 12:15:14 +0200 |
commit | 440e2031ce8cffc8dc573e359a330236f9c11dfb (patch) | |
tree | b05eb475c2a31412e6a56084b4a2fc18520f8bd6 /cui | |
parent | efec628c96470eba450bf43e0d5507a49c329c12 (diff) |
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 b1d8df61b47e84bf0de64342556049673dd9c543)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/sdrcelldlg.cxx | 7 | ||||
-rw-r--r-- | cui/source/inc/border.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/sdrcelldlg.hxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/border.cxx | 5 |
4 files changed, 12 insertions, 2 deletions
diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx index 79f924902e42..400e9a834021 100644 --- a/cui/source/dialogs/sdrcelldlg.cxx +++ b/cui/source/dialogs/sdrcelldlg.cxx @@ -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 ); } diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index a8eb384753ff..eec484f48d63 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -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; diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx index 9aafbabbfe06..bcae0d840c38 100644 --- a/cui/source/inc/sdrcelldlg.hxx +++ b/cui/source/inc/sdrcelldlg.hxx @@ -36,6 +36,7 @@ private: XBitmapListRef mpBitmapList; sal_uInt16 m_nAreaPageId; + sal_uInt16 m_nBorderPageId; protected: virtual void Apply(); diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 476b7b3e5b40..6e9e7783c443 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -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: */ |