diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/sdi/frmslots.sdi | 10 | ||||
-rw-r--r-- | sfx2/sdi/sfx.sdi | 36 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarDockingWindow.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 19 |
5 files changed, 65 insertions, 6 deletions
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi index 09aafef95b7d..53a13b479a7c 100644 --- a/sfx2/sdi/frmslots.sdi +++ b/sfx2/sdi/frmslots.sdi @@ -43,6 +43,16 @@ interface Window ExecMethod = ChildWindowExecute ; StateMethod = ChildWindowState ; ] + SID_SHOW_SIDEBAR // status(final|play) + [ + ExecMethod = ChildWindowExecute ; + StateMethod = ChildWindowState ; + ] + SID_HIDE_SIDEBAR // status(final|play) + [ + ExecMethod = ChildWindowExecute ; + StateMethod = ChildWindowState ; + ] SID_BROWSER // ole(no) api() [ ExecMethod = ChildWindowExecute ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 624abe196661..f95610d07f5c 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -2594,6 +2594,42 @@ SfxBoolItem Sidebar SID_SIDEBAR GroupId = SfxGroupId::View; ] +SfxBoolItem SidebarShow SID_SHOW_SIDEBAR +[ + AutoUpdate = TRUE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::View; +] + +SfxBoolItem SidebarHide SID_HIDE_SIDEBAR +[ + AutoUpdate = TRUE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::View; +] + SfxBoolItem Menubar SID_MENUBAR [ AutoUpdate = TRUE, diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 335b634da6e3..8d5e7f154650 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -1223,7 +1223,7 @@ void SidebarController::RequestCloseDeck() // Mobile. std::stringstream aStream; boost::property_tree::ptree aTree; - aTree.put("id", mpParentWindow->get_id()); // TODO could be missing - sort out + aTree.put("id", mpCurrentDeck->GetLOKWindowId()); aTree.put("type", "dockingwindow"); aTree.put("text", mpParentWindow->GetText()); aTree.put("enabled", false); diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 0ee2117875a5..5f731f6400a7 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -69,7 +69,9 @@ public: { // Mobile. std::stringstream aStream; - boost::property_tree::write_json(aStream, m_rSidebarDockingWin.DumpAsPropertyTree()); + boost::property_tree::ptree aTree = m_rSidebarDockingWin.DumpAsPropertyTree(); + aTree.put("id", m_rSidebarDockingWin.GetLOKWindowId()); + boost::property_tree::write_json(aStream, aTree); const std::string message = aStream.str(); if (message != m_LastNotificationMessage) { diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 81f9d1fd4bdd..a19a89a91b91 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -3217,17 +3217,28 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) else if ( KnowsChildWindow(nSID) ) rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) ); } - else if ( nSID == SID_SIDEBAR ) + else if ( nSID == SID_SIDEBAR || nSID == SID_SHOW_SIDEBAR || nSID == SID_HIDE_SIDEBAR ) { - if ( !KnowsChildWindow( nSID ) ) + if ( !KnowsChildWindow( SID_SIDEBAR ) ) { SAL_WARN("sfx.view", "SID_SIDEBAR state requested, but no task pane child window exists for this ID!"); - rState.DisableItem( nSID ); + rState.DisableItem( SID_SIDEBAR ); } - else + else if ( nSID == SID_SIDEBAR ) { + // Toggle. rState.Put( SfxBoolItem( nSID, HasChildWindow( nSID ) ) ); } + else if ( nSID == SID_SHOW_SIDEBAR ) + { + // Show. + rState.Put( SfxBoolItem( nSID, false ) ); + } + else if ( nSID == SID_HIDE_SIDEBAR ) + { + // Hide. + rState.Put( SfxBoolItem( nSID, true ) ); + } } else if ( KnowsChildWindow(nSID) ) rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) ); |