From 021b7b6684f13853d8bd1a7bcd7273967a2034d9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 12 Nov 2024 12:18:12 +0200 Subject: loplugin:reftotemp in sd Change-Id: Ib38fdc34dc2112f1aac3914baa074c7574f34f7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176473 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/view/drviews4.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sd/source/ui/view/drviews4.cxx') diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 776546ed9cfc..3611af691081 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -149,24 +149,24 @@ void DrawViewShell::DeleteActualLayer() SdrLayerAdmin& rAdmin = GetDoc()->GetLayerAdmin(); sal_uInt16 nId = GetLayerTabControl()->GetCurPageId(); - const OUString& rName = GetLayerTabControl()->GetLayerName(nId); - if(LayerTabBar::IsRealNameOfStandardLayer(rName)) + const OUString aName = GetLayerTabControl()->GetLayerName(nId); + if(LayerTabBar::IsRealNameOfStandardLayer(aName)) { assert(false && "Standard layer may not be deleted."); return; } - const OUString& rDisplayName(GetLayerTabControl()->GetPageText(nId)); + const OUString aDisplayName(GetLayerTabControl()->GetPageText(nId)); OUString aString(SdResId(STR_ASK_DELETE_LAYER)); // replace placeholder - aString = aString.replaceFirst("$", rDisplayName); + aString = aString.replaceFirst("$", aDisplayName); std::unique_ptr xQueryBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Question, VclButtonsType::YesNo, aString)); if (xQueryBox->run() == RET_YES) { - const SdrLayer* pLayer = rAdmin.GetLayer(rName); + const SdrLayer* pLayer = rAdmin.GetLayer(aName); mpDrawView->DeleteLayer( pLayer->GetName() ); /* in order to redraw TabBar and Window; should be initiated later on by -- cgit