22#include <com/sun/star/awt/XWindow.hpp>
24#include <com/sun/star/frame/FrameAction.hpp>
43 css::uno::Reference< css::frame::XFrame >
xFrame;
45 if (lArguments.hasElements())
52 xFrame->addFrameActionListener(
this);
61 bool bModified =
m_xModel->isModified ();
70 m_xWindow->SetExtendedStyle(WindowExtendedStyle::DocModified);
72 m_xWindow->SetExtendedStyle(WindowExtendedStyle::NONE);
79 (
aEvent.Action != css::frame::FrameAction_COMPONENT_REATTACHED) &&
80 (
aEvent.Action != css::frame::FrameAction_COMPONENT_ATTACHED )
96 m_xFrame->removeFrameActionListener(
this);
103 m_xModel->removeModifyListener(
this);
114 css::uno::Reference< css::awt::XWindow > xWindow =
xFrame->getContainerWindow ();
115 css::uno::Reference< css::frame::XController >
xController =
xFrame->getController ();
116 css::uno::Reference< css::util::XModifiable >
xModel;
118 xModel = css::uno::Reference< css::util::XModifiable >(
xController->getModel(), css::uno::UNO_QUERY);
127 bool bSystemWindow = pWindow->IsSystemWindow();
128 bool bWorkWindow = (pWindow->GetType() == WindowType::WORKWINDOW);
129 if (!bSystemWindow && !bWorkWindow)
133 m_xModel->removeModifyListener (
this);
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
virtual ~TagWindowAsModified() override
virtual void SAL_CALL frameAction(const css::frame::FrameActionEvent &aEvent) override
virtual void SAL_CALL disposing(const css::lang::EventObject &aEvent) override
css::uno::Reference< css::util::XModifiable > m_xModel
we list on the model for modify events
void impl_update(const css::uno::Reference< css::frame::XFrame > &xFrame)
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &lArguments) override
css::uno::Reference< css::frame::XFrame > m_xFrame
reference to the frame, where we listen for new loaded documents for updating our own xModel referenc...
VclPtr< vcl::Window > m_xWindow
reference to the frame container window, where we must set the tag
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel