[Libreoffice-commits] core.git: compilerplugins/clang sd/Library_sd.mk sd/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Oct 4 12:21:31 UTC 2016


 compilerplugins/clang/mergeclasses.results |    1 
 sd/Library_sd.mk                           |    1 
 sd/source/ui/func/fuoltext.cxx             |   42 ++++++++++++-------
 sd/source/ui/func/fuoutl.cxx               |   63 -----------------------------
 sd/source/ui/inc/fuoltext.hxx              |   13 +++--
 sd/source/ui/inc/fuoutl.hxx                |   61 ----------------------------
 6 files changed, 35 insertions(+), 146 deletions(-)

New commits:
commit ac9373e65ed7908a19edc6f5c758af9b8232820b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Oct 4 10:36:23 2016 +0200

    merge sd::FuOutline with sd::FuOutlineText
    
    Change-Id: Ie8191ac91175ba51f89809aaa53bc1ffacf42df0
    Reviewed-on: https://gerrit.libreoffice.org/29520
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 254d14e..29b47df 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -290,7 +290,6 @@ merge sc::opencl::SumOfProduct with sc::opencl::OpSumProduct
 merge sc::opencl::XNPV with sc::opencl::OpXNPV
 merge sd::BroadcastHelperOwner with sd::DrawController
 merge sd::ClientInfo with sd::ClientInfoInternal
-merge sd::FuOutline with sd::FuOutlineText
 merge sd::IBluetoothSocket with sd::BufferedStreamSocket
 merge sd::ICustomAnimationListController with sd::CustomAnimationPane
 merge sd::sidebar::IDisposable with sd::sidebar::PanelBase
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 8bed9f6..22c94b8 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -289,7 +289,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
 	sd/source/ui/func/fuoaprms \
 	sd/source/ui/func/fuolbull \
 	sd/source/ui/func/fuoltext \
-	sd/source/ui/func/fuoutl \
 	sd/source/ui/func/fupage \
 	sd/source/ui/func/fuparagr \
 	sd/source/ui/func/fupoor \
diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx
index 9ae6b61..88507be 100644
--- a/sd/source/ui/func/fuoltext.cxx
+++ b/sd/source/ui/func/fuoltext.cxx
@@ -84,10 +84,32 @@ static sal_uInt16 SidArray[] = {
 FuOutlineText::FuOutlineText(ViewShell* pViewShell, ::sd::Window* pWindow,
                              ::sd::View* pView, SdDrawDocument* pDoc,
                              SfxRequest& rReq)
-       : FuOutline(pViewShell, pWindow, pView, pDoc, rReq)
+       : FuPoor(pViewShell, pWindow, pView, pDoc, rReq),
+         pOutlineViewShell (static_cast<OutlineViewShell*>(pViewShell)),
+         pOutlineView (static_cast<OutlineView*>(pView))
 {
 }
 
+/**
+ * forward to OutlinerView
+ */
+bool FuOutlineText::Command(const CommandEvent& rCEvt)
+{
+    bool bResult = false;
+
+    OutlinerView* pOlView =
+        static_cast<OutlineView*>(mpView)->GetViewByWindow(mpWindow);
+    DBG_ASSERT (pOlView, "no OutlineView found");
+
+    if (pOlView)
+    {
+        pOlView->Command(rCEvt);        // unfortunately, we do not get a return value
+        bResult = true;
+    }
+    return bResult;
+}
+
+
 rtl::Reference<FuPoor> FuOutlineText::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
 {
     rtl::Reference<FuPoor> xFunc( new FuOutlineText( pViewSh, pWin, pView, pDoc, rReq ) );
@@ -108,7 +130,7 @@ bool FuOutlineText::MouseButtonDown(const MouseEvent& rMEvt)
     }
     else
     {
-        bReturn = FuOutline::MouseButtonDown(rMEvt);
+        bReturn = FuPoor::MouseButtonDown(rMEvt);
     }
 
     return bReturn;
@@ -120,7 +142,7 @@ bool FuOutlineText::MouseMove(const MouseEvent& rMEvt)
 
     if (!bReturn)
     {
-        bReturn = FuOutline::MouseMove(rMEvt);
+        bReturn = FuPoor::MouseMove(rMEvt);
     }
 
     return bReturn;
@@ -171,7 +193,7 @@ bool FuOutlineText::MouseButtonUp(const MouseEvent& rMEvt)
     }
 
     if( !bReturn )
-        bReturn = FuOutline::MouseButtonUp(rMEvt);
+        bReturn = FuPoor::MouseButtonUp(rMEvt);
 
     return bReturn;
 }
@@ -201,7 +223,7 @@ bool FuOutlineText::KeyInput(const KeyEvent& rKEvt)
         }
         else
         {
-            bReturn = FuOutline::KeyInput(rKEvt);
+            bReturn = FuPoor::KeyInput(rKEvt);
         }
     }
 
