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