summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitive2d.cxx6
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx9
-rw-r--r--include/sfx2/childwin.hxx2
-rw-r--r--sc/source/ui/dataprovider/sqldataprovider.cxx2
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx6
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrole2obj.cxx14
-rw-r--r--svx/source/sdr/overlay/overlaypolypolygon.cxx7
-rw-r--r--svx/source/svdraw/svddrgmt.cxx19
-rw-r--r--sw/inc/IDocumentExternalData.hxx2
-rw-r--r--sw/source/core/doc/DocumentExternalDataManager.cxx2
-rw-r--r--sw/source/core/inc/DocumentExternalDataManager.hxx2
-rw-r--r--sw/source/core/text/porrst.cxx10
-rw-r--r--sw/source/core/text/porrst.hxx8
-rw-r--r--sw/source/ui/vba/vbadocument.cxx3
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx5
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx2
-rw-r--r--writerfilter/source/dmapper/TableData.hxx4
-rw-r--r--writerfilter/source/dmapper/TableManager.hxx2
18 files changed, 50 insertions, 55 deletions
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index b33abde57867..0d770c58dffb 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -139,10 +139,8 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer,
if (!basegfx::fTools::equalZero(fTransparency))
{
- Primitive2DReference aUnifiedTransparence(
- new UnifiedTransparencePrimitive2D(std::move(aRetval), fTransparency));
-
- aRetval = Primitive2DContainer{ aUnifiedTransparence };
+ aRetval = Primitive2DContainer{ Primitive2DReference(
+ new UnifiedTransparencePrimitive2D(std::move(aRetval), fTransparency)) };
}
}
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index 6a0dd7e070ee..7562459e0b70 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -572,10 +572,11 @@ namespace drawinglayer::primitive2d
basegfx::B2DPolygon aMaskPolygon(basegfx::utils::createUnitPolygon());
aMaskPolygon.transform(rTransform);
- Primitive2DReference mask = new MaskPrimitive2D(
- basegfx::B2DPolyPolygon(aMaskPolygon),
- std::move(aRetval));
- aRetval = Primitive2DContainer { mask };
+ aRetval = Primitive2DContainer {
+ Primitive2DReference(new MaskPrimitive2D(
+ basegfx::B2DPolyPolygon(aMaskPolygon),
+ std::move(aRetval)))
+ };
}
break;
}
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 57c2369233ef..568abf3f2e21 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -116,7 +116,7 @@ public:
void Destroy();
vcl::Window* GetWindow() const
{ return pWindow; }
- void SetController(std::shared_ptr<SfxDialogController> controller) { xController = controller; }
+ void SetController(const std::shared_ptr<SfxDialogController>& controller) { xController = controller; }
void ClearController() { xController.reset(); }
std::shared_ptr<SfxDialogController>& GetController() { return xController; }
const std::shared_ptr<SfxDialogController>& GetController() const { return xController; }
diff --git a/sc/source/ui/dataprovider/sqldataprovider.cxx b/sc/source/ui/dataprovider/sqldataprovider.cxx
index 9aed1996c6ab..e255438b6be0 100644
--- a/sc/source/ui/dataprovider/sqldataprovider.cxx
+++ b/sc/source/ui/dataprovider/sqldataprovider.cxx
@@ -51,7 +51,7 @@ SQLFetchThread::SQLFetchThread(
, mrDocument(rDoc)
, maID(rID)
, maDataTransformations(std::move(rTransformations))
- , maImportFinishedHdl(aImportFinishedHdl)
+ , maImportFinishedHdl(std::move(aImportFinishedHdl))
{
}
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index e20a473f06ef..c99247af979f 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -3147,11 +3147,7 @@ public:
for (sal_Int32 nRow = aRange.aStart.Row(); nRow <= aRange.aEnd.Row(); ++nRow)
{
if (meOrigin != chart2::data::LabelOrigin_LONG_SIDE)
- {
- OUString aString = ScResId(STR_ROW) +
- " " + OUString::number( nRow+1 );
- pArr[mnCount] = aString;
- }
+ pArr[mnCount] = ScResId(STR_ROW) + " " + OUString::number(nRow + 1);
else //only indices for categories
pArr[mnCount] = OUString::number( mnCount+1 );
++mnCount;
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index 787167540030..ab76225e5713 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -154,15 +154,15 @@ basegfx::B2DRange ViewContactOfSdrOle2Obj::getRange( const drawinglayer::geometr
basegfx::B2DHomMatrix aObjectMatrix = createObjectTransform();
- drawinglayer::primitive2d::Primitive2DReference xContent =
- new drawinglayer::primitive2d::SdrOleContentPrimitive2D(
- GetOle2Obj(),
- aObjectMatrix,
- GetOle2Obj().getEmbeddedObjectRef().getGraphicVersion());
-
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::SdrOle2Primitive2D(
- drawinglayer::primitive2d::Primitive2DContainer { xContent },
+ drawinglayer::primitive2d::Primitive2DContainer {
+ drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::SdrOleContentPrimitive2D(
+ GetOle2Obj(),
+ aObjectMatrix,
+ GetOle2Obj().getEmbeddedObjectRef().getGraphicVersion()))
+ },
aObjectMatrix,
aAttribute));
diff --git a/svx/source/sdr/overlay/overlaypolypolygon.cxx b/svx/source/sdr/overlay/overlaypolypolygon.cxx
index 7d06d7439f34..a3b3d10affc8 100644
--- a/svx/source/sdr/overlay/overlaypolypolygon.cxx
+++ b/svx/source/sdr/overlay/overlaypolypolygon.cxx
@@ -63,9 +63,10 @@ namespace sdr::overlay
sal_uInt8 nTransparency = 255 - getBaseColor().GetAlpha();
if (nTransparency > 0)
{
- drawinglayer::primitive2d::Primitive2DReference aTransparencePrimitive(
- new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(std::move(aReturnContainer), nTransparency / 255.0));
- aReturnContainer = drawinglayer::primitive2d::Primitive2DContainer{ aTransparencePrimitive };
+ aReturnContainer = drawinglayer::primitive2d::Primitive2DContainer{
+ drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(std::move(aReturnContainer), nTransparency / 255.0))
+ };
}
}
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 166b174c89be..1d6d379fce85 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -252,18 +252,19 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPointGlueDrag::creat
aColor = Application::GetSettings().GetStyleSettings().GetHighlightColor().getBColor();
}
- drawinglayer::primitive2d::Primitive2DReference aMarkerArrayPrimitive2D(
- new drawinglayer::primitive2d::MarkerArrayPrimitive2D(std::move(aTransformedPositions),
- drawinglayer::primitive2d::createDefaultCross_3x3(aColor)));
-
- aRetval = drawinglayer::primitive2d::Primitive2DContainer { aMarkerArrayPrimitive2D };
+ aRetval = drawinglayer::primitive2d::Primitive2DContainer {
+ drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::MarkerArrayPrimitive2D(std::move(aTransformedPositions),
+ drawinglayer::primitive2d::createDefaultCross_3x3(aColor)))
+ };
}
else
{
- drawinglayer::primitive2d::Primitive2DReference aMarkerArrayPrimitive2D(
- new drawinglayer::primitive2d::MarkerArrayPrimitive2D(std::move(aTransformedPositions),
- SdrHdl::createGluePointBitmap()));
- aRetval = drawinglayer::primitive2d::Primitive2DContainer { aMarkerArrayPrimitive2D };
+ aRetval = drawinglayer::primitive2d::Primitive2DContainer {
+ drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::MarkerArrayPrimitive2D(std::move(aTransformedPositions),
+ SdrHdl::createGluePointBitmap()))
+ };
}
}
diff --git a/sw/inc/IDocumentExternalData.hxx b/sw/inc/IDocumentExternalData.hxx
index 9efbea39a89f..4e415cfac55c 100644
--- a/sw/inc/IDocumentExternalData.hxx
+++ b/sw/inc/IDocumentExternalData.hxx
@@ -52,7 +52,7 @@ protected:
public:
virtual void setExternalData(sw::tExternalDataType eType,
- sw::tExternalDataPointer pPayload) = 0;
+ const sw::tExternalDataPointer& pPayload) = 0;
virtual sw::tExternalDataPointer getExternalData(sw::tExternalDataType eType) = 0;
};
diff --git a/sw/source/core/doc/DocumentExternalDataManager.cxx b/sw/source/core/doc/DocumentExternalDataManager.cxx
index 3e751a316812..f1b67bde8552 100644
--- a/sw/source/core/doc/DocumentExternalDataManager.cxx
+++ b/sw/source/core/doc/DocumentExternalDataManager.cxx
@@ -21,7 +21,7 @@
namespace sw
{
-void DocumentExternalDataManager::setExternalData(::sw::tExternalDataType eType, ::sw::tExternalDataPointer pPayload)
+void DocumentExternalDataManager::setExternalData(::sw::tExternalDataType eType, const ::sw::tExternalDataPointer& pPayload)
{
m_externalData[eType] = pPayload;
}
diff --git a/sw/source/core/inc/DocumentExternalDataManager.hxx b/sw/source/core/inc/DocumentExternalDataManager.hxx
index bc80ac429f99..37a5029522af 100644
--- a/sw/source/core/inc/DocumentExternalDataManager.hxx
+++ b/sw/source/core/inc/DocumentExternalDataManager.hxx
@@ -34,7 +34,7 @@ public:
DocumentExternalDataManager() = default;
void setExternalData(::sw::tExternalDataType eType,
- ::sw::tExternalDataPointer pPayload) override;
+ const ::sw::tExternalDataPointer& pPayload) override;
::sw::tExternalDataPointer getExternalData(::sw::tExternalDataType eType) override;
};
}
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 029adca75336..b9d4e5ab3fcb 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -834,7 +834,7 @@ void SwBookmarkPortion::Paint( const SwTextPaintInfo &rInf ) const
// some |text| here
// [[ ]]
if (m_nStart > 1)
- aNewPos.AdjustX(static_cast<tools::Long>(mnHalfCharWidth) * -2 * (m_oColors.size() - 1));
+ aNewPos.AdjustX(static_cast<tools::Long>(mnHalfCharWidth) * -2 * (m_aColors.size() - 1));
}
else if ( m_nStart != 0 && m_nEnd != 0 )
// both end and start boundary marks: adjust them around the bookmark position
@@ -844,7 +844,7 @@ void SwBookmarkPortion::Paint( const SwTextPaintInfo &rInf ) const
const_cast< SwTextPaintInfo& >( rInf ).SetPos( aNewPos );
- for ( const auto& it : m_oColors )
+ for ( const auto& it : m_aColors )
{
// set bold for custom colored bookmark symbol
// and draw multiple symbols showing all custom colors
@@ -878,7 +878,7 @@ void SwBookmarkPortion::Paint( const SwTextPaintInfo &rInf ) const
void SwBookmarkPortion::HandlePortion( SwPortionHandler& rPH ) const
{
OUStringBuffer aStr;
- for ( const auto& it : m_oColors )
+ for ( const auto& it : m_aColors )
{
aStr.append("#" + std::get<2>(it) + " " + SwResId(STR_BOOKMARK_DEF_NAME));
switch (std::get<0>(it))
@@ -903,10 +903,10 @@ void SwBookmarkPortion::dumpAsXml(xmlTextWriterPtr pWriter, const OUString& rTex
dumpAsXmlAttributes(pWriter, rText, nOffset);
nOffset += GetLen();
- if (!m_oColors.empty())
+ if (!m_aColors.empty())
{
OUStringBuffer aStr;
- for (const auto& rColor : m_oColors)
+ for (const auto& rColor : m_aColors)
{
aStr.append("#" + std::get<2>(rColor) + " " + SwResId(STR_BOOKMARK_DEF_NAME));
switch (std::get<0>(rColor))
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index c5e57c688af1..56108cd08846 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -185,18 +185,18 @@ public:
class SwBookmarkPortion : public SwControlCharPortion
{
// custom colors defined by metadata
- std::vector<std::tuple<SwScriptInfo::MarkKind, Color, OUString>> m_oColors;
+ std::vector<std::tuple<SwScriptInfo::MarkKind, Color, OUString>> m_aColors;
// number of MarkKind marks
sal_Int16 m_nStart, m_nEnd, m_nPoint;
bool m_bHasCustomColor;
public:
- explicit SwBookmarkPortion(sal_Unicode const cChar, std::vector<std::tuple<SwScriptInfo::MarkKind, Color, OUString>>rColors)
- : SwControlCharPortion(cChar), m_oColors(rColors), m_nStart(0), m_nEnd(0), m_nPoint(0), m_bHasCustomColor(false)
+ explicit SwBookmarkPortion(sal_Unicode const cChar, std::vector<std::tuple<SwScriptInfo::MarkKind, Color, OUString>> aColors)
+ : SwControlCharPortion(cChar), m_aColors(std::move(aColors)), m_nStart(0), m_nEnd(0), m_nPoint(0), m_bHasCustomColor(false)
{
SetWhichPor(PortionType::Bookmark);
SetLen(TextFrameIndex(0));
- for (const auto& it : m_oColors)
+ for (const auto& it : m_aColors)
{
if (std::get<0>(it) == SwScriptInfo::MarkKind::Start)
m_nStart++;
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index c8985464501d..49e40dc49f08 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -378,9 +378,8 @@ SwVbaDocument::getAttachedTemplate()
uno::Reference<css::document::XDocumentPropertiesSupplier> const xDocPropSupp(
getModel(), uno::UNO_QUERY_THROW);
uno::Reference< css::document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_SET_THROW );
- OUString sTemplateUrl = xDocProps->getTemplateURL();
- xTemplate = new SwVbaTemplate( this, mxContext, sTemplateUrl );
+ xTemplate = new SwVbaTemplate( this, mxContext, xDocProps->getTemplateURL() );
return uno::Any( xTemplate );
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 57a9f3bc5223..679a1a37a17e 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1147,11 +1147,10 @@ void DomainMapper_Impl::PopSdt()
beans::PropertyValues* pItems = aItems.getArray();
for (size_t i = 0; i < rValues.size(); ++i)
{
- uno::Sequence<beans::PropertyValue> aItem = {
+ pItems[i] = {
comphelper::makePropertyValue("DisplayText", rDisplayTexts[i]),
- comphelper::makePropertyValue("Value", rValues[i]),
+ comphelper::makePropertyValue("Value", rValues[i])
};
- pItems[i] = aItem;
}
xContentControlProps->setPropertyValue("ListItems", uno::Any(aItems));
if (m_pSdtHelper->getControlType() == SdtControlType::dropDown)
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 95bec19736c8..fa5182f77e6c 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -249,7 +249,7 @@ public:
void SetHyperlinkTarget(const OUString& rTarget) { m_sHyperlinkTarget = rTarget; }
const OUString& GetHyperlinkTarget() const { return m_sHyperlinkTarget; }
- void setFFDataHandler(FFDataHandler::Pointer_t pFFDataHandler) { m_pFFDataHandler = pFFDataHandler; }
+ void setFFDataHandler(const FFDataHandler::Pointer_t& pFFDataHandler) { m_pFFDataHandler = pFFDataHandler; }
const FFDataHandler::Pointer_t& getFFDataHandler() const { return m_pFFDataHandler; }
void setFormControlHelper(const FormControlHelper::Pointer_t& pFormControlHelper) { m_pFormControlHelper = pFormControlHelper; }
diff --git a/writerfilter/source/dmapper/TableData.hxx b/writerfilter/source/dmapper/TableData.hxx
index 9c75eedc4e91..ded929696e5a 100644
--- a/writerfilter/source/dmapper/TableData.hxx
+++ b/writerfilter/source/dmapper/TableData.hxx
@@ -151,7 +151,7 @@ public:
@param pProps the properties of the cell
@param bAddBefore true: add an empty cell at beginning of the row for gridBefore
*/
- void addCell(const css::uno::Reference<css::text::XTextRange>& start, TablePropertyMapPtr pProps, bool bAddBefore = false)
+ void addCell(const css::uno::Reference<css::text::XTextRange>& start, const TablePropertyMapPtr& pProps, bool bAddBefore = false)
{
CellData::Pointer_t pCellData(new CellData(start, pProps));
if (bAddBefore)
@@ -338,7 +338,7 @@ public:
@param end end handle of the cell
@param pProps properties of the cell
*/
- void addCell(const css::uno::Reference<css::text::XTextRange>& start, TablePropertyMapPtr pProps)
+ void addCell(const css::uno::Reference<css::text::XTextRange>& start, const TablePropertyMapPtr& pProps)
{
mpRow->addCell(start, pProps);
}
diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx
index 446fb20f8da5..f98c992a3595 100644
--- a/writerfilter/source/dmapper/TableManager.hxx
+++ b/writerfilter/source/dmapper/TableManager.hxx
@@ -168,7 +168,7 @@ class TableManager : public virtual SvRefBase
mTableProps.top().clear();
}
- void setTableProps(TablePropertyMapPtr pProps)
+ void setTableProps(const TablePropertyMapPtr& pProps)
{
if (mTableProps.size() > 0)
mTableProps.top() = pProps;