[Libreoffice-commits] core.git: 5 commits - sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk vcl/source
Jan Holesovsky
kendy at suse.cz
Sun Jun 16 12:32:07 PDT 2013
sw/UIConfig_swriter.mk | 1
sw/inc/rcid.hrc | 5
sw/source/ui/sidebar/PagePropertyPanel.cxx | 128 +++-----
sw/source/ui/sidebar/PagePropertyPanel.hrc | 107 +++---
sw/source/ui/sidebar/PagePropertyPanel.hxx | 19 -
sw/source/ui/sidebar/PagePropertyPanel.src | 459 ++++++++++-------------------
sw/uiconfig/swriter/ui/sidebarpage.ui | 148 +++++++++
vcl/source/window/builder.cxx | 20 +
8 files changed, 445 insertions(+), 442 deletions(-)
New commits:
commit 4043d6633b2fbced4dacafdafc6467508c293f7e
Author: Jan Holesovsky <kendy at suse.cz>
Date: Sun Jun 16 21:30:15 2013 +0200
sidebar: More focused tooltip text.
Change-Id: I92d5d82e1955f46ef1137d46956af43e5921d149
diff --git a/sw/uiconfig/swriter/ui/sidebarpage.ui b/sw/uiconfig/swriter/ui/sidebarpage.ui
index bcd766d..530e135 100644
--- a/sw/uiconfig/swriter/ui/sidebarpage.ui
+++ b/sw/uiconfig/swriter/ui/sidebarpage.ui
@@ -49,7 +49,6 @@
<object class="GtkToolbar" id="selectsize">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Size</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkMenuToolButton" id="size">
@@ -57,8 +56,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Select a predefined paper size for the current page style.</property>
- <property name="tooltip_text" translatable="yes">Select a predefined paper size for the current page style.</property>
+ <property name="tooltip_text" translatable="yes">Size</property>
<property name="use_action_appearance">False</property>
<property name="action_name">.uno:Size</property>
<property name="label" translatable="yes">toolbutton3</property>
@@ -112,7 +110,6 @@
<object class="GtkToolbar" id="selectmargin">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Margin</property>
<property name="halign">center</property>
<child>
<object class="GtkMenuToolButton" id="margin">
@@ -120,8 +117,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Select the margin values for the current page style.</property>
- <property name="tooltip_text" translatable="yes">Select the margin values for the current page style.</property>
+ <property name="tooltip_text" translatable="yes">Margin</property>
<property name="use_action_appearance">False</property>
<property name="action_name">.uno:Margin</property>
<property name="label" translatable="yes">toolbutton2</property>
commit 1abcfd8a9e5e0b4829c04cfea055a21021ca2ab1
Author: Jan Holesovsky <kendy at suse.cz>
Date: Sun Jun 16 21:26:29 2013 +0200
widget layout: Honor explicitly set tooltip text for toolbox items.
Change-Id: I067abb53783655dddc2130aa126dd032c803d58d
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 7d44293..542c4c5 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -652,6 +652,20 @@ namespace
return Size(sWidthRequest.toInt32(), sHeightRequest.toInt32());
}
+ OString extractTooltipText(VclBuilder::stringmap &rMap)
+ {
+ OString sTooltipText;
+ VclBuilder::stringmap::iterator aFind = rMap.find(OString("tooltip-text"));
+ if (aFind == rMap.end())
+ aFind = rMap.find(OString("tooltip-markup"));
+ if (aFind != rMap.end())
+ {
+ sTooltipText = aFind->second;
+ rMap.erase(aFind);
+ }
+ return sTooltipText;
+ }
+
Window * extractStockAndBuildPushButton(Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nBits = WB_CENTER|WB_VCENTER|WB_3DLOOK;
@@ -1272,14 +1286,20 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
if (pToolBox)
{
OUString aCommand(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8));
+ OUString aTooltip(OStringToOUString(extractTooltipText(rMap), RTL_TEXTENCODING_UTF8));
ToolBoxItemBits nBits = 0;
if (name == "GtkMenuToolButton")
nBits |= TIB_DROPDOWN;
if (!aCommand.isEmpty())
+ {
pToolBox->InsertItem(aCommand, m_xFrame, nBits, extractSizeRequest(rMap));
+ if (!aTooltip.isEmpty())
+ pToolBox->SetQuickHelpText(pToolBox->GetItemId(aCommand), aTooltip);
+ }
+
return NULL; // no widget to be created
}
}
commit 8eb89bc4becd2abb47eefbe26ecfd029df043538
Author: Jan Holesovsky <kendy at suse.cz>
Date: Sun Jun 16 19:41:46 2013 +0200
sidebar: Make the Page panel more minimalistic.
Change-Id: Ic0a731142efc57ad0b6ba450188fff4108867f92
diff --git a/sw/uiconfig/swriter/ui/sidebarpage.ui b/sw/uiconfig/swriter/ui/sidebarpage.ui
index c92b5a4..bcd766d 100644
--- a/sw/uiconfig/swriter/ui/sidebarpage.ui
+++ b/sw/uiconfig/swriter/ui/sidebarpage.ui
@@ -14,111 +14,59 @@
<property name="border_width">6</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
+ <property name="column_homogeneous">True</property>
<child>
- <object class="GtkBox" id="box6">
+ <object class="GtkToolbar" id="selectorientation">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="halign">center</property>
<child>
- <object class="GtkLabel" id="columnlabel">
+ <object class="GtkMenuToolButton" id="orientation">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Column:</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Orientation</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:Orientation</property>
+ <property name="label" translatable="yes">toolbutton1</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectcolumn">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="show_arrow">False</property>
- <child>
- <object class="GtkMenuToolButton" id="column">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Select the layout and the number of columns for the current page style.</property>
- <property name="tooltip_text" translatable="yes">Select the layout and the number of columns for the current page style.</property>
- <property name="use_action_appearance">False</property>
- <property name="action_name">.uno:Column</property>
- <property name="label" translatable="yes">toolbutton4</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">1</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box2">
+ <object class="GtkToolbar" id="selectsize">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="tooltip_text" translatable="yes">Size</property>
+ <property name="show_arrow">False</property>
<child>
- <object class="GtkLabel" id="orientationlabel">
+ <object class="GtkMenuToolButton" id="size">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Orientation:</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Select a predefined paper size for the current page style.</property>
+ <property name="tooltip_text" translatable="yes">Select a predefined paper size for the current page style.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:Size</property>
+ <property name="label" translatable="yes">toolbutton3</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectorientation">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuToolButton" id="orientation">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Select the paper orientation - vertically (portrait) or horizontally (landscape) - for the current page style.</property>
- <property name="tooltip_text" translatable="yes">Select the paper orientation - vertically (portrait) or horizontally (landscape) - for the current page style.</property>
- <property name="use_action_appearance">False</property>
- <property name="action_name">.uno:Orientation</property>
- <property name="label" translatable="yes">toolbutton1</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
@@ -130,109 +78,58 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box5">
+ <object class="GtkToolbar" id="selectcolumn">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="halign">end</property>
+ <property name="show_arrow">False</property>
<child>
- <object class="GtkLabel" id="sizelabel">
+ <object class="GtkMenuToolButton" id="column">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Size:</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Columns</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:Column</property>
+ <property name="label" translatable="yes">toolbutton4</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectsize">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuToolButton" id="size">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Select a predefined paper size for the current page style.</property>
- <property name="tooltip_text" translatable="yes">Select a predefined paper size for the current page style.</property>
- <property name="use_action_appearance">False</property>
- <property name="action_name">.uno:Size</property>
- <property name="label" translatable="yes">toolbutton3</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left_attach">3</property>
+ <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box1">
+ <object class="GtkToolbar" id="selectmargin">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="tooltip_text" translatable="yes">Margin</property>
+ <property name="halign">center</property>
<child>
- <object class="GtkLabel" id="marginlabel">
+ <object class="GtkMenuToolButton" id="margin">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Margin:</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Select the margin values for the current page style.</property>
+ <property name="tooltip_text" translatable="yes">Select the margin values for the current page style.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:Margin</property>
+ <property name="label" translatable="yes">toolbutton2</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectmargin">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuToolButton" id="margin">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Select the margin values for the current page style.</property>
- <property name="tooltip_text" translatable="yes">Select the margin values for the current page style.</property>
- <property name="use_action_appearance">False</property>
- <property name="action_name">.uno:Margin</property>
- <property name="label" translatable="yes">toolbutton2</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
@@ -243,22 +140,6 @@
<property name="height">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="left_attach">0</property>
commit 2825635ddc5be6b1d71ec30abe6fab73ada6b3a0
Author: Jan Holesovsky <kendy at suse.cz>
Date: Sun Jun 16 19:13:36 2013 +0200
sidebar: Make the Page panel resizable.
Change-Id: I5f700c085d8a53f38e3d548d1d9fcad9090bd6b8
diff --git a/sw/uiconfig/swriter/ui/sidebarpage.ui b/sw/uiconfig/swriter/ui/sidebarpage.ui
index 05fd516..c92b5a4 100644
--- a/sw/uiconfig/swriter/ui/sidebarpage.ui
+++ b/sw/uiconfig/swriter/ui/sidebarpage.ui
@@ -7,234 +7,256 @@
<property name="row_homogeneous">True</property>
<property name="column_homogeneous">True</property>
<child>
- <object class="GtkBox" id="box1">
+ <object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkBox" id="box6">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkBox" id="box2">
+ <object class="GtkLabel" id="columnlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_bottom">30</property>
- <property name="orientation">vertical</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Column:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="selectcolumn">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_arrow">False</property>
<child>
- <object class="GtkLabel" id="orientationlabel">
+ <object class="GtkMenuToolButton" id="column">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_right">23</property>
- <property name="label" translatable="yes">_Orientation:</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Select the layout and the number of columns for the current page style.</property>
+ <property name="tooltip_text" translatable="yes">Select the layout and the number of columns for the current page style.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:Column</property>
+ <property name="label" translatable="yes">toolbutton4</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectorientation">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuToolButton" id="orientation">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Select the paper orientation - vertically (portrait) or horizontally (landscape) - for the current page style.</property>
- <property name="action_name">.uno:Orientation</property>
- <property name="label" translatable="yes">toolbutton1</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkBox" id="box3">
+ <object class="GtkLabel" id="orientationlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Orientation:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="selectorientation">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_bottom">30</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkLabel" id="marginlabel">
+ <object class="GtkMenuToolButton" id="orientation">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_right">37</property>
- <property name="label" translatable="yes">_Margin:</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Select the paper orientation - vertically (portrait) or horizontally (landscape) - for the current page style.</property>
+ <property name="tooltip_text" translatable="yes">Select the paper orientation - vertically (portrait) or horizontally (landscape) - for the current page style.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:Orientation</property>
+ <property name="label" translatable="yes">toolbutton1</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectmargin">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuToolButton" id="margin">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Select the margin values for the current page style.</property>
- <property name="action_name">.uno:Margin</property>
- <property name="label" translatable="yes">toolbutton2</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="sizelabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Size:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box5">
+ <object class="GtkToolbar" id="selectsize">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkLabel" id="sizelabel">
+ <object class="GtkMenuToolButton" id="size">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_right">67</property>
- <property name="label" translatable="yes">_Size:</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Select a predefined paper size for the current page style.</property>
+ <property name="tooltip_text" translatable="yes">Select a predefined paper size for the current page style.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:Size</property>
+ <property name="label" translatable="yes">toolbutton3</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectsize">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuToolButton" id="size">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Select a predefined paper size for the current page style.</property>
- <property name="margin_bottom">25</property>
- <property name="action_name">.uno:Size</property>
- <property name="label" translatable="yes">toolbutton3</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkBox" id="box6">
+ <object class="GtkLabel" id="marginlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Margin:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="selectmargin">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkLabel" id="columnlabel">
+ <object class="GtkMenuToolButton" id="margin">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_right">30</property>
- <property name="label" translatable="yes">_Column:</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Select the margin values for the current page style.</property>
+ <property name="tooltip_text" translatable="yes">Select the margin values for the current page style.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:Margin</property>
+ <property name="label" translatable="yes">toolbutton2</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectcolumn">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuToolButton" id="column">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Select the layout and the number of columns for the current page style.</property>
- <property name="margin_right">15</property>
- <property name="margin_bottom">25</property>
- <property name="action_name">.uno:Column</property>
- <property name="label" translatable="yes">toolbutton4</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
</object>
commit 0813006e76880e78200cad47baefb5b70d9b21e8
Author: Prashant Pandey <prashant3.yishu at gmail.com>
Date: Sun Jun 16 18:28:03 2013 +0200
sidebar: Conversion to .ui for Page property panel.
Change-Id: Ie05831a6d4958b3bcef666454a4c02dfc5288fe2
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 7cf200e..a5e5101 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -109,6 +109,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/renameobjectdialog \
sw/uiconfig/swriter/ui/rowheight \
sw/uiconfig/swriter/ui/saveashtmldialog \
+ sw/uiconfig/swriter/ui/sidebarpage \
sw/uiconfig/swriter/ui/sortdialog \
sw/uiconfig/swriter/ui/splittable \
sw/uiconfig/swriter/ui/statisticsinfopage \
diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc
index 78fa83a..c841e2c 100644
--- a/sw/inc/rcid.hrc
+++ b/sw/inc/rcid.hrc
@@ -71,6 +71,7 @@
#define RC_ANNOTATION (RC_BASE + 4150)
#define RC_PAGEFRM (RC_BASE + 4250)
#define RC_IDXTXT (RC_BASE + 4350)
+#define RC_SIDEBAR (RC_BASE + 4450)
/*--------------------------------------------------------------------
Description: areas unharness
@@ -259,6 +260,10 @@
// property panel
#define RC_PROPERTYPANEL_BEGIN RC_PROPERTYPANEL
#define RC_PROPERTYPANEL_END (RC_PROPERTYPANEL + 10)
+
+// sidebar (mostly the Page one)
+#define RC_SIDEBAR_BEGIN RC_SIDEBAR
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/sidebar/PagePropertyPanel.cxx b/sw/source/ui/sidebar/PagePropertyPanel.cxx
index 8dc4d28..5c14cf9 100644
--- a/sw/source/ui/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/ui/sidebar/PagePropertyPanel.cxx
@@ -49,6 +49,11 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/document/XUndoManagerSupplier.hpp>
+const char UNO_ORIENTATION[] = ".uno:Orientation";
+const char UNO_MARGIN[] = ".uno:Margin";
+const char UNO_SIZE[] = ".uno:Size";
+const char UNO_COLUMN[] = ".uno:Column";
+
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
namespace {
@@ -98,21 +103,9 @@ PagePropertyPanel::PagePropertyPanel(
Window* pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
- : Control(pParent, SW_RES(RID_PROPERTYPANEL_SWPAGE))
+ : PanelLayout(pParent, "PagePropertyPanel", "modules/swriter/ui/sidebarpage.ui", rxFrame)
, mpBindings(pBindings)
- // visible controls
- , maFtOrientation( this, SW_RES(FT_ORIENTATION) )
- , mpToolBoxOrientationBackground( ::sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this) )
- , mpToolBoxOrientation( ::sfx2::sidebar::ControlFactory::CreateToolBox( mpToolBoxOrientationBackground.get(), SW_RES(TB_ORIENTATION)) )
- , maFtMargin( this, SW_RES(FT_MARGIN) )
- , mpToolBoxMarginBackground( ::sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this) )
- , mpToolBoxMargin( ::sfx2::sidebar::ControlFactory::CreateToolBox( mpToolBoxMarginBackground.get(), SW_RES(TB_MARGIN)) )
- , maFtSize( this, SW_RES(FT_SIZE) )
- , mpToolBoxSizeBackground( ::sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this) )
- , mpToolBoxSize( ::sfx2::sidebar::ControlFactory::CreateToolBox( mpToolBoxSizeBackground.get(), SW_RES(TB_SIZE)) )
- , maFtColumn( this, SW_RES(FT_COLUMN) )
- , mpToolBoxColumnBackground( ::sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this) )
- , mpToolBoxColumn( ::sfx2::sidebar::ControlFactory::CreateToolBox( mpToolBoxColumnBackground.get(), SW_RES(TB_COLUMN)) )
+
// image resources
, maImgSize (NULL)
, maImgSize_L (NULL)
@@ -193,68 +186,47 @@ PagePropertyPanel::PagePropertyPanel(
, mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify( false )
{
+ // visible controls
+ get(mpToolBoxOrientation, "selectorientation");
+ get(mpToolBoxMargin, "selectmargin");
+ get(mpToolBoxSize, "selectsize");
+ get(mpToolBoxColumn, "selectcolumn");
+
Initialize();
mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify = true;
- FreeResource();
}
PagePropertyPanel::~PagePropertyPanel()
{
delete[] maImgSize;
delete[] maImgSize_L;
-
- // destroy the toolbox windows.
- mpToolBoxOrientation.reset();
- mpToolBoxMargin.reset();
- mpToolBoxSize.reset();
- mpToolBoxColumn.reset();
-
- // destroy the background windows of the toolboxes.
- mpToolBoxOrientationBackground.reset();
- mpToolBoxMarginBackground.reset();
- mpToolBoxSizeBackground.reset();
- mpToolBoxColumnBackground.reset();
}
void PagePropertyPanel::Initialize()
{
- maFtOrientation.SetBackground(Wallpaper());
- maFtMargin.SetBackground(Wallpaper());
- maFtSize.SetBackground(Wallpaper());
- maFtColumn.SetBackground(Wallpaper());
-
// popup for page orientation
+ const sal_uInt16 nIdOrientation = mpToolBoxOrientation->GetItemId(UNO_ORIENTATION);
Link aLink = LINK( this, PagePropertyPanel, ClickOrientationHdl );
mpToolBoxOrientation->SetDropdownClickHdl( aLink );
mpToolBoxOrientation->SetSelectHdl( aLink );
- mpToolBoxOrientation->SetItemImage( TBI_ORIENTATION, mImgPortrait);
- mpToolBoxOrientation->SetItemBits( TBI_ORIENTATION, mpToolBoxOrientation->GetItemBits( TBI_ORIENTATION ) | TIB_DROPDOWNONLY );
- mpToolBoxOrientation->SetQuickHelpText(TBI_ORIENTATION,String(SW_RES(STR_QHELP_TB_ORIENTATION)));
- mpToolBoxOrientation->SetOutputSizePixel( mpToolBoxOrientation->CalcWindowSizePixel() );
- mpToolBoxOrientation->SetBackground( Wallpaper() );
- mpToolBoxOrientation->SetPaintTransparent( sal_True );
+ mpToolBoxOrientation->SetItemImage( nIdOrientation, mImgPortrait);
+ mpToolBoxOrientation->SetItemBits( nIdOrientation, mpToolBoxOrientation->GetItemBits( nIdOrientation ) | TIB_DROPDOWNONLY );
// popup for page margins
+ const sal_uInt16 nIdMargin = mpToolBoxMargin->GetItemId(UNO_MARGIN);
aLink = LINK( this, PagePropertyPanel, ClickMarginHdl );
mpToolBoxMargin->SetDropdownClickHdl( aLink );
mpToolBoxMargin->SetSelectHdl( aLink );
- mpToolBoxMargin->SetItemImage(TBI_MARGIN, mImgNormal);
- mpToolBoxMargin->SetItemBits( TBI_MARGIN, mpToolBoxMargin->GetItemBits( TBI_MARGIN ) | TIB_DROPDOWNONLY );
- mpToolBoxMargin->SetQuickHelpText(TBI_MARGIN,String(SW_RES(STR_QHELP_TB_MARGIN)));
- mpToolBoxMargin->SetOutputSizePixel( mpToolBoxMargin->CalcWindowSizePixel() );
- mpToolBoxMargin->SetBackground(Wallpaper());
- mpToolBoxMargin->SetPaintTransparent( sal_True );
+ mpToolBoxMargin->SetItemImage(nIdMargin, mImgNormal);
+ mpToolBoxMargin->SetItemBits( nIdMargin, mpToolBoxMargin->GetItemBits( nIdMargin ) | TIB_DROPDOWNONLY );
// popup for page size
+ const sal_uInt16 nIdSize = mpToolBoxSize->GetItemId(UNO_SIZE);
aLink = LINK( this, PagePropertyPanel, ClickSizeHdl );
mpToolBoxSize->SetDropdownClickHdl( aLink );
mpToolBoxSize->SetSelectHdl( aLink );
- mpToolBoxSize->SetItemImage(TBI_SIZE, mImgLetter);
- mpToolBoxSize->SetItemBits( TBI_SIZE, mpToolBoxSize->GetItemBits( TBI_SIZE ) | TIB_DROPDOWNONLY );
- mpToolBoxSize->SetQuickHelpText(TBI_SIZE,String(SW_RES(STR_QHELP_TB_SIZE)));
- mpToolBoxSize->SetOutputSizePixel( mpToolBoxSize->CalcWindowSizePixel() );
- mpToolBoxSize->SetBackground(Wallpaper());
- mpToolBoxSize->SetPaintTransparent( sal_True );
+ mpToolBoxSize->SetItemImage(nIdSize, mImgLetter);
+ mpToolBoxSize->SetItemBits( nIdSize, mpToolBoxSize->GetItemBits( nIdSize ) | TIB_DROPDOWNONLY );
maImgSize = new Image[8];
maImgSize[0] = mImgA3;
maImgSize[1] = mImgA4;
@@ -275,15 +247,12 @@ void PagePropertyPanel::Initialize()
maImgSize_L[7] = mImgLegal_L;
// popup for page column property
+ const sal_uInt16 nIdColumn = mpToolBoxColumn->GetItemId(UNO_COLUMN);
aLink = LINK( this, PagePropertyPanel, ClickColumnHdl );
mpToolBoxColumn->SetDropdownClickHdl( aLink );
mpToolBoxColumn->SetSelectHdl( aLink );
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn1);
- mpToolBoxColumn->SetItemBits( TBI_COLUMN, mpToolBoxColumn->GetItemBits( TBI_COLUMN ) | TIB_DROPDOWNONLY );
- mpToolBoxColumn->SetQuickHelpText(TBI_COLUMN,String(SW_RES(STR_QHELP_TB_COLUMN)));
- mpToolBoxColumn->SetOutputSizePixel( mpToolBoxColumn->CalcWindowSizePixel() );
- mpToolBoxColumn->SetBackground(Wallpaper());
- mpToolBoxColumn->SetPaintTransparent( sal_True );
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn1);
+ mpToolBoxColumn->SetItemBits( nIdColumn, mpToolBoxColumn->GetItemBits( nIdColumn ) | TIB_DROPDOWNONLY );
meFUnit = GetModuleFieldUnit();
meUnit = m_aSwPagePgSizeControl.GetCoreMetric();
@@ -549,14 +518,15 @@ void PagePropertyPanel::NotifyItemUpdate(
if ( eState >= SFX_ITEM_AVAILABLE &&
pState && pState->ISA(SvxPageItem) )
{
+ const sal_uInt16 nIdOrientation = mpToolBoxOrientation->GetItemId(UNO_ORIENTATION);
mpPageItem.reset( static_cast<SvxPageItem*>(pState->Clone()) );
if ( mpPageItem->IsLandscape() )
{
- mpToolBoxOrientation->SetItemImage(TBI_ORIENTATION, mImgLandscape);
+ mpToolBoxOrientation->SetItemImage(nIdOrientation, mImgLandscape);
}
else
{
- mpToolBoxOrientation->SetItemImage(TBI_ORIENTATION, mImgPortrait);
+ mpToolBoxOrientation->SetItemImage(nIdOrientation, mImgPortrait);
}
ChangeMarginImage();
ChangeSizeImage();
@@ -626,37 +596,38 @@ void PagePropertyPanel::ChangeMarginImage()
}
const long cTolerance = 5;
+ const sal_uInt16 nIdMargin = mpToolBoxMargin->GetItemId(UNO_MARGIN);
if( abs(mpPageLRMarginItem->GetLeft() - SWPAGE_NARROW_VALUE) <= cTolerance &&
abs(mpPageLRMarginItem->GetRight() - SWPAGE_NARROW_VALUE) <= cTolerance &&
abs(mpPageULMarginItem->GetUpper() - SWPAGE_NARROW_VALUE) <= cTolerance &&
abs(mpPageULMarginItem->GetLower() - SWPAGE_NARROW_VALUE) <= cTolerance &&
mpPageItem->GetPageUsage() != SVX_PAGE_MIRROR )
- mpToolBoxMargin->SetItemImage( TBI_MARGIN, mpPageItem->IsLandscape() ? mImgNarrow_L : mImgNarrow );
+ mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgNarrow_L : mImgNarrow );
else if( abs(mpPageLRMarginItem->GetLeft() - SWPAGE_NORMAL_VALUE) <= cTolerance &&
abs(mpPageLRMarginItem->GetRight() - SWPAGE_NORMAL_VALUE) <= cTolerance &&
abs(mpPageULMarginItem->GetUpper() - SWPAGE_NORMAL_VALUE) <= cTolerance &&
abs(mpPageULMarginItem->GetLower() - SWPAGE_NORMAL_VALUE) <= cTolerance &&
mpPageItem->GetPageUsage() != SVX_PAGE_MIRROR )
- mpToolBoxMargin->SetItemImage(TBI_MARGIN, mpPageItem->IsLandscape() ? mImgNormal_L : mImgNormal );
+ mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgNormal_L : mImgNormal );
else if( abs(mpPageLRMarginItem->GetLeft() - SWPAGE_WIDE_VALUE2) <= cTolerance &&
abs(mpPageLRMarginItem->GetRight() - SWPAGE_WIDE_VALUE2) <= cTolerance &&
abs(mpPageULMarginItem->GetUpper() - SWPAGE_WIDE_VALUE1) <= cTolerance &&
abs(mpPageULMarginItem->GetLower() - SWPAGE_WIDE_VALUE1) <= cTolerance &&
mpPageItem->GetPageUsage() != SVX_PAGE_MIRROR )
- mpToolBoxMargin->SetItemImage(TBI_MARGIN, mpPageItem->IsLandscape() ? mImgWide_L : mImgWide );
+ mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgWide_L : mImgWide );
else if( abs(mpPageLRMarginItem->GetLeft() - SWPAGE_WIDE_VALUE3) <= cTolerance &&
abs(mpPageLRMarginItem->GetRight() - SWPAGE_WIDE_VALUE1) <= cTolerance &&
abs(mpPageULMarginItem->GetUpper() - SWPAGE_WIDE_VALUE1) <= cTolerance &&
abs(mpPageULMarginItem->GetLower() - SWPAGE_WIDE_VALUE1) <= cTolerance &&
mpPageItem->GetPageUsage() == SVX_PAGE_MIRROR )
- mpToolBoxMargin->SetItemImage(TBI_MARGIN, mpPageItem->IsLandscape() ? mImgMirrored_L : mImgMirrored );
+ mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgMirrored_L : mImgMirrored );
else
- mpToolBoxMargin->SetItemImage(TBI_MARGIN, mpPageItem->IsLandscape() ? mImgMarginCustom_L : mImgMarginCustom );
+ mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgMarginCustom_L : mImgMarginCustom );
}
@@ -709,14 +680,16 @@ void PagePropertyPanel::ChangeSizeImage()
break;
}
+ const sal_uInt16 nIdSize = mpToolBoxSize->GetItemId(UNO_SIZE);
+
if ( nImageIdx == 0 )
{
- mpToolBoxSize->SetItemImage( TBI_SIZE,
+ mpToolBoxSize->SetItemImage( nIdSize,
( mpPageItem->IsLandscape() ? mImgSizeNone_L : mImgSizeNone ) );
}
else
{
- mpToolBoxSize->SetItemImage( TBI_SIZE,
+ mpToolBoxSize->SetItemImage( nIdSize,
( mpPageItem->IsLandscape() ? maImgSize_L[nImageIdx-1] : maImgSize[nImageIdx-1] ) );
}
}
@@ -729,27 +702,28 @@ void PagePropertyPanel::ChangeColumnImage( const sal_uInt16 nColumnType )
return;
}
+ const sal_uInt16 nIdColumn = mpToolBoxColumn->GetItemId(UNO_COLUMN);
if ( !mpPageItem->IsLandscape() )
{
switch( nColumnType )
{
case 1:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn1);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn1);
break;
case 2:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn2);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn2);
break;
case 3:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn3);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn3);
break;
case 4:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgLeft);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgLeft);
break;
case 5:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgRight);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgRight);
break;
default:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumnNone);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumnNone);
}
}
else
@@ -757,22 +731,22 @@ void PagePropertyPanel::ChangeColumnImage( const sal_uInt16 nColumnType )
switch( nColumnType )
{
case 1:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn1_L);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn1_L);
break;
case 2:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn2_L);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn2_L);
break;
case 3:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn3_L);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn3_L);
break;
case 4:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgLeft_L);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgLeft_L);
break;
case 5:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgRight_L);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgRight_L);
break;
default:
- mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumnNone_L);
+ mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumnNone_L);
}
}
}
diff --git a/sw/source/ui/sidebar/PagePropertyPanel.hrc b/sw/source/ui/sidebar/PagePropertyPanel.hrc
index a4592ae..d2294bd 100644
--- a/sw/source/ui/sidebar/PagePropertyPanel.hrc
+++ b/sw/source/ui/sidebar/PagePropertyPanel.hrc
@@ -15,17 +15,55 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+#include <rcid.hrc>
#include "PropertyPanel.hrc"
-#define FT_ORIENTATION 1
-#define TB_ORIENTATION 2
-#define FT_MARGIN 3
-#define TB_MARGIN 4
-#define FT_SIZE 5
-#define TB_SIZE 6
-#define FT_COLUMN 7
-#define TB_COLUMN 8
-#define TBI_MARGIN 9
+// global definitions
+#define IMG_PAGE_PORTRAIT (RC_SIDEBAR_BEGIN + 0)
+#define IMG_PAGE_LANDSCAPE (RC_SIDEBAR_BEGIN + 1)
+#define IMG_PAGE_NARROW (RC_SIDEBAR_BEGIN + 2)
+#define IMG_PAGE_NORMAL (RC_SIDEBAR_BEGIN + 3)
+#define IMG_PAGE_WIDE (RC_SIDEBAR_BEGIN + 4)
+#define IMG_PAGE_MIRRORED (RC_SIDEBAR_BEGIN + 5)
+#define IMG_PAGE_MARGIN_CUSTOM (RC_SIDEBAR_BEGIN + 6)
+#define IMG_PAGE_NARROW_L (RC_SIDEBAR_BEGIN + 7)
+#define IMG_PAGE_NORMAL_L (RC_SIDEBAR_BEGIN + 8)
+#define IMG_PAGE_WIDE_L (RC_SIDEBAR_BEGIN + 9)
+#define IMG_PAGE_MIRRORED_L (RC_SIDEBAR_BEGIN + 10)
+#define IMG_PAGE_MARGIN_CUSTOM_L (RC_SIDEBAR_BEGIN+ 11)
+#define IMG_PAGE_A3 (RC_SIDEBAR_BEGIN + 12)
+#define IMG_PAGE_A4 (RC_SIDEBAR_BEGIN + 13)
+#define IMG_PAGE_A5 (RC_SIDEBAR_BEGIN + 14)
+#define IMG_PAGE_B4 (RC_SIDEBAR_BEGIN + 15)
+#define IMG_PAGE_B5 (RC_SIDEBAR_BEGIN + 16)
+#define IMG_PAGE_C5 (RC_SIDEBAR_BEGIN + 17)
+#define IMG_PAGE_LETTER (RC_SIDEBAR_BEGIN + 18)
+#define IMG_PAGE_LEGAL (RC_SIDEBAR_BEGIN + 19)
+#define IMG_PAGE_SIZE_NONE (RC_SIDEBAR_BEGIN + 20)
+#define IMG_PAGE_A3_L (RC_SIDEBAR_BEGIN + 21)
+#define IMG_PAGE_A4_L (RC_SIDEBAR_BEGIN + 22)
+#define IMG_PAGE_A5_L (RC_SIDEBAR_BEGIN + 23)
+#define IMG_PAGE_B4_L (RC_SIDEBAR_BEGIN + 24)
+#define IMG_PAGE_B5_L (RC_SIDEBAR_BEGIN + 25)
+#define IMG_PAGE_C5_L (RC_SIDEBAR_BEGIN + 26)
+#define IMG_PAGE_LETTER_L (RC_SIDEBAR_BEGIN + 27)
+#define IMG_PAGE_LEGAL_L (RC_SIDEBAR_BEGIN + 28)
+#define IMG_PAGE_SIZE_NONE_L (RC_SIDEBAR_BEGIN + 29)
+#define IMG_PAGE_COLUMN_1 (RC_SIDEBAR_BEGIN + 30)
+#define IMG_PAGE_COLUMN_2 (RC_SIDEBAR_BEGIN + 31)
+#define IMG_PAGE_COLUMN_3 (RC_SIDEBAR_BEGIN + 32)
+#define IMG_PAGE_COLUMN_LEFT (RC_SIDEBAR_BEGIN + 33)
+#define IMG_PAGE_COLUMN_RIGHT (RC_SIDEBAR_BEGIN + 34)
+#define IMG_PAGE_COLUMN_NONE (RC_SIDEBAR_BEGIN + 35)
+#define IMG_PAGE_COLUMN_1_L (RC_SIDEBAR_BEGIN + 36)
+#define IMG_PAGE_COLUMN_2_L (RC_SIDEBAR_BEGIN + 37)
+#define IMG_PAGE_COLUMN_3_L (RC_SIDEBAR_BEGIN + 38)
+#define IMG_PAGE_COLUMN_LEFT_L (RC_SIDEBAR_BEGIN + 39)
+#define IMG_PAGE_COLUMN_RIGHT_L (RC_SIDEBAR_BEGIN + 40)
+#define IMG_PAGE_COLUMN_NONE_L (RC_SIDEBAR_BEGIN + 41)
+
+// local
#define IMG_PORTRAIT 10
#define IMG_LANDSCAPE 11
#define STR_PORTRAIT 12
@@ -38,16 +76,12 @@
#define MF_SWRIGHT_MARGIN 19
#define MF_SWTOP_MARGIN 20
#define MF_SWBOTTOM_MARGIN 21
-#define TBI_SIZE 22
#define VS_SIZE 23
#define STR_LCVALUE 24
#define FT_CUSTOM 25
#define FLD_WIDTH_HEIGHT 26
-#define TBI_ORIENTATION 28
#define VS_ORIENTATION 29
-#define IMG_PAGE_PORTRAIT 30
-#define IMG_PAGE_LANDSCAPE 31
#define IMG_NARROW 32
#define IMG_NORMAL 33
#define IMG_WIDE 34
@@ -64,7 +98,6 @@
#define FT_BOTTOM 45
#define FT_INNER 46
#define FT_OUTER 47
-#define TBI_COLUMN 48
#define VS_COLUMN 49
#define MBOX_WIDTH 50
#define IMG_ONE 51
@@ -81,51 +114,11 @@
#define CB_SIZE_MORE 61
-#define IMG_PAGE_NARROW 64
-#define IMG_PAGE_NORMAL 65
-#define IMG_PAGE_WIDE 63
-#define IMG_PAGE_MIRRORED 67
-#define IMG_PAGE_MARGIN_CUSTOM 68
-#define IMG_PAGE_A3 69
-#define IMG_PAGE_A4 70
-#define IMG_PAGE_A5 71
-#define IMG_PAGE_B4 72
-#define IMG_PAGE_B5 73
-#define IMG_PAGE_C5 74
-#define IMG_PAGE_LETTER 75
-#define IMG_PAGE_LEGAL 76
-#define IMG_PAGE_COLUMN_1 77
-#define IMG_PAGE_COLUMN_2 78
-#define IMG_PAGE_COLUMN_3 79
-#define IMG_PAGE_COLUMN_LEFT 80
-#define IMG_PAGE_COLUMN_RIGHT 81
-#define IMG_PAGE_SIZE_NONE 82
-#define IMG_PAGE_COLUMN_NONE 83
-#define IMG_PAGE_COLUMN_1_L 84
-#define IMG_PAGE_COLUMN_2_L 85
-#define IMG_PAGE_COLUMN_3_L 86
-#define IMG_PAGE_COLUMN_LEFT_L 87
-#define IMG_PAGE_COLUMN_RIGHT_L 88
-#define IMG_PAGE_COLUMN_NONE_L 89
#define IMG_ONE_L 90
#define IMG_TWO_L 91
#define IMG_THREE_L 92
#define IMG_LEFT_L 93
#define IMG_RIGHT_L 94
-#define IMG_PAGE_A3_L 95
-#define IMG_PAGE_A4_L 96
-#define IMG_PAGE_A5_L 97
-#define IMG_PAGE_B4_L 98
-#define IMG_PAGE_B5_L 99
-#define IMG_PAGE_C5_L 100
-#define IMG_PAGE_LETTER_L 101
-#define IMG_PAGE_LEGAL_L 102
-#define IMG_PAGE_SIZE_NONE_L 103
-#define IMG_PAGE_NARROW_L 104
-#define IMG_PAGE_NORMAL_L 105
-#define IMG_PAGE_WIDE_L 106
-#define IMG_PAGE_MIRRORED_L 107
-#define IMG_PAGE_MARGIN_CUSTOM_L 108
#define IMG_NARROW_L 109
#define IMG_NORMAL_L 110
#define IMG_WIDE_L 111
@@ -135,10 +128,6 @@
#define FLD_TOP_MARGIN 115
#define FLD_BOTTOM_MARGIN 116
-#define STR_QHELP_TB_ORIENTATION 117
-#define STR_QHELP_TB_MARGIN 118
-#define STR_QHELP_TB_SIZE 119
-#define STR_QHELP_TB_COLUMN 120
#define IMG_CUSTOM_DIS 121
//
#define STR_MARGIN_TOOLTIP_LEFT 122
@@ -193,4 +182,4 @@
#define MARGIN_PANEL_HEIGHT POP_BORDER_Y + BD_HEIGHT + POPUP_MARGIN + OFFSET_Y
#define CUST_MORE_BUTTON_IMG_OFF_X POPUPPANEL_MARGIN_HORIZONTAL + OFFSET_X
-#define PAGE_HEIGHT TBX_COLUMN_Y + 20 + SECTIONPAGE_MARGIN_VERTICAL_BOT
\ No newline at end of file
+#define PAGE_HEIGHT TBX_COLUMN_Y + 20 + SECTIONPAGE_MARGIN_VERTICAL_BOT
diff --git a/sw/source/ui/sidebar/PagePropertyPanel.hxx b/sw/source/ui/sidebar/PagePropertyPanel.hxx
index 095d073..c1f34af 100644
--- a/sw/source/ui/sidebar/PagePropertyPanel.hxx
+++ b/sw/source/ui/sidebar/PagePropertyPanel.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/document/XUndoManager.hpp>
#include <svx/sidebar/Popup.hxx>
+#include <svx/sidebar/PanelLayout.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
@@ -52,7 +53,7 @@ namespace cssu = ::com::sun::star::uno;
namespace sw { namespace sidebar {
class PagePropertyPanel
- : public Control,
+ : public PanelLayout,
public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
{
public:
@@ -109,18 +110,10 @@ namespace sw { namespace sidebar {
SfxBindings* mpBindings;
// toolboxes - on click open corresponding popup
- FixedText maFtOrientation;
- ::boost::scoped_ptr<Window> mpToolBoxOrientationBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxOrientation;
- FixedText maFtMargin;
- ::boost::scoped_ptr<Window> mpToolBoxMarginBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxMargin;
- FixedText maFtSize;
- ::boost::scoped_ptr<Window> mpToolBoxSizeBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxSize;
- FixedText maFtColumn;
- ::boost::scoped_ptr<Window> mpToolBoxColumnBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxColumn;
+ ToolBox* mpToolBoxOrientation;
+ ToolBox* mpToolBoxMargin;
+ ToolBox* mpToolBoxSize;
+ ToolBox* mpToolBoxColumn;
Image* maImgSize;
Image* maImgSize_L;
diff --git a/sw/source/ui/sidebar/PagePropertyPanel.src b/sw/source/ui/sidebar/PagePropertyPanel.src
index d03f2d1..519758b 100644
--- a/sw/source/ui/sidebar/PagePropertyPanel.src
+++ b/sw/source/ui/sidebar/PagePropertyPanel.src
@@ -21,300 +21,173 @@
#include "PagePropertyPanel.hrc"
#include "helpid.h"
-// page property panel control
-Control RID_PROPERTYPANEL_SWPAGE
+Image IMG_PAGE_PORTRAIT
{
- OutputSize = TRUE;
- DialogControl = TRUE;
- Border = FALSE;
- Size = MAP_APPFONT( PROPERTYPAGE_WIDTH, PAGE_HEIGHT );
- HelpID = HID_PROPERTYPANEL_SWPAGE_SECTION;
- Text = "Page";
-
- FixedText FT_ORIENTATION
- {
- Pos = MAP_APPFONT ( FT_ORIENTATION_X, FT_ORIENTATION_Y );
- Size = MAP_APPFONT ( MBOX_WIDTH, TEXT_HEIGHT) ;
- Text [ en-US ] = "~Orientation:";
- };
- ToolBox TB_ORIENTATION
- {
- Pos = MAP_APPFONT (TBX_ORIENTATION_X, TBX_ORIENTATION_Y) ;
- HelpID = HID_SWPAGE_ORIENTATION;
- SVLook = TRUE ;
- TabStop = TRUE ;
- Text = "Orientation" ;
- ItemList =
- {
- ToolBoxItem
- {
- HelpID = HID_SWPAGE_TBI_ORIENTATION;
- Identifier = TBI_ORIENTATION ;
- Text [ en-US ] = "Orientation" ;
- DropDown = TRUE ;
- };
- };
- };
- String STR_QHELP_TB_ORIENTATION
- {
- Text [ en-US ] = "Select the paper orientation - vertically (portrait) or horizontally (landscape) - for the current page style.";
- };
-
- FixedText FT_MARGIN
- {
- Pos = MAP_APPFONT ( FT_MARGIN_X, FT_MARGIN_Y );
- Size = MAP_APPFONT ( MBOX_WIDTH + 50, TEXT_HEIGHT) ;
- Text [ en-US ] = "~Margin:";
- };
- ToolBox TB_MARGIN
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT (TBX_MARGIN_X, TBX_MARGIN_Y) ;
- HelpID = HID_SWPAGE_MARGIN;
- TabStop = TRUE ;
- Text = "Margin" ;
- ItemList =
- {
- ToolBoxItem
- {
- HelpID = HID_SWPAGE_TBI_MARGIN;
- Identifier = TBI_MARGIN ;
- Text [ en-US ] = "Margin" ;
- DropDown = TRUE ;
- };
- };
- };
- String STR_QHELP_TB_MARGIN
- {
- Text [ en-US ] = "Select the margin values for the current page style.";
- };
-
- FixedText FT_SIZE
- {
- Pos = MAP_APPFONT ( FT_SIZE_X, FT_SIZE_Y );
- Size = MAP_APPFONT ( MBOX_WIDTH, TEXT_HEIGHT) ;
- Text [ en-US ] = "~Size:";
- };
- ToolBox TB_SIZE
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( TBX_SIZE_X , TBX_SIZE_Y ) ;
- HelpID = HID_SWPAGE_SIZE;
- TabStop = TRUE ;
- Text = "Size" ;
- ItemList =
- {
- ToolBoxItem
- {
- HelpID = HID_SWPAGE_TBI_SIZE;
- Identifier = TBI_SIZE ;
- Text [ en-US ] = "Size" ;
- DropDown = TRUE ;
- };
- };
- };
- String STR_QHELP_TB_SIZE
- {
- Text [ en-US ] = "Select a predefined paper size for the current page style.";
- };
-
- FixedText FT_COLUMN
- {
- Pos = MAP_APPFONT ( FT_COLUMN_X, FT_COLUMN_Y );
- Size = MAP_APPFONT ( MBOX_WIDTH + 50, TEXT_HEIGHT) ;
- Text [ en-US ] = "~Column:";
- };
- ToolBox TB_COLUMN
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( TBX_COLUMN_X , TBX_COLUMN_Y ) ;
- HelpID = HID_SWPAGE_COLUMN;
- TabStop = TRUE ;
- Text = "Column" ;
- ItemList =
- {
- ToolBoxItem
- {
- HelpID = HID_SWPAGE_TBI_COLUMN;
- Identifier = TBI_COLUMN;
- Text [ en-US ] = "Column" ;
- DropDown = TRUE ;
- };
- };
- };
- String STR_QHELP_TB_COLUMN
- {
- Text [ en-US ] = "Select the layout and the number of columns for the current page style.";
- };
-
- Image IMG_PAGE_PORTRAIT
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/portraitcopy_24x24.png";};
- };
- Image IMG_PAGE_LANDSCAPE
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/Landscapecopy_24x24.png";};
- };
- Image IMG_PAGE_NARROW
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_narrow_24x24.png";};
- };
- Image IMG_PAGE_NORMAL
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_nomal_24x24.png";};
- };
- Image IMG_PAGE_WIDE
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_wide_24x24.png";};
- };
- Image IMG_PAGE_MIRRORED
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_mirror_24x24.png";};
- };
- Image IMG_PAGE_MARGIN_CUSTOM
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_copy_24x24.png";};
- };
- Image IMG_PAGE_NARROW_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatnarrow_24x24.png";};
- };
- Image IMG_PAGE_NORMAL_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatnormal_24x24.png";};
- };
- Image IMG_PAGE_WIDE_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatwide_24x24.png";};
- };
- Image IMG_PAGE_MIRRORED_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatmirror_24x24.png";};
- };
- Image IMG_PAGE_MARGIN_CUSTOM_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatcopy_24x24.png";};
- };
- Image IMG_PAGE_A3
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A3_24x24.png";};
- };
- Image IMG_PAGE_A4
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A4_24x24.png";};
- };
- Image IMG_PAGE_A5
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A5_24x24.png";};
- };
- Image IMG_PAGE_B4
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_B4_24x24.png";};
- };
- Image IMG_PAGE_B5
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_B5_24x24.png";};
- };
- Image IMG_PAGE_C5
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_C5_24x24.png";};
- };
- Image IMG_PAGE_LETTER
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";};
- };
- Image IMG_PAGE_LEGAL
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";};
- };
- Image IMG_PAGE_SIZE_NONE
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";};
- };
- Image IMG_PAGE_A3_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA3_24x24.png";};
- };
- Image IMG_PAGE_A4_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA4_24x24.png";};
- };
- Image IMG_PAGE_A5_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA5_24x24.png";};
- };
- Image IMG_PAGE_B4_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeB4_24x24.png";};
- };
- Image IMG_PAGE_B5_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeB5_24x24.png";};
- };
- Image IMG_PAGE_C5_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeC5_24x24.png";};
- };
- Image IMG_PAGE_LETTER_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";};
- };
- Image IMG_PAGE_LEGAL_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";};
- };
- Image IMG_PAGE_SIZE_NONE_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_1
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_1_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_2
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_2_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_3
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_3_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_LEFT
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_left_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_RIGHT
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_right_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_NONE
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_copy_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_1_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column1_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_2_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column2_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_3_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column3_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_LEFT_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columnleft_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_RIGHT_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columnright_24x24.png";};
- };
- Image IMG_PAGE_COLUMN_NONE_L
- {
- ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columncopy_24x24.png";};
- };
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/portraitcopy_24x24.png";};
+};
+Image IMG_PAGE_LANDSCAPE
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/Landscapecopy_24x24.png";};
+};
+Image IMG_PAGE_NARROW
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_narrow_24x24.png";};
+};
+Image IMG_PAGE_NORMAL
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_nomal_24x24.png";};
+};
+Image IMG_PAGE_WIDE
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_wide_24x24.png";};
+};
+Image IMG_PAGE_MIRRORED
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_mirror_24x24.png";};
+};
+Image IMG_PAGE_MARGIN_CUSTOM
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_copy_24x24.png";};
+};
+Image IMG_PAGE_NARROW_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatnarrow_24x24.png";};
+};
+Image IMG_PAGE_NORMAL_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatnormal_24x24.png";};
+};
+Image IMG_PAGE_WIDE_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatwide_24x24.png";};
+};
+Image IMG_PAGE_MIRRORED_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatmirror_24x24.png";};
+};
+Image IMG_PAGE_MARGIN_CUSTOM_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatcopy_24x24.png";};
+};
+Image IMG_PAGE_A3
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A3_24x24.png";};
+};
+Image IMG_PAGE_A4
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A4_24x24.png";};
+};
+Image IMG_PAGE_A5
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A5_24x24.png";};
+};
+Image IMG_PAGE_B4
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_B4_24x24.png";};
+};
+Image IMG_PAGE_B5
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_B5_24x24.png";};
+};
+Image IMG_PAGE_C5
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_C5_24x24.png";};
+};
+Image IMG_PAGE_LETTER
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";};
+};
+Image IMG_PAGE_LEGAL
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";};
+};
+Image IMG_PAGE_SIZE_NONE
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";};
+};
+Image IMG_PAGE_A3_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA3_24x24.png";};
+};
+Image IMG_PAGE_A4_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA4_24x24.png";};
+};
+Image IMG_PAGE_A5_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA5_24x24.png";};
+};
+Image IMG_PAGE_B4_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeB4_24x24.png";};
+};
+Image IMG_PAGE_B5_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeB5_24x24.png";};
+};
+Image IMG_PAGE_C5_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeC5_24x24.png";};
+};
+Image IMG_PAGE_LETTER_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";};
+};
+Image IMG_PAGE_LEGAL_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";};
+};
+Image IMG_PAGE_SIZE_NONE_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_1
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_1_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_2
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_2_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_3
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_3_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_LEFT
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_left_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_RIGHT
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_right_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_NONE
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_copy_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_1_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column1_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_2_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column2_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_3_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column3_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_LEFT_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columnleft_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_RIGHT_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columnright_24x24.png";};
+};
+Image IMG_PAGE_COLUMN_NONE_L
+{
+ ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columncopy_24x24.png";};
};
// popup for page orientation attribute
diff --git a/sw/uiconfig/swriter/ui/sidebarpage.ui b/sw/uiconfig/swriter/ui/sidebarpage.ui
new file mode 100644
index 0000000..05fd516
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/sidebarpage.ui
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkGrid" id="PagePropertyPanel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_homogeneous">True</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_bottom">30</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="orientationlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_right">23</property>
+ <property name="label" translatable="yes">_Orientation:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="selectorientation">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuToolButton" id="orientation">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Select the paper orientation - vertically (portrait) or horizontally (landscape) - for the current page style.</property>
+ <property name="action_name">.uno:Orientation</property>
+ <property name="label" translatable="yes">toolbutton1</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_bottom">30</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="marginlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_right">37</property>
+ <property name="label" translatable="yes">_Margin:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="selectmargin">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuToolButton" id="margin">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Select the margin values for the current page style.</property>
+ <property name="action_name">.uno:Margin</property>
+ <property name="label" translatable="yes">toolbutton2</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="sizelabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_right">67</property>
+ <property name="label" translatable="yes">_Size:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="selectsize">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuToolButton" id="size">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Select a predefined paper size for the current page style.</property>
+ <property name="margin_bottom">25</property>
+ <property name="action_name">.uno:Size</property>
+ <property name="label" translatable="yes">toolbutton3</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="columnlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_right">30</property>
+ <property name="label" translatable="yes">_Column:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="selectcolumn">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuToolButton" id="column">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Select the layout and the number of columns for the current page style.</property>
+ <property name="margin_right">15</property>
+ <property name="margin_bottom">25</property>
+ <property name="action_name">.uno:Column</property>
+ <property name="label" translatable="yes">toolbutton4</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list