21#include <rtl/ustring.hxx>
22#include <com/sun/star/document/XEventBroadcaster.hpp>
23#include <com/sun/star/text/XTextFieldsSupplier.hpp>
24#include <com/sun/star/util/XRefreshable.hpp>
25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/text/ReferenceFieldPart.hpp>
27#include <com/sun/star/text/ReferenceFieldSource.hpp>
28#include <com/sun/star/frame/XModel.hpp>
29#include <com/sun/star/view/XFormLayerAccess.hpp>
38 : m_bIndexes(bIndexes),
39 m_bControls(bControls)
51 if ( rEvent.EventName ==
"OnFocus" &&
m_bIndexes)
63 while(xEnumeration->hasMoreElements())
68 sal_Int16 nSource = 0;
72 if (nSource == text::ReferenceFieldSource::BOOKMARK && nPart == text::ReferenceFieldPart::PAGE)
75 catch(
const beans::UnknownPropertyException& )
83 xRefreshable->refresh();
86 catch(
const uno::Exception& )
98 xFormLayerAccess->setFormDesignMode(
false);
110 catch(
const uno::Exception& )
ModelEventListener(bool bIndexes, bool bControls)
virtual void SAL_CALL notifyEvent(const css::document::EventObject &Event) override
virtual ~ModelEventListener() override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
#define DBG_UNHANDLED_EXCEPTION(...)
OUString getPropertyName(PropertyIds eId)
@ PROP_REFERENCE_FIELD_SOURCE
@ PROP_REFERENCE_FIELD_PART
Reference< XModel > xModel