diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-09 14:20:44 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-09 15:01:37 +0200 |
commit | ceafd0a76fb062237f627cd9d49d4aad78cf3066 (patch) | |
tree | b0e19888b6b3bf3d597b609ff4e71d59ddd824a2 /sw/qa/extras | |
parent | 0cd2bf10fb4be5423e1386aa427c61ed4a33ef34 (diff) |
tdf#89214 SwDoc::GetUniqueNumRuleName: always return pChkStr if it's unused
Regression from commit bb00a0097900ae054401f7758a915047cfde4065 (do not
bother with nice unique names during mailmerge, 2014-11-08),
SwAttrSet::CopyToModify() expects that in case SwDoc::FindNumRulePtr()
returns 0 for a name, then the call to SwDoc::MakeNumRule() will use the
not found name (as SwDoc::GetUniqueNumRuleName() will return the just
checked name).
As a result, simply always returning a random unique name during mail
merge is a problem. Only return a cheap random unique name if no hint is
given.
Change-Id: I49d65009ced97d00aa2e8db35a529f2f30ac9ae5
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/mailmerge/data/tdf89214.odt | bin | 0 -> 9832 bytes | |||
-rw-r--r-- | sw/qa/extras/mailmerge/mailmerge.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/mailmerge/data/tdf89214.odt b/sw/qa/extras/mailmerge/data/tdf89214.odt Binary files differnew file mode 100644 index 000000000000..70def3730e26 --- /dev/null +++ b/sw/qa/extras/mailmerge/data/tdf89214.odt diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx index fc6962013da8..319bf93584cf 100644 --- a/sw/qa/extras/mailmerge/mailmerge.cxx +++ b/sw/qa/extras/mailmerge/mailmerge.cxx @@ -394,5 +394,17 @@ DECLARE_SHELL_MAILMERGE_TEST(testPageBoundaries2Pages, "simple-mail-merge-2pages } } +DECLARE_SHELL_MAILMERGE_TEST(testTdf89214, "tdf89214.odt", "10-testing-addresses.ods", "testing-addresses") +{ + executeMailMerge(); + + uno::Reference<text::XTextDocument> xTextDocument(mxMMComponent, uno::UNO_QUERY); + uno::Reference<text::XTextRange> xParagraph(getParagraphOrTable(3, xTextDocument->getText()), uno::UNO_QUERY); + // Make sure that we assert the right paragraph. + CPPUNIT_ASSERT_EQUAL(OUString("a"), xParagraph->getString()); + // This paragraph had a bullet numbering, make sure that the list id is not empty. + CPPUNIT_ASSERT(!getProperty<OUString>(xParagraph, "ListId").isEmpty()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |