nss: upgrade to release 3.73
[LibreOffice.git] / forms / source / richtext / richtextmodel.cxx
blobcd00e803299724dabf2402de63c5c858eec735bd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "richtextmodel.hxx"
21 #include "richtextengine.hxx"
22 #include "richtextunowrapper.hxx"
24 #include <property.hxx>
25 #include <services.hxx>
27 #include <com/sun/star/awt/LineEndFormat.hpp>
28 #include <com/sun/star/form/FormComponentType.hpp>
29 #include <com/sun/star/text/WritingMode2.hpp>
30 #include <com/sun/star/style/VerticalAlignment.hpp>
32 #include <cppuhelper/typeprovider.hxx>
33 #include <comphelper/guarding.hxx>
34 #include <svl/itempool.hxx>
35 #include <toolkit/awt/vclxdevice.hxx>
36 #include <toolkit/helper/vclunohelper.hxx>
37 #include <tools/diagnose_ex.h>
38 #include <editeng/editstat.hxx>
39 #include <vcl/outdev.hxx>
40 #include <vcl/svapp.hxx>
43 namespace frm
45 using namespace ::com::sun::star::uno;
46 using namespace ::com::sun::star::awt;
47 using namespace ::com::sun::star::lang;
48 using namespace ::com::sun::star::io;
49 using namespace ::com::sun::star::beans;
50 using namespace ::com::sun::star::form;
51 using namespace ::com::sun::star::util;
52 using namespace ::com::sun::star::style;
54 namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
56 ORichTextModel::ORichTextModel( const Reference< XComponentContext >& _rxFactory )
57 :OControlModel ( _rxFactory, OUString() )
58 ,FontControlModel ( true )
59 ,m_pEngine ( RichTextEngine::Create() )
60 ,m_bSettingEngineText( false )
61 ,m_aModifyListeners ( m_aMutex )
63 m_nClassId = FormComponentType::TEXTFIELD;
65 getPropertyDefaultByHandle( PROPERTY_ID_DEFAULTCONTROL ) >>= m_sDefaultControl;
66 getPropertyDefaultByHandle( PROPERTY_ID_BORDER ) >>= m_nBorder;
67 getPropertyDefaultByHandle( PROPERTY_ID_ENABLED ) >>= m_bEnabled;
68 getPropertyDefaultByHandle( PROPERTY_ID_ENABLEVISIBLE ) >>= m_bEnableVisible;
69 getPropertyDefaultByHandle( PROPERTY_ID_HARDLINEBREAKS ) >>= m_bHardLineBreaks;
70 getPropertyDefaultByHandle( PROPERTY_ID_HSCROLL ) >>= m_bHScroll;
71 getPropertyDefaultByHandle( PROPERTY_ID_VSCROLL ) >>= m_bVScroll;
72 getPropertyDefaultByHandle( PROPERTY_ID_READONLY ) >>= m_bReadonly;
73 getPropertyDefaultByHandle( PROPERTY_ID_PRINTABLE ) >>= m_bPrintable;
74 m_aAlign = getPropertyDefaultByHandle( PROPERTY_ID_ALIGN );
75 getPropertyDefaultByHandle( PROPERTY_ID_ECHO_CHAR ) >>= m_nEchoChar;
76 getPropertyDefaultByHandle( PROPERTY_ID_MAXTEXTLEN ) >>= m_nMaxTextLength;
77 getPropertyDefaultByHandle( PROPERTY_ID_MULTILINE ) >>= m_bMultiLine;
78 getPropertyDefaultByHandle( PROPERTY_ID_RICH_TEXT ) >>= m_bReallyActAsRichText;
79 getPropertyDefaultByHandle( PROPERTY_ID_HIDEINACTIVESELECTION ) >>= m_bHideInactiveSelection;
80 getPropertyDefaultByHandle( PROPERTY_ID_LINEEND_FORMAT ) >>= m_nLineEndFormat;
81 getPropertyDefaultByHandle( PROPERTY_ID_WRITING_MODE ) >>= m_nTextWritingMode;
82 getPropertyDefaultByHandle( PROPERTY_ID_CONTEXT_WRITING_MODE ) >>= m_nContextWritingMode;
84 implInit();
88 ORichTextModel::ORichTextModel( const ORichTextModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
89 :OControlModel ( _pOriginal, _rxFactory, false )
90 ,FontControlModel ( _pOriginal )
91 ,m_bSettingEngineText( false )
92 ,m_aModifyListeners ( m_aMutex )
95 m_aTabStop = _pOriginal->m_aTabStop;
96 m_aBackgroundColor = _pOriginal->m_aBackgroundColor;
97 m_aBorderColor = _pOriginal->m_aBorderColor;
98 m_aVerticalAlignment = _pOriginal->m_aVerticalAlignment;
99 m_sDefaultControl = _pOriginal->m_sDefaultControl;
100 m_sHelpText = _pOriginal->m_sHelpText;
101 m_sHelpURL = _pOriginal->m_sHelpURL;
102 m_nBorder = _pOriginal->m_nBorder;
103 m_bEnabled = _pOriginal->m_bEnabled;
104 m_bEnableVisible = _pOriginal->m_bEnableVisible;
105 m_bHardLineBreaks = _pOriginal->m_bHardLineBreaks;
106 m_bHScroll = _pOriginal->m_bHScroll;
107 m_bVScroll = _pOriginal->m_bVScroll;
108 m_bReadonly = _pOriginal->m_bReadonly;
109 m_bPrintable = _pOriginal->m_bPrintable;
110 m_bReallyActAsRichText = _pOriginal->m_bReallyActAsRichText;
111 m_bHideInactiveSelection = _pOriginal->m_bHideInactiveSelection;
112 m_nLineEndFormat = _pOriginal->m_nLineEndFormat;
113 m_nTextWritingMode = _pOriginal->m_nTextWritingMode;
114 m_nContextWritingMode = _pOriginal->m_nContextWritingMode;
116 m_aAlign = _pOriginal->m_aAlign;
117 m_nEchoChar = _pOriginal->m_nEchoChar;
118 m_nMaxTextLength = _pOriginal->m_nMaxTextLength;
119 m_bMultiLine = _pOriginal->m_bMultiLine;
121 m_pEngine.reset(_pOriginal->m_pEngine->Clone());
122 m_sLastKnownEngineText = m_pEngine->GetText();
124 implInit();
128 void ORichTextModel::implInit()
130 OSL_ENSURE(m_pEngine, "ORichTextModel::implInit: where's the engine?");
131 if (m_pEngine)
133 m_pEngine->SetModifyHdl( LINK( this, ORichTextModel, OnEngineContentModified ) );
135 EEControlBits nEngineControlWord = m_pEngine->GetControlWord();
136 nEngineControlWord = nEngineControlWord & ~EEControlBits::AUTOPAGESIZE;
137 m_pEngine->SetControlWord( nEngineControlWord );
139 VCLXDevice* pUnoRefDevice = new VCLXDevice;
141 SolarMutexGuard g;
142 pUnoRefDevice->SetOutputDevice( m_pEngine->GetRefDevice() );
144 m_xReferenceDevice = pUnoRefDevice;
147 implDoAggregation();
148 implRegisterProperties();
152 void ORichTextModel::implDoAggregation()
154 osl_atomic_increment( &m_refCount );
157 m_xAggregate = new ORichTextUnoWrapper( *m_pEngine, this );
158 setAggregation( m_xAggregate );
159 doSetDelegator();
162 osl_atomic_decrement( &m_refCount );
166 void ORichTextModel::implRegisterProperties()
168 REGISTER_PROP_2( DEFAULTCONTROL, m_sDefaultControl, BOUND, MAYBEDEFAULT );
169 REGISTER_PROP_2( HELPTEXT, m_sHelpText, BOUND, MAYBEDEFAULT );
170 REGISTER_PROP_2( HELPURL, m_sHelpURL, BOUND, MAYBEDEFAULT );
171 REGISTER_PROP_2( ENABLED, m_bEnabled, BOUND, MAYBEDEFAULT );
172 REGISTER_PROP_2( ENABLEVISIBLE, m_bEnableVisible, BOUND, MAYBEDEFAULT );
173 REGISTER_PROP_2( BORDER, m_nBorder, BOUND, MAYBEDEFAULT );
174 REGISTER_PROP_2( HARDLINEBREAKS, m_bHardLineBreaks, BOUND, MAYBEDEFAULT );
175 REGISTER_PROP_2( HSCROLL, m_bHScroll, BOUND, MAYBEDEFAULT );
176 REGISTER_PROP_2( VSCROLL, m_bVScroll, BOUND, MAYBEDEFAULT );
177 REGISTER_PROP_2( READONLY, m_bReadonly, BOUND, MAYBEDEFAULT );
178 REGISTER_PROP_2( PRINTABLE, m_bPrintable, BOUND, MAYBEDEFAULT );
179 REGISTER_PROP_2( REFERENCE_DEVICE, m_xReferenceDevice, BOUND, TRANSIENT );
180 REGISTER_PROP_2( RICH_TEXT, m_bReallyActAsRichText, BOUND, MAYBEDEFAULT );
181 REGISTER_PROP_2( HIDEINACTIVESELECTION, m_bHideInactiveSelection, BOUND, MAYBEDEFAULT );
183 REGISTER_VOID_PROP_2( TABSTOP, m_aTabStop, sal_Bool, BOUND, MAYBEDEFAULT );
184 REGISTER_VOID_PROP_2( BACKGROUNDCOLOR, m_aBackgroundColor, sal_Int32, BOUND, MAYBEDEFAULT );
185 REGISTER_VOID_PROP_2( BORDERCOLOR, m_aBorderColor, sal_Int32, BOUND, MAYBEDEFAULT );
186 REGISTER_VOID_PROP_2( VERTICAL_ALIGN, m_aVerticalAlignment, VerticalAlignment, BOUND, MAYBEDEFAULT );
188 // properties which exist only for compatibility with the css.swt.UnoControlEditModel,
189 // since we replace the default implementation for this service
190 REGISTER_PROP_2( ECHO_CHAR, m_nEchoChar, BOUND, MAYBEDEFAULT );
191 REGISTER_PROP_2( MAXTEXTLEN, m_nMaxTextLength, BOUND, MAYBEDEFAULT );
192 REGISTER_PROP_2( MULTILINE, m_bMultiLine, BOUND, MAYBEDEFAULT );
193 REGISTER_PROP_2( TEXT, m_sLastKnownEngineText, BOUND, MAYBEDEFAULT );
194 REGISTER_PROP_2( LINEEND_FORMAT, m_nLineEndFormat, BOUND, MAYBEDEFAULT );
195 REGISTER_PROP_2( WRITING_MODE, m_nTextWritingMode, BOUND, MAYBEDEFAULT );
196 REGISTER_PROP_3( CONTEXT_WRITING_MODE, m_nContextWritingMode, BOUND, MAYBEDEFAULT, TRANSIENT );
198 REGISTER_VOID_PROP_2( ALIGN, m_aAlign, sal_Int16, BOUND, MAYBEDEFAULT );
202 ORichTextModel::~ORichTextModel( )
204 if ( !OComponentHelper::rBHelper.bDisposed )
206 acquire();
207 dispose();
209 if (m_pEngine)
211 SolarMutexGuard g;
212 SfxItemPool* pPool = m_pEngine->getPool();
213 m_pEngine.reset();
214 SfxItemPool::Free(pPool);
221 Any SAL_CALL ORichTextModel::queryAggregation( const Type& _rType )
223 Any aReturn = ORichTextModel_BASE::queryInterface( _rType );
225 if ( !aReturn.hasValue() )
226 aReturn = OControlModel::queryAggregation( _rType );
228 return aReturn;
232 IMPLEMENT_FORWARD_XTYPEPROVIDER2( ORichTextModel, OControlModel, ORichTextModel_BASE )
234 OUString SAL_CALL ORichTextModel::getImplementationName()
236 return "com.sun.star.comp.forms.ORichTextModel";
239 Sequence< OUString > SAL_CALL ORichTextModel::getSupportedServiceNames()
241 Sequence< OUString > aOwnNames {
242 FRM_SUN_COMPONENT_RICHTEXTCONTROL,
243 "com.sun.star.text.TextRange",
244 "com.sun.star.style.CharacterProperties",
245 "com.sun.star.style.ParagraphProperties",
246 "com.sun.star.style.CharacterPropertiesAsian",
247 "com.sun.star.style.CharacterPropertiesComplex",
248 "com.sun.star.style.ParagraphPropertiesAsian",
249 "com.sun.star.style.ParagraphPropertiesComplex" };
251 return ::comphelper::combineSequences(
252 getAggregateServiceNames(),
253 ::comphelper::concatSequences(
254 OControlModel::getSupportedServiceNames_Static(),
255 aOwnNames)
259 IMPLEMENT_DEFAULT_CLONING( ORichTextModel )
262 void SAL_CALL ORichTextModel::disposing()
264 m_aModifyListeners.disposeAndClear( EventObject( *this ) );
265 OControlModel::disposing();
269 namespace
271 void lcl_removeProperty( Sequence< Property >& _rSeq, const OUString& _rPropertyName )
273 Property* pLoop = _rSeq.getArray();
274 Property* pEnd = _rSeq.getArray() + _rSeq.getLength();
275 while ( pLoop != pEnd )
277 if ( pLoop->Name == _rPropertyName )
279 ::std::copy( pLoop + 1, pEnd, pLoop );
280 _rSeq.realloc( _rSeq.getLength() - 1 );
281 break;
283 ++pLoop;
288 void ORichTextModel::describeFixedProperties( Sequence< Property >& _rProps ) const
290 BEGIN_DESCRIBE_PROPERTIES( 1, OControlModel )
291 DECL_PROP2( TABINDEX, sal_Int16, BOUND, MAYBEDEFAULT );
292 END_DESCRIBE_PROPERTIES();
294 // properties which the OPropertyContainerHelper is responsible for
295 Sequence< Property > aContainedProperties;
296 describeProperties( aContainedProperties );
298 // properties which the FontControlModel is responsible for
299 Sequence< Property > aFontProperties;
300 describeFontRelatedProperties( aFontProperties );
302 _rProps = concatSequences( aContainedProperties, aFontProperties, _rProps );
306 void ORichTextModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
308 OControlModel::describeAggregateProperties( _rAggregateProps );
310 // our aggregate (the SvxUnoText) declares a FontDescriptor property, as does
311 // our FormControlFont base class. We remove it from the base class' sequence
312 // here, and later on care for both instances being in sync
313 lcl_removeProperty( _rAggregateProps, PROPERTY_FONT );
315 // similar, the WritingMode property is declared in our aggregate, too, but we override
316 // it, since the aggregate does no proper PropertyState handling.
317 lcl_removeProperty( _rAggregateProps, PROPERTY_WRITING_MODE );
321 void SAL_CALL ORichTextModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
323 if ( isRegisteredProperty( _nHandle ) )
325 OPropertyContainerHelper::getFastPropertyValue( _rValue, _nHandle );
327 else if ( isFontRelatedProperty( _nHandle ) )
329 FontControlModel::getFastPropertyValue( _rValue, _nHandle );
331 else
333 OControlModel::getFastPropertyValue( _rValue, _nHandle );
338 sal_Bool SAL_CALL ORichTextModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue )
340 bool bModified = false;
342 if ( isRegisteredProperty( _nHandle ) )
344 bModified = OPropertyContainerHelper::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
346 else if ( isFontRelatedProperty( _nHandle ) )
348 bModified = FontControlModel::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
350 else
352 bModified = OControlModel::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
355 return bModified;
359 void SAL_CALL ORichTextModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue )
361 if ( isRegisteredProperty( _nHandle ) )
363 OPropertyContainerHelper::setFastPropertyValue( _nHandle, _rValue );
365 switch ( _nHandle )
367 case PROPERTY_ID_REFERENCE_DEVICE:
369 #if OSL_DEBUG_LEVEL > 0
370 MapMode aOldMapMode = m_pEngine->GetRefDevice()->GetMapMode();
371 #endif
373 OutputDevice* pRefDevice = VCLUnoHelper::GetOutputDevice( m_xReferenceDevice );
374 OSL_ENSURE( pRefDevice, "ORichTextModel::setFastPropertyValue_NoBroadcast: empty reference device?" );
375 m_pEngine->SetRefDevice( pRefDevice );
377 #if OSL_DEBUG_LEVEL > 0
378 MapMode aNewMapMode = m_pEngine->GetRefDevice()->GetMapMode();
379 OSL_ENSURE( aNewMapMode.GetMapUnit() == aOldMapMode.GetMapUnit(),
380 "ORichTextModel::setFastPropertyValue_NoBroadcast: You should not tamper with the MapUnit of the ref device!" );
381 // if this assertion here is triggered, then we would need to adjust all
382 // items in all text portions in all paragraphs in the attributes of the EditEngine,
383 // as long as they are MapUnit-dependent. This holds at least for the FontSize.
384 #endif
386 break;
388 case PROPERTY_ID_TEXT:
390 MutexRelease aReleaseMutex( m_aMutex );
391 impl_smlock_setEngineText( m_sLastKnownEngineText );
393 break;
394 } // switch ( _nHandle )
396 else if ( isFontRelatedProperty( _nHandle ) )
398 FontControlModel::setFastPropertyValue_NoBroadcast_impl(
399 *this, &ORichTextModel::setDependentFastPropertyValue,
400 _nHandle, _rValue);
402 else
404 switch ( _nHandle )
406 case PROPERTY_ID_WRITING_MODE:
408 // forward to our aggregate, so the EditEngine knows about it
409 if ( m_xAggregateSet.is() )
410 m_xAggregateSet->setPropertyValue( "WritingMode", _rValue );
412 break;
414 default:
415 OControlModel::setFastPropertyValue_NoBroadcast( _nHandle, _rValue );
416 break;
422 Any ORichTextModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
424 Any aDefault;
426 switch ( _nHandle )
428 case PROPERTY_ID_WRITING_MODE:
429 case PROPERTY_ID_CONTEXT_WRITING_MODE:
430 aDefault <<= WritingMode2::CONTEXT;
431 break;
433 case PROPERTY_ID_LINEEND_FORMAT:
434 aDefault <<= sal_Int16(LineEndFormat::LINE_FEED);
435 break;
437 case PROPERTY_ID_ECHO_CHAR:
438 case PROPERTY_ID_ALIGN:
439 case PROPERTY_ID_MAXTEXTLEN:
440 aDefault <<= sal_Int16(0);
441 break;
443 case PROPERTY_ID_TABSTOP:
444 case PROPERTY_ID_BACKGROUNDCOLOR:
445 case PROPERTY_ID_BORDERCOLOR:
446 case PROPERTY_ID_VERTICAL_ALIGN:
447 /* void */
448 break;
450 case PROPERTY_ID_ENABLED:
451 case PROPERTY_ID_ENABLEVISIBLE:
452 case PROPERTY_ID_PRINTABLE:
453 case PROPERTY_ID_HIDEINACTIVESELECTION:
454 aDefault <<= true;
455 break;
457 case PROPERTY_ID_HARDLINEBREAKS:
458 case PROPERTY_ID_HSCROLL:
459 case PROPERTY_ID_VSCROLL:
460 case PROPERTY_ID_READONLY:
461 case PROPERTY_ID_MULTILINE:
462 case PROPERTY_ID_RICH_TEXT:
463 aDefault <<= false;
464 break;
466 case PROPERTY_ID_DEFAULTCONTROL:
467 aDefault <<= OUString(FRM_SUN_CONTROL_RICHTEXTCONTROL);
468 break;
470 case PROPERTY_ID_HELPTEXT:
471 case PROPERTY_ID_HELPURL:
472 case PROPERTY_ID_TEXT:
473 aDefault <<= OUString();
474 break;
476 case PROPERTY_ID_BORDER:
477 aDefault <<= sal_Int16(1);
478 break;
480 default:
481 if ( isFontRelatedProperty( _nHandle ) )
482 aDefault = FontControlModel::getPropertyDefaultByHandle( _nHandle );
483 else
484 aDefault = OControlModel::getPropertyDefaultByHandle( _nHandle );
487 return aDefault;
491 void ORichTextModel::impl_smlock_setEngineText( const OUString& _rText )
493 if (m_pEngine)
495 SolarMutexGuard aSolarGuard;
496 m_bSettingEngineText = true;
497 m_pEngine->SetText( _rText );
498 m_bSettingEngineText = false;
503 OUString SAL_CALL ORichTextModel::getServiceName()
505 return FRM_SUN_COMPONENT_RICHTEXTCONTROL;
509 RichTextEngine* ORichTextModel::getEditEngine( const Reference< XControlModel >& _rxModel )
511 RichTextEngine* pEngine = nullptr;
513 Reference< XUnoTunnel > xTunnel( _rxModel, UNO_QUERY );
514 OSL_ENSURE( xTunnel.is(), "ORichTextModel::getEditEngine: invalid model!" );
515 if ( xTunnel.is() )
519 pEngine = reinterpret_cast< RichTextEngine* >( xTunnel->getSomething( getEditEngineTunnelId() ) );
521 catch( const Exception& )
523 TOOLS_WARN_EXCEPTION( "forms.richtext", "ORichTextModel::getEditEngine" );
526 return pEngine;
530 Sequence< sal_Int8 > ORichTextModel::getEditEngineTunnelId()
532 static cppu::OImplementationId aId;
533 return aId.getImplementationId();
537 IMPL_LINK_NOARG( ORichTextModel, OnEngineContentModified, LinkParamNone*, void )
539 if ( !m_bSettingEngineText )
541 m_aModifyListeners.notifyEach( &XModifyListener::modified, EventObject( *this ) );
543 potentialTextChange();
544 // is this a good idea? It may become expensive in case of larger texts,
545 // and this method here is called for every single changed character ...
546 // On the other hand, the API *requires* us to notify changes in the "Text"
547 // property immediately ...
552 sal_Int64 SAL_CALL ORichTextModel::getSomething( const Sequence< sal_Int8 >& _rId )
554 Sequence< sal_Int8 > aEditEngineAccessId( getEditEngineTunnelId() );
555 if ( ( _rId.getLength() == aEditEngineAccessId.getLength() )
556 && ( 0 == memcmp( aEditEngineAccessId.getConstArray(), _rId.getConstArray(), _rId.getLength() ) )
558 return reinterpret_cast< sal_Int64 >( m_pEngine.get() );
560 Reference< XUnoTunnel > xAggTunnel;
561 if ( query_aggregation( m_xAggregate, xAggTunnel ) )
562 return xAggTunnel->getSomething( _rId );
564 return 0;
568 void SAL_CALL ORichTextModel::addModifyListener( const Reference< XModifyListener >& _rxListener )
570 m_aModifyListeners.addInterface( _rxListener );
574 void SAL_CALL ORichTextModel::removeModifyListener( const Reference< XModifyListener >& _rxListener )
576 m_aModifyListeners.removeInterface( _rxListener );
580 void ORichTextModel::potentialTextChange( )
582 OUString sCurrentEngineText;
583 if (m_pEngine)
584 sCurrentEngineText = m_pEngine->GetText();
586 if ( sCurrentEngineText != m_sLastKnownEngineText )
588 sal_Int32 nHandle = PROPERTY_ID_TEXT;
589 Any aOldValue; aOldValue <<= m_sLastKnownEngineText;
590 Any aNewValue; aNewValue <<= sCurrentEngineText;
591 fire( &nHandle, &aNewValue, &aOldValue, 1, false );
593 m_sLastKnownEngineText = sCurrentEngineText;
598 } // namespace frm
601 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
602 com_sun_star_comp_forms_ORichTextModel_get_implementation(css::uno::XComponentContext* context,
603 css::uno::Sequence<css::uno::Any> const &)
605 return cppu::acquire(new frm::ORichTextModel(context));
608 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */