diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-03 18:10:38 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-03 18:14:58 +0200 |
commit | 8079326b97df9b9da56bc62f67df705efb407409 (patch) | |
tree | a8aed2cdeace708476ce1514b89a47f4654c2e75 /dbaccess | |
parent | 7b957555d0027e9e7eeb8f31dcba6aa6408f4e16 (diff) |
database suggestname: no '/' for queries
In particular, this keeps the new query wizard
from silently failing by default
when the underlying table name has a slash: it would
generate a name proposal based on the table name,
and then use suggestName to get a similar,
yet guaranteed allowed name.
In this case, the "guaranteed allowed" part was failing,
since suggestName failed to strip slashes, which are
forbidden in query names.
Change-Id: I53d3976979ee45f5659765ed5dd3371b78837b5b
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/sdbtools/connection/objectnames.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index 9e1d0dd69cec..add350929508 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -419,6 +419,10 @@ namespace sdbtools else sBaseName = OUString( SdbtRes( STR_BASENAME_QUERY ) ); } + else if( _CommandType == CommandType::QUERY ) + { + sBaseName=sBaseName.replace('/', '_'); + } OUString sName( sBaseName ); sal_Int32 i = 1; |