chart2/source/controller/dialogs/dlg_Theme.cxx         |   10 +++++-----
 chart2/source/controller/sidebar/ChartThemeControl.cxx |    5 ++---
 chart2/source/controller/sidebar/ChartThemePanel.cxx   |   10 +++++-----
 drawinglayer/source/primitive2d/sceneprimitive2d.cxx   |    4 +++-
 include/drawinglayer/primitive2d/sceneprimitive2d.hxx  |    5 +++++
 include/svx/ChartThemeType.hxx                         |    6 +-----
 6 files changed, 21 insertions(+), 19 deletions(-)

New commits:
commit d430fd85f948d6ff65277a1bb05f317fc07855a9
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Aug 15 15:12:59 2025 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Thu Feb 19 08:10:28 2026 +0100

    WaE: fix build
    
    In my compiler, I'm getting the failure
    chart2/source/controller/dialogs/dlg_Theme.cxx error: redundant move in 
return statement [-Werror=redundant-move]
    138 | return std::move(device1);
    
    gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
    
    Change-Id: I1eb5f405692fad76d95e70df8ca49d2f0f6ec878
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189691
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit da08cbd807ad4ded08576bb15794d006373fecdb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199647
    Reviewed-by: Miklos Vajna <[email protected]>
    Reviewed-by: Justin Luth <[email protected]>

diff --git a/chart2/source/controller/dialogs/dlg_Theme.cxx 
b/chart2/source/controller/dialogs/dlg_Theme.cxx
index e21add16358a..ea81a48b2218 100644
--- a/chart2/source/controller/dialogs/dlg_Theme.cxx
+++ b/chart2/source/controller/dialogs/dlg_Theme.cxx
@@ -20,6 +20,7 @@
 #include <dlg_Theme.hxx>
 
 #include <comphelper/processfactory.hxx>
+#include <drawinglayer/primitive2d/sceneprimitive2d.hxx>
 #include <unotools/fcm.hxx>
 #include <vcl/virdev.hxx>
 #include <ChartModel.hxx>
@@ -112,10 +113,10 @@ VclPtr<VirtualDevice> SchThemeDlg::makeImage(int nIndex)
 
     pController2->PrePaint();
     //pController2->execute_Paint(*device1, tools::Rectangle(0, 0, 
aSize.Width, aSize.Height));
-    bChartThumbnailRendered = true;
+    drawinglayer::primitive2d::bChartThumbnailRendered = true;
     pController2->execute_Paint(*device2,
                                 tools::Rectangle(0, 0, aSize.Width / scale, 
aSize.Height / scale));
-    bChartThumbnailRendered = false;
+    drawinglayer::primitive2d::bChartThumbnailRendered = false;
     aMTF.Stop();
     aMTF.WindStart();
     aMTF.Scale(1 / 64.0, 1 / 64.0);
@@ -123,8 +124,7 @@ VclPtr<VirtualDevice> SchThemeDlg::makeImage(int nIndex)
     aMTF.Play(*device2);
 
     //scale it into a fixed small image
-    ScopedVclPtr<VirtualDevice> device1
-        = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
+    VclPtr<VirtualDevice> device1 = 
VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
     device1->SetOutputSizePixel(Size(ChartThemeThumbSizeX, 
ChartThemeThumbSizeY));
     device1->SetBackground(Wallpaper(COL_YELLOW));
     device1->Erase();
@@ -135,7 +135,7 @@ VclPtr<VirtualDevice> SchThemeDlg::makeImage(int nIndex)
     device1->DrawBitmap(Point(0, 0), aBmpEx);
     device2.disposeAndClear();
 
-    return std::move(device1);
+    return device1;
 }
 
 IMPL_LINK_NOARG(SchThemeDlg, ClickSaveHdl, weld::Button&, void)
diff --git a/chart2/source/controller/sidebar/ChartThemeControl.cxx 
b/chart2/source/controller/sidebar/ChartThemeControl.cxx
index d5791f012cd2..2c431badef38 100644
--- a/chart2/source/controller/sidebar/ChartThemeControl.cxx
+++ b/chart2/source/controller/sidebar/ChartThemeControl.cxx
@@ -197,8 +197,7 @@ ChartThemePopup::~ChartThemePopup()
 
 VclPtr<VirtualDevice> ChartThemePopup::makeImage(int nIndex)
 {
-    ScopedVclPtr<VirtualDevice> device1
-        = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
+    VclPtr<VirtualDevice> device1 = 
VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
     device1->SetOutputSizePixel(Size(ChartThemeThumbSizeX, 
ChartThemeThumbSizeY));
 
     VclPtr<VirtualDevice> pDefaultOut = 
mxControl->mpHandler->makePictureFromThemedChart(nIndex);
@@ -211,7 +210,7 @@ VclPtr<VirtualDevice> ChartThemePopup::makeImage(int nIndex)
         device1->DrawBitmap(Point(0, 0), aBmp);
         pDefaultOut.disposeAndClear();
     }
