This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO50X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 25cb56c8f675262500581600b7d727ad7c7f8f9c
Author: Jim Jagielski <[email protected]>
AuthorDate: Tue Dec 1 15:48:38 2026 -0500

    vbahelper: use std::unique_ptr instead of std::auto_ptr
    
    From trunk 69e09ba32a. The AOO50X auto_ptr replacement never reached these 
files.
---
 main/vbahelper/inc/vbahelper/vbahelper.hxx    | 2 +-
 main/vbahelper/inc/vbahelper/vbashape.hxx     | 3 ++-
 main/vbahelper/source/msforms/vbacombobox.hxx | 3 ++-
 main/vbahelper/source/msforms/vbacontrol.cxx  | 4 ++--
 main/vbahelper/source/msforms/vbacontrol.hxx  | 2 +-
 main/vbahelper/source/msforms/vbalistbox.hxx  | 3 ++-
 6 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/main/vbahelper/inc/vbahelper/vbahelper.hxx 
b/main/vbahelper/inc/vbahelper/vbahelper.hxx
index 1e78540260..37f35f850c 100644
--- a/main/vbahelper/inc/vbahelper/vbahelper.hxx
+++ b/main/vbahelper/inc/vbahelper/vbahelper.hxx
@@ -190,7 +190,7 @@ public:
 
 class VBAHELPER_DLLPUBLIC ConcreteXShapeGeometryAttributes : public 
