diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-10 12:29:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-11 07:01:14 +0100 |
commit | 2fab2c9d494035cc55d0bc56a47e784be6e64510 (patch) | |
tree | 719f64e6f10d9649717cac591dbed52a6020889f /vcl/unx | |
parent | 71a61ab2d8b650ebe0655cebd7233959a5a3811e (diff) |
loplugin:indentation in vcl
Change-Id: Idd7166833764fdf1d9c42a050490572a8b330199
Reviewed-on: https://gerrit.libreoffice.org/67610
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/i18n_cb.cxx | 34 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salvd.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/glyphcache.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 22 | ||||
-rw-r--r-- | vcl/unx/glxtest.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atkfactory.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atkutil.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkdata.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 3 |
14 files changed, 50 insertions, 51 deletions
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx index 6dd8d0915f2d..b683015fe5a5 100644 --- a/vcl/unx/generic/app/i18n_cb.cxx +++ b/vcl/unx/generic/app/i18n_cb.cxx @@ -41,7 +41,7 @@ int PreeditStartCallback ( XIC, XPointer client_data, XPointer ) { - preedit_data_t* pPreeditData = reinterpret_cast<preedit_data_t*>(client_data); + preedit_data_t* pPreeditData = reinterpret_cast<preedit_data_t*>(client_data); if ( pPreeditData->eState == PreeditStatus::ActivationRequired ) { pPreeditData->eState = PreeditStatus::Active; @@ -109,8 +109,8 @@ Preedit_DeleteText(preedit_text_t *ptext, int from, int howmuch) ptext->nLength = from; } - // NULL-terminate the string - ptext->pUnicodeBuffer[ptext->nLength] = u'\0'; + // NULL-terminate the string + ptext->pUnicodeBuffer[ptext->nLength] = u'\0'; } // reallocate the textbuffer with sufficiently large size 2^x @@ -148,9 +148,9 @@ Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where) if (pInsertText->encoding_is_wchar) { wchar_t *pWCString = pInsertText->string.wide_char; - size_t nBytes = wcstombs ( nullptr, pWCString, 1024 /* don't care */); - pMBString = static_cast<char*>(alloca( nBytes + 1 )); - nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1); + size_t nBytes = wcstombs ( nullptr, pWCString, 1024 /* don't care */); + pMBString = static_cast<char*>(alloca( nBytes + 1 )); + nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1); } else { @@ -163,17 +163,17 @@ Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where) if (nEncoding != RTL_TEXTENCODING_UNICODE) { - rtl_TextToUnicodeConverter aConverter = + rtl_TextToUnicodeConverter aConverter = rtl_createTextToUnicodeConverter( nEncoding ); - rtl_TextToUnicodeContext aContext = + rtl_TextToUnicodeContext aContext = rtl_createTextToUnicodeContext(aConverter); - sal_Size nBufferSize = nInsertTextLength * 2; + sal_Size nBufferSize = nInsertTextLength * 2; - pInsertTextString = static_cast<sal_Unicode*>(alloca(nBufferSize)); + pInsertTextString = static_cast<sal_Unicode*>(alloca(nBufferSize)); - sal_uInt32 nConversionInfo; - sal_Size nConvertedChars; + sal_uInt32 nConversionInfo; + sal_Size nConvertedChars; rtl_convertTextToUnicode( aConverter, aContext, pMBString, nMBLength, @@ -182,8 +182,8 @@ Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where) | RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE, &nConversionInfo, &nConvertedChars ); - rtl_destroyTextToUnicodeContext(aConverter, aContext); - rtl_destroyTextToUnicodeConverter(aConverter); + rtl_destroyTextToUnicodeContext(aConverter, aContext); + rtl_destroyTextToUnicodeConverter(aConverter); } else @@ -291,9 +291,9 @@ Preedit_FeedbackToSAL ( const XIMFeedback* pfeedback, int nlength, std::vector<E // copy in list psalattr[npos] = nval; noldval = nval; - } - // return list of sal attributes - return psalattr; + } + // return list of sal attributes + return psalattr; } void diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 1282881f442b..9954988e7af5 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -1334,7 +1334,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor > bSuccess = rTypes.hasElements(); if( bHaveText && ! bHaveUTF16 ) { - int i = 0; + int i = 0; int nNewFlavors = rTypes.getLength()+1; Sequence< DataFlavor > aTemp( nNewFlavors ); diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index e0a4879ff6fb..29f7323dbb1b 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -1362,11 +1362,11 @@ void X11SalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, pGC, aXRect.x, aXRect.y, aXRect.width, aXRect.height ); } - } + } - if( mnPenColor != SALCOLOR_NONE ) - for( sal_uInt32 i = 0; i < nPoly; i++ ) - drawPolyLine( pPoints[i], pPtAry[i], true ); + if( mnPenColor != SALCOLOR_NONE ) + for( sal_uInt32 i = 0; i < nPoly; i++ ) + drawPolyLine( pPoints[i], pPtAry[i], true ); } bool X11SalGraphicsImpl::drawPolyLineBezier( sal_uInt32, const SalPoint*, const PolyFlags* ) diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index a162a694f818..5d422b6433ed 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -155,7 +155,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics const * pGraphics, long &nD pColormap = new SalColormap( pDisplay_, pXRenderFormat->colormap, m_nXScreen ); else pColormap = new SalColormap( nBitCount ); - bDeleteColormap = true; + bDeleteColormap = true; } else if( nBitCount != pDisplay_->GetVisual( m_nXScreen ).GetDepth() ) { diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 42bf6d0a98b9..b0a6b9935fdb 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -196,8 +196,8 @@ FT_FaceRec_* FreetypeFontInfo::GetFaceFT() maFaceFT = nullptr; } - ++mnRefCount; - return maFaceFT; + ++mnRefCount; + return maFaceFT; } void FreetypeFontInfo::ReleaseFaceFT() diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx index b541fe1861fe..3578e99174b1 100644 --- a/vcl/unx/generic/glyphs/glyphcache.cxx +++ b/vcl/unx/generic/glyphs/glyphcache.cxx @@ -128,10 +128,10 @@ bool GlyphCache::IFSD_Equal::operator()(const rtl::Reference<LogicalFontInstance if( nAWidth != nBWidth ) return false; - if (rA.meLanguage != rB.meLanguage) + if (rA.meLanguage != rB.meLanguage) return false; // check for features - if ((rA.maTargetName.indexOf(FontSelectPattern::FEAT_PREFIX) + if ((rA.maTargetName.indexOf(FontSelectPattern::FEAT_PREFIX) != -1 || rB.maTargetName.indexOf(FontSelectPattern::FEAT_PREFIX) != -1) && rA.maTargetName != rB.maTargetName) diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 2401855b892c..5922aab5f3ca 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -410,7 +410,7 @@ void PPDParser::scanPPDDir( const OUString& rDir ) { if( aFileName.endsWithIgnoreAsciiCaseAsciiL( rSuffix.pSuffix, rSuffix.nSuffixLen ) ) { - (*rPPDCache.pAllPPDFiles)[ aFileName.copy( 0, aFileName.getLength() - rSuffix.nSuffixLen ) ] = aPPDFile.PathToFileName(); + (*rPPDCache.pAllPPDFiles)[ aFileName.copy( 0, aFileName.getLength() - rSuffix.nSuffixLen ) ] = aPPDFile.PathToFileName(); break; } } diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index f4a24cfe6458..59e5370736f1 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -1879,10 +1879,10 @@ void X11SalFrame::SetSize( const Size &rSize ) { if( rSize.Width() > 0 && rSize.Height() > 0 ) { - if( ! ( nStyle_ & SalFrameStyleFlags::SIZEABLE ) + if( ! ( nStyle_ & SalFrameStyleFlags::SIZEABLE ) && ! IsChildWindow() && ( nStyle_ & (SalFrameStyleFlags::FLOAT|SalFrameStyleFlags::OWNERDRAWDECORATION) ) != SalFrameStyleFlags::FLOAT ) - { + { XSizeHints* pHints = XAllocSizeHints(); long nSupplied = 0; XGetWMNormalHints( GetXDisplay(), @@ -1899,7 +1899,7 @@ void X11SalFrame::SetSize( const Size &rSize ) GetShellWindow(), pHints ); XFree( pHints ); - } + } XResizeWindow( GetXDisplay(), IsSysChildWindow() ? GetWindow() : GetShellWindow(), rSize.Width(), rSize.Height() ); if( GetWindow() != GetShellWindow() ) { @@ -1929,20 +1929,20 @@ void X11SalFrame::SetPosSize( const tools::Rectangle &rPosSize ) if( !values.width || !values.height ) return; - if( mpParent && ! IsSysChildWindow() ) - { + if( mpParent && ! IsSysChildWindow() ) + { if( AllSettings::GetLayoutRTL() ) values.x = mpParent->maGeometry.nWidth-values.width-1-values.x; - ::Window aChild; - // coordinates are relative to parent, so translate to root coordinates - XTranslateCoordinates( GetDisplay()->GetDisplay(), + ::Window aChild; + // coordinates are relative to parent, so translate to root coordinates + XTranslateCoordinates( GetDisplay()->GetDisplay(), mpParent->GetWindow(), GetDisplay()->GetRootWindow( m_nXScreen ), values.x, values.y, &values.x, &values.y, & aChild ); - } + } bool bMoved = false; bool bSized = false; @@ -2351,7 +2351,7 @@ void X11SalFrame::SetInputContext( SalInputContext* pContext ) mpInputContext.reset( new SalI18N_InputContext( this ) ); if (mpInputContext->UseContext()) { - mpInputContext->ExtendEventMask( GetShellWindow() ); + mpInputContext->ExtendEventMask( GetShellWindow() ); if (mbInputFocus) mpInputContext->SetICFocus( this ); } @@ -3247,7 +3247,7 @@ bool X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent ) else if (nLen > 0 /* nEncoding == RTL_TEXTENCODING_UNICODE */) { pString = reinterpret_cast<sal_Unicode*>(pPrintable); - nSize = nLen; + nSize = nLen; } else { diff --git a/vcl/unx/glxtest.cxx b/vcl/unx/glxtest.cxx index 8b5265c88709..38d70aa490e2 100644 --- a/vcl/unx/glxtest.cxx +++ b/vcl/unx/glxtest.cxx @@ -173,7 +173,7 @@ static void glxtest() XSetErrorHandler(x_error_handler); ///// Get a visual ///// - int attribs[] = { + int attribs[] = { GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx index c95830f752df..3a776b20dcc7 100644 --- a/vcl/unx/gtk/a11y/atkfactory.cxx +++ b/vcl/unx/gtk/a11y/atkfactory.cxx @@ -70,8 +70,8 @@ atk_noop_object_wrapper_get_type() } ; type = g_type_register_static (ATK_TYPE_OBJECT, "OOoAtkNoOpObj", &typeInfo, GTypeFlags(0)) ; - } - return type; + } + return type; } static AtkObject* @@ -139,7 +139,7 @@ wrapper_factory_create_accessible( GObject *obj ) if( pWindow ) { - uno::Reference< accessibility::XAccessible > xAccessible = pWindow->GetAccessible(); + uno::Reference< accessibility::XAccessible > xAccessible = pWindow->GetAccessible(); if( xAccessible.is() ) { AtkObject *accessible = ooo_wrapper_registry_get( xAccessible ); diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index 8aa3c0d80770..92905f6ec64b 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -784,9 +784,9 @@ ooo_atk_util_get_type() } ; type = g_type_register_static (parent_type, "OOoUtil", &typeInfo, GTypeFlags(0)) ; - } + } - return type; + return type; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 0027a6e9a958..0ed5b6fe7d71 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -196,7 +196,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext setLabel( LISTBOX_##elem##_LABEL, aLabel ); \ break - switch( i ) + switch( i ) { LABEL_LIST( VERSION ); LABEL_LIST( TEMPLATE ); diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx index db810d745cd4..617506c9e38b 100644 --- a/vcl/unx/gtk3/gtk3gtkdata.cxx +++ b/vcl/unx/gtk3/gtk3gtkdata.cxx @@ -412,9 +412,9 @@ GtkSalData::~GtkSalData() Yield( true, true ); g_warning ("TESTME: We used to have a stop-timer here, but the central code should do this"); - // sanity check: at this point nobody should be yielding, but wake them - // up anyway before the condition they're waiting on gets destroyed. - m_aDispatchCondition.set(); + // sanity check: at this point nobody should be yielding, but wake them + // up anyway before the condition they're waiting on gets destroyed. + m_aDispatchCondition.set(); osl::MutexGuard g( m_aDispatchMutex ); if (m_pUserEvent) diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 4799b77e672b..1c3fa5aab7d4 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -2929,8 +2929,7 @@ vcl::Font pango_to_vcl(const PangoFontDescription* font, const css::lang::Locale OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); #endif - int nPointHeight = 0; - nPointHeight = nPangoHeight/PANGO_SCALE; + int nPointHeight = nPangoHeight/PANGO_SCALE; vcl::Font aFont( aInfo.m_aFamilyName, Size( 0, nPointHeight ) ); if( aInfo.m_eWeight != WEIGHT_DONTKNOW ) |