summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-15 15:28:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-17 15:07:35 +0200
commit561a02ec72cf963d7cd59cfb9a183c1032f0861b (patch)
treea25f9bc0d2ef9af339be1e33f138d4e6f9691fca /vcl/source
parentf9d5da8b491e30a08fa6996164e12e4d8715af46 (diff)
loplugin:unusedfields in vcl part3
Change-Id: I5a6319ba1667af6e9b7b92c22f858188c28c4c61 Reviewed-on: https://gerrit.libreoffice.org/38835 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/imp_listbox.cxx17
-rw-r--r--vcl/source/fontsubset/sft.cxx22
-rw-r--r--vcl/source/gdi/sallayout.cxx2
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx6
-rw-r--r--vcl/source/window/brdwin.cxx3
-rw-r--r--vcl/source/window/debugevent.cxx6
-rw-r--r--vcl/source/window/menuitemlist.cxx4
7 files changed, 1 insertions, 59 deletions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index b1fa98c7e82b..56593d372e7c 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -469,7 +469,6 @@ ImplListBoxWindow::ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle )
mnSelectModifier = 0;
mnUserDrawEntry = LISTBOX_ENTRY_NOTFOUND;
mbTrack = false;
- mbImgsDiffSz = false;
mbTravelSelect = false;
mbTrackingSelect = false;
mbSelectionChanged = false;
@@ -576,7 +575,6 @@ void ImplListBoxWindow::Clear()
mnMaxImgHeight = 0;
mnTop = 0;
mnLeft = 0;
- mbImgsDiffSz = false;
ImplClearLayoutData();
mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
@@ -652,11 +650,6 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
aMetrics.nImgWidth = (sal_uInt16) CalcZoom( aImgSz.Width() );
aMetrics.nImgHeight = (sal_uInt16) CalcZoom( aImgSz.Height() );
- if( mnMaxImgWidth && ( aMetrics.nImgWidth != mnMaxImgWidth ) )
- mbImgsDiffSz = true;
- else if ( mnMaxImgHeight && ( aMetrics.nImgHeight != mnMaxImgHeight ) )
- mbImgsDiffSz = true;
-
if( aMetrics.nImgWidth > mnMaxImgWidth )
mnMaxImgWidth = aMetrics.nImgWidth;
if( aMetrics.nImgHeight > mnMaxImgHeight )
@@ -2569,7 +2562,6 @@ ImplWin::ImplWin( vcl::Window* pParent, WinBits nWinStyle ) :
ImplGetWindowImpl()->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
- mbInUserDraw = false;
mbUserDrawEnabled = false;
mbEdgeBlending = false;
mnItemPos = LISTBOX_ENTRY_NOTFOUND;
@@ -2720,10 +2712,8 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
if ( IsUserDrawEnabled() )
{
- mbInUserDraw = true;
UserDrawEvent aUDEvt(this, &rRenderContext, maFocusRect, mnItemPos, 0);
maUserDrawHdl.Call( &aUDEvt );
- mbInUserDraw = false;
}
else
{
@@ -2884,19 +2874,14 @@ void ImplWin::ShowFocus(const tools::Rectangle& rRect)
}
ImplBtn::ImplBtn( vcl::Window* pParent, WinBits nWinStyle ) :
- PushButton( pParent, nWinStyle ),
- mbDown ( false )
+ PushButton( pParent, nWinStyle )
{
}
void ImplBtn::MouseButtonDown( const MouseEvent& )
{
- //PushButton::MouseButtonDown( rMEvt );
if( IsEnabled() )
- {
maMBDownHdl.Call(this);
- mbDown = true;
- }
}
ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( vcl::Window* pParent ) :
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index db0caf4f6649..20620ea19f1f 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -103,9 +103,6 @@ typedef struct {
sal_uInt32 *offs; /* array of nGlyphs offsets */
} GlyphOffsets;
-/* private tags */
-static const sal_uInt32 TTFontClassTag = 0x74746663; /* 'ttfc' */
-
static const sal_uInt32 T_true = 0x74727565; /* 'true' */
static const sal_uInt32 T_ttcf = 0x74746366; /* 'ttcf' */
static const sal_uInt32 T_otto = 0x4f54544f; /* 'OTTO' */
@@ -1350,7 +1347,6 @@ static void GetKern(TrueTypeFont *ttf)
if (GetUInt16(table, 0) == 0) { /* Traditional Microsoft style table with sal_uInt16 version and nTables fields */
ttf->nkern = GetUInt16(table, 2);
- ttf->kerntype = KT_MICROSOFT;
ptr = table + 4;
const sal_uInt32 remaining_table_size = nTableSize-4;
@@ -1382,7 +1378,6 @@ static void GetKern(TrueTypeFont *ttf)
if (GetUInt32(table, 0) == 0x00010000) { /* MacOS style kern tables: fixed32 version and sal_uInt32 nTables fields */
ttf->nkern = GetUInt32(table, 4);
- ttf->kerntype = KT_APPLE_NEW;
ptr = table + 8;
const sal_uInt32 remaining_table_size = nTableSize-8;
@@ -1413,7 +1408,6 @@ static void GetKern(TrueTypeFont *ttf)
}
badtable:
- ttf->kerntype = KT_NONE;
ttf->kerntables = nullptr;
}
@@ -1439,12 +1433,10 @@ static void allocTrueTypeFont( TrueTypeFont** ttf )
*ttf = static_cast<TrueTypeFont*>(calloc(1,sizeof(TrueTypeFont)));
if( *ttf != nullptr )
{
- (*ttf)->tag = 0;
(*ttf)->fname = nullptr;
(*ttf)->fsize = -1;
(*ttf)->ptr = nullptr;
(*ttf)->nglyphs = 0xFFFFFFFF;
- (*ttf)->pGSubstitution = nullptr;
}
}
@@ -1553,9 +1545,6 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
return SF_TTFORMAT;
}
- /* magic number */
- t->tag = TTFontClassTag;
-
t->ntables = GetUInt16(t->ptr + tdoffset, 4);
if( t->ntables >= 128 )
return SF_TTFORMAT;
@@ -2460,13 +2449,6 @@ void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info)
if( info->winDescent > 5*UPEm )
info->winDescent = XUnits(UPEm, GetInt16(table, 76));
}
- if (ttf->cmapType == CMAP_MS_Unicode) {
- info->rangeFlag = 1;
- info->ur1 = GetUInt32(table, 42);
- info->ur2 = GetUInt32(table, 46);
- info->ur3 = GetUInt32(table, 50);
- info->ur4 = GetUInt32(table, 54);
- }
memcpy(info->panose, table + 32, 10);
info->typeFlags = GetUInt16( table, 8 );
if( getTable(ttf, O_CFF) )
@@ -2494,10 +2476,6 @@ void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info)
}
table = getTable(ttf, O_vhea);
- if (table) {
- info->vascent = XUnits(UPEm, GetInt16(table, 4));
- info->vdescent = XUnits(UPEm, GetInt16(table, 6));
- }
}
GlyphData *GetTTRawGlyphData(TrueTypeFont *ttf, sal_uInt32 glyphID)
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 30907d8a62ad..11849a8e3e16 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -542,7 +542,6 @@ bool ImplLayoutArgs::GetNextRun( int* nMinRunPos, int* nEndRunPos, bool* bRTL )
SalLayout::SalLayout()
: mnMinCharPos( -1 ),
mnEndCharPos( -1 ),
- mnLayoutFlags( SalLayoutFlags::NONE ),
mnUnitsPerPixel( 1 ),
mnOrientation( 0 ),
maDrawOffset( 0, 0 )
@@ -555,7 +554,6 @@ void SalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
{
mnMinCharPos = rArgs.mnMinCharPos;
mnEndCharPos = rArgs.mnEndCharPos;
- mnLayoutFlags = rArgs.mnFlags;
mnOrientation = rArgs.mnOrientation;
}
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 760c20c7b1bc..1354f3764880 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -73,8 +73,6 @@ OpenGLContext::OpenGLContext():
pSVData->maGDIData.mpLastContext->mpNextContext = this;
mpPrevContext = pSVData->maGDIData.mpLastContext;
}
- else
- pSVData->maGDIData.mpFirstContext = this;
pSVData->maGDIData.mpLastContext = this;
// FIXME: better hope we call 'makeCurrent' soon to preserve
@@ -93,8 +91,6 @@ OpenGLContext::~OpenGLContext()
ImplSVData* pSVData = ImplGetSVData();
if( mpPrevContext )
mpPrevContext->mpNextContext = mpNextContext;
- else
- pSVData->maGDIData.mpFirstContext = mpNextContext;
if( mpNextContext )
mpNextContext->mpPrevContext = mpPrevContext;
else
@@ -543,8 +539,6 @@ void OpenGLContext::registerAsCurrent()
{
if( mpPrevContext )
mpPrevContext->mpNextContext = mpNextContext;
- else
- pSVData->maGDIData.mpFirstContext = mpNextContext;
mpNextContext->mpPrevContext = mpPrevContext;
mpPrevContext = pSVData->maGDIData.mpLastContext;
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 5a7bd774d4ca..4c22740b0b72 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1294,7 +1294,6 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
pData->mnHeight = nHeight;
pData->mnTitleType = pBorderWindow->mnTitleType;
- pData->mbFloatWindow = pBorderWindow->mbFloatWindow;
if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) || (pData->mnTitleType == BorderWindowTitleType::NONE) )
pData->mnBorderSize = 0;
@@ -1628,7 +1627,6 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent,
mnMinHeight = 0;
mnMaxWidth = SHRT_MAX;
mnMaxHeight = SHRT_MAX;
- mnRollHeight = 0;
mnOrgMenuHeight = 0;
mbRollUp = false;
mbMenuHide = false;
@@ -1951,7 +1949,6 @@ void ImplBorderWindow::SetBorderStyle( WindowBorderStyle nStyle )
void ImplBorderWindow::SetRollUp( bool bRollUp, const Size& rSize )
{
mbRollUp = bRollUp;
- mnRollHeight = rSize.Height();
UpdateView( false, rSize );
}
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 4810fc5ca759..2b83f4f92f03 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -115,12 +115,6 @@ void DebugEventInjector::InjectMenuEvent()
static void InitKeyEvent( SalKeyEvent &rKeyEvent )
{
- double nRand = getRandom();
- if (nRand < 0.001)
- rKeyEvent.mnTime = getRandom() * SAL_MAX_UINT64;
- else
- rKeyEvent.mnTime = tools::Time::GetSystemTicks();
-
if (getRandom() < 0.01)
rKeyEvent.mnRepeat = getRandom() * 20;
else
diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx
index 95cf7a07875f..b03ef0e89c56 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -69,8 +69,6 @@ MenuItemData* MenuItemList::Insert(
SalItemParams aSalMIData;
aSalMIData.nId = nId;
- aSalMIData.eType = eType;
- aSalMIData.nBits = nBits;
aSalMIData.pMenu = pMenu;
aSalMIData.aText = rStr;
@@ -101,8 +99,6 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos)
SalItemParams aSalMIData;
aSalMIData.nId = 0;
- aSalMIData.eType = MenuItemType::SEPARATOR;
- aSalMIData.nBits = MenuItemBits::NONE;
aSalMIData.pMenu = nullptr;
aSalMIData.aText.clear();
aSalMIData.aImage = Image();