summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorAbhilash Singh <abhilash300singh@gmail.com>2017-01-22 14:42:15 +0530
committerEike Rathke <erack@redhat.com>2017-01-28 00:08:47 +0000
commit413232229cbfd9d49ce9d1cdbb6b6e2dbe83af38 (patch)
treed53892366680bec211e7a74e2b4633b8735c06b2 /sc/inc
parent3084e8f5b12e865d565278168c27c7af15282191 (diff)
tdf#86214 User isn't warned entering a cell address not allowed
Refactored ScRangeData::IsNameValid Change-Id: I74dd5830d13e48e8fe9a5180a819be4acdc9a1db Reviewed-on: https://gerrit.libreoffice.org/33386 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/globstr.hrc4
-rw-r--r--sc/inc/rangenam.hxx10
2 files changed, 12 insertions, 2 deletions
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 68d48d9e7da5..3b3cef607032 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -712,7 +712,9 @@
#define STR_QUERY_PIVOTTABLE_DELTAB 545
-#define SC_GLOBSTR_STR_COUNT 546 /**< the count of permanently resident strings */
+#define STR_ERR_NAME_INVALID_CELL_REF 546
+
+#define SC_GLOBSTR_STR_COUNT 547 /**< the count of permanently resident strings */
#endif
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 19c288b8ac87..737c5e6b01af 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -59,6 +59,13 @@ public:
AbsPos = 0x0080
};
+ enum IsNameValidType
+ {
+ NAME_VALID,
+ NAME_INVALID_CELL_REF,
+ NAME_INVALID_BAD_STRING
+ };
+
private:
OUString aName;
OUString aUpperName; // #i62977# for faster searching (aName is never modified after ctor)
@@ -154,7 +161,8 @@ public:
void ValidateTabRefs();
static void MakeValidName( OUString& rName );
- SC_DLLPUBLIC static bool IsNameValid( const OUString& rName, ScDocument* pDoc );
+
+ SC_DLLPUBLIC static IsNameValidType IsNameValid( const OUString& rName, ScDocument* pDoc );
SCROW GetMaxRow() const;
SCCOL GetMaxCol() const;