Kaydet (Commit) b5af679c authored tarafından Jim Raykowski's avatar Jim Raykowski Kaydeden (comit) Heiko Tietze

tdf#101915 move focus to sidebar styles panel

Change-Id: I3a150761a401caf1e76b5ec0ee36e537c14df8e0
Reviewed-on: https://gerrit.libreoffice.org/52612Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
üst 48b49937
......@@ -62,6 +62,7 @@ public:
pressing the F6 key.
*/
void GrabFocus();
void GrabFocusPanel();
void SetDeckTitle(DeckTitleBar* pDeckTitleBar);
void SetPanels(const SharedPanelContainer& rPanels);
......
......@@ -39,7 +39,7 @@ public:
*/
static void ShowPanel (
const OUString& rsPanelId,
const css::uno::Reference<css::frame::XFrame>& rxFrame);
const css::uno::Reference<css::frame::XFrame>& rxFrame, bool bFocus = false);
/** Switch to the deck that contains the specified panel and toggle
the visibility of the panel (expanded and scrolled into the
......
This diff is collapsed.
......@@ -183,12 +183,12 @@ protected:
std::unique_ptr<SfxStyleFamilies> pStyleFamilies;
std::array<std::unique_ptr<SfxTemplateItem>, MAX_FAMILIES> pFamilyState;
SfxStyleSheetBasePool* pStyleSheetPool;
VclPtr<StyleTreeListBox_Impl> pTreeBox;
SfxObjectShell* pCurObjShell;
css::uno::Reference<css::frame::XModuleManager2> xModuleManager;
DeletionWatcher* m_pDeletionWatcher;
VclPtr<SfxActionListBox> aFmtLb;
VclPtr<StyleTreeListBox_Impl> pTreeBox;
VclPtr<CheckBox> aPreviewCheckbox;
VclPtr<ListBox> aFilterLb;
......
......@@ -56,6 +56,11 @@ void FocusManager::GrabFocus()
FocusDeckTitle();
}
void FocusManager::GrabFocusPanel()
{
FocusPanel(0, false);
}
void FocusManager::Clear()
{
SetDeckTitle(nullptr);
......
......@@ -27,7 +27,7 @@ namespace sfx2 { namespace sidebar {
void Sidebar::ShowPanel (
const OUString& rsPanelId,
const css::uno::Reference<frame::XFrame>& rxFrame)
const css::uno::Reference<frame::XFrame>& rxFrame, bool bFocus)
{
SidebarController* pController = SidebarController::GetSidebarControllerForFrame(rxFrame);
if (!pController)
......@@ -45,6 +45,9 @@ void Sidebar::ShowPanel (
// All that is not necessary for the current use cases so lets
// keep it simple for the time being.
pController->OpenThenSwitchToDeck(xPanelDescriptor->msDeckId);
if (bFocus)
pController->GetFocusManager().GrabFocusPanel();
}
void Sidebar::TogglePanel (
......
......@@ -2932,8 +2932,8 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
// First make sure that the sidebar is visible
ShowChildWindow(SID_SIDEBAR);
::sfx2::sidebar::Sidebar::TogglePanel("StyleListPanel",
GetFrame().GetFrameInterface());
::sfx2::sidebar::Sidebar::ShowPanel("StyleListPanel",
GetFrame().GetFrameInterface(), true);
rReq.Done();
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment