accessibility/source/extended/AccessibleBrowseBox.cxx | 6 accessibility/source/extended/AccessibleGridControl.cxx | 6 accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx | 2 accessibility/source/extended/accessibleeditbrowseboxcell.cxx | 2 accessibility/source/extended/accessiblelistboxentry.cxx | 2 accessibility/source/extended/accessibletabbarbase.cxx | 2 accessibility/source/extended/accessibletabbarpagelist.cxx | 14 - accessibility/source/extended/textwindowaccessibility.cxx | 2 accessibility/source/standard/vclxaccessiblecheckbox.cxx | 4 chart2/source/controller/inc/DrawViewWrapper.hxx | 2 chart2/source/controller/inc/ObjectHierarchy.hxx | 2 chart2/source/controller/inc/dlg_DataSource.hxx | 4 chart2/source/controller/main/ChartController.cxx | 2 chart2/source/controller/main/ChartController.hxx | 6 chart2/source/controller/main/ControllerCommandDispatch.hxx | 4 chart2/source/inc/ConfigColorScheme.hxx | 2 chart2/source/view/main/VDataSeries.cxx | 8 - codemaker/source/codemaker/exceptiontree.cxx | 2 codemaker/source/javamaker/javatype.cxx | 80 ++-------- compilerplugins/clang/unusedvariablecheck.cxx | 2 cppcanvas/source/mtfrenderer/implrenderer.cxx | 5 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx | 24 +-- cppcanvas/source/mtfrenderer/transparencygroupaction.hxx | 8 - cppuhelper/source/factory.cxx | 2 cui/source/dialogs/scriptdlg.cxx | 32 +--- cui/source/factory/dlgfact.cxx | 2 cui/source/inc/passwdomdlg.hxx | 2 cui/source/inc/scriptdlg.hxx | 4 28 files changed, 90 insertions(+), 143 deletions(-)
New commits: commit 7561a0f9a2df9231596576af9f8b78f4f3621270 Author: Noel Grandin <n...@peralex.com> Date: Mon Sep 29 10:26:14 2014 +0200 loplugin: cstylecast Change-Id: Ie5cbad7ee18b0ecbca5df97808431be577449c32 Signed-off-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index 1215c78..fbb8a02 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -76,7 +76,7 @@ AccessibleBrowseBox::AccessibleBrowseBox( void AccessibleBrowseBox::setCreator( const Reference< XAccessible >& _rxCreator ) { #if OSL_DEBUG_LEVEL > 0 - Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator; + Reference< XAccessible > xCreator(m_pImpl->m_aCreator); OSL_ENSURE( !xCreator.is(), "accessibility/extended/AccessibleBrowseBox::setCreator: creator already set!" ); #endif m_pImpl->m_aCreator = _rxCreator; @@ -250,7 +250,7 @@ AccessibleBrowseBox::implGetHeaderBar( AccessibleBrowseBoxObjType eObjType ) if( !pxMember->is() ) { AccessibleBrowseBoxHeaderBar* pHeaderBar = new AccessibleBrowseBoxHeaderBar( - (Reference< XAccessible >)m_pImpl->m_aCreator, *mpBrowseBox, eObjType ); + m_pImpl->m_aCreator, *mpBrowseBox, eObjType ); if ( BBTYPE_COLUMNHEADERBAR == eObjType) m_pImpl->m_pColumnHeaderBar = pHeaderBar; @@ -286,7 +286,7 @@ AccessibleBrowseBox::implGetFixedChild( sal_Int32 nChildIndex ) AccessibleBrowseBoxTable* AccessibleBrowseBox::createAccessibleTable() { - Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator; + Reference< XAccessible > xCreator(m_pImpl->m_aCreator); OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleBrowseBox::createAccessibleTable: my creator died - how this?" ); return new AccessibleBrowseBoxTable( xCreator, *mpBrowseBox ); } diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 23f2f9c..1f927ad 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -275,7 +275,7 @@ AccessibleGridControl::implGetHeaderBar( AccessibleTableControlObjType eObjType if( !pxMember->is() ) { AccessibleGridControlHeader* pHeaderBar = new AccessibleGridControlHeader( - (Reference< XAccessible >)m_pImpl->m_aCreator, m_aTable, eObjType ); + m_pImpl->m_aCreator, m_aTable, eObjType ); if ( TCTYPE_COLUMNHEADERBAR == eObjType) m_pImpl->m_pColumnHeaderBar = pHeaderBar; @@ -310,8 +310,8 @@ AccessibleGridControl::implGetFixedChild( sal_Int32 nChildIndex ) AccessibleGridControlTable* AccessibleGridControl::createAccessibleTable() { - Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator; - OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleGirdControl::createAccessibleTable: my creator died - how this?" ); + Reference< XAccessible > xCreator(m_pImpl->m_aCreator); + OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleGirdControl::createAccessibleTable: my creator died - how this?" ); return new AccessibleGridControlTable( xCreator, m_aTable, TCTYPE_TABLE ); } diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx index 658c5e9..8554192 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx @@ -196,7 +196,7 @@ namespace accessibility { ENSURE_OR_RETURN_VOID( i_nPosition <= m_aChildren.size(), "AccessibleToolPanelTabBar_Impl::PanelInserted: illegal position (or invalid cache!)" ); (void)i_pPanel; - m_aChildren.insert( m_aChildren.begin() + i_nPosition, (Reference< XAccessible >)NULL ); + m_aChildren.insert( m_aChildren.begin() + i_nPosition, Reference< XAccessible >() ); m_rAntiImpl.NotifyAccessibleEvent( AccessibleEventId::CHILD, Any(), makeAny( getAccessiblePanelItem( i_nPosition ) ) ); } diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx index d5c3878..96ee02c 100644 --- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx +++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx @@ -198,7 +198,7 @@ namespace accessibility void SAL_CALL EditBrowseBoxTableCellAccess::disposing() { // dispose our context, if it still alive - Reference< XComponent > xMyContext( (Reference< XAccessibleContext >)m_aContext, UNO_QUERY ); + Reference< XComponent > xMyContext( m_aContext.get(), UNO_QUERY ); if ( xMyContext.is() ) { try diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index f45000b..06de24a 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -327,7 +327,7 @@ namespace accessibility Reference< XAccessible > AccessibleListBoxEntry::implGetParentAccessible( ) const { - Reference< XAccessible > xParent = (Reference< XAccessible >)m_aParent; + Reference< XAccessible > xParent(m_aParent); if ( !xParent.is() ) { OSL_ENSURE( m_aEntryPath.size(), "AccessibleListBoxEntry::getAccessibleParent: invalid path!" ); diff --git a/accessibility/source/extended/accessibletabbarbase.cxx b/accessibility/source/extended/accessibletabbarbase.cxx index 01ff84e..18c6ae5 100644 --- a/accessibility/source/extended/accessibletabbarbase.cxx +++ b/accessibility/source/extended/accessibletabbarbase.cxx @@ -53,7 +53,7 @@ IMPL_LINK( AccessibleTabBarBase, WindowEventListener, VclSimpleEvent*, pEvent ) OSL_ENSURE( pEventWindow, "AccessibleTabBarBase::WindowEventListener: no window!" ); if( ( pWinEvent->GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) && - ( (sal_uInt16)(sal_IntPtr) pWinEvent->GetData() == TabBar::PAGE_NOT_FOUND ) && + ( (sal_uInt16)reinterpret_cast<sal_IntPtr>(pWinEvent->GetData()) == TabBar::PAGE_NOT_FOUND ) && ( dynamic_cast< AccessibleTabBarPageList *> (this) != NULL ) ) { return 0; diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index 67400bd..88aa8e8 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -243,7 +243,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdateEnabled( nPagePos, true ); } @@ -253,7 +253,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdateEnabled( nPagePos, false ); } @@ -268,7 +268,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdateSelected( nPagePos, true ); } @@ -278,7 +278,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdateSelected( nPagePos, false ); } @@ -288,7 +288,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); InsertChild( nPagePos ); } @@ -298,7 +298,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); if ( nPageId == TabBar::PAGE_NOT_FOUND ) { @@ -333,7 +333,7 @@ namespace accessibility break; case VCLEVENT_TABBAR_PAGETEXTCHANGED: { - sal_uInt16 nPageId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); + sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()); sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId ); UpdatePageText( nPagePos ); } diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 9e53b48..bb58ae6 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -1020,7 +1020,7 @@ Document::retrieveCharacterAttributes( //character font name aAttribs[i].Name = "CharFontName"; aAttribs[i].Handle = -1; - aAttribs[i].Value = css::uno::makeAny( (::rtl::OUString)aFont.GetName() ); + aAttribs[i].Value = css::uno::makeAny( aFont.GetName() ); aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE; i++; diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx index bdaf859..327510e 100644 --- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx +++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx @@ -198,7 +198,7 @@ sal_Bool VCLXAccessibleCheckBox::doAccessibleAction ( sal_Int32 nIndex ) throw ( if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); - CheckBox* pCheckBox = (CheckBox*) GetWindow(); + CheckBox* pCheckBox = static_cast<CheckBox*>(GetWindow()); VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() ); if ( pCheckBox && pVCLXCheckBox ) { @@ -328,7 +328,7 @@ Any VCLXAccessibleCheckBox::getMaximumValue( ) throw (RuntimeException, std::ex Any aValue; - CheckBox* pCheckBox = (CheckBox*) GetWindow(); + CheckBox* pCheckBox = static_cast<CheckBox*>(GetWindow()); if ( pCheckBox && pCheckBox->IsTriStateEnabled() ) aValue <<= (sal_Int32) 2; else commit b8ea41a98ded7dc2eae22f05ad427b6958702d0b Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Sep 30 08:50:14 2014 +0200 cui: std::auto_ptr -> std::unique_ptr Change-Id: Iea8b3def77842541129c16346270aa262654fea4 diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 23d46bf..f740a89 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -18,6 +18,7 @@ */ #include <memory> +#include <utility> #include <sfx2/objsh.hxx> #include <vcl/svapp.hxx> @@ -238,10 +239,8 @@ void SFTreeListBox::Init( const OUString& language ) Reference< browse::XBrowseNode > langEntries = getLangNodeFromRootNode( children[ n ], lang ); - SAL_WNODEPRECATED_DECLARATIONS_PUSH insertEntry( uiName, app ? RID_CUIIMG_HARDDISK : RID_CUIIMG_DOC, - 0, true, std::auto_ptr< SFEntry >(new SFEntry( OBJTYPE_SFROOT, langEntries, xDocumentModel )), factoryURL ); - SAL_WNODEPRECATED_DECLARATIONS_POP + 0, true, std::unique_ptr< SFEntry >(new SFEntry( OBJTYPE_SFROOT, langEntries, xDocumentModel )), factoryURL ); } SetUpdateMode( true ); @@ -322,17 +321,13 @@ void SFTreeListBox:: RequestSubEntries( SvTreeListEntry* pRootEntry, Reference< OUString name( children[ n ]->getName() ); if ( children[ n ]->getType() != browse::BrowseNodeTypes::SCRIPT) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - insertEntry( name, RID_CUIIMG_LIB, pRootEntry, true, std::auto_ptr< SFEntry >(new SFEntry( OBJTYPE_SCRIPTCONTAINER, children[ n ],model ))); - SAL_WNODEPRECATED_DECLARATIONS_POP + insertEntry( name, RID_CUIIMG_LIB, pRootEntry, true, std::unique_ptr< SFEntry >(new SFEntry( OBJTYPE_SCRIPTCONTAINER, children[ n ],model ))); } else { if ( children[ n ]->getType() == browse::BrowseNodeTypes::SCRIPT ) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - insertEntry( name, RID_CUIIMG_MACRO, pRootEntry, false, std::auto_ptr< SFEntry >(new SFEntry( OBJTYPE_METHOD, children[ n ],model ))); - SAL_WNODEPRECATED_DECLARATIONS_POP + insertEntry( name, RID_CUIIMG_MACRO, pRootEntry, false, std::unique_ptr< SFEntry >(new SFEntry( OBJTYPE_METHOD, children[ n ],model ))); } } @@ -348,10 +343,9 @@ void SFTreeListBox::ExpandAllTrees() { } -SAL_WNODEPRECATED_DECLARATIONS_PUSH SvTreeListEntry * SFTreeListBox::insertEntry( OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, - bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, const OUString& factoryURL ) + bool bChildrenOnDemand, std::unique_ptr< SFEntry > && aUserData, const OUString& factoryURL ) { SvTreeListEntry * p; if( nBitmap == RID_CUIIMG_DOC && !factoryURL.isEmpty() ) @@ -363,16 +357,14 @@ SvTreeListEntry * SFTreeListBox::insertEntry( } else { - p = insertEntry( rText, nBitmap, pParent, bChildrenOnDemand, aUserData ); + p = insertEntry( rText, nBitmap, pParent, bChildrenOnDemand, std::move(aUserData) ); } return p; } -SAL_WNODEPRECATED_DECLARATIONS_POP -SAL_WNODEPRECATED_DECLARATIONS_PUSH SvTreeListEntry * SFTreeListBox::insertEntry( OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, - bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData ) + bool bChildrenOnDemand, std::unique_ptr< SFEntry > && aUserData ) { Image aImage; if( nBitmap == RID_CUIIMG_HARDDISK ) @@ -396,7 +388,6 @@ SvTreeListEntry * SFTreeListBox::insertEntry( aUserData.release()); // XXX possible leak return p; } -SAL_WNODEPRECATED_DECLARATIONS_POP void SFTreeListBox::RequestingChildren( SvTreeListEntry* pEntry ) { @@ -962,18 +953,13 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) // not in alphabetical order if ( aChildNode->getType() == browse::BrowseNodeTypes::SCRIPT ) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH pNewEntry = m_pScriptsBox->insertEntry( aChildName, - RID_CUIIMG_MACRO, pEntry, false, std::auto_ptr< SFEntry >(new SFEntry( OBJTYPE_METHOD, aChildNode,xDocumentModel ) ) ); - SAL_WNODEPRECATED_DECLARATIONS_POP - + RID_CUIIMG_MACRO, pEntry, false, std::unique_ptr< SFEntry >(new SFEntry( OBJTYPE_METHOD, aChildNode,xDocumentModel ) ) ); } else { - SAL_WNODEPRECATED_DECLARATIONS_PUSH pNewEntry = m_pScriptsBox->insertEntry( aChildName, - RID_CUIIMG_LIB, pEntry, false, std::auto_ptr< SFEntry >(new SFEntry( OBJTYPE_SCRIPTCONTAINER, aChildNode,xDocumentModel ) ) ); - SAL_WNODEPRECATED_DECLARATIONS_POP + RID_CUIIMG_LIB, pEntry, false, std::unique_ptr< SFEntry >(new SFEntry( OBJTYPE_SCRIPTCONTAINER, aChildNode,xDocumentModel ) ) ); // If the Parent is not loaded then set to // loaded, this will prevent RequestingChildren ( called diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 5dc045d..07c63f3 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1615,7 +1615,7 @@ public: private: SfxItemSet m_aItems; - ::std::auto_ptr< SvxMacroAssignDlg > m_pDialog; + ::std::unique_ptr< SvxMacroAssignDlg > m_pDialog; }; short SvxMacroAssignDialog::Execute() diff --git a/cui/source/inc/passwdomdlg.hxx b/cui/source/inc/passwdomdlg.hxx index 1fe8c58..179d99b 100644 --- a/cui/source/inc/passwdomdlg.hxx +++ b/cui/source/inc/passwdomdlg.hxx @@ -30,7 +30,7 @@ struct PasswordToOpenModifyDialog_Impl; class PasswordToOpenModifyDialog : public SfxModalDialog { - std::auto_ptr< PasswordToOpenModifyDialog_Impl > m_pImpl; + std::unique_ptr< PasswordToOpenModifyDialog_Impl > m_pImpl; // disallow use of copy c-tor and assignment operator PasswordToOpenModifyDialog( const PasswordToOpenModifyDialog & ); diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index 3b72406..a3d3f0d 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -85,12 +85,12 @@ public: SvTreeListEntry * insertEntry(OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, bool bChildrenOnDemand, - std::auto_ptr< SFEntry > aUserData, + std::unique_ptr< SFEntry > && aUserData, const OUString& factoryURL ); SvTreeListEntry * insertEntry(OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, bool bChildrenOnDemand, - std::auto_ptr< SFEntry > aUserData ); + std::unique_ptr< SFEntry > && aUserData ); void deleteTree( SvTreeListEntry * pEntry ); void deleteAllTree( ); }; commit 05dfa2f6bfaffd0caa380d246027082bd2969aba Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Sep 30 08:44:39 2014 +0200 cppuhelper: std::auto_ptr -> std::unique_ptr Change-Id: I601fac44b272671b2763b45c5ef284cdd44d5066 diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 11734e1..a212e7d 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -538,7 +538,7 @@ private: Reference<XSingleComponentFactory > xModuleFactory; Reference<XSingleServiceFactory > xModuleFactoryDepr; Reference< beans::XPropertySetInfo > m_xInfo; - ::std::auto_ptr< IPropertyArrayHelper > m_property_array_helper; + ::std::unique_ptr< IPropertyArrayHelper > m_property_array_helper; protected: using OPropertySetHelper::getTypes; }; commit 476f5aad6efc176c88309f18ce686fd3fc1be609 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Sep 30 08:29:45 2014 +0200 cppcanvas: std::auto_ptr -> std::unique_ptr Change-Id: Ic4584e4fe22c81c30d110ff65e79217f690f56f0 diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index a111fab..e5c6223 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -72,6 +72,7 @@ #include <polypolyaction.hxx> #include <textaction.hxx> #include <transparencygroupaction.hxx> +#include <utility> #include <vector> #include <algorithm> #include <iterator> @@ -2452,8 +2453,8 @@ namespace cppcanvas ActionSharedPtr pFloatTransAction( internal::TransparencyGroupActionFactory::createTransparencyGroupAction( - pMtf, - pGradient, + std::move(pMtf), + std::move(pGradient), rParms, rStates.getState().mapModeTransform * ::vcl::unotools::b2DPointFromPoint( pAct->GetPoint() ), diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx index ee1281b..a326308 100644 --- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx +++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <utility> + #include <tools/gen.hxx> #include <canvas/debug.hxx> @@ -87,8 +91,8 @@ namespace cppcanvas Size of the transparency group object, in current state coordinate system. */ - TransparencyGroupAction( MtfAutoPtr& rGroupMtf, - GradientAutoPtr& rAlphaGradient, + TransparencyGroupAction( MtfAutoPtr&& rGroupMtf, + GradientAutoPtr&& rAlphaGradient, const Renderer::Parameters& rParms, const ::basegfx::B2DPoint& rDstPoint, const ::basegfx::B2DVector& rDstSize, @@ -141,15 +145,15 @@ namespace cppcanvas } SAL_WNODEPRECATED_DECLARATIONS_PUSH - TransparencyGroupAction::TransparencyGroupAction( MtfAutoPtr& rGroupMtf, - GradientAutoPtr& rAlphaGradient, + TransparencyGroupAction::TransparencyGroupAction( MtfAutoPtr&& rGroupMtf, + GradientAutoPtr&& rAlphaGradient, const Renderer::Parameters& rParms, const ::basegfx::B2DPoint& rDstPoint, const ::basegfx::B2DVector& rDstSize, const CanvasSharedPtr& rCanvas, const OutDevState& rState ) : - mpGroupMtf( rGroupMtf ), - mpAlphaGradient( rAlphaGradient ), + mpGroupMtf( std::move(rGroupMtf) ), + mpAlphaGradient( std::move(rAlphaGradient) ), maParms( rParms ), maDstSize( rDstSize ), mxBufferBitmap(), @@ -475,16 +479,16 @@ namespace cppcanvas } SAL_WNODEPRECATED_DECLARATIONS_PUSH - ActionSharedPtr TransparencyGroupActionFactory::createTransparencyGroupAction( MtfAutoPtr& rGroupMtf, - GradientAutoPtr& rAlphaGradient, + ActionSharedPtr TransparencyGroupActionFactory::createTransparencyGroupAction( MtfAutoPtr&& rGroupMtf, + GradientAutoPtr&& rAlphaGradient, const Renderer::Parameters& rParms, const ::basegfx::B2DPoint& rDstPoint, const ::basegfx::B2DVector& rDstSize, const CanvasSharedPtr& rCanvas, const OutDevState& rState ) { - return ActionSharedPtr( new TransparencyGroupAction(rGroupMtf, - rAlphaGradient, + return ActionSharedPtr( new TransparencyGroupAction(std::move(rGroupMtf), + std::move(rAlphaGradient), rParms, rDstPoint, rDstSize, diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx index 2193748..391daeb 100644 --- a/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx +++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx @@ -43,8 +43,8 @@ namespace cppcanvas { struct OutDevState; - typedef ::std::auto_ptr< GDIMetaFile > MtfAutoPtr; - typedef ::std::auto_ptr< Gradient > GradientAutoPtr; + typedef ::std::unique_ptr< GDIMetaFile > MtfAutoPtr; + typedef ::std::unique_ptr< Gradient > GradientAutoPtr; /** Transparency group action. @@ -83,8 +83,8 @@ namespace cppcanvas Size of the transparency group object, in current state coordinate system. */ - static ActionSharedPtr createTransparencyGroupAction( MtfAutoPtr& rGroupMtf, - GradientAutoPtr& rAlphaGradient, + static ActionSharedPtr createTransparencyGroupAction( MtfAutoPtr&& rGroupMtf, + GradientAutoPtr&& rAlphaGradient, const Renderer::Parameters& rParms, const ::basegfx::B2DPoint& rDstPoint, const ::basegfx::B2DVector& rDstSize, commit d8e21f0400c5ae77e388ef81b7fcad9f65401c65 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Sep 30 08:24:10 2014 +0200 compilerplugins: get rid of std::auto_ptr in comment Change-Id: Ia2b1bc97f3476da7bfbe659e5160cd5c73c01ce5 diff --git a/compilerplugins/clang/unusedvariablecheck.cxx b/compilerplugins/clang/unusedvariablecheck.cxx index caa16b1..cc37417 100644 --- a/compilerplugins/clang/unusedvariablecheck.cxx +++ b/compilerplugins/clang/unusedvariablecheck.cxx @@ -30,7 +30,7 @@ Check for unused classes where the compiler cannot decide (e.g. because of non-trivial or extern ctors) if a variable is unused if only its ctor/dtor are called and nothing else. For example std::vector is a class where the ctor may call further functions, but an unused std::string variable -does nothing. On the other hand, std::auto_ptr instances are used +does nothing. On the other hand, std::lock_guard instances are used for their dtors and so are not unused even if not otherwise accessed. Classes which are safe to be warned about need to be marked using commit a866478d92e9972b1c3f52b399bfadf7aacfd396 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Sep 30 08:20:44 2014 +0200 codemaker: std::auto_ptr -> std::unique_ptr Change-Id: I205c0908254f13970315f8e159997a5ec2f96ed3 diff --git a/codemaker/source/codemaker/exceptiontree.cxx b/codemaker/source/codemaker/exceptiontree.cxx index a6e154e..09c3b87 100644 --- a/codemaker/source/codemaker/exceptiontree.cxx +++ b/codemaker/source/codemaker/exceptiontree.cxx @@ -35,7 +35,7 @@ using codemaker::ExceptionTree; using codemaker::ExceptionTreeNode; ExceptionTreeNode * ExceptionTreeNode::add(rtl::OString const & theName) { - std::auto_ptr< ExceptionTreeNode > node(new ExceptionTreeNode(theName)); + std::unique_ptr< ExceptionTreeNode > node(new ExceptionTreeNode(theName)); children.push_back(node.get()); return node.release(); } diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index 5d02644..572ad4f 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -656,9 +656,7 @@ void addTypeInfo( | ClassFile::ACC_FINAL), "UNOTYPEINFO", "[Lcom/sun/star/lib/uno/typeinfo/TypeInfo;", 0, ""); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > code(classFile->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > code(classFile->newCode()); code->loadIntegerConstant(static_cast< sal_Int32 >(typeInfos)); code->instrAnewarray("com/sun/star/lib/uno/typeinfo/TypeInfo"); sal_Int32 index = 0; @@ -693,14 +691,12 @@ void handleEnumType( { assert(entity.is()); OString className(codemaker::convertString(name).replace('.', '/')); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile > cf( + std::unique_ptr< ClassFile > cf( new ClassFile( static_cast< ClassFile::AccessFlags >( ClassFile::ACC_PUBLIC | ClassFile::ACC_FINAL | ClassFile::ACC_SUPER), className, "com/sun/star/uno/Enum", "")); - SAL_WNODEPRECATED_DECLARATIONS_POP OString classDescriptor("L" + className + ";"); for (std::vector< unoidl::EnumTypeEntity::Member >::const_iterator i( entity->getMembers().begin()); @@ -719,9 +715,7 @@ void handleEnumType( fieldName + "_value", "I", cf->addIntegerInfo(i->value), ""); } - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > code(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > code(cf->newCode()); code->loadLocalReference(0); code->loadLocalInteger(1); code->instrInvokespecial("com/sun/star/uno/Enum", "<init>", "(I)V"); @@ -763,9 +757,7 @@ void handleEnumType( <= 2 * size) || size > SAL_MAX_INT32) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > defCode(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > defCode(cf->newCode()); defCode->instrAconstNull(); defCode->instrAreturn(); std::list< ClassFile::Code * > blocks; @@ -781,9 +773,7 @@ void handleEnumType( } } last = value; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > blockCode(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > blockCode(cf->newCode()); blockCode->instrGetstatic(className, i->second, classDescriptor); blockCode->instrAreturn(); blocks.push_back(blockCode.get()); @@ -796,9 +786,7 @@ void handleEnumType( delete *i; } } else{ - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > defCode(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > defCode(cf->newCode()); defCode->instrAconstNull(); defCode->instrAreturn(); std::list< std::pair< sal_Int32, ClassFile::Code * > > blocks; @@ -806,9 +794,7 @@ void handleEnumType( for (std::map< sal_Int32, OString >::iterator i(map.begin()); i != map.end(); ++i) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > blockCode(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > blockCode(cf->newCode()); blockCode->instrGetstatic(className, i->second, classDescriptor); blockCode->instrAreturn(); blocks.push_back(std::make_pair(i->first, blockCode.get())); @@ -1419,13 +1405,11 @@ void handlePlainStructType( replace('.', '/'); dependencies->insert(entity->getDirectBase()); } - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile > cf( + std::unique_ptr< ClassFile > cf( new ClassFile( static_cast< ClassFile::AccessFlags >( ClassFile::ACC_PUBLIC | ClassFile::ACC_SUPER), className, superClass, "")); - SAL_WNODEPRECATED_DECLARATIONS_POP std::vector< TypeInfo > typeInfo; sal_Int32 index = 0; for (std::vector< unoidl::PlainStructTypeEntity::Member >::const_iterator i( @@ -1436,9 +1420,7 @@ void handlePlainStructType( manager, dependencies, cf.get(), &typeInfo, -1, i->type, i->name, index++); } - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > code(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > code(cf->newCode()); code->loadLocalReference(0); code->instrInvokespecial(superClass, "<init>", "()V"); sal_uInt16 stack = 0; @@ -1512,13 +1494,11 @@ void handlePolyStructType( } } sig.append(">Ljava/lang/Object;"); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile > cf( + std::unique_ptr< ClassFile > cf( new ClassFile( static_cast< ClassFile::AccessFlags >( ClassFile::ACC_PUBLIC | ClassFile::ACC_SUPER), className, "java/lang/Object", sig.makeStringAndClear())); - SAL_WNODEPRECATED_DECLARATIONS_POP std::vector< TypeInfo > typeInfo; index = 0; for (std::vector< unoidl::PolymorphicStructTypeTemplateEntity::Member >:: @@ -1540,9 +1520,7 @@ void handlePolyStructType( manager, dependencies, cf.get(), &typeInfo, typeParameterIndex, i->type, i->name, index++); } - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > code(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > code(cf->newCode()); code->loadLocalReference(0); code->instrInvokespecial("java/lang/Object", "<init>", "()V"); sal_uInt16 stack = 0; @@ -1648,13 +1626,11 @@ void handleExceptionType( replace('.', '/'); dependencies->insert(entity->getDirectBase()); } - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile > cf( + std::unique_ptr< ClassFile > cf( new ClassFile( static_cast< ClassFile::AccessFlags >( ClassFile::ACC_PUBLIC | ClassFile::ACC_SUPER), className, superClass, "")); - SAL_WNODEPRECATED_DECLARATIONS_POP std::vector< TypeInfo > typeInfo; sal_Int32 index = 0; if (baseRuntimeException) { @@ -1674,9 +1650,7 @@ void handleExceptionType( } // create default constructor - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > code(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > code(cf->newCode()); code->loadLocalReference(0); code->instrInvokespecial(superClass, "<init>", "()V"); sal_uInt16 stack = 0; @@ -1922,14 +1896,12 @@ void handleInterfaceType( assert(entity.is()); assert(dependencies != 0); OString className(codemaker::convertString(name).replace('.', '/')); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile > cf( + std::unique_ptr< ClassFile > cf( new ClassFile( static_cast< ClassFile::AccessFlags >( ClassFile::ACC_PUBLIC | ClassFile::ACC_INTERFACE | ClassFile::ACC_ABSTRACT), className, "java/lang/Object", "")); - SAL_WNODEPRECATED_DECLARATIONS_POP for (std::vector< unoidl::AnnotatedReference >::const_iterator i( entity->getDirectMandatoryBases().begin()); i != entity->getDirectMandatoryBases().end(); ++i) @@ -2080,14 +2052,12 @@ void handleConstantGroup( { assert(entity.is()); OString className(codemaker::convertString(name).replace('.', '/')); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile > cf( + std::unique_ptr< ClassFile > cf( new ClassFile( static_cast< ClassFile::AccessFlags >( ClassFile::ACC_PUBLIC | ClassFile::ACC_INTERFACE | ClassFile::ACC_ABSTRACT), className, "java/lang/Object", "")); - SAL_WNODEPRECATED_DECLARATIONS_POP for (std::vector< unoidl::ConstantGroupEntity::Member >::const_iterator i( entity->getMembers().begin()); i != entity->getMembers().end(); ++i) @@ -2181,9 +2151,7 @@ void addConstructor( assert(classFile != 0); MethodDescriptor desc(manager, dependencies, returnType, 0, 0); desc.addParameter("com.sun.star.uno.XComponentContext", false, false, 0); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > code(classFile->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > code(classFile->newCode()); code->loadLocalReference(0); // stack: context code->instrInvokeinterface( @@ -2336,14 +2304,12 @@ void handleService( OString unoName(codemaker::convertString(name)); OString className( translateUnoidlEntityNameToJavaFullyQualifiedName(name, "service")); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile > cf( + std::unique_ptr< ClassFile > cf( new ClassFile( static_cast< ClassFile::AccessFlags >( ClassFile::ACC_PUBLIC | ClassFile::ACC_FINAL | ClassFile::ACC_SUPER), className, "java/lang/Object", "")); - SAL_WNODEPRECATED_DECLARATIONS_POP if (!entity->getConstructors().empty()) { OString realJavaBaseName( codemaker::convertString(entity->getBase())); @@ -2363,9 +2329,7 @@ void handleService( } // Synthetic castInstance method: { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > code(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > code(cf->newCode()); code->instrNew("com/sun/star/uno/Type"); // stack: type code->instrDup(); @@ -2441,19 +2405,15 @@ void handleSingleton( dependencies->insert("com.sun.star.uno.DeploymentException"); dependencies->insert("com.sun.star.uno.TypeClass"); dependencies->insert("com.sun.star.uno.XComponentContext"); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile > cf( + std::unique_ptr< ClassFile > cf( new ClassFile( static_cast< ClassFile::AccessFlags >( ClassFile::ACC_PUBLIC | ClassFile::ACC_FINAL | ClassFile::ACC_SUPER), className, "java/lang/Object", "")); - SAL_WNODEPRECATED_DECLARATIONS_POP MethodDescriptor desc(manager, dependencies, entity->getBase(), 0, 0); desc.addParameter("com.sun.star.uno.XComponentContext", false, false, 0); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< ClassFile::Code > code(cf->newCode()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< ClassFile::Code > code(cf->newCode()); code->loadLocalReference(0); // stack: context code->loadStringConstant("/singletons/" + unoName); commit be31d107f5aa5e03b78772aaf67d8685b20965d1 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Sep 30 08:20:36 2014 +0200 chart2: std::auto_ptr -> std::unique_ptr Change-Id: Ia92c18858c8ed7cfc2765cc2310f3bf7bfd7e8df diff --git a/chart2/source/controller/inc/DrawViewWrapper.hxx b/chart2/source/controller/inc/DrawViewWrapper.hxx index 3cc9e10..ea15794 100644 --- a/chart2/source/controller/inc/DrawViewWrapper.hxx +++ b/chart2/source/controller/inc/DrawViewWrapper.hxx @@ -85,7 +85,7 @@ public: private: mutable MarkHandleProvider* m_pMarkHandleProvider; - ::std::auto_ptr< SdrOutliner > m_apOutliner; + ::std::unique_ptr< SdrOutliner > m_apOutliner; // #i79965# scroll back view when ending text edit bool m_bRestoreMapMode; diff --git a/chart2/source/controller/inc/ObjectHierarchy.hxx b/chart2/source/controller/inc/ObjectHierarchy.hxx index f0c02c1..67e4fcf 100644 --- a/chart2/source/controller/inc/ObjectHierarchy.hxx +++ b/chart2/source/controller/inc/ObjectHierarchy.hxx @@ -74,7 +74,7 @@ public: private: - ::std::auto_ptr< impl::ImplObjectHierarchy > m_apImpl; + ::std::unique_ptr< impl::ImplObjectHierarchy > m_apImpl; }; class ObjectKeyNavigation diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx index 8f4dd54..8b3529b 100644 --- a/chart2/source/controller/inc/dlg_DataSource.hxx +++ b/chart2/source/controller/inc/dlg_DataSource.hxx @@ -63,8 +63,8 @@ protected: m_xChartDocument; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - ::std::auto_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider; - ::std::auto_ptr< DialogModel > m_apDialogModel; + ::std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider; + ::std::unique_ptr< DialogModel > m_apDialogModel; private: DataSourceTabControl* m_pTabControl; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 717c98b..bed1daa 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -67,7 +67,7 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> -// this is needed to properly destroy the auto_ptr to the AcceleratorExecute +// this is needed to properly destroy the unique_ptr to the AcceleratorExecute // object in the DTOR #include <svtools/acceleratorexecute.hxx> #include <svx/ActionDescriptionProvider.hxx> diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx index 469dee2..4613fdd 100644 --- a/chart2/source/controller/main/ChartController.hxx +++ b/chart2/source/controller/main/ChartController.hxx @@ -515,15 +515,15 @@ private: bool m_bConnectingToView; ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager > m_xUndoManager; - ::std::auto_ptr< UndoGuard > m_pTextActionUndoGuard; + ::std::unique_ptr< UndoGuard > m_pTextActionUndoGuard; /// needed for dispatching URLs in FeatureStateEvents mutable ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer; - ::std::auto_ptr< ::svt::AcceleratorExecute > m_apAccelExecute; + ::std::unique_ptr< ::svt::AcceleratorExecute > m_apAccelExecute; CommandDispatchContainer m_aDispatchContainer; - ::std::auto_ptr< DropTargetHelper > m_apDropTargetHelper; + ::std::unique_ptr< DropTargetHelper > m_apDropTargetHelper; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerEventBroadcaster > m_xLayoutManagerEventBroadcaster; diff --git a/chart2/source/controller/main/ControllerCommandDispatch.hxx b/chart2/source/controller/main/ControllerCommandDispatch.hxx index cb23be2d..049c0f2 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.hxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.hxx @@ -113,8 +113,8 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xDispatch; - ::std::auto_ptr< impl::ModelState > m_apModelState; - ::std::auto_ptr< impl::ControllerState > m_apControllerState; + ::std::unique_ptr< impl::ModelState > m_apModelState; + ::std::unique_ptr< impl::ControllerState > m_apControllerState; mutable ::std::map< OUString, bool > m_aCommandAvailability; mutable ::std::map< OUString, ::com::sun::star::uno::Any > m_aCommandArguments; diff --git a/chart2/source/inc/ConfigColorScheme.hxx b/chart2/source/inc/ConfigColorScheme.hxx index 8b8210f..1a73742 100644 --- a/chart2/source/inc/ConfigColorScheme.hxx +++ b/chart2/source/inc/ConfigColorScheme.hxx @@ -73,7 +73,7 @@ private: // member variables ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - ::std::auto_ptr< impl::ChartConfigItem > m_apChartConfigItem; + ::std::unique_ptr< impl::ChartConfigItem > m_apChartConfigItem; mutable ::com::sun::star::uno::Sequence< sal_Int64 > m_aColorSequence; mutable sal_Int32 m_nNumberOfColors; bool m_bNeedsUpdate; diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx index 041ea47..db15072 100644 --- a/chart2/source/view/main/VDataSeries.cxx +++ b/chart2/source/view/main/VDataSeries.cxx @@ -779,9 +779,7 @@ double VDataSeries::getYMeanValue() const Symbol* getSymbolPropertiesFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp ) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< Symbol > apSymbolProps( new Symbol() ); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< Symbol > apSymbolProps( new Symbol() ); try { if( xProp->getPropertyValue("Symbol") >>= *apSymbolProps ) @@ -927,9 +925,7 @@ uno::Reference<beans::XPropertySet> VDataSeries::getPropertiesOfSeries() const DataPointLabel* getDataPointLabelFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp ) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< DataPointLabel > apLabel( new DataPointLabel() ); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< DataPointLabel > apLabel( new DataPointLabel() ); try { if( !(xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= *apLabel) ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits