summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-29 13:56:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-29 13:57:17 +0200
commit014e7933af751bfe0a03867373b82efa806f3a3d (patch)
tree59be1f8b861bb6bb8a54e4c028683f15f0c615cf /svtools
parent14157dcdf175f1ef45903f7ec3ed85d0f7c76798 (diff)
svtools: std::auto_ptr -> std::unique_ptr
...changing HTMLOptions to std::vector<std::unique_ptr<...>> because boost::ptr_vector<...>::push_back only supports auto_ptr, not unique_ptr. Change-Id: Ie5f92bc40ce5425dc1c634b17addc2b0dd9bbda3
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/edit/svmedit.cxx2
-rw-r--r--svtools/source/graphic/graphicunofactory.cxx2
-rw-r--r--svtools/source/svhtml/htmlsupp.cxx2
-rw-r--r--svtools/source/svhtml/parhtml.cxx7
-rw-r--r--svtools/source/toolpanel/tablayouter.cxx2
-rw-r--r--svtools/source/toolpanel/toolpanelcollection.hxx2
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.hxx2
7 files changed, 10 insertions, 9 deletions
diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx
index 3f645d556932..faaab3e87328 100644
--- a/svtools/source/edit/svmedit.cxx
+++ b/svtools/source/edit/svmedit.cxx
@@ -34,7 +34,7 @@ MultiLineEdit::GetComponentInterface(bool bCreate)
VclMultiLineEdit::GetComponentInterface(false));
if (!xPeer.is() && bCreate)
{
- ::std::auto_ptr< VCLXMultiLineEdit > xVCLMEdit(new VCLXMultiLineEdit());
+ ::std::unique_ptr< VCLXMultiLineEdit > xVCLMEdit(new VCLXMultiLineEdit());
xVCLMEdit->SetWindow(this);
xPeer = xVCLMEdit.release();
SetComponentInterface(xPeer);
diff --git a/svtools/source/graphic/graphicunofactory.cxx b/svtools/source/graphic/graphicunofactory.cxx
index a55acad7a800..fe3ed7b7060c 100644
--- a/svtools/source/graphic/graphicunofactory.cxx
+++ b/svtools/source/graphic/graphicunofactory.cxx
@@ -37,7 +37,7 @@ typedef ::cppu::WeakImplHelper2< graphic::XGraphicObject, css::lang::XServiceInf
class GObjectImpl : public GObjectAccess_BASE
{
::osl::Mutex m_aMutex;
- std::auto_ptr< GraphicObject > mpGObject;
+ std::unique_ptr< GraphicObject > mpGObject;
public:
GObjectImpl(uno::Sequence< uno::Any > const & args) throw (uno::RuntimeException);
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx
index 7069e4e2a07e..2b3f89dd8998 100644
--- a/svtools/source/svhtml/htmlsupp.cxx
+++ b/svtools/source/svhtml/htmlsupp.cxx
@@ -52,7 +52,7 @@ bool HTMLParser::ParseScriptOptions( OUString& rLangString, const OUString& rBas
for( size_t i = aScriptOptions.size(); i; )
{
- const HTMLOption& aOption = aScriptOptions[--i];
+ const HTMLOption& aOption = *aScriptOptions[--i];
switch( aOption.GetToken() )
{
case HTML_O_LANGUAGE:
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 7b04001cec6c..265427de172e 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -38,6 +38,7 @@
#include <svtools/htmlkywd.hxx>
#include <memory>
+#include <utility>
using namespace ::com::sun::star;
@@ -1579,10 +1580,10 @@ const HTMLOptions& HTMLParser::GetOptions( sal_uInt16 *pNoConvertToken )
}
// Token is known and can be saved
- std::auto_ptr<HTMLOption> pOption(
+ std::unique_ptr<HTMLOption> pOption(
new HTMLOption(sal::static_int_cast<sal_uInt16>(nToken), sName, aValue));
- maOptions.push_back(pOption);
+ maOptions.push_back(std::move(pOption));
}
else
// Ignore white space and unexpected characters
@@ -2067,7 +2068,7 @@ bool HTMLParser::ParseMetaOptionsImpl(
for ( size_t i = aOptions.size(); i; )
{
- const HTMLOption& aOption = aOptions[--i];
+ const HTMLOption& aOption = *aOptions[--i];
switch ( aOption.GetToken() )
{
case HTML_O_NAME:
diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx
index 68a09a37b655..39a0874d824a 100644
--- a/svtools/source/toolpanel/tablayouter.cxx
+++ b/svtools/source/toolpanel/tablayouter.cxx
@@ -41,7 +41,7 @@ namespace svt
{
TabAlignment eAlignment;
IToolPanelDeck& rPanels;
- ::std::auto_ptr< PanelTabBar > pTabBar;
+ ::std::unique_ptr< PanelTabBar > pTabBar;
AccessibleFactoryAccess aAccessibleFactory;
TabDeckLayouter_Data( vcl::Window& i_rParent, IToolPanelDeck& i_rPanels,
diff --git a/svtools/source/toolpanel/toolpanelcollection.hxx b/svtools/source/toolpanel/toolpanelcollection.hxx
index 88feb379ce59..fcce67523325 100644
--- a/svtools/source/toolpanel/toolpanelcollection.hxx
+++ b/svtools/source/toolpanel/toolpanelcollection.hxx
@@ -52,7 +52,7 @@ namespace svt
virtual void RemoveListener( IToolPanelDeckListener& i_rListener ) SAL_OVERRIDE;
private:
- ::std::auto_ptr< ToolPanelCollection_Data > m_pData;
+ ::std::unique_ptr< ToolPanelCollection_Data > m_pData;
};
diff --git a/svtools/source/toolpanel/toolpaneldrawer.hxx b/svtools/source/toolpanel/toolpaneldrawer.hxx
index 3186ca1f6cfc..3a815345e2b6 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.hxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.hxx
@@ -96,7 +96,7 @@ namespace svt
using Window::Paint;
private:
- ::std::auto_ptr< VirtualDevice > m_pPaintDevice;
+ ::std::unique_ptr< VirtualDevice > m_pPaintDevice;
DrawerVisualization m_aVisualization;
bool m_bFocused;
bool m_bExpanded;