[Libreoffice-commits] core.git: 8 commits - include/svx include/vcl officecfg/registry sc/source svx/source svx/uiconfig sw/source sw/uiconfig sw/UIConfig_swriter.mk vcl/source
Jan Holesovsky
kendy at collabora.com
Fri Dec 19 03:54:49 PST 2014
include/svx/ctredlin.hxx | 4
include/vcl/builder.hxx | 4
officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 53 +
sc/source/ui/miscdlgs/acredlin.cxx | 2
svx/source/dialog/ctredlin.cxx | 9
svx/source/fmcomp/fmgridif.cxx | 4
svx/uiconfig/ui/redlinefilterpage.ui | 520 ++++++-----
sw/UIConfig_swriter.mk | 1
sw/source/ui/misc/swmodalredlineacceptdlg.cxx | 3
sw/source/uibase/inc/redlndlg.hxx | 18
sw/source/uibase/misc/redlndlg.cxx | 31
sw/source/uibase/sidebar/SwPanelFactory.cxx | 10
sw/uiconfig/swriter/ui/managechangessidebar.ui | 152 +++
vcl/source/window/builder.cxx | 53 -
14 files changed, 603 insertions(+), 261 deletions(-)
New commits:
commit 170c7ee2f6f902d9de139b914b74e807b28da0a9
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Dec 19 12:20:09 2014 +0100
changes sidebar: Use smaller 'clock' icons.
Change-Id: I3bcfa2b942ab0a8dbbc2997dffb0b9d18d345099
diff --git a/svx/uiconfig/ui/redlinefilterpage.ui b/svx/uiconfig/ui/redlinefilterpage.ui
index b83d61f..a78f495 100644
--- a/svx/uiconfig/ui/redlinefilterpage.ui
+++ b/svx/uiconfig/ui/redlinefilterpage.ui
@@ -11,12 +11,12 @@
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="pixbuf">sc/res/time.png</property>
+ <property name="pixbuf">cmd/sc_timefield.png</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="pixbuf">sc/res/time.png</property>
+ <property name="pixbuf">cmd/sc_timefield.png</property>
</object>
<object class="GtkGrid" id="RedlineFilterPage">
<property name="visible">True</property>
commit 3a7a05ea34cd50f368c5287e3d291e473852c80a
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Dec 19 11:16:14 2014 +0100
changes sidebar: Better look of the buttons.
Change-Id: I68fd844b3dbc3731c45c99fc7db4c3990e3073bc
diff --git a/sw/uiconfig/swriter/ui/managechangessidebar.ui b/sw/uiconfig/swriter/ui/managechangessidebar.ui
index 98a3d7a..09e023e 100644
--- a/sw/uiconfig/swriter/ui/managechangessidebar.ui
+++ b/sw/uiconfig/swriter/ui/managechangessidebar.ui
@@ -17,12 +17,16 @@
<object class="GtkBox" id="box9">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkGrid" id="content_area">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<child>
<placeholder/>
</child>
@@ -45,6 +49,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="hexpand">True</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -60,6 +65,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="hexpand">True</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -75,6 +81,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="hexpand">True</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -90,6 +97,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="hexpand">True</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -100,14 +108,12 @@
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<object class="GtkButton" id="undo">
<property name="label">gtk-undo</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
+ <property name="hexpand">True</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -117,6 +123,9 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">False</property>
commit db732cee9207dc3cfc49fc9e719bc192542e2e8e
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Dec 19 10:53:31 2014 +0100
vcl: The <items> can come after pCurrentChild has been already created.
So consolidate their filling-in at one place, after we are sure we have the
pCurrentChild created (whatever way).
Change-Id: Ia98a927e1158041836b173e1c2f9529d70295855
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index af10f76..ef8264b 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -335,11 +335,11 @@ private:
vcl::Window *insertObject(vcl::Window *pParent,
const OString &rClass, const OString &rID,
stringmap &rProps, stringmap &rPangoAttributes,
- stringmap &rAtkProps, std::vector<OString> &rItems);
+ stringmap &rAtkProps);
vcl::Window *makeObject(vcl::Window *pParent,
const OString &rClass, const OString &rID,
- stringmap &rVec, const std::vector<OString> &rItems);
+ stringmap &rVec);
void connectNumericFormatterAdjustment(const OString &id, const OString &rAdjustment);
void connectTimeFormatterAdjustment(const OString &id, const OString &rAdjustment);
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 4dc7a65..4208464 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1221,7 +1221,7 @@ extern "C" { static void SAL_CALL thisModule() {} }
#endif
vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, const OString &id,
- stringmap &rMap, const std::vector<OString> &rItems)
+ stringmap &rMap)
{
bool bIsPlaceHolder = name.isEmpty();
bool bVertical = false;
@@ -1440,28 +1440,12 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
{
ComboBox* pComboBox = new ComboBox(pParent, nBits);
pComboBox->EnableAutoSize(true);
- if (!rItems.empty())
- {
- sal_uInt16 nActiveId = extractActive(rMap);
- for (std::vector<OString>::const_iterator aI = rItems.begin(), aEnd = rItems.end(); aI != aEnd; ++aI)
- pComboBox->InsertEntry(OStringToOUString(*aI, RTL_TEXTENCODING_UTF8));
- if (nActiveId < rItems.size())
- pComboBox->SelectEntryPos(nActiveId);
- }
pWindow = pComboBox;
}
else
{
ListBox *pListBox = new ListBox(pParent, nBits|WB_SIMPLEMODE);
pListBox->EnableAutoSize(true);
- if (!rItems.empty())
- {
- sal_uInt16 nActiveId = extractActive(rMap);
- for (std::vector<OString>::const_iterator aI = rItems.begin(), aEnd = rItems.end(); aI != aEnd; ++aI)
- pListBox->InsertEntry(OStringToOUString(*aI, RTL_TEXTENCODING_UTF8));
- if (nActiveId < rItems.size())
- pListBox->SelectEntryPos(nActiveId);
- }
pWindow = pListBox;
}
}
@@ -1758,9 +1742,7 @@ void VclBuilder::set_properties(vcl::Window *pWindow, const stringmap &rProps)
}
vcl::Window *VclBuilder::insertObject(vcl::Window *pParent, const OString &rClass,
- const OString &rID, stringmap &rProps, stringmap &rPango,
- stringmap &rAtk,
- std::vector<OString> &rItems)
+ const OString &rID, stringmap &rProps, stringmap &rPango, stringmap &rAtk)
{
vcl::Window *pCurrentChild = NULL;
@@ -1800,7 +1782,7 @@ vcl::Window *VclBuilder::insertObject(vcl::Window *pParent, const OString &rClas
//been seen yet, then make unattached widgets parent-less toplevels
if (pParent == m_pParent && m_bToplevelHasDeferredInit)
pParent = NULL;
- pCurrentChild = makeObject(pParent, rClass, rID, rProps, rItems);
+ pCurrentChild = makeObject(pParent, rClass, rID, rProps);
}
if (pCurrentChild)
@@ -1823,7 +1805,6 @@ vcl::Window *VclBuilder::insertObject(vcl::Window *pParent, const OString &rClas
rProps.clear();
rPango.clear();
rAtk.clear();
- rItems.clear();
if (!pCurrentChild)
pCurrentChild = m_aChildren.empty() ? pParent : m_aChildren.back().m_pWindow;
@@ -2772,6 +2753,23 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, const OString &rClass, con
rProps.clear();
}
+/// Insert items to a ComboBox or a ListBox.
+/// They have no common ancestor that would have 'InsertEntry()', so use a template.
+template<typename T> bool insertItems(vcl::Window *pWindow, VclBuilder::stringmap &rMap, const std::vector<OString> &rItems)
+{
+ T *pContainer = dynamic_cast<T*>(pWindow);
+ if (!pContainer)
+ return false;
+
+ sal_uInt16 nActiveId = extractActive(rMap);
+ for (std::vector<OString>::const_iterator aI = rItems.begin(), aEnd = rItems.end(); aI != aEnd; ++aI)
+ pContainer->InsertEntry(OStringToOUString(*aI, RTL_TEXTENCODING_UTF8));
+ if (nActiveId < rItems.size())
+ pContainer->SelectEntryPos(nActiveId);
+
+ return true;
+}
+
vcl::Window* VclBuilder::handleObject(vcl::Window *pParent, xmlreader::XmlReader &reader)
{
OString sClass;
@@ -2846,7 +2844,7 @@ vcl::Window* VclBuilder::handleObject(vcl::Window *pParent, xmlreader::XmlReader
if (!pCurrentChild)
{
pCurrentChild = insertObject(pParent, sClass, sID,
- aProperties, aPangoAttributes, aAtkAttributes, aItems);
+ aProperties, aPangoAttributes, aAtkAttributes);
}
handleChild(pCurrentChild, reader);
}
@@ -2889,7 +2887,14 @@ vcl::Window* VclBuilder::handleObject(vcl::Window *pParent, xmlreader::XmlReader
if (!pCurrentChild)
{
pCurrentChild = insertObject(pParent, sClass, sID, aProperties,
- aPangoAttributes, aAtkAttributes, aItems);
+ aPangoAttributes, aAtkAttributes);
+ }
+
+ if (!aItems.empty())
+ {
+ // try to fill-in the items
+ if (!insertItems<ComboBox>(pCurrentChild, aProperties, aItems))
+ insertItems<ListBox>(pCurrentChild, aProperties, aItems);
}
return pCurrentChild;
commit 20c1bb5b6779d8d3fe8c5d9269779ff91f80ca3d
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Dec 18 17:32:21 2014 +0100
changes sidebar: Make the changes tabs narrower (when possible).
Change-Id: I2c76472baf8e5f91dee4ce5f753ca223b24e76e8
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index bc3546e..a6165b5 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -389,7 +389,7 @@ SvxTPView::SvxTPView(vcl::Window *pParent, VclBuilderContainer *pTopLevel)
pTopLevel->get(m_pUndo, "undo");
SvSimpleTableContainer* pTable = get<SvSimpleTableContainer>("changes");
- Size aControlSize(221, 65);
+ Size aControlSize(80, 65);
aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
pTable->set_width_request(aControlSize.Width());
pTable->set_height_request(aControlSize.Height());
diff --git a/svx/uiconfig/ui/redlinefilterpage.ui b/svx/uiconfig/ui/redlinefilterpage.ui
index 2840729..b83d61f 100644
--- a/svx/uiconfig/ui/redlinefilterpage.ui
+++ b/svx/uiconfig/ui/redlinefilterpage.ui
@@ -1,6 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">19851231</property>
+ <property name="upper">20501231</property>
+ <property name="value">19851231</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">sc/res/time.png</property>
+ </object>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">sc/res/time.png</property>
+ </object>
<object class="GtkGrid" id="RedlineFilterPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -271,6 +288,7 @@
</child>
<child>
<object class="GtkSpinButton" id="startdate:yy:mm:dd">
+ <property name="width_request">120</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
@@ -292,10 +310,8 @@
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<object class="GtkSpinButton" id="starttime:hh:mm">
+ <property name="width_request">70</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
@@ -335,6 +351,7 @@
</child>
<child>
<object class="GtkSpinButton" id="enddate:yy:mm:dd">
+ <property name="width_request">120</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
@@ -357,6 +374,7 @@
</child>
<child>
<object class="GtkSpinButton" id="endtime:hh:mm">
+ <property name="width_request">75</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
@@ -394,6 +412,9 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -410,21 +431,4 @@
</packing>
</child>
</object>
- <object class="GtkAdjustment" id="adjustment1">
- <property name="lower">19851231</property>
- <property name="upper">20501231</property>
- <property name="value">19851231</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">sc/res/time.png</property>
- </object>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">sc/res/time.png</property>
- </object>
</interface>
commit 43a31f576f16dea538f6f1925151bb5bad977c64
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Dec 18 10:31:28 2014 +0100
changes sidebar: Make the filter tabpage more vertical to fit better.
Change-Id: I6b982567eab7ed993f23df7ee246fc53c1fd90f0
diff --git a/svx/uiconfig/ui/redlinefilterpage.ui b/svx/uiconfig/ui/redlinefilterpage.ui
index d6563d8..2840729 100644
--- a/svx/uiconfig/ui/redlinefilterpage.ui
+++ b/svx/uiconfig/ui/redlinefilterpage.ui
@@ -1,26 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
<interface>
- <requires lib="gtk+" version="3.0"/>
- <object class="GtkAdjustment" id="adjustment1">
- <property name="lower">19851231</property>
- <property name="upper">20501231</property>
- <property name="value">19851231</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">sc/res/time.png</property>
- </object>
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkGrid" id="RedlineFilterPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="border_width">6</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="column_spacing">6</property>
<child>
<object class="GtkCheckButton" id="date">
<property name="label" translatable="yes">_Date:</property>
@@ -30,13 +17,12 @@
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
- <accessibility>
- <relation type="label-for" target="datecond"/>
- </accessibility>
</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>
@@ -48,18 +34,17 @@
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
- <accessibility>
- <relation type="label-for" target="authorlist"/>
- </accessibility>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="action">
- <property name="label" translatable="yes">A_ction:</property>
+ <object class="GtkCheckButton" id="comment">
+ <property name="label" translatable="yes">C_omment:</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -67,46 +52,48 @@
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<accessibility>
- <relation type="label-for" target="actionlist"/>
+ <relation type="label-for" target="commentedit"/>
</accessibility>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">8</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="comment">
- <property name="label" translatable="yes">C_omment:</property>
+ <object class="GtkEntry" id="commentedit">
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <accessibility>
- <relation type="label-for" target="commentedit"/>
- </accessibility>
+ <property name="margin_left">24</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">9</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="authorlist">
+ <object class="GtkCheckButton" id="range">
+ <property name="label" translatable="yes">_Range:</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <accessibility>
- <relation type="labelled-by" target="author"/>
- </accessibility>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">3</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">6</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -114,7 +101,10 @@
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
+ <property name="margin_left">24</property>
<property name="hexpand">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
<accessibility>
<relation type="labelled-by" target="action"/>
</accessibility>
@@ -125,228 +115,316 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- <property name="width">3</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="commentedit">
+ <object class="GtkCheckButton" id="action">
+ <property name="label" translatable="yes">A_ction:</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">•</property>
- <accessibility>
- <relation type="labelled-by" target="comment"/>
- </accessibility>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
- <property name="width">3</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="starttime:hh:mm">
+ <object class="GtkComboBoxText" id="authorlist">
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="starttime:hh:mm-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">Start Time</property>
- </object>
- </child>
+ <property name="can_focus">False</property>
+ <property name="margin_left">24</property>
+ <property name="hexpand">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <accessibility>
+ <relation type="labelled-by" target="author"/>
+ </accessibility>
</object>
<packing>
- <property name="left_attach">3</property>
- <property name="top_attach">0</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="endtime:hh:mm">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="endtime:hh:mm-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">End Time</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">24</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="rangeedit">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ <accessibility>
+ <relation type="labelled-by" target="range"/>
+ </accessibility>
</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">3</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="enddate:yy:mm:dd">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <property name="adjustment">adjustment1</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="enddate:yy:mm:dd-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">End Date</property>
+ <child>
+ <object class="GtkButton" id="dotdotdot">
+ <property name="label">...</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Set reference</property>
+ <property name="tooltip_text" translatable="yes">Set reference</property>
</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">2</property>
- <property name="top_attach">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">7</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="and">
+ <object class="GtkBox" id="box3">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">a_nd</property>
- <property name="use_underline">True</property>
- <property name="ellipsize">end</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="startdate:yy:mm:dd">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <property name="adjustment">adjustment1</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="startdate:yy:mm:dd-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">Start Date</property>
+ <property name="margin_left">24</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkComboBoxText" id="datecond">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <accessibility>
+ <relation type="labelled-by" target="date"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="datecond-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">Date Condition</property>
+ </object>
+ </child>
+ <items>
+ <item translatable="yes">earlier than</item>
+ <item translatable="yes">since</item>
+ <item translatable="yes">equal to</item>
+ <item translatable="yes">not equal to</item>
+ <item translatable="yes">between</item>
+ <item translatable="yes">since saving</item>
+ </items>
</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">2</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="datecond">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <items>
- <item translatable="yes">earlier than</item>
- <item translatable="yes">since</item>
- <item translatable="yes">equal to</item>
- <item translatable="yes">not equal to</item>
- <item translatable="yes">between</item>
- <item translatable="yes">since saving</item>
- </items>
- <accessibility>
- <relation type="labelled-by" target="date"/>
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="datecond-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">Date Condition</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="and">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">a_nd</property>
+ <property name="use_underline">True</property>
+ <property name="ellipsize">end</property>
+ </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="GtkSpinButton" id="startdate:yy:mm:dd">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">adjustment1</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="startdate:yy:mm:dd-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">Start Date</property>
+ </object>
+ </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>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="starttime:hh:mm">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="starttime:hh:mm-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">Start Time</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <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>
+ <object class="GtkButton" id="startclock">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Set current time and date</property>
+ <property name="tooltip_text" translatable="yes">Set current time and date</property>
+ <property name="image">image1</property>
+ </object>
+ <packing>
+ <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="GtkSpinButton" id="enddate:yy:mm:dd">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">adjustment1</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="enddate:yy:mm:dd-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">End Date</property>
+ </object>
+ </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>
+ <child>
+ <object class="GtkSpinButton" id="endtime:hh:mm">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="endtime:hh:mm-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">End Time</property>
+ </object>
+ </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="GtkButton" id="endclock">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Set current time and date</property>
+ <property name="tooltip_text" translatable="yes">Set current time and date</property>
+ <property name="image">image2</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</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">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="startclock">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Set current time and date</property>
- <property name="image">image1</property>
- </object>
- <packing>
- <property name="left_attach">4</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="endclock">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Set current time and date</property>
- <property name="image">image1</property>
- </object>
- <packing>
- <property name="left_attach">4</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="range">
- <property name="label" translatable="yes">_Range:</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <accessibility>
- <relation type="label-for" target="rangeedit"/>
- </accessibility>
- </object>
- <packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="dotdotdot">
- <property name="label">...</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Set reference</property>
- </object>
- <packing>
- <property name="left_attach">4</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="rangeedit">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">•</property>
- <accessibility>
- <relation type="labelled-by" target="range"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- <property name="width">3</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
+ </object>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">19851231</property>
+ <property name="upper">20501231</property>
+ <property name="value">19851231</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">sc/res/time.png</property>
+ </object>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">sc/res/time.png</property>
</object>
</interface>
commit 90aa0aa54a03e5873cfa46c8679322b3e8090eea
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Dec 18 10:30:59 2014 +0100
changes sidebar: Limit it to Writer only for now.
Change-Id: Id8cc814853b820b2c148d8ab88b4709b0994f7c4
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 862f2ed..f493256 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -193,7 +193,11 @@
</prop>
<prop oor:name="ContextList">
<value oor:separator=";">
- any, any, visible ;
+ WriterVariants, Annotation, visible ;
+ WriterVariants, DrawText, visible ;
+ WriterVariants, Table, visible ;
+ WriterVariants, Text, visible ;
+ WriterVariants, default, visible ;
</value>
</prop>
<prop oor:name="OrderIndex" oor:type="xs:int">
commit e5d87682c894c3de5b3553c5cee1193f063e017f
Author: Jan Holesovsky <kendy at collabora.com>
Date: Mon Nov 24 02:16:39 2014 +0100
changes sidebar: Manage Changes (Redlining) panel instead of the dialog box.
Change-Id: I4fd415845e2732ee8ef0567b8c58b878bb52fac8
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index eca260a..8d0f3191 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -314,7 +314,7 @@ private:
DECL_LINK( PbClickHdl, PushButton* );
public:
- SvxTPView(vcl::Window * pParent);
+ SvxTPView(vcl::Window * pParent, VclBuilderContainer *pTopLevel);
virtual ~SvxTPView();
void InsertWriterHeader();
@@ -373,7 +373,7 @@ private:
sal_uInt16 m_nFilterPageId;
public:
- SvxAcceptChgCtr(vcl::Window* pParent);
+ SvxAcceptChgCtr(vcl::Window* pParent, VclBuilderContainer* pTopLevel);
virtual ~SvxAcceptChgCtr();
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index e8c42d5..862f2ed 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -181,6 +181,26 @@
</prop>
</node>
+ <node oor:name="ManageChangesDeck" oor:op="replace">
+ <prop oor:name="Title" oor:type="xs:string">
+ <value xml:lang="en-US">Manage Changes</value>
+ </prop>
+ <prop oor:name="Id" oor:type="xs:string">
+ <value>ManageChangesDeck</value>
+ </prop>
+ <prop oor:name="IconURL" oor:type="xs:string">
+ <value>private:graphicrepository/cmd/lc_accepttrackedchanges.png</value>
+ </prop>
+ <prop oor:name="ContextList">
+ <value oor:separator=";">
+ any, any, visible ;
+ </value>
+ </prop>
+ <prop oor:name="OrderIndex" oor:type="xs:int">
+ <value>600</value>
+ </prop>
+ </node>
+
</node>
<node oor:name="PanelList">
@@ -875,6 +895,35 @@
</prop>
</node>
+ <node oor:name="SwManageChangesPanel" oor:op="replace">
+ <prop oor:name="Title" oor:type="xs:string">
+ <value xml:lang="en-US">Manage Changes</value>
+ </prop>
+ <prop oor:name="TitleBarIsOptional" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ShowForReadOnlyDocument" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Id" oor:type="xs:string">
+ <value>SwManageChangesPanel</value>
+ </prop>
+ <prop oor:name="DeckId" oor:type="xs:string">
+ <value>ManageChangesDeck</value>
+ </prop>
+ <prop oor:name="ContextList">
+ <value oor:separator=";">
+ WriterVariants, any, visible ;
+ </value>
+ </prop>
+ <prop oor:name="ImplementationURL" oor:type="xs:string">
+ <value>private:resource/toolpanel/SwPanelFactory/ManageChangesPanel</value>
+ </prop>
+ <prop oor:name="OrderIndex" oor:type="xs:int">
+ <value>100</value>
+ </prop>
+ </node>
+
<node oor:name="StyleListPanel" oor:op="replace">
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="en-US">Styles and Formatting</value>
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index dff8ae6..30831f5 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -111,7 +111,7 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window
bHasFilterEntry(false),
bUseColor(false)
{
- m_pAcceptChgCtr = new SvxAcceptChgCtr(get_content_area());
+ m_pAcceptChgCtr = new SvxAcceptChgCtr(get_content_area(), this);
nAcceptCount=0;
nRejectCount=0;
aReOpenIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM);
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index e88c880..bc3546e 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -374,7 +374,7 @@ void SvxRedlinTable::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
}
}
-SvxTPView::SvxTPView(vcl::Window * pParent)
+SvxTPView::SvxTPView(vcl::Window *pParent, VclBuilderContainer *pTopLevel)
: TabPage(pParent, "RedlineViewPage", "svx/ui/redlineviewpage.ui")
, bEnableAccept(true)
, bEnableAcceptAll(true)
@@ -382,7 +382,6 @@ SvxTPView::SvxTPView(vcl::Window * pParent)
, bEnableRejectAll(true)
, bEnableUndo(true)
{
- Dialog *pTopLevel = GetParentDialog();
pTopLevel->get(m_pAccept, "accept");
pTopLevel->get(m_pReject, "reject");
pTopLevel->get(m_pAcceptAll, "acceptall");
@@ -1056,13 +1055,13 @@ IMPL_LINK( SvxTPFilter, RefHandle, PushButton*, pRef )
return 0;
}
-SvxAcceptChgCtr::SvxAcceptChgCtr(vcl::Window* pParent)
+SvxAcceptChgCtr::SvxAcceptChgCtr(vcl::Window* pParent, VclBuilderContainer* pTopLevel)
: TabControl(pParent, WB_TABSTOP | WB_DIALOGCONTROL)
{
m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "svx/ui/redlinecontrol.ui", "RedlineControl");
pTPFilter = new SvxTPFilter(this);
- pTPView = new SvxTPView(this);
+ pTPView = new SvxTPView(this, pTopLevel);
m_nViewPageId = GetPageId("view");
m_nFilterPageId = GetPageId("filter");
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index dbfb7d4..706f876 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -170,6 +170,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/querysavelabeldialog \
sw/uiconfig/swriter/ui/queryshowchangesdialog \
sw/uiconfig/swriter/ui/mailmerge \
+ sw/uiconfig/swriter/ui/managechangessidebar \
sw/uiconfig/swriter/ui/mmaddressblockpage \
sw/uiconfig/swriter/ui/mmcreatingdialog \
sw/uiconfig/swriter/ui/mmlayoutpage \
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 11475e7..dc9c786 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -18,6 +18,7 @@
*/
#include <redline.hxx>
+#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx>
#include <svl/eitem.hxx>
#include <sfx2/viewfrm.hxx>
@@ -46,7 +47,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(vcl::Window *pParent)
: SfxModalDialog(pParent,
"AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui")
{
- pImplDlg = new SwRedlineAcceptDlg(this, true);
+ pImplDlg = new SwRedlineAcceptDlg(this, get_content_area(), true);
pImplDlg->Initialize(GetExtraData());
pImplDlg->Activate(); // for data's initialisation
diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx
index b949299..9e31d25 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -24,6 +24,7 @@
#include <tools/datetime.hxx>
#include <vcl/msgbox.hxx>
#include <svl/eitem.hxx>
+#include <svx/sidebar/PanelLayout.hxx>
#include <sfx2/basedlgs.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
@@ -66,7 +67,7 @@ typedef std::vector<SvLBoxEntryPtr> SvLBoxEntryArr;
class SW_DLLPUBLIC SwRedlineAcceptDlg
{
- Dialog* pParentDlg;
+ vcl::Window* pParentDlg;
SwRedlineDataParentArr aRedlineParents;
SwRedlineDataChildArr aRedlineChildren;
SwRedlineDataParentSortArr aUsedSeqNo;
@@ -113,7 +114,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
SAL_DLLPRIVATE sal_uInt16 GetRedlinePos( const SvTreeListEntry& rEntry) const;
public:
- SwRedlineAcceptDlg(Dialog *pParent, bool bAutoFmt = false);
+ SwRedlineAcceptDlg(vcl::Window *pParent, vcl::Window *pContentArea, bool bAutoFmt = false);
virtual ~SwRedlineAcceptDlg();
DECL_LINK( FilterChangedHdl, void *pDummy = 0 );
@@ -157,6 +158,19 @@ public:
virtual bool ReInitDlg(SwDocShell *pDocSh) SAL_OVERRIDE;
};
+/// Redline (Manage Changes) panel for the sidebar.
+class SwRedlineAcceptPanel : public PanelLayout, public SfxListener
+{
+ SwRedlineAcceptDlg* mpImplDlg;
+public:
+ SwRedlineAcceptPanel(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame);
+ virtual ~SwRedlineAcceptPanel();
+
+ /// We need to be a SfxListener to be able to update the list of changes when we get SFX_HINT_DOCCHANGED.
+ using Control::Notify;
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) SAL_OVERRIDE;
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index b13e30d..c830d1a 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -89,7 +89,7 @@ SwModelessRedlineAcceptDlg::SwModelessRedlineAcceptDlg(
"AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui")
, pChildWin (pChild)
{
- pImplDlg = new SwRedlineAcceptDlg(this);
+ pImplDlg = new SwRedlineAcceptDlg(this, get_content_area());
}
void SwModelessRedlineAcceptDlg::Activate()
@@ -141,9 +141,9 @@ SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
delete pImplDlg;
}
-SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, bool bAutoFmt) :
+SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, vcl::Window *pContentArea, bool bAutoFmt) :
pParentDlg (pParent),
- aTabPagesCTRL (pParent->get_content_area()),
+ aTabPagesCTRL (pContentArea, dynamic_cast<VclBuilderContainer*>(pParent)),
aPopup (SW_RES(MN_REDLINE_POPUP)),
sInserted (SW_RES(STR_REDLINE_INSERTED)),
sDeleted (SW_RES(STR_REDLINE_DELETED)),
@@ -1206,4 +1206,29 @@ void SwRedlineAcceptDlg::FillInfo(OUString &rExtraData) const
rExtraData += ")";
}
+SwRedlineAcceptPanel::SwRedlineAcceptPanel(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame)
+ : PanelLayout(pParent, "ManageChangesPanel", "modules/swriter/ui/managechangessidebar.ui", rFrame)
+{
+ mpImplDlg = new SwRedlineAcceptDlg(this, get<VclGrid>("content_area"));
+
+ mpImplDlg->Init();
+
+ // we want to receive SFX_HINT_DOCCHANGED
+ StartListening(*(SW_MOD()->GetView()->GetDocShell()));
+}
+
+SwRedlineAcceptPanel::~SwRedlineAcceptPanel()
+{
+ delete mpImplDlg;
+}
+
+void SwRedlineAcceptPanel::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
+{
+ const SfxSimpleHint *pHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if (pHint && pHint->GetId() == SFX_HINT_DOCCHANGED)
+ {
+ mpImplDlg->Activate();
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index 4acd661..20e2296 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -22,6 +22,7 @@
#include <PagePropertyPanel.hxx>
#include <WrapPropertyPanel.hxx>
#include <navipi.hxx>
+#include <redlndlg.hxx>
#include <sfx2/sidebar/SidebarPanelBase.hxx>
#include <sfx2/sfxbasecontroller.hxx>
@@ -129,6 +130,15 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement (
pPanel,
ui::LayoutSize(0,-1,-1));
}
+ else if (rsResourceURL.endsWith("/ManageChangesPanel"))
+ {
+ vcl::Window* pPanel = new SwRedlineAcceptPanel(pParentWindow, xFrame);
+ xElement = sfx2::sidebar::SidebarPanelBase::Create(
+ rsResourceURL,
+ xFrame,
+ pPanel,
+ ui::LayoutSize(-1,-1,-1));
+ }
return xElement;
}
diff --git a/sw/uiconfig/swriter/ui/managechangessidebar.ui b/sw/uiconfig/swriter/ui/managechangessidebar.ui
new file mode 100644
index 0000000..98a3d7a
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/managechangessidebar.ui
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkGrid" id="ManageChangesPanel">
+ <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="GtkBox" id="box9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkGrid" id="content_area">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkButton" id="accept">
+ <property name="label" translatable="yes">_Accept</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </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="GtkButton" id="reject">
+ <property name="label" translatable="yes">_Reject</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">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>
+ <child>
+ <object class="GtkButton" id="acceptall">
+ <property name="label" translatable="yes">A_ccept All</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </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="GtkButton" id="rejectall">
+ <property name="label" translatable="yes">R_eject All</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </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>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkButton" id="undo">
+ <property name="label">gtk-undo</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</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">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>
commit 2125868dad4b1e8f9318367b47938ad7e8afeebb
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Dec 19 12:52:48 2014 +0100
Fix build.
Change-Id: I27b602e829041f0ce7294e4debcc6669712912f7
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index f3cdb1f..5fb30f0 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -2702,7 +2702,7 @@ Sequence< ::com::sun::star::util::URL>& FmXGridPeer::getSupportedURLs()
static Sequence< ::com::sun::star::util::URL> aSupported;
if (aSupported.getLength() == 0)
{
- static const OUString sSupported[] = {
+ static const char* sSupported[] = {
FMURL_RECORD_MOVEFIRST,
FMURL_RECORD_MOVEPREV,
FMURL_RECORD_MOVENEXT,
@@ -2715,7 +2715,7 @@ Sequence< ::com::sun::star::util::URL>& FmXGridPeer::getSupportedURLs()
sal_uInt16 i;
for ( i = 0; i < aSupported.getLength(); ++i, ++pSupported)
- pSupported->Complete = sSupported[i];
+ pSupported->Complete = OUString::createFromAscii(sSupported[i]);
// let an ::com::sun::star::util::URL-transformer normalize the URLs
Reference< ::com::sun::star::util::XURLTransformer > xTransformer(
More information about the Libreoffice-commits
mailing list