summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-12-18 12:21:40 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-03-18 09:13:56 +0100
commitac522d12b6e10b04f1c62709a96673062fdd000a (patch)
treeb6436365379ecc2b9763859946ce1498a2ac3eb7
parent7b93b5e96af5427ab4d909e09b7ea98c8600a014 (diff)
mailmerge: Introduce a mailmerge toolbar.
So far contains just a button to start the mailmerge wizard, and it is shown when the mailmerge wizard starts. The plan is that the last 3 steps (Edit document; Personalize document; Save, print or send) will be removed from the wizard, and instead introduced in the mailmerge toolbar. Change-Id: I3a55a5b3b8a73bc6775579ac42c4ae30c6c9bac6
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu20
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu20
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu20
-rw-r--r--sw/UIConfig_swform.mk1
-rw-r--r--sw/UIConfig_swreport.mk1
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/UIConfig_swxform.mk1
-rw-r--r--sw/source/uibase/app/apphdl.cxx28
-rw-r--r--sw/uiconfig/swform/toolbar/mailmerge.xml12
-rw-r--r--sw/uiconfig/swreport/toolbar/mailmerge.xml12
-rw-r--r--sw/uiconfig/swriter/toolbar/mailmerge.xml12
-rw-r--r--sw/uiconfig/swxform/toolbar/mailmerge.xml12
12 files changed, 139 insertions, 1 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu
index e273ec0cdbdf..62546760b8c5 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu
@@ -123,6 +123,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/mailmerge" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,2</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Mail Merge</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/toolbar" oor:op="replace">
<prop oor:name="Docked" oor:type="xs:boolean">
<value>false</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu
index 8d7cae8eadf2..4cc23c366173 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu
@@ -123,6 +123,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/mailmerge" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,2</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Mail Merge</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/toolbar" oor:op="replace">
<prop oor:name="Docked" oor:type="xs:boolean">
<value>false</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
index 5cdb74bb276b..f1e4972b00b1 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
@@ -143,6 +143,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/mailmerge" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,2</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Mail Merge</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/toolbar" oor:op="replace">
<prop oor:name="Docked" oor:type="xs:boolean">
<value>false</value>
diff --git a/sw/UIConfig_swform.mk b/sw/UIConfig_swform.mk
index c11d85ae45f9..4ca2f95fc2f7 100644
--- a/sw/UIConfig_swform.mk
+++ b/sw/UIConfig_swform.mk
@@ -59,6 +59,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swform,\
sw/uiconfig/swform/toolbar/graphicobjectbar \
sw/uiconfig/swform/toolbar/insertbar \
sw/uiconfig/swform/toolbar/insertobjectbar \
+ sw/uiconfig/swform/toolbar/mailmerge \
sw/uiconfig/swform/toolbar/mediaobjectbar \
sw/uiconfig/swform/toolbar/moreformcontrols \
sw/uiconfig/swform/toolbar/numobjectbar \
diff --git a/sw/UIConfig_swreport.mk b/sw/UIConfig_swreport.mk
index 061dd92655a8..fe9789e3ea51 100644
--- a/sw/UIConfig_swreport.mk
+++ b/sw/UIConfig_swreport.mk
@@ -59,6 +59,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swreport,\
sw/uiconfig/swreport/toolbar/graphicobjectbar \
sw/uiconfig/swreport/toolbar/insertbar \
sw/uiconfig/swreport/toolbar/insertobjectbar \
+ sw/uiconfig/swreport/toolbar/mailmerge \
sw/uiconfig/swreport/toolbar/mediaobjectbar \
sw/uiconfig/swreport/toolbar/moreformcontrols \
sw/uiconfig/swreport/toolbar/numobjectbar \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index c85d90dce099..46a1db2f815f 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -62,6 +62,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swriter,\
sw/uiconfig/swriter/toolbar/graphicobjectbar \
sw/uiconfig/swriter/toolbar/insertbar \
sw/uiconfig/swriter/toolbar/linesbar \
+ sw/uiconfig/swriter/toolbar/mailmerge \
sw/uiconfig/swriter/toolbar/mediaobjectbar \
sw/uiconfig/swriter/toolbar/moreformcontrols \
sw/uiconfig/swriter/toolbar/navigationobjectbar \
diff --git a/sw/UIConfig_swxform.mk b/sw/UIConfig_swxform.mk
index 67a061a364da..59bc4f25fc29 100644
--- a/sw/UIConfig_swxform.mk
+++ b/sw/UIConfig_swxform.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swxform,\
sw/uiconfig/swxform/toolbar/graphicobjectbar \
sw/uiconfig/swxform/toolbar/insertbar \
sw/uiconfig/swxform/toolbar/insertobjectbar \
+ sw/uiconfig/swxform/toolbar/mailmerge \
sw/uiconfig/swxform/toolbar/mediaobjectbar \
sw/uiconfig/swxform/toolbar/moreformcontrols \
sw/uiconfig/swxform/toolbar/numobjectbar \
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index ab8ba8cd8d00..daa58c198931 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -87,6 +87,7 @@
#include <editeng/unolingu.hxx>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -672,11 +673,36 @@ void SwModule::ExecOther(SfxRequest& rReq)
#if HAVE_FEATURE_DBCONNECTIVITY
case FN_MAILMERGE_WIZARD:
{
+ // show the mailmerge wizard
rtl::Reference< SwMailMergeWizardExecutor > xEx( new SwMailMergeWizardExecutor );
xEx->ExecuteMailMergeWizard( pArgs );
+
+ // show the mailmerge toolbar
+ SwView* pView = ::GetActiveView();
+ if (!pView)
+ return;
+
+ uno::Reference<beans::XPropertySet> xPropSet(pView->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY);
+ if (!xPropSet.is())
+ return;
+
+ uno::Reference<frame::XLayoutManager> xLayoutManager;
+ uno::Any aValue = xPropSet->getPropertyValue("LayoutManager");
+ aValue >>= xLayoutManager;
+ if (!xLayoutManager.is())
+ return;
+
+ const OUString sResourceURL( "private:resource/toolbar/mailmerge" );
+ uno::Reference<ui::XUIElement> xUIElement = xLayoutManager->getElement(sResourceURL);
+ if (!xUIElement.is())
+ {
+ // do the work, finally
+ xLayoutManager->createElement(sResourceURL);
+ xLayoutManager->showElement(sResourceURL);
+ }
}
-#endif
break;
+#endif
}
}
diff --git a/sw/uiconfig/swform/toolbar/mailmerge.xml b/sw/uiconfig/swform/toolbar/mailmerge.xml
new file mode 100644
index 000000000000..f80aeb421d66
--- /dev/null
+++ b/sw/uiconfig/swform/toolbar/mailmerge.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+-->
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeWizard"/>
+</toolbar:toolbar>
diff --git a/sw/uiconfig/swreport/toolbar/mailmerge.xml b/sw/uiconfig/swreport/toolbar/mailmerge.xml
new file mode 100644
index 000000000000..f80aeb421d66
--- /dev/null
+++ b/sw/uiconfig/swreport/toolbar/mailmerge.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+-->
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeWizard"/>
+</toolbar:toolbar>
diff --git a/sw/uiconfig/swriter/toolbar/mailmerge.xml b/sw/uiconfig/swriter/toolbar/mailmerge.xml
new file mode 100644
index 000000000000..f80aeb421d66
--- /dev/null
+++ b/sw/uiconfig/swriter/toolbar/mailmerge.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+-->
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeWizard"/>
+</toolbar:toolbar>
diff --git a/sw/uiconfig/swxform/toolbar/mailmerge.xml b/sw/uiconfig/swxform/toolbar/mailmerge.xml
new file mode 100644
index 000000000000..f80aeb421d66
--- /dev/null
+++ b/sw/uiconfig/swxform/toolbar/mailmerge.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+-->
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeWizard"/>
+</toolbar:toolbar>