[Libreoffice-commits] core.git: 17 commits - filter/source include/tools pyuno/source reportdesign/source sc/source sd/source svx/source vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Apr 2 07:52:24 PDT 2014
filter/source/graphicfilter/ipict/ipict.cxx | 12 ++++
filter/source/graphicfilter/itiff/itiff.cxx | 49 +++++++++++++++++-
include/tools/inetmime.hxx | 1
pyuno/source/module/pyuno_impl.hxx | 3 +
pyuno/source/module/pyuno_module.cxx | 10 ++-
reportdesign/source/core/api/ReportDefinition.cxx | 3 +
reportdesign/source/filter/xml/xmlStyleImport.hxx | 1
reportdesign/source/ui/inspection/GeometryHandler.cxx | 16 +++--
reportdesign/source/ui/report/ViewsWindow.cxx | 13 ++++
sc/source/core/data/colorscale.cxx | 5 +
sc/source/core/data/dociter.cxx | 30 +++++------
sd/source/filter/eppt/epptso.cxx | 2
sd/source/ui/presenter/PresenterHelper.cxx | 28 ++++------
svx/source/core/extedit.cxx | 9 ++-
vcl/source/control/lstbox.cxx | 4 +
vcl/source/filter/ixpm/xpmread.cxx | 42 ++++++++-------
vcl/source/gdi/impimage.cxx | 2
vcl/source/window/brdwin.cxx | 5 +
18 files changed, 164 insertions(+), 71 deletions(-)
New commits:
commit ba17f5a34480f76942414eab79e297ae5fad59b7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 13:00:26 2014 +0100
coverity#708209 Uninitialized scalar field
Change-Id: Ic24e147dd631bbed4e5759b1bd4bebbd0b8add4a
diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx
index 72fd678..04b3141 100644
--- a/include/tools/inetmime.hxx
+++ b/include/tools/inetmime.hxx
@@ -978,6 +978,7 @@ inline INetMIMEEncodedWordOutputSink::INetMIMEEncodedWordOutputSink(
m_nExtraSpaces(0),
m_pEncodingList(INetMIME::createPreferredCharsetList(ePreferredEncoding)),
m_ePrevCoding(CODING_NONE),
+ m_ePrevMIMEEncoding(RTL_TEXTENCODING_DONTKNOW),
m_eCoding(CODING_NONE),
m_nQuotedEscaped(0),
m_eEncodedWordState(STATE_INITIAL)
commit 67e2de7d6c4340be605f6770b2e0b732d41dbeac
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:57:40 2014 +0100
coverity#707967 Uninitialized scalar field
Change-Id: I65aa00d79efe15f63c272fbcd5d3e0dea2c28dfc
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index c8922a7..2186b7e 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -616,6 +616,8 @@ struct OReportDefinitionImpl
,m_aDocEventListeners(_aMutex)
,m_sMimeType(_aCopy.m_sMimeType)
,m_sIdentifier(_aCopy.m_sIdentifier)
+ ,m_aVisualAreaSize(_aCopy.m_aVisualAreaSize)
+ ,m_nAspect(_aCopy.m_nAspect)
,m_nGroupKeepTogether(_aCopy.m_nGroupKeepTogether)
,m_nPageHeaderOption(_aCopy.m_nPageHeaderOption)
,m_nPageFooterOption(_aCopy.m_nPageFooterOption)
@@ -623,6 +625,7 @@ struct OReportDefinitionImpl
,m_bControllersLocked(_aCopy.m_bControllersLocked)
,m_bModified(_aCopy.m_bModified)
,m_bEscapeProcessing(_aCopy.m_bEscapeProcessing)
+ ,m_bSetModifiedEnabled(_aCopy.m_bSetModifiedEnabled)
{}
~OReportDefinitionImpl();
};
commit f6dd2b47f42917a185296969bca03c63b0b9e95b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:53:26 2014 +0100
coverity#707969 unused nMasterPageNameIndex
Change-Id: I1a91871eb9f1952625b94b15d9ab8a4712487048
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index c3222da..e71d5f2 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -89,7 +89,6 @@ namespace rptxml
const OUString m_sCellStyleFamilyName;
ORptFilter& m_rImport;
sal_Int32 m_nNumberFormatIndex;
- sal_Int32 nMasterPageNameIndex;
sal_Bool bAutoStyles : 1;
//mutable UniReference < SvXMLImportPropertyMapper > m_xControlImpPropMapper;
commit eac97e7925a7e7dc47c9860fecf47fa4ff498b41
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:52:27 2014 +0100
coverity#707970 Uninitialized scalar field
Change-Id: I70cc8c7667d9cfb2fc043e3889c7fb5adc9abd52
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 325b3a7..6d5838b 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -225,13 +225,15 @@ OUString GeometryHandler::impl_convertToFormula( const uno::Any& _rControlValue
aParser = ReportFormula( impl_isDataField(sName) ? ReportFormula::Field : ReportFormula::Expression, sName );
return aParser.getCompleteFormula();
}
-GeometryHandler::GeometryHandler(uno::Reference< uno::XComponentContext > const & context) :
- GeometryHandler_Base(m_aMutex)
- ,m_aPropertyListeners( m_aMutex )
- ,m_xContext(context)
- ,m_pInfoService(new OPropertyInfoService())
- ,m_nDataFieldType(0)
- ,m_bIn(false)
+
+GeometryHandler::GeometryHandler(uno::Reference< uno::XComponentContext > const & context)
+ : GeometryHandler_Base(m_aMutex)
+ , m_aPropertyListeners(m_aMutex)
+ , m_xContext(context)
+ , m_pInfoService(new OPropertyInfoService())
+ , m_nDataFieldType(0)
+ , m_bNewFunction(false)
+ , m_bIn(false)
{
try
{
commit 4ab06a576313de973ae96787a19215b208737859
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:38:36 2014 +0100
coverity#707971 Uninitialized scalar field
Change-Id: I5c1045253c082a00397cf0f048baee947232c9b1
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 19cf7ab..5f03f88 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -956,8 +956,17 @@ namespace
sal_Bool m_bCopy;
public:
- ApplySectionViewAction( sal_Bool _bCopy ) : m_eAction( eEndDragObj ), m_bCopy( _bCopy ) { }
- ApplySectionViewAction(SectionViewAction _eAction = eEndAction ) : m_eAction( _eAction ) { }
+ ApplySectionViewAction(sal_Bool _bCopy)
+ : m_eAction(eEndDragObj)
+ , m_bCopy(_bCopy)
+ {
+ }
+
+ ApplySectionViewAction(SectionViewAction _eAction = eEndAction)
+ : m_eAction(_eAction)
+ , m_bCopy(false)
+ {
+ }
void operator() ( const OViewsWindow::TSectionsMap::value_type& _rhs )
{
commit bd3015129a57cbd88ebdb18a9606e60966453a53
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:35:16 2014 +0100
coverity#738868 Uninitialized pointer field
Change-Id: I150b47a6d4463479af7206b15441fefb27b8f603
diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx
index 853ae77..24e93f9 100644
--- a/svx/source/core/extedit.cxx
+++ b/svx/source/core/extedit.cxx
@@ -32,10 +32,13 @@ using namespace css::uno;
using namespace css::system;
ExternalToolEdit::ExternalToolEdit()
-{}
+ : m_pGraphicObject(NULL)
+{
+}
ExternalToolEdit::~ExternalToolEdit()
-{}
+{
+}
void ExternalToolEdit::HandleCloseEvent(ExternalToolEdit* pData)
{
@@ -116,3 +119,5 @@ void ExternalToolEdit::Edit( GraphicObject* pGraphicObject )
// Create the data that is needed by the thread later
osl_createThread(ExternalToolEdit::threadWorker, this);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 6f3545833e4bf88a68995eab53356b3c7dd9bf53
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:33:24 2014 +0100
coverity#738789 Uninitialized pointer field
Change-Id: I990e8ba0e2b8ad2a43a33343ac832e42777e28cb
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 70b2c83..060ac3b 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -114,16 +114,22 @@ void ScAttrArray_IterGetNumberFormat( sal_uLong& nFormat, const ScAttrArray*& rp
}
ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
- bool bSTotal, bool bTextZero ) :
- pDoc( pDocument ),
- nNumFmtIndex(0),
- maStartPos(rRange.aStart),
- maEndPos(rRange.aEnd),
- nNumFmtType( NUMBERFORMAT_UNDEFINED ),
- bNumValid( false ),
- bSubTotal(bSTotal),
- bCalcAsShown( pDocument->GetDocOptions().IsCalcAsShown() ),
- bTextAsZero( bTextZero )
+ bool bSTotal, bool bTextZero )
+ : pDoc(pDocument)
+ , pAttrArray(NULL)
+ , nNumFormat(0) // Initialized in GetNumberFormat
+ , nNumFmtIndex(0)
+ , maStartPos(rRange.aStart)
+ , maEndPos(rRange.aEnd)
+ , mnCol(0)
+ , mnTab(0)
+ , nAttrEndRow(0)
+ , nNumFmtType(NUMBERFORMAT_UNDEFINED)
+ , bNumValid(false)
+ , bSubTotal(bSTotal)
+ , bCalcAsShown(pDocument->GetDocOptions().IsCalcAsShown())
+ , bTextAsZero(bTextZero)
+ , mpCells(NULL)
{
SCTAB nDocMaxTab = pDocument->GetTableCount() - 1;
@@ -133,10 +139,6 @@ ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
if (!ValidRow(maEndPos.Row())) maEndPos.SetRow(MAXROW);
if (!ValidTab(maStartPos.Tab()) || maStartPos.Tab() > nDocMaxTab) maStartPos.SetTab(nDocMaxTab);
if (!ValidTab(maEndPos.Tab()) || maEndPos.Tab() > nDocMaxTab) maEndPos.SetTab(nDocMaxTab);
-
- nNumFormat = 0; // Initialized in GetNumberFormat
- pAttrArray = 0;
- nAttrEndRow = 0;
}
SCROW ScValueIterator::GetRow() const
commit 45ce21ac5ab41e49df0a8482d3cd98c61b8b326c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:29:23 2014 +0100
coverity#738787 Uninitialized pointer field
Change-Id: Ic2f968d3150bba458dc3f40799ef0933a423a9e0
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index a366b09..4588550 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -290,8 +290,9 @@ void ScColorScaleEntry::SetColor(const Color& rColor)
maColor = rColor;
}
-ScColorFormat::ScColorFormat(ScDocument* pDoc):
- ScFormatEntry(pDoc)
+ScColorFormat::ScColorFormat(ScDocument* pDoc)
+ : ScFormatEntry(pDoc)
+ , mpParent(NULL)
{
}
commit b75204cd33901bd18e9000ee63a225283a6207a0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:27:38 2014 +0100
coverity#708642 Uninitialized pointer field
Change-Id: I30b61ed5b383f4acb5d29cb1c898015b28b1431c
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 4ec9579..84794f4 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1008,13 +1008,16 @@ void ImplNoBorderWindowView::DrawWindow( sal_uInt16, OutputDevice*, const Point*
}
// - ImplSmallBorderWindowView -
-
ImplSmallBorderWindowView::ImplSmallBorderWindowView( ImplBorderWindow* pBorderWindow )
: mpBorderWindow(pBorderWindow)
+ , mpOutDev(NULL)
+ , mnWidth(0)
+ , mnHeight(0)
, mnLeftBorder(0)
, mnTopBorder(0)
, mnRightBorder(0)
, mnBottomBorder(0)
+ , mbNWFBorder(false)
{
}
commit dc1277767d507dde91a1c7999ebdc26caaa922a3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:23:44 2014 +0100
coverity#708600 Uninitialized pointer field
Change-Id: I50da1da601981d55f413e03b063cda60b10893e6
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 0e1fd7e..2d054ab7 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -119,6 +119,8 @@ bool ImplImageData::IsEqual( const ImplImageData& rData )
ImplImage::ImplImage()
: mnRefCount(1)
+ , mpData(NULL)
+ , meType(IMAGETYPE_BITMAP)
{
}
commit 99007fdb8e70ee6c2f05cf60808c3e6aa76311a2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:21:50 2014 +0100
coverity#708589 Uninitialized pointer field
Change-Id: Ifc584276b32e517cb3105133de731e068851254b
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index c978fe4..a166de6 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -42,7 +42,9 @@ void ListBox::EnableQuickSelection( const bool& b )
mpImplLB->GetMainWindow()->EnableQuickSelection(b);
}
-ListBox::ListBox( WindowType nType ) : Control( nType )
+ListBox::ListBox(WindowType nType)
+ : Control(nType)
+ , mpImplLB(NULL)
{
ImplInitListBoxData();
}
commit 617faefab11b2565b95fcff9133ebf7b01bc49f1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:18:49 2014 +0100
coverity#708314 Uninitialized pointer field
Change-Id: Ifdd607c8bb1859af907ba2d6bbe6e9824681bc57
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index e3f48ec..04bc866 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -23,25 +23,31 @@
#define _XPMPRIVATE
#include "xpmread.hxx"
-XPMReader::XPMReader( SvStream& rStm ) :
- mrIStm ( rStm ),
- mpAcc ( NULL ),
- mpMaskAcc ( NULL ),
- mnLastPos ( rStm.Tell() ),
- mnWidth ( 0 ),
- mnHeight ( 0 ),
- mnColors ( 0 ),
- mnCpp ( 0 ),
- mbTransparent ( false ),
- mbStatus ( true ),
- mnStatus ( 0 ),
- mnIdentifier ( XPMIDENTIFIER ),
- mcThisByte ( 0 ),
- mnTempAvail ( 0 ),
- mpFastColorTable( NULL ),
- mpColMap ( NULL )
+XPMReader::XPMReader(SvStream& rStm)
+ : mrIStm(rStm)
+ , mpAcc(NULL)
+ , mpMaskAcc(NULL)
+ , mnLastPos(rStm.Tell())
+ , mnWidth(0)
+ , mnHeight(0)
+ , mnColors(0)
+ , mnCpp(0)
+ , mbTransparent(false)
+ , mbStatus(true)
+ , mnStatus( 0 )
+ , mnIdentifier(XPMIDENTIFIER)
+ , mcThisByte(0)
+ , mcLastByte(0)
+ , mnTempAvail(0)
+ , mpTempBuf(NULL)
+ , mpTempPtr(NULL)
+ , mpFastColorTable(NULL)
+ , mpColMap(NULL)
+ , mnStringSize(0)
+ , mpStringBuf(NULL)
+ , mnParaSize(0)
+ , mpPara(NULL)
{
-
}
XPMReader::~XPMReader()
commit f95f708548343d7589474b723a69508223f6da4c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 12:11:32 2014 +0100
coverity#707833 Uninitialized pointer field
Change-Id: I355ada53d637ad16d88c7e8d8b0f333915f54b6e
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index c15465f..c274468 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -123,7 +123,54 @@ private:
bool HasAlphaChannel() const;
public:
- TIFFReader() : pAlphaMask(0), pMaskAcc(0) {}
+ TIFFReader()
+ : bStatus(false)
+ , nLastPercent(0)
+ , pTIFF(NULL)
+ , pAcc(NULL)
+ , nDstBitsPerPixel(0)
+ , pAlphaMask(NULL)
+ , pMaskAcc(NULL)
+ , nOrigPos(0)
+ , nOrigNumberFormat(0)
+ , nDataType(0)
+ , bByteSwap(false)
+ , nNewSubFile(0)
+ , nSubFile(0)
+ , nImageWidth(0)
+ , nImageLength(0)
+ , nBitsPerSample(1)
+ , nCompression(1)
+ , nPhotometricInterpretation(0)
+ , nThresholding(1)
+ , nCellWidth(1)
+ , nCellLength(1)
+ , nFillOrder(1)
+ , pStripOffsets(NULL)
+ , nNumStripOffsets(0)
+ , nOrientation(1)
+ , nSamplesPerPixel(1)
+ , nRowsPerStrip(0xffffffff)
+ , pStripByteCounts(NULL)
+ , nNumStripByteCounts(0)
+ , nMinSampleValue(0)
+ , nMaxSampleValue(0)
+ , fXResolution(0.0)
+ , fYResolution(0.0)
+ , nPlanarConfiguration(1)
+ , nGroup3Options(0)
+ , nGroup4Options(0)
+ , nResolutionUnit(2)
+ , nPredictor(0)
+ , pColorMap(NULL)
+ , nNumColors(0)
+ , nPlanes(0)
+ , nStripsPerPlane(0)
+ , nBytesPerRow(0)
+ {
+ pMap[ 0 ] = pMap[ 1 ] = pMap[ 2 ] = pMap[ 3 ] = NULL;
+ }
+
~TIFFReader()
{
delete pAlphaMask;
commit 8e45fbd60e8c7e17503a12dcdd13f2aeeb243d25
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 11:59:27 2014 +0100
coverity#707828 Uninitialized pointer field
Change-Id: If4635aa5adc5d82712a779ae487b0a27539c2d70
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 27cf0bf..0730d4f 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -242,7 +242,17 @@ private:
static rtl_TextEncoding GetTextEncoding (sal_uInt16 fId = 0xFFFF);
public:
- PictReader() { aActFont.SetCharSet(GetTextEncoding()); }
+ PictReader()
+ : pPict(NULL)
+ , pVirDev(NULL)
+ , nOrigPos(0)
+ , nOrigNumberFormat(0)
+ , IsVersion2(false)
+ , eActROP(ROP_OVERPAINT)
+ , eActMethod(PDM_UNDEFINED)
+ {
+ aActFont.SetCharSet(GetTextEncoding());
+ }
void ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile );
// reads a pict file from the stream and fills the GDIMetaFile
commit b89e9fa401fbfebc874e305122c6946662ba5800
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 11:52:46 2014 +0100
coverity#705866 Dereference before null check
Change-Id: I3f70fda1098c2da97f36e474689853379e5b9ac2
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index 8bcc7ec..e186ac9 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -132,23 +132,19 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
pParentWindow->EnableChildTransparentMode(true);
}
- if (pWindow != NULL)
- {
- pWindow->Show(bInitiallyVisible);
-
- pWindow->SetMapMode(MAP_PIXEL);
- pWindow->SetBackground();
- if ( ! bEnableParentClip)
- {
- pWindow->SetParentClipMode(PARENTCLIPMODE_NOCLIP);
- pWindow->SetPaintTransparent(true);
- }
- else
- {
- pWindow->SetParentClipMode(PARENTCLIPMODE_CLIP);
- pWindow->SetPaintTransparent(false);
- }
+ pWindow->Show(bInitiallyVisible);
+ pWindow->SetMapMode(MAP_PIXEL);
+ pWindow->SetBackground();
+ if ( ! bEnableParentClip)
+ {
+ pWindow->SetParentClipMode(PARENTCLIPMODE_NOCLIP);
+ pWindow->SetPaintTransparent(true);
+ }
+ else
+ {
+ pWindow->SetParentClipMode(PARENTCLIPMODE_CLIP);
+ pWindow->SetPaintTransparent(false);
}
return xWindow;
commit a7ff16ada6ac8998863a0a9708bc1a89b38bfd82
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 11:50:33 2014 +0100
coverity#705854 Dereference before null check
Change-Id: I8bdedf38a29587bb504ccf310371dea756efd47d
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index d36590a..cb84f6f 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -693,7 +693,7 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj )
}
else
{
- if ( !pPara->mbFixedLineSpacing && pPortion && pPortion->mnCharHeight > (sal_uInt16)( ((double)-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point
+ if ( !pPara->mbFixedLineSpacing && pPortion->mnCharHeight > (sal_uInt16)( ((double)-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point
nLineSpacing = nNormalSpacing;
else
nLineSpacing = (sal_Int16)( (double)nLineSpacing / 4.40972 );
commit d69b30a84d8622a1bb93cb38cdb4d458c4d6a965
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 10:48:13 2014 +0100
coverity#1019376 Resource leak
Change-Id: Ifa9c5a7b3aa0d219e09fa3081e66d870a508a84d
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index 471ac95..02600cd 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -51,6 +51,8 @@
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/weakref.hxx>
+#include <osl/module.hxx>
+
// In Python 3, the PyString_* functions have been replaced by PyBytes_*
// and PyUnicode_* functions.
#if PY_MAJOR_VERSION >= 3
@@ -276,6 +278,7 @@ struct RuntimeCargo
com::sun::star::uno::Reference< com::sun::star::script::XInvocationAdapterFactory2 > xAdapterFactory;
com::sun::star::uno::Reference< com::sun::star::beans::XIntrospection > xIntrospection;
PyRef dictUnoModule;
+ osl::Module testModule;
bool valid;
ExceptionClassMap exceptionMap;
ClassSet interfaceSet;
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index 47b57aa..27986e5 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -346,11 +346,13 @@ static PyObject* initPoniesMode(
.replaceAll(OString('/'), OString('\\'))
#endif
;
- oslModule const mod( osl_loadModuleAscii(libname.getStr(),
- SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL) );
- if (!mod) { abort(); }
+
+ osl::Module &mod = runtime.getImpl()->cargo->testModule;
+ mod.load(OStringToOUString(libname, osl_getThreadTextEncoding()),
+ SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL);
+ if (!mod.is()) { abort(); }
oslGenericFunction const pFunc(
- osl_getAsciiFunctionSymbol(mod, "test_init"));
+ mod.getFunctionSymbol("test_init"));
if (!pFunc) { abort(); }
// guess casting pFunc is undefined behavior but don't see a better way
((void (SAL_CALL *)(XMultiServiceFactory*)) pFunc) (xMSF.get());
More information about the Libreoffice-commits
mailing list