New Defects reported by Coverity Scan for LibreOffice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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

492 new defect(s) introduced to LibreOffice found with Coverity Scan.
12 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 492 defect(s)


** CID 1546235:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/framework/source/uielement/toolbarsmenucontroller.cxx: 629 in framework::ToolbarsMenuController::itemSelected(const com::sun::star::awt::MenuEvent &)()


________________________________________________________________________________________________________
*** CID 1546235:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/framework/source/uielement/toolbarsmenucontroller.cxx: 629 in framework::ToolbarsMenuController::itemSelected(const com::sun::star::awt::MenuEvent &)()
623                 Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch(
624                                                         aTargetURL, OUString(), 0 );
625     
626                 ExecuteInfo* pExecuteInfo = new ExecuteInfo;
627                 pExecuteInfo->xDispatch     = xDispatch;
628                 pExecuteInfo->aTargetURL    = aTargetURL;
>>>     CID 1546235:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aArgs" is copied in a call to copy assignment "operator =", when it could be moved instead.
629                 pExecuteInfo->aArgs         = aArgs;
630                 Application::PostUserEvent( LINK(nullptr, ToolbarsMenuController, ExecuteHdl_Impl), pExecuteInfo );
631             }
632         }
633         else
634         {

** CID 1546234:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/core/unocore/unostyle.cxx: 4855 in SwXTextCellStyle::getPropertySetInfo()()


________________________________________________________________________________________________________
*** CID 1546234:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/core/unocore/unostyle.cxx: 4855 in SwXTextCellStyle::getPropertySetInfo()()
4849     }
4850     
4851     //XPropertySet
4852     css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL SwXTextCellStyle::getPropertySetInfo()
4853     {
4854         static uno::Reference<beans::XPropertySetInfo> xRef(aSwMapProvider.GetPropertySet(PROPERTY_MAP_CELL_STYLE)->getPropertySetInfo());
>>>     CID 1546234:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "xRef" is copied in call to copy constructor "com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>", when it could be moved instead.
4855         return xRef;
4856     }
4857     
4858     void SAL_CALL SwXTextCellStyle::setPropertyValue(const OUString& rPropertyName, const css::uno::Any& aValue)
4859     {
4860         SolarMutexGuard aGuard;

** CID 1546233:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/framework/source/uielement/toolbarmanager.cxx: 1116 in framework::ToolBarManager::CreateControllers()()


________________________________________________________________________________________________________
*** CID 1546233:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/framework/source/uielement/toolbarmanager.cxx: 1116 in framework::ToolBarManager::CreateControllers()()
1110                                                              m_pToolBar,
1111                                                              aCommandURL,
1112                                                              nId,
1113                                                              nWidth,
1114                                                              aControlType ).get(), UNO_QUERY );
1115     
>>>     CID 1546233:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "xStatusListener" is copied in a call to copy assignment "operator =", when it could be moved instead.
1116                         xController = xStatusListener;
1117                     }
1118                     else
1119                     {
1120                         if ( m_pToolBar )
1121                             xController.set( new GenericToolbarController( m_xContext, m_xFrame, m_pToolBar, nId, aCommandURL ));

** CID 1546232:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/sidebar/ChartTypePanel.cxx: 271 in chart::sidebar::ChartTypePanel::doUpdateModel(rtl::Reference<chart::ChartModel>)()


________________________________________________________________________________________________________
*** CID 1546232:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/sidebar/ChartTypePanel.cxx: 271 in chart::sidebar::ChartTypePanel::doUpdateModel(rtl::Reference<chart::ChartModel>)()
265     {
266         if (mbModelValid)
267         {
268             m_xChartModel->removeModifyListener(mxListener);
269         }
270     
>>>     CID 1546232:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "xModel" is copied in a call to copy assignment "operator =", when it could be moved instead.
271         m_xChartModel = xModel;
272         mbModelValid = m_xChartModel.is();
273     
274         if (!mbModelValid)
275             return;
276     

** CID 1546231:    (COPY_INSTEAD_OF_MOVE)
/usr/include/c++/12/bits/stl_uninitialized.h: 490 in std::__uninitialized_copy_move<std::move_iterator<std::_Deque_iterator<rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> &, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> *>>, std::_Deque_iterator<rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> &, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> *>, std::_Deque_iterator<rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> &, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> *>, std::allocator<rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>>>(T1, T1, T2, T2, T3, T4 &)()
/usr/include/c++/12/bits/stl_uninitialized.h: 490 in std::__uninitialized_copy_move<std::move_iterator<std::_Deque_iterator<std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>>, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> &, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> *>>, std::_Deque_iterator<std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>>, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> &, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> *>, std::_Deque_iterator<std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>>, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> &, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> *>, std::allocator<std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>>>>(T1, T1, T2, T2, T3, T4 &)()


________________________________________________________________________________________________________
*** CID 1546231:    (COPY_INSTEAD_OF_MOVE)
/usr/include/c++/12/bits/stl_uninitialized.h: 490 in std::__uninitialized_copy_move<std::move_iterator<std::_Deque_iterator<rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> &, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> *>>, std::_Deque_iterator<rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> &, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> *>, std::_Deque_iterator<rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> &, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> *>, std::allocator<rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>>>(T1, T1, T2, T2, T3, T4 &)()
484     			      _InputIterator1 __last1,
485     			      _InputIterator2 __first2,
486     			      _InputIterator2 __last2,
487     			      _ForwardIterator __result,
488     			      _Allocator& __alloc)
489         {
>>>     CID 1546231:    (COPY_INSTEAD_OF_MOVE)
>>>     "__last1" is passed-by-value as parameter to "__uninitialized_copy_a" when it could be moved instead.
490           _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
491     							   __result,
492     							   __alloc);
493           __try
494     	{
495     	  return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);
/usr/include/c++/12/bits/stl_uninitialized.h: 490 in std::__uninitialized_copy_move<std::move_iterator<std::_Deque_iterator<std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>>, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> &, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> *>>, std::_Deque_iterator<std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>>, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> &, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> *>, std::_Deque_iterator<std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>>, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> &, std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>> *>, std::allocator<std::unique_ptr<SdrHdl, std::default_delete<SdrHdl>>>>(T1, T1, T2, T2, T3, T4 &)()
484     			      _InputIterator1 __last1,
485     			      _InputIterator2 __first2,
486     			      _InputIterator2 __last2,
487     			      _ForwardIterator __result,
488     			      _Allocator& __alloc)
489         {
>>>     CID 1546231:    (COPY_INSTEAD_OF_MOVE)
>>>     "__last1" is passed-by-value as parameter to "__uninitialized_copy_a" when it could be moved instead.
490           _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
491     							   __result,
492     							   __alloc);
493           __try
494     	{
495     	  return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);

