openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1463887 - in /openoffice/branches/sidebar/main: officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu sc/source/ui/navipi/navipi.cxx sc/source/ui/sidebar/ScPanelFactory.cxx sd/source/ui/sidebar/PanelFactory.cxx
Date Wed, 03 Apr 2013 09:10:16 GMT
Author: af
Date: Wed Apr  3 09:10:16 2013
New Revision: 1463887

URL: http://svn.apache.org/r1463887
Log:
i121961: Added navigator for Writer.

Modified:
    openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
    openoffice/branches/sidebar/main/sc/source/ui/navipi/navipi.cxx
    openoffice/branches/sidebar/main/sc/source/ui/sidebar/ScPanelFactory.cxx
    openoffice/branches/sidebar/main/sd/source/ui/sidebar/PanelFactory.cxx

Modified: openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu?rev=1463887&r1=1463886&r2=1463887&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
(original)
+++ openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
Wed Apr  3 09:10:16 2013
@@ -787,6 +787,58 @@
         </prop>
       </node>
 
+      <node oor:name="SwNavigatorPanel" oor:op="replace">
+        <prop oor:name="Title" oor:type="xs:string">
+          <value xml:lang="en-US">Navigator</value>
+        </prop>
+        <prop oor:name="TitleBarIsOptional" oor:type="xs:boolean">
+          <value>true</value>
+        </prop>
+        <prop oor:name="Id" oor:type="xs:string">
+          <value>SwNavigatorPanel</value>
+        </prop>
+        <prop oor:name="DeckId" oor:type="xs:string">
+          <value>NavigatorDeck</value>
+        </prop>
+        <prop oor:name="ContextList">
+          <value oor:separator=";">
+            WriterAndWeb, any, visible ;
+          </value>
+        </prop>
+        <prop oor:name="ImplementationURL" oor:type="xs:string">
+          <value>private:resource/toolpanel/SwPanelFactory/NavigatorPanel</value>
+        </prop>
+        <prop oor:name="OrderIndex" oor:type="xs:int">
+          <value>100</value>
+        </prop>
+      </node>
+
+      <node oor:name="ScNavigatorPanel" oor:op="replace">
+        <prop oor:name="Title" oor:type="xs:string">
+          <value xml:lang="en-US">Navigator</value>
+        </prop>
+        <prop oor:name="TitleBarIsOptional" oor:type="xs:boolean">
+          <value>true</value>
+        </prop>
+        <prop oor:name="Id" oor:type="xs:string">
+          <value>ScNavigatorPanel</value>
+        </prop>
+        <prop oor:name="DeckId" oor:type="xs:string">
+          <value>NavigatorDeck</value>
+        </prop>
+        <prop oor:name="ContextList">
+          <value oor:separator=";">
+            Calc, any, visible ;
+          </value>
+        </prop>
+        <prop oor:name="ImplementationURL" oor:type="xs:string">
+          <value>private:resource/toolpanel/ScPanelFactory/NavigatorPanel</value>
+        </prop>
+        <prop oor:name="OrderIndex" oor:type="xs:int">
+          <value>100</value>
+        </prop>
+      </node>
+
       <node oor:name="SdNavigatorPanel" oor:op="replace">
         <prop oor:name="Title" oor:type="xs:string">
           <value xml:lang="en-US">Navigator</value>
@@ -806,7 +858,7 @@
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
-          <value>private:resource/toolpanel/SdPanelFactory/Navigator</value>
+          <value>private:resource/toolpanel/SdPanelFactory/NavigatorPanel</value>
         </prop>
         <prop oor:name="OrderIndex" oor:type="xs:int">
           <value>100</value>

