[Libreoffice-commits] core.git: 8 commits - chart2/source embeddedobj/source svtools/source svx/source

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Sep 29 11:26:11 PDT 2013


 chart2/source/controller/dialogs/DataBrowser.hxx                  |    3 +-
 chart2/source/controller/dialogs/DataBrowserModel.hxx             |    4 ++-
 chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx |    2 -
 chart2/source/controller/dialogs/TitleDialogData.cxx              |    4 +--
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx      |    7 ++---
 chart2/source/controller/dialogs/tp_ChartType.cxx                 |   12 +++-------
 chart2/source/controller/dialogs/tp_DataSource.hxx                |    3 --
 chart2/source/controller/dialogs/tp_LegendPosition.hxx            |    5 +---
 chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx   |    8 +++---
 chart2/source/controller/inc/TimerTriggeredControllerLock.hxx     |    5 ++--
 chart2/source/controller/inc/TitleDialogData.hxx                  |   12 +++-------
 chart2/source/controller/main/ChartController_Insert.cxx          |    6 ++---
 chart2/source/controller/main/ElementSelector.cxx                 |    2 -
 chart2/source/controller/main/ElementSelector.hxx                 |    4 +--
 chart2/source/model/main/ChartModel.hxx                           |    5 +---
 chart2/source/model/main/ChartModel_Persistence.cxx               |    2 -
 chart2/source/model/main/DataPoint.hxx                            |    3 --
 chart2/source/view/axes/VCartesianCoordinateSystem.cxx            |    3 --
 chart2/source/view/axes/VPolarRadiusAxis.cxx                      |    2 -
 chart2/source/view/axes/VPolarRadiusAxis.hxx                      |    5 +---
 chart2/source/view/inc/VSeriesPlotter.hxx                         |    2 -
 embeddedobj/source/commonembedding/visobj.cxx                     |    6 -----
 svtools/source/uno/contextmenuhelper.cxx                          |    2 -
 svx/source/xoutdev/xattr.cxx                                      |   10 +++++---
 24 files changed, 50 insertions(+), 67 deletions(-)

New commits:
commit 140e5eabbfa6f91dc34d2d8181e0ee0508a5a271
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 29 18:44:32 2013 +0200

    replace more auto_ptr with scoped_ptr
    
    Change-Id: Ia96fcc857e028c7c14186b9560153e7580e6b4fb

diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index f892f0b..55d3904 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -304,7 +304,7 @@ uno::Reference< awt::XWindow > SAL_CALL ElementSelectorToolbarController::create
         Window* pParent = VCLUnoHelper::GetWindow( xParent );
         if( pParent )
         {
-            m_apSelectorListBox = ::std::auto_ptr< SelectorListBox >( new SelectorListBox( pParent, WB_DROPDOWN|WB_AUTOHSCROLL|WB_BORDER ) );
+            m_apSelectorListBox.reset( new SelectorListBox( pParent, WB_DROPDOWN|WB_AUTOHSCROLL|WB_BORDER ) );
             ::Size aLogicalSize( 95, 160 );
             ::Size aPixelSize = m_apSelectorListBox->LogicToPixel( aLogicalSize, MAP_APPFONT );
             m_apSelectorListBox->SetSizePixel( aPixelSize );
diff --git a/chart2/source/controller/main/ElementSelector.hxx b/chart2/source/controller/main/ElementSelector.hxx
index e5db87e..ed4714d 100644
--- a/chart2/source/controller/main/ElementSelector.hxx
+++ b/chart2/source/controller/main/ElementSelector.hxx
@@ -28,7 +28,7 @@
 #include <vcl/lstbox.hxx>
 #include <cppuhelper/weakref.hxx>
 
-#include <memory>
+#include <boost/scoped_ptr.hpp>
 
 namespace chart
 {
@@ -100,7 +100,7 @@ private:
 
 private:
     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>        m_xCC;
-    ::std::auto_ptr< SelectorListBox > m_apSelectorListBox;
+    boost::scoped_ptr< SelectorListBox > m_apSelectorListBox;
 };
 
 } //namespace chart
diff --git a/chart2/source/model/main/ChartModel.hxx b/chart2/source/model/main/ChartModel.hxx
index ee36ddd..9752c3b 100644
--- a/chart2/source/model/main/ChartModel.hxx
+++ b/chart2/source/model/main/ChartModel.hxx
@@ -66,8 +66,7 @@
 #include <cppuhelper/interfacecontainer.hxx>
 #include <svtools/grfmgr.hxx>
 