@@ -238,16 +260,6 @@ void FuOutlineText::UpdateForKeyPress (const KeyEvent& rEvent)
         pOutlineViewShell->UpdatePreview (pOutlineViewShell->GetActualPage());
 }
 
-void FuOutlineText::Activate()
-{
-    FuOutline::Activate();
-}
-
-void FuOutlineText::Deactivate()
-{
-    FuOutline::Deactivate();
-}
-
 /**
  * Cut object to clipboard
  */
diff --git a/sd/source/ui/func/fuoutl.cxx b/sd/source/ui/func/fuoutl.cxx
deleted file mode 100644
index 61b3b3d..0000000
--- a/sd/source/ui/func/fuoutl.cxx
+++ /dev/null
@@ -1,63 +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 .
- */
-
-#include "fuoutl.hxx"
-
-#include <editeng/outliner.hxx>
-#include "OutlineView.hxx"
-#include "OutlineViewShell.hxx"
-#include "Window.hxx"
-
-namespace sd {
-
-
-FuOutline::FuOutline (
-    ViewShell* pViewShell,
-    ::sd::Window* pWindow,
-    ::sd::View* pView,
-    SdDrawDocument* pDoc,
-    SfxRequest& rReq)
-    : FuPoor(pViewShell, pWindow, pView, pDoc, rReq),
-      pOutlineViewShell (static_cast<OutlineViewShell*>(pViewShell)),
-      pOutlineView (static_cast<OutlineView*>(pView))
-{
-}
-
-/**
- * forward to OutlinerView
- */
-bool FuOutline::Command(const CommandEvent& rCEvt)
-{
-    bool bResult = false;
-
-    OutlinerView* pOlView =
-        static_cast<OutlineView*>(mpView)->GetViewByWindow(mpWindow);
-    DBG_ASSERT (pOlView, "no OutlineView found");
-
-    if (pOlView)
-    {
-        pOlView->Command(rCEvt);        // unfortunately, we do not get a return value
-        bResult = true;
-    }
-    return bResult;
-}
-
-} // end of namespace sd
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/fuoltext.hxx b/sd/source/ui/inc/fuoltext.hxx
index 4be5a1c..3c9d6de 100644
--- a/sd/source/ui/inc/fuoltext.hxx
+++ b/sd/source/ui/inc/fuoltext.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_SD_SOURCE_UI_INC_FUOLTEXT_HXX
 #define INCLUDED_SD_SOURCE_UI_INC_FUOLTEXT_HXX
 
-#include "fuoutl.hxx"
+#include "fupoor.hxx"
 
 class SdDrawDocument;
 class SfxRequest;
@@ -31,17 +31,21 @@ namespace sd {
 
 class View;
 class ViewShell;
+class OutlineView;
+class OutlineViewShell;
 
 /**
  * text functions in outline mode
  */
 class FuOutlineText
-    : public FuOutline
+    : public FuPoor
 {
 public:
 
     static rtl::Reference<FuPoor> Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
 
+    virtual bool Command(const CommandEvent& rCEvt) override;
+
     virtual bool KeyInput(const KeyEvent& rKEvt) override;
     virtual bool MouseMove(const MouseEvent& rMEvt) override;
     virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
@@ -52,9 +56,6 @@ public:
     virtual void DoPaste() override;
     virtual void DoPasteUnformatted() override;
 
-    virtual void Activate() override;           // Function aktivieren
-    virtual void Deactivate() override;         // Function deaktivieren
-
     /** Call this method when the text in the outliner (may) has changed.
         It will invalidate some slots of the view frame and update the
         preview in the slide sorter.
@@ -69,6 +70,8 @@ protected:
         SdDrawDocument* pDoc,
         SfxRequest& rReq);
 
+    OutlineViewShell* pOutlineViewShell;
+    OutlineView* pOutlineView;
 };
 
 } // end of namespace sd
diff --git a/sd/source/ui/inc/fuoutl.hxx b/sd/source/ui/inc/fuoutl.hxx
deleted file mode 100644
index d4cae3b..0000000
--- a/sd/source/ui/inc/fuoutl.hxx
+++ /dev/null
@@ -1,61 +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_SD_SOURCE_UI_INC_FUOUTL_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_FUOUTL_HXX
-
-#include "fupoor.hxx"
-
-class SdDrawDocument;
-class SfxRequest;
-
-namespace sd {
-
-class OutlineView;
-class OutlineViewShell;
-class View;
-class ViewShell;
-
-/**
- * Base class of functions of outline mode
- */
-class FuOutline
-    : public FuPoor
-{
-public:
-
-    virtual bool Command(const CommandEvent& rCEvt) override;
-
-protected:
-    FuOutline (
-        ViewShell* pViewShell,
-        ::sd::Window* pWindow,
-        ::sd::View* pView,
-        SdDrawDocument* pDoc,
-        SfxRequest& rReq);
-
-    OutlineViewShell* pOutlineViewShell;
-    OutlineView* pOutlineView;
-};
-
-} // end of namespace sd
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list