include/vcl/salnativewidgets.hxx | 34 ------------------ vcl/inc/scrollbarvalue.hxx | 61 ++++++++++++++++++++++++++++++++++ vcl/osx/salnativewidgets.cxx | 2 + vcl/qt5/QtGraphics_Controls.cxx | 1 vcl/source/control/scrbar.cxx | 1 vcl/source/gdi/salgdilayout.cxx | 1 vcl/source/outdev/nativecontrols.cxx | 1 vcl/unx/gtk3/salnativewidgets-gtk.cxx | 1 8 files changed, 68 insertions(+), 34 deletions(-)
New commits: commit 7bb189c3c2c3fb414484e81b9c6bd2f446784cb3 Author: Deepanshu Sharma <129deepanshusha...@gmail.com> AuthorDate: Fri Mar 21 14:29:56 2025 +0530 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu May 8 07:40:34 2025 +0200 tdf#97228 change scrollbarvalue code from include/vcl to vcl/ Change-Id: I76268d39a8792c87a8fcad23dc3f393c4c596486 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183192 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx index 68fae745e757..903ddfccc29d 100644 --- a/include/vcl/salnativewidgets.hxx +++ b/include/vcl/salnativewidgets.hxx @@ -286,40 +286,6 @@ class VCL_DLLPUBLIC ImplControlValue void setNumericVal( tools::Long nNumeric ) { mNumber = nNumeric; } }; -/* ScrollbarValue: - * - * Value container for scrollbars. - */ -class SAL_DLLPUBLIC_RTTI ScrollbarValue final : public ImplControlValue -{ - public: - tools::Long mnMin; - tools::Long mnMax; - tools::Long mnCur; - tools::Long mnVisibleSize; - tools::Rectangle maThumbRect; - tools::Rectangle maButton1Rect; - tools::Rectangle maButton2Rect; - ControlState mnButton1State; - ControlState mnButton2State; - ControlState mnThumbState; - - ScrollbarValue() - : ImplControlValue( ControlType::Scrollbar, 0 ) - { - mnMin = 0; mnMax = 0; mnCur = 0; mnVisibleSize = 0; - mnButton1State = ControlState::NONE; mnButton2State = ControlState::NONE; - mnThumbState = ControlState::NONE; - }; - virtual ~ScrollbarValue() override; - virtual ScrollbarValue* clone() const override; - - ScrollbarValue(ScrollbarValue const &) = default; - ScrollbarValue(ScrollbarValue &&) = default; - ScrollbarValue & operator =(ScrollbarValue const &) = delete; // due to ImplControlValue - ScrollbarValue & operator =(ScrollbarValue &&) = delete; // due to ImplControlValue -}; - class SAL_DLLPUBLIC_RTTI SliderValue final : public ImplControlValue { public: diff --git a/vcl/inc/scrollbarvalue.hxx b/vcl/inc/scrollbarvalue.hxx new file mode 100644 index 000000000000..823232cefe0e --- /dev/null +++ b/vcl/inc/scrollbarvalue.hxx @@ -0,0 +1,61 @@ +/* -*- 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/. + * + * 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 + +#include <tools/gen.hxx> +#include <vcl/salnativewidgets.hxx> + +/* ScrollbarValue: + * + * Value container for scrollbars. + */ +class ScrollbarValue final : public ImplControlValue +{ +public: + tools::Long mnMin; + tools::Long mnMax; + tools::Long mnCur; + tools::Long mnVisibleSize; + tools::Rectangle maThumbRect; + tools::Rectangle maButton1Rect; + tools::Rectangle maButton2Rect; + ControlState mnButton1State; + ControlState mnButton2State; + ControlState mnThumbState; + + ScrollbarValue() + : ImplControlValue(ControlType::Scrollbar, 0) + { + mnMin = 0; + mnMax = 0; + mnCur = 0; + mnVisibleSize = 0; + mnButton1State = ControlState::NONE; + mnButton2State = ControlState::NONE; + mnThumbState = ControlState::NONE; + }; + virtual ~ScrollbarValue() override; + virtual ScrollbarValue* clone() const override; + + ScrollbarValue(ScrollbarValue const&) = default; + ScrollbarValue(ScrollbarValue&&) = default; + ScrollbarValue& operator=(ScrollbarValue const&) = delete; // due to ImplControlValue + ScrollbarValue& operator=(ScrollbarValue&&) = delete; // due to ImplControlValue +}; +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index b5b7ba7789b6..dd89133353bb 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -36,6 +36,8 @@ #include <Carbon/Carbon.h> #include <postmac.h> +#include <scrollbarvalue.hxx> + #if HAVE_FEATURE_SKIA #include <vcl/skia/SkiaHelper.hxx> #endif diff --git a/vcl/qt5/QtGraphics_Controls.cxx b/vcl/qt5/QtGraphics_Controls.cxx index 513e236f5804..e88135f2f86f 100644 --- a/vcl/qt5/QtGraphics_Controls.cxx +++ b/vcl/qt5/QtGraphics_Controls.cxx @@ -29,6 +29,7 @@ #include <QtTools.hxx> #include <QtGraphicsBase.hxx> #include <vcl/decoview.hxx> +#include <scrollbarvalue.hxx> /** Conversion function between VCL ControlState together with diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 6805ab59baf5..d65094811965 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -25,6 +25,7 @@ #include <vcl/vclevent.hxx> #include <sal/log.hxx> +#include <scrollbarvalue.hxx> /* #i77549# HACK: for scrollbars in case of thumb rect, page up and page down rect we diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 14dd62104fe3..2b465ce19c38 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -31,6 +31,7 @@ #include <rtl/math.hxx> #include <comphelper/lok.hxx> #include <toolbarvalue.hxx> +#include <scrollbarvalue.hxx> // The only common SalFrame method diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index 1b035c72bd2d..655cd623b241 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -27,6 +27,7 @@ #include <salgdi.hxx> #include <toolbarvalue.hxx> #include <menubarvalue.hxx> +#include <scrollbarvalue.hxx> #include <cassert> diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index ad2ff8609894..e185760ba3ef 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -24,6 +24,7 @@ #include <vcl/settings.hxx> #include <unx/fontmanager.hxx> #include <o3tl/string_view.hxx> +#include <scrollbarvalue.hxx> #include <IconThemeSelector.hxx> #include "custom-theme.hxx"