diff options
-rw-r--r-- | desktop/source/lib/init.cxx | 12 | ||||
-rw-r--r-- | include/sfx2/sfxsids.hrc | 2 | ||||
-rw-r--r-- | include/svx/svxids.hrc | 5 | ||||
-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 |
8 files changed, 77 insertions, 13 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 81c02c2c5d22..ad44965df7dd 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3310,12 +3310,12 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin } else if (aMap.find("id") != aMap.end()) { - const OUString sClickAction("CLICK"); - const OUString sSelectAction("SELECT"); - const OUString sClearAction("CLEAR"); - const OUString sTypeAction("TYPE"); - const OUString sUpAction("UP"); - const OUString sDownAction("DOWN"); + static const OUString sClickAction("CLICK"); + static const OUString sSelectAction("SELECT"); + static const OUString sClearAction("CLEAR"); + static const OUString sTypeAction("TYPE"); + static const OUString sUpAction("UP"); + static const OUString sDownAction("DOWN"); try { diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 9fa90a5f6226..f7d77257350c 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -575,6 +575,8 @@ class SvxSearchItem; #define SID_TABLE_BORDER_TYPE (SID_SVX_START + 1065) #define SID_TABLE_BORDER_INDEX (SID_SVX_START + 1066) #define SID_TABLE_BORDER_OFFSET (SID_SVX_START + 1067) +#define SID_SHOW_SIDEBAR (SID_SVX_START + 1200) +#define SID_HIDE_SIDEBAR (SID_SVX_START + 1201) #define FID_SVX_START (SID_LIB_START + 500) #define FID_SEARCH_NOW (FID_SVX_START + 2) diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index f12a326d0d2a..09fa766fbb5b 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -999,8 +999,11 @@ class SvxSetItem; #define SID_ULINE_VAL_DOUBLE (SID_SVX_START + 1197) /* double underline */ #define SID_ULINE_VAL_DOTTED (SID_SVX_START + 1198) /* dotted underline */ +// #define SID_SHOW_SIDEBAR ( SID_SVX_START + 1200 ) -> sfxsids.hrc +// #define SID_HIDE_SIDEBAR ( SID_SVX_START + 1201 ) -> sfxsids.hrc + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1198 + 1 ) +#define SID_SVX_FIRSTFREE ( SID_HIDE_SIDEBAR + 1 ) // Overflow check for slot IDs #if SID_SVX_FIRSTFREE > SID_SVX_END 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) ) ); |