New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Tue Oct 8 01:01:30 UTC 2024


Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.

30 new defect(s) introduced to LibreOffice found with Coverity Scan.
13 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 20 of 30 defect(s)


** CID 1632260:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/hwpfilter/source/hwpreader.cxx: 4761 in <unnamed>::HwpImportFilter::HwpImportFilter(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()


________________________________________________________________________________________________________
*** CID 1632260:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/hwpfilter/source/hwpreader.cxx: 4761 in <unnamed>::HwpImportFilter::HwpImportFilter(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()
4755             Reference< XDocumentHandler > xHandler( rxContext->getServiceManager()->createInstanceWithContext( WRITER_IMPORTER_NAME, rxContext ), UNO_QUERY );
4756     
4757             rtl::Reference<HwpReader> p = new HwpReader;
4758             p->setDocumentHandler( xHandler );
4759     
4760             rImporter.set(xHandler, UNO_QUERY);
>>>     CID 1632260:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "p" is copied in a call to copy assignment "operator =", when it could be moved instead.
4761             rFilter = p;
4762         }
4763         catch( Exception & )
4764         {
4765             printf(" fail to instantiate %s\n", WRITER_IMPORTER_NAME.toUtf8().getStr() );
4766             exit( 1 );

** CID 1632259:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 579 in connectivity::ODatabaseMetaDataResultSet::setUDTsMap()()


________________________________________________________________________________________________________
*** CID 1632259:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 579 in connectivity::ODatabaseMetaDataResultSet::setUDTsMap()()
573     }
574     
575     void ODatabaseMetaDataResultSet::setUDTsMap()
576     {
577         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
578         pMetaData->setUDTsMap();
>>>     CID 1632259:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
579         m_xMetaData = pMetaData;
580     }
581     
582     void ODatabaseMetaDataResultSet::setTableTypes()
583     {
584         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632258:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sd/source/ui/unoidl/unowcntr.cxx: 77 in SvUnoWeakContainer::findRef(rtl::Reference<SdLayer> &, const SdrLayer *)()


________________________________________________________________________________________________________
*** CID 1632258:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sd/source/ui/unoidl/unowcntr.cxx: 77 in SvUnoWeakContainer::findRef(rtl::Reference<SdLayer> &, const SdrLayer *)()
71             }
72             else
73             {
74                 SdrLayer* pSdrLayer = pSdLayer->GetSdrLayer ();
75                 if (pSdrLayer == pSearchData)
76                 {
>>>     CID 1632258:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pSdLayer" is copied in a call to copy assignment "operator =", when it could be moved instead.
77                     rRef = pSdLayer;
78                     return true;
79                 }
80                 ++it;
81             }
82         }

** CID 1632257:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx: 830 in writerfilter::ooxml::OOXMLDocumentImpl::setDrawPage(rtl::Reference<SwFmDrawPage>)()


