1*24acc546SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*24acc546SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*24acc546SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*24acc546SAndrew Rist * distributed with this work for additional information 6*24acc546SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*24acc546SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*24acc546SAndrew Rist * "License"); you may not use this file except in compliance 9*24acc546SAndrew Rist * with the License. You may obtain a copy of the License at 10*24acc546SAndrew Rist * 11*24acc546SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*24acc546SAndrew Rist * 13*24acc546SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*24acc546SAndrew Rist * software distributed under the License is distributed on an 15*24acc546SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*24acc546SAndrew Rist * KIND, either express or implied. See the License for the 17*24acc546SAndrew Rist * specific language governing permissions and limitations 18*24acc546SAndrew Rist * under the License. 19*24acc546SAndrew Rist * 20*24acc546SAndrew Rist *************************************************************/ 21*24acc546SAndrew Rist 22*24acc546SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_forms.hxx" 26cdf0e10cSrcweir #include "richtextvclcontrol.hxx" 27cdf0e10cSrcweir #include "richtextimplcontrol.hxx" 28cdf0e10cSrcweir #include <svl/itempool.hxx> 29cdf0e10cSrcweir #include <svl/itemset.hxx> 30cdf0e10cSrcweir #include <svl/languageoptions.hxx> 31cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 0 32cdf0e10cSrcweir #ifndef _TOOLS_TEMPFILE_HXX 33cdf0e10cSrcweir #include <tools/tempfile.hxx> 34cdf0e10cSrcweir #endif 35cdf0e10cSrcweir #ifndef _UNTOOLS_UCBSTREAMHELPER_HXX 36cdf0e10cSrcweir #include <unotools/ucbstreamhelper.hxx> 37cdf0e10cSrcweir #endif 38cdf0e10cSrcweir #ifndef _SV_MSGBOX_HXX 39cdf0e10cSrcweir #include <vcl/msgbox.hxx> 40cdf0e10cSrcweir #endif 41cdf0e10cSrcweir #ifndef _FILEDLGHELPER_HXX 42cdf0e10cSrcweir #include <sfx2/filedlghelper.hxx> 43cdf0e10cSrcweir #endif 44cdf0e10cSrcweir #ifndef _URLOBJ_HXX 45cdf0e10cSrcweir #include <tools/urlobj.hxx> 46cdf0e10cSrcweir #endif 47cdf0e10cSrcweir #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" 48cdf0e10cSrcweir #endif 49cdf0e10cSrcweir #include <editeng/scripttypeitem.hxx> 50cdf0e10cSrcweir #include <editeng/editeng.hxx> 51cdf0e10cSrcweir #include <editeng/editview.hxx> 52cdf0e10cSrcweir #include <editeng/eeitem.hxx> 53cdf0e10cSrcweir #include <editeng/fontitem.hxx> 54cdf0e10cSrcweir #include <editeng/fhgtitem.hxx> 55cdf0e10cSrcweir #include <editeng/editids.hrc> 56cdf0e10cSrcweir #include <svx/svxids.hrc> 57cdf0e10cSrcweir #include <memory> 58cdf0e10cSrcweir 59cdf0e10cSrcweir //........................................................................ 60cdf0e10cSrcweir namespace frm 61cdf0e10cSrcweir { 62cdf0e10cSrcweir //........................................................................ 63cdf0e10cSrcweir 64cdf0e10cSrcweir using namespace ::com::sun::star::awt; 65cdf0e10cSrcweir 66cdf0e10cSrcweir //==================================================================== 67cdf0e10cSrcweir //= RichTextControl 68cdf0e10cSrcweir //==================================================================== 69cdf0e10cSrcweir //-------------------------------------------------------------------- RichTextControl(RichTextEngine * _pEngine,Window * _pParent,WinBits _nStyle,ITextAttributeListener * _pTextAttribListener,ITextSelectionListener * _pSelectionListener)70cdf0e10cSrcweir RichTextControl::RichTextControl( RichTextEngine* _pEngine, Window* _pParent, WinBits _nStyle, 71cdf0e10cSrcweir ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* _pSelectionListener ) 72cdf0e10cSrcweir :Control( _pParent, implInitStyle( _nStyle ) ) 73cdf0e10cSrcweir ,m_pImpl( NULL ) 74cdf0e10cSrcweir { 75cdf0e10cSrcweir implInit( _pEngine, _pTextAttribListener, _pSelectionListener ); 76cdf0e10cSrcweir } 77cdf0e10cSrcweir 78cdf0e10cSrcweir //-------------------------------------------------------------------- implInit(RichTextEngine * _pEngine,ITextAttributeListener * _pTextAttribListener,ITextSelectionListener * _pSelectionListener)79cdf0e10cSrcweir void RichTextControl::implInit( RichTextEngine* _pEngine, ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* _pSelectionListener ) 80cdf0e10cSrcweir { 81cdf0e10cSrcweir m_pImpl = new RichTextControlImpl( this, _pEngine, _pTextAttribListener, _pSelectionListener ); 82cdf0e10cSrcweir SetCompoundControl( sal_True ); 83cdf0e10cSrcweir } 84cdf0e10cSrcweir 85cdf0e10cSrcweir //-------------------------------------------------------------------- ~RichTextControl()86cdf0e10cSrcweir RichTextControl::~RichTextControl( ) 87cdf0e10cSrcweir { 88cdf0e10cSrcweir delete m_pImpl; 89cdf0e10cSrcweir } 90cdf0e10cSrcweir 91cdf0e10cSrcweir //-------------------------------------------------------------------- getState(AttributeId _nAttributeId) const92cdf0e10cSrcweir AttributeState RichTextControl::getState( AttributeId _nAttributeId ) const 93cdf0e10cSrcweir { 94cdf0e10cSrcweir return m_pImpl->getAttributeState( _nAttributeId ); 95cdf0e10cSrcweir } 96cdf0e10cSrcweir 97cdf0e10cSrcweir //-------------------------------------------------------------------- executeAttribute(AttributeId _nAttributeId,const SfxPoolItem * _pArgument)98cdf0e10cSrcweir void RichTextControl::executeAttribute( AttributeId _nAttributeId, const SfxPoolItem* _pArgument ) 99cdf0e10cSrcweir { 100cdf0e10cSrcweir SfxItemSet aToApplyAttributes( getView().GetEmptyItemSet() ); 101cdf0e10cSrcweir if ( !m_pImpl->executeAttribute( getView().GetAttribs(), aToApplyAttributes, _nAttributeId, _pArgument, m_pImpl->getSelectedScriptType() ) ) 102cdf0e10cSrcweir { 103cdf0e10cSrcweir OSL_ENSURE( sal_False, "RichTextControl::executeAttribute: cannot handle the given attribute!" ); 104cdf0e10cSrcweir return; 105cdf0e10cSrcweir } 106cdf0e10cSrcweir 107cdf0e10cSrcweir applyAttributes( aToApplyAttributes ); 108cdf0e10cSrcweir } 109cdf0e10cSrcweir 110cdf0e10cSrcweir //-------------------------------------------------------------------- applyAttributes(const SfxItemSet & _rAttributesToApply)111cdf0e10cSrcweir void RichTextControl::applyAttributes( const SfxItemSet& _rAttributesToApply ) 112cdf0e10cSrcweir { 113cdf0e10cSrcweir // apply 114cdf0e10cSrcweir if ( HasChildPathFocus() ) 115cdf0e10cSrcweir getView().HideCursor(); 116cdf0e10cSrcweir 117cdf0e10cSrcweir sal_Bool bOldUpdateMode = getEngine().GetUpdateMode(); // TODO: guard? 118cdf0e10cSrcweir getEngine().SetUpdateMode( sal_False ); 119cdf0e10cSrcweir 120cdf0e10cSrcweir getView().SetAttribs( _rAttributesToApply ); 121cdf0e10cSrcweir 122cdf0e10cSrcweir getEngine().SetUpdateMode( bOldUpdateMode ); 123cdf0e10cSrcweir getView().Invalidate(); 124cdf0e10cSrcweir 125cdf0e10cSrcweir if ( HasChildPathFocus() ) 126cdf0e10cSrcweir getView().ShowCursor(); 127cdf0e10cSrcweir 128cdf0e10cSrcweir m_pImpl->updateAllAttributes(); 129cdf0e10cSrcweir // TODO: maybe we should have a list of attributes which need to be updated 130cdf0e10cSrcweir // (the handler for the just executed attribute should know) 131cdf0e10cSrcweir } 132cdf0e10cSrcweir 133cdf0e10cSrcweir //-------------------------------------------------------------------- enableAttributeNotification(AttributeId _nAttributeId,ITextAttributeListener * _pListener)134cdf0e10cSrcweir void RichTextControl::enableAttributeNotification( AttributeId _nAttributeId, ITextAttributeListener* _pListener ) 135cdf0e10cSrcweir { 136cdf0e10cSrcweir m_pImpl->enableAttributeNotification( _nAttributeId, _pListener ); 137cdf0e10cSrcweir } 138cdf0e10cSrcweir 139cdf0e10cSrcweir //-------------------------------------------------------------------- disableAttributeNotification(AttributeId _nAttributeId)140cdf0e10cSrcweir void RichTextControl::disableAttributeNotification( AttributeId _nAttributeId ) 141cdf0e10cSrcweir { 142cdf0e10cSrcweir m_pImpl->disableAttributeNotification( _nAttributeId ); 143cdf0e10cSrcweir } 144cdf0e10cSrcweir 145cdf0e10cSrcweir //-------------------------------------------------------------------- isMappableSlot(SfxSlotId _nSlotId)146cdf0e10cSrcweir bool RichTextControl::isMappableSlot( SfxSlotId _nSlotId ) 147cdf0e10cSrcweir { 148cdf0e10cSrcweir switch ( _nSlotId ) 149cdf0e10cSrcweir { 150cdf0e10cSrcweir case SID_ATTR_PARA_ADJUST_LEFT: 151cdf0e10cSrcweir case SID_ATTR_PARA_ADJUST_CENTER: 152cdf0e10cSrcweir case SID_ATTR_PARA_ADJUST_RIGHT: 153cdf0e10cSrcweir case SID_ATTR_PARA_ADJUST_BLOCK: 154cdf0e10cSrcweir case SID_SET_SUPER_SCRIPT: 155cdf0e10cSrcweir case SID_SET_SUB_SCRIPT: 156cdf0e10cSrcweir case SID_ATTR_PARA_LINESPACE_10: 157cdf0e10cSrcweir case SID_ATTR_PARA_LINESPACE_15: 158cdf0e10cSrcweir case SID_ATTR_PARA_LINESPACE_20: 159cdf0e10cSrcweir case SID_ATTR_PARA_LEFT_TO_RIGHT: 160cdf0e10cSrcweir case SID_ATTR_PARA_RIGHT_TO_LEFT: 161cdf0e10cSrcweir case SID_TEXTDIRECTION_TOP_TO_BOTTOM: 162cdf0e10cSrcweir case SID_TEXTDIRECTION_LEFT_TO_RIGHT: 163cdf0e10cSrcweir case SID_ATTR_CHAR_LATIN_FONT: 164cdf0e10cSrcweir case SID_ATTR_CHAR_LATIN_FONTHEIGHT: 165cdf0e10cSrcweir case SID_ATTR_CHAR_LATIN_LANGUAGE: 166cdf0e10cSrcweir case SID_ATTR_CHAR_LATIN_POSTURE: 167cdf0e10cSrcweir case SID_ATTR_CHAR_LATIN_WEIGHT: 168cdf0e10cSrcweir return true; 169cdf0e10cSrcweir } 170cdf0e10cSrcweir return false; 171cdf0e10cSrcweir } 172cdf0e10cSrcweir 173cdf0e10cSrcweir //-------------------------------------------------------------------- Resize()174cdf0e10cSrcweir void RichTextControl::Resize() 175cdf0e10cSrcweir { 176cdf0e10cSrcweir m_pImpl->layoutWindow(); 177cdf0e10cSrcweir Invalidate(); 178cdf0e10cSrcweir } 179cdf0e10cSrcweir 180cdf0e10cSrcweir //-------------------------------------------------------------------- GetFocus()181cdf0e10cSrcweir void RichTextControl::GetFocus() 182cdf0e10cSrcweir { 183cdf0e10cSrcweir getViewport().GrabFocus(); 184cdf0e10cSrcweir } 185cdf0e10cSrcweir 186cdf0e10cSrcweir //-------------------------------------------------------------------- implInitStyle(WinBits nStyle)187cdf0e10cSrcweir WinBits RichTextControl::implInitStyle( WinBits nStyle ) 188cdf0e10cSrcweir { 189cdf0e10cSrcweir if ( !( nStyle & WB_NOTABSTOP ) ) 190cdf0e10cSrcweir nStyle |= WB_TABSTOP; 191cdf0e10cSrcweir return nStyle; 192cdf0e10cSrcweir } 193cdf0e10cSrcweir 194cdf0e10cSrcweir //-------------------------------------------------------------------- StateChanged(StateChangedType _nStateChange)195cdf0e10cSrcweir void RichTextControl::StateChanged( StateChangedType _nStateChange ) 196cdf0e10cSrcweir { 197cdf0e10cSrcweir if ( _nStateChange == STATE_CHANGE_STYLE ) 198cdf0e10cSrcweir { 199cdf0e10cSrcweir SetStyle( implInitStyle( GetStyle() ) ); 200cdf0e10cSrcweir m_pImpl->notifyStyleChanged(); 201cdf0e10cSrcweir } 202cdf0e10cSrcweir else if ( _nStateChange == STATE_CHANGE_ZOOM ) 203cdf0e10cSrcweir { 204cdf0e10cSrcweir m_pImpl->notifyZoomChanged(); 205cdf0e10cSrcweir } 206cdf0e10cSrcweir else if ( _nStateChange == STATE_CHANGE_INITSHOW ) 207cdf0e10cSrcweir { 208cdf0e10cSrcweir m_pImpl->notifyInitShow(); 209cdf0e10cSrcweir } 210cdf0e10cSrcweir Control::StateChanged( _nStateChange ); 211cdf0e10cSrcweir } 212cdf0e10cSrcweir 213cdf0e10cSrcweir //-------------------------------------------------------------------- PreNotify(NotifyEvent & _rNEvt)214cdf0e10cSrcweir long RichTextControl::PreNotify( NotifyEvent& _rNEvt ) 215cdf0e10cSrcweir { 216cdf0e10cSrcweir if ( IsWindowOrChild( _rNEvt.GetWindow() ) ) 217cdf0e10cSrcweir { 218cdf0e10cSrcweir if ( EVENT_KEYINPUT == _rNEvt.GetType() ) 219cdf0e10cSrcweir { 220cdf0e10cSrcweir const ::KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); 221cdf0e10cSrcweir 222cdf0e10cSrcweir sal_uInt16 nCode = pKeyEvent->GetKeyCode().GetCode(); 223cdf0e10cSrcweir sal_Bool bShift = pKeyEvent->GetKeyCode().IsShift(); 224cdf0e10cSrcweir sal_Bool bCtrl = pKeyEvent->GetKeyCode().IsMod1(); 225cdf0e10cSrcweir sal_Bool bAlt = pKeyEvent->GetKeyCode().IsMod2(); 226cdf0e10cSrcweir if ( ( KEY_TAB == nCode ) && bCtrl && !bAlt ) 227cdf0e10cSrcweir { 228cdf0e10cSrcweir // Ctrl-Tab is used to step out of the control 229cdf0e10cSrcweir // -> build a new key event without the Ctrl-key, and let the very base class handle it 230cdf0e10cSrcweir KeyCode aNewCode( KEY_TAB, bShift, sal_False, sal_False, sal_False ); 231cdf0e10cSrcweir ::KeyEvent aNewEvent( pKeyEvent->GetCharCode(), aNewCode ); 232cdf0e10cSrcweir Control::KeyInput( aNewEvent ); 233cdf0e10cSrcweir return 1; // handled 234cdf0e10cSrcweir } 235cdf0e10cSrcweir 236cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 0 237cdf0e10cSrcweir if ( ( ( KEY_F12 == nCode ) 238cdf0e10cSrcweir || ( KEY_F11 == nCode ) 239cdf0e10cSrcweir ) 240cdf0e10cSrcweir && bCtrl 241cdf0e10cSrcweir && bAlt 242cdf0e10cSrcweir ) 243cdf0e10cSrcweir { 244cdf0e10cSrcweir bool bLoad = KEY_F11 == nCode; 245cdf0e10cSrcweir struct 246cdf0e10cSrcweir { 247cdf0e10cSrcweir const sal_Char* pDescription; 248cdf0e10cSrcweir const sal_Char* pExtension; 249cdf0e10cSrcweir EETextFormat eFormat; 250cdf0e10cSrcweir } aExportFormats[] = 251cdf0e10cSrcweir { 252cdf0e10cSrcweir { "OASIS OpenDocument (*.xml)", "*.xml", EE_FORMAT_XML }, 253cdf0e10cSrcweir { "HyperText Markup Language (*.html)", "*.html", EE_FORMAT_HTML }, 254cdf0e10cSrcweir { "Rich Text format (*.rtf)", "*.rtf", EE_FORMAT_RTF }, 255cdf0e10cSrcweir { "Text (*.txt)", "*.txt", EE_FORMAT_TEXT } 256cdf0e10cSrcweir }; 257cdf0e10cSrcweir 258cdf0e10cSrcweir ::sfx2::FileDialogHelper aFP( bLoad ? com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE : com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0, this ); 259cdf0e10cSrcweir 260cdf0e10cSrcweir for ( size_t i = 0; i < sizeof( aExportFormats ) / sizeof( aExportFormats[ 0 ] ); ++i ) 261cdf0e10cSrcweir { 262cdf0e10cSrcweir aFP.AddFilter( 263cdf0e10cSrcweir String::CreateFromAscii( aExportFormats[i].pDescription ), 264cdf0e10cSrcweir String::CreateFromAscii( aExportFormats[i].pExtension ) ); 265cdf0e10cSrcweir } 266cdf0e10cSrcweir ErrCode nResult = aFP.Execute(); 267cdf0e10cSrcweir if ( nResult == 0 ) 268cdf0e10cSrcweir { 269cdf0e10cSrcweir String sFileName = aFP.GetPath(); 270cdf0e10cSrcweir SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( 271cdf0e10cSrcweir sFileName, ( bLoad ? STREAM_READ : STREAM_WRITE | STREAM_TRUNC ) | STREAM_SHARE_DENYALL 272cdf0e10cSrcweir ); 273cdf0e10cSrcweir if ( pStream ) 274cdf0e10cSrcweir { 275cdf0e10cSrcweir EETextFormat eFormat = EE_FORMAT_XML; 276cdf0e10cSrcweir String sFilter = aFP.GetCurrentFilter(); 277cdf0e10cSrcweir for ( size_t i = 0; i < sizeof( aExportFormats ) / sizeof( aExportFormats[ 0 ] ); ++i ) 278cdf0e10cSrcweir { 279cdf0e10cSrcweir if ( sFilter.EqualsAscii( aExportFormats[i].pDescription ) ) 280cdf0e10cSrcweir { 281cdf0e10cSrcweir eFormat = aExportFormats[i].eFormat; 282cdf0e10cSrcweir break; 283cdf0e10cSrcweir } 284cdf0e10cSrcweir } 285cdf0e10cSrcweir if ( bLoad ) 286cdf0e10cSrcweir { 287cdf0e10cSrcweir INetURLObject aURL( sFileName ); 288cdf0e10cSrcweir aURL.removeSegment(); 289cdf0e10cSrcweir getEngine().Read( *pStream, aURL.GetMainURL( INetURLObject::NO_DECODE ), eFormat ); 290cdf0e10cSrcweir } 291cdf0e10cSrcweir else 292cdf0e10cSrcweir { 293cdf0e10cSrcweir getEngine().Write( *pStream, eFormat ); 294cdf0e10cSrcweir } 295cdf0e10cSrcweir } 296cdf0e10cSrcweir DELETEZ( pStream ); 297cdf0e10cSrcweir } 298cdf0e10cSrcweir return 1; // handled 299cdf0e10cSrcweir } 300cdf0e10cSrcweir #endif 301cdf0e10cSrcweir } 302cdf0e10cSrcweir } 303cdf0e10cSrcweir return Control::PreNotify( _rNEvt ); 304cdf0e10cSrcweir } 305cdf0e10cSrcweir 306cdf0e10cSrcweir //-------------------------------------------------------------------- Notify(NotifyEvent & _rNEvt)307cdf0e10cSrcweir long RichTextControl::Notify( NotifyEvent& _rNEvt ) 308cdf0e10cSrcweir { 309cdf0e10cSrcweir long nDone = 0; 310cdf0e10cSrcweir if ( _rNEvt.GetType() == EVENT_COMMAND ) 311cdf0e10cSrcweir { 312cdf0e10cSrcweir const CommandEvent& rEvent = *_rNEvt.GetCommandEvent(); 313cdf0e10cSrcweir nDone = m_pImpl->HandleCommand( rEvent ); 314cdf0e10cSrcweir } 315cdf0e10cSrcweir return nDone ? nDone : Control::Notify( _rNEvt ); 316cdf0e10cSrcweir } 317cdf0e10cSrcweir 318cdf0e10cSrcweir //-------------------------------------------------------------------- Draw(OutputDevice * _pDev,const Point & _rPos,const Size & _rSize,sal_uLong _nFlags)319cdf0e10cSrcweir void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ) 320cdf0e10cSrcweir { 321cdf0e10cSrcweir m_pImpl->Draw( _pDev, _rPos, _rSize, _nFlags ); 322cdf0e10cSrcweir } 323cdf0e10cSrcweir 324cdf0e10cSrcweir //-------------------------------------------------------------------- getView()325cdf0e10cSrcweir EditView& RichTextControl::getView() 326cdf0e10cSrcweir { 327cdf0e10cSrcweir return *m_pImpl->getView( RichTextControlImpl::GrantAccess() ); 328cdf0e10cSrcweir } 329cdf0e10cSrcweir 330cdf0e10cSrcweir //-------------------------------------------------------------------- getView() const331cdf0e10cSrcweir const EditView& RichTextControl::getView() const 332cdf0e10cSrcweir { 333cdf0e10cSrcweir return *m_pImpl->getView( RichTextControlImpl::GrantAccess() ); 334cdf0e10cSrcweir } 335cdf0e10cSrcweir 336cdf0e10cSrcweir //-------------------------------------------------------------------- getEngine() const337cdf0e10cSrcweir EditEngine& RichTextControl::getEngine() const 338cdf0e10cSrcweir { 339cdf0e10cSrcweir return *m_pImpl->getEngine( RichTextControlImpl::GrantAccess() ); 340cdf0e10cSrcweir } 341cdf0e10cSrcweir 342cdf0e10cSrcweir //-------------------------------------------------------------------- getViewport() const343cdf0e10cSrcweir Window& RichTextControl::getViewport() const 344cdf0e10cSrcweir { 345cdf0e10cSrcweir return *m_pImpl->getViewport( RichTextControlImpl::GrantAccess() ); 346cdf0e10cSrcweir } 347cdf0e10cSrcweir 348cdf0e10cSrcweir //-------------------------------------------------------------------- SetReadOnly(bool _bReadOnly)349cdf0e10cSrcweir void RichTextControl::SetReadOnly( bool _bReadOnly ) 350cdf0e10cSrcweir { 351cdf0e10cSrcweir m_pImpl->SetReadOnly( _bReadOnly ); 352cdf0e10cSrcweir } 353cdf0e10cSrcweir 354cdf0e10cSrcweir //-------------------------------------------------------------------- IsReadOnly() const355cdf0e10cSrcweir bool RichTextControl::IsReadOnly() const 356cdf0e10cSrcweir { 357cdf0e10cSrcweir return m_pImpl->IsReadOnly(); 358cdf0e10cSrcweir } 359cdf0e10cSrcweir 360cdf0e10cSrcweir //-------------------------------------------------------------------- SetBackgroundColor()361cdf0e10cSrcweir void RichTextControl::SetBackgroundColor( ) 362cdf0e10cSrcweir { 363cdf0e10cSrcweir m_pImpl->SetBackgroundColor( ); 364cdf0e10cSrcweir } 365cdf0e10cSrcweir 366cdf0e10cSrcweir //-------------------------------------------------------------------- SetBackgroundColor(const Color & _rColor)367cdf0e10cSrcweir void RichTextControl::SetBackgroundColor( const Color& _rColor ) 368cdf0e10cSrcweir { 369cdf0e10cSrcweir m_pImpl->SetBackgroundColor( _rColor ); 370cdf0e10cSrcweir } 371cdf0e10cSrcweir 372cdf0e10cSrcweir //-------------------------------------------------------------------- SetHideInactiveSelection(bool _bHide)373cdf0e10cSrcweir void RichTextControl::SetHideInactiveSelection( bool _bHide ) 374cdf0e10cSrcweir { 375cdf0e10cSrcweir m_pImpl->SetHideInactiveSelection( _bHide ); 376cdf0e10cSrcweir } 377cdf0e10cSrcweir 378cdf0e10cSrcweir //-------------------------------------------------------------------- GetHideInactiveSelection() const379cdf0e10cSrcweir bool RichTextControl::GetHideInactiveSelection() const 380cdf0e10cSrcweir { 381cdf0e10cSrcweir return m_pImpl->GetHideInactiveSelection( ); 382cdf0e10cSrcweir } 383cdf0e10cSrcweir 384cdf0e10cSrcweir //........................................................................ 385cdf0e10cSrcweir } // namespace frm 386cdf0e10cSrcweir //........................................................................ 387cdf0e10cSrcweir 388cdf0e10cSrcweir 389