diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-06-17 13:02:07 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-06-17 13:02:07 +0200 |
commit | 259344379ccd372d80c07bc52d0cf12c3cb1ae5b (patch) | |
tree | 8a1229d58fa344d64ab6c5191f6186607d55027a /sc/source | |
parent | 1dd19b65327d903f93fe2590074df4f5afde0758 (diff) | |
parent | 1bba2b51f3a63af717b4c2d2922f38796c687e3a (diff) |
Merge remote-tracking branch 'origin/libreoffice-3-4'
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/rangenam.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/ftools/ftools.cxx | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 07c7ea797bdb..9b19fbfa02b2 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -475,6 +475,9 @@ sal_Bool ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc ) { /* XXX If changed, sc/source/filter/ftools/ftools.cxx * ScfTools::ConvertToScDefinedName needs to be changed too. */ + sal_Char a('.'); + if (rName.Search(a, 0) != STRING_NOTFOUND) + return false; xub_StrLen nPos = 0; xub_StrLen nLen = rName.Len(); if ( !nLen || !ScCompiler::IsCharFlagAllConventions( rName, nPos++, SC_COMPILER_C_CHAR_NAME ) ) diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index 87c30020e479..23b6f927f407 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -162,6 +162,8 @@ Color ScfTools::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 void ScfTools::ConvertToScDefinedName( String& rName ) { + sal_Char a('.'); + rName.SearchAndReplaceAllAscii(&a,'_'); //fdo#37872: we don't allow points in range names any more xub_StrLen nLen = rName.Len(); if( nLen && !ScCompiler::IsCharFlagAllConventions( rName, 0, SC_COMPILER_C_CHAR_NAME ) ) rName.SetChar( 0, '_' ); |