/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. *
*/
if (curOrderIndex != minIndex) // is current panel already in place ?
{
minIndex -= 1;
std::shared_ptr<PanelDescriptor> xPanelDescriptor = pSidebarController->GetResourceManager()->GetPanelDescriptor(mPanelId); if (xPanelDescriptor)
{
xPanelDescriptor->mnOrderIndex = minIndex; // update the sidebar
pSidebarController->NotifyResize();
}
}
}
if (curOrderIndex != maxIndex) // is current panel already in place ?
{
maxIndex += 1;
std::shared_ptr<PanelDescriptor> xPanelDescriptor = pSidebarController->GetResourceManager()->GetPanelDescriptor(mPanelId); if (xPanelDescriptor)
{
xPanelDescriptor->mnOrderIndex = maxIndex; // update the sidebar
pSidebarController->NotifyResize();
}
}
}
for (autoconst& panel : aPanels)
{
sal_Int32 index = pSidebarController->GetResourceManager()->GetPanelDescriptor(panel.msId)->mnOrderIndex; if( index < curOrderIndex && index > previousIndex)
previousIndex = index;
}
if (curOrderIndex != previousIndex) // is current panel already in place ?
{
previousIndex -= 1;
std::shared_ptr<PanelDescriptor> xPanelDescriptor = pSidebarController->GetResourceManager()->GetPanelDescriptor(mPanelId); if (xPanelDescriptor)
{
xPanelDescriptor->mnOrderIndex = previousIndex; // update the sidebar
pSidebarController->NotifyResize();
}
}
}
// Search for next panel OrderIndex
sal_Int32 curOrderIndex = getOrderIndex();
sal_Int32 nextIndex = GetMaxOrderIndex(aPanels);
for (autoconst& panel : aPanels)
{
sal_Int32 index = pSidebarController->GetResourceManager()->GetPanelDescriptor(panel.msId)->mnOrderIndex; if( index > curOrderIndex && index < nextIndex)
nextIndex = index;
}
if (curOrderIndex != nextIndex) // is current panel already in place ?
{
nextIndex += 1;
std::shared_ptr<PanelDescriptor> xPanelDescriptor = pSidebarController->GetResourceManager()->GetPanelDescriptor(mPanelId); if (xPanelDescriptor)
{
xPanelDescriptor->mnOrderIndex = nextIndex; // update the sidebar
pSidebarController->NotifyResize();
}
}
}
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.