Modified: openoffice/branches/sidebar/main/sc/source/ui/navipi/navipi.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sc/source/ui/navipi/navipi.cxx?rev=1463887&r1=1463886&r2=1463887&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sc/source/ui/navipi/navipi.cxx (original)
+++ openoffice/branches/sidebar/main/sc/source/ui/navipi/navipi.cxx Wed Apr  3 09:10:16 2013
@@ -428,8 +428,8 @@ void CommandToolBox::Select( sal_uInt16 
 			else
 				eNewMode = NAV_LMODE_NONE;
 		}
-		rDlg.SetListMode( eNewMode );
-		UpdateButtons();
+        rDlg.SetListMode( eNewMode );
+        UpdateButtons();
 	}
 	else
 		switch ( nSelId )
@@ -767,6 +767,16 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindi
 	aLbEntries.SetAccessibleRelationLabeledBy(&aLbEntries);
 	aTbxCmd.SetAccessibleRelationLabeledBy(&aTbxCmd);
 	aLbDocuments.SetAccessibleName(aStrActiveWin);
+
+    if (pContextWin == NULL)
+    {
+        // When the context window is missing then the navigator is
+        // displayed in the sidebar and has the whole deck to fill.
+        // Therefore hide the button that hides all controls below the
+        // top two rows of buttons.
+        aTbxCmd.Select(IID_ZOOMOUT);
+        aTbxCmd.RemoveItem(aTbxCmd.GetItemPos(IID_ZOOMOUT));
+    }
 }
 
 //------------------------------------------------------------------------
