20#include <UndoActions.hxx>
22#include <core_resource.hxx>
26#include <com/sun/star/container/XChild.hpp>
40 using namespace beans;
43 using namespace container;
44 using namespace report;
49 uno::Reference< report::XGroup> xGroup = _xSection->getGroup();
50 if ( xGroup->getHeaderOn() && xGroup->getHeader() == _xSection )
52 return pMemFunSection;
57 uno::Reference< report::XReportDefinition> xReportDefinition(_xSection->getReportDefinition());
59 if ( xReportDefinition->getReportHeaderOn() && xReportDefinition->getReportHeader() == _xSection )
61 else if ( xReportDefinition->getPageHeaderOn() && xReportDefinition->getPageHeader() == _xSection )
63 else if ( xReportDefinition->getPageFooterOn() && xReportDefinition->getPageFooter() == _xSection )
65 else if ( xReportDefinition->getDetail() == _xSection )
67 return pMemFunSection;
92 ,uno::Reference< container::XIndexContainer > xContainer
115 if ( !xChild.is() || xChild->getParent().is() )
121#if OSL_DEBUG_LEVEL > 0
122 SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( xChild );
125 "OUndoContainerAction::~OUndoContainerAction: inconsistency in the shape/object ownership!" );
132 catch (
const uno::Exception& )
161 uno::Reference< uno::XInterface> xObj(
m_xContainer->getByIndex(
i),uno::UNO_QUERY);
170 catch(uno::Exception&){}
194 OSL_FAIL(
"Illegal case value");
222 OSL_FAIL(
"Illegal case value");
234 ::std::function<uno::Reference<report::XSection>(
OGroupHelper*)> _pMemberFunction,
238 , m_aGroupHelper(_xGroup)
239 , m_pMemberFunction(
std::move(_pMemberFunction))
251 xSection->add(uno::Reference< drawing::XShape>(
m_xElement,uno::UNO_QUERY));
253 catch(uno::Exception&){}
268 xSection->remove(uno::Reference< drawing::XShape>(
m_xElement,uno::UNO_QUERY));
270 catch(uno::Exception&){}
278 ::std::function<uno::Reference<report::XSection>(
OReportHelper*)> _pMemberFunction,
282 , m_aReportHelper(_xReport)
283 , m_pMemberFunction(
std::move(_pMemberFunction))
296 uno::Reference< drawing::XShape> xShape(
m_xElement,uno::UNO_QUERY_THROW);
297 awt::Point aPos = xShape->getPosition();
298 awt::Size aSize = xShape->getSize();
299 xSection->add(xShape);
300 xShape->setPosition( aPos );
301 xShape->setSize( aSize );
304 catch(uno::Exception&){}
318 xSection->remove(uno::Reference< drawing::XShape>(
m_xElement,uno::UNO_QUERY));
320 catch(uno::Exception&){}
327 ,m_xObj(evt.Source, UNO_QUERY)
328 ,m_aPropertyName(evt.PropertyName)
329 ,m_aNewValue(evt.NewValue)
330 ,m_aOldValue(evt.OldValue)
375 SdrModel& _rMod,
const PropertyChangeEvent& evt,
376 ::std::function<uno::Reference<report::XSection>(
OGroupHelper*)> _pMemberFunction,
377 const uno::Reference<report::XGroup>& _xGroup)
379 , m_aGroupHelper(_xGroup)
380 , m_pMemberFunction(
std::move(_pMemberFunction))
390 SdrModel& _rMod,
const PropertyChangeEvent& evt,
391 ::std::function<uno::Reference<report::XSection>(
OReportHelper*)> _pMemberFunction,
392 const uno::Reference<report::XReportDefinition>& _xReport)
394 , m_aReportHelper(_xReport)
395 , m_pMemberFunction(
std::move(_pMemberFunction))
SectionViewAction m_eAction
bool HasSdrObjectOwnership() const
SdrObject * GetSdrObject() const
Helper class to allow std::mem_fun for SAL_CALL.
css::uno::Reference< css::report::XSection > getHeader()
css::uno::Reference< css::report::XSection > getFooter()
static ::std::function< css::uno::Reference< css::report::XSection >(OGroupHelper *)> getMemberFunction(const css::uno::Reference< css::report::XSection > &_xSection)
Helper class to allow std::mem_fun for SAL_CALL.
css::uno::Reference< css::report::XSection > getPageFooter()
css::uno::Reference< css::report::XSection > getReportFooter()
css::uno::Reference< css::report::XSection > getDetail()
static ::std::function< css::uno::Reference< css::report::XSection >(OReportHelper *)> getMemberFunction(const css::uno::Reference< css::report::XSection > &_xSection)
css::uno::Reference< css::report::XSection > getReportHeader()
css::uno::Reference< css::report::XSection > getPageHeader()
ORptUndoPropertyAction(SdrModel &rMod, const css::beans::PropertyChangeEvent &evt)
virtual void Redo() override
css::uno::Reference< css::beans::XPropertySet > m_xObj
void setProperty(bool _bOld)
sets either the old value or the new value again at the property set.
css::uno::Any m_aOldValue
virtual css::uno::Reference< css::beans::XPropertySet > getObject()
css::uno::Any m_aNewValue
virtual OUString GetComment() const override
virtual void Undo() override
css::uno::Reference< css::container::XIndexContainer > m_xContainer
virtual void Undo() override
css::uno::Reference< css::uno::XInterface > m_xElement
virtual void implReInsert()
css::uno::Reference< css::uno::XInterface > m_xOwnElement
virtual void Redo() override
OUndoContainerAction(OUndoContainerAction const &)=delete
virtual void implReRemove()
virtual ~OUndoContainerAction() override
virtual void implReRemove() override
virtual void implReInsert() override
OUndoGroupSectionAction(SdrModel &rMod, Action _eAction,::std::function< css::uno::Reference< css::report::XSection >(OGroupHelper *)> _pMemberFunction, const css::uno::Reference< css::report::XGroup > &_xGroup, const css::uno::Reference< css::uno::XInterface > &xElem, TranslateId pCommentId)
OGroupHelper m_aGroupHelper
::std::function< css::uno::Reference< css::report::XSection >(OGroupHelper *)> m_pMemberFunction
::std::function< css::uno::Reference< css::report::XSection >(OGroupHelper *)> m_pMemberFunction
OGroupHelper m_aGroupHelper
virtual css::uno::Reference< css::beans::XPropertySet > getObject() override
OUndoPropertyGroupSectionAction(SdrModel &rMod, const css::beans::PropertyChangeEvent &evt,::std::function< css::uno::Reference< css::report::XSection >(OGroupHelper *)> _pMemberFunction, const css::uno::Reference< css::report::XGroup > &_xGroup)
OUndoPropertyReportSectionAction(SdrModel &rMod, const css::beans::PropertyChangeEvent &evt,::std::function< css::uno::Reference< css::report::XSection >(OReportHelper *)> _pMemberFunction, const css::uno::Reference< css::report::XReportDefinition > &_xReport)
OReportHelper m_aReportHelper
::std::function< css::uno::Reference< css::report::XSection >(OReportHelper *)> m_pMemberFunction
virtual css::uno::Reference< css::beans::XPropertySet > getObject() override
OReportHelper m_aReportHelper
virtual void implReRemove() override
virtual void implReInsert() override
::std::function< css::uno::Reference< css::report::XSection >(OReportHelper *)> m_pMemberFunction
OUndoReportSectionAction(SdrModel &rMod, Action _eAction,::std::function< css::uno::Reference< css::report::XSection >(OReportHelper *)> _pMemberFunction, const css::uno::Reference< css::report::XReportDefinition > &_xReport, const css::uno::Reference< css::uno::XInterface > &xElem, TranslateId pCommentId)
Create an object ob OUndoEnvLock locks the undo possibility As long as in the OUndoEnvLock scope,...
void RemoveElement(const css::uno::Reference< css::uno::XInterface > &Element)
OUString RptResId(TranslateId aId)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
EmbeddedObjectRef * pObject
void disposeComponent(css::uno::Reference< TYPE > &_rxComp)
Reference< XNameAccess > m_xContainer
Reference< xml::input::XElement > m_xElement