LibreOffice Module reportdesign (master) 1
UndoEnv.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#include <UndoActions.hxx>
20#include <UndoEnv.hxx>
21#include "formatnormalizer.hxx"
22#include <conditionupdater.hxx>
23#include <RptPage.hxx>
24#include <strings.hrc>
25#include <RptModel.hxx>
26
27#include <com/sun/star/container/XChild.hpp>
28#include <com/sun/star/beans/theIntrospection.hpp>
29#include <com/sun/star/beans/PropertyAttribute.hpp>
30#include <com/sun/star/util/XModifyBroadcaster.hpp>
31#include <com/sun/star/beans/XIntrospectionAccess.hpp>
32#include <com/sun/star/beans/XIntrospection.hpp>
33
34#include <svl/hint.hxx>
35#include <tools/debug.hxx>
37#include <vcl/svapp.hxx>
39#include <osl/mutex.hxx>
40
41#include <unordered_map>
42
43namespace rptui
44{
45 using namespace ::com::sun::star;
46 using namespace uno;
47 using namespace lang;
48 using namespace script;
49 using namespace beans;
50 using namespace awt;
51 using namespace util;
52 using namespace container;
53 using namespace report;
54
55namespace {
56
57struct PropertyInfo
58{
60
61 explicit PropertyInfo( const bool i_bIsTransientOrReadOnly )
62 :bIsReadonlyOrTransient( i_bIsTransientOrReadOnly )
63 {
64 }
65};
66
67}
68
69typedef std::unordered_map< OUString, PropertyInfo > PropertiesInfo;
70
71namespace {
72
73struct ObjectInfo
74{
76 Reference< XPropertySet > xPropertyIntrospection;
77
78 ObjectInfo()
79 {
80 }
81};
82
83}
84
85typedef ::std::map< Reference< XPropertySet >, ObjectInfo > PropertySetInfoCache;
86
87
89{
90public:
95 ::osl::Mutex m_aMutex;
96 ::std::vector< uno::Reference< container::XChild> > m_aSections;
98 oslInterlockedCount m_nLocks;
101
102 explicit OXUndoEnvironmentImpl(OReportModel& _rModel);
105};
106
108 ,m_aFormatNormalizer( _rModel )
109 ,m_nLocks(0)
110 ,m_bReadOnly(false)
111 ,m_bIsUndo(false)
112{
113}
114
115
117 :m_pImpl(new OXUndoEnvironmentImpl(_rModel) )
118{
119 StartListening(m_pImpl->m_rModel);
120}
121
122
124{
125}
126
128{
129 OSL_ENSURE(m_refCount,"Illegal call to dead object!");
130 osl_atomic_increment( &m_pImpl->m_nLocks );
131}
133{
134 OSL_ENSURE(m_refCount,"Illegal call to dead object!");
135
136 osl_atomic_decrement( &m_pImpl->m_nLocks );
137}
138bool OXUndoEnvironment::IsLocked() const { return m_pImpl->m_nLocks != 0; }
139
141{
142 if ( _pPage )
143 {
144 Reference< XInterface > xSection(_pPage->getSection());
145 if ( xSection.is() )
146 RemoveElement( xSection );
147 }
148}
149
151{
152 OUndoEnvLock aLock(*this);
153
154 m_pImpl->m_aPropertySetCache.clear();
155
156 sal_uInt16 nCount = m_pImpl->m_rModel.GetPageCount();
157 sal_uInt16 i;
158 for (i = 0; i < nCount; i++)
159 {
160 OReportPage* pPage = dynamic_cast<OReportPage*>( m_pImpl->m_rModel.GetPage(i) );
161 RemoveSection(pPage);
162 }
163
164 nCount = m_pImpl->m_rModel.GetMasterPageCount();
165 for (i = 0; i < nCount; i++)
166 {
167 OReportPage* pPage = dynamic_cast<OReportPage*>( m_pImpl->m_rModel.GetMasterPage(i) );
168 RemoveSection(pPage);
169 }
170
171 m_pImpl->m_aSections.clear();
172
173 if (IsListening(m_pImpl->m_rModel))
174 EndListening(m_pImpl->m_rModel);
175}
176
177
179{
180 m_pImpl->m_bReadOnly = !m_pImpl->m_bReadOnly;
181
182 if (!m_pImpl->m_bReadOnly)
183 StartListening(m_pImpl->m_rModel);
184 else
185 EndListening(m_pImpl->m_rModel);
186}
187
188
190{
191 if (rHint.GetId() == SfxHintId::ModeChanged )
192 ModeChanged();
193}
194
195// XEventListener
196
197void SAL_CALL OXUndoEnvironment::disposing(const EventObject& e)
198{
199 // check if it's an object we have cached information about
200 Reference< XPropertySet > xSourceSet(e.Source, UNO_QUERY);
201 if ( xSourceSet.is() )
202 {
203 uno::Reference< report::XSection> xSection(xSourceSet,uno::UNO_QUERY);
204 if ( xSection.is() )
205 RemoveSection(xSection);
206 else
207 RemoveElement(xSourceSet);
208 }
209}
210
211// XPropertyChangeListener
212
213void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEvent )
214{
215
216 ::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex );
217
218 if ( IsLocked() )
219 return;
220
221 Reference< XPropertySet > xSet( _rEvent.Source, UNO_QUERY );
222 if (!xSet.is())
223 return;
224
225 dbaui::DBSubComponentController* pController = m_pImpl->m_rModel.getController();
226 if ( !pController )
227 return;
228
229 // no Undo for transient and readonly props.
230 // let's see if we know something about the set
231 PropertySetInfoCache::iterator objectPos = m_pImpl->m_aPropertySetCache.find(xSet);
232 if (objectPos == m_pImpl->m_aPropertySetCache.end())
233 {
234 objectPos = m_pImpl->m_aPropertySetCache.emplace( xSet, ObjectInfo() ).first;
235 DBG_ASSERT(objectPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it... why it's not there?");
236 }
237 if ( objectPos == m_pImpl->m_aPropertySetCache.end() )
238 return;
239
240 // now we have access to the cached info about the set
241 // let's see what we know about the property
242 ObjectInfo& rObjectInfo = objectPos->second;
243 PropertiesInfo::const_iterator aPropertyPos = rObjectInfo.aProperties.find( _rEvent.PropertyName );
244 if ( aPropertyPos == rObjectInfo.aProperties.end() )
245 { // nothing 'til now... have to change this...
246 // the attributes
247 Reference< XPropertySetInfo > xPSI( xSet->getPropertySetInfo(), UNO_SET_THROW );
248 sal_Int32 nPropertyAttributes = 0;
249 try
250 {
251 if ( xPSI->hasPropertyByName( _rEvent.PropertyName ) )
252 {
253 nPropertyAttributes = xPSI->getPropertyByName( _rEvent.PropertyName ).Attributes;
254 }
255 else
256 {
257 // it's perfectly valid for a component to notify a change in a property which it doesn't have - as long
258 // as it has an attribute with this name
259 if ( !rObjectInfo.xPropertyIntrospection.is() )
260 {
261 if ( !m_pImpl->m_xIntrospection.is() )
262 {
263 m_pImpl->m_xIntrospection = theIntrospection::get( m_pImpl->m_rModel.getController()->getORB() );
264 }
266 m_pImpl->m_xIntrospection->inspect( Any( _rEvent.Source ) ),
267 UNO_SET_THROW
268 );
269 rObjectInfo.xPropertyIntrospection.set( xIntrospection->queryAdapter( cppu::UnoType<XPropertySet>::get() ), UNO_QUERY_THROW );
270 }
271 if ( rObjectInfo.xPropertyIntrospection.is() )
272 {
273 xPSI.set( rObjectInfo.xPropertyIntrospection->getPropertySetInfo(), UNO_SET_THROW );
274 nPropertyAttributes = xPSI->getPropertyByName( _rEvent.PropertyName ).Attributes;
275 }
276 }
277 }
278 catch( const Exception& )
279 {
280 DBG_UNHANDLED_EXCEPTION("reportdesign");
281 }
282 const bool bTransReadOnly =
283 ( ( nPropertyAttributes & PropertyAttribute::READONLY ) != 0 )
284 || ( ( nPropertyAttributes & PropertyAttribute::TRANSIENT ) != 0 );
285
286 // insert the new entry
287 aPropertyPos = rObjectInfo.aProperties.emplace(
288 _rEvent.PropertyName,
289 PropertyInfo( bTransReadOnly )
290 ).first;
291 DBG_ASSERT(aPropertyPos != rObjectInfo.aProperties.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
292 }
293
295
296 // now we have access to the cached info about the property affected
297 // and are able to decide whether or not we need an undo action
298
299 // no UNDO for transient/readonly properties
300 if ( aPropertyPos->second.bIsReadonlyOrTransient )
301 return;
302
303 // give components with sub responsibilities a chance
304 m_pImpl->m_aFormatNormalizer.notifyPropertyChange( _rEvent );
305 m_pImpl->m_aConditionUpdater.notifyPropertyChange( _rEvent );
306
307 aGuard.clear();
308 // TODO: this is a potential race condition: two threads here could in theory
309 // add their undo actions out-of-order
310
311 SolarMutexGuard aSolarGuard;
312 std::unique_ptr<ORptUndoPropertyAction> pUndo;
313 try
314 {
315 uno::Reference< report::XSection> xSection( xSet, uno::UNO_QUERY );
316 if ( xSection.is() )
317 {
318 uno::Reference< report::XGroup> xGroup = xSection->getGroup();
319 if ( xGroup.is() )
320 pUndo.reset(new OUndoPropertyGroupSectionAction( m_pImpl->m_rModel, _rEvent, OGroupHelper::getMemberFunction( xSection ), xGroup ));
321 else
322 pUndo.reset(new OUndoPropertyReportSectionAction( m_pImpl->m_rModel, _rEvent, OReportHelper::getMemberFunction( xSection ), xSection->getReportDefinition() ));
323 }
324 }
325 catch(const Exception&)
326 {
327 DBG_UNHANDLED_EXCEPTION("reportdesign");
328 }
329
330 if ( pUndo == nullptr )
331 pUndo.reset(new ORptUndoPropertyAction( m_pImpl->m_rModel, _rEvent ));
332
333 m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( std::move(pUndo) );
334 pController->InvalidateAll();
335}
336
337::std::vector< uno::Reference< container::XChild> >::const_iterator OXUndoEnvironment::getSection(const Reference<container::XChild>& _xContainer) const
338{
339 ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = m_pImpl->m_aSections.end();
340 if ( _xContainer.is() )
341 {
342 aFind = ::std::find(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),_xContainer);
343
344 if ( aFind == m_pImpl->m_aSections.end() )
345 {
346 Reference<container::XChild> xParent(_xContainer->getParent(),uno::UNO_QUERY);
347 aFind = getSection(xParent);
348 }
349 }
350 return aFind;
351}
352// XContainerListener
353
354void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt)
355{
356 SolarMutexGuard aSolarGuard;
357 ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
358
359 // new listener object
360 Reference< uno::XInterface > xIface( evt.Element, UNO_QUERY );
361 if ( !IsLocked() )
362 {
363 Reference< report::XReportComponent > xReportComponent( xIface, UNO_QUERY );
364 if ( xReportComponent.is() )
365 {
366 Reference< report::XSection > xContainer(evt.Source,uno::UNO_QUERY);
367
368 ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = getSection(xContainer);
369
370 if ( aFind != m_pImpl->m_aSections.end() )
371 {
372 OUndoEnvLock aLock(*this);
373 try
374 {
375 OReportPage* pPage = m_pImpl->m_rModel.getPage(uno::Reference< report::XSection>(*aFind,uno::UNO_QUERY));
376 OSL_ENSURE(pPage,"No page could be found for section!");
377 if ( pPage )
378 pPage->insertObject(xReportComponent);
379 }
380 catch(uno::Exception&)
381 {
382 DBG_UNHANDLED_EXCEPTION("reportdesign");
383 }
384
385 }
386 }
387 else
388 {
389 uno::Reference< report::XFunctions> xContainer(evt.Source,uno::UNO_QUERY);
390 if ( xContainer.is() )
391 {
392 m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction(
393 std::make_unique<OUndoContainerAction>( m_pImpl->m_rModel, rptui::Inserted, xContainer.get(),
394 xIface, RID_STR_UNDO_ADDFUNCTION ) );
395 }
396 }
397 }
398
399 AddElement(xIface);
400
402}
403
404
406{
407 m_pImpl->m_rModel.SetModified( true );
408}
409
410
411void SAL_CALL OXUndoEnvironment::elementReplaced(const ContainerEvent& evt)
412{
413 SolarMutexGuard aSolarGuard;
414 ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
415
416 Reference< XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY);
417 OSL_ENSURE(xIface.is(), "OXUndoEnvironment::elementReplaced: invalid container notification!");
418 RemoveElement(xIface);
419
420 xIface.set(evt.Element,uno::UNO_QUERY);
421 AddElement(xIface);
422
424}
425
426
427void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt)
428{
429 SolarMutexGuard aSolarGuard;
430 ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
431
432 Reference< uno::XInterface > xIface( evt.Element, UNO_QUERY );
433 if ( !IsLocked() )
434 {
435 Reference< report::XSection > xContainer(evt.Source,uno::UNO_QUERY);
436 ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = getSection(xContainer);
437
438 Reference< report::XReportComponent > xReportComponent( xIface, UNO_QUERY );
439 if ( aFind != m_pImpl->m_aSections.end() && xReportComponent.is() )
440 {
442 try
443 {
444 OReportPage* pPage = m_pImpl->m_rModel.getPage(uno::Reference< report::XSection >( *aFind, uno::UNO_QUERY_THROW ) );
445 OSL_ENSURE( pPage, "OXUndoEnvironment::elementRemoved: no page for the section!" );
446 if ( pPage )
447 pPage->removeSdrObject(xReportComponent);
448 }
449 catch(const uno::Exception&)
450 {
451 DBG_UNHANDLED_EXCEPTION("reportdesign");
452 }
453 }
454 else
455 {
456 uno::Reference< report::XFunctions> xFunctions(evt.Source,uno::UNO_QUERY);
457 if ( xFunctions.is() )
458 {
459 m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( std::make_unique<OUndoContainerAction>(
460 m_pImpl->m_rModel, rptui::Removed, xFunctions.get(), xIface, RID_STR_UNDO_ADDFUNCTION ) );
461 }
462 }
463 }
464
465 if ( xIface.is() )
466 RemoveElement(xIface);
467
469}
470
471
472void SAL_CALL OXUndoEnvironment::modified( const EventObject& /*aEvent*/ )
473{
475}
476
477
479{
480 OUndoEnvLock aLock(*this);
481 try
482 {
483 uno::Reference<container::XChild> xChild = _xSection;
484 m_pImpl->m_aSections.push_back(xChild);
485 Reference< XInterface > xInt(_xSection);
486 AddElement(xInt);
487 }
488 catch(const uno::Exception&)
489 {
490 DBG_UNHANDLED_EXCEPTION("reportdesign");
491 }
492}
493
494
496{
497 OUndoEnvLock aLock(*this);
498 try
499 {
500 uno::Reference<container::XChild> xChild(_xSection);
501 m_pImpl->m_aSections.erase(::std::remove(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),
502 xChild), m_pImpl->m_aSections.end());
503 Reference< XInterface > xInt(_xSection);
504 RemoveElement(xInt);
505 }
506 catch(uno::Exception&){}
507}
508
509
510void OXUndoEnvironment::switchListening( const Reference< XIndexAccess >& _rxContainer, bool _bStartListening )
511{
512 OSL_PRECOND( _rxContainer.is(), "OXUndoEnvironment::switchListening: invalid container!" );
513 if ( !_rxContainer.is() )
514 return;
515
516 try
517 {
518 // also handle all children of this element
519 Reference< XInterface > xInterface;
520 sal_Int32 nCount = _rxContainer->getCount();
521 for(sal_Int32 i = 0;i != nCount;++i)
522 {
523 xInterface.set(_rxContainer->getByIndex( i ),uno::UNO_QUERY);
524 if ( _bStartListening )
525 AddElement( xInterface );
526 else
527 RemoveElement( xInterface );
528 }
529
530 // be notified of any changes in the container elements
531 Reference< XContainer > xSimpleContainer( _rxContainer, UNO_QUERY );
532 if ( xSimpleContainer.is() )
533 {
534 if ( _bStartListening )
535 xSimpleContainer->addContainerListener( this );
536 else
537 xSimpleContainer->removeContainerListener( this );
538 }
539 }
540 catch( const Exception& )
541 {
542 DBG_UNHANDLED_EXCEPTION("reportdesign");
543 }
544}
545
546
547void OXUndoEnvironment::switchListening( const Reference< XInterface >& _rxObject, bool _bStartListening )
548{
549 OSL_PRECOND( _rxObject.is(), "OXUndoEnvironment::switchListening: how should I listen at a NULL object?" );
550
551 try
552 {
553 if ( !m_pImpl->m_bReadOnly )
554 {
555 Reference< XPropertySet > xProps( _rxObject, UNO_QUERY );
556 if ( xProps.is() )
557 {
558 if ( _bStartListening )
559 xProps->addPropertyChangeListener( OUString(), this );
560 else
561 xProps->removePropertyChangeListener( OUString(), this );
562 }
563 }
564
565 Reference< XModifyBroadcaster > xBroadcaster( _rxObject, UNO_QUERY );
566 if ( xBroadcaster.is() )
567 {
568 if ( _bStartListening )
569 xBroadcaster->addModifyListener( this );
570 else
571 xBroadcaster->removeModifyListener( this );
572 }
573 }
574 catch( const Exception& )
575 {
576 }
577}
578
579
581{
582 if ( !IsLocked() )
583 m_pImpl->m_aFormatNormalizer.notifyElementInserted( _rxElement );
584
585 // if it's a container, start listening at all elements
586 Reference< XIndexAccess > xContainer( _rxElement, UNO_QUERY );
587 if ( xContainer.is() )
588 switchListening( xContainer, true );
589
590 switchListening( _rxElement, true );
591}
592
593
595{
596 uno::Reference<beans::XPropertySet> xProp(_rxElement,uno::UNO_QUERY);
597 if (!m_pImpl->m_aPropertySetCache.empty())
598 m_pImpl->m_aPropertySetCache.erase(xProp);
599 switchListening( _rxElement, false );
600
601 Reference< XIndexAccess > xContainer( _rxElement, UNO_QUERY );
602 if ( xContainer.is() )
603 switchListening( xContainer, false );
604}
605
607{
608 m_pImpl->m_bIsUndo = _bUndo;
609}
610
612{
613 return m_pImpl->m_bIsUndo;
614}
615
616} // rptui
617
618
619/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OBoundControlModel & m_rModel
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
PropertiesInfo aProperties
Definition: UndoEnv.cxx:75
Reference< XPropertySet > xPropertyIntrospection
Definition: UndoEnv.cxx:76
bool bIsReadonlyOrTransient
Definition: UndoEnv.cxx:59
sal_Int16 script
SfxHintId GetId() const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
bool IsListening(SfxBroadcaster &rBroadcaster) const
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
static ::std::function< css::uno::Reference< css::report::XSection >(OGroupHelper *)> getMemberFunction(const css::uno::Reference< css::report::XSection > &_xSection)
Definition: UndoActions.cxx:46
static ::std::function< css::uno::Reference< css::report::XSection >(OReportHelper *)> getMemberFunction(const css::uno::Reference< css::report::XSection > &_xSection)
Definition: UndoActions.cxx:55
void removeSdrObject(const css::uno::Reference< css::report::XReportComponent > &_xObject)
removes the SdrObject which belongs to the report component.
Definition: RptPage.cxx:72
const css::uno::Reference< css::report::XSection > & getSection() const
Definition: RptPage.hxx:82
void insertObject(const css::uno::Reference< css::report::XReportComponent > &_xObject)
insert a new SdrObject which belongs to the report component.
Definition: RptPage.cxx:107
OXUndoEnvironmentImpl(const OXUndoEnvironmentImpl &)=delete
FormatNormalizer m_aFormatNormalizer
Definition: UndoEnv.cxx:93
oslInterlockedCount m_nLocks
Definition: UndoEnv.cxx:98
OXUndoEnvironmentImpl & operator=(const OXUndoEnvironmentImpl &)=delete
OReportModel & m_rModel
Definition: UndoEnv.cxx:91
OXUndoEnvironmentImpl(OReportModel &_rModel)
Definition: UndoEnv.cxx:107
PropertySetInfoCache m_aPropertySetCache
Definition: UndoEnv.cxx:92
Reference< XIntrospection > m_xIntrospection
Definition: UndoEnv.cxx:97
::std::vector< uno::Reference< container::XChild > > m_aSections
Definition: UndoEnv.cxx:96
ConditionUpdater m_aConditionUpdater
Definition: UndoEnv.cxx:94
Create an object ob OUndoEnvLock locks the undo possibility As long as in the OUndoEnvLock scope,...
Definition: UndoEnv.hxx:64
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
Definition: UndoEnv.cxx:197
void switchListening(const css::uno::Reference< css::container::XIndexAccess > &_rxContainer, bool _bStartListening)
void SetUndoMode(bool _bUndo)
Definition: UndoEnv.cxx:606
bool IsLocked() const
Definition: UndoEnv.cxx:138
bool IsUndoMode() const
Definition: UndoEnv.cxx:611
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
Definition: UndoEnv.cxx:213
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: UndoEnv.cxx:189
void RemoveSection(const css::uno::Reference< css::report::XSection > &_xSection)
OXUndoEnvironment(const OXUndoEnvironment &)=delete
::std::vector< css::uno::Reference< css::container::XChild > >::const_iterator getSection(const css::uno::Reference< css::container::XChild > &_xContainer) const
Definition: UndoEnv.cxx:337
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &rEvent) override
Definition: UndoEnv.cxx:354
void Clear(const Accessor &_r)
Definition: UndoEnv.cxx:150
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
Definition: UndoEnv.cxx:472
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &rEvent) override
Definition: UndoEnv.cxx:427
void RemoveElement(const css::uno::Reference< css::uno::XInterface > &Element)
Definition: UndoEnv.cxx:594
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &rEvent) override
Definition: UndoEnv.cxx:411
const ::std::unique_ptr< OXUndoEnvironmentImpl > m_pImpl
Definition: UndoEnv.hxx:47
virtual ~OXUndoEnvironment() override
Definition: UndoEnv.cxx:123
void AddElement(const css::uno::Reference< css::uno::XInterface > &Element)
Definition: UndoEnv.cxx:580
void AddSection(const css::uno::Reference< css::report::XSection > &_xSection)
Definition: UndoEnv.cxx:478
int nCount
#define DBG_ASSERT(sCon, aError)
#define DBG_UNHANDLED_EXCEPTION(...)
ULONG m_refCount
Mutex aLock
bool m_bReadOnly
Reference< XIntrospection > xIntrospection
@ Exception
int i
constexpr OUStringLiteral first
@ Inserted
Definition: UndoActions.hxx:42
::std::map< Reference< XPropertySet >, ObjectInfo > PropertySetInfoCache
Definition: UndoEnv.cxx:85
std::unordered_map< OUString, PropertyInfo > PropertiesInfo
Definition: UndoEnv.cxx:69
PropertyInfo(OUString const &aName, sal_Int32 nHandle, css::uno::Type const &aType, sal_Int16 nAttributes)