summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-06-17 13:02:07 +0200
committerJan Holesovsky <kendy@suse.cz>2011-06-17 13:02:07 +0200
commit259344379ccd372d80c07bc52d0cf12c3cb1ae5b (patch)
tree8a1229d58fa344d64ab6c5191f6186607d55027a /sc
parentUse DESKTOP and NATIVE where appropriate (diff)
parentgive local range names higher priority than global ones (diff)
downloadcore-259344379ccd372d80c07bc52d0cf12c3cb1ae5b.tar.gz
core-259344379ccd372d80c07bc52d0cf12c3cb1ae5b.zip
Merge remote-tracking branch 'origin/libreoffice-3-4'
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/rangenam.cxx3
-rw-r--r--sc/source/filter/ftools/ftools.cxx2
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, '_' );