summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-25 17:35:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-25 17:35:05 +0200
commita924606810a5d6e9a8e3d23e491d0bea5a5d2477 (patch)
treeb52bc75ea90af5a66aadb6b75faf50f94ab70727
parent09b13e1e4c6667b307fdd9608a02d2a792efd940 (diff)
editeng: std::auto_ptr -> std::unique_ptr
Change-Id: I25e3599a37d720cbcf70ea13ab30234e54637d53
-rw-r--r--editeng/source/items/xmlcnitm.cxx2
-rw-r--r--editeng/source/uno/unoedhlp.cxx30
-rw-r--r--include/editeng/AccessibleStaticTextBase.hxx4
-rw-r--r--include/editeng/hangulhanja.hxx4
-rw-r--r--include/editeng/unoedhlp.hxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx8
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx2
-rw-r--r--starmath/source/accessibility.cxx2
-rw-r--r--svx/source/unodraw/unoshtxt.cxx7
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControlAcc.cxx4
10 files changed, 28 insertions, 39 deletions
diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx
index f112383f0cc8..136230495a95 100644
--- a/editeng/source/items/xmlcnitm.cxx
+++ b/editeng/source/items/xmlcnitm.cxx
@@ -108,7 +108,7 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal
}
else
{
- std::auto_ptr<SvXMLAttrContainerData> pNewImpl(new SvXMLAttrContainerData);
+ std::unique_ptr<SvXMLAttrContainerData> pNewImpl(new SvXMLAttrContainerData);
try
{
diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx
index 83a6fd3bdb4d..dec133314207 100644
--- a/editeng/source/uno/unoedhlp.cxx
+++ b/editeng/source/uno/unoedhlp.cxx
@@ -44,56 +44,54 @@ sal_uLong SvxEditSourceHint::GetValue() const
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-::std::auto_ptr<SfxHint> SvxEditSourceHelper::EENotification2Hint( EENotify* aNotify )
+::std::unique_ptr<SfxHint> SvxEditSourceHelper::EENotification2Hint( EENotify* aNotify )
{
if( aNotify )
{
switch( aNotify->eNotificationType )
{
case EE_NOTIFY_TEXTMODIFIED:
- return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_MODIFIED, aNotify->nParagraph ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_MODIFIED, aNotify->nParagraph ) );
case EE_NOTIFY_PARAGRAPHINSERTED:
- return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_PARAINSERTED, aNotify->nParagraph ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_PARAINSERTED, aNotify->nParagraph ) );
case EE_NOTIFY_PARAGRAPHREMOVED:
- return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_PARAREMOVED, aNotify->nParagraph ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_PARAREMOVED, aNotify->nParagraph ) );
case EE_NOTIFY_PARAGRAPHSMOVED:
- return ::std::auto_ptr<SfxHint>( new SvxEditSourceHint( EDITSOURCE_HINT_PARASMOVED, aNotify->nParagraph, aNotify->nParam1, aNotify->nParam2 ) );
+ return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( EDITSOURCE_HINT_PARASMOVED, aNotify->nParagraph, aNotify->nParam1, aNotify->nParam2 ) );
case EE_NOTIFY_TEXTHEIGHTCHANGED:
- return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_TEXTHEIGHTCHANGED, aNotify->nParagraph ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_TEXTHEIGHTCHANGED, aNotify->nParagraph ) );
case EE_NOTIFY_TEXTVIEWSCROLLED:
- return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_VIEWSCROLLED ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_VIEWSCROLLED ) );
case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED:
- return ::std::auto_ptr<SfxHint>( new SvxEditSourceHint( EDITSOURCE_HINT_SELECTIONCHANGED ) );
+ return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( EDITSOURCE_HINT_SELECTIONCHANGED ) );
case EE_NOTIFY_BLOCKNOTIFICATION_START:
- return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_START, 0 ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_START, 0 ) );
case EE_NOTIFY_BLOCKNOTIFICATION_END:
- return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_END, 0 ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_END, 0 ) );
case EE_NOTIFY_INPUT_START:
- return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_START, 0 ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_START, 0 ) );
case EE_NOTIFY_INPUT_END:
- return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_END, 0 ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_END, 0 ) );
case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED_ENDD_PARA:
- return ::std::auto_ptr<SfxHint>( new SvxEditSourceHintEndPara( EDITSOURCE_HINT_SELECTIONCHANGED ) );
+ return ::std::unique_ptr<SfxHint>( new SvxEditSourceHintEndPara( EDITSOURCE_HINT_SELECTIONCHANGED ) );
default:
OSL_FAIL( "SvxEditSourceHelper::EENotification2Hint unknown notification" );
break;
}
}
- return ::std::auto_ptr<SfxHint>( new SfxHint() );
+ return ::std::unique_ptr<SfxHint>( new SfxHint() );
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
bool SvxEditSourceHelper::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, const EditEngine& rEE, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell )
{
diff --git a/include/editeng/AccessibleStaticTextBase.hxx b/include/editeng/AccessibleStaticTextBase.hxx
index e061f841019c..06bd708c869a 100644
--- a/include/editeng/AccessibleStaticTextBase.hxx
+++ b/include/editeng/AccessibleStaticTextBase.hxx
@@ -261,9 +261,7 @@ namespace accessibility
private:
/// @dyn
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- const std::auto_ptr< AccessibleStaticTextBase_Impl > mpImpl;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ const std::unique_ptr< AccessibleStaticTextBase_Impl > mpImpl;
};
diff --git a/include/editeng/hangulhanja.hxx b/include/editeng/hangulhanja.hxx
index 08f8b4e21ebc..ec765dcc4e98 100644
--- a/include/editeng/hangulhanja.hxx
+++ b/include/editeng/hangulhanja.hxx
@@ -95,9 +95,7 @@ namespace editeng
};
private:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr< HangulHanjaConversion_Impl > m_pImpl;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ ::std::unique_ptr< HangulHanjaConversion_Impl > m_pImpl;
// used to set initial values of m_pImpl object from saved ones
static bool m_bUseSavedValues; // defines if the followng two values should be used for initialization
diff --git a/include/editeng/unoedhlp.hxx b/include/editeng/unoedhlp.hxx
index d9cb6d830468..c35dbe4931ea 100644
--- a/include/editeng/unoedhlp.hxx
+++ b/include/editeng/unoedhlp.hxx
@@ -73,9 +73,7 @@ public:
@return the translated hint
*/
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- static ::std::auto_ptr<SfxHint> EENotification2Hint( EENotify* aNotify );
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ static ::std::unique_ptr<SfxHint> EENotification2Hint( EENotify* aNotify );
/** Calculate attribute run for EditEngines
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 9e1e37bb4728..9a602834b8a7 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -943,9 +943,7 @@ IMPL_LINK(ScAccessibleCellTextData, NotifyHdl, EENotify*, aNotify)
{
if( aNotify )
{
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify );
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify );
if( aHint.get() )
GetBroadcaster().Broadcast( *aHint.get() );
@@ -1062,9 +1060,7 @@ IMPL_LINK(ScAccessibleEditObjectTextData, NotifyHdl, EENotify*, aNotify)
{
if( aNotify )
{
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify );
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify );
if( aHint.get() )
GetBroadcaster().Broadcast( *aHint.get() );
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index aa296df0deab..90e907c489e2 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -207,7 +207,7 @@ namespace accessibility
{
if( aNotify )
{
- ::std::auto_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( aNotify) );
+ ::std::unique_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( aNotify) );
if( aHint.get() )
Broadcast( *aHint.get() );
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 5ef11689e616..0a8458f062d4 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -964,7 +964,7 @@ IMPL_LINK(SmTextForwarder, NotifyHdl, EENotify*, aNotify)
{
if (aNotify)
{
- ::std::auto_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify );
+ ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify );
if (aHint.get())
rEditSource.GetBroadcaster().Broadcast( *aHint.get() );
}
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index b5f957f82655..e9c7d65534dc 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <memory>
+
#include <com/sun/star/uno/XInterface.hpp>
#include <vcl/svapp.hxx>
@@ -47,7 +51,6 @@
#include <svx/svdotable.hxx>
#include "../table/cell.hxx"
#include <svx/sdrpaintwindow.hxx>
-#include <boost/scoped_ptr.hpp>
using namespace ::osl;
using namespace ::rtl;
@@ -1020,7 +1023,7 @@ IMPL_LINK(SvxTextEditSourceImpl, NotifyHdl, EENotify*, aNotify)
{
if( aNotify && !mbNotificationsDisabled )
{
- boost::scoped_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( aNotify) );
+ std::unique_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( aNotify) );
if( aHint.get() )
Broadcast( *aHint.get() );
diff --git a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
index d7bdc2dfe690..42d31065aec8 100644
--- a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
@@ -35,8 +35,6 @@
#include <svx/AccessibleTextHelper.hxx>
#include <editeng/outliner.hxx>
-#include <boost/scoped_ptr.hpp>
-
namespace sw { namespace sidebarwindows {
// declaration and implementation of <SvxEditSource>
@@ -119,7 +117,7 @@ IMPL_LINK(SidebarTextEditSource, NotifyHdl, EENotify*, pNotify)
{
if ( pNotify )
{
- boost::scoped_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( pNotify ) );
+ std::unique_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( pNotify ) );
if( aHint.get() )
{