-// for auto_ptr
-#include <memory>
+#include <boost/scoped_ptr.hpp>
 
 class SvNumberFormatter;
 
@@ -149,7 +148,7 @@ private:
                                 m_xOwnNumberFormatsSupplier;
     ::com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >
                                 m_xNumberFormatsSupplier;
-    std::auto_ptr< SvNumberFormatter > m_apSvNumberFormatter; // #i113784# avoid memory leak
+    boost::scoped_ptr< SvNumberFormatter > m_apSvNumberFormatter; // #i113784# avoid memory leak
 
     ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeManager >
         m_xChartTypeManager;
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index b8e37ef..eebf278 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -623,7 +623,7 @@ void ChartModel::impl_loadGraphics(
 
                     if( xElementStream.is() )
                     {
-                        std::auto_ptr< SvStream > apIStm(
+                        boost::scoped_ptr< SvStream > apIStm(
                             ::utl::UcbStreamHelper::CreateStream(
                                 xElementStream, true ) );
 
diff --git a/chart2/source/model/main/DataPoint.hxx b/chart2/source/model/main/DataPoint.hxx
index cbe7a98..b95a9fa 100644
--- a/chart2/source/model/main/DataPoint.hxx
+++ b/chart2/source/model/main/DataPoint.hxx
@@ -32,9 +32,6 @@
 #include "ModifyListenerHelper.hxx"
 #include "ServiceMacros.hxx"
 
-//for auto_ptr
-#include <memory>
-
 namespace chart
 {
 
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.cxx b/chart2/source/view/axes/VPolarRadiusAxis.cxx
index 0a2133c..4b6d8e2 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.cxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.cxx
@@ -41,7 +41,7 @@ VPolarRadiusAxis::VPolarRadiusAxis( const AxisProperties& rAxisProperties
     m_aAxisProperties.m_aLabelAlignment=LABEL_ALIGN_RIGHT;
     m_aAxisProperties.init();
 
-    m_apAxisWithLabels = std::auto_ptr<VCartesianAxis>( new VCartesianAxis(
+    m_apAxisWithLabels.reset( new VCartesianAxis(
         m_aAxisProperties,xNumberFormatsSupplier,1/*nDimensionIndex*/,nDimensionCount
         ,new PolarPlottingPositionHelper() ) );
 }
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.hxx b/chart2/source/view/axes/VPolarRadiusAxis.hxx
index 7d16ffb..126817b 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.hxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.hxx
@@ -20,8 +20,7 @@
 #define _CHART2_VPOLARRADIUSAXIS_HXX
 
 #include "VPolarAxis.hxx"
-
-#include <memory>
+#include <boost/scoped_ptr.hpp>
 
 namespace chart
 {
@@ -74,7 +73,7 @@ protected: //methods
     virtual bool prepareShapeCreation();
 
 private: //member
-    std::auto_ptr<VCartesianAxis>  m_apAxisWithLabels;
+    boost::scoped_ptr<VCartesianAxis>  m_apAxisWithLabels;
 };
 
 } //namespace chart
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index 970bc1b..33dc8e9 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -398,7 +398,7 @@ protected:
     long m_nTimeResolution;
     Date m_aNullDate;
 
-    ::std::auto_ptr< NumberFormatterWrapper > m_apNumberFormatterWrapper;
+    boost::scoped_ptr< NumberFormatterWrapper > m_apNumberFormatterWrapper;
     AxesNumberFormats                         m_aAxesNumberFormats;//direct numberformats on axes, if empty ask the data series instead
 
     ::com::sun::star::uno::Reference<
commit d3affcac9a74065d8cf566a5288447856b84d59b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 29 18:37:59 2013 +0200

    remove unused include
    
    Change-Id: I5d2c9bbb45c3a1f058cf3ec0e5a2a255ce83cefe

diff --git a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
index 6c63d09..fe1aab8 100644
--- a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
@@ -25,9 +25,6 @@
 #include "AxisHelper.hxx"
 #include "ChartTypeHelper.hxx"
 
-//for auto_ptr
-#include <memory>
-
 namespace chart
 {
 using namespace ::com::sun::star;
commit f77dedbc97cdddcc0c6dec2e8721049e9041b72f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 29 18:36:53 2013 +0200

    remove a few more auto_ptr
    
    Change-Id: I316d5c91bf80ab46f8f29f4986295d48fc4427e7

diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index cdc63da..cb5311b 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -33,9 +33,6 @@
 // header for define RET_OK
 #include <vcl/msgbox.hxx>
 
-//for auto_ptr
-#include <memory>
-
 namespace chart
 {
 using namespace ::com::sun::star;
@@ -605,15 +602,14 @@ private:
     FixedText   m_aFT_LineType;
     ListBox     m_aLB_LineType;
     PushButton  m_aPB_DetailsDialog;
-    ::std::auto_ptr< SplinePropertiesDialog > m_pSplinePropertiesDialog;
-    ::std::auto_ptr< SteppedPropertiesDialog > m_pSteppedPropertiesDialog;
+    boost::scoped_ptr< SplinePropertiesDialog > m_pSplinePropertiesDialog;
+    boost::scoped_ptr< SteppedPropertiesDialog > m_pSteppedPropertiesDialog;
 };
 SplineResourceGroup::SplineResourceGroup( Window* pWindow )
         : ChangingResource()
         , m_aFT_LineType( pWindow, SchResId( FT_LINETYPE ) )
         , m_aLB_LineType( pWindow, SchResId( LB_LINETYPE ) )
         , m_aPB_DetailsDialog( pWindow, SchResId( PB_SPLINE_DIALOG ) )
-        , m_pSplinePropertiesDialog()
 {
     m_aLB_LineType.InsertEntry(SCH_RESSTR(STR_LINETYPE_STRAIGHT));
     m_aLB_LineType.InsertEntry(SCH_RESSTR(STR_LINETYPE_SMOOTH));
@@ -640,14 +636,14 @@ SplineResourceGroup::~SplineResourceGroup()
 SplinePropertiesDialog& SplineResourceGroup::getSplinePropertiesDialog()
 {
     if( !m_pSplinePropertiesDialog.get() )
-        m_pSplinePropertiesDialog = ::std::auto_ptr< SplinePropertiesDialog >( new SplinePropertiesDialog( m_aPB_DetailsDialog.GetParent() ) );
+        m_pSplinePropertiesDialog.reset( new SplinePropertiesDialog( m_aPB_DetailsDialog.GetParent() ) );
     return *m_pSplinePropertiesDialog;
 }
 SteppedPropertiesDialog& SplineResourceGroup::getSteppedPropertiesDialog()
 {
     if( !m_pSteppedPropertiesDialog.get() )
     {
-        m_pSteppedPropertiesDialog = ::std::auto_ptr< SteppedPropertiesDialog >( new SteppedPropertiesDialog( m_aPB_DetailsDialog.GetParent() ) );
+        m_pSteppedPropertiesDialog.reset( new SteppedPropertiesDialog( m_aPB_DetailsDialog.GetParent() ) );
     }
     return *m_pSteppedPropertiesDialog;
 }
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index c83e86c..2fcdece 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -44,7 +44,6 @@
 
 #include <utility>
 #include <vector>
-#include <memory>
 
 #include "RangeSelectionListener.hxx"
 #include "RangeSelectionButton.hxx"
@@ -129,7 +128,7 @@ protected:
 private:
     FixedText               m_aFT_CAPTION;
     FixedText               m_aFT_SERIES;
-    ::std::auto_ptr< SvTreeListBox > m_apLB_SERIES;
+    boost::scoped_ptr< SvTreeListBox > m_apLB_SERIES;
     PushButton              m_aBTN_ADD;
     PushButton              m_aBTN_REMOVE;
     PushButton              m_aBTN_UP;
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
index 7715cd8..1258880 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
@@ -23,8 +23,7 @@
 #include <sfx2/tabdlg.hxx>
 // header for FixedText
 #include <vcl/fixed.hxx>
-//for auto_ptr
-#include <memory>
+
 #include "TextDirectionListBox.hxx"
 
 namespace chart
@@ -36,7 +35,7 @@ class SchLegendPosTabPage : public SfxTabPage
 private:
     FixedLine   aGrpLegend;
 
-    ::std::auto_ptr< LegendPositionResources >   m_apLegendPositionResources;
+    boost::scoped_ptr< LegendPositionResources >   m_apLegendPositionResources;
 
     FixedLine           m_aFlTextOrient;
     FixedText               m_aFtTextDirection;
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
index 753b603..d73aaff 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
@@ -26,10 +26,10 @@
 #include <svtools/wizardmachine.hxx>
 #include <vcl/edit.hxx>
 #include <vcl/fixed.hxx>
-//for auto_ptr
-#include <memory>
 #include <com/sun/star/uno/XComponentContext.hpp>
 
+#include <boost/scoped_ptr.hpp>
+
 namespace chart
 {
 
@@ -59,8 +59,8 @@ protected:
     FixedText           m_aFT_TitleDescription;
     FixedLine           m_aFL_Vertical;
 
-    ::std::auto_ptr< TitleResources >            m_apTitleResources;
-    ::std::auto_ptr< LegendPositionResources >   m_apLegendPositionResources;
+    boost::scoped_ptr< TitleResources >            m_apTitleResources;
+    boost::scoped_ptr< LegendPositionResources >   m_apLegendPositionResources;
 
     FixedLine           m_aFL_Grids;
     CheckBox            m_aCB_Grid_X;
commit 00669d59762347d1ccdc34be0fa15cf8444715ef
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 29 18:27:20 2013 +0200

    replace some auto_ptr with boost::scoped_ptr in chart2
    
    Change-Id: I45abfdee2e4a4e51d2066afc867e730008579814

diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx
index 31f471e..ee3b0a0 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -28,6 +28,7 @@
 #include <vector>
 #include <memory>
 #include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
 
 namespace com { namespace sun { namespace star {
     namespace chart2 {
@@ -152,7 +153,7 @@ public:
 private:
     ::com::sun::star::uno::Reference<
             ::com::sun::star::chart2::XChartDocument > m_xChartDoc;
-    ::std::auto_ptr< DataBrowserModel > m_apDataBrowserModel;
+    boost::scoped_ptr< DataBrowserModel > m_apDataBrowserModel;
 
     typedef ::std::vector< ::boost::shared_ptr< impl::SeriesHeader > > tSeriesHeaderContainer;
     tSeriesHeaderContainer m_aSeriesHeaders;
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.hxx b/chart2/source/controller/dialogs/DataBrowserModel.hxx
index 62e3e2f..51086e2 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.hxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.hxx
@@ -25,6 +25,8 @@
 #include <memory>
 #include <vector>
 
+#include <boost/scoped_ptr.hpp>
+
 namespace com { namespace sun { namespace star { namespace chart2 {
     class XDataSeries;
     class XChartType;
@@ -155,7 +157,7 @@ private:
             ::com::sun::star::chart2::XChartDocument > m_xChartDocument;
     ::com::sun::star::uno::Reference<
             ::com::sun::star::uno::XComponentContext > m_xContext;
-    ::std::auto_ptr< DialogModel > m_apDialogModel;
+    boost::scoped_ptr< DialogModel > m_apDialogModel;
 
     struct tDataColumn;
     struct implColumnLess;
diff --git a/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
index a4c4a55..42e2e09 100644
--- a/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
+++ b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
@@ -43,7 +43,7 @@ TimerTriggeredControllerLock::~TimerTriggeredControllerLock()
 void TimerTriggeredControllerLock::startTimer()
 {
     if(!m_apControllerLockGuard.get())
-        m_apControllerLockGuard = std::auto_ptr< ControllerLockGuard >( new  ControllerLockGuard(m_xModel) );
+        m_apControllerLockGuard.reset( new  ControllerLockGuard(m_xModel) );
     m_aTimer.Start();
 }
 IMPL_LINK_NOARG(TimerTriggeredControllerLock, TimerTimeout)
diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx b/chart2/source/controller/dialogs/TitleDialogData.cxx
index f015394..1a918b4 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -27,11 +27,11 @@ namespace chart
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 
-TitleDialogData::TitleDialogData( ::std::auto_ptr< ReferenceSizeProvider > apRefSizeProvider )
+TitleDialogData::TitleDialogData( ReferenceSizeProvider* pRefSizeProvider )
         : aPossibilityList(7)
         , aExistenceList(7)
         , aTextList(7)
-        , apReferenceSizeProvider( apRefSizeProvider )
+        , apReferenceSizeProvider( pRefSizeProvider )
 {
     sal_Int32 nN = 0;
     for(nN=7;nN--;)
diff --git a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
index d356671..7387bc4 100644
--- a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
+++ b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/frame/XModel.hpp>
 
 #include <memory>
+#include <boost/scoped_ptr.hpp>
 
 namespace chart
 {
@@ -39,8 +40,8 @@ public:
 
 private:
     ::com::sun::star::uno::Reference<
-            ::com::sun::star::frame::XModel >   m_xModel;
-    std::auto_ptr< ControllerLockGuard >        m_apControllerLockGuard;
+            ::com::sun::star::frame::XModel > m_xModel;
+    boost::scoped_ptr< ControllerLockGuard > m_apControllerLockGuard;
     AutoTimer       m_aTimer;
 
     DECL_LINK( TimerTimeout, void* );
diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx
index ea1e3cb..4fb158c 100644
--- a/chart2/source/controller/inc/TitleDialogData.hxx
+++ b/chart2/source/controller/inc/TitleDialogData.hxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 
 #include <memory>
+#include <boost/scoped_ptr.hpp>
 
 namespace chart
 {
@@ -36,14 +37,9 @@ struct TitleDialogData
     ::com::sun::star::uno::Sequence< sal_Bool > aPossibilityList;
     ::com::sun::star::uno::Sequence< sal_Bool > aExistenceList;
     ::com::sun::star::uno::Sequence< OUString > aTextList;
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< ReferenceSizeProvider >    apReferenceSizeProvider;
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    TitleDialogData( ::std::auto_ptr< ReferenceSizeProvider > apRefSizeProvider =
-                     ::std::auto_ptr< ReferenceSizeProvider >( 0 ));
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    boost::scoped_ptr< ReferenceSizeProvider > apReferenceSizeProvider;
+
+    TitleDialogData(ReferenceSizeProvider* pReferenzeSizeProvider = NULL);
 
     void readFromModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
     /* return true if anything has changed;
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index ee1498c..4313502 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -121,7 +121,7 @@ void ChartController::executeDispatch_InsertAxes()
 
             InsertAxisOrGridDialogData aDialogOutput;
             aDlg.getResult( aDialogOutput );
-            ::std::auto_ptr< ReferenceSizeProvider > mpRefSizeProvider(
+            boost::scoped_ptr< ReferenceSizeProvider > mpRefSizeProvider(
                 impl_createReferenceSizeProvider());
             bool bChanged = AxisHelper::changeVisibilityOfAxes( xDiagram
                 , aDialogInput.aExistenceList, aDialogOutput.aExistenceList, m_xCC
@@ -188,7 +188,7 @@ void ChartController::executeDispatch_InsertTitles()
         {
             // lock controllers till end of block
             ControllerLockGuard aCLGuard( getModel() );
-            TitleDialogData aDialogOutput( impl_createReferenceSizeProvider());
+            TitleDialogData aDialogOutput( impl_createReferenceSizeProvider().release());
             aDlg.getResult( aDialogOutput );
             bool bChanged = aDialogOutput.writeDifferenceToModel( getModel(), m_xCC, &aDialogInput );
             if( bChanged )
@@ -730,7 +730,7 @@ void ChartController::executeDispatch_InsertAxisTitle()
             else
                 eTitleType = TitleHelper::Z_AXIS_TITLE;
 
-            ::std::auto_ptr< ReferenceSizeProvider > apRefSizeProvider( impl_createReferenceSizeProvider());
+            boost::scoped_ptr< ReferenceSizeProvider > apRefSizeProvider( impl_createReferenceSizeProvider());
             xTitle = TitleHelper::createTitle( eTitleType, ObjectNameProvider::getTitleNameByType(eTitleType), getModel(), m_xCC, apRefSizeProvider.get() );
             aUndoGuard.commit();
         }
commit e880a88834e2a34163ece6eb4ca62d8244d6155c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 29 16:27:58 2013 +0200

    fix undefined behavior with out-of-bounds substring access
    
    Change-Id: Ie40d3dd2947d41b62eae84f20cfe457d69cc4bfe

diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index a2ac5d2..1014317 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -220,9 +220,13 @@ OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_u
                     }
                     else
                     {
-                        sal_Int32 nThisIndex = pEntry->GetName().copy( aUser.getLength() ).toInt32();
-                        if( nThisIndex >= nUserIndex )
-                            nUserIndex = nThisIndex + 1;
+                        OUString aEntryName = pEntry->GetName();
+                        if(aEntryName.getLength() >= aUser.getLength())
+                        {
+                            sal_Int32 nThisIndex = aEntryName.copy( aUser.getLength() ).toInt32();
+                            if( nThisIndex >= nUserIndex )
+                                nUserIndex = nThisIndex + 1;
+                        }
                     }
                 }
             }
commit 383622a30da5cd5128e0b775eb4f75f40a1d4426
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 29 13:29:35 2013 +0200

    show chart context menu entries again
    
    Change-Id: If4ff5188af95a7b5274d88ced41ceaae2bb7fd0b

diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx
index e18fc08..7c8abc6 100644
--- a/svtools/source/uno/contextmenuhelper.cxx
+++ b/svtools/source/uno/contextmenuhelper.cxx
@@ -588,7 +588,7 @@ ContextMenuHelper::completeMenuProperties(
                 else
                     pMenu->SetItemImage( nId, Image() );
 
-                if (!pMenu->GetItemText(nId).isEmpty())
+                if (pMenu->GetItemText(nId).isEmpty())
                 {
                     OUString aLabel( getLabelFromCommandURL( aCmdURL ));
                     pMenu->SetItemText( nId, aLabel );
commit 0c377feb71d34cc2c0596249f6910dcb2b0d2e30
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 29 13:29:23 2013 +0200

    no need for this temporary object
    
    Change-Id: I207e8fa781721ed20c306a8c581af1bc03b5d8f2

diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index bdeaa35..65b69b4 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -52,15 +52,14 @@ LightButton::LightButton( Window* pParent, const ResId& rResId, sal_Int32 nLight
     SetModeImage( Image( SVX_RES(RID_SVXIMAGE_LIGHT_OFF)   ) );
 
     OUString aTipHelpStr( SCH_RESSTR(STR_TIP_LIGHTSOURCE_X) );
-    OUString aTipHelp( aTipHelpStr  );
     const OUString aReplacementStr( "%LIGHTNUMBER" );
-    sal_Int32 nIndex = aTipHelp.indexOf( aReplacementStr );
+    sal_Int32 nIndex = aTipHelpStr.indexOf( aReplacementStr );
     if( nIndex != -1 )
     {
-        aTipHelp = aTipHelp.replaceAt(nIndex, aReplacementStr.getLength(),
+        aTipHelpStr = aTipHelpStr.replaceAt(nIndex, aReplacementStr.getLength(),
             OUString::number( nLightNumber ) );
     }
-    this->SetQuickHelpText( aTipHelp );
+    this->SetQuickHelpText( aTipHelpStr );
 }
 
 LightButton::~LightButton()
commit e4168dabd27af2d34db43a100b8cddcf18d68870
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 29 12:25:13 2013 +0200

    don't use SAL_WARN to log calls
    
    Change-Id: Ia9ac8ff7d187cab9d158ffe97fb2d5faca269638

diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx
index 046be33..c913a85 100644
--- a/embeddedobj/source/commonembedding/visobj.cxx
+++ b/embeddedobj/source/commonembedding/visobj.cxx
@@ -35,8 +35,6 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const
                 uno::Exception,
                 uno::RuntimeException )
 {
-    SAL_WARN( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::setVisualAreaSize" );
-
     ::osl::MutexGuard aGuard( m_aMutex );
     if ( m_bDisposed )
         throw lang::DisposedException(); // TODO
@@ -77,8 +75,6 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
                 uno::Exception,
                 uno::RuntimeException )
 {
-    SAL_WARN( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::getVisualAreaSize" );
-
     ::osl::MutexGuard aGuard( m_aMutex );
     if ( m_bDisposed )
         throw lang::DisposedException(); // TODO
@@ -160,8 +156,6 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe
                 uno::Exception,
                 uno::RuntimeException )
 {
-    SAL_WARN( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::getPrefferedVisualRepresentation" );
-
     ::osl::MutexGuard aGuard( m_aMutex );
     if ( m_bDisposed )
         throw lang::DisposedException(); // TODO


More information about the Libreoffice-commits mailing list