diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-18 11:41:36 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-18 15:55:00 +0900 |
commit | 22fd5e08067eaeb08bf99b6c0146734a19810d98 (patch) | |
tree | c780324faeb3c0e67707836ff6e444f81cdd42b1 /forms/source/richtext | |
parent | e1b653b17387b02624badcd1fb11c38ccf846c9e (diff) |
refactor forms classes to use RenderContext
Change-Id: I18026eb4a3784afc84c68c4effdb0c267e31e5db
Diffstat (limited to 'forms/source/richtext')
-rw-r--r-- | forms/source/richtext/richtextviewport.cxx | 25 | ||||
-rw-r--r-- | forms/source/richtext/richtextviewport.hxx | 1 |
2 files changed, 5 insertions, 21 deletions
diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx index 9a206b79ce4a..98065150e79b 100644 --- a/forms/source/richtext/richtextviewport.cxx +++ b/forms/source/richtext/richtextviewport.cxx @@ -20,31 +20,26 @@ #include "richtextviewport.hxx" #include <editeng/editview.hxx> - namespace frm { - RichTextViewPort::RichTextViewPort( vcl::Window* _pParent ) - :Control ( _pParent ) - ,m_pView(NULL) - ,m_bHideInactiveSelection( true ) + : Control ( _pParent ) + , m_pView(NULL) + , m_bHideInactiveSelection( true ) { } - void RichTextViewPort::setView( EditView& _rView ) { m_pView = &_rView; SetPointer( _rView.GetPointer() ); } - - void RichTextViewPort::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& _rRect ) + void RichTextViewPort::Paint( vcl::RenderContext& rRenderContext, const Rectangle& _rRect ) { - m_pView->Paint( _rRect ); + m_pView->Paint(_rRect, &rRenderContext); } - void RichTextViewPort::GetFocus() { Control::GetFocus(); @@ -55,7 +50,6 @@ namespace frm } } - void RichTextViewPort::LoseFocus() { if (m_pView) @@ -66,7 +60,6 @@ namespace frm Control::LoseFocus(); } - void RichTextViewPort::KeyInput( const KeyEvent& _rKEvt ) { if ( !m_pView->PostKeyEvent( _rKEvt ) ) @@ -75,14 +68,12 @@ namespace frm implInvalidateAttributes(); } - void RichTextViewPort::MouseMove( const MouseEvent& _rMEvt ) { Control::MouseMove( _rMEvt ); m_pView->MouseMove( _rMEvt ); } - void RichTextViewPort::MouseButtonDown( const MouseEvent& _rMEvt ) { Control::MouseButtonDown( _rMEvt ); @@ -90,7 +81,6 @@ namespace frm GrabFocus(); } - void RichTextViewPort::MouseButtonUp( const MouseEvent& _rMEvt ) { Control::MouseButtonUp( _rMEvt ); @@ -98,7 +88,6 @@ namespace frm implInvalidateAttributes(); } - void RichTextViewPort::SetHideInactiveSelection( bool _bHide ) { if ( m_bHideInactiveSelection == _bHide ) @@ -108,10 +97,6 @@ namespace frm m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD ); } - - - } // namespace frm - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextviewport.hxx b/forms/source/richtext/richtextviewport.hxx index 076213da7336..f67025e062e6 100644 --- a/forms/source/richtext/richtextviewport.hxx +++ b/forms/source/richtext/richtextviewport.hxx @@ -25,7 +25,6 @@ class EditView; namespace frm { - class RichTextViewPort : public Control { private: |