...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>
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>
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
...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
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
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>
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>
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
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
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
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
Moves the duplicated code for saving documents, configuring the
printer and DB cursor forwarding (next record) into static local
functions.
Change-Id: I75f183a2a515ecbae276461613a05ab50c56e600
Whole subject was: "tdf93236 N-UP printing in with mailmerge broken
file-print 1/4"
This reverts all dbmgr.cxx changes, which were a result of this
commit. This patch merges the reverts for the following patches:
* "sw: remove include of sw/source/inc/uibase/dbui.hxx from dbmgr.hxx"
commit 4b01af28e6
* "coverity#1346891 Unused value"
commit 1876d9a807
* "tdf93236 N-UP printing in combination with mailmerge broken file-print 1/4"
commit d8ff907197
Change-Id: Ic51230c484fb9ee5dba2331c51ced1d20a787afa
all SfxFilter instances should now be hold inside of a std::shared_ptr.
This fixes a number of huge memory leaks in the test framework and
removes one huge source of memory issue in sfx2. SfxMedium contains a
pointer to the SfxFilter but does not own. Therefore it is required that
any SfxFilter belonging to a SfxMedium lives longer. However this seems
to work mostly by hoping that all SfxFilter instances are stored in a
global array. As we have seen with the tests this is not true (there are
also some cases inside of sd that seem to not follow that pattern as
well).
Change-Id: I12fd04a504cc4efc0a94967abd91c6fe2c6a8ce8
Reviewed-on: https://gerrit.libreoffice.org/23140
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
using an idea from dtardon:
<dtardon> noelgrandin, hi. could you try to run the unusedmethods clang
plugin with "make build-nocheck"? that would catch functions that are
only used in tests. e.g., i just removed the whole o3tl::range class,
which has not been used in many years, but htere was a test for it...
<noelgrandin> dtardon, interesting idea! Sure, I can do that.
Change-Id: I5653953a426a2186a1e43017212d87ffce520387
Reviewed-on: https://gerrit.libreoffice.org/22041
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
There is actually a comment in the mail merge code:
// convert fields to text if we are exporting to PDF
// this prevents a second merge while updating the fields
// in SwXTextDocument::getRendererCount()
This was included to fix i#93714.
But the reference to 2005-05-23 #122919# in the actual code
doesn't help to understand, why the original code is needed.
I would like to get rid of it, but currently don't have time
for tests.
So the optimization to skip ConvertFieldsToText() and use a
single working document for individual document mail merge
breaks for PDF, as the working document won't contain any
fields after the first document is written.
This uses multiple working documents for PDF export again.
Change-Id: I0cf1c64da27863fc5fb4bb6c7812fed90b737d13