summaryrefslogtreecommitdiff
path: root/vcl
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
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')
-rw-r--r--vcl/Library_vclplug_gen.mk1
-rw-r--r--vcl/inc/pdf/pdfwriter_impl.hxx2
-rw-r--r--vcl/inc/unx/saldisp.hxx7
-rw-r--r--vcl/inc/unx/salgdi.h11
-rw-r--r--vcl/source/treelist/treelist.cxx15
-rw-r--r--vcl/unx/generic/app/saldisp.cxx36
-rw-r--r--vcl/unx/generic/gdi/salgdi2.cxx88
7 files changed, 0 insertions, 160 deletions
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index cc94f6f7c09d..193e9c78f16a 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -99,7 +99,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
vcl/unx/generic/dtrans/X11_transferable \
vcl/unx/generic/gdi/cairo_xlib_cairo \
vcl/unx/generic/gdi/X11CairoSalGraphicsImpl \
- vcl/unx/generic/gdi/salgdi2 \
vcl/unx/generic/gdi/font \
vcl/unx/generic/gdi/salgdi \
vcl/unx/generic/gdi/salvd \
diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx
index aadb6b204d22..87a5d1387755 100644
--- a/vcl/inc/pdf/pdfwriter_impl.hxx
+++ b/vcl/inc/pdf/pdfwriter_impl.hxx
@@ -1018,8 +1018,6 @@ i12626
bool finalizeSignature();
// writes xref and trailer
bool emitTrailer();
- // emit additional streams collected; also create there object numbers
- bool emitAdditionalStreams();
// emits info dict (if applicable)
sal_Int32 emitInfoDict( );
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 55ebb7046ff3..08f52f996a93 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -142,10 +142,8 @@ public:
const SalDisplay* GetDisplay() const { return m_pDisplay; }
inline Display* GetXDisplay() const;
const SalVisual& GetVisual() const { return m_aVisual; }
- Visual* GetXVisual() const { return m_aVisual.GetVisual(); }
Pixel GetWhitePixel() const { return m_nWhitePixel; }
Pixel GetBlackPixel() const { return m_nBlackPixel; }
- Pixel GetUsed() const { return m_nUsed; }
bool GetXPixels( XColor &rColor,
int r,
@@ -156,7 +154,6 @@ public:
int g,
int b ) const;
Pixel GetPixel( std::optional<Color> nColor ) const;
- Color GetColor( Pixel nPixel ) const;
};
class SalI18N_InputMethod;
@@ -350,18 +347,14 @@ public:
const Size& GetScreenSize( SalX11Screen nXScreen ) const { return getDataForScreen( nXScreen ).m_aSize; }
srv_vendor_t GetServerVendor() const { return meServerVendor; }
bool IsDisplay() const { return !!pXLib_; }
- GC GetCopyGC( SalX11Screen nXScreen ) const { return getDataForScreen(nXScreen).m_aCopyGC; }
- Pixmap GetInvert50( SalX11Screen nXScreen ) const { return getDataForScreen(nXScreen).m_hInvert50; }
const SalColormap& GetColormap( SalX11Screen nXScreen ) const { return getDataForScreen(nXScreen).m_aColormap; }
const SalVisual& GetVisual( SalX11Screen nXScreen ) const { return getDataForScreen(nXScreen).m_aVisual; }
const Pair &GetResolution() const { return aResolution_; }
- sal_uLong GetMaxRequestSize() const { return nMaxRequestSize_; }
Time GetLastUserEventTime() const { return GetEventTimeImpl(); }
// this is an equivalent of gdk_x11_get_server_time()
Time GetX11ServerTime() const { return GetEventTimeImpl( true ); }
bool XIfEventWithTimeout( XEvent*, XPointer, X_if_predicate ) const;
- SalXLib* GetXLib() const { return pXLib_; }
SalI18N_InputMethod* GetInputMethod() const { return pXLib_->GetInputMethod(); }
SalI18N_KeyboardExtension* GetKbdExtension() const { return mpKbdExtension; }
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index d8fe250f4df6..35b4d98d076d 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -127,15 +127,6 @@ public:
virtual css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const override;
#endif // ENABLE_CAIRO_CANVAS
- /* use to handle GraphicsExpose/NoExpose after XCopyArea & friends
- * if pFrame is not NULL, corresponding Paint events are generated
- * and dispatched to pFrame
- *
- * it is imperative to eat up graphics exposes even in case you don't need
- * them because the next one using XCopyArea can depend on them
- */
- void YieldGraphicsExpose();
-
private:
using SalGraphics::GetPixel;
@@ -156,11 +147,9 @@ private:
public:
Drawable GetDrawable() const { return maX11Common.GetDrawable(); }
- const SalColormap& GetColormap() const { return maX11Common.GetColormap(); }
const SalDisplay* GetDisplay() const { return maX11Common.GetDisplay(); }
const SalVisual& GetVisual() const { return maX11Common.GetVisual(); }
Display* GetXDisplay() const { return maX11Common.GetXDisplay(); }
- Pixel GetPixel(Color nColor) const { return maX11Common.GetPixel(nColor); }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx
index 8f51e343fd98..9cc441d2c249 100644
--- a/vcl/source/treelist/treelist.cxx
+++ b/vcl/source/treelist/treelist.cxx
@@ -1009,21 +1009,6 @@ void SvTreeList::InvalidateEntry( SvTreeListEntry* pEntry )
Broadcast( SvListAction::INVALIDATE_ENTRY, pEntry );
}
-SvTreeListEntry* SvTreeList::GetRootLevelParent( SvTreeListEntry* pEntry ) const
-{
- DBG_ASSERT(pEntry,"GetRootLevelParent:No Entry");
- SvTreeListEntry* pCurParent = nullptr;
- if ( pEntry )
- {
- pCurParent = pEntry->pParent;
- if ( pCurParent == pRootItem.get() )
- return pEntry; // is its own parent
- while( pCurParent && pCurParent->pParent != pRootItem.get() )
- pCurParent = pCurParent->pParent;
- }
- return pCurParent;
-}
-
SvListView::SvListView()
: m_pImpl(new Impl(*this))
{
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: */