diff options
Diffstat (limited to 'xmloff/source/xforms')
21 files changed, 82 insertions, 18 deletions
diff --git a/xmloff/source/xforms/SchemaContext.cxx b/xmloff/source/xforms/SchemaContext.cxx index 14f12bc5df69..38bda73bebf0 100644 --- a/xmloff/source/xforms/SchemaContext.cxx +++ b/xmloff/source/xforms/SchemaContext.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. @@ -98,3 +99,5 @@ SvXMLImportContext* SchemaContext::HandleChild( mxRepository ) : new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaContext.hxx b/xmloff/source/xforms/SchemaContext.hxx index e3a0be34c29f..2819df1c5500 100644 --- a/xmloff/source/xforms/SchemaContext.hxx +++ b/xmloff/source/xforms/SchemaContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx index 0663aa2531f4..befc06a7e521 100644 --- a/xmloff/source/xforms/SchemaRestrictionContext.cxx +++ b/xmloff/source/xforms/SchemaRestrictionContext.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. @@ -131,7 +132,7 @@ void SchemaRestrictionContext::CreateDataType() } catch( const Exception& ) { - DBG_ERROR( "exception during type creation" ); + OSL_FAIL( "exception during type creation" ); } DBG_ASSERT( mxDataType.is(), "can't create type" ); } @@ -356,7 +357,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( break; default: - DBG_ERROR( "unknown facet" ); + OSL_FAIL( "unknown facet" ); } // finally, set the property @@ -378,3 +379,5 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( return new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaRestrictionContext.hxx b/xmloff/source/xforms/SchemaRestrictionContext.hxx index c08251aadbbe..d86a71232098 100644 --- a/xmloff/source/xforms/SchemaRestrictionContext.hxx +++ b/xmloff/source/xforms/SchemaRestrictionContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx index 821dd768fbf9..96f8da4dc99f 100644 --- a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx +++ b/xmloff/source/xforms/SchemaSimpleTypeContext.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. @@ -106,10 +107,12 @@ SvXMLImportContext* SchemaSimpleTypeContext::HandleChild( mxRepository, msTypeName ); break; default: - DBG_ERROR( "Booo!" ); + OSL_FAIL( "Booo!" ); } return ( pContext != NULL ) ? pContext : new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.hxx b/xmloff/source/xforms/SchemaSimpleTypeContext.hxx index cf4221f7168c..33e24351fe1f 100644 --- a/xmloff/source/xforms/SchemaSimpleTypeContext.hxx +++ b/xmloff/source/xforms/SchemaSimpleTypeContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -84,3 +85,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/TokenContext.cxx b/xmloff/source/xforms/TokenContext.cxx index d1310effeeb8..ab9298773e2c 100644 --- a/xmloff/source/xforms/TokenContext.cxx +++ b/xmloff/source/xforms/TokenContext.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. @@ -144,3 +145,5 @@ void TokenContext::Characters( const ::rtl::OUString& rCharacters ) if( ::std::find_if( pBegin, pEnd, ::std::not1(::std::ptr_fun(lcl_IsWhiteSpace)) ) != pEnd ) GetImport().SetError( XMLERROR_UNKNOWN_CHARACTERS, rCharacters ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/TokenContext.hxx b/xmloff/source/xforms/TokenContext.hxx index 7200eb0891a1..33ef27ac3798 100644 --- a/xmloff/source/xforms/TokenContext.hxx +++ b/xmloff/source/xforms/TokenContext.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. @@ -112,3 +113,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx index 67bbf8f70b84..71cc356d0e1a 100644 --- a/xmloff/source/xforms/XFormsBindContext.cxx +++ b/xmloff/source/xforms/XFormsBindContext.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 @@ void XFormsBindContext::HandleAttribute( sal_uInt16 nToken, rValue ) ) ); break; default: - DBG_ERROR( "should not happen" ); + OSL_FAIL( "should not happen" ); break; } } @@ -155,7 +156,7 @@ SvXMLImportContext* XFormsBindContext::HandleChild( const OUString&, const Reference<XAttributeList>& ) { - DBG_ERROR( "no children supported" ); + OSL_FAIL( "no children supported" ); return NULL; } @@ -188,3 +189,5 @@ void lcl_fillNamespaceContainer( } while( nKeyIter != XML_NAMESPACE_UNKNOWN ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsBindContext.hxx b/xmloff/source/xforms/XFormsBindContext.hxx index af2d7a440e3a..f6e723a9f424 100644 --- a/xmloff/source/xforms/XFormsBindContext.hxx +++ b/xmloff/source/xforms/XFormsBindContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -86,3 +87,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx index 06cabce7267f..eeb6621eb2ff 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.cxx +++ b/xmloff/source/xforms/XFormsInstanceContext.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. @@ -142,7 +143,7 @@ void XFormsInstanceContext::HandleAttribute( msId = rValue; break; default: - DBG_ERROR( "should not happen" ); + OSL_FAIL( "should not happen" ); break; } } @@ -153,6 +154,8 @@ SvXMLImportContext* XFormsInstanceContext::HandleChild( const OUString&, const Reference<XAttributeList>& ) { - DBG_ERROR( "to be handled by CreateChildContext" ); + OSL_FAIL( "to be handled by CreateChildContext" ); return NULL; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsInstanceContext.hxx b/xmloff/source/xforms/XFormsInstanceContext.hxx index 2772aef7fd2f..5c5367018d9f 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.hxx +++ b/xmloff/source/xforms/XFormsInstanceContext.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. @@ -97,3 +98,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx index 074cbd7ddb8d..7af420c45eba 100644 --- a/xmloff/source/xforms/XFormsModelContext.cxx +++ b/xmloff/source/xforms/XFormsModelContext.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. @@ -109,7 +110,7 @@ void XFormsModelContext::HandleAttribute( GetImport().SetError( XMLERROR_XFORMS_NO_SCHEMA_SUPPORT ); break; default: - DBG_ERROR( "this should not happen" ); + OSL_FAIL( "this should not happen" ); break; } } @@ -144,7 +145,7 @@ SvXMLImportContext* XFormsModelContext::HandleChild( ->getDataTypeRepository() ); break; default: - DBG_ERROR( "Boooo!" ); + OSL_FAIL( "Boooo!" ); break; } @@ -161,3 +162,5 @@ void XFormsModelContext::EndElement() GetImport().initXForms(); lcl_addXFormsModel( GetImport().GetModel(), getModel() ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsModelContext.hxx b/xmloff/source/xforms/XFormsModelContext.hxx index 5731b606f1bb..8c89fcd8470b 100644 --- a/xmloff/source/xforms/XFormsModelContext.hxx +++ b/xmloff/source/xforms/XFormsModelContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -83,3 +84,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsModelExport.hxx b/xmloff/source/xforms/XFormsModelExport.hxx index 2286d9ea2fb2..202692a4f080 100644 --- a/xmloff/source/xforms/XFormsModelExport.hxx +++ b/xmloff/source/xforms/XFormsModelExport.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,3 +41,5 @@ void exportXFormsModel( SvXMLExport&, const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx index 7835cf5dc0a7..e86bfc7701bb 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.cxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.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. @@ -105,7 +106,7 @@ XFormsSubmissionContext::~XFormsSubmissionContext() Any toBool( const OUString& rValue ) { Any aValue; - sal_Bool bValue; + bool bValue; if( SvXMLUnitConverter::convertBool( bValue, rValue ) ) { aValue <<= ( bValue ? true : false ); @@ -165,7 +166,7 @@ void XFormsSubmissionContext::HandleAttribute( sal_uInt16 nToken, lcl_setValue( mxSubmission, OUSTRING("IncludeNamespacePrefixes"), rValue ); break; default: - DBG_ERROR( "unknown attribute" ); + OSL_FAIL( "unknown attribute" ); break; } } @@ -177,6 +178,8 @@ SvXMLImportContext* XFormsSubmissionContext::HandleChild( const OUString&, const Reference<XAttributeList>& ) { - DBG_ERROR( "no children supported" ); + OSL_FAIL( "no children supported" ); return NULL; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsSubmissionContext.hxx b/xmloff/source/xforms/XFormsSubmissionContext.hxx index 00cd2849603b..a08ab8663f67 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.hxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -81,3 +82,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 794798c5366a..4d23ba45d3d9 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.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. @@ -116,6 +117,7 @@ void lcl_addXFormsModel( // TODO: implement proper error handling DBG_ASSERT( bSuccess, "can't import model" ); + (void)bSuccess; } Reference<XPropertySet> lcl_findXFormsBindingOrSubmission( @@ -342,7 +344,9 @@ rtl::OUString lcl_getBasicTypeName( } catch( const Exception& ) { - DBG_ERROR( "exception during type creation" ); + OSL_FAIL( "exception during type creation" ); } return sTypeName; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/xformsapi.hxx b/xmloff/source/xforms/xformsapi.hxx index 4b5987594478..fc24b06248f3 100644 --- a/xmloff/source/xforms/xformsapi.hxx +++ b/xmloff/source/xforms/xformsapi.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. @@ -91,3 +92,5 @@ rtl::OUString lcl_getBasicTypeName( const rtl::OUString& rXMLName ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 3d90170f11f4..afd8731473b3 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.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. @@ -535,7 +536,7 @@ OUString lcl_getXSDType( SvXMLExport& rExport, case com::sun::star::xsd::DataTypeClass::QName: case com::sun::star::xsd::DataTypeClass::NOTATION: default: - DBG_ERROR( "unknown data type" ); + OSL_FAIL( "unknown data type" ); } return rExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_XSD, @@ -679,7 +680,7 @@ OUString lcl_bool( const Any& rAny ) bool bResult = bool(); if( rAny >>= bResult ) return GetXMLToken( bResult ? XML_TRUE : XML_FALSE ); - DBG_ERROR( "expected boolean value" ); + OSL_FAIL( "expected boolean value" ); return OUString(); } @@ -833,3 +834,5 @@ void getXFormsSettings( const Reference< XNameAccess >& _rXForms, Sequence< Prop DBG_UNHANDLED_EXCEPTION(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/xformsimport.cxx b/xmloff/source/xforms/xformsimport.cxx index 84908444498e..c2b06e0dcdc8 100644 --- a/xmloff/source/xforms/xformsimport.cxx +++ b/xmloff/source/xforms/xformsimport.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. @@ -157,7 +158,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen Reference< XNameAccess > xModelSettings( aSettings.get( "XFormModels" ), UNO_QUERY ); if ( !xModelSettings.is() ) { - OSL_ENSURE( false, "applyXFormsSettings: wrong type for the XFormModels settings!" ); + OSL_FAIL( "applyXFormsSettings: wrong type for the XFormModels settings!" ); return; } @@ -176,7 +177,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen // the model itself if ( !_rXForms->hasByName( *pModelName ) ) { - OSL_ENSURE( false, "applyXFormsSettings: have settings for a non-existent XForms model!" ); + OSL_FAIL( "applyXFormsSettings: have settings for a non-existent XForms model!" ); continue; } @@ -191,7 +192,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen { if ( !xModelPSI->hasPropertyByName( pSetting->Name ) ) { - OSL_ENSURE( false, "applyXFormsSettings: non-existent model property!" ); + OSL_FAIL( "applyXFormsSettings: non-existent model property!" ); continue; } @@ -204,3 +205,5 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen DBG_UNHANDLED_EXCEPTION(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |