Commit Graph

166 Commits

Author SHA1 Message Date
Miklos Vajna
189d3e10c7 sw: fix some IWYU warnings
Change-Id: I0241707fcdf1d22131ce35fb64488fcf6d669675
Reviewed-on: https://gerrit.libreoffice.org/52750
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-12 09:08:08 +02:00
Caolán McNamara
8ed2fb306f weld linkeditdialog
which enables changing FileDialogHelper over to welded

Change-Id: I988342a6574cb7ed09b2724929e8c7117474a56c
Reviewed-on: https://gerrit.libreoffice.org/52388
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-06 16:48:12 +02:00
Miklos Vajna
3613c299f6 sw: fix some IWYU warnings
Change-Id: I3682cc475de8342e4cdf122a35f6c1cfddd4c01e
Reviewed-on: https://gerrit.libreoffice.org/51677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-21 09:27:53 +01:00
Miklos Vajna
152e022f1e Fix some IWYU warnings
Change-Id: Ie1639cc4017d696ea3fd9ffb96f1559aa3ac6397
Reviewed-on: https://gerrit.libreoffice.org/49340
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-08 13:11:55 +01:00
Noel Grandin
20e5f64215 loplugin:unused-returns in sw
Change-Id: I753fcdd35d461880a8d8160213cabd465cfde967
Reviewed-on: https://gerrit.libreoffice.org/48189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-30 07:20:51 +01:00
Caolán McNamara
cd4c5e3b2a coverity#1417678 Uncaught exception
Change-Id: I93540f308b0ea20358925609f11d0f72a13cbd3f
Reviewed-on: https://gerrit.libreoffice.org/48789
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-28 18:14:37 +01:00
Caolán McNamara
86e9d28c58 coverity#1401307 Uncaught exception
and

coverity#1401308 Uncaught exception

Change-Id: Ia8ab29a45888cf9b1014e4e4ac32c5de930a2935
Reviewed-on: https://gerrit.libreoffice.org/48688
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-26 21:32:32 +01:00
Stephan Bergmann
a707dc29ec Avoid clash with ERROR macro from wingdi.h on Windows
Change-Id: Ifd9d9f08184eaf00e2d33765c80b7df234bce02a
Reviewed-on: https://gerrit.libreoffice.org/47669
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-09 23:16:18 +01:00
Miklos Vajna
28ddaf520d tdf#98168 sw: add mail merge from xlsx testcase
Commit 83b43ef222 (sw mail merge: add
support for the new 'writer' connectivity driver, 2017-07-18) fixed
this, with:

> If we are at it, also accept xlsx next to xls.

But there was no test for that part.

Change-Id: Iffbd4d21e52700d38dc0a83cb5540fa10c062944
Reviewed-on: https://gerrit.libreoffice.org/46818
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-20 09:04:58 +01:00
Mike Kaganski
1560a335f7 SwDBManager: move implementation details from interface
Change-Id: I738e8306f2f9af7f284cc236d55f5e184e632323
Reviewed-on: https://gerrit.libreoffice.org/44951
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-20 15:40:53 +01:00
Mike Kaganski
06756e412b One more proper construction of vnd.sun.star.pkg URL
Change-Id: I4b1bfc9c9b158506424ec0b5e2fd71c6ccb7d3ec
Reviewed-on: https://gerrit.libreoffice.org/44917
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-18 21:38:36 +01:00
Noel Grandin
5f41f7b33e loplugin:constantparam in sw
Change-Id: Ia477de0fb910f6a8fbb0a5054f4bdb43dd9ff381
Reviewed-on: https://gerrit.libreoffice.org/43951
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27 20:37:02 +02:00
Stephan Bergmann
62f47bb2a5 loplugin:includeform: sw
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
2017-10-23 22:45:50 +02:00
Andrea Gelmini
e44c188a73 Fix typos
Change-Id: I879a52820d78d9151ef64dd21612379f617f66e2
Reviewed-on: https://gerrit.libreoffice.org/42726
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-25 12:20:56 +02:00
Szymon Kłos
29bd193146 tdf#108572 remove connection also if not saved
Change-Id: Iddce37c3ad187f4a5572cb3cc2362535134c28e8
Reviewed-on: https://gerrit.libreoffice.org/42357
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-09-17 11:51:25 +02:00
Caolán McNamara
d317c4e050 coverity#1417678 Uncaught exception
Change-Id: I99b479d8fd8d8e9d075f4a9da01c60d9c38cb472
2017-09-12 09:51:46 +01:00
Szymon Kłos
97477ee5e1 tdf#108572 remove connections only for current shell
Also remove connections to temp files.

