usingnamespace ::com::sun::star::uno; usingnamespace ::com::sun::star::drawing::framework; using ::sd::framework::FrameworkHelper; using ::com::sun::star::lang::DisposedException;
namespace sd
{
PaneHider::PaneHider(const ViewShell& rViewShell, SlideshowImpl* pSlideShow)
{ // Hide the left and right pane windows when a slideshow exists and is // not full screen. if (pSlideShow == nullptr || pSlideShow->isFullScreen()) return;
try
{
DrawController* pDrawController = rViewShell.GetViewShellBase().GetDrawController(); if (!pDrawController) return;
mxConfigurationController = pDrawController->getConfigurationController(); if (mxConfigurationController.is())
{ // Get and save the current configuration.
mxConfiguration = mxConfigurationController->getRequestedConfiguration(); if (mxConfiguration.is())
{ // Iterate over the resources and deactivate the panes. const Sequence<Reference<XResourceId>> aResources(mxConfiguration->getResources(
nullptr, framework::FrameworkHelper::msPaneURLPrefix,
AnchorBindingMode_DIRECT)); for (const Reference<XResourceId>& xPaneId : aResources)
{ if (xPaneId->getResourceURL() != FrameworkHelper::msCenterPaneURL)
{
mxConfigurationController->requestResourceDeactivation(xPaneId);
}
}
}
}
FrameworkHelper::Instance(rViewShell.GetViewShellBase())->WaitForUpdate();
} catch (RuntimeException&)
{
DBG_UNHANDLED_EXCEPTION("sd");
}
}
PaneHider::~PaneHider()
{ if (mxConfiguration.is() && mxConfigurationController.is())
{ try
{
mxConfigurationController->restoreConfiguration(mxConfiguration);
} catch (DisposedException&)
{ // When the configuration controller is already disposed then // there is no point in restoring the configuration.
}
}
}
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.