[Libreoffice-commits] core.git: include/sfx2 officecfg/registry qadevOOo/runner qadevOOo/tests sc/source sd/source sfx2/sdi sfx2/source svx/source sw/source

Samuel Mehrbrodt s.mehrbrodt at gmail.com
Mon Oct 6 01:16:03 PDT 2014


 include/sfx2/app.hxx                                            |    1 
 include/sfx2/templdlg.hxx                                       |   10 ---
 officecfg/registry/data/org/openoffice/Office/Views.xcu         |    6 --
 qadevOOo/runner/util/DesktopTools.java                          |   17 ++----
 qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java |    5 +
 sc/source/ui/view/tabvwsh.cxx                                   |    1 
 sd/source/ui/slideshow/slideshowimpl.cxx                        |    1 
 sd/source/ui/view/drvwshrg.cxx                                  |    2 
 sd/source/ui/view/outlnvsh.cxx                                  |    1 
 sfx2/sdi/frmslots.sdi                                           |    1 
 sfx2/source/appl/appchild.cxx                                   |   14 -----
 sfx2/source/appl/appreg.cxx                                     |    1 
 sfx2/source/dialog/templdlg.cxx                                 |   16 -----
 sfx2/source/inc/templdgi.hxx                                    |    3 -
 sfx2/source/view/viewfrm.cxx                                    |   11 ++++
 svx/source/sidebar/gallery/GalleryPanel.hxx                     |   27 ----------
 sw/source/uibase/app/docst.cxx                                  |    8 --
 sw/source/uibase/uiview/view0.cxx                               |    1 
 sw/source/uibase/web/wview.cxx                                  |    1 
 19 files changed, 23 insertions(+), 104 deletions(-)

New commits:
commit a836afe471d6df7bfc932fc419f7ccad7d40efb2
Author: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
Date:   Thu Sep 25 16:54:39 2014 +0200

    fdo#73151 Always open Styles&Formatting dialog in the sidebar
    
    Change-Id: I05b63dc00023945d92fd837bd64042135d3f9aed
    Reviewed-on: https://gerrit.libreoffice.org/11648
    Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
    Tested-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 1f41a5d..8017757 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -175,7 +175,6 @@ public:
     * @param pArgs Takes ownership
     */
     sal_uIntPtr                       LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, bool bCopy=true, SfxItemSet* pArgs = 0 );
-    SfxTemplateDialog*          GetTemplateDialog();
     vcl::Window*                     GetTopWindow() const;
 
     // members
diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index 4bd6ac4..6e6ed778 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -34,7 +34,6 @@ class SfxTemplateDialog_Impl;
 class SfxTemplateDialog : public SfxDockingWindow
 {
 private:
-friend class SfxTemplateDialogWrapper;
 friend class SfxTemplateDialog_Impl;
 
     SfxTemplateDialog_Impl*     pImpl;
@@ -56,15 +55,6 @@ public:
     static SfxStyleFamily SFX2_DLLPUBLIC NIdToSfxFamilyId(sal_uInt16 nId);
 };
 
-// class SfxTemplateDialogWrapper ----------------------------------------
-
-class SFX2_DLLPUBLIC SfxTemplateDialogWrapper : public SfxChildWindow
-{
-public:
-                SfxTemplateDialogWrapper
-                    (vcl::Window*,sal_uInt16,SfxBindings*,SfxChildWinInfo*);
-                SFX_DECL_CHILDWINDOW_WITHID(SfxTemplateDialogWrapper);
-};
 
 // class SfxTemplatePanelControl -----------------------------------------
 
diff --git a/officecfg/registry/data/org/openoffice/Office/Views.xcu b/officecfg/registry/data/org/openoffice/Office/Views.xcu
index 771ed28..a2c7f43 100644
--- a/officecfg/registry/data/org/openoffice/Office/Views.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Views.xcu
@@ -19,12 +19,6 @@
 <!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
 <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:install="http://openoffice.org/2004/installation" oor:name="Views" oor:package="org.openoffice.Office">
   <node oor:name="Windows">
