LibreOffice Module framework (master) 1
|
#include <persistentwindowstate.hxx>
Public Member Functions | |
PersistentWindowState (css::uno::Reference< css::uno::XComponentContext > xContext) | |
virtual | ~PersistentWindowState () override |
virtual void SAL_CALL | initialize (const css::uno::Sequence< css::uno::Any > &lArguments) override |
virtual void SAL_CALL | frameAction (const css::frame::FrameActionEvent &aEvent) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &aEvent) override |
Static Private Member Functions | |
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. More... | |
static OUString | implst_getWindowStateFromConfig (const css::uno::Reference< css::uno::XComponentContext > &rxContext, std::u16string_view sModuleName) |
retrieve the window state from the configuration. More... | |
static OUString | implst_getWindowStateFromWindow (const css::uno::Reference< css::awt::XWindow > &xWindow) |
retrieve the window state from the container window. More... | |
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. More... | |
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. More... | |
Private Attributes | |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
may we need a uno service manager to create own services More... | |
css::uno::WeakReference< css::frame::XFrame > | m_xFrame |
reference to the frame which was created by the office himself More... | |
bool | m_bWindowStateAlreadySet |
we call SetWindowState one times only for the same frame! More... | |
Definition at line 52 of file persistentwindowstate.hxx.
framework::PersistentWindowState::PersistentWindowState | ( | css::uno::Reference< css::uno::XComponentContext > | xContext | ) |
Definition at line 38 of file persistentwindowstate.cxx.
|
overridevirtual |
Definition at line 44 of file persistentwindowstate.cxx.
|
overridevirtual |
Definition at line 136 of file persistentwindowstate.cxx.
|
overridevirtual |
Definition at line 74 of file persistentwindowstate.cxx.
References aEvent, implst_getWindowStateFromConfig(), implst_getWindowStateFromWindow(), implst_identifyModule(), implst_setWindowStateOnConfig(), implst_setWindowStateOnWindow(), comphelper::LibreOfficeKit::isActive(), m_bWindowStateAlreadySet, m_xContext, m_xFrame, and xFrame.
|
staticprivate |
retrieve the window state from the configuration.
rxContext | needed to create the configuration access. |
sModuleName | identifies the application module, where the information should be obtained for. |
Definition at line 165 of file persistentwindowstate.cxx.
References comphelper::ConfigurationHelper::readDirectKey(), and comphelper::ReadOnly.
Referenced by frameAction().
|
staticprivate |
retrieve the window state from the container window.
xWindow | must point to the container window of the frame. We use it VCL part here - because the toolkit doesn't provide the right functionality! |
Definition at line 205 of file persistentwindowstate.cxx.
References vcl::All, VclPtr< class reference_type >::get(), and VCLUnoHelper::GetWindow().
Referenced by frameAction().
|
staticprivate |
identify the application module, which is used behind the component of our frame.
rxContext | needed to create needed uno resources. |
xFrame | contains the component, which must be identified. |
Definition at line 145 of file persistentwindowstate.cxx.
References xFrame.
Referenced by frameAction().
|
staticprivate |
restore the position and size on the container window.
rxContext | needed to create the configuration access. |
sModuleName | identifies the application module, where the information should be set on. |
sWindowState | contains the information about position and size. |
Definition at line 186 of file persistentwindowstate.cxx.
References comphelper::Standard, and comphelper::ConfigurationHelper::writeDirectKey().
Referenced by frameAction().
|
staticprivate |
restore the position and size on the container window.
xWindow | must point to the container window of the frame. We use it VCL part here - because the toolkit doesn't provide the right functionality! |
sWindowState | contains the information about position and size. |
Definition at line 227 of file persistentwindowstate.cxx.
References VclPtr< class reference_type >::get(), VCLUnoHelper::GetWindow(), SystemWindow::GetWindowState(), WorkWindow::IsMinimized(), and SystemWindow::SetWindowState().
Referenced by frameAction().
|
overridevirtual |
Definition at line 48 of file persistentwindowstate.cxx.
|
private |
we call SetWindowState one times only for the same frame!
Definition at line 68 of file persistentwindowstate.hxx.
Referenced by frameAction().
|
private |
may we need a uno service manager to create own services
Definition at line 62 of file persistentwindowstate.hxx.
Referenced by frameAction().
|
private |
reference to the frame which was created by the office himself
Definition at line 65 of file persistentwindowstate.hxx.
Referenced by disposing(), frameAction(), and initialize().