diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-29 15:27:46 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-29 15:27:46 +0200 |
commit | 975565399114f391df3333d6319040e690cde785 (patch) | |
tree | f19eee07dc7af68932d5a2f1060e620d7de081ad /svtools | |
parent | dc635425118c77d35534d1bf8b3aa12a1ad95752 (diff) |
MSVC 2012 apparently isn't ready yet for std::vector<std::unique_ptr<T>>
...producing error messages about trying to access private undefined unique_ptr
copy ctor etc.
Partial revert of 014e7933af751bfe0a03867373b82efa806f3a3d "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," going the awkward
std::unique_ptr x(...);
push_back(x.get());
x.release();
route instead (which could be simplified if boost::ptr_vector::push_back ever
started to support unique_ptr).
Change-Id: I15693030a0bbfdedbfdfbe76ede5d0c74f4e5b41
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/svhtml/htmlsupp.cxx | 2 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx index 2b3f89dd8998..7069e4e2a07e 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 265427de172e..5524bc038dd3 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -38,7 +38,6 @@ #include <svtools/htmlkywd.hxx> #include <memory> -#include <utility> using namespace ::com::sun::star; @@ -1583,7 +1582,8 @@ const HTMLOptions& HTMLParser::GetOptions( sal_uInt16 *pNoConvertToken ) std::unique_ptr<HTMLOption> pOption( new HTMLOption(sal::static_int_cast<sal_uInt16>(nToken), sName, aValue)); - maOptions.push_back(std::move(pOption)); + maOptions.push_back(pOption.get()); + pOption.release(); } else // Ignore white space and unexpected characters @@ -2068,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: |