diff options
Diffstat (limited to 'dbaccess/source/core/recovery/subcomponentrecovery.cxx')
-rw-r--r-- | dbaccess/source/core/recovery/subcomponentrecovery.cxx | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx index 0ae69402faeb..3ec74ecbb93d 100644 --- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx +++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -117,7 +118,7 @@ namespace dbaccess break; } - OSL_ENSURE( false, "lcl_getComponentStorageBaseName: unimplemented case!" ); + OSL_FAIL( "lcl_getComponentStorageBaseName: unimplemented case!" ); static const ::rtl::OUString s_sFallback; return s_sFallback; } @@ -334,13 +335,13 @@ namespace dbaccess if ( m_aStates.empty() ) { - if ( i_Name.equalsAscii( "office:settings" ) ) + if ( i_Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "office:settings" ) ) ) { pNewState = new OfficeSettingsImport( m_aSettings ); } else { - OSL_ENSURE( false, "SettingsDocumentHandler::startElement: invalid settings file!" ); + OSL_FAIL( "SettingsDocumentHandler::startElement: invalid settings file!" ); // Yes, that's not correct. Somebody could, in theory, give us a document which starts with "foo:settings", // where "foo" is mapped to the proper namespace URL. // However, there's no need to bother with this. The "recovery" sub storage we're recovering from is @@ -389,7 +390,7 @@ namespace dbaccess //-------------------------------------------------------------------- void SAL_CALL SettingsDocumentHandler::processingInstruction( const ::rtl::OUString& i_Target, const ::rtl::OUString& i_Data ) throw (SAXException, RuntimeException) { - OSL_ENSURE( false, "SettingsDocumentHandler::processingInstruction: unexpected ..." ); + OSL_FAIL( "SettingsDocumentHandler::processingInstruction: unexpected ..." ); (void)i_Target; (void)i_Data; } @@ -428,7 +429,7 @@ namespace dbaccess break; } - OSL_ENSURE( false, "SubComponentRecovery::getComponentsStorageName: unimplemented case!" ); + OSL_FAIL( "SubComponentRecovery::getComponentsStorageName: unimplemented case!" ); static const ::rtl::OUString s_sFallback; return s_sFallback; } @@ -465,7 +466,7 @@ namespace dbaccess default: // TODO - OSL_ENSURE( false, "SubComponentRecoverys::saveToRecoveryStorage: unimplemented case!" ); + OSL_FAIL( "SubComponentRecoverys::saveToRecoveryStorage: unimplemented case!" ); break; } @@ -495,17 +496,17 @@ namespace dbaccess switch ( m_eType ) { case TABLE: - m_aCompDesc.bForEditing = sModuleIdentifier.equalsAscii( "com.sun.star.sdb.TableDesign" ); + m_aCompDesc.bForEditing = sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.TableDesign" ) ); break; case QUERY: - m_aCompDesc.bForEditing = sModuleIdentifier.equalsAscii( "com.sun.star.sdb.QueryDesign" ); + m_aCompDesc.bForEditing = sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.QueryDesign" ) ); break; case REPORT: - if ( sModuleIdentifier.equalsAscii( "com.sun.star.report.ReportDefinition" ) ) + if ( sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.report.ReportDefinition" ) ) ) { - // it's an SRB report desginer + // it's an SRB report designer m_aCompDesc.bForEditing = true; break; } @@ -516,14 +517,14 @@ namespace dbaccess break; default: - if ( sModuleIdentifier.equalsAscii( "com.sun.star.sdb.RelationDesign" ) ) + if ( sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.RelationDesign" ) ) ) { m_eType = RELATION_DESIGN; m_aCompDesc.bForEditing = true; } else { - OSL_ENSURE( false, "SubComponentRecovery::impl_identifyComponent_throw: couldn't classify the given sub component!" ); + OSL_FAIL( "SubComponentRecovery::impl_identifyComponent_throw: couldn't classify the given sub component!" ); } break; } @@ -691,7 +692,7 @@ namespace dbaccess xSubComponent = impl_recoverQueryDesign_throw( i_rRecoveryStorage, i_rComponentName, i_bForEditing ); break; default: - OSL_ENSURE( false, "SubComponentRecovery::recoverFromStorage: unimplemented case!" ); + OSL_FAIL( "SubComponentRecovery::recoverFromStorage: unimplemented case!" ); break; } return xSubComponent; @@ -700,3 +701,5 @@ namespace dbaccess //........................................................................ } // namespace dbaccess //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |