diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-02-25 17:52:23 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-02-25 17:59:40 +0100 |
commit | 4f4e4e40f5b79a4dba46ffedd11cafa7beb08a87 (patch) | |
tree | c158b93b176b084eac024c0e3b5e94e18911f50f /framework | |
parent | e39c551c6133d0ff2b7074f64ea66563ebcce14b (diff) |
loplugin: improve indentation
Change-Id: Idb847766d93dc222d6c55889616da21eeac212ee
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/dispatch/closedispatcher.cxx | 6 | ||||
-rw-r--r-- | framework/source/fwi/classes/converter.cxx | 6 | ||||
-rw-r--r-- | framework/source/jobs/helponstartup.cxx | 9 | ||||
-rw-r--r-- | framework/source/services/autorecovery.cxx | 24 | ||||
-rw-r--r-- | framework/source/services/dispatchhelper.cxx | 3 | ||||
-rw-r--r-- | framework/source/xml/acceleratorconfigurationreader.cxx | 18 |
6 files changed, 22 insertions, 44 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 1809a9e82631..010f1e3e361c 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -379,8 +379,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) sal_Bool bSuccess = sal_False; if (bCloseFrame) bSuccess = implts_closeFrame(); - else - if (bEstablishBackingMode) + else if (bEstablishBackingMode) #if defined MACOSX { // on mac close down, quickstarter keeps the process alive @@ -408,8 +407,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) #else bSuccess = implts_establishBackingMode(); #endif - else - if (bTerminateApp) + else if (bTerminateApp) bSuccess = implts_terminateApplication(); if ( diff --git a/framework/source/fwi/classes/converter.cxx b/framework/source/fwi/classes/converter.cxx index e61c0084654e..9083a877084b 100644 --- a/framework/source/fwi/classes/converter.cxx +++ b/framework/source/fwi/classes/converter.cxx @@ -70,11 +70,9 @@ OUStringList Converter::convert_seqOUString2OUStringList( const css::uno::Sequen // write year formated as "YYYY" if (nYear<10) sBuffer.appendAscii("000"); - else - if (nYear<100) + else if (nYear<100) sBuffer.appendAscii("00"); - else - if (nYear<1000) + else if (nYear<1000) sBuffer.appendAscii("0"); sBuffer.append( (sal_Int32)nYear ); diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx index 0d90cf279467..d5f4fd8637e4 100644 --- a/framework/source/jobs/helponstartup.cxx +++ b/framework/source/jobs/helponstartup.cxx @@ -163,9 +163,8 @@ css::uno::Any SAL_CALL HelpOnStartup::execute(const css::uno::Sequence< css::bea // a) if (sCurrentHelpURL.isEmpty()) bShowIt = sal_True; - else // b) - if (bCurrentHelpURLIsAnyDefaultURL) + else if (bCurrentHelpURLIsAnyDefaultURL) bShowIt = sal_True; if (bShowIt) @@ -194,11 +193,9 @@ void SAL_CALL HelpOnStartup::disposing(const css::lang::EventObject& aEvent) if (aEvent.Source == m_xModuleManager) m_xModuleManager.clear(); - else - if (aEvent.Source == m_xDesktop) + else if (aEvent.Source == m_xDesktop) m_xDesktop.clear(); - else - if (aEvent.Source == m_xConfig) + else if (aEvent.Source == m_xConfig) m_xConfig.clear(); aLock.unlock(); diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 79cf9a87b71f..e1415dff7c8d 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1334,11 +1334,9 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo& rIn if (! impl_enoughDiscSpace(nMinSpaceConfigSave)) AutoRecovery::impl_showFullDiscError(); - else - if (nRetry > RETRY_STORE_ON_MIGHT_FULL_DISC_USEFULL) + else if (nRetry > RETRY_STORE_ON_MIGHT_FULL_DISC_USEFULL) nRetry = RETRY_STORE_ON_MIGHT_FULL_DISC_USEFULL; - else - if (nRetry <= GIVE_UP_RETRY) + else if (nRetry <= GIVE_UP_RETRY) throw; // force stacktrace to know if there exist might other reasons, why an AutoSave can fail !!! --nRetry; @@ -1479,8 +1477,7 @@ void AutoRecovery::implts_updateTimer() nMilliSeconds = m_nAutoSaveTimeIntervall; // [ms] #endif } - else - if (m_eTimerType == AutoRecovery::E_POLL_FOR_USER_IDLE) + else if (m_eTimerType == AutoRecovery::E_POLL_FOR_USER_IDLE) { nMilliSeconds = MIN_TIME_FOR_USER_IDLE; #if OSL_DEBUG_LEVEL > 1 @@ -1488,8 +1485,7 @@ void AutoRecovery::implts_updateTimer() nMilliSeconds = 300; // let us some time, to finish this method .-) #endif } - else - if (m_eTimerType == AutoRecovery::E_POLL_TILL_AUTOSAVE_IS_ALLOWED) + else if (m_eTimerType == AutoRecovery::E_POLL_TILL_AUTOSAVE_IS_ALLOWED) nMilliSeconds = 300; // there is a minimum time frame, where the user can loose some key input data! m_aTimer.SetTimeout(nMilliSeconds); @@ -2370,11 +2366,9 @@ void AutoRecovery::implts_saveOneDoc(const ::rtl::OUString& if (! impl_enoughDiscSpace(nMinSpaceDocSave)) AutoRecovery::impl_showFullDiscError(); - else - if (nRetry > RETRY_STORE_ON_MIGHT_FULL_DISC_USEFULL) + else if (nRetry > RETRY_STORE_ON_MIGHT_FULL_DISC_USEFULL) nRetry = RETRY_STORE_ON_MIGHT_FULL_DISC_USEFULL; - else - if (nRetry <= GIVE_UP_RETRY) + else if (nRetry <= GIVE_UP_RETRY) throw; // force stacktrace to know if there exist might other reasons, why an AutoSave can fail !!! --nRetry; @@ -2500,15 +2494,13 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa { sLoadOriginalURL = rInfo.OrgURL; } - else - if (!rInfo.TemplateURL.isEmpty()) + else if (!rInfo.TemplateURL.isEmpty()) { sLoadOriginalURL = rInfo.TemplateURL; lDescriptor[::comphelper::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True; lDescriptor[::comphelper::MediaDescriptor::PROP_TEMPLATENAME()] <<= rInfo.TemplateURL; } - else - if (!rInfo.FactoryURL.isEmpty()) + else if (!rInfo.FactoryURL.isEmpty()) { sLoadOriginalURL = rInfo.FactoryURL; lDescriptor[::comphelper::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True; diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx index be645c7b849d..86565ee1383f 100644 --- a/framework/source/services/dispatchhelper.cxx +++ b/framework/source/services/dispatchhelper.cxx @@ -142,8 +142,7 @@ css::uno::Any SAL_CALL DispatchHelper::executeDispatch( xNotifyDispatch->dispatchWithNotification(aURL, aArguments, xListener); aResult = m_aResult; } - else - if (xDispatch.is()) + else if (xDispatch.is()) { // dispatch it without any chance to get a result xDispatch->dispatch( aURL, aArguments ); diff --git a/framework/source/xml/acceleratorconfigurationreader.cxx b/framework/source/xml/acceleratorconfigurationreader.cxx index af6a65e80952..1a6a38a19e9a 100644 --- a/framework/source/xml/acceleratorconfigurationreader.cxx +++ b/framework/source/xml/acceleratorconfigurationreader.cxx @@ -258,8 +258,7 @@ AcceleratorConfigurationReader::EXMLElement AcceleratorConfigurationReader::impl if (sElement.equals(NS_ELEMENT_ACCELERATORLIST)) eElement = E_ELEMENT_ACCELERATORLIST; - else - if (sElement.equals(NS_ELEMENT_ITEM)) + else if (sElement.equals(NS_ELEMENT_ITEM)) eElement = E_ELEMENT_ITEM; else throw css::uno::RuntimeException( @@ -276,20 +275,15 @@ AcceleratorConfigurationReader::EXMLAttribute AcceleratorConfigurationReader::im if (sAttribute.equals(NS_ATTRIBUTE_KEYCODE)) eAttribute = E_ATTRIBUTE_KEYCODE; - else - if (sAttribute.equals(NS_ATTRIBUTE_MOD_SHIFT)) + else if (sAttribute.equals(NS_ATTRIBUTE_MOD_SHIFT)) eAttribute = E_ATTRIBUTE_MOD_SHIFT; - else - if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD1)) + else if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD1)) eAttribute = E_ATTRIBUTE_MOD_MOD1; - else - if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD2)) + else if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD2)) eAttribute = E_ATTRIBUTE_MOD_MOD2; - else - if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD3)) + else if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD3)) eAttribute = E_ATTRIBUTE_MOD_MOD3; - else - if (sAttribute.equals(NS_ATTRIBUTE_URL)) + else if (sAttribute.equals(NS_ATTRIBUTE_URL)) eAttribute = E_ATTRIBUTE_URL; else throw css::uno::RuntimeException( |