[Libreoffice-commits] core.git: oox/source sc/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Oct 4 19:29:48 UTC 2018
oox/source/vml/vmlinputstream.cxx | 2 +-
sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx |binary
sc/qa/unit/subsequent_filters-test.cxx | 19 +++++++++++++++++++
3 files changed, 20 insertions(+), 1 deletion(-)
New commits:
commit 2cae2ecfef47d8dd10647c10f9577392c1887d3a
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Thu Oct 4 17:55:42 2018 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Thu Oct 4 21:29:23 2018 +0200
tdf#120301 oox: lclIsWhiteSpace should return true for a space
Change-Id: I72c79c1fed4d9a91bf02024eef23cd3b1a58632e
Reviewed-on: https://gerrit.libreoffice.org/61388
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx
index 0dcb588bf931..e33c66a87f21 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -43,7 +43,7 @@ inline const sal_Char* lclFindCharacter( const sal_Char* pcBeg, const sal_Char*
inline bool lclIsWhiteSpace( sal_Char cChar )
{
- return cChar < 32;
+ return cChar <= 32;
}
const sal_Char* lclFindWhiteSpace( const sal_Char* pcBeg, const sal_Char* pcEnd )
diff --git a/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx b/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx
new file mode 100644
index 000000000000..0677a0cf2eb2
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 0b0406127e82..188a957f5440 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -234,6 +234,7 @@ public:
void testPageScalingXLSX();
void testActiveXCheckboxXLSX();
+ void testtdf120301_xmlSpaceParsingXLSX();
#ifdef UNX
void testUnicodeFileNameGnumeric();
#endif
@@ -371,6 +372,7 @@ public:
CPPUNIT_TEST(testPageScalingXLSX);
CPPUNIT_TEST(testActiveXCheckboxXLSX);
+ CPPUNIT_TEST(testtdf120301_xmlSpaceParsingXLSX);
#ifdef UNX
CPPUNIT_TEST(testUnicodeFileNameGnumeric);
#endif
@@ -4140,6 +4142,23 @@ void ScFiltersTest::testActiveXCheckboxXLSX()
xDocSh->DoClose();
}
+void ScFiltersTest::testtdf120301_xmlSpaceParsingXLSX()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf120301_xmlSpaceParsing.", FORMAT_XLSX);
+ uno::Reference< frame::XModel > xModel = xDocSh->GetModel();
+ uno::Reference< sheet::XSpreadsheetDocument > xDoc(xModel, UNO_QUERY_THROW);
+ uno::Reference< container::XIndexAccess > xIA(xDoc->getSheets(), UNO_QUERY_THROW);
+ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xIA->getByIndex(0), UNO_QUERY_THROW);
+ uno::Reference< container::XIndexAccess > xIA_DrawPage(xDrawPageSupplier->getDrawPage(), UNO_QUERY_THROW);
+
+ uno::Reference< drawing::XControlShape > xControlShape(xIA_DrawPage->getByIndex(0), UNO_QUERY_THROW);
+ uno::Reference< beans::XPropertySet > XPropSet( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+ OUString sCaption;
+ XPropSet->getPropertyValue("Label") >>= sCaption;
+ CPPUNIT_ASSERT_EQUAL(OUString("Check Box 1"), sCaption);
+ xDocSh->DoClose();
+}
+
namespace {
struct PaintListener : public SfxListener
More information about the Libreoffice-commits
mailing list