summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-11-20 11:45:39 +0100
committerJan Holesovsky <kendy@collabora.com>2013-11-20 13:43:27 +0100
commit6e0aa783f4112791de336007343e064abc46324e (patch)
treece23304a30fd183b1a7d43007bc2521c8657d034 /sw
parentae3cfef7ea13f49f442862aba5264fc8839dd863 (diff)
bnc#837302: Allow insertion of redlines with an empty author.
No idea why that was not allowed (since the initial import in 2000), we need it for interoperability. Change-Id: I475fa63f9a4a3219a2b898b6f7d81e0603d32c18
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/bnc837302.docxbin0 -> 13904 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx11
-rw-r--r--sw/source/core/doc/docredln.cxx3
3 files changed, 12 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/bnc837302.docx b/sw/qa/extras/ooxmlexport/data/bnc837302.docx
new file mode 100644
index 000000000000..9d0c0af68b8f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bnc837302.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index f20cecd6b3b2..13245c3778d9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1161,6 +1161,17 @@ DECLARE_OOXMLEXPORT_TEST(testBnc834035, "bnc834035.odt")
assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:hyperlink", "anchor", "_Toc363553908");
}
+DECLARE_OOXMLEXPORT_TEST(testBnc837302, "bnc837302.docx")
+{
+ // The problem was that text with empty author was not inserted as a redline
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+
+ // previously 'AAA' was not an own run
+ getRun(xParagraph, 3, "AAA");
+ // interestingly the 'Insert' is set on the _previous_ run
+ CPPUNIT_ASSERT_EQUAL(OUString("Insert"), getProperty<OUString>(getRun(xParagraph, 2), "RedlineType"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testFdo68418, "fdo68418.docx")
{
// The problem was that in 'MSWordExportBase::SectionProperties' function in 'wrt8sty.cxx'
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 04bd74736b25..ee4db2620a16 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -290,8 +290,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
bool bMerged = false;
_CHECK_REDLINE( this )
- if( IsRedlineOn() && !IsShowOriginal( meRedlineMode ) &&
- !pNewRedl->GetAuthorString().isEmpty() )
+ if (IsRedlineOn() && !IsShowOriginal(meRedlineMode))
{
pNewRedl->InvalidateRange();