Kaydet (Commit) 528514f1 authored tarafından Noel Grandin's avatar Noel Grandin

sc: boost::ptr_vector->std::vector<std::unique_ptr>

Change-Id: I0861b86901e32aac3005cfe802cfed449f48f16a
üst d47cb79e
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <vcl/outdev.hxx> #include <vcl/outdev.hxx>
#include <vcl/pdfextoutdevdata.hxx> #include <vcl/pdfextoutdevdata.hxx>
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include <o3tl/make_unique.hxx>
#include "output.hxx" #include "output.hxx"
#include "document.hxx" #include "document.hxx"
...@@ -66,8 +67,8 @@ ...@@ -66,8 +67,8 @@
#include <com/sun/star/i18n/DirectionProperty.hpp> #include <com/sun/star/i18n/DirectionProperty.hpp>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory> #include <memory>
#include <vector>
#include <math.h> #include <math.h>
...@@ -1471,7 +1472,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA ...@@ -1471,7 +1472,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
// alternative pattern instances in case we need to modify the pattern // alternative pattern instances in case we need to modify the pattern
// before processing the cell value. // before processing the cell value.
::boost::ptr_vector<ScPatternAttr> aAltPatterns; std::vector<std::unique_ptr<ScPatternAttr> > aAltPatterns;
std::vector<long> aDX; std::vector<long> aDX;
long nPosY = nScrY; long nPosY = nScrY;
...@@ -1615,8 +1616,8 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA ...@@ -1615,8 +1616,8 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
} }
if ( mpDoc->GetPreviewFont() || mpDoc->GetPreviewCellStyle() ) if ( mpDoc->GetPreviewFont() || mpDoc->GetPreviewCellStyle() )
{ {
aAltPatterns.push_back(new ScPatternAttr(*pPattern)); aAltPatterns.push_back(o3tl::make_unique<ScPatternAttr>(*pPattern));
ScPatternAttr* pAltPattern = &aAltPatterns.back(); ScPatternAttr* pAltPattern = aAltPatterns.back().get();
if ( ScStyleSheet* pPreviewStyle = mpDoc->GetPreviewCellStyle( nCellX, nCellY, nTab ) ) if ( ScStyleSheet* pPreviewStyle = mpDoc->GetPreviewCellStyle( nCellX, nCellY, nTab ) )
{ {
pAltPattern->SetStyleSheet(pPreviewStyle); pAltPattern->SetStyleSheet(pPreviewStyle);
...@@ -1639,8 +1640,8 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA ...@@ -1639,8 +1640,8 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue()) pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue())
{ {
// Disable line break when the cell content is numeric. // Disable line break when the cell content is numeric.
aAltPatterns.push_back(new ScPatternAttr(*pPattern)); aAltPatterns.push_back(o3tl::make_unique<ScPatternAttr>(*pPattern));
ScPatternAttr* pAltPattern = &aAltPatterns.back(); ScPatternAttr* pAltPattern = aAltPatterns.back().get();
SfxBoolItem aLineBreak(ATTR_LINEBREAK, false); SfxBoolItem aLineBreak(ATTR_LINEBREAK, false);
pAltPattern->GetItemSet().Put(aLineBreak); pAltPattern->GetItemSet().Put(aLineBreak);
pPattern = pAltPattern; pPattern = pAltPattern;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment