[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - 3 commits - desktop/qa sal/qa sw/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Dec 11 13:58:54 UTC 2018
desktop/qa/desktop_lib/test_desktop_lib.cxx | 1
sal/qa/rtl/strings/test_oustring_stringliterals.cxx | 42 +++++++++++++++-----
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 2
3 files changed, 33 insertions(+), 12 deletions(-)
New commits:
commit 8886b414a781a6e4c3d9a0c158479336d7df781e
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Tue Dec 11 14:57:08 2018 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Dec 11 14:57:08 2018 +0100
fixup tdf#97417: fix unit test's early para numbering
This removes a stray line from
4b282dc07884f39d31edffb256e608e91eb266b3
Justin Luth <justin_luth at sil.org>
related to tdf#97417: fix unit test's early para numbering
Change-Id: If4bb1a86eb880c0ffdbde6c63535bf5fb82e28de
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 76dc7a87153f..673fb085c817 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -896,8 +896,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103982, "tdf103982.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf97417, "section_break_numbering.docx")
{
uno::Reference<beans::XPropertySet> xProps(getParagraph(1), uno::UNO_QUERY_THROW);
- auto prop = xProps->getPropertyValue("NumberingRules");
-
CPPUNIT_ASSERT_MESSAGE("1st page: first paragraph erroneous numbering",
!xProps->getPropertyValue("NumberingRules").hasValue());
// paragraph with numbering and section break was removed by writerfilter
commit 1f4fbb1a236f10994a1c60b0e54ed4ebbe759ad7
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Tue Dec 11 13:56:28 2018 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Dec 11 13:56:28 2018 +0100
fixup mismerge: Related: tdf#113160 set parent
This was commit b36eaa30fa712b558ecb1e1500577d1352a36d18:
Caolán McNamara <caolanm at redhat.com>
Related: tdf#113160 set parent of warning dialogs during load
Change-Id: I9119c2890116ea59dc2016485c21d26510a8f16e
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 2b538c936a1b..b20ed0dafcdd 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -657,6 +657,7 @@ void DesktopLOKTest::testCellCursor()
boost::property_tree::read_json(aStream, aTree);
OString aRectangle(aTree.get<std::string>("commandValues").c_str());
+ CPPUNIT_ASSERT_EQUAL(aRectangle, OString("0, 0, 1278, 254"));
comphelper::LibreOfficeKit::setActive(false);
}
commit 21c601370ec71558e2544f273e1edde6ea6eac8e
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jun 7 10:41:55 2016 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Dec 11 13:45:51 2018 +0100
Replace VALID_CONVERSION macro with function
...to avoid bogus -Werror=unused-result from trunk GCC in the macro expansion.
Change-Id: I227a0edfb22255c31d285609761dbefb4e50e09a
Reviewed-on: https://gerrit.libreoffice.org/26004
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 825e7d84ad25..ff4300052f1e 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -14,6 +14,10 @@ extern bool rtl_string_unittest_invalid_conversion;
extern bool rtl_string_unittest_const_literal_function;
extern bool rtl_string_unittest_non_const_literal_function;
+#include <sal/config.h>
+
+#include <utility>
+
#include <sal/types.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
@@ -49,12 +53,20 @@ CPPUNIT_TEST_SUITE_END();
// reset the flag, evaluate the expression and return
// whether the string literal ctor was used (i.e. whether the conversion was valid)
-#define VALID_CONVERSION( expression ) \
- ( \
- rtl_string_unittest_invalid_conversion = false, \
- ( void ) rtl::OUString( expression ), \
- ( void ) rtl::OUStringBuffer( expression ), \
- !rtl_string_unittest_invalid_conversion )
+template<typename T> bool VALID_CONVERSION( T && expression )
+{
+ rtl_string_unittest_invalid_conversion = false;
+ ( void ) rtl::OUString( std::forward<T>(expression) );
+ ( void ) rtl::OUStringBuffer( std::forward<T>(expression) );
+ return !rtl_string_unittest_invalid_conversion;
+}
+template<typename T> bool VALID_CONVERSION_CALL( T f )
+{
+ rtl_string_unittest_invalid_conversion = false;
+ ( void ) rtl::OUString( f() );
+ ( void ) rtl::OUStringBuffer( f() );
+ return !rtl_string_unittest_invalid_conversion;
+}
void test::oustring::StringLiterals::checkCtors()
{
@@ -93,7 +105,8 @@ void test::oustring::StringLiterals::checkCtors()
void test::oustring::StringLiterals::testcall( const char str[] )
{
- CPPUNIT_ASSERT( !VALID_CONVERSION( rtl::OUString( str )));
+ CPPUNIT_ASSERT(
+ !VALID_CONVERSION_CALL([&str]() { return rtl::OUString(str); }));
}
void test::oustring::StringLiterals::checkUsage()
@@ -154,9 +167,18 @@ void test::oustring::StringLiterals::checkNonconstChar()
char bar[] = "bar";
const char consttest[] = "test";
const char constbar[] = "bar";
- CPPUNIT_ASSERT( !VALID_CONVERSION( rtl::OUString( "footest" ).replaceAll( test, bar )));
- CPPUNIT_ASSERT( !VALID_CONVERSION( rtl::OUString( "footest" ).replaceAll( consttest, bar )));
- CPPUNIT_ASSERT( !VALID_CONVERSION( rtl::OUString( "footest" ).replaceAll( test, constbar )));
+ CPPUNIT_ASSERT(
+ !VALID_CONVERSION_CALL(
+ [&test, &bar]() {
+ return rtl::OUString("footest").replaceAll(test, bar); }));
+ CPPUNIT_ASSERT(
+ !VALID_CONVERSION_CALL(
+ [&consttest, &bar]() {
+ return rtl::OUString("footest").replaceAll(consttest, bar); }));
+ CPPUNIT_ASSERT(
+ !VALID_CONVERSION(
+ [&test, &constbar]() {
+ return rtl::OUString("footest").replaceAll(test, constbar); }));
CPPUNIT_ASSERT( rtl::OUString( "foobar" ) == rtl::OUString( "footest" ).replaceAll( consttest, constbar ));
}
More information about the Libreoffice-commits
mailing list