From 48912b3516ef7790ba5e18c000e88cbb1989587f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 31 Aug 2019 12:52:39 +0100 Subject: drop some unnecessary includes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic3ccc7f0e93258cce30a42c71011154bc9313f52 Reviewed-on: https://gerrit.libreoffice.org/78343 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- dbaccess/source/ui/dlg/adminpages.cxx | 4 ---- dbaccess/source/ui/dlg/detailpages.hxx | 4 ---- dbaccess/source/ui/dlg/dlgsave.cxx | 3 --- dbaccess/source/ui/dlg/generalpage.hxx | 3 --- dbaccess/source/ui/inc/curledit.hxx | 2 -- extensions/source/abpilot/abpfinalpage.hxx | 1 - include/vcl/edit.hxx | 14 +------------- include/vcl/textfilter.hxx | 31 ++++++++++++++++++++++++++++++ sc/source/ui/inc/colorformat.hxx | 1 - sc/source/ui/inc/editfield.hxx | 1 - sc/source/ui/optdlg/tpformula.cxx | 1 - sd/source/ui/dlg/headerfooterdlg.cxx | 8 +------- sfx2/source/doc/templatedlg.cxx | 2 -- sw/source/ui/dbui/mmaddressblockpage.hxx | 2 +- sw/source/uibase/inc/glossary.hxx | 2 +- sw/source/uibase/inc/instable.hxx | 2 +- sw/source/uibase/inc/optload.hxx | 2 +- sw/source/uibase/inc/swrenamexnameddlg.hxx | 2 +- 18 files changed, 38 insertions(+), 47 deletions(-) create mode 100644 include/vcl/textfilter.hxx diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 3672e247de5c..1133a0961e5c 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -34,10 +34,6 @@ #include #include -#include -#include -#include -#include #include #include diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index ead3a3af6c24..da0f28fbb942 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -23,10 +23,6 @@ #include "adminpages.hxx" #include #include -#include -#include -#include -#include #include "TextConnectionHelper.hxx" #include "admincontrols.hxx" diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index 09c950d02b99..ebd84975853a 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -27,9 +27,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 63d8736ea38b..2b18c1c80ca9 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -22,9 +22,6 @@ #include "adminpages.hxx" #include -#include -#include -#include namespace dbaui { diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx index f87695ef7e3d..1b53358c4f77 100644 --- a/dbaccess/source/ui/inc/curledit.hxx +++ b/dbaccess/source/ui/inc/curledit.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_CURLEDIT_HXX #define INCLUDED_DBACCESS_SOURCE_UI_INC_CURLEDIT_HXX -#include -#include #include #include diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx index 915ec6abc932..a4d7330c9f59 100644 --- a/extensions/source/abpilot/abpfinalpage.hxx +++ b/extensions/source/abpilot/abpfinalpage.hxx @@ -24,7 +24,6 @@ #include "abptypes.hxx" #include -#include #include namespace abp diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index bc18f3a412e6..f5b1bd6e7ff1 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -21,6 +21,7 @@ #define INCLUDED_VCL_EDIT_HXX #include +#include #include @@ -52,19 +53,6 @@ struct Impl_IMEInfos; typedef OUString (*FncGetSpecialChars)( weld::Widget* pWin, const vcl::Font& rFont ); -class VCL_DLLPUBLIC TextFilter -{ -private: - OUString sForbiddenChars; -public: - void SetForbiddenChars(const OUString& rSet) { sForbiddenChars = rSet; } - - virtual OUString filter(const OUString &rText); - - TextFilter(const OUString &rForbiddenChars = OUString(" ")); - virtual ~TextFilter(); -}; - class Timer; class VCL_DLLPUBLIC Edit : public Control, public vcl::unohelper::DragAndDropClient diff --git a/include/vcl/textfilter.hxx b/include/vcl/textfilter.hxx new file mode 100644 index 000000000000..603daafd97c8 --- /dev/null +++ b/include/vcl/textfilter.hxx @@ -0,0 +1,31 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ +#ifndef INCLUDED_VCL_TEXTFILTER_HXX +#define INCLUDED_VCL_TEXTFILTER_HXX + +#include +#include + +class VCL_DLLPUBLIC TextFilter +{ +private: + OUString sForbiddenChars; + +public: + void SetForbiddenChars(const OUString& rSet) { sForbiddenChars = rSet; } + + virtual OUString filter(const OUString& rText); + + TextFilter(const OUString& rForbiddenChars = OUString(" ")); + virtual ~TextFilter(); +}; + +#endif // INCLUDED_VCL_TEXTFILTER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sc/source/ui/inc/colorformat.hxx b/sc/source/ui/inc/colorformat.hxx index 16330783675a..2c243c756f54 100644 --- a/sc/source/ui/inc/colorformat.hxx +++ b/sc/source/ui/inc/colorformat.hxx @@ -13,7 +13,6 @@ #include #include #include -#include struct ScDataBarFormatData; class ScDocument; diff --git a/sc/source/ui/inc/editfield.hxx b/sc/source/ui/inc/editfield.hxx index 359ab20549ad..1986790ad953 100644 --- a/sc/source/ui/inc/editfield.hxx +++ b/sc/source/ui/inc/editfield.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_SC_SOURCE_UI_INC_EDITFIELD_HXX #define INCLUDED_SC_SOURCE_UI_INC_EDITFIELD_HXX -#include #include /** An edit control that contains a double precision floating-point value. */ diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index abdd14a99f3f..c948608ae76b 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -27,7 +27,6 @@ #include #include #include "calcoptionsdlg.hxx" -#include #include diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 9145304ab2c4..320e6fe54695 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -27,11 +27,6 @@ #include #include -#include -#include -#include -#include - #include #include #include @@ -40,13 +35,12 @@ #include // preview control for presentation layout -#include #include #include #include #include #include -#include +#include #include #include diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index f3c91a28c767..54cd6ffd96d8 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -39,8 +39,6 @@ #include #include #include -#include -#include #include #include diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index 910110814740..ff4efd8ee1d7 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx index 899b3a7bea1b..596ca184813b 100644 --- a/sw/source/uibase/inc/glossary.hxx +++ b/sw/source/uibase/inc/glossary.hxx @@ -19,8 +19,8 @@ #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_GLOSSARY_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_GLOSSARY_HXX -#include #include +#include #include #include diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx index f71f17575179..3145227e84a1 100644 --- a/sw/source/uibase/inc/instable.hxx +++ b/sw/source/uibase/inc/instable.hxx @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "wrtsh.hxx" #include "autoformatpreview.hxx" diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index d49924b961bf..d277a4d89e26 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/sw/source/uibase/inc/swrenamexnameddlg.hxx b/sw/source/uibase/inc/swrenamexnameddlg.hxx index b847d54e7ac4..381f9e7a35b2 100644 --- a/sw/source/uibase/inc/swrenamexnameddlg.hxx +++ b/sw/source/uibase/inc/swrenamexnameddlg.hxx @@ -19,7 +19,7 @@ #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SWRENAMEXNAMEDDLG_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_SWRENAMEXNAMEDDLG_HXX -#include +#include #include #include #include -- cgit