From 892a7be963f5ffdb5af86a9de1cf8a613fbdc162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 25 Sep 2014 15:36:40 +0100 Subject: [PATCH] Resolves: fdo#83010 remove svx::WrapField in favour of a wrap property on NumericField Change-Id: I62c6bdb69a16f37ae6018a2fe41070fb18dbe4a0 --- .../controller/dialogs/res_DataLabel.hxx | 3 +- .../controller/dialogs/tp_AxisLabel.hxx | 3 +- .../controller/dialogs/tp_TitleRotation.hxx | 3 +- chart2/uiconfig/ui/dlg_DataLabel.ui | 183 +++++++++--------- chart2/uiconfig/ui/titlerotationtabpage.ui | 2 +- chart2/uiconfig/ui/tp_DataLabel.ui | 6 +- chart2/uiconfig/ui/tp_PolarOptions.ui | 7 +- chart2/uiconfig/ui/tp_axisLabel.ui | 6 +- cui/source/inc/align.hxx | 3 +- cui/uiconfig/ui/cellalignment.ui | 2 +- .../source/glade/libreoffice-catalog.xml.in | 3 - include/svx/wrapfield.hxx | 50 ----- svx/Library_svx.mk | 1 - svx/source/dialog/wrapfield.cxx | 51 ----- 14 files changed, 109 insertions(+), 214 deletions(-) delete mode 100644 include/svx/wrapfield.hxx delete mode 100644 svx/source/dialog/wrapfield.cxx diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx index 0044e4a9d26e..9d6d0e01cd90 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.hxx +++ b/chart2/source/controller/dialogs/res_DataLabel.hxx @@ -26,7 +26,6 @@ #include #include "TextDirectionListBox.hxx" #include -#include #include class SvNumberFormatter; @@ -64,7 +63,7 @@ private: VclHBox* m_pBxOrientation; svx::DialControl* m_pDC_Dial; FixedText* m_pFT_Dial; - svx::WrapField* m_pNF_Degrees; + NumericField* m_pNF_Degrees; VclHBox* m_pBxTextDirection; TextDirectionListBox* m_pLB_TextDirection; diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx index 059215b911b8..8da5eafcf9c7 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "TextDirectionListBox.hxx" @@ -51,7 +50,7 @@ private: FixedText* m_pFlOrient; svx::DialControl* m_pCtrlDial; FixedText* m_pFtRotate; - svx::WrapField* m_pNfRotate; + NumericField* m_pNfRotate; TriStateBox* m_pCbStacked; svx::OrientationHelper* m_pOrientHlp; diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx index dd3ceb0902d6..0bd5c976b4e3 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include "TextDirectionListBox.hxx" @@ -34,7 +33,7 @@ class SchAlignmentTabPage : public SfxTabPage private: svx::DialControl* m_pCtrlDial; FixedText* m_pFtRotate; - svx::WrapField* m_pNfRotate; + NumericField* m_pNfRotate; TriStateBox* m_pCbStacked; svx::OrientationHelper* m_pOrientHlp; FixedText* m_pFtTextDirection; diff --git a/chart2/uiconfig/ui/dlg_DataLabel.ui b/chart2/uiconfig/ui/dlg_DataLabel.ui index 2910aba77ba1..cd35953f7f80 100644 --- a/chart2/uiconfig/ui/dlg_DataLabel.ui +++ b/chart2/uiconfig/ui/dlg_DataLabel.ui @@ -1,12 +1,101 @@ + - + 359 1 10 + + + + + + + + + + Best fit + 0 + + + Center + 1 + + + Above + 2 + + + Top left + 3 + + + Left + 4 + + + Bottom left + 5 + + + Below + 6 + + + Bottom right + 7 + + + Right + 8 + + + Top right + 9 + + + Inside + 10 + + + Outside + 11 + + + Near origin + 12 + + + + + + + + + + + + + Space + 0 + + + Comma + 1 + + + Semicolon + 2 + + + New line + 3 + + + False 6 @@ -366,13 +455,13 @@ - + True False center - True adjustmentDEGREE + True False @@ -474,94 +563,6 @@ help - - - - - - - - - - Best fit - 0 - - - Center - 1 - - - Above - 2 - - - Top left - 3 - - - Left - 4 - - - Bottom left - 5 - - - Below - 6 - - - Bottom right - 7 - - - Right - 8 - - - Top right - 9 - - - Inside - 10 - - - Outside - 11 - - - Near origin - 12 - - - - - - - - - - - - - Space - 0 - - - Comma - 1 - - - Semicolon - 2 - - - New line - 3 - - - diff --git a/chart2/uiconfig/ui/titlerotationtabpage.ui b/chart2/uiconfig/ui/titlerotationtabpage.ui index 7ee9e7a0c948..6e0eb4356e5e 100644 --- a/chart2/uiconfig/ui/titlerotationtabpage.ui +++ b/chart2/uiconfig/ui/titlerotationtabpage.ui @@ -33,7 +33,7 @@ 6 12 - + True True 40 diff --git a/chart2/uiconfig/ui/tp_DataLabel.ui b/chart2/uiconfig/ui/tp_DataLabel.ui index 798c9350edbc..b31bb2e1f895 100644 --- a/chart2/uiconfig/ui/tp_DataLabel.ui +++ b/chart2/uiconfig/ui/tp_DataLabel.ui @@ -1,6 +1,7 @@ + - + 359 @@ -387,12 +388,13 @@ - + True False center adjustmentDEGREE + True False diff --git a/chart2/uiconfig/ui/tp_PolarOptions.ui b/chart2/uiconfig/ui/tp_PolarOptions.ui index edf84f0a02d7..6f5d8d85ebc9 100644 --- a/chart2/uiconfig/ui/tp_PolarOptions.ui +++ b/chart2/uiconfig/ui/tp_PolarOptions.ui @@ -1,6 +1,7 @@ + - + 359 @@ -85,13 +86,13 @@ - + True False center - True adjustmentDEGREE + True False diff --git a/chart2/uiconfig/ui/tp_axisLabel.ui b/chart2/uiconfig/ui/tp_axisLabel.ui index 4727c9d40eea..74d6fa5f315c 100644 --- a/chart2/uiconfig/ui/tp_axisLabel.ui +++ b/chart2/uiconfig/ui/tp_axisLabel.ui @@ -1,6 +1,7 @@ + - + 359 @@ -255,12 +256,11 @@ 6 12 - + True True 40 - True 1 adjustmentSpinDegrees True diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx index bb249b5822ce..fb5e07ee9338 100644 --- a/cui/source/inc/align.hxx +++ b/cui/source/inc/align.hxx @@ -45,7 +45,6 @@ #include #include #include -#include #include namespace svx { @@ -86,7 +85,7 @@ private: DialControl* m_pCtrlDial; FixedText* m_pFtRotate; - WrapField* m_pNfRotate; + NumericField* m_pNfRotate; FixedText* m_pFtRefEdge; ValueSet* m_pVsRefEdge; TriStateBox* m_pCbStacked; diff --git a/cui/uiconfig/ui/cellalignment.ui b/cui/uiconfig/ui/cellalignment.ui index c4557284d1c5..9e754e34dbf2 100644 --- a/cui/uiconfig/ui/cellalignment.ui +++ b/cui/uiconfig/ui/cellalignment.ui @@ -79,7 +79,7 @@ - + True True diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index 98e5e2679fb9..2d1bb2425f90 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -591,9 +591,6 @@ - diff --git a/include/svx/wrapfield.hxx b/include/svx/wrapfield.hxx deleted file mode 100644 index ff7cf3ada785..000000000000 --- a/include/svx/wrapfield.hxx +++ /dev/null @@ -1,50 +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_WRAPFIELD_HXX -#define INCLUDED_SVX_WRAPFIELD_HXX - -#include -#include - -namespace svx { - - - -/** A numeric spin field that wraps around the value on limits. - @descr Note: Use type "NumericField" in resources. */ -class SVX_DLLPUBLIC WrapField : public NumericField -{ -public: - explicit WrapField( vcl::Window* pParent, WinBits nBits ); - -protected: - /** Up event with wrap-around functionality. */ - virtual void Up() SAL_OVERRIDE; - /** Down event with wrap-around functionality. */ - virtual void Down() SAL_OVERRIDE; -}; - - - -} // namespace svx - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index ccea64fb5b29..f5e5deda67ad 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -150,7 +150,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/dialog/swframeposstrings \ svx/source/dialog/txencbox \ svx/source/dialog/txenctab \ - svx/source/dialog/wrapfield \ svx/source/engine3d/float3d \ svx/source/items/algitem \ svx/source/items/hlnkitem \ diff --git a/svx/source/dialog/wrapfield.cxx b/svx/source/dialog/wrapfield.cxx deleted file mode 100644 index c33ca311563f..000000000000 --- a/svx/source/dialog/wrapfield.cxx +++ /dev/null @@ -1,51 +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/wrapfield.hxx" -#include - -namespace svx { - -WrapField::WrapField( vcl::Window* pParent, WinBits nBits ) : - NumericField( pParent, nBits ) -{ -} - -extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeWrapField(vcl::Window *pParent, VclBuilder::stringmap &) -{ - return new WrapField(pParent, WB_SPIN|WB_REPEAT|WB_BORDER|WB_TABSTOP); -} - -void WrapField::Up() -{ - SetValue( ((GetValue() + GetSpinSize() - GetMin()) % (GetMax() + 1)) + GetMin() ); - GetUpHdl().Call( this ); -} - -void WrapField::Down() -{ - SetValue( ((GetValue() - GetSpinSize() + GetMax() + 1 - GetMin()) % (GetMax() + 1)) + GetMin() ); - GetDownHdl().Call( this ); -} - - - -} // namespace svx - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */