diff options
Diffstat (limited to 'forms/source/xforms')
58 files changed, 271 insertions, 271 deletions
diff --git a/forms/source/xforms/NameContainer.hxx b/forms/source/xforms/NameContainer.hxx index b4481a5434d8..fe8a6a480986 100644 --- a/forms/source/xforms/NameContainer.hxx +++ b/forms/source/xforms/NameContainer.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,7 +68,7 @@ protected: return findItem( rName ) != maItems.end(); } - T getItem( const rtl::OUString& rName ) + T getItem( const rtl::OUString& rName ) { OSL_ENSURE( hasItem( rName ), "can't get non-existant item" ); return maItems[ rName ]; @@ -123,7 +123,7 @@ public: // virtual com::sun::star::uno::Any SAL_CALL getByName( - const rtl::OUString& rName ) + const rtl::OUString& rName ) throw( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException, com::sun::star::uno::RuntimeException ) diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 0ec73fc116b0..853e42964430 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -248,7 +248,7 @@ bool Binding::isValid() isValid_DataType() && maMIP.isConstraint() && ( ! maMIP.isRequired() || - ( maBindingExpression.hasValue() && + ( maBindingExpression.hasValue() && maBindingExpression.getString().getLength() > 0 ) ); } @@ -292,7 +292,7 @@ OUString Binding::explainInvalid() if( sReason.getLength() == 0 ) { // no explanation given by data type? Then give generic message - sReason = getResource( RID_STR_XFORMS_INVALID_VALUE, + sReason = getResource( RID_STR_XFORMS_INVALID_VALUE, maMIP.getTypeName() ); } } @@ -300,7 +300,7 @@ OUString Binding::explainInvalid() { sReason = maMIP.getConstraintExplanation(); } - else if( maMIP.isRequired() && maBindingExpression.hasValue() && + else if( maMIP.isRequired() && maBindingExpression.hasValue() && ( maBindingExpression.getString().getLength() == 0 ) ) { sReason = getResource( RID_STR_XFORMS_REQUIRED ); @@ -342,7 +342,7 @@ Binding::IntSequence_t Binding::getUnoTunnelID() Binding* SAL_CALL Binding::getBinding( const Reference<XPropertySet>& xPropertySet ) { Reference<XUnoTunnel> xTunnel( xPropertySet, UNO_QUERY ); - return xTunnel.is() + return xTunnel.is() ? reinterpret_cast<Binding*>( xTunnel->getSomething(getUnoTunnelID())) : NULL; } @@ -522,7 +522,7 @@ Model* Binding::getModelImpl() const Model* Binding::getModelImpl( const Model_t& xModel ) const { Reference<XUnoTunnel> xTunnel( xModel, UNO_QUERY ); - Model* pModel = xTunnel.is() + Model* pModel = xTunnel.is() ? reinterpret_cast<Model*>( xTunnel->getSomething( Model::getUnoTunnelID() ) ) : NULL; @@ -539,13 +539,13 @@ void lcl_addListenerToNode( Reference<XNode> xNode, xListener, false ); xTarget->addEventListener( OUSTRING("DOMCharacterDataModified"), xListener, true ); - xTarget->addEventListener( OUSTRING("DOMAttrModified"), + xTarget->addEventListener( OUSTRING("DOMAttrModified"), xListener, false ); - xTarget->addEventListener( OUSTRING("DOMAttrModified"), + xTarget->addEventListener( OUSTRING("DOMAttrModified"), xListener, true ); - xTarget->addEventListener( OUSTRING("DOMAttrModified"), + xTarget->addEventListener( OUSTRING("DOMAttrModified"), xListener, true ); - xTarget->addEventListener( OUSTRING("xforms-generic"), + xTarget->addEventListener( OUSTRING("xforms-generic"), xListener, true ); } } @@ -560,11 +560,11 @@ void lcl_removeListenerFromNode( Reference<XNode> xNode, xListener, false ); xTarget->removeEventListener( OUSTRING("DOMCharacterDataModified"), xListener, true ); - xTarget->removeEventListener( OUSTRING("DOMAttrModified"), + xTarget->removeEventListener( OUSTRING("DOMAttrModified"), xListener, false ); - xTarget->removeEventListener( OUSTRING("DOMAttrModified"), + xTarget->removeEventListener( OUSTRING("DOMAttrModified"), xListener, true ); - xTarget->removeEventListener( OUSTRING("xforms-generic"), + xTarget->removeEventListener( OUSTRING("xforms-generic"), xListener, true ); } } @@ -585,7 +585,7 @@ void lcl_removeListenerFromNode( Reference<XNode> xNode, OSL_ENSURE( aIter->is(), "no node?" ); // create proper evaluation context for this MIP - aVector.push_back( EvaluationContext( *aIter, getModel(), + aVector.push_back( EvaluationContext( *aIter, getModel(), getBindingNamespaces(), nCount, aNodes.size() ) ); } @@ -614,16 +614,16 @@ void Binding::bind( bool bForceRebind ) if( ! maBindingExpression.getNode().is() ) { // 1b) create node (if valid element name) - if( isValidQName( maBindingExpression.getExpression(), + if( isValidQName( maBindingExpression.getExpression(), aContext.mxNamespaces ) ) { - aContext.mxContextNode->appendChild( - Reference<XNode>( - aContext.mxContextNode->getOwnerDocument()->createElement( + aContext.mxContextNode->appendChild( + Reference<XNode>( + aContext.mxContextNode->getOwnerDocument()->createElement( maBindingExpression.getExpression() ), UNO_QUERY ) ); maBindingExpression.evaluate( aContext ); - OSL_ENSURE( maBindingExpression.getNode().is(), + OSL_ENSURE( maBindingExpression.getNode().is(), "we should bind to the newly inserted node!" ); } } @@ -643,8 +643,8 @@ void Binding::bind( bool bForceRebind ) aIter++ ) maEventNodes.push_back( *aIter ); else - maEventNodes.push_back( - Reference<XNode>( aContext.mxContextNode->getOwnerDocument(), + maEventNodes.push_back( + Reference<XNode>( aContext.mxContextNode->getOwnerDocument(), UNO_QUERY_THROW ) ); for( PathExpression::NodeVector_t::iterator aIter2 = maEventNodes.begin(); aIter2 != maEventNodes.end(); @@ -744,13 +744,13 @@ void Binding::valueModified() // control will query once the value has changed) Reference<XInterface> xSource = static_cast<XPropertySet*>( this ); ::std::for_each( maModifyListeners.begin(), - maModifyListeners.end(), + maModifyListeners.end(), ::std::bind2nd( ::std::ptr_fun( lcl_modified ), xSource ) ); ::std::for_each( maListEntryListeners.begin(), - maListEntryListeners.end(), + maListEntryListeners.end(), ::std::bind2nd( ::std::ptr_fun( lcl_listentry ), xSource ) ); ::std::for_each( maValidityListeners.begin(), - maValidityListeners.end(), + maValidityListeners.end(), ::std::bind2nd( ::std::ptr_fun( lcl_validate ), xSource ) ); // now distribute MIPs to childs @@ -837,7 +837,7 @@ Binding::XDataType_t Binding::getDataType() OSL_ENSURE( getModel().is(), "need model" ); OSL_ENSURE( getModel()->getDataTypeRepository().is(), "need types" ); - Reference<XDataTypeRepository> xRepository( + Reference<XDataTypeRepository> xRepository( getModel()->getDataTypeRepository(), UNO_QUERY ); OUString sTypeName = maMIP.getTypeName(); @@ -971,7 +971,7 @@ void Binding::_setNamespaces( const XNameContainer_t& rNamespaces, bool bBinding ) { Model* pModel = getModelImpl(); - XNameContainer_t xModelNamespaces = ( pModel != NULL ) + XNameContainer_t xModelNamespaces = ( pModel != NULL ) ? pModel->getNamespaces() : NULL; OSL_ENSURE( ( pModel != NULL ) == xModelNamespaces.is(), "no model nmsp?"); @@ -992,10 +992,10 @@ void Binding::_setNamespaces( const XNameContainer_t& rNamespaces, // determine whether the namespace should go into model's or // into binding's namespaces - bool bLocal = + bool bLocal = ! xModelNamespaces.is() || mxNamespaces->hasByName( rName ) - || ( bBinding + || ( bBinding && xModelNamespaces.is() && xModelNamespaces->hasByName( rName ) ); @@ -1051,20 +1051,20 @@ void Binding::_checkBindingID() // XValueBinding // -Binding::Sequence_Type_t Binding::getSupportedValueTypes() +Binding::Sequence_Type_t Binding::getSupportedValueTypes() throw( RuntimeException ) { return Convert::get().getTypes(); } -sal_Bool Binding::supportsType( const Type_t& rType ) +sal_Bool Binding::supportsType( const Type_t& rType ) throw( RuntimeException ) { return Convert::get().hasType( rType ); } Binding::Any_t Binding::getValue( const Type_t& rType ) - throw( IncompatibleTypesException, + throw( IncompatibleTypesException, RuntimeException ) { // first, check for model @@ -1081,18 +1081,18 @@ Binding::Any_t Binding::getValue( const Type_t& rType ) Convert &rConvert = Convert::get(); result = rConvert.toAny(pathExpr,rType); } - -// return maBindingExpression.hasValue() + +// return maBindingExpression.hasValue() // ? Convert::get().toAny( maBindingExpression.getString(), rType ) // : Any(); return result; } -void Binding::setValue( const Any_t& aValue ) - throw( IncompatibleTypesException, - InvalidBindingStateException, - NoSupportException, +void Binding::setValue( const Any_t& aValue ) + throw( IncompatibleTypesException, + InvalidBindingStateException, + NoSupportException, RuntimeException ) { // first, check for model @@ -1196,8 +1196,8 @@ void Binding::addListEntryListener( const XListEntryListener_t& xListener ) RuntimeException ) { OSL_ENSURE( xListener.is(), "need listener!" ); - if( ::std::find( maListEntryListeners.begin(), - maListEntryListeners.end(), + if( ::std::find( maListEntryListeners.begin(), + maListEntryListeners.end(), xListener) == maListEntryListeners.end() ) maListEntryListeners.push_back( xListener ); @@ -1207,15 +1207,15 @@ void Binding::removeListEntryListener( const XListEntryListener_t& xListener ) throw( NullPointerException, RuntimeException ) { - XListEntryListeners_t::iterator aIter = - ::std::find( maListEntryListeners.begin(), maListEntryListeners.end(), + XListEntryListeners_t::iterator aIter = + ::std::find( maListEntryListeners.begin(), maListEntryListeners.end(), xListener ); if( aIter != maListEntryListeners.end() ) maListEntryListeners.erase( aIter ); } -// +// // XValidator // @@ -1256,8 +1256,8 @@ void Binding::removeValidityConstraintListener( throw( NullPointerException, RuntimeException ) { - XValidityConstraintListeners_t::iterator aIter = - ::std::find( maValidityListeners.begin(), maValidityListeners.end(), + XValidityConstraintListeners_t::iterator aIter = + ::std::find( maValidityListeners.begin(), maValidityListeners.end(), xListener ); if( aIter != maValidityListeners.end() ) maValidityListeners.erase( aIter ); @@ -1265,7 +1265,7 @@ void Binding::removeValidityConstraintListener( -// +// // xml::dom::event::XEventListener // @@ -1367,7 +1367,7 @@ void Binding::initializePropertySet() initializePropertyValueCache( HANDLE_ExternalData ); } -void Binding::addModifyListener( +void Binding::addModifyListener( const XModifyListener_t& xListener ) throw( RuntimeException ) { @@ -1386,7 +1386,7 @@ void Binding::removeModifyListener( const XModifyListener_t& xListener ) throw( RuntimeException ) { - ModifyListeners_t::iterator aIter = + ModifyListeners_t::iterator aIter = ::std::find( maModifyListeners.begin(), maModifyListeners.end(), xListener ); if( aIter != maModifyListeners.end() ) maModifyListeners.erase( aIter ); diff --git a/forms/source/xforms/binding.hxx b/forms/source/xforms/binding.hxx index ba538441df91..b61a5597d831 100644 --- a/forms/source/xforms/binding.hxx +++ b/forms/source/xforms/binding.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,18 +34,18 @@ // forward declaractions namespace xforms { - class Model; + class Model; class EvaluationContext; } namespace com { namespace sun { namespace star { namespace xml { namespace xpath { class XXPathAPI; } - namespace dom - { - class XNode; + namespace dom + { + class XNode; class XNodeList; } - } + } namespace container { class XNameContainer; } namespace xforms { class XModel; } namespace xsd { class XDataType; } @@ -130,7 +130,7 @@ private: /// an XPath-expression to be instantiated on the data instance PathExpression maBindingExpression; - /// an XPath-expression to determine read-only status + /// an XPath-expression to determine read-only status BoolExpression maReadonly; /// an XPath-expression to determine relevance @@ -154,7 +154,7 @@ private: /// a type name rtl::OUString msTypeName; - /// modify listeners + /// modify listeners ModifyListeners_t maModifyListeners; /// list entry listener @@ -192,7 +192,7 @@ public: Model_t getModel() const; /// get XForms model void _setModel( const Model_t& ); /// set XForms model (only called by Model) - + rtl::OUString getModelID() const; /// get ID of XForms model @@ -223,7 +223,7 @@ public: void setType( const rtl::OUString& ); /// set type name MIP (static) // a binding expression can only be interpreted with respect to - // suitable namespace declarations. We collect those in the model and in a binding. + // suitable namespace declarations. We collect those in the model and in a binding. // access to a binding's namespace // (set-method only changes local namespaces (but may add to model)) @@ -246,7 +246,7 @@ public: // - type (static; default: xsd:string) // - minOccurs/maxOccurs (computed XPath; default: 0/inf) // - p3ptype (static; no default) - + @@ -260,7 +260,7 @@ public: XNodeList_t getXNodeList(); /// heuristically determine whether this binding is simple binding - /// (here: simple binding == does not depend on other parts of the + /// (here: simple binding == does not depend on other parts of the /// instance, it's not a 'dynamic' binding) bool isSimpleBinding() const; @@ -344,7 +344,7 @@ private: /// bind this binding, and pre-compute the affected nodes void bind( bool bForceRebind = false ); - /// the binding value has been changed: + /// the binding value has been changed: /// trigger a modified event on all modified listeners void valueModified(); @@ -397,20 +397,20 @@ public: public: - virtual Sequence_Type_t SAL_CALL getSupportedValueTypes() + virtual Sequence_Type_t SAL_CALL getSupportedValueTypes() throw( RuntimeException_t ); - virtual sal_Bool SAL_CALL supportsType( const Type_t& aType ) + virtual sal_Bool SAL_CALL supportsType( const Type_t& aType ) throw( RuntimeException_t ); virtual Any_t SAL_CALL getValue( const Type_t& aType ) - throw( IncompatibleTypesException_t, + throw( IncompatibleTypesException_t, RuntimeException_t ); - virtual void SAL_CALL setValue( const Any_t& aValue ) - throw( IncompatibleTypesException_t, + virtual void SAL_CALL setValue( const Any_t& aValue ) + throw( IncompatibleTypesException_t, InvalidBindingStateException_t, - NoSupportException_t, + NoSupportException_t, RuntimeException_t ); @@ -443,7 +443,7 @@ public: // XValidator: // - virtual sal_Bool SAL_CALL isValid( + virtual sal_Bool SAL_CALL isValid( const Any_t& ) throw( RuntimeException_t ); @@ -469,7 +469,7 @@ public: public: - virtual void SAL_CALL addModifyListener( + virtual void SAL_CALL addModifyListener( const XModifyListener_t& xListener ) throw( RuntimeException_t ); @@ -495,12 +495,12 @@ public: - // + // // xml::dom::event::XEventListener // receive an event if our node changed // - virtual void SAL_CALL handleEvent( + virtual void SAL_CALL handleEvent( const XEvent_t& xEvent ) throw( RuntimeException_t ); diff --git a/forms/source/xforms/boolexpression.cxx b/forms/source/xforms/boolexpression.cxx index 9abf5590f70d..6a8750121021 100644 --- a/forms/source/xforms/boolexpression.cxx +++ b/forms/source/xforms/boolexpression.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/boolexpression.hxx b/forms/source/xforms/boolexpression.hxx index 8da5d58ad3c0..1419ad431c19 100644 --- a/forms/source/xforms/boolexpression.hxx +++ b/forms/source/xforms/boolexpression.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/collection.hxx b/forms/source/xforms/collection.hxx index 0ba804c8e608..cebe52417ec2 100644 --- a/forms/source/xforms/collection.hxx +++ b/forms/source/xforms/collection.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -166,28 +166,28 @@ public: // XElementAccess - virtual Type_t SAL_CALL getElementType() + virtual Type_t SAL_CALL getElementType() throw( RuntimeException_t ) { return getCppuType( static_cast<T*>( NULL ) ); } - virtual sal_Bool SAL_CALL hasElements() + virtual sal_Bool SAL_CALL hasElements() throw( RuntimeException_t ) { return hasItems(); } // XIndexAccess : XElementAccess - virtual sal_Int32 SAL_CALL getCount() + virtual sal_Int32 SAL_CALL getCount() throw( RuntimeException_t ) { return countItems(); } - virtual Any_t SAL_CALL getByIndex( sal_Int32 nIndex ) - throw( IndexOutOfBoundsException_t, - WrappedTargetException_t, + virtual Any_t SAL_CALL getByIndex( sal_Int32 nIndex ) + throw( IndexOutOfBoundsException_t, + WrappedTargetException_t, RuntimeException_t) { if( isValidIndex( nIndex ) ) @@ -197,11 +197,11 @@ public: } // XIndexReplace : XIndexAccess - virtual void SAL_CALL replaceByIndex( sal_Int32 nIndex, - const Any_t& aElement ) - throw( IllegalArgumentException_t, - IndexOutOfBoundsException_t, - WrappedTargetException_t, + virtual void SAL_CALL replaceByIndex( sal_Int32 nIndex, + const Any_t& aElement ) + throw( IllegalArgumentException_t, + IndexOutOfBoundsException_t, + WrappedTargetException_t, RuntimeException_t) { T t; @@ -221,18 +221,18 @@ public: return new Enumeration( this ); } - + // XSet : XEnumerationAccess - virtual sal_Bool SAL_CALL has( const Any_t& aElement ) + virtual sal_Bool SAL_CALL has( const Any_t& aElement ) throw( RuntimeException_t ) { T t; return ( aElement >>= t ) ? hasItem( t ) : sal_False; } - + virtual void SAL_CALL insert( const Any_t& aElement ) throw( IllegalArgumentException_t, - ElementExistException_t, + ElementExistException_t, RuntimeException_t ) { T t; @@ -262,7 +262,7 @@ public: // XContainer - virtual void SAL_CALL addContainerListener( + virtual void SAL_CALL addContainerListener( const XContainerListener_t& xListener ) throw( RuntimeException_t ) { @@ -277,7 +277,7 @@ public: throw( RuntimeException_t ) { OSL_ENSURE( xListener.is(), "need listener!" ); - Listeners_t::iterator aIter = + Listeners_t::iterator aIter = std::find( maListeners.begin(), maListeners.end(), xListener ); if( aIter != maListeners.end() ) maListeners.erase( aIter ); @@ -289,7 +289,7 @@ protected: void _elementInserted( sal_Int32 nPos ) { OSL_ENSURE( isValidIndex(nPos), "invalid index" ); - com::sun::star::container::ContainerEvent aEvent( + com::sun::star::container::ContainerEvent aEvent( static_cast<com::sun::star::container::XIndexReplace*>( this ), com::sun::star::uno::makeAny( nPos ), com::sun::star::uno::makeAny( getItem( nPos ) ), @@ -304,7 +304,7 @@ protected: void _elementRemoved( const T& aOld ) { - com::sun::star::container::ContainerEvent aEvent( + com::sun::star::container::ContainerEvent aEvent( static_cast<com::sun::star::container::XIndexReplace*>( this ), com::sun::star::uno::Any(), com::sun::star::uno::makeAny( aOld ), @@ -320,7 +320,7 @@ protected: void _elementReplaced( const sal_Int32 nPos, const T& aNew ) { OSL_ENSURE( isValidIndex(nPos), "invalid index" ); - com::sun::star::container::ContainerEvent aEvent( + com::sun::star::container::ContainerEvent aEvent( static_cast<com::sun::star::container::XIndexReplace*>( this ), com::sun::star::uno::makeAny( nPos ), com::sun::star::uno::makeAny( getItem( nPos ) ), diff --git a/forms/source/xforms/computedexpression.cxx b/forms/source/xforms/computedexpression.cxx index cb8cb9e99ab7..ad9421ab4f7f 100644 --- a/forms/source/xforms/computedexpression.cxx +++ b/forms/source/xforms/computedexpression.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -72,7 +72,7 @@ using com::sun::star::util::SearchAlgorithms_REGEXP; namespace xforms { -ComputedExpression::ComputedExpression() +ComputedExpression::ComputedExpression() : msExpression(), mbIsEmpty( true ), mbIsSimple( true ), @@ -109,8 +109,8 @@ bool ComputedExpression::_checkExpression( const sal_Char* pExpression ) const aSearchOptions.algorithmType = SearchAlgorithms_REGEXP; aSearchOptions.searchString = String( pExpression, RTL_TEXTENCODING_ASCII_US ); utl::TextSearch aTextSearch( aSearchOptions ); - - xub_StrLen nLength = + + xub_StrLen nLength = static_cast<xub_StrLen>( msExpression.getLength() ); xub_StrLen nStart = 0; xub_StrLen nEnd = nLength; @@ -118,7 +118,7 @@ bool ComputedExpression::_checkExpression( const sal_Char* pExpression ) const // our expression is static only if 1) we found our regexp, and 2) // the regexp goes from beginning to end. - return ( nLength == 0 || nSearch != 0 ) + return ( nLength == 0 || nSearch != 0 ) && ( nStart == 0 && nEnd == nLength ); } @@ -141,7 +141,7 @@ const OUString ComputedExpression::_getExpressionForEvaluation() const return msExpression; } -bool ComputedExpression::_evaluate( +bool ComputedExpression::_evaluate( const xforms::EvaluationContext& rContext, const OUString& sExpression ) { @@ -151,7 +151,7 @@ bool ComputedExpression::_evaluate( mxResult.clear(); try { - mxResult = _getXPathAPI(rContext)->eval( rContext.mxContextNode, + mxResult = _getXPathAPI(rContext)->eval( rContext.mxContextNode, sExpression ); } catch( const Exception& ) @@ -168,14 +168,14 @@ bool ComputedExpression::evaluate( const EvaluationContext& rContext ) // an older result); neither for empty expressions if( mbIsEmpty || (mxResult.is() && mbIsSimple) ) return true; - + return _evaluate( rContext, _getExpressionForEvaluation() ); } bool ComputedExpression::hasValue() const { - return mxResult.is() && + return mxResult.is() && mxResult->getObjectType() != XPathObjectType_XPATH_UNDEFINED; } @@ -205,8 +205,8 @@ bool ComputedExpression::getBool( bool bDefault ) const Reference<XXPathAPI> ComputedExpression::_getXPathAPI(const xforms::EvaluationContext& aContext) { // create XPath API, then register namespaces - Reference<XXPathAPI> xXPath( createInstance( - OUSTRING( "com.sun.star.xml.xpath.XPathAPI" ) ), + Reference<XXPathAPI> xXPath( createInstance( + OUSTRING( "com.sun.star.xml.xpath.XPathAPI" ) ), UNO_QUERY_THROW ); OSL_ENSURE( xXPath.is(), "cannot get XPath API" ); @@ -220,8 +220,8 @@ Reference<XXPathAPI> ComputedExpression::_getXPathAPI(const xforms::EvaluationCo aValue.Value <<= aContext.mxContextNode; aSequence[1] <<= aValue; Reference<XMultiServiceFactory> aFactory = comphelper::getProcessServiceFactory(); - Reference< XXPathExtension > aExtension( aFactory->createInstanceWithArguments( - OUSTRING( "com.sun.star.comp.xml.xpath.XFormsExtension"), aSequence), UNO_QUERY_THROW); + Reference< XXPathExtension > aExtension( aFactory->createInstanceWithArguments( + OUSTRING( "com.sun.star.comp.xml.xpath.XFormsExtension"), aSequence), UNO_QUERY_THROW); xXPath->registerExtensionInstance(aExtension); // register namespaces diff --git a/forms/source/xforms/computedexpression.hxx b/forms/source/xforms/computedexpression.hxx index 316571d906ba..8d1ef01ab5a1 100644 --- a/forms/source/xforms/computedexpression.hxx +++ b/forms/source/xforms/computedexpression.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,7 +36,7 @@ // forward declaractions namespace com { namespace sun { namespace star -{ +{ namespace xml { namespace dom { class XNode; } diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx index 4e7ecbab2561..1f391631bd08 100644 --- a/forms/source/xforms/convert.cxx +++ b/forms/source/xforms/convert.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -222,18 +222,18 @@ namespace // ------------------------------------------------------------------------ Any lcl_toAny_bool( const OUString& rStr ) - { + { bool b = ( rStr == OUSTRING("true") || rStr == OUSTRING("1") ); return makeAny( b ); } // ------------------------------------------------------------------------ OUString lcl_toXSD_double( const Any& rAny ) - { + { double f = 0.0; rAny >>= f; - return rtl::math::isFinite( f ) + return rtl::math::isFinite( f ) ? rtl::math::doubleToUString( f, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, '.', sal_True ) @@ -242,9 +242,9 @@ namespace // ------------------------------------------------------------------------ Any lcl_toAny_double( const OUString& rString ) - { + { rtl_math_ConversionStatus eStatus; - double f = rtl::math::stringToDouble( + double f = rtl::math::stringToDouble( rString, sal_Unicode('.'), sal_Unicode(','), &eStatus, NULL ); return ( eStatus == rtl_math_ConversionStatus_Ok ) ? makeAny( f ) : Any(); } @@ -549,7 +549,7 @@ rtl::OUString Convert::toXSD( const Any_t& rAny ) return aIter != maMap.end() ? aIter->second.first( rAny ) : OUString(); } -Convert::Any_t Convert::toAny( const rtl::OUString& rValue, +Convert::Any_t Convert::toAny( const rtl::OUString& rValue, const Type_t& rType ) { Map_t::iterator aIter = maMap.find( rType ); diff --git a/forms/source/xforms/convert.hxx b/forms/source/xforms/convert.hxx index 684ba4311af8..86c624d5811c 100644 --- a/forms/source/xforms/convert.hxx +++ b/forms/source/xforms/convert.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx index a4bce7e66db3..a5c5f8b51281 100644 --- a/forms/source/xforms/datatyperepository.cxx +++ b/forms/source/xforms/datatyperepository.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/datatyperepository.hxx b/forms/source/xforms/datatyperepository.hxx index e2f61cdaaf35..07e09d3cc06e 100644 --- a/forms/source/xforms/datatyperepository.hxx +++ b/forms/source/xforms/datatyperepository.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index d9278a4a0860..ce88648dbc05 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -213,7 +213,7 @@ namespace xforms static void lcl_initializePatternMatcher( ::std::auto_ptr< RegexMatcher >& _rpMatcher, const ::rtl::OUString& _rPattern ) { UErrorCode nMatchStatus = U_ZERO_ERROR; - UnicodeString aIcuPattern( reinterpret_cast<const UChar *>(_rPattern.getStr()), _rPattern.getLength() ); // UChar != sal_Unicode in MinGW + UnicodeString aIcuPattern( reinterpret_cast<const UChar *>(_rPattern.getStr()), _rPattern.getLength() ); // UChar != sal_Unicode in MinGW _rpMatcher.reset( new RegexMatcher( aIcuPattern, 0, nMatchStatus ) ); OSL_ENSURE( U_SUCCESS( nMatchStatus ), "lcl_initializePatternMatcher: invalid pattern property!" ); // if asserts, then something changed our pattern without going to convertFastPropertyValue/checkPropertySanity @@ -222,7 +222,7 @@ namespace xforms static bool lcl_matchString( RegexMatcher& _rMatcher, const ::rtl::OUString& _rText ) { UErrorCode nMatchStatus = U_ZERO_ERROR; - UnicodeString aInput( reinterpret_cast<const UChar *>(_rText.getStr()), _rText.getLength() ); // UChar != sal_Unicode in MinGW + UnicodeString aInput( reinterpret_cast<const UChar *>(_rText.getStr()), _rText.getLength() ); // UChar != sal_Unicode in MinGW _rMatcher.reset( aInput ); if ( _rMatcher.matches( nMatchStatus ) ) { @@ -296,7 +296,7 @@ namespace xforms ::rtl::OUString sPattern; OSL_VERIFY( _rNewValue >>= sPattern ); - UnicodeString aIcuPattern( reinterpret_cast<const UChar *>(sPattern.getStr()), sPattern.getLength() ); // UChar != sal_Unicode in MinGW + UnicodeString aIcuPattern( reinterpret_cast<const UChar *>(sPattern.getStr()), sPattern.getLength() ); // UChar != sal_Unicode in MinGW UErrorCode nMatchStatus = U_ZERO_ERROR; RegexMatcher aMatcher( aIcuPattern, 0, nMatchStatus ); if ( U_FAILURE( nMatchStatus ) ) @@ -770,7 +770,7 @@ namespace xforms } //==================================================================== - //= + //= //==================================================================== #define DEFAULT_IMPLEMNENT_SUBTYPE( classname, typeclass ) \ classname::classname( const ::rtl::OUString& _rName ) \ diff --git a/forms/source/xforms/datatypes.hxx b/forms/source/xforms/datatypes.hxx index 83ac51b551f4..f38484127240 100644 --- a/forms/source/xforms/datatypes.hxx +++ b/forms/source/xforms/datatypes.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -353,7 +353,7 @@ namespace xforms }; //==================================================================== - //= + //= //==================================================================== #define DEFAULT_DECLARE_SUBTYPE( classname, valuetype ) \ class classname; \ diff --git a/forms/source/xforms/datatypes_impl.hxx b/forms/source/xforms/datatypes_impl.hxx index cc0b2c5b3b35..4ebd822a203c 100644 --- a/forms/source/xforms/datatypes_impl.hxx +++ b/forms/source/xforms/datatypes_impl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/enumeration.cxx b/forms/source/xforms/enumeration.cxx index 82a9118f7e66..8187d5d0fc2e 100644 --- a/forms/source/xforms/enumeration.cxx +++ b/forms/source/xforms/enumeration.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/enumeration.hxx b/forms/source/xforms/enumeration.hxx index 395f29dd4845..c2b08db42d85 100644 --- a/forms/source/xforms/enumeration.hxx +++ b/forms/source/xforms/enumeration.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ namespace com { namespace sun { namespace star { } } } /** implement XEnumeration based on container::XIndexAccess */ -class Enumeration +class Enumeration : public cppu::WeakImplHelper1<com::sun::star::container::XEnumeration> { com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> mxContainer; diff --git a/forms/source/xforms/evaluationcontext.hxx b/forms/source/xforms/evaluationcontext.hxx index a5f8b32d5df3..9cbfea858ec1 100644 --- a/forms/source/xforms/evaluationcontext.hxx +++ b/forms/source/xforms/evaluationcontext.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ public: mnContextSize( 0 ) { } - EvaluationContext( + EvaluationContext( const com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode>& xContextNode, const com::sun::star::uno::Reference<com::sun::star::xforms::XModel>& xModel, const com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>& xNamespaces, diff --git a/forms/source/xforms/mip.cxx b/forms/source/xforms/mip.cxx index a8bcda632d34..0a645d3b7f1e 100644 --- a/forms/source/xforms/mip.cxx +++ b/forms/source/xforms/mip.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ namespace xforms MIP::MIP() -{ +{ resetReadonly(); resetRequired(); resetRelevant(); diff --git a/forms/source/xforms/mip.hxx b/forms/source/xforms/mip.hxx index ad0db3e05916..3ce4d1c505e1 100644 --- a/forms/source/xforms/mip.hxx +++ b/forms/source/xforms/mip.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -106,8 +106,8 @@ public: rtl::OUString getConstraintExplanation() const; // - calculate (computed XPath; default: has none (false)) - // (for calculate, we only store whether a calculate MIP is present; - // the actual calculate value is handled my changing the instance + // (for calculate, we only store whether a calculate MIP is present; + // the actual calculate value is handled my changing the instance // directly) bool hasCalculate() const; void setHasCalculate( bool ); diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index f7939cff3baf..5c9bf8a4bf97 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -576,8 +576,8 @@ void Model::refresh() void SAL_CALL Model::submitWithInteraction( const rtl::OUString& sID, const XInteractionHandler_t& _rxHandler ) - throw( VetoException, - WrappedTargetException, + throw( VetoException, + WrappedTargetException, RuntimeException ) { DBG_INVARIANT(); diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index 03db8210f388..b6987661940f 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/model_helper.hxx b/forms/source/xforms/model_helper.hxx index 064d60f3ab71..d010296c47be 100644 --- a/forms/source/xforms/model_helper.hxx +++ b/forms/source/xforms/model_helper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -148,7 +148,7 @@ sal_Int32 lcl_findInstance( const InstanceCollection*, // get values from Sequence<PropertyValue> describing an Instance -void getInstanceData( +void getInstanceData( const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, rtl::OUString* pID, com::sun::star::uno::Reference<com::sun::star::xml::dom::XDocument>*, @@ -156,7 +156,7 @@ void getInstanceData( bool* pURLOnce ); // set values on Sequence<PropertyValue> for an Instance -void setInstanceData( +void setInstanceData( com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, const rtl::OUString* pID, const com::sun::star::uno::Reference<com::sun::star::xml::dom::XDocument>*, diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index 244e1443e6cb..ddcd7cc23d1e 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -186,14 +186,14 @@ void lcl_OutInstance( OUStringBuffer& rBuffer, Model* pModel ) { Reference<XDocument> xDoc = xNode->getOwnerDocument(); - + if( xDoc != pModel->getDefaultInstance() ) { rBuffer.insert( 0, OUSTRING("')") ); // iterate over instances, and find the right one OUString sInstanceName; - Reference<XEnumeration> xEnum = + Reference<XEnumeration> xEnum = pModel->getInstances()->createEnumeration(); while( ( sInstanceName.getLength() == 0 ) && xEnum->hasMoreElements() ) { @@ -370,7 +370,7 @@ OUString Model::getBindingName( const XPropertySet_t& xBinding, xBinding->getPropertyValue( OUSTRING("BindingID" ) ) >>= sID; OUString sExpression; xBinding->getPropertyValue( OUSTRING("BindingExpression" ) ) >>= sExpression; - + OUStringBuffer aBuffer; if( sID.getLength() > 0 ) { @@ -431,7 +431,7 @@ Model::XDocument_t Model::newInstance( const rtl::OUString& sName, XDocument_t xInstance = getDocumentBuilder()->newDocument(); DBG_ASSERT( xInstance.is(), "failed to create DOM instance" ); - Reference<XNode>( xInstance, UNO_QUERY_THROW )->appendChild( + Reference<XNode>( xInstance, UNO_QUERY_THROW )->appendChild( Reference<XNode>( xInstance->createElement( OUSTRING("instanceData") ), UNO_QUERY_THROW ) ); @@ -521,7 +521,7 @@ void Model::removeInstance( const rtl::OUString& sName ) mpInstances->removeItem( mpInstances->getItem( nPos ) ); } -Reference<XNameContainer> lcl_getModels( +Reference<XNameContainer> lcl_getModels( const Reference<com::sun::star::frame::XModel>& xComponent ) { Reference<XNameContainer> xRet; @@ -560,7 +560,7 @@ void Model::renameModel( const Reference<com::sun::star::frame::XModel>& xCmp, throw( RuntimeException ) { Reference<XNameContainer> xModels = lcl_getModels( xCmp ); - if( xModels.is() + if( xModels.is() && xModels->hasByName( sFrom ) && ! xModels->hasByName( sTo ) ) { @@ -576,7 +576,7 @@ void Model::removeModel( const Reference<com::sun::star::frame::XModel>& xCmp, throw( RuntimeException ) { Reference<XNameContainer> xModels = lcl_getModels( xCmp ); - if( xModels.is() + if( xModels.is() && xModels->hasByName( sName ) ) { xModels->removeByName( sName ); @@ -588,11 +588,11 @@ Model::XNode_t Model::createElement( const XNode_t& xParent, throw( RuntimeException ) { Reference<XNode> xNode; - if( xParent.is() + if( xParent.is() && isValidXMLName( sName ) ) { // TODO: implement proper namespace handling - xNode.set( xParent->getOwnerDocument()->createElement( sName ), + xNode.set( xParent->getOwnerDocument()->createElement( sName ), UNO_QUERY ); } return xNode; @@ -604,7 +604,7 @@ Model::XNode_t Model::createAttribute( const XNode_t& xParent, { Reference<XNode> xNode; Reference<XElement> xElement( xParent, UNO_QUERY ); - if( xParent.is() + if( xParent.is() && xElement.is() && isValidXMLName( sName ) ) { @@ -639,7 +639,7 @@ Model::XNode_t Model::renameNode( const XNode_t& xNode, return xNode; // note old binding expression so we can adjust bindings below - OUString sOldDefaultBindingExpression = + OUString sOldDefaultBindingExpression = getDefaultBindingExpressionForNode( xNode ); Reference<XDocument> xDoc = xNode->getOwnerDocument(); @@ -691,14 +691,14 @@ Model::XNode_t Model::renameNode( const XNode_t& xNode, if( xNew.is() ) { // iterate over bindings and replace default expressions - OUString sNewDefaultBindingExpression = + OUString sNewDefaultBindingExpression = getDefaultBindingExpressionForNode( xNew ); for( sal_Int32 n = 0; n < mpBindings->countItems(); n++ ) { Binding* pBinding = Binding::getBinding( mpBindings->Collection<XPropertySet_t>::getItem( n ) ); - if( pBinding->getBindingExpression() + if( pBinding->getBindingExpression() == sOldDefaultBindingExpression ) pBinding->setBindingExpression( sNewDefaultBindingExpression ); } @@ -757,7 +757,7 @@ Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode, if( bCreate && pBestBinding == NULL ) { pBestBinding = new Binding(); - pBestBinding->setBindingExpression( + pBestBinding->setBindingExpression( getDefaultBindingExpressionForNode( xNode ) ); mpBindings->addItem( pBestBinding ); } @@ -812,7 +812,7 @@ OUString lcl_serializeForDisplay( const Reference<XNodeList>& xNodes ) for( sal_Int32 i = 0; i < nLength; i++ ) { Reference<XNode> xCurrent = xNodes->item( i ); - + switch ( xCurrent->getNodeType() ) { case NodeType_DOCUMENT_NODE: @@ -842,14 +842,14 @@ OUString lcl_serializeForDisplay( const Reference<XNodeList>& xNodes ) if ( nAttributeNodes ) // had only attribute nodes return sResult; - + // serialize fragment CSerializationAppXML aSerialization; aSerialization.setSource( xFragment ); aSerialization.serialize(); // copy stream into buffer - Reference<XTextInputStream> xTextInputStream( + Reference<XTextInputStream> xTextInputStream( createInstance( OUSTRING("com.sun.star.io.TextInputStream") ), UNO_QUERY ); Reference<XActiveDataSink>( xTextInputStream, UNO_QUERY_THROW ) @@ -927,7 +927,7 @@ OUString lcl_serializeForDisplay( const Reference<XXPathObject>& xResult ) return aBuffer.makeStringAndClear(); } -OUString Model::getResultForExpression( +OUString Model::getResultForExpression( const XPropertySet_t& xBinding, sal_Bool bIsBindingExpression, const OUString& sExpression ) @@ -950,7 +950,7 @@ OUString Model::getResultForExpression( else { // MIP (not binding): iterate over bindings contexts - std::vector<EvaluationContext> aContext = + std::vector<EvaluationContext> aContext = pBinding->getMIPEvaluationContexts(); for( std::vector<EvaluationContext>::iterator aIter = aContext.begin(); aIter != aContext.end(); @@ -976,7 +976,7 @@ sal_Bool Model::isValidPrefixName( const OUString& sName ) return ::isValidPrefixName( sName, NULL ); } -void Model::setNodeValue( +void Model::setNodeValue( const XNode_t& xNode, const rtl::OUString& sValue ) throw( RuntimeException ) @@ -989,7 +989,7 @@ void Model::setNodeValue( // helper functions from model_helper.hxx // -void xforms::getInstanceData( +void xforms::getInstanceData( const Sequence<PropertyValue>& aValues, OUString* pID, Reference<XDocument>* pInstance, @@ -1013,7 +1013,7 @@ void xforms::getInstanceData( } } -void xforms::setInstanceData( +void xforms::setInstanceData( Sequence<PropertyValue>& aSequence, const OUString* _pID, const Reference<XDocument>* _pInstance, diff --git a/forms/source/xforms/namedcollection.hxx b/forms/source/xforms/namedcollection.hxx index 2b06343c4a40..cba79e2f053e 100644 --- a/forms/source/xforms/namedcollection.hxx +++ b/forms/source/xforms/namedcollection.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -100,7 +100,7 @@ protected: public: // XElementAccess - virtual typename Collection<T>::Type_t SAL_CALL getElementType() + virtual typename Collection<T>::Type_t SAL_CALL getElementType() throw( typename Collection<T>::RuntimeException_t ) { return Collection<T>::getElementType(); @@ -116,14 +116,14 @@ public: virtual typename Collection<T>::Any_t SAL_CALL getByName( const rtl::OUString& aName ) throw( typename Collection<T>::NoSuchElementException_t, - typename Collection<T>::WrappedTargetException_t, + typename Collection<T>::WrappedTargetException_t, typename Collection<T>::RuntimeException_t ) { if( hasItem( aName ) ) return com::sun::star::uno::makeAny( getItem( aName ) ); else throw typename Collection<T>::NoSuchElementException_t(); - + } virtual Names_t SAL_CALL getElementNames() diff --git a/forms/source/xforms/pathexpression.cxx b/forms/source/xforms/pathexpression.cxx index 6494059f56bb..8115aa1abed2 100644 --- a/forms/source/xforms/pathexpression.cxx +++ b/forms/source/xforms/pathexpression.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -73,7 +73,7 @@ using namespace std; namespace xforms { -PathExpression::PathExpression() +PathExpression::PathExpression() : ComputedExpression(), maNodes() { @@ -94,7 +94,7 @@ void PathExpression::setExpression( const OUString& rExpression ) // whether it contains only 'simple' (i.e. static) conditions. For // now, we check whether it only contains number positions. // (TODO: Only works for names containing only ASCII letters+digits.) - mbIsSimple = + mbIsSimple = _checkExpression( "( */@?[a-zA-Z0-9:]+( *\\[ *[0-9 ]+ *\\] *)?)+" ); maNodes.clear(); diff --git a/forms/source/xforms/pathexpression.hxx b/forms/source/xforms/pathexpression.hxx index a6d89186e9ff..72363edcd1e0 100644 --- a/forms/source/xforms/pathexpression.hxx +++ b/forms/source/xforms/pathexpression.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,10 +38,10 @@ // forward declaractions namespace com { namespace sun { namespace star -{ - namespace xml { namespace dom +{ + namespace xml { namespace dom { - class XNodeList; + class XNodeList; namespace events { class XEventListener; } } } } } } diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx index dd2c3f139098..aba016dac286 100644 --- a/forms/source/xforms/propertysetbase.cxx +++ b/forms/source/xforms/propertysetbase.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/propertysetbase.hxx b/forms/source/xforms/propertysetbase.hxx index 27556b1381f8..62987dea20b2 100644 --- a/forms/source/xforms/propertysetbase.hxx +++ b/forms/source/xforms/propertysetbase.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -251,7 +251,7 @@ protected: void notifyAndCachePropertyValue( sal_Int32 nHandle ); /** initializes the property value cache for the given property, with its current value - + Usually used to initialize the cache with values which are different from default constructed values. Say you have a boolean property whose initial state is <TRUE/>. Say you call <member>notifyAndCachePropertyValue</member> the first time: it will @@ -339,7 +339,7 @@ public: /** constructs a PropertyChangeNotifier @param rPropertySet the property set implementation whose property is going to be changed. Note - that this property set implementation must live at least as long as the + that this property set implementation must live at least as long as the PropertyChangeNotifier instance does. @param nHandle the handle of the property which is going to be changed. Must be a valid property diff --git a/forms/source/xforms/resourcehelper.cxx b/forms/source/xforms/resourcehelper.cxx index 1fec9f3502d0..412e528527b6 100644 --- a/forms/source/xforms/resourcehelper.cxx +++ b/forms/source/xforms/resourcehelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/resourcehelper.hxx b/forms/source/xforms/resourcehelper.hxx index 0b429cd0eeb7..a392a6e3eb6c 100644 --- a/forms/source/xforms/resourcehelper.hxx +++ b/forms/source/xforms/resourcehelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index deafc88cb5e9..828846c47276 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -348,7 +348,7 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler ) Reference< XDocument > aInstanceDoc = getInstanceDocument(xResult); aResult = xSubmission->replace(getReplace(), aInstanceDoc, Reference< XFrame >()); } - + return ( aResult == CSubmission::SUCCESS ); } @@ -501,10 +501,10 @@ OUString lcl_message( const OUString& rID, const OUString& rText ) return aMessage.makeStringAndClear(); } -void SAL_CALL Submission::submitWithInteraction( - const Reference<XInteractionHandler>& _rxHandler ) - throw ( VetoException, - WrappedTargetException, +void SAL_CALL Submission::submitWithInteraction( + const Reference<XInteractionHandler>& _rxHandler ) + throw ( VetoException, + WrappedTargetException, RuntimeException ) { // as long as this class is not really threadsafe, we need to copy @@ -526,14 +526,14 @@ void SAL_CALL Submission::submitWithInteraction( bool bValid = pModel->isValid(); if( ! bValid ) { - InvalidDataOnSubmitException aInvalidDataException( + InvalidDataOnSubmitException aInvalidDataException( lcl_message(sID, OUSTRING(" due to invalid data") ), *this ); if( _rxHandler.is() ) { // labouriously create interaction request - comphelper::OInteractionRequest* pRequest - = new comphelper::OInteractionRequest( + comphelper::OInteractionRequest* pRequest + = new comphelper::OInteractionRequest( makeAny( aInvalidDataException ) ); Reference<XInteractionRequest> xRequest = pRequest; @@ -577,7 +577,7 @@ void SAL_CALL Submission::submitWithInteraction( catch( const Exception& e ) { // exception caught: re-throw as wrapped target exception - throw WrappedTargetException( + throw WrappedTargetException( lcl_message( sID, OUSTRING(" due to exception being thrown") ), *this, makeAny( e ) ); } @@ -586,10 +586,10 @@ void SAL_CALL Submission::submitWithInteraction( { mxModel->rebuild(); } - else + else { // other failure: throw wrapped target exception, too. - throw WrappedTargetException( + throw WrappedTargetException( lcl_message( sID, OUString() ), *this, Any() ); } } @@ -658,7 +658,7 @@ Reference< XDocument > Submission::getInstanceDocument(const Reference< XXPathOb if (aList->getLength() > 0) aDocument = aList->item(0)->getOwnerDocument(); } - return aDocument; + return aDocument; } Reference< XDocumentFragment > Submission::createSubmissionDocument(const Reference< XXPathObject >& aObj, sal_Bool bRemoveWSNodes) diff --git a/forms/source/xforms/submission.hxx b/forms/source/xforms/submission.hxx index b0c377844cb1..3077a946a062 100644 --- a/forms/source/xforms/submission.hxx +++ b/forms/source/xforms/submission.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -102,7 +102,7 @@ private: com::sun::star::uno::Reference< com::sun::star::xml::dom::XDocumentFragment > createSubmissionDocument(const com::sun::star::uno::Reference< com::sun::star::xml::xpath::XXPathObject >& aObject, sal_Bool bRemoveWSNodes = sal_False); - com::sun::star::uno::Reference< com::sun::star::xml::dom::XDocument > + com::sun::star::uno::Reference< com::sun::star::xml::dom::XDocument > getInstanceDocument(const com::sun::star::uno::Reference< com::sun::star::xml::xpath::XXPathObject >& aObject); com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory > m_aFactory; diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx index da5968bc0123..3523059050af 100644 --- a/forms/source/xforms/submission/replace.cxx +++ b/forms/source/xforms/submission/replace.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/submission/serialization.hxx b/forms/source/xforms/submission/serialization.hxx index 966a3f9e0ae8..c1daa6edaba8 100644 --- a/forms/source/xforms/submission/serialization.hxx +++ b/forms/source/xforms/submission/serialization.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,7 +70,7 @@ public: that control aspects of the serialization eachs serialization may support individual properties */ - void setProperties(const CSS::uno::Sequence< CSS::beans::NamedValue >& props) + void setProperties(const CSS::uno::Sequence< CSS::beans::NamedValue >& props) { m_properties.clear(); rtl::OUString aValue; @@ -88,7 +88,7 @@ public: /** get the serialized bytes. - reads up to buffer->getLength() bytes and returns the number of + reads up to buffer->getLength() bytes and returns the number of bytes read. returns -1 on error */ diff --git a/forms/source/xforms/submission/serialization_app_xml.cxx b/forms/source/xforms/submission/serialization_app_xml.cxx index 76989ad7fdfb..2e90215c8642 100644 --- a/forms/source/xforms/submission/serialization_app_xml.cxx +++ b/forms/source/xforms/submission/serialization_app_xml.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,13 +44,13 @@ CSerializationAppXML::CSerializationAppXML() : m_aFactory(utl::getProcessServiceFactory()) - , m_aPipe(CSS::uno::Reference< CSS::io::XOutputStream > (m_aFactory->createInstance( + , m_aPipe(CSS::uno::Reference< CSS::io::XOutputStream > (m_aFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), CSS::uno::UNO_QUERY)) { OSL_ENSURE(m_aPipe.is(), "cannot create Pipe"); } -CSS::uno::Reference< CSS::io::XInputStream > +CSS::uno::Reference< CSS::io::XInputStream > CSerializationAppXML::getInputStream() { // The pipes output is provided through it's @@ -58,7 +58,7 @@ CSerializationAppXML::getInputStream() return CSS::uno::Reference< CSS::io::XInputStream >(m_aPipe, CSS::uno::UNO_QUERY); } -void +void CSerializationAppXML::serialize_node(const CSS::uno::Reference< CSS::xml::dom::XNode >& rNode) { CSS::uno::Reference< CSS::xml::dom::XNode > aNode = rNode; @@ -66,13 +66,13 @@ CSerializationAppXML::serialize_node(const CSS::uno::Reference< CSS::xml::dom::X { CSS::uno::Reference< CSS::xml::dom::XDocument > aDoc(rNode, CSS::uno::UNO_QUERY_THROW); aNode = CSS::uno::Reference< CSS::xml::dom::XNode >(aDoc->getDocumentElement(), CSS::uno::UNO_QUERY_THROW); - } + } if (aNode->getNodeType() != CSS::xml::dom::NodeType_ELEMENT_NODE) return; // clone the node to a new document and serialize that document CSS::uno::Reference< CSS::lang::XUnoTunnel > aTunnel(aNode, CSS::uno::UNO_QUERY); - if (aTunnel.is()) + if (aTunnel.is()) { xmlNodePtr aNodePtr = reinterpret_cast< xmlNodePtr >( aTunnel->getSomething(CSS::uno::Sequence< sal_Int8 >()) ); xmlDocPtr aDocPtr = xmlNewDoc((xmlChar*)"1.0"); @@ -82,9 +82,9 @@ CSerializationAppXML::serialize_node(const CSS::uno::Reference< CSS::xml::dom::X xmlChar *buffer = NULL; sal_Int32 size = 0; xmlDocDumpMemory(aDocPtr, &buffer, (int*)&size); - + // write the xml into the pipe through it's XOutputStream interface - m_aPipe->writeBytes(CSS::uno::Sequence< sal_Int8 >((sal_Int8*)buffer, size)); + m_aPipe->writeBytes(CSS::uno::Sequence< sal_Int8 >((sal_Int8*)buffer, size)); xmlFree(buffer); } @@ -109,7 +109,7 @@ CSerializationAppXML::serialize_nodeset() void CSerializationAppXML::serialize() -{ +{ if (!m_aFragment.is()) return; CSS::uno::Reference< CSS::xml::dom::XNode > cur = m_aFragment->getFirstChild(); diff --git a/forms/source/xforms/submission/serialization_app_xml.hxx b/forms/source/xforms/submission/serialization_app_xml.hxx index 9564961bbbc9..406d5aa597df 100644 --- a/forms/source/xforms/submission/serialization_app_xml.hxx +++ b/forms/source/xforms/submission/serialization_app_xml.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ private: void serialize_node(const CSS::uno::Reference< CSS::xml::dom::XNode >& aNode); void serialize_nodeset(); - + public: CSerializationAppXML(); diff --git a/forms/source/xforms/submission/serialization_urlencoded.cxx b/forms/source/xforms/submission/serialization_urlencoded.cxx index cb6403c8d13e..9220e9c76a39 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.cxx +++ b/forms/source/xforms/submission/serialization_urlencoded.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/submission/serialization_urlencoded.hxx b/forms/source/xforms/submission/serialization_urlencoded.hxx index a5e9a4eb1060..b3501762a96d 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.hxx +++ b/forms/source/xforms/submission/serialization_urlencoded.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx index d01fb8fb0aba..098db603f935 100644 --- a/forms/source/xforms/submission/submission.hxx +++ b/forms/source/xforms/submission/submission.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -115,7 +115,7 @@ public: } }; -class CSubmission +class CSubmission { protected: diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index 95d1ce3ce2be..8fb5e39a2cc6 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,12 +52,12 @@ using namespace std; CSubmissionGet::CSubmissionGet(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment) - : CSubmission(aURL, aFragment) + : CSubmission(aURL, aFragment) { } CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference< CSS::task::XInteractionHandler >& aInteractionHandler) -{ +{ // GET always uses apllicatin/x-www-formurlencoded auto_ptr< CSerialization > apSerialization(new CSerializationURLEncoded()); apSerialization->setSource(m_aFragment); @@ -84,7 +84,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference< OStringBuffer aUTF8QueryURL(OUStringToOString(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), RTL_TEXTENCODING_UTF8)); OStringBuffer aQueryString; - + const sal_Int32 size = 1024; sal_Int32 n = 0; Sequence< sal_Int8 > aByteBuffer(size); diff --git a/forms/source/xforms/submission/submission_get.hxx b/forms/source/xforms/submission/submission_get.hxx index a9dfbbf3e0b6..73d32e07468a 100644 --- a/forms/source/xforms/submission/submission_get.hxx +++ b/forms/source/xforms/submission/submission_get.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx index fc2fde7d3668..20b00c879822 100644 --- a/forms/source/xforms/submission/submission_post.cxx +++ b/forms/source/xforms/submission/submission_post.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,12 +52,12 @@ using namespace std; CSubmissionPost::CSubmissionPost(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment) - : CSubmission(aURL, aFragment) + : CSubmission(aURL, aFragment) { } CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference< CSS::task::XInteractionHandler >& aInteractionHandler) -{ +{ // PUT always uses application/xml CSS::uno::Reference< XCommandEnvironment > aEnvironment; auto_ptr< CSerialization > apSerialization(createSerialization(aInteractionHandler,aEnvironment)); @@ -66,7 +66,7 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference< ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), aEnvironment); // use post command - + OUString aCommandName = OUString::createFromAscii("post"); PostCommandArgument2 aPostArgument; aPostArgument.Source = apSerialization->getInputStream(); @@ -88,7 +88,7 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference< // xOut->closeOutput(); try { - // m_aResultStream = CSS::uno::Reference< XInputStream >(aSink, UNO_QUERY_THROW); + // m_aResultStream = CSS::uno::Reference< XInputStream >(aSink, UNO_QUERY_THROW); m_aResultStream = aSink->getInputStream(); } catch (Exception&) { OSL_ENSURE(sal_False, "Cannot open reply stream from content"); @@ -99,7 +99,7 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference< OSL_ENSURE(sal_False, "Exception during UCB operatration."); return UNKNOWN_ERROR; } - + return SUCCESS; } diff --git a/forms/source/xforms/submission/submission_post.hxx b/forms/source/xforms/submission/submission_post.hxx index 86f040f951de..542e1252187f 100644 --- a/forms/source/xforms/submission/submission_post.hxx +++ b/forms/source/xforms/submission/submission_post.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/submission/submission_put.cxx b/forms/source/xforms/submission/submission_put.cxx index a9f9681014be..573bcabd5afb 100644 --- a/forms/source/xforms/submission/submission_put.cxx +++ b/forms/source/xforms/submission/submission_put.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,12 +50,12 @@ using namespace std; CSubmissionPut::CSubmissionPut(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment) - : CSubmission(aURL, aFragment) + : CSubmission(aURL, aFragment) { } CSubmission::SubmissionResult CSubmissionPut::submit(const CSS::uno::Reference< CSS::task::XInteractionHandler >& aInteractionHandler) -{ +{ CSS::uno::Reference< XCommandEnvironment > aEnvironment; auto_ptr< CSerialization > apSerialization(createSerialization(aInteractionHandler,aEnvironment)); @@ -66,7 +66,7 @@ CSubmission::SubmissionResult CSubmissionPut::submit(const CSS::uno::Reference< CSS::uno::Reference< XInputStream > aInStream = apSerialization->getInputStream(); aContent.writeStream(aInStream, sal_True); //aContent.closeStream(); - + // no content as a result of put... } catch (Exception&) @@ -75,7 +75,7 @@ CSubmission::SubmissionResult CSubmissionPut::submit(const CSS::uno::Reference< OSL_ENSURE(sal_False, "Exception during UCB operatration."); return UNKNOWN_ERROR; } - + return SUCCESS; } diff --git a/forms/source/xforms/submission/submission_put.hxx b/forms/source/xforms/submission/submission_put.hxx index acdb15e490c8..61d5a24369be 100644 --- a/forms/source/xforms/submission/submission_put.hxx +++ b/forms/source/xforms/submission/submission_put.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/unohelper.cxx b/forms/source/xforms/unohelper.cxx index 475f366401a6..b6d16a30c417 100644 --- a/forms/source/xforms/unohelper.cxx +++ b/forms/source/xforms/unohelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,14 +68,14 @@ Reference<XInterface> xforms::createInstance( const OUString& sServiceName ) return xInstance; } -void xforms::copy( const Reference<XPropertySet>& xFrom, +void xforms::copy( const Reference<XPropertySet>& xFrom, Reference<XPropertySet>& xTo ) { OSL_ENSURE( xFrom.is(), "no source" ); OSL_ENSURE( xTo.is(), "no target" ); // get property names & infos, and iterate over target properties - Sequence<Property> aProperties = + Sequence<Property> aProperties = xTo->getPropertySetInfo()->getProperties(); sal_Int32 nProperties = aProperties.getLength(); const Property* pProperties = aProperties.getConstArray(); diff --git a/forms/source/xforms/unohelper.hxx b/forms/source/xforms/unohelper.hxx index 76125cf1dcee..95a6bb613e97 100644 --- a/forms/source/xforms/unohelper.hxx +++ b/forms/source/xforms/unohelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/warnings_guard_unicode_regex.h b/forms/source/xforms/warnings_guard_unicode_regex.h index 68f0022d7966..dd82f0c6a1bc 100644 --- a/forms/source/xforms/warnings_guard_unicode_regex.h +++ b/forms/source/xforms/warnings_guard_unicode_regex.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/xforms_services.cxx b/forms/source/xforms/xforms_services.cxx index 6ef347dd0c4c..c10016afcdac 100644 --- a/forms/source/xforms/xforms_services.cxx +++ b/forms/source/xforms/xforms_services.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,18 +53,18 @@ using com::sun::star::container::XNameContainer; using rtl::OUString; -namespace frm +namespace frm { Reference<XInterface> Model_CreateInstance( - const Reference<XMultiServiceFactory>& ) + const Reference<XMultiServiceFactory>& ) throw( RuntimeException ) { return static_cast<XPropertySet*>( new xforms::Model ); } Reference<XInterface> XForms_CreateInstance( - const Reference<XMultiServiceFactory>& ) + const Reference<XMultiServiceFactory>& ) throw( RuntimeException ) { return static_cast<XNameContainer*>( new NameContainer<Reference<XPropertySet> >() ); diff --git a/forms/source/xforms/xforms_services.hxx b/forms/source/xforms/xforms_services.hxx index c1e4dc459dc0..32a7c43e6387 100644 --- a/forms/source/xforms/xforms_services.hxx +++ b/forms/source/xforms/xforms_services.hxx @@ -9,21 +9,21 @@ namespace com { namespace sun { namespace star { } } } -namespace frm +namespace frm { - com::sun::star::uno::Reference<com::sun::star::uno::XInterface> + com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL Binding_CreateInstance( - const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory) + const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory) throw( com::sun::star::uno::RuntimeException ); - com::sun::star::uno::Reference<com::sun::star::uno::XInterface> + com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL Model_CreateInstance( - const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory) + const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory) throw( com::sun::star::uno::RuntimeException ); - com::sun::star::uno::Reference<com::sun::star::uno::XInterface> + com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL XForms_CreateInstance( - const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory) + const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory) throw( com::sun::star::uno::RuntimeException ); } diff --git a/forms/source/xforms/xformsevent.cxx b/forms/source/xforms/xformsevent.cxx index 236284165bd2..06801ce3bae9 100644 --- a/forms/source/xforms/xformsevent.cxx +++ b/forms/source/xforms/xformsevent.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,12 +34,12 @@ namespace com { namespace sun { namespace star { -namespace xforms { +namespace xforms { using rtl::OUString; using com::sun::star::uno::RuntimeException; -void SAL_CALL XFormsEventConcrete::initXFormsEvent(const OUString& typeArg, +void SAL_CALL XFormsEventConcrete::initXFormsEvent(const OUString& typeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg) throw (RuntimeException) { @@ -90,7 +90,7 @@ void SAL_CALL XFormsEventConcrete::preventDefault() throw (RuntimeException) { } -void SAL_CALL XFormsEventConcrete::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg, +void SAL_CALL XFormsEventConcrete::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg) throw (RuntimeException) { m_eventType = eventTypeArg; diff --git a/forms/source/xforms/xformsevent.hxx b/forms/source/xforms/xformsevent.hxx index 806abe6e3e62..7437425cb57e 100644 --- a/forms/source/xforms/xformsevent.hxx +++ b/forms/source/xforms/xformsevent.hxx @@ -11,12 +11,12 @@ namespace com { namespace sun { namespace star { -namespace xforms { +namespace xforms { class XFormsEventConcrete : public cppu::WeakImplHelper1< XFormsEvent > { public: - + typedef com::sun::star::uno::RuntimeException RuntimeException_t; typedef com::sun::star::uno::Reference< com::sun::star::xml::dom::events::XEventTarget > XEventTarget_t; typedef com::sun::star::xml::dom::events::PhaseType PhaseType_t; @@ -36,19 +36,19 @@ class XFormsEventConcrete : public cppu::WeakImplHelper1< XFormsEvent > { virtual void SAL_CALL preventDefault() throw (RuntimeException_t); virtual void SAL_CALL initXFormsEvent( - const rtl::OUString& typeArg, - sal_Bool canBubbleArg, + const rtl::OUString& typeArg, + sal_Bool canBubbleArg, sal_Bool cancelableArg ) throw (RuntimeException_t); virtual void SAL_CALL initEvent( - const rtl::OUString& eventTypeArg, - sal_Bool canBubbleArg, - sal_Bool cancelableArg) + const rtl::OUString& eventTypeArg, + sal_Bool canBubbleArg, + sal_Bool cancelableArg) throw (RuntimeException_t); private: - + sal_Bool m_canceled; protected: diff --git a/forms/source/xforms/xmlhelper.cxx b/forms/source/xforms/xmlhelper.cxx index 14c9b73163e1..02683333e7cd 100644 --- a/forms/source/xforms/xmlhelper.cxx +++ b/forms/source/xforms/xmlhelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/xmlhelper.hxx b/forms/source/xforms/xmlhelper.hxx index 7c102cc8aeaa..e5fc6ea6abda 100644 --- a/forms/source/xforms/xmlhelper.hxx +++ b/forms/source/xforms/xmlhelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx index 26bc2b7640fc..26dfb55d4b6b 100644 --- a/forms/source/xforms/xpathlib/extension.cxx +++ b/forms/source/xforms/xpathlib/extension.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/forms/source/xforms/xpathlib/extension.hxx b/forms/source/xforms/xpathlib/extension.hxx index c44a80f9860f..e0caea013200 100644 --- a/forms/source/xforms/xpathlib/extension.hxx +++ b/forms/source/xforms/xpathlib/extension.hxx @@ -18,7 +18,7 @@ -class CLibxml2XFormsExtension : public cppu::WeakImplHelper2< +class CLibxml2XFormsExtension : public cppu::WeakImplHelper2< com::sun::star::xml::xpath::XXPathExtension, com::sun::star::lang::XInitialization> { private: diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx index 49918c7c8b6f..21170a6001a7 100644 --- a/forms/source/xforms/xpathlib/xpathlib.cxx +++ b/forms/source/xforms/xpathlib/xpathlib.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite |