summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/ctredlin.hxx4
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu49
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--svx/source/dialog/ctredlin.cxx7
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx3
-rw-r--r--sw/source/uibase/inc/redlndlg.hxx18
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx31
-rw-r--r--sw/source/uibase/sidebar/SwPanelFactory.cxx10
-rw-r--r--sw/uiconfig/swriter/ui/managechangessidebar.ui143
10 files changed, 255 insertions, 13 deletions
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index eca260ae844a..8d0f31915525 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 e8c42d5586f4..862f2edf13bd 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 dff8ae688150..30831f5ea57f 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 e88c880d6ee3..bc3546e2bd44 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 dbfb7d4b578e..706f87644a7e 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 11475e7af8cf..dc9c786adb41 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 b949299b14d2..9e31d25ceab9 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 b13e30d6561f..c830d1a7d7b8 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 4acd66138d11..20e2296e91e5 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 000000000000..98a3d7a30744
--- /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>