summaryrefslogtreecommitdiff
path: root/test/source/sheet
diff options
context:
space:
mode:
Diffstat (limited to 'test/source/sheet')
-rw-r--r--test/source/sheet/xnamedranges.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/source/sheet/xnamedranges.cxx b/test/source/sheet/xnamedranges.cxx
index 25726ca9e739..e07911f421ab 100644
--- a/test/source/sheet/xnamedranges.cxx
+++ b/test/source/sheet/xnamedranges.cxx
@@ -70,6 +70,13 @@ void XNamedRanges::testAddNewByName()
xNamedRanges->addNewByName(aName5, "D5", aBaseAddress, nType);
CPPUNIT_ASSERT_MESSAGE("Failed to create Namedrange Type ROW_HEADER",
xNamedRanges->hasByName(aName5));
+
+ // tdf#119457 - check for a valid range name
+ OUString aName6("type_INVALID_BAD_STRING.+:");
+ CPPUNIT_ASSERT_THROW(xNamedRanges->addNewByName(aName6, "D6", aBaseAddress, 0),
+ uno::RuntimeException);
+ CPPUNIT_ASSERT_MESSAGE("Created Namedrange with invalid name",
+ !xNamedRanges->hasByName(aName6));
}
void XNamedRanges::testAddNewFromTitles()