-    <!-- Hide Styles&Formatting dialog -->
-    <node oor:name="5539" oor:op="replace">
-      <prop oor:name="Visible" oor:type="xs:boolean">
-        <value>false</value>
-      </prop>
-    </node>
     <!-- Show sidebar only in Impress and Writer by default -->
     <node oor:name="10336" oor:op="replace">
       <prop oor:name="Visible" oor:type="xs:boolean">
diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java
index d44182c..646ffcbd 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -412,33 +412,33 @@ public class DesktopTools
     }
 
     /**
-     * This function docks the Stylist onto the right side of the window.</p>
+     * This function docks the Navigator onto the right side of the window.</p>
      * Note:<P>
      * Since the svt.viewoptions cache the view configuration at start up
      * the chage of the docking will be effective at a restart.
      * @param xMSF the XMultiServiceFactory
      */
-    public static void dockStylist(XMultiServiceFactory xMSF)
+    public static void dockNavigator(XMultiServiceFactory xMSF)
     {
-        // prepare Window-Settings
+        // prepare Window settings
         try
         {
             ConfigHelper aConfig = new ConfigHelper(xMSF,
                     "org.openoffice.Office.Views", false);
 
-            aConfig.getOrInsertGroup("Windows", "5539");
+            aConfig.getOrInsertGroup("Windows", "10366");
 
             aConfig.updateGroupProperty(
-                    "Windows", "5539", "WindowState", "952,180,244,349;1;0,0,0,0;");
+                    "Windows", "10366", "WindowState", "952,180,244,349;1;0,0,0,0;");
 
             aConfig.insertOrUpdateExtensibleGroupProperty(
-                    "Windows", "5539", "UserData", "Data", "V2,V,0,AL:(5,16,0/0/244/349,244;610)");
+                    "Windows", "10366", "UserData", "Data", "V2,V,0,AL:(5,16,0/0/244/349,244;610)");
 
-            // Is node "SplitWindow2" available? If not, instert it.
+            // Is node "SplitWindow2" available? If not, insert it.
             aConfig.getOrInsertGroup("Windows", "SplitWindow2");
 
             aConfig.insertOrUpdateExtensibleGroupProperty(
-                    "Windows", "SplitWindow2", "UserData", "UserItem", "V1,2,1,0,5539");
+                    "Windows", "SplitWindow2", "UserData", "UserItem", "V1,2,1,0,10366");
 
             aConfig.flush();
             aConfig = null;
@@ -451,7 +451,6 @@ public class DesktopTools
     }
 
 
