From 3f9bf0a9aeb91b1211a5659044ab1eb22da9be7c Mon Sep 17 00:00:00 2001 From: David Hobley Date: Mon, 4 Oct 2010 16:31:26 +0200 Subject: More of OD style's comments removal --- comphelper/inc/comphelper/TypeGeneration.hxx | 3 +-- comphelper/source/property/TypeGeneration.cxx | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/TypeGeneration.hxx b/comphelper/inc/comphelper/TypeGeneration.hxx index 6660e560f4af..6202e023a07b 100644 --- a/comphelper/inc/comphelper/TypeGeneration.hxx +++ b/comphelper/inc/comphelper/TypeGeneration.hxx @@ -109,9 +109,8 @@ namespace comphelper CPPUTYPE_OUSTRINGS, //getCppuType( (Sequence*)0 ) CPPUTYPE_REFCOMPONENT, //getCppuType( (Reference< lang::XComponent >*)0 ) - // --> OD 2004-08-09 #i28749# + // #i28749# CPPUTYPE_TRANSFORMATIONINHORIL2R, //getCppuType( (drawing::HomogenMatrix3)* ) - // <-- CPPUTYPE_SEQNAMEDVALUE, //getCppuType( (Sequence*)0 ) CPPUTYPE_REFXGRAPHIC, //getCppuType( Reference< graphic::XGraphic >*)0) CPPUTYPE_TABLEBORDERDISTANCES, //getCppuType( (table::TableBorderDistances*)0 ) diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx index bf880330ce75..a8f5ea540327 100644 --- a/comphelper/source/property/TypeGeneration.cxx +++ b/comphelper/source/property/TypeGeneration.cxx @@ -129,9 +129,8 @@ #include #include #include -// --> OD 2004-08-09 #i28749# +// #i28749# #include -// <-- #include using ::rtl::OUString; @@ -220,13 +219,12 @@ namespace comphelper case CPPUTYPE_REFCONNECTION: pType = &::getCppuType( (Reference< sdbc::XConnection >*)0); break; case CPPUTYPE_REFMODEL: pType = &::getCppuType( (Reference< frame::XModel >*)0); break; case CPPUTYPE_REFCOMPONENT: pType = &::getCppuType( (Reference< lang::XComponent >*)0 ); break; - // --> OD 2004-08-09 #i28749# + // #i28749# case CPPUTYPE_TRANSFORMATIONINHORIL2R: { pType = &::getCppuType( (drawing::HomogenMatrix3*)0 ); } break; - // <-- case CPPUTYPE_SEQNAMEDVALUE: pType = &::getCppuType( (Sequence*)0 ); break; case CPPUTYPE_REFXGRAPHIC: pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break; case CPPUTYPE_TABLEBORDERDISTANCES: pType = &::getCppuType( (table::TableBorderDistances*)0 ); break; -- cgit From 028b4003986f9cff3274707eebd14ee9099bf87b Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Mon, 4 Oct 2010 16:59:51 +0200 Subject: remove include guards using fixguard.py --- comphelper/source/eventattachermgr/eventattachermgr.cxx | 2 -- comphelper/source/misc/accessibletexthelper.cxx | 2 -- comphelper/source/misc/evtmethodhelper.cxx | 0 comphelper/source/misc/stillreadwriteinteraction.cxx | 6 ------ comphelper/source/property/MasterPropertySet.cxx | 2 -- comphelper/source/property/MasterPropertySetInfo.cxx | 2 -- comphelper/source/property/TypeGeneration.cxx | 4 ---- comphelper/source/xml/ofopxmlhelper.cxx | 12 ------------ 8 files changed, 30 deletions(-) mode change 100755 => 100644 comphelper/source/misc/evtmethodhelper.cxx (limited to 'comphelper') diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index bf217f75c8db..02644f152974 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -34,9 +34,7 @@ #include #endif #include -#ifndef _VOS_DIAGNOSE_HXX_ #include -#endif #include #include #include diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx index e3247cae5b60..10bd0f913285 100644 --- a/comphelper/source/misc/accessibletexthelper.cxx +++ b/comphelper/source/misc/accessibletexthelper.cxx @@ -32,9 +32,7 @@ #include #include #include -#ifndef _COM_SUN_STAR_TEXT_WORDTYPE_HPP_ #include -#endif #include #include #include diff --git a/comphelper/source/misc/evtmethodhelper.cxx b/comphelper/source/misc/evtmethodhelper.cxx old mode 100755 new mode 100644 diff --git a/comphelper/source/misc/stillreadwriteinteraction.cxx b/comphelper/source/misc/stillreadwriteinteraction.cxx index 9054f0754b5e..7499758708b3 100644 --- a/comphelper/source/misc/stillreadwriteinteraction.cxx +++ b/comphelper/source/misc/stillreadwriteinteraction.cxx @@ -29,17 +29,11 @@ #include "precompiled_comphelper.hxx" #include -#ifndef __COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP__ #include -#endif -#ifndef __COM_SUN_STAR_TASK_XINTERACTIONABORT_HPP__ #include -#endif -#ifndef __COM_SUN_STAR_UCB_UNSUPPORTEDDATASINKEXCEPTION_HPP__ #include -#endif namespace comphelper{ diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index 28078a8019fc..2e6698e05879 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" -#ifndef _COMPHELPER_MASTERPROPERTYSET_HXX_ #include -#endif #include #include #include diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index 57cf22b77508..898c47aca8ee 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -27,9 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" -#ifndef _COMPHELPER_CHAINABLEPROPERTYSETINFO_HXX_ #include -#endif #include using ::rtl::OUString; diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx index a8f5ea540327..9ab04fa851fa 100644 --- a/comphelper/source/property/TypeGeneration.cxx +++ b/comphelper/source/property/TypeGeneration.cxx @@ -27,9 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" -#ifndef _COMPHELPER_TYPEGENERATION_HXX #include -#endif #include #include #include @@ -97,9 +95,7 @@ #include #include #include -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ #include -#endif #include #include #include diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx index 9ad617b0e6d1..03994486a50d 100644 --- a/comphelper/source/xml/ofopxmlhelper.cxx +++ b/comphelper/source/xml/ofopxmlhelper.cxx @@ -28,24 +28,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include -#endif -#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP #include -#endif -#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP #include -#endif -#ifndef _COM_SUN_STAR_XML_SAX_XPARSER_HPP #include -#endif -#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP #include -#endif -#ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP #include -#endif #include #include -- cgit From 1275d274db37fc333838321347e1887488f8f4c0 Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Tue, 5 Oct 2010 15:55:19 +0200 Subject: more removed include guards using fixguard.py --- comphelper/inc/comphelper/accessibleselectionhelper.hxx | 2 -- comphelper/inc/comphelper/docpasswordrequest.hxx | 0 comphelper/inc/comphelper/evtmethodhelper.hxx | 0 comphelper/inc/comphelper/ihwrapnofilter.hxx | 4 ---- comphelper/inc/comphelper/ofopxmlhelper.hxx | 2 -- comphelper/inc/comphelper/sequenceashashmap.hxx | 2 -- comphelper/inc/comphelper/sequenceasvector.hxx | 2 -- comphelper/inc/comphelper/stillreadwriteinteraction.hxx | 2 -- comphelper/source/processfactory/componentfactory.cxx | 2 -- 9 files changed, 16 deletions(-) mode change 100755 => 100644 comphelper/inc/comphelper/docpasswordrequest.hxx mode change 100755 => 100644 comphelper/inc/comphelper/evtmethodhelper.hxx (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/accessibleselectionhelper.hxx b/comphelper/inc/comphelper/accessibleselectionhelper.hxx index 12c31b39046c..6a360010c86f 100644 --- a/comphelper/inc/comphelper/accessibleselectionhelper.hxx +++ b/comphelper/inc/comphelper/accessibleselectionhelper.hxx @@ -29,9 +29,7 @@ #define COMPHELPER_ACCESSIBLE_SELECTION_HELPER_HXX #include -#ifndef COMPHELPER_ACCESSIBLE_CONTEXT_HELPER_HXX #include -#endif #include #include #include diff --git a/comphelper/inc/comphelper/docpasswordrequest.hxx b/comphelper/inc/comphelper/docpasswordrequest.hxx old mode 100755 new mode 100644 diff --git a/comphelper/inc/comphelper/evtmethodhelper.hxx b/comphelper/inc/comphelper/evtmethodhelper.hxx old mode 100755 new mode 100644 diff --git a/comphelper/inc/comphelper/ihwrapnofilter.hxx b/comphelper/inc/comphelper/ihwrapnofilter.hxx index 1765716acb66..32176caa363c 100644 --- a/comphelper/inc/comphelper/ihwrapnofilter.hxx +++ b/comphelper/inc/comphelper/ihwrapnofilter.hxx @@ -44,12 +44,8 @@ #include #endif -#ifndef _CPPUHELPER_IMPLBASE3_HXX_ #include -#endif -#ifndef INCLUDED_COMPHELPERDLLAPI_H #include "comphelper/comphelperdllapi.h" -#endif namespace comphelper { diff --git a/comphelper/inc/comphelper/ofopxmlhelper.hxx b/comphelper/inc/comphelper/ofopxmlhelper.hxx index db203a08d750..7dde918b5b8a 100644 --- a/comphelper/inc/comphelper/ofopxmlhelper.hxx +++ b/comphelper/inc/comphelper/ofopxmlhelper.hxx @@ -28,9 +28,7 @@ #ifndef _COMPHELPER_OFOPXMLHELPER_HXX #define _COMPHELPER_OFOPXMLHELPER_HXX -#ifndef _COM_SUN_STAR_XML_SAX_XDUCUMENTHANDLER_HPP_ #include -#endif #include #include #include diff --git a/comphelper/inc/comphelper/sequenceashashmap.hxx b/comphelper/inc/comphelper/sequenceashashmap.hxx index 737fd41efb84..05d4f706adf2 100644 --- a/comphelper/inc/comphelper/sequenceashashmap.hxx +++ b/comphelper/inc/comphelper/sequenceashashmap.hxx @@ -44,9 +44,7 @@ #include #include -#ifndef _COM_SUN_STAR_BEANS_IllegalTypeException_HPP_ #include -#endif #include "comphelper/comphelperdllapi.h" // see method dbg_dumpToFile() below! diff --git a/comphelper/inc/comphelper/sequenceasvector.hxx b/comphelper/inc/comphelper/sequenceasvector.hxx index 263b68b24c7c..f83d68a52eed 100644 --- a/comphelper/inc/comphelper/sequenceasvector.hxx +++ b/comphelper/inc/comphelper/sequenceasvector.hxx @@ -35,9 +35,7 @@ #include #include -#ifndef _COM_SUN_STAR_BEANS_IllegalTypeException_HPP_ #include -#endif //_______________________________________________ // namespace diff --git a/comphelper/inc/comphelper/stillreadwriteinteraction.hxx b/comphelper/inc/comphelper/stillreadwriteinteraction.hxx index 1ade47220c6f..e43534dc8ba2 100644 --- a/comphelper/inc/comphelper/stillreadwriteinteraction.hxx +++ b/comphelper/inc/comphelper/stillreadwriteinteraction.hxx @@ -32,9 +32,7 @@ // includes #include -#ifndef __COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP__ #include -#endif #include #include "comphelper/comphelperdllapi.h" diff --git a/comphelper/source/processfactory/componentfactory.cxx b/comphelper/source/processfactory/componentfactory.cxx index 7a3b17111072..2e223294bb6f 100644 --- a/comphelper/source/processfactory/componentfactory.cxx +++ b/comphelper/source/processfactory/componentfactory.cxx @@ -31,9 +31,7 @@ #include #include -#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HDL_ #include -#endif #include -- cgit From 7f02e96be9c711ca5fe6099f114580d49deaf263 Mon Sep 17 00:00:00 2001 From: jgraeme Date: Sat, 9 Oct 2010 10:47:07 +0200 Subject: A patch to remove some unused directives. Graeme --- comphelper/source/processfactory/componentfactory.cxx | 4 ---- 1 file changed, 4 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/processfactory/componentfactory.cxx b/comphelper/source/processfactory/componentfactory.cxx index 2e223294bb6f..f1af07baaefd 100644 --- a/comphelper/source/processfactory/componentfactory.cxx +++ b/comphelper/source/processfactory/componentfactory.cxx @@ -35,10 +35,6 @@ #include -#ifndef GCC -#endif - - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -- cgit From 5584c277cb3d7a198b9bd554e5a4dc92b8bea87d Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sun, 10 Oct 2010 19:46:49 -0500 Subject: merge vosremoval-diagnoses patch --- comphelper/source/eventattachermgr/eventattachermgr.cxx | 12 ++++++------ comphelper/source/xml/attributelist.cxx | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 02644f152974..86861303ccb8 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -34,7 +34,7 @@ #include #endif #include -#include +#include #include #include #include @@ -97,25 +97,25 @@ struct AttacherIndex_Impl #if 0 bool AttachedObject_Impl::operator<( const AttachedObject_Impl & r ) const { - VOS_ENSHURE( FALSE, "not implemented" ); + OSL_ENSURE( FALSE, "not implemented" ); return FALSE; return this < &r; } bool AttachedObject_Impl::operator==( const AttachedObject_Impl & r ) const { - VOS_ENSHURE( FALSE, "not implemented" ); + OSL_ENSURE( FALSE, "not implemented" ); return this == &r; } bool AttacherIndex_Impl::operator<( const AttacherIndex_Impl & r ) const { - VOS_ENSHURE( FALSE, "not implemented" ); + OSL_ENSURE( FALSE, "not implemented" ); return this < &r; } bool AttacherIndex_Impl::operator==( const AttacherIndex_Impl & r ) const { - VOS_ENSHURE( FALSE, "not implemented" ); + OSL_ENSURE( FALSE, "not implemented" ); return this == &r; } #endif @@ -1014,7 +1014,7 @@ void SAL_CALL ImplEventAttacherManager::read(const Reference< XObjectInputStream // Ganze richtig sein. Sonst ist etwas voellig daneben gegangen. if( nRealLen > nLen || nVersion == 1 ) { - VOS_ENSHURE( sal_False, "ImplEventAttacherManager::read(): Fatal Error, wrong object length" ); + OSL_ENSURE( sal_False, "ImplEventAttacherManager::read(): Fatal Error, wrong object length" ); } else { diff --git a/comphelper/source/xml/attributelist.cxx b/comphelper/source/xml/attributelist.cxx index bcf32b85011f..0ef75094f4ef 100644 --- a/comphelper/source/xml/attributelist.cxx +++ b/comphelper/source/xml/attributelist.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" #include -#include +#include #include @@ -135,7 +135,7 @@ void AttributeList::Clear() { m_pImpl->vecAttribute.clear(); - VOS_ENSURE( ! getLength(), "Length > 0 after AttributeList::Clear!"); + OSL_ENSURE( ! getLength(), "Length > 0 after AttributeList::Clear!"); } void AttributeList::RemoveAttribute( const OUString sName ) @@ -159,7 +159,7 @@ void AttributeList::SetAttributeList( const uno::Reference< ::com::sun::star::xm void AttributeList::AppendAttributeList( const uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &r ) { - VOS_ENSURE( r.is(), "r isn't!" ); + OSL_ENSURE( r.is(), "r isn't!" ); sal_Int32 nMax = r->getLength(); sal_Int32 nTotalSize = m_pImpl->vecAttribute.size() + nMax; @@ -172,7 +172,7 @@ void AttributeList::AppendAttributeList( const uno::Reference< ::com::sun::star: r->getValueByIndex( i ))); } - VOS_ENSURE( nTotalSize == getLength(), "nTotalSize != getLength()"); + OSL_ENSURE( nTotalSize == getLength(), "nTotalSize != getLength()"); } } // namespace comphelper -- cgit From 4905a190326a423b418a6b5531c5d990a5cc0082 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Thu, 14 Oct 2010 08:27:31 +0200 Subject: Add vim/emacs modelines to all source files Fixes #fdo30794 Based on bin/add-modelines script (originally posted in mail 1286706307.1871.1399280959@webmail.messagingengine.com) Signed-off-by: Sebastian Spaeth --- comphelper/inc/comphelper/ChainablePropertySet.hxx | 2 ++ comphelper/inc/comphelper/ChainablePropertySetInfo.hxx | 3 +++ comphelper/inc/comphelper/IdPropArrayHelper.hxx | 3 +++ comphelper/inc/comphelper/InlineContainer.hxx | 3 +++ comphelper/inc/comphelper/MasterPropertySet.hxx | 2 ++ comphelper/inc/comphelper/MasterPropertySetInfo.hxx | 3 +++ comphelper/inc/comphelper/PropertyInfoHash.hxx | 3 +++ comphelper/inc/comphelper/SelectionMultiplex.hxx | 2 ++ comphelper/inc/comphelper/SettingsHelper.hxx | 3 +++ comphelper/inc/comphelper/TypeGeneration.hxx | 3 +++ comphelper/inc/comphelper/accessiblecomponenthelper.hxx | 2 ++ comphelper/inc/comphelper/accessiblecontexthelper.hxx | 2 ++ comphelper/inc/comphelper/accessibleeventbuffer.hxx | 3 +++ comphelper/inc/comphelper/accessibleeventnotifier.hxx | 2 ++ comphelper/inc/comphelper/accessiblekeybindinghelper.hxx | 3 +++ comphelper/inc/comphelper/accessibleselectionhelper.hxx | 2 ++ comphelper/inc/comphelper/accessibletexthelper.hxx | 3 +++ comphelper/inc/comphelper/accessiblewrapper.hxx | 3 +++ comphelper/inc/comphelper/accimplaccess.hxx | 2 ++ comphelper/inc/comphelper/anytostring.hxx | 2 ++ comphelper/inc/comphelper/asyncnotification.hxx | 3 +++ comphelper/inc/comphelper/attributelist.hxx | 2 ++ comphelper/inc/comphelper/basicio.hxx | 2 ++ comphelper/inc/comphelper/broadcasthelper.hxx | 3 +++ comphelper/inc/comphelper/classids.hxx | 3 +++ comphelper/inc/comphelper/componentbase.hxx | 3 +++ comphelper/inc/comphelper/componentcontext.hxx | 2 ++ comphelper/inc/comphelper/componentfactory.hxx | 3 +++ comphelper/inc/comphelper/componentmodule.hxx | 2 ++ comphelper/inc/comphelper/composedprops.hxx | 2 ++ comphelper/inc/comphelper/configurationhelper.hxx | 3 +++ comphelper/inc/comphelper/container.hxx | 2 ++ comphelper/inc/comphelper/containermultiplexer.hxx | 2 ++ comphelper/inc/comphelper/docpasswordhelper.hxx | 2 ++ comphelper/inc/comphelper/docpasswordrequest.hxx | 2 ++ comphelper/inc/comphelper/documentconstants.hxx | 2 ++ comphelper/inc/comphelper/documentinfo.hxx | 3 +++ comphelper/inc/comphelper/embeddedobjectcontainer.hxx | 2 ++ comphelper/inc/comphelper/enumhelper.hxx | 2 ++ comphelper/inc/comphelper/eventattachermgr.hxx | 2 ++ comphelper/inc/comphelper/evtlistenerhlp.hxx | 3 +++ comphelper/inc/comphelper/evtmethodhelper.hxx | 3 +++ comphelper/inc/comphelper/extract.hxx | 3 +++ comphelper/inc/comphelper/genericpropertyset.hxx | 2 ++ comphelper/inc/comphelper/guarding.hxx | 2 ++ comphelper/inc/comphelper/ihwrapnofilter.hxx | 3 +++ comphelper/inc/comphelper/implbase_var.hxx | 2 ++ comphelper/inc/comphelper/implementationreference.hxx | 3 +++ comphelper/inc/comphelper/interaction.hxx | 2 ++ comphelper/inc/comphelper/legacysingletonfactory.hxx | 3 +++ comphelper/inc/comphelper/listenernotification.hxx | 2 ++ comphelper/inc/comphelper/locale.hxx | 3 +++ comphelper/inc/comphelper/logging.hxx | 3 +++ comphelper/inc/comphelper/make_shared_from_uno.hxx | 2 ++ comphelper/inc/comphelper/makesequence.hxx | 2 ++ comphelper/inc/comphelper/mediadescriptor.hxx | 3 +++ comphelper/inc/comphelper/mimeconfighelper.hxx | 2 ++ comphelper/inc/comphelper/namecontainer.hxx | 2 ++ comphelper/inc/comphelper/namedvaluecollection.hxx | 2 ++ comphelper/inc/comphelper/numberedcollection.hxx | 3 +++ comphelper/inc/comphelper/numbers.hxx | 2 ++ comphelper/inc/comphelper/officeresourcebundle.hxx | 2 ++ comphelper/inc/comphelper/ofopxmlhelper.hxx | 2 ++ comphelper/inc/comphelper/optional.hxx | 2 ++ comphelper/inc/comphelper/optionalvalue.hxx | 3 +++ comphelper/inc/comphelper/oslfile2streamwrap.hxx | 2 ++ comphelper/inc/comphelper/otransactedfilestream.hxx | 2 ++ comphelper/inc/comphelper/processfactory.hxx | 2 ++ comphelper/inc/comphelper/propagg.hxx | 2 ++ comphelper/inc/comphelper/proparrhlp.hxx | 2 ++ comphelper/inc/comphelper/property.hxx | 2 ++ comphelper/inc/comphelper/propertybag.hxx | 2 ++ comphelper/inc/comphelper/propertycontainer.hxx | 2 ++ comphelper/inc/comphelper/propertycontainerhelper.hxx | 3 +++ comphelper/inc/comphelper/propertysethelper.hxx | 2 ++ comphelper/inc/comphelper/propertysetinfo.hxx | 2 ++ comphelper/inc/comphelper/propertystatecontainer.hxx | 3 +++ comphelper/inc/comphelper/propmultiplex.hxx | 2 ++ comphelper/inc/comphelper/propstate.hxx | 2 ++ comphelper/inc/comphelper/proxyaggregation.hxx | 3 +++ comphelper/inc/comphelper/querydeep.hxx | 2 ++ comphelper/inc/comphelper/regpathhelper.hxx | 2 ++ comphelper/inc/comphelper/scopeguard.hxx | 2 ++ comphelper/inc/comphelper/seekableinput.hxx | 2 ++ comphelper/inc/comphelper/seqstream.hxx | 2 ++ comphelper/inc/comphelper/sequence.hxx | 2 ++ comphelper/inc/comphelper/sequenceashashmap.hxx | 3 +++ comphelper/inc/comphelper/sequenceasvector.hxx | 2 ++ comphelper/inc/comphelper/servicedecl.hxx | 2 ++ comphelper/inc/comphelper/servicehelper.hxx | 2 ++ comphelper/inc/comphelper/serviceinfohelper.hxx | 2 ++ comphelper/inc/comphelper/sharedmutex.hxx | 3 +++ comphelper/inc/comphelper/stillreadwriteinteraction.hxx | 3 +++ comphelper/inc/comphelper/stl_types.hxx | 2 ++ comphelper/inc/comphelper/stlunosequence.hxx | 3 +++ comphelper/inc/comphelper/storagehelper.hxx | 2 ++ comphelper/inc/comphelper/streamsection.hxx | 3 +++ comphelper/inc/comphelper/string.hxx | 3 +++ comphelper/inc/comphelper/synchronousdispatch.hxx | 2 ++ comphelper/inc/comphelper/types.hxx | 2 ++ comphelper/inc/comphelper/uieventslogger.hxx | 3 +++ comphelper/inc/comphelper/uno3.hxx | 2 ++ comphelper/inc/comphelper/unwrapargs.hxx | 2 ++ comphelper/inc/comphelper/weak.hxx | 2 ++ comphelper/inc/comphelper/weakbag.hxx | 3 +++ comphelper/inc/comphelper/weakeventlistener.hxx | 2 ++ comphelper/inc/pch/precompiled_comphelper.cxx | 2 ++ comphelper/inc/pch/precompiled_comphelper.hxx | 2 ++ comphelper/qa/test_string.cxx | 3 +++ comphelper/qa/test_weakbag.cxx | 3 +++ comphelper/source/compare/AnyCompareFactory.cxx | 3 +++ comphelper/source/container/IndexedPropertyValuesContainer.cxx | 3 +++ comphelper/source/container/NamedPropertyValuesContainer.cxx | 3 +++ comphelper/source/container/container.cxx | 2 ++ comphelper/source/container/containermultiplexer.cxx | 2 ++ comphelper/source/container/embeddedobjectcontainer.cxx | 3 +++ comphelper/source/container/enumerablemap.cxx | 3 +++ comphelper/source/container/enumhelper.cxx | 2 ++ comphelper/source/container/namecontainer.cxx | 3 +++ comphelper/source/eventattachermgr/eventattachermgr.cxx | 2 ++ comphelper/source/inc/comphelper_module.hxx | 3 +++ comphelper/source/misc/SelectionMultiplex.cxx | 2 ++ comphelper/source/misc/accessiblecomponenthelper.cxx | 2 ++ comphelper/source/misc/accessiblecontexthelper.cxx | 2 ++ comphelper/source/misc/accessibleeventbuffer.cxx | 3 +++ comphelper/source/misc/accessibleeventnotifier.cxx | 2 ++ comphelper/source/misc/accessiblekeybindinghelper.cxx | 3 +++ comphelper/source/misc/accessibleselectionhelper.cxx | 2 ++ comphelper/source/misc/accessibletexthelper.cxx | 3 +++ comphelper/source/misc/accessiblewrapper.cxx | 3 +++ comphelper/source/misc/accimplaccess.cxx | 2 ++ comphelper/source/misc/anytostring.cxx | 2 ++ comphelper/source/misc/asyncnotification.cxx | 2 ++ comphelper/source/misc/comphelper_module.cxx | 3 +++ comphelper/source/misc/comphelper_services.cxx | 3 +++ comphelper/source/misc/componentbase.cxx | 3 +++ comphelper/source/misc/componentcontext.cxx | 2 ++ comphelper/source/misc/componentmodule.cxx | 3 +++ comphelper/source/misc/configurationhelper.cxx | 3 +++ comphelper/source/misc/docpasswordhelper.cxx | 2 ++ comphelper/source/misc/docpasswordrequest.cxx | 2 ++ comphelper/source/misc/documentinfo.cxx | 3 +++ comphelper/source/misc/documentiologring.cxx | 3 +++ comphelper/source/misc/documentiologring.hxx | 2 ++ comphelper/source/misc/evtlistenerhlp.cxx | 2 ++ comphelper/source/misc/evtmethodhelper.cxx | 2 ++ comphelper/source/misc/ihwrapnofilter.cxx | 3 +++ comphelper/source/misc/instancelocker.cxx | 3 +++ comphelper/source/misc/instancelocker.hxx | 2 ++ comphelper/source/misc/interaction.cxx | 2 ++ comphelper/source/misc/legacysingletonfactory.cxx | 3 +++ comphelper/source/misc/listenernotification.cxx | 2 ++ comphelper/source/misc/locale.cxx | 2 ++ comphelper/source/misc/logging.cxx | 3 +++ comphelper/source/misc/mediadescriptor.cxx | 2 ++ comphelper/source/misc/mimeconfighelper.cxx | 2 ++ comphelper/source/misc/namedvaluecollection.cxx | 2 ++ comphelper/source/misc/numberedcollection.cxx | 3 +++ comphelper/source/misc/numbers.cxx | 2 ++ comphelper/source/misc/officeresourcebundle.cxx | 3 +++ comphelper/source/misc/officerestartmanager.cxx | 3 +++ comphelper/source/misc/officerestartmanager.hxx | 2 ++ comphelper/source/misc/proxyaggregation.cxx | 2 ++ comphelper/source/misc/querydeep.cxx | 2 ++ comphelper/source/misc/regpathhelper.cxx | 2 ++ comphelper/source/misc/scopeguard.cxx | 2 ++ comphelper/source/misc/sequence.cxx | 2 ++ comphelper/source/misc/sequenceashashmap.cxx | 3 +++ comphelper/source/misc/servicedecl.cxx | 2 ++ comphelper/source/misc/serviceinfohelper.cxx | 2 ++ comphelper/source/misc/sharedmutex.cxx | 3 +++ comphelper/source/misc/stillreadwriteinteraction.cxx | 3 +++ comphelper/source/misc/storagehelper.cxx | 2 ++ comphelper/source/misc/string.cxx | 3 +++ comphelper/source/misc/synchronousdispatch.cxx | 2 ++ comphelper/source/misc/types.cxx | 2 ++ comphelper/source/misc/uieventslogger.cxx | 3 +++ comphelper/source/misc/weak.cxx | 2 ++ comphelper/source/misc/weakeventlistener.cxx | 2 ++ comphelper/source/officeinstdir/officeinstallationdirectories.cxx | 3 +++ comphelper/source/officeinstdir/officeinstallationdirectories.hxx | 3 +++ comphelper/source/processfactory/componentfactory.cxx | 3 +++ comphelper/source/processfactory/processfactory.cxx | 2 ++ comphelper/source/property/ChainablePropertySet.cxx | 3 +++ comphelper/source/property/ChainablePropertySetInfo.cxx | 3 +++ comphelper/source/property/MasterPropertySet.cxx | 3 +++ comphelper/source/property/MasterPropertySetInfo.cxx | 3 +++ comphelper/source/property/TypeGeneration.cxx | 3 +++ comphelper/source/property/composedprops.cxx | 2 ++ comphelper/source/property/genericpropertyset.cxx | 2 ++ comphelper/source/property/opropertybag.cxx | 2 ++ comphelper/source/property/opropertybag.hxx | 3 +++ comphelper/source/property/propagg.cxx | 2 ++ comphelper/source/property/property.cxx | 2 ++ comphelper/source/property/propertybag.cxx | 2 ++ comphelper/source/property/propertycontainer.cxx | 2 ++ comphelper/source/property/propertycontainerhelper.cxx | 2 ++ comphelper/source/property/propertysethelper.cxx | 3 +++ comphelper/source/property/propertysetinfo.cxx | 3 +++ comphelper/source/property/propertystatecontainer.cxx | 2 ++ comphelper/source/property/propmultiplex.cxx | 2 ++ comphelper/source/property/propstate.cxx | 2 ++ comphelper/source/streaming/basicio.cxx | 2 ++ comphelper/source/streaming/memorystream.cxx | 3 +++ comphelper/source/streaming/oslfile2streamwrap.cxx | 2 ++ comphelper/source/streaming/otransactedfilestream.cxx | 2 ++ comphelper/source/streaming/seekableinput.cxx | 2 ++ comphelper/source/streaming/seqinputstreamserv.cxx | 3 +++ comphelper/source/streaming/seqoutputstreamserv.cxx | 3 +++ comphelper/source/streaming/seqstream.cxx | 3 +++ comphelper/source/streaming/streamsection.cxx | 2 ++ comphelper/source/xml/attributelist.cxx | 2 ++ comphelper/source/xml/ofopxmlhelper.cxx | 2 ++ comphelper/test/uno_iterators/uno_iterators.cxx | 3 +++ 214 files changed, 516 insertions(+) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/ChainablePropertySet.hxx b/comphelper/inc/comphelper/ChainablePropertySet.hxx index 0d36c2d10144..5d31b4c43444 100644 --- a/comphelper/inc/comphelper/ChainablePropertySet.hxx +++ b/comphelper/inc/comphelper/ChainablePropertySet.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -154,3 +155,4 @@ namespace comphelper } #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/ChainablePropertySetInfo.hxx b/comphelper/inc/comphelper/ChainablePropertySetInfo.hxx index 76d181e21e7b..c7e1e88f260e 100644 --- a/comphelper/inc/comphelper/ChainablePropertySetInfo.hxx +++ b/comphelper/inc/comphelper/ChainablePropertySetInfo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,5 @@ namespace comphelper }; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/IdPropArrayHelper.hxx b/comphelper/inc/comphelper/IdPropArrayHelper.hxx index 187c52fdc446..a624ba7b2f5a 100644 --- a/comphelper/inc/comphelper/IdPropArrayHelper.hxx +++ b/comphelper/inc/comphelper/IdPropArrayHelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -121,3 +122,5 @@ namespace comphelper } } #endif // COMPHELPER_IDPROPERTYARRAYUSAGEHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/InlineContainer.hxx b/comphelper/inc/comphelper/InlineContainer.hxx index a5d80e263aac..13ae8a5cabd0 100644 --- a/comphelper/inc/comphelper/InlineContainer.hxx +++ b/comphelper/inc/comphelper/InlineContainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -147,3 +148,5 @@ public: #endif // INCLUDED_COMPHELPER_INLINE_CONTAINER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/MasterPropertySet.hxx b/comphelper/inc/comphelper/MasterPropertySet.hxx index 170b4f72db3b..9eed2ef9eb28 100644 --- a/comphelper/inc/comphelper/MasterPropertySet.hxx +++ b/comphelper/inc/comphelper/MasterPropertySet.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -153,3 +154,4 @@ namespace comphelper } #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/MasterPropertySetInfo.hxx b/comphelper/inc/comphelper/MasterPropertySetInfo.hxx index 94a639fca755..c121289622b0 100644 --- a/comphelper/inc/comphelper/MasterPropertySetInfo.hxx +++ b/comphelper/inc/comphelper/MasterPropertySetInfo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,5 @@ namespace comphelper }; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/PropertyInfoHash.hxx b/comphelper/inc/comphelper/PropertyInfoHash.hxx index 106f40487f5b..d5b8ced95c5a 100644 --- a/comphelper/inc/comphelper/PropertyInfoHash.hxx +++ b/comphelper/inc/comphelper/PropertyInfoHash.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,3 +70,5 @@ typedef std::hash_map < ::rtl::OUString, ::rtl::OUStringHash, ::comphelper::eqFunc > PropertyDataHash; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/SelectionMultiplex.hxx b/comphelper/inc/comphelper/SelectionMultiplex.hxx index 633a86f4fdb8..d2ce6ba79d2c 100644 --- a/comphelper/inc/comphelper/SelectionMultiplex.hxx +++ b/comphelper/inc/comphelper/SelectionMultiplex.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -115,3 +116,4 @@ namespace comphelper #endif // INCLUDED_COMPHELPER_SELECTION_MULTIPLEX_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/SettingsHelper.hxx b/comphelper/inc/comphelper/SettingsHelper.hxx index fa954009c78e..035af6dc4f5c 100644 --- a/comphelper/inc/comphelper/SettingsHelper.hxx +++ b/comphelper/inc/comphelper/SettingsHelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -121,3 +122,5 @@ namespace comphelper } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/TypeGeneration.hxx b/comphelper/inc/comphelper/TypeGeneration.hxx index 6202e023a07b..13675c7d626f 100644 --- a/comphelper/inc/comphelper/TypeGeneration.hxx +++ b/comphelper/inc/comphelper/TypeGeneration.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -121,3 +122,5 @@ namespace comphelper CppuTypes eType, const com::sun::star::uno::Type*& pType ); } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/accessiblecomponenthelper.hxx b/comphelper/inc/comphelper/accessiblecomponenthelper.hxx index 68fef8eb1f9e..582d77a99283 100644 --- a/comphelper/inc/comphelper/accessiblecomponenthelper.hxx +++ b/comphelper/inc/comphelper/accessiblecomponenthelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -142,3 +143,4 @@ namespace comphelper #endif // COMPHELPER_ACCESSIBLE_COMPONENT_HELPER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/accessiblecontexthelper.hxx b/comphelper/inc/comphelper/accessiblecontexthelper.hxx index 32a83ca87219..310be9321a40 100644 --- a/comphelper/inc/comphelper/accessiblecontexthelper.hxx +++ b/comphelper/inc/comphelper/accessiblecontexthelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -374,3 +375,4 @@ namespace comphelper #endif // COMPHELPER_ACCESSIBLE_CONTEXT_HELPER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/accessibleeventbuffer.hxx b/comphelper/inc/comphelper/accessibleeventbuffer.hxx index 7f1107df50ad..3819651569d7 100644 --- a/comphelper/inc/comphelper/accessibleeventbuffer.hxx +++ b/comphelper/inc/comphelper/accessibleeventbuffer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -131,3 +132,5 @@ private: } #endif // INCLUDED_COMPHELPER_ACCESSIBLEEVENTBUFFER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/accessibleeventnotifier.hxx b/comphelper/inc/comphelper/accessibleeventnotifier.hxx index 7bf5ba76fa0c..c80b8ffccf14 100644 --- a/comphelper/inc/comphelper/accessibleeventnotifier.hxx +++ b/comphelper/inc/comphelper/accessibleeventnotifier.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -171,3 +172,4 @@ namespace comphelper #endif // COMPHELPER_ACCESSIBLE_EVENT_NOTIFIER +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/accessiblekeybindinghelper.hxx b/comphelper/inc/comphelper/accessiblekeybindinghelper.hxx index 4a7777727290..6ac3373893bc 100644 --- a/comphelper/inc/comphelper/accessiblekeybindinghelper.hxx +++ b/comphelper/inc/comphelper/accessiblekeybindinghelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -81,3 +82,5 @@ namespace comphelper //.............................................................................. #endif // COMPHELPER_ACCESSIBLE_KEYBINDING_HELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/accessibleselectionhelper.hxx b/comphelper/inc/comphelper/accessibleselectionhelper.hxx index 6a360010c86f..d91693b81185 100644 --- a/comphelper/inc/comphelper/accessibleselectionhelper.hxx +++ b/comphelper/inc/comphelper/accessibleselectionhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -130,3 +131,4 @@ namespace comphelper #endif // COMPHELPER_ACCESSIBLE_SELECTION_HELPER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/accessibletexthelper.hxx b/comphelper/inc/comphelper/accessibletexthelper.hxx index 85ad893fd4c4..4456c99b9bd1 100644 --- a/comphelper/inc/comphelper/accessibletexthelper.hxx +++ b/comphelper/inc/comphelper/accessibletexthelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -183,3 +184,5 @@ namespace comphelper // copyText // // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/accessiblewrapper.hxx b/comphelper/inc/comphelper/accessiblewrapper.hxx index 3157142e990f..14361cd4cb23 100644 --- a/comphelper/inc/comphelper/accessiblewrapper.hxx +++ b/comphelper/inc/comphelper/accessiblewrapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -409,3 +410,5 @@ namespace comphelper //............................................................................. #endif // COMPHELPER_ACCESSIBLE_WRAPPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/accimplaccess.hxx b/comphelper/inc/comphelper/accimplaccess.hxx index 8c0052ceae61..8ba9fe43867e 100644 --- a/comphelper/inc/comphelper/accimplaccess.hxx +++ b/comphelper/inc/comphelper/accimplaccess.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -164,3 +165,4 @@ namespace comphelper #endif // COMPHELPER_ACCIMPLACCESS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/anytostring.hxx b/comphelper/inc/comphelper/anytostring.hxx index 92c1685fb440..f1f91b2c6e00 100644 --- a/comphelper/inc/comphelper/anytostring.hxx +++ b/comphelper/inc/comphelper/anytostring.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,3 +49,4 @@ COMPHELPER_DLLPUBLIC ::rtl::OUString anyToString( ::com::sun::star::uno::Any con #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/asyncnotification.hxx b/comphelper/inc/comphelper/asyncnotification.hxx index fc4dfcd48dd9..8f660d18559b 100644 --- a/comphelper/inc/comphelper/asyncnotification.hxx +++ b/comphelper/inc/comphelper/asyncnotification.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -196,3 +197,5 @@ namespace comphelper //........................................................................ #endif // COMPHELPER_ASYNCNOTIFICATION_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/attributelist.hxx b/comphelper/inc/comphelper/attributelist.hxx index f408f6496fb9..d34b32f00ac6 100644 --- a/comphelper/inc/comphelper/attributelist.hxx +++ b/comphelper/inc/comphelper/attributelist.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,4 @@ public: #endif // _COMPHELPER_ATTRIBUTE_LIST_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/basicio.hxx b/comphelper/inc/comphelper/basicio.hxx index 13ec58954d7d..7604b1a7029d 100644 --- a/comphelper/inc/comphelper/basicio.hxx +++ b/comphelper/inc/comphelper/basicio.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,3 +105,4 @@ const staruno::Reference& operator << (const starun #endif // _COMPHELPER_BASIC_IO_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/broadcasthelper.hxx b/comphelper/inc/comphelper/broadcasthelper.hxx index 9e3f4816238c..aa61db5d3ff8 100644 --- a/comphelper/inc/comphelper/broadcasthelper.hxx +++ b/comphelper/inc/comphelper/broadcasthelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,5 @@ namespace comphelper }; } #endif // _COMPHELPER_BROADCASTHELPER_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/classids.hxx b/comphelper/inc/comphelper/classids.hxx index fddd7c5ad8c1..dcfe50248d20 100644 --- a/comphelper/inc/comphelper/classids.hxx +++ b/comphelper/inc/comphelper/classids.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -572,3 +573,5 @@ #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/componentbase.hxx b/comphelper/inc/comphelper/componentbase.hxx index 12d5fdb64355..db3e558904b9 100644 --- a/comphelper/inc/comphelper/componentbase.hxx +++ b/comphelper/inc/comphelper/componentbase.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -159,3 +160,5 @@ namespace comphelper //........................................................................ #endif // COMPHELPER_COMPONENTBASE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/componentcontext.hxx b/comphelper/inc/comphelper/componentcontext.hxx index c2f68aab96c0..410d2390619c 100644 --- a/comphelper/inc/comphelper/componentcontext.hxx +++ b/comphelper/inc/comphelper/componentcontext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -250,3 +251,4 @@ namespace comphelper #endif // COMPHELPER_COMPONENTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/componentfactory.hxx b/comphelper/inc/comphelper/componentfactory.hxx index c23fbbca80d1..2da7de3f3c82 100644 --- a/comphelper/inc/comphelper/componentfactory.hxx +++ b/comphelper/inc/comphelper/componentfactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -116,3 +117,5 @@ COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XI } // namespace comphelper #endif // _COMPHELPER_COMPONENTFACTORY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/componentmodule.hxx b/comphelper/inc/comphelper/componentmodule.hxx index 660a685d0fd3..d117cc75bb0c 100644 --- a/comphelper/inc/comphelper/componentmodule.hxx +++ b/comphelper/inc/comphelper/componentmodule.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -439,3 +440,4 @@ namespace comphelper #endif // COMPHELPER_INC_COMPHELPER_COMPONENTMODULE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/composedprops.hxx b/comphelper/inc/comphelper/composedprops.hxx index 93dab60cde13..74a9cf30acd1 100644 --- a/comphelper/inc/comphelper/composedprops.hxx +++ b/comphelper/inc/comphelper/composedprops.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -125,3 +126,4 @@ namespace comphelper #endif // _COMPHELPER_COMPOSEDPROPS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/configurationhelper.hxx b/comphelper/inc/comphelper/configurationhelper.hxx index 52603cd78b06..3800cea7a0ba 100644 --- a/comphelper/inc/comphelper/configurationhelper.hxx +++ b/comphelper/inc/comphelper/configurationhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -259,3 +260,5 @@ class COMPHELPER_DLLPUBLIC ConfigurationHelper #undef css // important! #endif // _COMPHELPER_CONFIGURATIONHELPER_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/container.hxx b/comphelper/inc/comphelper/container.hxx index d509cada5603..f0466fe3ae5e 100644 --- a/comphelper/inc/comphelper/container.hxx +++ b/comphelper/inc/comphelper/container.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -83,3 +84,4 @@ protected: #endif // _COMPHELPER_CONTAINER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/containermultiplexer.hxx b/comphelper/inc/comphelper/containermultiplexer.hxx index f623f3040cad..68990ec694f6 100644 --- a/comphelper/inc/comphelper/containermultiplexer.hxx +++ b/comphelper/inc/comphelper/containermultiplexer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -113,3 +114,4 @@ namespace comphelper #endif // _COMPHELPER_CONTAINERMULTIPLEXER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/docpasswordhelper.hxx b/comphelper/inc/comphelper/docpasswordhelper.hxx index dbbb68372a07..4845b0ccd04b 100644 --- a/comphelper/inc/comphelper/docpasswordhelper.hxx +++ b/comphelper/inc/comphelper/docpasswordhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -318,3 +319,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/docpasswordrequest.hxx b/comphelper/inc/comphelper/docpasswordrequest.hxx index cf04d22c7a6d..569160cc1809 100644 --- a/comphelper/inc/comphelper/docpasswordrequest.hxx +++ b/comphelper/inc/comphelper/docpasswordrequest.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,3 +102,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/documentconstants.hxx b/comphelper/inc/comphelper/documentconstants.hxx index b78150586e28..01a315f984ac 100644 --- a/comphelper/inc/comphelper/documentconstants.hxx +++ b/comphelper/inc/comphelper/documentconstants.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,4 @@ #define ODFVER_012_TEXT ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ODFVER_012_TEXT_ASCII ) ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/documentinfo.hxx b/comphelper/inc/comphelper/documentinfo.hxx index c791b8d26aab..baa06e7d7d4b 100644 --- a/comphelper/inc/comphelper/documentinfo.hxx +++ b/comphelper/inc/comphelper/documentinfo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,3 +58,5 @@ namespace comphelper { //........................................................................ #endif // COMPHELPER_DOCUMENTINFO_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/embeddedobjectcontainer.hxx b/comphelper/inc/comphelper/embeddedobjectcontainer.hxx index c1382557c52a..8069534b1e3a 100644 --- a/comphelper/inc/comphelper/embeddedobjectcontainer.hxx +++ b/comphelper/inc/comphelper/embeddedobjectcontainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -186,3 +187,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/enumhelper.hxx b/comphelper/inc/comphelper/enumhelper.hxx index 7272d9e91d20..fbf42d0d5673 100644 --- a/comphelper/inc/comphelper/enumhelper.hxx +++ b/comphelper/inc/comphelper/enumhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -148,3 +149,4 @@ public: +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/eventattachermgr.hxx b/comphelper/inc/comphelper/eventattachermgr.hxx index cae67a71d4d0..f534ba26dbe5 100644 --- a/comphelper/inc/comphelper/eventattachermgr.hxx +++ b/comphelper/inc/comphelper/eventattachermgr.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,4 @@ createEventAttacherManager( #endif // _COMPHELPER_EVENTATTACHERMGR_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/evtlistenerhlp.hxx b/comphelper/inc/comphelper/evtlistenerhlp.hxx index 422b44abe7a0..8abf94b915ce 100644 --- a/comphelper/inc/comphelper/evtlistenerhlp.hxx +++ b/comphelper/inc/comphelper/evtlistenerhlp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,3 +55,5 @@ namespace comphelper } // namespace comphelper //........................................................................ #endif // COMPHELPER_EVENTLISTENERHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/evtmethodhelper.hxx b/comphelper/inc/comphelper/evtmethodhelper.hxx index 8e34b0e00149..c8c9ec9eb40f 100644 --- a/comphelper/inc/comphelper/evtmethodhelper.hxx +++ b/comphelper/inc/comphelper/evtmethodhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,3 +40,5 @@ namespace comphelper } // namespace comphelper //........................................................................ #endif // COMPHELPER_EVENTMEHODHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/extract.hxx b/comphelper/inc/comphelper/extract.hxx index b44391c17911..4fcaab595b96 100644 --- a/comphelper/inc/comphelper/extract.hxx +++ b/comphelper/inc/comphelper/extract.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -162,3 +163,5 @@ inline ::com::sun::star::uno::Any SAL_CALL bool2any( sal_Bool bBool ) } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/genericpropertyset.hxx b/comphelper/inc/comphelper/genericpropertyset.hxx index 6364dea5f020..a5b3608fc964 100644 --- a/comphelper/inc/comphelper/genericpropertyset.hxx +++ b/comphelper/inc/comphelper/genericpropertyset.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,3 +40,4 @@ namespace comphelper #endif // _COMPHELPER_GENERICPROPERTYSET_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/guarding.hxx b/comphelper/inc/comphelper/guarding.hxx index 66de00738601..7593b4846cd6 100644 --- a/comphelper/inc/comphelper/guarding.hxx +++ b/comphelper/inc/comphelper/guarding.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,4 @@ typedef ORelease< ::osl::Mutex > MutexRelease; #endif // _COMPHELPER_GUARDING_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/ihwrapnofilter.hxx b/comphelper/inc/comphelper/ihwrapnofilter.hxx index 32176caa363c..773946cd9af1 100644 --- a/comphelper/inc/comphelper/ihwrapnofilter.hxx +++ b/comphelper/inc/comphelper/ihwrapnofilter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,5 @@ namespace comphelper { }; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/implbase_var.hxx b/comphelper/inc/comphelper/implbase_var.hxx index 97d360f853a6..2499ce94f625 100644 --- a/comphelper/inc/comphelper/implbase_var.hxx +++ b/comphelper/inc/comphelper/implbase_var.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -401,3 +402,4 @@ public: #undef COMPHELPER_IMPLBASE_MAX_CTOR_ARGS #undef COMPHELPER_IMPLBASE_INTERFACE_NUMBER +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/implementationreference.hxx b/comphelper/inc/comphelper/implementationreference.hxx index 806cdc86f129..dff242b78307 100644 --- a/comphelper/inc/comphelper/implementationreference.hxx +++ b/comphelper/inc/comphelper/implementationreference.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -271,3 +272,5 @@ namespace comphelper } #endif // _COMPHELPER_IMPLEMENTATIONREFERENCE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/interaction.hxx b/comphelper/inc/comphelper/interaction.hxx index 1ae1dda61ec4..236738b9c43c 100644 --- a/comphelper/inc/comphelper/interaction.hxx +++ b/comphelper/inc/comphelper/interaction.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -168,3 +169,4 @@ namespace comphelper #endif // _COMPHELPER_INTERACTION_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/legacysingletonfactory.hxx b/comphelper/inc/comphelper/legacysingletonfactory.hxx index 7180a66403bb..d40f828d1384 100644 --- a/comphelper/inc/comphelper/legacysingletonfactory.hxx +++ b/comphelper/inc/comphelper/legacysingletonfactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,5 @@ namespace comphelper //........................................................................ #endif // COMPHELPER_LEGACYSINGLETONFACTORY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/listenernotification.hxx b/comphelper/inc/comphelper/listenernotification.hxx index f4bf2f916859..98143f1d3242 100644 --- a/comphelper/inc/comphelper/listenernotification.hxx +++ b/comphelper/inc/comphelper/listenernotification.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -306,3 +307,4 @@ namespace comphelper #endif // COMPHELPER_INC_COMPHELPER_LISTENERNOTIFICATION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/locale.hxx b/comphelper/inc/comphelper/locale.hxx index 3fd8a15aa163..317d74ae740f 100644 --- a/comphelper/inc/comphelper/locale.hxx +++ b/comphelper/inc/comphelper/locale.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -441,3 +442,5 @@ class COMPHELPER_DLLPUBLIC Locale } // namespace salhelper #endif // _COMPHELPER_LOCALE_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/logging.hxx b/comphelper/inc/comphelper/logging.hxx index 20f9302cc853..e332f0541594 100644 --- a/comphelper/inc/comphelper/logging.hxx +++ b/comphelper/inc/comphelper/logging.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -792,3 +793,5 @@ namespace comphelper //........................................................................ #endif // COMPHELPER_LOGGING_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/make_shared_from_uno.hxx b/comphelper/inc/comphelper/make_shared_from_uno.hxx index 3acd4ec13dfe..4cbb3a17c362 100644 --- a/comphelper/inc/comphelper/make_shared_from_uno.hxx +++ b/comphelper/inc/comphelper/make_shared_from_uno.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,4 @@ inline ::boost::shared_ptr make_shared_from_UNO( T * p ) #endif // ! defined(INCLUDED_COMPHELPER_MAKE_SHARED_FROM_UNO_HXX) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/makesequence.hxx b/comphelper/inc/comphelper/makesequence.hxx index 4273356bf9aa..d4e724309e94 100644 --- a/comphelper/inc/comphelper/makesequence.hxx +++ b/comphelper/inc/comphelper/makesequence.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -85,3 +86,4 @@ BOOST_PP_REPEAT_FROM_TO(2, BOOST_PP_ADD(COMPHELPER_MAKESEQUENCE_MAX_ARGS, 1), #endif // ! defined(COMPHELPER_MAKESEQUENCE_HXX_INCLUDED) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/mediadescriptor.hxx b/comphelper/inc/comphelper/mediadescriptor.hxx index 7d2333045390..729850f82a10 100644 --- a/comphelper/inc/comphelper/mediadescriptor.hxx +++ b/comphelper/inc/comphelper/mediadescriptor.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -338,3 +339,5 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap } // namespace comphelper #endif // _COMPHELPER_MEDIADESCRIPTOR_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/mimeconfighelper.hxx b/comphelper/inc/comphelper/mimeconfighelper.hxx index 5e02d4761cb1..613d3b591783 100644 --- a/comphelper/inc/comphelper/mimeconfighelper.hxx +++ b/comphelper/inc/comphelper/mimeconfighelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -131,3 +132,4 @@ public: #endif // _COMPHELPER_MIMECONFIGHELPER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/namecontainer.hxx b/comphelper/inc/comphelper/namecontainer.hxx index 30d2326794b0..b251c553efd2 100644 --- a/comphelper/inc/comphelper/namecontainer.hxx +++ b/comphelper/inc/comphelper/namecontainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,3 +41,4 @@ namespace comphelper #endif // _COMPHELPER_NAMECONTAINER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/namedvaluecollection.hxx b/comphelper/inc/comphelper/namedvaluecollection.hxx index 72cd0e7cdfbe..04f68bc102d2 100644 --- a/comphelper/inc/comphelper/namedvaluecollection.hxx +++ b/comphelper/inc/comphelper/namedvaluecollection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -353,3 +354,4 @@ namespace comphelper #endif // COMPHELPER_NAMEDVALUECOLLECTION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/numberedcollection.hxx b/comphelper/inc/comphelper/numberedcollection.hxx index 03bc1e0b78ed..a955c9624518 100644 --- a/comphelper/inc/comphelper/numberedcollection.hxx +++ b/comphelper/inc/comphelper/numberedcollection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -196,3 +197,5 @@ class COMPHELPER_DLLPUBLIC NumberedCollection : private ::cppu::BaseMutex } // namespace comphelper #endif // _COMPHELPER_NUMBEREDCOLLECTION_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/numbers.hxx b/comphelper/inc/comphelper/numbers.hxx index ef5bbe73931c..179889c7b720 100644 --- a/comphelper/inc/comphelper/numbers.hxx +++ b/comphelper/inc/comphelper/numbers.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,4 @@ namespace comphelper #endif // _COMPHELPER_NUMBERS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/officeresourcebundle.hxx b/comphelper/inc/comphelper/officeresourcebundle.hxx index d45209da9374..345790e733f2 100644 --- a/comphelper/inc/comphelper/officeresourcebundle.hxx +++ b/comphelper/inc/comphelper/officeresourcebundle.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -114,3 +115,4 @@ namespace comphelper #endif // COMPHELPER_OFFICE_RESOURCE_BUNDLE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/ofopxmlhelper.hxx b/comphelper/inc/comphelper/ofopxmlhelper.hxx index 7dde918b5b8a..8043ea818afd 100644 --- a/comphelper/inc/comphelper/ofopxmlhelper.hxx +++ b/comphelper/inc/comphelper/ofopxmlhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -135,3 +136,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/optional.hxx b/comphelper/inc/comphelper/optional.hxx index 790e117622fd..2ffec9b55b02 100644 --- a/comphelper/inc/comphelper/optional.hxx +++ b/comphelper/inc/comphelper/optional.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,4 @@ inline ::com::sun::star::beans::Optional makeOptional( bool v ) #endif // ! defined(INCLUDED_COMPHELPER_OPTIONAL_HXX) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/optionalvalue.hxx b/comphelper/inc/comphelper/optionalvalue.hxx index f63e1cde51aa..3bc5cdc7a19c 100644 --- a/comphelper/inc/comphelper/optionalvalue.hxx +++ b/comphelper/inc/comphelper/optionalvalue.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -185,3 +186,5 @@ namespace comphelper } #endif /* _COMPHELPER_OPTIONALVALUE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/oslfile2streamwrap.hxx b/comphelper/inc/comphelper/oslfile2streamwrap.hxx index 1a0a7cc55e04..e4fad24c0db2 100644 --- a/comphelper/inc/comphelper/oslfile2streamwrap.hxx +++ b/comphelper/inc/comphelper/oslfile2streamwrap.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -106,3 +107,4 @@ public: #endif // _COMPHELPER_STREAM_OSLFILEWRAPPER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/otransactedfilestream.hxx b/comphelper/inc/comphelper/otransactedfilestream.hxx index b4533b5d9694..248aa22f02eb 100644 --- a/comphelper/inc/comphelper/otransactedfilestream.hxx +++ b/comphelper/inc/comphelper/otransactedfilestream.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,4 @@ public: #endif //_COMPHELPER_OTRANSACTEDFILESTREAM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/processfactory.hxx b/comphelper/inc/comphelper/processfactory.hxx index aeaaf498c918..b20d7302241d 100644 --- a/comphelper/inc/comphelper/processfactory.hxx +++ b/comphelper/inc/comphelper/processfactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,4 @@ comphelper_getProcessComponentContext(); #endif // _COMPHELPER_PROCESSFACTORY_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/propagg.hxx b/comphelper/inc/comphelper/propagg.hxx index b82f737d534b..6286e9d79088 100644 --- a/comphelper/inc/comphelper/propagg.hxx +++ b/comphelper/inc/comphelper/propagg.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -327,3 +328,4 @@ protected: #endif // _COMPHELPER_PROPERTY_AGGREGATION_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/proparrhlp.hxx b/comphelper/inc/comphelper/proparrhlp.hxx index 193f7e100c4a..6af317420327 100644 --- a/comphelper/inc/comphelper/proparrhlp.hxx +++ b/comphelper/inc/comphelper/proparrhlp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -180,3 +181,4 @@ template inline #endif // _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/property.hxx b/comphelper/inc/comphelper/property.hxx index 5631cf5670f2..2cb9c662ee80 100644 --- a/comphelper/inc/comphelper/property.hxx +++ b/comphelper/inc/comphelper/property.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -236,3 +237,4 @@ COMPHELPER_DLLPUBLIC sal_Bool tryPropertyValue(staruno::Any& _rConvertedValue, s #endif // _COMPHELPER_PROPERTY_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/propertybag.hxx b/comphelper/inc/comphelper/propertybag.hxx index cf7e99768e44..74aa87d71517 100644 --- a/comphelper/inc/comphelper/propertybag.hxx +++ b/comphelper/inc/comphelper/propertybag.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -235,3 +236,4 @@ namespace comphelper #endif // COMPHELPER_PROPERTYBAG_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/propertycontainer.hxx b/comphelper/inc/comphelper/propertycontainer.hxx index 845ebd05e484..49961e559ea7 100644 --- a/comphelper/inc/comphelper/propertycontainer.hxx +++ b/comphelper/inc/comphelper/propertycontainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,3 +96,4 @@ protected: #endif // _COMPHELPER_PROPERTYCONTAINER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/propertycontainerhelper.hxx b/comphelper/inc/comphelper/propertycontainerhelper.hxx index 82848203699c..42bfe1f2de8e 100644 --- a/comphelper/inc/comphelper/propertycontainerhelper.hxx +++ b/comphelper/inc/comphelper/propertycontainerhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -216,3 +217,5 @@ private: //......................................................................... #endif // COMPHELPER_PROPERTYCONTAINERHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/propertysethelper.hxx b/comphelper/inc/comphelper/propertysethelper.hxx index 505a03c1b4ec..ea6204d6795f 100644 --- a/comphelper/inc/comphelper/propertysethelper.hxx +++ b/comphelper/inc/comphelper/propertysethelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -100,3 +101,4 @@ public: #endif // _UTL_PROPERTYSETHELPER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/propertysetinfo.hxx b/comphelper/inc/comphelper/propertysetinfo.hxx index 06ad4f4eecc3..80a200a79b3a 100644 --- a/comphelper/inc/comphelper/propertysetinfo.hxx +++ b/comphelper/inc/comphelper/propertysetinfo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,3 +102,4 @@ public: #endif // _UTL_PROPERTSETINFO_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/propertystatecontainer.hxx b/comphelper/inc/comphelper/propertystatecontainer.hxx index dde26ddf90cf..443c52fdf753 100644 --- a/comphelper/inc/comphelper/propertystatecontainer.hxx +++ b/comphelper/inc/comphelper/propertystatecontainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -118,3 +119,5 @@ namespace comphelper //......................................................................... #endif // COMPHELPER_PROPERTYSTATECONTAINER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/propmultiplex.hxx b/comphelper/inc/comphelper/propmultiplex.hxx index 4d640442a9ae..3c82dee247dd 100644 --- a/comphelper/inc/comphelper/propmultiplex.hxx +++ b/comphelper/inc/comphelper/propmultiplex.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -114,3 +115,4 @@ namespace comphelper #endif // _COMPHELPER_PROPERTY_MULTIPLEX_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/propstate.hxx b/comphelper/inc/comphelper/propstate.hxx index b0c75147c95c..2c8f06f4118a 100644 --- a/comphelper/inc/comphelper/propstate.hxx +++ b/comphelper/inc/comphelper/propstate.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -110,3 +111,4 @@ namespace comphelper #endif // _COMPHELPER_PROPERTY_STATE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/proxyaggregation.hxx b/comphelper/inc/comphelper/proxyaggregation.hxx index c4c9281da8f2..490569844a81 100644 --- a/comphelper/inc/comphelper/proxyaggregation.hxx +++ b/comphelper/inc/comphelper/proxyaggregation.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -227,3 +228,5 @@ namespace comphelper #endif // COMPHELPER_PROXY_AGGREGATION + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/querydeep.hxx b/comphelper/inc/comphelper/querydeep.hxx index 4115412d8d6c..af6d5ae6306f 100644 --- a/comphelper/inc/comphelper/querydeep.hxx +++ b/comphelper/inc/comphelper/querydeep.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -482,3 +483,4 @@ inline ::com::sun::star::uno::Any queryDeepInterface( #endif // _COMPHELPER_QUERYDEEPINTERFACE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/regpathhelper.hxx b/comphelper/inc/comphelper/regpathhelper.hxx index 431cdfb930a6..27bbcb84287a 100644 --- a/comphelper/inc/comphelper/regpathhelper.hxx +++ b/comphelper/inc/comphelper/regpathhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,3 +70,4 @@ namespace comphelper #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/scopeguard.hxx b/comphelper/inc/comphelper/scopeguard.hxx index 4841a564ae61..1c831c08ff20 100644 --- a/comphelper/inc/comphelper/scopeguard.hxx +++ b/comphelper/inc/comphelper/scopeguard.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,4 @@ private: #endif // ! defined(INCLUDED_COMPHELPER_SCOPEGUARD_HXX) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/seekableinput.hxx b/comphelper/inc/comphelper/seekableinput.hxx index 5fc7ab5b369f..455ed7bb183c 100644 --- a/comphelper/inc/comphelper/seekableinput.hxx +++ b/comphelper/inc/comphelper/seekableinput.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/seqstream.hxx b/comphelper/inc/comphelper/seqstream.hxx index dcde150953f6..82c335616926 100644 --- a/comphelper/inc/comphelper/seqstream.hxx +++ b/comphelper/inc/comphelper/seqstream.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -144,3 +145,4 @@ public: #endif //_COMPHELPER_SEQSTREAM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/sequence.hxx b/comphelper/inc/comphelper/sequence.hxx index 5e9c5dc49040..17f2d7cab6bb 100644 --- a/comphelper/inc/comphelper/sequence.hxx +++ b/comphelper/inc/comphelper/sequence.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -387,3 +388,4 @@ namespace comphelper #endif // _COMPHELPER_SEQUENCE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/sequenceashashmap.hxx b/comphelper/inc/comphelper/sequenceashashmap.hxx index 05d4f706adf2..0046f32bd100 100644 --- a/comphelper/inc/comphelper/sequenceashashmap.hxx +++ b/comphelper/inc/comphelper/sequenceashashmap.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -380,3 +381,5 @@ class COMPHELPER_DLLPUBLIC SequenceAsHashMap : public SequenceAsHashMapBase } // namespace comphelper #endif // _COMPHELPER_SEQUENCEASHASHMAP_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/sequenceasvector.hxx b/comphelper/inc/comphelper/sequenceasvector.hxx index f83d68a52eed..c31843d8ce6b 100644 --- a/comphelper/inc/comphelper/sequenceasvector.hxx +++ b/comphelper/inc/comphelper/sequenceasvector.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -243,3 +244,4 @@ class SequenceAsVector : public ::std::vector< TElementType > #endif // _COMPHELPER_SEQUENCEASVECTOR_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/servicedecl.hxx b/comphelper/inc/comphelper/servicedecl.hxx index 5d11d41831f5..77c56eafb417 100644 --- a/comphelper/inc/comphelper/servicedecl.hxx +++ b/comphelper/inc/comphelper/servicedecl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -457,3 +458,4 @@ extern "C" \ #endif // ! defined(COMPHELPER_SERVICEDECL_HXX_INCLUDED) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/servicehelper.hxx b/comphelper/inc/comphelper/servicehelper.hxx index e856ec9f64b5..e691ea2bd76c 100644 --- a/comphelper/inc/comphelper/servicehelper.hxx +++ b/comphelper/inc/comphelper/servicehelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,4 @@ sal_Int64 SAL_CALL classname::getSomething( const ::com::sun::star::uno::Sequenc #endif // _COMPHELPER_SERVICEHELPER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/serviceinfohelper.hxx b/comphelper/inc/comphelper/serviceinfohelper.hxx index 87e450260b51..859f35cc707f 100644 --- a/comphelper/inc/comphelper/serviceinfohelper.hxx +++ b/comphelper/inc/comphelper/serviceinfohelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/sharedmutex.hxx b/comphelper/inc/comphelper/sharedmutex.hxx index c57c241f1cbb..a1984121fc50 100644 --- a/comphelper/inc/comphelper/sharedmutex.hxx +++ b/comphelper/inc/comphelper/sharedmutex.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -89,3 +90,5 @@ namespace comphelper //........................................................................ #endif // COMPHELPER_SHAREDMUTEX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/stillreadwriteinteraction.hxx b/comphelper/inc/comphelper/stillreadwriteinteraction.hxx index e43534dc8ba2..5ad07f201f1a 100644 --- a/comphelper/inc/comphelper/stillreadwriteinteraction.hxx +++ b/comphelper/inc/comphelper/stillreadwriteinteraction.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,3 +66,5 @@ private: }; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/stl_types.hxx b/comphelper/inc/comphelper/stl_types.hxx index 7a8a56f5f238..89f0e023f0c1 100644 --- a/comphelper/inc/comphelper/stl_types.hxx +++ b/comphelper/inc/comphelper/stl_types.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -280,3 +281,4 @@ OutputIter intersperse( #endif // _COMPHELPER_STLTYPES_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/stlunosequence.hxx b/comphelper/inc/comphelper/stlunosequence.hxx index d9757bbd9b51..454de6400c32 100644 --- a/comphelper/inc/comphelper/stlunosequence.hxx +++ b/comphelper/inc/comphelper/stlunosequence.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -84,3 +85,5 @@ namespace comphelper { return rSeq.getConstArray() + rSeq.getLength(); } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/storagehelper.hxx b/comphelper/inc/comphelper/storagehelper.hxx index b7e5704c4d68..b8efa00b0d92 100644 --- a/comphelper/inc/comphelper/storagehelper.hxx +++ b/comphelper/inc/comphelper/storagehelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -169,3 +170,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/streamsection.hxx b/comphelper/inc/comphelper/streamsection.hxx index e3b8d4ebfe8f..fb1758135e9e 100644 --- a/comphelper/inc/comphelper/streamsection.hxx +++ b/comphelper/inc/comphelper/streamsection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -86,3 +87,5 @@ public: } // namespace comphelper #endif // _COMPHELPER_STREAMSECTION_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index 8c262edaddfe..2ffbdba09735 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -133,3 +134,5 @@ COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/synchronousdispatch.hxx b/comphelper/inc/comphelper/synchronousdispatch.hxx index b215ec2b990b..4bd0375086b6 100644 --- a/comphelper/inc/comphelper/synchronousdispatch.hxx +++ b/comphelper/inc/comphelper/synchronousdispatch.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,4 @@ namespace comphelper #endif // _COMPHELPER_SYNCHRONOUSDISPATCH_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/types.hxx b/comphelper/inc/comphelper/types.hxx index 8d5b9f744451..46020e64dd29 100644 --- a/comphelper/inc/comphelper/types.hxx +++ b/comphelper/inc/comphelper/types.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -178,3 +179,4 @@ namespace comphelper #endif // _COMPHELPER_TYPES_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/uieventslogger.hxx b/comphelper/inc/comphelper/uieventslogger.hxx index 5cf270751dd1..40e9a68ad1cf 100644 --- a/comphelper/inc/comphelper/uieventslogger.hxx +++ b/comphelper/inc/comphelper/uieventslogger.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -55,3 +56,5 @@ namespace comphelper }; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/uno3.hxx b/comphelper/inc/comphelper/uno3.hxx index cd6196e50e53..617c200d3fd5 100644 --- a/comphelper/inc/comphelper/uno3.hxx +++ b/comphelper/inc/comphelper/uno3.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -300,3 +301,4 @@ namespace comphelper #endif // _COMPHELPER_UNO3_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/unwrapargs.hxx b/comphelper/inc/comphelper/unwrapargs.hxx index 652187f9139f..94dfb2263f2d 100644 --- a/comphelper/inc/comphelper/unwrapargs.hxx +++ b/comphelper/inc/comphelper/unwrapargs.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -148,3 +149,4 @@ BOOST_PP_REPEAT(COMPHELPER_UNWRAPARGS_MAX_ARGS, COMPHELPER_UNWRAPARGS_make, ~) #endif // ! defined(COMPHELPER_UNWRAPARGS_HXX_INCLUDED) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/weak.hxx b/comphelper/inc/comphelper/weak.hxx index b23b673e9b1c..5f3f8b14432a 100644 --- a/comphelper/inc/comphelper/weak.hxx +++ b/comphelper/inc/comphelper/weak.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/weakbag.hxx b/comphelper/inc/comphelper/weakbag.hxx index 8b2fa1c4449d..b1c443338e06 100644 --- a/comphelper/inc/comphelper/weakbag.hxx +++ b/comphelper/inc/comphelper/weakbag.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -90,3 +91,5 @@ private: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/weakeventlistener.hxx b/comphelper/inc/comphelper/weakeventlistener.hxx index 930f19f3a40f..c4cc42bc4052 100644 --- a/comphelper/inc/comphelper/weakeventlistener.hxx +++ b/comphelper/inc/comphelper/weakeventlistener.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,3 +188,4 @@ namespace comphelper #endif// COMPHELPER_WEAKEVENTLISTENER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/pch/precompiled_comphelper.cxx b/comphelper/inc/pch/precompiled_comphelper.cxx index 2936d22924b7..ad6e1ab9b5ac 100644 --- a/comphelper/inc/pch/precompiled_comphelper.cxx +++ b/comphelper/inc/pch/precompiled_comphelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,3 +28,4 @@ #include "precompiled_comphelper.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/pch/precompiled_comphelper.hxx b/comphelper/inc/pch/precompiled_comphelper.hxx index a3679864b3b1..7fcb7d048fe2 100644 --- a/comphelper/inc/pch/precompiled_comphelper.hxx +++ b/comphelper/inc/pch/precompiled_comphelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,3 +31,4 @@ #ifdef PRECOMPILED_HEADERS #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx index 648b7a204340..9e355a5c9528 100644 --- a/comphelper/qa/test_string.cxx +++ b/comphelper/qa/test_string.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,3 +81,5 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); } NOADDITIONAL; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/qa/test_weakbag.cxx b/comphelper/qa/test_weakbag.cxx index 3827e393b58d..9c60f11dd925 100644 --- a/comphelper/qa/test_weakbag.cxx +++ b/comphelper/qa/test_weakbag.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,3 +69,5 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); } NOADDITIONAL; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx index 136bff63f69b..04152c8156cf 100644 --- a/comphelper/source/compare/AnyCompareFactory.cxx +++ b/comphelper/source/compare/AnyCompareFactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -189,3 +190,5 @@ void createRegistryInfo_AnyCompareFactory() { static ::comphelper::module::OAutoRegistration< AnyCompareFactory > aAutoRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx index 928cb78a8b85..d5a7129911b0 100644 --- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx +++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -268,3 +269,5 @@ void createRegistryInfo_IndexedPropertyValuesContainer() { static ::comphelper::module::OAutoRegistration< IndexedPropertyValuesContainer > aAutoRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/container/NamedPropertyValuesContainer.cxx b/comphelper/source/container/NamedPropertyValuesContainer.cxx index e57efaec9118..329e6211c6ea 100644 --- a/comphelper/source/container/NamedPropertyValuesContainer.cxx +++ b/comphelper/source/container/NamedPropertyValuesContainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -237,3 +238,5 @@ void createRegistryInfo_NamedPropertyValuesContainer() { static ::comphelper::module::OAutoRegistration< NamedPropertyValuesContainer > aAutoRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/container/container.cxx b/comphelper/source/container/container.cxx index 9f834de85b66..ef99066c4bf5 100644 --- a/comphelper/source/container/container.cxx +++ b/comphelper/source/container/container.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -151,3 +152,4 @@ IndexAccessIterator::~IndexAccessIterator() {} //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx index 176f9cab6f8f..80940a9bd048 100644 --- a/comphelper/source/container/containermultiplexer.cxx +++ b/comphelper/source/container/containermultiplexer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -201,3 +202,4 @@ namespace comphelper } // namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 17740e7ef09b..04e0dbaf5e2c 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1661,3 +1662,5 @@ sal_Bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< emb return bError; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index 15241cd72dd6..5bc9df2a802f 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -998,3 +999,5 @@ void createRegistryInfo_Map() { ::comphelper::module::OAutoRegistration< ::comphelper::EnumerableMap > aAutoRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/container/enumhelper.cxx b/comphelper/source/container/enumhelper.cxx index 646bffa9810f..e688c50ab4a6 100644 --- a/comphelper/source/container/enumhelper.cxx +++ b/comphelper/source/container/enumhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -295,3 +296,4 @@ staruno::Any SAL_CALL OAnyEnumeration::nextElement( ) //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/container/namecontainer.cxx b/comphelper/source/container/namecontainer.cxx index 7239a8d573dc..48864d779326 100644 --- a/comphelper/source/container/namecontainer.cxx +++ b/comphelper/source/container/namecontainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -209,3 +210,5 @@ Reference< XNameContainer > comphelper::NameContainer_createInstance( Type aType { return (XNameContainer*) new NameContainer( aType ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 86861303ccb8..19d77177bf22 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1032,3 +1033,4 @@ void SAL_CALL ImplEventAttacherManager::read(const Reference< XObjectInputStream } // namesapce comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/inc/comphelper_module.hxx b/comphelper/source/inc/comphelper_module.hxx index ea2fc7eeb4eb..9f8e32656715 100644 --- a/comphelper/source/inc/comphelper_module.hxx +++ b/comphelper/source/inc/comphelper_module.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -41,3 +42,5 @@ namespace comphelper { namespace module //........................................................................ #endif // COMPHELPER_COMPHELPER_MODULE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx index d61dee3f29f0..8ec3158c6789 100644 --- a/comphelper/source/misc/SelectionMultiplex.cxx +++ b/comphelper/source/misc/SelectionMultiplex.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -172,3 +173,4 @@ void SAL_CALL OSelectionChangeMultiplexer::selectionChanged( const EventObject& } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/accessiblecomponenthelper.cxx b/comphelper/source/misc/accessiblecomponenthelper.cxx index 5fb86f3f7b1d..8b6ebde6cc1c 100644 --- a/comphelper/source/misc/accessiblecomponenthelper.cxx +++ b/comphelper/source/misc/accessiblecomponenthelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -219,3 +220,4 @@ namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx index 2e0281848e8c..5dcda7148275 100644 --- a/comphelper/source/misc/accessiblecontexthelper.cxx +++ b/comphelper/source/misc/accessiblecontexthelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -354,3 +355,4 @@ namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/accessibleeventbuffer.cxx b/comphelper/source/misc/accessibleeventbuffer.cxx index 50c61d59b9e6..4137f91853f7 100644 --- a/comphelper/source/misc/accessibleeventbuffer.cxx +++ b/comphelper/source/misc/accessibleeventbuffer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,3 +109,5 @@ void AccessibleEventBuffer::sendEvents() const } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/accessibleeventnotifier.cxx b/comphelper/source/misc/accessibleeventnotifier.cxx index 421fb9868d73..f03b1e78485a 100644 --- a/comphelper/source/misc/accessibleeventnotifier.cxx +++ b/comphelper/source/misc/accessibleeventnotifier.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -257,3 +258,4 @@ namespace comphelper } // namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/accessiblekeybindinghelper.cxx b/comphelper/source/misc/accessiblekeybindinghelper.cxx index d3c22071bfd8..ee98678f0b70 100644 --- a/comphelper/source/misc/accessiblekeybindinghelper.cxx +++ b/comphelper/source/misc/accessiblekeybindinghelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,3 +113,5 @@ namespace comphelper //.............................................................................. } // namespace comphelper //.............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/accessibleselectionhelper.cxx b/comphelper/source/misc/accessibleselectionhelper.cxx index 8e31410b337e..e6aeac52eac4 100644 --- a/comphelper/source/misc/accessibleselectionhelper.cxx +++ b/comphelper/source/misc/accessibleselectionhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -190,3 +191,4 @@ namespace comphelper } // namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx index 10bd0f913285..d344192e7b46 100644 --- a/comphelper/source/misc/accessibletexthelper.cxx +++ b/comphelper/source/misc/accessibletexthelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -911,3 +912,5 @@ namespace comphelper //.............................................................................. } // namespace comphelper //.............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 0ed694856b97..2220e15563b9 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -681,3 +682,5 @@ namespace comphelper //............................................................................. } // namespace accessibility //............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx index e792b9fe43c1..65dfd98364c9 100644 --- a/comphelper/source/misc/accimplaccess.cxx +++ b/comphelper/source/misc/accimplaccess.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,3 +188,4 @@ namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/anytostring.cxx b/comphelper/source/misc/anytostring.cxx index 01f282172f18..bdb6d44d6e1f 100644 --- a/comphelper/source/misc/anytostring.cxx +++ b/comphelper/source/misc/anytostring.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -333,3 +334,4 @@ rtl::OUString anyToString( uno::Any const & value ) } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx index e8bee632a9b4..5697eb62b6b5 100644 --- a/comphelper/source/misc/asyncnotification.cxx +++ b/comphelper/source/misc/asyncnotification.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -279,3 +280,4 @@ namespace comphelper } // namespace comphelper //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/comphelper_module.cxx b/comphelper/source/misc/comphelper_module.cxx index 5f423691592a..8b9ee4221dfc 100644 --- a/comphelper/source/misc/comphelper_module.cxx +++ b/comphelper/source/misc/comphelper_module.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -39,3 +40,5 @@ namespace comphelper { namespace module //........................................................................ } } // namespace comphelper::module //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx index b46dcea68ba7..b9cc41fe5b09 100644 --- a/comphelper/source/misc/comphelper_services.cxx +++ b/comphelper/source/misc/comphelper_services.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -77,3 +78,5 @@ namespace comphelper { namespace module //........................................................................ IMPLEMENT_COMPONENT_LIBRARY_API( ::comphelper::module::ComphelperModule, ::comphelper::module::initializeModule ) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/componentbase.cxx b/comphelper/source/misc/componentbase.cxx index 657c2c6a5972..d6aa3c5fd50c 100644 --- a/comphelper/source/misc/componentbase.cxx +++ b/comphelper/source/misc/componentbase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -72,3 +73,5 @@ namespace comphelper //........................................................................ } // namespace comphelper //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/componentcontext.cxx b/comphelper/source/misc/componentcontext.cxx index 0f9ddad5d2f5..072cafbcee4c 100644 --- a/comphelper/source/misc/componentcontext.cxx +++ b/comphelper/source/misc/componentcontext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -149,3 +150,4 @@ namespace comphelper } // namespace comphelper //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx index 63893d0f6d0d..43638d726e81 100644 --- a/comphelper/source/misc/componentmodule.cxx +++ b/comphelper/source/misc/componentmodule.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -235,3 +236,5 @@ namespace comphelper //........................................................................ } // namespace comphelper //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx index b78d39217d90..11179fa767c2 100644 --- a/comphelper/source/misc/configurationhelper.cxx +++ b/comphelper/source/misc/configurationhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -205,3 +206,5 @@ void ConfigurationHelper::flush(const css::uno::Reference< css::uno::XInterface } } // namespace comphelper + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 37941352ae28..ccc680729482 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*********************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -378,3 +379,4 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence( } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx index 17cdb0ae2d92..a4381a3d89c7 100644 --- a/comphelper/source/misc/docpasswordrequest.cxx +++ b/comphelper/source/misc/docpasswordrequest.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -192,3 +193,4 @@ Sequence< Reference< XInteractionContinuation > > SAL_CALL DocPasswordRequest::g } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx index aee3a8e005a6..c1884ba513c2 100644 --- a/comphelper/source/misc/documentinfo.cxx +++ b/comphelper/source/misc/documentinfo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -195,3 +196,5 @@ namespace comphelper { //........................................................................ } // namespace comphelper //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/documentiologring.cxx b/comphelper/source/misc/documentiologring.cxx index 5f07f8058fb3..fdc17013a6d9 100644 --- a/comphelper/source/misc/documentiologring.cxx +++ b/comphelper/source/misc/documentiologring.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -177,3 +178,5 @@ void createRegistryInfo_OSimpleLogRing() static ::comphelper::module::OAutoRegistration< ::comphelper::OSimpleLogRing > aAutoRegistration; static ::comphelper::module::OSingletonRegistration< ::comphelper::OSimpleLogRing > aSingletonRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/documentiologring.hxx b/comphelper/source/misc/documentiologring.hxx index f9626ffe5d62..90acd7f9152b 100644 --- a/comphelper/source/misc/documentiologring.hxx +++ b/comphelper/source/misc/documentiologring.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -86,3 +87,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/evtlistenerhlp.cxx b/comphelper/source/misc/evtlistenerhlp.cxx index 6511b9a9ecf7..3d10c0d76ad8 100644 --- a/comphelper/source/misc/evtlistenerhlp.cxx +++ b/comphelper/source/misc/evtlistenerhlp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,3 +51,4 @@ namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/evtmethodhelper.cxx b/comphelper/source/misc/evtmethodhelper.cxx index e91adee3912b..1101a473e716 100644 --- a/comphelper/source/misc/evtmethodhelper.cxx +++ b/comphelper/source/misc/evtmethodhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,4 @@ namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/ihwrapnofilter.cxx b/comphelper/source/misc/ihwrapnofilter.cxx index 1cbd1f09f4c6..4fa2bea4a453 100644 --- a/comphelper/source/misc/ihwrapnofilter.cxx +++ b/comphelper/source/misc/ihwrapnofilter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -115,3 +116,5 @@ namespace comphelper return impl_staticGetSupportedServiceNames(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx index c147217f1e7f..c71f84b62309 100644 --- a/comphelper/source/misc/instancelocker.cxx +++ b/comphelper/source/misc/instancelocker.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -510,3 +511,5 @@ void createRegistryInfo_OInstanceLocker() { static ::comphelper::module::OAutoRegistration< OInstanceLocker > aAutoRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/instancelocker.hxx b/comphelper/source/misc/instancelocker.hxx index 73800e3cee6f..809aced6e3c1 100644 --- a/comphelper/source/misc/instancelocker.hxx +++ b/comphelper/source/misc/instancelocker.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -131,3 +132,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/interaction.cxx b/comphelper/source/misc/interaction.cxx index c97f879581e4..7a69ac4d5cbb 100644 --- a/comphelper/source/misc/interaction.cxx +++ b/comphelper/source/misc/interaction.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,4 @@ namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/legacysingletonfactory.cxx b/comphelper/source/misc/legacysingletonfactory.cxx index cfc1793e7db2..d469d2512c4f 100644 --- a/comphelper/source/misc/legacysingletonfactory.cxx +++ b/comphelper/source/misc/legacysingletonfactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -195,3 +196,5 @@ namespace comphelper //........................................................................ } // namespace comphelper //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/listenernotification.cxx b/comphelper/source/misc/listenernotification.cxx index a9a14a0b9b72..0f7823a197c7 100644 --- a/comphelper/source/misc/listenernotification.cxx +++ b/comphelper/source/misc/listenernotification.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -125,3 +126,4 @@ namespace comphelper } // namespace comphelper //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/locale.cxx b/comphelper/source/misc/locale.cxx index 53c53f1c3c48..a086298f98a5 100644 --- a/comphelper/source/misc/locale.cxx +++ b/comphelper/source/misc/locale.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -681,3 +682,4 @@ sal_Bool Locale::operator!=(const Locale& aComparable) const } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx index 445f2cbe6c14..48b99a6ff94d 100644 --- a/comphelper/source/misc/logging.cxx +++ b/comphelper/source/misc/logging.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -403,3 +404,5 @@ namespace comphelper //........................................................................ } // namespace comphelper //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 9e02afe8c56c..83f54ff027ea 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -866,3 +867,4 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const ::rtl::OUString& sURL, s } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index b677c977739e..a61e8a36a27c 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -803,3 +804,4 @@ uno::Sequence MimeConfigurationHelper::GetSequenceClassIDFromObjectNam return aClassId; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index 8bab7fa3d7c7..74a37e278185 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -336,3 +337,4 @@ namespace comphelper } // namespace comphelper //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx index 11f430a30fba..da08fa009c2f 100644 --- a/comphelper/source/misc/numberedcollection.cxx +++ b/comphelper/source/misc/numberedcollection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -274,3 +275,5 @@ void NumberedCollection::impl_cleanUpDeadItems ( TNumberedItemHash& lItems } } // namespace comphelper + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx index 06f9f519c318..a011964b91fa 100644 --- a/comphelper/source/misc/numbers.cxx +++ b/comphelper/source/misc/numbers.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -148,3 +149,4 @@ Any getNumberFormatProperty( const Reference< XNumberFormatter >& _rxFormatter, } // namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/officeresourcebundle.cxx b/comphelper/source/misc/officeresourcebundle.cxx index cbe5b0dc2659..942a8e618261 100644 --- a/comphelper/source/misc/officeresourcebundle.cxx +++ b/comphelper/source/misc/officeresourcebundle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -238,3 +239,5 @@ namespace comphelper //........................................................................ } // namespace comphelper //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/officerestartmanager.cxx b/comphelper/source/misc/officerestartmanager.cxx index 1a98ddfce8da..6c1f38b15ff9 100644 --- a/comphelper/source/misc/officerestartmanager.cxx +++ b/comphelper/source/misc/officerestartmanager.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -208,3 +209,5 @@ void createRegistryInfo_OOfficeRestartManager() static ::comphelper::module::OAutoRegistration< ::comphelper::OOfficeRestartManager > aAutoRegistration; static ::comphelper::module::OSingletonRegistration< ::comphelper::OOfficeRestartManager > aSingletonRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/officerestartmanager.hxx b/comphelper/source/misc/officerestartmanager.hxx index 2317d0217060..c0aabf65d531 100644 --- a/comphelper/source/misc/officerestartmanager.hxx +++ b/comphelper/source/misc/officerestartmanager.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/proxyaggregation.cxx b/comphelper/source/misc/proxyaggregation.cxx index 1a3dd73930ba..b24aa4407356 100644 --- a/comphelper/source/misc/proxyaggregation.cxx +++ b/comphelper/source/misc/proxyaggregation.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -274,3 +275,4 @@ namespace comphelper } // namespace comphelper //............................................................................. +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/querydeep.cxx b/comphelper/source/misc/querydeep.cxx index 92e475686783..61cfb6c173f2 100644 --- a/comphelper/source/misc/querydeep.cxx +++ b/comphelper/source/misc/querydeep.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,3 +75,4 @@ sal_Bool comphelper::isDerivedFrom( +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx index 0ac8f0277236..5b4fc8b88cdf 100644 --- a/comphelper/source/misc/regpathhelper.cxx +++ b/comphelper/source/misc/regpathhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -233,3 +234,4 @@ OUString getPathToSystemRegistry() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx index 7ce478d8bea0..63ec42befb02 100644 --- a/comphelper/source/misc/scopeguard.cxx +++ b/comphelper/source/misc/scopeguard.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,3 +70,4 @@ void ScopeGuard::dismiss() } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/sequence.cxx b/comphelper/source/misc/sequence.cxx index b0d7c4da1587..622cfff4989d 100644 --- a/comphelper/source/misc/sequence.cxx +++ b/comphelper/source/misc/sequence.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,3 +102,4 @@ sal_Bool existsValue(const ::rtl::OUString& Value,const staruno::Sequence< ::rtl } // namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index a79ffc9037cc..c1b9cd9463b4 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -398,3 +399,5 @@ void SequenceAsHashMap::dbg_dumpToFile(const char* pFileName, #endif // OSL_DEBUG_LEVEL > 1 } // namespace comphelper + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx index 7c3dd169485d..92e3b3ef7e44 100644 --- a/comphelper/source/misc/servicedecl.cxx +++ b/comphelper/source/misc/servicedecl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -194,3 +195,4 @@ rtl::OUString ServiceDecl::getImplementationName() const } // namespace service_decl } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/serviceinfohelper.cxx b/comphelper/source/misc/serviceinfohelper.cxx index f2f9da278a06..1124146b39f6 100644 --- a/comphelper/source/misc/serviceinfohelper.cxx +++ b/comphelper/source/misc/serviceinfohelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -110,3 +111,4 @@ void ServiceInfoHelper::addToSequence( ::com::sun::star::uno::Sequence< ::rtl::O } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/sharedmutex.cxx b/comphelper/source/misc/sharedmutex.cxx index 4d3fade030a6..346fead794fe 100644 --- a/comphelper/source/misc/sharedmutex.cxx +++ b/comphelper/source/misc/sharedmutex.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -60,3 +61,5 @@ namespace comphelper //........................................................................ } // namespace comphelper //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/stillreadwriteinteraction.cxx b/comphelper/source/misc/stillreadwriteinteraction.cxx index 7499758708b3..f51353e47897 100644 --- a/comphelper/source/misc/stillreadwriteinteraction.cxx +++ b/comphelper/source/misc/stillreadwriteinteraction.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -136,3 +137,5 @@ ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction: return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index db5ba71cd876..1503e08bf6b0 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -485,3 +486,4 @@ sal_Bool OStorageHelper::PathHasSegment( const ::rtl::OUString& aPath, const ::r } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 951baf0be8d2..61e0eff9e0d7 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -123,3 +124,5 @@ rtl::OUString searchAndReplaceAsciiL( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/synchronousdispatch.cxx b/comphelper/source/misc/synchronousdispatch.cxx index 3c55556973f3..ad7c83c8bb15 100644 --- a/comphelper/source/misc/synchronousdispatch.cxx +++ b/comphelper/source/misc/synchronousdispatch.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -100,3 +101,4 @@ uno::Reference< lang::XComponent > SynchronousDispatch::dispatch( } // namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx index 31719eec881a..713e03caf23e 100644 --- a/comphelper/source/misc/types.cxx +++ b/comphelper/source/misc/types.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -475,3 +476,4 @@ Type getSequenceElementType(const Type& _rSequenceType) } // namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx index 710c08fdd706..ff2c0d17e1c7 100644 --- a/comphelper/source/misc/uieventslogger.cxx +++ b/comphelper/source/misc/uieventslogger.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -684,3 +685,5 @@ namespace comphelper m_Formatter.clear(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/weak.cxx b/comphelper/source/misc/weak.cxx index e84e069f0e38..247554495815 100644 --- a/comphelper/source/misc/weak.cxx +++ b/comphelper/source/misc/weak.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,3 +75,4 @@ Sequence< ::sal_Int8 > SAL_CALL OWeakTypeObject::getImplementationId( ) throw ( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/weakeventlistener.cxx b/comphelper/source/misc/weakeventlistener.cxx index 0a96698e7b92..333727e47a45 100644 --- a/comphelper/source/misc/weakeventlistener.cxx +++ b/comphelper/source/misc/weakeventlistener.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,3 +92,4 @@ namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx index 3ce0d4de865a..719ca340becd 100644 --- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx +++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -348,3 +349,5 @@ void createRegistryInfo_OfficeInstallationDirectories() { static ::comphelper::module::OSingletonRegistration< OfficeInstallationDirectories > aAutoRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx index 2ffb3582718a..5139a70e9a30 100644 --- a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx +++ b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,5 @@ private: } // namespace comphelper #endif /* !INCLUDED_OFFICEINSTALLATIONDIRECTORIES_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/processfactory/componentfactory.cxx b/comphelper/source/processfactory/componentfactory.cxx index f1af07baaefd..ec72a25dc615 100644 --- a/comphelper/source/processfactory/componentfactory.cxx +++ b/comphelper/source/processfactory/componentfactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,3 +79,5 @@ Reference< XSingleServiceFactory > loadLibComponentFactory( } } // namespace comphelper + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx index 514d3377edab..f9b2218f7018 100644 --- a/comphelper/source/processfactory/processfactory.cxx +++ b/comphelper/source/processfactory/processfactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -125,3 +126,4 @@ uno::XComponentContext * comphelper_getProcessComponentContext() } } // extern "C" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx index 936510f21309..9ceefb351c21 100644 --- a/comphelper/source/property/ChainablePropertySet.cxx +++ b/comphelper/source/property/ChainablePropertySet.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -319,3 +320,5 @@ Any ChainablePropertySet::_getPropertyDefault( const comphelper::PropertyInfo& ) Any aAny; return aAny; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx index 6660517ef97e..c8962e755013 100644 --- a/comphelper/source/property/ChainablePropertySetInfo.cxx +++ b/comphelper/source/property/ChainablePropertySetInfo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -140,3 +141,5 @@ sal_Bool SAL_CALL ChainablePropertySetInfo::hasPropertyByName( const ::rtl::OUSt { return static_cast < sal_Bool > ( maMap.find ( rName ) != maMap.end() ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index 2e6698e05879..be1b2b6c3224 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -501,3 +502,5 @@ Any MasterPropertySet::_getPropertyDefault( const comphelper::PropertyInfo& ) Any aAny; return aAny; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index 898c47aca8ee..fd5ec0fe7355 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -166,3 +167,5 @@ sal_Bool SAL_CALL MasterPropertySetInfo::hasPropertyByName( const ::rtl::OUStrin { return static_cast < sal_Bool > ( maMap.find ( rName ) != maMap.end() ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx index 9ab04fa851fa..c3d4d5248c15 100644 --- a/comphelper/source/property/TypeGeneration.cxx +++ b/comphelper/source/property/TypeGeneration.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -229,3 +230,5 @@ namespace comphelper } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/composedprops.cxx b/comphelper/source/property/composedprops.cxx index 4b44a8fb474e..74d1b23891f9 100644 --- a/comphelper/source/property/composedprops.cxx +++ b/comphelper/source/property/composedprops.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -355,3 +356,4 @@ namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx index b7fb09912153..888a238aca1a 100644 --- a/comphelper/source/property/genericpropertyset.cxx +++ b/comphelper/source/property/genericpropertyset.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -299,3 +300,4 @@ Sequence< OUString > SAL_CALL GenericPropertySet::getSupportedServiceNames( ) return (XPropertySet*)new GenericPropertySet( pInfo ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index f1282a48c2dd..631a8e1d1d07 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -583,3 +584,4 @@ namespace comphelper } // namespace comphelper //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/opropertybag.hxx b/comphelper/source/property/opropertybag.hxx index 3b9549f7c023..6d0a6e1f4f54 100644 --- a/comphelper/source/property/opropertybag.hxx +++ b/comphelper/source/property/opropertybag.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -240,3 +241,5 @@ namespace comphelper //........................................................................ #endif // COMPHELPER_OPROPERTYBAG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index e796c29eba90..ff3dd8ec9976 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1025,3 +1026,4 @@ bool OPropertySetAggregationHelper::isCurrentlyForwardingProperty( sal_Int32 _nH } // namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx index 6ab48aa1965b..a13930e34fba 100644 --- a/comphelper/source/property/property.cxx +++ b/comphelper/source/property/property.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -243,3 +244,4 @@ sal_Bool tryPropertyValue(Any& _rConvertedValue, Any& _rOldValue, const Any& _rV } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx index 88f925e20db7..3170411de510 100644 --- a/comphelper/source/property/propertybag.cxx +++ b/comphelper/source/property/propertybag.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -219,3 +220,4 @@ namespace comphelper } // namespace comphelper //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propertycontainer.cxx b/comphelper/source/property/propertycontainer.cxx index c385107733fe..a826eca2bd92 100644 --- a/comphelper/source/property/propertycontainer.cxx +++ b/comphelper/source/property/propertycontainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,4 @@ void OPropertyContainer::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index 0b420a3eebd8..8f7b64d58452 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -550,3 +551,4 @@ void OPropertyContainerHelper::describeProperties(Sequence< Property >& _rProps) //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx index 9d2abf784c1b..1a7455b8c956 100644 --- a/comphelper/source/property/propertysethelper.cxx +++ b/comphelper/source/property/propertysethelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -326,3 +327,5 @@ Any PropertySetHelper::_getPropertyDefault( const comphelper::PropertyMapEntry* Any aAny; return aAny; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index efdd495ac1bc..6642c0d4db55 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -212,3 +213,5 @@ const PropertyMap* PropertySetInfo::getPropertyMap() const throw() { return mpMap->getPropertyMap(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx index 341dc1b43a78..833cf0f3da34 100644 --- a/comphelper/source/property/propertystatecontainer.cxx +++ b/comphelper/source/property/propertystatecontainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -337,3 +338,4 @@ namespace comphelper #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propmultiplex.cxx b/comphelper/source/property/propmultiplex.cxx index db0b35650d32..a7e9c1e395d0 100644 --- a/comphelper/source/property/propmultiplex.cxx +++ b/comphelper/source/property/propmultiplex.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -180,3 +181,4 @@ void OPropertyChangeMultiplexer::addProperty(const ::rtl::OUString& _sPropertyNa } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx index 214bccb3f40f..5be6c842a5f8 100644 --- a/comphelper/source/property/propstate.cxx +++ b/comphelper/source/property/propstate.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -259,3 +260,4 @@ namespace comphelper } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/basicio.cxx b/comphelper/source/streaming/basicio.cxx index eef5c6b844fa..662c5545c56e 100644 --- a/comphelper/source/streaming/basicio.cxx +++ b/comphelper/source/streaming/basicio.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -172,3 +173,4 @@ const staruno::Reference& operator << (const starun } // namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 5298b7511f09..fd17bd9e5db6 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -245,3 +246,5 @@ void createRegistryInfo_UNOMemoryStream() { static ::comphelper::module::OAutoRegistration< ::comphelper::UNOMemoryStream > aAutoRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index 9cf8eeaaf08a..40858acd338b 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -196,3 +197,4 @@ void SAL_CALL OSLOutputStreamWrapper::closeOutput() throw( stario::NotConnectedE } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/otransactedfilestream.cxx b/comphelper/source/streaming/otransactedfilestream.cxx index 03539a12305b..958f3e9707fd 100644 --- a/comphelper/source/streaming/otransactedfilestream.cxx +++ b/comphelper/source/streaming/otransactedfilestream.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -822,3 +823,4 @@ void SAL_CALL OTruncatedTransactedFileStream::removeVetoableChangeListener( cons } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/seekableinput.cxx b/comphelper/source/streaming/seekableinput.cxx index abaf46faf014..70d81b450c04 100644 --- a/comphelper/source/streaming/seekableinput.cxx +++ b/comphelper/source/streaming/seekableinput.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -265,3 +266,4 @@ sal_Int64 SAL_CALL OSeekableInputWrapper::getLength() } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx index 015387b9894d..1a361298661f 100644 --- a/comphelper/source/streaming/seqinputstreamserv.cxx +++ b/comphelper/source/streaming/seqinputstreamserv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -249,3 +250,5 @@ void createRegistryInfo_SequenceInputStream() { static ::comphelper::module::OAutoRegistration< SequenceInputStreamService > aAutoRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx index a51653e6e419..02cfd2fe7bc6 100644 --- a/comphelper/source/streaming/seqoutputstreamserv.cxx +++ b/comphelper/source/streaming/seqoutputstreamserv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -170,3 +171,5 @@ void createRegistryInfo_SequenceOutputStream() { static ::comphelper::module::OAutoRegistration< SequenceOutputStreamService > aAutoRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/seqstream.cxx b/comphelper/source/streaming/seqstream.cxx index 5c8a32b1f6e5..d2852b70a901 100644 --- a/comphelper/source/streaming/seqstream.cxx +++ b/comphelper/source/streaming/seqstream.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -241,3 +242,5 @@ void SAL_CALL OSequenceOutputStream::closeOutput( ) throw(NotConnectedException } } // namespace comphelper + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/streamsection.cxx b/comphelper/source/streaming/streamsection.cxx index 324299813986..1fa71fd42682 100644 --- a/comphelper/source/streaming/streamsection.cxx +++ b/comphelper/source/streaming/streamsection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -120,3 +121,4 @@ sal_Int32 OStreamSection::available() } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/xml/attributelist.cxx b/comphelper/source/xml/attributelist.cxx index 0ef75094f4ef..012df7f4fe03 100644 --- a/comphelper/source/xml/attributelist.cxx +++ b/comphelper/source/xml/attributelist.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -177,3 +178,4 @@ void AttributeList::AppendAttributeList( const uno::Reference< ::com::sun::star: } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx index 03994486a50d..9df5977efb04 100644 --- a/comphelper/source/xml/ofopxmlhelper.cxx +++ b/comphelper/source/xml/ofopxmlhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -453,3 +454,4 @@ void SAL_CALL OFOPXMLHelper::setDocumentLocator( const uno::Reference< xml::sax: } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/test/uno_iterators/uno_iterators.cxx b/comphelper/test/uno_iterators/uno_iterators.cxx index 6f45b16cf6da..c2106068ff46 100644 --- a/comphelper/test/uno_iterators/uno_iterators.cxx +++ b/comphelper/test/uno_iterators/uno_iterators.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -216,3 +217,5 @@ int main() cout << "--- HELPERS IN STL-STYLE" << endl; stl_helpers(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From 849a713ffd29a58ae79e48f80835c28bbd9d5a72 Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Mon, 18 Oct 2010 16:52:05 +0100 Subject: remove non-compiled code --- .../source/eventattachermgr/eventattachermgr.cxx | 26 ---------------------- 1 file changed, 26 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 19d77177bf22..7f24a8691ddd 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -95,32 +95,6 @@ struct AttacherIndex_Impl bool operator==( const AttacherIndex_Impl & ) const; }; -#if 0 -bool AttachedObject_Impl::operator<( const AttachedObject_Impl & r ) const -{ - OSL_ENSURE( FALSE, "not implemented" ); - return FALSE; - return this < &r; -} - -bool AttachedObject_Impl::operator==( const AttachedObject_Impl & r ) const -{ - OSL_ENSURE( FALSE, "not implemented" ); - return this == &r; -} - -bool AttacherIndex_Impl::operator<( const AttacherIndex_Impl & r ) const -{ - OSL_ENSURE( FALSE, "not implemented" ); - return this < &r; -} -bool AttacherIndex_Impl::operator==( const AttacherIndex_Impl & r ) const -{ - OSL_ENSURE( FALSE, "not implemented" ); - return this == &r; -} -#endif - //----------------------------------------------------------------------------- class ImplEventAttacherManager : public WeakImplHelper2< XEventAttacherManager, XPersistObject > -- cgit From 34dff4e6b49765a0b9c1836de2daecf429702760 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 24 Oct 2010 21:02:18 +0100 Subject: micro opts --- comphelper/inc/comphelper/sequenceasvector.hxx | 2 +- .../source/container/embeddedobjectcontainer.cxx | 16 ++-- comphelper/source/container/enumerablemap.cxx | 6 +- comphelper/source/misc/componentmodule.cxx | 4 +- comphelper/source/misc/configurationhelper.cxx | 14 ++-- comphelper/source/misc/ihwrapnofilter.cxx | 4 +- comphelper/source/misc/locale.cxx | 94 +++++++++++----------- .../source/streaming/otransactedfilestream.cxx | 4 +- comphelper/source/streaming/seekableinput.cxx | 2 +- comphelper/source/streaming/seqinputstreamserv.cxx | 4 +- 10 files changed, 75 insertions(+), 75 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/sequenceasvector.hxx b/comphelper/inc/comphelper/sequenceasvector.hxx index c31843d8ce6b..6fb303f0d36f 100644 --- a/comphelper/inc/comphelper/sequenceasvector.hxx +++ b/comphelper/inc/comphelper/sequenceasvector.hxx @@ -163,7 +163,7 @@ class SequenceAsVector : public ::std::vector< TElementType > ::com::sun::star::uno::Sequence< TElementType > lSource; if (!(aSource >>= lSource)) throw ::com::sun::star::beans::IllegalTypeException( - ::rtl::OUString::createFromAscii("SequenceAsVector operator<<(Any) was called with an unsupported Any type."), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SequenceAsVector operator<<(Any) was called with an unsupported Any type.")), ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >()); (*this) << lSource; diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 04e0dbaf5e2c..ff5f89f22b51 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -109,12 +109,12 @@ const uno::Reference < embed::XStorage >& EmbedImpl::GetReplacements() try { mxImageStorage = mxStorage->openStorageElement( - ::rtl::OUString::createFromAscii( "ObjectReplacements" ), embed::ElementModes::READWRITE ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectReplacements")), embed::ElementModes::READWRITE ); } catch ( uno::Exception& ) { mxImageStorage = mxStorage->openStorageElement( - ::rtl::OUString::createFromAscii( "ObjectReplacements" ), embed::ElementModes::READ ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectReplacements")), embed::ElementModes::READ ); } } @@ -172,7 +172,7 @@ sal_Bool EmbeddedObjectContainer::CommitImageSubStorage() { // get the open mode from the parent storage sal_Int32 nMode = 0; - uno::Any aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("OpenMode") ); + uno::Any aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OpenMode")) ); if ( aAny >>= nMode ) bReadOnlyMode = !(nMode & embed::ElementModes::WRITE ); } // if ( xSet.is() ) @@ -364,7 +364,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::Get_Impl( con { // get the open mode from the parent storage sal_Int32 nMode = 0; - uno::Any aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("OpenMode") ); + uno::Any aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OpenMode")) ); if ( aAny >>= nMode ) bReadOnlyMode = !(nMode & embed::ElementModes::WRITE ); } @@ -1217,7 +1217,7 @@ uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetGraphicStream( c uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY ); if ( xSet.is() ) { - uno::Any aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("MediaType") ); + uno::Any aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ); aAny >>= *pMediaType; } } @@ -1272,13 +1272,13 @@ sal_Bool EmbeddedObjectContainer::InsertGraphicStream( const com::sun::star::uno if ( !xPropSet.is() ) throw uno::RuntimeException(); - xPropSet->setPropertyValue( ::rtl::OUString::createFromAscii( "UseCommonStoragePasswordEncryption" ), + xPropSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption")), uno::makeAny( (sal_Bool)sal_True ) ); uno::Any aAny; aAny <<= rMediaType; - xPropSet->setPropertyValue( ::rtl::OUString::createFromAscii("MediaType"), aAny ); + xPropSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aAny ); - xPropSet->setPropertyValue( ::rtl::OUString::createFromAscii( "Compressed" ), + xPropSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), uno::makeAny( (sal_Bool)sal_True ) ); } catch( uno::Exception& ) diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index 5bc9df2a802f..b3864d9b8c06 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -532,16 +532,16 @@ namespace comphelper Type aKeyType, aValueType; if ( !( _arguments[0] >>= aKeyType ) ) - throw IllegalArgumentException( ::rtl::OUString::createFromAscii( "com.sun.star.uno.Type expected." ), *this, 1 ); + throw IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.Type expected.")), *this, 1 ); if ( !( _arguments[1] >>= aValueType ) ) - throw IllegalArgumentException( ::rtl::OUString::createFromAscii( "com.sun.star.uno.Type expected." ), *this, 2 ); + throw IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.Type expected.")), *this, 2 ); Sequence< Pair< Any, Any > > aInitialValues; bool bMutable = true; if ( nArgumentCount == 3 ) { if ( !( _arguments[2] >>= aInitialValues ) ) - throw IllegalArgumentException( ::rtl::OUString::createFromAscii( "[]com.sun.star.beans.Pair expected." ), *this, 2 ); + throw IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[]com.sun.star.beans.Pair expected.")), *this, 2 ); bMutable = false; } diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx index 43638d726e81..f3239dd59846 100644 --- a/comphelper/source/misc/componentmodule.cxx +++ b/comphelper/source/misc/componentmodule.cxx @@ -159,7 +159,7 @@ namespace comphelper { ::rtl::OUString sMainKeyName( sRootKey ); sMainKeyName += component->sImplementationName; - sMainKeyName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + sMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); try { @@ -176,7 +176,7 @@ namespace comphelper ::rtl::OUString sSingletonKeyName( sRootKey ); sSingletonKeyName += component->sImplementationName; - sSingletonKeyName += ::rtl::OUString::createFromAscii( "/UNO/SINGLETONS/" ); + sSingletonKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SINGLETONS/")); sSingletonKeyName += component->sSingletonName; xNewKey = _rxRootKey->createKey( sSingletonKeyName ); diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx index 11179fa767c2..1016c88b341c 100644 --- a/comphelper/source/misc/configurationhelper.cxx +++ b/comphelper/source/misc/configurationhelper.cxx @@ -53,27 +53,27 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons sal_Int32 eMode ) { css::uno::Reference< css::lang::XMultiServiceFactory > xConfigProvider( - xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")), css::uno::UNO_QUERY_THROW); + xSMGR->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))), css::uno::UNO_QUERY_THROW); ::comphelper::SequenceAsVector< css::uno::Any > lParams; css::beans::PropertyValue aParam ; // set root path - aParam.Name = ::rtl::OUString::createFromAscii("nodepath"); + aParam.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); aParam.Value <<= sPackage; lParams.push_back(css::uno::makeAny(aParam)); // enable all locales mode if ((eMode & ConfigurationHelper::E_ALL_LOCALES)==ConfigurationHelper::E_ALL_LOCALES) { - aParam.Name = ::rtl::OUString::createFromAscii("locale"); - aParam.Value <<= ::rtl::OUString::createFromAscii("*"); + aParam.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("locale")); + aParam.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); lParams.push_back(css::uno::makeAny(aParam)); } // enable lazy writing sal_Bool bLazy = ((eMode & ConfigurationHelper::E_LAZY_WRITE)==ConfigurationHelper::E_LAZY_WRITE); - aParam.Name = ::rtl::OUString::createFromAscii("lazywrite"); + aParam.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("lazywrite")); aParam.Value = css::uno::makeAny(bLazy); lParams.push_back(css::uno::makeAny(aParam)); @@ -83,11 +83,11 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons sal_Bool bReadOnly = ((eMode & ConfigurationHelper::E_READONLY)==ConfigurationHelper::E_READONLY); if (bReadOnly) xCFG = xConfigProvider->createInstanceWithArguments( - ::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), lParams.getAsConstList()); else xCFG = xConfigProvider->createInstanceWithArguments( - ::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess")), lParams.getAsConstList()); return xCFG; diff --git a/comphelper/source/misc/ihwrapnofilter.cxx b/comphelper/source/misc/ihwrapnofilter.cxx index 4fa2bea4a453..7d9ef608a1ae 100644 --- a/comphelper/source/misc/ihwrapnofilter.cxx +++ b/comphelper/source/misc/ihwrapnofilter.cxx @@ -52,13 +52,13 @@ namespace comphelper uno::Sequence< ::rtl::OUString > SAL_CALL OIHWrapNoFilterDialog::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(1); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandlerWrapper"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandlerWrapper")); return aRet; } ::rtl::OUString SAL_CALL OIHWrapNoFilterDialog::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.task.InteractionHandlerWrapper"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.task.InteractionHandlerWrapper")); } //---------------------------------------------------------------------------------------------------- diff --git a/comphelper/source/misc/locale.cxx b/comphelper/source/misc/locale.cxx index a086298f98a5..d6fa3873110d 100644 --- a/comphelper/source/misc/locale.cxx +++ b/comphelper/source/misc/locale.cxx @@ -48,8 +48,8 @@ const sal_Unicode Locale::SEPERATOR_CV_LINUX = (sal_Unicode)'.'; const Locale Locale::X_DEFAULT() { static Locale aLocale( - ::rtl::OUString::createFromAscii("x"), - ::rtl::OUString::createFromAscii("default")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("default"))); return aLocale; } @@ -57,7 +57,7 @@ const Locale Locale::X_DEFAULT() const Locale Locale::EN() { static Locale aLocale( - ::rtl::OUString::createFromAscii("en"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), ::rtl::OUString()); return aLocale; } @@ -66,8 +66,8 @@ const Locale Locale::EN() const Locale Locale::EN_US() { static Locale aLocale( - ::rtl::OUString::createFromAscii("en"), - ::rtl::OUString::createFromAscii("US")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US"))); return aLocale; } @@ -75,8 +75,8 @@ const Locale Locale::EN_US() const Locale Locale::DE_DE() { static Locale aLocale( - ::rtl::OUString::createFromAscii("de"), - ::rtl::OUString::createFromAscii("DE")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE"))); return aLocale; } @@ -84,8 +84,8 @@ const Locale Locale::DE_DE() const Locale Locale::DE_CH() { static Locale aLocale( - ::rtl::OUString::createFromAscii("de"), - ::rtl::OUString::createFromAscii("CH")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CH"))); return aLocale; } @@ -93,8 +93,8 @@ const Locale Locale::DE_CH() const Locale Locale::DE_AT() { static Locale aLocale( - ::rtl::OUString::createFromAscii("de"), - ::rtl::OUString::createFromAscii("AT")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AT"))); return aLocale; } @@ -102,7 +102,7 @@ const Locale Locale::DE_AT() const Locale Locale::AR() { static Locale aLocale( - ::rtl::OUString::createFromAscii("ar"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ar")), ::rtl::OUString()); return aLocale; } @@ -111,7 +111,7 @@ const Locale Locale::AR() const Locale Locale::CA() { static Locale aLocale( - ::rtl::OUString::createFromAscii("ca"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ca")), ::rtl::OUString()); return aLocale; } @@ -120,7 +120,7 @@ const Locale Locale::CA() const Locale Locale::CS() { static Locale aLocale( - ::rtl::OUString::createFromAscii("cs"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cs")), ::rtl::OUString()); return aLocale; } @@ -129,7 +129,7 @@ const Locale Locale::CS() const Locale Locale::DA() { static Locale aLocale( - ::rtl::OUString::createFromAscii("da"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("da")), ::rtl::OUString()); return aLocale; } @@ -138,7 +138,7 @@ const Locale Locale::DA() const Locale Locale::EL() { static Locale aLocale( - ::rtl::OUString::createFromAscii("el"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("el")), ::rtl::OUString()); return aLocale; } @@ -147,7 +147,7 @@ const Locale Locale::EL() const Locale Locale::ES() { static Locale aLocale( - ::rtl::OUString::createFromAscii("es"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("es")), ::rtl::OUString()); return aLocale; } @@ -156,7 +156,7 @@ const Locale Locale::ES() const Locale Locale::FI() { static Locale aLocale( - ::rtl::OUString::createFromAscii("fi"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fi")), ::rtl::OUString()); return aLocale; } @@ -165,7 +165,7 @@ const Locale Locale::FI() const Locale Locale::FR() { static Locale aLocale( - ::rtl::OUString::createFromAscii("fr"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fr")), ::rtl::OUString()); return aLocale; } @@ -174,7 +174,7 @@ const Locale Locale::FR() const Locale Locale::HE() { static Locale aLocale( - ::rtl::OUString::createFromAscii("he"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("he")), ::rtl::OUString()); return aLocale; } @@ -183,8 +183,8 @@ const Locale Locale::HE() const Locale Locale::HI_IN() { static Locale aLocale( - ::rtl::OUString::createFromAscii("hi"), - ::rtl::OUString::createFromAscii("IN")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hi")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IN"))); return aLocale; } @@ -192,7 +192,7 @@ const Locale Locale::HI_IN() const Locale Locale::HU() { static Locale aLocale( - ::rtl::OUString::createFromAscii("hu"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hu")), ::rtl::OUString()); return aLocale; } @@ -201,7 +201,7 @@ const Locale Locale::HU() const Locale Locale::IT() { static Locale aLocale( - ::rtl::OUString::createFromAscii("it"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("it")), ::rtl::OUString()); return aLocale; } @@ -210,7 +210,7 @@ const Locale Locale::IT() const Locale Locale::JA() { static Locale aLocale( - ::rtl::OUString::createFromAscii("ja"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ja")), ::rtl::OUString()); return aLocale; } @@ -219,7 +219,7 @@ const Locale Locale::JA() const Locale Locale::KO() { static Locale aLocale( - ::rtl::OUString::createFromAscii("ko"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ko")), ::rtl::OUString()); return aLocale; } @@ -228,7 +228,7 @@ const Locale Locale::KO() const Locale Locale::NL() { static Locale aLocale( - ::rtl::OUString::createFromAscii("nl"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nl")), ::rtl::OUString()); return aLocale; } @@ -237,7 +237,7 @@ const Locale Locale::NL() const Locale Locale::PL() { static Locale aLocale( - ::rtl::OUString::createFromAscii("pl"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pl")), ::rtl::OUString()); return aLocale; } @@ -246,7 +246,7 @@ const Locale Locale::PL() const Locale Locale::PT() { static Locale aLocale( - ::rtl::OUString::createFromAscii("pt"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pt")), ::rtl::OUString()); return aLocale; } @@ -255,8 +255,8 @@ const Locale Locale::PT() const Locale Locale::PT_BR() { static Locale aLocale( - ::rtl::OUString::createFromAscii("pt"), - ::rtl::OUString::createFromAscii("BR")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pt")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BR"))); return aLocale; } @@ -264,7 +264,7 @@ const Locale Locale::PT_BR() const Locale Locale::RU() { static Locale aLocale( - ::rtl::OUString::createFromAscii("ru"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ru")), ::rtl::OUString()); return aLocale; } @@ -273,7 +273,7 @@ const Locale Locale::RU() const Locale Locale::SK() { static Locale aLocale( - ::rtl::OUString::createFromAscii("sk"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sk")), ::rtl::OUString()); return aLocale; } @@ -282,7 +282,7 @@ const Locale Locale::SK() const Locale Locale::SL() { static Locale aLocale( - ::rtl::OUString::createFromAscii("sl"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sl")), ::rtl::OUString()); return aLocale; } @@ -291,7 +291,7 @@ const Locale Locale::SL() const Locale Locale::SV() { static Locale aLocale( - ::rtl::OUString::createFromAscii("sv"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sv")), ::rtl::OUString()); return aLocale; } @@ -300,7 +300,7 @@ const Locale Locale::SV() const Locale Locale::TH() { static Locale aLocale( - ::rtl::OUString::createFromAscii("th"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("th")), ::rtl::OUString()); return aLocale; } @@ -309,7 +309,7 @@ const Locale Locale::TH() const Locale Locale::TR() { static Locale aLocale( - ::rtl::OUString::createFromAscii("tr"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("tr")), ::rtl::OUString()); return aLocale; } @@ -318,8 +318,8 @@ const Locale Locale::TR() const Locale Locale::X_COMMENT() { static Locale aLocale( - ::rtl::OUString::createFromAscii("x"), - ::rtl::OUString::createFromAscii("comment")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("comment"))); return aLocale; } @@ -327,8 +327,8 @@ const Locale Locale::X_COMMENT() const Locale Locale::X_TRANSLATE() { static Locale aLocale( - ::rtl::OUString::createFromAscii("x"), - ::rtl::OUString::createFromAscii("translate")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("translate"))); return aLocale; } @@ -336,8 +336,8 @@ const Locale Locale::X_TRANSLATE() const Locale Locale::X_NOTRANSLATE() { static Locale aLocale( - ::rtl::OUString::createFromAscii("x"), - ::rtl::OUString::createFromAscii("notranslate")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("notranslate"))); return aLocale; } @@ -345,8 +345,8 @@ const Locale Locale::X_NOTRANSLATE() const Locale Locale::ZH_CN() { static Locale aLocale( - ::rtl::OUString::createFromAscii("zh"), - ::rtl::OUString::createFromAscii("CN")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zh")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CN"))); return aLocale; } @@ -354,8 +354,8 @@ const Locale Locale::ZH_CN() const Locale Locale::ZH_TW() { static Locale aLocale( - ::rtl::OUString::createFromAscii("zh"), - ::rtl::OUString::createFromAscii("TW")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zh")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TW"))); return aLocale; } diff --git a/comphelper/source/streaming/otransactedfilestream.cxx b/comphelper/source/streaming/otransactedfilestream.cxx index 958f3e9707fd..bac4403fd6ad 100644 --- a/comphelper/source/streaming/otransactedfilestream.cxx +++ b/comphelper/source/streaming/otransactedfilestream.cxx @@ -304,9 +304,9 @@ void OTruncatedTransactedFileStream::Commit_Impl() ::rtl::OUString aTempURL; try { uno::Reference< beans::XPropertySet > xTempFile( m_pStreamData->m_xTempStream, uno::UNO_QUERY_THROW ); - uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ); + uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")) ); aUrl >>= aTempURL; - xTempFile->setPropertyValue( ::rtl::OUString::createFromAscii( "RemoveFile" ), + xTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")), uno::makeAny( sal_False ) ); m_pStreamData->m_xTempSeekable->seek( nPos ); diff --git a/comphelper/source/streaming/seekableinput.cxx b/comphelper/source/streaming/seekableinput.cxx index 70d81b450c04..f20153ee0aaf 100644 --- a/comphelper/source/streaming/seekableinput.cxx +++ b/comphelper/source/streaming/seekableinput.cxx @@ -102,7 +102,7 @@ void OSeekableInputWrapper::PrepareCopy_Impl() throw uno::RuntimeException(); uno::Reference< io::XOutputStream > xTempOut( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")) ), uno::UNO_QUERY ); if ( xTempOut.is() ) diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx index 1a361298661f..4e1cc7ade660 100644 --- a/comphelper/source/streaming/seqinputstreamserv.cxx +++ b/comphelper/source/streaming/seqinputstreamserv.cxx @@ -223,7 +223,7 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com throw frame::DoubleInitializationException(); if ( aArguments.getLength() != 1 ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong number of arguments!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong number of arguments!\n")), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); @@ -239,7 +239,7 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com m_bInitialized = sal_True; } else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Unexpected type of argument!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unexpected type of argument!\n")), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); } -- cgit From fbfbfc1abc1d43f8839443b03040259e480bb829 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 25 Oct 2010 16:57:01 +0100 Subject: micro opts --- comphelper/source/misc/uieventslogger.cxx | 114 +++++++++++++++--------------- 1 file changed, 57 insertions(+), 57 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx index ff2c0d17e1c7..1ddf413fc009 100644 --- a/comphelper/source/misc/uieventslogger.cxx +++ b/comphelper/source/misc/uieventslogger.cxx @@ -69,33 +69,33 @@ namespace { static void lcl_SetupOriginAppAbbr(map& abbrs) { - abbrs[OUString::createFromAscii("com.sun.star.text.TextDocument")] = OUString::createFromAscii("W"); // Writer - abbrs[OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument")] = OUString::createFromAscii("C"); // Calc - abbrs[OUString::createFromAscii("com.sun.star.presentation.PresentationDocument")] = OUString::createFromAscii("I"); // Impress - abbrs[OUString::createFromAscii("com.sun.star.drawing.DrawingDocument")] = OUString::createFromAscii("D"); // Draw + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"))] = OUString(sal_Unicode('W')); // Writer + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument"))] = OUString(sal_Unicode('C')); // Calc + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.PresentationDocument"))] = OUString(sal_Unicode('I')); // Impress + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocument"))] = OUString(sal_Unicode('D')); // Draw }; static void lcl_SetupOriginWidgetAbbr(map& abbrs) { - abbrs[OUString::createFromAscii("ButtonToolbarController")] = OUString::createFromAscii("0"); - abbrs[OUString::createFromAscii("ComplexToolbarController")] = OUString::createFromAscii("1"); - abbrs[OUString::createFromAscii("ControlMenuController")] = OUString::createFromAscii("2"); - abbrs[OUString::createFromAscii("FontMenuController")] = OUString::createFromAscii("3"); - abbrs[OUString::createFromAscii("FontSizeMenuController")] = OUString::createFromAscii("4"); - abbrs[OUString::createFromAscii("FooterMenuController")] = OUString::createFromAscii("5"); - abbrs[OUString::createFromAscii("GenericToolbarController")] = OUString::createFromAscii("6"); - abbrs[OUString::createFromAscii("HeaderMenuController")] = OUString::createFromAscii("7"); - abbrs[OUString::createFromAscii("LanguageSelectionMenuController")] = OUString::createFromAscii("8"); - abbrs[OUString::createFromAscii("LangSelectionStatusbarController")] = OUString::createFromAscii("9"); - abbrs[OUString::createFromAscii("MacrosMenuController")] = OUString::createFromAscii("10"); - abbrs[OUString::createFromAscii("MenuBarManager")] = OUString::createFromAscii("11"); - abbrs[OUString::createFromAscii("NewMenuController")] = OUString::createFromAscii("12"); - abbrs[OUString::createFromAscii("ObjectMenuController")] = OUString::createFromAscii("13"); - abbrs[OUString::createFromAscii("RecentFilesMenuController")] = OUString::createFromAscii("14"); - abbrs[OUString::createFromAscii("ToolbarsMenuController")] = OUString::createFromAscii("15"); - abbrs[OUString::createFromAscii("SfxToolBoxControl")] = OUString::createFromAscii("16"); - abbrs[OUString::createFromAscii("SfxAsyncExec")] = OUString::createFromAscii("17"); - abbrs[OUString::createFromAscii("AcceleratorExecute")] = OUString::createFromAscii("18"); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonToolbarController"))] = OUString(sal_Unicode('0')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ComplexToolbarController"))] = OUString(sal_Unicode('1')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ControlMenuController"))] = OUString(sal_Unicode('2')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("FontMenuController"))] = OUString(sal_Unicode('3')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("FontSizeMenuController"))] = OUString(sal_Unicode('4')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("FooterMenuController"))] = OUString(sal_Unicode('5')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("GenericToolbarController"))] = OUString(sal_Unicode('6')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("HeaderMenuController"))] = OUString(sal_Unicode('7')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("LanguageSelectionMenuController"))] = OUString(sal_Unicode('8')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("LangSelectionStatusbarController"))] = OUString(sal_Unicode('9')); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("MacrosMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("10")); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("MenuBarManager"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("11")); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("NewMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("12")); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("13")); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("RecentFilesMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("14")); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ToolbarsMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("15")); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("SfxToolBoxControl"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("16")); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("SfxAsyncExec"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("17")); + abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("AcceleratorExecute"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("18")); }; } @@ -184,33 +184,33 @@ namespace comphelper { // consts const sal_Int32 UiEventsLogger_Impl::COLUMNS = 9; - const OUString UiEventsLogger_Impl::CFG_ENABLED = OUString::createFromAscii("EnablingAllowed"); - const OUString UiEventsLogger_Impl::CFG_IDLETIMEOUT = OUString::createFromAscii("IdleTimeout"); - const OUString UiEventsLogger_Impl::CFG_LOGGING = OUString::createFromAscii("/org.openoffice.Office.Logging"); - const OUString UiEventsLogger_Impl::CFG_LOGPATH = OUString::createFromAscii("LogPath"); - const OUString UiEventsLogger_Impl::CFG_OOOIMPROVEMENT = OUString::createFromAscii("OOoImprovement"); + const OUString UiEventsLogger_Impl::CFG_ENABLED(RTL_CONSTASCII_USTRINGPARAM("EnablingAllowed")); + const OUString UiEventsLogger_Impl::CFG_IDLETIMEOUT(RTL_CONSTASCII_USTRINGPARAM("IdleTimeout")); + const OUString UiEventsLogger_Impl::CFG_LOGGING(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Logging")); + const OUString UiEventsLogger_Impl::CFG_LOGPATH(RTL_CONSTASCII_USTRINGPARAM("LogPath")); + const OUString UiEventsLogger_Impl::CFG_OOOIMPROVEMENT(RTL_CONSTASCII_USTRINGPARAM("OOoImprovement")); - const OUString UiEventsLogger_Impl::CSSL_CSVFORMATTER = OUString::createFromAscii("com.sun.star.logging.CsvFormatter"); - const OUString UiEventsLogger_Impl::CSSL_FILEHANDLER = OUString::createFromAscii("com.sun.star.logging.FileHandler"); - const OUString UiEventsLogger_Impl::CSSL_LOGGERPOOL = OUString::createFromAscii("com.sun.star.logging.LoggerPool"); - const OUString UiEventsLogger_Impl::CSSO_CORECONTROLLER = OUString::createFromAscii("com.sun.star.oooimprovement.CoreController"); - const OUString UiEventsLogger_Impl::CSSU_PATHSUB = OUString::createFromAscii("com.sun.star.util.PathSubstitution"); + const OUString UiEventsLogger_Impl::CSSL_CSVFORMATTER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.logging.CsvFormatter")); + const OUString UiEventsLogger_Impl::CSSL_FILEHANDLER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.logging.FileHandler")); + const OUString UiEventsLogger_Impl::CSSL_LOGGERPOOL(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.logging.LoggerPool")); + const OUString UiEventsLogger_Impl::CSSO_CORECONTROLLER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.CoreController")); + const OUString UiEventsLogger_Impl::CSSU_PATHSUB(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution")); - const OUString UiEventsLogger_Impl::ETYPE_DISPATCH = OUString::createFromAscii("dispatch"); - const OUString UiEventsLogger_Impl::ETYPE_ROTATED = OUString::createFromAscii("rotated"); - const OUString UiEventsLogger_Impl::ETYPE_VCL = OUString::createFromAscii("vcl"); + const OUString UiEventsLogger_Impl::ETYPE_DISPATCH(RTL_CONSTASCII_USTRINGPARAM("dispatch")); + const OUString UiEventsLogger_Impl::ETYPE_ROTATED(RTL_CONSTASCII_USTRINGPARAM("rotated")); + const OUString UiEventsLogger_Impl::ETYPE_VCL(RTL_CONSTASCII_USTRINGPARAM("vcl")); - const OUString UiEventsLogger_Impl::LOGGERNAME = OUString::createFromAscii("org.openoffice.oooimprovement.Core.UiEventsLogger"); - const OUString UiEventsLogger_Impl::LOGORIGINWIDGET = OUString::createFromAscii("comphelper.UiEventsLogger.LogOriginWidget"); - const OUString UiEventsLogger_Impl::LOGORIGINAPP = OUString::createFromAscii("comphelper.UiEventsLogger.LogOriginApp"); + const OUString UiEventsLogger_Impl::LOGGERNAME(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.oooimprovement.Core.UiEventsLogger")); + const OUString UiEventsLogger_Impl::LOGORIGINWIDGET(RTL_CONSTASCII_USTRINGPARAM("comphelper.UiEventsLogger.LogOriginWidget")); + const OUString UiEventsLogger_Impl::LOGORIGINAPP(RTL_CONSTASCII_USTRINGPARAM("comphelper.UiEventsLogger.LogOriginApp")); - const OUString UiEventsLogger_Impl::UNKNOWN_ORIGIN = OUString::createFromAscii("unknown origin"); - const OUString UiEventsLogger_Impl::FN_CURRENTLOG = OUString::createFromAscii("Current"); - const OUString UiEventsLogger_Impl::FN_ROTATEDLOG = OUString::createFromAscii("OOoImprove"); - const OUString UiEventsLogger_Impl::LOGROTATE_EVENTNAME = OUString::createFromAscii("onOOoImprovementLogRotated"); + const OUString UiEventsLogger_Impl::UNKNOWN_ORIGIN(RTL_CONSTASCII_USTRINGPARAM("unknown origin")); + const OUString UiEventsLogger_Impl::FN_CURRENTLOG(RTL_CONSTASCII_USTRINGPARAM("Current")); + const OUString UiEventsLogger_Impl::FN_ROTATEDLOG(RTL_CONSTASCII_USTRINGPARAM("OOoImprove")); + const OUString UiEventsLogger_Impl::LOGROTATE_EVENTNAME(RTL_CONSTASCII_USTRINGPARAM("onOOoImprovementLogRotated")); - const OUString UiEventsLogger_Impl::URL_UNO = OUString::createFromAscii(".uno:"); - const OUString UiEventsLogger_Impl::URL_FILE = OUString::createFromAscii("file:"); + const OUString UiEventsLogger_Impl::URL_UNO(RTL_CONSTASCII_USTRINGPARAM(".uno:")); + const OUString UiEventsLogger_Impl::URL_FILE(RTL_CONSTASCII_USTRINGPARAM("file:")); // public UiEventsLogger interface @@ -532,10 +532,10 @@ namespace comphelper // It will call disposing and make sure we clear all our references { Reference xCore( - sm->createInstance(OUString::createFromAscii("com.sun.star.oooimprovement.Core")), + sm->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.Core"))), UNO_QUERY); Reference xDesktop( - sm->createInstance(OUString::createFromAscii("com.sun.star.frame.Desktop")), + sm->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), UNO_QUERY); if(!(xCore.is() && xDesktop.is())) { @@ -568,15 +568,15 @@ namespace comphelper if(m_Formatter.is() && m_LogHandler.is() && m_Logger.is()) { Sequence columns = Sequence(COLUMNS); - columns[0] = OUString::createFromAscii("eventtype"); - columns[1] = OUString::createFromAscii("originapp"); - columns[2] = OUString::createFromAscii("originwidget"); - columns[3] = OUString::createFromAscii("uno url"); - columns[4] = OUString::createFromAscii("parent id"); - columns[5] = OUString::createFromAscii("window type"); - columns[6] = OUString::createFromAscii("id"); - columns[7] = OUString::createFromAscii("method"); - columns[8] = OUString::createFromAscii("parameter"); + columns[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("eventtype")); + columns[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("originapp")); + columns[2] = OUString(RTL_CONSTASCII_USTRINGPARAM("originwidget")); + columns[3] = OUString(RTL_CONSTASCII_USTRINGPARAM("uno url")); + columns[4] = OUString(RTL_CONSTASCII_USTRINGPARAM("parent id")); + columns[5] = OUString(RTL_CONSTASCII_USTRINGPARAM("window type")); + columns[6] = OUString(RTL_CONSTASCII_USTRINGPARAM("id")); + columns[7] = OUString(RTL_CONSTASCII_USTRINGPARAM("method")); + columns[8] = OUString(RTL_CONSTASCII_USTRINGPARAM("parameter")); m_Formatter->setColumnnames(columns); m_LogHandler->setFormatter(Reference(m_Formatter, UNO_QUERY)); m_Logger->setLevel(LogLevel::ALL); @@ -644,7 +644,7 @@ namespace comphelper { Reference sm = getProcessServiceFactory(); Reference core_c( - sm->createInstance(OUString::createFromAscii("com.sun.star.oooimprovement.CoreController")), + sm->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.CoreController"))), UNO_QUERY); if(!core_c.is()) return false; return core_c->enablingUiEventsLoggerAllowed(1); -- cgit From 145cbf35719c6d45baf3bf2bf0241b8eb3804ce8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 25 Oct 2010 20:24:32 +0100 Subject: micro optimization --- comphelper/source/misc/numberedcollection.cxx | 45 +++++++++++++-------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx index da08fa009c2f..e8374efc2e4d 100644 --- a/comphelper/source/misc/numberedcollection.cxx +++ b/comphelper/source/misc/numberedcollection.cxx @@ -46,8 +46,7 @@ namespace css = ::com::sun::star; //_______________________________________________ // definitions -static const ::rtl::OUString ERRMSG_INVALID_COMPONENT_PARAM = ::rtl::OUString::createFromAscii("NULL as component reference not allowed."); -static const ::rtl::OUString ERRMSG_INVALID_NUMBER_PARAM = ::rtl::OUString::createFromAscii("Special valkud INVALID_NUMBER not allowed as input parameter."); +static const ::rtl::OUString ERRMSG_INVALID_COMPONENT_PARAM(RTL_CONSTASCII_USTRINGPARAM("NULL as component reference not allowed.")); //----------------------------------------------- NumberedCollection::NumberedCollection() @@ -130,33 +129,33 @@ void SAL_CALL NumberedCollection::releaseNumber(::sal_Int32 nNumber) // SYNCHRONIZED -> ::osl::ResettableMutexGuard aLock(m_aMutex); - if (nNumber == css::frame::UntitledNumbersConst::INVALID_NUMBER) - throw css::lang::IllegalArgumentException (ERRMSG_INVALID_NUMBER_PARAM, m_xOwner.get(), 1); + if (nNumber == css::frame::UntitledNumbersConst::INVALID_NUMBER) + throw css::lang::IllegalArgumentException (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Special valkud INVALID_NUMBER not allowed as input parameter.")), m_xOwner.get(), 1); - TDeadItemList lDeadItems; - TNumberedItemHash::iterator pComponent; + TDeadItemList lDeadItems; + TNumberedItemHash::iterator pComponent; - for ( pComponent = m_lComponents.begin (); - pComponent != m_lComponents.end (); - ++pComponent ) - { - const TNumberedItem& rItem = pComponent->second; - const css::uno::Reference< css::uno::XInterface > xItem = rItem.xItem.get(); + for ( pComponent = m_lComponents.begin (); + pComponent != m_lComponents.end (); + ++pComponent ) + { + const TNumberedItem& rItem = pComponent->second; + const css::uno::Reference< css::uno::XInterface > xItem = rItem.xItem.get(); - if ( ! xItem.is ()) - { - lDeadItems.push_back(pComponent->first); - continue; - } + if ( ! xItem.is ()) + { + lDeadItems.push_back(pComponent->first); + continue; + } - if (rItem.nNumber == nNumber) - { - m_lComponents.erase (pComponent); - break; - } + if (rItem.nNumber == nNumber) + { + m_lComponents.erase (pComponent); + break; } + } - impl_cleanUpDeadItems(m_lComponents, lDeadItems); + impl_cleanUpDeadItems(m_lComponents, lDeadItems); // <- SYNCHRONIZED } -- cgit From d88b292704957818eff9a348a524b5c90b40031b Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sat, 16 Oct 2010 03:20:00 -0500 Subject: merge vosremoval-mutex.diff In practice the changeset is 'inspired' by vosremoval-mutex.diff but was essentially redone manually --- comphelper/inc/comphelper/ChainablePropertySet.hxx | 9 ++--- comphelper/inc/comphelper/MasterPropertySet.hxx | 9 ++--- comphelper/inc/comphelper/SettingsHelper.hxx | 6 +-- .../source/property/ChainablePropertySet.cxx | 21 +++++------ comphelper/source/property/MasterPropertySet.cxx | 44 +++++++++++----------- comphelper/source/property/genericpropertyset.cxx | 2 +- 6 files changed, 40 insertions(+), 51 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/ChainablePropertySet.hxx b/comphelper/inc/comphelper/ChainablePropertySet.hxx index 5d31b4c43444..1b11005a42c2 100644 --- a/comphelper/inc/comphelper/ChainablePropertySet.hxx +++ b/comphelper/inc/comphelper/ChainablePropertySet.hxx @@ -39,10 +39,7 @@ namespace comphelper { class ChainablePropertySetInfo; } -namespace vos -{ - class IMutex; -} + /* * A ChainablePropertySet has the following features: * @@ -77,7 +74,7 @@ namespace comphelper friend class MasterPropertySet; protected: ChainablePropertySetInfo *mpInfo; - vos::IMutex *mpMutex; + osl::SolarMutex* mpMutex; ::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySetInfo > mxInfo; void lockMutex(); void unlockMutex(); @@ -109,7 +106,7 @@ namespace comphelper throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); public: - ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, vos::IMutex *pMutex = NULL ) + ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, osl::SolarMutex* pMutex = NULL ) throw(); virtual ~ChainablePropertySet() throw(); diff --git a/comphelper/inc/comphelper/MasterPropertySet.hxx b/comphelper/inc/comphelper/MasterPropertySet.hxx index 9eed2ef9eb28..c5e335d6cf67 100644 --- a/comphelper/inc/comphelper/MasterPropertySet.hxx +++ b/comphelper/inc/comphelper/MasterPropertySet.hxx @@ -34,10 +34,7 @@ #include #include "comphelper/comphelperdllapi.h" #include -namespace vos -{ - class IMutex; -} + namespace comphelper { class MasterPropertySetInfo; @@ -72,7 +69,7 @@ namespace comphelper { protected: MasterPropertySetInfo *mpInfo; - vos::IMutex *mpMutex; + osl::SolarMutex* mpMutex; sal_uInt8 mnLastId; SlaveMap maSlaveMap; ::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySetInfo > mxInfo; @@ -106,7 +103,7 @@ namespace comphelper throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); public: - MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, ::vos::IMutex *pMutex = NULL ) + MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, ::osl::SolarMutex* pMutex = NULL ) throw(); virtual ~MasterPropertySet() throw(); diff --git a/comphelper/inc/comphelper/SettingsHelper.hxx b/comphelper/inc/comphelper/SettingsHelper.hxx index 035af6dc4f5c..ed951083df71 100644 --- a/comphelper/inc/comphelper/SettingsHelper.hxx +++ b/comphelper/inc/comphelper/SettingsHelper.hxx @@ -32,10 +32,6 @@ #include #include #include -namespace vos -{ - class IMutex; -} namespace comphelper { @@ -56,7 +52,7 @@ namespace comphelper public ComphelperBase { public: - SettingsHelperNoState ( ComphelperBaseInfo *pInfo, ::vos::IMutex *pMutex = NULL) + SettingsHelperNoState ( ComphelperBaseInfo *pInfo, ::osl::SolarMutex* pMutex = NULL) : ComphelperBase ( pInfo, pMutex ) {} virtual ~SettingsHelperNoState () throw( ) {} diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx index 9ceefb351c21..f77f6fe2e664 100644 --- a/comphelper/source/property/ChainablePropertySet.cxx +++ b/comphelper/source/property/ChainablePropertySet.cxx @@ -30,7 +30,7 @@ #include "precompiled_comphelper.hxx" #include #include -#include +#include #include // STL auto_ptr @@ -41,9 +41,8 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -using ::vos::IMutex; -ChainablePropertySet::ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, vos::IMutex *pMutex ) +ChainablePropertySet::ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, osl::SolarMutex* pMutex ) throw() : mpInfo ( pInfo ) , mpMutex ( pMutex ) @@ -79,9 +78,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValue( const ::rtl::OUString& rPr throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -97,9 +96,9 @@ Any SAL_CALL ChainablePropertySet::getPropertyValue( const ::rtl::OUString& rPro throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -143,9 +142,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValues( const Sequence< ::rtl::OU throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -177,9 +176,9 @@ Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues( const Sequence throw(RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index be1b2b6c3224..be423448e354 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include // STL auto_ptr @@ -42,19 +42,19 @@ class AutoOGuardArray { sal_Int32 nSize; - std::auto_ptr< vos::OGuard > * pGuardArray; + std::auto_ptr< osl::SolarMutexGuard > * pGuardArray; public: AutoOGuardArray( sal_Int32 nNumElements ); ~AutoOGuardArray(); - std::auto_ptr< vos::OGuard > & operator[] ( sal_Int32 i ) { return pGuardArray[i]; } + std::auto_ptr< osl::SolarMutexGuard > & operator[] ( sal_Int32 i ) { return pGuardArray[i]; } }; AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements ) { nSize = nNumElements; - pGuardArray = new std::auto_ptr< vos::OGuard >[ nSize ]; + pGuardArray = new std::auto_ptr< osl::SolarMutexGuard >[ nSize ]; } AutoOGuardArray::~AutoOGuardArray() @@ -72,7 +72,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -using vos::IMutex; + SlaveData::SlaveData ( ChainablePropertySet *pSlave) : mpSlave ( pSlave ) @@ -81,7 +81,7 @@ SlaveData::SlaveData ( ChainablePropertySet *pSlave) { } -MasterPropertySet::MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, IMutex *pMutex ) +MasterPropertySet::MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, osl::SolarMutex* pMutex ) throw() : mpInfo ( pInfo ) , mpMutex ( pMutex ) @@ -130,9 +130,9 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -150,9 +150,9 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard2; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard2; if (pSlave->mpMutex) - pMutexGuard2.reset( new vos::OGuard(pSlave->mpMutex) ); + pMutexGuard2.reset( new osl::SolarMutexGuard(pSlave->mpMutex) ); pSlave->_preSetValues(); pSlave->_setSingleValue( *((*aIter).second->mpInfo), rValue ); @@ -164,9 +164,9 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -185,9 +185,9 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard2; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard2; if (pSlave->mpMutex) - pMutexGuard2.reset( new vos::OGuard(pSlave->mpMutex) ); + pMutexGuard2.reset( new osl::SolarMutexGuard(pSlave->mpMutex) ); pSlave->_preGetValues(); pSlave->_getSingleValue( *((*aIter).second->mpInfo), aAny ); @@ -225,9 +225,9 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< ::rtl::OUStr throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -264,7 +264,7 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< ::rtl::OUStr { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). if (pSlave->mpSlave->mpMutex) - aOGuardArray[i].reset( new vos::OGuard(pSlave->mpSlave->mpMutex) ); + aOGuardArray[i].reset( new osl::SolarMutexGuard(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preSetValues(); pSlave->SetInit ( sal_True ); @@ -291,9 +291,9 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< : throw(RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -329,7 +329,7 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< : { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). if (pSlave->mpSlave->mpMutex) - aOGuardArray[i].reset( new vos::OGuard(pSlave->mpSlave->mpMutex) ); + aOGuardArray[i].reset( new osl::SolarMutexGuard(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preGetValues(); pSlave->SetInit ( sal_True ); @@ -392,9 +392,9 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const ::rtl::OUStrin ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (pSlave->mpMutex) - pMutexGuard.reset( new vos::OGuard(pSlave->mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(pSlave->mpMutex) ); pSlave->_preGetPropertyState(); pSlave->_getPropertyState( *((*aIter).second->mpInfo), aState ); diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx index 888a238aca1a..123e9ef2f784 100644 --- a/comphelper/source/property/genericpropertyset.cxx +++ b/comphelper/source/property/genericpropertyset.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include -- cgit From c21186c38d1bed344cc95ce7572f0d7366186ab2 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Wed, 20 Oct 2010 06:26:34 -0500 Subject: rename osl::SolarMutexGuard -> SolarGuard to avoid namespace ambiguity --- .../source/property/ChainablePropertySet.cxx | 16 ++++----- comphelper/source/property/MasterPropertySet.cxx | 38 +++++++++++----------- 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx index f77f6fe2e664..a8329919502d 100644 --- a/comphelper/source/property/ChainablePropertySet.cxx +++ b/comphelper/source/property/ChainablePropertySet.cxx @@ -78,9 +78,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValue( const ::rtl::OUString& rPr throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -96,9 +96,9 @@ Any SAL_CALL ChainablePropertySet::getPropertyValue( const ::rtl::OUString& rPro throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -142,9 +142,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValues( const Sequence< ::rtl::OU throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -176,9 +176,9 @@ Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues( const Sequence throw(RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index be423448e354..253c46ada1cf 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -42,19 +42,19 @@ class AutoOGuardArray { sal_Int32 nSize; - std::auto_ptr< osl::SolarMutexGuard > * pGuardArray; + std::auto_ptr< osl::SolarGuard > * pGuardArray; public: AutoOGuardArray( sal_Int32 nNumElements ); ~AutoOGuardArray(); - std::auto_ptr< osl::SolarMutexGuard > & operator[] ( sal_Int32 i ) { return pGuardArray[i]; } + std::auto_ptr< osl::SolarGuard > & operator[] ( sal_Int32 i ) { return pGuardArray[i]; } }; AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements ) { nSize = nNumElements; - pGuardArray = new std::auto_ptr< osl::SolarMutexGuard >[ nSize ]; + pGuardArray = new std::auto_ptr< osl::SolarGuard >[ nSize ]; } AutoOGuardArray::~AutoOGuardArray() @@ -130,9 +130,9 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -150,9 +150,9 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard2; + std::auto_ptr< osl::SolarGuard > pMutexGuard2; if (pSlave->mpMutex) - pMutexGuard2.reset( new osl::SolarMutexGuard(pSlave->mpMutex) ); + pMutexGuard2.reset( new osl::SolarGuard(pSlave->mpMutex) ); pSlave->_preSetValues(); pSlave->_setSingleValue( *((*aIter).second->mpInfo), rValue ); @@ -164,9 +164,9 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -185,9 +185,9 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard2; + std::auto_ptr< osl::SolarGuard > pMutexGuard2; if (pSlave->mpMutex) - pMutexGuard2.reset( new osl::SolarMutexGuard(pSlave->mpMutex) ); + pMutexGuard2.reset( new osl::SolarGuard(pSlave->mpMutex) ); pSlave->_preGetValues(); pSlave->_getSingleValue( *((*aIter).second->mpInfo), aAny ); @@ -225,9 +225,9 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< ::rtl::OUStr throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -264,7 +264,7 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< ::rtl::OUStr { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). if (pSlave->mpSlave->mpMutex) - aOGuardArray[i].reset( new osl::SolarMutexGuard(pSlave->mpSlave->mpMutex) ); + aOGuardArray[i].reset( new osl::SolarGuard(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preSetValues(); pSlave->SetInit ( sal_True ); @@ -291,9 +291,9 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< : throw(RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -329,7 +329,7 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< : { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). if (pSlave->mpSlave->mpMutex) - aOGuardArray[i].reset( new osl::SolarMutexGuard(pSlave->mpSlave->mpMutex) ); + aOGuardArray[i].reset( new osl::SolarGuard(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preGetValues(); pSlave->SetInit ( sal_True ); @@ -392,9 +392,9 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const ::rtl::OUStrin ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (pSlave->mpMutex) - pMutexGuard.reset( new osl::SolarMutexGuard(pSlave->mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(pSlave->mpMutex) ); pSlave->_preGetPropertyState(); pSlave->_getPropertyState( *((*aIter).second->mpInfo), aState ); -- cgit From 854ff7bfc802d47d2a7419f7185af069a216b0bd Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Wed, 20 Oct 2010 19:21:50 -0500 Subject: remvove vos/macros.h usage --- comphelper/source/eventattachermgr/eventattachermgr.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 7f24a8691ddd..0e37c7a02e5e 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -36,7 +36,6 @@ #endif #include #include -#include #include #include #include -- cgit From 08be4cfe51342b5b08511951b9c5ff13b3eeee8d Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Thu, 21 Oct 2010 15:46:17 -0500 Subject: convert vos/process.hxx and related API --- comphelper/source/misc/regpathhelper.cxx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx index 5b4fc8b88cdf..898d1224b091 100644 --- a/comphelper/source/misc/regpathhelper.cxx +++ b/comphelper/source/misc/regpathhelper.cxx @@ -33,12 +33,11 @@ #include #include #include -#include +#include #include #include #include -using namespace vos; using namespace osl; using namespace rtl; @@ -66,18 +65,17 @@ namespace comphelper */ static sal_Bool retrievePortalUserDir( OUString *pDirectory ) { - OStartupInfo startInfo; - sal_uInt32 nArgs = startInfo.getCommandArgCount(); + sal_uInt32 nArgs = osl_getCommandArgCount(); sal_Bool bIsPortalUser = sal_False; OUString sArg; while( nArgs > 0 ) - { - if ( !startInfo.getCommandArg(--nArgs, sArg) ) - { + { + if ( !osl_getCommandArg(--nArgs, &sArg.pData) ) + { if ( sArg.indexOf(OUString::createFromAscii("-userid")) == 0 ) { - bIsPortalUser = sal_True; + bIsPortalUser = sal_True; sal_Int32 nStart = sArg.lastIndexOf( '[' ); sal_Int32 nEnd = sArg.lastIndexOf( ']' ); if( -1 == nStart || -1 == nEnd || nEnd < nStart) @@ -189,8 +187,7 @@ OUString getPathToSystemRegistry() FILE *f=NULL; // search in the directory of the executable - OStartupInfo info; - if( OStartupInfo::E_None == info.getExecutableFile(uBuffer) ) + if(osl_Process_E_None == osl_getExecutableFile(&uBuffer.pData)) { sal_uInt32 lastIndex = uBuffer.lastIndexOf(PATH_DELEMITTER); if (lastIndex > 0) -- cgit From ab9eecc53a6f87ccb6004e21c44d73b5f6e1ec1f Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Thu, 21 Oct 2010 17:34:55 -0500 Subject: Finally, gut the vos module out of the build --- comphelper/prj/build.lst | 2 +- comphelper/util/makefile.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst index 9d44807c9cc3..a38f99985379 100644 --- a/comphelper/prj/build.lst +++ b/comphelper/prj/build.lst @@ -1,4 +1,4 @@ -ph comphelper : cppuhelper ucbhelper offuh vos salhelper NULL +ph comphelper : cppuhelper ucbhelper offuh salhelper NULL ph comphelper usr1 - all ph_mkout NULL ph comphelper\inc nmake - all ph_inc NULL ph comphelper\source\container nmake - all ph_container ph_inc NULL diff --git a/comphelper/util/makefile.mk b/comphelper/util/makefile.mk index ae391e92abf7..33dcfbf98625 100644 --- a/comphelper/util/makefile.mk +++ b/comphelper/util/makefile.mk @@ -54,7 +54,7 @@ SHL1STDLIBS= \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(UCBHELPERLIB) \ - $(VOSLIB) + SHL1DEPN= SHL1IMPLIB= i$(COMPHLP_TARGET) -- cgit From 08cbfebc045715334701b2a7f318d10256499d50 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 27 Oct 2010 12:30:13 +0100 Subject: add modelines to .h and .c files as well --- comphelper/inc/comphelper/comphelperdllapi.h | 2 ++ comphelper/inc/comphelper/fileformat.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/comphelperdllapi.h b/comphelper/inc/comphelper/comphelperdllapi.h index d7bd80d8a16d..32c86f8fd3b7 100644 --- a/comphelper/inc/comphelper/comphelperdllapi.h +++ b/comphelper/inc/comphelper/comphelperdllapi.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #ifndef INCLUDED_COMPHELPERDLLAPI_H #define INCLUDED_COMPHELPERDLLAPI_H @@ -12,3 +13,4 @@ #endif /* INCLUDED_COMPHELPERDLLAPI_H */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/inc/comphelper/fileformat.h b/comphelper/inc/comphelper/fileformat.h index 65f37a2551b7..7b047e73d349 100644 --- a/comphelper/inc/comphelper/fileformat.h +++ b/comphelper/inc/comphelper/fileformat.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,3 +40,4 @@ #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From b35a7344eda5eaa1e0dcf916b48d8cf089db5562 Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Wed, 10 Nov 2010 09:45:11 +0100 Subject: Docx Export: fixed some elements ordering problem Nested elements that weren't in the order sequence weren't appended to the parent... and then skipped. --- comphelper/inc/comphelper/sequenceasvector.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/sequenceasvector.hxx b/comphelper/inc/comphelper/sequenceasvector.hxx index 6fb303f0d36f..a68fa2093116 100644 --- a/comphelper/inc/comphelper/sequenceasvector.hxx +++ b/comphelper/inc/comphelper/sequenceasvector.hxx @@ -68,6 +68,11 @@ class SequenceAsVector : public ::std::vector< TElementType > types from the base! */ typedef typename ::std::vector< TElementType >::const_iterator const_iterator; + //--------------------------------------- + /** @short When inheriting from a template using typename is generally required when using + types from the base! */ + typedef typename ::std::vector< TElementType >::iterator iterator; + //------------------------------------------- // interface public: -- cgit From 908b4d33af9361ace4f50f4609e19604bb57e64f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 17 Nov 2010 09:46:02 +0000 Subject: remove archaic SGI header guards --- comphelper/inc/comphelper/propertycontainerhelper.hxx | 2 -- comphelper/inc/comphelper/stl_types.hxx | 4 ---- comphelper/source/container/IndexedPropertyValuesContainer.cxx | 2 -- 3 files changed, 8 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/propertycontainerhelper.hxx b/comphelper/inc/comphelper/propertycontainerhelper.hxx index 42bfe1f2de8e..e6439ea34e96 100644 --- a/comphelper/inc/comphelper/propertycontainerhelper.hxx +++ b/comphelper/inc/comphelper/propertycontainerhelper.hxx @@ -32,9 +32,7 @@ #include #include #include -#ifndef __SGI_STL_VECTOR #include -#endif #include "comphelper/comphelperdllapi.h" //......................................................................... diff --git a/comphelper/inc/comphelper/stl_types.hxx b/comphelper/inc/comphelper/stl_types.hxx index 89f0e023f0c1..4f6583192716 100644 --- a/comphelper/inc/comphelper/stl_types.hxx +++ b/comphelper/inc/comphelper/stl_types.hxx @@ -28,8 +28,6 @@ #ifndef _COMPHELPER_STLTYPES_HXX_ #define _COMPHELPER_STLTYPES_HXX_ -#if !defined(__SGI_STL_VECTOR_H) || !defined(__SGI_STL_MAP_H) || !defined(__SGI_STL_MULTIMAP_H) - #include #include @@ -277,8 +275,6 @@ OutputIter intersperse( typedef ::std::set< valuetype, comparefct > classname; \ DECLARE_STL_ITERATORS(classname) \ -#endif - #endif // _COMPHELPER_STLTYPES_HXX_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx index d5a7129911b0..78a453e96466 100644 --- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx +++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx @@ -39,9 +39,7 @@ #include -#ifndef __SGI_STL_VECTOR #include -#endif using namespace com::sun::star; -- cgit From 3b1e371c5721f35f7ed0ff4da27548fc5f869861 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 17 Nov 2010 11:55:14 +0000 Subject: micro-optimize, drop unused headers and lose some unused symbols --- comphelper/source/property/genericpropertyset.cxx | 3 --- 1 file changed, 3 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx index 123e9ef2f784..886530276abf 100644 --- a/comphelper/source/property/genericpropertyset.cxx +++ b/comphelper/source/property/genericpropertyset.cxx @@ -39,9 +39,6 @@ #include #include #include -#include -#include -#include /////////////////////////////////////////////////////////////////////// -- cgit From 24c53573f27cf1726dd53fd0119e9418450ad1a3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 17 Nov 2010 12:14:38 +0000 Subject: unused header --- comphelper/source/misc/uieventslogger.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx index 1ddf413fc009..ff7fc5210448 100644 --- a/comphelper/source/misc/uieventslogger.cxx +++ b/comphelper/source/misc/uieventslogger.cxx @@ -29,7 +29,6 @@ #include "precompiled_comphelper.hxx" #include -#include #include #include #include -- cgit From edf99f8800d077ed1c2faabc59172bb7e6cb2fcc Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 17 Nov 2010 13:13:07 +0000 Subject: drop unused methods --- comphelper/inc/comphelper/locale.hxx | 55 ------ comphelper/source/misc/locale.cxx | 334 ----------------------------------- 2 files changed, 389 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/locale.hxx b/comphelper/inc/comphelper/locale.hxx index 317d74ae740f..85821dd28a89 100644 --- a/comphelper/inc/comphelper/locale.hxx +++ b/comphelper/inc/comphelper/locale.hxx @@ -70,40 +70,8 @@ class COMPHELPER_DLLPUBLIC Locale /** @short some predefined Locale objects. */ static const Locale EN_US(); - static const Locale EN(); - static const Locale DE_DE(); - static const Locale DE_CH(); - static const Locale DE_AT(); - static const Locale AR(); - static const Locale CA(); - static const Locale CS(); - static const Locale DA(); - static const Locale EL(); - static const Locale ES(); - static const Locale FI(); - static const Locale FR(); - static const Locale HE(); - static const Locale HI_IN(); - static const Locale HU(); - static const Locale IT(); - static const Locale JA(); - static const Locale KO(); - static const Locale NL(); - static const Locale PL(); - static const Locale PT(); - static const Locale PT_BR(); - static const Locale RU(); - static const Locale SK(); - static const Locale SL(); - static const Locale SV(); - static const Locale TH(); - static const Locale TR(); static const Locale X_DEFAULT(); - static const Locale X_COMMENT(); - static const Locale X_TRANSLATE(); static const Locale X_NOTRANSLATE(); - static const Locale ZH_CN(); - static const Locale ZH_TW(); //------------------------------------------- // types @@ -380,29 +348,6 @@ class COMPHELPER_DLLPUBLIC Locale const ::rtl::OUString& sReferenceISO) throw(MalFormedLocaleException); - //--------------------------------------- - /** @short search for the next possible fallback locale. - - @descr Instead of getFallback(vector<>, string) this method - uses the given locale and decide by using an algorithm - which locale can be the next possible one. - - Algorithm: - - if locale has country return language only - - if locale different "en-US" return "en-US" - - if locale "en-US" return "en" - - @param aLocale [in/out]! - the incoming value will be used to start - search for a possible fallback ... - and in case such fallback was found this parameter - will be used for return too. - - @return TRUE if the parameter aLocale contains a new fallback value; - FALSE otherwise. - */ - static sal_Bool getFallback(Locale& aLocale); - //--------------------------------------- /** @short assign elements of another locale to this instance. diff --git a/comphelper/source/misc/locale.cxx b/comphelper/source/misc/locale.cxx index d6fa3873110d..0a791c41582c 100644 --- a/comphelper/source/misc/locale.cxx +++ b/comphelper/source/misc/locale.cxx @@ -53,15 +53,6 @@ const Locale Locale::X_DEFAULT() return aLocale; } -//----------------------------------------------- -const Locale Locale::EN() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), - ::rtl::OUString()); - return aLocale; -} - //----------------------------------------------- const Locale Locale::EN_US() { @@ -71,267 +62,6 @@ const Locale Locale::EN_US() return aLocale; } -//----------------------------------------------- -const Locale Locale::DE_DE() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE"))); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::DE_CH() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CH"))); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::DE_AT() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AT"))); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::AR() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ar")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::CA() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ca")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::CS() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cs")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::DA() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("da")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::EL() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("el")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::ES() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("es")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::FI() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fi")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::FR() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fr")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::HE() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("he")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::HI_IN() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hi")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IN"))); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::HU() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hu")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::IT() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("it")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::JA() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ja")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::KO() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ko")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::NL() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nl")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::PL() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pl")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::PT() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pt")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::PT_BR() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pt")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BR"))); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::RU() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ru")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::SK() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sk")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::SL() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sl")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::SV() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sv")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::TH() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("th")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::TR() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("tr")), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::X_COMMENT() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("comment"))); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::X_TRANSLATE() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("translate"))); - return aLocale; -} - //----------------------------------------------- const Locale Locale::X_NOTRANSLATE() { @@ -341,24 +71,6 @@ const Locale Locale::X_NOTRANSLATE() return aLocale; } -//----------------------------------------------- -const Locale Locale::ZH_CN() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zh")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CN"))); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::ZH_TW() -{ - static Locale aLocale( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zh")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TW"))); - return aLocale; -} - //----------------------------------------------- Locale::Locale(const ::rtl::OUString& sISO) throw(Locale::MalFormedLocaleException) @@ -611,52 +323,6 @@ sal_Bool Locale::similar(const Locale& aComparable) const return lISOList.end(); } -//----------------------------------------------- -sal_Bool Locale::getFallback(Locale& aLocale) -{ - // a) - // this was our last fallback! - // break any further calls to this method ... - if (aLocale.equals(X_NOTRANSLATE())) - return sal_False; - - // b) - // switch from X_DEFAULT to X_NOTRANSLATE - // next time we will go to a) - if (aLocale.equals(X_DEFAULT())) - { - aLocale = X_NOTRANSLATE(); - return sal_True; - } - - // c) - // switch from EN to X_DEFAULT - // next time we will go to b) - if (aLocale.equals(EN())) - { - aLocale = X_DEFAULT(); - return sal_True; - } - - // d) remove country from incoming locale - // e.g. "de-DE" => "de" or "en-US" => "en"! - if (aLocale.getCountry().getLength()) - { - aLocale.setCountry(::rtl::OUString()); - return sal_True; - } - - // e) "en-US" possible? - if (!aLocale.equals(EN_US())) - { - aLocale = EN_US(); - return sal_True; - } - - // f) no more fallbacks - return sal_False; -} - //----------------------------------------------- void Locale::operator=(const Locale& rCopy) { -- cgit From 6fb8e13b45e018202fd62142bde7fc022e906ed7 Mon Sep 17 00:00:00 2001 From: Kevin Hunter Date: Fri, 19 Nov 2010 15:13:10 -0500 Subject: EasyHack: RTL conversion from createFromAscii --- comphelper/source/compare/AnyCompareFactory.cxx | 4 +- .../source/eventattachermgr/eventattachermgr.cxx | 8 +-- comphelper/source/misc/mediadescriptor.cxx | 12 ++-- comphelper/source/misc/mimeconfighelper.cxx | 72 +++++++++++----------- comphelper/source/misc/numbers.cxx | 4 +- comphelper/source/misc/officerestartmanager.cxx | 2 +- comphelper/source/misc/regpathhelper.cxx | 2 +- comphelper/source/misc/sequenceashashmap.cxx | 8 +-- comphelper/source/misc/storagehelper.cxx | 8 +-- comphelper/source/misc/string.cxx | 2 +- .../source/property/propertystatecontainer.cxx | 8 +-- comphelper/test/uno_iterators/uno_iterators.cxx | 6 +- 12 files changed, 68 insertions(+), 68 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx index 04152c8156cf..787c68d97a18 100644 --- a/comphelper/source/compare/AnyCompareFactory.cxx +++ b/comphelper/source/compare/AnyCompareFactory.cxx @@ -65,7 +65,7 @@ public: if ( xFactory.is() ) { m_rCollator = Reference< XCollator >( - xFactory->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.i18n.Collator" ), xContext ), + xFactory->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.Collator" )), xContext ), UNO_QUERY ); m_rCollator->loadDefaultCollator( rLocale, 0 ); //??? @@ -133,7 +133,7 @@ Reference< XAnyCompare > SAL_CALL AnyCompareFactory::createAnyCompareByName( con // for now only OUString properties compare is implemented // so no check for the property name is done - if( aPropertyName.equals( OUString::createFromAscii( "Title" ) ) ) + if( aPropertyName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" )) ) ) return m_rAnyCompare; return Reference< XAnyCompare >(); diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 0e37c7a02e5e..744a6436bda6 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -381,7 +381,7 @@ Reference< XEventAttacherManager > createEventAttacherManager( const Reference< { if ( rSMgr.is() ) { - Reference< XInterface > xIFace( rSMgr->createInstance( OUString::createFromAscii("com.sun.star.beans.Introspection") ) ); + Reference< XInterface > xIFace( rSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.beans.Introspection" )) ) ); if ( xIFace.is() ) { Reference< XIntrospection > xIntrospection( xIFace, UNO_QUERY); @@ -401,12 +401,12 @@ ImplEventAttacherManager::ImplEventAttacherManager( const Reference< XIntrospect { if ( rSMgr.is() ) { - Reference< XInterface > xIFace( rSMgr->createInstance( OUString::createFromAscii("com.sun.star.script.EventAttacher") ) ); + Reference< XInterface > xIFace( rSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.EventAttacher" )) ) ); if ( xIFace.is() ) { xAttacher = Reference< XEventAttacher >::query( xIFace ); } - xIFace = rSMgr->createInstance( OUString::createFromAscii("com.sun.star.script.Converter") ); + xIFace = rSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.Converter" )) ); if ( xIFace.is() ) { xConverter = Reference< XTypeConverter >::query( xIFace ); @@ -433,7 +433,7 @@ Reference< XIdlReflection > ImplEventAttacherManager::getReflection() throw( Exc // Haben wir den Service schon? Sonst anlegen if( !mxCoreReflection.is() ) { - Reference< XInterface > xIFace( mxSMgr->createInstance( OUString::createFromAscii("com.sun.star.reflection.CoreReflection") ) ); + Reference< XInterface > xIFace( mxSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.reflection.CoreReflection" )) ) ); mxCoreReflection = Reference< XIdlReflection >( xIFace, UNO_QUERY); } return mxCoreReflection; diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 83f54ff027ea..a9be31ae2d1b 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -419,8 +419,8 @@ MediaDescriptor::MediaDescriptor(const css::uno::Sequence< css::beans::NamedValu -----------------------------------------------*/ sal_Bool MediaDescriptor::isStreamReadOnly() const { - static ::rtl::OUString CONTENTSCHEME_FILE = ::rtl::OUString::createFromAscii("file"); - static ::rtl::OUString CONTENTPROP_ISREADONLY = ::rtl::OUString::createFromAscii("IsReadOnly"); + static ::rtl::OUString CONTENTSCHEME_FILE( RTL_CONSTASCII_USTRINGPARAM( "file" )); + static ::rtl::OUString CONTENTPROP_ISREADONLY( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" )); static sal_Bool READONLY_FALLBACK = sal_False; sal_Bool bReadOnly = READONLY_FALLBACK; @@ -591,7 +591,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool bLockFile ) ::rtl::OUString sURL = getUnpackedValueOrDefault(MediaDescriptor::PROP_URL(), ::rtl::OUString()); if (!sURL.getLength()) throw css::uno::Exception( - ::rtl::OUString::createFromAscii("Found no URL."), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Found no URL." )), css::uno::Reference< css::uno::XInterface >()); // Parse URL! Only the main part has to be used further. E.g. a jumpmark can make trouble @@ -622,7 +622,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference { if ( !_rxPostData.is() ) throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("Found invalid PostData."), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Found invalid PostData." )), css::uno::Reference< css::uno::XInterface >(), 1); // PostData can't be used in read/write mode! @@ -640,7 +640,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference ::rtl::OUString sMediaType = getUnpackedValueOrDefault(MediaDescriptor::PROP_MEDIATYPE(), ::rtl::OUString()); if (!sMediaType.getLength()) { - sMediaType = ::rtl::OUString::createFromAscii("application/x-www-form-urlencoded"); + sMediaType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/x-www-form-urlencoded" )); (*this)[MediaDescriptor::PROP_MEDIATYPE()] <<= sMediaType; } @@ -842,7 +842,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const ::rtl::OUString& sURL, s it parses the URL in another way. It's main part isnt enough and it's complete part contains the jumpmark (fragment) parameter ... */ - static ::rtl::OUString SERVICENAME_URIREFERENCEFACTORY = ::rtl::OUString::createFromAscii("com.sun.star.uri.UriReferenceFactory"); + static ::rtl::OUString SERVICENAME_URIREFERENCEFACTORY( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uri.UriReferenceFactory" )); try { diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index a61e8a36a27c..fc3093f24525 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -59,7 +59,7 @@ MimeConfigurationHelper::MimeConfigurationHelper( const uno::Reference< lang::XM for ( sal_Int32 nInd = 0; nInd < aClassID.getLength(); nInd++ ) { if ( nInd == 4 || nInd == 6 || nInd == 8 || nInd == 10 ) - aResult += ::rtl::OUString::createFromAscii( "-" ); + aResult += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "-" )); sal_Int32 nDigit1 = (sal_Int32)( (sal_uInt8)aClassID[nInd] / 16 ); sal_Int32 nDigit2 = (sal_uInt8)aClassID[nInd] % 16; @@ -132,18 +132,18 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetConfigurati if ( !m_xConfigProvider.is() ) m_xConfigProvider = uno::Reference< lang::XMultiServiceFactory >( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ) ), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" )) ), uno::UNO_QUERY_THROW ); uno::Sequence< uno::Any > aArgs( 1 ); beans::PropertyValue aPathProp; - aPathProp.Name = ::rtl::OUString::createFromAscii( "nodepath" ); + aPathProp.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" )); aPathProp.Value <<= aPath; aArgs[0] <<= aPathProp; xConfig = uno::Reference< container::XNameAccess >( m_xConfigProvider->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" ), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )), aArgs ), uno::UNO_QUERY ); } @@ -160,7 +160,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetObjConfigur if ( !m_xObjectConfig.is() ) m_xObjectConfig = GetConfigurationByPath( - ::rtl::OUString::createFromAscii( "/org.openoffice.Office.Embedding/Objects" ) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Embedding/Objects" )) ); return m_xObjectConfig; } @@ -172,7 +172,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetVerbsConfig if ( !m_xVerbsConfig.is() ) m_xVerbsConfig = GetConfigurationByPath( - ::rtl::OUString::createFromAscii( "/org.openoffice.Office.Embedding/Verbs" ) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Embedding/Verbs" )) ); return m_xVerbsConfig; } @@ -184,7 +184,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo if ( !m_xMediaTypeConfig.is() ) m_xMediaTypeConfig = GetConfigurationByPath( - ::rtl::OUString::createFromAscii( "/org.openoffice.Office.Embedding/MimeTypeClassIDRelations" ) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Embedding/MimeTypeClassIDRelations" )) ); return m_xMediaTypeConfig; } @@ -196,7 +196,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo try { uno::Reference< container::XNameAccess > xFilterFactory( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), + m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ), uno::UNO_QUERY_THROW ); uno::Any aFilterAnyData = xFilterFactory->getByName( aFilterName ); @@ -219,7 +219,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo { uno::Reference< container::XContainerQuery > xTypeCFG( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ) ), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" )) ), uno::UNO_QUERY ); if ( xTypeCFG.is() ) @@ -228,7 +228,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo { // make query for all types matching the properties uno::Sequence < beans::NamedValue > aSeq( 1 ); - aSeq[0].Name = ::rtl::OUString::createFromAscii( "MediaType" ); + aSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" )); aSeq[0].Value <<= aMediaType; uno::Reference < container::XEnumeration > xEnum = xTypeCFG->createSubSetEnumerationByProperties( aSeq ); @@ -271,10 +271,10 @@ sal_Bool MimeConfigurationHelper::GetVerbByShortcut( const ::rtl::OUString& aVer if ( xVerbsConfig.is() && ( xVerbsConfig->getByName( aVerbShortcut ) >>= xVerbsProps ) && xVerbsProps.is() ) { embed::VerbDescriptor aTempDescr; - if ( ( xVerbsProps->getByName( ::rtl::OUString::createFromAscii( "VerbID" ) ) >>= aTempDescr.VerbID ) - && ( xVerbsProps->getByName( ::rtl::OUString::createFromAscii( "VerbUIName" ) ) >>= aTempDescr.VerbName ) - && ( xVerbsProps->getByName( ::rtl::OUString::createFromAscii( "VerbFlags" ) ) >>= aTempDescr.VerbFlags ) - && ( xVerbsProps->getByName( ::rtl::OUString::createFromAscii( "VerbAttributes" ) ) >>= aTempDescr.VerbAttributes ) ) + if ( ( xVerbsProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VerbID" )) ) >>= aTempDescr.VerbID ) + && ( xVerbsProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VerbUIName" )) ) >>= aTempDescr.VerbName ) + && ( xVerbsProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VerbFlags" )) ) >>= aTempDescr.VerbFlags ) + && ( xVerbsProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VerbAttributes" )) ) >>= aTempDescr.VerbAttributes ) ) { aDescriptor = aTempDescr; bResult = sal_True; @@ -302,7 +302,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjPropsFromConfi uno::Sequence< ::rtl::OUString > aObjPropNames = xObjectProps->getElementNames(); aResult.realloc( aObjPropNames.getLength() + 1 ); - aResult[0].Name = ::rtl::OUString::createFromAscii( "ClassID" ); + aResult[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassID" )); aResult[0].Value <<= aClassID; for ( sal_Int32 nInd = 0; nInd < aObjPropNames.getLength(); nInd++ ) @@ -366,9 +366,9 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByStri if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_DUMMY_CLASSID ) ) ) { aObjProps.realloc(2); - aObjProps[0].Name = ::rtl::OUString::createFromAscii("ObjectFactory"); - aObjProps[0].Value <<= ::rtl::OUString::createFromAscii("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"); - aObjProps[1].Name = ::rtl::OUString::createFromAscii("ClassID"); + aObjProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectFactory" )); + aObjProps[0].Value <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory" )); + aObjProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassID" )); aObjProps[1].Value <<= aClassID; return aObjProps; } @@ -399,9 +399,9 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByClas if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_DUMMY_CLASSID ) ) ) { aObjProps.realloc(2); - aObjProps[0].Name = ::rtl::OUString::createFromAscii("ObjectFactory"); - aObjProps[0].Value <<= ::rtl::OUString::createFromAscii("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"); - aObjProps[1].Name = ::rtl::OUString::createFromAscii("ClassID"); + aObjProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectFactory" )); + aObjProps[0].Value <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory" )); + aObjProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassID" )); aObjProps[1].Value <<= aClassID; } @@ -466,7 +466,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu if ( ( xObjConfig->getByName( aClassIDs[nInd] ) >>= xObjectProps ) && xObjectProps.is() && ( xObjectProps->getByName( - ::rtl::OUString::createFromAscii( "ObjectDocumentServiceName" ) ) >>= aEntryDocName ) + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectDocumentServiceName" )) ) >>= aEntryDocName ) && aEntryDocName.equals( aDocName ) ) { return GetObjPropsFromConfigEntry( GetSequenceClassIDRepresentation( aClassIDs[nInd] ), @@ -500,13 +500,13 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu try { if ( xObjConfig.is() && ( xObjConfig->getByName( aStringClassID.toAsciiUpperCase() ) >>= xObjectProps ) && xObjectProps.is() ) - xObjectProps->getByName( ::rtl::OUString::createFromAscii( "ObjectFactory" ) ) >>= aResult; + xObjectProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectFactory" )) ) >>= aResult; } catch( uno::Exception& ) { uno::Sequence< sal_Int8 > aClassID = GetSequenceClassIDRepresentation( aStringClassID ); if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_DUMMY_CLASSID ) ) ) - return ::rtl::OUString::createFromAscii("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"); + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory" )); } } @@ -533,10 +533,10 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu if ( ( xObjConfig->getByName( aClassIDs[nInd] ) >>= xObjectProps ) && xObjectProps.is() && ( xObjectProps->getByName( - ::rtl::OUString::createFromAscii( "ObjectDocumentServiceName" ) ) >>= aEntryDocName ) + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectDocumentServiceName" )) ) >>= aEntryDocName ) && aEntryDocName.equals( aDocName ) ) { - xObjectProps->getByName( ::rtl::OUString::createFromAscii( "ObjectFactory" ) ) >>= aResult; + xObjectProps->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectFactory" )) ) >>= aResult; break; } } @@ -581,7 +581,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu // filter name is not specified, so type detection should be done uno::Reference< document::XTypeDetection > xTypeDetection( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ) ), + m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" )) ), uno::UNO_QUERY ); if ( !xTypeDetection.is() ) @@ -602,7 +602,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu { sal_Int32 nOldLen = aMediaDescr.getLength(); aMediaDescr.realloc( nOldLen + 1 ); - aMediaDescr[nOldLen].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aMediaDescr[nOldLen].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aMediaDescr[ nOldLen ].Value <<= aFilterName; } @@ -619,7 +619,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu { sal_Int32 nOldLen = aMediaDescr.getLength(); aMediaDescr.realloc( nOldLen + 1 ); - aMediaDescr[nOldLen].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aMediaDescr[nOldLen].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aMediaDescr[ nOldLen ].Value = aTypes[nInd].Value; break; } @@ -659,7 +659,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu { sal_Int32 nOldLen = aMediaDescr.getLength(); aMediaDescr.realloc( nOldLen + 1 ); - aMediaDescr[nOldLen].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); + aMediaDescr[nOldLen].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentService" )); aMediaDescr[nOldLen].Value <<= aDocName; } @@ -675,7 +675,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( try { uno::Reference< container::XNameAccess > xFilterFactory( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), + m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ), uno::UNO_QUERY_THROW ); uno::Any aFilterAnyData = xFilterFactory->getByName( aFilterName ); @@ -710,13 +710,13 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( try { uno::Reference< container::XContainerQuery > xFilterQuery( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), + m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ), uno::UNO_QUERY_THROW ); uno::Sequence< beans::NamedValue > aSearchRequest( 2 ); - aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); + aSearchRequest[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentService" )); aSearchRequest[0].Value <<= aServiceName; - aSearchRequest[1].Name = ::rtl::OUString::createFromAscii( "FileFormatVersion" ); + aSearchRequest[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FileFormatVersion" )); aSearchRequest[1].Value <<= nVersion; uno::Sequence< beans::PropertyValue > aFilterProps; @@ -731,7 +731,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( if ( xFilterEnum->nextElement() >>= aProps ) { SequenceAsHashMap aPropsHM( aProps ); - sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), + sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Flags" )), (sal_Int32)0 ); // that should be import, export, own filter and not a template filter ( TemplatePath flag ) @@ -740,7 +740,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( // if there are more than one filter the preffered one should be used // if there is no preffered filter the first one will be used if ( !aResult.getLength() || ( nFlags & 0x10000000L ) ) - aResult = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Name" ), + aResult = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" )), ::rtl::OUString() ); if ( nFlags & 0x10000000L ) break; // the preffered filter was found diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx index a011964b91fa..d86bef05f21a 100644 --- a/comphelper/source/misc/numbers.cxx +++ b/comphelper/source/misc/numbers.cxx @@ -53,7 +53,7 @@ sal_Int16 getNumberFormatType(const staruno::Reference { staruno::Reference xFormat(xFormats->getByKey(nKey)); if (xFormat.is()) - xFormat->getPropertyValue(rtl::OUString::createFromAscii("Type")) >>= nReturn; + xFormat->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" ))) >>= nReturn; } catch(...) { @@ -83,7 +83,7 @@ staruno::Any getNumberFormatDecimals(const staruno::Reference xFormat( xFormats->getByKey(nKey)); if (xFormat.is()) { - static ::rtl::OUString PROPERTY_DECIMALS = ::rtl::OUString::createFromAscii("Decimals"); + static ::rtl::OUString PROPERTY_DECIMALS( RTL_CONSTASCII_USTRINGPARAM( "Decimals" )); return xFormat->getPropertyValue(PROPERTY_DECIMALS); } } diff --git a/comphelper/source/misc/officerestartmanager.cxx b/comphelper/source/misc/officerestartmanager.cxx index 6c1f38b15ff9..20af7275ca4d 100644 --- a/comphelper/source/misc/officerestartmanager.cxx +++ b/comphelper/source/misc/officerestartmanager.cxx @@ -104,7 +104,7 @@ void SAL_CALL OOfficeRestartManager::requestRestart( const uno::Reference< task: uno::Reference< awt::XRequestCallback > xRequestCallback( xFactory->createInstanceWithContext( - ::rtl::OUString::createFromAscii("com.sun.star.awt.AsyncCallback"), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.AsyncCallback" )), m_xContext ), uno::UNO_QUERY_THROW ); diff --git a/comphelper/source/misc/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx index 898d1224b091..5c39ef684dc7 100644 --- a/comphelper/source/misc/regpathhelper.cxx +++ b/comphelper/source/misc/regpathhelper.cxx @@ -72,7 +72,7 @@ static sal_Bool retrievePortalUserDir( OUString *pDirectory ) { if ( !osl_getCommandArg(--nArgs, &sArg.pData) ) { - if ( sArg.indexOf(OUString::createFromAscii("-userid")) == 0 ) + if ( sArg.indexOf(OUString( RTL_CONSTASCII_USTRINGPARAM( "-userid" ))) == 0 ) { bIsPortalUser = sal_True; diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index c1b9cd9463b4..d119f10a3a0d 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -115,7 +115,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource) } throw css::beans::IllegalTypeException( - ::rtl::OUString::createFromAscii("Any contains wrong type."), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Any contains wrong type." )), css::uno::Reference< css::uno::XInterface >()); } @@ -135,7 +135,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS (!lP.Value.hasValue()) ) throw css::beans::IllegalTypeException( - ::rtl::OUString::createFromAscii("PropertyValue struct contains no usefull informations."), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PropertyValue struct contains no usefull informations." )), css::uno::Reference< css::uno::XInterface >()); (*this)[lP.Name] = lP.Value; continue; @@ -149,7 +149,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS (!lN.Value.hasValue()) ) throw css::beans::IllegalTypeException( - ::rtl::OUString::createFromAscii("NamedValue struct contains no usefull informations."), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NamedValue struct contains no usefull informations." )), css::uno::Reference< css::uno::XInterface >()); (*this)[lN.Name] = lN.Value; continue; @@ -158,7 +158,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS // ignore VOID Any ... but reject wrong filled ones! if (lSource[i].hasValue()) throw css::beans::IllegalTypeException( - ::rtl::OUString::createFromAscii("Any contains wrong type."), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Any contains wrong type." )), css::uno::Reference< css::uno::XInterface >()); } } diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 1503e08bf6b0..4d14069be369 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -58,7 +58,7 @@ uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetStorageFactory( throw uno::RuntimeException(); uno::Reference < lang::XSingleServiceFactory > xStorageFactory( - xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.embed.StorageFactory" ) ), + xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.StorageFactory" )) ), uno::UNO_QUERY ); if ( !xStorageFactory.is() ) @@ -77,7 +77,7 @@ uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetFileSystemStora throw uno::RuntimeException(); uno::Reference < lang::XSingleServiceFactory > xStorageFactory( - xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.embed.FileSystemStorageFactory" ) ), + xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.FileSystemStorageFactory" )) ), uno::UNO_QUERY ); if ( !xStorageFactory.is() ) @@ -223,7 +223,7 @@ uno::Reference< io::XInputStream > OStorageHelper::GetInputStreamFromURL( throw uno::RuntimeException(); uno::Reference < ::com::sun::star::ucb::XSimpleFileAccess > xTempAccess( - xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), uno::UNO_QUERY ); if ( !xTempAccess.is() ) @@ -257,7 +257,7 @@ sal_Int32 OStorageHelper::GetXStorageFormat( uno::Reference< beans::XPropertySet > xStorProps( xStorage, uno::UNO_QUERY_THROW ); ::rtl::OUString aMediaType; - xStorProps->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ) >>= aMediaType; + xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" )) ) >>= aMediaType; sal_Int32 nResult = 0; diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 61e0eff9e0d7..66cb8f984182 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -101,7 +101,7 @@ rtl::OUString searchAndReplaceAsciiL( ::comphelper::intersperse( ::comphelper::stl_begin(i_rSeq), ::comphelper::stl_end(i_rSeq), ::comphelper::OUStringBufferAppender(buf), - ::rtl::OUString::createFromAscii(", ")); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ", " ))); return buf.makeStringAndClear(); } diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx index 833cf0f3da34..7722e4302aa6 100644 --- a/comphelper/source/property/propertystatecontainer.cxx +++ b/comphelper/source/property/propertystatecontainer.cxx @@ -248,7 +248,7 @@ namespace comphelper :OPropertyStateContainer( GetBroadcastHelper() ) { registerProperty( - ::rtl::OUString::createFromAscii( "StringProperty" ), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringProperty" )), 1, PropertyAttribute::BOUND, &m_sStringProperty, @@ -256,7 +256,7 @@ namespace comphelper ); registerProperty( - ::rtl::OUString::createFromAscii( "InterfaceProperty" ), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InterfaceProperty" )), 2, PropertyAttribute::BOUND, &m_xInterfaceProperty, @@ -264,7 +264,7 @@ namespace comphelper ); registerMayBeVoidProperty( - ::rtl::OUString::createFromAscii( "IntProperty" ), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IntProperty" )), 3, PropertyAttribute::BOUND, &m_aMayBeVoidProperty, @@ -272,7 +272,7 @@ namespace comphelper ); registerPropertyNoMember( - ::rtl::OUString::createFromAscii( "OtherInterfaceProperty" ), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OtherInterfaceProperty" )), 4, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, ::getCppuType( static_cast< Reference< XInterface >* >( NULL ) ), diff --git a/comphelper/test/uno_iterators/uno_iterators.cxx b/comphelper/test/uno_iterators/uno_iterators.cxx index c2106068ff46..b1021fe8493a 100644 --- a/comphelper/test/uno_iterators/uno_iterators.cxx +++ b/comphelper/test/uno_iterators/uno_iterators.cxx @@ -135,7 +135,7 @@ void stl_conversions() // convert to stl::vector, modify in vector, copy back, print cout << "vector conversion" << endl; vector vec(stl_s.begin(), stl_s.end()); - vec[2] = OUString::createFromAscii("changed in vector"); + vec[2] = OUString( RTL_CONSTASCII_USTRINGPARAM( "changed in vector" )); copy(vec.begin(), vec.end(), stl_s.begin()); print_sequence(s); @@ -143,7 +143,7 @@ void stl_conversions() cout << "list conversion" << endl; list l(stl_s.begin(), stl_s.end()); l.pop_back(); - l.push_back(OUString::createFromAscii("changed in list")); + l.push_back(OUString( RTL_CONSTASCII_USTRINGPARAM( "changed in list" ))); copy(l.begin(), l.end(), stl_s.begin()); print_sequence(s); } @@ -174,7 +174,7 @@ void stl_compare() StlUnoSequence stl_s2 = StlUnoSequence::createInstance(s2); if (stl_s1 == stl_s2) cout << "sequences are equal." << endl; - s2[9] = OUString::createFromAscii("ZZZZZ"); + s2[9] = OUString( RTL_CONSTASCII_USTRINGPARAM( "ZZZZZ" )); if(stl_s1 < stl_s2) cout << "first sequence is smaller." << endl; } -- cgit From 099626db8c6dcef7d92c8605d0880795d16fe17b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 27 Nov 2010 11:09:16 +0000 Subject: cppcheck: use prefix form --- .../source/container/IndexedPropertyValuesContainer.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx index 78a453e96466..4608f9115bcb 100644 --- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx +++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx @@ -121,8 +121,8 @@ void SAL_CALL IndexedPropertyValuesContainer::insertByIndex( sal_Int32 nIndex, c sal_Int32 i(0); while(i < nIndex) { - i++; - aItr++; + ++i; + ++aItr; } } else @@ -131,8 +131,8 @@ void SAL_CALL IndexedPropertyValuesContainer::insertByIndex( sal_Int32 nIndex, c sal_Int32 i(nSize - 1); while(i > nIndex) { - i--; - aItr--; + --i; + --aItr; } } maProperties.insert(aItr, aProps); @@ -156,8 +156,8 @@ void SAL_CALL IndexedPropertyValuesContainer::removeByIndex( sal_Int32 nIndex ) sal_Int32 i(0); while(i < nIndex) { - i++; - aItr++; + ++i; + ++aItr; } } else @@ -166,8 +166,8 @@ void SAL_CALL IndexedPropertyValuesContainer::removeByIndex( sal_Int32 nIndex ) sal_Int32 i(nSize - 1); while(i > nIndex) { - i--; - aItr--; + --i; + --aItr; } } maProperties.erase(aItr); -- cgit From 54b42134116b9d5f7f56caaf0b041782fa5d0d5c Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Sat, 4 Dec 2010 13:22:40 +0900 Subject: Replace all occured, occurance etc. --- comphelper/inc/comphelper/componentcontext.hxx | 8 ++++---- comphelper/inc/comphelper/docpasswordhelper.hxx | 2 +- comphelper/inc/comphelper/embeddedobjectcontainer.hxx | 2 +- comphelper/inc/comphelper/interaction.hxx | 2 +- comphelper/inc/comphelper/sequence.hxx | 2 +- comphelper/inc/comphelper/string.hxx | 4 ++-- comphelper/source/misc/scopeguard.cxx | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/componentcontext.hxx b/comphelper/inc/comphelper/componentcontext.hxx index 410d2390619c..5b6a901385c3 100644 --- a/comphelper/inc/comphelper/componentcontext.hxx +++ b/comphelper/inc/comphelper/componentcontext.hxx @@ -142,7 +142,7 @@ namespace comphelper @throws ::com::sun::star::lang::ServiceNotRegisteredException if the given service is not registered @throws Exception - if an exception occured during creating the component + if an exception occurred during creating the component @return the newly created component. Is never . */ @@ -153,7 +153,7 @@ namespace comphelper @throws ::com::sun::star::lang::ServiceNotRegisteredException if the given service is not registered @throws Exception - if an exception occured during creating the component + if an exception occurred during creating the component @return the newly created component. Is never . */ @@ -167,7 +167,7 @@ namespace comphelper @throws ::com::sun::star::lang::ServiceNotRegisteredException if the given service is not registered @throws Exception - if an exception occured during creating the component + if an exception occurred during creating the component @return the newly created component. Is never . */ @@ -181,7 +181,7 @@ namespace comphelper @throws ::com::sun::star::lang::ServiceNotRegisteredException if the given service is not registered @throws Exception - if an exception occured during creating the component + if an exception occurred during creating the component @return the newly created component. Is never . */ diff --git a/comphelper/inc/comphelper/docpasswordhelper.hxx b/comphelper/inc/comphelper/docpasswordhelper.hxx index 4845b0ccd04b..44dca362fb13 100644 --- a/comphelper/inc/comphelper/docpasswordhelper.hxx +++ b/comphelper/inc/comphelper/docpasswordhelper.hxx @@ -70,7 +70,7 @@ public: - DocPasswordVerifierResult_WRONG_PASSWORD, if the password is wrong. The user may be asked again for a new password. - DocPasswordVerifierResult_ABORT, if an unrecoverable error - occured while password verification. The password request loop + occurred while password verification. The password request loop will be aborted. */ virtual DocPasswordVerifierResult verifyPassword( const ::rtl::OUString& rPassword ) = 0; diff --git a/comphelper/inc/comphelper/embeddedobjectcontainer.hxx b/comphelper/inc/comphelper/embeddedobjectcontainer.hxx index 8069534b1e3a..7983dec4b662 100644 --- a/comphelper/inc/comphelper/embeddedobjectcontainer.hxx +++ b/comphelper/inc/comphelper/embeddedobjectcontainer.hxx @@ -178,7 +178,7 @@ public: * * \param _xStorage The storeage where to store the objects. * \param _bClearModifedFlag If then the modifed flag will be set to otherwise nothing happen. - * \return if no error occured, otherwise . + * \return if no error occurred, otherwise . */ sal_Bool SetPersistentEntries(const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& _xStorage,bool _bClearModifedFlag = true); }; diff --git a/comphelper/inc/comphelper/interaction.hxx b/comphelper/inc/comphelper/interaction.hxx index 236738b9c43c..a8f0df51b0bd 100644 --- a/comphelper/inc/comphelper/interaction.hxx +++ b/comphelper/inc/comphelper/interaction.hxx @@ -52,7 +52,7 @@ namespace comphelper */ class OInteractionSelect { - sal_Bool m_bSelected : 1; /// indicates if the select event occured + sal_Bool m_bSelected : 1; /// indicates if the select event occurred protected: OInteractionSelect() : m_bSelected(sal_False) { } diff --git a/comphelper/inc/comphelper/sequence.hxx b/comphelper/inc/comphelper/sequence.hxx index 17f2d7cab6bb..9ccb89770ca4 100644 --- a/comphelper/inc/comphelper/sequence.hxx +++ b/comphelper/inc/comphelper/sequence.hxx @@ -48,7 +48,7 @@ namespace comphelper //------------------------------------------------------------------------- /** search the given string within the given sequence, return the positions where it was found. - if _bOnlyFirst is sal_True, only the first occurence will be returned. + if _bOnlyFirst is sal_True, only the first occurrence will be returned. */ COMPHELPER_DLLPUBLIC staruno::Sequence findValue(const staruno::Sequence< ::rtl::OUString >& _rList, const ::rtl::OUString& _rValue, sal_Bool _bOnlyFirst = sal_False); diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index 2ffbdba09735..85b1a2e4efe1 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -75,14 +75,14 @@ COMPHELPER_DLLPUBLIC rtl::OUString searchAndReplaceAsciiL( rtl::OUString const & to, sal_Int32 beginAt = 0, sal_Int32 * replacedAt = NULL); -/** replaces, in the given source string, all occurences of a given ASCII pattern +/** replaces, in the given source string, all occurrences of a given ASCII pattern with another ASCII pattern */ COMPHELPER_DLLPUBLIC ::rtl::OUString searchAndReplaceAllAsciiWithAscii( const ::rtl::OUString& source, const sal_Char* from, const sal_Char* to, const sal_Int32 beginAt = 0 ); -/** does an in-place replacement of the first occurance of a sub string with +/** does an in-place replacement of the first occurrence of a sub string with another string @param source diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx index 63ec42befb02..66cfd231293d 100644 --- a/comphelper/source/misc/scopeguard.cxx +++ b/comphelper/source/misc/scopeguard.cxx @@ -49,11 +49,11 @@ ScopeGuard::~ScopeGuard() OSL_ENSURE( false, rtl::OUStringToOString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "UNO exception occured: ") ) + + "UNO exception occurred: ") ) + exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); } catch (...) { - OSL_ENSURE( false, "unknown exception occured!" ); + OSL_ENSURE( false, "unknown exception occurred!" ); } } else -- cgit From bdff19462429f8ed55cfd8a14842785a227cd627 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 23 Dec 2010 14:01:55 +0000 Subject: cppcheck: prefer prefix variant --- comphelper/source/property/MasterPropertySetInfo.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index fd5ec0fe7355..e46faf00447a 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -104,7 +104,7 @@ void MasterPropertySetInfo::add( PropertyInfoHash &rHash, sal_uInt8 nMapId ) OSL_ENSURE( sal_False, "Warning: PropertyInfo added twice, possible error!"); #endif maMap[(*aIter).first] = new PropertyData ( nMapId, (*aIter).second ); - aIter++; + ++aIter; } } -- cgit From 5b4085018a38f49b08e49b5909b17a87aa52e304 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 1 Jan 2011 20:47:30 +0000 Subject: cppcheck: prefer prefix variant --- comphelper/test/uno_iterators/uno_iterators.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'comphelper') diff --git a/comphelper/test/uno_iterators/uno_iterators.cxx b/comphelper/test/uno_iterators/uno_iterators.cxx index b1021fe8493a..a242c614b508 100644 --- a/comphelper/test/uno_iterators/uno_iterators.cxx +++ b/comphelper/test/uno_iterators/uno_iterators.cxx @@ -96,11 +96,11 @@ void classic_loops() StlUnoSequence::iterator stl_s_it; cout << "for iteration" << endl; - for(stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it++) + for(stl_s_it = stl_begin(s); stl_s_it != stl_end(s); ++stl_s_it) cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl; cout << "reverse for iteration" << endl; - for(stl_s_it = stl_end(s); stl_s_it != stl_begin(s); stl_s_it--) + for(stl_s_it = stl_end(s); stl_s_it != stl_begin(s); --stl_s_it) cout << OUStringToOString(*(stl_s_it-1), RTL_TEXTENCODING_ASCII_US).getStr() << endl; cout << "skipping for iteration" << endl; @@ -182,7 +182,7 @@ void stl_compare() void stl_const_sequence() { const Sequence s(10); - for(StlUnoSequence::const_iterator stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it++) + for(StlUnoSequence::const_iterator stl_s_it = stl_begin(s); stl_s_it != stl_end(s); ++stl_s_it) cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl; } -- cgit From d90fef45cd1a8f15c54debd0542b1ec250ad57aa Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 6 Jan 2011 14:06:38 +0000 Subject: cppunit: prefer prefix variant --- comphelper/source/property/propertysetinfo.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index 6642c0d4db55..1b3d8b92b951 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -131,8 +131,8 @@ Sequence< Property > PropertyMapImpl::getProperties() throw() pProperties->Type = *pEntry->mpType; pProperties->Attributes = pEntry->mnAttributes; - pProperties++; - aIter++; + ++pProperties; + ++aIter; } } -- cgit From 2fb4d4800c3064c3c7b8573ad39c00d51d9bc41b Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Thu, 20 Jan 2011 11:35:10 +0100 Subject: Replace suitable equalsAscii calls with equalsAsciiL. Done with sed -i 's%\(\.equalsAscii\)(\(\s\?"[^"]\+"\)\(\s\?\))%\1L(\3RTL_CONSTASCII_STRINGPARAM(\2\3)\3)%g'. --- comphelper/source/misc/mimeconfighelper.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index fc3093f24525..3b5e3c9ef652 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -204,7 +204,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo if ( aFilterAnyData >>= aFilterData ) { for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAscii( "DocumentService" ) ) + if ( aFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) aFilterData[nInd].Value >>= aDocServiceName; } } @@ -240,7 +240,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo for ( sal_Int32 nInd = 0; nInd < aType.getLength(); nInd++ ) { ::rtl::OUString aFilterName; - if ( aType[nInd].Name.equalsAscii( "PreferredFilter" ) + if ( aType[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredFilter" ) ) && ( aType[nInd].Value >>= aFilterName ) && aFilterName.getLength() ) { ::rtl::OUString aDocumentName = GetDocServiceNameFromFilter( aFilterName ); @@ -309,7 +309,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjPropsFromConfi { aResult[nInd + 1].Name = aObjPropNames[nInd]; - if ( aObjPropNames[nInd].equalsAscii( "ObjectVerbs" ) ) + if ( aObjPropNames[nInd].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectVerbs" ) ) ) { uno::Sequence< ::rtl::OUString > aVerbShortcuts; if ( xObjectProps->getByName( aObjPropNames[nInd] ) >>= aVerbShortcuts ) @@ -573,7 +573,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu ::rtl::OUString aFilterName; for ( sal_Int32 nInd = 0; nInd < aMediaDescr.getLength(); nInd++ ) - if ( aMediaDescr[nInd].Name.equalsAscii( "FilterName" ) ) + if ( aMediaDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) aMediaDescr[nInd].Value >>= aFilterName; if ( !aFilterName.getLength() ) @@ -595,7 +595,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu // get FilterName for ( sal_Int32 nInd = 0; nInd < aTempMD.getLength(); nInd++ ) - if ( aTempMD[nInd].Name.equalsAscii( "FilterName" ) ) + if ( aTempMD[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) aTempMD[nInd].Value >>= aFilterName; if ( aFilterName.getLength() ) @@ -615,7 +615,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu { for ( sal_Int32 nInd = 0; nInd < aTypes.getLength(); nInd++ ) { - if ( aTypes[nInd].Name.equalsAscii( "PreferredFilter" ) && ( aTypes[nInd].Value >>= aFilterName ) ) + if ( aTypes[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredFilter" ) ) && ( aTypes[nInd].Value >>= aFilterName ) ) { sal_Int32 nOldLen = aMediaDescr.getLength(); aMediaDescr.realloc( nOldLen + 1 ); @@ -637,7 +637,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu { ::rtl::OUString aDocName; for ( sal_Int32 nInd = 0; nInd < aObject.getLength(); nInd++ ) - if ( aObject[nInd].Name.equalsAscii( "ObjectDocumentServiceName" ) ) + if ( aObject[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectDocumentServiceName" ) ) ) { aObject[nInd].Value >>= aDocName; break; @@ -648,7 +648,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu sal_Bool bNeedsAddition = sal_True; for ( sal_Int32 nMedInd = 0; nMedInd < aMediaDescr.getLength(); nMedInd++ ) - if ( aMediaDescr[nMedInd].Name.equalsAscii( "DocumentService" ) ) + if ( aMediaDescr[nMedInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) { aMediaDescr[nMedInd].Value <<= aDocName; bNeedsAddition = sal_False; @@ -683,7 +683,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( if ( aFilterAnyData >>= aFilterData ) { for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAscii( "Flags" ) ) + if ( aFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Flags" ) ) ) { uno::Any aVal = aFilterData[nInd].Value; sal_Int32 nFlags = 0; -- cgit From 7ba80b24256d49eb765f2943c1495c1511bb7b69 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Fri, 21 Jan 2011 14:23:59 +0100 Subject: Remove old RCS lines. --- comphelper/inc/comphelper/evtmethodhelper.hxx | 3 --- comphelper/inc/comphelper/serviceinfohelper.hxx | 3 --- comphelper/source/misc/evtmethodhelper.cxx | 3 --- comphelper/source/misc/serviceinfohelper.cxx | 3 --- 4 files changed, 12 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/evtmethodhelper.hxx b/comphelper/inc/comphelper/evtmethodhelper.hxx index c8c9ec9eb40f..e65b73dc207b 100644 --- a/comphelper/inc/comphelper/evtmethodhelper.hxx +++ b/comphelper/inc/comphelper/evtmethodhelper.hxx @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: evtlistenerhlp.hxx,v $ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/comphelper/inc/comphelper/serviceinfohelper.hxx b/comphelper/inc/comphelper/serviceinfohelper.hxx index 859f35cc707f..29ffe3bd9907 100644 --- a/comphelper/inc/comphelper/serviceinfohelper.hxx +++ b/comphelper/inc/comphelper/serviceinfohelper.hxx @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoprov.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/comphelper/source/misc/evtmethodhelper.cxx b/comphelper/source/misc/evtmethodhelper.cxx index 1101a473e716..a94b85754e13 100644 --- a/comphelper/source/misc/evtmethodhelper.cxx +++ b/comphelper/source/misc/evtmethodhelper.cxx @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: evtlistenerhlp.cxx,v $ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/comphelper/source/misc/serviceinfohelper.cxx b/comphelper/source/misc/serviceinfohelper.cxx index 1124146b39f6..97f7f96ad8df 100644 --- a/comphelper/source/misc/serviceinfohelper.cxx +++ b/comphelper/source/misc/serviceinfohelper.cxx @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoprov.cxx,v $ - * $Revision: 1.72.92.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify -- cgit From 365e5c0ee59fae2475373c59c7d276f8211a219b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 24 Jan 2011 10:57:21 +0000 Subject: WaE: gcc 4.6.0 various warnings --- comphelper/source/container/embeddedobjectcontainer.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'comphelper') diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index ff5f89f22b51..1728f44096a9 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -1136,6 +1136,7 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e } OSL_ENSURE( bFound, "Object not found for removal!" ); + (void)bFound; if ( xPersist.is() ) { // remove replacement image (if there is one) -- cgit From 4d6bcb340d250205b0008cfa9b822f79bd5537c0 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Mon, 24 Jan 2011 17:16:29 +0100 Subject: Remove FS_PRIV_DEBUG directive. --- .../source/property/propertystatecontainer.cxx | 144 --------------------- 1 file changed, 144 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx index 7722e4302aa6..f1611efd77f4 100644 --- a/comphelper/source/property/propertystatecontainer.cxx +++ b/comphelper/source/property/propertystatecontainer.cxx @@ -194,148 +194,4 @@ namespace comphelper } // namespace comphelper //......................................................................... -#ifdef FS_PRIV_DEBUG -#define STATECONTAINER_TEST -#endif - -#ifdef STATECONTAINER_TEST -#include -#include -#include - -//......................................................................... -namespace comphelper -{ -//......................................................................... - - using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::beans; - - //===================================================================== - //= Test - compiler test - //===================================================================== - typedef ::cppu::OWeakAggObject Test_RefCountBase; - class Test :public OMutexAndBroadcastHelper - ,public OPropertyStateContainer - ,public OPropertyArrayUsageHelper< Test > - ,public Test_RefCountBase - { - private: - ::rtl::OUString m_sStringProperty; - Reference< XInterface > m_xInterfaceProperty; - Any m_aMayBeVoidProperty; - - protected: - Test( ); - - DECLARE_XINTERFACE( ) - - public: - static Test* Create( ); - - protected: - virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(RuntimeException); - virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; - - protected: - // OPropertyStateContainer overridables - virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const; - }; - - //--------------------------------------------------------------------- - Test::Test( ) - :OPropertyStateContainer( GetBroadcastHelper() ) - { - registerProperty( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringProperty" )), - 1, - PropertyAttribute::BOUND, - &m_sStringProperty, - ::getCppuType( &m_sStringProperty ) - ); - - registerProperty( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InterfaceProperty" )), - 2, - PropertyAttribute::BOUND, - &m_xInterfaceProperty, - ::getCppuType( &m_xInterfaceProperty ) - ); - - registerMayBeVoidProperty( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IntProperty" )), - 3, - PropertyAttribute::BOUND, - &m_aMayBeVoidProperty, - ::getCppuType( static_cast< sal_Int32* >( NULL ) ) - ); - - registerPropertyNoMember( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OtherInterfaceProperty" )), - 4, - PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, - ::getCppuType( static_cast< Reference< XInterface >* >( NULL ) ), - NULL - ); - } - - //--------------------------------------------------------------------- - IMPLEMENT_FORWARD_XINTERFACE2( Test, Test_RefCountBase, OPropertyStateContainer ) - - //--------------------------------------------------------------------- - void Test::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const - { - switch ( _nHandle ) - { - case 1: - _rDefault = makeAny( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringPropertyDefault" ) ) ); - break; - case 2: - _rDefault = makeAny( Reference< XInterface >( ) ); - break; - case 3: - // void - break; - case 4: - _rDefault = makeAny( Reference< XInterface >( ) ); - break; - default: - OSL_ENSURE( sal_False, "Test::getPropertyDefaultByHandle: invalid handle!" ); - } - } - - //--------------------------------------------------------------------- - Reference< XPropertySetInfo > SAL_CALL Test::getPropertySetInfo( ) throw(RuntimeException) - { - return createPropertySetInfo( getInfoHelper() ); - } - - //--------------------------------------------------------------------- - ::cppu::IPropertyArrayHelper& SAL_CALL Test::getInfoHelper() - { - return *getArrayHelper(); - } - - //--------------------------------------------------------------------- - ::cppu::IPropertyArrayHelper* Test::createArrayHelper( ) const - { - Sequence< Property > aProps; - describeProperties( aProps ); - return new ::cppu::OPropertyArrayHelper( aProps ); - } - - //--------------------------------------------------------------------- - Test* Test::Create( ) - { - Test* pInstance = new Test; - return pInstance; - } - -//......................................................................... -} // namespace comphelper -//......................................................................... - -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From 90b755b2838a49d80e83bd2642bc8ff5c399396b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 25 Jan 2011 10:23:14 +0000 Subject: WaE: gcc 4.6.0 various warnings --- comphelper/inc/comphelper/oslfile2streamwrap.hxx | 26 ++---------------------- 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/oslfile2streamwrap.hxx b/comphelper/inc/comphelper/oslfile2streamwrap.hxx index e4fad24c0db2..d62ca3db4108 100644 --- a/comphelper/inc/comphelper/oslfile2streamwrap.hxx +++ b/comphelper/inc/comphelper/oslfile2streamwrap.hxx @@ -44,10 +44,7 @@ namespace comphelper // FmUnoIOStream, // stream zum schreiben un lesen von Daten, basieren auf File //================================================================== -struct InputStreamWrapper_Base : public ::cppu::WeakImplHelper1 -{}; - -class COMPHELPER_DLLPUBLIC OSLInputStreamWrapper : public InputStreamWrapper_Base +class COMPHELPER_DLLPUBLIC OSLInputStreamWrapper : public ::cppu::WeakImplHelper1 { ::osl::Mutex m_aMutex; ::osl::File* m_pFile; @@ -58,14 +55,6 @@ public: OSLInputStreamWrapper(::osl::File* pStream, sal_Bool bOwner=sal_False); virtual ~OSLInputStreamWrapper(); -// UNO Anbindung - virtual void SAL_CALL acquire() throw() - { InputStreamWrapper_Base::acquire(); } - virtual void SAL_CALL release() throw() - { InputStreamWrapper_Base::release(); } - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException) - { return InputStreamWrapper_Base::queryInterface(_rType); } - // stario::XInputStream virtual sal_Int32 SAL_CALL readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException); virtual sal_Int32 SAL_CALL readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException); @@ -78,24 +67,13 @@ public: // FmUnoOutStream, // Datensenke fuer Files //================================================================== -struct OutputStreamWrapper_Base : public ::cppu::WeakImplHelper1 -{}; - -class COMPHELPER_DLLPUBLIC OSLOutputStreamWrapper : public OutputStreamWrapper_Base +class COMPHELPER_DLLPUBLIC OSLOutputStreamWrapper : public ::cppu::WeakImplHelper1 { ::osl::File& rFile; public: OSLOutputStreamWrapper(::osl::File& _rFile) :rFile(_rFile) { } -// UNO Anbindung - virtual void SAL_CALL acquire() throw() - { OutputStreamWrapper_Base::acquire(); } - virtual void SAL_CALL release() throw() - { OutputStreamWrapper_Base::release(); } - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException) - { return OutputStreamWrapper_Base::queryInterface(_rType); } - // stario::XOutputStream virtual void SAL_CALL writeBytes(const staruno::Sequence< sal_Int8 >& aData) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException); virtual void SAL_CALL flush() throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException); -- cgit From 4f4bec90b8c07c3c0415de7860a560dd16f3ebae Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 26 Jan 2011 10:16:01 +0000 Subject: fix for fdo#32561# crash when moving through database types --- comphelper/source/property/opropertybag.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index 631a8e1d1d07..4adc7bc4e46b 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -485,8 +485,6 @@ namespace comphelper try { - ::cppu::IPropertyArrayHelper& rPropInfo = getInfoHelper(); - // check for unknown properties // we cannot simply rely on the XMultiPropertySet::setPropertyValues // implementation of our base class, since it does not throw @@ -503,6 +501,7 @@ namespace comphelper ++pName, ++pHandle, ++pProperty ) { + ::cppu::IPropertyArrayHelper& rPropInfo = getInfoHelper(); *pHandle = rPropInfo.getHandleByName( *pName ); if ( *pHandle != -1 ) continue; @@ -513,9 +512,6 @@ namespace comphelper // add the property sal_Int16 nAttributes = PropertyAttribute::BOUND | PropertyAttribute::REMOVEABLE | PropertyAttribute::MAYBEDEFAULT; addProperty( *pName, nAttributes, pProperty->Value ); - // rPropInfo is invalid, refetch - rPropInfo = getInfoHelper(); - *pHandle = rPropInfo.getHandleByName( *pName ); continue; } -- cgit From 957c87b827c2d762c20e17e31d0f26e6695f4cc8 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Tue, 1 Feb 2011 17:58:43 +0100 Subject: Clean up makefiles --- comphelper/qa/complex/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/qa/complex/makefile.mk b/comphelper/qa/complex/makefile.mk index ec0efdd1188c..2ddba50b4d81 100644 --- a/comphelper/qa/complex/makefile.mk +++ b/comphelper/qa/complex/makefile.mk @@ -30,6 +30,7 @@ TARGET = ComphelperComplexTests PRJNAME = comphelper # --- Settings ----------------------------------------------------- + .INCLUDE: settings.mk #----- compile .java files ----------------------------------------- @@ -42,7 +43,6 @@ JAVACLASSFILES := $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(i:d)$/$(i:b).class) MAXLINELENGTH = 100000 -#JARCLASSDIRS = JARTARGET = $(TARGET).jar JARCOMPRESS = TRUE -- cgit From e99fcbe58ef7533da06ee4658a4ee2cde4df58ea Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 3 Feb 2011 16:55:17 -0700 Subject: Bulk move libs-gui to boost unordered containers --- comphelper/inc/comphelper/PropertyInfoHash.hxx | 6 +++--- comphelper/inc/comphelper/mediadescriptor.hxx | 2 +- comphelper/inc/comphelper/numberedcollection.hxx | 4 ++-- comphelper/inc/comphelper/sequenceashashmap.hxx | 4 ++-- comphelper/source/container/embeddedobjectcontainer.cxx | 4 ++-- comphelper/source/misc/namedvaluecollection.cxx | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/PropertyInfoHash.hxx b/comphelper/inc/comphelper/PropertyInfoHash.hxx index d5b8ced95c5a..7c75b99335f9 100644 --- a/comphelper/inc/comphelper/PropertyInfoHash.hxx +++ b/comphelper/inc/comphelper/PropertyInfoHash.hxx @@ -31,7 +31,7 @@ #include #include -#include +#include namespace comphelper { struct PropertyInfo @@ -61,11 +61,11 @@ namespace comphelper }; } -typedef std::hash_map < ::rtl::OUString, +typedef boost::unordered_map < ::rtl::OUString, ::comphelper::PropertyInfo*, ::rtl::OUStringHash, ::comphelper::eqFunc > PropertyInfoHash; -typedef std::hash_map < ::rtl::OUString, +typedef boost::unordered_map < ::rtl::OUString, ::comphelper::PropertyData*, ::rtl::OUStringHash, ::comphelper::eqFunc > PropertyDataHash; diff --git a/comphelper/inc/comphelper/mediadescriptor.hxx b/comphelper/inc/comphelper/mediadescriptor.hxx index 729850f82a10..774eacd6cb04 100644 --- a/comphelper/inc/comphelper/mediadescriptor.hxx +++ b/comphelper/inc/comphelper/mediadescriptor.hxx @@ -51,7 +51,7 @@ namespace comphelper{ /** @short can be used to work with a MediaDescriptor struct. - @descr It wraps a ::std::hash_map around the Sequence< css::beans::PropertyValue >, which + @descr It wraps a ::boost::unordered_map around the Sequence< css::beans::PropertyValue >, which represent the MediaDescriptor item. Further this helper defines often used functions (as e.g. open of the required streams, consistent checks etcpp.) and it defines all useable property names. diff --git a/comphelper/inc/comphelper/numberedcollection.hxx b/comphelper/inc/comphelper/numberedcollection.hxx index a955c9624518..f5fb67e7a97e 100644 --- a/comphelper/inc/comphelper/numberedcollection.hxx +++ b/comphelper/inc/comphelper/numberedcollection.hxx @@ -44,7 +44,7 @@ #include #include -#include +#include //_______________________________________________ // namespace @@ -81,7 +81,7 @@ class COMPHELPER_DLLPUBLIC NumberedCollection : private ::cppu::BaseMutex ::sal_Int32 nNumber; }; - typedef ::std::hash_map< + typedef ::boost::unordered_map< long , TNumberedItem , ::std::hash< long > , diff --git a/comphelper/inc/comphelper/sequenceashashmap.hxx b/comphelper/inc/comphelper/sequenceashashmap.hxx index 0046f32bd100..d59a5065c0c8 100644 --- a/comphelper/inc/comphelper/sequenceashashmap.hxx +++ b/comphelper/inc/comphelper/sequenceashashmap.hxx @@ -33,7 +33,7 @@ // includes #ifndef INCLUDED_HASH_MAP -#include +#include #define INCLUDED_HASH_MAP #endif @@ -73,7 +73,7 @@ namespace comphelper{ such name sequences very easy ... */ -struct SequenceAsHashMapBase : public ::std::hash_map< +struct SequenceAsHashMapBase : public ::boost::unordered_map< ::rtl::OUString , ::com::sun::star::uno::Any , ::rtl::OUStringHash , diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 1728f44096a9..89c3e6ec0a96 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include @@ -78,7 +78,7 @@ struct eqObjectName_Impl } }; -typedef std::hash_map +typedef boost::unordered_map < ::rtl::OUString, ::com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >, diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index 74a37e278185..3effa876c4c2 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include @@ -66,7 +66,7 @@ namespace comphelper //==================================================================== //= NamedValueCollection_Impl //==================================================================== - typedef ::std::hash_map< ::rtl::OUString, Any, ::rtl::OUStringHash > NamedValueRepository; + typedef ::boost::unordered_map< ::rtl::OUString, Any, ::rtl::OUStringHash > NamedValueRepository; struct NamedValueCollection_Impl { -- cgit From cbd9e9d4b81e1cb8651a47d8fb671df4052ff0ab Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 3 Feb 2011 17:07:03 -0700 Subject: use boost::hash instead of std::hash --- comphelper/inc/comphelper/numberedcollection.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/numberedcollection.hxx b/comphelper/inc/comphelper/numberedcollection.hxx index f5fb67e7a97e..19bd542eaaab 100644 --- a/comphelper/inc/comphelper/numberedcollection.hxx +++ b/comphelper/inc/comphelper/numberedcollection.hxx @@ -84,7 +84,7 @@ class COMPHELPER_DLLPUBLIC NumberedCollection : private ::cppu::BaseMutex typedef ::boost::unordered_map< long , TNumberedItem , - ::std::hash< long > , + ::boost::hash< long > , ::std::equal_to< long > > TNumberedItemHash; typedef ::std::vector< long > TDeadItemList; -- cgit From 4b1d6163d77c956384ce8521ce0406272755c879 Mon Sep 17 00:00:00 2001 From: Joseph Powers Date: Fri, 4 Feb 2011 18:35:11 -0800 Subject: Remove the #include guards. The .hxx file has it's own guards. Also add #include to work around a boost issue. --- comphelper/inc/comphelper/sequenceashashmap.hxx | 3 --- 1 file changed, 3 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/sequenceashashmap.hxx b/comphelper/inc/comphelper/sequenceashashmap.hxx index d59a5065c0c8..e809d6a78f78 100644 --- a/comphelper/inc/comphelper/sequenceashashmap.hxx +++ b/comphelper/inc/comphelper/sequenceashashmap.hxx @@ -32,10 +32,7 @@ //_______________________________________________ // includes -#ifndef INCLUDED_HASH_MAP #include -#define INCLUDED_HASH_MAP -#endif #ifndef INCLUDED_ALGORITHM #include -- cgit From a4008f30934534571ce978fc874448a5cd08855d Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sun, 6 Feb 2011 13:17:10 +0100 Subject: Correct OSL_DEBUG_LEVEL usage - remove values greater than 2 - move level 1 for debug_printf() to level 2 as it's user defined output and it gets defined at level 2 in salframe.cxx for example. --- comphelper/source/misc/mediadescriptor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index a9be31ae2d1b..1aba6e820e10 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -598,7 +598,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool bLockFile ) ::rtl::OUString sNormalizedURL = impl_normalizeURL( sURL ); return impl_openStreamWithURL( sNormalizedURL, bLockFile ); } -#if OSL_DEBUG_LEVEL>0 +#if OSL_DEBUG_LEVEL > 0 catch(const css::uno::Exception& ex) { ::rtl::OUStringBuffer sMsg(256); -- cgit From 099a6640faedaac28e04536c6195a3fff128af75 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sun, 6 Feb 2011 13:30:15 +0100 Subject: Remove dead code --- comphelper/source/misc/mediadescriptor.cxx | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 1aba6e820e10..8dbe084cd3f5 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -68,9 +68,6 @@ namespace css = ::com::sun::star; //_______________________________________________ // definitions -/*----------------------------------------------- - 10.03.2004 07:35 ------------------------------------------------*/ const ::rtl::OUString& MediaDescriptor::PROP_ABORTED() { static const ::rtl::OUString sProp(RTL_CONSTASCII_USTRINGPARAM("Aborted")); @@ -390,33 +387,21 @@ MediaDescriptor::MediaDescriptor() { } -/*----------------------------------------------- - 10.03.2004 08:09 ------------------------------------------------*/ MediaDescriptor::MediaDescriptor(const css::uno::Any& aSource) : SequenceAsHashMap(aSource) { } -/*----------------------------------------------- - 10.03.2004 08:09 ------------------------------------------------*/ MediaDescriptor::MediaDescriptor(const css::uno::Sequence< css::beans::PropertyValue >& lSource) : SequenceAsHashMap(lSource) { } -/*----------------------------------------------- - 10.03.2004 08:09 ------------------------------------------------*/ MediaDescriptor::MediaDescriptor(const css::uno::Sequence< css::beans::NamedValue >& lSource) : SequenceAsHashMap(lSource) { } -/*----------------------------------------------- - 18.11.2004 13:37 ------------------------------------------------*/ sal_Bool MediaDescriptor::isStreamReadOnly() const { static ::rtl::OUString CONTENTSCHEME_FILE( RTL_CONSTASCII_USTRINGPARAM( "file" )); @@ -529,9 +514,6 @@ void MediaDescriptor::clearComponentDataEntry( const ::rtl::OUString& rName ) } } -/*----------------------------------------------- - 10.03.2004 09:02 ------------------------------------------------*/ sal_Bool MediaDescriptor::addInputStream() { return impl_addInputStream( sal_True ); @@ -614,9 +596,6 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool bLockFile ) return sal_False; } -/*----------------------------------------------- - 25.03.2004 12:38 ------------------------------------------------*/ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference< css::io::XInputStream >& _rxPostData ) throw(::com::sun::star::uno::RuntimeException) { @@ -688,10 +667,6 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference } /*-----------------------------------------------*/ - -/*----------------------------------------------- - 25.03.2004 12:29 ------------------------------------------------*/ sal_Bool MediaDescriptor::impl_openStreamWithURL( const ::rtl::OUString& sURL, sal_Bool bLockFile ) throw(::com::sun::star::uno::RuntimeException) { @@ -827,9 +802,6 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const ::rtl::OUString& sURL, s return xInputStream.is(); } -/*----------------------------------------------- - 10.09.2004 10:51 ------------------------------------------------*/ ::rtl::OUString MediaDescriptor::impl_normalizeURL(const ::rtl::OUString& sURL) { /* Remove Jumpmarks (fragments) of an URL only here. -- cgit From c51592268380d7b8b1bae8358165f79e8540b496 Mon Sep 17 00:00:00 2001 From: Wilhelm Pflueger Date: Sat, 5 Feb 2011 22:56:20 +0100 Subject: Re-animated tests that were based on deprecated testshl. --- comphelper/prj/build.lst | 1 + comphelper/qa/makefile.mk | 10 +++------- comphelper/qa/test_string.cxx | 20 +++++++++++--------- comphelper/qa/test_weakbag.cxx | 8 +++++--- comphelper/qa/version.map | 3 +-- 5 files changed, 21 insertions(+), 21 deletions(-) (limited to 'comphelper') diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst index a38f99985379..d5eced023c68 100644 --- a/comphelper/prj/build.lst +++ b/comphelper/prj/build.lst @@ -11,3 +11,4 @@ ph comphelper\source\compare nmake - all ph_compare ph_inc NULL ph comphelper\source\officeinstdir nmake - all ph_officeinstdir ph_inc NULL ph comphelper\source\xml nmake - all ph_xml NULL ph comphelper\util nmake - all ph_util ph_container ph_evtatmgr ph_misc ph_procfact ph_property ph_streaming ph_compare ph_officeinstdir ph_xml NULL +ph comphelper\qa nmake - all ph_complex NULL \ No newline at end of file diff --git a/comphelper/qa/makefile.mk b/comphelper/qa/makefile.mk index 0360d308529e..9d68caa549ee 100644 --- a/comphelper/qa/makefile.mk +++ b/comphelper/qa/makefile.mk @@ -40,8 +40,8 @@ DLLPRE = # no leading "lib" on .so files INCPRE += $(MISC)$/$(TARGET)$/inc SHL1TARGET = $(TARGET)_weakbag -SHL1OBJS = $(SLO)$/test_weakbag.obj -SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) +SHL1OBJS = $(SLO)$/test_weakbag.obj $(SLO)$/test_string.obj +SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) $(COMPHELPERLIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) @@ -49,8 +49,4 @@ DEF1NAME = $(SHL1TARGET) SLOFILES = $(SHL1OBJS) .INCLUDE: target.mk - -ALLTAR: test - -test .PHONY: $(SHL1TARGETN) - $(TESTSHL2) $(SHL1TARGETN) +.INCLUDE: _cppunit.mk diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx index 9e355a5c9528..3a631d96790a 100644 --- a/comphelper/qa/test_string.cxx +++ b/comphelper/qa/test_string.cxx @@ -30,7 +30,9 @@ #include "sal/config.h" #include "comphelper/string.hxx" -#include "testshl/simpleheader.hxx" +#include +#include +#include #include "rtl/string.h" #include "rtl/ustring.h" #include "rtl/ustring.hxx" @@ -38,20 +40,20 @@ namespace { -class Test: public CppUnit::TestFixture { +class TestString: public CppUnit::TestFixture { public: void test(); - CPPUNIT_TEST_SUITE(Test); + CPPUNIT_TEST_SUITE(TestString); CPPUNIT_TEST(test); CPPUNIT_TEST_SUITE_END(); }; -void Test::test() { +void TestString::test() { rtl::OUString s1(RTL_CONSTASCII_USTRINGPARAM("foobarbar")); sal_Int32 n1; rtl::OUString s2( - comphelper::string::searchAndReplace( + comphelper::string::searchAndReplaceAsciiL( s1, RTL_CONSTASCII_STRINGPARAM("bar"), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("baaz")), 0, &n1)); CPPUNIT_ASSERT( @@ -59,7 +61,7 @@ void Test::test() { CPPUNIT_ASSERT(n1 == 3); sal_Int32 n2; rtl::OUString s3( - comphelper::string::searchAndReplace( + comphelper::string::searchAndReplaceAsciiL( s2, RTL_CONSTASCII_STRINGPARAM("bar"), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bz")), n1 + RTL_CONSTASCII_LENGTH("baaz"), &n2)); @@ -68,7 +70,7 @@ void Test::test() { CPPUNIT_ASSERT(n2 == 7); sal_Int32 n3; rtl::OUString s4( - comphelper::string::searchAndReplace( + comphelper::string::searchAndReplaceAsciiL( s3, RTL_CONSTASCII_STRINGPARAM("bar"), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("baz")), n2 + RTL_CONSTASCII_LENGTH("bz"), &n3)); @@ -76,10 +78,10 @@ void Test::test() { CPPUNIT_ASSERT(n3 == -1); } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(TestString); } -NOADDITIONAL; +//NOADDITIONAL; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/qa/test_weakbag.cxx b/comphelper/qa/test_weakbag.cxx index 9c60f11dd925..774260e104b9 100644 --- a/comphelper/qa/test_weakbag.cxx +++ b/comphelper/qa/test_weakbag.cxx @@ -33,7 +33,9 @@ #include "com/sun/star/uno/XInterface.hpp" #include "comphelper/weakbag.hxx" #include "cppuhelper/weak.hxx" -#include "testshl/simpleheader.hxx" +#include +#include +#include namespace { @@ -64,10 +66,10 @@ public: CPPUNIT_TEST_SUITE_END(); }; -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/qa/version.map b/comphelper/qa/version.map index 7321bbca16ad..5e95a1532f8a 100644 --- a/comphelper/qa/version.map +++ b/comphelper/qa/version.map @@ -27,8 +27,7 @@ UDK_3_0_0 { global: - registerAllTestFunction; - + cppunitTestPlugIn; local: *; }; -- cgit From a737bdeb324c6df06ab48276a25c495697aad77d Mon Sep 17 00:00:00 2001 From: Wilhelm Pflueger Date: Sat, 5 Feb 2011 23:02:36 +0100 Subject: Removed odd line. --- comphelper/qa/test_string.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx index 3a631d96790a..c525d31eaa67 100644 --- a/comphelper/qa/test_string.cxx +++ b/comphelper/qa/test_string.cxx @@ -82,6 +82,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(TestString); } -//NOADDITIONAL; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From bc83d94a57e6a2f5263dec230782d9b9777cdf13 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 7 Feb 2011 13:25:57 +0100 Subject: add (pre|post)extstl.h around cppunit headers --- comphelper/qa/test_string.cxx | 2 ++ comphelper/qa/test_weakbag.cxx | 2 ++ 2 files changed, 4 insertions(+) (limited to 'comphelper') diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx index c525d31eaa67..e764c9f73ef7 100644 --- a/comphelper/qa/test_string.cxx +++ b/comphelper/qa/test_string.cxx @@ -30,9 +30,11 @@ #include "sal/config.h" #include "comphelper/string.hxx" +#include "preextstl.h" #include #include #include +#include "postextstl.h" #include "rtl/string.h" #include "rtl/ustring.h" #include "rtl/ustring.hxx" diff --git a/comphelper/qa/test_weakbag.cxx b/comphelper/qa/test_weakbag.cxx index 774260e104b9..b61727e0429d 100644 --- a/comphelper/qa/test_weakbag.cxx +++ b/comphelper/qa/test_weakbag.cxx @@ -33,9 +33,11 @@ #include "com/sun/star/uno/XInterface.hpp" #include "comphelper/weakbag.hxx" #include "cppuhelper/weak.hxx" +#include "preextstl.h" #include #include #include +#include "postextstl.h" namespace { -- cgit From 6f0722eddf0048723aec28ae607c8c42784d81cb Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 7 Feb 2011 17:14:08 +0100 Subject: TESTSHL2LIB does not exist anymore --- comphelper/qa/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/qa/makefile.mk b/comphelper/qa/makefile.mk index 9d68caa549ee..972b0a87e0b5 100644 --- a/comphelper/qa/makefile.mk +++ b/comphelper/qa/makefile.mk @@ -41,7 +41,7 @@ INCPRE += $(MISC)$/$(TARGET)$/inc SHL1TARGET = $(TARGET)_weakbag SHL1OBJS = $(SLO)$/test_weakbag.obj $(SLO)$/test_string.obj -SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) $(COMPHELPERLIB) +SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(CPPUNITLIB) $(SALLIB) $(COMPHELPERLIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) -- cgit From aafce6aa43b98e166aded12ab9d22d38fb910123 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 7 Feb 2011 17:51:34 +0100 Subject: actually enable the STL adaptation --- comphelper/qa/makefile.mk | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'comphelper') diff --git a/comphelper/qa/makefile.mk b/comphelper/qa/makefile.mk index 972b0a87e0b5..9c86c24a20bf 100644 --- a/comphelper/qa/makefile.mk +++ b/comphelper/qa/makefile.mk @@ -33,6 +33,13 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk +#building with stlport, but cppunit was not built with stlport +.IF "$(USE_SYSTEM_STL)"!="YES" +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGSCXX+=-DADAPT_EXT_STL +.ENDIF +.ENDIF + CFLAGSCXX += $(CPPUNIT_CFLAGS) DLLPRE = # no leading "lib" on .so files -- cgit From 783fb6dbf5d3cb4ba39830b555acc7f79e45dd8b Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Tue, 8 Feb 2011 01:35:32 +0100 Subject: Fix comphelper parallel build, so that the tests may run. --- comphelper/prj/build.lst | 2 +- comphelper/qa/makefile.mk | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst index d5eced023c68..25aa17fed564 100644 --- a/comphelper/prj/build.lst +++ b/comphelper/prj/build.lst @@ -11,4 +11,4 @@ ph comphelper\source\compare nmake - all ph_compare ph_inc NULL ph comphelper\source\officeinstdir nmake - all ph_officeinstdir ph_inc NULL ph comphelper\source\xml nmake - all ph_xml NULL ph comphelper\util nmake - all ph_util ph_container ph_evtatmgr ph_misc ph_procfact ph_property ph_streaming ph_compare ph_officeinstdir ph_xml NULL -ph comphelper\qa nmake - all ph_complex NULL \ No newline at end of file +ph comphelper\qa nmake - all ph_complex ph_util NULL diff --git a/comphelper/qa/makefile.mk b/comphelper/qa/makefile.mk index 9c86c24a20bf..8d06d9b4a669 100644 --- a/comphelper/qa/makefile.mk +++ b/comphelper/qa/makefile.mk @@ -32,6 +32,7 @@ TARGET := qa ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk +.INCLUDE : $(PRJ)$/version.mk #building with stlport, but cppunit was not built with stlport .IF "$(USE_SYSTEM_STL)"!="YES" -- cgit From e5e3ba75ecf716ad6760d8b74d095729306e1219 Mon Sep 17 00:00:00 2001 From: Fridrich Štrba Date: Wed, 9 Feb 2011 10:51:01 +0100 Subject: Removing the ext_std masterpiece --- comphelper/qa/test_string.cxx | 4 ++-- comphelper/qa/test_weakbag.cxx | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'comphelper') diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx index e764c9f73ef7..7f15e96a42f5 100644 --- a/comphelper/qa/test_string.cxx +++ b/comphelper/qa/test_string.cxx @@ -30,11 +30,11 @@ #include "sal/config.h" #include "comphelper/string.hxx" -#include "preextstl.h" + #include #include #include -#include "postextstl.h" + #include "rtl/string.h" #include "rtl/ustring.h" #include "rtl/ustring.hxx" diff --git a/comphelper/qa/test_weakbag.cxx b/comphelper/qa/test_weakbag.cxx index b61727e0429d..cc5373d5d6d6 100644 --- a/comphelper/qa/test_weakbag.cxx +++ b/comphelper/qa/test_weakbag.cxx @@ -33,11 +33,10 @@ #include "com/sun/star/uno/XInterface.hpp" #include "comphelper/weakbag.hxx" #include "cppuhelper/weak.hxx" -#include "preextstl.h" + #include #include #include -#include "postextstl.h" namespace { -- cgit From e30c7d6b9938e129c4e0d7577f3132fc01b9e581 Mon Sep 17 00:00:00 2001 From: Fridrich Štrba Date: Wed, 9 Feb 2011 16:20:22 +0100 Subject: Trying to remove the stlport mention from the code --- comphelper/qa/makefile.mk | 7 ------- 1 file changed, 7 deletions(-) (limited to 'comphelper') diff --git a/comphelper/qa/makefile.mk b/comphelper/qa/makefile.mk index 8d06d9b4a669..e8c1d52a77d3 100644 --- a/comphelper/qa/makefile.mk +++ b/comphelper/qa/makefile.mk @@ -34,13 +34,6 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk .INCLUDE : $(PRJ)$/version.mk -#building with stlport, but cppunit was not built with stlport -.IF "$(USE_SYSTEM_STL)"!="YES" -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGSCXX+=-DADAPT_EXT_STL -.ENDIF -.ENDIF - CFLAGSCXX += $(CPPUNIT_CFLAGS) DLLPRE = # no leading "lib" on .so files -- cgit From 40919b309b9918ae8006ae01b74d50b990a37cab Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 14 Feb 2011 11:22:58 +0000 Subject: move this (cool) natural sort into comphelper --- comphelper/inc/comphelper/string.hxx | 38 ++++++++++++++++++++ comphelper/qa/test_string.cxx | 68 +++++++++++++++++++++++++++++++++--- comphelper/source/misc/string.cxx | 55 +++++++++++++++++++++++++++++ 3 files changed, 157 insertions(+), 4 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index 85b1a2e4efe1..9ef4ec657bbb 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -131,6 +131,44 @@ COMPHELPER_DLLPUBLIC ::rtl::OUString convertCommaSeparated( COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > convertCommaSeparated( ::rtl::OUString const & i_rString ); +/** + Compares two strings using natural order. + + For non digit characters, the comparison use the same algorithm as + rtl_str_compare. When a number is encountered during the comparison, + natural order is used. Thus, Heading 10 will be considered as greater + than Heading 2. Numerical comparison is done using decimal representation. + + Beware that "MyString 001" and "MyString 1" will be considered as equal + since leading 0 are meaningless. + + @param str the object to be compared. + @return 0 - if both strings are equal + < 0 - if this string is less than the string argument + > 0 - if this string is greater than the string argument +*/ +COMPHELPER_DLLPUBLIC sal_Int32 compareNatural( const ::rtl::OUString &rLHS, const ::rtl::OUString &rRHS ) + SAL_THROW(()); + +/** + Compares two strings using natural order. + + For non digit characters, the comparison use the same algorithm as + rtl_str_compare. When a number is encountered during the comparison, + natural order is used. Thus, Heading 10 will be considered as greater + than Heading 2. Numerical comparison is done using decimal representation. + + Beware that "MyString 001" and "MyString 1" will be considered as equal + since leading 0 are meaningless. + + @param str the object to be compared. + @return 0 - if both strings are equal + < 0 - if this string is less than the string argument + > 0 - if this string is greater than the string argument + */ +COMPHELPER_DLLPUBLIC sal_Int32 compareNatural( const ::rtl::OString &rLHS, const ::rtl::OString &rRHS ) + SAL_THROW(()); + } } #endif diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx index 7f15e96a42f5..ab13c8814b38 100644 --- a/comphelper/qa/test_string.cxx +++ b/comphelper/qa/test_string.cxx @@ -42,16 +42,20 @@ namespace { -class TestString: public CppUnit::TestFixture { +class TestString: public CppUnit::TestFixture +{ public: void test(); + void testNatural(); CPPUNIT_TEST_SUITE(TestString); CPPUNIT_TEST(test); + CPPUNIT_TEST(testNatural); CPPUNIT_TEST_SUITE_END(); }; -void TestString::test() { +void TestString::test() +{ rtl::OUString s1(RTL_CONSTASCII_USTRINGPARAM("foobarbar")); sal_Int32 n1; rtl::OUString s2( @@ -80,10 +84,66 @@ void TestString::test() { CPPUNIT_ASSERT(n3 == -1); } -CPPUNIT_TEST_SUITE_REGISTRATION(TestString); - +void TestString::testNatural() +{ + using namespace comphelper::string; +// --- Some generic tests to ensure we do not alter original behavior +// outside what we want + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC")))) == 0 + ); + // Case sensitivity + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc")))) < 0 + ); + // Reverse + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC")))) > 0 + ); + // First shorter + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring")))) > 0 + ); + // Second shorter + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring")))) < 0 + ); +// -- Here we go on natural order, each one is followed by classic compare and the reverse comparison + // That's why we originally made the patch + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10")))) < 0 + ); + // Original behavior + CPPUNIT_ASSERT( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10")))) > 0 + ); + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9")))) > 0 + ); + // Harder + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th")))) < 0 + ); + CPPUNIT_ASSERT( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th")))) > 0 + ); + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th")))) > 0 + ); + // Hardest + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010")))) < 0 + ); + CPPUNIT_ASSERT( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010")))) > 0 + ); + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08")))) > 0 + ); } +CPPUNIT_TEST_SUITE_REGISTRATION(TestString); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 66cb8f984182..7e7ddf511799 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -123,6 +123,61 @@ rtl::OUString searchAndReplaceAsciiL( return kws; } +#define IS_DIGIT(CHAR) (((CHAR) >= 48) && ((CHAR <= 57))) + +template + sal_Int32 SAL_CALL compareNaturalImpl(const IMPL_RTL_STRCODE* pStr1, const IMPL_RTL_STRCODE* pStr2) +{ + sal_Int32 nRet; + do { + while ( ((nRet = ((sal_Int32)(IMPL_RTL_USTRCODE(*pStr1)))- + ((sal_Int32)(IMPL_RTL_USTRCODE(*pStr2)))) == 0) && + *pStr2 ) + { + pStr1++; + pStr2++; + } + + if(*pStr1 && *pStr2) + { + IMPL_RTL_STRCODE c1 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ); + IMPL_RTL_STRCODE c2 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ); + sal_Int64 number1 = 0; + sal_Int64 number2 = 0; + if(IS_DIGIT(c1) && IS_DIGIT(c2)) + { + do + { + number1 = number1 * 10 + (c1 - '0'); + pStr1++; + c1 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ); + } while(IS_DIGIT(c1)); + + do + { + number2 = number2 * 10 + (c2 - '0'); + pStr2++; + c2 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ); + } while(IS_DIGIT(c2)); + + nRet = number1 - number2; + } + } + } while(nRet == 0 && *pStr1 && *pStr2); + + return nRet; +} + +sal_Int32 compareNatural( const ::rtl::OUString & rLHS, const ::rtl::OUString & rRHS ) SAL_THROW(()) +{ + return compareNaturalImpl(rLHS.pData->buffer, rRHS.pData->buffer); +} + +sal_Int32 compareNatural( const ::rtl::OString & rLHS, const ::rtl::OString & rRHS ) SAL_THROW(()) +{ + return compareNaturalImpl(rLHS.pData->buffer, rRHS.pData->buffer); +} + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From 8a55872a3ca73014ae63c3c4e00de7df50a5452e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 14 Feb 2011 15:37:58 +0000 Subject: Adjust this to use a Collator to do the string compare And a break-iterator to break it up into string/digit sections. A bit over engineered I guess. --- comphelper/inc/comphelper/string.hxx | 41 ++++----- comphelper/qa/test_string.cxx | 160 ++++++++++++++++++++++++++++++++--- comphelper/source/misc/string.cxx | 124 ++++++++++++++++----------- 3 files changed, 246 insertions(+), 79 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index 9ef4ec657bbb..5cca225df8c6 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -36,6 +36,9 @@ #include "sal/types.h" #include +#include +#include +#include namespace rtl { class OUString; } @@ -147,27 +150,27 @@ COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > < 0 - if this string is less than the string argument > 0 - if this string is greater than the string argument */ -COMPHELPER_DLLPUBLIC sal_Int32 compareNatural( const ::rtl::OUString &rLHS, const ::rtl::OUString &rRHS ) +COMPHELPER_DLLPUBLIC sal_Int32 compareNatural( const ::rtl::OUString &rLHS, const ::rtl::OUString &rRHS, + const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > &rCollator, + const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > &rBI, + const ::com::sun::star::lang::Locale &rLocale ) SAL_THROW(()); -/** - Compares two strings using natural order. - - For non digit characters, the comparison use the same algorithm as - rtl_str_compare. When a number is encountered during the comparison, - natural order is used. Thus, Heading 10 will be considered as greater - than Heading 2. Numerical comparison is done using decimal representation. - - Beware that "MyString 001" and "MyString 1" will be considered as equal - since leading 0 are meaningless. - - @param str the object to be compared. - @return 0 - if both strings are equal - < 0 - if this string is less than the string argument - > 0 - if this string is greater than the string argument - */ -COMPHELPER_DLLPUBLIC sal_Int32 compareNatural( const ::rtl::OString &rLHS, const ::rtl::OString &rRHS ) - SAL_THROW(()); +class COMPHELPER_DLLPUBLIC NaturalStringSorter +{ +private: + ::com::sun::star::lang::Locale m_aLocale; + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > m_xCollator; + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > m_xBI; +public: + NaturalStringSorter( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext, + const ::com::sun::star::lang::Locale &rLocale); + sal_Int32 compare(const rtl::OUString &rLHS, const rtl::OUString &rRHS) + { + return compareNatural(rLHS, rRHS, m_xCollator, m_xBI, m_aLocale); + } +}; } } diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx index ab13c8814b38..a5826ae3628d 100644 --- a/comphelper/qa/test_string.cxx +++ b/comphelper/qa/test_string.cxx @@ -30,6 +30,8 @@ #include "sal/config.h" #include "comphelper/string.hxx" +#include +#include #include #include @@ -84,61 +86,197 @@ void TestString::test() CPPUNIT_ASSERT(n3 == -1); } +using namespace ::com::sun::star; + +class testCollator : public cppu::WeakImplHelper1< i18n::XCollator > +{ +public: + virtual sal_Int32 SAL_CALL compareSubstring( + const rtl::OUString& str1, sal_Int32 off1, sal_Int32 len1, + const rtl::OUString& str2, sal_Int32 off2, sal_Int32 len2) throw(uno::RuntimeException) + { + return str1.copy(off1, len1).compareTo(str2.copy(off2, len2)); + } + virtual sal_Int32 SAL_CALL compareString( + const rtl::OUString& str1, + const rtl::OUString& str2) throw(uno::RuntimeException) + { + return str1.compareTo(str2); + } + virtual sal_Int32 SAL_CALL loadDefaultCollator(const lang::Locale&, sal_Int32) + throw(uno::RuntimeException) {return 0;} + virtual sal_Int32 SAL_CALL loadCollatorAlgorithm(const rtl::OUString&, + const lang::Locale&, sal_Int32) throw(uno::RuntimeException) {return 0;} + virtual void SAL_CALL loadCollatorAlgorithmWithEndUserOption(const rtl::OUString&, + const lang::Locale&, const uno::Sequence< sal_Int32 >&) throw(uno::RuntimeException) {} + virtual uno::Sequence< rtl::OUString > SAL_CALL listCollatorAlgorithms(const lang::Locale&) + throw(uno::RuntimeException) + { + return uno::Sequence< rtl::OUString >(); + } + virtual uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions(const rtl::OUString&) + throw(uno::RuntimeException) + { + return uno::Sequence< sal_Int32 >(); + } +}; + +#define IS_DIGIT(CHAR) (((CHAR) >= 48) && ((CHAR <= 57))) + +class testBreakIterator : public cppu::WeakImplHelper1< i18n::XBreakIterator > +{ +public: + virtual sal_Int32 SAL_CALL nextCharacters( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16, sal_Int32, sal_Int32& ) + throw(uno::RuntimeException) {return -1;} + virtual sal_Int32 SAL_CALL previousCharacters( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16, sal_Int32, sal_Int32& ) + throw(uno::RuntimeException) {return -1;} + + virtual i18n::Boundary SAL_CALL previousWord( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16) throw(uno::RuntimeException) + { return i18n::Boundary(); } + virtual i18n::Boundary SAL_CALL nextWord( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16) throw(uno::RuntimeException) + { return i18n::Boundary(); } + virtual i18n::Boundary SAL_CALL getWordBoundary( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16, sal_Bool ) + throw(uno::RuntimeException) + { return i18n::Boundary(); } + + virtual sal_Bool SAL_CALL isBeginWord( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16 ) throw(uno::RuntimeException) + { return false; } + virtual sal_Bool SAL_CALL isEndWord( const rtl::OUString&, sal_Int32, + const lang::Locale& , sal_Int16 ) throw(uno::RuntimeException) + { return false; } + virtual sal_Int16 SAL_CALL getWordType( const rtl::OUString&, sal_Int32, + const lang::Locale& ) throw(uno::RuntimeException) + { return 0; } + + virtual sal_Int32 SAL_CALL beginOfSentence( const rtl::OUString&, sal_Int32, + const lang::Locale& ) throw(uno::RuntimeException) + { return 0; } + virtual sal_Int32 SAL_CALL endOfSentence( const rtl::OUString& rText, sal_Int32, + const lang::Locale& ) throw(uno::RuntimeException) + { return rText.getLength(); } + + virtual i18n::LineBreakResults SAL_CALL getLineBreak( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int32, + const i18n::LineBreakHyphenationOptions&, + const i18n::LineBreakUserOptions&) + throw(uno::RuntimeException) + { + return i18n::LineBreakResults(); + } + + virtual sal_Int16 SAL_CALL getScriptType( const rtl::OUString&, sal_Int32 ) + throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL beginOfScript( const rtl::OUString&, sal_Int32, + sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL endOfScript( const rtl::OUString&, sal_Int32, + sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL previousScript( const rtl::OUString&, sal_Int32, + sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL nextScript( const rtl::OUString&, sal_Int32, + sal_Int16 ) throw(uno::RuntimeException) { return -1; } + + virtual sal_Int32 SAL_CALL beginOfCharBlock( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL endOfCharBlock( const rtl::OUString& rText, sal_Int32 nStartPos, + const lang::Locale&, sal_Int16 CharType ) throw(uno::RuntimeException) + { + const sal_Unicode *pStr = rText.getStr()+nStartPos; + for (sal_Int16 nI = nStartPos; nI < rText.getLength(); ++nI) + { + if (CharType == i18n::CharType::DECIMAL_DIGIT_NUMBER && !IS_DIGIT(*pStr)) + return nI; + else if (CharType != i18n::CharType::DECIMAL_DIGIT_NUMBER && IS_DIGIT(*pStr)) + return nI; + ++pStr; + } + return -1; + } + virtual sal_Int32 SAL_CALL previousCharBlock( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL nextCharBlock( const rtl::OUString& rText, sal_Int32 nStartPos, + const lang::Locale&, sal_Int16 CharType ) throw(uno::RuntimeException) + { + const sal_Unicode *pStr = rText.getStr()+nStartPos; + for (sal_Int16 nI = nStartPos; nI < rText.getLength(); ++nI) + { + if (CharType == i18n::CharType::DECIMAL_DIGIT_NUMBER && IS_DIGIT(*pStr)) + return nI; + else if (CharType != i18n::CharType::DECIMAL_DIGIT_NUMBER && !IS_DIGIT(*pStr)) + return nI; + ++pStr; + } + return -1; + } +}; + void TestString::testNatural() { using namespace comphelper::string; + + uno::Reference< i18n::XCollator > xCollator(new testCollator); + uno::Reference< i18n::XBreakIterator > xBI(new testBreakIterator); + // --- Some generic tests to ensure we do not alter original behavior // outside what we want CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC")))) == 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), xCollator, xBI, lang::Locale()) == 0 ); // Case sensitivity CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc")))) < 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc"))), xCollator, xBI, lang::Locale()) < 0 ); // Reverse CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC")))) > 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), xCollator, xBI, lang::Locale()) > 0 ); // First shorter CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring")))) > 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring"))), xCollator, xBI, lang::Locale()) > 0 ); // Second shorter CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring")))) < 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring"))), xCollator, xBI, lang::Locale()) < 0 ); // -- Here we go on natural order, each one is followed by classic compare and the reverse comparison // That's why we originally made the patch CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10")))) < 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10"))), xCollator, xBI, lang::Locale()) < 0 ); // Original behavior CPPUNIT_ASSERT( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10")))) > 0 ); CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9")))) > 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))), xCollator, xBI, lang::Locale()) > 0 ); // Harder CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th")))) < 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th"))), xCollator, xBI, lang::Locale()) < 0 ); CPPUNIT_ASSERT( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th")))) > 0 ); CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th")))) > 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))), xCollator, xBI, lang::Locale()) > 0 ); // Hardest CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010")))) < 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010"))), xCollator, xBI, lang::Locale()) < 0 ); CPPUNIT_ASSERT( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010")))) > 0 ); CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08")))) > 0 + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))), xCollator, xBI, lang::Locale()) > 0 + ); + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("apple10apple"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("apple10apple"))), xCollator, xBI, lang::Locale()) == 0 ); } diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 7e7ddf511799..1edf6846cf23 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -42,6 +42,8 @@ #include #include +#include + namespace comphelper { namespace string { @@ -92,10 +94,12 @@ rtl::OUString searchAndReplaceAsciiL( return _source; } +using namespace ::com::sun::star; + // convert between sequence of string and comma separated string ::rtl::OUString convertCommaSeparated( - ::com::sun::star::uno::Sequence< ::rtl::OUString > const& i_rSeq) + uno::Sequence< ::rtl::OUString > const& i_rSeq) { ::rtl::OUStringBuffer buf; ::comphelper::intersperse( @@ -105,7 +109,7 @@ rtl::OUString searchAndReplaceAsciiL( return buf.makeStringAndClear(); } -::com::sun::star::uno::Sequence< ::rtl::OUString > +uno::Sequence< ::rtl::OUString > convertCommaSeparated( ::rtl::OUString const& i_rString ) { std::vector< ::rtl::OUString > vec; @@ -118,64 +122,86 @@ rtl::OUString searchAndReplaceAsciiL( vec.push_back(kw); } } while (idx >= 0); - ::com::sun::star::uno::Sequence< ::rtl::OUString > kws(vec.size()); + uno::Sequence< ::rtl::OUString > kws(vec.size()); std::copy(vec.begin(), vec.end(), stl_begin(kws)); return kws; } -#define IS_DIGIT(CHAR) (((CHAR) >= 48) && ((CHAR <= 57))) -template - sal_Int32 SAL_CALL compareNaturalImpl(const IMPL_RTL_STRCODE* pStr1, const IMPL_RTL_STRCODE* pStr2) +sal_Int32 compareNatural( const ::rtl::OUString & rLHS, const ::rtl::OUString & rRHS, + const uno::Reference< i18n::XCollator > &rCollator, + const uno::Reference< i18n::XBreakIterator > &rBI, + const lang::Locale &rLocale) SAL_THROW(()) { - sal_Int32 nRet; - do { - while ( ((nRet = ((sal_Int32)(IMPL_RTL_USTRCODE(*pStr1)))- - ((sal_Int32)(IMPL_RTL_USTRCODE(*pStr2)))) == 0) && - *pStr2 ) - { - pStr1++; - pStr2++; - } - - if(*pStr1 && *pStr2) - { - IMPL_RTL_STRCODE c1 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ); - IMPL_RTL_STRCODE c2 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ); - sal_Int64 number1 = 0; - sal_Int64 number2 = 0; - if(IS_DIGIT(c1) && IS_DIGIT(c2)) - { - do - { - number1 = number1 * 10 + (c1 - '0'); - pStr1++; - c1 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ); - } while(IS_DIGIT(c1)); - - do - { - number2 = number2 * 10 + (c2 - '0'); - pStr2++; - c2 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ); - } while(IS_DIGIT(c2)); - - nRet = number1 - number2; - } - } - } while(nRet == 0 && *pStr1 && *pStr2); + sal_Int16 nRet = 0; - return nRet; -} + sal_Int16 nLHSLastNonDigitPos = 0; + sal_Int16 nRHSLastNonDigitPos = 0; + sal_Int16 nLHSFirstDigitPos = 0; + sal_Int16 nRHSFirstDigitPos = 0; -sal_Int32 compareNatural( const ::rtl::OUString & rLHS, const ::rtl::OUString & rRHS ) SAL_THROW(()) -{ - return compareNaturalImpl(rLHS.pData->buffer, rRHS.pData->buffer); + while (nLHSFirstDigitPos < rLHS.getLength() || nRHSFirstDigitPos < rRHS.getLength()) + { + sal_Int16 nLHSChunkLen; + sal_Int16 nRHSChunkLen; + + //Compare non digit block as normal strings + nLHSFirstDigitPos = rBI->nextCharBlock(rLHS, nLHSLastNonDigitPos, + rLocale, i18n::CharType::DECIMAL_DIGIT_NUMBER); + nRHSFirstDigitPos = rBI->nextCharBlock(rRHS, nRHSLastNonDigitPos, + rLocale, i18n::CharType::DECIMAL_DIGIT_NUMBER); + if (nLHSFirstDigitPos == -1) + nLHSFirstDigitPos = rLHS.getLength(); + if (nRHSFirstDigitPos == -1) + nRHSFirstDigitPos = rRHS.getLength(); + nLHSChunkLen = nLHSFirstDigitPos - nLHSLastNonDigitPos; + nRHSChunkLen = nRHSFirstDigitPos - nRHSLastNonDigitPos; + + nRet = rCollator->compareSubstring(rLHS, nLHSLastNonDigitPos, + nLHSChunkLen, rRHS, nRHSLastNonDigitPos, nRHSChunkLen); + if (nRet != 0) + return nRet; + + //Compare digit block as one number vs another + nLHSLastNonDigitPos = rBI->endOfCharBlock(rLHS, nLHSFirstDigitPos, + rLocale, i18n::CharType::DECIMAL_DIGIT_NUMBER); + nRHSLastNonDigitPos = rBI->endOfCharBlock(rRHS, nRHSFirstDigitPos, + rLocale, i18n::CharType::DECIMAL_DIGIT_NUMBER); + if (nLHSLastNonDigitPos == -1) + nLHSLastNonDigitPos = rLHS.getLength(); + if (nRHSLastNonDigitPos == -1) + nRHSLastNonDigitPos = rRHS.getLength(); + nLHSChunkLen = nLHSLastNonDigitPos - nLHSFirstDigitPos; + nRHSChunkLen = nRHSLastNonDigitPos - nRHSFirstDigitPos; + + //To-Do: Possibly scale down those unicode codepoints that relate to + //numbers outside of the normal 0-9 range, e.g. see GetLocalizedChar in + //vcl + sal_Int32 nLHS = rLHS.copy(nLHSFirstDigitPos, nLHSChunkLen).toInt32(); + sal_Int32 nRHS = rRHS.copy(nRHSFirstDigitPos, nRHSChunkLen).toInt32(); + + nRet = nLHS-nRHS; + if (nRet != 0) + return nRet; + } + + return nRet; } -sal_Int32 compareNatural( const ::rtl::OString & rLHS, const ::rtl::OString & rRHS ) SAL_THROW(()) +NaturalStringSorter::NaturalStringSorter( + const uno::Reference< uno::XComponentContext > &rContext, + const lang::Locale &rLocale) : m_aLocale(rLocale) { - return compareNaturalImpl(rLHS.pData->buffer, rRHS.pData->buffer); + uno::Reference< lang::XMultiComponentFactory > xFactory(rContext->getServiceManager(), + uno::UNO_SET_THROW); + + m_xCollator = uno::Reference< i18n::XCollator >(xFactory->createInstanceWithContext( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator")), rContext), + uno::UNO_QUERY_THROW); + m_xCollator->loadDefaultCollator(m_aLocale, 0); + m_xBI = uno::Reference< i18n::XBreakIterator >(xFactory->createInstanceWithContext( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")), rContext), + uno::UNO_QUERY_THROW); } } } -- cgit From 42d679329c7f23aa50b6770b1810cca8749f2d0c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 14 Feb 2011 16:17:55 +0000 Subject: we can make this const --- comphelper/inc/comphelper/string.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index 5cca225df8c6..e3c6787b2ef3 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -166,7 +166,7 @@ public: NaturalStringSorter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext, const ::com::sun::star::lang::Locale &rLocale); - sal_Int32 compare(const rtl::OUString &rLHS, const rtl::OUString &rRHS) + sal_Int32 compare(const rtl::OUString &rLHS, const rtl::OUString &rRHS) const { return compareNatural(rLHS, rRHS, m_xCollator, m_xBI, m_aLocale); } -- cgit From 822d04cb8483accf96cebfee4a9fa56fa274a5f0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 14 Feb 2011 20:48:04 +0000 Subject: squeeze these down in case of StringCompare casting --- comphelper/source/misc/string.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 1edf6846cf23..2d45608ef699 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -160,7 +160,7 @@ sal_Int32 compareNatural( const ::rtl::OUString & rLHS, const ::rtl::OUString & nRet = rCollator->compareSubstring(rLHS, nLHSLastNonDigitPos, nLHSChunkLen, rRHS, nRHSLastNonDigitPos, nRHSChunkLen); if (nRet != 0) - return nRet; + break; //Compare digit block as one number vs another nLHSLastNonDigitPos = rBI->endOfCharBlock(rLHS, nLHSFirstDigitPos, @@ -182,9 +182,15 @@ sal_Int32 compareNatural( const ::rtl::OUString & rLHS, const ::rtl::OUString & nRet = nLHS-nRHS; if (nRet != 0) - return nRet; + break; } + //Squeeze these down to -1, 0, 1 in case it gets casted to a StringCompare + if (nRet > 0) + nRet = 1; + else if (nRet < 0) + nRet = -1; + return nRet; } -- cgit From ba00e8f403b0284e6dd28701975e0c91cf6d51ce Mon Sep 17 00:00:00 2001 From: Sébastien Le Ray Date: Wed, 16 Feb 2011 09:54:58 +0100 Subject: Cleanup in comphelper unit tests. --- comphelper/prj/build.lst | 3 +- comphelper/qa/makefile.mk | 53 ---- comphelper/qa/string/makefile.mk | 53 ++++ comphelper/qa/string/test_string.cxx | 287 +++++++++++++++++++++ comphelper/qa/string/test_string_noadditional.cxx | 33 +++ comphelper/qa/test_string.cxx | 287 --------------------- comphelper/qa/test_weakbag.cxx | 76 ------ comphelper/qa/weakbag/makefile.mk | 53 ++++ comphelper/qa/weakbag/test_weakbag.cxx | 74 ++++++ .../qa/weakbag/test_weakbag_noadditional.cxx | 33 +++ 10 files changed, 535 insertions(+), 417 deletions(-) delete mode 100644 comphelper/qa/makefile.mk create mode 100644 comphelper/qa/string/makefile.mk create mode 100644 comphelper/qa/string/test_string.cxx create mode 100644 comphelper/qa/string/test_string_noadditional.cxx delete mode 100644 comphelper/qa/test_string.cxx delete mode 100644 comphelper/qa/test_weakbag.cxx create mode 100644 comphelper/qa/weakbag/makefile.mk create mode 100644 comphelper/qa/weakbag/test_weakbag.cxx create mode 100644 comphelper/qa/weakbag/test_weakbag_noadditional.cxx (limited to 'comphelper') diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst index 25aa17fed564..8a4f18ad2905 100644 --- a/comphelper/prj/build.lst +++ b/comphelper/prj/build.lst @@ -11,4 +11,5 @@ ph comphelper\source\compare nmake - all ph_compare ph_inc NULL ph comphelper\source\officeinstdir nmake - all ph_officeinstdir ph_inc NULL ph comphelper\source\xml nmake - all ph_xml NULL ph comphelper\util nmake - all ph_util ph_container ph_evtatmgr ph_misc ph_procfact ph_property ph_streaming ph_compare ph_officeinstdir ph_xml NULL -ph comphelper\qa nmake - all ph_complex ph_util NULL +ph comphelper\qa\weakbag nmake - all qa_weakbag ph_util NULL +ph comphelper\qa\string nmake - all qa_string ph_util NULL diff --git a/comphelper/qa/makefile.mk b/comphelper/qa/makefile.mk deleted file mode 100644 index e8c1d52a77d3..000000000000 --- a/comphelper/qa/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ := .. -PRJNAME := comphelper -TARGET := qa - -ENABLE_EXCEPTIONS := TRUE - -.INCLUDE: settings.mk -.INCLUDE : $(PRJ)$/version.mk - -CFLAGSCXX += $(CPPUNIT_CFLAGS) - -DLLPRE = # no leading "lib" on .so files - -INCPRE += $(MISC)$/$(TARGET)$/inc - -SHL1TARGET = $(TARGET)_weakbag -SHL1OBJS = $(SLO)$/test_weakbag.obj $(SLO)$/test_string.obj -SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(CPPUNITLIB) $(SALLIB) $(COMPHELPERLIB) -SHL1VERSIONMAP = version.map -SHL1IMPLIB = i$(SHL1TARGET) -DEF1NAME = $(SHL1TARGET) - -SLOFILES = $(SHL1OBJS) - -.INCLUDE: target.mk -.INCLUDE: _cppunit.mk diff --git a/comphelper/qa/string/makefile.mk b/comphelper/qa/string/makefile.mk new file mode 100644 index 000000000000..7a74454c9212 --- /dev/null +++ b/comphelper/qa/string/makefile.mk @@ -0,0 +1,53 @@ +#************************************************************************* +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ := ..$/.. +PRJNAME := comphelper +TARGET := qa + +ENABLE_EXCEPTIONS := TRUE + +.INCLUDE: settings.mk +.INCLUDE : $(PRJ)$/version.mk + +CFLAGSCXX += $(CPPUNIT_CFLAGS) + +DLLPRE = # no leading "lib" on .so files + +INCPRE += $(MISC)$/$(TARGET)$/inc + +SHL1TARGET = $(TARGET)_string +SHL1OBJS = $(SLO)$/test_string.obj $(SLO)$/test_string_noadditional.obj +SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(CPPUNITLIB) $(SALLIB) $(COMPHELPERLIB) +SHL1VERSIONMAP = ..$/version.map +SHL1IMPLIB = i$(SHL1TARGET) +DEF1NAME = $(SHL1TARGET) + +SLOFILES = $(SHL1OBJS) + +.INCLUDE: target.mk +.INCLUDE: _cppunit.mk diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx new file mode 100644 index 000000000000..a5826ae3628d --- /dev/null +++ b/comphelper/qa/string/test_string.cxx @@ -0,0 +1,287 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_comphelper.hxx" +#include "sal/config.h" + +#include "comphelper/string.hxx" +#include +#include + +#include +#include +#include + +#include "rtl/string.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +namespace { + +class TestString: public CppUnit::TestFixture +{ +public: + void test(); + void testNatural(); + + CPPUNIT_TEST_SUITE(TestString); + CPPUNIT_TEST(test); + CPPUNIT_TEST(testNatural); + CPPUNIT_TEST_SUITE_END(); +}; + +void TestString::test() +{ + rtl::OUString s1(RTL_CONSTASCII_USTRINGPARAM("foobarbar")); + sal_Int32 n1; + rtl::OUString s2( + comphelper::string::searchAndReplaceAsciiL( + s1, RTL_CONSTASCII_STRINGPARAM("bar"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("baaz")), 0, &n1)); + CPPUNIT_ASSERT( + s2 == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foobaazbar"))); + CPPUNIT_ASSERT(n1 == 3); + sal_Int32 n2; + rtl::OUString s3( + comphelper::string::searchAndReplaceAsciiL( + s2, RTL_CONSTASCII_STRINGPARAM("bar"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bz")), + n1 + RTL_CONSTASCII_LENGTH("baaz"), &n2)); + CPPUNIT_ASSERT( + s3 == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foobaazbz"))); + CPPUNIT_ASSERT(n2 == 7); + sal_Int32 n3; + rtl::OUString s4( + comphelper::string::searchAndReplaceAsciiL( + s3, RTL_CONSTASCII_STRINGPARAM("bar"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("baz")), + n2 + RTL_CONSTASCII_LENGTH("bz"), &n3)); + CPPUNIT_ASSERT(s4 == s3); + CPPUNIT_ASSERT(n3 == -1); +} + +using namespace ::com::sun::star; + +class testCollator : public cppu::WeakImplHelper1< i18n::XCollator > +{ +public: + virtual sal_Int32 SAL_CALL compareSubstring( + const rtl::OUString& str1, sal_Int32 off1, sal_Int32 len1, + const rtl::OUString& str2, sal_Int32 off2, sal_Int32 len2) throw(uno::RuntimeException) + { + return str1.copy(off1, len1).compareTo(str2.copy(off2, len2)); + } + virtual sal_Int32 SAL_CALL compareString( + const rtl::OUString& str1, + const rtl::OUString& str2) throw(uno::RuntimeException) + { + return str1.compareTo(str2); + } + virtual sal_Int32 SAL_CALL loadDefaultCollator(const lang::Locale&, sal_Int32) + throw(uno::RuntimeException) {return 0;} + virtual sal_Int32 SAL_CALL loadCollatorAlgorithm(const rtl::OUString&, + const lang::Locale&, sal_Int32) throw(uno::RuntimeException) {return 0;} + virtual void SAL_CALL loadCollatorAlgorithmWithEndUserOption(const rtl::OUString&, + const lang::Locale&, const uno::Sequence< sal_Int32 >&) throw(uno::RuntimeException) {} + virtual uno::Sequence< rtl::OUString > SAL_CALL listCollatorAlgorithms(const lang::Locale&) + throw(uno::RuntimeException) + { + return uno::Sequence< rtl::OUString >(); + } + virtual uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions(const rtl::OUString&) + throw(uno::RuntimeException) + { + return uno::Sequence< sal_Int32 >(); + } +}; + +#define IS_DIGIT(CHAR) (((CHAR) >= 48) && ((CHAR <= 57))) + +class testBreakIterator : public cppu::WeakImplHelper1< i18n::XBreakIterator > +{ +public: + virtual sal_Int32 SAL_CALL nextCharacters( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16, sal_Int32, sal_Int32& ) + throw(uno::RuntimeException) {return -1;} + virtual sal_Int32 SAL_CALL previousCharacters( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16, sal_Int32, sal_Int32& ) + throw(uno::RuntimeException) {return -1;} + + virtual i18n::Boundary SAL_CALL previousWord( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16) throw(uno::RuntimeException) + { return i18n::Boundary(); } + virtual i18n::Boundary SAL_CALL nextWord( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16) throw(uno::RuntimeException) + { return i18n::Boundary(); } + virtual i18n::Boundary SAL_CALL getWordBoundary( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16, sal_Bool ) + throw(uno::RuntimeException) + { return i18n::Boundary(); } + + virtual sal_Bool SAL_CALL isBeginWord( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16 ) throw(uno::RuntimeException) + { return false; } + virtual sal_Bool SAL_CALL isEndWord( const rtl::OUString&, sal_Int32, + const lang::Locale& , sal_Int16 ) throw(uno::RuntimeException) + { return false; } + virtual sal_Int16 SAL_CALL getWordType( const rtl::OUString&, sal_Int32, + const lang::Locale& ) throw(uno::RuntimeException) + { return 0; } + + virtual sal_Int32 SAL_CALL beginOfSentence( const rtl::OUString&, sal_Int32, + const lang::Locale& ) throw(uno::RuntimeException) + { return 0; } + virtual sal_Int32 SAL_CALL endOfSentence( const rtl::OUString& rText, sal_Int32, + const lang::Locale& ) throw(uno::RuntimeException) + { return rText.getLength(); } + + virtual i18n::LineBreakResults SAL_CALL getLineBreak( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int32, + const i18n::LineBreakHyphenationOptions&, + const i18n::LineBreakUserOptions&) + throw(uno::RuntimeException) + { + return i18n::LineBreakResults(); + } + + virtual sal_Int16 SAL_CALL getScriptType( const rtl::OUString&, sal_Int32 ) + throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL beginOfScript( const rtl::OUString&, sal_Int32, + sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL endOfScript( const rtl::OUString&, sal_Int32, + sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL previousScript( const rtl::OUString&, sal_Int32, + sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL nextScript( const rtl::OUString&, sal_Int32, + sal_Int16 ) throw(uno::RuntimeException) { return -1; } + + virtual sal_Int32 SAL_CALL beginOfCharBlock( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL endOfCharBlock( const rtl::OUString& rText, sal_Int32 nStartPos, + const lang::Locale&, sal_Int16 CharType ) throw(uno::RuntimeException) + { + const sal_Unicode *pStr = rText.getStr()+nStartPos; + for (sal_Int16 nI = nStartPos; nI < rText.getLength(); ++nI) + { + if (CharType == i18n::CharType::DECIMAL_DIGIT_NUMBER && !IS_DIGIT(*pStr)) + return nI; + else if (CharType != i18n::CharType::DECIMAL_DIGIT_NUMBER && IS_DIGIT(*pStr)) + return nI; + ++pStr; + } + return -1; + } + virtual sal_Int32 SAL_CALL previousCharBlock( const rtl::OUString&, sal_Int32, + const lang::Locale&, sal_Int16 ) throw(uno::RuntimeException) { return -1; } + virtual sal_Int32 SAL_CALL nextCharBlock( const rtl::OUString& rText, sal_Int32 nStartPos, + const lang::Locale&, sal_Int16 CharType ) throw(uno::RuntimeException) + { + const sal_Unicode *pStr = rText.getStr()+nStartPos; + for (sal_Int16 nI = nStartPos; nI < rText.getLength(); ++nI) + { + if (CharType == i18n::CharType::DECIMAL_DIGIT_NUMBER && IS_DIGIT(*pStr)) + return nI; + else if (CharType != i18n::CharType::DECIMAL_DIGIT_NUMBER && !IS_DIGIT(*pStr)) + return nI; + ++pStr; + } + return -1; + } +}; + +void TestString::testNatural() +{ + using namespace comphelper::string; + + uno::Reference< i18n::XCollator > xCollator(new testCollator); + uno::Reference< i18n::XBreakIterator > xBI(new testBreakIterator); + +// --- Some generic tests to ensure we do not alter original behavior +// outside what we want + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), xCollator, xBI, lang::Locale()) == 0 + ); + // Case sensitivity + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc"))), xCollator, xBI, lang::Locale()) < 0 + ); + // Reverse + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), xCollator, xBI, lang::Locale()) > 0 + ); + // First shorter + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring"))), xCollator, xBI, lang::Locale()) > 0 + ); + // Second shorter + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring"))), xCollator, xBI, lang::Locale()) < 0 + ); +// -- Here we go on natural order, each one is followed by classic compare and the reverse comparison + // That's why we originally made the patch + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10"))), xCollator, xBI, lang::Locale()) < 0 + ); + // Original behavior + CPPUNIT_ASSERT( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10")))) > 0 + ); + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))), xCollator, xBI, lang::Locale()) > 0 + ); + // Harder + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th"))), xCollator, xBI, lang::Locale()) < 0 + ); + CPPUNIT_ASSERT( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th")))) > 0 + ); + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))), xCollator, xBI, lang::Locale()) > 0 + ); + // Hardest + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010"))), xCollator, xBI, lang::Locale()) < 0 + ); + CPPUNIT_ASSERT( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010")))) > 0 + ); + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))), xCollator, xBI, lang::Locale()) > 0 + ); + CPPUNIT_ASSERT( + compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("apple10apple"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("apple10apple"))), xCollator, xBI, lang::Locale()) == 0 + ); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(TestString); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/qa/string/test_string_noadditional.cxx b/comphelper/qa/string/test_string_noadditional.cxx new file mode 100644 index 000000000000..9f3bfe5061ab --- /dev/null +++ b/comphelper/qa/string/test_string_noadditional.cxx @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx deleted file mode 100644 index a5826ae3628d..000000000000 --- a/comphelper/qa/test_string.cxx +++ /dev/null @@ -1,287 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "precompiled_comphelper.hxx" -#include "sal/config.h" - -#include "comphelper/string.hxx" -#include -#include - -#include -#include -#include - -#include "rtl/string.h" -#include "rtl/ustring.h" -#include "rtl/ustring.hxx" -#include "sal/types.h" - -namespace { - -class TestString: public CppUnit::TestFixture -{ -public: - void test(); - void testNatural(); - - CPPUNIT_TEST_SUITE(TestString); - CPPUNIT_TEST(test); - CPPUNIT_TEST(testNatural); - CPPUNIT_TEST_SUITE_END(); -}; - -void TestString::test() -{ - rtl::OUString s1(RTL_CONSTASCII_USTRINGPARAM("foobarbar")); - sal_Int32 n1; - rtl::OUString s2( - comphelper::string::searchAndReplaceAsciiL( - s1, RTL_CONSTASCII_STRINGPARAM("bar"), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("baaz")), 0, &n1)); - CPPUNIT_ASSERT( - s2 == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foobaazbar"))); - CPPUNIT_ASSERT(n1 == 3); - sal_Int32 n2; - rtl::OUString s3( - comphelper::string::searchAndReplaceAsciiL( - s2, RTL_CONSTASCII_STRINGPARAM("bar"), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bz")), - n1 + RTL_CONSTASCII_LENGTH("baaz"), &n2)); - CPPUNIT_ASSERT( - s3 == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foobaazbz"))); - CPPUNIT_ASSERT(n2 == 7); - sal_Int32 n3; - rtl::OUString s4( - comphelper::string::searchAndReplaceAsciiL( - s3, RTL_CONSTASCII_STRINGPARAM("bar"), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("baz")), - n2 + RTL_CONSTASCII_LENGTH("bz"), &n3)); - CPPUNIT_ASSERT(s4 == s3); - CPPUNIT_ASSERT(n3 == -1); -} - -using namespace ::com::sun::star; - -class testCollator : public cppu::WeakImplHelper1< i18n::XCollator > -{ -public: - virtual sal_Int32 SAL_CALL compareSubstring( - const rtl::OUString& str1, sal_Int32 off1, sal_Int32 len1, - const rtl::OUString& str2, sal_Int32 off2, sal_Int32 len2) throw(uno::RuntimeException) - { - return str1.copy(off1, len1).compareTo(str2.copy(off2, len2)); - } - virtual sal_Int32 SAL_CALL compareString( - const rtl::OUString& str1, - const rtl::OUString& str2) throw(uno::RuntimeException) - { - return str1.compareTo(str2); - } - virtual sal_Int32 SAL_CALL loadDefaultCollator(const lang::Locale&, sal_Int32) - throw(uno::RuntimeException) {return 0;} - virtual sal_Int32 SAL_CALL loadCollatorAlgorithm(const rtl::OUString&, - const lang::Locale&, sal_Int32) throw(uno::RuntimeException) {return 0;} - virtual void SAL_CALL loadCollatorAlgorithmWithEndUserOption(const rtl::OUString&, - const lang::Locale&, const uno::Sequence< sal_Int32 >&) throw(uno::RuntimeException) {} - virtual uno::Sequence< rtl::OUString > SAL_CALL listCollatorAlgorithms(const lang::Locale&) - throw(uno::RuntimeException) - { - return uno::Sequence< rtl::OUString >(); - } - virtual uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions(const rtl::OUString&) - throw(uno::RuntimeException) - { - return uno::Sequence< sal_Int32 >(); - } -}; - -#define IS_DIGIT(CHAR) (((CHAR) >= 48) && ((CHAR <= 57))) - -class testBreakIterator : public cppu::WeakImplHelper1< i18n::XBreakIterator > -{ -public: - virtual sal_Int32 SAL_CALL nextCharacters( const rtl::OUString&, sal_Int32, - const lang::Locale&, sal_Int16, sal_Int32, sal_Int32& ) - throw(uno::RuntimeException) {return -1;} - virtual sal_Int32 SAL_CALL previousCharacters( const rtl::OUString&, sal_Int32, - const lang::Locale&, sal_Int16, sal_Int32, sal_Int32& ) - throw(uno::RuntimeException) {return -1;} - - virtual i18n::Boundary SAL_CALL previousWord( const rtl::OUString&, sal_Int32, - const lang::Locale&, sal_Int16) throw(uno::RuntimeException) - { return i18n::Boundary(); } - virtual i18n::Boundary SAL_CALL nextWord( const rtl::OUString&, sal_Int32, - const lang::Locale&, sal_Int16) throw(uno::RuntimeException) - { return i18n::Boundary(); } - virtual i18n::Boundary SAL_CALL getWordBoundary( const rtl::OUString&, sal_Int32, - const lang::Locale&, sal_Int16, sal_Bool ) - throw(uno::RuntimeException) - { return i18n::Boundary(); } - - virtual sal_Bool SAL_CALL isBeginWord( const rtl::OUString&, sal_Int32, - const lang::Locale&, sal_Int16 ) throw(uno::RuntimeException) - { return false; } - virtual sal_Bool SAL_CALL isEndWord( const rtl::OUString&, sal_Int32, - const lang::Locale& , sal_Int16 ) throw(uno::RuntimeException) - { return false; } - virtual sal_Int16 SAL_CALL getWordType( const rtl::OUString&, sal_Int32, - const lang::Locale& ) throw(uno::RuntimeException) - { return 0; } - - virtual sal_Int32 SAL_CALL beginOfSentence( const rtl::OUString&, sal_Int32, - const lang::Locale& ) throw(uno::RuntimeException) - { return 0; } - virtual sal_Int32 SAL_CALL endOfSentence( const rtl::OUString& rText, sal_Int32, - const lang::Locale& ) throw(uno::RuntimeException) - { return rText.getLength(); } - - virtual i18n::LineBreakResults SAL_CALL getLineBreak( const rtl::OUString&, sal_Int32, - const lang::Locale&, sal_Int32, - const i18n::LineBreakHyphenationOptions&, - const i18n::LineBreakUserOptions&) - throw(uno::RuntimeException) - { - return i18n::LineBreakResults(); - } - - virtual sal_Int16 SAL_CALL getScriptType( const rtl::OUString&, sal_Int32 ) - throw(uno::RuntimeException) { return -1; } - virtual sal_Int32 SAL_CALL beginOfScript( const rtl::OUString&, sal_Int32, - sal_Int16 ) throw(uno::RuntimeException) { return -1; } - virtual sal_Int32 SAL_CALL endOfScript( const rtl::OUString&, sal_Int32, - sal_Int16 ) throw(uno::RuntimeException) { return -1; } - virtual sal_Int32 SAL_CALL previousScript( const rtl::OUString&, sal_Int32, - sal_Int16 ) throw(uno::RuntimeException) { return -1; } - virtual sal_Int32 SAL_CALL nextScript( const rtl::OUString&, sal_Int32, - sal_Int16 ) throw(uno::RuntimeException) { return -1; } - - virtual sal_Int32 SAL_CALL beginOfCharBlock( const rtl::OUString&, sal_Int32, - const lang::Locale&, sal_Int16 ) throw(uno::RuntimeException) { return -1; } - virtual sal_Int32 SAL_CALL endOfCharBlock( const rtl::OUString& rText, sal_Int32 nStartPos, - const lang::Locale&, sal_Int16 CharType ) throw(uno::RuntimeException) - { - const sal_Unicode *pStr = rText.getStr()+nStartPos; - for (sal_Int16 nI = nStartPos; nI < rText.getLength(); ++nI) - { - if (CharType == i18n::CharType::DECIMAL_DIGIT_NUMBER && !IS_DIGIT(*pStr)) - return nI; - else if (CharType != i18n::CharType::DECIMAL_DIGIT_NUMBER && IS_DIGIT(*pStr)) - return nI; - ++pStr; - } - return -1; - } - virtual sal_Int32 SAL_CALL previousCharBlock( const rtl::OUString&, sal_Int32, - const lang::Locale&, sal_Int16 ) throw(uno::RuntimeException) { return -1; } - virtual sal_Int32 SAL_CALL nextCharBlock( const rtl::OUString& rText, sal_Int32 nStartPos, - const lang::Locale&, sal_Int16 CharType ) throw(uno::RuntimeException) - { - const sal_Unicode *pStr = rText.getStr()+nStartPos; - for (sal_Int16 nI = nStartPos; nI < rText.getLength(); ++nI) - { - if (CharType == i18n::CharType::DECIMAL_DIGIT_NUMBER && IS_DIGIT(*pStr)) - return nI; - else if (CharType != i18n::CharType::DECIMAL_DIGIT_NUMBER && !IS_DIGIT(*pStr)) - return nI; - ++pStr; - } - return -1; - } -}; - -void TestString::testNatural() -{ - using namespace comphelper::string; - - uno::Reference< i18n::XCollator > xCollator(new testCollator); - uno::Reference< i18n::XBreakIterator > xBI(new testBreakIterator); - -// --- Some generic tests to ensure we do not alter original behavior -// outside what we want - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), xCollator, xBI, lang::Locale()) == 0 - ); - // Case sensitivity - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc"))), xCollator, xBI, lang::Locale()) < 0 - ); - // Reverse - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("ABC"))), xCollator, xBI, lang::Locale()) > 0 - ); - // First shorter - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring"))), xCollator, xBI, lang::Locale()) > 0 - ); - // Second shorter - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongerstring"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("alongstring"))), xCollator, xBI, lang::Locale()) < 0 - ); -// -- Here we go on natural order, each one is followed by classic compare and the reverse comparison - // That's why we originally made the patch - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10"))), xCollator, xBI, lang::Locale()) < 0 - ); - // Original behavior - CPPUNIT_ASSERT( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10")))) > 0 - ); - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 10"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("Heading 9"))), xCollator, xBI, lang::Locale()) > 0 - ); - // Harder - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th"))), xCollator, xBI, lang::Locale()) < 0 - ); - CPPUNIT_ASSERT( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th")))) > 0 - ); - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 10th"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("July, the 4th"))), xCollator, xBI, lang::Locale()) > 0 - ); - // Hardest - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010"))), xCollator, xBI, lang::Locale()) < 0 - ); - CPPUNIT_ASSERT( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))).compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010")))) > 0 - ); - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc010"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("abc08"))), xCollator, xBI, lang::Locale()) > 0 - ); - CPPUNIT_ASSERT( - compareNatural(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("apple10apple"))), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("apple10apple"))), xCollator, xBI, lang::Locale()) == 0 - ); -} - -CPPUNIT_TEST_SUITE_REGISTRATION(TestString); - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/qa/test_weakbag.cxx b/comphelper/qa/test_weakbag.cxx deleted file mode 100644 index cc5373d5d6d6..000000000000 --- a/comphelper/qa/test_weakbag.cxx +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "precompiled_comphelper.hxx" -#include "sal/config.h" - -#include "com/sun/star/uno/Reference.hxx" -#include "com/sun/star/uno/XInterface.hpp" -#include "comphelper/weakbag.hxx" -#include "cppuhelper/weak.hxx" - -#include -#include -#include - -namespace { - -namespace css = com::sun::star; - -class Test: public CppUnit::TestFixture { -public: - void test() { - css::uno::Reference< css::uno::XInterface > ref1(new cppu::OWeakObject); - css::uno::Reference< css::uno::XInterface > ref2(new cppu::OWeakObject); - css::uno::Reference< css::uno::XInterface > ref3(new cppu::OWeakObject); - comphelper::WeakBag< css::uno::XInterface > bag; - bag.add(ref1); - bag.add(ref1); - bag.add(ref2); - bag.add(ref2); - ref1.clear(); - bag.add(ref3); - ref3.clear(); - CPPUNIT_ASSERT_MESSAGE("remove first ref2", bag.remove() == ref2); - CPPUNIT_ASSERT_MESSAGE("remove second ref2", bag.remove() == ref2); - CPPUNIT_ASSERT_MESSAGE("remove first null", !bag.remove().is()); - CPPUNIT_ASSERT_MESSAGE("remove second null", !bag.remove().is()); - } - - CPPUNIT_TEST_SUITE(Test); - CPPUNIT_TEST(test); - CPPUNIT_TEST_SUITE_END(); -}; - -CPPUNIT_TEST_SUITE_REGISTRATION(Test); - -} - -CPPUNIT_PLUGIN_IMPLEMENT(); - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/qa/weakbag/makefile.mk b/comphelper/qa/weakbag/makefile.mk new file mode 100644 index 000000000000..606373c34b85 --- /dev/null +++ b/comphelper/qa/weakbag/makefile.mk @@ -0,0 +1,53 @@ +#************************************************************************* +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ := ..$/.. +PRJNAME := comphelper +TARGET := qa + +ENABLE_EXCEPTIONS := TRUE + +.INCLUDE: settings.mk +.INCLUDE : $(PRJ)$/version.mk + +CFLAGSCXX += $(CPPUNIT_CFLAGS) + +DLLPRE = # no leading "lib" on .so files + +INCPRE += $(MISC)$/$(TARGET)$/inc + +SHL1TARGET = $(TARGET)_weakbag +SHL1OBJS = $(SLO)$/test_weakbag.obj $(SLO)$/test_weakbag_noadditional.obj +SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(CPPUNITLIB) $(SALLIB) $(COMPHELPERLIB) +SHL1VERSIONMAP = ..$/version.map +SHL1IMPLIB = i$(SHL1TARGET) +DEF1NAME = $(SHL1TARGET) + +SLOFILES = $(SHL1OBJS) + +.INCLUDE: target.mk +.INCLUDE: _cppunit.mk diff --git a/comphelper/qa/weakbag/test_weakbag.cxx b/comphelper/qa/weakbag/test_weakbag.cxx new file mode 100644 index 000000000000..84767f0ede0e --- /dev/null +++ b/comphelper/qa/weakbag/test_weakbag.cxx @@ -0,0 +1,74 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_comphelper.hxx" +#include "sal/config.h" + +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/XInterface.hpp" +#include "comphelper/weakbag.hxx" +#include "cppuhelper/weak.hxx" + +#include +#include +#include + +namespace { + +namespace css = com::sun::star; + +class Test: public CppUnit::TestFixture { +public: + void test() { + css::uno::Reference< css::uno::XInterface > ref1(new cppu::OWeakObject); + css::uno::Reference< css::uno::XInterface > ref2(new cppu::OWeakObject); + css::uno::Reference< css::uno::XInterface > ref3(new cppu::OWeakObject); + comphelper::WeakBag< css::uno::XInterface > bag; + bag.add(ref1); + bag.add(ref1); + bag.add(ref2); + bag.add(ref2); + ref1.clear(); + bag.add(ref3); + ref3.clear(); + CPPUNIT_ASSERT_MESSAGE("remove first ref2", bag.remove() == ref2); + CPPUNIT_ASSERT_MESSAGE("remove second ref2", bag.remove() == ref2); + CPPUNIT_ASSERT_MESSAGE("remove first null", !bag.remove().is()); + CPPUNIT_ASSERT_MESSAGE("remove second null", !bag.remove().is()); + } + + CPPUNIT_TEST_SUITE(Test); + CPPUNIT_TEST(test); + CPPUNIT_TEST_SUITE_END(); +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(Test); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/qa/weakbag/test_weakbag_noadditional.cxx b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx new file mode 100644 index 000000000000..9f3bfe5061ab --- /dev/null +++ b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From a6ba342adec9edad3e4bcf4d614d3525b4e66186 Mon Sep 17 00:00:00 2001 From: Sébastien Le Ray Date: Thu, 17 Feb 2011 10:41:21 +0100 Subject: Added comphelper::string::decimalStringToNumber --- comphelper/inc/comphelper/string.hxx | 21 ++++++++ comphelper/qa/string/test_string.cxx | 13 +++++ comphelper/source/misc/string.cxx | 98 ++++++++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index e3c6787b2ef3..7944b1e2bddd 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -122,6 +122,27 @@ COMPHELPER_DLLPUBLIC ::rtl::OUString& COMPHELPER_DLLPUBLIC ::rtl::OUString convertCommaSeparated( ::com::sun::star::uno::Sequence< ::rtl::OUString > const & i_rSeq); +/** Convert a decimal string to a number. + + The string must be base-10, no sign but can contain any + codepoint listed in the "Number, Decimal Digit" Unicode + category. + + No verification is made about the validity of the string, + passing string not containing decimal digit code points + gives unspecified results + + If your string is guaranteed to contain only ASCII digit + use rtl::OUString::toInt32 instead. + + @param str The string to convert containing only decimal + digit codepoints. + + @return The value of the string as an int32. + */ +COMPHELPER_DLLPUBLIC sal_uInt32 decimalStringToNumber( + ::rtl::OUString const & str ); + /** Convert a single comma separated string to a sequence of strings. Note that no escaping of commas or anything fancy is done. diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index a5826ae3628d..2f92b8190d15 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -49,10 +49,12 @@ class TestString: public CppUnit::TestFixture public: void test(); void testNatural(); + void testDecimalStringToNumber(); CPPUNIT_TEST_SUITE(TestString); CPPUNIT_TEST(test); CPPUNIT_TEST(testNatural); + CPPUNIT_TEST(testDecimalStringToNumber); CPPUNIT_TEST_SUITE_END(); }; @@ -86,6 +88,17 @@ void TestString::test() CPPUNIT_ASSERT(n3 == -1); } +void TestString::testDecimalStringToNumber() { + rtl::OUString s1(RTL_CONSTASCII_USTRINGPARAM("1234")); + CPPUNIT_ASSERT_EQUAL((sal_uInt32)1234, comphelper::string::decimalStringToNumber(s1)); + s1 += rtl::OUString(L'\u07C6'); + CPPUNIT_ASSERT_EQUAL((sal_uInt32)12346, comphelper::string::decimalStringToNumber(s1)); + // Codepoints on 2 16bits words + sal_uInt32 utf16String[] = { 0x1D7FE /* 8 */, 0x1D7F7 /* 1 */}; + s1 = rtl::OUString(utf16String, 2); + CPPUNIT_ASSERT_EQUAL((sal_uInt32)81, comphelper::string::decimalStringToNumber(s1)); +} + using namespace ::com::sun::star; class testCollator : public cppu::WeakImplHelper1< i18n::XCollator > diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 2d45608ef699..0671e9e7bec8 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -94,6 +94,103 @@ rtl::OUString searchAndReplaceAsciiL( return _source; } +sal_uInt32 decimalStringToNumber( + ::rtl::OUString const & str ) +{ + sal_uInt32 result = 0; + for( sal_Int32 i = 0 ; i < str.getLength() ; ) + { + sal_uInt32 c = str.iterateCodePoints(&i); + sal_uInt8 value = 0; + if( c <= 0x0039) // ASCII decimal digits, most common + value = c - 0x0030; + else if( c >= 0x1D7F6 ) // mathematical monospace digits + value = c - 0x1D7F6; + else if( c >= 0x1D7EC ) // mathematical sans-serif bold digits + value = c - 0x1D7EC; + else if( c >= 0x1D7E2 ) // mathematical sans-serif digits + value = c - 0x1D7E2; + else if( c >= 0x1D7D8 ) // mathematical double-struck digits + value = c - 0x1D7D8; + else if( c >= 0x1D7CE ) // mathematical bold digits + value = c - 0x1D7CE; + else if( c >= 0x11066 ) // brahmi digits + value = c - 0x11066; + else if( c >= 0x104A0 ) // osmanya digits + value = c - 0x104A0; + else if( c >= 0xFF10 ) // fullwidth digits + value = c - 0xFF10; + else if( c >= 0xABF0 ) // meetei mayek digits + value = c - 0xABF0; + else if( c >= 0xAA50 ) // cham digits + value = c - 0xAA50; + else if( c >= 0xA9D0 ) // javanese digits + value = c - 0xA9D0; + else if( c >= 0xA900 ) // kayah li digits + value = c - 0xA900; + else if( c >= 0xA8D0 ) // saurashtra digits + value = c - 0xA8D0; + else if( c >= 0xA620 ) // vai digits + value = c - 0xA620; + else if( c >= 0x1C50 ) // ol chiki digits + value = c - 0x1C50; + else if( c >= 0x1C40 ) // lepcha digits + value = c - 0x1C40; + else if( c >= 0x1BB0 ) // sundanese digits + value = c - 0x1BB0; + else if( c >= 0x1B50 ) // balinese digits + value = c - 0x1B50; + else if( c >= 0x1A90 ) // tai tham tham digits + value = c - 0x1A90; + else if( c >= 0x1A80 ) // tai tham hora digits + value = c - 0x1A80; + else if( c >= 0x19D0 ) // new tai lue digits + value = c - 0x19D0; + else if( c >= 0x1946 ) // limbu digits + value = c - 0x1946; + else if( c >= 0x1810 ) // mongolian digits + value = c - 0x1810; + else if( c >= 0x17E0 ) // khmer digits + value = c - 0x17E0; + else if( c >= 0x1090 ) // myanmar shan digits + value = c - 0x1090; + else if( c >= 0x1040 ) // myanmar digits + value = c - 0x1040; + else if( c >= 0x0F20 ) // tibetan digits + value = c - 0x0F20; + else if( c >= 0x0ED0 ) // lao digits + value = c - 0x0ED0; + else if( c >= 0x0E50 ) // thai digits + value = c - 0x0E50; + else if( c >= 0x0D66 ) // malayalam digits + value = c - 0x0D66; + else if( c >= 0x0CE6 ) // kannada digits + value = c - 0x0CE6; + else if( c >= 0x0C66 ) // telugu digits + value = c - 0x0C66; + else if( c >= 0x0BE6 ) // tamil digits + value = c - 0x0BE6; + else if( c >= 0x0B66 ) // oriya digits + value = c - 0x0B66; + else if( c >= 0x0AE6 ) // gujarati digits + value = c - 0x0AE6; + else if( c >= 0x0A66 ) // gurmukhi digits + value = c - 0x0A66; + else if( c >= 0x09E6 ) // bengali digits + value = c - 0x09E6; + else if( c >= 0x0966 ) // devanagari digit + value = c - 0x0966; + else if( c >= 0x07C0 ) // nko digits + value = c - 0x07C0; + else if( c >= 0x06F0 ) // extended arabic-indic digits + value = c - 0x06F0; + else if( c >= 0x0660 ) // arabic-indic digits + value = c - 0x0660; + result = result * 10 + value; + } + return result; +} + using namespace ::com::sun::star; // convert between sequence of string and comma separated string @@ -177,6 +274,7 @@ sal_Int32 compareNatural( const ::rtl::OUString & rLHS, const ::rtl::OUString & //To-Do: Possibly scale down those unicode codepoints that relate to //numbers outside of the normal 0-9 range, e.g. see GetLocalizedChar in //vcl + sal_Int32 nLHS = rLHS.copy(nLHSFirstDigitPos, nLHSChunkLen).toInt32(); sal_Int32 nRHS = rRHS.copy(nRHSFirstDigitPos, nRHSChunkLen).toInt32(); -- cgit From b0bb3a1bdad7aee9eab79c4ec3c155a4bbd8623f Mon Sep 17 00:00:00 2001 From: Sébastien Le Ray Date: Thu, 17 Feb 2011 10:43:08 +0100 Subject: Use decimalStringToNumber for natural comparison --- comphelper/source/misc/string.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 0671e9e7bec8..6f088f4bbdc6 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -275,8 +275,8 @@ sal_Int32 compareNatural( const ::rtl::OUString & rLHS, const ::rtl::OUString & //numbers outside of the normal 0-9 range, e.g. see GetLocalizedChar in //vcl - sal_Int32 nLHS = rLHS.copy(nLHSFirstDigitPos, nLHSChunkLen).toInt32(); - sal_Int32 nRHS = rRHS.copy(nRHSFirstDigitPos, nRHSChunkLen).toInt32(); + sal_uInt32 nLHS = comphelper::string::decimalStringToNumber(rLHS.copy(nLHSFirstDigitPos, nLHSChunkLen)); + sal_uInt32 nRHS = comphelper::string::decimalStringToNumber(rRHS.copy(nRHSFirstDigitPos, nRHSChunkLen)); nRet = nLHS-nRHS; if (nRet != 0) -- cgit From 926be1c961728855c612af2bb7b5d302c7de4441 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 18 Feb 2011 21:26:40 +0000 Subject: tidy this up and be consistent --- comphelper/inc/comphelper/string.hxx | 3 +-- comphelper/qa/string/makefile.mk | 2 +- comphelper/qa/string/test_string.cxx | 4 ++-- comphelper/qa/weakbag/makefile.mk | 2 +- comphelper/source/misc/string.cxx | 16 ++++++++-------- 5 files changed, 13 insertions(+), 14 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index 7944b1e2bddd..b1f769388ee0 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -174,8 +174,7 @@ COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > COMPHELPER_DLLPUBLIC sal_Int32 compareNatural( const ::rtl::OUString &rLHS, const ::rtl::OUString &rRHS, const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > &rCollator, const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > &rBI, - const ::com::sun::star::lang::Locale &rLocale ) - SAL_THROW(()); + const ::com::sun::star::lang::Locale &rLocale ); class COMPHELPER_DLLPUBLIC NaturalStringSorter { diff --git a/comphelper/qa/string/makefile.mk b/comphelper/qa/string/makefile.mk index 7a74454c9212..fb7ce8ae23ab 100644 --- a/comphelper/qa/string/makefile.mk +++ b/comphelper/qa/string/makefile.mk @@ -27,7 +27,7 @@ PRJ := ..$/.. PRJNAME := comphelper -TARGET := qa +TARGET := qa_string ENABLE_EXCEPTIONS := TRUE diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index 2f92b8190d15..58fa60a151e7 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -200,7 +200,7 @@ public: const lang::Locale&, sal_Int16 CharType ) throw(uno::RuntimeException) { const sal_Unicode *pStr = rText.getStr()+nStartPos; - for (sal_Int16 nI = nStartPos; nI < rText.getLength(); ++nI) + for (sal_Int32 nI = nStartPos; nI < rText.getLength(); ++nI) { if (CharType == i18n::CharType::DECIMAL_DIGIT_NUMBER && !IS_DIGIT(*pStr)) return nI; @@ -216,7 +216,7 @@ public: const lang::Locale&, sal_Int16 CharType ) throw(uno::RuntimeException) { const sal_Unicode *pStr = rText.getStr()+nStartPos; - for (sal_Int16 nI = nStartPos; nI < rText.getLength(); ++nI) + for (sal_Int32 nI = nStartPos; nI < rText.getLength(); ++nI) { if (CharType == i18n::CharType::DECIMAL_DIGIT_NUMBER && IS_DIGIT(*pStr)) return nI; diff --git a/comphelper/qa/weakbag/makefile.mk b/comphelper/qa/weakbag/makefile.mk index 606373c34b85..fdba94838a56 100644 --- a/comphelper/qa/weakbag/makefile.mk +++ b/comphelper/qa/weakbag/makefile.mk @@ -27,7 +27,7 @@ PRJ := ..$/.. PRJNAME := comphelper -TARGET := qa +TARGET := qa_weakbag ENABLE_EXCEPTIONS := TRUE diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 6f088f4bbdc6..9a9a9b8901c5 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -228,19 +228,19 @@ uno::Sequence< ::rtl::OUString > sal_Int32 compareNatural( const ::rtl::OUString & rLHS, const ::rtl::OUString & rRHS, const uno::Reference< i18n::XCollator > &rCollator, const uno::Reference< i18n::XBreakIterator > &rBI, - const lang::Locale &rLocale) SAL_THROW(()) + const lang::Locale &rLocale ) { - sal_Int16 nRet = 0; + sal_Int32 nRet = 0; - sal_Int16 nLHSLastNonDigitPos = 0; - sal_Int16 nRHSLastNonDigitPos = 0; - sal_Int16 nLHSFirstDigitPos = 0; - sal_Int16 nRHSFirstDigitPos = 0; + sal_Int32 nLHSLastNonDigitPos = 0; + sal_Int32 nRHSLastNonDigitPos = 0; + sal_Int32 nLHSFirstDigitPos = 0; + sal_Int32 nRHSFirstDigitPos = 0; while (nLHSFirstDigitPos < rLHS.getLength() || nRHSFirstDigitPos < rRHS.getLength()) { - sal_Int16 nLHSChunkLen; - sal_Int16 nRHSChunkLen; + sal_Int32 nLHSChunkLen; + sal_Int32 nRHSChunkLen; //Compare non digit block as normal strings nLHSFirstDigitPos = rBI->nextCharBlock(rLHS, nLHSLastNonDigitPos, -- cgit From fcb8fd3ba59210dd3f51f8ee164a8549e751032d Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 26 Feb 2011 10:38:15 +0100 Subject: Move bogus OSL_ASSERT(msg) to OSL_FAIL(msg) --- comphelper/source/container/embeddedobjectcontainer.cxx | 2 +- comphelper/source/misc/componentmodule.cxx | 2 +- comphelper/source/property/TypeGeneration.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 89c3e6ec0a96..04c29d8a18f0 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -204,7 +204,7 @@ void EmbeddedObjectContainer::ReleaseImageSubStorage() } catch( uno::Exception& ) { - OSL_ASSERT( "Problems releasing image substorage!\n" ); + OSL_FAIL( "Problems releasing image substorage!\n" ); } } } diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx index f3239dd59846..3e52a5875b7a 100644 --- a/comphelper/source/misc/componentmodule.cxx +++ b/comphelper/source/misc/componentmodule.cxx @@ -185,7 +185,7 @@ namespace comphelper } catch( Exception& ) { - OSL_ASSERT( "OModule::writeComponentInfos: something went wrong while creating the keys!" ); + OSL_FAIL( "OModule::writeComponentInfos: something went wrong while creating the keys!" ); return sal_False; } } diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx index c3d4d5248c15..75f101ca6c07 100644 --- a/comphelper/source/property/TypeGeneration.cxx +++ b/comphelper/source/property/TypeGeneration.cxx @@ -226,7 +226,7 @@ namespace comphelper case CPPUTYPE_REFXGRAPHIC: pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break; case CPPUTYPE_TABLEBORDERDISTANCES: pType = &::getCppuType( (table::TableBorderDistances*)0 ); break; default: - OSL_ASSERT( "Unknown CPPU type" ); + OSL_FAIL( "Unknown CPPU type" ); } } } -- cgit From 22d875b2630369cf85a82985d72f3120cbfa3453 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sat, 26 Feb 2011 13:51:55 +0100 Subject: WaE: suggest parentheses around '&&' within '||' --- comphelper/source/container/embeddedobjectcontainer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 04c29d8a18f0..171c5af5b05c 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -1031,7 +1031,7 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e #if OSL_DEBUG_LEVEL > 1 uno::Reference < container::XNameAccess > xAccess( pImpl->mxStorage, uno::UNO_QUERY ); uno::Reference < embed::XLinkageSupport > xLink( xPersist, uno::UNO_QUERY ); - sal_Bool bIsNotEmbedded = !xPersist.is() || xLink.is() && xLink->isLink(); + sal_Bool bIsNotEmbedded = !xPersist.is() || ( xLink.is() && xLink->isLink() ); // if the object has a persistance and the object is not a link than it must have persistence entry in the storage OSL_ENSURE( bIsNotEmbedded || xAccess->hasByName(aName), "Removing element not present in storage!" ); -- cgit From 8379ad9ac653e4fc4d47ebecf18099e0b41c60c1 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 26 Feb 2011 22:46:43 +0100 Subject: Remove "using namespace ::rtl" --- comphelper/source/compare/AnyCompareFactory.cxx | 3 ++- comphelper/source/eventattachermgr/eventattachermgr.cxx | 3 ++- comphelper/source/misc/regpathhelper.cxx | 5 ++++- comphelper/source/misc/uieventslogger.cxx | 3 ++- comphelper/source/xml/attributelist.cxx | 3 ++- 5 files changed, 12 insertions(+), 5 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx index 787c68d97a18..074d3a5ffc3a 100644 --- a/comphelper/source/compare/AnyCompareFactory.cxx +++ b/comphelper/source/compare/AnyCompareFactory.cxx @@ -50,7 +50,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::ucb; using namespace com::sun::star::lang; using namespace com::sun::star::i18n; -using namespace rtl; + +using ::rtl::OUString; //============================================================================= diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 744a6436bda6..cd618cffd8a6 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -65,7 +65,8 @@ using namespace com::sun::star::script; using namespace com::sun::star::reflection; using namespace cppu; using namespace osl; -using namespace rtl; + +using ::rtl::OUString; namespace comphelper { diff --git a/comphelper/source/misc/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx index 5c39ef684dc7..1228e9278db9 100644 --- a/comphelper/source/misc/regpathhelper.cxx +++ b/comphelper/source/misc/regpathhelper.cxx @@ -39,7 +39,10 @@ #include using namespace osl; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OStringToOUString; #define PATH_DELEMITTER '/' diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx index ff7fc5210448..99df5958200c 100644 --- a/comphelper/source/misc/uieventslogger.cxx +++ b/comphelper/source/misc/uieventslogger.cxx @@ -60,9 +60,10 @@ using namespace com::sun::star::uno; using namespace com::sun::star::util; using namespace cppu; using namespace osl; -using namespace rtl; using namespace std; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; namespace { diff --git a/comphelper/source/xml/attributelist.cxx b/comphelper/source/xml/attributelist.cxx index 012df7f4fe03..2c956623fcb7 100644 --- a/comphelper/source/xml/attributelist.cxx +++ b/comphelper/source/xml/attributelist.cxx @@ -33,10 +33,11 @@ #include -using namespace rtl; using namespace osl; using namespace com::sun::star; +using ::rtl::OUString; + namespace comphelper { struct TagAttribute_Impl -- cgit From 2941a0a77488ec2d98fbfc90755e86d7dec70ecd Mon Sep 17 00:00:00 2001 From: Guillaume Poussel Date: Fri, 4 Mar 2011 00:11:02 +0100 Subject: Remove bogus and useless comments. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luboš Luňák --- comphelper/source/property/propagg.cxx | 1 - comphelper/source/property/propertycontainerhelper.cxx | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index ff3dd8ec9976..48270b8e6f94 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -747,7 +747,6 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( throw WrappedTargetException( ::rtl::OUString(), static_cast< XMultiPropertySet* >( this ), makeAny( UnknownPropertyException( ) ) ); // due to a flaw in the API design, this method is not allowed to throw an UnknownPropertyException // so we wrap it into a WrappedTargetException - // #107545# - 2002-02-20 - fs@openoffice.org if ( OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY == ePropOrg ) ++nAggCount; diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index 8f7b64d58452..b11dea0f1c9b 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -275,8 +275,7 @@ sal_Bool OPropertyContainerHelper::convertFastPropertyValue( Any aNewRequestedValue( _rValue ); // normalization - // (#102329# - 2002-08-14 - fs@openoffice.org) - // (#i29490# - 2004-06-16 - fs@openoffice.org) + // #i29490# if ( !aNewRequestedValue.getValueType().equals( aPos->aProperty.Type ) ) { // the actually given value is not of the same type as the one required Any aProperlyTyped( NULL, aPos->aProperty.Type.getTypeLibType() ); -- cgit From df3c7e76cca60d246277731d0c525d5f7e6f6597 Mon Sep 17 00:00:00 2001 From: Martin Hosken Date: Fri, 25 Feb 2011 16:10:55 +0700 Subject: graphite2 consolidated patch --- comphelper/qa/weakbag/test_weakbag_noadditional.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/qa/weakbag/test_weakbag_noadditional.cxx b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx index 9f3bfe5061ab..b809c701cea8 100644 --- a/comphelper/qa/weakbag/test_weakbag_noadditional.cxx +++ b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx @@ -28,6 +28,6 @@ #include -CPPUNIT_PLUGIN_IMPLEMENT(); +// CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From 3a4875535a6aa73c5e440e84f9b86fc9c327ba95 Mon Sep 17 00:00:00 2001 From: Martin Hosken Date: Wed, 2 Mar 2011 16:21:57 +0700 Subject: revert bad patch in graphite consolidated patch --- comphelper/qa/weakbag/test_weakbag_noadditional.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/qa/weakbag/test_weakbag_noadditional.cxx b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx index b809c701cea8..9f3bfe5061ab 100644 --- a/comphelper/qa/weakbag/test_weakbag_noadditional.cxx +++ b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx @@ -28,6 +28,6 @@ #include -// CPPUNIT_PLUGIN_IMPLEMENT(); +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From f6d2421bb7ddec968d33b25cfda3b24cefa935a6 Mon Sep 17 00:00:00 2001 From: Martin Hosken Date: Fri, 25 Feb 2011 16:10:55 +0700 Subject: graphite2 consolidated patch --- comphelper/qa/weakbag/test_weakbag_noadditional.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/qa/weakbag/test_weakbag_noadditional.cxx b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx index 9f3bfe5061ab..b809c701cea8 100644 --- a/comphelper/qa/weakbag/test_weakbag_noadditional.cxx +++ b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx @@ -28,6 +28,6 @@ #include -CPPUNIT_PLUGIN_IMPLEMENT(); +// CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From b7d4b924bf6e8ab01e3b7ad8d5faf20bf8ec53de Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Thu, 10 Mar 2011 20:10:47 +0100 Subject: Revert comphelper unit test noadditional change (gr2) This reverts commit b5984e292401e87f68343e1bf8a565b622c3b4b7. Commit broke all tinderboxen. --- comphelper/qa/weakbag/test_weakbag_noadditional.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/qa/weakbag/test_weakbag_noadditional.cxx b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx index b809c701cea8..9f3bfe5061ab 100644 --- a/comphelper/qa/weakbag/test_weakbag_noadditional.cxx +++ b/comphelper/qa/weakbag/test_weakbag_noadditional.cxx @@ -28,6 +28,6 @@ #include -// CPPUNIT_PLUGIN_IMPLEMENT(); +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From d86e9a3906b5c2c51a7a04dac0a63c9f74196991 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 12 Mar 2011 11:47:36 +0100 Subject: Move OSL_ENSURE(false,...) to OSL_FAIL(...) --- comphelper/source/container/enumerablemap.cxx | 2 +- comphelper/source/misc/accessiblewrapper.cxx | 3 +-- comphelper/source/misc/documentinfo.cxx | 2 +- comphelper/source/misc/logging.cxx | 18 +++++++++--------- comphelper/source/misc/mediadescriptor.cxx | 2 +- comphelper/source/misc/namedvaluecollection.cxx | 2 +- comphelper/source/misc/officeresourcebundle.cxx | 8 ++++---- comphelper/source/misc/scopeguard.cxx | 6 +++--- comphelper/source/misc/servicedecl.cxx | 2 +- comphelper/source/property/propagg.cxx | 2 +- comphelper/source/property/propertycontainerhelper.cxx | 8 ++++---- 11 files changed, 27 insertions(+), 28 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index b3864d9b8c06..ab0af3e53e8f 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -319,7 +319,7 @@ namespace comphelper return; } } - OSL_ENSURE( false, "lcl_revokeMapModificationListener: the listener is not registered!" ); + OSL_FAIL( "lcl_revokeMapModificationListener: the listener is not registered!" ); } //-------------------------------------------------------------------- diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 2220e15563b9..693d2bbe3218 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -161,8 +161,7 @@ namespace comphelper if (!m_aChildrenMap.insert( AccessibleMap::value_type( _rxKey, xValue ) ).second) { - OSL_ENSURE( - false, + OSL_FAIL( "OWrappedAccessibleChildrenManager::" "getAccessibleWrapperFor: element was already" " inserted!" ); diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx index c1884ba513c2..a9b9a85f7f69 100644 --- a/comphelper/source/misc/documentinfo.cxx +++ b/comphelper/source/misc/documentinfo.cxx @@ -187,7 +187,7 @@ namespace comphelper { sMessage += "\nin function:\n"; sMessage += BOOST_CURRENT_FUNCTION; sMessage += "\n"; - OSL_ENSURE( false, sMessage ); + OSL_FAIL( sMessage ); } return sTitle; diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx index 48b99a6ff94d..6d87b0fb528a 100644 --- a/comphelper/source/misc/logging.cxx +++ b/comphelper/source/misc/logging.cxx @@ -104,7 +104,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" ); + OSL_FAIL( "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" ); } } @@ -145,7 +145,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::getLogLevel: caught an exception!" ); + OSL_FAIL( "EventLogger::getLogLevel: caught an exception!" ); } return LogLevel::OFF; @@ -162,7 +162,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::setLogLevel: caught an exception!" ); + OSL_FAIL( "EventLogger::setLogLevel: caught an exception!" ); } } @@ -179,7 +179,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::isLoggable: caught an exception!" ); + OSL_FAIL( "EventLogger::isLoggable: caught an exception!" ); } return false; @@ -199,7 +199,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::addLogHandler: caught an exception!" ); + OSL_FAIL( "EventLogger::addLogHandler: caught an exception!" ); } return false; } @@ -218,7 +218,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::removeLogHandler: caught an exception!" ); + OSL_FAIL( "EventLogger::removeLogHandler: caught an exception!" ); } return false; } @@ -292,7 +292,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::impl_log: caught an exception!" ); + OSL_FAIL( "EventLogger::impl_log: caught an exception!" ); } return false; @@ -335,7 +335,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "lcl_loadBundle_nothrow: caught an exception!" ); + OSL_FAIL( "lcl_loadBundle_nothrow: caught an exception!" ); } return _rLoggerData.xBundle.is(); @@ -356,7 +356,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "lcl_loadString_nothrow: caught an exception!" ); + OSL_FAIL( "lcl_loadString_nothrow: caught an exception!" ); } return sMessage; } diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 8dbe084cd3f5..f8b8ba7fde35 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -658,7 +658,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference // success? if ( !xResultStream.is() ) { - OSL_ENSURE( false, "no valid reply to the HTTP-Post" ); + OSL_FAIL( "no valid reply to the HTTP-Post" ); return sal_False; } diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index 3effa876c4c2..d758cee5f371 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -195,7 +195,7 @@ namespace comphelper ::rtl::OStringBuffer message; message.append( "NamedValueCollection::impl_assign: encountered a value type which I cannot handle:\n" ); message.append( ::rtl::OUStringToOString( pArgument->getValueTypeName(), RTL_TEXTENCODING_ASCII_US ) ); - OSL_ENSURE( false, message.makeStringAndClear() ); + OSL_FAIL( message.makeStringAndClear() ); } #endif } diff --git a/comphelper/source/misc/officeresourcebundle.cxx b/comphelper/source/misc/officeresourcebundle.cxx index 942a8e618261..2e2119cb2ee3 100644 --- a/comphelper/source/misc/officeresourcebundle.cxx +++ b/comphelper/source/misc/officeresourcebundle.cxx @@ -137,7 +137,7 @@ namespace comphelper } catch( const Exception& ) { - OSL_ENSURE( false, "ResourceBundle_Impl::loadString: caught an exception!" ); + OSL_FAIL( "ResourceBundle_Impl::loadString: caught an exception!" ); } } return sString; @@ -158,7 +158,7 @@ namespace comphelper } catch( const Exception& ) { - OSL_ENSURE( false, "ResourceBundle_Impl::hasString: caught an exception!" ); + OSL_FAIL( "ResourceBundle_Impl::hasString: caught an exception!" ); } } return has; @@ -182,7 +182,7 @@ namespace comphelper } catch( const Exception& ) { - OSL_ENSURE( false, "ResourceBundle_Impl::impl_loadBundle_nopthrow: could not create the resource loader!" ); + OSL_FAIL( "ResourceBundle_Impl::impl_loadBundle_nopthrow: could not create the resource loader!" ); } if ( !xLoader.is() ) @@ -194,7 +194,7 @@ namespace comphelper } catch( const MissingResourceException& ) { - OSL_ENSURE( false, "ResourceBundle_Impl::impl_loadBundle_nopthrow: missing the given resource bundle!" ); + OSL_FAIL( "ResourceBundle_Impl::impl_loadBundle_nopthrow: missing the given resource bundle!" ); } return m_xBundle.is(); diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx index 66cfd231293d..a8df29a7ac81 100644 --- a/comphelper/source/misc/scopeguard.cxx +++ b/comphelper/source/misc/scopeguard.cxx @@ -46,14 +46,14 @@ ScopeGuard::~ScopeGuard() } catch (com::sun::star::uno::Exception & exc) { (void) exc; // avoid warning about unused variable - OSL_ENSURE( - false, rtl::OUStringToOString( + OSL_FAIL( + rtl::OUStringToOString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UNO exception occurred: ") ) + exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); } catch (...) { - OSL_ENSURE( false, "unknown exception occurred!" ); + OSL_FAIL( "unknown exception occurred!" ); } } else diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx index 92e3b3ef7e44..c842f6298c08 100644 --- a/comphelper/source/misc/servicedecl.cxx +++ b/comphelper/source/misc/servicedecl.cxx @@ -142,7 +142,7 @@ bool ServiceDecl::writeInfo( registry::XRegistryKey * xKey ) const bRet = true; } catch (registry::InvalidRegistryException const&) { - OSL_ENSURE( false, "### InvalidRegistryException!" ); + OSL_FAIL( "### InvalidRegistryException!" ); } } return bRet; diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index 48270b8e6f94..a0ae86c9a735 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -727,7 +727,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( aMessage.append( "\n(implementation " ); aMessage.append( typeid( *this ).name() ); aMessage.append( ")" ); - OSL_ENSURE( false, aMessage.getStr() ); + OSL_FAIL( aMessage.getStr() ); #endif } } diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index b11dea0f1c9b..6233efbc011f 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -256,7 +256,7 @@ sal_Bool OPropertyContainerHelper::convertFastPropertyValue( PropertiesIterator aPos = searchHandle(_nHandle); if (aPos == m_aProperties.end()) { - OSL_ENSURE( false, "OPropertyContainerHelper::convertFastPropertyValue: unknown handle!" ); + OSL_FAIL( "OPropertyContainerHelper::convertFastPropertyValue: unknown handle!" ); // should not happen if the derived class has built a correct property set info helper to be used by // our base class OPropertySetHelper return bModified; @@ -399,7 +399,7 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An PropertiesIterator aPos = searchHandle(_nHandle); if (aPos == m_aProperties.end()) { - OSL_ENSURE( false, "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" ); + OSL_FAIL( "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" ); // should not happen if the derived class has built a correct property set info helper to be used by // our base class OPropertySetHelper return; @@ -441,7 +441,7 @@ void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHa PropertiesIterator aPos = const_cast(this)->searchHandle(_nHandle); if (aPos == m_aProperties.end()) { - OSL_ENSURE( false, "OPropertyContainerHelper::getFastPropertyValue: unknown handle!" ); + OSL_FAIL( "OPropertyContainerHelper::getFastPropertyValue: unknown handle!" ); // should not happen if the derived class has built a correct property set info helper to be used by // our base class OPropertySetHelper return; @@ -501,7 +501,7 @@ void OPropertyContainerHelper::modifyAttributes(sal_Int32 _nHandle, sal_Int32 _n PropertiesIterator aPos = searchHandle(_nHandle); if (aPos == m_aProperties.end()) { - OSL_ENSURE( false, "OPropertyContainerHelper::modifyAttributes: unknown handle!" ); + OSL_FAIL( "OPropertyContainerHelper::modifyAttributes: unknown handle!" ); // should not happen if the derived class has built a correct property set info helper to be used by // our base class OPropertySetHelper return; -- cgit From 0c35d637f776a16ca66eaa675cb8bcb35b217e05 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 12 Mar 2011 12:08:50 +0100 Subject: Move OSL_ENSURE(0,...) to OSL_FAIL(...) --- comphelper/source/container/containermultiplexer.cxx | 4 ++-- comphelper/source/container/embeddedobjectcontainer.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx index 80940a9bd048..fa68a34c2940 100644 --- a/comphelper/source/container/containermultiplexer.cxx +++ b/comphelper/source/container/containermultiplexer.cxx @@ -118,7 +118,7 @@ namespace comphelper } catch(const Exception&) { - OSL_ENSURE(0,"Exceptiopn catched!"); + OSL_FAIL("Exceptiopn catched!"); } ::comphelper::decrement(m_refCount); } @@ -153,7 +153,7 @@ namespace comphelper } catch(const Exception&) { - OSL_ENSURE(0,"Exception catched!"); + OSL_FAIL("Exception catched!"); } m_xContainer = NULL; m_pListener = NULL; diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 171c5af5b05c..b9d8702ccee1 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -318,7 +318,7 @@ sal_Bool EmbeddedObjectContainer::HasInstantiatedEmbeddedObject( const ::rtl::OU aIt++; } - OSL_ENSURE( 0, "Unknown object!" ); + OSL_FAIL( "Unknown object!" ); return ::rtl::OUString(); } @@ -1009,13 +1009,13 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( const ::rtl::OUString& rNa } catch ( uno::Exception& ) { - OSL_ENSURE(0,"Could not move object!"); + OSL_FAIL("Could not move object!"); return sal_False; } } else - OSL_ENSURE(0,"Unknown object!"); + OSL_FAIL("Unknown object!"); return sal_False; } -- cgit From eec5319ecca240ca6bd38eb33f7bf97e08d9e2fb Mon Sep 17 00:00:00 2001 From: Fridrich Štrba Date: Mon, 14 Mar 2011 16:49:54 +0100 Subject: insert_iterator not member of std:: error with Visual Studio 10 --- comphelper/source/property/opropertybag.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'comphelper') diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index 4adc7bc4e46b..c67605977ddf 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -43,6 +43,7 @@ #include #include +#include //-------------------------------------------------------------------------- -- cgit From 50969e01588e6e1c0a7c14dc5c2cb57628957496 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 16 Mar 2011 11:56:03 +0200 Subject: Use realpath to avoid pathnames containing symlinks on Cygwin --- comphelper/Library_comphelp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk index 22258a13e837..7c365bc97cd2 100644 --- a/comphelper/Library_comphelp.mk +++ b/comphelper/Library_comphelp.mk @@ -34,8 +34,8 @@ $(eval $(call gb_Library_add_precompiled_header,comphelper,$(SRCDIR)/comphelper/ $(eval $(call gb_Library_set_componentfile,comphelper,comphelper/util/comphelp)) $(eval $(call gb_Library_set_include,comphelper,\ - -I$(SRCDIR)/comphelper/inc/pch \ - -I$(SRCDIR)/comphelper/source/inc \ + -I$(realpath $(SRCDIR)/comphelper/inc/pch) \ + -I$(realpath $(SRCDIR)/comphelper/source/inc) \ $$(INCLUDE) \ -I$(OUTDIR)/inc/offuh \ )) -- cgit From 66584aa981fb65299f3e62a90dbb1e47ffed3b4b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 16 Mar 2011 10:13:09 +0000 Subject: WaE: remove some warnings --- comphelper/qa/string/test_string.cxx | 5 +++-- comphelper/source/misc/string.cxx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'comphelper') diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index 58fa60a151e7..c448ebb9fb45 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -88,10 +88,11 @@ void TestString::test() CPPUNIT_ASSERT(n3 == -1); } -void TestString::testDecimalStringToNumber() { +void TestString::testDecimalStringToNumber() +{ rtl::OUString s1(RTL_CONSTASCII_USTRINGPARAM("1234")); CPPUNIT_ASSERT_EQUAL((sal_uInt32)1234, comphelper::string::decimalStringToNumber(s1)); - s1 += rtl::OUString(L'\u07C6'); + s1 += rtl::OUString(static_cast(0x07C6)); CPPUNIT_ASSERT_EQUAL((sal_uInt32)12346, comphelper::string::decimalStringToNumber(s1)); // Codepoints on 2 16bits words sal_uInt32 utf16String[] = { 0x1D7FE /* 8 */, 0x1D7F7 /* 1 */}; diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 9a9a9b8901c5..18ad6ad4fe9f 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -101,7 +101,7 @@ sal_uInt32 decimalStringToNumber( for( sal_Int32 i = 0 ; i < str.getLength() ; ) { sal_uInt32 c = str.iterateCodePoints(&i); - sal_uInt8 value = 0; + sal_uInt32 value = 0; if( c <= 0x0039) // ASCII decimal digits, most common value = c - 0x0030; else if( c >= 0x1D7F6 ) // mathematical monospace digits -- cgit From 33c7f9eef6f41ee5374bbc84ecf5cc1b77f547e8 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 16 Mar 2011 13:39:00 +0200 Subject: Revert "Use realpath to avoid pathnames containing symlinks on Cygwin" This reverts commit ea0f905a00c7b4d7ab31092566671b7613a956ac. --- comphelper/Library_comphelp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk index 7c365bc97cd2..22258a13e837 100644 --- a/comphelper/Library_comphelp.mk +++ b/comphelper/Library_comphelp.mk @@ -34,8 +34,8 @@ $(eval $(call gb_Library_add_precompiled_header,comphelper,$(SRCDIR)/comphelper/ $(eval $(call gb_Library_set_componentfile,comphelper,comphelper/util/comphelp)) $(eval $(call gb_Library_set_include,comphelper,\ - -I$(realpath $(SRCDIR)/comphelper/inc/pch) \ - -I$(realpath $(SRCDIR)/comphelper/source/inc) \ + -I$(SRCDIR)/comphelper/inc/pch \ + -I$(SRCDIR)/comphelper/source/inc \ $$(INCLUDE) \ -I$(OUTDIR)/inc/offuh \ )) -- cgit From b321a336a4c6fe86484593a0c1d95a8947ccbf3f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 16 Mar 2011 15:52:55 +0200 Subject: Revert "Revert "Use realpath to avoid pathnames containing symlinks on Cygwin"" This reverts commit bac18077450aec272f108bf7e700bfd7fafa33ff. --- comphelper/Library_comphelp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk index 22258a13e837..7c365bc97cd2 100644 --- a/comphelper/Library_comphelp.mk +++ b/comphelper/Library_comphelp.mk @@ -34,8 +34,8 @@ $(eval $(call gb_Library_add_precompiled_header,comphelper,$(SRCDIR)/comphelper/ $(eval $(call gb_Library_set_componentfile,comphelper,comphelper/util/comphelp)) $(eval $(call gb_Library_set_include,comphelper,\ - -I$(SRCDIR)/comphelper/inc/pch \ - -I$(SRCDIR)/comphelper/source/inc \ + -I$(realpath $(SRCDIR)/comphelper/inc/pch) \ + -I$(realpath $(SRCDIR)/comphelper/source/inc) \ $$(INCLUDE) \ -I$(OUTDIR)/inc/offuh \ )) -- cgit From 3d874bdf409ca4a099853b30aeb9932e45c56f60 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 19 Mar 2011 14:11:09 +0100 Subject: Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...) --- comphelper/source/container/embeddedobjectcontainer.cxx | 15 +++++++-------- comphelper/source/eventattachermgr/eventattachermgr.cxx | 2 +- comphelper/source/misc/accessiblecontexthelper.cxx | 2 +- comphelper/source/misc/accessiblewrapper.cxx | 5 ++--- comphelper/source/misc/accimplaccess.cxx | 2 +- comphelper/source/misc/componentcontext.cxx | 2 +- comphelper/source/misc/mediadescriptor.cxx | 2 +- comphelper/source/misc/mimeconfighelper.cxx | 2 +- comphelper/source/misc/numbers.cxx | 2 +- comphelper/source/misc/synchronousdispatch.cxx | 2 +- comphelper/source/misc/types.cxx | 2 +- comphelper/source/property/ChainablePropertySet.cxx | 10 +++++----- comphelper/source/property/ChainablePropertySetInfo.cxx | 2 +- comphelper/source/property/MasterPropertySet.cxx | 10 +++++----- comphelper/source/property/MasterPropertySetInfo.cxx | 4 ++-- comphelper/source/property/composedprops.cxx | 4 ++-- comphelper/source/property/propagg.cxx | 2 +- comphelper/source/property/property.cxx | 4 ++-- comphelper/source/property/propertysethelper.cxx | 6 +++--- comphelper/source/property/propertysetinfo.cxx | 4 ++-- comphelper/source/streaming/otransactedfilestream.cxx | 6 +++--- 21 files changed, 44 insertions(+), 46 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index b9d8702ccee1..9f84b7afa053 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -715,8 +715,7 @@ sal_Bool EmbeddedObjectContainer::CopyEmbeddedObject( EmbeddedObjectContainer& r { RTL_LOGFILE_CONTEXT( aLog, "comphelper (mv76033) comphelper::EmbeddedObjectContainer::CopyEmbeddedObject" ); - OSL_ENSURE( sal_False, - "This method is depricated! Use EmbeddedObjectContainer::CopyAndGetEmbeddedObject() to copy object!\n" ); + OSL_FAIL( "This method is depricated! Use EmbeddedObjectContainer::CopyAndGetEmbeddedObject() to copy object!\n" ); // get the object name before(!) it is assigned to a new storage ::rtl::OUString aOrigName; @@ -844,7 +843,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb { // impossibility to copy readonly property is not treated as an error for now // but the assertion is helpful to detect such scenarios and review them - OSL_ENSURE( sal_False, "Could not copy readonly property!\n" ); + OSL_FAIL( "Could not copy readonly property!\n" ); } } } @@ -912,7 +911,7 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& r catch ( uno::Exception& e ) { (void)e; - OSL_ENSURE( sal_False, "Failed to insert embedded object into storage!" ); + OSL_FAIL( "Failed to insert embedded object into storage!" ); bRet = sal_False; } @@ -944,7 +943,7 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& r } catch ( uno::Exception& ) { - OSL_ENSURE( sal_False, "Failed to remove object from storage!" ); + OSL_FAIL( "Failed to remove object from storage!" ); bRet = sal_False; } } @@ -1094,7 +1093,7 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e } catch( uno::Exception& ) { - OSL_ENSURE( sal_False, "Can not set the new media type to a storage!\n" ); + OSL_FAIL( "Can not set the new media type to a storage!\n" ); } } @@ -1154,7 +1153,7 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e } catch ( uno::Exception& ) { - OSL_ENSURE( sal_False, "Failed to remove object from storage!" ); + OSL_FAIL( "Failed to remove object from storage!" ); return sal_False; } } @@ -1365,7 +1364,7 @@ namespace { } catch( uno::Exception& ) { - OSL_ENSURE( sal_False, "The pictures storage is not available!\n" ); + OSL_FAIL( "The pictures storage is not available!\n" ); } } diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index cd618cffd8a6..acbb962ea4d7 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -989,7 +989,7 @@ void SAL_CALL ImplEventAttacherManager::read(const Reference< XObjectInputStream // Ganze richtig sein. Sonst ist etwas voellig daneben gegangen. if( nRealLen > nLen || nVersion == 1 ) { - OSL_ENSURE( sal_False, "ImplEventAttacherManager::read(): Fatal Error, wrong object length" ); + OSL_FAIL( "ImplEventAttacherManager::read(): Fatal Error, wrong object length" ); } else { diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx index 5dcda7148275..fb89a0bf86a9 100644 --- a/comphelper/source/misc/accessiblecontexthelper.cxx +++ b/comphelper/source/misc/accessiblecontexthelper.cxx @@ -319,7 +319,7 @@ namespace comphelper } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OAccessibleContextHelper::getAccessibleIndexInParent: caught an exception!" ); + OSL_FAIL( "OAccessibleContextHelper::getAccessibleIndexInParent: caught an exception!" ); } return nRet; diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 693d2bbe3218..650130939cda 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -249,7 +249,7 @@ namespace comphelper break; default: - OSL_ENSURE( sal_False, "OWrappedAccessibleChildrenManager::translateAccessibleEvent: unknown (or unexpected) event id!" ); + OSL_FAIL( "OWrappedAccessibleChildrenManager::translateAccessibleEvent: unknown (or unexpected) event id!" ); break; } } @@ -279,8 +279,7 @@ namespace comphelper #if OSL_DEBUG_LEVEL > 0 if ( m_aChildrenMap.end() == aDisposedPos ) { - OSL_ENSURE( sal_False, - "OWrappedAccessibleChildrenManager::disposing: where did this come from?" ); + OSL_FAIL( "OWrappedAccessibleChildrenManager::disposing: where did this come from?" ); // helper for dignostics Reference< XAccessible > xOwningAccessible( m_aOwningAccessible ); Reference< XAccessibleContext > xContext; diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx index 65dfd98364c9..7128d4e13991 100644 --- a/comphelper/source/misc/accimplaccess.cxx +++ b/comphelper/source/misc/accimplaccess.cxx @@ -166,7 +166,7 @@ namespace comphelper } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OAccessibleImplementationAccess::setAccessibleParent: caught an exception while retrieving the implementation!" ); + OSL_FAIL( "OAccessibleImplementationAccess::setAccessibleParent: caught an exception while retrieving the implementation!" ); } return pImplementation; } diff --git a/comphelper/source/misc/componentcontext.cxx b/comphelper/source/misc/componentcontext.cxx index 072cafbcee4c..86224687d9f4 100644 --- a/comphelper/source/misc/componentcontext.cxx +++ b/comphelper/source/misc/componentcontext.cxx @@ -105,7 +105,7 @@ namespace comphelper } catch( const Exception& ) { - OSL_ENSURE( sal_False, "ComponentContext::getContextValueByName: caught an exception!" ); + OSL_FAIL( "ComponentContext::getContextValueByName: caught an exception!" ); } return aReturn; } diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 7bf1eaea266d..68a2999b738e 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -598,7 +598,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool bLockFile ) ::rtl::OUStringBuffer sMsg(256); sMsg.appendAscii("Invalid MediaDescriptor detected:\n"); sMsg.append (ex.Message ); - OSL_ENSURE(sal_False, ::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr()); + OSL_FAIL(::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr()); } #else catch(const css::uno::Exception&) diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index fb6936ea6d1f..d8d81aadea3f 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -800,7 +800,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( if ( !( nFlags & SFX_FILTER_IMPORT ) ) { - OSL_ENSURE( sal_False, "This is no import filter!" ); + OSL_FAIL( "This is no import filter!" ); throw uno::Exception(); } diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx index d86bef05f21a..334a9e52178d 100644 --- a/comphelper/source/misc/numbers.cxx +++ b/comphelper/source/misc/numbers.cxx @@ -139,7 +139,7 @@ Any getNumberFormatProperty( const Reference< XNumberFormatter >& _rxFormatter, } catch( const Exception& ) { - OSL_ENSURE( sal_False, "::getNumberFormatProperty: caught an exception (did you create the key with another formatter?)!" ); + OSL_FAIL( "::getNumberFormatProperty: caught an exception (did you create the key with another formatter?)!" ); } return aReturn; diff --git a/comphelper/source/misc/synchronousdispatch.cxx b/comphelper/source/misc/synchronousdispatch.cxx index ad7c83c8bb15..ca4d4b36f72a 100644 --- a/comphelper/source/misc/synchronousdispatch.cxx +++ b/comphelper/source/misc/synchronousdispatch.cxx @@ -90,7 +90,7 @@ uno::Reference< lang::XComponent > SynchronousDispatch::dispatch( catch ( uno::Exception& ) { rtl::OUString aMsg = UNISTRING( "SynchronousDispatch::dispatch() Error while dispatching! "); - OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr()); + OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr()); } } diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx index 713e03caf23e..629e890ae62a 100644 --- a/comphelper/source/misc/types.cxx +++ b/comphelper/source/misc/types.cxx @@ -128,7 +128,7 @@ sal_Bool getBOOL(const Any& _rAny) if (_rAny.getValueType() == ::getCppuBooleanType()) nReturn = *(sal_Bool*)_rAny.getValue(); else - OSL_ENSURE(sal_False, "comphelper::getBOOL : invalid argument !"); + OSL_FAIL("comphelper::getBOOL : invalid argument !"); return nReturn; } diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx index a8329919502d..e3a02dce4c1b 100644 --- a/comphelper/source/property/ChainablePropertySet.cxx +++ b/comphelper/source/property/ChainablePropertySet.cxx @@ -290,31 +290,31 @@ Any SAL_CALL ChainablePropertySet::getPropertyDefault( const ::rtl::OUString& rP void ChainablePropertySet::_preGetPropertyState () throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } void ChainablePropertySet::_getPropertyState( const comphelper::PropertyInfo&, PropertyState& ) throw(UnknownPropertyException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } void ChainablePropertySet::_postGetPropertyState () throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } void ChainablePropertySet::_setPropertyToDefault( const comphelper::PropertyInfo& ) throw(UnknownPropertyException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } Any ChainablePropertySet::_getPropertyDefault( const comphelper::PropertyInfo& ) throw(UnknownPropertyException, WrappedTargetException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); Any aAny; return aAny; diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx index c8962e755013..0f53c6d0260b 100644 --- a/comphelper/source/property/ChainablePropertySetInfo.cxx +++ b/comphelper/source/property/ChainablePropertySetInfo.cxx @@ -77,7 +77,7 @@ void ChainablePropertySetInfo::add( PropertyInfo* pMap, sal_Int32 nCount ) #ifdef DBG_UTIL PropertyInfoHash::iterator aIter = maMap.find( aName ); if( aIter != maMap.end() ) - OSL_ENSURE( sal_False, "Warning: PropertyInfo added twice, possible error!"); + OSL_FAIL( "Warning: PropertyInfo added twice, possible error!"); #endif maMap[aName] = pMap++; } diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index 253c46ada1cf..2844031d370c 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -474,31 +474,31 @@ Any SAL_CALL MasterPropertySet::getPropertyDefault( const ::rtl::OUString& rProp void MasterPropertySet::_preGetPropertyState () throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } void MasterPropertySet::_getPropertyState( const comphelper::PropertyInfo&, PropertyState& ) throw(UnknownPropertyException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } void MasterPropertySet::_postGetPropertyState () throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } void MasterPropertySet::_setPropertyToDefault( const comphelper::PropertyInfo& ) throw(UnknownPropertyException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } Any MasterPropertySet::_getPropertyDefault( const comphelper::PropertyInfo& ) throw(UnknownPropertyException, WrappedTargetException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); Any aAny; return aAny; } diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index e46faf00447a..0cfaf6ec1a6f 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -83,7 +83,7 @@ void MasterPropertySetInfo::add( PropertyInfo* pMap, sal_Int32 nCount, sal_uInt8 #ifdef DBG_UTIL PropertyDataHash::iterator aIter = maMap.find( aName ); if( aIter != maMap.end() ) - OSL_ENSURE( sal_False, "Warning: PropertyInfo added twice, possible error!"); + OSL_FAIL( "Warning: PropertyInfo added twice, possible error!"); #endif maMap[aName] = new PropertyData ( nMapId, pMap ); } @@ -101,7 +101,7 @@ void MasterPropertySetInfo::add( PropertyInfoHash &rHash, sal_uInt8 nMapId ) #ifdef DBG_UTIL PropertyDataHash::iterator aDebugIter = maMap.find( (*aIter).first ); if( aDebugIter != maMap.end() ) - OSL_ENSURE( sal_False, "Warning: PropertyInfo added twice, possible error!"); + OSL_FAIL( "Warning: PropertyInfo added twice, possible error!"); #endif maMap[(*aIter).first] = new PropertyData ( nMapId, (*aIter).second ); ++aIter; diff --git a/comphelper/source/property/composedprops.cxx b/comphelper/source/property/composedprops.cxx index 74d1b23891f9..aa864f7ca47f 100644 --- a/comphelper/source/property/composedprops.cxx +++ b/comphelper/source/property/composedprops.cxx @@ -300,13 +300,13 @@ namespace comphelper //------------------------------------------------------------------------------ void SAL_CALL OComposedPropertySet::addVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE(sal_False, "OComposedPropertySet::addVetoableChangeListener: no implemented (yet)!"); + OSL_FAIL("OComposedPropertySet::addVetoableChangeListener: no implemented (yet)!"); } //------------------------------------------------------------------------------ void SAL_CALL OComposedPropertySet::removeVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE(sal_False, "OComposedPropertySet::removeVetoableChangeListener: no implemented (yet)!"); + OSL_FAIL("OComposedPropertySet::removeVetoableChangeListener: no implemented (yet)!"); } //------------------------------------------------------------------------------ diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index 15c509378fb6..b83c292689dc 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -959,7 +959,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyToDefault(const ::rtl::O catch( const RuntimeException& ) { throw; } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OPropertySetAggregationHelper::setPropertyToDefault: caught an exception which is not allowed to leave here!" ); + OSL_FAIL( "OPropertySetAggregationHelper::setPropertyToDefault: caught an exception which is not allowed to leave here!" ); } } } diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx index a13930e34fba..37bb62cc98ef 100644 --- a/comphelper/source/property/property.cxx +++ b/comphelper/source/property/property.cxx @@ -78,7 +78,7 @@ void copyProperties(const Reference& _rxSource, { if (!_rxSource.is() || !_rxDest.is()) { - OSL_ENSURE(sal_False, "copyProperties: invalid arguments !"); + OSL_FAIL("copyProperties: invalid arguments !"); return; } @@ -136,7 +136,7 @@ void copyProperties(const Reference& _rxSource, } aBuffer.append( "." ); - OSL_ENSURE( sal_False, aBuffer.getStr() ); + OSL_FAIL( aBuffer.getStr() ); #endif } } diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx index 1a7455b8c956..0ad27a6949ed 100644 --- a/comphelper/source/property/propertysethelper.cxx +++ b/comphelper/source/property/propertysethelper.cxx @@ -312,17 +312,17 @@ Any SAL_CALL PropertySetHelper::getPropertyDefault( const ::rtl::OUString& aProp void PropertySetHelper::_getPropertyStates( const comphelper::PropertyMapEntry**, PropertyState* ) throw(UnknownPropertyException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } void PropertySetHelper::_setPropertyToDefault( const comphelper::PropertyMapEntry* ) throw(UnknownPropertyException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); } Any PropertySetHelper::_getPropertyDefault( const comphelper::PropertyMapEntry* ) throw(UnknownPropertyException, WrappedTargetException ) { - OSL_ENSURE( sal_False, "you have to implement this yourself!"); + OSL_FAIL( "you have to implement this yourself!"); Any aAny; return aAny; diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index 1b3d8b92b951..4746a7e9ce43 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -84,12 +84,12 @@ void PropertyMapImpl::add( PropertyMapEntry* pMap, sal_Int32 nCount ) throw() PropertyMap::iterator aIter = maPropertyMap.find( aName ); if( aIter != maPropertyMap.end() ) { - OSL_ENSURE( sal_False, "Warning: PropertyMapEntry added twice, possible error!"); + OSL_FAIL( "Warning: PropertyMapEntry added twice, possible error!"); } #endif if( NULL == pMap->mpType ) { - OSL_ENSURE( sal_False, "No type in PropertyMapEntry!"); + OSL_FAIL( "No type in PropertyMapEntry!"); pMap->mpType = &::getCppuType((const sal_Int32*)0); } diff --git a/comphelper/source/streaming/otransactedfilestream.cxx b/comphelper/source/streaming/otransactedfilestream.cxx index bac4403fd6ad..9bcfac5fb66b 100644 --- a/comphelper/source/streaming/otransactedfilestream.cxx +++ b/comphelper/source/streaming/otransactedfilestream.cxx @@ -232,7 +232,7 @@ void OTruncatedTransactedFileStream::CloseAll_Impl() xFileAccess->kill( aURL ); } catch( uno::Exception& ) { - OSL_ENSURE( sal_False, "Could not remove the file!" ); + OSL_FAIL( "Could not remove the file!" ); } } } @@ -313,7 +313,7 @@ void OTruncatedTransactedFileStream::Commit_Impl() } catch( uno::Exception& ) { - OSL_ENSURE( sal_False, "These calls are pretty simple, they should not fail!\n" ); + OSL_FAIL( "These calls are pretty simple, they should not fail!\n" ); } m_pStreamData->FreeOriginal(); @@ -537,7 +537,7 @@ void SAL_CALL OTruncatedTransactedFileStream::flush( ) if ( !m_pStreamData ) { - OSL_ENSURE( sal_False, "flush() call on closed stream!\n" ); + OSL_FAIL( "flush() call on closed stream!\n" ); return; // in future throw exception, for now some code might call flush() on closed stream // since file ucp implementation allows it -- cgit From 14f444228cf9c11f314d19ace7bf84255eead5e5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 28 Mar 2011 11:02:50 +0100 Subject: use PartialWeakComponentImplHelperX for overloaded-virtual --- comphelper/inc/comphelper/accessiblewrapper.hxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/accessiblewrapper.hxx b/comphelper/inc/comphelper/accessiblewrapper.hxx index 14361cd4cb23..d091f9fb458a 100644 --- a/comphelper/inc/comphelper/accessiblewrapper.hxx +++ b/comphelper/inc/comphelper/accessiblewrapper.hxx @@ -238,7 +238,7 @@ namespace comphelper //========================================================================= //= OAccessibleContextWrapper //========================================================================= - typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::accessibility::XAccessibleEventBroadcaster + typedef ::cppu::PartialWeakComponentImplHelper2< ::com::sun::star::accessibility::XAccessibleEventBroadcaster , ::com::sun::star::accessibility::XAccessibleContext > OAccessibleContextWrapper_CBase; @@ -293,16 +293,18 @@ namespace comphelper virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException); // XAccessibleEventBroadcaster - using WeakComponentImplHelperBase::addEventListener; virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - using WeakComponentImplHelperBase::removeEventListener; virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); // OAccessibleContextWrapper virtual void notifyTranslatedEvent( const ::com::sun::star::accessibility::AccessibleEventObject& _rEvent ) throw (::com::sun::star::uno::RuntimeException); - // XComponent/OComponentProxyAggregationHelper + // XComponent virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) + { WeakComponentImplHelperBase::addEventListener(xListener); } + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) + { WeakComponentImplHelperBase::removeEventListener(xListener); } // OComponentHelper using OAccessibleContextWrapperHelper::disposing; -- cgit From 7be230173109565c4929e2c426d1b1de9aec1921 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 28 Mar 2011 13:26:27 +0100 Subject: add PartialWeakComponentImplHelperX for overloaded-virtual --- comphelper/inc/comphelper/implbase_var.hxx | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/implbase_var.hxx b/comphelper/inc/comphelper/implbase_var.hxx index 2499ce94f625..4ced6b8fce93 100644 --- a/comphelper/inc/comphelper/implbase_var.hxx +++ b/comphelper/inc/comphelper/implbase_var.hxx @@ -396,6 +396,52 @@ public: { WeakComponentImplHelperBase::removeEventListener( xListener ); } }; +template < BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, + typename Ifc) > +class SAL_NO_VTABLE BOOST_PP_CAT(PartialWeakComponentImplHelper, + COMPHELPER_IMPLBASE_INTERFACE_NUMBER) + : public ::cppu::WeakComponentImplHelperBase, + public ::com::sun::star::lang::XTypeProvider, + BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, public Ifc) +{ + /// @internal + struct cd : public ::rtl::StaticAggregate< + ::cppu::class_data, + BOOST_PP_CAT(detail::ImplClassData, + COMPHELPER_IMPLBASE_INTERFACE_NUMBER) + < + BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc), + BOOST_PP_CAT(PartialWeakComponentImplHelper, + COMPHELPER_IMPLBASE_INTERFACE_NUMBER)< + BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)> + > > {}; + +public: + BOOST_PP_CAT(PartialWeakComponentImplHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)( + ::osl::Mutex & rMutex ) : WeakComponentImplHelperBase(rMutex) {} + + virtual ::com::sun::star::uno::Any + SAL_CALL queryInterface( ::com::sun::star::uno::Type const& rType ) + throw (::com::sun::star::uno::RuntimeException) + { + return ::cppu::WeakComponentImplHelper_query( + rType, cd::get(), this, + static_cast< ::cppu::WeakComponentImplHelperBase * >(this) ); + } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > + SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return ::cppu::WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence + SAL_CALL getImplementationId() + throw (::com::sun::star::uno::RuntimeException) + { return ::cppu::ImplHelper_getImplementationId( cd::get() ); } +}; + + } // namespace comphelper // undef for multiple use/inclusion of this header: -- cgit From 9f89f363ddc27a5b63b6c377692ecf7e8020a890 Mon Sep 17 00:00:00 2001 From: Francisco Saito Date: Tue, 29 Mar 2011 21:39:01 +0100 Subject: drop bogus executable flag from [ch]xx/bas/asm files --- comphelper/inc/comphelper/anycompare.hxx | 0 comphelper/inc/comphelper/componentguard.hxx | 0 comphelper/inc/comphelper/flagguard.hxx | 0 comphelper/source/misc/anycompare.cxx | 0 comphelper/source/misc/docpasswordrequest.cxx | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 comphelper/inc/comphelper/anycompare.hxx mode change 100755 => 100644 comphelper/inc/comphelper/componentguard.hxx mode change 100755 => 100644 comphelper/inc/comphelper/flagguard.hxx mode change 100755 => 100644 comphelper/source/misc/anycompare.cxx mode change 100755 => 100644 comphelper/source/misc/docpasswordrequest.cxx (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/anycompare.hxx b/comphelper/inc/comphelper/anycompare.hxx old mode 100755 new mode 100644 diff --git a/comphelper/inc/comphelper/componentguard.hxx b/comphelper/inc/comphelper/componentguard.hxx old mode 100755 new mode 100644 diff --git a/comphelper/inc/comphelper/flagguard.hxx b/comphelper/inc/comphelper/flagguard.hxx old mode 100755 new mode 100644 diff --git a/comphelper/source/misc/anycompare.cxx b/comphelper/source/misc/anycompare.cxx old mode 100755 new mode 100644 diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx old mode 100755 new mode 100644 -- cgit From 3dfc2de702491e86dfeaaebd789f2143da6e3658 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 2 Apr 2011 16:27:05 +0100 Subject: use rtl::Static pattern here --- comphelper/source/misc/uieventslogger.cxx | 36 ++++++++++--------------------- 1 file changed, 11 insertions(+), 25 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx index ab25d70c6e24..0491d9991271 100644 --- a/comphelper/source/misc/uieventslogger.cxx +++ b/comphelper/source/misc/uieventslogger.cxx @@ -49,6 +49,7 @@ #include #include #include +#include using namespace com::sun::star::beans; @@ -143,7 +144,6 @@ namespace comphelper // static methods and data static ptr getInstance(); - static void prepareMutex(); static bool shouldActivate(); static bool getEnabledFromCoreController(); static bool getEnabledFromCfg(); @@ -152,7 +152,6 @@ namespace comphelper static sal_Int32 findIdx(const Sequence& args, const OUString& key); static ptr instance; - static Mutex * singleton_mutex; static const sal_Int32 COLUMNS; static const OUString CFG_ENABLED; static const OUString CFG_IDLETIMEOUT; @@ -214,6 +213,10 @@ namespace comphelper const OUString UiEventsLogger_Impl::URL_SPECIAL(RTL_CONSTASCII_USTRINGPARAM(".special:")); const OUString UiEventsLogger_Impl::URL_FILE(RTL_CONSTASCII_USTRINGPARAM("file:")); + namespace + { + struct theSingletonMutex : public rtl::Static< Mutex, theSingletonMutex > {}; + } // public UiEventsLogger interface sal_Bool UiEventsLogger::isEnabled() @@ -221,8 +224,7 @@ namespace comphelper if ( UiEventsLogger_Impl::getEnabledFromCfg() ) { try { - UiEventsLogger_Impl::prepareMutex(); - Guard singleton_guard(UiEventsLogger_Impl::singleton_mutex); + Guard singleton_guard(theSingletonMutex::get()); return UiEventsLogger_Impl::getInstance()->m_Active; } catch(...) { return false; } // never throws } // if ( ) @@ -232,8 +234,7 @@ namespace comphelper sal_Int32 UiEventsLogger::getSessionLogEventCount() { try { - UiEventsLogger_Impl::prepareMutex(); - Guard singleton_guard(UiEventsLogger_Impl::singleton_mutex); + Guard singleton_guard(theSingletonMutex::get()); return UiEventsLogger_Impl::getInstance()->m_SessionLogEventCount; } catch(...) { return 0; } // never throws } @@ -269,8 +270,7 @@ namespace comphelper const Sequence& args) { try { - UiEventsLogger_Impl::prepareMutex(); - Guard singleton_guard(UiEventsLogger_Impl::singleton_mutex); + Guard singleton_guard(theSingletonMutex::get()); UiEventsLogger_Impl::getInstance()->logDispatch(url, args); } catch(...) { } // never throws } @@ -283,8 +283,7 @@ namespace comphelper const OUString& param) { try { - UiEventsLogger_Impl::prepareMutex(); - Guard singleton_guard(UiEventsLogger_Impl::singleton_mutex); + Guard singleton_guard(theSingletonMutex::get()); UiEventsLogger_Impl::getInstance()->logVcl(parent_id, window_type, id, method, param); } catch(...) { } // never throws } @@ -313,16 +312,14 @@ namespace comphelper void UiEventsLogger::disposing() { // we dont want to create an instance just to dispose it - UiEventsLogger_Impl::prepareMutex(); - Guard singleton_guard(UiEventsLogger_Impl::singleton_mutex); + Guard singleton_guard(theSingletonMutex::get()); if(UiEventsLogger_Impl::instance!=UiEventsLogger_Impl::ptr()) UiEventsLogger_Impl::getInstance()->disposing(); } void UiEventsLogger::reinit() { - UiEventsLogger_Impl::prepareMutex(); - Guard singleton_guard(UiEventsLogger_Impl::singleton_mutex); + Guard singleton_guard(theSingletonMutex::get()); if(UiEventsLogger_Impl::instance) { UiEventsLogger_Impl::instance->disposing(); @@ -665,17 +662,6 @@ namespace comphelper return instance; } - Mutex * UiEventsLogger_Impl::singleton_mutex = NULL; - void UiEventsLogger_Impl::prepareMutex() - { - if(singleton_mutex == NULL) - { - Guard global_guard(Mutex::getGlobalMutex()); - if(singleton_mutex == NULL) - singleton_mutex = new Mutex(); - } - } - sal_Int32 UiEventsLogger_Impl::findIdx(const Sequence& args, const OUString& key) { for(sal_Int32 i=0; i Date: Sat, 2 Apr 2011 16:47:11 +0100 Subject: use rtl::Static where double-locked pattern used --- comphelper/inc/comphelper/accimplaccess.hxx | 2 +- comphelper/source/misc/accimplaccess.cxx | 18 +++++------------- comphelper/source/misc/comphelper_services.cxx | 20 ++++++++++++++------ comphelper/source/property/propstate.cxx | 16 +++++----------- 4 files changed, 25 insertions(+), 31 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/accimplaccess.hxx b/comphelper/inc/comphelper/accimplaccess.hxx index 8ba9fe43867e..fbbee6fbfde6 100644 --- a/comphelper/inc/comphelper/accimplaccess.hxx +++ b/comphelper/inc/comphelper/accimplaccess.hxx @@ -154,7 +154,7 @@ namespace comphelper private: - COMPHELPER_DLLPRIVATE static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId(); + COMPHELPER_DLLPRIVATE static const ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId(); }; //......................................................................... diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx index 7128d4e13991..e06df35cde0c 100644 --- a/comphelper/source/misc/accimplaccess.cxx +++ b/comphelper/source/misc/accimplaccess.cxx @@ -121,21 +121,13 @@ namespace comphelper return ( NULL != pImplementation ); } + namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } + //--------------------------------------------------------------------- - const Sequence< sal_Int8 >& OAccessibleImplementationAccess::getUnoTunnelImplementationId() + const Sequence< sal_Int8 > OAccessibleImplementationAccess::getUnoTunnelImplementationId() { - static Sequence< sal_Int8 > aId; - if ( !aId.getLength() ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !aId.getLength() ) - { - static ::cppu::OImplementationId aImplId; - // unfortunately, the OImplementationId::getImplementationId returns a copy, not a static reference ... - aId = aImplId.getImplementationId(); - } - } - return aId; + ::cppu::OImplementationId &rID = lcl_ImplId::get(); + return rID.getImplementationId(); } //--------------------------------------------------------------------- diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx index b9cc41fe5b09..32d1c53aff93 100644 --- a/comphelper/source/misc/comphelper_services.cxx +++ b/comphelper/source/misc/comphelper_services.cxx @@ -30,6 +30,8 @@ #include "comphelper_module.hxx" +#include + //-------------------------------------------------------------------- extern void createRegistryInfo_OPropertyBag(); extern void createRegistryInfo_SequenceOutputStream(); @@ -49,13 +51,12 @@ namespace comphelper { namespace module { //........................................................................ - static void initializeModule() + namespace { - static bool bInitialized( false ); - if ( !bInitialized ) + class doInitialize { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !bInitialized ) + public: + doInitialize() { createRegistryInfo_OPropertyBag(); createRegistryInfo_SequenceOutputStream(); @@ -70,7 +71,14 @@ namespace comphelper { namespace module createRegistryInfo_OSimpleLogRing(); createRegistryInfo_OOfficeRestartManager(); } - } + }; + + struct theInitializer : public rtl::Static< doInitialize, theInitializer > {}; + } + + static void initializeModule() + { + theInitializer::get(); } //........................................................................ diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx index 5be6c842a5f8..b58bdb6d0283 100644 --- a/comphelper/source/property/propstate.cxx +++ b/comphelper/source/property/propstate.cxx @@ -32,6 +32,7 @@ #include #include #include +#include //......................................................................... namespace comphelper @@ -217,20 +218,13 @@ namespace comphelper ); } + namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } + //--------------------------------------------------------------------- Sequence< sal_Int8 > SAL_CALL OStatefulPropertySet::getImplementationId() throw(RuntimeException) { - static ::cppu::OImplementationId * pId = NULL; - if ( !pId ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !pId ) - { - static ::cppu::OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); + ::cppu::OImplementationId &rID = lcl_ImplId::get(); + return rID.getImplementationId(); } //--------------------------------------------------------------------- -- cgit From 41d271db85a1adec8591f08b969695c0f7885356 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 3 Apr 2011 20:42:00 +0100 Subject: use rtl::Static where double-locked pattern used --- comphelper/inc/comphelper/componentmodule.hxx | 17 +++++++------- comphelper/inc/comphelper/servicehelper.hxx | 32 +++++++++++++++++---------- comphelper/inc/comphelper/uno3.hxx | 17 +++++--------- 3 files changed, 34 insertions(+), 32 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/componentmodule.hxx b/comphelper/inc/comphelper/componentmodule.hxx index cd65ea50577d..308a270a7393 100644 --- a/comphelper/inc/comphelper/componentmodule.hxx +++ b/comphelper/inc/comphelper/componentmodule.hxx @@ -305,7 +305,7 @@ namespace comphelper /* -------------------------------------------------------------------- */ \ class ModuleClass : public ::comphelper::OModule \ { \ - friend struct CreateModuleClass; \ + friend struct ModuleClass##Creator; \ typedef ::comphelper::OModule BaseClass; \ \ public: \ @@ -368,14 +368,14 @@ namespace comphelper //= implementing a OModule for a component library #define IMPLEMENT_COMPONENT_MODULE( ModuleClass ) \ - struct CreateModuleClass \ + struct ModuleClass##Creator \ { \ - ModuleClass* operator()() \ - { \ - static ModuleClass* pModule = new ModuleClass; \ - return pModule; \ - } \ + ModuleClass m_aModuleClass; \ }; \ + namespace \ + { \ + class the##ModuleClass##Instance : public rtl::Static {}; \ + } \ \ ModuleClass::ModuleClass() \ :BaseClass() \ @@ -384,8 +384,7 @@ namespace comphelper \ ModuleClass& ModuleClass::getInstance() \ { \ - return *rtl_Instance< ModuleClass, CreateModuleClass, ::osl::MutexGuard, ::osl::GetGlobalMutex >:: \ - create( CreateModuleClass(), ::osl::GetGlobalMutex() ); \ + return the##ModuleClass##Instance::get().m_aModuleClass; \ } \ //========================================================================== diff --git a/comphelper/inc/comphelper/servicehelper.hxx b/comphelper/inc/comphelper/servicehelper.hxx index e691ea2bd76c..0cab5fa8eab4 100644 --- a/comphelper/inc/comphelper/servicehelper.hxx +++ b/comphelper/inc/comphelper/servicehelper.hxx @@ -29,6 +29,21 @@ #ifndef _COMPHELPER_SERVICEHELPER_HXX_ #define _COMPHELPER_SERVICEHELPER_HXX_ +#include +#include + +class UnoTunnelIdInit +{ +private: + ::com::sun::star::uno::Sequence< sal_Int8 > m_aSeq; +public: + UnoTunnelIdInit() : m_aSeq(16) + { + rtl_createUuid( (sal_uInt8*)m_aSeq.getArray(), 0, sal_True ); + } + const ::com::sun::star::uno::Sequence< sal_Int8 >& getSeq() const { return m_aSeq; } +}; + /** the UNO3_GETIMPLEMENTATION_* macros implement a static helper function that gives access to your implementation for a given interface reference, if possible. @@ -49,20 +64,13 @@ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); #define UNO3_GETIMPLEMENTATION_BASE_IMPL( classname ) \ +namespace \ +{ \ + class the##classname##UnoTunnelId : public rtl::Static< UnoTunnelIdInit, the##classname##UnoTunnelId> {}; \ +} \ const ::com::sun::star::uno::Sequence< sal_Int8 > & classname::getUnoTunnelId() throw() \ { \ - static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0; \ - if( !pSeq ) \ - { \ - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); \ - if( !pSeq ) \ - { \ - static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); \ - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); \ - pSeq = &aSeq; \ - } \ - } \ - return *pSeq; \ + return the##classname##UnoTunnelId::get()::getSeq(); \ } \ \ classname* classname::getImplementation( const uno::Reference< uno::XInterface >& xInt ) \ diff --git a/comphelper/inc/comphelper/uno3.hxx b/comphelper/inc/comphelper/uno3.hxx index 617c200d3fd5..dff10cc994d3 100644 --- a/comphelper/inc/comphelper/uno3.hxx +++ b/comphelper/inc/comphelper/uno3.hxx @@ -30,6 +30,7 @@ #define _COMPHELPER_UNO3_HXX_ #include +#include #include #include #include @@ -197,19 +198,13 @@ namespace comphelper virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException); #define IMPLEMENT_GET_IMPLEMENTATION_ID( classname ) \ + namespace \ + { \ + class the##classname##ImplementationId : public rtl::Static< ::cppu::OImplementationId, the##classname##ImplementationId> {}; \ + } \ ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL classname::getImplementationId( ) throw (::com::sun::star::uno::RuntimeException) \ { \ - static ::cppu::OImplementationId* pId = NULL; \ - if (!pId) \ - { \ - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \ - if (!pId) \ - { \ - static ::cppu::OImplementationId aId; \ - pId = &aId; \ - } \ - } \ - return pId->getImplementationId(); \ + return the##classname##ImplementationId::get().getImplementationId(); \ } #define IMPLEMENT_FORWARD_XTYPEPROVIDER2( classname, baseclass1, baseclass2 ) \ -- cgit From ac9e34c76e2641750e7965293c641c4b29b82bce Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 4 Apr 2011 09:45:04 +0100 Subject: fix typo --- comphelper/inc/comphelper/servicehelper.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/servicehelper.hxx b/comphelper/inc/comphelper/servicehelper.hxx index 0cab5fa8eab4..15b0ae6a9f7c 100644 --- a/comphelper/inc/comphelper/servicehelper.hxx +++ b/comphelper/inc/comphelper/servicehelper.hxx @@ -70,7 +70,7 @@ namespace \ } \ const ::com::sun::star::uno::Sequence< sal_Int8 > & classname::getUnoTunnelId() throw() \ { \ - return the##classname##UnoTunnelId::get()::getSeq(); \ + return the##classname##UnoTunnelId::get().getSeq(); \ } \ \ classname* classname::getImplementation( const uno::Reference< uno::XInterface >& xInt ) \ -- cgit From db62690a90420ee3310c487e5e8d512c6caa5f4e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 5 Apr 2011 16:57:19 +0100 Subject: createFromAscii -> RTL_CONSTASCII_USTRING --- comphelper/source/misc/mimeconfighelper.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index d8d81aadea3f..c81e761392b9 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -197,7 +197,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetFilterFacto if ( !m_xFilterFactory.is() ) m_xFilterFactory.set( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory")) ), uno::UNO_QUERY ); return m_xFilterFactory; @@ -220,7 +220,7 @@ sal_Int32 MimeConfigurationHelper::GetFilterFlags( const ::rtl::OUString& aFilte if ( aFilterAny >>= aData ) { SequenceAsHashMap aFilterHM( aData ); - nFlags = aFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), (sal_Int32)0 ); + nFlags = aFilterHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 ); } } } catch( uno::Exception& ) @@ -795,7 +795,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( if ( aImpFilterAny >>= aImpData ) { SequenceAsHashMap aImpFilterHM( aImpData ); - sal_Int32 nFlags = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), + sal_Int32 nFlags = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 ); if ( !( nFlags & SFX_FILTER_IMPORT ) ) @@ -810,16 +810,16 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( } else { - ::rtl::OUString aDocumentServiceName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "DocumentService" ), ::rtl::OUString() ); - ::rtl::OUString aTypeName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Type" ), ::rtl::OUString() ); + ::rtl::OUString aDocumentServiceName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService")), ::rtl::OUString() ); + ::rtl::OUString aTypeName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")), ::rtl::OUString() ); OSL_ENSURE( aDocumentServiceName.getLength() && aTypeName.getLength(), "Incomplete filter data!" ); if ( aDocumentServiceName.getLength() && aTypeName.getLength() ) { uno::Sequence< beans::NamedValue > aSearchRequest( 2 ); - aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "Type" ); + aSearchRequest[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")); aSearchRequest[0].Value <<= aTypeName; - aSearchRequest[1].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); + aSearchRequest[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService")); aSearchRequest[1].Value <<= aDocumentServiceName; uno::Sequence< beans::PropertyValue > aExportFilterProps = SearchForFilter( @@ -831,7 +831,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( if ( aExportFilterProps.getLength() ) { SequenceAsHashMap aExpPropsHM( aExportFilterProps ); - aExportFilterName = aExpPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Name" ), ::rtl::OUString() ); + aExportFilterName = aExpPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), ::rtl::OUString() ); } } } @@ -866,7 +866,7 @@ uno::Sequence< beans::PropertyValue > MimeConfigurationHelper::SearchForFilter( if ( xFilterEnum->nextElement() >>= aProps ) { SequenceAsHashMap aPropsHM( aProps ); - sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), + sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 ); if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) ) { -- cgit From 06fe0421025da454963d8da2043b647cea429654 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 13 Apr 2011 09:50:38 +0100 Subject: catched->caught --- comphelper/source/container/containermultiplexer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx index fa68a34c2940..39d64dfb3600 100644 --- a/comphelper/source/container/containermultiplexer.cxx +++ b/comphelper/source/container/containermultiplexer.cxx @@ -118,7 +118,7 @@ namespace comphelper } catch(const Exception&) { - OSL_FAIL("Exceptiopn catched!"); + OSL_FAIL("Exceptiopn caught!"); } ::comphelper::decrement(m_refCount); } -- cgit From 8955cc0c39a2c4a5ec5f11e17e6535b02c19dbed Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 13 Apr 2011 10:50:04 +0100 Subject: catched->caught --- comphelper/source/container/containermultiplexer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx index 39d64dfb3600..21c72fbbead1 100644 --- a/comphelper/source/container/containermultiplexer.cxx +++ b/comphelper/source/container/containermultiplexer.cxx @@ -153,7 +153,7 @@ namespace comphelper } catch(const Exception&) { - OSL_FAIL("Exception catched!"); + OSL_FAIL("Exception caught!"); } m_xContainer = NULL; m_pListener = NULL; -- cgit From 1caa3ccec50d9917da7f3f4c2b83b09d35497996 Mon Sep 17 00:00:00 2001 From: Michael Lefevre Date: Wed, 13 Apr 2011 22:29:00 +0200 Subject: Kill Pos_XXX in favour of osl_Pos_XXX --- comphelper/source/streaming/oslfile2streamwrap.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index 40858acd338b..168a12dec161 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -114,7 +114,7 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( st m_pFile->getPos(nCurrentPos); sal_uInt64 nNewPos = nCurrentPos + nBytesToSkip; - FileBase::RC eError = m_pFile->setPos(osl_Pos_Absolut, nNewPos); + FileBase::RC eError = m_pFile->setPos(osl_osl_Pos_Absolut, nNewPos); if (eError != FileBase::E_None) { throw stario::NotConnectedException(::rtl::OUString(), static_cast(this)); @@ -149,7 +149,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::available() throw( stario::NotConnecte throw stario::NotConnectedException(::rtl::OUString(),static_cast(this)); nAvailable = nAvailable - nPos; - eError = m_pFile->setPos(Pos_Absolut, nPos); + eError = m_pFile->setPos(osl_Pos_Absolut, nPos); if (eError != FileBase::E_None) throw stario::NotConnectedException(::rtl::OUString(),static_cast(this)); return sal::static_int_cast< sal_Int32 >( -- cgit From 8c9f3d38b8e8a6a6879b8da6ab87161a27285b28 Mon Sep 17 00:00:00 2001 From: Michael Lefevre Date: Wed, 13 Apr 2011 22:43:57 +0200 Subject: Kill Pos_XXX in favour of osl_Pos_XXX --- comphelper/source/streaming/oslfile2streamwrap.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index 168a12dec161..f6e55c2aac63 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -139,7 +139,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::available() throw( stario::NotConnecte throw stario::NotConnectedException(::rtl::OUString(), static_cast(this)); sal_uInt64 nDummy = 0; - eError = m_pFile->setPos(Pos_End, nDummy); + eError = m_pFile->setPos(osl_Pos_End, nDummy); if (eError != FileBase::E_None) throw stario::NotConnectedException(::rtl::OUString(),static_cast(this)); -- cgit From 416c0f6b75f35e5680ee81d6080bbce02db06d1f Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 14 Apr 2011 15:18:27 +0200 Subject: fix typo --- comphelper/source/streaming/oslfile2streamwrap.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index f6e55c2aac63..68af33298336 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -114,7 +114,7 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( st m_pFile->getPos(nCurrentPos); sal_uInt64 nNewPos = nCurrentPos + nBytesToSkip; - FileBase::RC eError = m_pFile->setPos(osl_osl_Pos_Absolut, nNewPos); + FileBase::RC eError = m_pFile->setPos(osl_Pos_Absolut, nNewPos); if (eError != FileBase::E_None) { throw stario::NotConnectedException(::rtl::OUString(), static_cast(this)); -- cgit From 4fc170d3e8d0bb05197deb57f60d85f9fd9f0f72 Mon Sep 17 00:00:00 2001 From: Júlio Hoffimann Date: Thu, 14 Apr 2011 08:12:27 -0300 Subject: all bogus comments removed by regular expressions --- comphelper/source/misc/accessiblewrapper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 650130939cda..c1e4327294e4 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -241,7 +241,7 @@ namespace comphelper case AccessibleEventId::TABLE_ROW_DESCRIPTION_CHANGED: case AccessibleEventId::TABLE_ROW_HEADER_CHANGED: case AccessibleEventId::TABLE_SUMMARY_CHANGED: - // --> PB 2006-03-21 #130798# EventId TEXT_SELECTION_CHANGED was missed + // #130798# // these Ids are also missed: SUB_WINDOW_OF_RELATION_CHANGED & TEXT_ATTRIBUTE_CHANGED case AccessibleEventId::TEXT_SELECTION_CHANGED: // <-- -- cgit From 26c8682631d81151d1d81922a5aafde98081bfb6 Mon Sep 17 00:00:00 2001 From: Kayo Hamid Date: Tue, 19 Apr 2011 10:29:42 +0100 Subject: prefer prefix ++/-- operators --- comphelper/source/property/MasterPropertySet.cxx | 2 +- comphelper/source/property/MasterPropertySetInfo.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index 2844031d370c..78f33af7aed0 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -108,7 +108,7 @@ MasterPropertySet::~MasterPropertySet() while (aIter != aEnd ) { delete (*aIter).second; - aIter++; + ++aIter; } } diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index 0cfaf6ec1a6f..46dffe062c03 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -63,7 +63,7 @@ MasterPropertySetInfo::~MasterPropertySetInfo() while (aIter != aEnd ) { delete (*aIter).second; - aIter++; + ++aIter; } } -- cgit From d33d12bae73f12e7f0bc5e6a9974804c8012c3c6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 19 Apr 2011 10:35:24 +0100 Subject: WaE: simplify this --- comphelper/inc/comphelper/sequence.hxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/sequence.hxx b/comphelper/inc/comphelper/sequence.hxx index 9ccb89770ca4..125668172fb1 100644 --- a/comphelper/inc/comphelper/sequence.hxx +++ b/comphelper/inc/comphelper/sequence.hxx @@ -179,13 +179,9 @@ namespace comphelper ,m_pCurrent(NULL) { ::com::sun::star::uno::Sequence< TYPE > aContainer; - #ifdef DBG_UTIL - sal_Bool bSuccess = - #endif - _rSequenceAny >>= aContainer; - #ifdef DBG_UTIL + sal_Bool bSuccess = _rSequenceAny >>= aContainer; OSL_ENSURE(bSuccess, "OSequenceIterator::OSequenceIterator: invalid Any!"); - #endif + (void)bSuccess; construct(aContainer); } -- cgit From 1913e11aebe3da33c64c3de24106232ff02e699f Mon Sep 17 00:00:00 2001 From: Christina Rossmanith Date: Wed, 13 Apr 2011 20:52:55 +0200 Subject: remove FileStatusMask_XXX in favour of osl_FileStatus_Mask_XXX (libs-gui) --- comphelper/source/officeinstdir/officeinstallationdirectories.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx index de636191b1aa..71bb06181206 100644 --- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx +++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx @@ -67,7 +67,7 @@ static bool makeCanonicalFileURL( rtl::OUString & rURL ) if ( osl::DirectoryItem::get( aNormalizedURL, aDirItem ) == osl::DirectoryItem::E_None ) { - osl::FileStatus aFileStatus( FileStatusMask_FileURL ); + osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileURL ); if ( aDirItem.getFileStatus( aFileStatus ) == osl::DirectoryItem::E_None ) -- cgit From cdc7c5772ac216f6fd91ead7d8d57fd0ad03a0aa Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Thu, 21 Apr 2011 14:25:29 +0200 Subject: Easyhack: Add visibility markup to all component_get* functions --- comphelper/inc/comphelper/componentmodule.hxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/componentmodule.hxx b/comphelper/inc/comphelper/componentmodule.hxx index 308a270a7393..8aafa2c0261a 100644 --- a/comphelper/inc/comphelper/componentmodule.hxx +++ b/comphelper/inc/comphelper/componentmodule.hxx @@ -391,8 +391,7 @@ namespace comphelper //= implementing the API of a component library (component_*) #define IMPLEMENT_COMPONENT_LIBRARY_API( module_class, initializer_function ) \ - extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL \ - component_getImplementationEnvironment( \ + extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( \ const sal_Char **ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) \ { \ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; \ -- cgit From 52f1b2b471f5eb6d62d1e5579f9ee9ed7569e35d Mon Sep 17 00:00:00 2001 From: Júlio Hoffimann Date: Fri, 22 Apr 2011 08:02:21 -0300 Subject: left arrow comments removed // <-- --- comphelper/source/misc/accessiblewrapper.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index c1e4327294e4..b9d26591f19f 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -244,7 +244,6 @@ namespace comphelper // #130798# // these Ids are also missed: SUB_WINDOW_OF_RELATION_CHANGED & TEXT_ATTRIBUTE_CHANGED case AccessibleEventId::TEXT_SELECTION_CHANGED: - // <-- // nothing to translate break; -- cgit From b78698e14fe1afc4c210ae749d0a4e855826b113 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Fri, 29 Apr 2011 18:03:30 +0200 Subject: Applied normalize-template-paths-fix (slightly adapted) Fix for n#512146 --- .../officeinstdir/officeinstallationdirectories.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx index 71bb06181206..35bcfecc7f9d 100644 --- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx +++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx @@ -162,9 +162,9 @@ OfficeInstallationDirectories::makeRelocatableURL( const rtl::OUString& URL ) if ( nIndex != -1 ) { return rtl::OUString( - URL.replaceAt( nIndex, - m_pOfficeBrandDir->getLength(), - m_aOfficeBrandDirMacro ) ); + aCanonicalURL.replaceAt( nIndex, + m_pOfficeBrandDir->getLength(), + m_aOfficeBrandDirMacro ) ); } else { @@ -172,9 +172,9 @@ OfficeInstallationDirectories::makeRelocatableURL( const rtl::OUString& URL ) if ( nIndex != -1 ) { return rtl::OUString( - URL.replaceAt( nIndex, - m_pOfficeBaseDir->getLength(), - m_aOfficeBaseDirMacro ) ); + aCanonicalURL.replaceAt( nIndex, + m_pOfficeBaseDir->getLength(), + m_aOfficeBaseDirMacro ) ); } else { @@ -182,9 +182,9 @@ OfficeInstallationDirectories::makeRelocatableURL( const rtl::OUString& URL ) if ( nIndex != -1 ) { return rtl::OUString( - URL.replaceAt( nIndex, - m_pUserDir->getLength(), - m_aUserDirMacro ) ); + aCanonicalURL.replaceAt( nIndex, + m_pUserDir->getLength(), + m_aUserDirMacro ) ); } } } -- cgit From dc135ac4c097ef286de8a5ef4eff94e793567346 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 4 May 2011 22:58:22 +0200 Subject: Some cppcheck cleaning --- .../source/eventattachermgr/eventattachermgr.cxx | 20 ++++++++++---------- comphelper/source/xml/attributelist.cxx | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index acbb962ea4d7..9ed3c77381b0 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -470,7 +470,7 @@ void detachAll_Impl while( aObjIt != aObjEnd ) { pMgr->detach( nIdx, (*aObjIt).xTarget ); - aObjIt++; + ++aObjIt; } } @@ -487,7 +487,7 @@ void attachAll_Impl while( aObjIt != aObjEnd ) { pMgr->attach( nIdx, (*aObjIt).xTarget, (*aObjIt).aHelper ); - aObjIt++; + ++aObjIt; } } @@ -541,7 +541,7 @@ void SAL_CALL ImplEventAttacherManager::registerScriptEvent { } - aObjIt++; + ++aObjIt; } } @@ -605,7 +605,7 @@ void SAL_CALL ImplEventAttacherManager::revokeScriptEvent break; } - aEvtIt++; + ++aEvtIt; } #else Sequence< ScriptEventDescriptor >& rEventList = (*aIt).aEventList; @@ -698,7 +698,7 @@ Sequence< ScriptEventDescriptor > SAL_CALL ImplEventAttacherManager::getScriptEv while( aEvtIt != aEvtEnd ) { pArray[i++] = *aEvtIt; - aEvtIt++; + ++aEvtIt; } return aSeq; #else @@ -763,7 +763,7 @@ void SAL_CALL ImplEventAttacherManager::attach(sal_Int32 nIndex, const Reference } pArray[i++] = xAdapter; - aEvtIt++; + ++aEvtIt; } #else sal_Int32 nLen = aCurrentPosition->aEventList.getLength(); @@ -824,7 +824,7 @@ void SAL_CALL ImplEventAttacherManager::detach(sal_Int32 nIndex, const Reference } } i++; - aEvtIt++; + ++aEvtIt; } #else sal_Int32 nLen = aCurrentPosition->aEventList.getLength(); @@ -847,7 +847,7 @@ void SAL_CALL ImplEventAttacherManager::detach(sal_Int32 nIndex, const Reference aCurrentPosition->aObjList.erase( aObjIt ); break; } - aObjIt++; + ++aObjIt; } } @@ -910,7 +910,7 @@ void SAL_CALL ImplEventAttacherManager::write(const Reference< XObjectOutputStre OutStream->writeUTF( rDesc.ScriptType ); OutStream->writeUTF( rDesc.ScriptCode ); - aEvtIt++; + ++aEvtIt; } #else sal_Int32 nLen = (*aIt).aEventList.getLength(); @@ -927,7 +927,7 @@ void SAL_CALL ImplEventAttacherManager::write(const Reference< XObjectOutputStre OutStream->writeUTF( rDesc.ScriptCode ); } #endif - aIt++; + ++aIt; } // Die jetzt bekannte Laenge eintragen diff --git a/comphelper/source/xml/attributelist.cxx b/comphelper/source/xml/attributelist.cxx index 2c956623fcb7..2442fd69f106 100644 --- a/comphelper/source/xml/attributelist.cxx +++ b/comphelper/source/xml/attributelist.cxx @@ -93,7 +93,7 @@ OUString SAL_CALL AttributeList::getTypeByName( const OUString& sName ) throw( : { ::std::vector::iterator ii = m_pImpl->vecAttribute.begin(); - for( ; ii != m_pImpl->vecAttribute.end() ; ii ++ ) { + for( ; ii != m_pImpl->vecAttribute.end() ; ++ii ) { if( (*ii).sName == sName ) { return (*ii).sType; } @@ -105,7 +105,7 @@ OUString SAL_CALL AttributeList::getValueByName(const OUString& sName) throw( :: { ::std::vector::iterator ii = m_pImpl->vecAttribute.begin(); - for( ; ii != m_pImpl->vecAttribute.end() ; ii ++ ) { + for( ; ii != m_pImpl->vecAttribute.end() ; ++ii ) { if( (*ii).sName == sName ) { return (*ii).sValue; } @@ -144,7 +144,7 @@ void AttributeList::RemoveAttribute( const OUString sName ) { ::std::vector::iterator ii = m_pImpl->vecAttribute.begin(); - for( ; ii != m_pImpl->vecAttribute.end() ; ii ++ ) { + for( ; ii != m_pImpl->vecAttribute.end() ; ++ii ) { if( (*ii).sName == sName ) { m_pImpl->vecAttribute.erase( ii ); break; -- cgit From 51922ecd1184c13d37baab49f170e9d9e0a92516 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 12 May 2011 06:44:54 +0200 Subject: do not leak memory --- comphelper/source/misc/componentmodule.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx index c42308c71508..4318acc149be 100644 --- a/comphelper/source/misc/componentmodule.cxx +++ b/comphelper/source/misc/componentmodule.cxx @@ -85,7 +85,7 @@ namespace comphelper //------------------------------------------------------------------------- OModule::OModule() :m_nClients( 0 ) - ,m_pImpl( new OModuleImpl ) + ,m_pImpl( 0 ) { } @@ -110,17 +110,24 @@ namespace comphelper //-------------------------------------------------------------------------- void OModule::onFirstClient() { + OSL_PRECOND( !m_pImpl, "called out of sequence" ); + if ( !m_pImpl ) + m_pImpl = new OModuleImpl; } //-------------------------------------------------------------------------- void OModule::onLastClient() { + OSL_PRECOND( m_pImpl, "called out of sequence" ); + delete m_pImpl; + m_pImpl = 0; } //-------------------------------------------------------------------------- void OModule::registerImplementation( const ComponentDescription& _rComp ) { ::osl::MutexGuard aGuard( m_aMutex ); + OSL_PRECOND( m_pImpl, "not initialized properly" ); if ( !m_pImpl ) throw RuntimeException(); -- cgit From 1fd367c45cc6a2ff57eb33c70684136874d066cb Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Mon, 16 May 2011 23:44:29 +0200 Subject: WaE (picky) - noeol --- comphelper/inc/comphelper/documentconstants.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/documentconstants.hxx b/comphelper/inc/comphelper/documentconstants.hxx index cb280b2525f7..06653b023002 100644 --- a/comphelper/inc/comphelper/documentconstants.hxx +++ b/comphelper/inc/comphelper/documentconstants.hxx @@ -148,4 +148,4 @@ #define SFX_FILTER_VERSION_NONE 0 #define SFX_FILTER_NOTINSTALLED SFX_FILTER_MUSTINSTALL | SFX_FILTER_CONSULTSERVICE -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From 342af388111ac5aa311a887beae1565fe0b82d02 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Tue, 17 May 2011 15:25:19 +0100 Subject: Revert "do not leak memory" this seems to cause some problems with a number of components This reverts commit f9496177a4c942f2acc39a978a3cd65689f14d8d. --- comphelper/source/misc/componentmodule.cxx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx index 4318acc149be..c42308c71508 100644 --- a/comphelper/source/misc/componentmodule.cxx +++ b/comphelper/source/misc/componentmodule.cxx @@ -85,7 +85,7 @@ namespace comphelper //------------------------------------------------------------------------- OModule::OModule() :m_nClients( 0 ) - ,m_pImpl( 0 ) + ,m_pImpl( new OModuleImpl ) { } @@ -110,24 +110,17 @@ namespace comphelper //-------------------------------------------------------------------------- void OModule::onFirstClient() { - OSL_PRECOND( !m_pImpl, "called out of sequence" ); - if ( !m_pImpl ) - m_pImpl = new OModuleImpl; } //-------------------------------------------------------------------------- void OModule::onLastClient() { - OSL_PRECOND( m_pImpl, "called out of sequence" ); - delete m_pImpl; - m_pImpl = 0; } //-------------------------------------------------------------------------- void OModule::registerImplementation( const ComponentDescription& _rComp ) { ::osl::MutexGuard aGuard( m_aMutex ); - OSL_PRECOND( m_pImpl, "not initialized properly" ); if ( !m_pImpl ) throw RuntimeException(); -- cgit From 853ced9be97d68eac54982f9327c0d70737236c2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 19 Apr 2011 16:41:41 +0100 Subject: WaE: unused parameter --- comphelper/inc/comphelper/types.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/types.hxx b/comphelper/inc/comphelper/types.hxx index 46020e64dd29..dfa1565c4493 100644 --- a/comphelper/inc/comphelper/types.hxx +++ b/comphelper/inc/comphelper/types.hxx @@ -104,7 +104,7 @@ namespace comphelper /** check if a type you have at hand at runtime is equal to another type you have at compile time */ template - sal_Bool isAReference(const staruno::Any& _rVal, TYPE* pDummy) + sal_Bool isAReference(const staruno::Any& _rVal, TYPE*) { return _rVal.getValueType().equals( cppu::getTypeFavourUnsigned( -- cgit From c639da5a41c1390c90716de36b0869120562db9a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 6 May 2011 11:31:54 +0100 Subject: config leaks: drop dodgy LegacySingleton foo --- comphelper/Library_comphelp.mk | 1 - comphelper/Package_inc.mk | 1 - comphelper/inc/comphelper/componentmodule.hxx | 38 +--- .../inc/comphelper/legacysingletonfactory.hxx | 75 -------- comphelper/source/misc/legacysingletonfactory.cxx | 200 --------------------- 5 files changed, 1 insertion(+), 314 deletions(-) delete mode 100644 comphelper/inc/comphelper/legacysingletonfactory.hxx delete mode 100644 comphelper/source/misc/legacysingletonfactory.cxx (limited to 'comphelper') diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk index 7c365bc97cd2..8336b8cb2124 100644 --- a/comphelper/Library_comphelp.mk +++ b/comphelper/Library_comphelp.mk @@ -90,7 +90,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\ comphelper/source/misc/ihwrapnofilter \ comphelper/source/misc/instancelocker \ comphelper/source/misc/interaction \ - comphelper/source/misc/legacysingletonfactory \ comphelper/source/misc/listenernotification \ comphelper/source/misc/locale \ comphelper/source/misc/logging \ diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk index 5794c56ab74d..fb6538e4700c 100644 --- a/comphelper/Package_inc.mk +++ b/comphelper/Package_inc.mk @@ -89,7 +89,6 @@ $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ChainablePropert $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stl_types.hxx,comphelper/stl_types.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/eventattachermgr.hxx,comphelper/eventattachermgr.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentcontext.hxx,comphelper/componentcontext.hxx)) -$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/legacysingletonfactory.hxx,comphelper/legacysingletonfactory.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleeventnotifier.hxx,comphelper/accessibleeventnotifier.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ihwrapnofilter.hxx,comphelper/ihwrapnofilter.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceasvector.hxx,comphelper/sequenceasvector.hxx)) diff --git a/comphelper/inc/comphelper/componentmodule.hxx b/comphelper/inc/comphelper/componentmodule.hxx index 8aafa2c0261a..4bc917ef13d3 100644 --- a/comphelper/inc/comphelper/componentmodule.hxx +++ b/comphelper/inc/comphelper/componentmodule.hxx @@ -29,7 +29,6 @@ #define COMPHELPER_INC_COMPHELPER_COMPONENTMODULE_HXX #include -#include /** === begin UNO includes === **/ #include @@ -271,29 +270,6 @@ namespace comphelper ) ); } - //========================================================================== - //= OLegacySingletonRegistration - //========================================================================== - template - class OLegacySingletonRegistration - { - public: - OLegacySingletonRegistration( OModule& _rModule ); - }; - - //-------------------------------------------------------------------------- - template - OLegacySingletonRegistration::OLegacySingletonRegistration( OModule& _rModule ) - { - _rModule.registerImplementation( ComponentDescription( - TYPE::getImplementationName_static(), - TYPE::getSupportedServiceNames_static(), - ::rtl::OUString(), - &TYPE::Create, - &::comphelper::createLegacySingletonFactory - ) ); - } - //========================================================================== //= helpers //========================================================================== @@ -350,19 +326,7 @@ namespace comphelper OSingletonRegistration() : BaseClass( ModuleClass::getInstance() ) \ { \ } \ - }; \ - /* -------------------------------------------------------------------- */ \ - template < class TYPE > \ - class OLegacySingletonRegistration : public ::comphelper::OLegacySingletonRegistration< TYPE > \ - { \ - private: \ - typedef ::comphelper::OLegacySingletonRegistration< TYPE > BaseClass; \ - \ - public: \ - OLegacySingletonRegistration() : BaseClass( ModuleClass::getInstance() ) \ - { \ - } \ - }; \ + }; //========================================================================== //= implementing a OModule for a component library diff --git a/comphelper/inc/comphelper/legacysingletonfactory.hxx b/comphelper/inc/comphelper/legacysingletonfactory.hxx deleted file mode 100644 index d40f828d1384..000000000000 --- a/comphelper/inc/comphelper/legacysingletonfactory.hxx +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef COMPHELPER_LEGACYSINGLETONFACTORY_HXX -#define COMPHELPER_LEGACYSINGLETONFACTORY_HXX - -#include "comphelper/comphelperdllapi.h" - -/** === begin UNO includes === **/ -/** === end UNO includes === **/ - -#include - -//........................................................................ -namespace comphelper -{ -//........................................................................ - -/** creates a factory which can be used when implementing old-style singletons - - Before UNO having the component context concept, singletons were implemented by providing - a factory which return the very same component instance for every creation request. - - Nowadays, singletons are implemented by making them available at the component context, - as dedicated property. - - To bridge between both worlds - sometimes necessary to support legacy code, which instantiates - singletons at the global service manager, instead of obtaining the property at the - component context -, you can use the function below. I creates a single-component - factory, which behaves like the old factories did: Upon multiple creation requests, - it will always return the same instance. Additionally, the signature of the function - is the same as the signature of ::cppu::createSingleComponentFactory - (which creates a "normal" component factory), so you can use both factory functions - in the same context. -*/ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > - COMPHELPER_DLLPUBLIC createLegacySingletonFactory( - ::cppu::ComponentFactoryFunc _componentFactoryFunc, - const ::rtl::OUString& _rImplementationName, - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rServiceNames, - rtl_ModuleCount* _pModCount = NULL - ); - -//........................................................................ -} // namespace comphelper -//........................................................................ - -#endif // COMPHELPER_LEGACYSINGLETONFACTORY_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/legacysingletonfactory.cxx b/comphelper/source/misc/legacysingletonfactory.cxx deleted file mode 100644 index d469d2512c4f..000000000000 --- a/comphelper/source/misc/legacysingletonfactory.cxx +++ /dev/null @@ -1,200 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_comphelper.hxx" - -#include "comphelper/legacysingletonfactory.hxx" - -/** === begin UNO includes === **/ -#include -#include -/** === end UNO includes === **/ - -#include - -#include - -//........................................................................ -namespace comphelper -{ -//........................................................................ - - /** === begin UNO using === **/ - using ::com::sun::star::uno::Reference; - using ::com::sun::star::uno::XInterface; - using ::com::sun::star::uno::UNO_QUERY; - using ::com::sun::star::uno::UNO_QUERY_THROW; - using ::com::sun::star::uno::UNO_SET_THROW; - using ::com::sun::star::uno::Exception; - using ::com::sun::star::uno::RuntimeException; - using ::com::sun::star::uno::Any; - using ::com::sun::star::uno::makeAny; - using ::com::sun::star::lang::XSingleComponentFactory; - using ::com::sun::star::uno::Sequence; - using ::com::sun::star::uno::XComponentContext; - using ::com::sun::star::lang::XServiceInfo; - using ::com::sun::star::lang::XInitialization; - /** === end UNO using === **/ - - //==================================================================== - //= LegacySingletonFactory - //==================================================================== - typedef ::cppu::WeakImplHelper2 < XServiceInfo - , XSingleComponentFactory - > LegacySingletonFactory_Base; - - class COMPHELPER_DLLPRIVATE LegacySingletonFactory : public LegacySingletonFactory_Base - { - public: - LegacySingletonFactory( - ::cppu::ComponentFactoryFunc _componentFactoryFunc, const ::rtl::OUString& _rImplementationName, - const Sequence< ::rtl::OUString >& _rServiceNames, rtl_ModuleCount* _pModCount - ); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException); - virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException); - virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException); - - // XSingleComponentFactory - virtual Reference< XInterface > SAL_CALL createInstanceWithContext( const Reference< XComponentContext >& Context ) throw (Exception, RuntimeException); - virtual Reference< XInterface > SAL_CALL createInstanceWithArgumentsAndContext( const Sequence< Any >& Arguments, const Reference< XComponentContext >& Context ) throw (Exception, RuntimeException); - - protected: - ~LegacySingletonFactory(); - - private: - /** creates m_xInstance, returns whether it actually was created () or existed before ( - */ - bool impl_nts_ensureInstance( const Reference< XComponentContext >& _rxContext ); - - private: - ::osl::Mutex m_aMutex; - ::cppu::ComponentFactoryFunc m_componentFactoryFunc; - ::rtl::OUString m_sImplementationName; - Sequence< ::rtl::OUString > m_aServiceNames; - rtl_ModuleCount* m_pModuleCount; - Reference< XInterface > m_xTheInstance; - }; - - //-------------------------------------------------------------------- - LegacySingletonFactory::LegacySingletonFactory( ::cppu::ComponentFactoryFunc _componentFactoryFunc, const ::rtl::OUString& _rImplementationName, - const Sequence< ::rtl::OUString >& _rServiceNames, rtl_ModuleCount* _pModCount ) - :m_componentFactoryFunc ( _componentFactoryFunc ) - ,m_sImplementationName ( _rImplementationName ) - ,m_aServiceNames ( _rServiceNames ) - ,m_pModuleCount ( _pModCount ) - ,m_xTheInstance ( ) - { - if ( m_pModuleCount ) - m_pModuleCount->acquire( m_pModuleCount ); - } - - //-------------------------------------------------------------------- - LegacySingletonFactory::~LegacySingletonFactory() - { - if ( m_pModuleCount ) - m_pModuleCount->release( m_pModuleCount ); - } - - //-------------------------------------------------------------------- - ::rtl::OUString SAL_CALL LegacySingletonFactory::getImplementationName( ) throw (RuntimeException) - { - return m_sImplementationName; - } - - //-------------------------------------------------------------------- - ::sal_Bool SAL_CALL LegacySingletonFactory::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException) - { - Sequence< ::rtl::OUString > aServices( getSupportedServiceNames() ); - const ::rtl::OUString* pStart = aServices.getConstArray(); - const ::rtl::OUString* pEnd = aServices.getConstArray() + aServices.getLength(); - return ::std::find( pStart, pEnd, _rServiceName ) != pEnd; - } - - //-------------------------------------------------------------------- - Sequence< ::rtl::OUString > SAL_CALL LegacySingletonFactory::getSupportedServiceNames( ) throw (RuntimeException) - { - return m_aServiceNames; - } - - //-------------------------------------------------------------------- - bool LegacySingletonFactory::impl_nts_ensureInstance( const Reference< XComponentContext >& _rxContext ) - { - if ( m_xTheInstance.is() ) - return false; - - m_xTheInstance = (*m_componentFactoryFunc)( _rxContext ); - if ( !m_xTheInstance.is() ) - throw RuntimeException(); - - return true; // true -> "was newly created" - } - - //-------------------------------------------------------------------- - Reference< XInterface > SAL_CALL LegacySingletonFactory::createInstanceWithContext( const Reference< XComponentContext >& _rxContext ) throw (Exception, RuntimeException) - { - ::osl::MutexGuard aGuard( m_aMutex ); - impl_nts_ensureInstance( _rxContext ); - - return m_xTheInstance; - } - - //-------------------------------------------------------------------- - Reference< XInterface > SAL_CALL LegacySingletonFactory::createInstanceWithArgumentsAndContext( const Sequence< Any >& _rArguments, const Reference< XComponentContext >& _rxContext ) throw (Exception, RuntimeException) - { - ::osl::MutexGuard aGuard( m_aMutex ); - if ( !impl_nts_ensureInstance( _rxContext ) ) - throw RuntimeException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Instance already created before, unable to initialize it." ) ), - *this - ); - - Reference< XInitialization > xInit( m_xTheInstance, UNO_QUERY_THROW ); - xInit->initialize( _rArguments ); - - return m_xTheInstance; - } - - //==================================================================== - //= createLegacySingletonFactory - //==================================================================== - Reference< XSingleComponentFactory > createLegacySingletonFactory( - ::cppu::ComponentFactoryFunc _componentFactoryFunc, const ::rtl::OUString& _rImplementationName, - const Sequence< ::rtl::OUString >& _rServiceNames, rtl_ModuleCount* _pModCount ) - { - return new LegacySingletonFactory( _componentFactoryFunc, _rImplementationName, _rServiceNames, _pModCount ); - } - - -//........................................................................ -} // namespace comphelper -//........................................................................ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From 071d42a6434027c783cd6d1cc947e6406a91964d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 10 May 2011 16:10:42 +0100 Subject: config leaks: add a template to handle tricky globals --- comphelper/Package_inc.mk | 1 + comphelper/inc/comphelper/scoped_disposing_ptr.hxx | 126 +++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 comphelper/inc/comphelper/scoped_disposing_ptr.hxx (limited to 'comphelper') diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk index fb6538e4700c..a02bde6b7475 100644 --- a/comphelper/Package_inc.mk +++ b/comphelper/Package_inc.mk @@ -38,6 +38,7 @@ $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stillreadwritein $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/anycompare.hxx,comphelper/anycompare.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propagg.hxx,comphelper/propagg.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/scopeguard.hxx,comphelper/scopeguard.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/scoped_disposing_ptr.hxx,comphelper/scoped_disposing_ptr.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/asyncnotification.hxx,comphelper/asyncnotification.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/namedvaluecollection.hxx,comphelper/namedvaluecollection.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/composedprops.hxx,comphelper/composedprops.hxx)) diff --git a/comphelper/inc/comphelper/scoped_disposing_ptr.hxx b/comphelper/inc/comphelper/scoped_disposing_ptr.hxx new file mode 100644 index 000000000000..5e63f1db6cfa --- /dev/null +++ b/comphelper/inc/comphelper/scoped_disposing_ptr.hxx @@ -0,0 +1,126 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (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.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Caolán McNamara (Red Hat, Inc.) + * Portions created by the Initial Developer are Copyright (C) 2011 the + * Initial Developer. All Rights Reserved. + * + * Contributor(s): Caolán McNamara + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ +#ifndef _SCOPED_DISPOSING_PTR +#define _SCOPED_DISPOSING_PTR + +#include +#include +#include + +#include + +#include + +namespace comphelper +{ +//Similar to boost::scoped_ptr, except additionally releases the ptr on rComponent::disposing +template class scoped_disposing_ptr : private boost::noncopyable +{ +private: + boost::scoped_ptr m_aItem; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener> m_xDisposingListener; +public: + scoped_disposing_ptr( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &rComponent, T * p = 0 ) + : m_aItem(p) + { + m_xDisposingListener = new DisposingListener(rComponent, m_aItem); + } + + void reset(T * p = 0) + { + m_aItem.reset(p); + } + + T & operator*() const + { + return *m_aItem; + } + + T * get() const + { + return m_aItem.get(); + } + + T * operator->() const + { + return m_aItem.get(); + } + + operator bool () const + { + return m_aItem; + } + + virtual ~scoped_disposing_ptr() + { + reset(); + } +private: + class DisposingListener : public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener > + { + private: + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xComponent; + boost::scoped_ptr& m_rItem; + public: + DisposingListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &rComponent, + boost::scoped_ptr& rItem) : m_xComponent(rComponent), m_rItem(rItem) + { + if (m_xComponent.is()) + m_xComponent->addEventListener( this ); + } + + ~DisposingListener() + { + if ( m_xComponent.is() ) + m_xComponent->removeEventListener( this ); + } + + private: + // XEventListener + virtual void SAL_CALL disposing( ::com::sun::star::lang::EventObject const & rEvt ) + throw (::com::sun::star::uno::RuntimeException) + { + bool shutDown = (rEvt.Source == m_xComponent); + + if ( shutDown && m_xComponent.is() ) + { + m_xComponent->removeEventListener( this ); + m_xComponent.clear(); + } + + if ( shutDown ) + m_rItem.reset(); + } + }; +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From 89fa7eab00c37235676c59a2f430adea98a5df9c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 20 May 2011 09:18:48 +0100 Subject: add a template for dtoring on desktop::termination --- comphelper/inc/comphelper/scoped_disposing_ptr.hxx | 86 +++++++++++++++++----- 1 file changed, 69 insertions(+), 17 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/scoped_disposing_ptr.hxx b/comphelper/inc/comphelper/scoped_disposing_ptr.hxx index 5e63f1db6cfa..7278126c2633 100644 --- a/comphelper/inc/comphelper/scoped_disposing_ptr.hxx +++ b/comphelper/inc/comphelper/scoped_disposing_ptr.hxx @@ -33,25 +33,28 @@ #include #include +#include -#include +// for locking SolarMutex: svapp + mutex +#include +#include namespace comphelper { -//Similar to boost::scoped_ptr, except additionally releases the ptr on rComponent::disposing +//Similar to boost::scoped_ptr, except additionally releases the ptr on XComponent::disposing and/or XTerminateListener::notifyTermination if supported template class scoped_disposing_ptr : private boost::noncopyable { private: boost::scoped_ptr m_aItem; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener> m_xDisposingListener; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTerminateListener> m_xTerminateListener; public: scoped_disposing_ptr( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &rComponent, T * p = 0 ) : m_aItem(p) { - m_xDisposingListener = new DisposingListener(rComponent, m_aItem); + m_xTerminateListener = new TerminateListener(rComponent, *this); } - void reset(T * p = 0) + virtual void reset(T * p = 0) { m_aItem.reset(p); } @@ -81,42 +84,91 @@ public: reset(); } private: - class DisposingListener : public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener > + class TerminateListener : public ::cppu::WeakImplHelper1< ::com::sun::star::frame::XTerminateListener > { private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xComponent; - boost::scoped_ptr& m_rItem; + scoped_disposing_ptr& m_rItem; public: - DisposingListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &rComponent, - boost::scoped_ptr& rItem) : m_xComponent(rComponent), m_rItem(rItem) + TerminateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &rComponent, + scoped_disposing_ptr& rItem) : m_xComponent(rComponent), m_rItem(rItem) { if (m_xComponent.is()) - m_xComponent->addEventListener( this ); + { + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDesktop> xDesktop(m_xComponent, ::com::sun::star::uno::UNO_QUERY); + if (xDesktop.is()) + xDesktop->addTerminateListener(this); + else + m_xComponent->addEventListener(this); + } } - ~DisposingListener() + ~TerminateListener() { if ( m_xComponent.is() ) - m_xComponent->removeEventListener( this ); + { + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDesktop> xDesktop(m_xComponent, ::com::sun::star::uno::UNO_QUERY); + if (xDesktop.is()) + xDesktop->removeTerminateListener(this); + else + m_xComponent->removeEventListener(this); + } } private: // XEventListener - virtual void SAL_CALL disposing( ::com::sun::star::lang::EventObject const & rEvt ) + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEvt ) throw (::com::sun::star::uno::RuntimeException) { bool shutDown = (rEvt.Source == m_xComponent); - if ( shutDown && m_xComponent.is() ) + if (shutDown && m_xComponent.is()) { - m_xComponent->removeEventListener( this ); + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDesktop> xDesktop(m_xComponent, ::com::sun::star::uno::UNO_QUERY); + if (xDesktop.is()) + xDesktop->removeTerminateListener(this); + else + m_xComponent->removeEventListener(this); m_xComponent.clear(); } - if ( shutDown ) + if (shutDown) m_rItem.reset(); } - }; + + // XTerminateListener + virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& ) + throw(::com::sun::star::frame::TerminationVetoException, + ::com::sun::star::uno::RuntimeException) + { + } + + virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& rEvt ) + throw (::com::sun::star::uno::RuntimeException) + { + disposing(rEvt); + } + }; +}; + +//Something like an OutputDevice requires the SolarMutex to be taken before use +//for threadsafety. The user can ensure this, except in the case of its dtor +//being called from reset due to a terminate on the XComponent being called +//from an aribitrary thread +template class scoped_disposing_solar_mutex_reset_ptr + : public scoped_disposing_ptr +{ +public: + scoped_disposing_solar_mutex_reset_ptr( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &rComponent, T * p = 0 ) + : scoped_disposing_ptr(rComponent, p) + { + } + + virtual void reset(T * p = 0) + { + SolarMutexGuard aGuard; + scoped_disposing_ptr::reset(p); + } }; } -- cgit From 27266b10b8aaa9e2f559de7e6c36249c329105f4 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 21 May 2011 17:00:45 +0300 Subject: Drop OS2 --- comphelper/source/eventattachermgr/eventattachermgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 9ed3c77381b0..dd4fa54f3354 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -31,7 +31,7 @@ #include -#if defined( OS2 ) || defined( UNX ) +#if defined( UNX ) #include #endif #include -- cgit From 795e0976bef1cfd9a3ffe0b339fa3ed5329205d5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 23 May 2011 13:26:19 +0100 Subject: add getLocale to NaturalStringSorter --- comphelper/inc/comphelper/string.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index b1f769388ee0..e71a008c5e3e 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -190,6 +190,7 @@ public: { return compareNatural(rLHS, rRHS, m_xCollator, m_xBI, m_aLocale); } + const ::com::sun::star::lang::Locale& getLocale() const { return m_aLocale; } }; } } -- cgit From c532fd3e081f470b70c7e9306d7ce62641e7b510 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 31 May 2011 15:59:03 +0100 Subject: make this a well-behaved singleton --- comphelper/source/misc/namedvaluecollection.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index be789592bbf1..6ed6cd1af22e 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -30,14 +30,13 @@ #include "precompiled_comphelper.hxx" #include -/** === begin UNO includes === **/ #include #include #include -/** === end UNO includes === **/ #include #include +#include #include #include @@ -277,6 +276,11 @@ namespace comphelper return false; } + namespace + { + class theEmptyDefault : public rtl::Static {}; + } + //-------------------------------------------------------------------- const Any& NamedValueCollection::impl_get( const ::rtl::OUString& _rValueName ) const { @@ -284,8 +288,7 @@ namespace comphelper if ( pos != m_pImpl->aValues.end() ) return pos->second; - static Any aEmptyDefault; - return aEmptyDefault; + return theEmptyDefault::get(); } //-------------------------------------------------------------------- -- cgit From c58129312b80961b5a8fb10a977a198f8894fab2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 31 May 2011 22:21:44 +0100 Subject: add Sequence header --- comphelper/inc/comphelper/servicehelper.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/servicehelper.hxx b/comphelper/inc/comphelper/servicehelper.hxx index 15b0ae6a9f7c..0a095e1b987a 100644 --- a/comphelper/inc/comphelper/servicehelper.hxx +++ b/comphelper/inc/comphelper/servicehelper.hxx @@ -31,6 +31,7 @@ #include #include +#include class UnoTunnelIdInit { -- cgit From bbf267835f5619ba4d65e12e49327ef11300d182 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 1 Jun 2011 12:17:55 +0100 Subject: overly static --- comphelper/source/property/propstate.cxx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx index b58bdb6d0283..ec621cb43833 100644 --- a/comphelper/source/property/propstate.cxx +++ b/comphelper/source/property/propstate.cxx @@ -68,18 +68,14 @@ namespace comphelper //--------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> OPropertyStateHelper::getTypes() throw( ::com::sun::star::uno::RuntimeException) { - static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypes; - if (!aTypes.getLength()) - { - aTypes.realloc(4); - ::com::sun::star::uno::Type* pTypes = aTypes.getArray(); - // base class types - pTypes[0] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)NULL); - pTypes[1] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet>*)NULL); - pTypes[2] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet>*)NULL); - // my own type - pTypes[3] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState>*)NULL); - } + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypes(4); + ::com::sun::star::uno::Type* pTypes = aTypes.getArray(); + // base class types + pTypes[0] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)NULL); + pTypes[1] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet>*)NULL); + pTypes[2] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet>*)NULL); + // my own type + pTypes[3] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState>*)NULL); return aTypes; } -- cgit From 0402152ad484ef1498dbfff847111a0021ef8739 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 1 Jun 2011 23:59:50 +0100 Subject: use standard template here --- comphelper/source/property/genericpropertyset.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx index 886530276abf..008646001331 100644 --- a/comphelper/source/property/genericpropertyset.cxx +++ b/comphelper/source/property/genericpropertyset.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -251,18 +252,15 @@ uno::Sequence< uno::Type > SAL_CALL GenericPropertySet::getTypes() return aTypes; } +namespace +{ + class theGenericPropertySetImplmentationId : public rtl::Static< UnoTunnelIdInit, theGenericPropertySetImplmentationId > {}; +} + uno::Sequence< sal_Int8 > SAL_CALL GenericPropertySet::getImplementationId() throw (uno::RuntimeException) { - MutexGuard aGuard( maMutex ); - - static uno::Sequence< sal_Int8 > aId; - if( aId.getLength() == 0 ) - { - aId.realloc( 16 ); - rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True ); - } - return aId; + return theGenericPropertySetImplmentationId::get().getSeq(); } // XServiceInfo -- cgit