diff options
Diffstat (limited to 'comphelper/source')
103 files changed, 777 insertions, 933 deletions
diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx index 136bff63f69b..074d3a5ffc3a 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. @@ -49,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; //============================================================================= @@ -64,7 +66,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 ); //??? @@ -132,7 +134,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 >(); @@ -189,3 +191,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..4608f9115bcb 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. @@ -38,9 +39,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif using namespace com::sun::star; @@ -122,8 +121,8 @@ void SAL_CALL IndexedPropertyValuesContainer::insertByIndex( sal_Int32 nIndex, c sal_Int32 i(0); while(i < nIndex) { - i++; - aItr++; + ++i; + ++aItr; } } else @@ -132,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); @@ -157,8 +156,8 @@ void SAL_CALL IndexedPropertyValuesContainer::removeByIndex( sal_Int32 nIndex ) sal_Int32 i(0); while(i < nIndex) { - i++; - aItr++; + ++i; + ++aItr; } } else @@ -167,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); @@ -268,3 +267,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..fa68a34c2940 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. @@ -117,7 +118,7 @@ namespace comphelper } catch(const Exception&) { - OSL_ENSURE(0,"Exceptiopn catched!"); + OSL_FAIL("Exceptiopn catched!"); } ::comphelper::decrement(m_refCount); } @@ -152,7 +153,7 @@ namespace comphelper } catch(const Exception&) { - OSL_ENSURE(0,"Exception catched!"); + OSL_FAIL("Exception catched!"); } m_xContainer = NULL; m_pListener = NULL; @@ -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..9f84b7afa053 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. @@ -51,7 +52,7 @@ #include <comphelper/embeddedobjectcontainer.hxx> #include <comphelper/sequence.hxx> #include <cppuhelper/weakref.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <algorithm> #include <rtl/logfile.hxx> @@ -77,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 >, @@ -108,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 ); } } @@ -171,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() ) @@ -203,7 +204,7 @@ void EmbeddedObjectContainer::ReleaseImageSubStorage() } catch( uno::Exception& ) { - OSL_ASSERT( "Problems releasing image substorage!\n" ); + OSL_FAIL( "Problems releasing image substorage!\n" ); } } } @@ -317,7 +318,7 @@ sal_Bool EmbeddedObjectContainer::HasInstantiatedEmbeddedObject( const ::rtl::OU aIt++; } - OSL_ENSURE( 0, "Unknown object!" ); + OSL_FAIL( "Unknown object!" ); return ::rtl::OUString(); } @@ -363,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 ); } @@ -714,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; @@ -843,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" ); } } } @@ -911,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; } @@ -943,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; } } @@ -1008,13 +1008,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; } @@ -1030,7 +1030,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!" ); @@ -1093,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" ); } } @@ -1135,6 +1135,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) @@ -1152,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; } } @@ -1216,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; } } @@ -1271,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& ) @@ -1363,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" ); } } @@ -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 a73983517751..10727897b5a3 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. * @@ -174,7 +175,7 @@ namespace comphelper return; } } - OSL_ENSURE( false, "lcl_revokeMapModificationListener: the listener is not registered!" ); + OSL_FAIL( "lcl_revokeMapModificationListener: the listener is not registered!" ); } //-------------------------------------------------------------------- @@ -387,16 +388,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<any,any> expected." ), *this, 2 ); + throw IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[]com.sun.star.beans.Pair<any,any> expected.")), *this, 2 ); bMutable = false; } @@ -805,3 +806,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 bf217f75c8db..acbb962ea4d7 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. @@ -34,10 +35,7 @@ #include <wchar.h> #endif #include <osl/mutex.hxx> -#ifndef _VOS_DIAGNOSE_HXX_ -#include <vos/diagnose.hxx> -#endif -#include <vos/macros.hxx> +#include <osl/diagnose.h> #include <comphelper/eventattachermgr.hxx> #include <com/sun/star/beans/XIntrospection.hpp> #include <com/sun/star/io/XObjectInputStream.hpp> @@ -67,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 { @@ -96,32 +95,6 @@ struct AttacherIndex_Impl bool operator==( const AttacherIndex_Impl & ) const; }; -#if 0 -bool AttachedObject_Impl::operator<( const AttachedObject_Impl & r ) const -{ - VOS_ENSHURE( FALSE, "not implemented" ); - return FALSE; - return this < &r; -} - -bool AttachedObject_Impl::operator==( const AttachedObject_Impl & r ) const -{ - VOS_ENSHURE( FALSE, "not implemented" ); - return this == &r; -} - -bool AttacherIndex_Impl::operator<( const AttacherIndex_Impl & r ) const -{ - VOS_ENSHURE( FALSE, "not implemented" ); - return this < &r; -} -bool AttacherIndex_Impl::operator==( const AttacherIndex_Impl & r ) const -{ - VOS_ENSHURE( FALSE, "not implemented" ); - return this == &r; -} -#endif - //----------------------------------------------------------------------------- class ImplEventAttacherManager : public WeakImplHelper2< XEventAttacherManager, XPersistObject > @@ -409,7 +382,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); @@ -429,12 +402,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 ); @@ -461,7 +434,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; @@ -1016,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 ) { - VOS_ENSHURE( sal_False, "ImplEventAttacherManager::read(): Fatal Error, wrong object length" ); + OSL_FAIL( "ImplEventAttacherManager::read(): Fatal Error, wrong object length" ); } else { @@ -1034,3 +1007,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..fb89a0bf86a9 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. @@ -318,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; @@ -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 e3247cae5b60..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. @@ -32,9 +33,7 @@ #include <comphelper/accessibletexthelper.hxx> #include <com/sun/star/accessibility/AccessibleTextType.hpp> #include <com/sun/star/i18n/CharacterIteratorMode.hpp> -#ifndef _COM_SUN_STAR_TEXT_WORDTYPE_HPP_ #include <com/sun/star/i18n/WordType.hpp> -#endif #include <com/sun/star/i18n/KCharacterType.hpp> #include <comphelper/processfactory.hxx> #include <com/sun/star/accessibility/TextSegment.hpp> @@ -913,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..650130939cda 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. @@ -160,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!" ); @@ -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; @@ -681,3 +680,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..7128d4e13991 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. @@ -165,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; } @@ -187,3 +188,4 @@ namespace comphelper //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/anycompare.cxx b/comphelper/source/misc/anycompare.cxx index a86174daf08e..a86174daf08e 100755..100644 --- a/comphelper/source/misc/anycompare.cxx +++ b/comphelper/source/misc/anycompare.cxx 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..86224687d9f4 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. @@ -104,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; } @@ -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 1dfd99bfa07e..c42308c71508 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. @@ -177,3 +178,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..1016c88b341c 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. @@ -52,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)); @@ -82,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; @@ -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 3c8d66bd57e4..36cb3cd15aff 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. @@ -470,3 +471,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 15c2e09ba0f3..ec9cf0ca21ed 100755..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. @@ -257,3 +258,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..a9b9a85f7f69 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. @@ -186,7 +187,7 @@ namespace comphelper { sMessage += "\nin function:\n"; sMessage += BOOST_CURRENT_FUNCTION; sMessage += "\n"; - OSL_ENSURE( false, sMessage ); + OSL_FAIL( sMessage ); } return sTitle; @@ -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..a94b85754e13 100755..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. @@ -6,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 @@ -75,3 +73,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..7d9ef608a1ae 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. @@ -51,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")); } //---------------------------------------------------------------------------------------------------- @@ -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..0a791c41582c 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. @@ -47,17 +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")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::EN() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("en"), - ::rtl::OUString()); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("default"))); return aLocale; } @@ -65,269 +57,8 @@ const Locale Locale::EN() const Locale Locale::EN_US() { static Locale aLocale( - ::rtl::OUString::createFromAscii("en"), - ::rtl::OUString::createFromAscii("US")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::DE_DE() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("de"), - ::rtl::OUString::createFromAscii("DE")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::DE_CH() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("de"), - ::rtl::OUString::createFromAscii("CH")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::DE_AT() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("de"), - ::rtl::OUString::createFromAscii("AT")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::AR() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("ar"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::CA() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("ca"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::CS() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("cs"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::DA() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("da"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::EL() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("el"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::ES() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("es"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::FI() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("fi"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::FR() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("fr"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::HE() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("he"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::HI_IN() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("hi"), - ::rtl::OUString::createFromAscii("IN")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::HU() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("hu"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::IT() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("it"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::JA() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("ja"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::KO() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("ko"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::NL() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("nl"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::PL() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("pl"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::PT() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("pt"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::PT_BR() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("pt"), - ::rtl::OUString::createFromAscii("BR")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::RU() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("ru"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::SK() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("sk"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::SL() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("sl"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::SV() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("sv"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::TH() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("th"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::TR() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("tr"), - ::rtl::OUString()); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::X_COMMENT() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("x"), - ::rtl::OUString::createFromAscii("comment")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::X_TRANSLATE() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("x"), - ::rtl::OUString::createFromAscii("translate")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US"))); return aLocale; } @@ -335,26 +66,8 @@ const Locale Locale::X_TRANSLATE() const Locale Locale::X_NOTRANSLATE() { static Locale aLocale( - ::rtl::OUString::createFromAscii("x"), - ::rtl::OUString::createFromAscii("notranslate")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::ZH_CN() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("zh"), - ::rtl::OUString::createFromAscii("CN")); - return aLocale; -} - -//----------------------------------------------- -const Locale Locale::ZH_TW() -{ - static Locale aLocale( - ::rtl::OUString::createFromAscii("zh"), - ::rtl::OUString::createFromAscii("TW")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("notranslate"))); return aLocale; } @@ -611,52 +324,6 @@ sal_Bool Locale::similar(const Locale& aComparable) const } //----------------------------------------------- -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) { // Take over these values without checking ... @@ -681,3 +348,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..6d87b0fb528a 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. @@ -103,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!" ); } } @@ -144,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; @@ -161,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!" ); } } @@ -178,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; @@ -198,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; } @@ -217,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; } @@ -291,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; @@ -334,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(); @@ -355,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; } @@ -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 e0b3e797264a..68a2999b738e 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. @@ -68,9 +69,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")); @@ -396,37 +394,25 @@ 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::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; @@ -540,9 +526,6 @@ void MediaDescriptor::clearComponentDataEntry( const ::rtl::OUString& rName ) } } -/*----------------------------------------------- - 10.03.2004 09:02 ------------------------------------------------*/ sal_Bool MediaDescriptor::addInputStream() { return impl_addInputStream( sal_True ); @@ -602,20 +585,20 @@ 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 ::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); 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&) @@ -625,15 +608,12 @@ 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) { 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! @@ -651,7 +631,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; } @@ -690,7 +670,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; } @@ -699,10 +679,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) { @@ -838,9 +814,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. @@ -853,7 +826,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 { @@ -878,3 +851,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 5be9df3d61b6..d8d81aadea3f 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. @@ -59,7 +60,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 +133,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 +161,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 +173,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 +185,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; } @@ -244,7 +245,7 @@ sal_Int32 MimeConfigurationHelper::GetFilterFlags( const ::rtl::OUString& aFilte 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; } } @@ -259,7 +260,7 @@ sal_Int32 MimeConfigurationHelper::GetFilterFlags( const ::rtl::OUString& aFilte { 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() ) @@ -268,7 +269,7 @@ sal_Int32 MimeConfigurationHelper::GetFilterFlags( const ::rtl::OUString& aFilte { // 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 ); @@ -280,7 +281,7 @@ sal_Int32 MimeConfigurationHelper::GetFilterFlags( const ::rtl::OUString& aFilte 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 ); @@ -311,10 +312,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; @@ -342,14 +343,14 @@ 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++ ) { 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 ) @@ -406,9 +407,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; } @@ -439,9 +440,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; } @@ -506,7 +507,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] ), @@ -540,13 +541,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" )); } } @@ -573,10 +574,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; } } @@ -613,7 +614,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() ) @@ -621,7 +622,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() ) @@ -635,14 +636,14 @@ 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() ) { 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; } @@ -655,11 +656,11 @@ 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 ); - aMediaDescr[nOldLen].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aMediaDescr[nOldLen].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aMediaDescr[ nOldLen ].Value = aTypes[nInd].Value; break; } @@ -677,7 +678,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; @@ -688,7 +689,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; @@ -699,7 +700,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; } @@ -735,9 +736,9 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( 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; @@ -752,7 +753,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 ) @@ -762,7 +763,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 & SFX_FILTER_PREFERED ) ) - aResult = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Name" ), + aResult = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" )), ::rtl::OUString() ); if ( nFlags & SFX_FILTER_PREFERED ) break; // the preffered filter was found @@ -799,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(); } @@ -939,3 +940,4 @@ uno::Sequence<sal_Int8> 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 566e5526019c..be789592bbf1 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. @@ -39,7 +40,7 @@ #include <rtl/strbuf.hxx> #include <osl/diagnose.h> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <functional> #include <algorithm> @@ -65,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 { @@ -158,13 +159,11 @@ namespace comphelper //-------------------------------------------------------------------- ::std::vector< ::rtl::OUString > NamedValueCollection::getNames() const { - ::std::vector< ::rtl::OUString > aNames( m_pImpl->aValues.size() ); - ::std::transform( - m_pImpl->aValues.begin(), - m_pImpl->aValues.end(), - aNames.begin(), - ::std::select1st< NamedValueRepository::value_type >() - ); + ::std::vector< ::rtl::OUString > aNames; + for ( NamedValueRepository::const_iterator it = m_pImpl->aValues.begin(), end = m_pImpl->aValues.end(); it != end; ++it ) + { + aNames.push_back( it->first ); + } return aNames; } @@ -213,7 +212,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 } @@ -355,3 +354,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..e8374efc2e4d 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. @@ -45,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() @@ -129,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 } @@ -274,3 +274,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..334a9e52178d 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. @@ -52,7 +53,7 @@ sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormats> { staruno::Reference<starbeans::XPropertySet> xFormat(xFormats->getByKey(nKey)); if (xFormat.is()) - xFormat->getPropertyValue(rtl::OUString::createFromAscii("Type")) >>= nReturn; + xFormat->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" ))) >>= nReturn; } catch(...) { @@ -82,7 +83,7 @@ staruno::Any getNumberFormatDecimals(const staruno::Reference<starutil::XNumberF staruno::Reference<starbeans::XPropertySet> 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); } } @@ -138,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; @@ -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..2e2119cb2ee3 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. @@ -136,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; @@ -157,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; @@ -181,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() ) @@ -193,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(); @@ -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..20af7275ca4d 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. @@ -103,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 ); @@ -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/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx index 0ac8f0277236..1228e9278db9 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. @@ -32,14 +33,16 @@ #include <osl/file.hxx> #include <osl/security.hxx> #include <osl/thread.h> -#include <vos/process.hxx> +#include <osl/process.h> #include <rtl/textenc.h> #include <rtl/uri.h> #include <rtl/uri.hxx> -using namespace vos; using namespace osl; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OStringToOUString; #define PATH_DELEMITTER '/' @@ -65,18 +68,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 ( sArg.indexOf(OUString::createFromAscii("-userid")) == 0 ) + { + if ( !osl_getCommandArg(--nArgs, &sArg.pData) ) + { + if ( sArg.indexOf(OUString( RTL_CONSTASCII_USTRINGPARAM( "-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) @@ -188,8 +190,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) @@ -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 ccd5b618605b..c37484be5b07 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. @@ -45,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 occured: ") ) + + "UNO exception occurred: ") ) + exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); } catch (...) { - OSL_ENSURE( false, "unknown exception occured!" ); + OSL_FAIL( "unknown exception occurred!" ); } } else @@ -77,3 +78,4 @@ FlagRestorationGuard::~FlagRestorationGuard() } // 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..d119f10a3a0d 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. @@ -114,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 >()); } @@ -134,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; @@ -148,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; @@ -157,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 >()); } } @@ -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 7986407b0bd5..6048709fd061 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. @@ -163,3 +164,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..97f7f96ad8df 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. @@ -6,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 @@ -110,3 +108,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 9054f0754b5e..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. @@ -29,17 +30,11 @@ #include "precompiled_comphelper.hxx" #include <comphelper/stillreadwriteinteraction.hxx> -#ifndef __COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP__ #include <com/sun/star/ucb/InteractiveIOException.hpp> -#endif -#ifndef __COM_SUN_STAR_TASK_XINTERACTIONABORT_HPP__ #include <com/sun/star/task/XInteractionAbort.hpp> -#endif -#ifndef __COM_SUN_STAR_UCB_UNSUPPORTEDDATASINKEXCEPTION_HPP__ #include <com/sun/star/ucb/UnsupportedDataSinkException.hpp> -#endif namespace comphelper{ @@ -142,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 9b4e7a15cfca..3441e0a1736f 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. @@ -63,7 +64,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() ) @@ -82,7 +83,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() ) @@ -228,7 +229,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() ) @@ -262,7 +263,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; @@ -554,3 +555,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..18ad6ad4fe9f 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. @@ -41,6 +42,8 @@ #include <comphelper/stlunosequence.hxx> #include <comphelper/stl_types.hxx> +#include <com/sun/star/i18n/CharType.hpp> + namespace comphelper { namespace string { @@ -91,20 +94,119 @@ 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_uInt32 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 ::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( ::comphelper::stl_begin(i_rSeq), ::comphelper::stl_end(i_rSeq), ::comphelper::OUStringBufferAppender(buf), - ::rtl::OUString::createFromAscii(", ")); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ", " ))); 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; @@ -117,9 +219,95 @@ 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; } + +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_Int32 nRet = 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_Int32 nLHSChunkLen; + sal_Int32 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) + break; + + //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_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) + 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; +} + +NaturalStringSorter::NaturalStringSorter( + const uno::Reference< uno::XComponentContext > &rContext, + const lang::Locale &rLocale) : m_aLocale(rLocale) +{ + 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); +} + } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/synchronousdispatch.cxx b/comphelper/source/misc/synchronousdispatch.cxx index 3c55556973f3..ca4d4b36f72a 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. @@ -89,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()); } } @@ -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..629e890ae62a 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. @@ -127,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; } @@ -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 738a5ec6a8d3..ab25d70c6e24 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. * @@ -28,7 +29,6 @@ #include "precompiled_comphelper.hxx" #include <comphelper/uieventslogger.hxx> -#include <boost/shared_ptr.hpp> #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/frame/XTerminateListener.hpp> #include <com/sun/star/lang/XEventListener.hpp> @@ -60,41 +60,42 @@ 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 { static void lcl_SetupOriginAppAbbr(map<OUString, OUString>& 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<OUString,OUString>& 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,34 +185,34 @@ 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_SPECIAL = OUString::createFromAscii(".special:"); - const OUString UiEventsLogger_Impl::URL_FILE = OUString::createFromAscii("file:"); + const OUString UiEventsLogger_Impl::URL_UNO(RTL_CONSTASCII_USTRINGPARAM(".uno:")); + const OUString UiEventsLogger_Impl::URL_SPECIAL(RTL_CONSTASCII_USTRINGPARAM(".special:")); + const OUString UiEventsLogger_Impl::URL_FILE(RTL_CONSTASCII_USTRINGPARAM("file:")); // public UiEventsLogger interface @@ -538,10 +539,10 @@ namespace comphelper // It will call disposing and make sure we clear all our references { Reference<XTerminateListener> 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> 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())) { @@ -574,15 +575,15 @@ namespace comphelper if(m_Formatter.is() && m_LogHandler.is() && m_Logger.is()) { Sequence<OUString> columns = Sequence<OUString>(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<XLogFormatter>(m_Formatter, UNO_QUERY)); m_Logger->setLevel(LogLevel::ALL); @@ -650,7 +651,7 @@ namespace comphelper { Reference<XMultiServiceFactory> sm = getProcessServiceFactory(); Reference<XCoreController> 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); @@ -691,3 +692,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 ebeedc92839d..de636191b1aa 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. @@ -382,3 +383,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 9c56f7ce80fd..00f5b81df3f9 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. @@ -107,3 +108,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 7a3b17111072..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. @@ -31,16 +32,10 @@ #include <comphelper/processfactory.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HDL_ #include <com/sun/star/registry/XRegistryKey.hpp> -#endif #include <cppuhelper/shlib.hxx> -#ifndef GCC -#endif - - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -84,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..e3a02dce4c1b 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. @@ -29,7 +30,7 @@ #include "precompiled_comphelper.hxx" #include <comphelper/ChainablePropertySet.hxx> #include <comphelper/ChainablePropertySetInfo.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <memory> // STL auto_ptr @@ -40,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 ) @@ -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< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(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< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(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< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(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< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -290,32 +290,34 @@ 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; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx index 6660517ef97e..0f53c6d0260b 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. @@ -76,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++; } @@ -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 28078a8019fc..2844031d370c 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. @@ -28,13 +29,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" -#ifndef _COMPHELPER_MASTERPROPERTYSET_HXX_ #include <comphelper/MasterPropertySet.hxx> -#endif #include <comphelper/MasterPropertySetInfo.hxx> #include <comphelper/ChainablePropertySet.hxx> #include <comphelper/ChainablePropertySetInfo.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <memory> // STL auto_ptr @@ -43,19 +42,19 @@ class AutoOGuardArray { sal_Int32 nSize; - std::auto_ptr< vos::OGuard > * pGuardArray; + std::auto_ptr< osl::SolarGuard > * pGuardArray; public: AutoOGuardArray( sal_Int32 nNumElements ); ~AutoOGuardArray(); - std::auto_ptr< vos::OGuard > & 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< vos::OGuard >[ nSize ]; + pGuardArray = new std::auto_ptr< osl::SolarGuard >[ nSize ]; } AutoOGuardArray::~AutoOGuardArray() @@ -73,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 ) @@ -82,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 ) @@ -131,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::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -151,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::SolarGuard > pMutexGuard2; if (pSlave->mpMutex) - pMutexGuard2.reset( new vos::OGuard(pSlave->mpMutex) ); + pMutexGuard2.reset( new osl::SolarGuard(pSlave->mpMutex) ); pSlave->_preSetValues(); pSlave->_setSingleValue( *((*aIter).second->mpInfo), rValue ); @@ -165,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::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -186,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::SolarGuard > pMutexGuard2; if (pSlave->mpMutex) - pMutexGuard2.reset( new vos::OGuard(pSlave->mpMutex) ); + pMutexGuard2.reset( new osl::SolarGuard(pSlave->mpMutex) ); pSlave->_preGetValues(); pSlave->_getSingleValue( *((*aIter).second->mpInfo), aAny ); @@ -226,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::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -265,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::SolarGuard(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preSetValues(); pSlave->SetInit ( sal_True ); @@ -292,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::SolarGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -330,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::SolarGuard(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preGetValues(); pSlave->SetInit ( sal_True ); @@ -393,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::SolarGuard > pMutexGuard; if (pSlave->mpMutex) - pMutexGuard.reset( new vos::OGuard(pSlave->mpMutex) ); + pMutexGuard.reset( new osl::SolarGuard(pSlave->mpMutex) ); pSlave->_preGetPropertyState(); pSlave->_getPropertyState( *((*aIter).second->mpInfo), aState ); @@ -475,31 +474,33 @@ 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; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index 57cf22b77508..0cfaf6ec1a6f 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. @@ -27,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" -#ifndef _COMPHELPER_CHAINABLEPROPERTYSETINFO_HXX_ #include <comphelper/MasterPropertySetInfo.hxx> -#endif #include <comphelper/TypeGeneration.hxx> using ::rtl::OUString; @@ -84,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 ); } @@ -102,10 +101,10 @@ 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++; + ++aIter; } } @@ -168,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 649e50711d28..6c5f9e009e90 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. @@ -27,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" -#ifndef _COMPHELPER_TYPEGENERATION_HXX #include <comphelper/TypeGeneration.hxx> -#endif #include <com/sun/star/script/XLibraryContainer.hpp> #include <com/sun/star/style/LineSpacingMode.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> @@ -97,9 +96,7 @@ #include <com/sun/star/beans/XVetoableChangeListener.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/beans/XPropertyStateChangeListener.hpp> -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ #include <com/sun/star/beans/PropertyAttribute.hpp> -#endif #include <com/sun/star/beans/XPropertiesChangeListener.hpp> #include <com/sun/star/beans/XPropertyChangeListener.hpp> #include <com/sun/star/beans/XPropertyAccess.hpp> @@ -129,9 +126,8 @@ #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XConnection.hpp> #include <com/sun/star/frame/XModel.hpp> -// --> OD 2004-08-09 #i28749# +// #i28749# #include <com/sun/star/drawing/HomogenMatrix3.hpp> -// <-- #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/embed/XEmbeddedObject.hpp> @@ -221,19 +217,20 @@ 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<beans::NamedValue>*)0 ); break; case CPPUTYPE_REFXGRAPHIC: pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break; case CPPUTYPE_TABLEBORDERDISTANCES: pType = &::getCppuType( (table::TableBorderDistances*)0 ); break; case CPPUTPYE_REFEMBEDDEDOBJECT: pType = &embed::XEmbeddedObject::static_type(); break; default: - OSL_ASSERT( "Unknown CPPU type" ); + OSL_FAIL( "Unknown CPPU type" ); } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/composedprops.cxx b/comphelper/source/property/composedprops.cxx index 4b44a8fb474e..aa864f7ca47f 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. @@ -299,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)!"); } //------------------------------------------------------------------------------ @@ -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..886530276abf 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. @@ -36,11 +37,8 @@ #include <comphelper/genericpropertyset.hxx> #include <comphelper/propertysetinfo.hxx> #include <comphelper/stl_types.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <rtl/uuid.h> -#include <boost/mem_fn.hpp> -#include <boost/bind.hpp> -#include <boost/utility.hpp> /////////////////////////////////////////////////////////////////////// @@ -299,3 +297,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..c67605977ddf 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. @@ -42,6 +43,7 @@ #include <algorithm> #include <functional> +#include <iterator> //-------------------------------------------------------------------------- @@ -484,8 +486,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 @@ -502,6 +502,7 @@ namespace comphelper ++pName, ++pHandle, ++pProperty ) { + ::cppu::IPropertyArrayHelper& rPropInfo = getInfoHelper(); *pHandle = rPropInfo.getHandleByName( *pName ); if ( *pHandle != -1 ) continue; @@ -512,9 +513,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; } @@ -583,3 +581,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 9c2fd868d973..b83c292689dc 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. @@ -746,7 +747,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 } } @@ -766,7 +767,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; @@ -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!" ); } } } @@ -1045,3 +1045,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..37bb62cc98ef 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. @@ -77,7 +78,7 @@ void copyProperties(const Reference<XPropertySet>& _rxSource, { if (!_rxSource.is() || !_rxDest.is()) { - OSL_ENSURE(sal_False, "copyProperties: invalid arguments !"); + OSL_FAIL("copyProperties: invalid arguments !"); return; } @@ -135,7 +136,7 @@ void copyProperties(const Reference<XPropertySet>& _rxSource, } aBuffer.append( "." ); - OSL_ENSURE( sal_False, aBuffer.getStr() ); + OSL_FAIL( aBuffer.getStr() ); #endif } } @@ -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..6233efbc011f 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. @@ -255,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; @@ -274,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() ); @@ -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<OPropertyContainerHelper*>(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; @@ -550,3 +550,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..0ad27a6949ed 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. @@ -311,18 +312,20 @@ 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; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index efdd495ac1bc..4746a7e9ce43 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. @@ -83,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); } @@ -130,8 +131,8 @@ Sequence< Property > PropertyMapImpl::getProperties() throw() pProperties->Type = *pEntry->mpType; pProperties->Attributes = pEntry->mnAttributes; - pProperties++; - aIter++; + ++pProperties; + ++aIter; } } @@ -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..f1611efd77f4 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. @@ -193,147 +194,4 @@ namespace comphelper } // namespace comphelper //......................................................................... -#ifdef FS_PRIV_DEBUG -#define STATECONTAINER_TEST -#endif - -#ifdef STATECONTAINER_TEST -#include <com/sun/star/beans/PropertyAttribute.hpp> -#include <comphelper/proparrhlp.hxx> -#include <comphelper/broadcasthelper.hxx> - -//......................................................................... -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::createFromAscii( "StringProperty" ), - 1, - PropertyAttribute::BOUND, - &m_sStringProperty, - ::getCppuType( &m_sStringProperty ) - ); - - registerProperty( - ::rtl::OUString::createFromAscii( "InterfaceProperty" ), - 2, - PropertyAttribute::BOUND, - &m_xInterfaceProperty, - ::getCppuType( &m_xInterfaceProperty ) - ); - - registerMayBeVoidProperty( - ::rtl::OUString::createFromAscii( "IntProperty" ), - 3, - PropertyAttribute::BOUND, - &m_aMayBeVoidProperty, - ::getCppuType( static_cast< sal_Int32* >( NULL ) ) - ); - - registerPropertyNoMember( - ::rtl::OUString::createFromAscii( "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: */ 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<stario::XObjectOutputStream>& 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..9bcfac5fb66b 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. @@ -231,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!" ); } } } @@ -303,16 +304,16 @@ 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 ); } 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(); @@ -536,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 @@ -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..f20153ee0aaf 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. @@ -101,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() ) @@ -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..4e1cc7ade660 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. @@ -222,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 ); @@ -238,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 ); } @@ -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 bcf32b85011f..2c956623fcb7 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. @@ -28,14 +29,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" #include <comphelper/attributelist.hxx> -#include <vos/diagnose.hxx> +#include <osl/diagnose.h> #include <vector> -using namespace rtl; using namespace osl; using namespace com::sun::star; +using ::rtl::OUString; + namespace comphelper { struct TagAttribute_Impl @@ -135,7 +137,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 +161,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,8 +174,9 @@ 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 +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx index 9ad617b0e6d1..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. @@ -28,24 +29,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include <com/sun/star/beans/StringPair.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif -#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP #include <com/sun/star/io/XActiveDataSource.hpp> -#endif -#ifndef _COM_SUN_STAR_XML_SAX_XPARSER_HPP #include <com/sun/star/xml/sax/XParser.hpp> -#endif -#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP #include <com/sun/star/xml/sax/XDocumentHandler.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP #include <com/sun/star/lang/IllegalArgumentException.hpp> -#endif #include <comphelper/ofopxmlhelper.hxx> #include <comphelper/attributelist.hxx> @@ -465,3 +454,4 @@ void SAL_CALL OFOPXMLHelper::setDocumentLocator( const uno::Reference< xml::sax: } // namespace comphelper +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |