From 51b5b93092d6231615de470c62494c24e54828a1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 25 Jan 2020 17:49:47 +0200 Subject: remove some unused local vars found by a more aggressive variant of loplugin:unusedvariables. This is my first pass, committing the simplest and most obviously unnecessary vars Change-Id: I9676a6e39a101937097788548764506c93811c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87414 Tested-by: Jenkins Reviewed-by: Noel Grandin --- bridges/source/jni_uno/jni_data.cxx | 1 - connectivity/source/drivers/flat/ETable.cxx | 1 - dbaccess/source/ui/misc/UITools.cxx | 1 - dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 1 - embeddedobj/source/msole/olevisual.cxx | 3 +-- filter/source/config/cache/filterfactory.cxx | 2 -- io/source/stm/omark.cxx | 4 ---- oox/source/export/shapes.cxx | 1 - oox/source/shape/ShapeContextHandler.cxx | 2 -- package/source/manifest/ManifestImport.cxx | 1 - sax/source/expatwrap/sax_expat.cxx | 1 - sc/source/core/data/documen5.cxx | 1 - sc/source/filter/excel/excrecds.cxx | 1 - sc/source/filter/excel/xeformula.cxx | 1 - sc/source/ui/view/dbfunc.cxx | 1 - sd/source/filter/html/htmlattr.cxx | 2 -- sd/source/filter/xml/sdxmlwrp.cxx | 1 - sd/source/ui/animations/SlideTransitionPane.cxx | 1 - sd/source/ui/dlg/PhotoAlbumDialog.cxx | 1 - sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx | 1 - sdext/source/presenter/PresenterNotesView.cxx | 9 --------- sdext/source/presenter/PresenterToolBar.cxx | 1 - sfx2/source/dialog/versdlg.cxx | 1 - sfx2/source/doc/doctemplates.cxx | 2 +- slideshow/source/engine/opengl/TransitionImpl.cxx | 2 +- slideshow/source/engine/slide/shapemanagerimpl.cxx | 1 - svx/source/dialog/imapwnd.cxx | 2 -- svx/source/dialog/rubydialog.cxx | 1 - svx/source/form/formcontroller.cxx | 1 - svx/source/gallery2/galtheme.cxx | 1 - svx/source/gengal/gengal.cxx | 2 -- svx/source/svdraw/svdoashp.cxx | 1 - sw/source/core/access/accmap.cxx | 5 +---- sw/source/core/undo/unins.cxx | 2 -- sw/source/filter/ww8/WW8TableInfo.cxx | 2 -- sw/source/filter/xml/wrtxml.cxx | 1 - ucb/source/ucp/cmis/cmis_content.cxx | 3 +-- ucb/source/ucp/webdav-neon/webdavcontent.cxx | 1 - vcl/source/gdi/FileDefinitionWidgetDraw.cxx | 2 -- vcl/source/gdi/gdimtf.cxx | 3 --- vcl/source/gdi/salmisc.cxx | 1 - vcl/source/treelist/iconviewimpl.cxx | 2 -- vcl/source/window/brdwin.cxx | 1 - vcl/unx/generic/gdi/gdiimpl.cxx | 10 ---------- 44 files changed, 5 insertions(+), 80 deletions(-) diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx index daff48a48492..06e8467f7e7c 100644 --- a/bridges/source/jni_uno/jni_data.cxx +++ b/bridges/source/jni_uno/jni_data.cxx @@ -2339,7 +2339,6 @@ void Bridge::map_to_java( if (0 < nElements) { - TypeDescr element_td( element_type ); uno_Sequence * const * elements = reinterpret_cast(seq->elements); for ( sal_Int32 nPos = 0; nPos < nElements; ++nPos ) { diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 2da5d6ab8570..142d191be8c9 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -82,7 +82,6 @@ void OFlatTable::fillColumns(const css::lang::Locale& _aLocale) setRowPos(rowNum++, rowPos); // read first row - QuotedTokenizedString aFirstLine; if(bRead) { bRead = readLine(&rowPos.second, &rowPos.first); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 257a10f3b8c0..0522d4ab834e 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -145,7 +145,6 @@ SQLExceptionInfo createConnection( const OUString& _rsDataSourceName, catch(const Exception&) { } - SQLExceptionInfo aInfo; return createConnection(xProp,_rxContext,_rEvtLst,_rOUTConnection); } diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 8908bc658ed1..f0f383b126e2 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1388,7 +1388,6 @@ sal_Int8 OSelectionBrowseBox::ExecuteDrop( const BrowserExecuteDropEvent& _rEvt return DND_ACTION_NONE; } - rtl::Reference aInfo; // insert the field at the selected position OJoinExchangeData jxdSource = OJoinExchObj::GetSourceDescription(_rEvt.maDropEvent.Transferable); InsertField(jxdSource); diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx index 5a12ac3588ba..21a53e2a5306 100644 --- a/embeddedobj/source/msole/olevisual.cxx +++ b/embeddedobj/source/msole/olevisual.cxx @@ -336,8 +336,6 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres throw embed::WrongStateException( "The object is not loaded!", static_cast< ::cppu::OWeakObject* >(this) ); - embed::VisualRepresentation aVisualRepr; - // TODO: in case of different aspects they must be applied to the mediatype and XTransferable must be used // the cache is used only as a fallback if object is not in loaded state if ( !m_xCachedVisualRepresentation.is() && ( !m_bVisReplInitialized || m_bVisReplInStream ) @@ -360,6 +358,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres "Windows Metafile", cppu::UnoType>::get() ); + embed::VisualRepresentation aVisualRepr; aVisualRepr.Data = m_pOleComponent->getTransferData( aDataFlavor ); aVisualRepr.Flavor = aDataFlavor; diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index 2b5268f698eb..2473dc537949 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -155,7 +155,6 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL FilterFactory::crea // analyze query and split it into its tokens QueryTokenizer lTokens(sNewQuery); - QueryTokenizer::const_iterator pIt; std::vector lEnumSet; // start query @@ -263,7 +262,6 @@ std::vector FilterFactory::impl_queryMatchByDocumentService(const Quer try { const CacheItem aFilter = pCache->getItem(FilterCache::E_FILTER, filterName); - CacheItem::const_iterator pProp; // "matchByDocumentService=" => any filter will be addressed here // "matchByDocumentService=all" => any filter will be addressed here diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx index 7623392b4277..0c7a821423f4 100644 --- a/io/source/stm/omark.cxx +++ b/io/source/stm/omark.cxx @@ -311,8 +311,6 @@ Reference < XConnectable > OMarkableOutputStream::getPredecessor() void OMarkableOutputStream::checkMarksAndFlush() { - map >::iterator ii; - // find the smallest mark sal_Int32 nNextFound = m_nCurrentPos; for (auto const& mark : m_mapMarks) @@ -731,8 +729,6 @@ Reference< XConnectable > OMarkableInputStream::getPredecessor() void OMarkableInputStream::checkMarksAndFlush() { - map >::iterator ii; - // find the smallest mark sal_Int32 nNextFound = m_nCurrentPos; for (auto const& mark : m_mapMarks) diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index be650130f2b1..0c00ad744bcc 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -671,7 +671,6 @@ static void lcl_AnalyzeHandles( const uno::Sequence & rHa const OUString sPosition( "Position" ); bool bPosition = false; EnhancedCustomShapeParameterPair aPosition; - EnhancedCustomShapeParameterPair aPolar; for ( const PropertyValue& rPropVal: rPropSeq ) { if ( rPropVal.Name == sPosition ) diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 8650cc3c8863..e9a5432d3001 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -63,7 +63,6 @@ uno::Reference const & ShapeContextHandler::getLo if (!mxLockedCanvasContext.is()) { FragmentHandler2Ref rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); - ShapePtr pMasterShape; switch (nElement & 0xffff) { @@ -139,7 +138,6 @@ uno::Reference const & ShapeContextHandler::getWp if (!mxWpgContext.is()) { FragmentHandler2Ref rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); - ShapePtr pMasterShape; switch (getBaseToken(nElement)) { diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx index 4014bf3d0a4d..0841c7be402c 100644 --- a/package/source/manifest/ManifestImport.cxx +++ b/package/source/manifest/ManifestImport.cxx @@ -457,7 +457,6 @@ void SAL_CALL ManifestImport::endElement( const OUString& aName ) aSequence[PKG_SIZE_NOENCR_MNFST].Name = "KeyInfo"; aSequence[PKG_SIZE_NOENCR_MNFST].Value <<= comphelper::containerToSequence(aKeys); } - css::beans::PropertyValue aEmpty; aSequence.erase(std::remove_if(aSequence.begin(), aSequence.end(), isEmpty), aSequence.end()); diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 3daafda63547..8218436b4569 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -809,7 +809,6 @@ bool SaxExpatParser_Impl::callbackExternalEntityRef( const XML_Char *publicId) { bool bOK = true; - InputSource source; SaxExpatParser_Impl *pImpl = static_cast(XML_GetUserData( parser )); struct Entity entity; diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index cdab66a1b7e6..a06505a31bc0 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -502,7 +502,6 @@ void ScDocument::SetChartRangeList( const OUString& rChartName, uno::Reference< chart2::data::XDataReceiver > xReceiver( xChartDoc, uno::UNO_QUERY ); if ( xChartDoc.is() && xReceiver.is() ) { - ScRangeListRef aNewRanges; chart::ChartDataRowSource eDataRowSource = chart::ChartDataRowSource_COLUMNS; bool bHasCategories = false; bool bFirstCellAsLabel = false; diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index f8d1861bdea1..16f23744d77f 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -1022,7 +1022,6 @@ XclExpRecordRef XclExpFilterManager::CreateRecord( SCTAB nScTab ) bool XclExpFilterManager::HasFilterMode( SCTAB nScTab ) { - XclExpTabFilterRef xRec; XclExpTabFilterMap::iterator aIt = maFilterMap.find( nScTab ); if( aIt != maFilterMap.end() ) { diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index f39ee5283fdf..f6cf9a2f53b3 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -625,7 +625,6 @@ void XclExpFmlaCompImpl::RecalcTokenClasses() /* Cell and array formulas start with VAL conversion and VALTYPE parameter type, defined names start with ARR conversion and REFTYPE parameter type for the root token. */ - XclExpOperandList aOperands; bool bNameFmla = mxData->mrCfg.meClassType == EXC_CLASSTYPE_NAME; XclFuncParamConv eParamConv = bNameFmla ? EXC_PARAMCONV_ARR : EXC_PARAMCONV_VAL; XclExpClassConv eClassConv = bNameFmla ? EXC_CLASSCONV_ARR : EXC_CLASSCONV_VAL; diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 01f05560d45c..c5fa578cade8 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -394,7 +394,6 @@ void ScDBFunc::HideAutoFilter() ScDocument& rDoc = pDocSh->GetDocument(); - ScQueryParam aParam; ScDBData* pDBData = GetDBData( false ); SCTAB nTab; diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx index c9a35ad87232..926cabde29d2 100644 --- a/sd/source/filter/html/htmlattr.cxx +++ b/sd/source/filter/html/htmlattr.cxx @@ -32,8 +32,6 @@ SdHtmlAttrPreview::~SdHtmlAttrPreview() void SdHtmlAttrPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { - DecorationView aDecoView(&rRenderContext); - ::tools::Rectangle aTextRect; aTextRect.SetSize(GetOutputSizePixel()); diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 7a5d446e5d97..34bdf10d30bf 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -557,7 +557,6 @@ bool SdXMLFilter::Import( ErrCode& nError ) // get the input stream (storage or stream) - tools::SvRef xDocStream; uno::Reference < embed::XStorage > xStorage = mrMedium.GetStorage(); xInfoSet->setPropertyValue( "SourceStorage", Any( xStorage ) ); diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 7200cbe503f4..a389e08763f1 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -345,7 +345,6 @@ size_t getPresetOffset( const sd::impl::TransitionEffect &rEffect ) { const sd::TransitionPresetList& rPresetList = sd::TransitionPreset::getTransitionPresetList(); - sd::TransitionPresetPtr pFound; size_t nIdx = 0; for( const auto& aIt: rPresetList ) diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 5e8a82eb1edc..2704d5a756bf 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -595,7 +595,6 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl, weld::TreeView&, void) if (sImgUrl != SdResId(STR_PHOTO_ALBUM_TEXTBOX)) { - GraphicFilter aCurFilter; Graphic aGraphic; INetURLObject aURLObj( sImgUrl ); diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx index a41306908c8d..37755bc14cb5 100644 --- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx +++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx @@ -316,7 +316,6 @@ bool PageCacheManager::InvalidatePreviewBitmap ( { // Iterate over all caches that are currently in use and invalidate // the previews in those that belong to the document. - PageCacheContainer::iterator iCache; for (auto& rCache : *mpPageCaches) if (rCache.first.mpDocument == pDocument) bHasChanged |= rCache.second->InvalidateBitmap(pKey); diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx index 73c987158b47..62e054c4e94d 100644 --- a/sdext/source/presenter/PresenterNotesView.cxx +++ b/sdext/source/presenter/PresenterNotesView.cxx @@ -544,15 +544,6 @@ void PresenterNotesView::PaintText (const awt::Rectangle& rUpdateBox) if (aBox.Width <= 0 || aBox.Height <= 0) return; - rendering::ViewState aViewState ( - geometry::AffineMatrix2D(1,0,0, 0,1,0), - PresenterGeometryHelper::CreatePolygon(aBox, mxCanvas->getDevice())); - rendering::RenderState aRenderState( - geometry::AffineMatrix2D(1,0,0, 0,1,0), - nullptr, - Sequence(3), - rendering::CompositeOperation::SOURCE); - if (mpBackground.get() != nullptr) { // Paint the background. diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index ac3e972b0f98..226c8283afaf 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -868,7 +868,6 @@ void PresenterToolBar::LayoutPart ( } else { ElementContainerPart::const_iterator iElement; - ElementContainerPart::const_iterator iEnd (rpPart->end()); ElementContainerPart::const_iterator iBegin (rpPart->begin()); for (iElement=rpPart->end()-1; iElement!=iBegin-1; --iElement) diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 900bdb50dd4b..7492e4e43aff 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -121,7 +121,6 @@ namespace const int nRest = rVersionBox.get_preferred_size().Width() - nMax; std::set aAuthors; - SfxVersionInfo aInfo; aAuthors.insert(SvtUserOptions().GetFullName()); for (int i = 0; i < rVersionBox.n_children(); ++i) diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 1247d6cfab88..02b5b7c7a10e 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1675,7 +1675,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, // Check, whether or not there is a group with this name // Return false, if there is no group with the given name - Content aGroup, aTemplate, aTargetGroup, aTemplateToRemove; + Content aGroup, aTemplateToRemove; INetURLObject aGroupObj( maRootURL ); bool bRemoveOldTemplateContent = false; diff --git a/slideshow/source/engine/opengl/TransitionImpl.cxx b/slideshow/source/engine/opengl/TransitionImpl.cxx index 489bb9f8e47e..5078a8c23bfd 100644 --- a/slideshow/source/engine/opengl/TransitionImpl.cxx +++ b/slideshow/source/engine/opengl/TransitionImpl.cxx @@ -790,7 +790,7 @@ std::shared_ptr makeIris() aLeavingPrimitives.push_back (Slide); - Primitive irisPart, part; + Primitive irisPart; int i, nSteps = 24, nParts = 7; double t = 1.0/nSteps, lx = 1, ly = 0, of=2.2, f=1.42; diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx index dbc3e0299e1d..b3686acd9e22 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.cxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx @@ -74,7 +74,6 @@ void ShapeManagerImpl::activate() mrMultiplexer.addShapeListenerHandler( shared_from_this() ); // clone listener map - uno::Reference xDummyListener; for( const auto& rListener : mrGlobalListenersMap ) listenerAdded( rListener.first ); diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 2cf21a5652b5..8ba770aa11b0 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -478,8 +478,6 @@ IMapObject* IMapWindow::GetIMapObj( const SdrObject* pSdrObj ) bool IMapWindow::Command(const CommandEvent& rCEvt) { - vcl::Region aRegion; - if ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) { std::unique_ptr xBuilder(Application::CreateBuilder(GetDrawingArea(), "svx/ui/imapmenu.ui")); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 2f949891215f..4a73ad6636d5 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -286,7 +286,6 @@ void SvxRubyDialog::Close() void SvxRubyDialog::Activate() { SfxModelessDialogController::Activate(); - std::unique_ptr pState; //get selection from current view frame SfxViewFrame* pCurFrm = SfxViewFrame::Current(); Reference< XController > xCtrl = pCurFrm->GetFrame().GetController(); diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 9774abc8e5a4..394377122286 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -1660,7 +1660,6 @@ void FormController::focusGained(const FocusEvent& e) if (!m_bFiltering && m_bCycle && (e.FocusFlags & FocusChangeReason::AROUND) && m_xCurrentControl.is()) { - SQLErrorEvent aErrorEvent; OSL_ENSURE( m_xFormOperations.is(), "FormController::focusGained: hmm?" ); // should have been created in setModel try diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 3b078f45008b..12f3dbe04e48 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1019,7 +1019,6 @@ bool GalleryTheme::InsertModelStream(const tools::SvRef& rxMod if( xOStm.is() && !xOStm->GetError() ) { GalleryCodec aCodec( *xOStm ); - SvMemoryStream aMemStm( 65535, 65535 ); xOStm->SetBufferSize( 16348 ); aCodec.Write( *rxModelStream ); diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx index 907682089ea3..c023e5bb8205 100644 --- a/svx/source/gengal/gengal.cxx +++ b/svx/source/gengal/gengal.cxx @@ -103,8 +103,6 @@ static void createTheme( const OUString& aThemeName, const OUString& aGalleryURL // if ( ! pGalTheme->InsertFileOrDirURL( aURL ) ) { // Requires a load more components ... - Graphic aGraphic; - if ( ! pGalTheme->InsertURL( rFile ) ) fprintf( stderr, "Failed to import '%s'\n", OUStringToOString( rFile.GetMainURL(INetURLObject::DecodeMechanism::NONE), RTL_TEXTENCODING_UTF8 ).getStr() ); diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 0fb5876d9aca..367e6a3ac24f 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1118,7 +1118,6 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons { bool bIsDefaultGeometry = false; - PropertyValue aPropVal; OUString sShapeType; const OUString sType( "Type" ); const SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 47b66565c93a..814fd99c91ef 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -1188,7 +1188,6 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() //Checked for shapes. SwAccessibleShapeMap_Impl::const_iterator aIter = mpShapeMap->cbegin(); SwAccessibleShapeMap_Impl::const_iterator aEndIter = mpShapeMap->cend(); - ::rtl::Reference< SwAccessibleContext > xParentAccImpl; if( bIsSelAll) { @@ -1205,8 +1204,6 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() { while( aIter != aEndIter ) { - SwAccessibleChild aFrame( (*aIter).first ); - const SwFrameFormat *pFrameFormat = (*aIter).first ? ::FindFrameFormat( (*aIter).first ) : nullptr; if( !pFrameFormat ) { @@ -2209,7 +2206,7 @@ void SwAccessibleMap::RemoveContext( const SdrObject *pObj ) SwAccessibleShapeMap_Impl::iterator aIter = mpShapeMap->find( pObj ); if( aIter != mpShapeMap->end() ) { - uno::Reference < XAccessible > xAcc( (*aIter).second ); + uno::Reference < XAccessible > xTempHold( (*aIter).second ); mpShapeMap->erase( aIter ); RemoveGroupContext(pObj); // The shape selection flag is not cleared, but one might do diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 1bbd14bbe9d5..46e0f55a4725 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -421,7 +421,6 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext) case SwNodeType::Ole: { // StarView does not yet provide an option to copy a StarOBJ - tools::SvRef aRef = new SotStorage( OUString() ); SwOLEObj& rSwOLE = static_cast(pCNd)->GetOLEObj(); // temporary storage until object is inserted @@ -796,7 +795,6 @@ void SwUndoReRead::SetAndSave(::sw::UndoRedoContext & rContext) // cache the old values std::unique_ptr pOldGrf( mpGraphic ? new Graphic(*mpGraphic) : nullptr); o3tl::optional aOldNm = maNm; - o3tl::optional aOldFltr = maFltr; MirrorGraph nOldMirr = mnMirror; // since all of them are cleared/modified by SaveGraphicData: SaveGraphicData( *pGrfNd ); diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 81fa51e5d5e4..4d97fd7f6bab 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -658,8 +658,6 @@ WW8TableInfo::processTableLine(const SwTable * pTable, const SwTableBoxes & rBoxes = pTableLine->GetTabBoxes(); - WW8TableNodeInfo::Pointer_t pTextNodeInfo; - for (size_t n = 0; n < rBoxes.size(); ++n) { const SwTableBox * pBox = rBoxes[n]; diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index d0d5b1e48094..9a9aad263c1f 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -82,7 +82,6 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS comphelper::getProcessComponentContext(); // Get data sink ... - tools::SvRef xDocStream; uno::Reference xGraphicStorageHandler; rtl::Reference xGraphicHelper ; uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver; diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index c9fdfe8c6552..5a345e6fb17c 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -1343,7 +1343,7 @@ namespace cmis { try { - libcmis::FolderPtr pNew = pFolder->createFolder( m_pObjectProps ); + pFolder->createFolder( m_pObjectProps ); sNewPath = STD_TO_OUSTR( newPath ); } catch ( const libcmis::Exception& ) @@ -1887,7 +1887,6 @@ namespace cmis } OUString sParentURL = m_xIdentifier->getContentIdentifier(); - URL aParentURL( sParentURL ); // Set the parent URL for the transient objects uno::Reference< ucb::XContentIdentifier > xId(new ::ucbhelper::ContentIdentifier(sParentURL)); diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index 07a65d6bda09..39323337d2de 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx @@ -2948,7 +2948,6 @@ Content::ResourceType Content::resourceTypeForLocks( { osl::MutexGuard g(m_aMutex); //check if cache contains what we need, usually the first PROPFIND on the URI has supported lock - std::unique_ptr< ContentProperties > xProps; if (m_xCachedProps) { uno::Sequence< ucb::LockEntry > aSupportedLocks; diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx index 4fd76a473300..4133c3c46a25 100644 --- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx +++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx @@ -470,8 +470,6 @@ void munchDrawCommands(std::vector> const& rDr auto aIterator = rCacheDrawCommands.find(rWidgetDraw.msSource); - gfx::DrawRoot aDrawRoot; - if (aIterator == rCacheDrawCommands.end()) { SvFileStream aFileStream(rWidgetDraw.msSource, StreamMode::READ); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index bd83aab83f68..31a8c6d43661 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -434,7 +434,6 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos, const Size& rSize ) { - vcl::Region aDrawClipRegion; MapMode aDrawMap( GetPrefMapMode() ); Size aDestSize( pOut->LogicToPixel( rSize ) ); @@ -1284,7 +1283,6 @@ static void ImplActionBounds( tools::Rectangle& o_rOutBounds, tools::Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, tools::Rectangle* pHairline ) const { - GDIMetaFile aMtf; ScopedVclPtrInstance< VirtualDevice > aMapVDev( i_rReference ); aMapVDev->EnableOutput( false ); @@ -2199,7 +2197,6 @@ GDIMetaFile GDIMetaFile::GetMonochromeMtf( const Color& rColor ) const BitmapChecksum GDIMetaFile::GetChecksum() const { - GDIMetaFile aMtf; SvMemoryStream aMemStm( 65535, 65535 ); ImplMetaWriteData aWriteData; SVBT16 aBT16; diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx index 29ddddaef454..a6a5e36279a2 100644 --- a/vcl/source/gdi/salmisc.cxx +++ b/vcl/source/gdi/salmisc.cxx @@ -229,7 +229,6 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rD const long nHeight1 = rDstBuffer.mnHeight- 1; const ColorMask& rSrcMask = rSrcBuffer.maColorMask; const ColorMask& rDstMask = rDstBuffer.maColorMask; - BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() ); std::unique_ptr pColToPalMap(new sal_uInt8[ TC_TO_PAL_COLORS ]); BitmapColor aIndex( 0 ); diff --git a/vcl/source/treelist/iconviewimpl.cxx b/vcl/source/treelist/iconviewimpl.cxx index c9c5e530592f..5dac45ba7c14 100644 --- a/vcl/source/treelist/iconviewimpl.cxx +++ b/vcl/source/treelist/iconviewimpl.cxx @@ -412,8 +412,6 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan nStartId--; } - vcl::Region aClipRegion(GetClipRegionRect()); - if (!m_pCursor && !mbNoAutoCurEntry) { // do not select if multiselection or explicit set diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 349102848bd1..65110bfc07d2 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1399,7 +1399,6 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con Point aTmpPoint = pOffset ? *pOffset : Point(); tools::Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) ); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - DecorationView aDecoView(&rRenderContext); Color aFaceColor(rStyleSettings.GetFaceColor()); Color aFrameColor(aFaceColor); diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index cc315b354362..f738591f6b28 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -1732,16 +1732,6 @@ bool X11SalGraphicsImpl::drawPolyLine( } basegfx::triangulator::B2DTriangleVector aTriangles; - const basegfx::B2DPolyPolygon aAreaPolyPoly( - basegfx::utils::createAreaGeometry( - aPolygon, - 0.5 * aLineWidth.getX(), - eLineJoin, - eLineCap, - basegfx::deg2rad(12.5), - 0.4, - fMiterMinimumAngle, - &aTriangles)); if(!aTriangles.empty()) { -- cgit