Kaydet (Commit) 25934437 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Merge remote-tracking branch 'origin/libreoffice-3-4'

...@@ -475,6 +475,9 @@ sal_Bool ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc ) ...@@ -475,6 +475,9 @@ sal_Bool ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc )
{ {
/* XXX If changed, sc/source/filter/ftools/ftools.cxx /* XXX If changed, sc/source/filter/ftools/ftools.cxx
* ScfTools::ConvertToScDefinedName needs to be changed too. */ * 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 nPos = 0;
xub_StrLen nLen = rName.Len(); xub_StrLen nLen = rName.Len();
if ( !nLen || !ScCompiler::IsCharFlagAllConventions( rName, nPos++, SC_COMPILER_C_CHAR_NAME ) ) if ( !nLen || !ScCompiler::IsCharFlagAllConventions( rName, nPos++, SC_COMPILER_C_CHAR_NAME ) )
......
...@@ -162,6 +162,8 @@ Color ScfTools::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 ...@@ -162,6 +162,8 @@ Color ScfTools::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8
void ScfTools::ConvertToScDefinedName( String& rName ) 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(); xub_StrLen nLen = rName.Len();
if( nLen && !ScCompiler::IsCharFlagAllConventions( rName, 0, SC_COMPILER_C_CHAR_NAME ) ) if( nLen && !ScCompiler::IsCharFlagAllConventions( rName, 0, SC_COMPILER_C_CHAR_NAME ) )
rName.SetChar( 0, '_' ); rName.SetChar( 0, '_' );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment