summaryrefslogtreecommitdiff
path: root/sc/source/ui/sidebar
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-07-05 08:53:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-07-05 13:07:30 +0100
commitc61c5a240314f1899a2160a97e00e2108104e4bd (patch)
tree402d9721d8593a21d330114af0e563b4bf46c54e /sc/source/ui/sidebar
parent54d9022c39cf6a6cd8610a49dd767583ef2ff444 (diff)
Related: #i122635# Add layouting to some sidebar panels.
(cherry picked from commit 4f9ac2af7157786ee6fba46551bd6782730d8b55) Conflicts: sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx sfx2/Package_inc.mk sfx2/inc/sfx2/sidebar/SidebarToolBox.hxx svx/source/sidebar/paragraph/ParaPropertyPanel.cxx svx/source/sidebar/text/TextPropertyPanel.hrc svx/source/sidebar/text/TextPropertyPanel.src sw/source/ui/sidebar/PagePropertyPanel.cxx Change-Id: I94bfc87c9eeddd0c39bd979dd26b11c95b1e3c72
Diffstat (limited to 'sc/source/ui/sidebar')
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx26
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.hxx2
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx17
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx2
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx15
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx2
6 files changed, 55 insertions, 9 deletions
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index d20a9060d77a..99ecfb4e0bc7 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -19,6 +19,7 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
+#include <sfx2/sidebar/Layouter.hxx>
#include <AlignmentPropertyPanel.hxx>
#include <editeng/justifyitem.hxx>
#include <svx/dialmgr.hxx>
@@ -33,6 +34,7 @@
using namespace css;
using namespace cssu;
+using ::sfx2::sidebar::Layouter;
using ::sfx2::sidebar::ControlFactory;
const char UNO_ALIGNBLOCK[] = ".uno:AlignBlock";
@@ -86,6 +88,13 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
mpFTLeftIndent->SetBackground(Wallpaper());
mpFtRotate->SetBackground(Wallpaper());
+
+ Layouter::PrepareForLayouting(*mpFTLeftIndent);
+ Layouter::PrepareForLayouting(*mpFtRotate);
+ Layouter::PrepareForLayouting(*mpCBXWrapText);
+ Layouter::PrepareForLayouting(*mpCBXMergeCell);
+ Layouter::PrepareForLayouting(*mpCbStacked);
+
}
//////////////////////////////////////////////////////////////////////////////
@@ -611,10 +620,17 @@ void AlignmentPropertyPanel::UpdateVerAlign()
}
}
-//////////////////////////////////////////////////////////////////////////////
-// namespace close
-}} // end of namespace ::sc::sidebar
-//////////////////////////////////////////////////////////////////////////////
-// eof
+
+void AlignmentPropertyPanel::Resize (void)
+{
+ const sal_Int32 nRight (GetSizePixel().Width() - Layouter::MapWidth(*this, TB_BORDER));
+ Layouter::SetRight(*mpFtRotate, nRight);
+ Layouter::SetRight(*mpCBXWrapText, nRight);
+ Layouter::SetRight(*mpCBXMergeCell, nRight);
+ Layouter::SetRight(*mpCbStacked, nRight);
+}
+
+
+}} // end of namespace ::sc::sidebar
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
index 476633e4cff9..4a90a87e2a98 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
@@ -58,6 +58,8 @@ public:
SfxBindings* GetBindings();
+ virtual void Resize (void);
+
private:
//ui controls
ToolBox* mpTBHorizontal;
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 332b72d884c4..fcf526424bfe 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -19,6 +19,7 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
+#include <sfx2/sidebar/Layouter.hxx>
#include <CellAppearancePropertyPanel.hxx>
#include <CellAppearancePropertyPanel.hrc>
#include "sc.hrc"
@@ -44,6 +45,8 @@
using namespace css;
using namespace cssu;
+using ::sfx2::sidebar::Layouter;
+
const char UNO_BACKGROUNDCOLOR[] = ".uno:BackgroundColor";
const char UNO_SETBORDERSTYLE[] = ".uno:SetBorderStyle";
@@ -829,8 +832,18 @@ void CellAppearancePropertyPanel::UpdateControlState()
}
}
-//////////////////////////////////////////////////////////////////////////////
-// namespace close
+
+
+
+void CellAppearancePropertyPanel::Resize (void)
+{
+ const sal_Int32 nRight (GetSizePixel().Width() - Layouter::MapWidth(*this, TB_BORDER));
+ Layouter::SetRight(*mpFTFillColor, nRight);
+ Layouter::SetRight(*mpFTCellBorder, nRight);
+ Layouter::SetRight(*mpCBXShowGrid, nRight);
+}
+
+
}} // end of namespace ::sc::sidebar
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
index 5791ba7ec7b9..a8dabba2bb2d 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
@@ -66,6 +66,8 @@ public:
SfxBindings* GetBindings();
+ virtual void Resize (void);
+
private:
//ui controls
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 7e9983ad8fec..de9c728442aa 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -18,6 +18,7 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
+#include <sfx2/sidebar/Layouter.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <NumberFormatPropertyPanel.hxx>
#include "sc.hrc"
@@ -34,6 +35,7 @@
using namespace css;
using namespace cssu;
+using ::sfx2::sidebar::Layouter;
using ::sfx2::sidebar::Theme;
const char UNO_NUMERICFIELD[] = ".uno:NumericField";
@@ -351,8 +353,17 @@ SfxBindings* NumberFormatPropertyPanel::GetBindings()
return mpBindings;
}
-//////////////////////////////////////////////////////////////////////////////
-// namespace close
+
+
+
+void NumberFormatPropertyPanel::Resize (void)
+{
+ const sal_Int32 nRight (GetSizePixel().Width() - Layouter::MapWidth(*this, TB_BORDER));
+ Layouter::SetRight(*mpFtCategory, nRight);
+ Layouter::SetRight(*mpFtLeadZeroes, nRight);
+ Layouter::SetRight(*mpBtnNegRed, nRight);
+ Layouter::SetRight(*mpBtnThousand, nRight);
+}
}} // end of namespace ::sc::sidebar
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
index 6bc898f462b9..01bc074ae14b 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
@@ -55,6 +55,8 @@ public:
SfxBindings* GetBindings();
+ virtual void Resize (void);
+
private:
//ui controls
ListBox* mpLbCategory;