summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-07-05 15:21:30 +0000
committerOliver Bolte <obo@openoffice.org>2004-07-05 15:21:30 +0000
commit951b52c70f9e3d7a89d9657b4143d6225fd29c40 (patch)
treeb5764a65ccdc1f7b86525b6e25c68dc4fa5299f2
parent98052372ae02dbb5c6c5989f7a361da7b7dee4ff (diff)
INTEGRATION: CWS frmcontrols04 (1.2.18); FILE MERGED
2004/06/23 09:03:45 fs 1.2.18.1: #i24694# #i24686# HideInactiveSelection and BorderColor also for the rich text model
-rw-r--r--forms/source/richtext/richtextvclcontrol.cxx16
-rw-r--r--forms/source/richtext/richtextvclcontrol.hxx7
-rw-r--r--forms/source/richtext/richtextviewport.cxx22
-rw-r--r--forms/source/richtext/richtextviewport.hxx8
4 files changed, 44 insertions, 9 deletions
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index 62bb19ccd..308b419c5 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: richtextvclcontrol.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-05-07 16:14:08 $
+ * last change: $Author: obo $ $Date: 2004-07-05 16:20:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -387,6 +387,18 @@ namespace frm
m_pImpl->SetBackgroundColor( _rColor );
}
+ //--------------------------------------------------------------------
+ void RichTextControl::SetHideInactiveSelection( bool _bHide )
+ {
+ m_pImpl->SetHideInactiveSelection( _bHide );
+ }
+
+ //--------------------------------------------------------------------
+ bool RichTextControl::GetHideInactiveSelection() const
+ {
+ return m_pImpl->GetHideInactiveSelection( );
+ }
+
//........................................................................
} // namespace frm
//........................................................................
diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx
index f57ef7374..aea7f86a7 100644
--- a/forms/source/richtext/richtextvclcontrol.hxx
+++ b/forms/source/richtext/richtextvclcontrol.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: richtextvclcontrol.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-05-07 16:14:18 $
+ * last change: $Author: obo $ $Date: 2004-07-05 16:20:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -170,6 +170,9 @@ namespace frm
void SetReadOnly( bool _bReadOnly );
bool IsReadOnly() const;
+ void SetHideInactiveSelection( bool _bHide );
+ bool GetHideInactiveSelection() const;
+
const EditView& getView() const;
EditView& getView();
diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx
index 702f773fa..367a18bbc 100644
--- a/forms/source/richtext/richtextviewport.cxx
+++ b/forms/source/richtext/richtextviewport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: richtextviewport.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-05-07 16:14:29 $
+ * last change: $Author: obo $ $Date: 2004-07-05 16:21:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,6 +78,7 @@ namespace frm
//--------------------------------------------------------------------
RichTextViewPort::RichTextViewPort( Window* _pParent )
:Control ( _pParent )
+ ,m_bHideInactiveSelection( true )
{
}
@@ -106,7 +107,7 @@ namespace frm
void RichTextViewPort::LoseFocus()
{
m_pView->HideCursor();
- m_pView->SetSelectionMode( EE_SELMODE_HIDDEN );
+ m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
Control::LoseFocus();
}
@@ -142,6 +143,21 @@ namespace frm
implInvalidateAttributes();
}
+ //--------------------------------------------------------------------
+ void RichTextViewPort::SetHideInactiveSelection( bool _bHide )
+ {
+ if ( m_bHideInactiveSelection == _bHide )
+ return;
+ m_bHideInactiveSelection = _bHide;
+ if ( !HasFocus() )
+ m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
+ }
+
+ //--------------------------------------------------------------------
+ bool RichTextViewPort::GetHideInactiveSelection() const
+ {
+ return m_bHideInactiveSelection;
+ }
//........................................................................
} // namespace frm
diff --git a/forms/source/richtext/richtextviewport.hxx b/forms/source/richtext/richtextviewport.hxx
index 8849e34a8..2dbf07048 100644
--- a/forms/source/richtext/richtextviewport.hxx
+++ b/forms/source/richtext/richtextviewport.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: richtextviewport.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-05-07 16:14:40 $
+ * last change: $Author: obo $ $Date: 2004-07-05 16:21:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,6 +79,7 @@ namespace frm
private:
EditView* m_pView;
Link m_aInvalidationHandler;
+ bool m_bHideInactiveSelection;
public:
RichTextViewPort( Window* _pParent );
@@ -87,6 +88,9 @@ namespace frm
inline void setAttributeInvalidationHandler( const Link& _rHandler ) { m_aInvalidationHandler = _rHandler; }
+ void SetHideInactiveSelection( bool _bHide );
+ bool GetHideInactiveSelection() const;
+
protected:
virtual void Paint( const Rectangle& rRect );
virtual void GetFocus();