diff options
Diffstat (limited to 'dbaccess/source/ui/querydesign/QueryDesignView.cxx')
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 9838c3298..d67f0667b 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -330,88 +330,6 @@ namespace return eErrorCode; } - //------------------------------------------------------------------------------ - ::rtl::OUString QuoteField( const OQueryDesignView* _pView,const ::rtl::OUString& rValue, sal_Int32 aType ) - { - ::rtl::OUString rNewValue; - switch (rValue.toChar()) - { - case '?': - if (rValue.getLength() != 1) - break; - case '\'': // ::rtl::OUString Quotierung oder Datum - //case '#': // Datumsquotierung // jetengine - case ':': // Parameter - case '[': // Parameter - return rValue; - } - - Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection(); - Reference< XDatabaseMetaData > xMetaData; - if(xConnection.is()) - xMetaData = xConnection->getMetaData(); - ::rtl::OUString aQuote; - try - { - if(xMetaData.is()) - aQuote = xMetaData->getIdentifierQuoteString(); - - switch( aType ) - { - case DataType::DATE: - case DataType::TIME: - case DataType::TIMESTAMP: - if (rValue.toChar() != '{') // nur quoten, wenn kein Access Datum - rNewValue = ::dbtools::quoteName(aQuote,rValue); - else - rNewValue = rValue; - break; - case DataType::CHAR: - case DataType::VARCHAR: - case DataType::LONGVARCHAR: - case DataType::CLOB: - rNewValue = ::dbtools::quoteName(aQuote,rValue); - break; - case DataType::DECIMAL: - case DataType::NUMERIC: - case DataType::TINYINT: - case DataType::SMALLINT: - case DataType::INTEGER: - case DataType::BIGINT: - case DataType::REAL: - case DataType::DOUBLE: - case DataType::BINARY: - case DataType::VARBINARY: - case DataType::LONGVARBINARY: - case DataType::BLOB: - rNewValue = rValue; - break; - case DataType::BIT: - case DataType::BOOLEAN: - { - if(xMetaData.is()) - { - ::comphelper::UStringMixEqual bCase(xMetaData->supportsMixedCaseQuotedIdentifiers()); - if (bCase(rValue, String(ModuleRes(STR_QUERY_TRUE)))) - rNewValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TRUE")); - else if (bCase(rValue, String(ModuleRes(STR_QUERY_FALSE)))) - rNewValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FALSE")); - else - rNewValue = rValue; - } - } - break; - default: - DBG_ERROR( "QuoteField: illegal type" ); - break; - } - } - catch(SQLException&) - { - DBG_ERROR( "QuoteField: Exception" ); - } - return rNewValue; - } // ----------------------------------------------------------------------------- /** FillDragInfo fills the field description out of the table |