summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-19 13:17:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-19 19:18:51 +0200
commite2c7a6bd572644b928704f6cb3696b568ac0aba1 (patch)
treeb9f64cf65d77edf2798b03de60d47602ebe95b15 /vcl/unx
parentfcf776a09a2c5cd692480c8ec4a678e3d04739c9 (diff)
loplugin::unusedmethods
Change-Id: I6a07860edb13588b83345babeb53675aedc43f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/app/saldisp.cxx36
-rw-r--r--vcl/unx/generic/gdi/salgdi2.cxx88
2 files changed, 0 insertions, 124 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index f96aba96d100..6d7737cb3224 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2691,42 +2691,6 @@ void SalColormap::GetLookupTable()
m_aLookupTable[i++] = sal_Lookup( m_aPalette, r, g, b, m_nUsed );
}
-Color SalColormap::GetColor( Pixel nPixel ) const
-{
- if( m_nBlackPixel == nPixel ) return COL_BLACK;
- if( m_nWhitePixel == nPixel ) return COL_WHITE;
-
- if( m_aVisual.GetVisual() )
- {
- if( m_aVisual.GetClass() == TrueColor )
- return m_aVisual.GetTCColor( nPixel );
-
- if( m_aPalette.empty()
- && m_hColormap
- && m_aVisual.GetDepth() <= 12
- && m_aVisual.GetClass() == PseudoColor )
- const_cast<SalColormap*>(this)->GetPalette();
- }
-
- if( !m_aPalette.empty() && nPixel < m_nUsed )
- return m_aPalette[nPixel];
-
- if( !m_hColormap )
- {
- SAL_WARN("vcl", "SalColormap::GetColor() !m_hColormap");
- return Color(ColorTransparency, nPixel);
- }
-
- // DirectColor, StaticColor, StaticGray, GrayScale
- XColor aColor;
-
- aColor.pixel = nPixel;
-
- XQueryColor( m_pDisplay->GetDisplay(), m_hColormap, &aColor );
-
- return Color( aColor.red>>8, aColor.green>>8, aColor.blue>>8 );
-}
-
inline bool SalColormap::GetXPixel( XColor &rColor,
int r,
int g,
diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
deleted file mode 100644
index ee96a757acb0..000000000000
--- a/vcl/unx/generic/gdi/salgdi2.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <salgdiimpl.hxx>
-
-#include <vcl/sysdata.hxx>
-
-#include <unx/saldisp.hxx>
-#include <unx/salgdi.h>
-#include <salframe.hxx>
-
-extern "C"
-{
- static Bool GraphicsExposePredicate( Display*, XEvent* pEvent, const XPointer pFrameWindow )
- {
- Bool bRet = False;
- if( (pEvent->type == GraphicsExpose || pEvent->type == NoExpose) &&
- pEvent->xnoexpose.drawable == reinterpret_cast<Drawable>(pFrameWindow) )
- {
- bRet = True;
- }
- return bRet;
- }
-}
-
-void X11SalGraphics::YieldGraphicsExpose()
-{
- // get frame if necessary
- SalFrame* pFrame = m_pFrame;
- Display* pDisplay = GetXDisplay();
- ::Window aWindow = GetDrawable();
- if( ! pFrame )
- {
- for (auto pSalFrame : vcl_sal::getSalDisplay(GetGenericUnixSalData())->getFrames() )
- {
- const SystemEnvData* pEnvData = pSalFrame->GetSystemData();
- if( Drawable(pEnvData->GetWindowHandle(pSalFrame)) == aWindow )
- {
- pFrame = pSalFrame;
- break;
- }
- }
- if( ! pFrame )
- return;
- }
-
- XEvent aEvent;
- while( XCheckTypedWindowEvent( pDisplay, aWindow, Expose, &aEvent ) )
- {
- SalPaintEvent aPEvt( aEvent.xexpose.x, aEvent.xexpose.y, aEvent.xexpose.width+1, aEvent.xexpose.height+1 );
- pFrame->CallCallback( SalEvent::Paint, &aPEvt );
- }
-
- do
- {
- if( ! GetDisplay()->XIfEventWithTimeout( &aEvent, reinterpret_cast<XPointer>(aWindow), GraphicsExposePredicate ) )
- // this should not happen at all; still sometimes it happens
- break;
-
- if( aEvent.type == NoExpose )
- break;
-
- if( pFrame )
- {
- SalPaintEvent aPEvt( aEvent.xgraphicsexpose.x, aEvent.xgraphicsexpose.y, aEvent.xgraphicsexpose.width+1, aEvent.xgraphicsexpose.height+1 );
- pFrame->CallCallback( SalEvent::Paint, &aPEvt );
- }
- } while( aEvent.xgraphicsexpose.count != 0 );
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */