[Libreoffice-commits] core.git: compilerplugins/clang extras/source include/svx solenv/bin solenv/clang-format svx/Library_svx.mk svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 30 12:16:35 UTC 2019


 compilerplugins/clang/mergeclasses.results          |    1 
 extras/source/glade/libreoffice-catalog.xml.in      |    3 
 include/svx/sidebar/SidebarDialControl.hxx          |   44 -----------
 solenv/bin/native-code.py                           |    1 
 solenv/clang-format/blacklist                       |    2 
 svx/Library_svx.mk                                  |    1 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |    2 
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx |    2 
 svx/source/sidebar/possize/SidebarDialControl.cxx   |   74 --------------------
 9 files changed, 1 insertion(+), 129 deletions(-)

New commits:
commit 2fd7d760969d8eecc49672b3c8f4c58a5ea1bd4a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Dec 23 16:13:34 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Dec 30 13:15:58 2019 +0100

    SidebarDialControl is now unused
    
    Change-Id: I949276018ed1867ce2a450c013c7fa41206fe68c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85765
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index a7b57e30615d..3f7408a2fe60 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -399,7 +399,6 @@ merge svt::table::ITableDataSort with svt::table::UnoControlTableModel
 merge svt::table::ITableInputHandler with svt::table::DefaultInputHandler
 merge svt::table::ITableModelListener with svt::table::TableControl_Impl
 merge svt::table::ITableRenderer with svt::table::GridTableRenderer
-merge svx::DialControl with svx::sidebar::SidebarDialControl
 merge svx::IContextRequestObserver with svx::FmTextControlShell
 merge svx::IControllerFeatureInvalidation with FmXFormShell
 merge svx::IFocusObserver with svx::FmTextControlShell
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 304c7d6dfb04..0a8b70ca4357 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -99,9 +99,6 @@
     <glade-widget-class title="Page List Control" name="sduilo-SdPageListControl"
                         generic-name="Page List Control" parent="GtkTreeView"
                         icon-name="widget-gtk-treeview"/>
-    <glade-widget-class title="Sidebar Dial Control" name="svxlo-SidebarDialControl"
-                        generic-name="Sidebar Dial Control" parent="GtkSpinner"
-                        icon-name="widget-gtk-spinner"/>
     <glade-widget-class title="Relative Numeric Field" name="svxlo-SvxRelativeField"
                         generic-name="Relative Numeric Field" parent="GtkSpinButton"
                         icon-name="widget-gtk-spinbutton"/>
diff --git a/include/svx/sidebar/SidebarDialControl.hxx b/include/svx/sidebar/SidebarDialControl.hxx
deleted file mode 100644
index e6c080e751c0..000000000000
--- a/include/svx/sidebar/SidebarDialControl.hxx
+++ /dev/null
@@ -1,44 +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_SIDEBAR_SIDEBARDIALCONTROL_HXX
-#define INCLUDED_SVX_SIDEBAR_SIDEBARDIALCONTROL_HXX
-
-#include <svx/dialcontrol.hxx>
-
-namespace svx { namespace sidebar {
-
-/** Provide some improvements over the standard DialControl.
-*/
-class SidebarDialControl final : public svx::DialControl
-{
-public:
-    SidebarDialControl (vcl::Window* pParent, WinBits nBits);
-
-    virtual Size GetOptimalSize() const override;
-    virtual void MouseButtonDown (const MouseEvent& rMEvt) override;
-
-private:
-    virtual void HandleMouseEvent (const Point& rPos, bool bInitial) override;
-};
-
-} } // end of namespace svx::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 44452da614e5..204b0081212c 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -506,7 +506,6 @@ custom_widgets = [
     'SdPageObjsTLB',
     'SearchBox',
     'SearchResultsBox',
-    'SidebarDialControl',
     'SidebarToolBox',
     'Svx3DPreviewControl',
     'SvxCharViewControl',
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 971fea1bca10..f3334412c16d 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -7241,7 +7241,6 @@ include/svx/sidebar/LineWidthPopup.hxx
 include/svx/sidebar/PanelLayout.hxx
 include/svx/sidebar/SelectionAnalyzer.hxx
 include/svx/sidebar/SelectionChangeHandler.hxx
-include/svx/sidebar/SidebarDialControl.hxx
 include/svx/sidebar/ValueSetWithTextControl.hxx
 include/svx/spacinglistbox.hxx
 include/svx/sphere3d.hxx
