diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2009-12-18 16:40:20 +0100 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2009-12-18 16:40:20 +0100 |
commit | 51bc9190c2e67ff8a9d08275d40d7a22fa727c41 (patch) | |
tree | cedeeb88146123b4af9aa1a8b4d5d7cdb16e3bf1 /ucb | |
parent | cb48d112addcb1f18b1cdb8dabeb7a84a0fcfcdd (diff) |
whitespace cleanup.
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 63 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.hxx | 36 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontentcaps.cxx | 2 |
3 files changed, 48 insertions, 53 deletions
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index eafac3d769..7fff9871c2 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,9 +55,7 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/ucb/ContentInfoAttribute.hpp> #include <com/sun/star/ucb/InsertCommandArgument.hpp> -#ifndef _COM_SUN_STAR_UCB_INTERACTIVEBADTRANSFRERURLEXCEPTION_HPP_ #include <com/sun/star/ucb/InteractiveBadTransferURLException.hpp> -#endif #include <com/sun/star/ucb/MissingInputStreamException.hpp> #include <com/sun/star/ucb/NameClash.hpp> #include <com/sun/star/ucb/NameClashException.hpp> @@ -84,9 +82,9 @@ using namespace com::sun::star; using namespace package_ucp; -#define NONE_MODIFIED sal_uInt32( 0x00 ) -#define MEDIATYPE_MODIFIED sal_uInt32( 0x01 ) -#define COMPRESSED_MODIFIED sal_uInt32( 0x02 ) +#define NONE_MODIFIED sal_uInt32( 0x00 ) +#define MEDIATYPE_MODIFIED sal_uInt32( 0x01 ) +#define COMPRESSED_MODIFIED sal_uInt32( 0x02 ) #define ENCRYPTED_MODIFIED sal_uInt32( 0x04 ) #define ENCRYPTIONKEY_MODIFIED sal_uInt32( 0x08 ) @@ -210,13 +208,13 @@ Content* Content::create( //========================================================================= // static -::rtl::OUString Content::GetContentType( +::rtl::OUString Content::GetContentType( const ::rtl::OUString& aScheme, sal_Bool bFolder ) { return ( rtl::OUString::createFromAscii( "application/" ) + aScheme - + ( bFolder - ? rtl::OUString::createFromAscii( "-folder" ) + + ( bFolder + ? rtl::OUString::createFromAscii( "-folder" ) : rtl::OUString::createFromAscii( "-stream" ) ) ); } @@ -294,7 +292,7 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) aRet = cppu::queryInterface( rType, static_cast< ucb::XContentCreator * >( this ) ); - return aRet.hasValue() ? aRet : ContentImplHelper::queryInterface( rType ); + return aRet.hasValue() ? aRet : ContentImplHelper::queryInterface( rType ); } //========================================================================= @@ -609,7 +607,7 @@ uno::Any SAL_CALL Content::execute( { ////////////////////////////////////////////////////////////////// // transfer - // ( Not available at stream objects ) + // ( Not available at stream objects ) ////////////////////////////////////////////////////////////////// ucb::TransferInfo aInfo; @@ -632,7 +630,7 @@ uno::Any SAL_CALL Content::execute( { ////////////////////////////////////////////////////////////////// // flush - // ( Not available at stream objects ) + // ( Not available at stream objects ) ////////////////////////////////////////////////////////////////// if( !flushData() ) @@ -828,7 +826,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( const uno::Reference< lang::XMultiServiceFactory >& rSMgr, const uno::Sequence< beans::Property >& rProperties, const ContentProperties& rData, - const rtl::Reference< ::ucbhelper::ContentProviderImplHelper >& + const rtl::Reference< ::ucbhelper::ContentProviderImplHelper >& rProvider, const rtl::OUString& rContentId ) { @@ -1068,11 +1066,11 @@ uno::Sequence< uno::Any > Content::setPropertyValues( beans::PropertyChangeEvent aEvent; aEvent.Source = static_cast< cppu::OWeakObject * >( this ); - aEvent.Further = sal_False; -// aEvent.PropertyName = + aEvent.Further = sal_False; +// aEvent.PropertyName = aEvent.PropertyHandle = -1; -// aEvent.OldValue = -// aEvent.NewValue = +// aEvent.OldValue = +// aEvent.NewValue = const beans::PropertyValue* pValues = rValues.getConstArray(); sal_Int32 nCount = rValues.getLength(); @@ -1181,7 +1179,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( aEvent.NewValue = uno::makeAny( aNewValue ); m_aProps.aMediaType = aNewValue; - nChanged++; + nChanged++; bStore = sal_True; m_nModifiedProps |= MEDIATYPE_MODIFIED; } @@ -1219,7 +1217,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( aEvent.NewValue = uno::makeAny( bNewValue ); m_aProps.bCompressed = bNewValue; - nChanged++; + nChanged++; bStore = sal_True; m_nModifiedProps |= COMPRESSED_MODIFIED; } @@ -1256,7 +1254,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( aEvent.NewValue = uno::makeAny( bNewValue ); m_aProps.bEncrypted = bNewValue; - nChanged++; + nChanged++; bStore = sal_True; m_nModifiedProps |= ENCRYPTED_MODIFIED; } @@ -1350,7 +1348,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( rValue.Name, rValue.Value ); aEvent.PropertyName = rValue.Name; - aEvent.OldValue = aOldValue; + aEvent.OldValue = aOldValue; aEvent.NewValue = rValue.Value; aChanges.getArray()[ nChanged ] = aEvent; @@ -1483,7 +1481,7 @@ uno::Any Content::open( uno::Reference< ucb::XDynamicResultSet > xSet = new DynamicResultSet( m_xSMgr, this, rArg, xEnv ); return uno::makeAny( xSet ); - } + } else { ////////////////////////////////////////////////////////////////// @@ -1506,7 +1504,7 @@ uno::Any Content::open( rtl::OUString aURL = m_xIdentifier->getContentIdentifier(); uno::Reference< io::XOutputStream > xOut( rArg.Sink, uno::UNO_QUERY ); if ( xOut.is() ) - { + { // PUSH: write data into xOut uno::Reference< io::XInputStream > xIn = getInputStream(); @@ -1560,14 +1558,14 @@ uno::Any Content::open( { // closeOutput, readSomeBytes, writeBytes } - } + } else - { + { uno::Reference< io::XActiveDataSink > xDataSink( rArg.Sink, uno::UNO_QUERY ); - if ( xDataSink.is() ) + if ( xDataSink.is() ) { - // PULL: wait for client read + // PULL: wait for client read uno::Reference< io::XInputStream > xIn = getInputStream(); if ( !xIn.is() ) @@ -1598,7 +1596,7 @@ uno::Any Content::open( // Done. xDataSink->setInputStream( xIn ); } - else + else { // Note: aOpenCommand.Sink may contain an XStream // implementation. Support for this type of @@ -1612,7 +1610,7 @@ uno::Any Content::open( xEnv ); // Unreachable } - } + } } return uno::Any(); @@ -2185,7 +2183,7 @@ sal_Bool Content::exchangeIdentity( aOldURL.getLength(), xNewId->getContentIdentifier() ); uno::Reference< ucb::XContentIdentifier > xNewChildId - = new ::ucbhelper::ContentIdentifier( + = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewChildURL ); if ( !xChild->exchangeIdentity( xNewChildId ) ) @@ -2611,8 +2609,8 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( !xNA->hasByHierarchicalName( m_aUri.getPath() ) ) { -// if ( !bCreate ) -// return sal_True; +// if ( !bCreate ) +// return sal_True; try { @@ -2956,4 +2954,3 @@ uno::Reference< container::XEnumeration > Content::getIterator() return xIter; } - diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx index 0673465d5c..f04e7ad54f 100644 --- a/ucb/source/ucp/package/pkgcontent.hxx +++ b/ucb/source/ucp/package/pkgcontent.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,9 +34,7 @@ #include <list> #include <rtl/ref.hxx> -#ifndef _COM_SUN_STAR_UCB_INTERACTIVEBADTRANSFRERURLEXCEPTION_HPP_ #include <com/sun/star/ucb/InteractiveBadTransferURLException.hpp> -#endif #include <com/sun/star/ucb/XContentCreator.hpp> #include <ucbhelper/contenthelper.hxx> #include "pkguri.hxx" @@ -110,17 +108,17 @@ class Content : public ::ucbhelper::ContentImplHelper, public com::sun::star::ucb::XContentCreator { enum ContentState { TRANSIENT, // created via CreateNewContent, - // but did not process "insert" yet + // but did not process "insert" yet PERSISTENT, // processed "insert" - DEAD // processed "delete" + DEAD // processed "delete" }; - PackageUri m_aUri; - ContentProperties m_aProps; - ContentState m_eState; + PackageUri m_aUri; + ContentProperties m_aProps; + ContentState m_eState; com::sun::star::uno::Reference< - com::sun::star::container::XHierarchicalNameAccess > m_xPackage; - ContentProvider* m_pProvider; + com::sun::star::container::XHierarchicalNameAccess > m_xPackage; + ContentProvider* m_pProvider; sal_uInt32 m_nModifiedProps; private: @@ -130,7 +128,7 @@ private: const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier, const ::com::sun::star::uno::Reference< - com::sun::star::container::XHierarchicalNameAccess >& Package, + com::sun::star::container::XHierarchicalNameAccess >& Package, const PackageUri& rUri, const ContentProperties& rProps ); Content( const com::sun::star::uno::Reference< @@ -139,7 +137,7 @@ private: const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier, const com::sun::star::uno::Reference< - com::sun::star::container::XHierarchicalNameAccess >& Package, + com::sun::star::container::XHierarchicalNameAccess >& Package, const PackageUri& rUri, const com::sun::star::ucb::ContentInfo& Info ); @@ -155,7 +153,7 @@ private: getPropertyValues( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr, const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::Property >& rProperties, + ::com::sun::star::beans::Property >& rProperties, const ContentProperties& rData, const rtl::Reference< ::ucbhelper::ContentProviderImplHelper >& rProvider, @@ -183,13 +181,13 @@ private: const PackageUri& rURI, ContentProperties& rProps, com::sun::star::uno::Reference< - com::sun::star::container::XHierarchicalNameAccess > & + com::sun::star::container::XHierarchicalNameAccess > & rxPackage ); static sal_Bool hasData( ContentProvider* pProvider, const PackageUri& rURI, com::sun::star::uno::Reference< - com::sun::star::container::XHierarchicalNameAccess > & + com::sun::star::container::XHierarchicalNameAccess > & rxPackage ); static ::rtl::OUString @@ -200,7 +198,7 @@ private: hasData( const PackageUri& rURI ); sal_Bool renameData( const com::sun::star::uno::Reference< - com::sun::star::ucb::XContentIdentifier >& xOldId, + com::sun::star::ucb::XContentIdentifier >& xOldId, const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& xNewId ); sal_Bool @@ -223,7 +221,7 @@ private: ::com::sun::star::uno::Any open( const ::com::sun::star::ucb::OpenCommandArgument2& rArg, const ::com::sun::star::uno::Reference< - ::com::sun::star::ucb::XCommandEnvironment > & xEnv ) + ::com::sun::star::ucb::XCommandEnvironment > & xEnv ) throw( ::com::sun::star::uno::Exception ); void insert( const ::com::sun::star::uno::Reference< @@ -292,7 +290,7 @@ public: execute( const com::sun::star::ucb::Command& aCommand, sal_Int32 CommandId, const com::sun::star::uno::Reference< - com::sun::star::ucb::XCommandEnvironment >& Environment ) + com::sun::star::ucb::XCommandEnvironment >& Environment ) throw( com::sun::star::uno::Exception, com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::RuntimeException ); @@ -323,7 +321,7 @@ public: getPropertyValues( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr, const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::Property >& rProperties, + ::com::sun::star::beans::Property >& rProperties, ContentProvider* pProvider, const ::rtl::OUString& rContentId ); diff --git a/ucb/source/ucp/package/pkgcontentcaps.cxx b/ucb/source/ucp/package/pkgcontentcaps.cxx index 6e6e4a9123..0538d93f87 100644 --- a/ucb/source/ucp/package/pkgcontentcaps.cxx +++ b/ucb/source/ucp/package/pkgcontentcaps.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite |