[Libreoffice-commits] core.git: 6 commits - dbaccess/source desktop/source extensions/source sal/osl sw/inc sw/source vcl/generic
Caolán McNamara
caolanm at redhat.com
Sat Jul 19 13:26:34 PDT 2014
dbaccess/source/ui/misc/WColumnSelect.cxx | 4
desktop/source/deployment/registry/package/dp_package.cxx | 36 +-
extensions/source/plugin/base/xplugin.cxx | 6
sal/osl/unx/socket.c | 2
sw/inc/swrect.hxx | 4
sw/source/core/bastyp/swrect.cxx | 12
sw/source/core/text/txtio.cxx | 228 +++++++-------
vcl/generic/fontmanager/helper.cxx | 2
8 files changed, 167 insertions(+), 127 deletions(-)
New commits:
commit b51883f0216e73906aa9ea9809abc58bfcf11519
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jul 19 21:25:25 2014 +0100
migt->might
Change-Id: I44f47ffd52b69208766242b8fc4faa2a4d32155f
diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx
index 6b59aef..0e4bc89 100644
--- a/vcl/generic/fontmanager/helper.cxx
+++ b/vcl/generic/fontmanager/helper.cxx
@@ -262,7 +262,7 @@ bool psp::convertPfbToPfa( ::osl::File& rInFile, ::osl::File& rOutFile )
unsigned int nBytesToRead = buffer[2] | buffer[3] << 8 | buffer[4] << 16 | buffer[5] << 24;
if( buffer[0] != 0x80 ) // test for pfb magic number
{
- // this migt be a pfa font already
+ // this might be a pfa font already
if( ! rInFile.read( buffer+6, 9, nRead ) && nRead == 9 &&
( ! std::strncmp( (char*)buffer, "%!FontType1-", 12 ) ||
! std::strncmp( (char*)buffer, "%!PS-AdobeFont-", 15 ) ) )
commit bc9c7e4217529aae71438906f080146ec92fc5d5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jul 19 21:10:46 2014 +0100
fix debug=t build
Change-Id: Ibc81d1677e9eb297797c7fa9e7c77c9437f65b15
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index c2bc81b..b90d4cd 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -101,6 +101,10 @@ public:
//SV-SS e.g. pWin->DrawRect( aSwRect.SVRect() );
inline Rectangle SVRect() const;
+ // Output operator for debugging.
+ friend SvStream& WriteSwRect( SvStream &rStream, const SwRect &rRect );
+
+
void _Top( const long nTop );
void _Bottom( const long nBottom );
void _Left( const long nLeft );
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index c910810..fa3bfcd 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -223,4 +223,16 @@ void SwRect::SetUpperRightCorner( const Point& rNew )
void SwRect::SetLowerLeftCorner( const Point& rNew )
{ m_Point = Point(rNew.A(), rNew.B() - m_Size.getHeight()); }
+#ifdef DBG_UTIL
+SvStream& WriteSwRect(SvStream &rStream, const SwRect &rRect)
+{
+ rStream.WriteChar('[').WriteInt32(rRect.Top()).
+ WriteChar('/').WriteInt32(rRect.Left()).
+ WriteChar(',').WriteInt32(rRect.Width()).
+ WriteChar('x').WriteInt32(rRect.Height()).
+ WriteCharPtr("] ");
+ return rStream;
+}
+#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx
index 1fdb8c8..e1f503e 100644
--- a/sw/source/core/text/txtio.cxx
+++ b/sw/source/core/text/txtio.cxx
@@ -171,433 +171,435 @@ CONSTCHAR( pPREP_PAGE, "PAGE" );
SvStream &SwLinePortion::operator<<( SvStream &rOs ) const //$ ostream
{
- rOs << " {";
- rOs << "L:" << nLineLength;
- rOs << " H:" << Height();
- rOs << " W:" << PrtWidth();
- rOs << " A:" << nAscent;
- rOs << pClose;
+ rOs.WriteCharPtr(" {");
+ rOs.WriteCharPtr("L:").WriteInt32(nLineLength);
+ rOs.WriteCharPtr(" H:").WriteUInt16(Height());
+ rOs.WriteCharPtr(" W:").WriteUInt16(PrtWidth());
+ rOs.WriteCharPtr(" A:").WriteUInt32(nAscent);
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwTxtPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {TXT:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwTmpEndPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {END:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
if( PrtWidth() )
- rOs << "(view)";
- rOs << pClose;
+ rOs.WriteCharPtr("(view)");
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwBreakPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {BREAK:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwKernPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {KERN:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwArrowPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {ARROW:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwMultiPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {MULTI:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwCombinedPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {COMBINED:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwLineLayout::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {LINE:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
SwLinePortion *pPos = GetPortion();
while( pPos )
{
- rOs << "\t";
+ rOs.WriteCharPtr("\t");
pPos->operator<<( rOs );
pPos = pPos->GetPortion();
}
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwGluePortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {GLUE:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << " F:" << GetFixWidth();
- rOs << " G:" << GetPrtGlue();
- rOs << pClose;
+ rOs.WriteCharPtr(" F:").WriteUInt16(GetFixWidth());
+ rOs.WriteCharPtr(" G:").WriteInt16(GetPrtGlue());
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwFixPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {FIX:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwGluePortion::operator<<( rOs );
- rOs << " Fix:" << nFix;
- rOs << pClose;
+ rOs.WriteCharPtr(" Fix:").WriteUInt16(nFix);
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwFlyPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {FLY:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwFixPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwMarginPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {MAR:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwGluePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwFlyCntPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {FLYCNT:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
if( bDraw )
{
CONSTCHAR( pTxt2, " {DRAWINCNT" );
- rOs << pTxt2;
- rOs << pClose;
+ rOs.WriteCharPtr(pTxt2);
+ rOs.WriteCharPtr(pClose);
}
else
{
CONSTCHAR( pTxt2, " {FRM:" );
- rOs << pTxt2;
- rOs << " {FRM:" << GetFlyFrm()->Frm() << pClose;
- rOs << " {PRT:" << GetFlyFrm()->Prt() << pClose;
- rOs << pClose;
+ rOs.WriteCharPtr(pTxt2);
+ rOs.WriteCharPtr(" {FRM:");
+ WriteSwRect(rOs, GetFlyFrm()->Frm()).WriteCharPtr(pClose);
+ rOs.WriteCharPtr(" {PRT:");
+ WriteSwRect(rOs, GetFlyFrm()->Prt()).WriteCharPtr(pClose);
+ rOs.WriteCharPtr(pClose);
}
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwExpandPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {EXP:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwFtnPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {FTN:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwExpandPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwFtnNumPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {FTNNUM:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwNumberPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwNumberPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {NUMBER:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwExpandPortion::operator<<( rOs );
- rOs << " Exp:\"" << '\"';
- rOs << pClose;
+ rOs.WriteCharPtr(" Exp:\"").WriteChar('\"');
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwBulletPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {BULLET:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwNumberPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwGrfNumPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {GRFNUM:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwNumberPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwHiddenPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {Hidden:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwFldPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwToxPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {TOX:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwTxtPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwRefPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {Ref:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwTxtPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwIsoToxPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {ISOTOX:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwToxPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwIsoRefPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {ISOREF:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwRefPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwHyphPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {HYPH:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwExpandPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwHyphStrPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {HYPHSTR:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwExpandPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwSoftHyphPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {SOFTHYPH:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwHyphPortion::operator<<( rOs );
- rOs << (IsExpand() ? " on" : " off");
- rOs << pClose;
+ rOs.WriteCharPtr(IsExpand() ? " on" : " off");
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwSoftHyphStrPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {SOFTHYPHSTR:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwHyphStrPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwBlankPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {BLANK:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwExpandPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwFldPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {FLD:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
if( IsFollow() )
- rOs << " F!";
- rOs << pClose;
+ rOs.WriteCharPtr(" F!");
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwPostItsPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {POSTITS" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwTabPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {TAB" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwFixPortion::operator<<( rOs );
- rOs << " T:" << nTabPos;
+ rOs.WriteCharPtr(" T:").WriteUInt16(nTabPos);
if( IsFilled() )
- rOs << " \"" << cFill << '\"';
- rOs << pClose;
+ rOs.WriteCharPtr(" \"").WriteChar(cFill).WriteChar('\"');
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwTabLeftPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {TABLEFT" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwTabPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwTabRightPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {TABRIGHT" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwTabPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwTabCenterPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {TABCENTER" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwTabPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwTabDecimalPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {TABDECIMAL" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwTabPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwParaPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {PAR" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLineLayout::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwHolePortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {HOLE" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwLinePortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwQuoVadisPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {QUOVADIS" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwFldPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwErgoSumPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {ERGOSUM" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwFldPortion::operator<<( rOs );
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &operator<<( SvStream &rOs, const SwTxtSizeInfo &rInf ) //$ ostream
{
CONSTCHAR( pTxt, " {SIZEINFO:" );
- rOs << pTxt;
- rOs << ' ' << (rInf.OnWin() ? "WIN:" : "PRT:" );
- rOs << " Idx:" << rInf.GetIdx();
- rOs << " Len:" << rInf.GetLen();
- rOs << pClose;
+ rOs.WriteCharPtr(pTxt);
+ rOs.WriteChar(' ').WriteCharPtr(rInf.OnWin() ? "WIN:" : "PRT:");
+ rOs.WriteCharPtr(" Idx:").WriteInt32(rInf.GetIdx());
+ rOs.WriteCharPtr(" Len:").WriteInt32(rInf.GetLen());
+ rOs.WriteCharPtr(pClose);
return rOs;
}
SvStream &SwDropPortion::operator<<( SvStream &rOs ) const //$ ostream
{
CONSTCHAR( pTxt, " {DROP:" );
- rOs << pTxt;
+ rOs.WriteCharPtr(pTxt);
SwTxtPortion::operator<<( rOs );
if( pPart && nDropHeight )
{
- rOs << " H:" << nDropHeight;
- rOs << " L:" << nLines;
- rOs << " Fnt:" << static_cast<sal_Int32>(pPart->GetFont().GetHeight());
+ rOs.WriteCharPtr(" H:").WriteUInt16(nDropHeight);
+ rOs.WriteCharPtr(" L:").WriteUInt16(nLines);
+ rOs.WriteCharPtr(" Fnt:").WriteInt32(pPart->GetFont().GetHeight());
if( nX || nY )
- rOs << " [" << nX << '/' << nY << ']';
+ rOs.WriteCharPtr(" [").WriteInt16(nX).WriteChar('/').WriteInt16(nY).WriteChar(']');
}
- rOs << pClose;
+ rOs.WriteCharPtr(pClose);
return rOs;
}
commit c3beba871b50c058d6eba74b1e3f605f5507016d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jul 18 20:53:23 2014 +0100
coverity#706501 Uncaught exception
Change-Id: I435d189e6194d8d255ec88c4edad73d19a9bb5be
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 636b81a..b8501b7 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1188,20 +1188,34 @@ void BackendImpl::PackageImpl::exportTo(
}
else
{
- // overwrite manifest.xml:
- ::ucbhelper::Content manifestContent;
- if ( ! create_ucb_content(
- &manifestContent,
- makeURL( m_url_expanded, "META-INF/manifest.xml" ),
- xCmdEnv, false ) )
+ bool bSuccess = false;
+ try
+ {
+ // overwrite manifest.xml:
+ ::ucbhelper::Content manifestContent;
+ if ( ! create_ucb_content(
+ &manifestContent,
+ makeURL( m_url_expanded, "META-INF/manifest.xml" ),
+ xCmdEnv, false ) )
+ {
+ OSL_FAIL( "### missing META-INF/manifest.xml file!" );
+ return;
+ }
+
+ if (metainfFolderContent.transferContent(
+ manifestContent, ::ucbhelper::InsertOperation_COPY,
+ OUString(), ucb::NameClash::OVERWRITE ))
+ {
+ bSuccess = true;
+ }
+ }
+ catch (const css::ucb::ContentCreationException &e)
{
- OSL_FAIL( "### missing META-INF/manifest.xml file!" );
- return;
+ SAL_WARN(
+ "desktop.deployment", "exception on overwriting manifest: " << e.Message);
}
- if (! metainfFolderContent.transferContent(
- manifestContent, ::ucbhelper::InsertOperation_COPY,
- OUString(), ucb::NameClash::OVERWRITE ))
+ if (!bSuccess)
throw RuntimeException( "UCB transferContent() failed!",
static_cast<OWeakObject *>(this) );
}
commit 6d28e240f0f3400fa2729afa3cae54da61f5a34c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jul 18 20:45:57 2014 +0100
coverity#982457 Explicit null dereferenced
Change-Id: Ia5229858cdb2c6d8088ed6684186e5cfc1fe4213
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 6b3ea7b..f2e4427 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -540,11 +540,17 @@ void XPlugin_Impl::loadPlugin()
sv[0],
sv[1]
);
+
+ SAL_WARN_IF( !pComm, "extensions.plugin", "no PluginComm");
+ if (!pComm)
+ return;
+
#elif defined WNT
PluginComm* pComm = new PluginComm_Impl( m_aDescription.Mimetype,
m_aDescription.PluginName,
(HWND)pEnvData->hWnd );
#endif
+
setPluginComm( pComm );
}
else
commit 0fc353a98fb3864f6a52d7bbdcd9dc801f4f8e8a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jul 18 20:41:47 2014 +0100
coverity#704665 Explicit null dereferenced
Change-Id: I45aa7a75b0780f6dd2fb3a5501b9541e7887a0d8
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 618bd7a..000e2e0 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -655,7 +655,7 @@ oslSocketAddr SAL_CALL osl_createInetSocketAddr (
pszDottedAddr = rtl_string_getStr(strDottedAddr);
}
- Addr = osl_psz_createInetSocketAddr(pszDottedAddr, Port);
+ Addr = pszDottedAddr ? osl_psz_createInetSocketAddr(pszDottedAddr, Port) : 0;
if ( strDottedAddr != 0 )
{
commit 83291976786c9bdf2839c902999d6d4090a5165f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jul 18 20:39:32 2014 +0100
coverity#704620 Explicit null dereferenced
and
coverity#704621 Explicit null dereferenced
Change-Id: I06e335da746b02b16f7e5bd947d6eeff0c81b815
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index fab9f5e..87f9928 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -197,7 +197,9 @@ IMPL_LINK( OWizColumnSelect, ButtonClickHdl, Button *, pButton )
pRight = m_pOrgColumnNames;
bAll = true;
}
- // else ????
+
+ if (!pLeft || !pRight)
+ return 0;
Reference< XDatabaseMetaData > xMetaData( m_pParent->m_xDestConnection->getMetaData() );
OUString sExtraChars = xMetaData->getExtraNameCharacters();
More information about the Libreoffice-commits
mailing list