sw/inc/ToxLinkProcessor.hxx | 6 +++--- sw/source/core/tox/ToxLinkProcessor.cxx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit eb1b6b8f52444a622a2913dc6c435df30e50ddab Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jun 5 20:30:30 2014 +0100 they're not copyable, deploy boost::ptr_vector instead Change-Id: I2e44b9e60622981141eb7af9753898b9f98b238a diff --git a/sw/inc/ToxLinkProcessor.hxx b/sw/inc/ToxLinkProcessor.hxx index 5a45465..fb56ec2 100644 --- a/sw/inc/ToxLinkProcessor.hxx +++ b/sw/inc/ToxLinkProcessor.hxx @@ -13,7 +13,7 @@ #include "fmtinfmt.hxx" #include "rtl/ustring.hxx" -#include <vector> +#include <boost/ptr_container/ptr_vector.hpp> class SwTxtNode; @@ -74,9 +74,9 @@ private: sal_Int32 mEndTextPos; }; - std::vector<ClosedLink> mClosedLinks; + boost::ptr_vector<ClosedLink> mClosedLinks; - std::vector<StartedLink> mStartedLinks; + boost::ptr_vector<StartedLink> mStartedLinks; friend class ::ToxLinkProcessorTest; }; diff --git a/sw/source/core/tox/ToxLinkProcessor.cxx b/sw/source/core/tox/ToxLinkProcessor.cxx index e236f00..23ab44a 100644 --- a/sw/source/core/tox/ToxLinkProcessor.cxx +++ b/sw/source/core/tox/ToxLinkProcessor.cxx @@ -20,7 +20,7 @@ namespace sw { void ToxLinkProcessor::StartNewLink(sal_Int32 startPosition, const OUString& characterStyle) { - mStartedLinks.push_back(StartedLink(startPosition, characterStyle)); + mStartedLinks.push_back(new StartedLink(startPosition, characterStyle)); } void @@ -36,12 +36,12 @@ ToxLinkProcessor::CloseLink(sal_Int32 endPosition, const OUString& url) return; } - ClosedLink closedLink(url, startedLink.mStartPosition, endPosition); + ClosedLink* closedLink = new ClosedLink(url, startedLink.mStartPosition, endPosition); const OUString& characterStyle = startedLink.mCharacterStyle; sal_uInt16 poolId = ObtainPoolId(characterStyle); - closedLink.mINetFmt.SetVisitedFmtAndId(characterStyle, poolId); - closedLink.mINetFmt.SetINetFmtAndId(characterStyle, poolId); + closedLink->mINetFmt.SetVisitedFmtAndId(characterStyle, poolId); + closedLink->mINetFmt.SetINetFmtAndId(characterStyle, poolId); mClosedLinks.push_back(closedLink); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits