[Libreoffice-commits] core.git: Branch 'feature/mailmerge-toolbar' - 241 commits - accessibility/inc accessibility/Library_acc.mk accessibility/source avmedia/source basic/source bin/distro-install-file-lists bridges/source canvas/source chart2/source comphelper/source compilerplugins/clang config_host/config_writerperfect.h.in config_host.mk.in configure.ac connectivity/source cui/Library_cui.mk cui/source cui/uiconfig dbaccess/Library_dba.mk dbaccess/source desktop/source drawinglayer/source editeng/source embeddedobj/source extensions/Executable_pluginapp.bin.mk extensions/Library_pl.mk extensions/Module_extensions.mk extensions/source extensions/StaticLibrary_plugcon.mk external/cairo external/libxslt external/np_sdk filter/source forms/source formula/source framework/inc framework/source helpcontent2 i18nutil/source icon-themes/breeze icon-themes/crystal icon-themes/elementary icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/industrial icon-themes/oxygen icon-themes/si fr icon-themes/tango icon-themes/tango_testing idl/inc include/canvas include/comphelper include/drawinglayer include/editeng include/formula include/framework include/LibreOfficeKit include/oox include/rtl include/sfx2 include/svl include/svtools include/svx include/test include/tools include/unotools include/vcl include/xmloff javaunohelper/com l10ntools/source libreofficekit/qa libreofficekit/source lingucomponent/source linguistic/source lotuswordpro/source m4/libo_pkg_version.m4 mysqlc/source offapi/com offapi/type_reference offapi/UnoApi_offapi.mk officecfg/registry oox/inc oox/source package/source qadevOOo/runner qadevOOo/tests README.cross registry/source reportdesign/inc reportdesign/source RepositoryExternal.mk Repository.mk sal/osl sal/rtl sc/AllLangResTarget_sc.mk sc/inc scp2/source sc/qa scripting/source sc/source sc/uiconfig sc/UIConfig_scalc.mk sdext/source sd/inc sd/qa sd/sdi sd/source sd/uiconfig sfx2/AllLangResTarget_sfx2.mk sfx2/inc sfx2/Library_sfx.mk sfx2/sdi s fx2/source sfx2/uiconfig sfx2/util shell/Module_shell.mk shell/Package_scripts_gnome.mk shell/source slideshow/source solenv/maven starmath/inc starmath/source starmath/uiconfig stoc/source store/source svl/source svtools/AllLangResTarget_svt.mk svtools/inc svtools/Library_svt.mk svtools/source svx/inc svx/Library_svx.mk svx/source svx/uiconfig sw/CppunitTest_sw_globalfilter.mk sw/CppunitTest_sw_odfexport.mk sw/CppunitTest_sw_odfimport.mk sw/CppunitTest_sw_ooxmlfieldexport.mk sw/CppunitTest_sw_ooxmlimport.mk sw/CppunitTest_sw_ooxmlw14export.mk sw/CppunitTest_sw_rtfexport.mk sw/CppunitTest_sw_rtfimport.mk sw/CppunitTest_sw_ww8import.mk sw/inc sw/JunitTest_sw_complex.mk sw/ooxmlexport_setup.mk sw/PythonTest_sw_python.mk sw/qa sw/sdi sw/source sw/uiconfig sw/UIConfig_swform.mk sw/UIConfig_swreport.mk sw/UIConfig_swriter.mk sw/UIConfig_swxform.mk sysui/desktop test/source toolkit/qa tools/Library_tl.mk tools/source ucb/Library_ucpdav1.mk ucb/source UnoControls/source unotools/source uno xml/source unusedcode.easy unusedcode.exclude vbahelper/inc vbahelper/source vcl/headless vcl/inc vcl/ios vcl/opengl vcl/osx vcl/source vcl/unx vcl/win writerfilter/source writerperfect/CppunitTest_writerperfect_calc.mk writerperfect/CppunitTest_writerperfect_draw.mk writerperfect/CppunitTest_writerperfect_impress.mk writerperfect/CppunitTest_writerperfect_writer.mk writerperfect/inc writerperfect/qa writerperfect/source xmlhelp/source xmloff/inc xmloff/source xmlscript/source xmlsecurity/source
Jan Holesovsky
kendy at collabora.com
Wed Dec 23 01:58:03 PST 2015
Rebased ref, commits from common ancestor:
commit bb6cde1a70efaa595fec383e0c26def663736ff4
Author: Jan Holesovsky <kendy at collabora.com>
Date: Wed Dec 23 10:43:39 2015 +0100
mailmerge: Icon for the Mail Merge Wizard too.
Change-Id: Iae5f6d12a2593249a693ceae894fc864887d0ae9
diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index 05d232d..9fcfbf3 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -463,6 +463,8 @@ cmd/sc_xlinestyle.png cmd/sc_linestyle.png
cmd/sc_hfixedline.png cmd/sc_line.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
diff --git a/icon-themes/crystal/links.txt b/icon-themes/crystal/links.txt
index 4bce143..6642c92 100644
--- a/icon-themes/crystal/links.txt
+++ b/icon-themes/crystal/links.txt
@@ -10,6 +10,8 @@ cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
diff --git a/icon-themes/elementary/links.txt b/icon-themes/elementary/links.txt
index 0db296f..c337c31 100644
--- a/icon-themes/elementary/links.txt
+++ b/icon-themes/elementary/links.txt
@@ -624,6 +624,8 @@ vcl/source/src/msgbox.png vcl/res/msgbox.png
xmlsecurity/res/signet_11x16.png svx/res/signet_11x16.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
diff --git a/icon-themes/galaxy/links.txt b/icon-themes/galaxy/links.txt
index 687dac5..d068ec2 100644
--- a/icon-themes/galaxy/links.txt
+++ b/icon-themes/galaxy/links.txt
@@ -88,6 +88,8 @@ cmd/sc_showgraphics.png cmd/sc_graphic.png
svtools/res/folderop.png formula/res/fapopen.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
diff --git a/icon-themes/hicontrast/links.txt b/icon-themes/hicontrast/links.txt
index 3ed8eb0..8147de1 100644
--- a/icon-themes/hicontrast/links.txt
+++ b/icon-themes/hicontrast/links.txt
@@ -11,6 +11,8 @@ svtools/res/folder.png formula/res/fapclose.png
svtools/res/folderop.png formula/res/fapopen.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
diff --git a/icon-themes/human/links.txt b/icon-themes/human/links.txt
index d3155a6..4f782ab 100644
--- a/icon-themes/human/links.txt
+++ b/icon-themes/human/links.txt
@@ -13,6 +13,8 @@ cmd/lc_charbackcolor.png cmd/lc_backcolor.png
svtools/res/folderop.png formula/res/fapopen.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
diff --git a/icon-themes/oxygen/links.txt b/icon-themes/oxygen/links.txt
index 4bce143..6642c92 100644
--- a/icon-themes/oxygen/links.txt
+++ b/icon-themes/oxygen/links.txt
@@ -10,6 +10,8 @@ cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
diff --git a/icon-themes/sifr/links.txt b/icon-themes/sifr/links.txt
index 61a545a..55d5d7c 100644
--- a/icon-themes/sifr/links.txt
+++ b/icon-themes/sifr/links.txt
@@ -155,6 +155,8 @@ cmd/lc_insertcolumnsafter.png cmd/lc_insertcolumns.png
cmd/sc_insertcolumnsafter.png cmd/sc_insertcolumns.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
diff --git a/icon-themes/tango/links.txt b/icon-themes/tango/links.txt
index afb2f94..abf6d53 100644
--- a/icon-themes/tango/links.txt
+++ b/icon-themes/tango/links.txt
@@ -539,6 +539,8 @@ cmd/sc_showgraphics.png cmd/sc_insertgraphic.png
cmd/lc_showgraphics.png cmd/lc_insertgraphic.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
diff --git a/icon-themes/tango_testing/links.txt b/icon-themes/tango_testing/links.txt
index 8746aeb..147c5f1 100644
--- a/icon-themes/tango_testing/links.txt
+++ b/icon-themes/tango_testing/links.txt
@@ -38,6 +38,8 @@ cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
# Mail merge
+cmd/lc_mailmergewizard.png cmd/lc_dsbformletter.png
+cmd/sc_mailmergewizard.png cmd/sc_dsbformletter.png
cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
commit 4884f76a39f30246fa0cc0efc73c25d16f30cb6f
Author: Jan Holesovsky <kendy at collabora.com>
Date: Wed Dec 23 10:21:07 2015 +0100
mailmerge: Really show the icons for first/prev/next/last mailmerge entry.
Change-Id: I101b39fb12746902399fe3e40f6ec589836b9b2f
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index fa7dcd0..6df35bb 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -488,26 +488,41 @@
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Mail Merge Wi~zard...</value>
</prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
</node>
<node oor:name=".uno:MailMergeFirstEntry" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">First Mail Merge Entry</value>
</prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
</node>
<node oor:name=".uno:MailMergePrevEntry" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Previous Mail Merge Entry</value>
</prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
</node>
<node oor:name=".uno:MailMergeNextEntry" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Next Mail Merge Entry</value>
</prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
</node>
<node oor:name=".uno:MailMergeLastEntry" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Last Mail Merge Entry</value>
</prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
</node>
<node oor:name=".uno:SetAnchorToFrame" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
commit 47110e638af3644f6d80467973046ccc9725e880
Author: Jan Holesovsky <kendy at collabora.com>
Date: Tue Dec 22 12:40:20 2015 +0100
mailmerge: Icons for the first/prev/next/last mailmerge entry buttons.
Change-Id: I7187a228ac93ba502ca325a1dacd27207d3d3d86
diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index 8bbffb5..05d232d 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -462,6 +462,16 @@ cmd/lc_hfixedline.png cmd/lc_line.png
cmd/sc_xlinestyle.png cmd/sc_linestyle.png
cmd/sc_hfixedline.png cmd/sc_line.png
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
+
# Arrows
cmd/lc_arrowstoolbox.png cmd/lc_linearrowend.png
cmd/sc_arrowstoolbox.png cmd/sc_linearrowend.png
diff --git a/icon-themes/crystal/links.txt b/icon-themes/crystal/links.txt
index 3e7c8a7..4bce143 100644
--- a/icon-themes/crystal/links.txt
+++ b/icon-themes/crystal/links.txt
@@ -8,3 +8,13 @@ cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
+
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
diff --git a/icon-themes/elementary/links.txt b/icon-themes/elementary/links.txt
index 035a2a0..0db296f 100644
--- a/icon-themes/elementary/links.txt
+++ b/icon-themes/elementary/links.txt
@@ -622,3 +622,13 @@ sw/res/styfamnu.png sw/imglst/sf05.png
vcl/res/closedoc.png sfx2/res/closedoc.png
vcl/source/src/msgbox.png vcl/res/msgbox.png
xmlsecurity/res/signet_11x16.png svx/res/signet_11x16.png
+
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
diff --git a/icon-themes/galaxy/links.txt b/icon-themes/galaxy/links.txt
index 6539986..687dac5 100644
--- a/icon-themes/galaxy/links.txt
+++ b/icon-themes/galaxy/links.txt
@@ -86,3 +86,13 @@ cmd/sc_showgraphics.png cmd/sc_graphic.png
# FolderTree expanded icon
svtools/res/folderop.png formula/res/fapopen.png
+
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
diff --git a/icon-themes/hicontrast/links.txt b/icon-themes/hicontrast/links.txt
index ea11b2a..3ed8eb0 100644
--- a/icon-themes/hicontrast/links.txt
+++ b/icon-themes/hicontrast/links.txt
@@ -9,3 +9,13 @@ cmd/lc_charbackcolor.png cmd/lc_backcolor.png
# FolderTree icons
svtools/res/folder.png formula/res/fapclose.png
svtools/res/folderop.png formula/res/fapopen.png
+
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
diff --git a/icon-themes/human/links.txt b/icon-themes/human/links.txt
index 5b1aca0..d3155a6 100644
--- a/icon-themes/human/links.txt
+++ b/icon-themes/human/links.txt
@@ -11,3 +11,13 @@ cmd/lc_charbackcolor.png cmd/lc_backcolor.png
# FolderTree expanded icon
svtools/res/folderop.png formula/res/fapopen.png
+
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
diff --git a/icon-themes/oxygen/links.txt b/icon-themes/oxygen/links.txt
index 3e7c8a7..4bce143 100644
--- a/icon-themes/oxygen/links.txt
+++ b/icon-themes/oxygen/links.txt
@@ -8,3 +8,13 @@ cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
+
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
diff --git a/icon-themes/sifr/links.txt b/icon-themes/sifr/links.txt
index 160f85b..61a545a 100644
--- a/icon-themes/sifr/links.txt
+++ b/icon-themes/sifr/links.txt
@@ -154,3 +154,12 @@ cmd/sc_insertrowsafter.png cmd/sc_insertrows.png
cmd/lc_insertcolumnsafter.png cmd/lc_insertcolumns.png
cmd/sc_insertcolumnsafter.png cmd/sc_insertcolumns.png
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
diff --git a/icon-themes/tango/links.txt b/icon-themes/tango/links.txt
index ec67d4a..afb2f94 100644
--- a/icon-themes/tango/links.txt
+++ b/icon-themes/tango/links.txt
@@ -537,3 +537,13 @@ cmd/lc_charbackcolor.png cmd/lc_backcolor.png
# Toggle graphics visibility in Writer
cmd/sc_showgraphics.png cmd/sc_insertgraphic.png
cmd/lc_showgraphics.png cmd/lc_insertgraphic.png
+
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
diff --git a/icon-themes/tango_testing/links.txt b/icon-themes/tango_testing/links.txt
index e1d25ff..8746aeb 100644
--- a/icon-themes/tango_testing/links.txt
+++ b/icon-themes/tango_testing/links.txt
@@ -36,3 +36,13 @@ cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
+
+# Mail merge
+cmd/lc_mailmergefirstentry.png cmd/lc_firstrecord.png
+cmd/sc_mailmergefirstentry.png cmd/sc_firstrecord.png
+cmd/lc_mailmergelastentry.png cmd/lc_lastrecord.png
+cmd/sc_mailmergelastentry.png cmd/sc_lastrecord.png
+cmd/lc_mailmergenextentry.png cmd/lc_nextrecord.png
+cmd/sc_mailmergenextentry.png cmd/sc_nextrecord.png
+cmd/lc_mailmergepreventry.png cmd/lc_prevrecord.png
+cmd/sc_mailmergepreventry.png cmd/sc_prevrecord.png
commit 17200dbfdf732d6e1fe99406a8a8b80d614c4d74
Author: Jan Holesovsky <kendy at collabora.com>
Date: Tue Dec 22 07:37:07 2015 +0100
mailmerge: Make the SwMailMergeConfigItem instance long-living.
In order for the toolbar to work, we need the SwMailMergeConfigItem instance
in the view living even when the mail merge wizard is not around.
With this change, there's a small glitch that the SwMailMergeChildWindow
sometimes stays open even when we leave the wizard, but I plan to remove this
window / button anyway, so no real harm at the moment.
Change-Id: I2bf0c49504b9cf2f17f6fce7ab4cab7cb5be6426
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index eaf6d5f..4faa0bc 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -906,7 +906,6 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, PrintHdl_Impl, Button*, void)
pTargetView->ExecPrint( aProps, false, true );
SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), pObjSh));
- pTargetView->SetMailMergeConfigItem(nullptr, 0, false);
m_pWizard->enableButtons(WizardButtonFlags::CANCEL, true);
m_pWizard->enableButtons(WizardButtonFlags::FINISH, true);
}
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 62271cc..327201c 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -209,7 +209,9 @@ void SwModule::StateOther(SfxItemSet &rSet)
{
SwView* pView = ::GetActiveView();
SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
- if (pConfigItem)
+ if (!pConfigItem)
+ rSet.DisableItem(nWhich);
+ else
{
bool bFirst, bLast;
bool bValid = pConfigItem->IsResultSetFirstLast(bFirst, bLast);
@@ -287,7 +289,6 @@ class SwMailMergeWizardExecutor : public salhelper::SimpleReferenceObject
{
SwView* m_pView; // never owner
SwView* m_pView2Close; // never owner
- SwMailMergeConfigItem* m_pMMConfig; // sometimes owner
AbstractMailMergeWizard* m_pWizard; // always owner
DECL_LINK_TYPED( EndDialogHdl, Dialog&, void );
@@ -296,7 +297,7 @@ class SwMailMergeWizardExecutor : public salhelper::SimpleReferenceObject
DECL_LINK_TYPED( CancelHdl, void*, void );
DECL_LINK_TYPED( CloseFrameHdl, void*, void );
- void ExecutionFinished( bool bDeleteConfigItem );
+ void ExecutionFinished();
void ExecuteWizard();
public:
@@ -309,7 +310,6 @@ public:
SwMailMergeWizardExecutor::SwMailMergeWizardExecutor()
: m_pView( nullptr ),
m_pView2Close( nullptr ),
- m_pMMConfig( nullptr ),
m_pWizard( nullptr )
{
}
@@ -317,7 +317,6 @@ SwMailMergeWizardExecutor::SwMailMergeWizardExecutor()
SwMailMergeWizardExecutor::~SwMailMergeWizardExecutor()
{
OSL_ENSURE( m_pWizard == nullptr, "SwMailMergeWizardExecutor: m_pWizard must be Null!" );
- OSL_ENSURE( m_pMMConfig == nullptr, "SwMailMergeWizardExecutor: m_pMMConfig must be Null!" );
}
void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs )
@@ -362,23 +361,23 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
static_cast<SwMailMergeChildWindow*>(m_pView->GetViewFrame()->GetChildWindow(FN_MAILMERGE_CHILDWINDOW));
bool bRestoreWizard = false;
sal_uInt16 nRestartPage = 0;
+
+ SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
if (pChildWin && pChildWin->IsVisible())
{
- m_pMMConfig = m_pView->GetMailMergeConfigItem();
nRestartPage = m_pView->GetMailMergeRestartPage();
if (m_pView->IsMailMergeSourceView())
- m_pMMConfig->SetSourceView(m_pView);
- m_pView->SetMailMergeConfigItem(nullptr, 0, true);
+ pMMConfig->SetSourceView(m_pView);
SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, false);
- OSL_ENSURE(m_pMMConfig, "no MailMergeConfigItem available");
bRestoreWizard = true;
}
- // to make it bullet proof ;-)
- if (!m_pMMConfig)
+
+ // create if it does not exist yet
+ if (!pMMConfig)
{
- m_pMMConfig = new SwMailMergeConfigItem;
- m_pMMConfig->SetSourceView(m_pView);
+ pMMConfig = new SwMailMergeConfigItem;
+ pMMConfig->SetSourceView(m_pView);
//set the first used database as default source on the config item
const SfxPoolItem* pItem = nullptr;
@@ -406,7 +405,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
uno::Reference<container::XChild> xChild(xConnection, uno::UNO_QUERY);
if (xChild.is())
xSource.set(xChild->getParent(), uno::UNO_QUERY);
- m_pMMConfig->SetCurrentConnection(
+ pMMConfig->SetCurrentConnection(
xSource, SharedConnection(xConnection, SharedConnection::NoTakeOwnership),
xColumnsSupplier, aDBData);
}
@@ -424,13 +423,15 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
aDBData.sCommand = sDBName.getToken(1, DB_DELIM);
aDBData.nCommandType = sDBName.getToken(2, DB_DELIM).toInt32();
//set the currently used database for the wizard
- m_pMMConfig->SetCurrentDBData(aDBData);
+ pMMConfig->SetCurrentDBData(aDBData);
}
}
+
+ m_pView->SetMailMergeConfigItem(pMMConfig, m_pWizard? m_pWizard->GetRestartPage(): 0, true);
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- m_pWizard = pFact->CreateMailMergeWizard(*m_pView, *m_pMMConfig);
+ m_pWizard = pFact->CreateMailMergeWizard(*m_pView, *pMMConfig);
if (bRestoreWizard)
{
@@ -440,13 +441,11 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
ExecuteWizard();
}
-void SwMailMergeWizardExecutor::ExecutionFinished( bool bDeleteConfigItem )
+void SwMailMergeWizardExecutor::ExecutionFinished()
{
- m_pMMConfig->Commit();
- if ( bDeleteConfigItem ) // owner?
- delete m_pMMConfig;
-
- m_pMMConfig = nullptr;
+ SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
+ if (pMMConfig)
+ pMMConfig->Commit();
// release/destroy asynchronously
Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, DestroyDialogHdl ) );
@@ -474,18 +473,19 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
LINK( this, SwMailMergeWizardExecutor, DestroyWizardHdl ), m_pWizard );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- if(pNewView)
+ SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
+ if (pNewView)
{
m_pView = pNewView;
- m_pMMConfig->DocumentReloaded();
+ pMMConfig->DocumentReloaded();
//new source view!
- m_pMMConfig->SetSourceView( m_pView );
- m_pWizard = pFact->CreateMailMergeWizard(*m_pView, *m_pMMConfig);
+ pMMConfig->SetSourceView( m_pView );
+ m_pWizard = pFact->CreateMailMergeWizard(*m_pView, *pMMConfig);
m_pWizard->ShowPage( nRestartPage );
}
else
{
- m_pWizard = pFact->CreateMailMergeWizard(*m_pView, *m_pMMConfig);
+ m_pWizard = pFact->CreateMailMergeWizard(*m_pView, *pMMConfig);
}
// execute the wizard again
@@ -494,7 +494,8 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
}
case RET_TARGET_CREATED:
{
- SwView* pTargetView = m_pMMConfig->GetTargetView();
+ SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
+ SwView* pTargetView = pMMConfig->GetTargetView();
OSL_ENSURE(pTargetView, "No target view has been created");
if(pTargetView)
{
@@ -503,7 +504,7 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
LINK( this, SwMailMergeWizardExecutor, DestroyWizardHdl ), m_pWizard );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- m_pWizard = pFact->CreateMailMergeWizard(*pTargetView, *m_pMMConfig);
+ m_pWizard = pFact->CreateMailMergeWizard(*pTargetView, *pMMConfig);
m_pWizard->ShowPage( nRestartPage );
// execute the wizard again
@@ -512,7 +513,7 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
else
{
// should not happen - just in case no target view has been created
- ExecutionFinished( true );
+ ExecutionFinished();
}
break;
}
@@ -521,19 +522,21 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
{
//create a non-modal dialog that allows to return to the wizard
//the ConfigItem ownership moves to this dialog
- bool bResult = nRet == RET_EDIT_RESULT_DOC && m_pMMConfig->GetTargetView();
- SwView* pTempView = bResult ? m_pMMConfig->GetTargetView() : m_pMMConfig->GetSourceView();
- pTempView->SetMailMergeConfigItem(m_pMMConfig, m_pWizard->GetRestartPage(), !bResult);
+ SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
+ bool bResult = nRet == RET_EDIT_RESULT_DOC && pMMConfig->GetTargetView();
+ SwView* pTempView = bResult ? pMMConfig->GetTargetView() : pMMConfig->GetSourceView();
+ pTempView->SetMailMergeConfigItem(pMMConfig, m_pWizard->GetRestartPage(), !bResult);
SfxViewFrame* pViewFrame = pTempView->GetViewFrame();
pViewFrame->GetDispatcher()->Execute(
FN_MAILMERGE_CHILDWINDOW, SfxCallMode::SYNCHRON);
- ExecutionFinished( false );
+ ExecutionFinished();
break;
}
case RET_REMOVE_TARGET:
{
- SwView* pTargetView = m_pMMConfig->GetTargetView();
- SwView* pSourceView = m_pMMConfig->GetSourceView();
+ SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
+ SwView* pTargetView = pMMConfig->GetTargetView();
+ SwView* pSourceView = pMMConfig->GetSourceView();
OSL_ENSURE(pTargetView && pSourceView, "source or target view not available" );
if(pTargetView && pSourceView)
{
@@ -542,14 +545,14 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
pSourceView->GetViewFrame()->GetFrame().AppearWithUpdate();
// the current view has be set when the target is destroyed
m_pView = pSourceView;
- m_pMMConfig->SetTargetView(nullptr);
+ pMMConfig->SetTargetView(nullptr);
// destroy wizard asynchronously
Application::PostUserEvent(
LINK( this, SwMailMergeWizardExecutor, CloseFrameHdl ), m_pWizard );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- m_pWizard = pFact->CreateMailMergeWizard(*pSourceView, *m_pMMConfig);
+ m_pWizard = pFact->CreateMailMergeWizard(*pSourceView, *pMMConfig);
m_pWizard->ShowPage( nRestartPage );
// execute the wizard again
@@ -558,7 +561,7 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
else
{
// should not happen - just in case no target view has been created
- ExecutionFinished( true );
+ ExecutionFinished();
}
break;
}
@@ -571,16 +574,17 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
}
default: // finish
{
- SwView* pSourceView = m_pMMConfig->GetSourceView();
+ SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
+ SwView* pSourceView = pMMConfig->GetSourceView();
if(pSourceView)
{
SwDocShell* pDocShell = pSourceView->GetDocShell();
if(pDocShell->HasName() && !pDocShell->IsModified())
- m_pMMConfig->GetSourceView()->GetViewFrame()->DoClose();
+ pMMConfig->GetSourceView()->GetViewFrame()->DoClose();
else
- m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().Appear();
+ pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().Appear();
}
- ExecutionFinished( true );
+ ExecutionFinished();
break;
}
@@ -602,17 +606,16 @@ IMPL_STATIC_LINK_TYPED(SwMailMergeWizardExecutor, DestroyWizardHdl, void*, pDial
IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CancelHdl, void*, void)
{
- if(m_pMMConfig->GetTargetView())
+ SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
+ if (pMMConfig->GetTargetView())
{
- m_pMMConfig->GetTargetView()->GetViewFrame()->DoClose();
- m_pMMConfig->SetTargetView(nullptr);
+ pMMConfig->GetTargetView()->GetViewFrame()->DoClose();
+ pMMConfig->SetTargetView(nullptr);
}
- if(m_pMMConfig->GetSourceView())
- m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate();
+ if (pMMConfig->GetSourceView())
+ pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate();
- m_pMMConfig->Commit();
- delete m_pMMConfig;
- m_pMMConfig = nullptr;
+ pMMConfig->Commit();
delete m_pWizard;
m_pWizard = nullptr;
release();
commit 3c0bda08c232286ace80e1d3e4f5b2f214280327
Author: Jan Holesovsky <kendy at collabora.com>
Date: Tue Dec 22 06:32:45 2015 +0100
mailmerge: Decrease indentation level by an early return.
Change-Id: I90dad46d9bced5e0faee4ab3adabc46d7e1bbc9f
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 676f639..62271cc 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -349,96 +349,95 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
return;
}
- m_pView = ::GetActiveView(); // not owner!
- OSL_ENSURE(m_pView, "no current view?");
- if(m_pView)
+ m_pView = ::GetActiveView();
+ if (!m_pView)
+ return;
+
+ // keep self alive until done.
+ acquire();
+
+ // if called from the child window - get the config item and close the ChildWindow, then restore
+ // the wizard
+ SwMailMergeChildWindow* pChildWin =
+ static_cast<SwMailMergeChildWindow*>(m_pView->GetViewFrame()->GetChildWindow(FN_MAILMERGE_CHILDWINDOW));
+ bool bRestoreWizard = false;
+ sal_uInt16 nRestartPage = 0;
+ if (pChildWin && pChildWin->IsVisible())
{
- // keep self alive until done.
- acquire();
-
- // if called from the child window - get the config item and close the ChildWindow, then restore
- // the wizard
- SwMailMergeChildWindow* pChildWin =
- static_cast<SwMailMergeChildWindow*>(m_pView->GetViewFrame()->GetChildWindow(FN_MAILMERGE_CHILDWINDOW));
- bool bRestoreWizard = false;
- sal_uInt16 nRestartPage = 0;
- if(pChildWin && pChildWin->IsVisible())
- {
- m_pMMConfig = m_pView->GetMailMergeConfigItem();
- nRestartPage = m_pView->GetMailMergeRestartPage();
- if(m_pView->IsMailMergeSourceView())
- m_pMMConfig->SetSourceView( m_pView );
- m_pView->SetMailMergeConfigItem(nullptr, 0, true);
- SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
- pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, false);
- OSL_ENSURE(m_pMMConfig, "no MailMergeConfigItem available");
- bRestoreWizard = true;
- }
- // to make it bullet proof ;-)
- if(!m_pMMConfig)
- {
- m_pMMConfig = new SwMailMergeConfigItem;
+ m_pMMConfig = m_pView->GetMailMergeConfigItem();
+ nRestartPage = m_pView->GetMailMergeRestartPage();
+ if (m_pView->IsMailMergeSourceView())
m_pMMConfig->SetSourceView(m_pView);
+ m_pView->SetMailMergeConfigItem(nullptr, 0, true);
+ SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
+ pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, false);
+ OSL_ENSURE(m_pMMConfig, "no MailMergeConfigItem available");
+ bRestoreWizard = true;
+ }
+ // to make it bullet proof ;-)
+ if (!m_pMMConfig)
+ {
+ m_pMMConfig = new SwMailMergeConfigItem;
+ m_pMMConfig->SetSourceView(m_pView);
- //set the first used database as default source on the config item
- const SfxPoolItem* pItem = nullptr;
- if(pArgs && SfxItemState::SET == pArgs->GetItemState(
- FN_PARAM_DATABASE_PROPERTIES, false, &pItem))
+ //set the first used database as default source on the config item
+ const SfxPoolItem* pItem = nullptr;
+ if (pArgs && SfxItemState::SET == pArgs->GetItemState(
+ FN_PARAM_DATABASE_PROPERTIES, false, &pItem))
+ {
+ //mailmerge has been called from the database beamer
+ uno::Sequence< beans::PropertyValue> aDBValues;
+ if (static_cast<const SfxUsrAnyItem*>(pItem)->GetValue() >>= aDBValues)
{
- //mailmerge has been called from the database beamer
- uno::Sequence< beans::PropertyValue> aDBValues;
- if(static_cast<const SfxUsrAnyItem*>(pItem)->GetValue() >>= aDBValues)
- {
- SwDBData aDBData;
- svx::ODataAccessDescriptor aDescriptor(aDBValues);
- aDescriptor[svx::daDataSource] >>= aDBData.sDataSource;
- aDescriptor[svx::daCommand] >>= aDBData.sCommand;
- aDescriptor[svx::daCommandType] >>= aDBData.nCommandType;
-
- uno::Sequence< uno::Any > aSelection;
- uno::Reference< sdbc::XConnection> xConnection;
- uno::Reference< sdbc::XDataSource> xSource;
- uno::Reference< sdbcx::XColumnsSupplier> xColumnsSupplier;
- if ( aDescriptor.has(svx::daSelection) )
- aDescriptor[svx::daSelection] >>= aSelection;
- if ( aDescriptor.has(svx::daConnection) )
- aDescriptor[svx::daConnection] >>= xConnection;
- uno::Reference<container::XChild> xChild(xConnection, uno::UNO_QUERY);
- if(xChild.is())
- xSource.set(xChild->getParent(), uno::UNO_QUERY);
- m_pMMConfig->SetCurrentConnection(
- xSource, SharedConnection( xConnection, SharedConnection::NoTakeOwnership ),
- xColumnsSupplier, aDBData);
- }
+ SwDBData aDBData;
+ svx::ODataAccessDescriptor aDescriptor(aDBValues);
+ aDescriptor[svx::daDataSource] >>= aDBData.sDataSource;
+ aDescriptor[svx::daCommand] >>= aDBData.sCommand;
+ aDescriptor[svx::daCommandType] >>= aDBData.nCommandType;
+
+ uno::Sequence< uno::Any > aSelection;
+ uno::Reference< sdbc::XConnection> xConnection;
+ uno::Reference< sdbc::XDataSource> xSource;
+ uno::Reference< sdbcx::XColumnsSupplier> xColumnsSupplier;
+ if (aDescriptor.has(svx::daSelection))
+ aDescriptor[svx::daSelection] >>= aSelection;
+ if (aDescriptor.has(svx::daConnection))
+ aDescriptor[svx::daConnection] >>= xConnection;
+ uno::Reference<container::XChild> xChild(xConnection, uno::UNO_QUERY);
+ if (xChild.is())
+ xSource.set(xChild->getParent(), uno::UNO_QUERY);
+ m_pMMConfig->SetCurrentConnection(
+ xSource, SharedConnection(xConnection, SharedConnection::NoTakeOwnership),
+ xColumnsSupplier, aDBData);
}
- else
+ }
+ else
+ {
+ std::vector<OUString> aDBNameList;
+ std::vector<OUString> aAllDBNames;
+ m_pView->GetWrtShell().GetAllUsedDB(aDBNameList, &aAllDBNames);
+ if (!aDBNameList.empty())
{
- std::vector<OUString> aDBNameList;
- std::vector<OUString> aAllDBNames;
- m_pView->GetWrtShell().GetAllUsedDB( aDBNameList, &aAllDBNames );
- if(!aDBNameList.empty())
- {
- OUString sDBName(aDBNameList[0]);
- SwDBData aDBData;
- aDBData.sDataSource = sDBName.getToken(0, DB_DELIM);
- aDBData.sCommand = sDBName.getToken(1, DB_DELIM);
- aDBData.nCommandType = sDBName.getToken(2, DB_DELIM ).toInt32();
- //set the currently used database for the wizard
- m_pMMConfig->SetCurrentDBData( aDBData );
- }
+ OUString sDBName(aDBNameList[0]);
+ SwDBData aDBData;
+ aDBData.sDataSource = sDBName.getToken(0, DB_DELIM);
+ aDBData.sCommand = sDBName.getToken(1, DB_DELIM);
+ aDBData.nCommandType = sDBName.getToken(2, DB_DELIM).toInt32();
+ //set the currently used database for the wizard
+ m_pMMConfig->SetCurrentDBData(aDBData);
}
}
+ }
- SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- m_pWizard = pFact->CreateMailMergeWizard(*m_pView, *m_pMMConfig);
-
- if(bRestoreWizard)
- {
- m_pWizard->ShowPage( nRestartPage );
- }
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ m_pWizard = pFact->CreateMailMergeWizard(*m_pView, *m_pMMConfig);
- ExecuteWizard();
+ if (bRestoreWizard)
+ {
+ m_pWizard->ShowPage(nRestartPage);
}
+
+ ExecuteWizard();
}
void SwMailMergeWizardExecutor::ExecutionFinished( bool bDeleteConfigItem )
commit d99be03b2c972304ece404801503dfcdad587553
Author: Jan Holesovsky <kendy at collabora.com>
Date: Mon Dec 21 20:41:33 2015 +0100
mailmerge: Enable/disable the first/prev/next/last mailmerge entry buttons.
Change-Id: I48f0972b52c0c39e3ba691f4037412622927638b
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 6b4b26f..676f639 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -207,12 +207,9 @@ void SwModule::StateOther(SfxItemSet &rSet)
case FN_MAILMERGE_NEXT_ENTRY:
case FN_MAILMERGE_LAST_ENTRY:
{
- /*
SwView* pView = ::GetActiveView();
SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
- if (!pConfigItem)
- rSet.DisableItem(nWhich);
- else
+ if (pConfigItem)
{
bool bFirst, bLast;
bool bValid = pConfigItem->IsResultSetFirstLast(bFirst, bLast);
@@ -223,12 +220,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
{
rSet.DisableItem(nWhich);
}
- else
- {
- rSet.Put(SfxVoidItem(nWhich));
- }
}
- */
}
break;
default:
@@ -749,7 +741,7 @@ void SwModule::ExecOther(SfxRequest& rReq)
default: break;
}
- //now the record has to be merged into the source document
+ // now the record has to be merged into the source document
const SwDBData& rDBData = pConfigItem->GetCurrentDBData();
uno::Sequence<uno::Any> vSelection({ uno::makeAny(pConfigItem->GetResultSetPosition()) });
svx::ODataAccessDescriptor aDescriptor(::comphelper::InitPropertySequence({
@@ -766,6 +758,14 @@ void SwModule::ExecOther(SfxRequest& rReq)
SwWrtShell& rSh = pActView->GetWrtShell();
SwMergeDescriptor aMergeDesc(DBMGR_MERGE, rSh, aDescriptor);
rSh.GetDBManager()->MergeNew(aMergeDesc);
+
+ // update enabled / disabled status of the buttons in the toolbar
+ SfxBindings& rBindings = rSh.GetView().GetViewFrame()->GetBindings();
+ rBindings.Invalidate(FN_MAILMERGE_FIRST_ENTRY);
+ rBindings.Invalidate(FN_MAILMERGE_PREV_ENTRY);
+ rBindings.Invalidate(FN_MAILMERGE_NEXT_ENTRY);
+ rBindings.Invalidate(FN_MAILMERGE_LAST_ENTRY);
+ rBindings.Update();
}
break;
#endif
commit c24dea0f0f2a2651eb06782e41cd25b1434ffb2e
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Dec 18 21:19:10 2015 +0100
mailmerge: Introduce buttons for first/prev/next/last mailmerge entry.
Change-Id: I3dc63d568dc4cd6f7e06b057ca4a387e4ad0677e
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index fff1246..fa7dcd0 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -489,6 +489,26 @@
<value xml:lang="en-US">Mail Merge Wi~zard...</value>
</prop>
</node>
+ <node oor:name=".uno:MailMergeFirstEntry" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">First Mail Merge Entry</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MailMergePrevEntry" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Previous Mail Merge Entry</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MailMergeNextEntry" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Next Mail Merge Entry</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MailMergeLastEntry" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Last Mail Merge Entry</value>
+ </prop>
+ </node>
<node oor:name=".uno:SetAnchorToFrame" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Anchor To Frame</value>
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index cd0ce77..4cd552a 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -252,6 +252,11 @@
#define FN_MAILMERGE_CHILDWINDOW (FN_INSERT + 68) /* back-to-mail-merge-wizard child window*/
#define FN_INSERT_SMA (FN_INSERT + 69) /* insert StarMath */
+#define FN_MAILMERGE_FIRST_ENTRY (FN_INSERT+ 70) /* mail merge wizard - go to the first entry */
+#define FN_MAILMERGE_PREV_ENTRY (FN_INSERT + 71) /* mail merge wizard - go to the previous entry */
+#define FN_MAILMERGE_NEXT_ENTRY (FN_INSERT + 72) /* mail merge wizard - go to the next entry */
+#define FN_MAILMERGE_LAST_ENTRY (FN_INSERT + 73) /* mail merge wizard - go to the next entry */
+
#define FN_DRAWTEXT_ATTR_DLG (FN_INSERT + 76) /* position DrawText */
#define FN_TOOL_ANCHOR_CHAR (FN_INSERT + 84) /* anchor Draw object to character */
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index a80d38c..e704454 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -5227,6 +5227,102 @@ SfxVoidItem MailMergeWizard FN_MAILMERGE_WIZARD
GroupId = GID_DOCUMENT;
]
+SfxVoidItem MailMergeFirstEntry FN_MAILMERGE_FIRST_ENTRY
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+SfxVoidItem MailMergePrevEntry FN_MAILMERGE_PREV_ENTRY
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+SfxVoidItem MailMergeNextEntry FN_MAILMERGE_NEXT_ENTRY
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+SfxVoidItem MailMergeLastEntry FN_MAILMERGE_LAST_ENTRY
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
SfxBoolItem MergeTable FN_TABLE_MERGE_TABLE
()
[
diff --git a/sw/sdi/wrtapp.sdi b/sw/sdi/wrtapp.sdi
index f076b45..b130264 100644
--- a/sw/sdi/wrtapp.sdi
+++ b/sw/sdi/wrtapp.sdi
@@ -65,6 +65,30 @@ interface StarWriter
ExecMethod = ExecOther ;
]
+ FN_MAILMERGE_FIRST_ENTRY
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ ]
+
+ FN_MAILMERGE_PREV_ENTRY
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ ]
+
+ FN_MAILMERGE_NEXT_ENTRY
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ ]
+
+ FN_MAILMERGE_LAST_ENTRY
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ ]
+
FN_SET_MODOPT_TBLNUMFMT // status()
[
ExecMethod = ExecOther ;
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index b957a6d..6b4b26f 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -22,6 +22,7 @@
#include <hintids.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertysequence.hxx>
#include <osl/diagnose.h>
#include <tools/link.hxx>
#include <svl/urihelper.hxx>
@@ -201,6 +202,35 @@ void SwModule::StateOther(SfxItemSet &rSet)
rSet.Put( SfxBoolItem( nWhich, m_pModuleConfig->
IsInsTableFormatNum( bWebView )));
break;
+ case FN_MAILMERGE_FIRST_ENTRY:
+ case FN_MAILMERGE_PREV_ENTRY:
+ case FN_MAILMERGE_NEXT_ENTRY:
+ case FN_MAILMERGE_LAST_ENTRY:
+ {
+ /*
+ SwView* pView = ::GetActiveView();
+ SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
+ if (!pConfigItem)
+ rSet.DisableItem(nWhich);
+ else
+ {
+ bool bFirst, bLast;
+ bool bValid = pConfigItem->IsResultSetFirstLast(bFirst, bLast);
+
+ if (!bValid ||
+ (bFirst && (nWhich == FN_MAILMERGE_FIRST_ENTRY || nWhich == FN_MAILMERGE_PREV_ENTRY)) ||
+ (bLast && (nWhich == FN_MAILMERGE_LAST_ENTRY || nWhich == FN_MAILMERGE_NEXT_ENTRY)))
+ {
+ rSet.DisableItem(nWhich);
+ }
+ else
+ {
+ rSet.Put(SfxVoidItem(nWhich));
+ }
+ }
+ */
+ }
+ break;
default:
OSL_FAIL("::StateOther: default");
}
@@ -699,6 +729,45 @@ void SwModule::ExecOther(SfxRequest& rReq)
}
}
break;
+ case FN_MAILMERGE_FIRST_ENTRY:
+ case FN_MAILMERGE_PREV_ENTRY:
+ case FN_MAILMERGE_NEXT_ENTRY:
+ case FN_MAILMERGE_LAST_ENTRY:
+ {
+ SwView* pView = ::GetActiveView();
+ SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
+ if (!pConfigItem)
+ return;
+
+ sal_Int32 nPos = pConfigItem->GetResultSetPosition();
+ switch (nWhich)
+ {
+ case FN_MAILMERGE_FIRST_ENTRY: pConfigItem->MoveResultSet(1); break;
+ case FN_MAILMERGE_PREV_ENTRY: pConfigItem->MoveResultSet(nPos - 1); break;
+ case FN_MAILMERGE_NEXT_ENTRY: pConfigItem->MoveResultSet(nPos + 1); break;
+ case FN_MAILMERGE_LAST_ENTRY: pConfigItem->MoveResultSet(-1); break;
+ default: break;
+ }
+
+ //now the record has to be merged into the source document
+ const SwDBData& rDBData = pConfigItem->GetCurrentDBData();
+ uno::Sequence<uno::Any> vSelection({ uno::makeAny(pConfigItem->GetResultSetPosition()) });
+ svx::ODataAccessDescriptor aDescriptor(::comphelper::InitPropertySequence({
+ {"Selection", uno::makeAny(vSelection)},
+ {"DataSourceName", uno::makeAny(rDBData.sDataSource)},
+ {"Command", uno::makeAny(rDBData.sCommand)},
+ {"CommandType", uno::makeAny(rDBData.nCommandType)},
+ {"ActiveConnection", uno::makeAny(pConfigItem->GetConnection().getTyped())},
+ {"Filter", uno::makeAny(pConfigItem->GetFilter())},
+ {"Cursor", uno::makeAny(pConfigItem->GetResultSet())}
+ }));
+
+ SwView* pActView = ::GetActiveView();
+ SwWrtShell& rSh = pActView->GetWrtShell();
+ SwMergeDescriptor aMergeDesc(DBMGR_MERGE, rSh, aDescriptor);
+ rSh.GetDBManager()->MergeNew(aMergeDesc);
+ }
+ break;
#endif
}
}
diff --git a/sw/uiconfig/swform/toolbar/mailmerge.xml b/sw/uiconfig/swform/toolbar/mailmerge.xml
index f80aeb4..662a000 100644
--- a/sw/uiconfig/swform/toolbar/mailmerge.xml
+++ b/sw/uiconfig/swform/toolbar/mailmerge.xml
@@ -7,6 +7,12 @@
* 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:toolbarseparator/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeFirstEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergePrevEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeNextEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeLastEntry"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/swreport/toolbar/mailmerge.xml b/sw/uiconfig/swreport/toolbar/mailmerge.xml
index f80aeb4..662a000 100644
--- a/sw/uiconfig/swreport/toolbar/mailmerge.xml
+++ b/sw/uiconfig/swreport/toolbar/mailmerge.xml
@@ -7,6 +7,12 @@
* 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:toolbarseparator/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeFirstEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergePrevEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeNextEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeLastEntry"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/swriter/toolbar/mailmerge.xml b/sw/uiconfig/swriter/toolbar/mailmerge.xml
index f80aeb4..662a000 100644
--- a/sw/uiconfig/swriter/toolbar/mailmerge.xml
+++ b/sw/uiconfig/swriter/toolbar/mailmerge.xml
@@ -7,6 +7,12 @@
* 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:toolbarseparator/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeFirstEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergePrevEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeNextEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeLastEntry"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/swxform/toolbar/mailmerge.xml b/sw/uiconfig/swxform/toolbar/mailmerge.xml
index f80aeb4..662a000 100644
--- a/sw/uiconfig/swxform/toolbar/mailmerge.xml
+++ b/sw/uiconfig/swxform/toolbar/mailmerge.xml
@@ -7,6 +7,12 @@
* 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:toolbarseparator/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeFirstEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergePrevEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeNextEntry"/>
+ <toolbar:toolbaritem xlink:href=".uno:MailMergeLastEntry"/>
</toolbar:toolbar>
commit 4374888c6fd8f8088b9746049b92688c7bd744e9
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Dec 18 12:40:05 2015 +0100
mailmerge: Don't hide the source document.
Change-Id: Ie920ae1ea05ba81fb2da1198d9d79ba028e1e95a
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 83229d3..b957a6d 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -474,9 +474,6 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
case RET_TARGET_CREATED:
{
SwView* pTargetView = m_pMMConfig->GetTargetView();
- uno::Reference< frame::XFrame > xFrame =
- m_pView->GetViewFrame()->GetFrame().GetFrameInterface();
- xFrame->getContainerWindow()->setVisible(sal_False);
OSL_ENSURE(pTargetView, "No target view has been created");
if(pTargetView)
{
commit 3e93b9b458a58ee723814997ffa331744d057f2c
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Dec 18 12:21:40 2015 +0100
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
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu
index c5d927f..7f21088 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu
@@ -73,6 +73,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 60c42e5..3d56d36 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu
@@ -73,6 +73,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 7bbad92..719a983 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
@@ -93,6 +93,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 0ed7fef..f0ce288 100644
--- a/sw/UIConfig_swform.mk
+++ b/sw/UIConfig_swform.mk
@@ -47,6 +47,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 97bd1e7..436e6f2 100644
--- a/sw/UIConfig_swreport.mk
+++ b/sw/UIConfig_swreport.mk
@@ -47,6 +47,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 b8bbef9..cf49e91 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -48,6 +48,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swriter,\
sw/uiconfig/swriter/toolbar/graffilterbar \
sw/uiconfig/swriter/toolbar/graphicobjectbar \
sw/uiconfig/swriter/toolbar/insertbar \
+ 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 05c455e..63c5be4 100644
--- a/sw/UIConfig_swxform.mk
+++ b/sw/UIConfig_swxform.mk
@@ -48,6 +48,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 bd18537..83229d3 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 0000000..f80aeb4
--- /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 0000000..f80aeb4
--- /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 0000000..f80aeb4
--- /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 0000000..f80aeb4
--- /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>
commit 3b984ae57e434fedba34854c989b39f12407b98c
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Dec 18 11:39:23 2015 +0100
mailmerge: Minor refactor.
Change-Id: Ia92b624ee32349ab936ad1a6fc62b4489fd5cde7
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 41b504b..4cb0ada 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -219,7 +219,6 @@ void SwMailMergeWizard::UpdateRoadmap()
TabPage* pCurPage = GetPage( nCurPage );
if(!pCurPage)
return;
- bool bEnable = false;
bool bAddressFieldsConfigured = !m_rConfigItem.IsOutputToLetter() ||
!m_rConfigItem.IsAddressBlock() ||
m_rConfigItem.IsAddressFieldsAssigned();
@@ -233,34 +232,35 @@ void SwMailMergeWizard::UpdateRoadmap()
for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_OUTPUTPAGE; ++nPage)
{
+ bool bEnable = true;
switch(nPage)
{
- case MM_DOCUMENTSELECTPAGE :
+ case MM_DOCUMENTSELECTPAGE:
bEnable = true;
break;
- case MM_OUTPUTTYPETPAGE :
+ case MM_OUTPUTTYPETPAGE:
bEnable = bEnableOutputTypePage;
break;
- case MM_ADDRESSBLOCKPAGE :
+ case MM_ADDRESSBLOCKPAGE:
bEnable = !m_bDocumentLoad && bEnableOutputTypePage;
break;
- case MM_GREETINGSPAGE :
+ case MM_GREETINGSPAGE:
bEnable = !m_bDocumentLoad && bEnableOutputTypePage &&
m_rConfigItem.GetResultSet().is() &&
bAddressFieldsConfigured;
break;
- case MM_PREPAREMERGEPAGE :
- case MM_MERGEPAGE :
- case MM_OUTPUTPAGE :
- case MM_LAYOUTPAGE :
- bEnable = !m_bDocumentLoad && bEnableOutputTypePage &&
+ case MM_LAYOUTPAGE:
+ bEnable =
+ ((m_rConfigItem.IsAddressBlock() && !m_rConfigItem.IsAddressInserted()) ||
+ (m_rConfigItem.IsGreetingLine(false) && !m_rConfigItem.IsGreetingInserted() ));
+ // fall-through
+ case MM_PREPAREMERGEPAGE:
+ case MM_MERGEPAGE:
+ case MM_OUTPUTPAGE:
+ bEnable = bEnable && !m_bDocumentLoad && bEnableOutputTypePage &&
m_rConfigItem.GetResultSet().is() &&
bAddressFieldsConfigured &&
bGreetingFieldsConfigured;
- if(MM_LAYOUTPAGE == nPage)
- bEnable &=
- ((m_rConfigItem.IsAddressBlock() && !m_rConfigItem.IsAddressInserted()) ||
- (m_rConfigItem.IsGreetingLine(false) && !m_rConfigItem.IsGreetingInserted() ));
break;
}
enableState( nPage, bEnable );
commit 3cc78b3901c9799f6b12979e701fe7e1826dd786
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Dec 17 10:54:45 2015 +0100
sfx2: Improve git-grep-ability for at least few toolbars.
Change-Id: Id5a2b98f7ce892fdf9969c676d987ee041913468
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 0e9d3d6..837ab2e 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -110,15 +110,15 @@ static const ResIdToResName pToolBarResToName[] =
{ 23017, "outlinetoolbar" }, //impress
{ 23012, "slideviewtoolbar" },
{ 23014, "slideviewobjectbar" },
- { 23283, "bezierobjectbar" }, //writer
- { 23269, "drawingobjectbar" },
- { 23270, "drawtextobjectbar" },
- { 23267, "frameobjectbar" },
- { 23268, "graphicobjectbar" },
- { 23271, "numobjectbar" },
- { 23272, "oleobjectbar" },
- { 23266, "tableobjectbar" },
- { 23265, "textobjectbar" },
+ { 23283, "bezierobjectbar" }, // RID_BEZIER_TOOLBOX
+ { 23269, "drawingobjectbar" }, // RID_DRAW_TOOLBOX
+ { 23270, "drawtextobjectbar" }, // RID_DRAW_TEXT_TOOLBOX
+ { 23267, "frameobjectbar" }, // RID_FRAME_TOOLBOX
+ { 23268, "graphicobjectbar" }, // RID_GRAFIK_TOOLBOX
+ { 23271, "numobjectbar" }, // RID_NUM_TOOLBOX
+ { 23272, "oleobjectbar" }, // RID_OLE_TOOLBOX
+ { 23266, "tableobjectbar" }, // RID_TOOLS_TOOLBOX
+ { 23265, "textobjectbar" }, // RID_TEXT_TOOLBOX
{ 20631, "previewobjectbar" }, //writer
{ 20402, "toolbar" }, //web
{ 20403, "textobjectbar" },
commit d1407130ad5ea1741d1fac14eea75f18ba119c53
Author: Cor Nouws <oolst at nouenoff.nl>
Date: Sat Oct 17 15:35:35 2015 +0200
tdf#94865 resolve duplicate accelerator - File>Template and File>Export
demoing on LibreOffice_Nl Community day
Change-Id: Idc17d430491627ed20ff31803a19dd8b9646397e
Reviewed-on: https://gerrit.libreoffice.org/19417
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index f7e7e8b..6e9b725 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -5999,7 +5999,7 @@
</node>
<node oor:name=".uno:TemplateMenu" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Templates</value>
+ <value xml:lang="en-US">Te~mplates</value>
</prop>
</node>
<node oor:name=".uno:ExternalEdit" oor:op="replace">
commit 4251e676bb818cde1989b9077b1497f1d9b0cbdc
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date: Sun Jul 12 13:52:53 2015 +0200
BASIC : Refactor FoldConstants for extracting it from SwExprNode.
Change-Id: Ia47597b26d63db216dd3ab71acbb18449ece7b1a
Reviewed-on: https://gerrit.libreoffice.org/16963
Reviewed-by: Arnaud Versini <arnaud.versini at libreoffice.org>
Tested-by: Arnaud Versini <arnaud.versini at libreoffice.org>
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index 52c2211..9d77f6d 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -231,182 +231,206 @@ void SbiExprNode::CollectBits()
void SbiExprNode::FoldConstants(SbiParser* pParser)
{
if( IsOperand() || eTok == LIKE ) return;
- if( pLeft )
- pLeft->FoldConstants(pParser);
- if (pLeft && pRight)
+
+ if (IsUnary())
+ FoldConstantsUnaryNode(pParser);
+ else if (IsBinary())
+ FoldConstantsBinaryNode(pParser);
+
+ if( eNodeType == SbxNUMVAL )
{
- pRight->FoldConstants(pParser);
- if( pLeft->IsConstant() && pRight->IsConstant()
- && pLeft->eNodeType == pRight->eNodeType )
+ // Potentially convolve in INTEGER (because of better opcode)?
+ if( eType == SbxSINGLE || eType == SbxDOUBLE )
{
- CollectBits();
- if( eTok == CAT )
- // CAT affiliate also two numbers!
- eType = SbxSTRING;
- if( pLeft->eType == SbxSTRING )
- // No Type Mismatch!
+ double x;
+ if( nVal >= SbxMINLNG && nVal <= SbxMAXLNG
+ && !modf( nVal, &x ) )
+ eType = SbxLONG;
+ }
+ if( eType == SbxLONG && nVal >= SbxMININT && nVal <= SbxMAXINT )
+ eType = SbxINTEGER;
+ }
+}
+
+void SbiExprNode::FoldConstantsBinaryNode(SbiParser* pParser)
+{
+ pLeft->FoldConstants(pParser);
+ pRight->FoldConstants(pParser);
+ if( pLeft->IsConstant() && pRight->IsConstant()
+ && pLeft->eNodeType == pRight->eNodeType )
+ {
+ CollectBits();
+ if( eTok == CAT )
+ // CAT affiliate also two numbers!
+ eType = SbxSTRING;
+ if( pLeft->eType == SbxSTRING )
+ // No Type Mismatch!
+ eType = SbxSTRING;
+ if( eType == SbxSTRING )
+ {
+ OUString rl( pLeft->GetString() );
+ OUString rr( pRight->GetString() );
+ pLeft.reset();
+ pRight.reset();
+ if( eTok == PLUS || eTok == CAT )
+ {
+ eTok = CAT;
+ // Linking:
+ aStrVal = rl;
+ aStrVal += rr;
eType = SbxSTRING;
- if( eType == SbxSTRING )
+ eNodeType = SbxSTRVAL;
+ }
+ else
{
- OUString rl( pLeft->GetString() );
- OUString rr( pRight->GetString() );
- pLeft.reset();
- pRight.reset();
- if( eTok == PLUS || eTok == CAT )
+ eType = SbxDOUBLE;
+ eNodeType = SbxNUMVAL;
+ int eRes = rr.compareTo( rl );
+ switch( eTok )
{
- eTok = CAT;
- // Linking:
- aStrVal = rl;
- aStrVal += rr;
- eType = SbxSTRING;
- eNodeType = SbxSTRVAL;
+ case EQ:
+ nVal = ( eRes == 0 ) ? SbxTRUE : SbxFALSE;
+ break;
+ case NE:
+ nVal = ( eRes != 0 ) ? SbxTRUE : SbxFALSE;
+ break;
+ case LT:
+ nVal = ( eRes < 0 ) ? SbxTRUE : SbxFALSE;
+ break;
+ case GT:
+ nVal = ( eRes > 0 ) ? SbxTRUE : SbxFALSE;
+ break;
+ case LE:
+ nVal = ( eRes <= 0 ) ? SbxTRUE : SbxFALSE;
+ break;
+ case GE:
+ nVal = ( eRes >= 0 ) ? SbxTRUE : SbxFALSE;
+ break;
+ default:
+ pParser->Error( ERRCODE_BASIC_CONVERSION );
+ bError = true;
+ break;
}
- else
+ }
+ }
+ else
+ {
+ double nl = pLeft->nVal;
+ double nr = pRight->nVal;
+ long ll = 0, lr = 0;
+ long llMod = 0, lrMod = 0;
+ if( ( eTok >= AND && eTok <= IMP )
+ || eTok == IDIV || eTok == MOD )
+ {
+ // Integer operations
+ bool bErr = false;
+ if( nl > SbxMAXLNG ) bErr = true, nl = SbxMAXLNG;
+ else if( nl < SbxMINLNG ) bErr = true, nl = SbxMINLNG;
+ if( nr > SbxMAXLNG ) bErr = true, nr = SbxMAXLNG;
+ else if( nr < SbxMINLNG ) bErr = true, nr = SbxMINLNG;
+ ll = static_cast<long>(nl); lr = static_cast<long>(nr);
+ llMod = static_cast<long>(nl);
+ lrMod = static_cast<long>(nr);
+ if( bErr )
{
- eType = SbxDOUBLE;
- eNodeType = SbxNUMVAL;
- int eRes = rr.compareTo( rl );
- switch( eTok )
- {
- case EQ:
- nVal = ( eRes == 0 ) ? SbxTRUE : SbxFALSE;
- break;
- case NE:
- nVal = ( eRes != 0 ) ? SbxTRUE : SbxFALSE;
- break;
- case LT:
- nVal = ( eRes < 0 ) ? SbxTRUE : SbxFALSE;
- break;
- case GT:
- nVal = ( eRes > 0 ) ? SbxTRUE : SbxFALSE;
- break;
- case LE:
- nVal = ( eRes <= 0 ) ? SbxTRUE : SbxFALSE;
- break;
- case GE:
- nVal = ( eRes >= 0 ) ? SbxTRUE : SbxFALSE;
- break;
- default:
- pParser->Error( ERRCODE_BASIC_CONVERSION );
- bError = true;
- break;
- }
+ pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
+ bError = true;
}
}
- else
+ bool bBothInt = ( pLeft->eType < SbxSINGLE
+ && pRight->eType < SbxSINGLE );
+ pLeft.reset();
+ pRight.reset();
+ nVal = 0;
+ eType = SbxDOUBLE;
+ eNodeType = SbxNUMVAL;
+ bool bCheckType = false;
+ switch( eTok )
{
- double nl = pLeft->nVal;
- double nr = pRight->nVal;
- long ll = 0, lr = 0;
- long llMod = 0, lrMod = 0;
- if( ( eTok >= AND && eTok <= IMP )
- || eTok == IDIV || eTok == MOD )
- {
- // Integer operations
- bool bErr = false;
- if( nl > SbxMAXLNG ) bErr = true, nl = SbxMAXLNG;
- else if( nl < SbxMINLNG ) bErr = true, nl = SbxMINLNG;
- if( nr > SbxMAXLNG ) bErr = true, nr = SbxMAXLNG;
- else if( nr < SbxMINLNG ) bErr = true, nr = SbxMINLNG;
- ll = static_cast<long>(nl); lr = static_cast<long>(nr);
- llMod = static_cast<long>(nl);
- lrMod = static_cast<long>(nr);
- if( bErr )
+ case EXPON:
+ nVal = pow( nl, nr ); break;
+ case MUL:
+ bCheckType = true;
+ nVal = nl * nr; break;
+ case DIV:
+ if( !nr )
{
- pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
+ pParser->Error( ERRCODE_BASIC_ZERODIV ); nVal = HUGE_VAL;
bError = true;
- }
- }
- bool bBothInt = ( pLeft->eType < SbxSINGLE
- && pRight->eType < SbxSINGLE );
- pLeft.reset();
- pRight.reset();
- nVal = 0;
- eType = SbxDOUBLE;
- eNodeType = SbxNUMVAL;
- bool bCheckType = false;
- switch( eTok )
- {
- case EXPON:
- nVal = pow( nl, nr ); break;
- case MUL:
- bCheckType = true;
- nVal = nl * nr; break;
- case DIV:
- if( !nr )
- {
- pParser->Error( ERRCODE_BASIC_ZERODIV ); nVal = HUGE_VAL;
- bError = true;
- } else nVal = nl / nr;
- break;
- case PLUS:
- bCheckType = true;
- nVal = nl + nr; break;
- case MINUS:
- bCheckType = true;
- nVal = nl - nr; break;
- case EQ:
- nVal = ( nl == nr ) ? SbxTRUE : SbxFALSE;
- eType = SbxINTEGER; break;
- case NE:
- nVal = ( nl != nr ) ? SbxTRUE : SbxFALSE;
- eType = SbxINTEGER; break;
- case LT:
- nVal = ( nl < nr ) ? SbxTRUE : SbxFALSE;
- eType = SbxINTEGER; break;
- case GT:
- nVal = ( nl > nr ) ? SbxTRUE : SbxFALSE;
- eType = SbxINTEGER; break;
- case LE:
- nVal = ( nl <= nr ) ? SbxTRUE : SbxFALSE;
- eType = SbxINTEGER; break;
- case GE:
- nVal = ( nl >= nr ) ? SbxTRUE : SbxFALSE;
- eType = SbxINTEGER; break;
- case IDIV:
- if( !lr )
- {
- pParser->Error( ERRCODE_BASIC_ZERODIV ); nVal = HUGE_VAL;
- bError = true;
- } else nVal = ll / lr;
- eType = SbxLONG; break;
- case MOD:
- if( !lr )
- {
- pParser->Error( ERRCODE_BASIC_ZERODIV ); nVal = HUGE_VAL;
- bError = true;
- } else nVal = llMod - lrMod * (llMod/lrMod);
- eType = SbxLONG; break;
- case AND:
- nVal = (double) ( ll & lr ); eType = SbxLONG; break;
- case OR:
- nVal = (double) ( ll | lr ); eType = SbxLONG; break;
- case XOR:
- nVal = (double) ( ll ^ lr ); eType = SbxLONG; break;
- case EQV:
- nVal = (double) ( ~ll ^ lr ); eType = SbxLONG; break;
- case IMP:
- nVal = (double) ( ~ll | lr ); eType = SbxLONG; break;
- default: break;
- }
+ } else nVal = nl / nr;
+ break;
+ case PLUS:
+ bCheckType = true;
+ nVal = nl + nr; break;
+ case MINUS:
+ bCheckType = true;
+ nVal = nl - nr; break;
+ case EQ:
+ nVal = ( nl == nr ) ? SbxTRUE : SbxFALSE;
+ eType = SbxINTEGER; break;
+ case NE:
+ nVal = ( nl != nr ) ? SbxTRUE : SbxFALSE;
+ eType = SbxINTEGER; break;
+ case LT:
+ nVal = ( nl < nr ) ? SbxTRUE : SbxFALSE;
+ eType = SbxINTEGER; break;
+ case GT:
+ nVal = ( nl > nr ) ? SbxTRUE : SbxFALSE;
+ eType = SbxINTEGER; break;
+ case LE:
+ nVal = ( nl <= nr ) ? SbxTRUE : SbxFALSE;
+ eType = SbxINTEGER; break;
+ case GE:
+ nVal = ( nl >= nr ) ? SbxTRUE : SbxFALSE;
+ eType = SbxINTEGER; break;
+ case IDIV:
+ if( !lr )
+ {
+ pParser->Error( ERRCODE_BASIC_ZERODIV ); nVal = HUGE_VAL;
+ bError = true;
+ } else nVal = ll / lr;
+ eType = SbxLONG; break;
+ case MOD:
+ if( !lr )
+ {
+ pParser->Error( ERRCODE_BASIC_ZERODIV ); nVal = HUGE_VAL;
+ bError = true;
+ } else nVal = llMod - lrMod * (llMod/lrMod);
+ eType = SbxLONG; break;
+ case AND:
+ nVal = (double) ( ll & lr ); eType = SbxLONG; break;
+ case OR:
+ nVal = (double) ( ll | lr ); eType = SbxLONG; break;
+ case XOR:
+ nVal = (double) ( ll ^ lr ); eType = SbxLONG; break;
+ case EQV:
+ nVal = (double) ( ~ll ^ lr ); eType = SbxLONG; break;
+ case IMP:
+ nVal = (double) ( ~ll | lr ); eType = SbxLONG; break;
+ default: break;
+ }
- if( !::rtl::math::isFinite( nVal ) )
- pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
+ if( !::rtl::math::isFinite( nVal ) )
+ pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
- // Recover the data type to kill rounding error
- if( bCheckType && bBothInt
- && nVal >= SbxMINLNG && nVal <= SbxMAXLNG )
- {
- // Decimal place away
- long n = (long) nVal;
- nVal = n;
- eType = ( n >= SbxMININT && n <= SbxMAXINT )
- ? SbxINTEGER : SbxLONG;
- }
+ // Recover the data type to kill rounding error
+ if( bCheckType && bBothInt
+ && nVal >= SbxMINLNG && nVal <= SbxMAXLNG )
+ {
+ // Decimal place away
+ long n = (long) nVal;
+ nVal = n;
+ eType = ( n >= SbxMININT && n <= SbxMAXINT )
+ ? SbxINTEGER : SbxLONG;
}
}
}
- else if (pLeft && pLeft->IsNumber())
+
+}
+void SbiExprNode::FoldConstantsUnaryNode(SbiParser* pParser)
+{
+ pLeft->FoldConstants(pParser);
+ if (pLeft->IsNumber())
{
nVal = pLeft->nVal;
pLeft.reset();
diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx
index ac2cce8..6efa150 100644
--- a/basic/source/inc/expr.hxx
+++ b/basic/source/inc/expr.hxx
@@ -105,6 +105,8 @@ class SbiExprNode { // operators (and operands)
SbiToken eTok;
bool bError; // true: error
void FoldConstants(SbiParser*);
+ void FoldConstantsBinaryNode(SbiParser*);
+ void FoldConstantsUnaryNode(SbiParser*);
void CollectBits(); // converting numbers to strings
bool IsOperand()
{ return eNodeType != SbxNODE && eNodeType != SbxTYPEOF && eNodeType != SbxNEW; }
@@ -131,6 +133,10 @@ public:
{ return eNodeType == SbxSTRVAL || eNodeType == SbxNUMVAL; }
bool IsIntConst();
bool IsVariable();
+ bool IsUnary()
+ { return pLeft && !pRight; }
+ bool IsBinary()
+ { return pLeft && pRight; }
SbiExprNode* GetWithParent() { return pWithParent; }
void SetWithParent( SbiExprNode* p ) { pWithParent = p; }
commit a9db17aabc3ac970e6e4754e28310d20138144d9
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sun Dec 20 14:21:43 2015 +0100
tdf#96051: FILESAVE: Roundtrip any PPTX file with Shapes creates invalid OOXML
Revert "bnc#584721: Import subtitle block to master slides"
This reverts commit b3d50feaa87b670baf68288974005ac26ad31736.
It seems the imported subtitle block makes export corrupt the
output. Better to have a valid output.
Change-Id: I1a3d4f03e4fa0c4431a5394495682a1b9d7677bc
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 869d0c4..ce9b835 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -144,9 +144,12 @@ void PPTShape::addShape(
break;
case XML_subTitle :
{
- sServiceName = "com.sun.star.presentation.SubtitleShape";
- aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
- bClearText = true;
+ if ( ( meShapeLocation == Master ) || ( meShapeLocation == Layout ) )
+ sServiceName = OUString();
+ else {
+ sServiceName = "com.sun.star.presentation.SubtitleShape";
+ aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
+ }
}
break;
case XML_obj :
diff --git a/sd/qa/unit/data/pptx/bnc584721_3.pptx b/sd/qa/unit/data/pptx/bnc584721_3.pptx
deleted file mode 100644
index 3866257..0000000
Binary files a/sd/qa/unit/data/pptx/bnc584721_3.pptx and /dev/null differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bc2b3a4..3fb64ff 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -91,7 +91,6 @@ public:
void testCreationDate();
void testBnc584721_1();
void testBnc584721_2();
- void testBnc584721_3();
void testBnc584721_4();
void testBnc904423();
void testShapeLineStyle();
@@ -133,7 +132,6 @@ public:
CPPUNIT_TEST(testCreationDate);
CPPUNIT_TEST(testBnc584721_1);
CPPUNIT_TEST(testBnc584721_2);
- CPPUNIT_TEST(testBnc584721_3);
CPPUNIT_TEST(testBnc584721_4);
CPPUNIT_TEST(testBnc904423);
CPPUNIT_TEST(testShapeLineStyle);
@@ -800,28 +798,6 @@ void SdImportTest::testBnc584721_2()
xDocShRef->DoClose();
}
-void SdImportTest::testBnc584721_3()
-{
- // Subtitle was simply skipped on master slides.
- // Check whether the second shape is a subtitle shape with the right text.
-
- sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_3.pptx"), PPTX);
-
- const SdrPage *pPage = &(GetPage( 1, xDocShRef )->TRG_GetMasterPage());
- SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(1) );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
-
- // Check the shape type
- uno::Reference< drawing::XShape > xShape( pTxtObj->getUnoShape(), uno::UNO_QUERY );
- CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.presentation.SubtitleShape"), xShape->getShapeType());
-
- // Check the text
- const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
- CPPUNIT_ASSERT_EQUAL(OUString("Click to edit Master subtitle style"), aEdit.GetText(0));
-
- xDocShRef->DoClose();
-}
-
void SdImportTest::testBnc591147()
{
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc591147.pptx"), PPTX);
commit 44f2edbf7a4f6f369a670ba32e7d1cc354c4fd6d
Author: Noel Grandin <noel at peralex.com>
Date: Tue Dec 22 10:12:28 2015 +0200
loplugin:unusedfields in include/vcl
Change-Id: I61fc04e00970ea0d398ff80f6b1f81ec2f62dd5e
Reviewed-on: https://gerrit.libreoffice.org/20868
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 52e81fb..9938240 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -93,8 +93,6 @@ struct VCL_DLLPUBLIC AnimationBitmap
struct AInfo
{
- Bitmap aLastSaveBitmap;
- Bitmap aBackBitmap;
Point aStartOrg;
Size aStartSize;
VclPtr<OutputDevice> pOutDev;
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index d744bfb..6f5ba5f 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -242,9 +242,6 @@ private:
typedef std::unordered_map< rtl::OString, std::shared_ptr<OpenGLProgram>, ProgramHash > ProgramCollection;
ProgramCollection maPrograms;
OpenGLProgram* mpCurrentProgram;
-#ifdef DBG_UTIL
- std::set<SalGraphicsImpl*> maParents;
-#endif
public:
vcl::Region maClipRegion;
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index bb30f8e..6340095 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -63,13 +63,11 @@ enum PrinterSupport
class VCL_DLLPUBLIC PrinterPage
{
GDIMetaFile* mpMtf;
- JobSetup maJobSetup;
public:
PrinterPage() : mpMtf( new GDIMetaFile() ) {}
- PrinterPage( GDIMetaFile* pMtf, const JobSetup& rSetup )
- : mpMtf( pMtf ), maJobSetup( rSetup ) {}
+ PrinterPage( GDIMetaFile* pMtf ) : mpMtf( pMtf ) {}
~PrinterPage() { delete mpMtf; }
};
diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx
index b347ec4..bad4b36 100644
--- a/include/xmloff/shapeimport.hxx
+++ b/include/xmloff/shapeimport.hxx
@@ -273,8 +273,6 @@ class XMLOFF_DLLPUBLIC XMLShapeImportHelper : public salhelper::SimpleReferenceO
XMLShapeImportPageContextImpl* mpPageContext;
- css::uno::Reference< css::frame::XModel > mxModel;
-
// PropertySetMappers and factory
XMLSdPropHdlFactory* mpSdPropHdlFactory;
SvXMLImportPropertyMapper* mpPropertySetMapper;
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 8ff67a3..18b7dd9 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -110,7 +110,6 @@ XMLShapeImportHelper::XMLShapeImportHelper(
SvXMLImportPropertyMapper *pExtMapper )
: mpImpl( new XMLShapeImportHelperImpl() ),
mpPageContext(nullptr),
- mxModel(rModel),
mpPropertySetMapper(nullptr),
mpPresPagePropsMapper(nullptr),
commit 7edfee8e4f81c17ec95a03843c509b95b8e404b2
Author: Yousuf Philips <philipz85 at hotmail.com>
Date: Fri Dec 11 18:53:15 2015 +0400
Rearrangement of various context menus in Impress
Change-Id: I6674254898dc6d7351ec4450e2aa5ac3f177bdbf
Reviewed-on: https://gerrit.libreoffice.org/20640
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Yousuf Philips <philipz85 at hotmail.com>
diff --git a/sd/inc/sdcommands.h b/sd/inc/sdcommands.h
index 4642124..77d6531 100644
--- a/sd/inc/sdcommands.h
+++ b/sd/inc/sdcommands.h
@@ -93,6 +93,7 @@
#define CMD_SID_SAVE_BACKGROUND ".uno:SaveBackground"
#define CMD_SID_DISPLAY_MASTER_BACKGROUND ".uno:DisplayMasterBackground"
#define CMD_SID_DISPLAY_MASTER_OBJECTS ".uno:DisplayMasterObjects"
+#define CMD_SID_MASTER_LAYOUTS ".uno:MasterLayouts"
#define CMD_SID_TABLE_DISTRIBUTE_COLUMNS ".uno:DistributeColumns"
#define CMD_SID_TABLE_DISTRIBUTE_ROWS ".uno:DistributeRows"
#define CMD_SID_TP_APPLY_TO_ALL_SLIDES ".uno:TaskPaneApplyToAllSlides"
diff --git a/sd/source/ui/app/menuids_tmpl.src b/sd/source/ui/app/menuids_tmpl.src
index c32cd2d..a41c102 100644
--- a/sd/source/ui/app/menuids_tmpl.src
+++ b/sd/source/ui/app/menuids_tmpl.src
@@ -89,7 +89,7 @@
{\
Identifier = SID_PAGESETUP ; \
HelpId = CMD_SID_PAGESETUP ; \
- Text [ en-US ] = "Format ~Slide..." ; \
+ Text [ en-US ] = "~Slide Properties..." ; \
};
#define MN_INSERT_SLIDE \
@@ -142,14 +142,21 @@
{\
Identifier = SID_DISPLAY_MASTER_BACKGROUND ; \
HelpId = CMD_SID_DISPLAY_MASTER_BACKGROUND ; \
- Text [ en-US ] = "Display Background of Master" ; \
+ Text [ en-US ] = "Display Master Background" ; \
};
#define MN_DISPLAY_MASTER_OBJECTS \
MenuItem\
{\
Identifier = SID_DISPLAY_MASTER_OBJECTS ; \
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list