summaryrefslogtreecommitdiff
path: root/connectivity/source/resource
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/resource')
-rw-r--r--connectivity/source/resource/conn_error_message.src99
-rw-r--r--connectivity/source/resource/conn_log_res.src312
-rw-r--r--connectivity/source/resource/conn_shared_res.src649
-rw-r--r--connectivity/source/resource/makefile.mk108
-rw-r--r--connectivity/source/resource/sharedresources.cxx242
5 files changed, 1410 insertions, 0 deletions
diff --git a/connectivity/source/resource/conn_error_message.src b/connectivity/source/resource/conn_error_message.src
new file mode 100644
index 000000000000..7a5267f33058
--- /dev/null
+++ b/connectivity/source/resource/conn_error_message.src
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// note: the resource IDs of the strings herein *must* correspond to the
+// com::sun::star::sdb::ErrorCondition values.
+//
+// For a given error condition value n, the message string must have ID
+// <code>256 + 2*n</code>, and the SQL state string (if applicable) must
+// have ID <code>256 + 2*n + 1</code>.
+//
+// The messages must be localized, the SQL states must *not*.
+
+// ROW_SET_OPERATION_VETOED = 100
+String 256 + 2*100 + 0
+{
+ Text [ en-US ] = "The record operation has been vetoed.";
+};
+
+// PARSER_CYCLIC_SUB_QUERIES = 200
+String 256 + 2*200 + 0
+{
+ Text [ en-US ] = "The statement contains a cyclic reference to one or more sub queries.";
+};
+
+// DB_OBJECT_NAME_WITH_SLASHES = 300
+String 256 + 2*300 + 0
+{
+ Text [ en-US ] = "The name must not contain any slashes ('/').";
+};
+
+// DB_INVALID_SQL_NAME = 301
+String 256 + 2*301 + 0
+{
+ Text [ en-US ] = "$1$ is no SQL conform identifier.";
+};
+
+// DB_QUERY_NAME_WITH_QUOTES = 302
+String 256 + 2*302 + 0
+{
+ Text [ en-US ] = "Query names must not contain quote characters.";
+};
+
+// DB_OBJECT_NAME_IS_USED = 303
+String 256 + 2*303 + 0
+{
+ Text [ en-US ] = "The name '$1$' is already in use in the database.";
+};
+
+// DB_NOT_CONNECTED = 304
+String 256 + 2*304 + 0
+{
+ Text [ en-US ] = "No connection to the database exists.";
+};
+
+String 256 + 2*304 + 1
+{
+ Text = "08003";
+};
+
+String 256 + 2*500 + 0
+{
+ Text [ en-US ] = "No $1$ exists.";
+};
+
+// DATA_CANNOT_SELECT_UNFILTERED = 550
+String 256 + 2*550 + 0
+{
+ Text [ en-US ] = "Unable to display the complete table content. Please apply a filter.";
+};
+
+String 256 + 2*550 + 1
+{
+ Text = "IM001";
+};
+
diff --git a/connectivity/source/resource/conn_log_res.src b/connectivity/source/resource/conn_log_res.src
new file mode 100644
index 000000000000..ea5bb9d00072
--- /dev/null
+++ b/connectivity/source/resource/conn_log_res.src
@@ -0,0 +1,312 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "resource/jdbc_log.hrc"
+
+// ============================================================================
+// = log messages for the JDBC driver
+// ============================================================================
+
+String STR_LOG_DRIVER_CONNECTING_URL
+{
+ Text = "jdbcBridge: connecting to URL '$1$'";
+};
+
+String STR_LOG_DRIVER_SUCCESS
+{
+ Text = "jdbcBridge: success";
+};
+
+String STR_LOG_CREATE_STATEMENT
+{
+ Text = "c$1$: creating statement";
+};
+
+String STR_LOG_CREATED_STATEMENT_ID
+{
+ Text = "c$1$: created statement, statement id: s$2$";
+};
+
+String STR_LOG_PREPARE_STATEMENT
+{
+ Text = "c$1$: preparing statement: $2$";
+};
+
+String STR_LOG_PREPARED_STATEMENT_ID
+{
+ Text = "c$1$: prepared statement, statement id: s$2$";
+};
+
+String STR_LOG_PREPARE_CALL
+{
+ Text = "c$1$: preparing call: $2$";
+};
+
+String STR_LOG_PREPARED_CALL_ID
+{
+ Text = "c$1$: prepared call, statement id: s$2$";
+};
+
+String STR_LOG_NATIVE_SQL
+{
+ Text = "c$1$: native SQL: $2$ -> $3$";
+};
+
+String STR_LOG_LOADING_DRIVER
+{
+ Text = "c$1$: attempting to load driver class $2$";
+};
+
+String STR_LOG_NO_DRIVER_CLASS
+{
+ Text = "c$1$: no Java Driver Class was provided";
+};
+
+String STR_LOG_CONN_SUCCESS
+{
+ Text = "c$1$: success";
+};
+
+String STR_LOG_NO_SYSTEM_CONNECTION
+{
+ Text = "c$1$: JDBC driver did not provide a JDBC connection";
+};
+
+String STR_LOG_GOT_JDBC_CONNECTION
+{
+ Text = "c$1$: obtained a JDBC connection for $2$";
+};
+
+String STR_LOG_SHUTDOWN_CONNECTION
+{
+ Text = "c$1$: shutting down connection";
+};
+
+String STR_LOG_GENERATED_VALUES
+{
+ Text = "s$1$: retrieving generated values";
+};
+
+String STR_LOG_GENERATED_VALUES_FALLBACK
+{
+ Text = "s$1$: getGeneratedValues: falling back to statement: $2$";
+};
+
+String STR_LOG_EXECUTE_STATEMENT
+{
+ Text = "s$1$: going to execute: $2$";
+};
+
+String STR_LOG_EXECUTE_QUERY
+{
+ Text = "s$1$: going to execute query: $2$";
+};
+
+String STR_LOG_CLOSING_STATEMENT
+{
+ Text = "s$1$: closing/disposing statement";
+};
+
+String STR_LOG_EXECUTE_UPDATE
+{
+ Text = "s$1$: going to execute update: $2$";
+};
+
+String STR_LOG_UPDATE_COUNT
+{
+ Text = "s$1$: update count: $2$";
+};
+
+String STR_LOG_RESULT_SET_CONCURRENCY
+{
+ Text = "s$1$: going to set result set concurrency: $2$";
+};
+
+String STR_LOG_RESULT_SET_TYPE
+{
+ Text = "s$1$: going to set result set type: $2$";
+};
+
+String STR_LOG_FETCH_DIRECTION
+{
+ Text = "s$1$: fetch direction: $2$";
+};
+
+String STR_LOG_FETCH_SIZE
+{
+ Text = "s$1$: fetch size: $2$";
+};
+
+String STR_LOG_SET_ESCAPE_PROCESSING
+{
+ Text = "s$1$: going to set escape processing: $2$";
+};
+
+String STR_LOG_EXECUTING_PREPARED
+{
+ Text = "s$1$: executing previously prepared statement";
+};
+
+String STR_LOG_EXECUTING_PREPARED_UPDATE
+{
+ Text = "s$1$: executing previously prepared update statement";
+};
+
+String STR_LOG_EXECUTING_PREPARED_QUERY
+{
+ Text = "s$1$: executing previously prepared query";
+};
+
+String STR_LOG_STRING_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: string; value: $3$";
+};
+
+String STR_LOG_BOOLEAN_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: boolean; value: $3$";
+};
+
+String STR_LOG_BYTE_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: byte; value: $3$";
+};
+
+String STR_LOG_DATE_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: date; value: $3$";
+};
+
+String STR_LOG_TIME_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: time; value: $3$";
+};
+
+String STR_LOG_TIMESTAMP_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: timestamp; value: $3$";
+};
+
+String STR_LOG_DOUBLE_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: double; value: $3$";
+};
+
+String STR_LOG_FLOAT_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: float; value: $3$";
+};
+
+String STR_LOG_INT_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: int; value: $3$";
+};
+
+String STR_LOG_LONG_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: long; value: $3$";
+};
+
+String STR_LOG_NULL_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: sql-type: $3$; value: null";
+};
+
+String STR_LOG_OBJECT_NULL_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: setting to null";
+};
+
+String STR_LOG_SHORT_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: short; value: $3$";
+};
+
+String STR_LOG_BYTES_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: byte[]";
+};
+
+String STR_LOG_CHARSTREAM_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: character stream";
+};
+
+String STR_LOG_BINARYSTREAM_PARAMETER
+{
+ Text = "s$1$: parameter no. $2$: type: binary stream";
+};
+
+String STR_LOG_CLEAR_PARAMETERS
+{
+ Text = "s$1$: clearing all parameters";
+};
+
+String STR_LOG_META_DATA_METHOD
+{
+ Text = "c$1$: entering XDatabaseMetaData::$2$";
+};
+
+String STR_LOG_META_DATA_METHOD_ARG1
+{
+ Text = "c$1$: entering XDatabaseMetaData::$2$( '$3$' )";
+};
+
+String STR_LOG_META_DATA_METHOD_ARG2
+{
+ Text = "c$1$: entering XDatabaseMetaData::$2$( '$3$', '$4$' )";
+};
+
+String STR_LOG_META_DATA_METHOD_ARG3
+{
+ Text = "c$1$: entering XDatabaseMetaData::$2$( '$3$', '$4$', '$5$' )";
+};
+
+String STR_LOG_META_DATA_METHOD_ARG4
+{
+ Text = "c$1$: entering XDatabaseMetaData::$2$( '$3$', '$4$', '$5$', '$6$' )";
+};
+
+String STR_LOG_META_DATA_RESULT
+{
+ Text = "c$1$: leaving XDatabaseMetaData::$2$: success-with-result: $3$";
+};
+
+String STR_LOG_META_DATA_SUCCESS
+{
+ Text = "c$1$: leaving XDatabaseMetaData::$2$: success";
+};
+
+String STR_LOG_THROWING_EXCEPTION
+{
+ Text = "SQLException to be thrown: message: '$1$', SQLState: $2$, ErrorCode: $3$";
+};
+
+String STR_LOG_SETTING_SYSTEM_PROPERTY
+{
+ Text = "setting system property \"$1$\" to value \"$2$\"";
+}; \ No newline at end of file
diff --git a/connectivity/source/resource/conn_shared_res.src b/connectivity/source/resource/conn_shared_res.src
new file mode 100644
index 000000000000..87f69a4aabd0
--- /dev/null
+++ b/connectivity/source/resource/conn_shared_res.src
@@ -0,0 +1,649 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "resource/mozab_res.hrc"
+#include "resource/macab_res.hrc"
+#include "resource/calc_res.hrc"
+#include "resource/ado_res.hrc"
+#include "resource/dbase_res.hrc"
+#include "resource/file_res.hrc"
+#include "resource/evoab2_res.hrc"
+#include "resource/kab_res.hrc"
+#include "resource/adabas_res.hrc"
+#include "resource/hsqldb_res.hrc"
+
+// ============================================================================
+// = the mozab driver's resource strings
+// ============================================================================
+
+String STR_MOZILLA_ADDRESSBOOKS
+{
+ Text [ en-US ] = "Mozilla/Seamonkey Addressbook Directory";
+ Text [ x-comment ] = "This must be the term referring to address books in the user's "
+ "Mozilla/Seamonkey profile in the system.";
+};
+
+String STR_THUNDERBIRD_ADDRESSBOOKS
+{
+ Text [ en-US ] = "Thunderbird Addressbook Directory";
+ Text [ x-comment ] = "This must be the term referring to address books in the user's "
+ "Thunderbird profile in the system.";
+};
+
+String STR_OE_ADDRESSBOOK
+{
+ Text [ en-US ] = "Outlook Express Addressbook";
+};
+
+String STR_OUTLOOK_MAPI_ADDRESSBOOK
+{
+ Text [ en-US ] = "Outlook (MAPI) Addressbook";
+};
+
+String STR_NO_TABLE_CREATION_SUPPORT
+{
+ Text [ en-US ] = "Creating tables is not supported for this kind of address books.";
+};
+
+String STR_MOZILLA_IS_RUNNING
+{
+ Text [ en-US ] = "Cannot create new address books while Mozilla is running.";
+};
+
+String STR_COULD_NOT_RETRIEVE_AB_ENTRY
+{
+ Text [ en-US ] = "An address book entry could not be retrieved, an unknown error occurred.";
+};
+
+String STR_COULD_NOT_GET_DIRECTORY_NAME
+{
+ Text [ en-US ] = "An address book directory name could not be retrieved, an unknown error occurred.";
+};
+
+String STR_TIMEOUT_WAITING
+{
+ Text [ en-US ] = "Timed out while waiting for the result.";
+};
+
+String STR_ERR_EXECUTING_QUERY
+{
+ Text [ en-US ] = "An error occurred while executing the query.";
+};
+
+String STR_MOZILLA_IS_RUNNIG_NO_CHANGES
+{
+ Text [ en-US ] = "You can't make any changes to mozilla address book when mozilla is running.";
+};
+
+String STR_FOREIGN_PROCESS_CHANGED_AB
+{
+ Text [ en-US ] = "Mozilla Address Book has been changed out of this process, we can't modify it in this condition.";
+};
+
+String STR_CANT_FIND_ROW
+{
+ Text [ en-US ] = "Can't find the requested row.";
+};
+
+String STR_CANT_FIND_CARD_FOR_ROW
+{
+ Text [ en-US ] = "Can't find the card for the requested row.";
+};
+
+String STR_QUERY_AT_LEAST_ONE_TABLES
+{
+ Text [ en-US ] = "The query can not be executed. It needs at least one table.";
+};
+
+String STR_NO_COUNT_SUPPORT
+{
+ Text [ en-US ] = "The driver does not support the 'COUNT' function.";
+};
+
+String STR_STMT_TYPE_NOT_SUPPORTED
+{
+ Text [ en-US ] = "This statement type not supported by this database driver.";
+};
+
+String STR_UNSPECIFIED_ERROR
+{
+ Text [ en-US ] = "An unknown error occured.";
+};
+
+String STR_COULD_NOT_CREATE_ADDRESSBOOK
+{
+ Text [ en-US ] = "Could not create a new address book. Mozilla error code is $1$.";
+};
+
+String STR_COULD_NOT_LOAD_LIB
+{
+ Text [ en-US ] = "The library '$libname$' could not be loaded.";
+};
+
+String STR_ERROR_REFRESH_ROW
+{
+ Text [ en-US ] = "An error occured while refreshing the current row.";
+};
+
+String STR_ERROR_GET_ROW
+{
+ Text [ en-US ] = "An error occured while getting the current row.";
+};
+
+String STR_CAN_NOT_CANCEL_ROW_UPDATE
+{
+ Text [ en-US ] = "The row update can not be canceled.";
+};
+
+String STR_CAN_NOT_CREATE_ROW
+{
+ Text [ en-US ] = "A new row can not be created.";
+};
+
+String STR_QUERY_INVALID_IS_NULL_COLUMN
+{
+ Text [ en-US ] = "The query can not be executed. The 'IS NULL' can only be used with a column name.";
+};
+
+String STR_ILLEGAL_MOVEMENT
+{
+ Text [ en-US ] = "Illegal cursor movement occured.";
+};
+
+String STR_COMMIT_ROW
+{
+ Text [ en-US ] = "Please commit row '$position$' before update rows or insert new rows.";
+};
+
+String STR_INVALID_ROW_UPDATE
+{
+ Text [ en-US ] = "The update call can not be executed. The row is invalid.";
+};
+
+String STR_ROW_CAN_NOT_SAVE
+{
+ Text [ en-US ] = "The current row can not be saved.";
+};
+
+String STR_NO_HOSTNAME
+{
+ Text [ en-US ] = "No hostname was provided.";
+};
+
+String STR_NO_BASEDN
+{
+ Text [ en-US ] = "No Base DN was provided.";
+};
+
+String STR_COULD_NOT_CONNECT_LDAP
+{
+ Text [ en-US ] = "The connection to the LDAP server could not be established.";
+};
+
+// ============================================================================
+// = common strings
+// ============================================================================
+String STR_NO_CONNECTION_GIVEN
+{
+ Text [ en-US ] = "It doesn't exist a connection to the database.";
+};
+String STR_WRONG_PARAM_INDEX
+{
+ Text [ en-US ] = "You tried to set a parameter at position '$pos$' but there is/are only '$count$' parameter(s) allowed. One reason may be that the property \"ParameterNameSubstitution\" is not set to TRUE in the data source.";
+};
+String STR_INPUTSTREAM_WRONG_LEN
+{
+ Text [ en-US ] = "End of InputStream reached before satisfying length specified when InputStream was set.";
+};
+String STR_NO_INPUTSTREAM
+{
+ Text [ en-US ] = "The input stream was not set.";
+};
+String STR_NO_ELEMENT_NAME
+{
+ Text [ en-US ] = "There is no element named '$name$'.";
+};
+String STR_INVALID_BOOKMARK
+{
+ Text [ en-US ] = "Invalid bookmark value";
+};
+String STR_PRIVILEGE_NOT_GRANTED
+{
+ Text [ en-US ] = "Privilege not granted: Only table privileges can be granted.";
+};
+String STR_PRIVILEGE_NOT_REVOKED
+{
+ Text [ en-US ] = "Privilege not revoked: Only table privileges can be revoked.";
+};
+
+String STR_UNKNOWN_COLUMN_NAME
+{
+ Text [ en-US ] = "The column name '$columnname$' is unknown.";
+};
+String STR_ERRORMSG_SEQUENCE
+{
+ Text [ en-US ] = "Function sequence error.";
+};
+String STR_INVALID_INDEX
+{
+ Text [ en-US ] = "Invalid descriptor index.";
+};
+String STR_UNSUPPORTED_FUNCTION
+{
+ Text [ en-US ] = "The driver does not support the function '$functionname$'.";
+};
+String STR_UNSUPPORTED_FEATURE
+{
+ Text [ en-US ] = "The driver does not support the functionality for '$featurename$'. It is not implemented.";
+};
+String STR_FORMULA_WRONG
+{
+ Text [ en-US ] = "The formula for TypeInfoSettings is wrong!";
+};
+String STR_STRING_LENGTH_EXCEEDED
+{
+ Text [ en-US ] = "The string '$string$' exceeds the maximum length of $maxlen$ characters when converted to the target character set '$charset$'.";
+};
+
+String STR_CANNOT_CONVERT_STRING
+{
+ Text [ en-US ] = "The string '$string$' cannot be converted using the encoding '$charset$'.";
+};
+
+String STR_URI_SYNTAX_ERROR
+{
+ Text [ en-US ] = "The connection URL is invalid.";
+};
+
+String STR_QUERY_TOO_COMPLEX
+{
+ Text [ en-US ] = "The query can not be executed. It is too complex.";
+};
+String STR_OPERATOR_TOO_COMPLEX
+{
+ Text [ en-US ] = "The query can not be executed. The operator is too complex.";
+};
+String STR_QUERY_INVALID_LIKE_COLUMN
+{
+ Text [ en-US ] = "The query can not be executed. You cannot use 'LIKE' with columns of this type.";
+};
+String STR_QUERY_INVALID_LIKE_STRING
+{
+ Text [ en-US ] = "The query can not be executed. 'LIKE' can be used with a string argument only.";
+};
+String STR_QUERY_NOT_LIKE_TOO_COMPLEX
+{
+ Text [ en-US ] = "The query can not be executed. The 'NOT LIKE' condition is too complex.";
+};
+String STR_QUERY_LIKE_WILDCARD
+{
+ Text [ en-US ] = "The query can not be executed. The 'LIKE' condition contains wildcard in the middle.";
+};
+String STR_QUERY_LIKE_WILDCARD_MANY
+{
+ Text [ en-US ] = "The query can not be executed. The 'LIKE' condition contains too many wildcards.";
+};
+String STR_INVALID_COLUMNNAME
+{
+ Text [ en-US ] = "The column name '$columnname$' is not valid.";
+};
+String STR_INVALID_COLUMN_SELECTION
+{
+ Text [ en-US ] = "The statement contains an invalid selection of columns.";
+};
+String STR_COLUMN_NOT_UPDATEABLE
+{
+ Text [ en-US ] = "The column at position '$position$' could not be updated.";
+};
+
+String STR_COULD_NOT_LOAD_FILE
+{
+ Text [ en-US ] = "The file $filename$ could not be loaded.";
+};
+
+String STR_LOAD_FILE_ERROR_MESSAGE
+{
+ Text [ en-US ] = "The attempt to load the file resulted in the following error message ($exception_type$):\n\n$error_message$";
+};
+
+// ============================================================================
+// = the ado driver's resource strings
+// ============================================================================
+String STR_TYPE_NOT_CONVERT
+{
+ Text [ en-US ] = "The type could not be converted.";
+};
+String STR_INVALID_COLUMN_DESCRIPTOR_ERROR
+{
+ Text [ en-US ] = "Could not append column: invalid column descriptor.";
+};
+
+String STR_INVALID_GROUP_DESCRIPTOR_ERROR
+{
+ Text [ en-US ] = "Could not create group: invalid object descriptor.";
+};
+String STR_INVALID_INDEX_DESCRIPTOR_ERROR
+{
+ Text [ en-US ] = "Could not create index: invalid object descriptor.";
+};
+String STR_INVALID_KEY_DESCRIPTOR_ERROR
+{
+ Text [ en-US ] = "Could not create key: invalid object descriptor.";
+};
+
+String STR_INVALID_TABLE_DESCRIPTOR_ERROR
+{
+ Text [ en-US ] = "Could not create table: invalid object descriptor.";
+};
+
+String STR_INVALID_USER_DESCRIPTOR_ERROR
+{
+ Text [ en-US ] = "Could not create user: invalid object descriptor.";
+};
+
+String STR_INVALID_VIEW_DESCRIPTOR_ERROR
+{
+ Text [ en-US ] = "Could not create view: invalid object descriptor.";
+};
+
+String STR_VIEW_NO_COMMAND_ERROR
+{
+ Text [ en-US ] = "Could not create view: no command object.";
+};
+
+String STR_NO_CONNECTION
+{
+ Text [ en-US ] = "The connection could not be created. May be the necessary data provider is not installed.";
+};
+
+// dbase
+String STR_COULD_NOT_DELETE_INDEX
+{
+ Text [ en-US ] = "The index could not be deleted. An unknown error while accessing the file system occured.";
+};
+String STR_ONL_ONE_COLUMN_PER_INDEX
+{
+ Text [ en-US ] = "The index could not be created. Only one column per index is allowed.";
+};
+String STR_COULD_NOT_CREATE_INDEX_NOT_UNIQUE
+{
+ Text [ en-US ] = "The index could not be created. The values are not unique.";
+};
+
+String STR_COULD_NOT_CREATE_INDEX
+{
+ Text [ en-US ] = "The index could not be created. An unknown error appeared.";
+};
+String STR_COULD_NOT_CREATE_INDEX_NAME
+{
+ Text [ en-US ] = "The index could not be created. The file '$filename$' is used by an other index.";
+};
+String STR_COULD_NOT_CREATE_INDEX_KEYSIZE
+{
+ Text [ en-US ] = "The index could not be created. The size of the chosen column is to big.";
+};
+
+String STR_SQL_NAME_ERROR
+{
+ Text [ en-US ] = "The name '$name$' doesn't match SQL naming constraints.";
+};
+String STR_COULD_NOT_DELETE_FILE
+{
+ Text [ en-US ] = "The file $filename$ could not be deleted.";
+};
+
+String STR_INVALID_COLUMN_TYPE
+{
+ Text [ en-US ] = "Invalid column type for column '$columnname$'.";
+};
+String STR_INVALID_COLUMN_PRECISION
+{
+ Text [ en-US ] = "Invalid precision for column '$columnname$'.";
+};
+
+String STR_INVALID_PRECISION_SCALE
+{
+ Text [ en-US ] = "Precision is less than scale for column '$columnname$'.";
+};
+
+String STR_INVALID_COLUMN_NAME_LENGTH
+{
+ Text [ en-US ] = "Invalid column name length for column '$columnname$'.";
+};
+
+String STR_DUPLICATE_VALUE_IN_COLUMN
+{
+ Text [ en-US ] = "Duplicate value found in column '$columnname$'.";
+};
+
+String STR_INVALID_COLUMN_DECIMAL_VALUE
+{
+ Text [ en-US ] = "The '$columnname$' column has been defined as a \"Decimal\" type, the max. length is $precision$ characters (with $scale$ decimal places).\n\nThe specified value \"$value$ is longer than the number of digits allowed.";
+};
+
+String STR_COLUMN_NOT_ALTERABLE
+{
+ Text [ en-US ] = "The column '$columnname$' could not be altered. May be the file system is write protected.";
+};
+String STR_INVALID_COLUMN_VALUE
+{
+ Text [ en-US ] = "The column '$columnname$' could not be updated. The value is invalid for that column.";
+};
+String STR_COLUMN_NOT_ADDABLE
+{
+ Text [ en-US ] = "The column '$columnname$' could not be added. May be the file system is write protected.";
+};
+String STR_COLUMN_NOT_DROP
+{
+ Text [ en-US ] = "The column at position '$position$' could not be dropped. May be the file system is write protected.";
+};
+String STR_TABLE_NOT_DROP
+{
+ Text [ en-US ] = "The table '$tablename$' could not be dropped. May be the file system is write protected.";
+};
+String STR_COULD_NOT_ALTER_TABLE
+{
+ Text [ en-US ] = "The table could not be altered.";
+};
+
+String STR_INVALID_DBASE_FILE
+{
+ Text [ en-US ] = "The file '$filename$' is an invalid (or unrecognized) dBase file.";
+};
+
+// Evoab2
+
+String STR_CANNOT_OPEN_BOOK
+{
+ Text [ en-US ] = "Cannot open Evolution address book.";
+};
+
+String STR_SORT_BY_COL_ONLY
+{
+ Text [ en-US ] = "Can only sort by table columns.";
+};
+
+// File
+String STR_QUERY_COMPLEX_COUNT
+{
+ Text [ en-US ] = "The query can not be executed. It is too complex. Only \"COUNT(*)\" is supported.";
+};
+String STR_QUERY_INVALID_BETWEEN
+{
+ Text [ en-US ] = "The query can not be executed. The 'BETWEEN' arguments are not correct.";
+};
+String STR_QUERY_FUNCTION_NOT_SUPPORTED
+{
+ Text [ en-US ] = "The query can not be executed. The function is not supported.";
+};
+String STR_TABLE_READONLY
+{
+ Text [ en-US ] = "The table can not be changed. It is read only.";
+};
+String STR_DELETE_ROW
+{
+ Text [ en-US ] = "The row could not be deleted. The option \"Display inactive records\" is set.";
+};
+String STR_ROW_ALREADY_DELETED
+{
+ Text [ en-US ] = "The row could not be deleted. It is already deleted.";
+};
+String STR_QUERY_MORE_TABLES
+{
+ Text [ en-US ] = "The query can not be executed. It contains more than one table.";
+};
+String STR_QUERY_NO_TABLE
+{
+ Text [ en-US ] = "The query can not be executed. It contains no valid table.";
+};
+String STR_QUERY_NO_COLUMN
+{
+ Text [ en-US ] = "The query can not be executed. It contains no valid columns.";
+};
+String STR_INVALID_PARA_COUNT
+{
+ Text [ en-US ] = "The count of the given parameter values doesn't match the parameters.";
+};
+String STR_NO_VALID_FILE_URL
+{
+ Text [ en-US ] = "The URL '$URL$' is not valid. A connection can not be created.";
+};
+
+
+String STR_NO_CLASSNAME
+{
+ Text [ en-US ] = "The driver class '$classname$' could not be loaded.";
+};
+String STR_NO_JAVA
+{
+ Text [ en-US ] = "No Java installation could be found. Please check your installation.";
+};
+String STR_NO_RESULTSET
+{
+ Text [ en-US ] = "The execution of the query doesn't return a valid result set.";
+};
+String STR_NO_ROWCOUNT
+{
+ Text [ en-US ] = "The execution of the update statement doesn't effect any rows.";
+};
+
+String STR_NO_CLASSNAME_PATH
+{
+ Text [ en-US ] = "The additional driver class path is '$classpath$'.";
+};
+String STR_UNKNOWN_PARA_TYPE
+{
+ Text [ en-US ] = "The type of parameter at position '$position$' is unknown.";
+};
+String STR_UNKNOWN_COLUMN_TYPE
+{
+ Text [ en-US ] = "The type of column at position '$position$' is unknown.";
+};
+
+// KAB
+
+String STR_NO_KDE_INST
+{
+ Text [ en-US ] = "No suitable KDE installation was found.";
+};
+
+String STR_KDE_VERSION_TOO_OLD
+{
+ Text [ en-US ] = "KDE version $major$.$minor$ or higher is required to access the KDE Address Book.";
+};
+String STR_KDE_VERSION_TOO_NEW
+{
+ Text [ en-US ] = "The found KDE version is too new. Only KDE up to version $major$.$minor$ is known to work with this product.\n";
+};
+String STR_KDE_VERSION_TOO_NEW_WORK_AROUND
+{
+ Text [ en-US ] = "If you are sure that your KDE version works, you might execute the following Basic macro to disable this version check:\n\n";
+};
+String STR_PARA_ONLY_PREPARED
+{
+ Text [ en-US ] = "Parameters can appear only in prepared statements.";
+};
+
+// MACAB
+String STR_NO_TABLE
+{
+ Text [ en-US ] = "No such table!";
+};
+
+String STR_NO_MAC_OS_FOUND
+{
+ Text [ en-US ] = "No suitable Mac OS installation was found.";
+};
+
+// ADABAS D
+String STR_NO_DISK_SPACE
+{
+ Text [ en-US ] = "The database file '$filename$' could not be created. Please check your disk space.";
+};
+
+String STR_COMMAND_NOT_FOUND
+{
+ Text [ en-US ] = "The database '$databasename$' could not be started because the command '$progname$' could not be executed.";
+};
+String STR_DATABASE_NEEDS_CONVERTING
+{
+ Text [ en-US ] = "The current database need to be converted. Please insert control user and password.";
+};
+String STR_USER_NO_DELETE
+{
+ Text [ en-US ] = "This user couldn't be deleted. Otherwise the database stays in a inconsistent state.";
+};
+// hsqldb
+String STR_NO_STROAGE
+{
+ Text [ en-US ] = "The connection can not be established. No storage or URL was given.";
+};
+String STR_INVALID_FILE_URL
+{
+ Text [ en-US ] = "The given URL contains no valid local file system path. Please check the location of your database file.";
+};
+String STR_NO_TABLE_CONTAINER
+{
+ Text [ en-US ] = "An error occured while obtaining the connection's table container.";
+};
+String STR_NO_TABLE_EDITOR_DIALOG
+{
+ Text [ en-US ] = "An error occured while creating the table editor dialog.";
+};
+String STR_NO_TABLENAME
+{
+ Text [ en-US ] = "There is no table named '$tablename$'.";
+};
+String STR_NO_DOCUMENTUI
+{
+ Text [ en-US ] = "The provided DocumentUI is not allowed to be NULL.";
+};
+String STR_ERROR_NEW_VERSION
+{
+ Text = "The connection could not be established. The database was created by a newer version of %PRODUCTNAME.";
+};
+
diff --git a/connectivity/source/resource/makefile.mk b/connectivity/source/resource/makefile.mk
new file mode 100644
index 000000000000..3ccb8ffd164b
--- /dev/null
+++ b/connectivity/source/resource/makefile.mk
@@ -0,0 +1,108 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..
+PRJINC=..
+PRJNAME=connectivity
+# common resources in connectivity
+TARGET=cnr
+# resources used for logging in the various SDBC drivers
+TARGET2=sdbcl
+# resources used for ::com::sun::star::sdb::ErrorCondition messages
+TARGET3=sdberr
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings ----------------------------------
+.IF "$(DBGUTIL_OJ)"!=""
+ENVCFLAGS+=/FR$(SLO)$/
+.ENDIF
+
+CDEFS+=-DCONN_SHARED_RESOURCE_FILE=$(TARGET)
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/dbtools.pmk
+.INCLUDE : $(PRJ)$/version.mk
+
+
+# --- Files -------------------------------------
+
+EXCEPTIONSFILES=\
+ $(SLO)$/sharedresources.obj
+
+SLOFILES=\
+ $(EXCEPTIONSFILES)
+
+# ...............................................
+
+SRS1NAME=conn_shared_res
+SRC1FILES= \
+ $(SRS1NAME).src
+
+# ...............................................
+
+SRS2NAME=conn_log_res
+SRC2FILES= \
+ $(SRS2NAME).src
+
+# ...............................................
+
+SRS3NAME=conn_error_message
+SRC3FILES= \
+ $(SRS3NAME).src
+
+# === .res file ==========================================================
+
+# ...............................................
+
+RES1FILELIST=\
+ $(SRS)$/$(SRS1NAME).srs \
+
+RESLIB1NAME=$(TARGET)
+RESLIB1SRSFILES=$(RES1FILELIST)
+
+# ...............................................
+
+RES2FILELIST=\
+ $(SRS)$/$(SRS2NAME).srs \
+
+RESLIB2NAME=$(TARGET2)
+RESLIB2SRSFILES=$(RES2FILELIST)
+
+# ...............................................
+
+RES3FILELIST=\
+ $(SRS)$/$(SRS3NAME).srs \
+
+RESLIB3NAME=$(TARGET3)
+RESLIB3SRSFILES=$(RES3FILELIST)
+
+# --- Targets ----------------------------------
+
+.INCLUDE : target.mk
+
+
diff --git a/connectivity/source/resource/sharedresources.cxx b/connectivity/source/resource/sharedresources.cxx
new file mode 100644
index 000000000000..1c27207223c0
--- /dev/null
+++ b/connectivity/source/resource/sharedresources.cxx
@@ -0,0 +1,242 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_connectivity.hxx"
+#include "resource/sharedresources.hxx"
+
+#include <comphelper/processfactory.hxx>
+#include <comphelper/officeresourcebundle.hxx>
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+/** === end UNO includes === **/
+
+#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::XComponentContext;
+ using ::com::sun::star::uno::Exception;
+ /** === end UNO using === **/
+
+ //====================================================================
+ //= SharedResources_Impl
+ //====================================================================
+ class SharedResources_Impl
+ {
+ private:
+ static SharedResources_Impl* s_pInstance;
+ static oslInterlockedCount s_nClients;
+
+ private:
+ ::std::auto_ptr< ::comphelper::OfficeResourceBundle >
+ m_pResourceBundle;
+
+ public:
+ static void registerClient();
+ static void revokeClient();
+
+ static SharedResources_Impl&
+ getInstance();
+
+ ::rtl::OUString getResourceString( ResourceId _nId );
+
+ private:
+ SharedResources_Impl();
+
+ static ::osl::Mutex& getMutex()
+ {
+ static ::osl::Mutex s_aMutex;
+ return s_aMutex;
+ }
+ };
+
+ //--------------------------------------------------------------------
+ SharedResources_Impl* SharedResources_Impl::s_pInstance( NULL );
+ oslInterlockedCount SharedResources_Impl::s_nClients( 0 );
+
+ //--------------------------------------------------------------------
+ SharedResources_Impl::SharedResources_Impl()
+ {
+ try
+ {
+ Reference< XPropertySet > xFactoryProps(
+ ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
+ Reference< XComponentContext > xContext(
+ xFactoryProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ),
+ UNO_QUERY_THROW
+ );
+ m_pResourceBundle.reset( new ::comphelper::OfficeResourceBundle( xContext, "cnr" ) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString SharedResources_Impl::getResourceString( ResourceId _nId )
+ {
+ if ( m_pResourceBundle.get() == NULL )
+ // this should never happen, but we gracefully ignore it. It has been reported
+ // in the constructor in non-product builds.
+ return ::rtl::OUString();
+
+ return m_pResourceBundle->loadString( _nId );
+ }
+
+ //--------------------------------------------------------------------
+ void SharedResources_Impl::registerClient()
+ {
+ osl_incrementInterlockedCount( &s_nClients );
+ }
+
+ //--------------------------------------------------------------------
+ void SharedResources_Impl::revokeClient()
+ {
+ ::osl::MutexGuard aGuard( getMutex() );
+ if ( 0 == osl_decrementInterlockedCount( &s_nClients ) )
+ {
+ delete s_pInstance;
+ s_pInstance = NULL;
+ }
+ }
+
+ //--------------------------------------------------------------------
+ SharedResources_Impl& SharedResources_Impl::getInstance()
+ {
+ ::osl::MutexGuard aGuard( getMutex() );
+ OSL_ENSURE( s_nClients > 0, "SharedResources_Impl::getInstance: no active clients!" );
+
+ if ( !s_pInstance )
+ s_pInstance = new SharedResources_Impl;
+
+ return *s_pInstance;
+ }
+
+ //====================================================================
+ //= helpers
+ //====================================================================
+ namespace
+ {
+ size_t lcl_substitute( ::rtl::OUString& _inout_rString,
+ const sal_Char* _pAsciiPattern, const ::rtl::OUString& _rReplace )
+ {
+ size_t nOccurences = 0;
+
+ ::rtl::OUString sPattern( ::rtl::OUString::createFromAscii( _pAsciiPattern ) );
+ sal_Int32 nIndex = 0;
+ while ( ( nIndex = _inout_rString.indexOf( sPattern ) ) > -1 )
+ {
+ ++nOccurences;
+ _inout_rString = _inout_rString.replaceAt( nIndex, sPattern.getLength(), _rReplace );
+ }
+
+ return nOccurences;
+ }
+ }
+
+ //====================================================================
+ //= SharedResources
+ //====================================================================
+ //--------------------------------------------------------------------
+ SharedResources::SharedResources()
+ {
+ SharedResources_Impl::registerClient();
+ }
+
+ //--------------------------------------------------------------------
+ SharedResources::~SharedResources()
+ {
+ SharedResources_Impl::revokeClient();
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString SharedResources::getResourceString( ResourceId _nResId ) const
+ {
+ return SharedResources_Impl::getInstance().getResourceString( _nResId );
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString SharedResources::getResourceStringWithSubstitution( ResourceId _nResId,
+ const sal_Char* _pAsciiPatternToReplace, const ::rtl::OUString& _rStringToSubstitute ) const
+ {
+ ::rtl::OUString sString( SharedResources_Impl::getInstance().getResourceString( _nResId ) );
+ OSL_VERIFY( lcl_substitute( sString, _pAsciiPatternToReplace, _rStringToSubstitute ) );
+ return sString;
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString SharedResources::getResourceStringWithSubstitution( ResourceId _nResId,
+ const sal_Char* _pAsciiPatternToReplace1, const ::rtl::OUString& _rStringToSubstitute1,
+ const sal_Char* _pAsciiPatternToReplace2, const ::rtl::OUString& _rStringToSubstitute2 ) const
+ {
+ ::rtl::OUString sString( SharedResources_Impl::getInstance().getResourceString( _nResId ) );
+ OSL_VERIFY( lcl_substitute( sString, _pAsciiPatternToReplace1, _rStringToSubstitute1 ) );
+ OSL_VERIFY( lcl_substitute( sString, _pAsciiPatternToReplace2, _rStringToSubstitute2 ) );
+ return sString;
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString SharedResources::getResourceStringWithSubstitution( ResourceId _nResId,
+ const sal_Char* _pAsciiPatternToReplace1, const ::rtl::OUString& _rStringToSubstitute1,
+ const sal_Char* _pAsciiPatternToReplace2, const ::rtl::OUString& _rStringToSubstitute2,
+ const sal_Char* _pAsciiPatternToReplace3, const ::rtl::OUString& _rStringToSubstitute3 ) const
+ {
+ ::rtl::OUString sString( SharedResources_Impl::getInstance().getResourceString( _nResId ) );
+ OSL_VERIFY( lcl_substitute( sString, _pAsciiPatternToReplace1, _rStringToSubstitute1 ) );
+ OSL_VERIFY( lcl_substitute( sString, _pAsciiPatternToReplace2, _rStringToSubstitute2 ) );
+ OSL_VERIFY( lcl_substitute( sString, _pAsciiPatternToReplace3, _rStringToSubstitute3 ) );
+ return sString;
+ }
+ //--------------------------------------------------------------------
+ ::rtl::OUString SharedResources::getResourceStringWithSubstitution( ResourceId _nResId,
+ const ::std::list< ::std::pair<const sal_Char* , ::rtl::OUString > > _aStringToSubstitutes) const
+ {
+ ::rtl::OUString sString( SharedResources_Impl::getInstance().getResourceString( _nResId ) );
+ ::std::list< ::std::pair<const sal_Char* , ::rtl::OUString > >::const_iterator aIter = _aStringToSubstitutes.begin();
+ ::std::list< ::std::pair<const sal_Char* , ::rtl::OUString > >::const_iterator aEnd = _aStringToSubstitutes.end();
+ for(;aIter != aEnd; ++aIter)
+ OSL_VERIFY( lcl_substitute( sString, aIter->first, aIter->second ) );
+
+ return sString;
+ }
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+