Hi,

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

6 new defect(s) introduced to LibreOffice found with Coverity Scan.


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


** CID 1665188:       Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)


_____________________________________________________________________________________________
*** CID 1665188:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/framework/source/fwe/classes/addonsoptions.cxx: 1581             in 
framework::AddonsOptions_Impl::ReadImageFromURL(const rtl::OUString &)()
1575             if ( !aBmpSize.IsEmpty() )
1576             {
1577                 // Support non-transparent bitmaps to be downward 
compatible with OOo 1.1.x addons
1578                 if( !aBitmap.HasAlpha() )
1579                     aBitmap = Bitmap( aBitmap.CreateColorBitmap(), 
COL_LIGHTMAGENTA );
1580     
>>>     CID 1665188:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aBitmap" is copied in call to copy assignment for class "Bitmap", when 
>>> it could be moved instead.
1581                 aImage = aBitmap;
1582             }
1583         }
1584     
1585         return aImage;
1586     }

** CID 1665187:       Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)


_____________________________________________________________________________________________
*** CID 1665187:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/vcl/source/bitmap/BlendFrameCache.cxx: 131             in 
BlendFrameCache::BlendFrameCache(const Size &, unsigned char, const Color &, 
const Color &, const Color &, const Color &)()
125                     aCol.SetAlpha(nAlpha);
126                     pContent->SetPixelOnData(pScanContent, x, aCol);
127                 }
128             }
129         }
130     
>>>     CID 1665187:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aContent" is copied in call to copy assignment for class "Bitmap", 
>>> when it could be moved instead.
131         m_aLastResult = aContent;
132     }
133     

** CID 1665186:       Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)


_____________________________________________________________________________________________
*** CID 1665186:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sd/source/ui/slidesorter/view/SlsTheme.cxx: 229             in 
sd::slidesorter::view::Theme::InitializeIcon(sd::slidesorter::view::Theme::IconType,
 const rtl::OUString &)()
223     
224     void Theme::InitializeIcon(const IconType eType, const OUString& 
rResourceId)
225     {
226         if (size_t(eType)<maIcons.size())
227         {
228             const Bitmap aIcon(rResourceId);
>>>     CID 1665186:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aIcon" is copied in call to copy assignment for class "Bitmap const", 
>>> when it could be moved instead.
229             maIcons[eType] = aIcon;
230         }
231         else
232         {
233             OSL_ASSERT(eType>=0 && size_t(eType)<maIcons.size());
234         }

** CID 1665185:         (TAINTED_SCALAR)


_____________________________________________________________________________________________
*** CID 1665185:           (TAINTED_SCALAR)
/codemaker/source/pythonmaker/pythonmaker.cxx: 29             in main()
23     #include <unoidl/unoidl.hxx>
24     #include <o3tl/string_view.hxx>
25     
26     #include "pythonoptions.hxx"
27     #include "pythontype.hxx"
28     
>>>     CID 1665185:           (TAINTED_SCALAR)
>>>     Passing tainted expression "**argv" to "sal_main_with_args", which uses 
>>> it as a loop boundary.
29     SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
30     {
31         // Object to hold parsed command-line options.
32         PythonOptions options;
33         try
34         {
/codemaker/source/pythonmaker/pythonmaker.cxx: 29             in main()
23     #include <unoidl/unoidl.hxx>
24     #include <o3tl/string_view.hxx>
25     
26     #include "pythonoptions.hxx"
27     #include "pythontype.hxx"
28     
>>>     CID 1665185:           (TAINTED_SCALAR)
>>>     Passing tainted expression "**argv" to "sal_main_with_args", which uses 
>>> it as a loop boundary.
29     SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
30     {
31         // Object to hold parsed command-line options.
32         PythonOptions options;
33         try
34         {

** CID 1665184:       Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)


_____________________________________________________________________________________________
*** CID 1665184:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svx/source/dialog/_contdlg.cxx: 125             in 
SvxContourDlg::CreateAutoContour(const Graphic &, const tools::Rectangle *)()
119                 Bitmap aTmpBmp = rGraphic.GetBitmap();
120                 if (aTmpBmp.HasAlpha())
121                     aBmp = aTmpBmp.CreateAlphaMask().GetBitmap();
122                 else
123                 {
124     
>>>     CID 1665184:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aTmpBmp" is copied in call to copy assignment for class "Bitmap", when 
>>> it could be moved instead.
125                     aBmp = aTmpBmp;
126                     bContourEdgeDetect = true;
127                 }
128             }
129         }
130         else if( rGraphic.GetType() != GraphicType::NONE )

** CID 1665183:       Control flow issues  (DEADCODE)
/cui/source/dialogs/SpellDialog.cxx: 1495           in 
svx::SentenceEditWindow_Impl::KeyInput(const KeyEvent &)()


_____________________________________________________________________________________________
*** CID 1665183:         Control flow issues  (DEADCODE)
/cui/source/dialogs/SpellDialog.cxx: 1495             in 
svx::SentenceEditWindow_Impl::KeyInput(const KeyEvent &)()
1489     //    7 - UE
1490     //    8 - UE
1491                 case SelectionType::OUTSIDE_NO :
1492                 case SelectionType::OUTSIDE_YES:
1493                     nAction = Action::UNDOEDIT;
1494                 break;
>>>     CID 1665183:         Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "case <unnamed>::SelectionTy...".
1495                 case SelectionType::INVALID:
1496                     SAL_WARN("cui.dialogs", "selection type not set");
1497                 break;
1498             }
1499             //save the current paragraph
1500             sal_Int32 nCurrentLen = m_xEditEngine->GetText().getLength();


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://scan.coverity.com/projects/libreoffice?tab=overview

Reply via email to