-    return std::move(device1);
+    return device1;
 }
 
 void ChartThemePopup::GrabFocus() {}
diff --git a/chart2/source/controller/sidebar/ChartThemePanel.cxx 
b/chart2/source/controller/sidebar/ChartThemePanel.cxx
index 0e3d15a45645..71600c1e8c71 100644
--- a/chart2/source/controller/sidebar/ChartThemePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartThemePanel.cxx
@@ -34,6 +34,7 @@
 #include <algorithm>
 
 #include <comphelper/processfactory.hxx>
+#include <drawinglayer/primitive2d/sceneprimitive2d.hxx>
 #include <unotools/fcm.hxx>
 
 using namespace css;
@@ -107,8 +108,7 @@ VclPtr<VirtualDevice> 
ThemeWrapper::makePictureFromThemedChart(sal_uInt32 nIndex
         pController2->setTheme(nIndex);
 
         //make a picture from it
-        ScopedVclPtr<VirtualDevice> device1
-            = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
+        VclPtr<VirtualDevice> device1 = 
VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
 
         awt::Size aSize = mxModel->getVisualAreaSize(1);
 
@@ -127,12 +127,12 @@ VclPtr<VirtualDevice> 
ThemeWrapper::makePictureFromThemedChart(sal_uInt32 nIndex
         device1->SetOutputSize(Size(aSize.Width / scale, aSize.Height / 
scale));
 
         pController2->PrePaint();
-        bChartThumbnailRendered = true;
+        drawinglayer::primitive2d::bChartThumbnailRendered = true;
         pController2->execute_Paint(
             *device1, tools::Rectangle(0, 0, aSize.Width / scale, aSize.Height 
/ scale));
-        bChartThumbnailRendered = false;
+        drawinglayer::primitive2d::bChartThumbnailRendered = false;
 
-        return std::move(device1);
+        return device1;
     }
     return nullptr;
 }
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx 
b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index 2551881272ee..db792876c317 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -131,6 +131,8 @@ namespace
 
 namespace drawinglayer::primitive2d
 {
+        bool bChartThumbnailRendered = false;
+
         bool ScenePrimitive2D::impGetShadow3D() const
         {
             // create on demand
@@ -249,7 +251,7 @@ namespace drawinglayer::primitive2d
             const double fViewVisibleArea(fViewSizeX * fViewSizeY);
             double 
fMaximumVisibleArea(officecfg::Office::Common::Drawinglayer::Quadratic3DRenderLimit::get());
             // Todo: find a better way, to render lower resolution chart 
thumbnails.
-            if (chart::bChartThumbnailRendered)
+            if (bChartThumbnailRendered)
             {
                 fMaximumVisibleArea = fMaximumVisibleArea / 100;
             }
diff --git a/include/drawinglayer/primitive2d/sceneprimitive2d.hxx 
b/include/drawinglayer/primitive2d/sceneprimitive2d.hxx
index 182413a950b5..59cca7947c9c 100644
--- a/include/drawinglayer/primitive2d/sceneprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/sceneprimitive2d.hxx
@@ -31,6 +31,11 @@
 
 namespace drawinglayer::primitive2d
 {
+        // TODO: find a less hacky way to make chart thumnbail render to lower 
resolution
+        // Set this to true only while a thumbnail of a chart is rendered, and 
set it back to false
+        // used in drawinglayer/source/primitive2d/sceneprimitive2d.cxx to 
save performance.
+        extern DRAWINGLAYER_DLLPUBLIC bool bChartThumbnailRendered;
+
         /** ScenePrimitive2D class
 
             This primitive defines a 3D scene as a 2D primitive and is the 
anchor point
diff --git a/include/svx/ChartThemeType.hxx b/include/svx/ChartThemeType.hxx
index bc5dd8ac26e8..22e1c7973163 100644
--- a/include/svx/ChartThemeType.hxx
+++ b/include/svx/ChartThemeType.hxx
@@ -10,6 +10,7 @@
 #pragma once
 
 #include <svl/itempool.hxx>
+#include <svx/svxdllapi.h>
 #include <com/sun/star/uno/Any.h>
 
 //#include <vector>
@@ -23,11 +24,6 @@ constexpr int ChartThemeThumbSizeY = 140;
 
 constexpr OUString sUnoChartTheme = u".uno:ChartTheme"_ustr;
 
-// TODO: find a less hacky way to make chart thumnbail render to lower 
resolution
-// Set this to true only while a thumbnail of a chart is rendered, and set it 
back to false
-// used in drawinglayer/source/primitive2d/sceneprimitive2d.cxx to save 
performance.
-static bool bChartThumbnailRendered = false;
-
 // Properties of a chart element, like Title.
 // At first it contained properties only from Font, and Font Effect dialog tab 
panel.
 // but now, it store other properties. For more info about what properties it 
can store,

Reply via email to