summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-06-03 14:11:39 +0200
committerAndras Timar <andras.timar@collabora.com>2014-06-17 12:04:19 +0200
commitb1d8df61b47e84bf0de64342556049673dd9c543 (patch)
tree9fbb38658ccb69f5c16d9672d662d45d5b6bbefb /cui
parent084358a72328d3d57760002664a1ce20e8873b62 (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
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/sdrcelldlg.cxx7
-rw-r--r--cui/source/inc/border.hxx1
-rw-r--r--cui/source/inc/sdrcelldlg.hxx1
-rw-r--r--cui/source/tabpages/border.cxx5
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 dc906dd8cbe5..e3e352b72af9 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 a9cbdd3244e9..f83eeaa584b5 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: */