** CID 1546230:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/xmlhelp/source/treeview/tvread.cxx: 723 in treeview::TVChildTarget::init(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()


________________________________________________________________________________________________________
*** CID 1546230:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/xmlhelp/source/treeview/tvread.cxx: 723 in treeview::TVChildTarget::init(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()
717         configData.m_vAdd[3] = 14;
718         configData.m_vAdd[4] = 12;
719         configData.m_vReplacement[0] = utl::ConfigManager::getProductName();
720         configData.m_vReplacement[1] = productVersion;
721         // m_vReplacement[2...4] (vendorName/-Version/-Short) are empty strings
722     
>>>     CID 1546230:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "system" is copied in a call to copy assignment "operator =", when it could be moved instead.
723         configData.system = system;
724         configData.locale = locale;
725         configData.appendix =
726             "?Language=" +
727             configData.locale +
728             "&System=" +

** CID 1546229:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/core/data/dptabsrc.cxx: 2539 in ScDPMember::getPropertySetInfo()()


________________________________________________________________________________________________________
*** CID 1546229:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/core/data/dptabsrc.cxx: 2539 in ScDPMember::getPropertySetInfo()()
2533             { SC_UNO_DP_POSITION, 0,  cppu::UnoType<sal_Int32>::get(),        0, 0 },
2534             { SC_UNO_DP_SHOWDETAILS, 0,  cppu::UnoType<bool>::get(),              0, 0 },
2535             { SC_UNO_DP_LAYOUTNAME, 0, cppu::UnoType<OUString>::get(), 0, 0 },
2536         };
2537         static uno::Reference<beans::XPropertySetInfo> aRef =
2538             new SfxItemPropertySetInfo( aDPMemberMap_Impl );
>>>     CID 1546229:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aRef" is copied in call to copy constructor "com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>", when it could be moved instead.
2539         return aRef;
2540     }
2541     
2542     void SAL_CALL ScDPMember::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
2543     {
2544         if ( aPropertyName == SC_UNO_DP_ISVISIBLE )

** CID 1546228:    (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/property_tree/detail/ptree_implementation.hpp: 667 in boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::get_value<int, boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, int>>(T2) const()
/usr/include/boost/property_tree/detail/ptree_implementation.hpp: 667 in boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::get_value<unsigned int, boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, unsigned int>>(T2) const()


________________________________________________________________________________________________________
*** CID 1546228:    (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/property_tree/detail/ptree_implementation.hpp: 667 in boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::get_value<int, boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, int>>(T2) const()
661     
662         template<class K, class D, class C>
663         template<class Type, class Translator>
664         typename boost::enable_if<detail::is_translator<Translator>, Type>::type
665         basic_ptree<K, D, C>::get_value(Translator tr) const
666         {
>>>     CID 1546228:    (COPY_INSTEAD_OF_MOVE)
>>>     "tr" is passed-by-value as parameter to "get_value_optional" when it could be moved instead.
667             if(boost::optional<Type> o = get_value_optional<Type>(tr)) {
668                 return *o;
669             }
670             BOOST_PROPERTY_TREE_THROW(ptree_bad_data(
671                 std::string("conversion of data to type \"") +
672                 typeid(Type).name() + "\" failed", data()));
/usr/include/boost/property_tree/detail/ptree_implementation.hpp: 667 in boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::get_value<unsigned int, boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, unsigned int>>(T2) const()
661     
662         template<class K, class D, class C>
663         template<class Type, class Translator>
664         typename boost::enable_if<detail::is_translator<Translator>, Type>::type
665         basic_ptree<K, D, C>::get_value(Translator tr) const
666         {
>>>     CID 1546228:    (COPY_INSTEAD_OF_MOVE)
>>>     "tr" is passed-by-value as parameter to "get_value_optional" when it could be moved instead.
667             if(boost::optional<Type> o = get_value_optional<Type>(tr)) {
668                 return *o;
669             }
670             BOOST_PROPERTY_TREE_THROW(ptree_bad_data(
671                 std::string("conversion of data to type \"") +
672                 typeid(Type).name() + "\" failed", data()));

** CID 1546227:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sdext/source/pdfimport/pdfparse/pdfparse.cxx: 313 in <unnamed>::PDFGrammar<boost::spirit::classic::file_iterator<char, boost::spirit::classic::fileiter_impl::mmap_file_iterator<char>>>::haveFile(boost::spirit::classic::file_iterator<char, boost::spirit::classic::fileiter_impl::mmap_file_iterator<char>>, boost::spirit::classic::file_iterator<char, boost::spirit::classic::fileiter_impl::mmap_file_iterator<char>>)()


________________________________________________________________________________________________________
*** CID 1546227:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sdext/source/pdfimport/pdfparse/pdfparse.cxx: 313 in <unnamed>::PDFGrammar<boost::spirit::classic::file_iterator<char, boost::spirit::classic::fileiter_impl::mmap_file_iterator<char>>>::haveFile(boost::spirit::classic::file_iterator<char, boost::spirit::classic::fileiter_impl::mmap_file_iterator<char>>, boost::spirit::classic::file_iterator<char, boost::spirit::classic::fileiter_impl::mmap_file_iterator<char>>)()
307                 m_aUIntStack.pop_back();
308                 pFile->m_nMajor = m_aUIntStack.back();
309                 m_aUIntStack.pop_back();
310                 m_aObjectStack.push_back( pFile );
311             }
312             else
>>>     CID 1546227:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pBegin" is passed-by-value as parameter to "parseError" when it could be moved instead.
313                 parseError( "found file header in unusual place", pBegin );
314         }
315     
316         void pushComment( iteratorT first, iteratorT last )
317         {
318             // add a comment to the current stack element

** CID 1546226:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/xmloff/source/text/txtflde.cxx: 774 in XMLTextFieldExport::ExportFieldAutoStyle(const com::sun::star::uno::Reference<com::sun::star::text::XTextField> &, bool, bool)()


________________________________________________________________________________________________________
*** CID 1546226:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/xmloff/source/text/txtflde.cxx: 774 in XMLTextFieldExport::ExportFieldAutoStyle(const com::sun::star::uno::Reference<com::sun::star::text::XTextField> &, bool, bool)()
768                     pUsedMasters->find(xOurText);
769     
770                 // insert a list for our XText (if necessary)
771                 if (aMapIter == pUsedMasters->end())
772                 {
773                     std::set<OUString> aSet;
>>>     CID 1546226:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aSet" is copied in a call to copy assignment "operator =", when it could be moved instead.
774                     (*pUsedMasters)[xOurText] = aSet;
775                     aMapIter = pUsedMasters->find(xOurText);
776                 }
777     
778                 // insert this text field master
779                 OUString sFieldMasterName = GetStringProperty(

** CID 1546225:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/ui/vba/vbaselection.cxx: 1147 in SwVbaSelection::Paragraphs(const com::sun::star::uno::Any &)()


________________________________________________________________________________________________________
*** CID 1546225:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/ui/vba/vbaselection.cxx: 1147 in SwVbaSelection::Paragraphs(const com::sun::star::uno::Any &)()
1141         uno::Reference< text::XParagraphCursor > xParaCursor( xText->createTextCursor(), uno::UNO_QUERY_THROW );
1142         xParaCursor->gotoStartOfParagraph( false );
1143         xParaCursor->gotoStartOfParagraph( true );
1144     
1145         uno::Reference< text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW );
1146         uno::Reference< text::XTextRange > xParaRange( xParaCursor, uno::UNO_QUERY_THROW );
>>>     CID 1546225:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "xTextDoc" is passed-by-value as parameter to "SwVbaParagraph::SwVbaParagraph(com::sun::star::uno::Reference<ooo::vba::XHelperInterface> const &, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const &, com::sun::star::uno::Reference<com::sun::star::text::XTextDocument>, com::sun::star::uno::Reference<com::sun::star::text::XTextRange>)" when it could be moved instead.
1147         uno::Reference< word::XParagraph > xParagraph = new SwVbaParagraph( mxParent, mxContext, xTextDoc, xParaRange );
1148     
1149         aRet <<= xParagraph;
1150         return aRet;
1151     }
1152     

** CID 1546224:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx: 1217 in writerfilter::ooxml::OOXMLFastContextHandlerPropertyTable::lcl_endFastElement(int)()


________________________________________________________________________________________________________
*** CID 1546224:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx: 1217 in writerfilter::ooxml::OOXMLFastContextHandlerPropertyTable::lcl_endFastElement(int)()
1211             (new OOXMLPropertySetValue(pPropSet));
1212     
1213         mTable.add(pTmpVal);
1214     
1215         writerfilter::Reference<Table>::Pointer_t pTable(mTable.clone());
1216     
>>>     CID 1546224:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pTable" is passed-by-value as parameter to "table" when it could be moved instead.
1217         mpStream->table(mId, pTable);
1218     
1219         endAction();
1220     }
1221     
1222     /*

** CID 1546223:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/uibase/uiview/viewling.cxx: 351 in SwView::SpellError(o3tl::strong_int<unsigned short, LanguageTypeTag>)()


________________________________________________________________________________________________________
*** CID 1546223:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/uibase/uiview/viewling.cxx: 351 in SwView::SpellError(o3tl::strong_int<unsigned short, LanguageTypeTag>)()
345             rEditWin.LeaveWait();
346             ++nWaitCnt;
347         }
348         if ( LANGUAGE_NONE == eLang )
349             ErrorHandler::HandleError( ERRCODE_SVX_LINGU_NOLANGUAGE );
350         else
>>>     CID 1546223:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aErr" is passed-by-value as parameter to "StringErrorInfo::StringErrorInfo(ErrCode, rtl::OUString, DialogMask)" when it could be moved instead.
351             ErrorHandler::HandleError( *new StringErrorInfo( ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aErr ) );
352     
353         while( nWaitCnt )
354         {
355             rEditWin.EnterWait();
356             --nWaitCnt;

** CID 1546222:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sd/source/console/PresenterToolBar.cxx: 1359 in sdext::presenter::<unnamed>::ElementMode::ReadElementMode(const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &, const rtl::OUString &, const std::shared_ptr<sdext::presenter::<unnamed>::ElementMode> &, const sdext::presenter::PresenterToolBar::Context &)()


________________________________________________________________________________________________________
*** CID 1546222:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sd/source/console/PresenterToolBar.cxx: 1359 in sdext::presenter::<unnamed>::ElementMode::ReadElementMode(const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &, const rtl::OUString &, const std::shared_ptr<sdext::presenter::<unnamed>::ElementMode> &, const sdext::presenter::PresenterToolBar::Context &)()
1353         PresenterConfigurationAccess::GetProperty(xProperties, "Text") >>= sText;
1354         Reference<container::XHierarchicalNameAccess> xFontNode (
1355             PresenterConfigurationAccess::GetProperty(xProperties, "Font"), UNO_QUERY);
1356         PresenterTheme::SharedFontDescriptor pFont(PresenterTheme::ReadFont(
1357             xFontNode, rpDefaultMode != nullptr ? rpDefaultMode->maText.GetFont()
1358                                                 : PresenterTheme::SharedFontDescriptor()));
>>>     CID 1546222:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pFont" is passed-by-value as parameter to "sdext::presenter::<unnamed>::Text::Text(rtl::OUString, sdext::presenter::PresenterTheme::SharedFontDescriptor)" when it could be moved instead.
1359         maText = Text(sText,pFont);
1360     
1361         // Read bitmaps to display as icons.
1362         Reference<container::XHierarchicalNameAccess> xIconNode (
1363             PresenterConfigurationAccess::GetProperty(xProperties, "Icon"), UNO_QUERY);
1364         mpIcon = PresenterBitmapContainer::LoadBitmap(

** CID 1546221:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/accessibility/source/standard/vclxaccessiblelistitem.cxx: 544 in VCLXAccessibleListItem::copyText(int, int)()


________________________________________________________________________________________________________
*** CID 1546221:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/accessibility/source/standard/vclxaccessiblelistitem.cxx: 544 in VCLXAccessibleListItem::copyText(int, int)()
538         if (pListBoxHelper)
539         {
540             Reference< datatransfer::clipboard::XClipboard > xClipboard = pListBoxHelper->GetClipboard();
541             if ( xClipboard.is() )
542             {
543                 OUString sText( getTextRange( nStartIndex, nEndIndex ) );
>>>     CID 1546221:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "sText" is passed-by-value as parameter to "vcl::unohelper::TextDataObject::TextDataObject(rtl::OUString)" when it could be moved instead.
544                 rtl::Reference<vcl::unohelper::TextDataObject> pDataObj = new vcl::unohelper::TextDataObject( sText );
545     
546                 SolarMutexReleaser aReleaser;
547                 xClipboard->setContents( pDataObj, nullptr );
548                 Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY );
549                 if( xFlushableClipboard.is() )

** CID 1546220:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/include/oox/export/drawingml.hxx: 262 in oox::drawingml::GraphicExport::GraphicExport(std::shared_ptr<sax_fastparser::FastSerializerHelper>, oox::core::XmlFilterBase *, oox::drawingml::DocumentType)()


________________________________________________________________________________________________________
*** CID 1546220:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/include/oox/export/drawingml.hxx: 262 in oox::drawingml::GraphicExport::GraphicExport(std::shared_ptr<sax_fastparser::FastSerializerHelper>, oox::core::XmlFilterBase *, oox::drawingml::DocumentType)()
256         sax_fastparser::FSHelperPtr mpFS;
257         oox::core::XmlFilterBase* mpFilterBase;
258         DocumentType meDocumentType;
259     
260     public:
261         GraphicExport(sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* pFilterBase, DocumentType eDocumentType)
>>>     CID 1546220:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pFS" is copied in call to copy constructor "std::shared_ptr<sax_fastparser::FastSerializerHelper>", when it could be moved instead.
262             : mpFS(pFS)
263             , mpFilterBase(pFilterBase)
264             , meDocumentType(eDocumentType)
265         {}
266     
267         OUString writeToStorage(Graphic const& rGraphic, bool bRelPathToMedia = false);

** CID 1546219:  API usage errors  (INVALIDATE_ITERATOR)
/vcl/unx/generic/fontmanager/fontmanager.cxx: 731 in psp::PrintFontManager::getFontFile(const psp::PrintFontManager::PrintFont &) const()


________________________________________________________________________________________________________
*** CID 1546219:  API usage errors  (INVALIDATE_ITERATOR)
/vcl/unx/generic/fontmanager/fontmanager.cxx: 731 in psp::PrintFontManager::getFontFile(const psp::PrintFontManager::PrintFont &) const()
725         return FAMILY_DONTKNOW;
726     }
727     
728     OString PrintFontManager::getFontFile(const PrintFont& rFont) const
729     {
730         std::unordered_map< int, OString >::const_iterator it = m_aAtomToDir.find(rFont.m_nDirectory);
>>>     CID 1546219:  API usage errors  (INVALIDATE_ITERATOR)
>>>     Dereferencing iterator "it" though it is already past the end of its container.
731         OString aPath = it->second + "/" + rFont.m_aFontFile;
732         return aPath;
733     }
734     

** CID 1546218:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/core/data/dpobject.cxx: 2543 in ScDPObject::GetUsedHierarchy(int)()


________________________________________________________________________________________________________
*** CID 1546218:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/core/data/dpobject.cxx: 2543 in ScDPObject::GetUsedHierarchy(int)()
2537     }
2538     
2539     sal_Int32 ScDPObject::GetUsedHierarchy( sal_Int32 nDim )
2540     {
2541         sal_Int32 nHier = 0;
2542         uno::Reference<container::XNameAccess> xDimsName( GetSource()->getDimensions() );
>>>     CID 1546218:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "xDimsName" is passed-by-value as parameter to "ScNameToIndexAccess::ScNameToIndexAccess(com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>)" when it could be moved instead.
2543         uno::Reference<container::XIndexAccess> xIntDims(new ScNameToIndexAccess( xDimsName ));
2544         uno::Reference<beans::XPropertySet> xDim(xIntDims->getByIndex( nDim ), uno::UNO_QUERY);
2545         if (xDim.is())
2546             nHier = ScUnoHelpFunctions::GetLongProperty( xDim, SC_UNO_DP_USEDHIERARCHY );
2547         return nHier;
2548     }

** CID 1546217:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svgio/source/svgreader/svgclippathnode.cxx: 240 in svgio::svgreader::SvgClipPathNode::apply(drawinglayer::primitive2d::Primitive2DContainer &, const std::optional<basegfx::B2DHomMatrix> &) const()


________________________________________________________________________________________________________
*** CID 1546217:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svgio/source/svgreader/svgclippathnode.cxx: 240 in svgio::svgreader::SvgClipPathNode::apply(drawinglayer::primitive2d::Primitive2DContainer &, const std::optional<basegfx::B2DHomMatrix> &) const()
234                         // and strokeWidth and forced to black
235                         drawinglayer::primitive2d::Primitive2DReference xEmbedTransparence(
236                             new drawinglayer::primitive2d::MaskPrimitive2D(
237                                 std::move(aClipPolyPolygon),
238                                 std::move(rContent)));
239     
>>>     CID 1546217:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "xEmbedTransparence" is copied in call to copy constructor "rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>", when it could be moved instead.
240                         rContent = drawinglayer::primitive2d::Primitive2DContainer { xEmbedTransparence };
241                     }
242                     else
243                     {
244                         if(!bAddContent)
245                         {

** CID 1546216:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/oox/source/drawingml/diagram/layoutatomvisitors.cxx: 136 in oox::drawingml::ShapeCreationVisitor::visit(oox::drawingml::LayoutNode &)()


________________________________________________________________________________________________________
*** CID 1546216:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/oox/source/drawingml/diagram/layoutatomvisitors.cxx: 136 in oox::drawingml::ShapeCreationVisitor::visit(oox::drawingml::LayoutNode &)()
130     
131         meLookFor = ALGORITHM;
132         defaultVisit(rAtom);
133         meLookFor = LAYOUT_NODE;
134     
135         // restore parent
>>>     CID 1546216:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pPreviousParent" is copied in a call to copy assignment "operator =", when it could be moved instead.
136         mpParentShape = pPreviousParent;
137         mpCurrentNode = pPreviousNode;
138     }
139     
140     void ShapeCreationVisitor::visit(ShapeAtom& /*rAtom*/)
141     {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DC6RJ_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJivzIiWuOS8ymxRmnKHjf0-2FsPxo-2Bh-2B3fQgoK7vyHENad1X4GP-2FRFjJU6r8Y34SbdQ8Ykr3na7aK7aEsGc5BL57lChIY7jfgRaG-2Fj-2Bc8SRQJFQNApjYssoeGqHx3DCo1KB1ZOoEey-2Fy6IStcn0LR17VlOWT24Jd85QpzeH6mV78aww-3D




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux