summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-07-20 15:28:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-07-21 08:30:34 +0200
commitbb7b0511bbb6d2237b7b765c31727324b4183a85 (patch)
treed5def9db196610dbe470ec502ef3ee61a675dbff /vcl/source
parenta8a2602066b110f19b1e24630ce8cb8908b93652 (diff)
loplugin:unusedfields
Change-Id: I933d9a82bb6ad5f5b946e28abcc2dae30126c720 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/button.cxx10
-rw-r--r--vcl/source/control/edit.cxx41
2 files changed, 15 insertions, 36 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 8d9b269ea823..b58b8d9fe019 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2858,7 +2858,6 @@ FactoryFunction RadioButton::GetUITestFactory() const
void CheckBox::ImplInitCheckBoxData()
{
meState = TRISTATE_FALSE;
- meSaveValue = TRISTATE_FALSE;
mbTriState = false;
}
@@ -3022,12 +3021,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
}
else
{
- if ( mbLegacyNoTextAlign && ( nWinStyle & WB_CENTER ) )
- rStateRect.SetLeft( rPos.X()+((rSize.Width()-rImageSize.Width())/2) );
- else if ( mbLegacyNoTextAlign && ( nWinStyle & WB_RIGHT ) )
- rStateRect.SetLeft( rPos.X()+rSize.Width()-rImageSize.Width() );
- else
- rStateRect.SetLeft( rPos.X() );
+ rStateRect.SetLeft( rPos.X() );
if ( nWinStyle & WB_VCENTER )
rStateRect.SetTop( rPos.Y()+((rSize.Height()-rImageSize.Height())/2) );
else if ( nWinStyle & WB_BOTTOM )
@@ -3087,7 +3081,7 @@ void CheckBox::ImplCheck()
}
CheckBox::CheckBox( vcl::Window* pParent, WinBits nStyle ) :
- Button( WindowType::CHECKBOX ), mbLegacyNoTextAlign( false )
+ Button( WindowType::CHECKBOX )
{
ImplInitCheckBoxData();
ImplInit( pParent, nStyle );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 11121241868c..6ecbb32689fd 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -259,7 +259,6 @@ void Edit::ImplInitEditData()
mnMaxTextLen = EDIT_NOLIMIT;
mnWidthInChars = -1;
mnMaxWidthChars = -1;
- mbModified = false;
mbInternModified = false;
mbReadOnly = false;
mbInsertMode = true;
@@ -355,12 +354,6 @@ bool Edit::IsCharInput( const KeyEvent& rKeyEvent )
!rKeyEvent.GetKeyCode().IsMod1() );
}
-void Edit::ImplModified()
-{
- mbModified = true;
- Modify();
-}
-
void Edit::ApplySettings(vcl::RenderContext& rRenderContext)
{
Control::ApplySettings(rRenderContext);
@@ -1362,7 +1355,7 @@ void Edit::MouseButtonUp( const MouseEvent& rMEvt )
{
css::uno::Reference<css::datatransfer::clipboard::XClipboard> aSelection(Window::GetPrimarySelection());
ImplPaste( aSelection );
- ImplModified();
+ Modify();
}
}
@@ -1408,7 +1401,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mbReadOnly && maSelection.Len() && !mbPassword )
{
Cut();
- ImplModified();
+ Modify();
bDone = true;
}
}
@@ -1466,7 +1459,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !aChars.isEmpty() )
{
ImplInsertText( aChars );
- ImplModified();
+ Modify();
}
bDone = true;
}
@@ -1651,7 +1644,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
sal_Int32 nOldLen = maText.getLength();
ImplDelete( maSelection, nDel, nMode );
if ( maText.getLength() != nOldLen )
- ImplModified();
+ Modify();
bDone = true;
}
}
@@ -1696,7 +1689,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
if ( mbInternModified )
- ImplModified();
+ Modify();
return bDone;
}
@@ -1985,12 +1978,12 @@ void Edit::Command( const CommandEvent& rCEvt )
if (sCommand == "undo")
{
Undo();
- ImplModified();
+ Modify();
}
else if (sCommand == "cut")
{
Cut();
- ImplModified();
+ Modify();
}
else if (sCommand == "copy")
{
@@ -1999,12 +1992,12 @@ void Edit::Command( const CommandEvent& rCEvt )
else if (sCommand == "paste")
{
Paste();
- ImplModified();
+ Modify();
}
else if (sCommand == "delete")
{
DeleteSelected();
- ImplModified();
+ Modify();
}
else if (sCommand == "selectall")
{
@@ -2017,7 +2010,7 @@ void Edit::Command( const CommandEvent& rCEvt )
if (!aChars.isEmpty())
{
ImplInsertText( aChars );
- ImplModified();
+ Modify();
}
}
pPopup.clear();
@@ -2036,7 +2029,7 @@ void Edit::Command( const CommandEvent& rCEvt )
mpIMEInfos.reset();
SetInsertMode(bInsertMode);
- ImplModified();
+ Modify();
Invalidate();
@@ -2585,18 +2578,10 @@ void Edit::SetPlaceholderText( const OUString& rStr )
void Edit::SetModifyFlag()
{
- if ( mpSubEdit )
- mpSubEdit->mbModified = true;
- else
- mbModified = true;
}
void Edit::ClearModifyFlag()
{
- if ( mpSubEdit )
- mpSubEdit->mbModified = false;
- else
- mbModified = false;
}
void Edit::SetSubEdit(Edit* pEdit)
@@ -2792,7 +2777,7 @@ void Edit::dragDropEnd( const css::datatransfer::dnd::DragSourceDropEvent& rDSDE
}
}
ImplDelete( aSel, EDIT_DEL_RIGHT, EDIT_DELMODE_SIMPLE );
- ImplModified();
+ Modify();
}
ImplHideDDCursor();
@@ -2833,7 +2818,7 @@ void Edit::drop( const css::datatransfer::dnd::DropTargetDropEvent& rDTDE )
aData >>= aText;
ImplInsertText( aText );
bChanges = true;
- ImplModified();
+ Modify();
}
}