diff options
35 files changed, 97 insertions, 127 deletions
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index 68d2f63622f7..7ef19597e303 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -531,8 +531,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties {} } - OUString aPropIdStr = aEsc + aPureIdStr; - pIdStrings[i] = aPropIdStr; + pIdStrings[i] = aEsc + aPureIdStr; } xPropertySet->setPropertyValue( aPropName, Any(aIdStrings) ); } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index bdde50944a1d..5d3f992cf56a 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -1541,7 +1541,6 @@ void SbiRuntime::StepLIKE() SbxVariableRef refVar1 = PopVar(); SbxVariableRef refVar2 = PopVar(); - OUString pattern = VBALikeToRegexp(refVar1->GetOUString()); OUString value = refVar2->GetOUString(); i18nutil::SearchOptions2 aSearchOpt; @@ -1549,7 +1548,7 @@ void SbiRuntime::StepLIKE() aSearchOpt.AlgorithmType2 = css::util::SearchAlgorithms2::REGEXP; aSearchOpt.Locale = Application::GetSettings().GetLanguageTag().getLocale(); - aSearchOpt.searchString = pattern; + aSearchOpt.searchString = VBALikeToRegexp(refVar1->GetOUString()); bool bTextMode(true); bool bCompatibility = ( GetSbData()->pInst && GetSbData()->pInst->IsCompatibility() ); diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 11fc5d9faee7..13e44518c8d8 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -432,8 +432,7 @@ OUString SelectionHelper::getHitObjectCID( if( aRet == aWallCID ) { - OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) ); - aRet = aDiagramCID; + aRet = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) ); } } } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index d41012850bce..f8b452193c0a 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2943,8 +2943,7 @@ IMPL_LINK_NOARG(SvxIconSelectorDialog, DeleteHdl, weld::Button&, void) sal_uInt16 nId = m_xTbSymbol->GetSelectedItemId(); - OUString aSelImageText = m_xTbSymbol->GetItemText( nId ); - uno::Sequence< OUString > URLs { aSelImageText }; + uno::Sequence<OUString> URLs { m_xTbSymbol->GetItemText(nId) }; m_xTbSymbol->RemoveItem(nId); m_xImportedImageManager->removeImages( SvxConfigPageHelper::GetImageType(), URLs ); if ( m_xImportedImageManager->isModified() ) diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx index 87f3105a0875..3ca13bb161bc 100644 --- a/cui/source/factory/init.cxx +++ b/cui/source/factory/init.cxx @@ -32,9 +32,8 @@ SAL_DLLPUBLIC_EXPORT bool GetSpecialCharsForEdit(weld::Widget* i_pParent, const if (aDlg.run() == RET_OK) { sal_UCS4 cChar = aDlg.GetChar(); - // using the new UCS4 constructor - OUString aOUStr( &cChar, 1 ); - o_rResult = aOUStr; + // using the UCS4 constructor + o_rResult = OUString(&cChar, 1); bRet = true; } return bRet; diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index c0a42990f5d7..deb0ecaa2844 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -2573,8 +2573,7 @@ short OfaTreeOptionsDialog::run() if ( !bIsFromExtensionManager ) { // collect all DictionaryList Events while the dialog is executed - Reference<css::linguistic2::XSearchableDictionaryList> xDictionaryList(LinguMgr::GetDictionaryList()); - pClamp.reset( new SvxDicListChgClamp( xDictionaryList ) ); + pClamp.reset(new SvxDicListChgClamp(LinguMgr::GetDictionaryList())); } return SfxOkDialogController::run(); diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index d9acbd18f537..4ab84e4320ed 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -190,8 +190,7 @@ IMPL_LINK_NOARG(WebConnectionInfoDialog, ChangePasswordHdl, weld::Button&, void) if ( pPasswordRequest->isPassword() ) { - OUString aNewPass = pPasswordRequest->getPassword(); - uno::Sequence<OUString> aPasswd { aNewPass }; + uno::Sequence<OUString> aPasswd { pPasswordRequest->getPassword() }; uno::Reference< task::XPasswordContainer2 > xPasswdContainer( task::PasswordContainer::create(comphelper::getProcessComponentContext())); diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx index 084c42e7e96a..0ee0d2e1f93c 100644 --- a/dbaccess/source/core/misc/ContainerMediator.cxx +++ b/dbaccess/source/core/misc/ContainerMediator.cxx @@ -222,8 +222,7 @@ void OContainerMediator::notifyElementCreated( const OUString& _sName, const Ref DBG_UNHANDLED_EXCEPTION("dbaccess"); } - ::rtl::Reference pForward( new OPropertyForward( _xDest, m_xSettings, _sName, aPropertyList ) ); - m_aForwardList[ _sName ] = pForward; + m_aForwardList[_sName].set(new OPropertyForward(_xDest, m_xSettings, _sName, aPropertyList)); } } // namespace dbaccess diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index 0d770c58dffb..c143c8a83231 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -156,14 +156,12 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, getGraphicAttr().GetBottomCrop())); // embed content in cropPrimitive - Primitive2DReference xPrimitive( + aRetval = Primitive2DContainer{ Primitive2DReference( new CropPrimitive2D(std::move(aRetval), aTransform, getGraphicAttr().GetLeftCrop() * aCropScaleFactor.getX(), getGraphicAttr().GetTopCrop() * aCropScaleFactor.getY(), getGraphicAttr().GetRightCrop() * aCropScaleFactor.getX(), - getGraphicAttr().GetBottomCrop() * aCropScaleFactor.getY())); - - aRetval = Primitive2DContainer{ xPrimitive }; + getGraphicAttr().GetBottomCrop() * aCropScaleFactor.getY())) }; } rContainer.append(std::move(aRetval)); diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx index 2021fc28360d..42875ba42570 100644 --- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx @@ -126,11 +126,12 @@ namespace drawinglayer::primitive2d if(0 != mnDiscreteWidth && 0 != mnDiscreteHeight) { const geometry::ViewInformation2D aViewInformation2D; - primitive2d::Primitive2DReference xEmbedRef( - new primitive2d::TransformPrimitive2D( - basegfx::utils::createScaleB2DHomMatrix(mnDiscreteWidth, mnDiscreteHeight), - Primitive2DContainer(getChildren()))); - primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef }; + primitive2d::Primitive2DContainer xEmbedSeq { + primitive2d::Primitive2DReference( + new primitive2d::TransformPrimitive2D( + basegfx::utils::createScaleB2DHomMatrix(mnDiscreteWidth, mnDiscreteHeight), + Primitive2DContainer(getChildren()))) + }; const BitmapEx aBitmapEx( convertToBitmapEx( @@ -244,12 +245,12 @@ namespace drawinglayer::primitive2d aMaskRange.getRange(), aMaskRange.getMinimum())); - Primitive2DReference xRef( - new TransformPrimitive2D( - aMaskTransform, - std::move(aRetval))); - - aRetval = Primitive2DContainer { xRef }; + aRetval = Primitive2DContainer { + Primitive2DReference( + new TransformPrimitive2D( + aMaskTransform, + std::move(aRetval))) + }; } // embed result in mask diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx index 31bad2a0abd4..03a3c4a150f2 100644 --- a/drawinglayer/source/tools/wmfemfhelper.cxx +++ b/drawinglayer/source/tools/wmfemfhelper.cxx @@ -336,19 +336,18 @@ namespace wmfemfhelper { drawinglayer::primitive2d::Primitive2DContainer xRetval = std::move(aTargets); - if (!xRetval.empty() && rPropertyHolder.getClipPolyPolygonActive()) { const basegfx::B2DPolyPolygon& rClipPolyPolygon = rPropertyHolder.getClipPolyPolygon(); if (rClipPolyPolygon.count()) { - drawinglayer::primitive2d::Primitive2DReference xMask( - new drawinglayer::primitive2d::MaskPrimitive2D( - rClipPolyPolygon, - std::move(xRetval))); - - xRetval = drawinglayer::primitive2d::Primitive2DContainer{ xMask }; + xRetval = drawinglayer::primitive2d::Primitive2DContainer{ + drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::MaskPrimitive2D( + rClipPolyPolygon, + std::move(xRetval))) + }; } } diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index 965042290fc7..347c23c16a9c 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -412,14 +412,12 @@ void SAL_CALL DispatchRecorder::replaceByIndex(sal_Int32 idx, const css::uno::An auto pStatement = o3tl::doAccess<css::frame::DispatchStatement>(element); - css::frame::DispatchStatement aStatement( + m_aStatements[idx] = css::frame::DispatchStatement( pStatement->aCommand, pStatement->aTarget, pStatement->aArgs, pStatement->nFlags, pStatement->bIsComment); - - m_aStatements[idx] = aStatement; } } // namespace framework diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 4b03c4b18d69..4e3585c51341 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -1089,11 +1089,10 @@ Sequence< Sequence< PropertyValue > > SAL_CALL ModuleUIConfigurationManager::get sal_Int32 n = 0; for (auto const& elem : aUIElementInfoCollection) { - Sequence< PropertyValue > aUIElementInfo{ + aElementInfoSeq[n++] = Sequence<PropertyValue> { comphelper::makePropertyValue("ResourceURL", elem.second.aResourceURL), comphelper::makePropertyValue(m_aPropUIName, elem.second.aUIName) }; - aElementInfoSeq[n++] = aUIElementInfo; } return comphelper::containerToSequence(aElementInfoSeq); diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index e19a7ec40b00..dfd30fc664e5 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -620,13 +620,10 @@ void SAL_CALL ToolbarsMenuController::itemSelected( const css::awt::MenuEvent& r Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); if ( xDispatchProvider.is() ) { - Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( - aTargetURL, OUString(), 0 ); - ExecuteInfo* pExecuteInfo = new ExecuteInfo; - pExecuteInfo->xDispatch = xDispatch; - pExecuteInfo->aTargetURL = aTargetURL; - pExecuteInfo->aArgs = aArgs; + pExecuteInfo->xDispatch = xDispatchProvider->queryDispatch(aTargetURL, OUString(), 0); + pExecuteInfo->aTargetURL = aTargetURL; + pExecuteInfo->aArgs = aArgs; Application::PostUserEvent( LINK(nullptr, ToolbarsMenuController, ExecuteHdl_Impl), pExecuteInfo ); } } diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index 507225f4d249..c14776f26217 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -714,7 +714,7 @@ public: virtual OUString GetSurroundingText() const override; virtual Selection GetSurroundingTextSelection() const override; virtual bool DeleteSurroundingText(const Selection& rSelection) override; - void SetUITestFactory(FactoryFunction pFactoryFunction, void* pUserData) + void SetUITestFactory(const FactoryFunction& pFactoryFunction, void* pUserData) { m_pFactoryFunction = pFactoryFunction; m_pUserData = pUserData; diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 246714e84321..b7e00fb898a6 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -533,8 +533,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD uno::Reference<sheet::XLevelsSupplier> xLevSupp(xHiers->getByIndex(nHier), uno::UNO_QUERY); if ( xLevSupp.is() ) { - uno::Reference<container::XNameAccess> xLevelsName = xLevSupp->getLevels(); - xLevels = new ScNameToIndexAccess( xLevelsName ); + xLevels = new ScNameToIndexAccess(xLevSupp->getLevels()); nLevCount = xLevels->getCount(); } diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 3161e2ba32b3..7af737b48c8b 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -1016,8 +1016,7 @@ void ScShapeChildren::FillShapes(const tools::Rectangle& aPixelPaintRect, const tools::Rectangle aRect2(Point(0,0), mpAccDoc->GetBoundingBoxOnScreen().GetSize()); aClippedPixelPaintRect = aPixelPaintRect.GetIntersection(aRect2); } - ScIAccessibleViewForwarder aViewForwarder(mpViewShell, mpAccDoc, aMapMode); - maShapeRanges[nRangeId].maViewForwarder = aViewForwarder; + maShapeRanges[nRangeId].maViewForwarder = ScIAccessibleViewForwarder(mpViewShell, mpAccDoc, aMapMode); for (const rtl::Reference<SdrObject>& pObj : *pPage) { uno::Reference< drawing::XShape > xShape(pObj->getUnoShape(), uno::UNO_QUERY); diff --git a/sd/source/ui/animations/STLPropertySet.cxx b/sd/source/ui/animations/STLPropertySet.cxx index 592d7639cd5d..708386d78f7a 100644 --- a/sd/source/ui/animations/STLPropertySet.cxx +++ b/sd/source/ui/animations/STLPropertySet.cxx @@ -35,8 +35,7 @@ STLPropertySet::~STLPropertySet() void STLPropertySet::setPropertyDefaultValue( sal_Int32 nHandle, const Any& rValue ) { - STLPropertyMapEntry aEntry( rValue ); - maPropertyMap[ nHandle ] = aEntry; + maPropertyMap[nHandle] = STLPropertyMapEntry(rValue); } void STLPropertySet::setPropertyValue( sal_Int32 nHandle, const Any& rValue ) diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index d86ffed7c562..effb30fcecf5 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -1269,9 +1269,8 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno sal_Int32 nPos = aStrBookmark.lastIndexOf( '#' ); if( nPos >= 0 ) { - OUString aURL = aStrBookmark.subView( 0, nPos+1 ) + aStrBookmark = aStrBookmark.subView( 0, nPos+1 ) + getUiNameFromPageApiNameImpl( aStrBookmark.copy( nPos+1 ) ); - aStrBookmark = aURL; } } @@ -1517,9 +1516,8 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) sal_Int32 nPos = aString.lastIndexOf( '#' ); if( nPos >= 0 ) { - OUString aURL = aString.subView( 0, nPos+1 ) + + aString = aString.subView( 0, nPos+1 ) + getPageApiNameFromUiName( aString.copy( nPos+1 ) ); - aString = aURL; } pProperties->Name = gaStrBookmark; pProperties->Handle = -1; diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx index cb7001dddad7..b0ba0cdf1deb 100644 --- a/svgio/source/svgreader/svgmasknode.cxx +++ b/svgio/source/svgreader/svgmasknode.cxx @@ -242,14 +242,14 @@ namespace svgio::svgreader if (SvgUnits::objectBoundingBox == maMaskContentUnits) { // mask is object-relative, embed in content transformation - drawinglayer::primitive2d::Primitive2DReference xTransform( - new drawinglayer::primitive2d::TransformPrimitive2D( - basegfx::utils::createScaleTranslateB2DHomMatrix( - aContentRange.getRange(), - aContentRange.getMinimum()), - std::move(aMaskTarget))); - - aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { xTransform }; + aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { + drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::TransformPrimitive2D( + basegfx::utils::createScaleTranslateB2DHomMatrix( + aContentRange.getRange(), + aContentRange.getMinimum()), + std::move(aMaskTarget))) + }; } else // userSpaceOnUse { diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx index 0ae4e80363c8..fa7795ab43fa 100644 --- a/svgio/source/svgreader/svgnode.cxx +++ b/svgio/source/svgreader/svgnode.cxx @@ -660,15 +660,15 @@ namespace { } } - // pack in ObjectInfoPrimitive2D group - drawinglayer::primitive2d::Primitive2DReference xRef( - new drawinglayer::primitive2d::ObjectInfoPrimitive2D( - std::move(rTarget), - aObjectName, - rTitle, - rDesc)); - - rTarget = drawinglayer::primitive2d::Primitive2DContainer { xRef }; + rTarget = drawinglayer::primitive2d::Primitive2DContainer { + // pack in ObjectInfoPrimitive2D group + drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::ObjectInfoPrimitive2D( + std::move(rTarget), + aObjectName, + rTitle, + rDesc)) + }; } } } diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index eac781290624..f248b7a60874 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -165,8 +165,9 @@ void Impl3DMirrorConstructOverlay::SetMirrorAxis(Point aMirrorAxisA, Point aMirr if(!aMatrixTransform.isIdentity()) { // embed in transformation group - drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D(new drawinglayer::primitive2d::TransformPrimitive2D(aMatrixTransform, std::move(aContent))); - aContent = drawinglayer::primitive2d::Primitive2DContainer { aTransformPrimitive2D }; + aContent = drawinglayer::primitive2d::Primitive2DContainer { + drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::TransformPrimitive2D(aMatrixTransform, std::move(aContent))) + }; } // if we have full overlay from selected objects, embed with 50% transparence, the diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index 5d01880d2ef4..09593f129f4b 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -333,12 +333,12 @@ void ViewObjectContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInf std::make_shared<basegfx::BColorModifier_interpolate>( aRGBWhite, 0.5); - drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::ModifiedColorPrimitive2D( - std::move(xRetval), - aBColorModifier)); - - xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference }; + xRetval = drawinglayer::primitive2d::Primitive2DContainer{ + drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::ModifiedColorPrimitive2D( + std::move(xRetval), + aBColorModifier)) + }; } } diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 8319a259bc4b..6eb3d912fd42 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -118,10 +118,11 @@ namespace sdr::overlay if(bInvert) { // embed all in invert primitive - drawinglayer::primitive2d::Primitive2DReference aInvert( - new drawinglayer::primitive2d::InvertPrimitive2D( - std::move(aRetval))); - aRetval = drawinglayer::primitive2d::Primitive2DContainer { aInvert }; + aRetval = drawinglayer::primitive2d::Primitive2DContainer { + drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::InvertPrimitive2D( + std::move(aRetval))) + }; } else if(OverlayType::Transparent == maLastOverlayType) { diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 31271af9aef4..1a8609c6b865 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -196,15 +196,14 @@ SdrDragEntryPrimitive2DSequence::~SdrDragEntryPrimitive2DSequence() drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPrimitive2DSequence::createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) { - drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D( - new drawinglayer::primitive2d::TransformPrimitive2D( - rDragMethod.getCurrentTransformation(), - drawinglayer::primitive2d::Primitive2DContainer(maPrimitive2DSequence))); - - return drawinglayer::primitive2d::Primitive2DContainer { aTransformPrimitive2D }; + return drawinglayer::primitive2d::Primitive2DContainer { + drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::TransformPrimitive2D( + rDragMethod.getCurrentTransformation(), + drawinglayer::primitive2d::Primitive2DContainer(maPrimitive2DSequence))) + }; } - SdrDragEntryPointGlueDrag::SdrDragEntryPointGlueDrag(std::vector< basegfx::B2DPoint >&& rPositions, bool bIsPointDrag) : maPositions(std::move(rPositions)), mbIsPointDrag(bIsPointDrag) diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index b6ef17b86616..c5aeded2a21f 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -679,12 +679,12 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const MapMode(MapUnit::Map100thMM))); // Embed primitives to get them in 100th mm - drawinglayer::primitive2d::Primitive2DReference xEmbedRef( - new drawinglayer::primitive2d::TransformPrimitive2D( - aMapTransform, - std::move(xPrimitives))); - - xPrimitives = drawinglayer::primitive2d::Primitive2DContainer { xEmbedRef }; + xPrimitives = drawinglayer::primitive2d::Primitive2DContainer { + drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::TransformPrimitive2D( + aMapTransform, + std::move(xPrimitives))) + }; // Update basegfx::B2DRange aRange, too. Here we have the // choice of transforming the existing value or get newly by diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 5c2147ed91a9..1afe6e5c154d 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -2258,8 +2258,9 @@ namespace sdr::contact if(!xRetval.empty()) { // create transform primitive - drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::TransformPrimitive2D(aOffsetMatrix, std::move(xRetval))); - xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference }; + xRetval = drawinglayer::primitive2d::Primitive2DContainer { + drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::TransformPrimitive2D(aOffsetMatrix, std::move(xRetval))) + }; } rVisitor.visit(xRetval); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index d5ec969783ca..84eb066ee5ae 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3115,8 +3115,7 @@ void SwTabFramePainter::Insert( SwLineEntry& rNew, bool bHori ) SwLineEntrySet* pLineSet = aMapIter != pLine2->end() ? &((*aMapIter).second) : nullptr; if ( !pLineSet ) { - SwLineEntrySet aNewSet; - (*pLine2)[ nKey ] = aNewSet; + (*pLine2)[nKey] = SwLineEntrySet(); pLineSet = &(*pLine2)[ nKey ]; } SwLineEntrySet::iterator aIter = pLineSet->begin(); diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index 989f3ff93ea9..3c31d9d131ea 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -184,12 +184,10 @@ ErrCode SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx, if ( !xDocStream.is() ) return ERR_SWG_READ_ERROR; - uno::Reference<io::XInputStream> xInputStream = xDocStream->getInputStream(); - // prepare ParserInputSource xml::sax::InputSource aParserInput; aParserInput.sSystemId = m_aName; - aParserInput.aInputStream = xInputStream; + aParserInput.aInputStream = xDocStream->getInputStream(); // get service factory uno::Reference< uno::XComponentContext > xContext = diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 1f25b8989402..947f4eba39e0 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1740,9 +1740,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat( static_cast<const SvxFontListItem* >(pLclDocShell ->GetItem( SID_ATTR_CHAR_FONTLIST )); const FontList* pList = pFontListItem->GetFontList(); - FontMetric aFontMetric = pList->Get( - sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE); - vcl::Font aFont(aFontMetric); + vcl::Font aFont(pList->Get(sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE)); aFormat.SetBulletFont(&aFont); } else if (pBulletFontName) diff --git a/test/source/a11y/accessibletestbase.cxx b/test/source/a11y/accessibletestbase.cxx index 92a40e87f779..773259941f42 100644 --- a/test/source/a11y/accessibletestbase.cxx +++ b/test/source/a11y/accessibletestbase.cxx @@ -427,7 +427,7 @@ test::AccessibleTestBase::awaitDialog(const std::u16string_view name, bool bAutoClose) : mbWaitingForDialog(true) , msName(name) - , mCallback(callback) + , mCallback(std::move(callback)) , mbAutoClose(bAutoClose) , maTimeoutTimer("workaround timer if we don't catch WindowActivate") , maIdleHandler("runs user callback in idle time") diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index cb14a7845d88..24c1ba67ea41 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -110,10 +110,7 @@ void ContentResultSetWrapper::impl_initPropertySetInfo(std::unique_lock<std::mut if( !m_xPropertySetOrigin.is() ) return; - Reference< XPropertySetInfo > xOrig = - m_xPropertySetOrigin->getPropertySetInfo(); - - m_xPropertySetInfo = xOrig; + m_xPropertySetInfo = m_xPropertySetOrigin->getPropertySetInfo(); } void ContentResultSetWrapper::impl_EnsureNotDisposed(std::unique_lock<std::mutex>& /*rGuard*/) diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index de7b9c16ed97..2fed02b9209f 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -1752,11 +1752,10 @@ void Content::transfer( // 1) Create new child content. - OUString aType = xSource->isFolder() + ucb::ContentInfo aContentInfo; + aContentInfo.Type = xSource->isFolder() ? getContentType( m_aUri.getScheme(), true ) : getContentType( m_aUri.getScheme(), false ); - ucb::ContentInfo aContentInfo; - aContentInfo.Type = aType; aContentInfo.Attributes = 0; // Note: The static cast is okay here, because its sure that diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.hxx b/writerfilter/source/dmapper/TablePropertiesHandler.hxx index bd0901356418..9d8f90dc3925 100644 --- a/writerfilter/source/dmapper/TablePropertiesHandler.hxx +++ b/writerfilter/source/dmapper/TablePropertiesHandler.hxx @@ -45,12 +45,12 @@ public: void SetTableManager( TableManager* pTableManager ) { m_pTableManager = pTableManager; - }; + } - void SetProperties( PropertyMapPtr pProperties ) + void SetProperties(const PropertyMapPtr& pProperties) { m_pCurrentProperties = pProperties; - }; + } void SetInteropGrabBag(std::vector<css::beans::PropertyValue>& rValue); diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 1228e232d328..183c55e6d54d 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -204,9 +204,7 @@ bool XMLTextFieldImportContext::CreateField( Reference<XInterface> xIfc = xFactory->createInstance(rServiceName); if( xIfc.is() ) { - Reference<XPropertySet> xTmp( xIfc, UNO_QUERY ); - - xField = xTmp; + xField.set(xIfc, UNO_QUERY); } else { return false; // can't create instance } |