Change-Id: Ie5c09eb365d1246e053dc52884c72687ac226f3c
Reviewed-on: https://gerrit.libreoffice.org/42095
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-09-09 11:42:50 +02:00
Caolán McNamara
1af5f6e8d1 set parent for file dialog helper
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a
Reviewed-on: https://gerrit.libreoffice.org/42048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-08 11:27:18 +02:00
Szymon Kłos
ba368643e6 tdf#108572 revoke connection if mail-merge is cancelled
Change-Id: Idca4969af8043f7dbc54f4a63b99e92155ef1585
Reviewed-on: https://gerrit.libreoffice.org/41949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-09-07 11:52:50 +02:00
Noel Grandin
8ef6be7332 loplugin:constparams in sw part6
Change-Id: Ic82946cf9be50d9d9c43338b86dfb700ce5b354c
Reviewed-on: https://gerrit.libreoffice.org/40786
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-06 20:13:53 +02:00
Noel Grandin
4732e65646 loplugin:unusedfields in sw
Change-Id: Iad2bddb2359af3e7da40175d17d2d3ed7eda5be6
Reviewed-on: https://gerrit.libreoffice.org/40229
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 12:09:00 +02:00
Miklos Vajna
83b43ef222 sw mail merge: add support for the new 'writer' connectivity driver
By mapping the .odt, .sxw, .doc and .docx extensions to sdbc:writer:. If
we are at it, also accept xlsx next to xls.

Change-Id: I8c6769b282adec1e7e8d191170e7aa9b324f2018
Reviewed-on: https://gerrit.libreoffice.org/40147
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18 20:09:23 +02:00
Noel Grandin
c70d49c7c8 use strong_int for LanguageType
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448
Reviewed-on: https://gerrit.libreoffice.org/36629
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-26 08:50:54 +02:00
Andrea Gelmini
402aa305b7 Fix typos
Change-Id: Ia87318cb323d403cdff947da0b70e0d2aabaacd4
Reviewed-on: https://gerrit.libreoffice.org/35657
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 16:13:45 +00:00
Stephan Bergmann
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
Noel Grandin
64cb9fb42f Revert "convert DBConnURIType to scoped enum"
This reverts commit f0c5726670.

Missed the WIN32 only code where the JET and ACE enumerators were
being used.
2017-02-13 08:37:35 +02:00
Noel Grandin
f0c5726670 convert DBConnURIType to scoped enum
and drop unused enumerators
    DBCONN_MSJET
    DBCONN_MSACE

Change-Id: I4036b8f98488bac8e38094320281aa41f42e9787
2017-02-13 08:17:42 +02:00
Jan-Marek Glogowski
5f2e1eda45 tdf#105288 MM wait until all emails are send
Seems mail merge is now much faster then the sending of the merged
documents via email. This is why the attached workaround patch to
the tdf#103919 bug report, which simply sleeps after queuing a new
message, helped solving the problem. It slows down the mail merge
and gives time to the mail dispatcher thread.

But we actually want to wait until all mails are send, so we have
to add a listener and wait for the mail thread to become idle.

This listener also allows us to cancel further mail merge when an
SMTP error has occured.

Change-Id: I9d13bcd8f0d0ff084b20d72ab96f70afa3a764ba
Reviewed-on: https://gerrit.libreoffice.org/33989
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-02-10 10:44:17 +00:00
Jan-Marek Glogowski
9235c5a3c2 MM change listener from friend to a nested class
Change-Id: I245a27e02816d3c96ca7777059b99c42cb64cca5
2017-01-17 16:08:46 +01:00
Jan-Marek Glogowski
bbf246e40c tdf#102010 Never overwrite MM files via UNO
Fixes the regression introduced by
  commit e637b6743a

This commit removed the crazy bSubjectIsFilename handling,
where I didn't understood the case of bSubjectIsFilename
and a user supplied prefix.

Mail merge to files never overwrites an existing document,
but there is the special case, when a user selects a target
filename in the MM dialog for single file MM.

Should be fixed by a successive commmit, reverting this and
removing an existing file before starting the MM job.

Change-Id: Idda487023e6984de9c1e701fc088a6b7f92e9847
2016-11-25 16:27:06 +01:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Noel Grandin
480f6916ef loplugin:countusersofdefaultparams in sw
Change-Id: I65beb17816641cff6a07379b7ba234afe26806b3
Reviewed-on: https://gerrit.libreoffice.org/29488
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-04 06:36:22 +00:00
Noel Grandin
0f8a303186 loplugin:constantparam in sw
Change-Id: Ibae4cac28e6ff52298c804519f683017729c07a5
2016-09-08 11:47:19 +02:00
Noel Grandin
228d0950f5 loplugin:countusersofdefaultparams
Change-Id: I7150494a56abc6ec9c7fba39cefe3967a475f073
2016-08-25 13:47:05 +02:00
Caolán McNamara
7b355ad06e Resolves: tdf#101382 turn SetMailMergeConfigItem into a shared_ptr
so if the SwView it nominally belongs to is deleted while a
mail merge wizard is open it still exists while the wizard
has a ref to it