@@ -14301,7 +14300,6 @@ svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
 svx/source/sidebar/paragraph/ParaSpacingWindow.hxx
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx
-svx/source/sidebar/possize/SidebarDialControl.cxx
 svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
 svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
 svx/source/sidebar/shapes/DefaultShapesPanel.cxx
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index af4264047401..66138648dca0 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -207,7 +207,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
     svx/source/sidebar/line/LineWidthPopup \
     $(call gb_Helper_optional,AVMEDIA,svx/source/sidebar/media/MediaPlaybackPanel) \
     svx/source/sidebar/possize/PosSizePropertyPanel \
-    svx/source/sidebar/possize/SidebarDialControl \
     svx/source/sidebar/shapes/DefaultShapesPanel \
     svx/source/sidebar/shapes/ShapesUtil \
     svx/source/sidebar/tools/ValueSetWithTextControl \
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 7d1982dbdca1..d6c300be6a8d 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -23,7 +23,6 @@
 
 #include <sfx2/sidebar/ControlFactory.hxx>
 #include "PosSizePropertyPanel.hxx"
-#include <svx/sidebar/SidebarDialControl.hxx>
 #include <svx/svxids.hrc>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/bindings.hxx>
@@ -32,6 +31,7 @@
 #include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
 #include <sfx2/viewfrm.hxx>
+#include <svx/dialcontrol.hxx>
 #include <svx/dlgutil.hxx>
 #include <unotools/localedatawrapper.hxx>
 #include <unotools/viewoptions.hxx>
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index 2e957b66a648..c5a0f3c92479 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -41,8 +41,6 @@ class SvxDialControl;
 
 namespace svx { namespace sidebar {
 
-class SidebarDialControl;
-
 class PosSizePropertyPanel
 :   public PanelLayout,
     public ::sfx2::sidebar::IContextChangeReceiver,
diff --git a/svx/source/sidebar/possize/SidebarDialControl.cxx b/svx/source/sidebar/possize/SidebarDialControl.cxx
deleted file mode 100644
index ee2923c3cedd..000000000000
--- a/svx/source/sidebar/possize/SidebarDialControl.cxx
+++ /dev/null
@@ -1,74 +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 <svx/sidebar/SidebarDialControl.hxx>
-
-#include <vcl/builderfactory.hxx>
-#include <vcl/event.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-
-namespace svx { namespace sidebar {
-
-SidebarDialControl::SidebarDialControl (vcl::Window* pParent, WinBits nBits)
-    : svx::DialControl(pParent, nBits)
-{
-    Init(GetOutputSizePixel());
-}
-
-VCL_BUILDER_FACTORY_ARGS(SidebarDialControl, WB_TABSTOP)
-
-Size SidebarDialControl::GetOptimalSize() const
-{
-    return LogicToPixel(Size(10, 10), MapMode(MapUnit::MapAppFont));
-}
-
-void SidebarDialControl::MouseButtonDown( const MouseEvent& rMEvt )
-{
-    if( rMEvt.IsLeft() )
-    {
-        GrabFocus();
-        CaptureMouse();
-        mpImpl->mnOldAngle = mpImpl->mnAngle;
-        HandleMouseEvent( rMEvt.GetPosPixel(), true );
-    }
-}
-
-void SidebarDialControl::HandleMouseEvent( const Point& rPos, bool bInitial )
-{
-    long nX = rPos.X() - mpImpl->mnCenterX;
-    long nY = mpImpl->mnCenterY - rPos.Y();
-    double fH = sqrt( static_cast< double >( nX ) * nX + static_cast< double >( nY ) * nY );
-    if( fH != 0.0 )
-    {
-        double fAngle = acos( nX / fH );
-        sal_Int32 nAngle = static_cast<sal_Int32>(basegfx::rad2deg(fAngle) * 100.0);
-        if( nY < 0 )
-            nAngle = 36000 - nAngle;
-        if( bInitial )  // round to entire 15 degrees
-            nAngle = ((nAngle + 750) / 1500) * 1500;
-
-        if (AllSettings::GetLayoutRTL())
-            nAngle = 18000 - nAngle;
-        SetRotation( nAngle, true );
-    }
-}
-
-} } // end of namespace svx::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list