@@ -790,7 +800,7 @@ __EXPORT ScNavigatorDlg::~ScNavigatorDlg
 
 void __EXPORT ScNavigatorDlg::Resizing( Size& rNewSize )  // Size = Outputsize?
 {
-	FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
+	FloatingWindow* pFloat = pContextWin!=NULL ? pContextWin->GetFloatingWindow() : NULL;
 	if ( pFloat )
 	{
 		Size aMinOut = pFloat->GetMinOutputSizePixel();
@@ -897,9 +907,12 @@ void ScNavigatorDlg::DoResize()
 	//@@ 03.11.97 end
 
 	sal_Bool bListMode = (eListMode != NAV_LMODE_NONE);
-	FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
-	if ( pFloat && bListMode )
-		nListModeHeight = nTotalHeight;
+    if (pContextWin != NULL)
+    {
+        FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
+        if ( pFloat && bListMode )
+            nListModeHeight = nTotalHeight;
+    }
 }
 
 //------------------------------------------------------------------------
@@ -1201,18 +1214,18 @@ void ScNavigatorDlg::SetListMode( NavLis
 		switch ( eMode )
 		{
 			case NAV_LMODE_NONE:
-				ShowList( sal_False, bSetSize );
+                ShowList( sal_False, bSetSize );
 				break;
 
 			case NAV_LMODE_AREAS:
 			case NAV_LMODE_DBAREAS:
 			case NAV_LMODE_DOCS:
 				aLbEntries.Refresh();
-				ShowList( sal_True, bSetSize );
+                ShowList( sal_True, bSetSize );
 				break;
 
 			case NAV_LMODE_SCENARIOS:
-				ShowScenarios( sal_True, bSetSize );
+                ShowScenarios( sal_True, bSetSize );
 				break;
 		}
 
@@ -1220,8 +1233,8 @@ void ScNavigatorDlg::SetListMode( NavLis
 
 		if ( eMode != NAV_LMODE_NONE )
 		{
-			ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg();
-			rCfg.SetListMode( (sal_uInt16) eMode );
+            ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg();
+            rCfg.SetListMode( (sal_uInt16) eMode );
 		}
 	}
 
@@ -1233,7 +1246,7 @@ void ScNavigatorDlg::SetListMode( NavLis
 
 void ScNavigatorDlg::ShowList( sal_Bool bShow, sal_Bool bSetSize )
 {
-	FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
+	FloatingWindow* pFloat = pContextWin!=NULL ? pContextWin->GetFloatingWindow() : NULL;
 	Size aSize = GetParent()->GetOutputSizePixel();
 
 	if ( bShow )
@@ -1245,7 +1258,7 @@ void ScNavigatorDlg::ShowList( sal_Bool 
 			pFloat->SetMinOutputSizePixel( aMinSize );
 		aSize.Height() = nListModeHeight;
 		aLbEntries.Show();
-		aLbDocuments.Show();
+        aLbDocuments.Show();
 	}
 	else
 	{
@@ -1267,10 +1280,13 @@ void ScNavigatorDlg::ShowList( sal_Bool 
 	}
 	else
 	{
-		SfxNavigator* pNav = (SfxNavigator*)GetParent();
-		Size aFloating = pNav->GetFloatingSize();
-		aFloating.Height() = aSize.Height();
-		pNav->SetFloatingSize( aFloating );
+		SfxNavigator* pNav = dynamic_cast<SfxNavigator*>(GetParent());
+        if (pNav != NULL)
+        {
+            Size aFloating = pNav->GetFloatingSize();
+            aFloating.Height() = aSize.Height();
+            pNav->SetFloatingSize( aFloating );
+        }
 	}
 }
 
@@ -1278,7 +1294,7 @@ void ScNavigatorDlg::ShowList( sal_Bool 
 
 void ScNavigatorDlg::ShowScenarios( sal_Bool bShow, sal_Bool bSetSize )
 {
-	FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
+	FloatingWindow* pFloat = pContextWin!=NULL ? pContextWin->GetFloatingWindow() : NULL;
 	Size aSize = GetParent()->GetOutputSizePixel();
 
 	if ( bShow )

Modified: openoffice/branches/sidebar/main/sc/source/ui/sidebar/ScPanelFactory.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sc/source/ui/sidebar/ScPanelFactory.cxx?rev=1463887&r1=1463886&r2=1463887&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sc/source/ui/sidebar/ScPanelFactory.cxx (original)
+++ openoffice/branches/sidebar/main/sc/source/ui/sidebar/ScPanelFactory.cxx Wed Apr  3 09:10:16
2013
@@ -26,6 +26,7 @@
 #include <AlignmentPropertyPanel.hxx>
 #include <CellAppearancePropertyPanel.hxx>
 #include <NumberFormatPropertyPanel.hxx>
+#include <navipi.hxx>
 
 #include <sfx2/sidebar/SidebarPanelBase.hxx>
 #include <sfx2/sfxbasecontroller.hxx>
@@ -142,6 +143,15 @@ Reference<ui::XUIElement> SAL_CALL ScPan
             pPanel,
             ui::LayoutSize(-1,-1,-1));
     }
+    else if (DoesResourceEndWith("/NavigatorPanel"))
+    {
+        Window* pPanel = new ScNavigatorDlg(pBindings, NULL, pParentWindow);
+        xElement = sfx2::sidebar::SidebarPanelBase::Create(
+            rsResourceURL,
+            xFrame,
+            pPanel,
+            ui::LayoutSize(0,-1,-1));
+    }
 #undef DoesResourceEndWith
 
     return xElement;

Modified: openoffice/branches/sidebar/main/sd/source/ui/sidebar/PanelFactory.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/sidebar/PanelFactory.cxx?rev=1463887&r1=1463886&r2=1463887&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/sidebar/PanelFactory.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/sidebar/PanelFactory.cxx Wed Apr  3 09:10:16
2013
@@ -61,7 +61,7 @@ namespace {
     const static char* gsResourceNameUsedMasterPages = "/UsedMasterPages";
     const static char* gsResourceNameSlideTransitions = "/SlideTransitions";
     const static char* gsResourceNameTableDesign = "/TableDesign";
-    const static char* gsResourceNameNavigator = "/Navigator";
+    const static char* gsResourceNameNavigator = "/NavigatorPanel";
 }
 
 Reference<lang::XEventListener> mxControllerDisposeListener;



Mime
View raw message