Change-Id: I4f5acbcc1ea6404851cf6e0179fd3c795342f726
2016-08-09 14:37:53 +01:00
Jan-Marek Glogowski
b6a698b093 tdf#95251 MM just allow print as single document
Remove kept block from revert of
  138d29aa09

After this revert MM just supports pinting via a single merged
document. Printing as inidividual files should have still worked,
but as a workaround we remove this functionality, until the print
backend can handle multiple-file print jobs correctly.

Change-Id: I70d0852cdcc369b0fc9f344086830f15d8dea451
Reviewed-on: https://gerrit.libreoffice.org/27721
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2016-07-30 15:02:25 +00:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
Stephan Bergmann
9f7f7d6cfa loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I7e7cdfa5efaf18bb47d40947d4e1d91a2c9b5a57
2016-07-07 18:59:55 +02:00
Noel Grandin
82644f5952 loplugin:singlevalfields in sw(part4)
Change-Id: I73d94ae89edb2e6f37cfa087a0d85b5a90df4a8a
Reviewed-on: https://gerrit.libreoffice.org/26679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-27 05:23:32 +00:00
Noel Grandin
84d15d6e54 loplugin:unuseddefaultparams
Change-Id: I0fe173534dc2e70c3d507eae757a91e48a26acfc
Reviewed-on: https://gerrit.libreoffice.org/25757
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-02 06:32:25 +00:00
Noel Grandin
47f62540bd loplugin:unusedmethods in sw
Change-Id: I05e224bcc7d2b08cf1349c14e3acf274d422e109
Reviewed-on: https://gerrit.libreoffice.org/25145
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-23 11:55:36 +00:00
Oliver Specht
7b24f21a46 tdf#98985 create merge results at the right time
When using mail merge toolbar the resulting documents are now created
on OK in Save/Print and Send dialogs.
Additionally the 'To' is set in the save dialog and the
MailMergeConfigItem ist not deleted twice anymore.

Change-Id: I21f1f49d8bbd40c11b6f771e15b89e0f6c4bc87a
Reviewed-on: https://gerrit.libreoffice.org/25104
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-05-19 07:08:33 +00:00
Noel Grandin
89fa923a28 loplugin:passstuffbyref in sw
Change-Id: I124bdd4f28c7d7508e77b902dfa23c398454bf38
2016-04-14 09:21:40 +02:00
Jan-Marek Glogowski
bc477f93a7 MM: rename MergeNew => Merge
Since all old code from the original Merge function is gone, just
do the rename.

Change-Id: I7cc1b4b58cc73bea83a723b2478a8b4bf59a382f
2016-03-24 22:40:56 +01:00
Jan-Marek Glogowski
bdb0c4e128 tdf#95292 MM: cleanup bEndOfDB handling
bEndOfDB was handled inconsistently in ToNextRecord for record
selections and normal record iteration. The new unified semantics
are defined to set bEndOfDB for the first failing record fetch.

This includes a rename of the function ExistsNextRecord, which
did never check for a next record, but just verified the current
record set to be valid.

This way we can also drop the bAfterSelection selection, which
was just needed for the inconsistent bEndOfDB handling.

Change-Id: Ibbd7ae95e5969b51e32f44b442e5dc778655e8a9
2016-03-24 22:40:48 +01:00
Jan-Marek Glogowski
435ca34e14 MM: merge cancel and error variable
An error always includes the "cancel", while a cancel doesn't have
to be an error. So merge handling by using an enum.

Change-Id: I154dccbd3063d7ce37ee3cb90b4f193cb1edd466
2016-03-24 22:40:46 +01:00
Jan-Marek Glogowski
5c1433d87c MM: cleanup of comments and asserts
Also adds a README to explain some of the code flow of MM.

Change-Id: I363fdd73824a8d41f7073b6de2e9c24184005397
2016-03-24 22:40:45 +01:00
Jan-Marek Glogowski
88761228ad MM: some assertion on MM input
Change-Id: Id29ede49acf86ad6109eab88fbae5d9bbb2d8720
2016-03-24 22:40:42 +01:00
Jan-Marek Glogowski
e637b6743a MM: move email subject and address into descriptor
Both are not related to the DBManager, but the mail merge job.

While at it, also drop the insane bSubjectIsFilename handling, add
an independent sPath, rename sAddressFromColumn to a more general
sDBcolumn, as it's also used for file name lookup in FILE mode, and
unify the DB column data handling.

Change-Id: I1b583f4a67279a229329ba7cd15fb8d2c215737c
2016-03-24 22:40:41 +01:00
Jan-Marek Glogowski
ffe0b2c3b6 MM: rename and constify variables
Instead of the huge comparisons (in terms of text space), this
deconstructs the mail merge type into smaller uppercase variables.

bCancel is renamed to m_bCancel to especially distinguish it from
the bNoError local variable, as both are supposed to be handled
together.

Otherall this should improve the readability of the code.

Change-Id: I51ab17f7cd90a9e195d09dfcf37a0d194aa9fbbd
2016-03-24 22:40:39 +01:00