diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-02 10:43:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-19 10:45:00 +0200 |
commit | 062e40c76bcab664907737feace74f134a25c29c (patch) | |
tree | 83d8e99e62f8183bad31934cceed1c1626285b12 /vcl/unx | |
parent | loplugin:constantfunction: unotools (diff) | |
download | core-062e40c76bcab664907737feace74f134a25c29c.tar.gz core-062e40c76bcab664907737feace74f134a25c29c.zip |
loplugin:constantfunction: vcl
Change-Id: I985b781a8d53190505fcb1182749cdaf5cd0f8d0
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/i18n_ic.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/generic/app/i18n_status.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_dndcontext.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.hxx | 1 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.cxx | 80 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 58 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 5 |
10 files changed, 22 insertions, 153 deletions
diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx index c055ff44c2e2..87e84bbddd21 100644 --- a/vcl/unx/generic/app/i18n_ic.cxx +++ b/vcl/unx/generic/app/i18n_ic.cxx @@ -625,13 +625,6 @@ SalI18N_InputContext::UnsetICFocus( SalFrame* pFrame ) // multi byte input method only void -SalI18N_InputContext::SetLanguage(LanguageType) -{ - // not yet implemented - return; -} - -void SalI18N_InputContext::EndExtTextInput( sal_uInt16 /*nFlags*/ ) { if ( mbUseable && (maContext != NULL) && maClientData.pFrame ) diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index 9f616cc73c43..838a455b9590 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -597,11 +597,6 @@ SalFrame* I18NStatus::getStatusFrame() const return pRet; } -bool I18NStatus::canToggleStatusWindow() const -{ - return true; -} - void I18NStatus::toggleStatusWindow() { if (m_pStatusWindow != 0) @@ -631,7 +626,7 @@ X11ImeStatus::~X11ImeStatus() bool X11ImeStatus::canToggle() { - return vcl::I18NStatus::get().canToggleStatusWindow(); + return true; } void X11ImeStatus::toggle() diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 5e74cff7178e..dcdf0bd16726 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2211,8 +2211,6 @@ void SalDisplay::PrintInfo() const << KeyStr( nMod1KeySym_ ) << " (0x" << sal::static_int_cast< unsigned int >(nMod1KeySym_) << ")"); if( XExtendedMaxRequestSize(pDisp_) * 4 ) SAL_INFO( "vcl", "\tXMaxRequestSize \t" << XMaxRequestSize(pDisp_) * 4 << " " << XExtendedMaxRequestSize(pDisp_) * 4 << " [bytes]"); - if( GetProperties() != PROPERTY_DEFAULT ) - SAL_INFO( "vcl", "\tProperties \t0x" << std::hex << GetProperties() << "\n"); SAL_INFO( "vcl", "\tWMName \t" << getWMAdaptor()->getWindowManagerName() ); } SAL_INFO( "vcl", "Screen" ); diff --git a/vcl/unx/generic/dtrans/X11_dndcontext.cxx b/vcl/unx/generic/dtrans/X11_dndcontext.cxx index bbdd86a0e3cd..375bdea01538 100644 --- a/vcl/unx/generic/dtrans/X11_dndcontext.cxx +++ b/vcl/unx/generic/dtrans/X11_dndcontext.cxx @@ -115,9 +115,8 @@ void DragSourceContext::setCursor( sal_Int32 cursorId ) throw(std::exception) m_rManager.setCursor( cursorId, m_aDropWindow, m_nTimestamp ); } -void DragSourceContext::setImage( sal_Int32 imageId ) throw(std::exception) +void DragSourceContext::setImage( sal_Int32 ) throw(std::exception) { - m_rManager.setImage( imageId, m_aDropWindow, m_nTimestamp ); } void DragSourceContext::transferablesFlavorsChanged() throw(std::exception) diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index a5c8387d21fb..24480fca9c2e 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -3471,10 +3471,6 @@ void SelectionManager::setCursor( sal_Int32 cursor, ::Window aDropWindow, Time ) } } -void SelectionManager::setImage( sal_Int32, ::Window, Time ) -{ -} - void SelectionManager::transferablesFlavorsChanged() { osl::MutexGuard aGuard(m_aMutex); diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx index c04ae945ed51..5289ee437b0e 100644 --- a/vcl/unx/generic/dtrans/X11_selection.hxx +++ b/vcl/unx/generic/dtrans/X11_selection.hxx @@ -462,7 +462,6 @@ namespace x11 { // for XDragSourceContext sal_Int32 getCurrentCursor() { return m_aCurrentCursor;} void setCursor( sal_Int32 cursor, ::Window aDropXLIB_Window, Time aTimestamp ); - void setImage( sal_Int32 image, ::Window aDropXLIB_Window, Time aTimestamp ); void transferablesFlavorsChanged(); void shutdown() throw(); diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 673448f96c84..178b5246b1bc 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -440,11 +440,6 @@ GC X11SalGraphicsImpl::SelectBrush() } else { - // Bug in Sun Solaris 2.5.1, XFillPolygon doesn't always reflect - // changes of the tile. PROPERTY_BUG_Tile doesn't fix this ! - if (mrParent.GetDisplay()->GetProperties() & PROPERTY_BUG_FillPolygon_Tile) - XSetFillStyle ( pDisplay, mpBrushGC, FillSolid ); - XSetFillStyle ( pDisplay, mpBrushGC, FillTiled ); XSetTile ( pDisplay, mpBrushGC, mrParent.hBrush_ ); } @@ -574,57 +569,20 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, !mrParent.bVirDev_ && pSrcGraphics->bWindow_ ); - GC pCopyGC; - - if( mbXORMode - && !pSrcGraphics->bVirDev_ - && (mrParent.GetDisplay()->GetProperties() & PROPERTY_BUG_XCopyArea_GXxor) ) - { - Pixmap hPixmap = limitXCreatePixmap( mrParent.GetXDisplay(), - pSrcGraphics->GetDrawable(), // source - rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, - pSrcGraphics->GetBitCount() ); + GC pCopyGC = GetCopyGC(); - pCopyGC = mrParent.GetDisplay()->GetCopyGC( mrParent.m_nXScreen ); - - if( bNeedGraphicsExposures ) - XSetGraphicsExposures( mrParent.GetXDisplay(), - pCopyGC, - True ); - - XCopyArea( mrParent.GetXDisplay(), - pSrcGraphics->GetDrawable(), // source - hPixmap, // destination - pCopyGC, // no clipping - rPosAry.mnSrcX, rPosAry.mnSrcY, - rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, - 0, 0 ); // destination - XCopyArea( mrParent.GetXDisplay(), - hPixmap, // source - mrParent.GetDrawable(), // destination - GetInvertGC(), // destination clipping - 0, 0, // source - rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, - rPosAry.mnDestX, rPosAry.mnDestY ); - XFreePixmap( mrParent.GetXDisplay(), hPixmap ); - } - else - { - pCopyGC = GetCopyGC(); - - if( bNeedGraphicsExposures ) - XSetGraphicsExposures( mrParent.GetXDisplay(), - pCopyGC, - True ); - - XCopyArea( mrParent.GetXDisplay(), - pSrcGraphics->GetDrawable(), // source - mrParent.GetDrawable(), // destination - pCopyGC, // destination clipping - rPosAry.mnSrcX, rPosAry.mnSrcY, - rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, - rPosAry.mnDestX, rPosAry.mnDestY ); - } + if( bNeedGraphicsExposures ) + XSetGraphicsExposures( mrParent.GetXDisplay(), + pCopyGC, + True ); + + XCopyArea( mrParent.GetXDisplay(), + pSrcGraphics->GetDrawable(), // source + mrParent.GetDrawable(), // destination + pCopyGC, // destination clipping + rPosAry.mnSrcX, rPosAry.mnSrcY, + rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, + rPosAry.mnDestX, rPosAry.mnDestY ); if( bNeedGraphicsExposures ) { @@ -1277,16 +1235,8 @@ void X11SalGraphicsImpl::drawLine( long nX1, long nY1, long nX2, long nY2 ) { if( mnPenColor != SALCOLOR_NONE ) { - if ( mrParent.GetDisplay()->GetProperties() & PROPERTY_BUG_DrawLine ) - { - GC aGC = SelectPen(); - XDrawPoint (mrParent.GetXDisplay(), mrParent.GetDrawable(), aGC, (int)nX1, (int)nY1); - XDrawPoint (mrParent.GetXDisplay(), mrParent.GetDrawable(), aGC, (int)nX2, (int)nY2); - XDrawLine (mrParent.GetXDisplay(), mrParent.GetDrawable(), aGC, nX1, nY1, nX2, nY2 ); - } - else - XDrawLine( mrParent.GetXDisplay(), mrParent.GetDrawable(),SelectPen(), - nX1, nY1, nX2, nY2 ); + XDrawLine( mrParent.GetXDisplay(), mrParent.GetDrawable(),SelectPen(), + nX1, nY1, nX2, nY2 ); } } diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 29366cabe76a..9ea94b5f469f 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -254,13 +254,7 @@ bool X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) 8, // bitmap_pad 0 ); // (default) bytes_per_line - if ( GetDisplay()->GetProperties() & PROPERTY_BUG_Tile ) - { - if (hBrush_) - XFreePixmap (GetXDisplay(), hBrush_); - hBrush_ = limitXCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 ); - } - else if( !hBrush_ ) + if( !hBrush_ ) hBrush_ = limitXCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 ); // put the ximage to the pixmap diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 4be773fd099e..c5aa6b8740e4 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -1922,13 +1922,6 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize ) if( values.width != (int)maGeometry.nWidth || values.height != (int)maGeometry.nHeight ) bSized = true; - if( ! ( nStyle_ & ( SAL_FRAME_STYLE_PLUG | SAL_FRAME_STYLE_FLOAT ) ) - && !(pDisplay_->GetProperties() & PROPERTY_SUPPORT_WM_ClientPos) ) - { - values.x -= maGeometry.nLeftDecoration; - values.y -= maGeometry.nTopDecoration; - } - // do net set WMNormalHints for .. if( // child windows @@ -2494,8 +2487,6 @@ void X11SalFrame::SetInputContext( SalInputContext* pContext ) if (mpInputContext->UseContext()) { mpInputContext->ExtendEventMask( GetShellWindow() ); - if (pContext->mnOptions & SAL_INPUTCONTEXT_CHANGELANGUAGE) - mpInputContext->SetLanguage(pContext->meLanguage); if (mbInputFocus) mpInputContext->SetICFocus( this ); } @@ -2765,46 +2756,12 @@ static Bool compressWheelEvents( Display*, XEvent* event, XPointer p ) long X11SalFrame::HandleMouseEvent( XEvent *pEvent ) { SalMouseEvent aMouseEvt = {0, 0, 0, 0, 0}; - sal_uInt16 nEvent = 0; + sal_uInt16 nEvent = 0; bool bClosePopups = false; if( nVisibleFloats && pEvent->type == EnterNotify ) return 0; - // Solaris X86: clicking the right button on a two-button mouse - // generates a button2 event not a button3 event - if (pDisplay_->GetProperties() & PROPERTY_SUPPORT_3ButtonMouse ) - { - switch (pEvent->type) - { - case EnterNotify: - case LeaveNotify: - if ( pEvent->xcrossing.state & Button2Mask ) - { - pEvent->xcrossing.state &= ~Button2Mask; - pEvent->xcrossing.state |= Button3Mask; - } - break; - - case MotionNotify: - if ( pEvent->xmotion.state & Button2Mask ) - { - pEvent->xmotion.state &= ~Button2Mask; - pEvent->xmotion.state |= Button3Mask; - } - break; - - default: - if ( Button2 == pEvent->xbutton.button ) - { - pEvent->xbutton.state &= ~Button2Mask; - pEvent->xbutton.state |= Button3Mask; - pEvent->xbutton.button = Button3; - } - break; - } - } - if( LeaveNotify == pEvent->type || EnterNotify == pEvent->type ) { /* @@ -3788,10 +3745,8 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent ) ::Window hWM_Parent; ::Window hRoot, *Children, hDummy; unsigned int nChildren; - bool bNone = pDisplay_->GetProperties() - & PROPERTY_SUPPORT_WM_Parent_Pixmap_None; - bool bAccessParentWindow = ! (pDisplay_->GetProperties() - & PROPERTY_FEATURE_TrustedSolaris); + bool bNone = false; + bool bAccessParentWindow = true; static const char* pDisableStackingCheck = getenv( "SAL_DISABLE_STACKING_CHECK" ); @@ -3975,11 +3930,6 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent ) return 1; } -long X11SalFrame::HandleColormapEvent( XColormapEvent* ) -{ - return 0; -} - long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent ) { Atom actual_type; @@ -4240,7 +4190,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent ) break; case ColormapNotify: - nRet = HandleColormapEvent( &pEvent->xcolormap ); + nRet = 0; break; case PropertyNotify: diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 52ee62acbbab..9d1021a3759d 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -2866,7 +2866,6 @@ void GtkSalFrame::SetInputContext( SalInputContext* pContext ) // create a new im context if( ! m_pIMHandler ) m_pIMHandler = new IMHandler( this ); - m_pIMHandler->setInputContext( pContext ); } void GtkSalFrame::EndExtTextInput( sal_uInt16 nFlags ) @@ -3952,10 +3951,6 @@ void GtkSalFrame::IMHandler::updateIMSpotLocation() GetGenericData()->ErrorTrapPop(); } -void GtkSalFrame::IMHandler::setInputContext( SalInputContext* ) -{ -} - void GtkSalFrame::IMHandler::sendEmptyCommit() { vcl::DeletionListener aDel( m_pFrame ); |