[Libreoffice-commits] core.git: editeng/source include/editeng sc/source sd/source starmath/source svx/source sw/source

Stephan Bergmann sbergman at redhat.com
Thu Sep 25 08:35:43 PDT 2014


 editeng/source/items/xmlcnitm.cxx                          |    2 
 editeng/source/uno/unoedhlp.cxx                            |   30 ++++++-------
 include/editeng/AccessibleStaticTextBase.hxx               |    4 -
 include/editeng/hangulhanja.hxx                            |    4 -
 include/editeng/unoedhlp.hxx                               |    4 -
 sc/source/ui/Accessibility/AccessibleText.cxx              |    8 ---
 sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx |    2 
 starmath/source/accessibility.cxx                          |    2 
 svx/source/unodraw/unoshtxt.cxx                            |    7 ++-
 sw/source/uibase/docvw/SidebarTxtControlAcc.cxx            |    4 -
 10 files changed, 28 insertions(+), 39 deletions(-)

New commits:
commit a924606810a5d6e9a8e3d23e491d0bea5a5d2477
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Sep 25 17:35:05 2014 +0200

    editeng: std::auto_ptr -> std::unique_ptr
    
    Change-Id: I25e3599a37d720cbcf70ea13ab30234e54637d53

diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx
index f112383..1362304 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 83a6fd3..dec1333 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 e061f84..06bd708 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 08f8b4e..ec765dc 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 d9cb6d8..c35dbe4 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 9e1e37b..9a60283 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 aa296df..90e907c 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 5ef1168..0a8458f 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 b5f957f..e9c7d65 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 d7bdc2d..42d3106 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() )
         {


More information about the Libreoffice-commits mailing list