________________________________________________________________________________________________________
*** CID 1632257:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx: 830 in writerfilter::ooxml::OOXMLDocumentImpl::setDrawPage(rtl::Reference<SwFmDrawPage>)()
824     {
825         return mxModel;
826     }
827     
828     void OOXMLDocumentImpl::setDrawPage(rtl::Reference<SwFmDrawPage> xDrawPage)
829     {
>>>     CID 1632257:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "xDrawPage" is copied in a call to copy assignment "operator =", when it could be moved instead.
830         mxDrawPage = xDrawPage;
831     }
832     
833     rtl::Reference<SwFmDrawPage> OOXMLDocumentImpl::getDrawPage()
834     {
835         return mxDrawPage;

** CID 1632256:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 593 in connectivity::ODatabaseMetaDataResultSet::setExportedKeysMap()()


________________________________________________________________________________________________________
*** CID 1632256:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 593 in connectivity::ODatabaseMetaDataResultSet::setExportedKeysMap()()
587     }
588     
589     void ODatabaseMetaDataResultSet::setExportedKeysMap()
590     {
591         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
592         pMetaData->setExportedKeysMap();
>>>     CID 1632256:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
593         m_xMetaData = pMetaData;
594     }
595     
596     void ODatabaseMetaDataResultSet::setImportedKeysMap()
597     {
598         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632255:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/uibase/uno/unotxdoc.cxx: 441 in SwXTextDocument::GetNumberFormatter()()


________________________________________________________________________________________________________
*** CID 1632255:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/uibase/uno/unotxdoc.cxx: 441 in SwXTextDocument::GetNumberFormatter()()
435         if(!m_xNumFormatAgg.is())
436         {
437             if ( m_pDocShell->GetDoc() )
438             {
439                 rtl::Reference<SvNumberFormatsSupplierObj> pNumFormat = new SvNumberFormatsSupplierObj(
440                                     m_pDocShell->GetDoc()->GetNumberFormatter());
>>>     CID 1632255:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pNumFormat" is copied in a call to copy assignment "operator =", when it could be moved instead.
441                 m_xNumFormatAgg = pNumFormat;
442             }
443             if(m_xNumFormatAgg.is())
444                 m_xNumFormatAgg->setDelegator(getXWeak());
445         }
446         else

** CID 1632254:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 509 in connectivity::ODatabaseMetaDataResultSet::setColumnsMap()()


________________________________________________________________________________________________________
*** CID 1632254:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 509 in connectivity::ODatabaseMetaDataResultSet::setColumnsMap()()
503     }
504     
505     void ODatabaseMetaDataResultSet::setColumnsMap()
506     {
507         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
508         pMetaData->setColumnsMap();
>>>     CID 1632254:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
509         m_xMetaData = pMetaData;
510     }
511     
512     void ODatabaseMetaDataResultSet::setTablesMap()
513     {
514         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632253:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 572 in connectivity::ODatabaseMetaDataResultSet::setTypeInfoMap()()


________________________________________________________________________________________________________
*** CID 1632253:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 572 in connectivity::ODatabaseMetaDataResultSet::setTypeInfoMap()()
566     }
567     
568     void ODatabaseMetaDataResultSet::setTypeInfoMap()
569     {
570         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
571         pMetaData->setTypeInfoMap();
>>>     CID 1632253:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
572         m_xMetaData = pMetaData;
573     }
574     
575     void ODatabaseMetaDataResultSet::setUDTsMap()
576     {
577         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632252:    (COPY_INSTEAD_OF_MOVE)
/framework/source/uielement/menubarmanager.cxx: 1036 in framework::MenuBarManager::FillMenuManager(Menu *, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> &, const com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> &, const rtl::OUString &, bool)()
/framework/source/uielement/menubarmanager.cxx: 1094 in framework::MenuBarManager::FillMenuManager(Menu *, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> &, const com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> &, const rtl::OUString &, bool)()


________________________________________________________________________________________________________
*** CID 1632252:    (COPY_INSTEAD_OF_MOVE)
/framework/source/uielement/menubarmanager.cxx: 1036 in framework::MenuBarManager::FillMenuManager(Menu *, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> &, const com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> &, const rtl::OUString &, bool)()
1030                 {
1031                     // Check if we have to create a popup menu for a uno based popup menu controller.
1032                     // We have to set an empty popup menu into our menu structure so the controller also
1033                     // works with inplace OLE.
1034                     MenuItemHandler* pItemHandler = new MenuItemHandler( nItemId, nullptr, xDispatch );
1035                     rtl::Reference<VCLXPopupMenu> pVCLXPopupMenu = new VCLXPopupMenu(pPopup);
>>>     CID 1632252:    (COPY_INSTEAD_OF_MOVE)
>>>     "pVCLXPopupMenu" is copied in a call to copy assignment "operator =", when it could be moved instead.
1036                     pItemHandler->xPopupMenu = pVCLXPopupMenu;
1037                     pItemHandler->aMenuItemURL = aItemCommand;
1038                     m_aMenuItemHandlerVector.push_back( std::unique_ptr<MenuItemHandler>(pItemHandler) );
1039     
1040                     if ( bAccessibilityEnabled || pMenu->IsMenuBar())
1041                     {
/framework/source/uielement/menubarmanager.cxx: 1094 in framework::MenuBarManager::FillMenuManager(Menu *, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> &, const com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> &, const rtl::OUString &, bool)()
1088                     // Check if we have to create a popup menu for a uno based popup menu controller.
1089                     // We have to set an empty popup menu into our menu structure so the controller also
1090                     // works with inplace OLE.
1091                     rtl::Reference<VCLXPopupMenu> pVCLXPopupMenu = new VCLXPopupMenu;
1092                     PopupMenu* pPopupMenu = static_cast<PopupMenu *>(pVCLXPopupMenu->GetMenu());
1093                     pMenu->SetPopupMenu( pItemHandler->nItemId, pPopupMenu );
>>>     CID 1632252:    (COPY_INSTEAD_OF_MOVE)
>>>     "pVCLXPopupMenu" is copied in a call to copy assignment "operator =", when it could be moved instead.
1094                     pItemHandler->xPopupMenu = pVCLXPopupMenu;
1095     
1096                     if ( bAccessibilityEnabled && CreatePopupMenuController( pItemHandler.get(), m_xDispatchProvider, m_aModuleIdentifier ) )
1097                     {
1098                         pItemHandler->xPopupMenuController->updatePopupMenu();
1099                     }

** CID 1632251:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 481 in connectivity::ODatabaseMetaDataResultSet::setProceduresMap()()


________________________________________________________________________________________________________
*** CID 1632251:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 481 in connectivity::ODatabaseMetaDataResultSet::setProceduresMap()()
475     }
476     
477     void ODatabaseMetaDataResultSet::setProceduresMap()
478     {
479         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
480         pMetaData->setProceduresMap();
>>>     CID 1632251:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
481         m_xMetaData = pMetaData;
482     }
483     
484     void ODatabaseMetaDataResultSet::setCatalogsMap()
485     {
486         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632250:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/toolkit/source/awt/vclxgraphics.cxx: 131 in VCLXGraphics::getDevice()()


________________________________________________________________________________________________________
*** CID 1632250:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/toolkit/source/awt/vclxgraphics.cxx: 131 in VCLXGraphics::getDevice()()
125         SolarMutexGuard aGuard;
126     
127         if( !mxDevice.is() && mpOutputDevice )
128         {
129             rtl::Reference<VCLXDevice> pDev = new VCLXDevice;
130             pDev->SetOutputDevice( mpOutputDevice );
>>>     CID 1632250:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pDev" is copied in a call to copy assignment "operator =", when it could be moved instead.
131             mxDevice = pDev;
132         }
133         return mxDevice;
134     }
135     
136     awt::SimpleFontMetric VCLXGraphics::getFontMetric()

** CID 1632249:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 565 in connectivity::ODatabaseMetaDataResultSet::setBestRowIdentifierMap()()


________________________________________________________________________________________________________
*** CID 1632249:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 565 in connectivity::ODatabaseMetaDataResultSet::setBestRowIdentifierMap()()
559     }
560     
561     void ODatabaseMetaDataResultSet::setBestRowIdentifierMap()
562     {
563         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
564         pMetaData->setBestRowIdentifierMap();
>>>     CID 1632249:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
565         m_xMetaData = pMetaData;
566     }
567     
568     void ODatabaseMetaDataResultSet::setTypeInfoMap()
569     {
570         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632248:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 600 in connectivity::ODatabaseMetaDataResultSet::setImportedKeysMap()()


________________________________________________________________________________________________________
*** CID 1632248:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 600 in connectivity::ODatabaseMetaDataResultSet::setImportedKeysMap()()
594     }
595     
596     void ODatabaseMetaDataResultSet::setImportedKeysMap()
597     {
598         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
599         pMetaData->setImportedKeysMap();
>>>     CID 1632248:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
600         m_xMetaData = pMetaData;
601     }
602     
603     Reference< css::beans::XPropertySetInfo > SAL_CALL ODatabaseMetaDataResultSet::getPropertySetInfo(  )
604     {
605         return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());

** CID 1632247:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/editeng/source/xml/xmltxtexp.cxx: 285 in <unnamed>::SvxXMLTextExportComponent::SvxXMLTextExportComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, EditEngine *, const ESelection &, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> &)()


