[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sw/qa sw/source
Jan Holesovsky
kendy at collabora.com
Mon Dec 2 08:55:38 PST 2013
sw/qa/extras/ooxmlexport/data/bnc837302.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 13 +++++++++++++
sw/source/core/doc/docredln.cxx | 3 +--
3 files changed, 14 insertions(+), 2 deletions(-)
New commits:
commit 558d94b141a94ae82f56cb2fa5657b7ae19cd764
Author: Jan Holesovsky <kendy at collabora.com>
Date: Wed Nov 20 11:45:39 2013 +0100
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.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
sw/source/core/doc/docredln.cxx
Change-Id: I475fa63f9a4a3219a2b898b6f7d81e0603d32c18
Reviewed-on: https://gerrit.libreoffice.org/6897
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/qa/extras/ooxmlexport/data/bnc837302.docx b/sw/qa/extras/ooxmlexport/data/bnc837302.docx
new file mode 100644
index 0000000..9d0c0af
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/bnc837302.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index c1bb45e..d7a5c8b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -77,6 +77,7 @@ public:
void testBnc834035();
void testCp1000015();
void testFdo70812();
+ void testBnc837302();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -138,6 +139,7 @@ void Test::run()
{"bnc834035.odt", &Test::testBnc834035},
{"cp1000015.odt", &Test::testCp1000015},
{"fdo70812.docx", &Test::testFdo70812},
+ {"bnc837302.docx", &Test::testBnc837302},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@@ -789,6 +791,17 @@ void Test::testFdo70812()
getParagraph(1, "Sample pages document.");
}
+void Test::testBnc837302()
+{
+ // 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"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index a6a92a1..1e9a073 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -293,8 +293,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
bool bError = true;
_CHECK_REDLINE( this )
- if( IsRedlineOn() && !IsShowOriginal( meRedlineMode ) &&
- pNewRedl->GetAuthorString().Len() )
+ if (IsRedlineOn() && !IsShowOriginal(meRedlineMode))
{
pNewRedl->InvalidateRange();
More information about the Libreoffice-commits
mailing list