[Libreoffice-commits] core.git: 10 commits - comphelper/source connectivity/AllLangResTarget_sdbcl.mk connectivity/inc connectivity/Module_connectivity.mk connectivity/source framework/AllLangResTarget_fwe.mk include/comphelper include/tools include/vcl offapi/com postprocess/CustomTarget_images.mk Repository.mk rsc/inc rsc/source scp2/source sdext/inc sdext/Library_PresentationMinimizer.mk sdext/source sd/inc sfx2/AllLangResTarget_sfx2.mk sfx2/inc sfx2/source svtools/source tools/source vcl/source wizards/AllLangResTarget_wzi.mk wizards/com wizards/Module_wizards.mk wizards/Pyuno_commonwizards.mk wizards/source
Caolán McNamara
caolanm at redhat.com
Thu Apr 27 12:30:35 UTC 2017
Repository.mk | 2
comphelper/source/misc/logging.cxx | 66 -
connectivity/AllLangResTarget_sdbcl.mk | 27
connectivity/Module_connectivity.mk | 1
connectivity/inc/strings.hxx | 74 ++
connectivity/source/drivers/jdbc/DatabaseMetaData.cxx | 3
connectivity/source/drivers/jdbc/JBigDecimal.cxx | 2
connectivity/source/drivers/jdbc/JConnection.cxx | 3
connectivity/source/drivers/jdbc/JDriver.cxx | 3
connectivity/source/drivers/jdbc/JStatement.cxx | 3
connectivity/source/drivers/jdbc/Object.cxx | 3
connectivity/source/drivers/jdbc/PreparedStatement.cxx | 3
connectivity/source/inc/java/sql/ConnectionLog.hxx | 24
connectivity/source/inc/resource/jdbc_log.hrc | 57 -
connectivity/source/resource/conn_log_res.src | 304 --------
framework/AllLangResTarget_fwe.mk | 3
include/comphelper/logging.hxx | 55 -
include/tools/rcid.h | 1
include/tools/resmgr.hxx | 1
include/vcl/BitmapTools.hxx | 2
include/vcl/bitmap.hxx | 2
include/vcl/bitmapex.hxx | 1
offapi/com/sun/star/graphic/MediaProperties.idl | 3
postprocess/CustomTarget_images.mk | 2
rsc/inc/rscdb.hxx | 7
rsc/source/parser/rscdb.cxx | 2
rsc/source/parser/rscicpx.cxx | 17
rsc/source/parser/rscinit.cxx | 5
rsc/source/prj/gui.cxx | 1
rsc/source/rsc/rsc.cxx | 18
scp2/source/ooo/file_resource_ooo.scp | 2
sd/inc/bitmaps.hlst | 4
sdext/Library_PresentationMinimizer.mk | 5
sdext/inc/bitmaps.hlst | 17
sdext/source/minimizer/optimizerdialog.cxx | 7
sfx2/AllLangResTarget_sfx2.mk | 4
sfx2/inc/strings.hxx | 17
sfx2/source/bastyp/bastyp.hrc | 1
sfx2/source/bastyp/bastyp.src | 26
sfx2/source/bastyp/frmhtmlw.cxx | 3
svtools/source/graphic/provider.cxx | 53 -
tools/source/rc/resmgr.cxx | 11
vcl/source/bitmap/BitmapTools.cxx | 13
vcl/source/gdi/bitmap.cxx | 8
vcl/source/gdi/bitmapex.cxx | 14
wizards/AllLangResTarget_wzi.mk | 34
wizards/Module_wizards.mk | 1
wizards/Pyuno_commonwizards.mk | 1
wizards/com/sun/star/wizards/form/UIControlArranger.java | 26
wizards/com/sun/star/wizards/report/ReportLayouter.java | 8
wizards/com/sun/star/wizards/ui/ButtonList.java | 25
wizards/com/sun/star/wizards/ui/ImageList.py | 539 ---------------
wizards/com/sun/star/wizards/ui/PeerConfig.java | 26
wizards/com/sun/star/wizards/ui/PeerConfig.py | 5
wizards/com/sun/star/wizards/ui/UIConsts.java | 7
wizards/com/sun/star/wizards/ui/UIConsts.py | 9
wizards/com/sun/star/wizards/ui/UnoDialog.java | 5
wizards/com/sun/star/wizards/ui/UnoDialog.py | 3
wizards/source/imagelists/imagelists.ilst | 7
wizards/source/imagelists/imagelists.src | 59 -
60 files changed, 206 insertions(+), 1429 deletions(-)
New commits:
commit 8efb852024336b455a9d078c675645e01589afdc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 27 11:28:29 2017 +0100
another name for a nonlocalized string is a string
Change-Id: Ic4ff92720edd1c10dd6d5eff026e79cb02990005
diff --git a/Repository.mk b/Repository.mk
index fb935a33558a..c2cbf381f66a 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1087,7 +1087,6 @@ $(eval $(call gb_Helper_register_resources,\
sc \
scn \
sd \
- sdbcl \
sdberr \
$(call gb_Helper_optional,DBCONNECTIVITY,sdbt) \
sfx \
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index ed6a79c0c5f6..4f88ce3d17ef 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -191,51 +191,6 @@ namespace comphelper
}
};
-
- bool lcl_loadBundle_nothrow( Reference< XComponentContext > const & _rContext, ResourceBasedEventLogger_Data& _rLoggerData )
- {
- if ( _rLoggerData.bBundleLoaded )
- return _rLoggerData.xBundle.is();
-
- // no matter what happens below, don't attempt creation ever again
- _rLoggerData.bBundleLoaded = true;
-
- try
- {
- Reference< XResourceBundleLoader > xLoader(
- css::resource::OfficeResourceLoader::get(
- _rContext ) );
- _rLoggerData.xBundle.set( xLoader->loadBundle_Default( _rLoggerData.sBundleBaseName ), UNO_QUERY_THROW );
- }
- catch( const Exception& e )
- {
- (void)e;
- OSL_FAIL( "lcl_loadBundle_nothrow: caught an exception!" );
- }
-
- return _rLoggerData.xBundle.is();
- }
-
-
- OUString lcl_loadString_nothrow( const Reference< XResourceBundle >& _rxBundle, const sal_Int32 _nMessageResID )
- {
- OSL_PRECOND( _rxBundle.is(), "lcl_loadString_nothrow: this will crash!" );
- OUString sMessage;
- try
- {
- OUStringBuffer aBuffer;
- aBuffer.append( "string:" );
- aBuffer.append( _nMessageResID );
- OSL_VERIFY( _rxBundle->getDirectElement( aBuffer.makeStringAndClear() ) >>= sMessage );
- }
- catch( const Exception& e )
- {
- (void)e;
- OSL_FAIL( "lcl_loadString_nothrow: caught an exception!" );
- }
- return sMessage;
- }
-
ResourceBasedEventLogger::ResourceBasedEventLogger( const Reference< XComponentContext >& _rxContext, const sal_Char* _pResourceBundleBaseName,
const sal_Char* _pAsciiLoggerName )
:EventLogger( _rxContext, _pAsciiLoggerName )
@@ -243,27 +198,6 @@ namespace comphelper
{
m_pData->sBundleBaseName = OUString::createFromAscii( _pResourceBundleBaseName );
}
-
-
- OUString ResourceBasedEventLogger::impl_loadStringMessage_nothrow( const sal_Int32 _nMessageResID ) const
- {
- OUString sMessage;
- if ( lcl_loadBundle_nothrow( m_pImpl->getContext(), *m_pData ) )
- sMessage = lcl_loadString_nothrow( m_pData->xBundle, _nMessageResID );
- if ( sMessage.isEmpty() )
- {
- OUStringBuffer aBuffer;
- aBuffer.append( "<invalid event resource: '" );
- aBuffer.append( m_pData->sBundleBaseName );
- aBuffer.append( ":" );
- aBuffer.append( _nMessageResID );
- aBuffer.append( "'>" );
- sMessage = aBuffer.makeStringAndClear();
- }
- return sMessage;
- }
-
-
} // namespace comphelper
diff --git a/connectivity/AllLangResTarget_sdbcl.mk b/connectivity/AllLangResTarget_sdbcl.mk
deleted file mode 100644
index 0e6408ee9fb4..000000000000
--- a/connectivity/AllLangResTarget_sdbcl.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_AllLangResTarget_AllLangResTarget,sdbcl))
-
-$(eval $(call gb_AllLangResTarget_add_srs,sdbcl,\
- sdbcl/res \
-))
-
-$(eval $(call gb_SrsTarget_SrsTarget,sdbcl/res))
-
-$(eval $(call gb_SrsTarget_set_include,sdbcl/res,\
- -I$(SRCDIR)/connectivity/source/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_SrsTarget_add_nonlocalizable_files,sdbcl/res,\
- connectivity/source/resource/conn_log_res.src \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/connectivity/Module_connectivity.mk b/connectivity/Module_connectivity.mk
index e7043a77613e..2c5904b489aa 100644
--- a/connectivity/Module_connectivity.mk
+++ b/connectivity/Module_connectivity.mk
@@ -34,7 +34,6 @@ $(eval $(call gb_Module_add_targets,connectivity,\
$(eval $(call gb_Module_add_l10n_targets,connectivity,\
AllLangResTarget_cnr \
- AllLangResTarget_sdbcl \
AllLangResTarget_sdberr \
))
diff --git a/connectivity/inc/strings.hxx b/connectivity/inc/strings.hxx
new file mode 100644
index 000000000000..a514191d4488
--- /dev/null
+++ b/connectivity/inc/strings.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CONNECTIVITY_INC_STRINGS_HXX
+#define INCLUDED_CONNECTIVITY_INC_STRINGS_HXX
+
+// = log messages for the JDBC driver
+
+#define STR_LOG_DRIVER_CONNECTING_URL "jdbcBridge: connecting to URL '$1$'"
+#define STR_LOG_DRIVER_SUCCESS "jdbcBridge: success"
+#define STR_LOG_CREATE_STATEMENT "c$1$: creating statement"
+#define STR_LOG_CREATED_STATEMENT_ID "c$1$: created statement, statement id: s$2$"
+#define STR_LOG_PREPARE_STATEMENT "c$1$: preparing statement: $2$"
+#define STR_LOG_PREPARED_STATEMENT_ID "c$1$: prepared statement, statement id: s$2$"
+#define STR_LOG_PREPARE_CALL "c$1$: preparing call: $2$"
+#define STR_LOG_PREPARED_CALL_ID "c$1$: prepared call, statement id: s$2$"
+#define STR_LOG_NATIVE_SQL "c$1$: native SQL: $2$ -> $3$"
+#define STR_LOG_LOADING_DRIVER "c$1$: attempting to load driver class $2$"
+#define STR_LOG_NO_DRIVER_CLASS "c$1$: no Java Driver Class was provided"
+#define STR_LOG_CONN_SUCCESS "c$1$: success"
+#define STR_LOG_NO_SYSTEM_CONNECTION "c$1$: JDBC driver did not provide a JDBC connection"
+#define STR_LOG_GOT_JDBC_CONNECTION "c$1$: obtained a JDBC connection for $2$"
+#define STR_LOG_SHUTDOWN_CONNECTION "c$1$: shutting down connection"
+#define STR_LOG_GENERATED_VALUES "s$1$: retrieving generated values"
+#define STR_LOG_GENERATED_VALUES_FALLBACK "s$1$: getGeneratedValues: falling back to statement: $2$"
+#define STR_LOG_EXECUTE_STATEMENT "s$1$: going to execute: $2$"
+#define STR_LOG_EXECUTE_QUERY "s$1$: going to execute query: $2$"
+#define STR_LOG_CLOSING_STATEMENT "s$1$: closing/disposing statement"
+#define STR_LOG_EXECUTE_UPDATE "s$1$: going to execute update: $2$"
+#define STR_LOG_UPDATE_COUNT "s$1$: update count: $2$"
+#define STR_LOG_RESULT_SET_CONCURRENCY "s$1$: going to set result set concurrency: $2$"
+#define STR_LOG_RESULT_SET_TYPE "s$1$: going to set result set type: $2$"
+#define STR_LOG_FETCH_DIRECTION "s$1$: fetch direction: $2$"
+#define STR_LOG_FETCH_SIZE "s$1$: fetch size: $2$"
+#define STR_LOG_SET_ESCAPE_PROCESSING "s$1$: going to set escape processing: $2$"
+#define STR_LOG_EXECUTING_PREPARED "s$1$: executing previously prepared statement"
+#define STR_LOG_EXECUTING_PREPARED_UPDATE "s$1$: executing previously prepared update statement"
+#define STR_LOG_EXECUTING_PREPARED_QUERY "s$1$: executing previously prepared query"
+#define STR_LOG_STRING_PARAMETER "s$1$: parameter no. $2$: type: string; value: $3$"
+#define STR_LOG_BOOLEAN_PARAMETER "s$1$: parameter no. $2$: type: boolean; value: $3$"
+#define STR_LOG_BYTE_PARAMETER "s$1$: parameter no. $2$: type: byte; value: $3$"
+#define STR_LOG_DATE_PARAMETER "s$1$: parameter no. $2$: type: date; value: $3$"
+#define STR_LOG_TIME_PARAMETER "s$1$: parameter no. $2$: type: time; value: $3$"
+#define STR_LOG_TIMESTAMP_PARAMETER "s$1$: parameter no. $2$: type: timestamp; value: $3$"
+#define STR_LOG_DOUBLE_PARAMETER "s$1$: parameter no. $2$: type: double; value: $3$"
+#define STR_LOG_FLOAT_PARAMETER "s$1$: parameter no. $2$: type: float; value: $3$"
+#define STR_LOG_INT_PARAMETER "s$1$: parameter no. $2$: type: int; value: $3$"
+#define STR_LOG_LONG_PARAMETER "s$1$: parameter no. $2$: type: long; value: $3$"
+#define STR_LOG_NULL_PARAMETER "s$1$: parameter no. $2$: sql-type: $3$; value: null"
+#define STR_LOG_OBJECT_NULL_PARAMETER "s$1$: parameter no. $2$: setting to null"
+#define STR_LOG_SHORT_PARAMETER "s$1$: parameter no. $2$: type: short; value: $3$"
+#define STR_LOG_BYTES_PARAMETER "s$1$: parameter no. $2$: type: byte[]"
+#define STR_LOG_CHARSTREAM_PARAMETER "s$1$: parameter no. $2$: type: character stream"
+#define STR_LOG_BINARYSTREAM_PARAMETER "s$1$: parameter no. $2$: type: binary stream"
+#define STR_LOG_CLEAR_PARAMETERS "s$1$: clearing all parameters"
+#define STR_LOG_META_DATA_METHOD "c$1$: entering XDatabaseMetaData::$2$"
+#define STR_LOG_META_DATA_METHOD_ARG1 "c$1$: entering XDatabaseMetaData::$2$( '$3$' )"
+#define STR_LOG_META_DATA_METHOD_ARG2 "c$1$: entering XDatabaseMetaData::$2$( '$3$', '$4$' )"
+#define STR_LOG_META_DATA_METHOD_ARG3 "c$1$: entering XDatabaseMetaData::$2$( '$3$', '$4$', '$5$' )"
+#define STR_LOG_META_DATA_METHOD_ARG4 "c$1$: entering XDatabaseMetaData::$2$( '$3$', '$4$', '$5$', '$6$' )"
+#define STR_LOG_META_DATA_RESULT "c$1$: leaving XDatabaseMetaData::$2$: success-with-result: $3$"
+#define STR_LOG_META_DATA_SUCCESS "c$1$: leaving XDatabaseMetaData::$2$: success"
+#define STR_LOG_THROWING_EXCEPTION "SQLException to be thrown: message: '$1$', SQLState: $2$, ErrorCode: $3$"
+#define STR_LOG_SETTING_SYSTEM_PROPERTY "setting system property \"$1$\" to value \"$2$\""
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index 788da44fafd7..9967d09c5bf9 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -27,7 +27,8 @@
#include "FDatabaseMetaDataResultSet.hxx"
#include <comphelper/types.hxx>
#include "TPrivilegesResultSet.hxx"
-#include "resource/jdbc_log.hrc"
+#include "resource/conn_shared_res.hrc"
+#include "strings.hxx"
using namespace ::comphelper;
diff --git a/connectivity/source/drivers/jdbc/JBigDecimal.cxx b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
index 8263225bcae4..36a3518fb396 100644
--- a/connectivity/source/drivers/jdbc/JBigDecimal.cxx
+++ b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
@@ -19,7 +19,7 @@
#include "java/math/BigDecimal.hxx"
#include "java/tools.hxx"
-#include "resource/jdbc_log.hrc"
+#include "resource/conn_shared_res.hrc"
using namespace connectivity;
//************ Class: java.lang.Boolean
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index a2a73889c0d5..fce0c21ccd8e 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -36,7 +36,7 @@
#include <connectivity/dbexception.hxx>
#include "java/util/Property.hxx"
#include "java/LocalRef.hxx"
-#include "resource/jdbc_log.hrc"
+#include "resource/conn_shared_res.hrc"
#include <com/sun/star/uno/XComponentContext.hpp>
#include <jvmaccess/classpath.hxx>
#include <comphelper/namedvaluecollection.hxx>
@@ -44,6 +44,7 @@
#include <jni.h>
#include "resource/common_res.hrc"
#include <unotools/confignode.hxx>
+#include "strings.hxx"
#include <list>
#include <memory>
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx
index 2ae3deb0f27d..32fdd4ccc9ae 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -26,11 +26,12 @@
#include "java/tools.hxx"
#include <connectivity/dbexception.hxx>
#include <jvmfwk/framework.hxx>
-#include "resource/jdbc_log.hrc"
+#include "resource/conn_shared_res.hrc"
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
#include <comphelper/processfactory.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include "strings.hxx"
using namespace connectivity;
using namespace ::com::sun::star::uno;
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx
index 4f3e47679391..444a1f58a500 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -36,7 +36,8 @@
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
-#include "resource/jdbc_log.hrc"
+#include "resource/conn_shared_res.hrc"
+#include "strings.hxx"
#include <algorithm>
#include <string.h>
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 8b7c3ca98dd0..0ddd162b8727 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -26,7 +26,8 @@
#include <osl/mutex.hxx>
#include <osl/thread.h>
#include "java/LocalRef.hxx"
-#include "resource/jdbc_log.hrc"
+#include "resource/conn_shared_res.hrc"
+#include "strings.hxx"
#include <comphelper/logging.hxx>
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index 6ded278caffa..34161a71a4aa 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -30,10 +30,11 @@
#include <connectivity/dbtools.hxx>
#include <connectivity/FValue.hxx>
#include <connectivity/dbexception.hxx>
-#include "resource/jdbc_log.hrc"
+#include "resource/conn_shared_res.hrc"
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
#include "java/LocalRef.hxx"
+#include "strings.hxx"
#include <string.h>
#include <memory>
diff --git a/connectivity/source/inc/java/sql/ConnectionLog.hxx b/connectivity/source/inc/java/sql/ConnectionLog.hxx
index 8fd4a3d3774b..5871f3b09823 100644
--- a/connectivity/source/inc/java/sql/ConnectionLog.hxx
+++ b/connectivity/source/inc/java/sql/ConnectionLog.hxx
@@ -85,39 +85,39 @@ namespace connectivity { namespace java { namespace sql {
sal_Int32 getObjectID() const { return m_nObjectID; }
/// logs a given message, without any arguments, or source class/method names
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID )
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage )
{
- return ConnectionLog_Base::log( _nLogLevel, _nMessageResID, m_nObjectID );
+ return ConnectionLog_Base::log( _nLogLevel, rMessage, m_nObjectID );
}
template< typename ARGTYPE1 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1 ) const
{
- return ConnectionLog_Base::log( _nLogLevel, _nMessageResID, m_nObjectID, _argument1 );
+ return ConnectionLog_Base::log( _nLogLevel, rMessage, m_nObjectID, _argument1 );
}
template< typename ARGTYPE1, typename ARGTYPE2 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 ) const
{
- return ConnectionLog_Base::log( _nLogLevel, _nMessageResID, m_nObjectID, _argument1, _argument2 );
+ return ConnectionLog_Base::log( _nLogLevel, rMessage, m_nObjectID, _argument1, _argument2 );
}
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 ) const
{
- return ConnectionLog_Base::log( _nLogLevel, _nMessageResID, m_nObjectID, _argument1, _argument2, _argument3 );
+ return ConnectionLog_Base::log( _nLogLevel, rMessage, m_nObjectID, _argument1, _argument2, _argument3 );
}
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3, typename ARGTYPE4 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 ) const
{
- return ConnectionLog_Base::log( _nLogLevel, _nMessageResID, m_nObjectID, _argument1, _argument2, _argument3, _argument4 );
+ return ConnectionLog_Base::log( _nLogLevel, rMessage, m_nObjectID, _argument1, _argument2, _argument3, _argument4 );
}
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3, typename ARGTYPE4, typename ARGTYPE5 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 ) const
{
- return ConnectionLog_Base::log( _nLogLevel, _nMessageResID, m_nObjectID, _argument1, _argument2, _argument3, _argument4, _argument5 );
+ return ConnectionLog_Base::log( _nLogLevel, rMessage, m_nObjectID, _argument1, _argument2, _argument3, _argument4, _argument5 );
}
};
diff --git a/connectivity/source/inc/resource/jdbc_log.hrc b/connectivity/source/inc/resource/jdbc_log.hrc
index 38f23c607744..06b2a81b3f3b 100644
--- a/connectivity/source/inc/resource/jdbc_log.hrc
+++ b/connectivity/source/inc/resource/jdbc_log.hrc
@@ -22,63 +22,6 @@
#include "resource/conn_shared_res.hrc"
-#define STR_LOG_DRIVER_CONNECTING_URL ( STR_JDBC_LOG_MESSAGE_BASE + 1 )
-#define STR_LOG_DRIVER_SUCCESS ( STR_JDBC_LOG_MESSAGE_BASE + 2 )
-#define STR_LOG_CREATE_STATEMENT ( STR_JDBC_LOG_MESSAGE_BASE + 3 )
-#define STR_LOG_CREATED_STATEMENT_ID ( STR_JDBC_LOG_MESSAGE_BASE + 4 )
-#define STR_LOG_PREPARE_STATEMENT ( STR_JDBC_LOG_MESSAGE_BASE + 5 )
-#define STR_LOG_PREPARED_STATEMENT_ID ( STR_JDBC_LOG_MESSAGE_BASE + 6 )
-#define STR_LOG_PREPARE_CALL ( STR_JDBC_LOG_MESSAGE_BASE + 7 )
-#define STR_LOG_PREPARED_CALL_ID ( STR_JDBC_LOG_MESSAGE_BASE + 8 )
-#define STR_LOG_NATIVE_SQL ( STR_JDBC_LOG_MESSAGE_BASE + 9 )
-#define STR_LOG_LOADING_DRIVER ( STR_JDBC_LOG_MESSAGE_BASE + 10 )
-#define STR_LOG_NO_DRIVER_CLASS ( STR_JDBC_LOG_MESSAGE_BASE + 11 )
-#define STR_LOG_CONN_SUCCESS ( STR_JDBC_LOG_MESSAGE_BASE + 12 )
-#define STR_LOG_NO_SYSTEM_CONNECTION ( STR_JDBC_LOG_MESSAGE_BASE + 13 )
-#define STR_LOG_GOT_JDBC_CONNECTION ( STR_JDBC_LOG_MESSAGE_BASE + 14 )
-#define STR_LOG_SHUTDOWN_CONNECTION ( STR_JDBC_LOG_MESSAGE_BASE + 15 )
-#define STR_LOG_GENERATED_VALUES ( STR_JDBC_LOG_MESSAGE_BASE + 16 )
-#define STR_LOG_GENERATED_VALUES_FALLBACK ( STR_JDBC_LOG_MESSAGE_BASE + 17 )
-#define STR_LOG_EXECUTE_STATEMENT ( STR_JDBC_LOG_MESSAGE_BASE + 18 )
-#define STR_LOG_EXECUTE_QUERY ( STR_JDBC_LOG_MESSAGE_BASE + 19 )
-#define STR_LOG_CLOSING_STATEMENT ( STR_JDBC_LOG_MESSAGE_BASE + 20 )
-#define STR_LOG_EXECUTE_UPDATE ( STR_JDBC_LOG_MESSAGE_BASE + 21 )
-#define STR_LOG_UPDATE_COUNT ( STR_JDBC_LOG_MESSAGE_BASE + 22 )
-#define STR_LOG_RESULT_SET_CONCURRENCY ( STR_JDBC_LOG_MESSAGE_BASE + 23 )
-#define STR_LOG_RESULT_SET_TYPE ( STR_JDBC_LOG_MESSAGE_BASE + 24 )
-#define STR_LOG_FETCH_DIRECTION ( STR_JDBC_LOG_MESSAGE_BASE + 25 )
-#define STR_LOG_FETCH_SIZE ( STR_JDBC_LOG_MESSAGE_BASE + 26 )
-#define STR_LOG_SET_ESCAPE_PROCESSING ( STR_JDBC_LOG_MESSAGE_BASE + 27 )
-#define STR_LOG_EXECUTING_PREPARED ( STR_JDBC_LOG_MESSAGE_BASE + 28 )
-#define STR_LOG_EXECUTING_PREPARED_UPDATE ( STR_JDBC_LOG_MESSAGE_BASE + 29 )
-#define STR_LOG_EXECUTING_PREPARED_QUERY ( STR_JDBC_LOG_MESSAGE_BASE + 30 )
-#define STR_LOG_STRING_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 31 )
-#define STR_LOG_BOOLEAN_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 32 )
-#define STR_LOG_BYTE_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 33 )
-#define STR_LOG_DATE_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 34 )
-#define STR_LOG_TIME_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 35 )
-#define STR_LOG_TIMESTAMP_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 36 )
-#define STR_LOG_DOUBLE_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 37 )
-#define STR_LOG_FLOAT_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 38 )
-#define STR_LOG_INT_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 39 )
-#define STR_LOG_LONG_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 40 )
-#define STR_LOG_NULL_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 41 )
-#define STR_LOG_OBJECT_NULL_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 42 )
-#define STR_LOG_SHORT_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 43 )
-#define STR_LOG_BYTES_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 44 )
-#define STR_LOG_CHARSTREAM_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 45 )
-#define STR_LOG_BINARYSTREAM_PARAMETER ( STR_JDBC_LOG_MESSAGE_BASE + 46 )
-#define STR_LOG_CLEAR_PARAMETERS ( STR_JDBC_LOG_MESSAGE_BASE + 47 )
-#define STR_LOG_META_DATA_METHOD ( STR_JDBC_LOG_MESSAGE_BASE + 48 )
-#define STR_LOG_META_DATA_METHOD_ARG1 ( STR_JDBC_LOG_MESSAGE_BASE + 49 )
-#define STR_LOG_META_DATA_METHOD_ARG2 ( STR_JDBC_LOG_MESSAGE_BASE + 50 )
-#define STR_LOG_META_DATA_METHOD_ARG3 ( STR_JDBC_LOG_MESSAGE_BASE + 51 )
-#define STR_LOG_META_DATA_METHOD_ARG4 ( STR_JDBC_LOG_MESSAGE_BASE + 52 )
-#define STR_LOG_META_DATA_RESULT ( STR_JDBC_LOG_MESSAGE_BASE + 53 )
-#define STR_LOG_META_DATA_SUCCESS ( STR_JDBC_LOG_MESSAGE_BASE + 54 )
-#define STR_LOG_THROWING_EXCEPTION ( STR_JDBC_LOG_MESSAGE_BASE + 55 )
-#define STR_LOG_SETTING_SYSTEM_PROPERTY ( STR_JDBC_LOG_MESSAGE_BASE + 56 )
-
#endif // CONNECTIVITY_RESOURCE_JDBC_LOG_HRC
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/resource/conn_log_res.src b/connectivity/source/resource/conn_log_res.src
deleted file mode 100644
index 91cc203c35cc..000000000000
--- a/connectivity/source/resource/conn_log_res.src
+++ /dev/null
@@ -1,304 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#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$\"";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/comphelper/logging.hxx b/include/comphelper/logging.hxx
index ef17801aa9f1..1725340b379b 100644
--- a/include/comphelper/logging.hxx
+++ b/include/comphelper/logging.hxx
@@ -504,10 +504,10 @@ namespace comphelper
//- resource IDs
/// logs a given message, without any arguments, or source class/method names
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, nullptr, nullptr, impl_loadStringMessage_nothrow( _nMessageResID ) );
+ return impl_log(_nLogLevel, nullptr, nullptr, rMessage);
return false;
}
@@ -519,20 +519,20 @@ namespace comphelper
is searched in the message string, and replaced with the argument string.
*/
template< typename ARGTYPE1 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, nullptr, nullptr, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, nullptr, nullptr, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ) );
return false;
}
/// logs a given message, replacing 2 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, nullptr, nullptr, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, nullptr, nullptr, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ) );
return false;
@@ -540,10 +540,10 @@ namespace comphelper
/// logs a given message, replacing 3 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, nullptr, nullptr, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, nullptr, nullptr, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ),
OptionalString( log::convert::convertLogArgToString( _argument3 ) ) );
@@ -552,10 +552,10 @@ namespace comphelper
/// logs a given message, replacing 4 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3, typename ARGTYPE4 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, nullptr, nullptr, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, nullptr, nullptr, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ),
OptionalString( log::convert::convertLogArgToString( _argument3 ) ),
@@ -565,10 +565,10 @@ namespace comphelper
/// logs a given message, replacing 5 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3, typename ARGTYPE4, typename ARGTYPE5 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, nullptr, nullptr, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, nullptr, nullptr, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ),
OptionalString( log::convert::convertLogArgToString( _argument3 ) ),
@@ -579,10 +579,10 @@ namespace comphelper
/// logs a given message, replacing 6 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3, typename ARGTYPE4, typename ARGTYPE5, typename ARGTYPE6 >
- bool log( const sal_Int32 _nLogLevel, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6 ) const
+ bool log( const sal_Int32 _nLogLevel, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, nullptr, nullptr, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, nullptr, nullptr, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ),
OptionalString( log::convert::convertLogArgToString( _argument3 ) ),
@@ -599,20 +599,20 @@ namespace comphelper
/** logs a given ASCII message, replacing a placeholder in the message with an argument
*/
template< typename ARGTYPE1 >
- bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1 ) const
+ bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const OUString& rMessage, ARGTYPE1 _argument1 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ) );
return false;
}
/// logs a given ASCII message, replacing 2 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2 >
- bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2 ) const
+ bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ) );
return false;
@@ -620,10 +620,10 @@ namespace comphelper
/// logs a given ASCII message, replacing 3 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3 >
- bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 ) const
+ bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ),
OptionalString( log::convert::convertLogArgToString( _argument3 ) ) );
@@ -632,10 +632,10 @@ namespace comphelper
/// logs a given ASCII message, replacing 4 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3, typename ARGTYPE4 >
- bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 ) const
+ bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ),
OptionalString( log::convert::convertLogArgToString( _argument3 ) ),
@@ -645,10 +645,10 @@ namespace comphelper
/// logs a given ASCII message, replacing 5 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3, typename ARGTYPE4, typename ARGTYPE5 >
- bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 ) const
+ bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ),
OptionalString( log::convert::convertLogArgToString( _argument3 ) ),
@@ -659,10 +659,10 @@ namespace comphelper
/// logs a given ASCII message, replacing 6 placeholders in the message with respective values
template< typename ARGTYPE1, typename ARGTYPE2, typename ARGTYPE3, typename ARGTYPE4, typename ARGTYPE5, typename ARGTYPE6 >
- bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const sal_Int32 _nMessageResID, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6 ) const
+ bool logp( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const OUString& rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6 ) const
{
if ( isLoggable( _nLogLevel ) )
- return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, impl_loadStringMessage_nothrow( _nMessageResID ),
+ return impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, rMessage,
OptionalString( log::convert::convertLogArgToString( _argument1 ) ),
OptionalString( log::convert::convertLogArgToString( _argument2 ) ),
OptionalString( log::convert::convertLogArgToString( _argument3 ) ),
@@ -671,9 +671,6 @@ namespace comphelper
OptionalString( log::convert::convertLogArgToString( _argument6 ) ) );
return false;
}
-
- private:
- OUString impl_loadStringMessage_nothrow( const sal_Int32 _nMessageResID ) const;
};
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
index b8a722fe8267..1066e2b671b1 100644
--- a/sfx2/AllLangResTarget_sfx2.mk
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -55,8 +55,4 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/view/view.src \
))
-$(eval $(call gb_SrsTarget_add_nonlocalizable_files,sfx/res,\
- sfx2/source/bastyp/bastyp.src \
-))
-
# vim: set noet sw=4 ts=4:
diff --git a/sfx2/inc/strings.hxx b/sfx2/inc/strings.hxx
new file mode 100644
index 000000000000..aa4c0c662b26
--- /dev/null
+++ b/sfx2/inc/strings.hxx
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SFX2_INC_STRINGS_HXX
+#define INCLUDED_SFX2_INC_STRINGS_HXX
+
+#define STR_HTML_GENERATOR "%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION (%1)"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sfx2/source/bastyp/bastyp.hrc b/sfx2/source/bastyp/bastyp.hrc
index fd128686b20b..46e836f6b88a 100644
--- a/sfx2/source/bastyp/bastyp.hrc
+++ b/sfx2/source/bastyp/bastyp.hrc
@@ -24,6 +24,5 @@
#define RC_BASTYP RID_SFX_BASTYP_START
#define STR_FILTER_NOT_INSTALLED (RC_BASTYP + 9)
#define STR_FILTER_CONSULT_SERVICE (RC_BASTYP + 10)
-#define STR_HTML_GENERATOR (RC_BASTYP + 30)
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/bastyp/bastyp.src b/sfx2/source/bastyp/bastyp.src
deleted file mode 100644
index 8356e95b434a..000000000000
--- a/sfx2/source/bastyp/bastyp.src
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "bastyp.hrc"
-
-String STR_HTML_GENERATOR
-{
- Text = "%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION (%1)" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index 7229c66a5d85..79e2820edb80 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -46,6 +46,7 @@
#include <rtl/bootstrap.hxx>
#include <rtl/strbuf.hxx>
#include <sax/tools/converter.hxx>
+#include "strings.hxx"
using namespace ::com::sun::star;
@@ -126,7 +127,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
}
// Who we are
- OUString sGenerator( SfxResId(STR_HTML_GENERATOR).toString() );
+ OUString sGenerator(STR_HTML_GENERATOR);
OUString os( "$_OS" );
::rtl::Bootstrap::expandMacros(os);
sGenerator = sGenerator.replaceFirst( "%1", os );
commit 99f0165c8b634a69e9d7bf633256b7d62aab60d8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 27 11:25:05 2017 +0100
fwk_services.src doesn't exist
since
748ed65ffba9d69ed333fd1347c30dd7a3a944b8
Change-Id: Ief2efad17b3f485aeb975257e120ce20e67fb5b8
diff --git a/framework/AllLangResTarget_fwe.mk b/framework/AllLangResTarget_fwe.mk
index a59cb9a4cfed..7a8726d3cf7a 100644
--- a/framework/AllLangResTarget_fwe.mk
+++ b/framework/AllLangResTarget_fwe.mk
@@ -46,7 +46,4 @@ $(eval $(call gb_SrsTarget_set_include,fwe/fwk_services,\
-I$(SRCDIR)/framework/inc/services \
))
-$(eval $(call gb_SrsTarget_add_nonlocalizable_files,fwe/fwk_services,\
- framework/source/services/fwk_services.src \
-))
# vim: set noet sw=4 ts=4:
commit 34bdbcecf18990c8cc6830c7f8dec7078d0a6f18
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 27 11:22:39 2017 +0100
can detangle the sdext graphic resource now
Change-Id: I2992b859bbebfa4bfae3ea5bfe76e8aa62193f69
diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk
index 3da3cee1a4e8..4ea776509866 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -64,6 +64,7 @@ $(packimages_DIR)/sourceimagelist.ilst : \
$(SRCDIR)/reportdesign/inc/bitmaps.hlst \
$(SRCDIR)/sc/inc/bitmaps.hlst \
$(SRCDIR)/sd/inc/bitmaps.hlst \
+ $(SRCDIR)/sdext/inc/bitmaps.hlst \
$(SRCDIR)/sfx2/inc/bitmaps.hlst \
$(SRCDIR)/svtools/inc/bitmaps.hlst \
$(SRCDIR)/svx/inc/bitmaps.hlst \
diff --git a/sd/inc/bitmaps.hlst b/sd/inc/bitmaps.hlst
index 1ec2041de31b..36a8b67720b2 100644
--- a/sd/inc/bitmaps.hlst
+++ b/sd/inc/bitmaps.hlst
@@ -177,10 +177,6 @@
#define BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_BOTTOM_NORMAL "sd/res/presenterscreen-ScrollbarThumbBottomNormal.png"
#define BMP_PRESENTERSCREEN_BUTTON_PLUS_DISABLED "sd/res/presenterscreen-ButtonPlusDisabled.png"
-// This definition is not used directly.
-// It is only here to be shipped in images.zip.
-// The bitmap itself is used from sdext/source/minimizer.
-#define BMP_PRESENTATION_MINIMIZER "sd/res/minimize_presi_80.png"
#define BMP_EMBEDDED "sd/res/nv08.png"
#define BMP_LINK "sd/res/nv09.png"
#define BMP_HYPERLINK "sd/res/nv010.png"
diff --git a/sdext/Library_PresentationMinimizer.mk b/sdext/Library_PresentationMinimizer.mk
index eb8995f00be0..77a1e5a27c40 100644
--- a/sdext/Library_PresentationMinimizer.mk
+++ b/sdext/Library_PresentationMinimizer.mk
@@ -24,6 +24,11 @@ $(eval $(call gb_Library_use_api,PresentationMinimizer,\
udkapi \
))
+$(eval $(call gb_Library_set_include,PresentationMinimizer,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/sdext/inc \
+))
+
$(eval $(call gb_Library_use_libraries,PresentationMinimizer,\
cppu \
cppuhelper \
diff --git a/sdext/inc/bitmaps.hlst b/sdext/inc/bitmaps.hlst
new file mode 100644
index 000000000000..57050a95ed3e
--- /dev/null
+++ b/sdext/inc/bitmaps.hlst
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SDEXT_INC_BITMAPS_HRC
+#define INCLUDED_SDEXT_INC_BITMAPS_HRC
+
+#define BMP_PRESENTATION_MINIMIZER "sd/res/minimize_presi_80.png"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index c72b44a12ad7..43c848050386 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -30,7 +30,7 @@
#include <sal/macros.h>
#include <osl/time.h>
#include <tools/urlobj.hxx>
-
+#include "bitmaps.hlst"
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::ui;
@@ -112,10 +112,7 @@ void OptimizerDialog::InitRoadmap()
InsertRoadmapItem( 3, getString( STR_OLE_OBJECTS ), ITEM_ID_OLE_OPTIMIZATION );
InsertRoadmapItem( 4, getString( STR_SUMMARY ), ITEM_ID_SUMMARY );
- // Well, that's messy, but the
- // BMP_PRESENTATION_MINIMIZER from sd module cannot be used here directly
- // that UNO wizard dialog should be converted to ui
- OUString sURL( "private:graphicrepository/sd/res/minimize_presi_80.png" );
+ OUString sURL("private:graphicrepository/" + OUString(BMP_PRESENTATION_MINIMIZER));
xPropertySet->setPropertyValue( "ImageURL", Any( sURL ) );
xPropertySet->setPropertyValue( "Activated", Any( true ) );
commit 6fc5a80009d7426c30d2b9656f76549536b45bb0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 27 11:16:33 2017 +0100
aSearchPath is write only
Change-Id: I2dd8c4b9db53ed2c575500d2b00e90d5a99ac6e4
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index e45d4a778aa6..40147318a0df 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -62,7 +62,6 @@ class RscTypCont
RSCBYTEORDER_TYPE nByteOrder; // Intel or
OString aLanguage; // output language
std::vector< sal_uInt32 > aLangFallbacks; // language fallback list (entry 0 is language itself)
- OString aSearchPath; // search path for bitmap, icon and pointer
sal_uInt32 nUniqueId; // unique id for system resources
sal_uLong nFilePos; // position in file (MTF)
sal_uInt32 nPMId; // unique id for PR-resource file
@@ -97,7 +96,7 @@ public:
CommandFlags nFlags;
std::map<sal_uInt64, sal_uLong> aIdTranslator; // map resources types and ids to an id (under PM9 or to a file position (MTF)
- RscTypCont( RscError *, RSCBYTEORDER_TYPE, const OString& rSearchPath, CommandFlags nFlags );
+ RscTypCont( RscError *, RSCBYTEORDER_TYPE, CommandFlags nFlags );
~RscTypCont();
Atom AddLanguage( const char* );
@@ -113,7 +112,6 @@ public:
{
nSourceCharSet = aCharSet;
}
- const OString& GetSearchPath() const { return aSearchPath; }
// deletes all resource objects of this file
void Delete( RscFileTab::Index lFileKey );
sal_uInt32 PutSysName( RESOURCE_TYPE nRscTyp, char * pName );
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index e61532613769..8ff1da5acf1e 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -36,11 +36,9 @@
RscTypCont::RscTypCont( RscError * pErrHdl,
RSCBYTEORDER_TYPE nOrder,
- const OString& rSearchPath,
CommandFlags nFlagsP )
: nSourceCharSet( RTL_TEXTENCODING_UTF8 )
, nByteOrder( nOrder )
- , aSearchPath( rSearchPath )
, nUniqueId(256)
, nFilePos( 0 )
, nPMId(RSC_VERSIONCONTROL + RESOURCE_TYPE(1)) // at least one more
diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx
index 3a0f0609ca19..10b3565dcaac 100644
--- a/rsc/source/prj/gui.cxx
+++ b/rsc/source/prj/gui.cxx
@@ -53,7 +53,6 @@ int rsc2_main( int argc, char **argv )
std::unique_ptr<RscCmdLine> pCmdLine(new RscCmdLine( argc, argv, pErrHdl.get() ));
std::unique_ptr<RscTypCont> pTypCont(new RscTypCont( pErrHdl.get(),
pCmdLine->nByteOrder,
- pCmdLine->aPath,
pCmdLine->nCommands ));
if( pErrHdl->nErrors )
commit 87bd657a2653eadc09d97f2897121947c8ebe5a3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 27 11:15:05 2017 +0100
aSysSearchPath is write only
Change-Id: Ic88f12c1e6cb379150cb9521a9468244d6ce0cc5
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 088ffed16a65..e45d4a778aa6 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -63,7 +63,6 @@ class RscTypCont
OString aLanguage; // output language
std::vector< sal_uInt32 > aLangFallbacks; // language fallback list (entry 0 is language itself)
OString aSearchPath; // search path for bitmap, icon and pointer
- OString aSysSearchPath; // aSearchPath plus language specific paths
sal_uInt32 nUniqueId; // unique id for system resources
sal_uLong nFilePos; // position in file (MTF)
sal_uInt32 nPMId; // unique id for PR-resource file
@@ -115,7 +114,6 @@ public:
nSourceCharSet = aCharSet;
}
const OString& GetSearchPath() const { return aSearchPath; }
- void SetSysSearchPath( const OString& rStr ) { aSysSearchPath = rStr; }
// deletes all resource objects of this file
void Delete( RscFileTab::Index lFileKey );
sal_uInt32 PutSysName( RESOURCE_TYPE nRscTyp, char * pName );
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 9b5e44aef736..d1f19b7b103f 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -616,27 +616,9 @@ ERRTYPE RscCompiler::Link()
pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aRcTmp.getStr() );
// write file
- sal_Char cSearchDelim = SAL_PATHSEPARATOR;
- sal_Char cAccessDelim = SAL_PATHDELIMITER;
pTC->ChangeLanguage( it->aLangName );
pTC->SetSourceCharSet( RTL_TEXTENCODING_UTF8 );
pTC->ClearSysNames();
- OStringBuffer aSysSearchPath(it->aLangSearchPath);
- sal_Int32 nIndex = 0;
- OString aSearchPath = pTC->GetSearchPath();
- do
- {
- OString aToken = aSearchPath.getToken( 0, cSearchDelim, nIndex );
- if (!aSysSearchPath.isEmpty())
- aSysSearchPath.append(cSearchDelim);
- aSysSearchPath.append(aToken);
- aSysSearchPath.append(cAccessDelim);
- aSysSearchPath.append(it->aLangName);
- aSysSearchPath.append(cSearchDelim);
- aSysSearchPath.append(aToken);
- }
- while ( nIndex >= 0 );
- pTC->SetSysSearchPath(aSysSearchPath.makeStringAndClear());
WriteRcContext aContext;
commit 18120258b3e4c5e93e5d4ca8d6bfb1a8a3e9a7b8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 27 11:09:42 2017 +0100
no bitmaps in .src files anymore
Change-Id: I0228cae8590366be5d5f0d431cf655942bbb891c
diff --git a/include/tools/rcid.h b/include/tools/rcid.h
index 0c095e8109c4..7dd4c7f08fa4 100644
--- a/include/tools/rcid.h
+++ b/include/tools/rcid.h
@@ -34,7 +34,6 @@
#define RSC_RESOURCE (RSC_NOTYPE + RESOURCE_TYPE(0x10))
#define RSC_STRING (RSC_NOTYPE + RESOURCE_TYPE(0x11))
-#define RSC_BITMAP (RSC_NOTYPE + RESOURCE_TYPE(0x13))
#define RSC_STRINGARRAY (RSC_NOTYPE + RESOURCE_TYPE(0x79))
diff --git a/include/tools/resmgr.hxx b/include/tools/resmgr.hxx
index 2dd642422953..6c52d2c7cfd1 100644
--- a/include/tools/resmgr.hxx
+++ b/include/tools/resmgr.hxx
@@ -143,7 +143,6 @@ public:
/// Search and load resource, given its ID
bool GetResource( const ResId& rId, const Resource * = nullptr );
- static void * GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr );
/// Free resource context
void PopContext( const Resource* = nullptr );
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index cca13188f58d..ead37f45026c 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -188,7 +188,6 @@ class BitmapWriteAccess;
class BitmapPalette;
class ImpBitmap;
class Color;
-class ResId;
class GDIMetaFile;
class AlphaMask;
class OutputDevice;
@@ -219,7 +218,6 @@ public:
Bitmap();
Bitmap( const Bitmap& rBitmap );
Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalette* pPal = nullptr );
- Bitmap( const ResId& rResId );
Bitmap( SalBitmap* pSalBitmap );
virtual ~Bitmap();
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index a9bf00bfc36c..d7bedddb8606 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -45,7 +45,6 @@ class VCL_DLLPUBLIC BitmapEx
public:
BitmapEx();
- BitmapEx( const ResId& rResId );
BitmapEx( const OUString& rIconName );
BitmapEx( const BitmapEx& rBitmapEx );
BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize );
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 9381d16b2ee8..088ffed16a65 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -85,7 +85,6 @@ class RscTypCont
RscTop * InitClassMgr();
RscTop * InitClassString( RscTop * pSuper );
- RscTop * InitClassBitmap( RscTop * pSuper );
public:
RscLongEnumRange aEnumLong;
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 929ed89be284..46ab34a0fd97 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -71,21 +71,4 @@ RscTop * RscTypCont::InitClassString( RscTop * pSuper )
return pClassString;
}
-RscTop * RscTypCont::InitClassBitmap( RscTop * pSuper )
-{
- Atom nId;
- RscTop * pClassBitmap;
-
- nId = pHS->getID( "Bitmap" );
- pClassBitmap = new RscSysDepend( nId, RSC_BITMAP, pSuper );
- pClassBitmap->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
- aNmTb.Put( nId, CLASSNAME, pClassBitmap );
-
- // the class RscSysDepend handles variables "FILE" in a specific way
- nId = aNmTb.Put( "File", VARNAME );
- pClassBitmap->SetVariable( nId, &aLangString, nullptr, RSCVAR::NoRc );
-
- return pClassBitmap;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index a330f739fe2d..282b9cad33bf 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -46,7 +46,6 @@ void RscTypCont::Init()
RscTop * pClassMgr;
RscTop * pClassString;
RscTop * pClassStringArray;
- RscTop * pClassBitmap;
Atom nId;
@@ -99,10 +98,6 @@ void RscTypCont::Init()
// initialize variables
nId = aNmTb.Put( "ItemList", VARNAME );
pClassStringArray->SetVariable( nId, pLangStringLongTupelList );
-
- pClassBitmap = InitClassBitmap( pClassMgr );
- pRoot->Insert( pClassBitmap );
-
}
aNmTb.SetSort();
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 86b5be7b5146..6fd64a980f6e 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -1022,17 +1022,6 @@ bool ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
return true;
}
-void * ResMgr::GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr )
-{
- osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
-
- *ppResMgr = rResId.GetResMgr();
- assert(*ppResMgr != nullptr);
- (*ppResMgr)->GetResource( rResId );
- (*ppResMgr)->Increment( sizeof( RSHEADER_TYPE ) );
- return (*ppResMgr)->GetClass();
-}
-
void ResMgr::PopContext( const Resource* pResObj )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index e496ecd76800..8dc4bd07e0d3 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -37,14 +37,6 @@ Bitmap::Bitmap()
{
}
-Bitmap::Bitmap( const ResId& rResId )
-{
- const BitmapEx aBmpEx( rResId );
-
- if( !aBmpEx.IsEmpty() )
- *this = aBmpEx.GetBitmap();
-}
-
Bitmap::Bitmap(const Bitmap& rBitmap)
: mxImpBmp(rBitmap.mxImpBmp)
, maPrefMapMode(rBitmap.maPrefMapMode)
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 0f709c2b03f5..edcaebddc807 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -94,20 +94,6 @@ BitmapEx::BitmapEx( const OUString& rIconName )
loadFromIconTheme( rIconName );
}
-BitmapEx::BitmapEx( const ResId& rResId ) :
- eTransparent( TransparentType::NONE ),
- bAlpha ( false )
-{
- ResMgr* pResMgr = nullptr;
-
- ResMgr::GetResourceSkipHeader( rResId.SetRT( RSC_BITMAP ), &pResMgr );
- pResMgr->ReadLong();
- pResMgr->ReadLong();
-
- const OUString aFileName( pResMgr->ReadString() );
- loadFromIconTheme( aFileName );
-}
-
void BitmapEx::loadFromIconTheme( const OUString& rIconName )
{
OUString aIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme();
commit b100796c3922fe8fe83628053fc0294bd48b044a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 27 11:07:35 2017 +0100
last private:resource ... bitmapex user is gone
so drop private:resource ... bitmapex example and update docs
Change-Id: I244c575573cffda5eb8ca52afd2f4a04a9b18f14
diff --git a/offapi/com/sun/star/graphic/MediaProperties.idl b/offapi/com/sun/star/graphic/MediaProperties.idl
index aa0182ad9e3c..590d6fb999ce 100644
--- a/offapi/com/sun/star/graphic/MediaProperties.idl
+++ b/offapi/com/sun/star/graphic/MediaProperties.idl
@@ -41,11 +41,10 @@ published service MediaProperties
<p>In addition to the normal protocols like file:// or http://
you can use private URLs as follows to get access to graphics
- lying inside the resource system within an Office context:
+ lying inside the graphicrepository system within an Office context:
<ul>
<li><code>private:graphicrepository/<em><path_in_repository></em></code></li>
- <li>private:resource/projectshortname/bitmapex/12345</li>
</ul>
And additionally, GraphicObject scheme URLs like
<ul> <li>vnd.sun.star.GraphicObject:10000000000001940000012FB99807BD</li> </ul>
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 12f3dfa413de..6106bef363a8 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -83,7 +83,6 @@ private:
static css::uno::Reference< css::graphic::XGraphic > implLoadMemory( const OUString& rResourceURL );
static css::uno::Reference< css::graphic::XGraphic > implLoadGraphicObject( const OUString& rResourceURL );
- static css::uno::Reference< css::graphic::XGraphic > implLoadResource( const OUString& rResourceURL );
static css::uno::Reference< css::graphic::XGraphic > implLoadRepositoryImage( const OUString& rResourceURL );
static css::uno::Reference< css::graphic::XGraphic > implLoadBitmap( const css::uno::Reference< css::awt::XBitmap >& rBitmap );
static css::uno::Reference< css::graphic::XGraphic > implLoadStandardImage( const OUString& rResourceURL );
@@ -247,53 +246,6 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadBitmap( const uno
return xRet;
}
-
-uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const OUString& rResourceURL )
-{
- uno::Reference< ::graphic::XGraphic > xRet;
- sal_Int32 nIndex = 0;
-
- if( rResourceURL.getToken( 0, '/', nIndex ) == "private:resource" )
- {
- OString aResMgrName(OUStringToOString(
- rResourceURL.getToken(0, '/', nIndex), RTL_TEXTENCODING_ASCII_US));
-
- std::unique_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( aResMgrName.getStr(), Application::GetSettings().GetUILanguageTag() ));
-
- if( pResMgr )
- {
- const OUString aResourceType( rResourceURL.getToken( 0, '/', nIndex ) );
- const ResId aResId( rResourceURL.getToken( 0, '/', nIndex ).toInt32(), *pResMgr );
-
- if( !aResourceType.isEmpty() )
- {
- BitmapEx aBmpEx;
-
- if (aResourceType == "bitmapex")
- {
- aResId.SetRT( RSC_BITMAP );
-
- if( pResMgr->IsAvailable( aResId ) )
- {
- aBmpEx = BitmapEx( aResId );
- }
- }
-
- if( !aBmpEx.IsEmpty() )
- {
- ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic;
-
- pUnoGraphic->init( aBmpEx );
- xRet = pUnoGraphic;
- }
- }
- }
- }
-
- return xRet;
-}
-
-
uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDescriptor( const uno::Sequence< beans::PropertyValue >& rMediaProperties )
{
uno::Reference< beans::XPropertySet > xRet;
@@ -333,8 +285,6 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc
{
uno::Reference< ::graphic::XGraphic > xGraphic( implLoadMemory( aURL ) );
if( !xGraphic.is() )
- xGraphic = implLoadResource( aURL );
- if( !xGraphic.is() )
xGraphic = implLoadGraphicObject( aURL );
if ( !xGraphic.is() )
@@ -437,9 +387,6 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
if( !xRet.is() )
xRet = implLoadGraphicObject( aPath );
- if( !xRet.is() )
- xRet = implLoadResource( aPath );
-
if ( !xRet.is() )
xRet = implLoadRepositoryImage( aPath );
commit 0d95753e4292b1e1338268acdcbe638d3de97e2b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 27 11:01:56 2017 +0100
ImageList python thing unused since WebWizard drop
Change-Id: Id4961341def8cc4c242736580154411b5b137885
diff --git a/wizards/Pyuno_commonwizards.mk b/wizards/Pyuno_commonwizards.mk
index 6654d4d69e7b..577fe6e50a80 100644
--- a/wizards/Pyuno_commonwizards.mk
+++ b/wizards/Pyuno_commonwizards.mk
@@ -38,7 +38,6 @@ $(eval $(call gb_Pyuno_add_files,commonwizards,wizards,\
text/__init__.py \
ui/ControlScroller.py \
ui/DocumentPreview.py \
- ui/ImageList.py \
ui/PathSelection.py \
ui/PeerConfig.py \
ui/UIConsts.py \
diff --git a/wizards/com/sun/star/wizards/ui/ImageList.py b/wizards/com/sun/star/wizards/ui/ImageList.py
deleted file mode 100644
index 870f2db32f71..000000000000
--- a/wizards/com/sun/star/wizards/ui/ImageList.py
+++ /dev/null
@@ -1,520 +0,0 @@
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-import uno
-import traceback
-from abc import abstractmethod
-
-from threading import RLock
-from .PeerConfig import PeerConfig
-from .event.CommonListener import OMouseListenerProcAdapter
-from ..common.PropertyNames import PropertyNames
-from ..common.HelpIds import HelpIds
-from ..common.IRenderer import IRenderer
-from .event.ListDataListener import ListDataListener
-
-from com.sun.star.awt import Size
-
-def synchronized(lock):
- ''' Synchronization decorator. '''
- def wrap(f):
- def newFunction(*args, **kw):
- lock.acquire()
- try:
- return f(*args, **kw)
- finally:
- lock.release()
- return newFunction
- return wrap
-
-class ImageList(ListDataListener):
- NO_BORDER = 0
- BACKGROUND_COLOR = 16777216
- HIDE_PAGE = 99
- TRANSPARENT = -1
- LINE_HEIGHT = 8
- IMAGE_PROPS = ("Border", "BackgroundColor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y, "ScaleImage",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX, "Tabstop",
- PropertyNames.PROPERTY_WIDTH)
- MOVE_SELECTION = (PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP)
- lock = RLock()
- listModel = None
- btnNext = None
- btnBack = None
-
- def __init__(self):
- self.benabled = True
- self.gap = Size(4, 4)
- self.cols = 4
- self.rows = 3
- self.imageSize = Size(20, 20)
- self.selectionGap = Size(2, 2)
- self.showButtons = True
- self.refreshOverNull = True
- self.imageTextLines = 1
- self.rowSelect = False
- self.scaleImages = True
- self.name = "il"
- self.selected = -1
- self.pageStart = 0
- self.helpURL = 0
- self.renderer = None
- self.counterRenderer = self.SimpleCounterRenderer()
- self.MOVE_SELECTION_VALS = list(range(3))
- self.itemListenerList = None
-
- def onMousePressed(self, event):
- self.focus(self.getImageIndexFor(self.selected))
-
-
- def create(self, dialog):
- self.oUnoDialog = dialog
- self.dialogModel = dialog.xDialogModel
- imageTextHeight = self.imageTextLines * ImageList.LINE_HEIGHT
- opeerConfig = PeerConfig(dialog)
- self.MOVE_SELECTION_VALS[2] = self.step
- imgContainer = dialog.insertImage(
- self.name + "lblContainer",
- ("BackgroundColor", "Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_WIDTH),
- (ImageList.BACKGROUND_COLOR, 1,
- (self.imageSize.Height + self.gap.Height) \
- * self.rows + self.gap.Height + imageTextHeight + 1,
- self.pos.Width, self.pos.Height, self.step,
- (self.imageSize.Width + self.gap.Width) \
- * self.cols + self.gap.Width))
- opeerConfig.setPeerProperties(imgContainer,"MouseTransparent", True)
-
- if self.rowSelect:
- selectionWidth = (self.imageSize.Width + self.gap.Width) \
- * self.cols - self.gap.Width + (self.selectionGap.Width * 2)
- else:
- selectionWidth = self.imageSize.Width + (self.selectionGap.Width * 2)
-
- self.grbxSelectedImage = dialog.insertLabel(
- self.name + "_grbxSelected",
- ("BackgroundColor", "Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP, "Tabstop",
- PropertyNames.PROPERTY_WIDTH),
- (ImageList.TRANSPARENT, 1,
- self.imageSize.Height + (self.selectionGap.Height * 2),
- 0, #posx
- 0, #posy
- self.step, True, selectionWidth))
- xWindow = self.grbxSelectedImage
- xWindow.addMouseListener(OMouseListenerProcAdapter(self.onMousePressed))
- pNames1 = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX, "Tabstop",
- PropertyNames.PROPERTY_WIDTH)
- self.lblImageText = dialog.insertLabel(
- self.name + "_imageText", pNames1,
- (imageTextHeight, "", self.pos.Width + 1,
- self.pos.Height + (self.imageSize.Height + self.gap.Height) \
- * self.rows + self.gap.Height, self.step, 0, False,
- self.cols * (self.imageSize.Width + self.gap.Width) \
- + self.gap.Width - 2))
- if self.showButtons:
- ImageList.btnBack = dialog.insertButton(
- self.name + "_btnBack", "prevPage", pNames1,
- (14, HelpIds.getHelpIdString((self.helpURL + 1)),
- self.pos.Width, self.pos.Height + \
- (self.imageSize.Height + self.gap.Height) * \
- self.rows + self.gap.Height + imageTextHeight + 1,
- self.step, self.tabIndex + 1, True, 14), self)
- ImageList.btnNext = dialog.insertButton(
- self.name + "_btnNext", "nextPage", pNames1,
- (14, HelpIds.getHelpIdString((self.helpURL + 1)),
- self.pos.Width + (self.imageSize.Width + self.gap.Width) * \
- self.cols + self.gap.Width - 14 + 1,
- self.pos.Height + (self.imageSize.Height + self.gap.Height) \
- * self.rows + self.gap.Height + imageTextHeight + 1,
- self.step, self.tabIndex + 2, True, 14), self)
- self.lblCounter = dialog.insertLabel(
- self.name + "_lblCounter", pNames1,
- (ImageList.LINE_HEIGHT, "", self.pos.Width + 14 + 1,int(
- self.pos.Height + (self.imageSize.Height + self.gap.Height) \
- * self.rows + self.gap.Height + imageTextHeight + \
- ((14 - ImageList.LINE_HEIGHT) / 2)),
- self.step, 0, False, self.cols * \
- (self.imageSize.Width + self.gap.Width) + \
- self.gap.Width - 2 * 14 - 1))
- self.lblCounter.Model.Align = 1
- ImageList.btnBack.Model.Label = "<"
- ImageList.btnNext.Model.Label = ">"
-
- self.m_aImages = [None] * (self.rows * self.cols)
-
- for r in range(self.rows):
- for c in range(self.cols):
- self.m_aImages[r * self.cols + c] = self.createImage(dialog, r, c)
-
- self.refreshImages()
- self.listModel.addListDataListener(self)
-
- #used for optimization
-
- def createImage(self, dialog, _row, _col):
- imageName = self.name + "_image" + str(_row * self.cols + _col)
- image = dialog.insertImage(
- imageName, ImageList.IMAGE_PROPS,
- (ImageList.NO_BORDER,
- ImageList.BACKGROUND_COLOR,
- self.imageSize.Height,
- HelpIds.getHelpIdString(self.helpURL + 1),
- self.getImagePosX(_col), self.getImagePosY(_row),
- self.scaleImages,
- self.step,
- self.tabIndex,
- False,
- self.imageSize.Width))
- #COMMENTED
- image.addMouseListener(OMouseListenerProcAdapter(self.mousePressed))
- image.addKeyListener(None)
- return image
-
- def getImagePosX(self, col):
- return self.pos.Width + col * \
- (self.imageSize.Width + self.gap.Width) + self.gap.Width
-
- def getImagePosY(self, row):
- return self.pos.Height + row * \
- (self.imageSize.Height + self.gap.Height) + self.gap.Height
-
- def refreshImages(self):
- if self.showButtons:
- self.refreshCounterText()
-
- self.hideSelection()
- if self.refreshOverNull:
- i = 0
- for i in self.m_aImages:
- i.Visible = False
-
- focusable = True
-
- self.refreshSelection()
-
- def refreshCounterText(self):
- self.lblCounter.Model.Label = self.counterRenderer.render(
- self.Counter (self.pageStart + 1, self.pageEnd(),
- self.listModel.getSize()))
-
- def pageEnd(self):
- i = self.pageStart + self.cols * self.rows
- if i > self.listModel.getSize() - 1:
- return self.listModel.getSize()
- else:
- return i
-
- def refreshSelection(self):
- if self.selected < self.pageStart or \
- self.selected >= (self.pageStart + self.rows * self.cols):
- self.hideSelection()
- else:
- self.moveSelection(self.getImageIndexFor(self.selected))
-
- def hideSelection(self):
- self.grbxSelectedImage.Model.Step = ImageList.HIDE_PAGE
- self.grbxSelectedImage.Visible = False
-
- '''
- Utility field holding list of ItemListeners.
- '''
-
- def moveSelection(self, image):
- self.grbxSelectedImage.Visible = False
- row = int(image / self.cols)
- if self.rowSelect:
- col = 0
- else:
- col = image - (row * self.cols)
-
- self.MOVE_SELECTION_VALS[0] = \
- int(self.getImagePosX(col) - self.selectionGap.Width)
- self.MOVE_SELECTION_VALS[1] = \
- int(self.getImagePosY(row) - self.selectionGap.Height)
- uno.invoke(self.grbxSelectedImage.Model, "setPropertyValues",
- ((ImageList.MOVE_SELECTION),
- (tuple(self.MOVE_SELECTION_VALS))))
- if (self.dialogModel.Step == self.step):
- self.grbxSelectedImage.Visible = True
- #now focus...
-
- for index,item in enumerate(self.m_aImages):
- if index != image:
- self.defocus(index)
- else:
- self.m_aImages[image].Model.Tabstop = True
-
- '''
- @param i
- @return the Object in the list model corresponding to the given image index
- '''
-
- def getObjectFor(self, i):
- ii = self.getIndexFor(i)
- if self.listModel.getSize() <= ii:
- return None
- else:
- return self.listModel.getElementAt(ii)
-
- '''
- @param i
- @return the index in the listModel for the given image index.
- '''
-
- def getIndexFor(self, i):
- return self.pageStart + i
-
- def getImageIndexFor(self, i):
- return i - self.pageStart
-
- def intervalAdded(self, event):
- if event.getIndex0() <= self.selected:
- if event.getIndex1() <= self.selected:
- self.selected += event.getIndex1() - event.getIndex0() + 1
-
- if event.getIndex0() < self.pageStart or \
- event.getIndex1() < (self.pageStart + self.rows + self.cols):
- self.refreshImages()
-
- '''
- Registers ItemListener to receive events.
- @param listener The listener to register.
- '''
-
- @synchronized(lock)
- def addItemListener(self, listener):
- if self.itemListenerList is None:
- self.itemListenerList = []
- self.itemListenerList.append(listener)
-
- '''
- Removes ItemListener from the list of listeners.
- @param listener The listener to remove.
- '''
-
- @synchronized(lock)
- def removeItemListener(self, listener):
- if self.itemListenerList is not None:
- self.itemListenerList.remove(listener)
-
- '''
- Notifies all registered listeners about the event.
- @param event The event to be fired
- '''
-
- def fireItemSelected(self):
- if self.itemListenerList is None:
- return
- auxlist = list(self.itemListenerList)
- for i in auxlist:
- i.itemStateChanged(None)
-
- def getSelected(self):
- return self.selected
-
- def setSelected(self, _object):
- if (isinstance (_object, int)):
- self.setSelected1(_object)
- elif (_object is None or _object is ""):
- self.setSelected1(-1)
- else:
- i = 0
- while (i < self.listModel.getSize()):
- item = self.listModel.getElementAt(i)
- if item == _object:
- self.setSelected1(i)
- return
- i += 1
-
- def setSelected1(self, index):
- if self.rowSelect and (index >= 0):
- index = int(index / self.cols) * self.cols
-
- if self.selected == index:
- return
-
- self.selected = index
- self.refreshImageText()
- self.refreshSelection()
- self.fireItemSelected()
-
-
- def refreshImageText(self):
- if self.selected >= 0:
- try:
- item = self.listModel.getElementAt(self.selected)
- except IndexError:
- item = None
- traceback.print_exc()
- else:
- item = None
-
- self.lblImageText.Model.Label = " " + self.renderer.render(item)
-
- def nextPage(self):
- if self.pageStart < self.listModel.getSize() - self.rows * self.cols:
- self.setPageStart(self.pageStart + self.rows * self.cols)
-
- def prevPage(self):
- if self.pageStart == 0:
- return
-
- i = self.pageStart - self.rows * self.cols
- if i < 0:
- i = 0
-
- self.setPageStart(i)
-
- def setPageStart(self, i):
- if (i == self.pageStart):
- return
- self.pageStart = i
- self.enableButtons()
- self.refreshImages()
-
- def enableButtons(self):
- self.enable(
- ImageList.btnNext,
- bool(self.pageStart + self.rows * self.cols < self.listModel.getSize()))
- self.enable(ImageList.btnBack, bool(self.pageStart > 0))
-
- def enable(self, control, enable):
- control.Model.Enabled = enable
-
- def setBorder(self, control, border):
- uno.invoke(control.Model, "setPropertyValues",(("Border"), (enable)))
-
- def getImageFromEvent(self, event):
- image = (event).Source
- controlName = image.Model.Name
- return int(controlName[6 + len(self.name):])
-
- def mousePressed(self, event):
- image = self.getImageFromEvent(event)
- index = self.getIndexFor(image)
- if index < self.listModel.getSize():
- self.focus(image)
- self.setSelected(index)
-
- def getSelectedObjects(self):
- return[self.listModel.getElementAt(self.selected)]
-
- class SimpleCounterRenderer(IRenderer):
-
- def render(self, counter):
- return \
- "" + (counter).start + ".." + (counter).end + "/" + (counter).max
-
- class Counter(object):
-
- def __init__(self, start_, end_, max_):
- self.start = start_
- self.end = end_
- self.max = max_
-
- def getSelectedObject(self):
- if self.selected >= 0:
- try:
- return self.listModel.getElementAt(self.selected)
- except IndexError:
- traceback.print_exc()
- return None
-
- def showSelected(self):
- oldPageStart = self.pageStart
- if self.selected != -1:
- self.pageStart = \
- int((self.selected / len(self.m_aImages)) * len(self.m_aImages))
-
- if oldPageStart != self.pageStart:
- self.enableButtons()
- self.refreshImages()
-
- def keyPressed(self, ke):
- image = self.getImageFromEvent(ke)
- r = image / self.cols
- c = image - (r * self.cols)
- d = self.getKeyMove(ke, r, c)
- newImage = image + d
- if newImage == image:
- return
-
- if self.isFocusable(newImage):
- self.changeFocus(image, newImage)
-
- def isFocusable(self, image):
- return (image >= 0) and \
- (self.getIndexFor(image) < self.listModel.getSize())
-
- def changeFocus(self, oldFocusImage, newFocusImage):
- self.focus(newFocusImage)
- self.defocus(oldFocusImage)
-
- def select(self, ke):
- self.setSelected(self.getIndexFor(self.getImageFromEvent(ke)))
-
- def focus(self, image):
- self.m_aImages[image].Model.Tabstop = True
- xWindow = self.m_aImages[image]
- xWindow.setFocus()
-
- def defocus(self, image):
- self.m_aImages[image].Model.Tabstop = False
-
- '''jump to the given item (display the screen
- that contains the given item).
- @param i
- '''
-
- def display(self, i):
- isAux = (self.cols * self.rows)
- ps = (self.listModel.getSize() / isAux) * isAux
- self.setPageStart(ps)
-
- def setenabled(self, b):
- i = 0
- while i < len(self.m_aImages):
- UnoDialog2.setEnabled(self.m_aImages[i], b)
- i += 1
- UnoDialog2.setEnabled(self.grbxSelectedImage, b)
- UnoDialog2.setEnabled(self.lblImageText, b)
- if self.showButtons:
- UnoDialog2.setEnabled(ImageList.btnBack, b)
- UnoDialog2.setEnabled(ImageList.btnNext, b)
- UnoDialog2.setEnabled(self.lblCounter, b)
-
- self.benabled = b
commit fcf9c22e00db0107391775f51fac53555711b951
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 27 10:00:37 2017 +0100
remove wizards bitmaps from .src files
Change-Id: I4e334ac88e1e060bc07af9b174b9b8fb1401fc80
diff --git a/Repository.mk b/Repository.mk
index c80ee8d75828..fb935a33558a 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1103,7 +1103,6 @@ $(eval $(call gb_Helper_register_resources,\
uui \
vcl \
writerperfect \
- wzi \
$(if $(ENABLE_NSS),xmlsec) \
xsltdlg \
))
diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk
index a6a8b683a25f..3da3cee1a4e8 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -28,6 +28,7 @@ $(packimages_DIR)/%.zip : \
$(packimages_DIR)/sorted.lst \
$(packimages_DIR)/commandimagelist.ilst \
$(packimages_DIR)/sourceimagelist.ilst \
+ $(SRCDIR)/wizards/source/imagelists/imagelists.ilst \
$(call gb_Helper_optional,HELP,$(helpimages_DIR)/helpimg.ilst) \
$(call gb_Helper_optional,HELP,$(helpimages_DIR)/screenshotimg.ilst) \
$(call gb_Helper_get_imagelists)
diff --git a/scp2/source/ooo/file_resource_ooo.scp b/scp2/source/ooo/file_resource_ooo.scp
index c3884cbe1260..1ccf56babe5a 100644
--- a/scp2/source/ooo/file_resource_ooo.scp
+++ b/scp2/source/ooo/file_resource_ooo.scp
@@ -93,8 +93,6 @@ STD_RES_FILE( gid_File_Res_Vcl, vcl )
STD_RES_FILE( gid_File_Res_Writerperfect, writerperfect )
-STD_RES_FILE( gid_File_Res_Wzi, wzi )
-
STD_RES_FILE( gid_File_Res_Xsltdlg, xsltdlg )
STD_RES_FILE( gid_File_Res_AVMedia, avmedia )
diff --git a/wizards/AllLangResTarget_wzi.mk b/wizards/AllLangResTarget_wzi.mk
deleted file mode 100644
index ebb3e4b1c7eb..000000000000
--- a/wizards/AllLangResTarget_wzi.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-
-$(eval $(call gb_AllLangResTarget_AllLangResTarget,wzi))
-
-$(eval $(call gb_AllLangResTarget_set_reslocation,wzi,wizards))
-
-$(eval $(call gb_AllLangResTarget_add_srs,wzi,\
- wzi/res \
-))
-
-$(eval $(call gb_SrsTarget_SrsTarget,wzi/res))
-
-$(eval $(call gb_SrsTarget_add_nonlocalizable_files,wzi/res,\
- wizards/source/imagelists/imagelists.src \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/wizards/Module_wizards.mk b/wizards/Module_wizards.mk
index e3beb17d67ec..d29f83b47c0b 100644
--- a/wizards/Module_wizards.mk
+++ b/wizards/Module_wizards.mk
@@ -44,7 +44,6 @@ $(eval $(call gb_Module_add_l10n_targets,wizards,\
AllLangResTarget_eur \
AllLangResTarget_imp \
AllLangResTarget_tpl \
- AllLangResTarget_wzi \
))
ifeq ($(ENABLE_JAVA),TRUE)
diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java
index c5185306705a..a6b4b77f3a41 100644
--- a/wizards/com/sun/star/wizards/form/UIControlArranger.java
+++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java
@@ -24,6 +24,7 @@ import com.sun.star.awt.XItemListener;
import com.sun.star.awt.XRadioButton;
import com.sun.star.lang.EventObject;
import com.sun.star.wizards.common.Helper;
+import com.sun.star.wizards.common.IRenderer;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.document.Control;
import com.sun.star.wizards.ui.ButtonList;
@@ -107,15 +108,16 @@ public class UIControlArranger
HelpTexts[3] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 39); // In Blocks - Labels Above"
DefaultListModel imageModel = new DefaultListModel();
- for (int i = 0; i < HelpTexts.length; i++)
- {
- imageModel.addElement(Integer.valueOf(i));
- }
- String sMainArrangementHeader = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 41); // "Arrangement of the main form"
- m_aArrangeList[0] = new ArrangeButtonList(0, imageModel, sMainArrangementHeader);
+ imageModel.addElement("private:graphicrepository/wizards/res/formarrangelistside_42.png");
+ imageModel.addElement("private:graphicrepository/wizards/res/formarrangelisttop_42.png");
+ imageModel.addElement("private:graphicrepository/wizards/res/formarrangetable_42.png");
+ imageModel.addElement("private:graphicrepository/wizards/res/formarrangefree_42.png");
+
+ String sMainArrangementHeader = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 41); // "Arrangement of the main form"
+ m_aArrangeList[0] = new ArrangeButtonList(0, imageModel, sMainArrangementHeader);
- String sSubArrangementHeader = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 42); // "Arrangement of the sub form"
- m_aArrangeList[1] = new ArrangeButtonList(1, imageModel, sSubArrangementHeader);
+ String sSubArrangementHeader = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 42); // "Arrangement of the sub form"
+ m_aArrangeList[1] = new ArrangeButtonList(1, imageModel, sSubArrangementHeader);
enableAlignControlGroup(false);
}
@@ -124,14 +126,8 @@ public class UIControlArranger
return m_aArrangeList[_formindex].m_aButtonList.getSelected() + 1;
}
- private class LayoutRenderer implements ButtonList.IImageRenderer
+ private class LayoutRenderer implements IRenderer
{
- public Object getImageUrl(Object listitem)
- {
- int ResId = UIConsts.RID_IMG_FORM + (2 * ((Integer) listitem).intValue());
- return Integer.valueOf(ResId);
- }
-
public String render(Object listItem)
{
if (listItem == null)
diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java
index 08baeab70a26..ad11aa8125be 100644
--- a/wizards/com/sun/star/wizards/report/ReportLayouter.java
+++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java
@@ -191,11 +191,11 @@ public class ReportLayouter
});
if (m_nLandscapeState == 1)
{
- CurUnoDialog.getPeerConfiguration().setImageUrl(aOrientationImage, 1002);
+ CurUnoDialog.getPeerConfiguration().setImageUrl(aOrientationImage, "private:graphicrepository/wizards/res/landscape_32.png");
}
else
{
- CurUnoDialog.getPeerConfiguration().setImageUrl(aOrientationImage, 1000);
+ CurUnoDialog.getPeerConfiguration().setImageUrl(aOrientationImage, "private:graphicrepository/wizards/res/portrait_32.png");
}
}
catch (Exception exception)
@@ -267,7 +267,7 @@ public class ReportLayouter
catch (com.sun.star.lang.IllegalArgumentException e)
{
}
- Helper.setUnoPropertyValue(aOrientationImage, PropertyNames.PROPERTY_IMAGEURL, CurUnoDialog.getWizardImageUrl(1002));
+ Helper.setUnoPropertyValue(aOrientationImage, PropertyNames.PROPERTY_IMAGEURL, "private:graphicrepository/wizards/res/landscape_32.png");
break;
@@ -282,7 +282,7 @@ public class ReportLayouter
}
CurUnoDialog.setControlProperty("imgOrientation", PropertyNames.PROPERTY_IMAGEURL, Desktop.getBitmapPath(m_xMSF) + "/portrait.gif");
- Helper.setUnoPropertyValue(aOrientationImage, PropertyNames.PROPERTY_IMAGEURL, CurUnoDialog.getWizardImageUrl(1000));
+ Helper.setUnoPropertyValue(aOrientationImage, PropertyNames.PROPERTY_IMAGEURL, "private:graphicrepository/wizards/res/portrait_32.png");
break;
default:
diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java
index 3bb1489f36ae..447a7d1325e4 100644
--- a/wizards/com/sun/star/wizards/ui/ButtonList.java
+++ b/wizards/com/sun/star/wizards/ui/ButtonList.java
@@ -62,7 +62,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
private int m_nCurrentSelection = -1;
private int pageStart = 0;
public int helpURL = 0;
- private IImageRenderer renderer;
+ private IRenderer renderer;
private ListModel listModel;
private IRenderer counterRenderer = new SimpleCounterRenderer();
private static final int LINE_HEIGHT = 8;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list