diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-22 09:25:13 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-23 11:30:47 +0200 |
commit | 797ffc29450f46dd6683886e7436453ce9fb4d72 (patch) | |
tree | 91d836ee2369846c972765c3fa0c121abfe95ff5 | |
parent | 6c0a6e2e91069da9db13c27a058721b88e8eaba9 (diff) |
FixedBitmap can be in a toolkit only header
Change-Id: I22bb548f7f0c1ef0de157f99915fbaf6473c284b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96861
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | desktop/source/lib/init.cxx | 2 | ||||
-rw-r--r-- | include/vcl/fixed.hxx | 39 | ||||
-rw-r--r-- | include/vcl/salvtables.hxx | 2 | ||||
-rw-r--r-- | include/vcl/toolkit/fixed.hxx | 63 | ||||
-rw-r--r-- | include/vcl/toolkit/group.hxx | 5 | ||||
-rw-r--r-- | solenv/clang-format/blacklist | 1 | ||||
-rw-r--r-- | sw/source/uibase/docvw/HeaderFooterWin.cxx | 1 | ||||
-rw-r--r-- | toolkit/inc/helper/msgbox.hxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 2 | ||||
-rw-r--r-- | vcl/Executable_svpclient.mk | 4 | ||||
-rw-r--r-- | vcl/inc/hyperlabel.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/messagedialog.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/pch/precompiled_vcl.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/fixed.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/accessibility.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dlgctrl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/tabdlg.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/icontest.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/svpclient.cxx | 2 |
24 files changed, 89 insertions, 60 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 0918b86982d6..d97fa9cf243c 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -148,7 +148,9 @@ #include <vcl/abstdlg.hxx> #include <tools/diagnose_ex.h> #include <vcl/uitest/uiobject.hxx> +#define VCL_INTERNALS 1 #include <vcl/jsdialog/jsdialogbuilder.hxx> +#undef VCL_INTERNALS // Needed for getUndoManager() #include <com/sun/star/document/XUndoManager.hpp> diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx index 9c4005559210..fdfda987b900 100644 --- a/include/vcl/fixed.hxx +++ b/include/vcl/fixed.hxx @@ -21,12 +21,9 @@ #define INCLUDED_VCL_FIXED_HXX #include <vcl/dllapi.h> -#include <vcl/bitmapex.hxx> #include <vcl/ctrl.hxx> -#include <vcl/edit.hxx> #include <vcl/image.hxx> - class VCL_DLLPUBLIC FixedText : public Control { private: @@ -75,16 +72,6 @@ public: vcl::Window* get_mnemonic_widget() const { return m_pMnemonicWindow; } }; -class SelectableFixedText final : public Edit -{ -public: - explicit SelectableFixedText( vcl::Window* pParent, WinBits nStyle ); - - virtual void LoseFocus() override; - virtual void ApplySettings(vcl::RenderContext&) override; -}; - - class VCL_DLLPUBLIC FixedLine : public Control { private: @@ -115,32 +102,6 @@ public: virtual Size GetOptimalSize() const override; }; -class VCL_DLLPUBLIC FixedBitmap final : public Control -{ -private: - BitmapEx maBitmap; - - using Control::ImplInitSettings; - using Window::ImplInit; - SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); - SAL_DLLPRIVATE static WinBits ImplInitStyle( WinBits nStyle ); - SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, const Point& rPos, const Size& rSize ); - -public: - explicit FixedBitmap( vcl::Window* pParent, WinBits nStyle = 0 ); - - virtual void ApplySettings(vcl::RenderContext&) override; - - virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; - virtual void Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags ) override; - virtual void Resize() override; - virtual void StateChanged( StateChangedType nType ) override; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; - - void SetBitmap( const BitmapEx& rBitmap ); -}; - - class VCL_DLLPUBLIC FixedImage : public Control { private: diff --git a/include/vcl/salvtables.hxx b/include/vcl/salvtables.hxx index 7912520059e5..57cb006b7a38 100644 --- a/include/vcl/salvtables.hxx +++ b/include/vcl/salvtables.hxx @@ -16,7 +16,7 @@ #include <vcl/ctrl.hxx> #include <vcl/edit.hxx> #include <vcl/spinfld.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/lstbox.hxx> #include <vcl/menubtn.hxx> #include <vcl/toolkit/combobox.hxx> diff --git a/include/vcl/toolkit/fixed.hxx b/include/vcl/toolkit/fixed.hxx new file mode 100644 index 000000000000..5e495101d71f --- /dev/null +++ b/include/vcl/toolkit/fixed.hxx @@ -0,0 +1,63 @@ +/* -*- 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 . + */ +#pragma once + +#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS) +#error "don't use this in new code" +#endif + +#include <vcl/dllapi.h> +#include <vcl/edit.hxx> +#include <vcl/fixed.hxx> + +class SelectableFixedText final : public Edit +{ +public: + explicit SelectableFixedText( vcl::Window* pParent, WinBits nStyle ); + + virtual void LoseFocus() override; + virtual void ApplySettings(vcl::RenderContext&) override; +}; + +class VCL_DLLPUBLIC FixedBitmap final : public Control +{ +private: + BitmapEx maBitmap; + + using Control::ImplInitSettings; + using Window::ImplInit; + SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); + SAL_DLLPRIVATE static WinBits ImplInitStyle( WinBits nStyle ); + SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, const Point& rPos, const Size& rSize ); + +public: + explicit FixedBitmap( vcl::Window* pParent, WinBits nStyle = 0 ); + + virtual void ApplySettings(vcl::RenderContext&) override; + + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; + virtual void Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags ) override; + virtual void Resize() override; + virtual void StateChanged( StateChangedType nType ) override; + virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; + + void SetBitmap( const BitmapEx& rBitmap ); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/toolkit/group.hxx b/include/vcl/toolkit/group.hxx index 2bbd344dfda1..b6d7da71ee93 100644 --- a/include/vcl/toolkit/group.hxx +++ b/include/vcl/toolkit/group.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_VCL_GROUP_HXX -#define INCLUDED_VCL_GROUP_HXX +#pragma once #if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS) #error "don't use this in new code" @@ -55,6 +54,4 @@ public: virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; }; -#endif // INCLUDED_VCL_GROUP_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index 3ee9a641de25..60739ddcfd9c 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -7453,6 +7453,7 @@ include/vcl/toolkit/combobox.hxx include/vcl/toolkit/controllayout.hxx include/vcl/toolkit/dialog.hxx include/vcl/toolkit/field.hxx +include/vcl/toolkit/fixed.hxx include/vcl/toolkit/fixedhyper.hxx include/vcl/toolkit/group.hxx include/vcl/toolkit/imgctrl.hxx diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index bce5cfcde1f0..c4d933ac9df7 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -44,6 +44,7 @@ #include <drawinglayer/processor2d/baseprocessor2d.hxx> #include <drawinglayer/processor2d/processorfromoutputdevice.hxx> #include <vcl/canvastools.hxx> +#include <vcl/menu.hxx> #include <vcl/metric.hxx> #include <vcl/menubtn.hxx> #include <vcl/svapp.hxx> diff --git a/toolkit/inc/helper/msgbox.hxx b/toolkit/inc/helper/msgbox.hxx index 299c7f9a1e9c..097aa37bc04e 100644 --- a/toolkit/inc/helper/msgbox.hxx +++ b/toolkit/inc/helper/msgbox.hxx @@ -19,7 +19,7 @@ #include <o3tl/typed_flags_set.hxx> #include <helper/btndlg.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> // Window-Bits for MessageBoxen enum class MessBoxStyle diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index b7f6f2f43f91..540eba56a57c 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -89,7 +89,7 @@ #include <vcl/edit.hxx> #include <vcl/event.hxx> #include <vcl/toolkit/field.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/toolkit/fixedhyper.hxx> #include <vcl/floatwin.hxx> #include <vcl/fmtfield.hxx> diff --git a/vcl/Executable_svpclient.mk b/vcl/Executable_svpclient.mk index 3d92f2ebc481..3861cd16e5fa 100644 --- a/vcl/Executable_svpclient.mk +++ b/vcl/Executable_svpclient.mk @@ -22,6 +22,10 @@ $(eval $(call gb_Executable_set_include,svpclient,\ -I$(SRCDIR)/vcl/inc \ )) +$(eval $(call gb_Executable_add_defs,svpclient,\ + -DVCL_INTERNALS \ +)) + $(eval $(call gb_Executable_use_libraries,svpclient,\ tl \ sal \ diff --git a/vcl/inc/hyperlabel.hxx b/vcl/inc/hyperlabel.hxx index c43dbb469df7..20076a89b253 100644 --- a/vcl/inc/hyperlabel.hxx +++ b/vcl/inc/hyperlabel.hxx @@ -21,7 +21,7 @@ #include <memory> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> namespace vcl { diff --git a/vcl/inc/messagedialog.hxx b/vcl/inc/messagedialog.hxx index 679767be7920..d2d19dc3b205 100644 --- a/vcl/inc/messagedialog.hxx +++ b/vcl/inc/messagedialog.hxx @@ -12,7 +12,7 @@ #include <vcl/toolkit/dialog.hxx> #include <vcl/layout.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> class MessageDialog : public Dialog { diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx index db0a1d307c02..c115104f821c 100644 --- a/vcl/inc/pch/precompiled_vcl.hxx +++ b/vcl/inc/pch/precompiled_vcl.hxx @@ -283,7 +283,6 @@ #include <vcl/dockwin.hxx> #include <vcl/edit.hxx> #include <vcl/event.hxx> -#include <vcl/fixed.hxx> #include <vcl/floatwin.hxx> #include <vcl/fntstyle.hxx> #include <vcl/font.hxx> @@ -318,6 +317,7 @@ #include <vcl/toolbox.hxx> #include <vcl/toolkit/button.hxx> #include <vcl/toolkit/dialog.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/toolkit/unowrap.hxx> #include <vcl/transfer.hxx> #include <vcl/treelist.hxx> diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 6d11b07444d0..ff441c6a5b18 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -46,7 +46,7 @@ #include <vcl/builder.hxx> #include <vcl/toolkit/combobox.hxx> #include <vcl/toolkit/dialog.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/toolkit/fixedhyper.hxx> #include <vcl/fmtfield.hxx> #include <vcl/headbar.hxx> diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 1f9e2573e144..afc27c18dd5c 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -26,7 +26,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/toolkit/dialog.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/toolkit/button.hxx> #include <vcl/salnativewidgets.hxx> #include <vcl/edit.hxx> diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 4a3b7c10d0b6..dcecf67e4def 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -19,7 +19,7 @@ #include <vcl/decoview.hxx> #include <vcl/event.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/settings.hxx> #include <comphelper/string.hxx> diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index 169c69451c5f..059585233a4d 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -18,7 +18,7 @@ */ #include <vcl/layout.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/window.hxx> #include <vcl/menu.hxx> #include <vcl/wrkwin.hxx> diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 7837320d30b5..cbb41e48056b 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -28,7 +28,7 @@ #include <vcl/toolkit/field.hxx> #include <vcl/fieldvalues.hxx> #include <vcl/fmtfield.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/toolkit/fixedhyper.hxx> #include <vcl/headbar.hxx> #include <vcl/IPrioritable.hxx> diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 903a731405ce..30bba9b05c20 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -23,7 +23,7 @@ #include "dlgctrl.hxx" #include <vcl/event.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/layout.hxx> #include <vcl/svapp.hxx> #include <vcl/tabpage.hxx> diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index ab0f026d0a48..0bcf1e3e0e23 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/layout.hxx> #include <vcl/tabctrl.hxx> #include <vcl/toolkit/tabdlg.hxx> diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 438d6fc306fe..c0429c9b76be 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -32,7 +32,7 @@ #include <vcl/syswin.hxx> #include <vcl/dockwin.hxx> #include <vcl/wall.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/taskpanelist.hxx> #include <vcl/toolkit/unowrap.hxx> #include <vcl/lazydelete.hxx> diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 6e5bbc372cb9..cf0c74ca2d59 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -24,7 +24,7 @@ #include <vcl/toolkit/dialog.hxx> #include <vcl/event.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/layout.hxx> #include <vcl/timer.hxx> #include <vcl/window.hxx> diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx index 4b2bb7303e8b..ea6cb3e7195a 100644 --- a/vcl/workben/icontest.cxx +++ b/vcl/workben/icontest.cxx @@ -34,7 +34,7 @@ #include <vcl/builder.hxx> #include <vcl/toolkit/button.hxx> #include <vcl/toolkit/dialog.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/graph.hxx> #include <vcl/graphicfilter.hxx> #include <vcl/image.hxx> diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx index 5d7cf8b9aae8..23bfcf37911e 100644 --- a/vcl/workben/svpclient.cxx +++ b/vcl/workben/svpclient.cxx @@ -31,7 +31,7 @@ #include <vcl/wrkwin.hxx> #include <vcl/button.hxx> #include <vcl/lstbox.hxx> -#include <vcl/fixed.hxx> +#include <vcl/toolkit/fixed.hxx> #include <vcl/bitmapex.hxx> #include <vcl/graphicfilter.hxx> #include <vcl/graph.hxx> |