module.cxx (e8c8fa4b) | module.cxx (24c56ab9) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 25 unchanged lines hidden (view full) --- 34 35OModule::OModule() 36 :m_Module(0) 37{ 38} 39 40OModule::OModule(const rtl::OUString& ustrModuleName, sal_Int32 nRtldMode) : m_Module(0) 41{ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 25 unchanged lines hidden (view full) --- 34 35OModule::OModule() 36 :m_Module(0) 37{ 38} 39 40OModule::OModule(const rtl::OUString& ustrModuleName, sal_Int32 nRtldMode) : m_Module(0) 41{ |
42 if (ustrModuleName) | 42 if( !ustrModuleName.isEmpty()) |
43 load(ustrModuleName, nRtldMode); 44} 45 46OModule::~OModule() 47{ 48 if (m_Module) 49 osl_unloadModule(m_Module); 50} 51 52sal_Bool OModule::load(const rtl::OUString& ustrModuleName, sal_Int32 nRtldMode) 53{ | 43 load(ustrModuleName, nRtldMode); 44} 45 46OModule::~OModule() 47{ 48 if (m_Module) 49 osl_unloadModule(m_Module); 50} 51 52sal_Bool OModule::load(const rtl::OUString& ustrModuleName, sal_Int32 nRtldMode) 53{ |
54 VOS_ASSERT(ustrModuleName); | 54 VOS_ASSERT( !ustrModuleName.isEmpty()); |
55 56 unload(); 57 58 m_Module = osl_loadModule( ustrModuleName.pData, nRtldMode ); 59 60 return (m_Module != 0); 61} 62 --- 8 unchanged lines hidden (view full) --- 71 72sal_Bool OModule::isLoaded() 73{ 74 return m_Module != NULL; 75} 76 77void *OModule::getSymbol(const rtl::OUString& strSymbolName) 78{ | 55 56 unload(); 57 58 m_Module = osl_loadModule( ustrModuleName.pData, nRtldMode ); 59 60 return (m_Module != 0); 61} 62 --- 8 unchanged lines hidden (view full) --- 71 72sal_Bool OModule::isLoaded() 73{ 74 return m_Module != NULL; 75} 76 77void *OModule::getSymbol(const rtl::OUString& strSymbolName) 78{ |
79 VOS_ASSERT(strSymbolName); | 79 VOS_ASSERT( !strSymbolName.isEmpty()); |
80 VOS_ASSERT(m_Module); 81 return ( osl_getSymbol( m_Module, strSymbolName.pData ) ); 82} 83 | 80 VOS_ASSERT(m_Module); 81 return ( osl_getSymbol( m_Module, strSymbolName.pData ) ); 82} 83 |