void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEvent& aEvent)
{ // We don't want to do this stuff when being used through LibreOfficeKit if( comphelper::LibreOfficeKit::isActive() ) return;
// frame already gone ? We hold it weak only ... if (!xFrame.is()) return;
// no window -> no position and size available
css::uno::Reference< css::awt::XWindow > xWindow = xFrame->getContainerWindow(); if (!xWindow.is()) return;
// unknown module -> no configuration available!
OUString sModuleName = PersistentWindowState::implst_identifyModule(xContext, xFrame); if (sModuleName.isEmpty()) return;
case css::frame::FrameAction_COMPONENT_REATTACHED :
{ // nothing todo here, because it's not allowed to change position and size // of an already existing frame!
} break;
// SOLAR SAFE -> ------------------------
SolarMutexGuard aSolarGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindow); if (!pWindow) return;
// check for system and work window - it's necessary to guarantee correct pointer cast! bool bSystemWindow = pWindow->IsSystemWindow(); bool bWorkWindow = (pWindow->GetType() == WindowType::WORKWINDOW);
// don't save this special state! if (pWorkWindow->IsMinimized()) return;
OUString sOldWindowState = pSystemWindow->GetWindowState(); if ( sOldWindowState != sWindowState )
pSystemWindow->SetWindowState(sWindowState); // <- SOLAR SAFE ------------------------
}
//static void PersistentWindowState::SaveWindowStateToConfig(const css::uno::Reference<css::uno::XComponentContext>& rContext, const css::uno::Reference<css::frame::XFrame>& rFrame)
{ // We don't want to do this stuff when being used through LibreOfficeKit if (comphelper::LibreOfficeKit::isActive()) return;
if (!rFrame.is()) return;
css::uno::Reference<css::awt::XWindow> xWindow = rFrame->getContainerWindow(); if (!xWindow.is()) return;
// unknown module -> no configuration available!
OUString sModuleName = PersistentWindowState::implst_identifyModule(rContext, rFrame); if (sModuleName.isEmpty()) return;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.