________________________________________________________________________________________________________
*** CID 1632247:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/editeng/source/xml/xmltxtexp.cxx: 285 in <unnamed>::SvxXMLTextExportComponent::SvxXMLTextExportComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, EditEngine *, const ESelection &, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> &)()
279             SVX_UNOEDIT_PARA_PROPERTIES,
280         };
281         static SvxItemPropertySet aSvxXMLTextExportComponentPropertySet( SvxXMLTextExportComponentPropertyMap, EditEngine::GetGlobalItemPool() );
282     
283         rtl::Reference<SvxUnoText> pUnoText = new SvxUnoText( &aEditSource, &aSvxXMLTextExportComponentPropertySet, mxText );
284         pUnoText->SetSelection( rSel );
>>>     CID 1632247:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pUnoText" is copied in a call to copy assignment "operator =", when it could be moved instead.
285         mxText = pUnoText;
286     
287     }
288     
289     void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& rSel )
290     {

** CID 1632246:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sfx2/source/doc/sfxbasemodel.cxx: 4576 in SfxBaseModel::loadMetadataFromStorage(const com::sun::star::uno::Reference<com::sun::star::embed::XStorage> &, const com::sun::star::uno::Reference<com::sun::star::rdf::XURI> &, const com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler> &)()


________________________________________________________________________________________________________
*** CID 1632246:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sfx2/source/doc/sfxbasemodel.cxx: 4576 in SfxBaseModel::loadMetadataFromStorage(const com::sun::star::uno::Reference<com::sun::star::embed::XStorage> &, const com::sun::star::uno::Reference<com::sun::star::rdf::XURI> &, const com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler> &)()
4570             throw; // not initialized
4571         } catch (Exception &) {
4572             // UGLY: if it's a RuntimeException, we can't be sure DMA is initialized
4573             m_pData->m_xDocumentMetadata = xDMA;
4574             throw;
4575         }
>>>     CID 1632246:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "xDMA" is copied in a call to copy assignment "operator =", when it could be moved instead.
4576         m_pData->m_xDocumentMetadata = xDMA;
4577     
4578     }
4579     
4580     void SAL_CALL
4581     SfxBaseModel::storeMetadataToStorage(

** CID 1632245:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 488 in connectivity::ODatabaseMetaDataResultSet::setCatalogsMap()()


________________________________________________________________________________________________________
*** CID 1632245:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 488 in connectivity::ODatabaseMetaDataResultSet::setCatalogsMap()()
482     }
483     
484     void ODatabaseMetaDataResultSet::setCatalogsMap()
485     {
486         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
487         pMetaData->setCatalogsMap();
>>>     CID 1632245:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
488         m_xMetaData = pMetaData;
489     }
490     
491     void ODatabaseMetaDataResultSet::setSchemasMap()
492     {
493         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632244:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 523 in connectivity::ODatabaseMetaDataResultSet::setProcedureColumnsMap()()


________________________________________________________________________________________________________
*** CID 1632244:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 523 in connectivity::ODatabaseMetaDataResultSet::setProcedureColumnsMap()()
517     }
518     
519     void ODatabaseMetaDataResultSet::setProcedureColumnsMap()
520     {
521         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
522         pMetaData->setProcedureColumnsMap();
>>>     CID 1632244:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
523         m_xMetaData = pMetaData;
524     }
525     
526     void ODatabaseMetaDataResultSet::setPrimaryKeysMap()
527     {
528         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632243:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 551 in connectivity::ODatabaseMetaDataResultSet::setCrossReferenceMap()()


________________________________________________________________________________________________________
*** CID 1632243:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 551 in connectivity::ODatabaseMetaDataResultSet::setCrossReferenceMap()()
545     }
546     
547     void ODatabaseMetaDataResultSet::setCrossReferenceMap()
548     {
549         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
550         pMetaData->setCrossReferenceMap();
>>>     CID 1632243:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
551         m_xMetaData = pMetaData;
552     }
553     
554     void ODatabaseMetaDataResultSet::setVersionColumnsMap()
555     {
556         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632242:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 558 in connectivity::ODatabaseMetaDataResultSet::setVersionColumnsMap()()


________________________________________________________________________________________________________
*** CID 1632242:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 558 in connectivity::ODatabaseMetaDataResultSet::setVersionColumnsMap()()
552     }
553     
554     void ODatabaseMetaDataResultSet::setVersionColumnsMap()
555     {
556         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
557         pMetaData->setVersionColumnsMap();
>>>     CID 1632242:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
558         m_xMetaData = pMetaData;
559     }
560     
561     void ODatabaseMetaDataResultSet::setBestRowIdentifierMap()
562     {
563         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();

** CID 1632241:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 586 in connectivity::ODatabaseMetaDataResultSet::setTableTypes()()


________________________________________________________________________________________________________
*** CID 1632241:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 586 in connectivity::ODatabaseMetaDataResultSet::setTableTypes()()
580     }
581     
582     void ODatabaseMetaDataResultSet::setTableTypes()
583     {
584         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();
585         pMetaData->setTableTypes();
>>>     CID 1632241:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pMetaData" is copied in a call to copy assignment "operator =", when it could be moved instead.
586         m_xMetaData = pMetaData;
587     }
588     
589     void ODatabaseMetaDataResultSet::setExportedKeysMap()
590     {
591         rtl::Reference<ODatabaseMetaDataResultSetMetaData> pMetaData = new ODatabaseMetaDataResultSetMetaData();


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DirnJ_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtNObSemBmzTkhelM5tzm-2FVbCXdthYxuGbXczYdPh8qu0cNdHwBbL83yJfRbyXwxqBrrJbIX-2BphLI3loGZdG3-2FHATvydTI-2Fjsf7FUsmHAiPVgevefiydEWPMWeUXviBQynOs1IhLOF11kqUrScz9TDBiiDgaB8qC9-2FmkeILrixC1E-3D



More information about the LibreOffice mailing list