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