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() )
126 catch (
const uno::Exception& )
155 uno::Reference< uno::XInterface> xObj(
m_xContainer->getByIndex(
i),uno::UNO_QUERY);
164 catch(uno::Exception&){}
188 OSL_FAIL(
"Illegal case value");
216 OSL_FAIL(
"Illegal case value");
228 ::std::function<uno::Reference<report::XSection>(
OGroupHelper*)> _pMemberFunction,
232 , m_aGroupHelper(_xGroup)
233 , m_pMemberFunction(
std::move(_pMemberFunction))
245 xSection->add(uno::Reference< drawing::XShape>(
m_xElement,uno::UNO_QUERY));
247 catch(uno::Exception&){}
262 xSection->remove(uno::Reference< drawing::XShape>(
m_xElement,uno::UNO_QUERY));
264 catch(uno::Exception&){}
272 ::std::function<uno::Reference<report::XSection>(
OReportHelper*)> _pMemberFunction,
276 , m_aReportHelper(_xReport)
277 , m_pMemberFunction(
std::move(_pMemberFunction))
290 uno::Reference< drawing::XShape> xShape(
m_xElement,uno::UNO_QUERY_THROW);
291 awt::Point aPos = xShape->getPosition();
292 awt::Size aSize = xShape->getSize();
293 xSection->add(xShape);
294 xShape->setPosition( aPos );
295 xShape->setSize( aSize );
298 catch(uno::Exception&){}
312 xSection->remove(uno::Reference< drawing::XShape>(
m_xElement,uno::UNO_QUERY));
314 catch(uno::Exception&){}
321 ,m_xObj(evt.Source, UNO_QUERY)
322 ,m_aPropertyName(evt.PropertyName)
323 ,m_aNewValue(evt.NewValue)
324 ,m_aOldValue(evt.OldValue)
369 SdrModel& _rMod,
const PropertyChangeEvent& evt,
370 ::std::function<uno::Reference<report::XSection>(
OGroupHelper*)> _pMemberFunction,
371 const uno::Reference<report::XGroup>& _xGroup)
373 , m_aGroupHelper(_xGroup)
374 , m_pMemberFunction(
std::move(_pMemberFunction))
384 SdrModel& _rMod,
const PropertyChangeEvent& evt,
385 ::std::function<uno::Reference<report::XSection>(
OReportHelper*)> _pMemberFunction,
386 const uno::Reference<report::XReportDefinition>& _xReport)
388 , m_aReportHelper(_xReport)
389 , m_pMemberFunction(
std::move(_pMemberFunction))
SectionViewAction m_eAction
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(...)
void disposeComponent(css::uno::Reference< TYPE > &_rxComp)
Reference< XNameAccess > m_xContainer
Reference< xml::input::XElement > m_xElement