-
     /**
      * This function brings a document to the front.<P>
      * NOTE: it is not possible to change the window order of your Window-Manager!!
diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java
index 0b33fb0..5c76ca5 100644
--- a/qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java
+++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java
@@ -115,7 +115,8 @@ public class AccessibleDropDownListBox extends TestCase {
         try {
             SOfficeFactory SOF = SOfficeFactory.getFactory(
                                          Param.getMSF());
-            DesktopTools.dockStylist(Param.getMSF());
+            // Dock the Navigator to supply an AccessibleDropDownListBox
+            DesktopTools.dockNavigator(Param.getMSF());
             xTextDoc = SOF.createTextDoc(null);
         } catch (com.sun.star.uno.Exception e) {
             throw new StatusException("Can't create document", e);
@@ -141,4 +142,4 @@ public class AccessibleDropDownListBox extends TestCase {
             log.println("While waiting :" + e);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 847f3f6..51aaae8 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -54,7 +54,6 @@ void ScTabViewShell::InitInterface_Impl()
                                             ScResId(RID_OBJECTBAR_TOOLS));
 
     GetStaticInterface()->RegisterChildWindow(FID_INPUTLINE_STATUS);
-    GetStaticInterface()->RegisterChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
 
     GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index a6ccac9..4704c90 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2482,7 +2482,6 @@ FncGetChildWindowId aShowChildren[] =
     &SvxBmpMaskChildWindow::GetChildWindowId,
     &SvxIMapDlgChildWindow::GetChildWindowId,
     &SvxHlinkDlgWrapper::GetChildWindowId,
-    &SfxTemplateDialogWrapper::GetChildWindowId,
     &SfxInfoBarContainerChild::GetChildWindowId
 };
 
diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx
index 321c104..b4fe5de 100644
--- a/sd/source/ui/view/drvwshrg.cxx
+++ b/sd/source/ui/view/drvwshrg.cxx
@@ -67,7 +67,6 @@ void DrawViewShell::InitInterface_Impl()
 
     GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
 
-    GetStaticInterface()->RegisterChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SvxColorChildWindow::GetChildWindowId());
@@ -94,7 +93,6 @@ void GraphicViewShell::InitInterface_Impl()
 
     GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
 
-    GetStaticInterface()->RegisterChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SvxColorChildWindow::GetChildWindowId());
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 0ad65d4..c5d440c 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -117,7 +117,6 @@ void OutlineViewShell::InitInterface_Impl()
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_VIEWER | SFX_VISIBILITY_READONLYDOC,
                                             SdResId(RID_DRAW_VIEWER_TOOLBOX));
 
-    GetStaticInterface()->RegisterChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SvxHlinkDlgWrapper::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(::sd::SpellDialogChildWindow::GetChildWindowId());
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index 362ced4..617f77f 100644
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
@@ -94,7 +94,6 @@ interface Window
     SID_STYLE_DESIGNER // ole(no) api(final/play/rec)
     [
         ExecMethod = ChildWindowExecute ;
-        StateMethod = ChildWindowState ;
     ]
     SID_RECORDING_FLOATWINDOW // ole(no) api(final/play/rec)
     [
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index b2cbe57..a0add3e 100644
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -132,20 +132,6 @@ SfxChildWinFactArr_Impl& SfxApplication::GetChildWinFactories_Impl() const
 }
 
 
-
-SfxTemplateDialog* SfxApplication::GetTemplateDialog()
-{
-    if ( pAppData_Impl->pViewFrame )
-    {
-        SfxChildWindow *pChild = pAppData_Impl->pViewFrame->GetChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
-        return pChild ? static_cast<SfxTemplateDialog*>(pChild->GetWindow()) : 0;
-    }
-
-    return NULL;
-}
-
-
-
 SfxWorkWindow* SfxApplication::GetWorkWindow_Impl(const SfxViewFrame *pFrame) const
 {
     if ( pFrame )
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index caa32b1..e9c1e6e 100644
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -54,7 +54,6 @@ void SfxApplication::Registrations_Impl()
     SfxRecordingFloatWrapper_Impl::RegisterChildWindow();
     SfxNavigatorWrapper::RegisterChildWindow( false, NULL, SFX_CHILDWIN_NEVERHIDE );
     SfxPartChildWnd_Impl::RegisterChildWindow();
-    SfxTemplateDialogWrapper::RegisterChildWindow(true);
     SfxDockingWrapper::RegisterChildWindow();
     SfxInfoBarContainerChild::RegisterChildWindow( true, NULL, SFX_CHILDWIN_NEVERHIDE );
 
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 855e9b7..f44bfe9 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -90,9 +90,6 @@ static sal_uInt16 nLastItemId = USHRT_MAX;
 TYPEINIT0(SfxCommonTemplateDialog_Impl);
 TYPEINIT1(SfxTemplateDialog_Impl,SfxCommonTemplateDialog_Impl);
 
-SFX_IMPL_DOCKINGWINDOW_WITHID(SfxTemplateDialogWrapper, SID_STYLE_DESIGNER)
-
-
 
 class SfxCommonTemplateDialog_Impl::DeletionWatcher : private boost::noncopyable
 {
@@ -348,19 +345,6 @@ PopupMenu* SfxActionListBox::CreateContextMenu( void )
 }
 
 
-
-SfxTemplateDialogWrapper::SfxTemplateDialogWrapper(vcl::Window *pParentWnd,
-        sal_uInt16 nId,  SfxBindings *p, SfxChildWinInfo *pInfo) :
-    SfxChildWindow(pParentWnd, nId)
-{
-    SfxTemplateDialog *pWin = new SfxTemplateDialog(p, this, pParentWnd);
-    pWindow = pWin;
-    eChildAlignment = SFX_ALIGN_NOALIGNMENT;
-
-    pWin->Initialize( pInfo );
-    pWin->SetMinOutputSizePixel(pWin->pImpl->GetMinOutputSizePixel());
-}
-
 //===== SfxTemplatePanelControl ===============================================
 SfxTemplatePanelControl::SfxTemplatePanelControl (
     SfxBindings* pBindings,
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 9da6c97..fe7cf61 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -44,7 +44,6 @@ class SvTreeListBox ;
 class StyleTreeListBox_Impl;
 class SfxTemplateDialog_Impl;
 class SfxCommonTemplateDialog_Impl;
-class SfxTemplateDialogWrapper;
 class SfxDockingWindow;
 
 namespace com { namespace sun { namespace star { namespace frame { class XModuleManager2; } } } }
@@ -154,7 +153,6 @@ protected:
 
     friend class DropListBox_Impl;
     friend class SfxTemplateControllerItem;
-    friend class SfxTemplateDialogWrapper;
 
     SfxBindings*                pBindings;
     SfxTemplateControllerItem*  pBoundItems[COUNT_BOUND_FUNC];
@@ -311,7 +309,6 @@ class SfxTemplateDialog_Impl :  public SfxCommonTemplateDialog_Impl
 {
 private:
     friend class SfxTemplateControllerItem;
-    friend class SfxTemplateDialogWrapper;
     friend class DropToolBox_Impl;
     friend class SfxTemplatePanelControl;
 
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 12cbb94..5b47c7c 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -133,6 +133,7 @@ using ::com::sun::star::container::XIndexContainer;
 #include <sfx2/frmdescr.hxx>
 #include <sfx2/sfxuno.hxx>
 #include <sfx2/progress.hxx>
+#include <sfx2/sidebar/Sidebar.hxx>
 #include "workwin.hxx"
 #include "helper.hxx"
 #include <sfx2/minfitem.hxx>
@@ -3135,6 +3136,16 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
         rReq.Done();
         return;
     }
+    if (nSID == SID_STYLE_DESIGNER)
+    {
+        // First make sure that the sidebar is visible
+        ShowChildWindow(SID_SIDEBAR);
+
+        ::sfx2::sidebar::Sidebar::ShowPanel("StyleListPanel",
+                                            GetFrame().GetFrameInterface());
+        rReq.Done();
+        return;
+    }
 
     bool bHasChild = HasChildWindow(nSID);
     bool bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
diff --git a/svx/source/sidebar/gallery/GalleryPanel.hxx b/svx/source/sidebar/gallery/GalleryPanel.hxx
deleted file mode 100644
index d75f080..0000000
--- a/svx/source/sidebar/gallery/GalleryPanel.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_GALLERY_GALLERYPANEL_HXX
-#define INCLUDED_SVX_SOURCE_SIDEBAR_GALLERY_GALLERYPANEL_HXX
-
-class GelleryPanel
-{
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 8b9b02a..d99b68e 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -477,14 +477,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
                         nRet = UpdateStyle(aParam, nFamily, pActShell);
                         break;
                     case SID_STYLE_NEW_BY_EXAMPLE:
-                    {
                         nRet = MakeByExample(aParam, nFamily, nMask, pActShell );
-                        SfxTemplateDialog* pDlg = SfxGetpApp()->GetTemplateDialog();
-
-                        if(pDlg && pDlg->IsVisible())
-                            pDlg->Update();
-                    }
-                    break;
+                        break;
 
                     default:
                         OSL_FAIL("Invalid SlotId");
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 6359ae8..c7e81bb 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -96,7 +96,6 @@ void SwView::InitInterface_Impl()
     GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
 
     GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
-    GetStaticInterface()->RegisterChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SwSpellDialogChildWindow::GetChildWindowId());
diff --git a/sw/source/uibase/web/wview.cxx b/sw/source/uibase/web/wview.cxx
index c2bd48b..258cdcd 100644
--- a/sw/source/uibase/web/wview.cxx
+++ b/sw/source/uibase/web/wview.cxx
@@ -76,7 +76,6 @@ SFX_IMPL_INTERFACE(SwWebView, SwView, SW_RES(RID_WEBTOOLS_TOOLBOX) )
 
 void SwWebView::InitInterface_Impl()
 {
-    GetStaticInterface()->RegisterChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
 


More information about the Libreoffice-commits mailing list