[Libreoffice-commits] core.git: 2 commits - chart2/source cui/source extras/source include/svx solenv/clang-format solenv/sanitizers svx/Library_svx.mk svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Oct 14 13:03:25 UTC 2018
chart2/source/controller/dialogs/tp_TitleRotation.hxx | 1
cui/source/inc/align.hxx | 1
extras/source/glade/libreoffice-catalog.xml.in | 3
include/svx/orienthelper.hxx | 92 -----------
solenv/clang-format/blacklist | 2
solenv/sanitizers/ui/modules/schart.suppr | 4
svx/Library_svx.mk | 1
svx/source/dialog/dialcontrol.cxx | 2
svx/source/dialog/orienthelper.cxx | 149 ------------------
9 files changed, 255 deletions(-)
New commits:
commit 21a6a6832bbbb57e7d2d9f372ab7f2eec6525f22
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 13 20:43:36 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 14 15:03:14 2018 +0200
drop now unused orienthelper
Change-Id: I6a33104002ecb304a65e930320595a082049faa9
Reviewed-on: https://gerrit.libreoffice.org/61750
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
index 217f2e73a543..7520a84eee4d 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
@@ -21,7 +21,6 @@
#include <sfx2/tabdlg.hxx>
#include <svx/dialcontrol.hxx>
-#include <svx/orienthelper.hxx>
#include <vcl/customweld.hxx>
#include <vcl/weld.hxx>
#include <TextDirectionListBox.hxx>
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index 669cac0467e0..5c96ec25aa30 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -36,7 +36,6 @@
#define ALIGNDLG_VERALIGN_DISTRIBUTED 5
-#include <svx/orienthelper.hxx>
#include <vcl/field.hxx>
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
diff --git a/include/svx/orienthelper.hxx b/include/svx/orienthelper.hxx
deleted file mode 100644
index 6fb516f831b0..000000000000
--- a/include/svx/orienthelper.hxx
+++ /dev/null
@@ -1,92 +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_ORIENTHELPER_HXX
-#define INCLUDED_SVX_ORIENTHELPER_HXX
-
-#include <memory>
-#include <vcl/window.hxx>
-#include <svx/svxdllapi.h>
-
-class NumericField;
-class CheckBox;
-
-namespace svx {
-
-class DialControl;
-
-
-struct OrientationHelper_Impl;
-
-/** A helper class that manages a DialControl and a "Stacked text" check box.
-
- This helper remembers a DialControl for entering a rotation angle, and a
- check box for stacked text, that enables/disables other controls dependent
- on its state.
-
- It is possible to register more controls that have to be enabled/disabled
- together with this helper object (optionally dependent on the stacked text
- check box), using the function AddDependentWindow(). All registered windows
- are handled on a call of Enable(), or Show(), or on changing the state of
- the "Stacked text" check box.
-
- Note: The member function SetStackedState() should be used instead of
- direct modifications of the "Stacked text" check box. Otherwise the update
- mechanism of registered controls will not work.
- */
-class SVX_DLLPUBLIC OrientationHelper final
-{
-public:
- /** @param rNfRotation A numeric field that will be connected to the DialControl. */
- explicit OrientationHelper(
- DialControl& rCtrlDial,
- NumericField& rNfRotation,
- CheckBox& rCbStacked );
-
- ~OrientationHelper();
-
- /** Registers the passed window to be enabled/disabled on call of Enable().
- @param eDisableIfStacked
- TRISTATE_TRUE: Window always disabled, if stacked text is turned on.
- TRISTATE_FALSE: Window always disabled, if stacked text is turned off.
- TRISTATE_INDET: Window will be enabled/disabled independent from stacked text. */
- void AddDependentWindow( vcl::Window& rWindow, TriState eDisableIfStacked = TRISTATE_INDET );
-
- /** Enables or disables the dial control and all dependent windows. */
- void Enable( bool bEnable = true );
-
- /** Shows or hides the dial control and all dependent windows. */
- void Show( bool bShow );
- /** Hides the dial control and all dependent windows. */
- void Hide() { Show( false ); }
-
- /** Sets the "stacked" check box to the passed state and updates dependent controls. */
- void SetStackedState( TriState eState );
- /** Returns the state of the "stacked" check box. */
- TriState GetStackedState() const;
-
-private:
- std::unique_ptr< OrientationHelper_Impl > mpImpl;
-};
-
-} // namespace
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 7aba9fc878b3..24ee47bc52d7 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -7287,7 +7287,6 @@ include/svx/objfac3d.hxx
include/svx/ofaitem.hxx
include/svx/optgenrl.hxx
include/svx/optgrid.hxx
-include/svx/orienthelper.hxx
include/svx/pagectrl.hxx
include/svx/pageitem.hxx
include/svx/pagenumberlistbox.hxx
@@ -14226,7 +14225,6 @@ svx/source/dialog/langbox.cxx
svx/source/dialog/linkwarn.cxx
svx/source/dialog/measctrl.cxx
svx/source/dialog/optgrid.cxx
-svx/source/dialog/orienthelper.cxx
svx/source/dialog/pagectrl.cxx
svx/source/dialog/pagenumberlistbox.cxx
svx/source/dialog/papersizelistbox.cxx
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 3c374744b314..b9acb5e380e5 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -139,7 +139,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/dialog/linkwarn \
svx/source/dialog/measctrl \
svx/source/dialog/optgrid \
- svx/source/dialog/orienthelper \
svx/source/dialog/pagectrl \
svx/source/dialog/paraprev \
svx/source/dialog/passwd \
diff --git a/svx/source/dialog/orienthelper.cxx b/svx/source/dialog/orienthelper.cxx
deleted file mode 100644
index 7be0ea70058d..000000000000
--- a/svx/source/dialog/orienthelper.cxx
+++ /dev/null
@@ -1,149 +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/orienthelper.hxx>
-
-#include <vector>
-#include <utility>
-
-#include <vcl/button.hxx>
-#include <svx/dialcontrol.hxx>
-
-namespace svx {
-
-
-struct OrientationHelper_Impl
-{
- typedef std::pair< VclPtr<vcl::Window>, TriState > WindowPair;
- typedef std::vector< WindowPair > WindowVec;
-
- CheckBox& mrCbStacked;
- WindowVec maWinVec;
- bool mbEnabled;
- bool mbVisible;
-
- explicit OrientationHelper_Impl( DialControl& rCtrlDial, CheckBox& rCbStacked );
-
- void AddDependentWindow( vcl::Window& rWindow, TriState eDisableIfStacked );
-
- void EnableDependentWindows();
- void EnableWindow( vcl::Window& rWindow, TriState eDisableIfStacked );
-
- void ShowDependentWindows();
-
- DECL_LINK( ClickHdl, Button*, void );
-};
-
-
-OrientationHelper_Impl::OrientationHelper_Impl( DialControl& rCtrlDial, CheckBox& rCbStacked ) :
- mrCbStacked( rCbStacked ),
- mbEnabled( rCtrlDial.IsEnabled() ),
- mbVisible( rCtrlDial.IsVisible() )
-{
- maWinVec.emplace_back( &rCtrlDial, TRISTATE_TRUE );
- maWinVec.emplace_back( &mrCbStacked, TRISTATE_INDET );
- mrCbStacked.SetClickHdl( LINK( this, OrientationHelper_Impl, ClickHdl ) );
-}
-
-void OrientationHelper_Impl::AddDependentWindow( vcl::Window& rWindow, TriState eDisableIfStacked )
-{
- maWinVec.emplace_back( &rWindow, eDisableIfStacked );
- EnableWindow( rWindow, eDisableIfStacked );
-}
-
-void OrientationHelper_Impl::EnableDependentWindows()
-{
- WindowVec::const_iterator aEnd = maWinVec.end();
- for( WindowVec::iterator aIt = maWinVec.begin(); aIt != aEnd; ++aIt )
- EnableWindow( *aIt->first, aIt->second );
-}
-
-void OrientationHelper_Impl::EnableWindow( vcl::Window& rWindow, TriState eDisableIfStacked )
-{
- bool bDisableOnStacked = false;
- switch( eDisableIfStacked )
- {
- // TRISTATE_TRUE: Disable window, if stacked text is turned on or "don't know".
- case TRISTATE_TRUE: bDisableOnStacked = (mrCbStacked.GetState() != TRISTATE_FALSE); break;
- // TRISTATE_FALSE: Disable window, if stacked text is turned off or "don't know".
- case TRISTATE_FALSE: bDisableOnStacked = (mrCbStacked.GetState() != TRISTATE_TRUE); break;
- default: ;//prevent warning
- }
- rWindow.Enable( mbEnabled && !bDisableOnStacked );
-}
-
-void OrientationHelper_Impl::ShowDependentWindows()
-{
- WindowVec::const_iterator aEnd = maWinVec.end();
- for( WindowVec::iterator aIt = maWinVec.begin(); aIt != aEnd; ++aIt )
- aIt->first->Show( mbVisible );
-}
-
-IMPL_LINK_NOARG(OrientationHelper_Impl, ClickHdl, Button*, void)
-{
- EnableDependentWindows();
-}
-
-
-OrientationHelper::OrientationHelper( DialControl& rCtrlDial, NumericField& rNfRotation, CheckBox& rCbStacked ) :
- mpImpl( new OrientationHelper_Impl( rCtrlDial, rCbStacked ) )
-{
- rCtrlDial.SetLinkedField( &rNfRotation );
- mpImpl->EnableDependentWindows();
- mpImpl->ShowDependentWindows();
-}
-
-OrientationHelper::~OrientationHelper()
-{
-}
-
-void OrientationHelper::AddDependentWindow( vcl::Window& rWindow, TriState eDisableIfStacked )
-{
- mpImpl->AddDependentWindow( rWindow, eDisableIfStacked );
-}
-
-void OrientationHelper::Enable( bool bEnable )
-{
- mpImpl->mbEnabled = bEnable;
- mpImpl->EnableDependentWindows();
-}
-
-void OrientationHelper::Show( bool bShow )
-{
- mpImpl->mbVisible = bShow;
- mpImpl->ShowDependentWindows();
-}
-
-void OrientationHelper::SetStackedState( TriState eState )
-{
- if( eState != GetStackedState() )
- {
- mpImpl->mrCbStacked.SetState( eState );
- mpImpl->EnableDependentWindows();
- }
-}
-
-TriState OrientationHelper::GetStackedState() const
-{
- return mpImpl->mrCbStacked.GetState();
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 11d9225b9e7b6fb1d20997163cf2aa3e4f65531e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 13 20:41:33 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 14 15:03:04 2018 +0200
svxlo-DialControl gone from .uis now
Change-Id: I70c83a0c87b49048d0bb7c85a287f23d2c45b868
Reviewed-on: https://gerrit.libreoffice.org/61749
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 4b137ec7d030..27a9e815670b 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -366,9 +366,6 @@
<glade-widget-class title="Pivot Table Data List" name="sclo-ScPivotLayoutTreeListData"
generic-name="Pivot Table Data List" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
- <glade-widget-class title="Dial Control" name="svxlo-DialControl"
- generic-name="Dial Control" parent="GtkSpinner"
- icon-name="widget-gtk-spinner"/>
<glade-widget-class title="Sidebar Dial Control" name="svxlo-SidebarDialControl"
generic-name="Sidebar Dial Control" parent="GtkSpinner"
icon-name="widget-gtk-spinner"/>
diff --git a/solenv/sanitizers/ui/modules/schart.suppr b/solenv/sanitizers/ui/modules/schart.suppr
index 08e253eb8f0f..9d4d00d02d9a 100644
--- a/solenv/sanitizers/ui/modules/schart.suppr
+++ b/solenv/sanitizers/ui/modules/schart.suppr
@@ -1,6 +1,5 @@
chart2/uiconfig/ui/dlg_DataLabel.ui://GtkLabel[@id='CT_LABEL_DIAL'] orphan-label
chart2/uiconfig/ui/dlg_DataLabel.ui://GtkLabel[@id='STR_DLG_NUMBERFORMAT_FOR_PERCENTAGE_VALUE'] orphan-label
-chart2/uiconfig/ui/dlg_DataLabel.ui://svxlo-DialControl[@id='CT_DIAL'] no-labelled-by
chart2/uiconfig/ui/dlg_DataLabel.ui://GtkSpinButton[@id='NF_LABEL_DEGREES'] no-labelled-by
chart2/uiconfig/ui/dlg_DataLabel.ui://GtkLabel[@id='FT_LABEL_DEGREES'] orphan-label
chart2/uiconfig/ui/dlg_InsertErrorBars.ui://GtkRadioButton[@id='RB_FUNCTION'] button-no-label
@@ -24,13 +23,11 @@ chart2/uiconfig/ui/smoothlinesdlg.ui://GtkLabel[@id='TypeLabel'] orphan-label
chart2/uiconfig/ui/smoothlinesdlg.ui://GtkComboBoxText[@id='SplineTypeComboBox'] no-labelled-by
chart2/uiconfig/ui/titlerotationtabpage.ui://GtkSpinButton[@id='OrientDegree'] no-labelled-by
chart2/uiconfig/ui/titlerotationtabpage.ui://GtkLabel[@id='degreeL'] orphan-label
-chart2/uiconfig/ui/titlerotationtabpage.ui://svxlo-DialControl[@id='dialCtrl'] no-labelled-by
chart2/uiconfig/ui/titlerotationtabpage.ui://GtkLabel[@id='labelABCD'] orphan-label
chart2/uiconfig/ui/titlerotationtabpage.ui://GtkLabel[@id='textdirL'] orphan-label
chart2/uiconfig/ui/titlerotationtabpage.ui://chartcontrollerlo-TextDirectionListBox[@id='textdirLB'] no-labelled-by
chart2/uiconfig/ui/tp_axisLabel.ui://GtkSpinButton[@id='OrientDegree'] no-labelled-by
chart2/uiconfig/ui/tp_axisLabel.ui://GtkLabel[@id='degreeL'] orphan-label
-chart2/uiconfig/ui/tp_axisLabel.ui://svxlo-DialControl[@id='dialCtrl'] no-labelled-by
chart2/uiconfig/ui/tp_axisLabel.ui://GtkLabel[@id='labelABCD'] orphan-label
chart2/uiconfig/ui/tp_axisLabel.ui://GtkLabel[@id='textdirL'] orphan-label
chart2/uiconfig/ui/tp_axisLabel.ui://chartcontrollerlo-TextDirectionListBox[@id='textdirLB'] no-labelled-by
@@ -38,7 +35,6 @@ chart2/uiconfig/ui/tp_ChartType.ui://GtkLabel[@id='FT_CAPTION_FOR_WIZARD'] orpha
chart2/uiconfig/ui/tp_ChartType.ui://GtkTreeView[@id='charttype:border'] no-labelled-by
chart2/uiconfig/ui/tp_DataLabel.ui://GtkLabel[@id='CT_LABEL_DIAL'] orphan-label
chart2/uiconfig/ui/tp_DataLabel.ui://GtkLabel[@id='STR_DLG_NUMBERFORMAT_FOR_PERCENTAGE_VALUE'] orphan-label
-chart2/uiconfig/ui/tp_DataLabel.ui://svxlo-DialControl[@id='CT_DIAL'] no-labelled-by
chart2/uiconfig/ui/tp_DataLabel.ui://GtkSpinButton[@id='NF_LABEL_DEGREES'] no-labelled-by
chart2/uiconfig/ui/tp_DataLabel.ui://GtkLabel[@id='FT_LABEL_DEGREES'] orphan-label
chart2/uiconfig/ui/tp_DataSource.ui://GtkLabel[@id='FT_CAPTION_FOR_WIZARD'] orphan-label
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index 59b5d60a0f55..4b5a0cf427a8 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -262,8 +262,6 @@ DialControl::DialControl( vcl::Window* pParent, WinBits nBits ) :
Init( GetOutputSizePixel() );
}
-VCL_BUILDER_FACTORY_ARGS(DialControl, WB_TABSTOP)
-
void DialControl::Resize()
{
mpImpl->SetSize(GetOutputSizePixel());
More information about the Libreoffice-commits
mailing list