summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-23 16:13:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-30 13:15:58 +0100
commit2fd7d760969d8eecc49672b3c8f4c58a5ea1bd4a (patch)
tree7a6997acf8ca64928ee542a29aabe626dbf71982 /svx
parenta7d057acec0e871408d28c782dfed934df40f368 (diff)
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@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/Library_svx.mk1
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx2
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.hxx2
-rw-r--r--svx/source/sidebar/possize/SidebarDialControl.cxx74
4 files changed, 1 insertions, 78 deletions
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: */