convert OUString compareToAscii == 0 to equalsAscii
Convert code like
aStr.compareToAscii("XXX") == 0
to
aStr.equalsAscii("XXX")
which is both easier to read and faster.
Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
This commit is contained in:
@@ -189,7 +189,7 @@ void BasicScriptListener_Impl::disposing(const EventObject& ) throw ( RuntimeExc
|
||||
|
||||
void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
|
||||
{
|
||||
if( aScriptEvent.ScriptType.compareToAscii( "StarBasic" ) == 0 )
|
||||
if( aScriptEvent.ScriptType.equalsAscii( "StarBasic" ) )
|
||||
{
|
||||
// Full qualified name?
|
||||
OUString aMacro( aScriptEvent.ScriptCode );
|
||||
|
||||
@@ -38,7 +38,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbpool2_component_getFactory(const sal_Char*
|
||||
{
|
||||
void* pRet = NULL;
|
||||
|
||||
if (OPoolCollection::getImplementationName_Static().compareToAscii(_pImplName) == 0)
|
||||
if (OPoolCollection::getImplementationName_Static().equalsAscii(_pImplName))
|
||||
{
|
||||
Reference< XSingleServiceFactory > xFactory(
|
||||
::cppu::createOneInstanceFactory(
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace connectivity { namespace hsqldb
|
||||
const PropertyValue* pEnd = pIter + aInfo.getLength();
|
||||
for(;pIter != pEnd;++pIter)
|
||||
{
|
||||
if ( pIter->Name.compareToAscii("readonly") == 0 )
|
||||
if ( pIter->Name.equalsAscii("readonly") )
|
||||
m_bReadOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,8 +118,8 @@ sal_Bool MorkDriver::acceptsURL(OUString const & url)
|
||||
aAddrbookScheme = aAddrbookURI.copy(0, nLen);
|
||||
}
|
||||
|
||||
if ((aAddrbookScheme.compareToAscii( "thunderbird" ) == 0) ||
|
||||
(aAddrbookScheme.compareToAscii( "mozilla" ) == 0))
|
||||
if (aAddrbookScheme.equalsAscii( "thunderbird" ) ||
|
||||
aAddrbookScheme.equalsAscii( "mozilla" ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -875,8 +875,8 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
|
||||
matchString = parseTree->getChild(2)->getTokenValue();
|
||||
}
|
||||
|
||||
if ( columnName.compareToAscii("0") ==0 && op == MQueryOp::Is &&
|
||||
matchString.compareToAscii("1") == 0 ) {
|
||||
if ( columnName.equalsAscii("0") && op == MQueryOp::Is &&
|
||||
matchString.equalsAscii("1") ) {
|
||||
OSL_TRACE("Query always evaluates to FALSE");
|
||||
m_bIsAlwaysFalseQuery = sal_True;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ EDriverType MozabDriver::impl_classifyURL( const OUString& url )
|
||||
|
||||
for ( size_t i=0; i < sizeof( aSchemeMap ) / sizeof( aSchemeMap[0] ); ++i )
|
||||
{
|
||||
if ( aAddrbookScheme.compareToAscii( aSchemeMap[i].pScheme ) == 0 )
|
||||
if ( aAddrbookScheme.equalsAscii( aSchemeMap[i].pScheme ) )
|
||||
return aSchemeMap[i].eType;
|
||||
}
|
||||
|
||||
|
||||
@@ -857,8 +857,8 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
|
||||
matchString = parseTree->getChild(2)->getTokenValue();
|
||||
}
|
||||
|
||||
if ( columnName.compareToAscii("0") ==0 && op == MQueryOp::Is &&
|
||||
matchString.compareToAscii("1") == 0 ) {
|
||||
if ( columnName.equalsAscii("0") && op == MQueryOp::Is &&
|
||||
matchString.equalsAscii("1") ) {
|
||||
OSL_TRACE("Query always evaluates to FALSE");
|
||||
m_bIsAlwaysFalseQuery = sal_True;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdbc2_component_getFactory(const sal_Char* _
|
||||
{
|
||||
void* pRet = NULL;
|
||||
|
||||
if (::drivermanager::OSDBCDriverManager::getImplementationName_static().compareToAscii(_pImplName) == 0)
|
||||
if (::drivermanager::OSDBCDriverManager::getImplementationName_static().equalsAscii(_pImplName))
|
||||
{
|
||||
Reference< XSingleServiceFactory > xFactory(
|
||||
::cppu::createOneInstanceFactory(
|
||||
|
||||
@@ -809,9 +809,9 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
|
||||
if( nPos != -1 )
|
||||
{
|
||||
aActivatorName = aLocation.copy( 0, nPos );
|
||||
if( aActivatorName.compareToAscii( "java" ) == 0 )
|
||||
if( aActivatorName.equalsAscii( "java" ) )
|
||||
aActivatorName = "com.sun.star.loader.Java";
|
||||
else if( aActivatorName.compareToAscii( "module" ) == 0 )
|
||||
else if( aActivatorName.equalsAscii( "module" ) )
|
||||
aActivatorName = "com.sun.star.loader.SharedLibrary";
|
||||
aLocation = aLocation.copy( nPos + 3 );
|
||||
}
|
||||
|
||||
@@ -200,16 +200,16 @@ static Reference< XInterface > loadComponent(
|
||||
|
||||
OUString aExt( rLocation.copy( nDot +1 ) );
|
||||
|
||||
if (aExt.compareToAscii( "dll" ) == 0 ||
|
||||
aExt.compareToAscii( "exe" ) == 0 ||
|
||||
aExt.compareToAscii( "dylib" ) == 0 ||
|
||||
aExt.compareToAscii( "so" ) == 0)
|
||||
if (aExt.equalsAscii( "dll" ) ||
|
||||
aExt.equalsAscii( "exe" ) ||
|
||||
aExt.equalsAscii( "dylib" ) ||
|
||||
aExt.equalsAscii( "so" ) )
|
||||
{
|
||||
createInstance(
|
||||
xLoader, xContext, OUString("com.sun.star.loader.SharedLibrary") );
|
||||
}
|
||||
else if (aExt.compareToAscii( "jar" ) == 0 ||
|
||||
aExt.compareToAscii( "class" ) == 0)
|
||||
else if (aExt.equalsAscii( "jar" ) ||
|
||||
aExt.equalsAscii( "class" ) )
|
||||
{
|
||||
createInstance(
|
||||
xLoader, xContext, OUString("com.sun.star.loader.Java") );
|
||||
|
||||
@@ -157,7 +157,7 @@ sal_Int32 SAL_CALL OContentHelper::createCommandIdentifier( ) throw (RuntimeExc
|
||||
Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*CommandId*/, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
|
||||
{
|
||||
Any aRet;
|
||||
if ( aCommand.Name.compareToAscii( "getPropertyValues" ) == 0 )
|
||||
if ( aCommand.Name.equalsAscii( "getPropertyValues" ) )
|
||||
{
|
||||
// getPropertyValues
|
||||
|
||||
@@ -175,7 +175,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
|
||||
}
|
||||
aRet <<= getPropertyValues( Properties);
|
||||
}
|
||||
else if ( aCommand.Name.compareToAscii( "setPropertyValues" ) == 0 )
|
||||
else if ( aCommand.Name.equalsAscii( "setPropertyValues" ) )
|
||||
{
|
||||
// setPropertyValues
|
||||
|
||||
@@ -206,7 +206,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
|
||||
|
||||
aRet <<= setPropertyValues( aProperties, Environment );
|
||||
}
|
||||
else if ( aCommand.Name.compareToAscii( "getPropertySetInfo" ) == 0 )
|
||||
else if ( aCommand.Name.equalsAscii( "getPropertySetInfo" ) )
|
||||
{
|
||||
// getPropertySetInfo
|
||||
|
||||
|
||||
@@ -763,7 +763,7 @@ sal_Bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocum
|
||||
{
|
||||
if ( ( i_rLogicalDocumentURL == getURL() )
|
||||
&& ( i_rMediaDescriptor.getLength() == 1 )
|
||||
&& ( i_rMediaDescriptor[0].Name.compareToAscii( "BreakMacroSignature" ) == 0 )
|
||||
&& ( i_rMediaDescriptor[0].Name.equalsAscii( "BreakMacroSignature" ) )
|
||||
)
|
||||
{
|
||||
// this is a BAD hack of the Basic importer code ... there should be a dedicated API for this,
|
||||
|
||||
@@ -397,7 +397,7 @@ Sequence< OUString > SAL_CALL ODocumentContainer::getAvailableServiceNames( ) t
|
||||
Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 CommandId, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
|
||||
{
|
||||
Any aRet;
|
||||
if ( aCommand.Name.compareToAscii( "open" ) == 0 )
|
||||
if ( aCommand.Name.equalsAscii( "open" ) )
|
||||
{
|
||||
// open command for a folder content
|
||||
OpenCommandArgument2 aOpenCommand;
|
||||
|
||||
@@ -1084,14 +1084,14 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
|
||||
dispose();
|
||||
|
||||
}
|
||||
else if ( ( aCommand.Name.compareToAscii( "storeOwn" ) == 0 ) // compatibility
|
||||
|| ( aCommand.Name.compareToAscii( "store" ) == 0 )
|
||||
else if ( aCommand.Name.equalsAscii( "storeOwn" ) // compatibility
|
||||
|| aCommand.Name.equalsAscii( "store" )
|
||||
)
|
||||
{
|
||||
impl_store_throw();
|
||||
}
|
||||
else if ( ( aCommand.Name.compareToAscii( "shutdown" ) == 0 ) // compatibility
|
||||
|| ( aCommand.Name.compareToAscii( "close" ) == 0 )
|
||||
else if ( aCommand.Name.equalsAscii( "shutdown" ) // compatibility
|
||||
|| aCommand.Name.equalsAscii( "close" )
|
||||
)
|
||||
{
|
||||
aRet <<= impl_close_throw();
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace dbaccess
|
||||
const DocumentEventData* pEventData = lcl_getDocumentEventData();
|
||||
while ( pEventData->pAsciiEventName )
|
||||
{
|
||||
if ( _rEventName.compareToAscii( pEventData->pAsciiEventName ) == 0 )
|
||||
if ( _rEventName.equalsAscii( pEventData->pAsciiEventName ) )
|
||||
return pEventData->bNeedsSyncNotify;
|
||||
++pEventData;
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ Sequence< OUString > SAL_CALL SbaXDataBrowserController::FormControllerImpl::get
|
||||
|
||||
::sal_Bool SAL_CALL SbaXDataBrowserController::FormControllerImpl::supportsMode( const OUString& aMode ) throw (RuntimeException)
|
||||
{
|
||||
return aMode.compareToAscii( "DataMode" ) == 0;
|
||||
return aMode.equalsAscii( "DataMode" );
|
||||
}
|
||||
|
||||
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setModel(const Reference< ::com::sun::star::awt::XTabControllerModel > & /*Model*/) throw( RuntimeException )
|
||||
|
||||
@@ -231,7 +231,7 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString)
|
||||
{
|
||||
// special case stop all acceptors
|
||||
AcceptorMap &rMap = acceptorMap::get();
|
||||
if (aAcceptString.compareToAscii("all") == 0) {
|
||||
if (aAcceptString.equalsAscii("all")) {
|
||||
rMap.clear();
|
||||
|
||||
} else {
|
||||
|
||||
@@ -230,15 +230,15 @@ Reference<XInterface> AccInstanceProvider::getInstance (const OUString& aName )
|
||||
|
||||
Reference<XInterface> rInstance;
|
||||
|
||||
if ( aName.compareToAscii( "StarOffice.ServiceManager" ) == 0)
|
||||
if ( aName.equalsAscii( "StarOffice.ServiceManager" ) )
|
||||
{
|
||||
rInstance = Reference< XInterface >( m_rContext->getServiceManager() );
|
||||
}
|
||||
else if(aName.compareToAscii( "StarOffice.ComponentContext" ) == 0 )
|
||||
else if(aName.equalsAscii( "StarOffice.ComponentContext" ) )
|
||||
{
|
||||
rInstance = m_rContext;
|
||||
}
|
||||
else if ( aName.compareToAscii("StarOffice.NamingService" ) == 0 )
|
||||
else if ( aName.equalsAscii("StarOffice.NamingService" ) )
|
||||
{
|
||||
Reference< XNamingService > rNamingService(
|
||||
m_rContext->getServiceManager()->createInstanceWithContext("com.sun.star.uno.NamingService", m_rContext),
|
||||
|
||||
@@ -898,7 +898,7 @@ PluginDescription XPlugin_Impl::fitDescription( const OUString& rURL )
|
||||
{
|
||||
for( int i = 0; i < aDescrs.getLength(); i++ )
|
||||
{
|
||||
if( pDescrs[i].Mimetype.compareToAscii( m_pArgv[nArg] ) == 0 )
|
||||
if( pDescrs[i].Mimetype.equalsAscii( m_pArgv[nArg] ) )
|
||||
return pDescrs[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ namespace frm
|
||||
const FeatureURL* pFeatures = lcl_getFeatureTable();
|
||||
while ( pFeatures->pAsciiURL )
|
||||
{
|
||||
if ( _rCompleteURL.compareToAscii( pFeatures->pAsciiURL ) == 0 )
|
||||
if ( _rCompleteURL.equalsAscii( pFeatures->pAsciiURL ) )
|
||||
return pFeatures->nFormFeature;
|
||||
++pFeatures;
|
||||
}
|
||||
|
||||
@@ -390,14 +390,14 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
|
||||
(aURL.isValid() ) &&
|
||||
(aURL.getEvent(sEvent) ) &&
|
||||
(!sEvent.isEmpty() ) &&
|
||||
(sEvent.compareToAscii(pExpectedEvent)==0)
|
||||
(sEvent.equalsAscii(pExpectedEvent))
|
||||
);
|
||||
|
||||
if (bOK && pExpectedEventArgs!=NULL)
|
||||
{
|
||||
bOK = (
|
||||
(aURL.getEventArgs(sEventArgs) ) &&
|
||||
(sEventArgs.compareToAscii(pExpectedEventArgs)==0)
|
||||
(sEventArgs.equalsAscii(pExpectedEventArgs))
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -426,14 +426,14 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
|
||||
(aURL.isValid() ) &&
|
||||
(aURL.getAlias(sAlias) ) &&
|
||||
(!sAlias.isEmpty() ) &&
|
||||
(sAlias.compareToAscii(pExpectedAlias)==0)
|
||||
(sAlias.equalsAscii(pExpectedAlias))
|
||||
);
|
||||
|
||||
if (bOK && pExpectedAliasArgs!=NULL)
|
||||
{
|
||||
bOK = (
|
||||
(aURL.getAliasArgs(sAliasArgs) ) &&
|
||||
(sAliasArgs.compareToAscii(pExpectedAliasArgs)==0)
|
||||
(sAliasArgs.equalsAscii(pExpectedAliasArgs))
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -462,14 +462,14 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
|
||||
(aURL.isValid() ) &&
|
||||
(aURL.getService(sService) ) &&
|
||||
(!sService.isEmpty() ) &&
|
||||
(sService.compareToAscii(pExpectedService)==0)
|
||||
(sService.equalsAscii(pExpectedService))
|
||||
);
|
||||
|
||||
if (bOK && pExpectedServiceArgs!=NULL)
|
||||
{
|
||||
bOK = (
|
||||
(aURL.getServiceArgs(sServiceArgs) ) &&
|
||||
(sServiceArgs.compareToAscii(pExpectedServiceArgs)==0)
|
||||
(sServiceArgs.equalsAscii(pExpectedServiceArgs))
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -204,13 +204,13 @@ void SAL_CALL SessionListener::statusChanged(const FeatureStateEvent& event)
|
||||
SAL_INFO("fwk.session", "SessionListener::statusChanged");
|
||||
if ( event.FeatureURL.Complete == "vnd.sun.star.autorecovery:/doSessionRestore" )
|
||||
{
|
||||
if (event.FeatureDescriptor.compareToAscii("update")==0)
|
||||
if (event.FeatureDescriptor.equalsAscii("update"))
|
||||
m_bRestored = sal_True; // a document was restored
|
||||
|
||||
}
|
||||
else if ( event.FeatureURL.Complete == "vnd.sun.star.autorecovery:/doSessionSave" )
|
||||
{
|
||||
if (event.FeatureDescriptor.compareToAscii("stop")==0)
|
||||
if (event.FeatureDescriptor.equalsAscii("stop"))
|
||||
{
|
||||
if (m_rSessionManager.is())
|
||||
m_rSessionManager->saveDone(this); // done with save
|
||||
|
||||
@@ -587,9 +587,9 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw (
|
||||
// load service with name <base>_<lang>_<country>
|
||||
createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).append(
|
||||
rLocale.Country).makeStringAndClear())) ||
|
||||
(l > 0 && c > 0 && rLocale.Language.compareToAscii("zh") == 0 &&
|
||||
(rLocale.Country.compareToAscii("HK") == 0 ||
|
||||
rLocale.Country.compareToAscii("MO") == 0) &&
|
||||
(l > 0 && c > 0 && rLocale.Language.equalsAscii("zh") &&
|
||||
(rLocale.Country.equalsAscii("HK") ||
|
||||
rLocale.Country.equalsAscii("MO") ) &&
|
||||
// if the country code is HK or MO, one more step to try TW.
|
||||
createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).appendAscii(
|
||||
"TW").makeStringAndClear())) ||
|
||||
|
||||
@@ -525,7 +525,7 @@ static
|
||||
int should_ignore( OUString s )
|
||||
{
|
||||
// return true if blank or null
|
||||
return s.compareToAscii(" ")==0 || (!s.isEmpty() && s[0]==0);
|
||||
return s.equalsAscii(" ") || (!s.isEmpty() && s[0]==0);
|
||||
}
|
||||
|
||||
static
|
||||
|
||||
@@ -184,7 +184,7 @@ IndexEntrySupplier::getImplementationName() throw( RuntimeException )
|
||||
sal_Bool SAL_CALL
|
||||
IndexEntrySupplier::supportsService(const OUString& rServiceName) throw( RuntimeException )
|
||||
{
|
||||
return rServiceName.compareToAscii(implementationName) == 0;
|
||||
return rServiceName.equalsAscii(implementationName);
|
||||
}
|
||||
|
||||
Sequence< OUString > SAL_CALL
|
||||
|
||||
@@ -126,7 +126,7 @@ IndexEntrySupplier_Common::getImplementationName() throw( RuntimeException )
|
||||
sal_Bool SAL_CALL
|
||||
IndexEntrySupplier_Common::supportsService(const OUString& rServiceName) throw( RuntimeException )
|
||||
{
|
||||
return rServiceName.compareToAscii(implementationName) == 0;
|
||||
return rServiceName.equalsAscii(implementationName);
|
||||
}
|
||||
|
||||
Sequence< OUString > SAL_CALL
|
||||
|
||||
@@ -1297,7 +1297,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const
|
||||
|
||||
for ( j = 0; j < getNumberOfChildren(); j++ ) {
|
||||
LocaleNode * currNode = getChildAt (j);
|
||||
if( currNode->getName().compareToAscii("Collator") == 0 )
|
||||
if( currNode->getName().equalsAscii("Collator") )
|
||||
{
|
||||
OUString str;
|
||||
str = currNode->getAttr().getValueByName("unoid");
|
||||
@@ -1310,7 +1310,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const
|
||||
|
||||
nbOfCollations++;
|
||||
}
|
||||
if( currNode->getName().compareToAscii("CollationOptions") == 0 )
|
||||
if( currNode->getName().equalsAscii("CollationOptions") )
|
||||
{
|
||||
LocaleNode* pCollationOptions = currNode;
|
||||
nbOfCollationOptions = sal::static_int_cast<sal_Int16>( pCollationOptions->getNumberOfChildren() );
|
||||
@@ -1411,7 +1411,7 @@ void LCIndexNode::generateCode (const OFileWriter &of) const
|
||||
sal_Int16 i;
|
||||
for (i = 0; i< getNumberOfChildren();i++) {
|
||||
LocaleNode * currNode = getChildAt (i);
|
||||
if( currNode->getName().compareToAscii("IndexKey") == 0 )
|
||||
if( currNode->getName().equalsAscii("IndexKey") )
|
||||
{
|
||||
OUString str;
|
||||
str = currNode->getAttr().getValueByName("unoid");
|
||||
@@ -1428,13 +1428,13 @@ void LCIndexNode::generateCode (const OFileWriter &of) const
|
||||
|
||||
nbOfIndexs++;
|
||||
}
|
||||
if( currNode->getName().compareToAscii("UnicodeScript") == 0 )
|
||||
if( currNode->getName().equalsAscii("UnicodeScript") )
|
||||
{
|
||||
of.writeParameter("unicodeScript", currNode->getValue(), nbOfUnicodeScripts );
|
||||
nbOfUnicodeScripts++;
|
||||
|
||||
}
|
||||
if( currNode->getName().compareToAscii("FollowPageWord") == 0 )
|
||||
if( currNode->getName().equalsAscii("FollowPageWord") )
|
||||
{
|
||||
of.writeParameter("followPageWord", currNode->getValue(), nbOfPageWords);
|
||||
nbOfPageWords++;
|
||||
|
||||
@@ -898,7 +898,7 @@ OUString SAL_CALL NativeNumberSupplier::getImplementationName() throw( RuntimeEx
|
||||
sal_Bool SAL_CALL
|
||||
NativeNumberSupplier::supportsService(const OUString& rServiceName) throw( RuntimeException )
|
||||
{
|
||||
return rServiceName.compareToAscii(implementationName) == 0;
|
||||
return rServiceName.equalsAscii(implementationName);
|
||||
}
|
||||
|
||||
Sequence< OUString > SAL_CALL
|
||||
|
||||
@@ -613,7 +613,7 @@ TransliterationImpl::loadModuleByName( const OUString& implName,
|
||||
|
||||
// if the module is ignore case/kana/width, load caseignore for equals/compareString mothed
|
||||
for (sal_Int16 i = 0; i < 3; i++) {
|
||||
if (implName.compareToAscii(TMlist[i].implName) == 0) {
|
||||
if (implName.equalsAscii(TMlist[i].implName)) {
|
||||
if (i == 0) // current module is caseignore
|
||||
body->loadModule(TMlist[0].tm, rLocale); // caseingore need to setup module name
|
||||
if (! caseignore.is()) {
|
||||
|
||||
@@ -115,13 +115,13 @@ Reference< XDispatch > SAL_CALL Addon::queryDispatch( const URL& aURL, const ::r
|
||||
throw( RuntimeException )
|
||||
{
|
||||
Reference < XDispatch > xRet;
|
||||
if ( aURL.Protocol.compareToAscii("org.openoffice.Office.addon.example:") == 0 )
|
||||
if ( aURL.Protocol.equalsAscii("org.openoffice.Office.addon.example:") )
|
||||
{
|
||||
if ( aURL.Path.compareToAscii( "Function1" ) == 0 )
|
||||
if ( aURL.Path.equalsAscii( "Function1" ) )
|
||||
xRet = this;
|
||||
else if ( aURL.Path.compareToAscii( "Function2" ) == 0 )
|
||||
else if ( aURL.Path.equalsAscii( "Function2" ) )
|
||||
xRet = this;
|
||||
else if ( aURL.Path.compareToAscii( "Help" ) == 0 )
|
||||
else if ( aURL.Path.equalsAscii( "Help" ) )
|
||||
xRet = this;
|
||||
}
|
||||
|
||||
@@ -134,21 +134,21 @@ Reference< XDispatch > SAL_CALL Addon::queryDispatch( const URL& aURL, const ::r
|
||||
*/
|
||||
void SAL_CALL Addon::dispatch( const URL& aURL, const Sequence < PropertyValue >& lArgs ) throw (RuntimeException)
|
||||
{
|
||||
if ( aURL.Protocol.compareToAscii("org.openoffice.Office.addon.example:") == 0 )
|
||||
if ( aURL.Protocol.equalsAscii("org.openoffice.Office.addon.example:") )
|
||||
{
|
||||
if ( aURL.Path.compareToAscii( "Function1" ) == 0 )
|
||||
if ( aURL.Path.equalsAscii( "Function1" ) )
|
||||
{
|
||||
ShowMessageBox( mxToolkit, mxFrame,
|
||||
OUString( "SDK Add-On example" ),
|
||||
OUString( "Function 1 activated" ) );
|
||||
}
|
||||
else if ( aURL.Path.compareToAscii( "Function2" ) == 0 )
|
||||
else if ( aURL.Path.equalsAscii( "Function2" ) )
|
||||
{
|
||||
ShowMessageBox( mxToolkit, mxFrame,
|
||||
OUString( "SDK Add-On example" ),
|
||||
OUString( "Function 2 activated" ) );
|
||||
}
|
||||
else if ( aURL.Path.compareToAscii( "Help" ) == 0 )
|
||||
else if ( aURL.Path.equalsAscii( "Help" ) )
|
||||
{
|
||||
// Show info box
|
||||
ShowMessageBox( mxToolkit, mxFrame,
|
||||
|
||||
@@ -128,7 +128,7 @@ ContextHandlerRef GraphicalObjectFrameContext::onCreateContext( sal_Int32 aEleme
|
||||
return new DiagramGraphicDataContext( *this, mpShapePtr );
|
||||
else if ( sUri == "http://schemas.openxmlformats.org/drawingml/2006/chart" )
|
||||
return new ChartGraphicDataContext( *this, mpShapePtr, mbEmbedShapesInChart );
|
||||
else if ( sUri.compareToAscii( "http://schemas.openxmlformats.org/drawingml/2006/table" ) == 0 )
|
||||
else if ( sUri.equalsAscii( "http://schemas.openxmlformats.org/drawingml/2006/table" ) )
|
||||
return new table::TableContext( *this, mpShapePtr );
|
||||
else
|
||||
{
|
||||
|
||||
@@ -119,7 +119,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
|
||||
OSL_TRACE( "Exception %s", OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
|
||||
}
|
||||
}
|
||||
else if ( sType.compareToAscii( "slidenum" ) == 0 )
|
||||
else if ( sType.equalsAscii( "slidenum" ) )
|
||||
{
|
||||
xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageNumber" );
|
||||
aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) );
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace oox { namespace ppt {
|
||||
Any GetTime( const OUString & val )
|
||||
{
|
||||
Any aDuration;
|
||||
if( val.compareToAscii( "indefinite" ) == 0 )
|
||||
if( val.equalsAscii( "indefinite" ) )
|
||||
{
|
||||
aDuration <<= Timing_INDEFINITE;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ Any GetTime( const OUString & val )
|
||||
Any GetTimeAnimateValueTime( const OUString & val )
|
||||
{
|
||||
Any aPercent;
|
||||
if( val.compareToAscii( "indefinite" ) == 0 )
|
||||
if( val.equalsAscii( "indefinite" ) )
|
||||
{
|
||||
aPercent <<= Timing_INDEFINITE;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace oox { namespace ppt {
|
||||
const ImplAttributeNameConversion *attrConv = gImplConversionList;
|
||||
while( attrConv->mpMSName != NULL )
|
||||
{
|
||||
if(msCurrentAttribute.compareToAscii( attrConv->mpMSName ) == 0 )
|
||||
if(msCurrentAttribute.equalsAscii( attrConv->mpMSName ) )
|
||||
{
|
||||
Attribute attr;
|
||||
attr.name = OUString::intern( attrConv->mpAPIName,
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace oox { namespace ppt {
|
||||
|
||||
while( p->mpName )
|
||||
{
|
||||
if( rName.compareToAscii( p->mpName ) == 0 )
|
||||
if( rName.equalsAscii( p->mpName ) )
|
||||
return p;
|
||||
|
||||
p++;
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace oox { namespace ppt {
|
||||
{
|
||||
nCommand = EffectCommands::PLAY;
|
||||
}
|
||||
else if( msCommand.compareToAscii( "playFrom" ) == 0 )
|
||||
else if( msCommand.equalsAscii( "playFrom" ) )
|
||||
{
|
||||
const OUString aMediaTime( msCommand.copy( 9, msCommand.getLength() - 10 ) );
|
||||
rtl_math_ConversionStatus eStatus;
|
||||
|
||||
@@ -49,13 +49,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL package2_component_getFactory(
|
||||
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
|
||||
uno::Reference< XSingleServiceFactory > xFactory;
|
||||
|
||||
if (ManifestReader::static_getImplementationName().compareToAscii( pImplName ) == 0)
|
||||
if (ManifestReader::static_getImplementationName().equalsAscii( pImplName ) )
|
||||
xFactory = ManifestReader::createServiceFactory ( xSMgr );
|
||||
else if (ManifestWriter::static_getImplementationName().compareToAscii( pImplName ) == 0)
|
||||
else if (ManifestWriter::static_getImplementationName().equalsAscii( pImplName ) )
|
||||
xFactory = ManifestWriter::createServiceFactory ( xSMgr );
|
||||
else if (ZipPackage::static_getImplementationName().compareToAscii( pImplName ) == 0)
|
||||
else if (ZipPackage::static_getImplementationName().equalsAscii( pImplName ) )
|
||||
xFactory = ZipPackage::createServiceFactory ( xSMgr );
|
||||
else if ( OZipFileAccess::impl_staticGetImplementationName().compareToAscii( pImplName ) == 0 )
|
||||
else if ( OZipFileAccess::impl_staticGetImplementationName().equalsAscii( pImplName ) )
|
||||
xFactory = ::cppu::createSingleFactory( xSMgr,
|
||||
OZipFileAccess::impl_staticGetImplementationName(),
|
||||
OZipFileAccess::impl_staticCreateSelfInstance,
|
||||
|
||||
@@ -695,7 +695,7 @@ void PADialog::UpdateDevice()
|
||||
OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) );
|
||||
if( !aToken.isEmpty() )
|
||||
{
|
||||
if( aToken.compareToAscii( "autoqueue" ) == 0 )
|
||||
if( aToken.equalsAscii( "autoqueue" ) )
|
||||
bAutoQueue = true;
|
||||
else if( aToken.startsWith("pdf=") )
|
||||
bPdf = true;
|
||||
|
||||
@@ -185,7 +185,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
|
||||
int i = 0;
|
||||
for( i = 0; i < pEnumDesc->nEnumValues ; i ++ )
|
||||
{
|
||||
if( (*((OUString *)&pEnumDesc->ppEnumNames[i])).compareToAscii( stringValue ) == 0 )
|
||||
if( (*((OUString *)&pEnumDesc->ppEnumNames[i])).equalsAscii( stringValue ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4181,7 +4181,7 @@ bool OReportController::impl_setPropertyAtControls_throw(const sal_uInt16 _nUndo
|
||||
void OReportController::impl_fillCustomShapeState_nothrow(const char* _pCustomShapeType,dbaui::FeatureState& _rState) const
|
||||
{
|
||||
_rState.bEnabled = isEditable();
|
||||
_rState.bChecked = getDesignView()->GetInsertObj() == OBJ_CUSTOMSHAPE && getDesignView()->GetInsertObjString().compareToAscii(_pCustomShapeType) == 0;
|
||||
_rState.bChecked = getDesignView()->GetInsertObj() == OBJ_CUSTOMSHAPE && getDesignView()->GetInsertObjString().equalsAscii(_pCustomShapeType);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace rtl_Bootstrap
|
||||
aBootstrap.getFrom( suValuename, suValue );
|
||||
sal_Char * pStr = getenv("ENABLE_JAVA");
|
||||
// printUString( suGetname );
|
||||
CPPUNIT_ASSERT_MESSAGE("get the value of environment variable.", suValue.compareToAscii( pStr ) == 0 );
|
||||
CPPUNIT_ASSERT_MESSAGE("get the value of environment variable.", suValue.equalsAscii( pStr ) );
|
||||
}
|
||||
/* Notes on Windows:
|
||||
void getFrom_001_1()
|
||||
@@ -219,7 +219,7 @@ namespace rtl_Bootstrap
|
||||
aBootstrap.getFrom( suValuename, suValue );
|
||||
sal_Char * pStr = getenv("SRC_ROOT");
|
||||
// printUString( suGetname );
|
||||
CPPUNIT_ASSERT_MESSAGE("get the value of environment variable.", suValue.compareToAscii( pStr ) == 0 );
|
||||
CPPUNIT_ASSERT_MESSAGE("get the value of environment variable.", suValue.equalsAscii( pStr ) );
|
||||
}
|
||||
The result on Windows:
|
||||
# # the SRC_ROOT is e:\Qadev\cvs\m19
|
||||
|
||||
@@ -860,7 +860,7 @@ ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport,
|
||||
if (sValue.getLength() > 8)
|
||||
{
|
||||
OUString sTemp = sValue.copy(0, 8);
|
||||
if (sTemp.compareToAscii(SC_USERLIST) == 0)
|
||||
if (sTemp.equalsAscii(SC_USERLIST))
|
||||
{
|
||||
pDatabaseRangeContext->SetSubTotalsEnabledUserList(true);
|
||||
sTemp = sValue.copy(8);
|
||||
|
||||
@@ -387,9 +387,9 @@ void ScXMLConditionContext::GetOperator(
|
||||
rParam.bRegExp = true;
|
||||
rEntry.eOp = SC_NOT_EQUAL;
|
||||
}
|
||||
else if (aOpStr.compareToAscii("=") == 0)
|
||||
else if (aOpStr.equalsAscii("="))
|
||||
rEntry.eOp = SC_EQUAL;
|
||||
else if (aOpStr.compareToAscii("!=") == 0)
|
||||
else if (aOpStr.equalsAscii("!="))
|
||||
rEntry.eOp = SC_NOT_EQUAL;
|
||||
else if (IsXMLToken(aOpStr, XML_BOTTOM_PERCENT))
|
||||
rEntry.eOp = SC_BOTPERC;
|
||||
@@ -397,13 +397,13 @@ void ScXMLConditionContext::GetOperator(
|
||||
rEntry.eOp = SC_BOTVAL;
|
||||
else if (IsXMLToken(aOpStr, XML_EMPTY))
|
||||
rEntry.SetQueryByEmpty();
|
||||
else if (aOpStr.compareToAscii(">") == 0)
|
||||
else if (aOpStr.equalsAscii(">"))
|
||||
rEntry.eOp = SC_GREATER;
|
||||
else if (aOpStr.compareToAscii(">=") == 0)
|
||||
else if (aOpStr.equalsAscii(">="))
|
||||
rEntry.eOp = SC_GREATER_EQUAL;
|
||||
else if (aOpStr.compareToAscii("<") == 0)
|
||||
else if (aOpStr.equalsAscii("<"))
|
||||
rEntry.eOp = SC_LESS;
|
||||
else if (aOpStr.compareToAscii("<=") == 0)
|
||||
else if (aOpStr.equalsAscii("<="))
|
||||
rEntry.eOp = SC_LESS_EQUAL;
|
||||
else if (IsXMLToken(aOpStr, XML_NOEMPTY))
|
||||
rEntry.SetQueryByNonEmpty();
|
||||
@@ -827,21 +827,21 @@ void ScXMLDPConditionContext::getOperatorXML(
|
||||
bUseRegularExpressions = true;
|
||||
aFilterOperator = SC_NOT_EQUAL;
|
||||
}
|
||||
else if (sTempOperator.compareToAscii("=") == 0)
|
||||
else if (sTempOperator.equalsAscii("="))
|
||||
aFilterOperator = SC_EQUAL;
|
||||
else if (sTempOperator.compareToAscii("!=") == 0)
|
||||
else if (sTempOperator.equalsAscii("!="))
|
||||
aFilterOperator = SC_NOT_EQUAL;
|
||||
else if (IsXMLToken(sTempOperator, XML_BOTTOM_PERCENT))
|
||||
aFilterOperator = SC_BOTPERC;
|
||||
else if (IsXMLToken(sTempOperator, XML_BOTTOM_VALUES))
|
||||
aFilterOperator = SC_BOTVAL;
|
||||
else if (sTempOperator.compareToAscii(">") == 0)
|
||||
else if (sTempOperator.equalsAscii(">"))
|
||||
aFilterOperator = SC_GREATER;
|
||||
else if (sTempOperator.compareToAscii(">=") == 0)
|
||||
else if (sTempOperator.equalsAscii(">="))
|
||||
aFilterOperator = SC_GREATER_EQUAL;
|
||||
else if (sTempOperator.compareToAscii("<") == 0)
|
||||
else if (sTempOperator.equalsAscii("<"))
|
||||
aFilterOperator = SC_LESS;
|
||||
else if (sTempOperator.compareToAscii("<=") == 0)
|
||||
else if (sTempOperator.equalsAscii("<="))
|
||||
aFilterOperator = SC_LESS_EQUAL;
|
||||
else if (IsXMLToken(sTempOperator, XML_TOP_PERCENT))
|
||||
aFilterOperator = SC_TOPPERC;
|
||||
|
||||
@@ -2444,20 +2444,20 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
|
||||
for (sal_Int32 i = 0; i < nCount; ++i)
|
||||
{
|
||||
OUString sName(rChangeProps[i].Name);
|
||||
if (sName.compareToAscii("ShowChanges") == 0)
|
||||
if (sName.equalsAscii("ShowChanges"))
|
||||
pViewSettings->SetShowChanges(::cppu::any2bool(rChangeProps[i].Value));
|
||||
else if (sName.compareToAscii("ShowAcceptedChanges") == 0)
|
||||
else if (sName.equalsAscii("ShowAcceptedChanges"))
|
||||
pViewSettings->SetShowAccepted(::cppu::any2bool(rChangeProps[i].Value));
|
||||
else if (sName.compareToAscii("ShowRejectedChanges") == 0)
|
||||
else if (sName.equalsAscii("ShowRejectedChanges"))
|
||||
pViewSettings->SetShowRejected(::cppu::any2bool(rChangeProps[i].Value));
|
||||
else if (sName.compareToAscii("ShowChangesByDatetime") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByDatetime"))
|
||||
pViewSettings->SetHasDate(::cppu::any2bool(rChangeProps[i].Value));
|
||||
else if (sName.compareToAscii("ShowChangesByDatetimeMode") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByDatetimeMode"))
|
||||
{
|
||||
if (rChangeProps[i].Value >>= nTemp16)
|
||||
pViewSettings->SetTheDateMode(ScChgsDateMode(nTemp16));
|
||||
}
|
||||
else if (sName.compareToAscii("ShowChangesByDatetimeFirstDatetime") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByDatetimeFirstDatetime"))
|
||||
{
|
||||
util::DateTime aDateTime;
|
||||
if (rChangeProps[i].Value >>= aDateTime)
|
||||
@@ -2467,7 +2467,7 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
|
||||
pViewSettings->SetTheFirstDateTime(aCoreDateTime);
|
||||
}
|
||||
}
|
||||
else if (sName.compareToAscii("ShowChangesByDatetimeSecondDatetime") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByDatetimeSecondDatetime"))
|
||||
{
|
||||
util::DateTime aDateTime;
|
||||
if (rChangeProps[i].Value >>= aDateTime)
|
||||
@@ -2477,9 +2477,9 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
|
||||
pViewSettings->SetTheLastDateTime(aCoreDateTime);
|
||||
}
|
||||
}
|
||||
else if (sName.compareToAscii("ShowChangesByAuthor") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByAuthor"))
|
||||
pViewSettings->SetHasAuthor(::cppu::any2bool(rChangeProps[i].Value));
|
||||
else if (sName.compareToAscii("ShowChangesByAuthorName") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByAuthorName"))
|
||||
{
|
||||
OUString sOUName;
|
||||
if (rChangeProps[i].Value >>= sOUName)
|
||||
@@ -2488,9 +2488,9 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
|
||||
pViewSettings->SetTheAuthorToShow(sAuthorName);
|
||||
}
|
||||
}
|
||||
else if (sName.compareToAscii("ShowChangesByComment") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByComment"))
|
||||
pViewSettings->SetHasComment(::cppu::any2bool(rChangeProps[i].Value));
|
||||
else if (sName.compareToAscii("ShowChangesByCommentText") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByCommentText"))
|
||||
{
|
||||
OUString sOUComment;
|
||||
if (rChangeProps[i].Value >>= sOUComment)
|
||||
@@ -2499,9 +2499,9 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
|
||||
pViewSettings->SetTheComment(sComment);
|
||||
}
|
||||
}
|
||||
else if (sName.compareToAscii("ShowChangesByRanges") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByRanges"))
|
||||
pViewSettings->SetHasRange(::cppu::any2bool(rChangeProps[i].Value));
|
||||
else if (sName.compareToAscii("ShowChangesByRangesList") == 0)
|
||||
else if (sName.equalsAscii("ShowChangesByRangesList"))
|
||||
{
|
||||
OUString sRanges;
|
||||
if ((rChangeProps[i].Value >>= sRanges) && !sRanges.isEmpty())
|
||||
@@ -2528,15 +2528,15 @@ void ScXMLImport::SetViewSettings(const uno::Sequence<beans::PropertyValue>& aVi
|
||||
for (sal_Int32 i = 0; i < nCount; ++i)
|
||||
{
|
||||
OUString sName(aViewProps[i].Name);
|
||||
if (sName.compareToAscii("VisibleAreaHeight") == 0)
|
||||
if (sName.equalsAscii("VisibleAreaHeight"))
|
||||
aViewProps[i].Value >>= nHeight;
|
||||
else if (sName.compareToAscii("VisibleAreaLeft") == 0)
|
||||
else if (sName.equalsAscii("VisibleAreaLeft"))
|
||||
aViewProps[i].Value >>= nLeft;
|
||||
else if (sName.compareToAscii("VisibleAreaTop") == 0)
|
||||
else if (sName.equalsAscii("VisibleAreaTop"))
|
||||
aViewProps[i].Value >>= nTop;
|
||||
else if (sName.compareToAscii("VisibleAreaWidth") == 0)
|
||||
else if (sName.equalsAscii("VisibleAreaWidth"))
|
||||
aViewProps[i].Value >>= nWidth;
|
||||
else if (sName.compareToAscii("TrackedChangesViewSettings") == 0)
|
||||
else if (sName.equalsAscii("TrackedChangesViewSettings"))
|
||||
{
|
||||
uno::Sequence<beans::PropertyValue> aChangeProps;
|
||||
if(aViewProps[i].Value >>= aChangeProps)
|
||||
@@ -3025,13 +3025,13 @@ sal_Int32 ScXMLImport::GetRangeType(const OUString sRangeType) const
|
||||
if ((i == sRangeType.getLength()) || (sRangeType[i] == ' '))
|
||||
{
|
||||
OUString sTemp = sBuffer.makeStringAndClear();
|
||||
if (sTemp.compareToAscii(SC_REPEAT_COLUMN) == 0)
|
||||
if (sTemp.equalsAscii(SC_REPEAT_COLUMN))
|
||||
nRangeType |= sheet::NamedRangeFlag::COLUMN_HEADER;
|
||||
else if (sTemp.compareToAscii(SC_REPEAT_ROW) == 0)
|
||||
else if (sTemp.equalsAscii(SC_REPEAT_ROW))
|
||||
nRangeType |= sheet::NamedRangeFlag::ROW_HEADER;
|
||||
else if (sTemp.compareToAscii(SC_FILTER) == 0)
|
||||
else if (sTemp.equalsAscii(SC_FILTER))
|
||||
nRangeType |= sheet::NamedRangeFlag::FILTER_CRITERIA;
|
||||
else if (sTemp.compareToAscii(SC_PRINT_RANGE) == 0)
|
||||
else if (sTemp.equalsAscii(SC_PRINT_RANGE))
|
||||
nRangeType |= sheet::NamedRangeFlag::PRINT_AREA;
|
||||
}
|
||||
else if (i < sRangeType.getLength())
|
||||
@@ -3219,7 +3219,7 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE
|
||||
for (sal_Int32 i = 0; i < nCount; ++i)
|
||||
{
|
||||
OUString sName(aSeq[i].Name);
|
||||
if (sName.compareToAscii(SC_ACTIVETABLE) == 0)
|
||||
if (sName.equalsAscii(SC_ACTIVETABLE))
|
||||
{
|
||||
OUString sValue;
|
||||
if(aSeq[i].Value >>= sValue)
|
||||
|
||||
@@ -179,7 +179,7 @@ void ScXMLSortContext::AddSortField(const OUString& sFieldNumber, const OUString
|
||||
if (sDataType.getLength() > 8)
|
||||
{
|
||||
OUString sTemp = sDataType.copy(0, 8);
|
||||
if (sTemp.compareToAscii(SC_USERLIST) == 0)
|
||||
if (sTemp.equalsAscii(SC_USERLIST))
|
||||
{
|
||||
bEnabledUserList = true;
|
||||
sTemp = sDataType.copy(8);
|
||||
|
||||
@@ -137,17 +137,17 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
|
||||
ScViewOptions aViewOpt(pDoc->GetViewOptions());
|
||||
|
||||
/*Stampit enable/disable print cancel */
|
||||
if ( aPropertyName.compareToAscii( SC_UNO_ALLOWPRINTJOBCANCEL ) == 0 )
|
||||
if ( aPropertyName.equalsAscii( SC_UNO_ALLOWPRINTJOBCANCEL ) )
|
||||
pDocShell->Stamp_SetPrintCancelState( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
/*Stampit enable/disable print cancel */
|
||||
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHOWZERO ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHOWZERO ) )
|
||||
aViewOpt.SetOption(VOPT_NULLVALS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHOWNOTES ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHOWNOTES ) )
|
||||
aViewOpt.SetOption(VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHOWGRID ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHOWGRID ) )
|
||||
aViewOpt.SetOption(VOPT_GRID, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_GRIDCOLOR ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_GRIDCOLOR ) )
|
||||
{
|
||||
sal_Int64 nColor = 0;
|
||||
if (aValue >>= nColor)
|
||||
@@ -157,19 +157,19 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
|
||||
aViewOpt.SetGridColor(aColor, aColorName);
|
||||
}
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHOWPAGEBR ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHOWPAGEBR ) )
|
||||
aViewOpt.SetOption(VOPT_PAGEBREAKS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNONAME_LINKUPD ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNONAME_LINKUPD ) )
|
||||
pDoc->SetLinkMode( static_cast<ScLkUpdMode> ( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_COLROWHDR ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_COLROWHDR ) )
|
||||
aViewOpt.SetOption(VOPT_HEADER, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHEETTABS ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHEETTABS ) )
|
||||
aViewOpt.SetOption(VOPT_TABCONTROLS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_OUTLSYMB ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_OUTLSYMB ) )
|
||||
aViewOpt.SetOption(VOPT_OUTLINER, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_AUTOCALC ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_AUTOCALC ) )
|
||||
pDoc->SetAutoCalc( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_PRINTERNAME ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_PRINTERNAME ) )
|
||||
{
|
||||
OUString sPrinterName;
|
||||
if ( aValue >>= sPrinterName )
|
||||
@@ -196,7 +196,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
|
||||
else
|
||||
throw lang::IllegalArgumentException();
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_PRINTERSETUP ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_PRINTERSETUP ) )
|
||||
{
|
||||
uno::Sequence<sal_Int8> aSequence;
|
||||
if ( aValue >>= aSequence )
|
||||
@@ -217,47 +217,47 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_APPLYDOCINF ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_APPLYDOCINF ) )
|
||||
{
|
||||
sal_Bool bTmp=sal_True;
|
||||
if ( aValue >>= bTmp )
|
||||
pDocShell->SetUseUserData( bTmp );
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_FORBIDDEN ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_FORBIDDEN ) )
|
||||
{
|
||||
// read-only - should not be set
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_CHARCOMP ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_CHARCOMP ) )
|
||||
{
|
||||
// Int16 contains CharacterCompressionType values
|
||||
sal_Int16 nUno = ScUnoHelpFunctions::GetInt16FromAny( aValue );
|
||||
pDoc->SetAsianCompression( (sal_uInt8) nUno );
|
||||
bUpdateHeights = sal_True;
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_ASIANKERN ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_ASIANKERN ) )
|
||||
{
|
||||
pDoc->SetAsianKerning( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
bUpdateHeights = sal_True;
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SCSAVEVERSION ) == 0)
|
||||
else if ( aPropertyName.equalsAscii( SCSAVEVERSION ) )
|
||||
{
|
||||
sal_Bool bTmp=false;
|
||||
if ( aValue >>= bTmp )
|
||||
pDocShell->SetSaveVersionOnClose( bTmp );
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_UPDTEMPL ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_UPDTEMPL ) )
|
||||
{
|
||||
sal_Bool bTmp=sal_True;
|
||||
if ( aValue >>= bTmp )
|
||||
pDocShell->SetQueryLoadTemplate( bTmp );
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_LOADREADONLY ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_LOADREADONLY ) )
|
||||
{
|
||||
sal_Bool bTmp=false;
|
||||
if ( aValue >>= bTmp )
|
||||
pDocShell->SetLoadReadonly( bTmp );
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHAREDOC ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHAREDOC ) )
|
||||
{
|
||||
#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
|
||||
sal_Bool bDocShared = false;
|
||||
@@ -267,7 +267,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_MODIFYPASSWORDINFO ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_MODIFYPASSWORDINFO ) )
|
||||
{
|
||||
uno::Sequence< beans::PropertyValue > aInfo;
|
||||
if ( !( aValue >>= aInfo ) )
|
||||
@@ -281,7 +281,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
|
||||
OUString( "The hash is not allowed to be changed now!" ),
|
||||
uno::Reference< uno::XInterface >() );
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_EMBED_FONTS ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_EMBED_FONTS ) )
|
||||
{
|
||||
sal_Bool bVal = sal_False;
|
||||
if ( aValue >>=bVal )
|
||||
@@ -293,19 +293,19 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
|
||||
else
|
||||
{
|
||||
ScGridOptions aGridOpt(aViewOpt.GetGridOptions());
|
||||
if ( aPropertyName.compareToAscii( SC_UNO_SNAPTORASTER ) == 0 )
|
||||
if ( aPropertyName.equalsAscii( SC_UNO_SNAPTORASTER ) )
|
||||
aGridOpt.SetUseGridSnap( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERVIS ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERVIS ) )
|
||||
aGridOpt.SetGridVisible( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERRESX ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERRESX ) )
|
||||
aGridOpt.SetFldDrawX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERRESY ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERRESY ) )
|
||||
aGridOpt.SetFldDrawY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERSUBX ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSUBX ) )
|
||||
aGridOpt.SetFldDivisionX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERSUBY ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSUBY ) )
|
||||
aGridOpt.SetFldDivisionY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERSYNC ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSYNC ) )
|
||||
aGridOpt.SetSynchronize( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else
|
||||
throw beans::UnknownPropertyException();
|
||||
@@ -345,35 +345,35 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
|
||||
const ScViewOptions& aViewOpt = pDoc->GetViewOptions();
|
||||
|
||||
/*Stampit enable/disable print cancel */
|
||||
if ( aPropertyName.compareToAscii( SC_UNO_ALLOWPRINTJOBCANCEL ) == 0 )
|
||||
if ( aPropertyName.equalsAscii( SC_UNO_ALLOWPRINTJOBCANCEL ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, pDocShell->Stamp_GetPrintCancelState() );
|
||||
/*Stampit enable/disable print cancel */
|
||||
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHOWZERO ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHOWZERO ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_NULLVALS ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHOWNOTES ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHOWNOTES ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_NOTES ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHOWGRID ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHOWGRID ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_GRID ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_GRIDCOLOR ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_GRIDCOLOR ) )
|
||||
{
|
||||
OUString aColorName;
|
||||
Color aColor = aViewOpt.GetGridColor(&aColorName);
|
||||
aRet <<= static_cast<sal_Int64>(aColor.GetColor());
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHOWPAGEBR ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHOWPAGEBR ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_PAGEBREAKS ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNONAME_LINKUPD ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNONAME_LINKUPD ) )
|
||||
aRet <<= static_cast<sal_Int16> ( pDoc->GetLinkMode() );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_COLROWHDR ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_COLROWHDR ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_HEADER ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHEETTABS ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHEETTABS ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_TABCONTROLS ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_OUTLSYMB ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_OUTLSYMB ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_OUTLINER ) );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_AUTOCALC ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_AUTOCALC ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, pDoc->GetAutoCalc() );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_PRINTERNAME ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_PRINTERNAME ) )
|
||||
{
|
||||
// #i75610# don't create the printer, return empty string if no printer created yet
|
||||
// (as in SwXDocumentSettings)
|
||||
@@ -383,7 +383,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
|
||||
else
|
||||
aRet <<= OUString();
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_PRINTERSETUP ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_PRINTERSETUP ) )
|
||||
{
|
||||
// #i75610# don't create the printer, return empty sequence if no printer created yet
|
||||
// (as in SwXDocumentSettings)
|
||||
@@ -402,31 +402,31 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
|
||||
else
|
||||
aRet <<= uno::Sequence<sal_Int8>();
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_APPLYDOCINF ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_APPLYDOCINF ) )
|
||||
aRet <<= pDocShell->IsUseUserData();
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_FORBIDDEN ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_FORBIDDEN ) )
|
||||
{
|
||||
aRet <<= uno::Reference<i18n::XForbiddenCharacters>(new ScForbiddenCharsObj( pDocShell ));
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_CHARCOMP ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_CHARCOMP ) )
|
||||
aRet <<= static_cast<sal_Int16> ( pDoc->GetAsianCompression() );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_ASIANKERN ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_ASIANKERN ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, pDoc->GetAsianKerning() );
|
||||
else if ( aPropertyName.compareToAscii( SCSAVEVERSION ) == 0)
|
||||
else if ( aPropertyName.equalsAscii( SCSAVEVERSION ) )
|
||||
aRet <<= pDocShell->IsSaveVersionOnClose();
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_UPDTEMPL ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_UPDTEMPL ) )
|
||||
aRet <<= pDocShell->IsQueryLoadTemplate();
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_LOADREADONLY ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_LOADREADONLY ) )
|
||||
aRet <<= pDocShell->IsLoadReadonly();
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_SHAREDOC ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_SHAREDOC ) )
|
||||
{
|
||||
#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, pDocShell->HasSharedXMLFlagSet() );
|
||||
#endif
|
||||
}
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_MODIFYPASSWORDINFO ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_MODIFYPASSWORDINFO ) )
|
||||
aRet <<= pDocShell->GetModifyPasswordInfo();
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_EMBED_FONTS ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_EMBED_FONTS ) )
|
||||
{
|
||||
aRet <<= pDoc->IsUsingEmbededFonts();
|
||||
}
|
||||
@@ -434,19 +434,19 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
|
||||
else
|
||||
{
|
||||
const ScGridOptions& aGridOpt = aViewOpt.GetGridOptions();
|
||||
if ( aPropertyName.compareToAscii( SC_UNO_SNAPTORASTER ) == 0 )
|
||||
if ( aPropertyName.equalsAscii( SC_UNO_SNAPTORASTER ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aGridOpt.GetUseGridSnap() );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERVIS ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERVIS ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aGridOpt.GetGridVisible() );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERRESX ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERRESX ) )
|
||||
aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFldDrawX() );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERRESY ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERRESY ) )
|
||||
aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFldDrawY() );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERSUBX ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSUBX ) )
|
||||
aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFldDivisionX() );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERSUBY ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSUBY ) )
|
||||
aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFldDivisionY() );
|
||||
else if ( aPropertyName.compareToAscii( SC_UNO_RASTERSYNC ) == 0 )
|
||||
else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSYNC ) )
|
||||
ScUnoHelpFunctions::SetBoolInAny( aRet, aGridOpt.GetSynchronize() );
|
||||
else
|
||||
throw beans::UnknownPropertyException();
|
||||
|
||||
@@ -138,7 +138,7 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
|
||||
throw beans::UnknownPropertyException();
|
||||
if(!pEntry->nWID)
|
||||
{
|
||||
if(aPropertyName.compareToAscii(SC_UNO_STANDARDDEC) == 0)
|
||||
if(aPropertyName.equalsAscii(SC_UNO_STANDARDDEC) )
|
||||
{
|
||||
ScDocument* pDoc = pDocShell->GetDocument();
|
||||
if (pDoc)
|
||||
@@ -154,7 +154,7 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
|
||||
else
|
||||
throw uno::RuntimeException();
|
||||
}
|
||||
else if (aPropertyName.compareToAscii(SC_UNO_TABSTOPDIS) == 0)
|
||||
else if (aPropertyName.equalsAscii(SC_UNO_TABSTOPDIS) )
|
||||
{
|
||||
ScDocument* pDoc = pDocShell->GetDocument();
|
||||
if (pDoc)
|
||||
@@ -234,7 +234,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyValue( const OUString& aPropertyN
|
||||
|
||||
if (!pEntry->nWID)
|
||||
{
|
||||
if(aPropertyName.compareToAscii(SC_UNO_STANDARDDEC) == 0)
|
||||
if(aPropertyName.equalsAscii(SC_UNO_STANDARDDEC) )
|
||||
{
|
||||
ScDocument* pDoc = pDocShell->GetDocument();
|
||||
if (pDoc)
|
||||
@@ -250,7 +250,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyValue( const OUString& aPropertyN
|
||||
else
|
||||
throw uno::RuntimeException();
|
||||
}
|
||||
else if (aPropertyName.compareToAscii(SC_UNO_TABSTOPDIS) == 0)
|
||||
else if (aPropertyName.equalsAscii(SC_UNO_TABSTOPDIS) )
|
||||
{
|
||||
ScDocument* pDoc = pDocShell->GetDocument();
|
||||
if (pDoc)
|
||||
|
||||
@@ -2179,7 +2179,7 @@ void ScModelObj::NotifyChanges( const OUString& rOperation, const ScRangeList& r
|
||||
|
||||
// handle sheet events
|
||||
//! separate method with ScMarkData? Then change HasChangesListeners back.
|
||||
if ( rOperation.compareToAscii("cell-change") == 0 && pDocShell )
|
||||
if ( rOperation.equalsAscii("cell-change") && pDocShell )
|
||||
{
|
||||
ScMarkData aMarkData;
|
||||
aMarkData.MarkFromRangeList( rRanges, false );
|
||||
|
||||
@@ -94,7 +94,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno:
|
||||
for (sal_Int32 nPos=0; nPos<nPropCount; ++nPos)
|
||||
{
|
||||
const beans::PropertyValue& rProp = aPropSeq[nPos];
|
||||
if ( rProp.Name.compareToAscii( SC_UNO_EVENTTYPE ) == 0 )
|
||||
if ( rProp.Name.equalsAscii( SC_UNO_EVENTTYPE ) )
|
||||
{
|
||||
OUString aEventType;
|
||||
if ( rProp.Value >>= aEventType )
|
||||
@@ -104,7 +104,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno:
|
||||
throw lang::IllegalArgumentException();
|
||||
}
|
||||
}
|
||||
else if ( rProp.Name.compareToAscii( SC_UNO_SCRIPT ) == 0 )
|
||||
else if ( rProp.Name.equalsAscii( SC_UNO_SCRIPT ) )
|
||||
rProp.Value >>= aScript;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ ScVbaChartObject::setShape() throw ( script::BasicErrorException )
|
||||
for (int i = 0; i < nItems; i++)
|
||||
{
|
||||
xShape.set( xDrawPage->getByIndex(i), uno::UNO_QUERY_THROW );
|
||||
if (xShape->getShapeType().compareToAscii("com.sun.star.drawing.OLE2Shape") == 0 )
|
||||
if (xShape->getShapeType().equalsAscii("com.sun.star.drawing.OLE2Shape") )
|
||||
{
|
||||
uno::Reference< beans::XPropertySet > xShapePropertySet(xShape, uno::UNO_QUERY_THROW );
|
||||
OUString sName;
|
||||
|
||||
@@ -973,13 +973,13 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV
|
||||
for(sal_Int32 i = 0; i < nCount; i++, pSeq++)
|
||||
{
|
||||
OUString sName(pSeq->Name);
|
||||
if(sName.compareToAscii(SC_ZOOMVALUE) == 0)
|
||||
if(sName.equalsAscii(SC_ZOOMVALUE))
|
||||
{
|
||||
sal_Int32 nTemp = 0;
|
||||
if (pSeq->Value >>= nTemp)
|
||||
pPreview->SetZoom(sal_uInt16(nTemp));
|
||||
}
|
||||
else if (sName.compareToAscii("PageNumber") == 0)
|
||||
else if (sName.equalsAscii("PageNumber"))
|
||||
{
|
||||
sal_Int32 nTemp = 0;
|
||||
if (pSeq->Value >>= nTemp)
|
||||
|
||||
@@ -171,102 +171,102 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
|
||||
for (sal_Int32 i = 0; i < nCount; i++)
|
||||
{
|
||||
OUString sName(aSettings[i].Name);
|
||||
if (sName.compareToAscii(SC_CURSORPOSITIONX) == 0)
|
||||
if (sName.equalsAscii(SC_CURSORPOSITIONX) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp32;
|
||||
nCurX = SanitizeCol( static_cast<SCCOL>(nTemp32));
|
||||
}
|
||||
else if (sName.compareToAscii(SC_CURSORPOSITIONY) == 0)
|
||||
else if (sName.equalsAscii(SC_CURSORPOSITIONY) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp32;
|
||||
nCurY = SanitizeRow( static_cast<SCROW>(nTemp32));
|
||||
}
|
||||
else if (sName.compareToAscii(SC_HORIZONTALSPLITMODE) == 0)
|
||||
else if (sName.equalsAscii(SC_HORIZONTALSPLITMODE) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp16;
|
||||
eHSplitMode = static_cast<ScSplitMode>(nTemp16);
|
||||
}
|
||||
else if (sName.compareToAscii(SC_VERTICALSPLITMODE) == 0)
|
||||
else if (sName.equalsAscii(SC_VERTICALSPLITMODE) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp16;
|
||||
eVSplitMode = static_cast<ScSplitMode>(nTemp16);
|
||||
}
|
||||
else if (sName.compareToAscii(SC_HORIZONTALSPLITPOSITION) == 0)
|
||||
else if (sName.equalsAscii(SC_HORIZONTALSPLITPOSITION) )
|
||||
{
|
||||
aSettings[i].Value >>= nTempPosH;
|
||||
bHasHSplitInTwips = false;
|
||||
}
|
||||
else if (sName.compareToAscii(SC_VERTICALSPLITPOSITION) == 0)
|
||||
else if (sName.equalsAscii(SC_VERTICALSPLITPOSITION) )
|
||||
{
|
||||
aSettings[i].Value >>= nTempPosV;
|
||||
bHasVSplitInTwips = false;
|
||||
}
|
||||
else if (sName.compareToAscii(SC_HORIZONTALSPLITPOSITION_TWIPS) == 0)
|
||||
else if (sName.equalsAscii(SC_HORIZONTALSPLITPOSITION_TWIPS) )
|
||||
{
|
||||
aSettings[i].Value >>= nTempPosHTw;
|
||||
bHasHSplitInTwips = true;
|
||||
}
|
||||
else if (sName.compareToAscii(SC_VERTICALSPLITPOSITION_TWIPS) == 0)
|
||||
else if (sName.equalsAscii(SC_VERTICALSPLITPOSITION_TWIPS) )
|
||||
{
|
||||
aSettings[i].Value >>= nTempPosVTw;
|
||||
bHasVSplitInTwips = true;
|
||||
}
|
||||
else if (sName.compareToAscii(SC_ACTIVESPLITRANGE) == 0)
|
||||
else if (sName.equalsAscii(SC_ACTIVESPLITRANGE) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp16;
|
||||
eWhichActive = static_cast<ScSplitPos>(nTemp16);
|
||||
}
|
||||
else if (sName.compareToAscii(SC_POSITIONLEFT) == 0)
|
||||
else if (sName.equalsAscii(SC_POSITIONLEFT) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp32;
|
||||
nPosX[SC_SPLIT_LEFT] = SanitizeCol( static_cast<SCCOL>(nTemp32));
|
||||
}
|
||||
else if (sName.compareToAscii(SC_POSITIONRIGHT) == 0)
|
||||
else if (sName.equalsAscii(SC_POSITIONRIGHT) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp32;
|
||||
nPosX[SC_SPLIT_RIGHT] = SanitizeCol( static_cast<SCCOL>(nTemp32));
|
||||
}
|
||||
else if (sName.compareToAscii(SC_POSITIONTOP) == 0)
|
||||
else if (sName.equalsAscii(SC_POSITIONTOP) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp32;
|
||||
nPosY[SC_SPLIT_TOP] = SanitizeRow( static_cast<SCROW>(nTemp32));
|
||||
}
|
||||
else if (sName.compareToAscii(SC_POSITIONBOTTOM) == 0)
|
||||
else if (sName.equalsAscii(SC_POSITIONBOTTOM) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp32;
|
||||
nPosY[SC_SPLIT_BOTTOM] = SanitizeRow( static_cast<SCROW>(nTemp32));
|
||||
}
|
||||
else if (sName.compareToAscii(SC_ZOOMTYPE) == 0)
|
||||
else if (sName.equalsAscii(SC_ZOOMTYPE) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp16;
|
||||
eZoomType = SvxZoomType(nTemp16);
|
||||
rHasZoom = true; // set if there is any zoom information
|
||||
}
|
||||
else if (sName.compareToAscii(SC_ZOOMVALUE) == 0)
|
||||
else if (sName.equalsAscii(SC_ZOOMVALUE) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp32;
|
||||
Fraction aZoom(nTemp32, 100);
|
||||
aZoomX = aZoomY = aZoom;
|
||||
rHasZoom = true;
|
||||
}
|
||||
else if (sName.compareToAscii(SC_PAGEVIEWZOOMVALUE) == 0)
|
||||
else if (sName.equalsAscii(SC_PAGEVIEWZOOMVALUE) )
|
||||
{
|
||||
aSettings[i].Value >>= nTemp32;
|
||||
Fraction aZoom(nTemp32, 100);
|
||||
aPageZoomX = aPageZoomY = aZoom;
|
||||
rHasZoom = true;
|
||||
}
|
||||
else if (sName.compareToAscii(SC_UNO_SHOWGRID) == 0)
|
||||
else if (sName.equalsAscii(SC_UNO_SHOWGRID) )
|
||||
{
|
||||
aSettings[i].Value >>= bShowGrid;
|
||||
}
|
||||
else if (sName.compareToAscii(SC_TABLESELECTED) == 0)
|
||||
else if (sName.equalsAscii(SC_TABLESELECTED) )
|
||||
{
|
||||
bool bSelected = false;
|
||||
aSettings[i].Value >>= bSelected;
|
||||
rViewData.GetMarkData().SelectTable( nTab, bSelected );
|
||||
}
|
||||
else if (sName.compareToAscii(SC_UNONAME_TABCOLOR) == 0)
|
||||
else if (sName.equalsAscii(SC_UNONAME_TABCOLOR) )
|
||||
{
|
||||
// There are documents out there that have their tab color defined as a view setting.
|
||||
sal_Int32 nColor = COL_AUTO;
|
||||
@@ -2719,7 +2719,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
|
||||
{
|
||||
// SC_VIEWID has to parse and use by mba
|
||||
OUString sName(rSettings[i].Name);
|
||||
if (sName.compareToAscii(SC_TABLES) == 0)
|
||||
if (sName.equalsAscii(SC_TABLES) )
|
||||
{
|
||||
uno::Reference<container::XNameContainer> xNameContainer;
|
||||
if ((rSettings[i].Value >>= xNameContainer) && xNameContainer->hasElements())
|
||||
@@ -2747,7 +2747,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sName.compareToAscii(SC_ACTIVETABLE) == 0)
|
||||
else if (sName.equalsAscii(SC_ACTIVETABLE) )
|
||||
{
|
||||
OUString sValue;
|
||||
if(rSettings[i].Value >>= sValue)
|
||||
@@ -2758,23 +2758,23 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
|
||||
nTabNo = nTab;
|
||||
}
|
||||
}
|
||||
else if (sName.compareToAscii(SC_HORIZONTALSCROLLBARWIDTH) == 0)
|
||||
else if (sName.equalsAscii(SC_HORIZONTALSCROLLBARWIDTH) )
|
||||
{
|
||||
if (rSettings[i].Value >>= nTemp32)
|
||||
pView->SetTabBarWidth(nTemp32);
|
||||
}
|
||||
else if (sName.compareToAscii(SC_RELHORIZONTALTABBARWIDTH) == 0)
|
||||
else if (sName.equalsAscii(SC_RELHORIZONTALTABBARWIDTH) )
|
||||
{
|
||||
double fWidth = 0.0;
|
||||
if (rSettings[i].Value >>= fWidth)
|
||||
pView->SetPendingRelTabBarWidth( fWidth );
|
||||
}
|
||||
else if (sName.compareToAscii(SC_ZOOMTYPE) == 0)
|
||||
else if (sName.equalsAscii(SC_ZOOMTYPE) )
|
||||
{
|
||||
if (rSettings[i].Value >>= nTemp16)
|
||||
eDefZoomType = SvxZoomType(nTemp16);
|
||||
}
|
||||
else if (sName.compareToAscii(SC_ZOOMVALUE) == 0)
|
||||
else if (sName.equalsAscii(SC_ZOOMVALUE) )
|
||||
{
|
||||
if (rSettings[i].Value >>= nTemp32)
|
||||
{
|
||||
@@ -2782,7 +2782,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
|
||||
aDefZoomX = aDefZoomY = aZoom;
|
||||
}
|
||||
}
|
||||
else if (sName.compareToAscii(SC_PAGEVIEWZOOMVALUE) == 0)
|
||||
else if (sName.equalsAscii(SC_PAGEVIEWZOOMVALUE) )
|
||||
{
|
||||
if (rSettings[i].Value >>= nTemp32)
|
||||
{
|
||||
@@ -2790,15 +2790,15 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
|
||||
aDefPageZoomX = aDefPageZoomY = aZoom;
|
||||
}
|
||||
}
|
||||
else if (sName.compareToAscii(SC_SHOWPAGEBREAKPREVIEW) == 0)
|
||||
else if (sName.equalsAscii(SC_SHOWPAGEBREAKPREVIEW) )
|
||||
bPageMode = ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value );
|
||||
else if ( sName.compareToAscii( SC_UNO_SHOWZERO ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_SHOWZERO ) )
|
||||
pOptions->SetOption(VOPT_NULLVALS, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_SHOWNOTES ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_SHOWNOTES ) )
|
||||
pOptions->SetOption(VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_SHOWGRID ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_SHOWGRID ) )
|
||||
pOptions->SetOption(VOPT_GRID, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_GRIDCOLOR ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_GRIDCOLOR ) )
|
||||
{
|
||||
sal_Int64 nColor = 0;
|
||||
if (rSettings[i].Value >>= nColor)
|
||||
@@ -2811,27 +2811,27 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
|
||||
pOptions->SetGridColor(aColor, aColorName);
|
||||
}
|
||||
}
|
||||
else if ( sName.compareToAscii( SC_UNO_SHOWPAGEBR ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_SHOWPAGEBR ) )
|
||||
pOptions->SetOption(VOPT_PAGEBREAKS, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_COLROWHDR ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_COLROWHDR ) )
|
||||
pOptions->SetOption(VOPT_HEADER, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_SHEETTABS ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_SHEETTABS ) )
|
||||
pOptions->SetOption(VOPT_TABCONTROLS, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_OUTLSYMB ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_OUTLSYMB ) )
|
||||
pOptions->SetOption(VOPT_OUTLINER, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_SHOWOBJ ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_SHOWOBJ ) )
|
||||
{
|
||||
// #i80528# placeholders not supported anymore
|
||||
if ( rSettings[i].Value >>= nTemp16 )
|
||||
pOptions->SetObjMode( VOBJ_TYPE_OLE, (nTemp16 == 1) ? VOBJ_MODE_HIDE : VOBJ_MODE_SHOW );
|
||||
}
|
||||
else if ( sName.compareToAscii( SC_UNO_SHOWCHARTS ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_SHOWCHARTS ) )
|
||||
{
|
||||
// #i80528# placeholders not supported anymore
|
||||
if ( rSettings[i].Value >>= nTemp16 )
|
||||
pOptions->SetObjMode( VOBJ_TYPE_CHART, (nTemp16 == 1) ? VOBJ_MODE_HIDE : VOBJ_MODE_SHOW );
|
||||
}
|
||||
else if ( sName.compareToAscii( SC_UNO_SHOWDRAW ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_SHOWDRAW ) )
|
||||
{
|
||||
// #i80528# placeholders not supported anymore
|
||||
if ( rSettings[i].Value >>= nTemp16 )
|
||||
@@ -2840,19 +2840,19 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
|
||||
else
|
||||
{
|
||||
ScGridOptions aGridOpt(pOptions->GetGridOptions());
|
||||
if ( sName.compareToAscii( SC_UNO_SNAPTORASTER ) == 0 )
|
||||
if ( sName.equalsAscii( SC_UNO_SNAPTORASTER ) )
|
||||
aGridOpt.SetUseGridSnap( ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_RASTERVIS ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_RASTERVIS ) )
|
||||
aGridOpt.SetGridVisible( ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_RASTERRESX ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_RASTERRESX ) )
|
||||
aGridOpt.SetFldDrawX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( rSettings[i].Value ) ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_RASTERRESY ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_RASTERRESY ))
|
||||
aGridOpt.SetFldDrawY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( rSettings[i].Value ) ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_RASTERSUBX ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_RASTERSUBX ) )
|
||||
aGridOpt.SetFldDivisionX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( rSettings[i].Value ) ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_RASTERSUBY ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_RASTERSUBY ) )
|
||||
aGridOpt.SetFldDivisionY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( rSettings[i].Value ) ) );
|
||||
else if ( sName.compareToAscii( SC_UNO_RASTERSYNC ) == 0 )
|
||||
else if ( sName.equalsAscii( SC_UNO_RASTERSYNC ) )
|
||||
aGridOpt.SetSynchronize( ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
|
||||
pOptions->SetGridOptions(aGridOpt);
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ OUString SAL_CALL AnalysisAddIn::getImplementationName() throw( uno::RuntimeExce
|
||||
|
||||
sal_Bool SAL_CALL AnalysisAddIn::supportsService( const OUString& aName ) throw( uno::RuntimeException )
|
||||
{
|
||||
return aName.compareToAscii( ADDIN_SERVICE ) == 0 || aName.compareToAscii( MY_SERVICE ) == 0;
|
||||
return aName.equalsAscii( ADDIN_SERVICE ) || aName.equalsAscii( MY_SERVICE );
|
||||
}
|
||||
|
||||
|
||||
@@ -1284,7 +1284,7 @@ OUString SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const uno::An
|
||||
case uno::TypeClass_STRING:
|
||||
{
|
||||
const OUString* pSuff = ( const OUString* ) rSuff.getValue();
|
||||
bi = pSuff->compareToAscii( "i" ) == 0 || pSuff->isEmpty();
|
||||
bi = pSuff->equalsAscii( "i" ) || pSuff->isEmpty();
|
||||
if( !bi && pSuff->compareToAscii( "j" ) != 0 )
|
||||
throw lang::IllegalArgumentException();
|
||||
}
|
||||
|
||||
@@ -612,24 +612,24 @@ bool getinput_greek(bs::types::Greeks& greek, const uno::Any& anyval) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(str.compareToAscii("value")==0 || str.compareToAscii("price")==0 ||
|
||||
str.compareToAscii("v")==0 || str.compareToAscii("p")==0 ) {
|
||||
if(str.equalsAscii("value") || str.equalsAscii("price") ||
|
||||
str.equalsAscii("v") || str.equalsAscii("p") ) {
|
||||
greek=bs::types::Value;
|
||||
} else if(str.compareToAscii("delta")==0||str.compareToAscii("d")==0) {
|
||||
} else if(str.equalsAscii("delta") || str.equalsAscii("d")) {
|
||||
greek=bs::types::Delta;
|
||||
} else if(str.compareToAscii("gamma")==0||str.compareToAscii("g")==0) {
|
||||
} else if(str.equalsAscii("gamma") || str.equalsAscii("g")) {
|
||||
greek=bs::types::Gamma;
|
||||
} else if(str.compareToAscii("theta")==0||str.compareToAscii("t")==0) {
|
||||
} else if(str.equalsAscii("theta") || str.equalsAscii("t")) {
|
||||
greek=bs::types::Theta;
|
||||
} else if(str.compareToAscii("vega")==0||str.compareToAscii("e")==0) {
|
||||
} else if(str.equalsAscii("vega") || str.equalsAscii("e")) {
|
||||
greek=bs::types::Vega;
|
||||
} else if(str.compareToAscii("volga")==0||str.compareToAscii("o")==0) {
|
||||
} else if(str.equalsAscii("volga") || str.equalsAscii("o")) {
|
||||
greek=bs::types::Volga;
|
||||
} else if(str.compareToAscii("vanna")==0||str.compareToAscii("a")==0) {
|
||||
} else if(str.equalsAscii("vanna") || str.equalsAscii("a")) {
|
||||
greek=bs::types::Vanna;
|
||||
} else if(str.compareToAscii("rho")==0||str.compareToAscii("r")==0) {
|
||||
} else if(str.equalsAscii("rho") || str.equalsAscii("r")) {
|
||||
greek=bs::types::Rho_d;
|
||||
} else if(str.compareToAscii("rhof")==0||str.compareToAscii("f")==0) {
|
||||
} else if(str.equalsAscii("rhof") || str.equalsAscii("f")) {
|
||||
greek=bs::types::Rho_f;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@@ -527,7 +527,7 @@ namespace dlgprov
|
||||
OUString sScriptURL;
|
||||
OUString sScriptCode( aScriptEvent.ScriptCode );
|
||||
|
||||
if ( aScriptEvent.ScriptType.compareToAscii( "StarBasic" ) == 0 )
|
||||
if ( aScriptEvent.ScriptType.equalsAscii( "StarBasic" ) )
|
||||
{
|
||||
// StarBasic script: convert ScriptCode to scriptURL
|
||||
sal_Int32 nIndex = sScriptCode.indexOf( ':' );
|
||||
|
||||
@@ -98,7 +98,7 @@ void ImplTranslateAttribute( OUString& rString, const TranslateMode eTranslateMo
|
||||
const ImplAttributeNameConversion* p = gImplConversionList;
|
||||
while( p->mpAPIName )
|
||||
{
|
||||
if( rString.compareToAscii( p->mpAPIName ) == 0 )
|
||||
if( rString.equalsAscii( p->mpAPIName ) )
|
||||
break;
|
||||
p++;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ const transition* transition::find( const OUString& rName )
|
||||
|
||||
while( p->mpName )
|
||||
{
|
||||
if( rName.compareToAscii( p->mpName ) == 0 )
|
||||
if( rName.equalsAscii( p->mpName ) )
|
||||
return p;
|
||||
|
||||
p++;
|
||||
@@ -698,7 +698,7 @@ bool AnimationImporter::convertAnimationNode( const Reference< XAnimationNode >&
|
||||
{
|
||||
while( p->mpMSName )
|
||||
{
|
||||
if( aAttributeName.compareToAscii( p->mpMSName ) == 0 )
|
||||
if( aAttributeName.equalsAscii( p->mpMSName ) )
|
||||
break;
|
||||
|
||||
p++;
|
||||
|
||||
@@ -807,9 +807,9 @@ void AssistentDlgImpl::ScanDocmenu (void)
|
||||
OUString sFactoryName;
|
||||
for( sal_Int32 i=0; i<nPropCount; ++i )
|
||||
{
|
||||
if( lProps[i].Name.compareToAscii( "DocumentService" ) == 0 &&
|
||||
if( lProps[i].Name.equalsAscii( "DocumentService" ) &&
|
||||
(lProps[i].Value >>= sFactoryName) &&
|
||||
sFactoryName.compareToAscii( "com.sun.star.presentation.PresentationDocument" ) == 0 )
|
||||
sFactoryName.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) )
|
||||
{
|
||||
// yes, it's an impress document
|
||||
INetURLObject aURL;
|
||||
|
||||
@@ -270,7 +270,7 @@ void FullScreenPane::ExtractArguments (
|
||||
const OUString sKey = aToken.copy(0, nAssign);
|
||||
const OUString sValue = aToken.copy(nAssign+1);
|
||||
|
||||
if (sKey.compareToAscii("ScreenNumber") == 0)
|
||||
if (sKey.equalsAscii("ScreenNumber"))
|
||||
{
|
||||
rnScreenNumberReturnValue = sValue.toInt32();
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ sal_Bool ExportTo( uno::Reference< drawing::XDrawPage>& aNotesPage, OUString aUr
|
||||
for ( sal_Int32 nFilterProp = 0; nFilterProp<nFilterProps; nFilterProp++ )
|
||||
{
|
||||
const beans::PropertyValue& rFilterProp = aProps[nFilterProp];
|
||||
if ( rFilterProp.Name.compareToAscii("FilterService") == 0 )
|
||||
if ( rFilterProp.Name.equalsAscii("FilterService") )
|
||||
{
|
||||
rFilterProp.Value >>= aFilterImplName;
|
||||
break;
|
||||
|
||||
@@ -55,9 +55,9 @@ Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizer::queryDispat
|
||||
const URL& aURL, const OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException )
|
||||
{
|
||||
Reference < XDispatch > xRet;
|
||||
if ( aURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) == 0 )
|
||||
if ( aURL.Protocol.equalsAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) )
|
||||
{
|
||||
// if ( aURL.Path.compareToAscii( "Function1" ) == 0 )
|
||||
// if ( aURL.Path.equalsAscii( "Function1" ) )
|
||||
xRet = this;
|
||||
}
|
||||
return xRet;
|
||||
@@ -85,9 +85,9 @@ Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizer:
|
||||
void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyValue >& lArguments )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
if ( mxController.is() && ( rURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) == 0 ) )
|
||||
if ( mxController.is() && rURL.Protocol.equalsAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) )
|
||||
{
|
||||
if ( rURL.Path.compareToAscii( "optimize" ) == 0 )
|
||||
if ( rURL.Path.equalsAscii( "optimize" ) )
|
||||
{
|
||||
Reference< XModel > xModel( mxController->getModel() );
|
||||
if ( xModel.is() )
|
||||
|
||||
@@ -92,7 +92,7 @@ Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::query
|
||||
const URL& aURL, const OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException )
|
||||
{
|
||||
Reference < XDispatch > xRet;
|
||||
if ( aURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.PresentationMinimizer:" ) == 0 )
|
||||
if ( aURL.Protocol.equalsAscii( "vnd.com.sun.star.comp.PresentationMinimizer:" ) )
|
||||
xRet = this;
|
||||
|
||||
return xRet;
|
||||
@@ -122,9 +122,9 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
|
||||
throw( RuntimeException )
|
||||
{
|
||||
|
||||
if ( mxController.is() && ( rURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.PresentationMinimizer:" ) == 0 ) )
|
||||
if ( mxController.is() && rURL.Protocol.equalsAscii( "vnd.com.sun.star.comp.PresentationMinimizer:" ) )
|
||||
{
|
||||
if ( rURL.Path.compareToAscii( "execute" ) == 0 )
|
||||
if ( rURL.Path.equalsAscii( "execute" ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -157,7 +157,7 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
|
||||
|
||||
}
|
||||
}
|
||||
else if ( rURL.Path.compareToAscii( "statusupdate" ) == 0 )
|
||||
else if ( rURL.Path.equalsAscii( "statusupdate" ) )
|
||||
{
|
||||
if ( mpOptimizerDialog )
|
||||
mpOptimizerDialog->UpdateStatus( rArguments );
|
||||
|
||||
@@ -158,8 +158,7 @@ namespace {
|
||||
const OUString& MethodName ) throw (lang::WrappedTargetException, uno::RuntimeException)
|
||||
{
|
||||
(void)MethodName;
|
||||
OSL_ENSURE( MethodName.compareToAscii("SelectionChanged") == 0,
|
||||
"Invalid event name" );
|
||||
OSL_ENSURE( MethodName.equalsAscii("SelectionChanged"), "Invalid event name" );
|
||||
selectionChanged(getSelectedItem());
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace
|
||||
|
||||
const char* sExportString = "m53570 7650-35430 24100";
|
||||
CPPUNIT_ASSERT_MESSAGE( "Stroke is m535.7 518.5-354.3-241",
|
||||
basegfx::tools::exportToSvgD( aPath, true, true, false ).compareToAscii(sExportString) == 0 );
|
||||
basegfx::tools::exportToSvgD( aPath, true, true, false ).equalsAscii(sExportString) );
|
||||
|
||||
m_bGreenStrokeSeen = true;
|
||||
}
|
||||
@@ -259,7 +259,7 @@ namespace
|
||||
|
||||
const char* sExportString = "m49890 5670.00000000001-35430 24090";
|
||||
CPPUNIT_ASSERT_MESSAGE( "Stroke is m49890 5670.00000000001-35430 24090",
|
||||
basegfx::tools::exportToSvgD( aPath, true, true, false ).compareToAscii(sExportString) == 0 );
|
||||
basegfx::tools::exportToSvgD( aPath, true, true, false ).equalsAscii(sExportString) );
|
||||
|
||||
m_bDashedLineSeen = true;
|
||||
}
|
||||
@@ -317,7 +317,7 @@ namespace
|
||||
const char* sExportString = "m12050 49610c-4310 0-7800-3490-7800-7800 0-4300 "
|
||||
"3490-7790 7800-7790 4300 0 7790 3490 7790 7790 0 4310-3490 7800-7790 7800z";
|
||||
CPPUNIT_ASSERT_MESSAGE( "Stroke is a 4-bezier circle",
|
||||
basegfx::tools::exportToSvgD( aPath, true, true, false ).compareToAscii(sExportString) == 0 );
|
||||
basegfx::tools::exportToSvgD( aPath, true, true, false ).equalsAscii(sExportString) );
|
||||
|
||||
m_bRedCircleSeen = true;
|
||||
}
|
||||
@@ -362,9 +362,9 @@ namespace
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMask received two properties",
|
||||
xBitmap.getLength(), (sal_Int32) 3 );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawMask got URL param",
|
||||
xBitmap[0].Name.compareToAscii( "URL" ) == 0 );
|
||||
xBitmap[0].Name.equalsAscii( "URL" ) );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawMask got InputStream param",
|
||||
xBitmap[1].Name.compareToAscii( "InputStream" ) == 0 );
|
||||
xBitmap[1].Name.equalsAscii( "InputStream" ) );
|
||||
}
|
||||
|
||||
virtual void drawImage(const uno::Sequence<beans::PropertyValue>& xBitmap )
|
||||
@@ -372,9 +372,9 @@ namespace
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawImage received two properties",
|
||||
xBitmap.getLength(), (sal_Int32) 3 );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawImage got URL param",
|
||||
xBitmap[0].Name.compareToAscii( "URL" ) == 0 );
|
||||
xBitmap[0].Name.equalsAscii( "URL" ) );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawImage got InputStream param",
|
||||
xBitmap[1].Name.compareToAscii( "InputStream" ) == 0 );
|
||||
xBitmap[1].Name.equalsAscii( "InputStream" ) );
|
||||
m_bImageSeen = true;
|
||||
}
|
||||
|
||||
@@ -384,9 +384,9 @@ namespace
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawColorMaskedImage received two properties",
|
||||
xBitmap.getLength(), (sal_Int32) 3 );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawColorMaskedImage got URL param",
|
||||
xBitmap[0].Name.compareToAscii( "URL" ) == 0 );
|
||||
xBitmap[0].Name.equalsAscii( "URL" ) );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawColorMaskedImage got InputStream param",
|
||||
xBitmap[1].Name.compareToAscii( "InputStream" ) == 0 );
|
||||
xBitmap[1].Name.equalsAscii( "InputStream" ) );
|
||||
}
|
||||
|
||||
virtual void drawMaskedImage(const uno::Sequence<beans::PropertyValue>& xBitmap,
|
||||
@@ -396,16 +396,16 @@ namespace
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #1",
|
||||
xBitmap.getLength(), (sal_Int32) 3 );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got URL param #1",
|
||||
xBitmap[0].Name.compareToAscii( "URL" ) == 0 );
|
||||
xBitmap[0].Name.equalsAscii( "URL" ) );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got InputStream param #1",
|
||||
xBitmap[1].Name.compareToAscii( "InputStream" ) == 0 );
|
||||
xBitmap[1].Name.equalsAscii( "InputStream" ) );
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #2",
|
||||
xMask.getLength(), (sal_Int32) 3 );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got URL param #2",
|
||||
xMask[0].Name.compareToAscii( "URL" ) == 0 );
|
||||
xMask[0].Name.equalsAscii( "URL" ) );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got InputStream param #2",
|
||||
xMask[1].Name.compareToAscii( "InputStream" ) == 0 );
|
||||
xMask[1].Name.equalsAscii( "InputStream" ) );
|
||||
}
|
||||
|
||||
virtual void drawAlphaMaskedImage(const uno::Sequence<beans::PropertyValue>& xBitmap,
|
||||
@@ -414,16 +414,16 @@ namespace
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #1",
|
||||
xBitmap.getLength(), (sal_Int32) 3 );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got URL param #1",
|
||||
xBitmap[0].Name.compareToAscii( "URL" ) == 0 );
|
||||
xBitmap[0].Name.equalsAscii( "URL" ) );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got InputStream param #1",
|
||||
xBitmap[1].Name.compareToAscii( "InputStream" ) == 0 );
|
||||
xBitmap[1].Name.equalsAscii( "InputStream" ) );
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #2",
|
||||
xMask.getLength(), (sal_Int32) 3 );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got URL param #2",
|
||||
xMask[0].Name.compareToAscii( "URL" ) == 0 );
|
||||
xMask[0].Name.equalsAscii( "URL" ) );
|
||||
CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got InputStream param #2",
|
||||
xMask[1].Name.compareToAscii( "InputStream" ) == 0 );
|
||||
xMask[1].Name.equalsAscii( "InputStream" ) );
|
||||
}
|
||||
|
||||
virtual void setTextRenderMode( sal_Int32 )
|
||||
|
||||
@@ -243,7 +243,7 @@ Reference<XResource> PresenterPaneFactory::CreatePane (
|
||||
rxPaneId,
|
||||
rsTitle,
|
||||
xParentPane,
|
||||
rxPaneId->getFullResourceURL().Arguments.compareToAscii("Sprite=1") == 0);
|
||||
rxPaneId->getFullResourceURL().Arguments.equalsAscii("Sprite=1") );
|
||||
}
|
||||
catch (Exception&)
|
||||
{
|
||||
|
||||
@@ -283,7 +283,7 @@ SfxStatusDispatcher::SfxStatusDispatcher()
|
||||
void SAL_CALL SfxStatusDispatcher::addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& aURL) throw ( ::com::sun::star::uno::RuntimeException )
|
||||
{
|
||||
aListeners.addInterface( aURL.Complete, aListener );
|
||||
if ( aURL.Complete.compareToAscii(".uno:LifeTime")==0 )
|
||||
if ( aURL.Complete.equalsAscii(".uno:LifeTime") )
|
||||
{
|
||||
::com::sun::star::frame::FeatureStateEvent aEvent;
|
||||
aEvent.FeatureURL = aURL;
|
||||
|
||||
@@ -2450,9 +2450,9 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl& rList,
|
||||
if ( rUITitle.isEmpty() )
|
||||
{
|
||||
// reserved FS names that should not be used
|
||||
if ( rTitle.compareToAscii( "wizard" ) == 0 )
|
||||
if ( rTitle.equalsAscii( "wizard" ) )
|
||||
return;
|
||||
else if ( rTitle.compareToAscii( "internal" ) == 0 )
|
||||
else if ( rTitle.equalsAscii( "internal" ) )
|
||||
return;
|
||||
|
||||
aTitle = getLongName( rTitle );
|
||||
@@ -2515,7 +2515,7 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl& rList,
|
||||
OUString aType;
|
||||
OUString aHierURL;
|
||||
|
||||
if ( aChildTitle.compareToAscii( "sfx.tlx" ) == 0 || aChildTitle == "groupuinames.xml" )
|
||||
if ( aChildTitle.equalsAscii( "sfx.tlx" ) || aChildTitle == "groupuinames.xml" )
|
||||
continue;
|
||||
|
||||
sal_Bool bDocHasTitle = sal_False;
|
||||
|
||||
@@ -334,7 +334,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
|
||||
const beans::PropertyValue &rProp = rPrinter.getConstArray()[n];
|
||||
|
||||
// Name-Property?
|
||||
if ( rProp.Name.compareToAscii( "Name" ) == 0 )
|
||||
if ( rProp.Name.equalsAscii( "Name" ) )
|
||||
{
|
||||
OUString aPrinterName;
|
||||
if ( ! ( rProp.Value >>= aPrinterName ) )
|
||||
@@ -359,7 +359,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
|
||||
const beans::PropertyValue &rProp = rPrinter.getConstArray()[i];
|
||||
|
||||
// PaperOrientation-Property?
|
||||
if ( rProp.Name.compareToAscii( "PaperOrientation" ) == 0 )
|
||||
if ( rProp.Name.equalsAscii( "PaperOrientation" ) )
|
||||
{
|
||||
view::PaperOrientation eOrient;
|
||||
if ( ( rProp.Value >>= eOrient ) == sal_False )
|
||||
@@ -377,7 +377,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
|
||||
}
|
||||
|
||||
// PaperFormat-Property?
|
||||
else if ( rProp.Name.compareToAscii( "PaperFormat" ) == 0 )
|
||||
else if ( rProp.Name.equalsAscii( "PaperFormat" ) )
|
||||
{
|
||||
if ( ( rProp.Value >>= nPaperFormat ) == sal_False )
|
||||
{
|
||||
@@ -394,7 +394,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
|
||||
}
|
||||
|
||||
// PaperSize-Property?
|
||||
else if ( rProp.Name.compareToAscii( "PaperSize" ) == 0 )
|
||||
else if ( rProp.Name.equalsAscii( "PaperSize" ) )
|
||||
{
|
||||
awt::Size aTempSize ;
|
||||
if ( ( rProp.Value >>= aTempSize ) == sal_False )
|
||||
@@ -408,7 +408,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
|
||||
}
|
||||
|
||||
// PrinterTray-Property
|
||||
else if ( rProp.Name.compareToAscii( "PrinterPaperTray" ) == 0 )
|
||||
else if ( rProp.Name.equalsAscii( "PrinterPaperTray" ) )
|
||||
{
|
||||
OUString aTmp;
|
||||
if ( ( rProp.Value >>= aTmp ) == sal_False )
|
||||
@@ -617,7 +617,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
|
||||
const beans::PropertyValue &rProp = rOptions.getConstArray()[n];
|
||||
|
||||
// FileName-Property?
|
||||
if ( rProp.Name.compareToAscii( "FileName" ) == 0 )
|
||||
if ( rProp.Name.equalsAscii( "FileName" ) )
|
||||
{
|
||||
// unpack th URL and check for a valid and well known protocol
|
||||
OUString sTemp;
|
||||
@@ -692,7 +692,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
|
||||
}
|
||||
|
||||
// CopyCount-Property
|
||||
else if ( rProp.Name.compareToAscii( "CopyCount" ) == 0 )
|
||||
else if ( rProp.Name.equalsAscii( "CopyCount" ) )
|
||||
{
|
||||
sal_Int32 nCopies = 0;
|
||||
if ( ( rProp.Value >>= nCopies ) == sal_False )
|
||||
@@ -704,8 +704,8 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
|
||||
|
||||
// Collate-Property
|
||||
// Sort-Property (deprecated)
|
||||
else if ( rProp.Name.compareToAscii( "Collate" ) == 0 ||
|
||||
( rProp.Name.compareToAscii( "Sort" ) == 0 ) )
|
||||
else if ( rProp.Name.equalsAscii( "Collate" ) ||
|
||||
rProp.Name.equalsAscii( "Sort" ) )
|
||||
{
|
||||
sal_Bool bTemp = sal_Bool();
|
||||
if ( rProp.Value >>= bTemp )
|
||||
@@ -718,7 +718,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
|
||||
}
|
||||
|
||||
// Pages-Property
|
||||
else if ( rProp.Name.compareToAscii( "Pages" ) == 0 )
|
||||
else if ( rProp.Name.equalsAscii( "Pages" ) )
|
||||
{
|
||||
OUString sTemp;
|
||||
if( rProp.Value >>= sTemp )
|
||||
@@ -731,7 +731,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
|
||||
}
|
||||
|
||||
// MonitorVisible
|
||||
else if ( rProp.Name.compareToAscii( "MonitorVisible" ) == 0 )
|
||||
else if ( rProp.Name.equalsAscii( "MonitorVisible" ) )
|
||||
{
|
||||
if( !(rProp.Value >>= bMonitor) )
|
||||
throw ::com::sun::star::lang::IllegalArgumentException();
|
||||
@@ -740,7 +740,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
|
||||
}
|
||||
|
||||
// Wait
|
||||
else if ( rProp.Name.compareToAscii( "Wait" ) == 0 )
|
||||
else if ( rProp.Name.equalsAscii( "Wait" ) )
|
||||
{
|
||||
if ( !(rProp.Value >>= bWaitUntilEnd) )
|
||||
throw ::com::sun::star::lang::IllegalArgumentException();
|
||||
@@ -748,7 +748,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
|
||||
aCheckedArgs[nProps++].Value <<= bWaitUntilEnd;
|
||||
}
|
||||
|
||||
else if ( rProp.Name.compareToAscii( "DuplexMode" ) == 0 )
|
||||
else if ( rProp.Name.equalsAscii( "DuplexMode" ) )
|
||||
{
|
||||
if ( !(rProp.Value >>= nDuplexMode ) )
|
||||
throw ::com::sun::star::lang::IllegalArgumentException();
|
||||
|
||||
@@ -187,7 +187,7 @@ sal_Bool DirectoryTraveller::visit (const iter& it)
|
||||
if (it.m_nAttrib & STORE_ATTRIB_ISDIR)
|
||||
{
|
||||
OUString aName (it.m_pszName, it.m_nLength);
|
||||
if (aName.compareToAscii ("XTextViewCursorSupplier") == 0)
|
||||
if (aName.equalsAscii("XTextViewCursorSupplier"))
|
||||
{
|
||||
m_nCount += 1 - 1;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL fsstorage_component_getFactory (
|
||||
if (pServiceManager)
|
||||
{
|
||||
uno::Reference< lang::XSingleServiceFactory > xFactory;
|
||||
if (FSStorageFactory::impl_staticGetImplementationName().compareToAscii (pImplementationName) == 0)
|
||||
if (FSStorageFactory::impl_staticGetImplementationName().equalsAscii(pImplementationName))
|
||||
{
|
||||
xFactory = cppu::createOneInstanceFactory (
|
||||
reinterpret_cast< lang::XMultiServiceFactory* >(pServiceManager),
|
||||
|
||||
@@ -384,7 +384,7 @@ OUString SAL_CALL SvNumberFormatterServiceObj::getImplementationName()
|
||||
sal_Bool SAL_CALL SvNumberFormatterServiceObj::supportsService( const OUString& ServiceName )
|
||||
throw(uno::RuntimeException)
|
||||
{
|
||||
return ( ServiceName.compareToAscii(SERVICENAME_NUMBERFORMATTER) == 0 );
|
||||
return ServiceName.equalsAscii(SERVICENAME_NUMBERFORMATTER);
|
||||
}
|
||||
|
||||
uno::Sequence<OUString> SAL_CALL SvNumberFormatterServiceObj::getSupportedServiceNames()
|
||||
@@ -676,7 +676,7 @@ OUString SAL_CALL SvNumberFormatsObj::getImplementationName()
|
||||
sal_Bool SAL_CALL SvNumberFormatsObj::supportsService( const OUString& ServiceName )
|
||||
throw(uno::RuntimeException)
|
||||
{
|
||||
return ( ServiceName.compareToAscii(SERVICENAME_NUMBERFORMATS) == 0 );
|
||||
return ServiceName.equalsAscii(SERVICENAME_NUMBERFORMATS);
|
||||
}
|
||||
|
||||
uno::Sequence<OUString> SAL_CALL SvNumberFormatsObj::getSupportedServiceNames()
|
||||
@@ -933,7 +933,7 @@ OUString SAL_CALL SvNumberFormatObj::getImplementationName()
|
||||
sal_Bool SAL_CALL SvNumberFormatObj::supportsService( const OUString& ServiceName )
|
||||
throw(uno::RuntimeException)
|
||||
{
|
||||
return ( ServiceName.compareToAscii(SERVICENAME_NUMBERFORMAT) == 0 );
|
||||
return ServiceName.equalsAscii(SERVICENAME_NUMBERFORMAT);
|
||||
}
|
||||
|
||||
uno::Sequence<OUString> SAL_CALL SvNumberFormatObj::getSupportedServiceNames()
|
||||
@@ -1092,7 +1092,7 @@ OUString SAL_CALL SvNumberFormatSettingsObj::getImplementationName()
|
||||
sal_Bool SAL_CALL SvNumberFormatSettingsObj::supportsService( const OUString& ServiceName )
|
||||
throw(uno::RuntimeException)
|
||||
{
|
||||
return ( ServiceName.compareToAscii(SERVICENAME_NUMBERSETTINGS) == 0 );
|
||||
return ServiceName.equalsAscii(SERVICENAME_NUMBERSETTINGS);
|
||||
}
|
||||
|
||||
uno::Sequence<OUString> SAL_CALL SvNumberFormatSettingsObj::getSupportedServiceNames()
|
||||
|
||||
@@ -1368,7 +1368,7 @@ OUString SAL_CALL PasswordContainer::getImplementationName( ) throw(uno::Runtim
|
||||
|
||||
sal_Bool SAL_CALL PasswordContainer::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
|
||||
{
|
||||
if ( ServiceName.compareToAscii("com.sun.star.task.PasswordContainer") == 0 )
|
||||
if ( ServiceName.equalsAscii("com.sun.star.task.PasswordContainer") )
|
||||
return sal_True;
|
||||
else
|
||||
return sal_False;
|
||||
@@ -1461,7 +1461,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL passwordcontainer_component_getFactory (
|
||||
if (pServiceManager)
|
||||
{
|
||||
Reference< XSingleServiceFactory > xFactory;
|
||||
if (PasswordContainer::impl_getStaticImplementationName().compareToAscii (pImplementationName) == 0)
|
||||
if (PasswordContainer::impl_getStaticImplementationName().equalsAscii(pImplementationName))
|
||||
{
|
||||
xFactory = PasswordContainer::impl_createFactory (
|
||||
reinterpret_cast< XMultiServiceFactory* >(pServiceManager));
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
const OUString & rName)
|
||||
throw(css::uno::RuntimeException)
|
||||
{
|
||||
return (rName.compareToAscii("com.sun.star.config.SpecialConfigManager") == 0);
|
||||
return rName.equalsAscii("com.sun.star.config.SpecialConfigManager");
|
||||
}
|
||||
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
|
||||
|
||||
@@ -95,7 +95,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL hatchwindowfactory_component_getFactory (
|
||||
if (pServiceManager)
|
||||
{
|
||||
uno::Reference< lang::XSingleServiceFactory > xFactory;
|
||||
if (OHatchWindowFactory::impl_staticGetImplementationName().compareToAscii (pImplementationName ) == 0)
|
||||
if (OHatchWindowFactory::impl_staticGetImplementationName().equalsAscii(pImplementationName ))
|
||||
{
|
||||
xFactory = cppu::createOneInstanceFactory(
|
||||
reinterpret_cast< lang::XMultiServiceFactory* >(pServiceManager),
|
||||
@@ -103,7 +103,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL hatchwindowfactory_component_getFactory (
|
||||
OHatchWindowFactory::impl_staticCreateSelfInstance,
|
||||
OHatchWindowFactory::impl_staticGetSupportedServiceNames());
|
||||
}
|
||||
else if (ODocumentCloser::impl_staticGetImplementationName().compareToAscii (pImplementationName ) == 0)
|
||||
else if (ODocumentCloser::impl_staticGetImplementationName().equalsAscii(pImplementationName ))
|
||||
{
|
||||
xFactory = cppu::createSingleFactory(
|
||||
reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
|
||||
|
||||
@@ -236,15 +236,15 @@ uno::Any SAL_CALL SwXStyleFamilies::getByName(const OUString& Name)
|
||||
uno::Any aRet;
|
||||
if(!IsValid())
|
||||
throw uno::RuntimeException();
|
||||
if(Name.compareToAscii("CharacterStyles") == 0 )
|
||||
if(Name.equalsAscii("CharacterStyles") )
|
||||
aRet = getByIndex(0);
|
||||
else if(Name.compareToAscii("ParagraphStyles") == 0)
|
||||
else if(Name.equalsAscii("ParagraphStyles") )
|
||||
aRet = getByIndex(1);
|
||||
else if(Name.compareToAscii("FrameStyles") == 0 )
|
||||
else if(Name.equalsAscii("FrameStyles") )
|
||||
aRet = getByIndex(3);
|
||||
else if(Name.compareToAscii("PageStyles") == 0 )
|
||||
else if(Name.equalsAscii("PageStyles") )
|
||||
aRet = getByIndex(2);
|
||||
else if(Name.compareToAscii("NumberingStyles") == 0 )
|
||||
else if(Name.equalsAscii("NumberingStyles") )
|
||||
aRet = getByIndex(4);
|
||||
else
|
||||
throw container::NoSuchElementException();
|
||||
@@ -265,11 +265,11 @@ uno::Sequence< OUString > SwXStyleFamilies::getElementNames(void) throw( uno::Ru
|
||||
|
||||
sal_Bool SwXStyleFamilies::hasByName(const OUString& Name) throw( uno::RuntimeException )
|
||||
{
|
||||
if( Name.compareToAscii("CharacterStyles") == 0 ||
|
||||
Name.compareToAscii("ParagraphStyles") == 0 ||
|
||||
Name.compareToAscii("FrameStyles") == 0 ||
|
||||
Name.compareToAscii("PageStyles") == 0 ||
|
||||
Name.compareToAscii("NumberingStyles") == 0 )
|
||||
if( Name.equalsAscii("CharacterStyles") ||
|
||||
Name.equalsAscii("ParagraphStyles") ||
|
||||
Name.equalsAscii("FrameStyles") ||
|
||||
Name.equalsAscii("PageStyles") ||
|
||||
Name.equalsAscii("NumberingStyles") )
|
||||
return sal_True;
|
||||
else
|
||||
return sal_False;
|
||||
@@ -3611,11 +3611,11 @@ uno::Any SwXAutoStyles::getByName(const OUString& Name)
|
||||
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
|
||||
{
|
||||
uno::Any aRet;
|
||||
if(Name.compareToAscii("CharacterStyles") == 0 )
|
||||
if(Name.equalsAscii("CharacterStyles") )
|
||||
aRet = getByIndex(0);
|
||||
else if(Name.compareToAscii("RubyStyles") == 0 )
|
||||
else if(Name.equalsAscii("RubyStyles") )
|
||||
aRet = getByIndex(1);
|
||||
else if(Name.compareToAscii("ParagraphStyles") == 0 )
|
||||
else if(Name.equalsAscii("ParagraphStyles") )
|
||||
aRet = getByIndex(2);
|
||||
else
|
||||
throw container::NoSuchElementException();
|
||||
@@ -3636,9 +3636,9 @@ uno::Sequence< OUString > SwXAutoStyles::getElementNames(void)
|
||||
sal_Bool SwXAutoStyles::hasByName(const OUString& Name)
|
||||
throw( uno::RuntimeException )
|
||||
{
|
||||
if( Name.compareToAscii("CharacterStyles") == 0 ||
|
||||
Name.compareToAscii("RubyStyles") == 0 ||
|
||||
Name.compareToAscii("ParagraphStyles") == 0 )
|
||||
if( Name.equalsAscii("CharacterStyles") ||
|
||||
Name.equalsAscii("RubyStyles") ||
|
||||
Name.equalsAscii("ParagraphStyles") )
|
||||
return sal_True;
|
||||
else
|
||||
return sal_False;
|
||||
|
||||
@@ -1248,7 +1248,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
|
||||
if( i < nValCnt )
|
||||
{
|
||||
const OUString& rVal = pValues[i];
|
||||
if( rVal.compareToAscii( "$$$empty$$$" ) == 0 )
|
||||
if( rVal.equalsAscii( "$$$empty$$$" ) )
|
||||
bEmptyVal = sal_True;
|
||||
else
|
||||
sVal = rVal;
|
||||
|
||||
@@ -1756,7 +1756,7 @@ Sequence< OUString > SwXTextDocument::getAvailableServiceNames(void)
|
||||
OUString* pRet = aRet.getArray();
|
||||
for ( sal_Int32 i = 0; i < aRet.getLength(); ++i )
|
||||
{
|
||||
if ( pRet[i].compareToAscii( "com.sun.star.drawing.OLE2Shape" ) == 0 )
|
||||
if ( pRet[i].equalsAscii( "com.sun.star.drawing.OLE2Shape" ) )
|
||||
{
|
||||
pRet[i] = pRet[aRet.getLength() - 1];
|
||||
aRet.realloc( aRet.getLength() - 1 ); // <pRet> no longer valid.
|
||||
|
||||
@@ -978,11 +978,11 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs )
|
||||
OUString aLogStr( extractParam( rArgs, OUString("log") ) );
|
||||
if (aLogStr.getLength())
|
||||
{
|
||||
if (aLogStr.compareToAscii( "stderr" ) == 0)
|
||||
if (aLogStr.equalsAscii( "stderr" ) )
|
||||
{
|
||||
stream = stderr;
|
||||
}
|
||||
else if (aLogStr.compareToAscii( "stdout" ) == 0)
|
||||
else if (aLogStr.equalsAscii( "stdout" ) )
|
||||
{
|
||||
stream = stdout;
|
||||
}
|
||||
|
||||
@@ -58,28 +58,24 @@ namespace tools_urlobj
|
||||
INetURLObject aUrl( OUString( "file://10.10.1.1/sampledir/sample.file" ) );
|
||||
#ifdef LINUX
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii
|
||||
( "smb://10.10.1.1/sampledir/sample.file" ) ==
|
||||
0 );
|
||||
equalsAscii
|
||||
( "smb://10.10.1.1/sampledir/sample.file" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
|
||||
#endif
|
||||
#ifdef WIN
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii
|
||||
( "file://10.10.1.1/sampledir/sample.file" ) ==
|
||||
0 );
|
||||
equalsAscii
|
||||
( "file://10.10.1.1/sampledir/sample.file" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
|
||||
#endif
|
||||
CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "10.10.1.1" ) == 0 );
|
||||
equalsAscii( "10.10.1.1" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "/sampledir/sample.file" ) == 0 );
|
||||
equalsAscii( "/sampledir/sample.file" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getName( ).
|
||||
compareToAscii( "sample.file" ) == 0 );
|
||||
CPPUNIT_ASSERT( aUrl.getBase( ).compareToAscii( "sample" ) ==
|
||||
0 );
|
||||
CPPUNIT_ASSERT( aUrl.getExtension( ).compareToAscii( "file" ) ==
|
||||
0 );
|
||||
equalsAscii( "sample.file" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getBase( ).equalsAscii( "sample" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getExtension( ).equalsAscii( "file" ) );
|
||||
}
|
||||
|
||||
void urlobjTest_002( )
|
||||
@@ -90,26 +86,22 @@ namespace tools_urlobj
|
||||
INetURLObject::FSYS_DETECT );
|
||||
#ifdef LINUX
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii
|
||||
( "smb://137.65.170.24/c$/Img0001.jpg" ) == 0 );
|
||||
equalsAscii( "smb://137.65.170.24/c$/Img0001.jpg" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
|
||||
#endif
|
||||
#ifdef WIN
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii
|
||||
( "file://137.65.170.24/c$/Img0001.jpg" ) == 0 );
|
||||
equalsAscii( "file://137.65.170.24/c$/Img0001.jpg" ) ;
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
|
||||
#endif
|
||||
CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "137.65.170.24" ) == 0 );
|
||||
equalsAscii( "137.65.170.24" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "/c$/Img0001.jpg" ) == 0 );
|
||||
equalsAscii( "/c$/Img0001.jpg" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getName( ).
|
||||
compareToAscii( "Img0001.jpg" ) == 0 );
|
||||
CPPUNIT_ASSERT( aUrl.getBase( ).compareToAscii( "Img0001" ) ==
|
||||
0 );
|
||||
CPPUNIT_ASSERT( aUrl.getExtension( ).compareToAscii( "jpg" ) ==
|
||||
0 );
|
||||
equalsAscii( "Img0001.jpg" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getBase( ).equalsAscii( "Img0001" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getExtension( ).equalsAscii( "jpg" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -121,22 +113,18 @@ namespace tools_urlobj
|
||||
INetURLObject::FSYS_DETECT );
|
||||
#ifdef LINUX
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii
|
||||
( "smb://hive-winxp-x86/pmladek/test2.odt" ) ==
|
||||
0 );
|
||||
equalsAscii( "smb://hive-winxp-x86/pmladek/test2.odt" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
|
||||
#endif
|
||||
#ifdef WIN
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii
|
||||
( "file://hive-winxp-x86/pmladek/test2.odt" ) ==
|
||||
0 );
|
||||
equalsAscii( "file://hive-winxp-x86/pmladek/test2.odt" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
|
||||
#endif
|
||||
CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "hive-winxp-x86" ) == 0 );
|
||||
equalsAscii( "hive-winxp-x86" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "/pmladek/test2.odt" ) == 0 );
|
||||
equalsAscii( "/pmladek/test2.odt" ) );
|
||||
}
|
||||
|
||||
void urlobjTest_004( )
|
||||
@@ -144,28 +132,22 @@ namespace tools_urlobj
|
||||
INetURLObject aUrl( OUString( "smb://10.10.1.1/sampledir/sample.file" ) );
|
||||
#ifdef LINUX
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii
|
||||
( "smb://10.10.1.1/sampledir/sample.file" ) ==
|
||||
0 );
|
||||
equalsAscii( "smb://10.10.1.1/sampledir/sample.file" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
|
||||
#endif
|
||||
#ifdef WIN
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii
|
||||
( "file://10.10.1.1/sampledir/sample.file" ) ==
|
||||
0 );
|
||||
equalsAscii( "file://10.10.1.1/sampledir/sample.file" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
|
||||
#endif
|
||||
CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "10.10.1.1" ) == 0 );
|
||||
equalsAscii( "10.10.1.1" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "/sampledir/sample.file" ) == 0 );
|
||||
equalsAscii( "/sampledir/sample.file" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getName( ).
|
||||
compareToAscii( "sample.file" ) == 0 );
|
||||
CPPUNIT_ASSERT( aUrl.getBase( ).compareToAscii( "sample" ) ==
|
||||
0 );
|
||||
CPPUNIT_ASSERT( aUrl.getExtension( ).compareToAscii( "file" ) ==
|
||||
0 );
|
||||
equalsAscii( "sample.file" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getBase( ).equalsAscii( "sample" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getExtension( ).equalsAscii( "file" ) );
|
||||
}
|
||||
|
||||
void urlobjTest_005( )
|
||||
@@ -175,21 +157,21 @@ namespace tools_urlobj
|
||||
INetURLObject::FSYS_DETECT );
|
||||
#ifdef LINUX
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "smb://137.65.170.24/c$/Img0001.jpg" ) == 0 );
|
||||
equalsAscii( "smb://137.65.170.24/c$/Img0001.jpg" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
|
||||
#endif
|
||||
#ifdef WIN
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "file://137.65.170.24/c$/Img0001.jpg" ) == 0 );
|
||||
equalsAscii( "file://137.65.170.24/c$/Img0001.jpg" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
|
||||
#endif
|
||||
CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "137.65.170.24" ) == 0 );
|
||||
equalsAscii( "137.65.170.24" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "/c$/Img0001.jpg" ) == 0 );
|
||||
CPPUNIT_ASSERT( aUrl.getName( ).compareToAscii( "Img0001.jpg" ) == 0 );
|
||||
CPPUNIT_ASSERT( aUrl.getBase( ).compareToAscii( "Img0001" ) == 0 );
|
||||
CPPUNIT_ASSERT( aUrl.getExtension( ).compareToAscii( "jpg" ) == 0 );
|
||||
equalsAscii( "/c$/Img0001.jpg" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getName( ).equalsAscii( "Img0001.jpg" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getBase( ).equalsAscii( "Img0001" ) );
|
||||
CPPUNIT_ASSERT( aUrl.getExtension( ).equalsAscii( "jpg" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -200,18 +182,18 @@ namespace tools_urlobj
|
||||
INetURLObject::FSYS_DETECT );
|
||||
#ifdef LINUX
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "smb://hive-winxp-x86/pmladek/test2.odt" ) == 0 );
|
||||
equalsAscii( "smb://hive-winxp-x86/pmladek/test2.odt" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_SMB );
|
||||
#endif
|
||||
#ifdef WIN
|
||||
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "file://hive-winxp-x86/pmladek/test2.odt" ) == 0 );
|
||||
equalsAscii( "file://hive-winxp-x86/pmladek/test2.odt" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
|
||||
#endif
|
||||
CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "hive-winxp-x86" ) == 0 );
|
||||
equalsAscii( "hive-winxp-x86" ) );
|
||||
CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
|
||||
compareToAscii( "/pmladek/test2.odt" ) == 0 );
|
||||
equalsAscii( "/pmladek/test2.odt" ) );
|
||||
}
|
||||
|
||||
void urlobjCmisTest( )
|
||||
|
||||
@@ -45,7 +45,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL cached1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( CachedContentResultSetFactory::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = CachedContentResultSetFactory::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -55,7 +55,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL cached1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
else if ( CachedContentResultSetStubFactory::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = CachedContentResultSetStubFactory::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -65,7 +65,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL cached1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
else if ( CachedDynamicResultSetFactory::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = CachedDynamicResultSetFactory::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -75,7 +75,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL cached1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
else if ( CachedDynamicResultSetStubFactory::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = CachedDynamicResultSetStubFactory::createServiceFactory( xSMgr );
|
||||
}
|
||||
|
||||
@@ -829,7 +829,7 @@ void transferProperties(
|
||||
|
||||
uno::Any aValue;
|
||||
|
||||
if ( rCurrProp.Name.compareToAscii( "Title" ) == 0 )
|
||||
if ( rCurrProp.Name.equalsAscii( "Title" ) )
|
||||
{
|
||||
// Supply new title, if given.
|
||||
if ( !bHasTitle )
|
||||
@@ -838,7 +838,7 @@ void transferProperties(
|
||||
aValue <<= rContext.aArg.NewTitle;
|
||||
}
|
||||
}
|
||||
else if ( rCurrProp.Name.compareToAscii( "TargetURL" ) == 0 )
|
||||
else if ( rCurrProp.Name.equalsAscii( "TargetURL" ) )
|
||||
{
|
||||
// Supply source URL as link target for the new link to create.
|
||||
if ( !bHasTargetURL )
|
||||
|
||||
@@ -44,7 +44,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucb_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( UniversalContentBroker::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = UniversalContentBroker::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -54,7 +54,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucb_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
else if ( UcbStore::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = UcbStore::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -64,7 +64,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucb_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
else if ( UcbPropertiesManager::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = UcbPropertiesManager::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -74,7 +74,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucb_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
else if ( UcbContentProviderProxyFactory::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = UcbContentProviderProxyFactory::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -84,7 +84,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucb_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
else if ( ucb_cmdenv::UcbCommandEnvironment::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = ucb_cmdenv::UcbCommandEnvironment::createServiceFactory( xSMgr );
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL srtrs1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( SortedDynamicResultSetFactory::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = SortedDynamicResultSetFactory::createServiceFactory( xSMgr );
|
||||
}
|
||||
|
||||
@@ -902,8 +902,8 @@ void SAL_CALL SortedResultSet::setPropertyValue(
|
||||
{
|
||||
osl::Guard< osl::Mutex > aGuard( maMutex );
|
||||
|
||||
if ( ( PropertyName.compareToAscii( "RowCount" ) == 0 ) ||
|
||||
( PropertyName.compareToAscii( "IsRowCountFinal" ) == 0 ) )
|
||||
if ( PropertyName.equalsAscii( "RowCount" ) ||
|
||||
PropertyName.equalsAscii( "IsRowCountFinal" ) )
|
||||
throw IllegalArgumentException();
|
||||
else
|
||||
throw UnknownPropertyException();
|
||||
@@ -919,11 +919,11 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName )
|
||||
|
||||
Any aRet;
|
||||
|
||||
if ( PropertyName.compareToAscii( "RowCount" ) == 0 )
|
||||
if ( PropertyName.equalsAscii( "RowCount" ) )
|
||||
{
|
||||
aRet <<= maS2O.Count();
|
||||
}
|
||||
else if ( PropertyName.compareToAscii( "IsRowCountFinal" ) == 0 )
|
||||
else if ( PropertyName.equalsAscii( "IsRowCountFinal" ) )
|
||||
{
|
||||
sal_Bool bOrgFinal = false;
|
||||
Any aOrgRet;
|
||||
@@ -2043,9 +2043,9 @@ Property SAL_CALL
|
||||
SRSPropertySetInfo::getPropertyByName( const OUString& Name )
|
||||
throw( UnknownPropertyException, RuntimeException )
|
||||
{
|
||||
if ( Name.compareToAscii( "RowCount" ) == 0 )
|
||||
if ( Name.equalsAscii( "RowCount" ) )
|
||||
return maProps[0];
|
||||
else if ( Name.compareToAscii( "IsRowCountFinal" ) == 0 )
|
||||
else if ( Name.equalsAscii( "IsRowCountFinal" ) )
|
||||
return maProps[1];
|
||||
else
|
||||
throw UnknownPropertyException();
|
||||
@@ -2056,9 +2056,9 @@ sal_Bool SAL_CALL
|
||||
SRSPropertySetInfo::hasPropertyByName( const OUString& Name )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
if ( Name.compareToAscii( "RowCount" ) == 0 )
|
||||
if ( Name.equalsAscii( "RowCount" ) )
|
||||
return sal_True;
|
||||
else if ( Name.compareToAscii( "IsRowCountFinal" ) == 0 )
|
||||
else if ( Name.equalsAscii( "IsRowCountFinal" ) )
|
||||
return sal_True;
|
||||
else
|
||||
return sal_False;
|
||||
|
||||
@@ -55,7 +55,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpfile_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( fileaccess::shell::getImplementationName_static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = FileProvider::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -153,7 +153,7 @@ FileProvider::initialize(
|
||||
OUString config;
|
||||
if( aArguments.getLength() > 0 &&
|
||||
(aArguments[0] >>= config) &&
|
||||
config.compareToAscii("NoConfig") == 0 )
|
||||
config.equalsAscii("NoConfig") )
|
||||
m_pMyShell = new shell( m_xContext, this, sal_False );
|
||||
else
|
||||
m_pMyShell = new shell( m_xContext, this, sal_True );
|
||||
@@ -536,9 +536,9 @@ FileProvider::setPropertyValue( const OUString& aPropertyName,
|
||||
WrappedTargetException,
|
||||
RuntimeException )
|
||||
{
|
||||
if( aPropertyName.compareToAscii( "FileSystemNotation" ) == 0 ||
|
||||
aPropertyName.compareToAscii( "HomeDirectory" ) == 0 ||
|
||||
aPropertyName.compareToAscii( "HostName" ) == 0 )
|
||||
if( aPropertyName.equalsAscii( "FileSystemNotation" ) ||
|
||||
aPropertyName.equalsAscii( "HomeDirectory" ) ||
|
||||
aPropertyName.equalsAscii( "HostName" ) )
|
||||
return;
|
||||
else
|
||||
throw UnknownPropertyException( OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() );
|
||||
@@ -554,19 +554,19 @@ FileProvider::getPropertyValue(
|
||||
RuntimeException )
|
||||
{
|
||||
initProperties();
|
||||
if( aPropertyName.compareToAscii( "FileSystemNotation" ) == 0 )
|
||||
if( aPropertyName.equalsAscii( "FileSystemNotation" ) )
|
||||
{
|
||||
Any aAny;
|
||||
aAny <<= m_FileSystemNotation;
|
||||
return aAny;
|
||||
}
|
||||
else if( aPropertyName.compareToAscii( "HomeDirectory" ) == 0 )
|
||||
else if( aPropertyName.equalsAscii( "HomeDirectory" ) )
|
||||
{
|
||||
Any aAny;
|
||||
aAny <<= m_HomeDirectory;
|
||||
return aAny;
|
||||
}
|
||||
else if( aPropertyName.compareToAscii( "HostName" ) == 0 )
|
||||
else if( aPropertyName.equalsAscii( "HostName" ) )
|
||||
{
|
||||
Any aAny;
|
||||
aAny <<= m_HostName;
|
||||
|
||||
@@ -331,8 +331,8 @@ Any SAL_CALL FTPContent::execute(
|
||||
aRet = p->getRequest();
|
||||
}
|
||||
|
||||
// if(aCommand.Name.compareToAscii(
|
||||
// "getPropertyValues") == 0 &&
|
||||
// if(aCommand.Name.equalsAscii(
|
||||
// "getPropertyValues") &&
|
||||
// action != NOACTION) {
|
||||
// // It is not allowed to throw if
|
||||
// // command is getPropertyValues
|
||||
@@ -416,7 +416,7 @@ Any SAL_CALL FTPContent::execute(
|
||||
break;
|
||||
}
|
||||
|
||||
if(aCommand.Name.compareToAscii("getPropertyValues") == 0) {
|
||||
if(aCommand.Name.equalsAscii("getPropertyValues")) {
|
||||
Sequence<Property> Properties;
|
||||
if(!(aCommand.Argument >>= Properties))
|
||||
{
|
||||
@@ -429,7 +429,7 @@ Any SAL_CALL FTPContent::execute(
|
||||
|
||||
aRet <<= getPropertyValues(Properties,Environment);
|
||||
}
|
||||
else if(aCommand.Name.compareToAscii("setPropertyValues") == 0)
|
||||
else if(aCommand.Name.equalsAscii("setPropertyValues") )
|
||||
{
|
||||
Sequence<PropertyValue> propertyValues;
|
||||
|
||||
@@ -443,15 +443,15 @@ Any SAL_CALL FTPContent::execute(
|
||||
|
||||
aRet <<= setPropertyValues(propertyValues);
|
||||
}
|
||||
else if(aCommand.Name.compareToAscii("getCommandInfo") == 0) {
|
||||
else if(aCommand.Name.equalsAscii("getCommandInfo")) {
|
||||
// Note: Implemented by base class.
|
||||
aRet <<= getCommandInfo(Environment);
|
||||
}
|
||||
else if(aCommand.Name.compareToAscii("getPropertySetInfo") == 0) {
|
||||
else if(aCommand.Name.equalsAscii("getPropertySetInfo")) {
|
||||
// Note: Implemented by base class.
|
||||
aRet <<= getPropertySetInfo(Environment);
|
||||
}
|
||||
else if(aCommand.Name.compareToAscii( "insert" ) == 0)
|
||||
else if(aCommand.Name.equalsAscii( "insert" ))
|
||||
{
|
||||
InsertCommandArgument aInsertArgument;
|
||||
if ( ! ( aCommand.Argument >>= aInsertArgument ) ) {
|
||||
@@ -463,11 +463,11 @@ Any SAL_CALL FTPContent::execute(
|
||||
}
|
||||
insert(aInsertArgument,Environment);
|
||||
}
|
||||
else if(aCommand.Name.compareToAscii("delete") == 0) {
|
||||
else if(aCommand.Name.equalsAscii("delete")) {
|
||||
m_aFTPURL.del();
|
||||
deleted();
|
||||
}
|
||||
else if(aCommand.Name.compareToAscii( "open" ) == 0) {
|
||||
else if(aCommand.Name.equalsAscii( "open" )) {
|
||||
OpenCommandArgument2 aOpenCommand;
|
||||
if ( !( aCommand.Argument >>= aOpenCommand ) ) {
|
||||
aRet <<= IllegalArgumentException(
|
||||
@@ -571,7 +571,7 @@ Any SAL_CALL FTPContent::execute(
|
||||
|
||||
ucbhelper::cancelCommandExecution(aRet,Environment);
|
||||
}
|
||||
} else if(aCommand.Name.compareToAscii("createNewContent") == 0) {
|
||||
} else if(aCommand.Name.equalsAscii("createNewContent")) {
|
||||
ContentInfo aArg;
|
||||
if (!(aCommand.Argument >>= aArg)) {
|
||||
ucbhelper::cancelCommandExecution(
|
||||
@@ -816,35 +816,35 @@ Reference< XRow > FTPContent::getPropertyValues(
|
||||
|
||||
for(sal_Int32 i = 0; i < seqProp.getLength(); ++i) {
|
||||
const OUString& Name = seqProp[i].Name;
|
||||
if(Name.compareToAscii("Title") == 0)
|
||||
if(Name.equalsAscii("Title"))
|
||||
xRow->appendString(seqProp[i],aDirEntry.m_aName);
|
||||
else if(Name.compareToAscii("CreatableContentsInfo") == 0)
|
||||
else if(Name.equalsAscii("CreatableContentsInfo"))
|
||||
xRow->appendObject(seqProp[i],
|
||||
makeAny(queryCreatableContentsInfo()));
|
||||
else if(aDirEntry.m_nMode != INETCOREFTP_FILEMODE_UNKNOWN) {
|
||||
if(Name.compareToAscii("ContentType") == 0)
|
||||
if(Name.equalsAscii("ContentType"))
|
||||
xRow->appendString(seqProp[i],
|
||||
aDirEntry.m_nMode&INETCOREFTP_FILEMODE_ISDIR
|
||||
? FTP_FOLDER
|
||||
: FTP_FILE );
|
||||
else if(Name.compareToAscii("IsReadOnly") == 0)
|
||||
else if(Name.equalsAscii("IsReadOnly"))
|
||||
xRow->appendBoolean(seqProp[i],
|
||||
aDirEntry.m_nMode
|
||||
& INETCOREFTP_FILEMODE_WRITE
|
||||
? 0
|
||||
: 1 );
|
||||
else if(Name.compareToAscii("IsDocument") == 0)
|
||||
else if(Name.equalsAscii("IsDocument"))
|
||||
xRow->appendBoolean(seqProp[i],
|
||||
! sal_Bool(aDirEntry.m_nMode &
|
||||
INETCOREFTP_FILEMODE_ISDIR));
|
||||
else if(Name.compareToAscii("IsFolder") == 0)
|
||||
else if(Name.equalsAscii("IsFolder"))
|
||||
xRow->appendBoolean(seqProp[i],
|
||||
sal_Bool(aDirEntry.m_nMode &
|
||||
INETCOREFTP_FILEMODE_ISDIR));
|
||||
else if(Name.compareToAscii("Size") == 0)
|
||||
else if(Name.equalsAscii("Size"))
|
||||
xRow->appendLong(seqProp[i],
|
||||
aDirEntry.m_nSize);
|
||||
else if(Name.compareToAscii("DateCreated") == 0)
|
||||
else if(Name.equalsAscii("DateCreated"))
|
||||
xRow->appendTimestamp(seqProp[i],
|
||||
aDirEntry.m_aDate);
|
||||
else
|
||||
|
||||
@@ -60,30 +60,30 @@ ResultSetI::ResultSetI(const Reference<XComponentContext>& rxContext,
|
||||
|
||||
for( int i = 0; i < seqProp.getLength(); ++i) {
|
||||
const OUString& Name = seqProp[i].Name;
|
||||
if(Name.compareToAscii("ContentType") == 0 )
|
||||
if(Name.equalsAscii("ContentType") )
|
||||
xRow->appendString(seqProp[i],
|
||||
OUString( "application/ftp" ));
|
||||
else if(Name.compareToAscii("Title") == 0)
|
||||
else if(Name.equalsAscii("Title"))
|
||||
xRow->appendString(seqProp[i],dirvec[n].m_aName);
|
||||
else if(Name.compareToAscii("IsReadOnly") == 0)
|
||||
else if(Name.equalsAscii("IsReadOnly"))
|
||||
xRow->appendBoolean(seqProp[i],
|
||||
sal_Bool(dirvec[n].m_nMode &
|
||||
INETCOREFTP_FILEMODE_WRITE));
|
||||
else if(Name.compareToAscii("IsDocument") == 0)
|
||||
else if(Name.equalsAscii("IsDocument"))
|
||||
xRow->appendBoolean(seqProp[i],
|
||||
! sal_Bool(dirvec[n].m_nMode &
|
||||
INETCOREFTP_FILEMODE_ISDIR));
|
||||
else if(Name.compareToAscii("IsFolder") == 0)
|
||||
else if(Name.equalsAscii("IsFolder"))
|
||||
xRow->appendBoolean(seqProp[i],
|
||||
sal_Bool(dirvec[n].m_nMode &
|
||||
INETCOREFTP_FILEMODE_ISDIR));
|
||||
else if(Name.compareToAscii("Size") == 0)
|
||||
else if(Name.equalsAscii("Size"))
|
||||
xRow->appendLong(seqProp[i],
|
||||
dirvec[n].m_nSize);
|
||||
else if(Name.compareToAscii("DateCreated") == 0)
|
||||
else if(Name.equalsAscii("DateCreated"))
|
||||
xRow->appendTimestamp(seqProp[i],
|
||||
dirvec[n].m_aDate);
|
||||
else if(Name.compareToAscii("CreatableContentsInfo") == 0)
|
||||
else if(Name.equalsAscii("CreatableContentsInfo"))
|
||||
xRow->appendObject(
|
||||
seqProp[i],
|
||||
makeAny(FTPContent::queryCreatableContentsInfo_Static()));
|
||||
|
||||
@@ -41,7 +41,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpftp1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( FTPContentProvider::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = FTPContentProvider::createServiceFactory( xSMgr );
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucphier1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( HierarchyContentProvider::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = HierarchyContentProvider::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -51,7 +51,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucphier1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
else if ( HierarchyDataSource::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = HierarchyDataSource::createServiceFactory( xSMgr );
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucppkg1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( ::package_ucp::ContentProvider::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = ::package_ucp::ContentProvider::createServiceFactory( xSMgr );
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucptdoc1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( ContentProvider::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = ContentProvider::createServiceFactory( xSMgr );
|
||||
}
|
||||
@@ -54,7 +54,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucptdoc1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
else if ( DocumentContentFactory::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = DocumentContentFactory::createServiceFactory( xSMgr );
|
||||
}
|
||||
|
||||
@@ -117,29 +117,29 @@ bool DateTimeHelper::ISO8601_To_DateTime (const OUString& s,
|
||||
|
||||
sal_Int32 DateTimeHelper::convertMonthToInt (const OUString& month)
|
||||
{
|
||||
if (month.compareToAscii ("Jan") == 0)
|
||||
if (month.equalsAscii("Jan"))
|
||||
return 1;
|
||||
else if (month.compareToAscii ("Feb") == 0)
|
||||
else if (month.equalsAscii("Feb"))
|
||||
return 2;
|
||||
else if (month.compareToAscii ("Mar") == 0)
|
||||
else if (month.equalsAscii("Mar"))
|
||||
return 3;
|
||||
else if (month.compareToAscii ("Apr") == 0)
|
||||
else if (month.equalsAscii("Apr"))
|
||||
return 4;
|
||||
else if (month.compareToAscii ("May") == 0)
|
||||
else if (month.equalsAscii("May"))
|
||||
return 5;
|
||||
else if (month.compareToAscii ("Jun") == 0)
|
||||
else if (month.equalsAscii("Jun"))
|
||||
return 6;
|
||||
else if (month.compareToAscii ("Jul") == 0)
|
||||
else if (month.equalsAscii("Jul"))
|
||||
return 7;
|
||||
else if (month.compareToAscii ("Aug") == 0)
|
||||
else if (month.equalsAscii("Aug"))
|
||||
return 8;
|
||||
else if (month.compareToAscii ("Sep") == 0)
|
||||
else if (month.equalsAscii("Sep"))
|
||||
return 9;
|
||||
else if (month.compareToAscii ("Oct") == 0)
|
||||
else if (month.equalsAscii("Oct"))
|
||||
return 10;
|
||||
else if (month.compareToAscii ("Nov") == 0)
|
||||
else if (month.equalsAscii("Nov"))
|
||||
return 11;
|
||||
else if (month.compareToAscii ("Dec") == 0)
|
||||
else if (month.equalsAscii("Dec"))
|
||||
return 12;
|
||||
else
|
||||
return 0;
|
||||
|
||||
@@ -49,7 +49,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpdav1_component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( ::webdav_ucp::ContentProvider::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = ::webdav_ucp::ContentProvider::createServiceFactory( xSMgr );
|
||||
}
|
||||
|
||||
@@ -108,19 +108,19 @@ bool DateTimeHelper::ISO8601_To_DateTime (const OUString& s,
|
||||
/*
|
||||
sal_Int32 DateTimeHelper::convertDayToInt (const OUString& day)
|
||||
{
|
||||
if (day.compareToAscii ("Sun") == 0)
|
||||
if (day.equalsAscii("Sun"))
|
||||
return 0;
|
||||
else if (day.compareToAscii ("Mon") == 0)
|
||||
else if (day.equalsAscii("Mon"))
|
||||
return 1;
|
||||
else if (day.compareToAscii ("Tue") == 0)
|
||||
else if (day.equalsAscii("Tue"))
|
||||
return 2;
|
||||
else if (day.compareToAscii ("Wed") == 0)
|
||||
else if (day.equalsAscii("Wed"))
|
||||
return 3;
|
||||
else if (day.compareToAscii ("Thu") == 0)
|
||||
else if (day.equalsAscii("Thu"))
|
||||
return 4;
|
||||
else if (day.compareToAscii ("Fri") == 0)
|
||||
else if (day.equalsAscii("Fri"))
|
||||
return 5;
|
||||
else if (day.compareToAscii ("Sat") == 0)
|
||||
else if (day.equalsAscii("Sat"))
|
||||
return 6;
|
||||
else
|
||||
return -1;
|
||||
@@ -129,29 +129,29 @@ sal_Int32 DateTimeHelper::convertDayToInt (const OUString& day)
|
||||
|
||||
sal_Int32 DateTimeHelper::convertMonthToInt (const OUString& month)
|
||||
{
|
||||
if (month.compareToAscii ("Jan") == 0)
|
||||
if (month.equalsAscii("Jan"))
|
||||
return 1;
|
||||
else if (month.compareToAscii ("Feb") == 0)
|
||||
else if (month.equalsAscii("Feb"))
|
||||
return 2;
|
||||
else if (month.compareToAscii ("Mar") == 0)
|
||||
else if (month.equalsAscii("Mar"))
|
||||
return 3;
|
||||
else if (month.compareToAscii ("Apr") == 0)
|
||||
else if (month.equalsAscii("Apr"))
|
||||
return 4;
|
||||
else if (month.compareToAscii ("May") == 0)
|
||||
else if (month.equalsAscii("May"))
|
||||
return 5;
|
||||
else if (month.compareToAscii ("Jun") == 0)
|
||||
else if (month.equalsAscii("Jun"))
|
||||
return 6;
|
||||
else if (month.compareToAscii ("Jul") == 0)
|
||||
else if (month.equalsAscii("Jul"))
|
||||
return 7;
|
||||
else if (month.compareToAscii ("Aug") == 0)
|
||||
else if (month.equalsAscii("Aug"))
|
||||
return 8;
|
||||
else if (month.compareToAscii ("Sep") == 0)
|
||||
else if (month.equalsAscii("Sep"))
|
||||
return 9;
|
||||
else if (month.compareToAscii ("Oct") == 0)
|
||||
else if (month.equalsAscii("Oct"))
|
||||
return 10;
|
||||
else if (month.compareToAscii ("Nov") == 0)
|
||||
else if (month.equalsAscii("Nov"))
|
||||
return 11;
|
||||
else if (month.compareToAscii ("Dec") == 0)
|
||||
else if (month.equalsAscii("Dec"))
|
||||
return 12;
|
||||
else
|
||||
return 0;
|
||||
|
||||
@@ -47,7 +47,7 @@ extern "C" void * SAL_CALL component_getFactory(
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( ::http_dav_ucp::ContentProvider::getImplementationName_Static().
|
||||
compareToAscii( pImplName ) == 0 )
|
||||
equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = ::http_dav_ucp::ContentProvider::createServiceFactory( xSMgr );
|
||||
}
|
||||
|
||||
@@ -898,7 +898,7 @@ void UcbContent::open( const OUString & rName, const OUString& rInput,
|
||||
bool bDoSort = false;
|
||||
|
||||
ucb::OpenCommandArgument2 aOpenArg;
|
||||
if (rName.compareToAscii("search") == 0)
|
||||
if (rName.equalsAscii("search"))
|
||||
{
|
||||
ucb::SearchCommandArgument aArgument;
|
||||
if (!parseSearchArgument(rInput, aArgument.Info))
|
||||
|
||||
@@ -245,7 +245,7 @@ void SAL_CALL GlobalEventConfig_Impl::replaceByName( const OUString& aName, cons
|
||||
sal_Int32 nPropCount = props.getLength();
|
||||
for( sal_Int32 index = 0 ; index < nPropCount ; ++index )
|
||||
{
|
||||
if ( props[ index ].Name.compareToAscii( "Script" ) == 0 )
|
||||
if ( props[ index ].Name.equalsAscii( "Script" ) )
|
||||
props[ index ].Value >>= macroURL;
|
||||
}
|
||||
m_eventBindingHash[ aName ] = macroURL;
|
||||
|
||||
@@ -498,27 +498,27 @@ sal_Int32 SvtSecurityOptions_Impl::GetHandle( const OUString& rName )
|
||||
{
|
||||
sal_Int32 nHandle;
|
||||
|
||||
if( rName.compareToAscii( CSTR_SECUREURL ) == 0 )
|
||||
if( rName.equalsAscii( CSTR_SECUREURL ) )
|
||||
nHandle = PROPERTYHANDLE_SECUREURL;
|
||||
else if( rName.compareToAscii( CSTR_DOCWARN_SAVEORSEND ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_DOCWARN_SAVEORSEND ) )
|
||||
nHandle = PROPERTYHANDLE_DOCWARN_SAVEORSEND;
|
||||
else if( rName.compareToAscii( CSTR_DOCWARN_SIGNING ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_DOCWARN_SIGNING ) )
|
||||
nHandle = PROPERTYHANDLE_DOCWARN_SIGNING;
|
||||
else if( rName.compareToAscii( CSTR_DOCWARN_PRINT ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_DOCWARN_PRINT ) )
|
||||
nHandle = PROPERTYHANDLE_DOCWARN_PRINT;
|
||||
else if( rName.compareToAscii( CSTR_DOCWARN_CREATEPDF ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_DOCWARN_CREATEPDF ) )
|
||||
nHandle = PROPERTYHANDLE_DOCWARN_CREATEPDF;
|
||||
else if( rName.compareToAscii( CSTR_DOCWARN_REMOVEPERSONALINFO ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_DOCWARN_REMOVEPERSONALINFO ) )
|
||||
nHandle = PROPERTYHANDLE_DOCWARN_REMOVEPERSONALINFO;
|
||||
else if( rName.compareToAscii( CSTR_DOCWARN_RECOMMENDPASSWORD ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_DOCWARN_RECOMMENDPASSWORD ) )
|
||||
nHandle = PROPERTYHANDLE_DOCWARN_RECOMMENDPASSWORD;
|
||||
else if( rName.compareToAscii( CSTR_CTRLCLICK_HYPERLINK ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_CTRLCLICK_HYPERLINK ) )
|
||||
nHandle = PROPERTYHANDLE_CTRLCLICK_HYPERLINK;
|
||||
else if( rName.compareToAscii( CSTR_MACRO_SECLEVEL ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_MACRO_SECLEVEL ) )
|
||||
nHandle = PROPERTYHANDLE_MACRO_SECLEVEL;
|
||||
else if( rName.compareToAscii( CSTR_MACRO_TRUSTEDAUTHORS ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_MACRO_TRUSTEDAUTHORS ) )
|
||||
nHandle = PROPERTYHANDLE_MACRO_TRUSTEDAUTHORS;
|
||||
else if( rName.compareToAscii( CSTR_MACRO_DISABLE ) == 0 )
|
||||
else if( rName.equalsAscii( CSTR_MACRO_DISABLE ) )
|
||||
nHandle = PROPERTYHANDLE_MACRO_DISABLE;
|
||||
|
||||
// xmlsec05 deprecated
|
||||
|
||||
@@ -482,7 +482,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL utl_component_getFactory(
|
||||
reinterpret_cast< css::lang::XMultiServiceFactory * >( pServiceManager ) );
|
||||
css::uno::Reference< css::lang::XSingleComponentFactory > xFactory;
|
||||
|
||||
if (OTempFileService::getImplementationName_Static().compareToAscii( pImplName ) == 0)
|
||||
if (OTempFileService::getImplementationName_Static().equalsAscii( pImplName ) )
|
||||
xFactory = OTempFileService::createServiceFactory_Static();
|
||||
|
||||
if ( xFactory.is() )
|
||||
|
||||
@@ -111,13 +111,13 @@ namespace DOM { namespace events {
|
||||
CEvent *pEvent = 0; // pointer to internal event representation
|
||||
|
||||
OUString const aType = i_xEvent->getType();
|
||||
if (aType.compareToAscii("DOMSubtreeModified") == 0||
|
||||
aType.compareToAscii("DOMNodeInserted") == 0||
|
||||
aType.compareToAscii("DOMNodeRemoved") == 0||
|
||||
aType.compareToAscii("DOMNodeRemovedFromDocument") == 0||
|
||||
aType.compareToAscii("DOMNodeInsertedIntoDocument") == 0||
|
||||
aType.compareToAscii("DOMAttrModified") == 0||
|
||||
aType.compareToAscii("DOMCharacterDataModified") == 0)
|
||||
if (aType.equalsAscii("DOMSubtreeModified") ||
|
||||
aType.equalsAscii("DOMNodeInserted") ||
|
||||
aType.equalsAscii("DOMNodeRemoved") ||
|
||||
aType.equalsAscii("DOMNodeRemovedFromDocument") ||
|
||||
aType.equalsAscii("DOMNodeInsertedIntoDocument") ||
|
||||
aType.equalsAscii("DOMAttrModified") ||
|
||||
aType.equalsAscii("DOMCharacterDataModified") )
|
||||
{
|
||||
Reference< XMutationEvent > const aMEvent(i_xEvent,
|
||||
UNO_QUERY_THROW);
|
||||
@@ -132,9 +132,9 @@ namespace DOM { namespace events {
|
||||
aMEvent->getAttrChange());
|
||||
pEvent = pMEvent;
|
||||
} else if ( // UIEvent
|
||||
aType.compareToAscii("DOMFocusIn") == 0||
|
||||
aType.compareToAscii("DOMFocusOut") == 0||
|
||||
aType.compareToAscii("DOMActivate") == 0)
|
||||
aType.equalsAscii("DOMFocusIn") ||
|
||||
aType.equalsAscii("DOMFocusOut") ||
|
||||
aType.equalsAscii("DOMActivate") )
|
||||
{
|
||||
Reference< XUIEvent > const aUIEvent(i_xEvent, UNO_QUERY_THROW);
|
||||
CUIEvent* pUIEvent = new CUIEvent;
|
||||
@@ -143,12 +143,12 @@ namespace DOM { namespace events {
|
||||
aUIEvent->getView(), aUIEvent->getDetail());
|
||||
pEvent = pUIEvent;
|
||||
} else if ( // MouseEvent
|
||||
aType.compareToAscii("click") == 0||
|
||||
aType.compareToAscii("mousedown") == 0||
|
||||
aType.compareToAscii("mouseup") == 0||
|
||||
aType.compareToAscii("mouseover") == 0||
|
||||
aType.compareToAscii("mousemove") == 0||
|
||||
aType.compareToAscii("mouseout") == 0)
|
||||
aType.equalsAscii("click") ||
|
||||
aType.equalsAscii("mousedown") ||
|
||||
aType.equalsAscii("mouseup") ||
|
||||
aType.equalsAscii("mouseover") ||
|
||||
aType.equalsAscii("mousemove") ||
|
||||
aType.equalsAscii("mouseout") )
|
||||
{
|
||||
Reference< XMouseEvent > const aMouseEvent(i_xEvent,
|
||||
UNO_QUERY_THROW);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user