solenv/clang-format/excludelist                      |    1 
 sw/Library_sw.mk                                     |    1 
 sw/source/uibase/sidebar/ValueSetWithTextControl.cxx |  119 -------------------
 sw/source/uibase/sidebar/ValueSetWithTextControl.hxx |   58 ---------
 4 files changed, 179 deletions(-)

New commits:
commit cc82bd201d12edf4ae4e2edcee9a87e83871b661
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Nov 27 22:31:11 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Nov 28 08:14:31 2025 +0100

    tdf#136905 tdf#169710 sw: Drop now unused ValueSetWithTextControl
    
    This class is now unused after
    
        Change-Id: I21038e65c2bf0d7b931f38c49a7da9a596983f36
        commit f43f93eb1c0afc9274e1e309eef74d242ccf5e4b
        Author: Michael Weghorn <[email protected]>
        Date:   Thu Nov 27 22:29:52 2025 +0100
    
            tdf#136905 tdf#169710 Use TreeView in PageSizeControl
    
    , so drop it.
    
    This finishes handling this aspect from
    earlier commit
    
        commit ab2846a3d628e239464bc026391e96088ff2db0c
        Author: Michael Weghorn <[email protected]>
        Date:   Mon Nov 24 11:47:16 2025 +0100
    
            Move ValueSetWithTextControl from svx to sw
    
    :
    
    > (And I think that using existing
    > weld::Widgets instead of having that custom
    > logic would be preferred, too, so this control
    > also shouldn't be more widely used in the
    > future. See also discussion in tdf#169637.)
    
    Change-Id: I39d7523adab81dd4e128c7bbdf050f4137ed6a76
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194743
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 9a003aa914cd..cb3e4262b181 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -13134,7 +13134,6 @@ sw/source/uibase/sidebar/StylePresetsPanel.hxx
 sw/source/uibase/sidebar/SwPanelFactory.cxx
 sw/source/uibase/sidebar/ThemePanel.cxx
 sw/source/uibase/sidebar/ThemePanel.hxx
-sw/source/uibase/sidebar/ValueSetWithTextControl.cxx
 sw/source/uibase/sidebar/WrapPropertyPanel.cxx
 sw/source/uibase/sidebar/WrapPropertyPanel.hxx
 sw/source/uibase/table/chartins.cxx
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index d3f93ee1bb17..f887b4fa24e9 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -744,7 +744,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
     sw/source/uibase/sidebar/TableEditPanel \
     sw/source/uibase/sidebar/ThemePanel \
     sw/source/uibase/sidebar/SwPanelFactory \
-    sw/source/uibase/sidebar/ValueSetWithTextControl \
     sw/source/uibase/sidebar/WriterInspectorTextPanel \
     sw/source/uibase/sidebar/CommentsPanel \
     sw/source/uibase/sidebar/A11yCheckIssuesPanel \
diff --git a/sw/source/uibase/sidebar/ValueSetWithTextControl.cxx 
b/sw/source/uibase/sidebar/ValueSetWithTextControl.cxx
deleted file mode 100644
index 5240e19b78c2..000000000000
--- a/sw/source/uibase/sidebar/ValueSetWithTextControl.cxx
+++ /dev/null
@@ -1,119 +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 "ValueSetWithTextControl.hxx"
-
-#include <sfx2/sidebar/Theme.hxx>
-#include <svtools/valueset.hxx>
-#include <vcl/event.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/svapp.hxx>
-
-namespace sw::sidebar {
-
-ValueSetWithTextControl::ValueSetWithTextControl()
-    : ValueSet(nullptr)
-{
-}
-
-void ValueSetWithTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
-{
-    ValueSet::SetDrawingArea(pDrawingArea);
-
-    Size aSize(250, 300);
-    pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
-    SetOutputSizePixel(aSize);
-
-    SetColCount();
-}
-
-void ValueSetWithTextControl::AddItem(
-    const OUString& rItemText,
-    const OUString& rItemText2 )
-{
-    ValueSetWithTextItem aItem;
-    aItem.maItemText = rItemText;
-    aItem.maItemText2 = rItemText2;
-
-    maItems.push_back( aItem );
-
-    InsertItem( maItems.size() );
-    SetItemText( maItems.size(), rItemText );
-}
-
-void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
-{
-    const tools::Rectangle aRect = rUDEvt.GetRect();
-    vcl::RenderContext* pDev = rUDEvt.GetRenderContext();
-    auto popIt = pDev->ScopedPush();
-    const sal_uInt16 nItemId = rUDEvt.GetItemId();
-
-    const tools::Long nRectHeight = aRect.GetHeight();
-
-    vcl::Font 
aFont(Application::GetSettings().GetStyleSettings().GetLabelFont());
-    {
-        Size aSize = aFont.GetFontSize();
-        aSize.setHeight( (nRectHeight*4)/9 );
-        aFont.SetFontSize( aSize );
-    }
-
-    {
-        //draw background
-        if ( GetSelectedItemId() == nItemId )
-        {
-            tools::Rectangle aBackRect = aRect;
-            aBackRect.AdjustTop(3 );
-            aBackRect.AdjustBottom( -2 );
-            pDev->SetFillColor( sfx2::sidebar::Theme::GetColor( 
sfx2::sidebar::Theme::Color_Highlight ) );
-            pDev->DrawRect(aBackRect);
-        }
-        else
-        {
-            
pDev->SetFillColor(Application::GetSettings().GetStyleSettings().GetMenuBarColor());
-            pDev->DrawRect(aRect);
-        }
-
-        if ( GetSelectedItemId() == nItemId )
-        {
-            aFont.SetColor( sfx2::sidebar::Theme::GetColor( 
sfx2::sidebar::Theme::Color_HighlightText ) );
-        }
-        else
-        {
-            aFont.SetColor( 
Application::GetSettings().GetStyleSettings().GetFieldTextColor() );
-        }
-
-        tools::Rectangle aStrRect = aRect;
-        aStrRect.AdjustTop(nRectHeight/4 );
-        aStrRect.AdjustBottom( -(nRectHeight/4) );
-
-        const tools::Long nRectWidth = aRect.GetWidth();
-        aStrRect.AdjustLeft(8 );
-        aStrRect.AdjustRight( -((nRectWidth*2)/3) );
-        pDev->SetFont(aFont);
-        pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText, 
DrawTextFlags::EndEllipsis);
-        aStrRect.AdjustLeft(nRectWidth/3 );
-        aStrRect.AdjustRight((nRectWidth*2)/3 );
-        pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText2, 
DrawTextFlags::EndEllipsis);
-    }
-
-    Invalidate( aRect );
-}
-
-} // end of namespace sw::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/sidebar/ValueSetWithTextControl.hxx 
b/sw/source/uibase/sidebar/ValueSetWithTextControl.hxx
deleted file mode 100644
index 751567915b7e..000000000000
--- a/sw/source/uibase/sidebar/ValueSetWithTextControl.hxx
+++ /dev/null
@@ -1,58 +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 .
- */
-#pragma once
-
-#include <svx/svxdllapi.h>
-
-#include <svtools/valueset.hxx>
-
-#include <vector>
-
-namespace sw::sidebar
-{
-/** Specialization of class <ValueSet>.
-    This specialization allows is a one-columned ValueSet which allow
-    items containing an image and a text or a text and a second text.
-
-    Especially, used for sidebar related controls.
-*/
-class ValueSetWithTextControl final : public ValueSet
-{
-public:
-    ValueSetWithTextControl();
-
-    virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
-
-    void AddItem(const OUString& rItemText, const OUString& rItemText2);
-
-    virtual void UserDraw(const UserDrawEvent& rUDEvt) override;
-
-private:
-    struct ValueSetWithTextItem
-    {
-        OUString maItemText;
-        OUString maItemText2;
-    };
-
-    ::std::vector<ValueSetWithTextItem> maItems;
-};
-
-} // end of namespace sw::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to