diff options
author | Daniel Rentz <dr@openoffice.org> | 2010-04-16 17:28:52 +0200 |
---|---|---|
committer | Daniel Rentz <dr@openoffice.org> | 2010-04-16 17:28:52 +0200 |
commit | d66af9e10fa0f8fcf82b7c06dac789b5e5f4910b (patch) | |
tree | 23620dc703375b0ecca7e8a9a63728666053b13d /oox/source | |
parent | 02f50ebfc8097e6bebb607b9faa82f3baff0421e (diff) |
npower13_objectmodules: uppercase UNO constants
Diffstat (limited to 'oox/source')
-rwxr-xr-x | oox/source/ole/vbamodule.cxx | 22 | ||||
-rwxr-xr-x | oox/source/ole/vbaproject.cxx | 14 |
2 files changed, 18 insertions, 18 deletions
diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx index ff4c37e93b88..e9388e54215a 100755 --- a/oox/source/ole/vbamodule.cxx +++ b/oox/source/ole/vbamodule.cxx @@ -60,7 +60,7 @@ VbaModule::VbaModule( const Reference< XModel >& rxDocModel, const OUString& rNa mxDocModel( rxDocModel ), maName( rName ), meTextEnc( eTextEnc ), - mnType( ApiModuleType::Unknown ), + mnType( ApiModuleType::UNKNOWN ), mnOffset( SAL_MAX_UINT32 ), mbReadOnly( false ), mbPrivate( false ), @@ -107,13 +107,13 @@ void VbaModule::importDirRecords( BinaryInputStream& rDirStrm ) break; case VBA_ID_MODULETYPEPROCEDURAL: OOX_ENSURE_RECORDSIZE( nRecSize == 0 ); - OSL_ENSURE( mnType == ApiModuleType::Unknown, "VbaModule::importDirRecords - multiple module type records" ); - mnType = ApiModuleType::Normal; + OSL_ENSURE( mnType == ApiModuleType::UNKNOWN, "VbaModule::importDirRecords - multiple module type records" ); + mnType = ApiModuleType::NORMAL; break; case VBA_ID_MODULETYPEDOCUMENT: OOX_ENSURE_RECORDSIZE( nRecSize == 0 ); - OSL_ENSURE( mnType == ApiModuleType::Unknown, "VbaModule::importDirRecords - multiple module type records" ); - mnType = ApiModuleType::Document; + OSL_ENSURE( mnType == ApiModuleType::UNKNOWN, "VbaModule::importDirRecords - multiple module type records" ); + mnType = ApiModuleType::DOCUMENT; break; case VBA_ID_MODULEREADONLY: OOX_ENSURE_RECORDSIZE( nRecSize == 0 ); @@ -130,7 +130,7 @@ void VbaModule::importDirRecords( BinaryInputStream& rDirStrm ) } OSL_ENSURE( maName.getLength() > 0, "VbaModule::importDirRecords - missing module name" ); OSL_ENSURE( maStreamName.getLength() > 0, "VbaModule::importDirRecords - missing module stream name" ); - OSL_ENSURE( mnType != ApiModuleType::Unknown, "VbaModule::importDirRecords - missing module type" ); + OSL_ENSURE( mnType != ApiModuleType::UNKNOWN, "VbaModule::importDirRecords - missing module type" ); OSL_ENSURE( mnOffset < SAL_MAX_UINT32, "VbaModule::importDirRecords - missing module stream offset" ); } @@ -155,18 +155,18 @@ void VbaModule::importSourceCode( StorageBase& rVbaStrg, aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Rem Attribute VBA_ModuleType=" ) ); switch( mnType ) { - case ApiModuleType::Normal: + case ApiModuleType::NORMAL: aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VBAModule" ) ); break; - case ApiModuleType::Class: + case ApiModuleType::CLASS: aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VBAClassModule" ) ); break; - case ApiModuleType::Form: + case ApiModuleType::FORM: aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VBAFormModule" ) ); // hack from old filter, document Basic should know the XModel, but it doesn't aModuleInfo.ModuleObject.set( mxDocModel, UNO_QUERY ); break; - case ApiModuleType::Document: + case ApiModuleType::DOCUMENT: aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VBADocumentModule" ) ); // get the VBA object associated to the document module if( rxDocObjectNA.is() ) try @@ -184,7 +184,7 @@ void VbaModule::importSourceCode( StorageBase& rVbaStrg, if( mbExecutable ) { aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Option VBASupport 1\n" ) ); - if( mnType == ApiModuleType::Class ) + if( mnType == ApiModuleType::CLASS ) aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Option ClassModule\n" ) ); } else diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx index 92a556d8b885..a370fb3d168e 100755 --- a/oox/source/ole/vbaproject.cxx +++ b/oox/source/ole/vbaproject.cxx @@ -394,23 +394,23 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap bExitLoop = (nLineLen >= 2) && (aLine[ 0 ] == '[') && (aLine[ nLineLen - 1 ] == ']'); if( !bExitLoop && VbaHelper::extractKeyValue( aKey, aValue, aLine ) ) { - sal_Int32 nType = ApiModuleType::Unknown; + sal_Int32 nType = ApiModuleType::UNKNOWN; if( aKey.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Document" ) ) ) { - nType = ApiModuleType::Document; + nType = ApiModuleType::DOCUMENT; // strip automation server version from module names sal_Int32 nSlashPos = aValue.indexOf( '/' ); if( nSlashPos >= 0 ) aValue = aValue.copy( 0, nSlashPos ); } else if( aKey.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Module" ) ) ) - nType = ApiModuleType::Normal; + nType = ApiModuleType::NORMAL; else if( aKey.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Class" ) ) ) - nType = ApiModuleType::Class; + nType = ApiModuleType::CLASS; else if( aKey.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "BaseClass" ) ) ) - nType = ApiModuleType::Form; + nType = ApiModuleType::FORM; - if( (nType != ApiModuleType::Unknown) && (aValue.getLength() > 0) ) + if( (nType != ApiModuleType::UNKNOWN) && (aValue.getLength() > 0) ) { OSL_ENSURE( aModules.has( aValue ), "VbaProject::importVba - module not found" ); if( VbaModule* pModule = aModules.get( aValue ).get() ) @@ -475,7 +475,7 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap { // resolve module name from storage name (which equals the module stream name) VbaModule* pModule = aModulesByStrm.get( *aIt ).get(); - OSL_ENSURE( pModule && (pModule->getType() == ApiModuleType::Form), + OSL_ENSURE( pModule && (pModule->getType() == ApiModuleType::FORM), "VbaProject::importVba - form substorage without form module" ); OUString aModuleName; if( pModule ) |