Kaydet (Commit) 13adadee authored tarafından Ariel Constenla-Haile's avatar Ariel Constenla-Haile Kaydeden (comit) Caolán McNamara

Resolves: #ii120149# Flash changes on slot execution to reflect AutoUpdate

(cherry picked from commit b73c741c)

Conflicts:
	starmath/source/edit.cxx

Change-Id: Ie073deabb1a48f3479a9c6bbf89d1e40f5cea663
üst 90af7007
......@@ -85,6 +85,7 @@ class SmEditWindow : public Window, public DropTargetHelper
void SetScrollBarRanges();
void InitScrollBars();
void InvalidateSlots();
void UpdateStatus( bool bSetDocModified = false );
public:
SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin );
......
......@@ -243,9 +243,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
{
SmModule *pp = SM_MOD();
if (pp->GetConfig()->IsAutoRedraw())
Flush();
UpdateStatus();
aModifyTimer.Stop();
return 0;
}
......@@ -637,7 +635,7 @@ void SmEditWindow::GetFocus()
// Note: will implicitly send the AccessibleStateType::FOCUSED event
::accessibility::AccessibleTextHelper *pHelper = pAccessible->GetTextHelper();
if (pHelper)
pHelper->SetFocus( sal_True );
pHelper->SetFocus(true);
}
if (!pEditView)
......@@ -665,7 +663,7 @@ void SmEditWindow::LoseFocus()
// Note: will implicitly send the AccessibleStateType::FOCUSED event
::accessibility::AccessibleTextHelper *pHelper = pAccessible->GetTextHelper();
if (pHelper)
pHelper->SetFocus( sal_False );
pHelper->SetFocus(false);
}
}
......@@ -871,13 +869,23 @@ bool SmEditWindow::IsSelected() const
return pEditView ? pEditView->HasSelection() : false;
}
void SmEditWindow::UpdateStatus( bool bSetDocModified )
{
SmModule *pMod = SM_MOD();
if (pMod && pMod->GetConfig()->IsAutoRedraw())
Flush();
if ( bSetDocModified )
GetDoc()->SetModified(true);
}
void SmEditWindow::Cut()
{
OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
{
pEditView->Cut();
GetDoc()->SetModified( true );
UpdateStatus(true);
}
}
......@@ -894,7 +902,7 @@ void SmEditWindow::Paste()
if (pEditView)
{
pEditView->Paste();
GetDoc()->SetModified( true );
UpdateStatus(true);
}
}
......@@ -904,7 +912,7 @@ void SmEditWindow::Delete()
if (pEditView)
{
pEditView->DeleteSelected();
GetDoc()->SetModified( true );
UpdateStatus(true);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment