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 /vcl | |
parent | e39c551c6133d0ff2b7074f64ea66563ebcce14b (diff) |
loplugin: improve indentation
Change-Id: Idb847766d93dc222d6c55889616da21eeac212ee
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/button.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/ilstbox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/FilterConfigCache.cxx | 3 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpegc.c | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/app/i18n_keysym.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.cxx | 11 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi3.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salvd.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/printer/printerinfomanager.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/generic/window/salobj.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/kde/salnativewidgets-kde.cxx | 16 |
16 files changed, 40 insertions, 49 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 709c52daf4c0..29f98622dbf6 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -3872,9 +3872,9 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags ) ResMgr* pResMgr = ImplGetResMgr(); pSVData->maCtrlData.mpCheckImgList = new ImageList(); if( pResMgr ) - LoadThemedImageList( rStyleSettings, - pSVData->maCtrlData.mpCheckImgList, - ResId( SV_RESID_BITMAP_CHECK+nStyle, *pResMgr ), 9 ); + LoadThemedImageList( rStyleSettings, + pSVData->maCtrlData.mpCheckImgList, + ResId( SV_RESID_BITMAP_CHECK+nStyle, *pResMgr ), 9 ); pSVData->maCtrlData.mnCheckStyle = nStyle; } diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 2425147a13a7..61fa49caa611 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -2794,9 +2794,9 @@ void ImplWin::ImplDraw( bool bLayout ) ImplControlValue aControlValue; if ( !pWin->IsEnabled() ) - nState &= ~CTRL_STATE_ENABLED; + nState &= ~CTRL_STATE_ENABLED; if ( pWin->HasFocus() ) - nState |= CTRL_STATE_FOCUSED; + nState |= CTRL_STATE_FOCUSED; // The listbox is painted over the entire control including the // border, but ImplWin does not contain the border => correction diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index edc3a38bb5d6..53d0ef822fda 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -191,8 +191,7 @@ void FilterConfigCache::ImplInit() continue; if (lFlags[0].equalsIgnoreAsciiCase("import")) aEntry.nFlags = 1; - else - if (lFlags[0].equalsIgnoreAsciiCase("export")) + else if (lFlags[0].equalsIgnoreAsciiCase("export")) aEntry.nFlags = 2; ::rtl::OUString sFormatName; diff --git a/vcl/source/filter/jpeg/jpegc.c b/vcl/source/filter/jpeg/jpegc.c index e70aa53224fc..0f92948b45da 100644 --- a/vcl/source/filter/jpeg/jpegc.c +++ b/vcl/source/filter/jpeg/jpegc.c @@ -188,7 +188,7 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) } /* PENDING ??? */ if ( cinfo.err->msg_code == 113 ) - break; + break; pTmp += nAlignedWidth; } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 396c727b501c..956cd85a0276 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3487,7 +3487,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical nLength2 = nEndBinaryIndex - nBeginBinaryIndex + 1; // include the last byte for( it = aSections.begin(); it != aSections.end(); ++it ) if( *it > nBeginBinaryIndex && *it < nEndBinaryIndex ) - nLength2 -= 6; + nLength2 -= 6; } else { diff --git a/vcl/unx/generic/app/i18n_keysym.cxx b/vcl/unx/generic/app/i18n_keysym.cxx index b0b127d0d1a5..a720658335a2 100644 --- a/vcl/unx/generic/app/i18n_keysym.cxx +++ b/vcl/unx/generic/app/i18n_keysym.cxx @@ -343,8 +343,7 @@ KeysymToUnicode (KeySym nKeySym) keymap_t const* p_map = NULL; if (n_byte3 < INITIAL_KEYMAPS) p_map = p_keymap[n_byte3]; - else - if (n_byte3 == 255) + else if (n_byte3 == 255) p_map = &keymap255; if ((p_map != NULL) && (n_byte4 >= p_map->first) && (n_byte4 <= p_map->last) ) diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index e748bc203e85..60a0ad2426b8 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -259,8 +259,7 @@ sal_Bool SalDisplay::BestVisual( Display *pDisplay, { bUsable = sal_False; } - else - if( pVInfos[i].c_class == TrueColor ) + else if( pVInfos[i].c_class == TrueColor ) { nTrueColor = 2048; if( pVInfos[i].depth == 24 ) @@ -2320,7 +2319,7 @@ extern "C" i_pEvent->xproperty.window == pSalDisplay->GetDrawable( pSalDisplay->GetDefaultXScreen() ) && i_pEvent->xproperty.atom == pSalDisplay->getWMAdaptor()->getAtom( WMAdaptor::SAL_GETTIMEEVENT ) ) - return True; + return True; return False; } diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index d4cccb2488bc..77f0cc09ecd1 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -956,22 +956,21 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In && aEvent.xproperty.atom == selection ) bAdjustTime = true; } - else - if( XCheckTypedEvent( m_pDisplay, + else if( XCheckTypedEvent( m_pDisplay, SelectionClear, &aEvent ) ) { bHandle = true; } - else - if( XCheckTypedEvent( m_pDisplay, + else if( XCheckTypedEvent( m_pDisplay, SelectionRequest, &aEvent ) ) + { bHandle = true; - else - if( XCheckTypedEvent( m_pDisplay, + } + else if( XCheckTypedEvent( m_pDisplay, SelectionNotify, &aEvent ) ) diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 2907b44bf03e..da7023bbf70f 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -464,8 +464,7 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) XFreePixmap (GetXDisplay(), hBrush_); hBrush_ = limitXCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 ); } - else - if( !hBrush_ ) + else if( !hBrush_ ) hBrush_ = limitXCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 ); // put the ximage to the pixmap diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx index fb7027eab594..391da493e039 100644 --- a/vcl/unx/generic/gdi/salgdi3.cxx +++ b/vcl/unx/generic/gdi/salgdi3.cxx @@ -171,7 +171,7 @@ bool X11SalGraphics::setFont( const FontSelectPattern *pEntry, int nFallbackLeve // return early if there is no new font if( !pEntry ) - return false; + return false; bFontVertical_ = pEntry->mbVertical; diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index f24104970001..80b1e64985b8 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -104,11 +104,9 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, if( bDeleteColormap ) m_pDeleteColormap = pColormap; } - else - if( nDeviceDepth == nVisualDepth ) + else if( nDeviceDepth == nVisualDepth ) m_pColormap = &pDisplay->GetColormap( m_nXScreen ); - else - if( nDeviceDepth == 1 ) + else if( nDeviceDepth == 1 ) m_pColormap = m_pDeleteColormap = new SalColormap(); if (m_pDeleteColormap != pOrigDeleteColormap) diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx index e1e1ca9d286e..6db49042a578 100644 --- a/vcl/unx/generic/printer/printerinfomanager.cxx +++ b/vcl/unx/generic/printer/printerinfomanager.cxx @@ -608,7 +608,7 @@ void PrinterInfoManager::initialize() if( m_aPrinters.find( aPrinterName ) != m_aPrinters.end() ) // probably user made this one permanent in padmin - continue; + continue; String aCmd( m_aSystemPrintCommand ); aCmd.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "(PRINTER)" ) ), it->m_aQueue ); @@ -710,7 +710,7 @@ bool PrinterInfoManager::writePrinterConfig() { if( ! it->second.m_bModified ) // printer was not changed, do nothing - continue; + continue; // don't save autoqueue printers sal_Int32 nIndex = 0; @@ -973,7 +973,7 @@ void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const if( ! rInfo.m_bPerformFontSubstitution || ! rInfo.m_aFontSubstitutes.size() ) - return; + return; ::std::list< FastPrintFontInfo > aFonts; ::boost::unordered_map< OUString, ::std::list< FastPrintFontInfo >, OUStringHash > aPrinterFonts; diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index c35109b4bfbc..50f2aef1d185 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2596,10 +2596,10 @@ static sal_uInt16 sal_GetCode( int state ) if( state & Mod1Mask ) nCode |= KEY_MOD2; - // Map Meta/Super modifier to MOD3 on all Unix systems - // except Mac OS X - if( (state & Mod3Mask) ) - nCode |= KEY_MOD3; + // Map Meta/Super modifier to MOD3 on all Unix systems + // except Mac OS X + if( (state & Mod3Mask) ) + nCode |= KEY_MOD3; return nCode; } @@ -3217,8 +3217,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent ) pString = &nKeyString; nSize = 1; } - else - if (nLen > 0 && nEncoding != RTL_TEXTENCODING_UNICODE) + else if (nLen > 0 && nEncoding != RTL_TEXTENCODING_UNICODE) { // create text converter rtl_TextToUnicodeConverter aConverter = @@ -3244,8 +3243,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent ) pString = pBuffer; } - else - if (nLen > 0 /* nEncoding == RTL_TEXTENCODING_UNICODE */) + else if (nLen > 0 /* nEncoding == RTL_TEXTENCODING_UNICODE */) { pString = (sal_Unicode*)pPrintable; nSize = nLen; diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx index d5b00023ad5c..16b4e22feeea 100644 --- a/vcl/unx/generic/window/salobj.cxx +++ b/vcl/unx/generic/window/salobj.cxx @@ -436,8 +436,8 @@ static sal_uInt16 sal_GetCode( int state ) nCode |= KEY_MOD1; if( state & Mod1Mask ) nCode |= KEY_MOD2; - if( state & Mod3Mask ) - nCode |= KEY_MOD3; + if( state & Mod3Mask ) + nCode |= KEY_MOD3; return nCode; } diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index 249b9f6cd8d8..07f6fb3f70e4 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -4190,7 +4190,7 @@ uno::Reference<accessibility::XAccessibleEditableText> uno::Reference< accessibility::XAccessible > xChild = xContext->getAccessibleChild(i); if (!xChild.is()) continue; - uno::Reference< accessibility::XAccessibleContext > xChildContext = xChild->getAccessibleContext(); + uno::Reference< accessibility::XAccessibleContext > xChildContext = xChild->getAccessibleContext(); if (!xChildContext.is()) continue; uno::Reference< accessibility::XAccessibleEditableText > xText = FindFocus(xChildContext); diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx index 8f6c26b9a047..7b8b4eeba2d7 100644 --- a/vcl/unx/kde/salnativewidgets-kde.cxx +++ b/vcl/unx/kde/salnativewidgets-kde.cxx @@ -1100,7 +1100,7 @@ QToolBar *WidgetPainter::toolBar( const Rectangle& rControlRegion, sal_Bool bHor QToolButton *WidgetPainter::toolButton( const Rectangle& rControlRegion) { if ( !m_pToolButton ) - m_pToolButton = new QToolButton( NULL, "tool_button" ); + m_pToolButton = new QToolButton( NULL, "tool_button" ); QRect qRect = region2QRect( rControlRegion ); @@ -1155,7 +1155,7 @@ QPopupMenu *WidgetPainter::popupMenu( const Rectangle& rControlRegion) QProgressBar *WidgetPainter::progressBar( const Rectangle& rControlRegion ) { if ( !m_pProgressBar ) - m_pProgressBar = new QProgressBar( NULL, "progress_bar" ); + m_pProgressBar = new QProgressBar( NULL, "progress_bar" ); QRect qRect = region2QRect( rControlRegion ); @@ -1299,9 +1299,9 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nP QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarAddPage ).right() + 1 ); if ( qRectAddLine.width() > qRectSubLine.width() ) - bTwoSubButtons = sal_True; + bTwoSubButtons = sal_True; if ( qRectSubLine.left() > kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarSubPage ).left() ) - bPlatinumStyle = sal_True; + bPlatinumStyle = sal_True; } else { @@ -1309,9 +1309,9 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nP QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarAddPage ).bottom() + 1 ); if ( qRectAddLine.height() > qRectSubLine.height() ) - bTwoSubButtons = sal_True; + bTwoSubButtons = sal_True; if ( qRectSubLine.top() > kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarSubPage ).top() ) - bPlatinumStyle = sal_True; + bPlatinumStyle = sal_True; } switch ( nPart ) @@ -1678,11 +1678,11 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart // Workaround for Platinum and 3 button style scroll bars. // It makes the right/down button bigger. if ( nPart == PART_BUTTON_RIGHT ) - qRect.setLeft( kapp->style().querySubControlMetrics( + qRect.setLeft( kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pWidget, QStyle::SC_ScrollBarAddPage ).right() + 1 ); else - qRect.setTop( kapp->style().querySubControlMetrics( + qRect.setTop( kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pWidget, QStyle::SC_ScrollBarAddPage ).bottom() + 1 ); |