Kaydet (Commit) ac522d12 authored tarafından Jan Holesovsky's avatar Jan Holesovsky Kaydeden (comit) Miklos Vajna

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
üst 7b93b5e9
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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
}
}
......
<?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>
<?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>
<?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>
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment