[Libreoffice-commits] core.git: 2 commits - scripting/source sd/source svx/Library_svxcore.mk svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 24 06:35:56 UTC 2018
scripting/source/dlgprov/dlgprov.cxx | 2
sd/source/core/CustomAnimationEffect.cxx | 3
sd/source/filter/eppt/eppt.cxx | 2
sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 2
sd/source/ui/animations/CustomAnimationList.cxx | 6 -
sd/source/ui/animations/CustomAnimationPane.cxx | 3
sd/source/ui/animations/motionpathtag.cxx | 4
sd/source/ui/annotations/annotationtag.cxx | 2
sd/source/ui/app/sdmod2.cxx | 2
sd/source/ui/app/sdxfer.cxx | 2
sd/source/ui/dlg/navigatr.cxx | 2
sd/source/ui/dlg/tpaction.cxx | 2
sd/source/ui/docshell/docshel3.cxx | 2
sd/source/ui/func/fubullet.cxx | 2
sd/source/ui/func/fuinsert.cxx | 2
sd/source/ui/func/fumorph.cxx | 6 -
sd/source/ui/func/fuoaprms.cxx | 2
sd/source/ui/func/fuolbull.cxx | 2
sd/source/ui/func/futext.cxx | 2
sd/source/ui/func/smarttag.cxx | 6 -
sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx | 2
sd/source/ui/table/TableDesignPane.cxx | 4
sd/source/ui/unoidl/UnoDocumentSettings.cxx | 4
sd/source/ui/unoidl/facreg.cxx | 2
sd/source/ui/unoidl/unomodel.cxx | 8 -
sd/source/ui/unoidl/unoobj.cxx | 3
sd/source/ui/view/drtxtob.cxx | 2
sd/source/ui/view/drviews1.cxx | 4
sd/source/ui/view/drviews2.cxx | 6 -
sd/source/ui/view/drviews7.cxx | 2
sd/source/ui/view/outlview.cxx | 3
sd/source/ui/view/sdview2.cxx | 4
sd/source/ui/view/viewoverlaymanager.cxx | 2
svx/Library_svxcore.mk | 1
svx/source/fmcomp/fmgridcl.cxx | 7 -
svx/source/form/filtnav.cxx | 1
svx/source/form/fmitems.cxx | 42 ---------
svx/source/form/fmshell.cxx | 1
svx/source/form/fmshimp.cxx | 1
svx/source/form/fmview.cxx | 1
svx/source/form/navigatortree.cxx | 1
svx/source/form/tbxform.cxx | 1
svx/source/inc/fmitems.hxx | 45 ----------
43 files changed, 48 insertions(+), 155 deletions(-)
New commits:
commit ec98adb2ec71882801a4db031c8e2bcf3075c5a0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 23 09:46:31 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 24 08:35:39 2018 +0200
clang-tidy performance-unnecessary-copy-init in sd
Change-Id: I4a494aebdae9b9cba3794e5eee1f3a29eb3ec838
Reviewed-on: https://gerrit.libreoffice.org/62250
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 884ba6966d4f..4ae3b6b66280 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -694,7 +694,7 @@ namespace dlgprov
Reference< XWindowPeer > xParentPeer;
if ( aArguments.has( "ParentWindow" ) )
{
- const Any aParentWindow( aArguments.get( "ParentWindow" ) );
+ const Any& aParentWindow( aArguments.get( "ParentWindow" ) );
if ( !( aParentWindow >>= xParentPeer ) )
{
const Reference< XControl > xParentControl( aParentWindow, UNO_QUERY );
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 8835e7feabb4..d695ef8c2dcc 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -3309,9 +3309,8 @@ bool MainSequence::setTrigger( const CustomAnimationEffectPtr& pEffect, const cs
EffectSequenceHelper* pNewSequence = nullptr;
if( xTriggerShape.is() )
{
- for (auto const& iteractiveSequence : maInteractiveSequenceVector)
+ for (InteractiveSequencePtr const& pIS : maInteractiveSequenceVector)
{
- InteractiveSequencePtr pIS(iteractiveSequence);
if( pIS->getTriggerShape() == xTriggerShape )
{
pNewSequence = pIS.get();
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index ca8ee466efae..a8ad9df0a16d 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -1261,7 +1261,7 @@ void PPTWriter::ImplWriteOLE( )
SdrObject* pSdrObj = GetSdrObjectFromXShape( pPtr->xShape );
if ( auto pSdrOle2Obj = dynamic_cast< SdrOle2Obj* >(pSdrObj) )
{
- ::uno::Reference < embed::XEmbeddedObject > xObj( pSdrOle2Obj->GetObjRef() );
+ const ::uno::Reference < embed::XEmbeddedObject >& xObj( pSdrOle2Obj->GetObjRef() );
if( xObj.is() )
{
tools::SvRef<SotStorage> xTempStorage( new SotStorage( new SvMemoryStream(), true ) );
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index ccb908089a0e..ce310215752f 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -715,7 +715,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
SdrLayer* aSdrLayer = rLayerAdmin.GetLayer(sLayerName);
if( aSdrLayer )
{
- OUString layerAltText = aSdrLayer->GetTitle();
+ const OUString& layerAltText = aSdrLayer->GetTitle();
if (!layerAltText.isEmpty())
{
sName = " ";
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index a1cb53c31431..1d70cb38f7ff 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -618,10 +618,8 @@ void CustomAnimationList::update()
auto rInteractiveSequenceVector = mpMainSequence->getInteractiveSequenceVector();
- for (auto const& interactiveSequence : rInteractiveSequenceVector)
+ for (InteractiveSequencePtr const& pIS : rInteractiveSequenceVector)
{
- InteractiveSequencePtr pIS( interactiveSequence );
-
Reference< XShape > xShape( pIS->getTriggerShape() );
if( xShape.is() )
{
@@ -857,7 +855,7 @@ EffectSequence CustomAnimationList::getSelection() const
{
if( !IsSelected( pChild ) )
{
- CustomAnimationEffectPtr pChildEffect( pChild->getEffect() );
+ const CustomAnimationEffectPtr& pChildEffect( pChild->getEffect() );
if( pChildEffect.get() )
aSelection.push_back( pChildEffect );
}
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 8b3f3c76acaf..0047558b2dfc 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -827,9 +827,8 @@ void CustomAnimationPane::updateMotionPathTags()
bChanges = updateMotionPathImpl( *this, *pView, mpMainSequence->getBegin(), mpMainSequence->getEnd(), aTags, maMotionPathTags );
auto rInteractiveSequenceVector = mpMainSequence->getInteractiveSequenceVector();
- for (auto const& interactiveSequence : rInteractiveSequenceVector)
+ for (InteractiveSequencePtr const& pIS : rInteractiveSequenceVector)
{
- InteractiveSequencePtr pIS(interactiveSequence);
bChanges |= updateMotionPathImpl( *this, *pView, pIS->getBegin(), pIS->getEnd(), aTags, maMotionPathTags );
}
}
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 10ef7cfab409..aa9bfe2e3dae 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -283,11 +283,11 @@ void SdPathHdl::CreateB2dIAObject()
if(rPageWindow.GetPaintWindow().OutputToWindow())
{
- rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+ const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
if (xManager.is() && mpPathObj)
{
const sdr::contact::ViewContact& rVC = mpPathObj->GetViewContact();
- const drawinglayer::primitive2d::Primitive2DContainer aSequence = rVC.getViewIndependentPrimitive2DContainer();
+ const drawinglayer::primitive2d::Primitive2DContainer& aSequence = rVC.getViewIndependentPrimitive2DContainer();
std::unique_ptr<sdr::overlay::OverlayObject> pNew(new sdr::overlay::OverlayPrimitive2DSequenceObject(aSequence));
xManager->add(*pNew);
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 1b5d9bd86585..9a27599411e6 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -208,7 +208,7 @@ void AnnotationHdl::CreateB2dIAObject()
const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b);
SdrPaintWindow& rPaintWindow = rPageWindow.GetPaintWindow();
- rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+ const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
if(rPaintWindow.OutputToWindow() && xManager.is() )
{
std::unique_ptr<sdr::overlay::OverlayObject> pOverlayObject;
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 45af870b9679..979b46c1c3da 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -335,7 +335,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
break;
}
- OUString aURL = pURLField->GetURL();
+ const OUString& aURL = pURLField->GetURL();
svtools::ColorConfig aConfig;
svtools::ColorConfigEntry eEntry =
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 2a7dadaf9118..4562df261e59 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -179,7 +179,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj )
if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor())
{
- Reference< css::awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel() );
+ const Reference< css::awt::XControlModel >& xControlModel( pUnoCtrl->GetUnoControlModel() );
if( !xControlModel.is() )
return;
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 3bac4eee91cd..bf0169a1ee1c 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -132,7 +132,7 @@ void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc )
{
SdDrawDocument* pNonConstDoc = const_cast<SdDrawDocument*>(pDoc); // const as const can...
sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh();
- OUString aDocShName( pDocShell->GetName() );
+ const OUString& aDocShName( pDocShell->GetName() );
OUString aDocName = pDocShell->GetMedium()->GetName();
maTlbObjects->SetSaveTreeItemStateFlag(true); //Added by yanjun for sym2_6385
maTlbObjects->Clear();
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 5637ffd92250..93c51087aa28 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -220,7 +220,7 @@ void SdTPAction::Construct()
}
else if( pOleObj )
{
- uno::Reference < embed::XEmbeddedObject > xObj = pOleObj->GetObjRef();
+ const uno::Reference < embed::XEmbeddedObject >& xObj = pOleObj->GetObjRef();
if ( xObj.is() )
{
bOLEAction = true;
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index b79cd11cf1bb..a9925bf5f13b 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -224,7 +224,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
case SID_GET_COLORLIST:
{
const SvxColorListItem* pColItem = GetItem( SID_COLOR_TABLE );
- XColorListRef pList = pColItem->GetColorList();
+ const XColorListRef& pList = pColItem->GetColorList();
rReq.SetReturnValue( OfaRefItem<XColorList>( SID_GET_COLORLIST, pList ) );
}
break;
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 606f38c0b94f..81dc443b5a7c 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -165,7 +165,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest const & rReq )
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
{
- OUString aFontName = pFontItem->GetValue();
+ const OUString& aFontName = pFontItem->GetValue();
aFont = vcl::Font( aFontName, Size(1,1) );
}
else
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index d9b7e9c5b555..a2429c38c2f5 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -461,7 +461,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT);
if ( nSlotId == SID_INSERT_OBJECT && pNameItem )
{
- SvGlobalName aClassName = pNameItem->GetValue();
+ const SvGlobalName& aClassName = pNameItem->GetValue();
xObj = mpViewShell->GetViewFrame()->GetObjectShell()->
GetEmbeddedObjectContainer().CreateEmbeddedObject( aClassName.GetByteSequence(), aName );
}
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 2390e16eb828..7604ab825a6e 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -302,7 +302,7 @@ void FuMorph::ImpAddPolys(
{
while(rSmaller.count() < rBigger.count())
{
- const ::basegfx::B2DPolygon aToBeCopied(rBigger.getB2DPolygon(rSmaller.count()));
+ const ::basegfx::B2DPolygon& aToBeCopied(rBigger.getB2DPolygon(rSmaller.count()));
const ::basegfx::B2DRange aToBeCopiedPolySize(::basegfx::utils::getRange(aToBeCopied));
::basegfx::B2DPoint aNewPoint(aToBeCopiedPolySize.getCenter());
::basegfx::B2DPolygon aNewPoly;
@@ -457,8 +457,8 @@ void FuMorph::ImpInsertPolygons(
for(sal_uInt32 a(0); a < rPolyPolyStart.count(); a++)
{
- const ::basegfx::B2DPolygon aPolyStart(rPolyPolyStart.getB2DPolygon(a));
- const ::basegfx::B2DPolygon aPolyEnd(rPolyPolyEnd.getB2DPolygon(a));
+ const ::basegfx::B2DPolygon& aPolyStart(rPolyPolyStart.getB2DPolygon(a));
+ const ::basegfx::B2DPolygon& aPolyEnd(rPolyPolyEnd.getB2DPolygon(a));
const sal_uInt32 nCount(aPolyStart.count());
::basegfx::B2DPolygon aNewPolygon;
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index 7f6f208942ff..dd3fd2c8f277 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -660,7 +660,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
Point aCurCenter(aCurRect.Center());
const ::basegfx::B2DPolyPolygon& rPolyPolygon = pPath->GetPathPoly();
sal_uInt32 nNoOfPolygons(rPolyPolygon.count());
- const ::basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nNoOfPolygons - 1));
+ const ::basegfx::B2DPolygon& aPolygon(rPolyPolygon.getB2DPolygon(nNoOfPolygons - 1));
sal_uInt32 nPoints(aPolygon.count());
const ::basegfx::B2DPoint aNewB2DCenter(aPolygon.getB2DPoint(nPoints - 1));
const Point aNewCenter(FRound(aNewB2DCenter.getX()), FRound(aNewB2DCenter.getY()));
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 38de3444595b..286d95a8cd1a 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -213,7 +213,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
{
if(nActNumLvl & nMask)
{
- SvxNumberFormat aFmt(aTmpRule.GetLevel(i));
+ const SvxNumberFormat& aFmt(aTmpRule.GetLevel(i));
pNumRule->SetLevel(i, aFmt);
}
nMask <<= 1;
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 786730151acd..6d738f3f4240 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1085,7 +1085,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag)
const SdrPageWindow& rPageWindow = *pPV->GetPageWindow(b);
if (!rPageWindow.GetPaintWindow().OutputToWindow())
continue;
- rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+ const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
if (!xManager.is())
continue;
xManager->flush();
diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx
index d63f7a096eda..3468e9125ee6 100644
--- a/sd/source/ui/func/smarttag.cxx
+++ b/sd/source/ui/func/smarttag.cxx
@@ -217,7 +217,7 @@ bool SmartTagSet::KeyInput( const KeyEvent& rKEvt )
if( pSmartHdl )
{
const_cast< SdrHdlList& >( mrView.GetHdlList() ).ResetFocusHdl();
- SmartTagReference xTag( pSmartHdl->getTag() );
+ const SmartTagReference& xTag( pSmartHdl->getTag() );
select( xTag );
return true;
}
@@ -237,7 +237,7 @@ bool SmartTagSet::RequestHelp( const HelpEvent& rHEvt )
SmartHdl* pSmartHdl = dynamic_cast< SmartHdl* >( pHdl );
if(pSmartHdl && pSmartHdl->getTag().is() )
{
- SmartTagReference xTag( pSmartHdl->getTag() );
+ const SmartTagReference& xTag( pSmartHdl->getTag() );
return xTag->RequestHelp( rHEvt );
}
}
@@ -259,7 +259,7 @@ bool SmartTagSet::Command( const CommandEvent& rCEvt )
SmartHdl* pSmartHdl = dynamic_cast< SmartHdl* >( pHdl );
if(pSmartHdl && pSmartHdl->getTag().is() )
{
- SmartTagReference xTag( pSmartHdl->getTag() );
+ const SmartTagReference& xTag( pSmartHdl->getTag() );
return xTag->Command( rCEvt );
}
}
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
index af3fa0a2566e..8819704796b2 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -111,7 +111,7 @@ void InsertionIndicatorOverlay::Create (
const sal_Int32 nSelectionCount)
{
view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter());
- std::shared_ptr<view::PageObjectLayouter> pPageObjectLayouter (
+ const std::shared_ptr<view::PageObjectLayouter>& pPageObjectLayouter (
rLayouter.GetPageObjectLayouter());
std::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme());
const Size aOriginalPreviewSize (pPageObjectLayouter->GetPreviewSize());
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 3c1a0ed4e7a5..386986cea857 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -171,7 +171,7 @@ void TableDesignWidget::ApplyStyle()
SfxRequest aReq( SID_TABLE_STYLE, SfxCallMode::SYNCHRON, SfxGetpApp()->GetPool() );
aReq.AppendItem( SfxStringItem( SID_TABLE_STYLE, sStyleName ) );
- rtl::Reference< sdr::SelectionController > xController( pView->getSelectionController() );
+ const rtl::Reference< sdr::SelectionController >& xController( pView->getSelectionController() );
if( xController.is() )
xController->Execute( aReq );
@@ -223,7 +223,7 @@ void TableDesignWidget::ApplyOptions()
SdrView* pView = mrBase.GetDrawView();
if( pView )
{
- rtl::Reference< sdr::SelectionController > xController( pView->getSelectionController() );
+ const rtl::Reference< sdr::SelectionController >& xController( pView->getSelectionController() );
if( xController.is() )
{
xController->Execute( aReq );
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 273f5839c146..b41ecc598890 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -337,7 +337,7 @@ uno::Sequence<beans::PropertyValue>
SdDrawDocument* pDoc = mxModel->GetDoc();
for( size_t i = 0; i < SAL_N_ELEMENTS( aURLPropertyNames ); i++ )
{
- XPropertyListRef pList = pDoc->GetPropertyList( static_cast<XPropertyListType>(i) );
+ const XPropertyListRef& pList = pDoc->GetPropertyList( static_cast<XPropertyListType>(i) );
bHasEmbed = pList.is() && pList->IsEmbedInDocument();
if( bHasEmbed )
break;
@@ -359,7 +359,7 @@ uno::Sequence<beans::PropertyValue>
XPropertyListType t = getTypeOfName( aConfigProps[i].Name );
aRet[i] = aConfigProps[i];
if (t != XPropertyListType::Unknown) {
- XPropertyListRef pList = pDoc->GetPropertyList( t );
+ const XPropertyListRef& pList = pDoc->GetPropertyList( t );
if( !pList.is() || !pList->IsEmbedInDocument() )
continue; // no change ...
else
diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx
index 2da5885a34d5..7b69d936ea9e 100644
--- a/sd/source/ui/unoidl/facreg.cxx
+++ b/sd/source/ui/unoidl/facreg.cxx
@@ -74,7 +74,7 @@ SAL_DLLPUBLIC_EXPORT void * sd_component_getFactory(
uno::Reference<lang::XSingleServiceFactory> xFactory;
uno::Reference<lang::XSingleComponentFactory> xComponentFactory;
- std::shared_ptr<FactoryMap> pFactoryMap (GetFactoryMap());
+ const std::shared_ptr<FactoryMap>& pFactoryMap (GetFactoryMap());
OUString sImplementationName (OUString::createFromAscii(pImplName));
FactoryMap::const_iterator iFactory (pFactoryMap->find(sImplementationName));
if (iFactory != pFactoryMap->end())
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 898eeda69772..9a703bca5716 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1834,7 +1834,7 @@ bool ImplRenderPaintProc::IsVisible( const SdrObject* pObj ) const
const SdrLayer* pSdrLayer = rLayerAdmin.GetLayerPerID( nLayerId );
if ( pSdrLayer )
{
- OUString aLayerName = pSdrLayer->GetName();
+ const OUString& aLayerName = pSdrLayer->GetName();
bVisible = pSdrPageView->IsLayerVisible( aLayerName );
}
}
@@ -1849,7 +1849,7 @@ bool ImplRenderPaintProc::IsPrintable( const SdrObject* pObj ) const
const SdrLayer* pSdrLayer = rLayerAdmin.GetLayerPerID( nLayerId );
if ( pSdrLayer )
{
- OUString aLayerName = pSdrLayer->GetName();
+ const OUString& aLayerName = pSdrLayer->GetName();
bPrintable = pSdrPageView->IsLayerPrintable( aLayerName );
}
}
@@ -2405,10 +2405,8 @@ OUString SdXImpressDocument::getPostIts()
pPage = static_cast<SdPage*>(mpDoc->GetPage(nPage));
const sd::AnnotationVector& aPageAnnotations = pPage->getAnnotations();
- for (const auto& aPageAnnotation : aPageAnnotations)
+ for (const uno::Reference<office::XAnnotation>& xAnnotation : aPageAnnotations)
{
- uno::Reference<office::XAnnotation> xAnnotation(aPageAnnotation);
-
boost::property_tree::ptree aAnnotation;
aAnnotation.put("id", sd::getAnnotationId(xAnnotation));
aAnnotation.put("author", xAnnotation->getAuthor());
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 9d1b02e8d552..f039c3b66dad 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -649,8 +649,7 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const c
}
else
{
- uno::Any aAny( aValue );
- mpShape->_setPropertyValue(aPropertyName, aAny);
+ mpShape->_setPropertyValue(aPropertyName, aValue);
}
if( mpModel )
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 51d7938f86ed..28903c556424 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -474,7 +474,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
// paragraph justification
- SvxLRSpaceItem aLR = aAttrSet.Get( EE_PARA_LRSPACE );
+ const SvxLRSpaceItem& aLR = aAttrSet.Get( EE_PARA_LRSPACE );
rSet.Put(aLR);
SvxAdjust eAdj = aAttrSet.Get( EE_PARA_JUST ).GetAdjust();
switch( eAdj )
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index d6272c24ff29..f51470312c4a 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -211,7 +211,7 @@ void DrawViewShell::SelectionHasChanged()
}
else
{
- uno::Reference < embed::XEmbeddedObject > xObj = pOleObj->GetObjRef();
+ const uno::Reference < embed::XEmbeddedObject >& xObj = pOleObj->GetObjRef();
if ( xObj.is() )
{
rBase.SetVerbs( xObj->getSupportedVerbs() );
@@ -226,7 +226,7 @@ void DrawViewShell::SelectionHasChanged()
{
if ( pOleObj )
{
- uno::Reference < embed::XEmbeddedObject > xObj = pOleObj->GetObjRef();
+ const uno::Reference < embed::XEmbeddedObject >& xObj = pOleObj->GetObjRef();
if ( xObj.is() )
{
rBase.SetVerbs( xObj->getSupportedVerbs() );
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 7af12dbb6aa0..8366b9911579 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -279,7 +279,7 @@ private:
nullptr;
if (pCustomPropertyField)
{
- OUString aKey = pCustomPropertyField->GetName();
+ const OUString& aKey = pCustomPropertyField->GetName();
if (m_aKeyCreator.isMarkingTextKey(aKey))
{
OUString aValue = svx::classification::getProperty(m_xPropertyContainer, aKey);
@@ -785,7 +785,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
OUString aTitle = SdResId(STR_TITLE_RENAMESLIDE);
OUString aDescr = SdResId(STR_DESC_RENAMESLIDE);
- OUString aPageName = pCurrentPage->GetName();
+ const OUString& aPageName = pCurrentPage->GetName();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aPageName, aDescr));
@@ -1310,7 +1310,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else if (nState == RET_NO)
{
- GraphicObject aGraphicObject(pObj->GetGraphicObject());
+ const GraphicObject& aGraphicObject(pObj->GetGraphicObject());
GraphicHelper::ExportGraphic(pFrame, aGraphicObject.GetGraphic(), "");
}
}
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index f66533ea1a84..7fc676643d6d 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1465,7 +1465,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if ( pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor() )
{
- uno::Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel() );
+ const uno::Reference< awt::XControlModel >& xControlModel( pUnoCtrl->GetUnoControlModel() );
if( xControlModel.is() )
{
uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 796f29347eed..837b40927758 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1668,8 +1668,7 @@ void OutlineView::OnEndPasteOrDrop( PasteOrDropInfos* pInfo )
SdStyleSheet* pStyleSheet = dynamic_cast< SdStyleSheet* >( mrOutliner.GetStyleSheet( nPara ) );
if( pStyleSheet )
{
- const OUString aName( pStyleSheet->GetApiName() );
- if ( aName == "title" )
+ if ( pStyleSheet->GetApiName() == "title" )
bPage = true;
}
}
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 16e083a2f8a8..c2f2abbc5c6f 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -349,7 +349,7 @@ void View::StartDrag( const Point& rStartPos, vcl::Window* pWindow )
if( pDrawViewShell )
{
- rtl::Reference<FuPoor> xFunction( pDrawViewShell->GetCurrentFunction() );
+ const rtl::Reference<FuPoor>& xFunction( pDrawViewShell->GetCurrentFunction() );
if( xFunction.is() && nullptr != dynamic_cast< const FuDraw *>( xFunction.get() ) )
static_cast<FuDraw*>(xFunction.get())->ForcePointer();
@@ -804,7 +804,7 @@ IMPL_LINK( View, ExecuteNavigatorDrop, void*, p, void )
if( pSdNavigatorDropEvent->mpTargetWindow )
aPos = pSdNavigatorDropEvent->mpTargetWindow->PixelToLogic( pSdNavigatorDropEvent->maPosPixel );
- const OUString aURL( aINetBookmark.GetURL() );
+ const OUString& aURL( aINetBookmark.GetURL() );
sal_Int32 nIndex = aURL.indexOf( '#' );
if( nIndex != -1 )
aBookmark = aURL.copy( nIndex+1 );
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index 9331b53d50f9..e774bdff8a03 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -242,7 +242,7 @@ void ImageButtonHdl::CreateB2dIAObject()
const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b);
SdrPaintWindow& rPaintWindow = rPageWindow.GetPaintWindow();
- rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+ const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
if(rPaintWindow.OutputToWindow() && xManager.is() )
{
std::unique_ptr<sdr::overlay::OverlayObject> pOverlayObject(
commit fdb68feeb12362f1d9d8f70d8cae49b2fa004493
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 23 12:34:52 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 24 08:35:27 2018 +0200
FmInterfaceItem is dead
ever since
commit a0c7b2bc4511da87c776b92aaa77ba7680542fa1
Date: Tue Nov 16 10:24:21 2004 +0000
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED
Change-Id: Id8568ba19c4b7f1b7e5d8e8ebead0b4b2a1f5e0e
Reviewed-on: https://gerrit.libreoffice.org/62231
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 54b551e5e0b5..84ec127c76b3 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -443,7 +443,6 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
svx/source/form/fmdpage \
svx/source/form/fmexch \
svx/source/form/fmexpl \
- svx/source/form/fmitems \
svx/source/form/fmmodel \
svx/source/form/fmobj \
svx/source/form/fmpage \
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index b4ad25d981b7..ede783e1d746 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -18,7 +18,6 @@
*/
#include <svx/fmgridif.hxx>
-#include <fmitems.hxx>
#include <fmprop.hxx>
#include <svx/fmtools.hxx>
#include <fmservs.hxx>
@@ -789,7 +788,6 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
OUString aFieldType;
bool bReplace = false;
InspectorAction eInspectorAction = eNone;
- Reference< XPropertySet > xColumnToInspect;
OString sExecutionResult = rMenu.GetCurItemIdent();
if (sExecutionResult.isEmpty())
@@ -826,7 +824,6 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
else if (sExecutionResult == "column")
{
eInspectorAction = rMenu.IsItemChecked(rMenu.GetItemId("column")) ? eOpenInspector : eCloseInspector;
- xColumnToInspect.set( xCols->getByIndex( nPos ), UNO_QUERY );
}
else if (sExecutionResult.startsWith(FM_COL_TEXTFIELD))
{
@@ -943,7 +940,6 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
::comphelper::disposeComponent( xReplaced );
eInspectorAction = eUpdateInspector;
- xColumnToInspect = xNewCol;
}
else
{
@@ -977,12 +973,11 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
if ( eInspectorAction != eNone )
{
- FmInterfaceItem aIFaceItem( SID_FM_SHOW_PROPERTY_BROWSER, xColumnToInspect );
SfxBoolItem aShowItem( SID_FM_SHOW_PROPERTIES, eInspectorAction != eCloseInspector );
pCurrentFrame->GetBindings().GetDispatcher()->ExecuteList(
SID_FM_SHOW_PROPERTY_BROWSER, SfxCallMode::ASYNCHRON,
- { &aIFaceItem, &aShowItem });
+ { &aShowItem });
}
}
}
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index e4ab2f039c78..24b601d57bdc 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -21,7 +21,6 @@
#include <filtnav.hxx>
#include <fmexch.hxx>
#include <helpids.h>
-#include <fmitems.hxx>
#include <fmprop.hxx>
#include <svx/strings.hrc>
diff --git a/svx/source/form/fmitems.cxx b/svx/source/form/fmitems.cxx
deleted file mode 100644
index 832da669928f..000000000000
--- a/svx/source/form/fmitems.cxx
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <fmitems.hxx>
-
-#include <svx/svxids.hrc>
-#include <tools/stream.hxx>
-
-
-// class FmInterfaceItem
-
-
-bool FmInterfaceItem::operator==( const SfxPoolItem& rAttr ) const
-{
- assert(SfxPoolItem::operator==(rAttr));
- return xInterface == static_cast<const FmInterfaceItem&>(rAttr).xInterface;
-}
-
-
-SfxPoolItem* FmInterfaceItem::Clone( SfxItemPool* ) const
-{
- return new FmInterfaceItem( *this );
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 5732394ddf1c..3404c091c21c 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -23,7 +23,6 @@
#include <fmservs.hxx>
#include <fmprop.hxx>
#include <fmpgeimp.hxx>
-#include <fmitems.hxx>
#include <fmundo.hxx>
#include <vcl/waitobj.hxx>
#include <com/sun/star/form/XLoadable.hpp>
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 0709e3eec852..3a84358d7ef2 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -20,7 +20,6 @@
#include <sal/macros.h>
#include <sal/log.hxx>
-#include <fmitems.hxx>
#include <fmobj.hxx>
#include <fmpgeimp.hxx>
#include <svx/fmtools.hxx>
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 025ceff9d991..c69812fd717b 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -37,7 +37,6 @@
#include <sfx2/dispatch.hxx>
#include <basic/sbuno.hxx>
#include <basic/sbx.hxx>
-#include <fmitems.hxx>
#include <fmobj.hxx>
#include <svx/svditer.hxx>
#include <svx/svdpagv.hxx>
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index e1761279fdd4..1e073238e26b 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -31,7 +31,6 @@
#include <fmservs.hxx>
#include <fmundo.hxx>
#include <fmpgeimp.hxx>
-#include <fmitems.hxx>
#include <fmobj.hxx>
#include <fmprop.hxx>
#include <sal/log.hxx>
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 908576260c0b..87a89350ed23 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -25,7 +25,6 @@
#include <vcl/toolbox.hxx>
#include <vcl/fixed.hxx>
#include <vcl/settings.hxx>
-#include <fmitems.hxx>
#include <formtoolbars.hxx>
diff --git a/svx/source/inc/fmitems.hxx b/svx/source/inc/fmitems.hxx
deleted file mode 100644
index 7947b9e75028..000000000000
--- a/svx/source/inc/fmitems.hxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SVX_SOURCE_INC_FMITEMS_HXX
-#define INCLUDED_SVX_SOURCE_INC_FMITEMS_HXX
-
-
-#include <svl/poolitem.hxx>
-
-
-class FmInterfaceItem : public SfxPoolItem
-{
- css::uno::Reference< css::uno::XInterface > xInterface;
-
-public:
-
- FmInterfaceItem( const sal_uInt16 nId, const css::uno::Reference< css::uno::XInterface >& rxInterface )
- :SfxPoolItem( nId )
- ,xInterface( rxInterface )
- {}
-
- // "purely virtual methods" of the SfxPoolItem
- virtual bool operator==( const SfxPoolItem& ) const override;
-
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
-};
-
-#endif // INCLUDED_SVX_SOURCE_INC_FMITEMS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list