AbstractGeometryAttributes
 {
-    std::auto_ptr< ShapeHelper > m_pShapeHelper;
+    std::unique_ptr< ShapeHelper > m_pShapeHelper;
 public:
     ConcreteXShapeGeometryAttributes( const css::uno::Reference< 
css::uno::XComponentContext >& xContext, const css::uno::Reference< 
css::drawing::XShape >& xShape );
     virtual double getLeft() const;
diff --git a/main/vbahelper/inc/vbahelper/vbashape.hxx 
b/main/vbahelper/inc/vbahelper/vbashape.hxx
index a479300616..a7938fb32c 100644
--- a/main/vbahelper/inc/vbahelper/vbashape.hxx
+++ b/main/vbahelper/inc/vbahelper/vbashape.hxx
@@ -33,6 +33,7 @@
 #include <cppuhelper/implbase2.hxx>
 
 #include <vbahelper/vbahelperinterface.hxx>
+#include <memory>
 
 typedef  ::cppu::WeakImplHelper2< ov::msforms::XShape, 
css::lang::XEventListener > ListeningShape;
 
@@ -42,7 +43,7 @@ class VBAHELPER_DLLPUBLIC ScVbaShape : public ScVbaShape_BASE
 {
 private:
 protected:
-    std::auto_ptr< ov::ShapeHelper > m_pShapeHelper;
+    std::unique_ptr< ov::ShapeHelper > m_pShapeHelper;
     css::uno::Reference< css::drawing::XShape > m_xShape;
     css::uno::Reference< css::drawing::XShapes > m_xShapes;
     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
diff --git a/main/vbahelper/source/msforms/vbacombobox.hxx 
b/main/vbahelper/source/msforms/vbacombobox.hxx
index 21068f4438..e383bf4476 100644
--- a/main/vbahelper/source/msforms/vbacombobox.hxx
+++ b/main/vbahelper/source/msforms/vbacombobox.hxx
@@ -34,11 +34,12 @@
 #include "vbacontrol.hxx"
 #include "vbalistcontrolhelper.hxx"
 #include <vbahelper/vbahelper.hxx>
+#include <memory>
 
 typedef cppu::ImplInheritanceHelper2<ScVbaControl, ov::msforms::XComboBox, 
css::script::XDefaultProperty > ComboBoxImpl_BASE;
 class ScVbaComboBox : public ComboBoxImpl_BASE
 {
-       std::auto_ptr< ListControlHelper > mpListHelper;
+       std::unique_ptr< ListControlHelper > mpListHelper;
        rtl::OUString sSourceName;
        rtl::OUString msDftPropName;
        bool mbDialogType;
diff --git a/main/vbahelper/source/msforms/vbacontrol.cxx 
b/main/vbahelper/source/msforms/vbacontrol.cxx
index a17fb96947..1ae663154d 100644
--- a/main/vbahelper/source/msforms/vbacontrol.cxx
+++ b/main/vbahelper/source/msforms/vbacontrol.cxx
@@ -412,7 +412,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 
/*nTabIndex*/ )
     xProps->getPropertyValue( sClassId ) >>= nClassId;
     uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be 
worksheet I guess
     uno::Reference< drawing::XShape > xShape( xControlShape, 
uno::UNO_QUERY_THROW );
-    ::std::auto_ptr< ConcreteXShapeGeometryAttributes > xGeoHelper( new 
ConcreteXShapeGeometryAttributes( xContext, xShape ) );
+    ::std::unique_ptr< ConcreteXShapeGeometryAttributes > xGeoHelper( new 
ConcreteXShapeGeometryAttributes( xContext, xShape ) );
 
     switch( nClassId )
     {
@@ -447,7 +447,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 
/*nTabIndex*/ )
     uno::Reference< lang::XServiceInfo > xServiceInfo( xProps, 
uno::UNO_QUERY_THROW );
     uno::Reference< msforms::XControl > xVBAControl;
     uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be 
worksheet I guess
-    ::std::auto_ptr< UserFormGeometryHelper > xGeoHelper( new 
UserFormGeometryHelper( xContext, xControl, fOffsetX, fOffsetY ) );
+    ::std::unique_ptr< UserFormGeometryHelper > xGeoHelper( new 
UserFormGeometryHelper( xContext, xControl, fOffsetX, fOffsetY ) );
 
     if ( xServiceInfo->supportsService( rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") ) ) )
         xVBAControl.set( new ScVbaCheckbox( xVbaParent, xContext, xControl, 
xModel, xGeoHelper.release() ) );
diff --git a/main/vbahelper/source/msforms/vbacontrol.hxx 
b/main/vbahelper/source/msforms/vbacontrol.hxx
index ca046fea59..e0d6410ccb 100644
--- a/main/vbahelper/source/msforms/vbacontrol.hxx
+++ b/main/vbahelper/source/msforms/vbacontrol.hxx
@@ -49,7 +49,7 @@ protected:
     // whether it is necessary is another question
     ::rtl::OUString m_aControlTag;
 
-    std::auto_ptr< ov::AbstractGeometryAttributes > mpGeometryHelper;
+    std::unique_ptr< ov::AbstractGeometryAttributes > mpGeometryHelper;
     css::uno::Reference< css::beans::XPropertySet > m_xProps;
     css::uno::Reference< css::uno::XInterface > m_xControl;
     css::uno::Reference< css::frame::XModel > m_xModel;
diff --git a/main/vbahelper/source/msforms/vbalistbox.hxx 
b/main/vbahelper/source/msforms/vbalistbox.hxx
index b28ef0f793..410fade23e 100644
--- a/main/vbahelper/source/msforms/vbalistbox.hxx
+++ b/main/vbahelper/source/msforms/vbalistbox.hxx
@@ -32,12 +32,13 @@
 #include <vbahelper/vbapropvalue.hxx>
 #include "vbalistcontrolhelper.hxx"
 #include <vbahelper/vbahelper.hxx>
+#include <memory>
 
 typedef cppu::ImplInheritanceHelper2<ScVbaControl, ov::msforms::XListBox, 
css::script::XDefaultProperty > ListBoxImpl_BASE;
 class ScVbaListBox : public ListBoxImpl_BASE
     ,public PropListener
 {
-       std::auto_ptr< ListControlHelper > mpListHelper;
+       std::unique_ptr< ListControlHelper > mpListHelper;
        rtl::OUString sSourceName;
        rtl::OUString msDftPropName;
 

Reply via email to