26#include <com/sun/star/lang/XInitialization.hpp>
27#include <com/sun/star/frame/XFrame.hpp>
28#include <com/sun/star/frame/XFrameActionListener.hpp>
29#include <com/sun/star/uno/XComponentContext.hpp>
53 css::lang::XInitialization,
54 css::frame::XFrameActionListener >
62 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
65 css::uno::WeakReference< css::frame::XFrame >
m_xFrame;
79 virtual void SAL_CALL
initialize(
const css::uno::Sequence< css::uno::Any >& lArguments)
override;
82 virtual void SAL_CALL
frameAction(
const css::frame::FrameActionEvent& aEvent)
override;
85 virtual void SAL_CALL
disposing(
const css::lang::EventObject& aEvent)
override;
103 static OUString
implst_identifyModule(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
104 const css::uno::Reference< css::frame::XFrame >& xFrame);
119 std::u16string_view sModuleName);
146 std::u16string_view sModuleName ,
147 const OUString& sWindowState );
160 std::u16string_view sWindowState);
virtual void SAL_CALL disposing(const css::lang::EventObject &aEvent) override
PersistentWindowState(css::uno::Reference< css::uno::XComponentContext > xContext)
css::uno::Reference< css::uno::XComponentContext > m_xContext
may we need a uno service manager to create own services
static OUString implst_getWindowStateFromWindow(const css::uno::Reference< css::awt::XWindow > &xWindow)
retrieve the window state from the container window.
virtual ~PersistentWindowState() override
static OUString implst_getWindowStateFromConfig(const css::uno::Reference< css::uno::XComponentContext > &rxContext, std::u16string_view sModuleName)
retrieve the window state from the configuration.
bool m_bWindowStateAlreadySet
we call SetWindowState one times only for the same frame!
css::uno::WeakReference< css::frame::XFrame > m_xFrame
reference to the frame which was created by the office himself
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &lArguments) override
static OUString implst_identifyModule(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XFrame > &xFrame)
identify the application module, which is used behind the component of our frame.
static void implst_setWindowStateOnWindow(const css::uno::Reference< css::awt::XWindow > &xWindow, std::u16string_view sWindowState)
restore the position and size on the container window.
virtual void SAL_CALL frameAction(const css::frame::FrameActionEvent &aEvent) override
static void implst_setWindowStateOnConfig(const css::uno::Reference< css::uno::XComponentContext > &rxContext, std::u16string_view sModuleName, const OUString &sWindowState)
restore the position and size on the container window.