summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-07-03 18:10:38 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-07-04 12:38:56 +0000
commite8a1cd6600486d379d045bae450961a83371a052 (patch)
tree5583a99c4d2b7244e9910883b3d030780a768055 /dbaccess
parent4a5d7af326d85d7cf24193a18c2df9575c9241b2 (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 Reviewed-on: https://gerrit.libreoffice.org/4709 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/sdbtools/connection/objectnames.cxx4
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;