summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-06 14:40:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-09 11:33:43 +0100
commitabe39f7781f59b96c5a8d3dd5b41c60fdf04ad84 (patch)
tree0f72d1968e5f25e3f280688a414398e3f4a7cce8 /vcl/unx
parentbdb1c72198f60fdd91460e26282134d43bc0e2df (diff)
improve loplugin:unusedfields
noticed something that wasn't being picked up, wrote some tests, and found an unhandled case in Plugin::getParentFunctionDecl Change-Id: I52b4ea273be6614e197392dfc4d6053bbc1704de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90141 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.cxx14
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx11
2 files changed, 11 insertions, 14 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 4ffea9b58364..99d0652df7ff 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2518,10 +2518,9 @@ Pixel SalVisual::GetTCPixel( Color nColor ) const
SalColormap::SalColormap( const SalDisplay *pDisplay, Colormap hColormap,
SalX11Screen nXScreen )
: m_pDisplay( pDisplay ),
- m_hColormap( hColormap ),
- m_nXScreen( nXScreen )
+ m_hColormap( hColormap )
{
- m_aVisual = m_pDisplay->GetVisual( m_nXScreen );
+ m_aVisual = m_pDisplay->GetVisual( nXScreen );
XColor aColor;
@@ -2587,8 +2586,7 @@ SalColormap::SalColormap()
m_hColormap( None ),
m_nWhitePixel( 1 ),
m_nBlackPixel( 0 ),
- m_nUsed( 2 ),
- m_nXScreen( m_pDisplay != nullptr ? m_pDisplay->GetDefaultXScreen() : SalX11Screen( 0 ) )
+ m_nUsed( 2 )
{
m_aPalette = std::vector<Color>(m_nUsed);
@@ -2602,10 +2600,10 @@ SalColormap::SalColormap( sal_uInt16 nDepth )
m_hColormap( None ),
m_nWhitePixel( (1 << nDepth) - 1 ),
m_nBlackPixel( 0x00000000 ),
- m_nUsed( 1 << nDepth ),
- m_nXScreen( vcl_sal::getSalDisplay(GetGenericUnixSalData())->GetDefaultXScreen() )
+ m_nUsed( 1 << nDepth )
{
- const SalVisual *pVisual = &m_pDisplay->GetVisual( m_nXScreen );
+ SalX11Screen nXScreen( vcl_sal::getSalDisplay(GetGenericUnixSalData())->GetDefaultXScreen() );
+ const SalVisual *pVisual = &m_pDisplay->GetVisual( nXScreen );
if( pVisual->GetClass() == TrueColor && pVisual->GetDepth() == nDepth )
m_aVisual = *pVisual;
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 202b5f4c1c10..35e9f8d53742 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -13385,7 +13385,6 @@ class GtkInstanceBuilder : public weld::Builder
{
private:
ResHookProc m_pStringReplace;
- OUString m_sHelpRoot;
OString m_aUtf8HelpRoot;
OUString m_aIconTheme;
OUString m_aUILang;
@@ -13582,19 +13581,19 @@ public:
GtkInstanceBuilder(GtkWidget* pParent, const OUString& rUIRoot, const OUString& rUIFile, SystemChildWindow* pInterimGlue)
: weld::Builder(rUIFile)
, m_pStringReplace(Translate::GetReadStringHook())
- , m_sHelpRoot(rUIFile)
, m_pParentWidget(pParent)
, m_nNotifySignalId(0)
, m_xInterimGlue(pInterimGlue)
{
+ OUString sHelpRoot(rUIFile);
ensure_intercept_drawing_area_accessibility();
ensure_disable_ctrl_page_up_down_bindings();
- sal_Int32 nIdx = m_sHelpRoot.lastIndexOf('.');
+ sal_Int32 nIdx = sHelpRoot.lastIndexOf('.');
if (nIdx != -1)
- m_sHelpRoot = m_sHelpRoot.copy(0, nIdx);
- m_sHelpRoot += OUString('/');
- m_aUtf8HelpRoot = OUStringToOString(m_sHelpRoot, RTL_TEXTENCODING_UTF8);
+ sHelpRoot = sHelpRoot.copy(0, nIdx);
+ sHelpRoot += OUString('/');
+ m_aUtf8HelpRoot = OUStringToOString(sHelpRoot, RTL_TEXTENCODING_UTF8);
m_aIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme();
m_aUILang = Application::GetSettings().GetUILanguageTag().getBcp47();