[Libreoffice-commits] core.git: include/vcl vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 5 18:14:36 UTC 2019
include/vcl/edit.hxx | 7 ------
include/vcl/vclmedit.hxx | 6 ++---
vcl/source/control/edit.cxx | 49 --------------------------------------------
3 files changed, 3 insertions(+), 59 deletions(-)
New commits:
commit 368195c06679417e493db4f2060321895472f0b3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 4 14:33:47 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 5 20:13:45 2019 +0200
only MultiLineEditSyntaxHighlight uses UpdateData
and only the VclMultiLineEdit one which hides the Edit one so remove the unused
Edit UpdataData related functions leaving the VclMultiLineEdit set
Change-Id: Icd9a633d28907b3e5a3d52771b31574984e64d92
Reviewed-on: https://gerrit.libreoffice.org/80228
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index 2634b18fcc01..2ebb5e903f0f 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -58,7 +58,6 @@ class VCL_DLLPUBLIC Edit : public Control, public vcl::unohelper::DragAndDropCli
{
private:
VclPtr<Edit> mpSubEdit;
- std::unique_ptr<Timer> mpUpdateDataTimer;
TextFilter* mpFilterText;
std::unique_ptr<DDInfo, o3tl::default_delete<DDInfo>> mpDDInfo;
std::unique_ptr<Impl_IMEInfos> mpIMEInfos;
@@ -90,8 +89,6 @@ private:
css::uno::Reference<css::i18n::XExtendedInputSequenceChecker> mxISC;
- DECL_DLLPRIVATE_LINK(ImplUpdateDataHdl, Timer*, void);
-
SAL_DLLPRIVATE bool ImplTruncateToMaxLen( OUString&, sal_Int32 nSelectionLen ) const;
SAL_DLLPRIVATE void ImplInitEditData();
SAL_DLLPRIVATE void ImplModified();
@@ -170,7 +167,6 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
virtual void Modify();
- virtual void UpdateData();
static bool IsCharInput( const KeyEvent& rKEvt );
@@ -178,9 +174,6 @@ public:
virtual void ClearModifyFlag();
virtual bool IsModified() const { return mpSubEdit ? mpSubEdit->mbModified : mbModified; }
- virtual void EnableUpdateData( sal_uLong nTimeout );
- virtual void DisableUpdateData();
-
void SetEchoChar( sal_Unicode c );
sal_Unicode GetEchoChar() const { return mcEchoChar; }
diff --git a/include/vcl/vclmedit.hxx b/include/vcl/vclmedit.hxx
index e6144cb930b3..414705c2d70f 100644
--- a/include/vcl/vclmedit.hxx
+++ b/include/vcl/vclmedit.hxx
@@ -110,14 +110,14 @@ public:
void SelectionChanged();
void CaretChanged();
virtual void Modify() override;
- virtual void UpdateData() override;
virtual void SetModifyFlag() override;
virtual void ClearModifyFlag() override;
virtual bool IsModified() const override;
- virtual void EnableUpdateData( sal_uLong nTimeout ) override;
- virtual void DisableUpdateData() override { pUpdateDataTimer.reset(); }
+ void EnableUpdateData( sal_uLong nTimeout );
+ virtual void UpdateData();
+ void DisableUpdateData() { pUpdateDataTimer.reset(); }
virtual void SetReadOnly( bool bReadOnly = true ) override;
virtual bool IsReadOnly() const override;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 259c2374f011..1620532ffba3 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -223,7 +223,6 @@ void Edit::dispose()
}
mpIMEInfos.reset();
- mpUpdateDataTimer.reset();
if ( mxDnDListener.is() )
{
@@ -251,7 +250,6 @@ void Edit::dispose()
void Edit::ImplInitEditData()
{
mpSubEdit = VclPtr<Edit>();
- mpUpdateDataTimer = nullptr;
mpFilterText = nullptr;
mnXOffset = 0;
mnAlign = EDIT_ALIGN_LEFT;
@@ -1384,9 +1382,6 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
ImplSetCursorPos( nCharPos, true );
}
}
-
- if ( mpUpdateDataTimer && !mbIsSubEdit && mpUpdateDataTimer->IsActive() )
- mpUpdateDataTimer->Start();//do not update while the user is still travelling in the control
}
bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
@@ -1701,9 +1696,6 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
void Edit::KeyInput( const KeyEvent& rKEvt )
{
- if ( mpUpdateDataTimer && !mbIsSubEdit && mpUpdateDataTimer->IsActive() )
- mpUpdateDataTimer->Start();//do not update while the user is still travelling in the control
-
if ( mpSubEdit || !ImplHandleKeyEvent( rKEvt ) )
Control::KeyInput( rKEvt );
}
@@ -1894,13 +1886,6 @@ void Edit::GetFocus()
void Edit::LoseFocus()
{
- if ( mpUpdateDataTimer && !mbIsSubEdit && mpUpdateDataTimer->IsActive() )
- {
- //notify an update latest when the focus is lost
- mpUpdateDataTimer->Stop();
- mpUpdateDataTimer->Invoke();
- }
-
if ( !mpSubEdit )
{
// FIXME: this is currently only on macOS
@@ -2328,9 +2313,6 @@ void Edit::Modify()
}
else
{
- if ( mpUpdateDataTimer )
- mpUpdateDataTimer->Start();
-
if ( ImplCallEventListenersAndHandler( VclEventId::EditModify, [this] () { maModifyHdl.Call(*this); } ) )
// have been destroyed while calling into the handlers
return;
@@ -2348,37 +2330,6 @@ void Edit::Modify()
}
}
-void Edit::UpdateData()
-{
-}
-
-IMPL_LINK_NOARG(Edit, ImplUpdateDataHdl, Timer *, void)
-{
- UpdateData();
-}
-
-void Edit::EnableUpdateData( sal_uLong nTimeout )
-{
- if ( !nTimeout )
- DisableUpdateData();
- else
- {
- if ( !mpUpdateDataTimer )
- {
- mpUpdateDataTimer.reset(new Timer("UpdateDataTimer"));
- mpUpdateDataTimer->SetInvokeHandler( LINK( this, Edit, ImplUpdateDataHdl ) );
- mpUpdateDataTimer->SetDebugName( "vcl::Edit mpUpdateDataTimer" );
- }
-
- mpUpdateDataTimer->SetTimeout( nTimeout );
- }
-}
-
-void Edit::DisableUpdateData()
-{
- mpUpdateDataTimer.reset();
-}
-
void Edit::SetEchoChar( sal_Unicode c )
{
mcEchoChar = c;
More information about the Libreoffice-commits
mailing list