[Libreoffice-commits] core.git: 3 commits - include/basegfx lotuswordpro/source oox/source reportdesign/source svl/source svx/source sw/source unoidl/source unotools/source vcl/source vcl/unx xmloff/source
Caolán McNamara
caolanm at redhat.com
Fri Jun 27 00:56:32 PDT 2014
include/basegfx/raster/bpixelraster.hxx | 4 -
lotuswordpro/source/filter/lwpparastyle.cxx | 2
lotuswordpro/source/filter/xfilter/xfdrawline.cxx | 2
lotuswordpro/source/filter/xfilter/xfdrawobj.cxx | 2
lotuswordpro/source/filter/xfilter/xfframe.cxx | 2
lotuswordpro/source/filter/xfilter/xfimage.cxx | 2
oox/source/export/chartexport.cxx | 2
reportdesign/source/core/api/Section.cxx | 2
svl/source/items/itemset.cxx | 6 --
svx/source/svdraw/svdpntv.cxx | 2
sw/source/core/docnode/ndtbl.cxx | 4 -
sw/source/core/text/itratr.cxx | 4 -
unoidl/source/sourceprovider-parser.y | 20 ++++----
unoidl/source/unoidl-check.cxx | 4 -
unoidl/source/unoidl-read.cxx | 4 -
unotools/source/ucbhelper/ucbhelper.cxx | 20 ++++----
vcl/source/app/svapp.cxx | 2
vcl/source/fontsubset/cff.cxx | 2
vcl/source/gdi/bmpfast.cxx | 2
vcl/source/window/dialog.cxx | 2
vcl/unx/generic/gdi/salgdi2.cxx | 50 ++++++++++++----------
vcl/unx/gtk/a11y/atklistener.cxx | 2
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 2
xmloff/source/text/txtparae.cxx | 3 -
24 files changed, 74 insertions(+), 73 deletions(-)
New commits:
commit 986c0451d05e7bb6ff7edd9f27d0e45532bcd22c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 26 21:06:35 2014 +0100
Resolves: fdo#80160 PNG with 1-bit colormap only show black and white
Change-Id: If0c9950c18e6091fafea47954a4654db436a3a44
diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
index ef76996..be722c5 100644
--- a/vcl/unx/generic/gdi/salgdi2.cxx
+++ b/vcl/unx/generic/gdi/salgdi2.cxx
@@ -440,6 +440,32 @@ void X11SalGraphics::copyArea ( long nDestX, long nDestY,
copyBits ( aPosAry, 0 );
}
+namespace
+{
+ void setForeBack(XGCValues& rValues, const SalColormap& rColMap, const SalBitmap& rSalBitmap)
+ {
+ rValues.foreground = rColMap.GetWhitePixel();
+ rValues.background = rColMap.GetBlackPixel();
+
+ //fdo#33455 and fdo#80160 handle 1 bit depth pngs with palette entries
+ //to set fore/back colors
+ SalBitmap& rBitmap = const_cast<SalBitmap&>(rSalBitmap);
+ if (const BitmapBuffer* pBitmapBuffer = rBitmap.AcquireBuffer(true))
+ {
+ const BitmapPalette& rPalette = pBitmapBuffer->maPalette;
+ if (rPalette.GetEntryCount() == 2)
+ {
+ const BitmapColor aWhite(rPalette[rPalette.GetBestIndex(Color(COL_WHITE))]);
+ rValues.foreground = rColMap.GetPixel(ImplColorToSal(aWhite));
+
+ const BitmapColor aBlack(rPalette[rPalette.GetBestIndex(Color(COL_BLACK))]);
+ rValues.background = rColMap.GetPixel(ImplColorToSal(aBlack));
+ }
+ rBitmap.ReleaseBuffer(pBitmapBuffer, true);
+ }
+ }
+}
+
void X11SalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
{
const SalDisplay* pSalDisp = GetDisplay();
@@ -455,24 +481,7 @@ void X11SalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSa
{
// set foreground/background values for 1Bit bitmaps
XGetGCValues( pXDisp, aGC, nValues, &aOldVal );
-
- aNewVal.foreground = rColMap.GetWhitePixel();
- aNewVal.background = rColMap.GetBlackPixel();
-
- //fdo#33455 handle 1 bit depth pngs with palette entries
- //to set fore/back colors
- if (const BitmapBuffer* pBitmapBuffer = const_cast<SalBitmap&>(rSalBitmap).AcquireBuffer(true))
- {
- const BitmapPalette& rPalette = pBitmapBuffer->maPalette;
- if (rPalette.GetEntryCount() == 2)
- {
- const BitmapColor aBlack( rPalette[rPalette.GetBestIndex( Color( COL_BLACK ) )] );
- const BitmapColor aWhite( rPalette[rPalette.GetBestIndex( Color( COL_WHITE ) )] );
- aNewVal.foreground = rColMap.GetPixel(ImplColorToSal(aWhite));
- aNewVal.background = rColMap.GetPixel(ImplColorToSal(aBlack));
- }
- }
-
+ setForeBack(aNewVal, rColMap, rSalBitmap);
XChangeGC( pXDisp, aGC, nValues, &aNewVal );
}
@@ -525,13 +534,12 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect& rPosAry,
{
GC aTmpGC;
XGCValues aValues;
- const SalColormap& rColMap = pSalDisp->GetColormap( m_nXScreen );
- const int nBlack = rColMap.GetBlackPixel(), nWhite = rColMap.GetWhitePixel();
+ setForeBack(aValues, pSalDisp->GetColormap(m_nXScreen), rSalBitmap);
const int nValues = GCFunction | GCForeground | GCBackground;
SalTwoRect aTmpRect( rPosAry ); aTmpRect.mnDestX = aTmpRect.mnDestY = 0;
// draw paint bitmap in pixmap #1
- aValues.function = GXcopy, aValues.foreground = nWhite, aValues.background = nBlack;
+ aValues.function = GXcopy;
aTmpGC = XCreateGC( pXDisp, aFG, nValues, &aValues );
static_cast<const X11SalBitmap&>(rSalBitmap).ImplDraw( aFG, m_nXScreen, nDepth, aTmpRect, aTmpGC );
DBG_TESTTRANS( aFG );
commit 7af733d9ef65fddd12ef5fae82808ba2f7f608df
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 26 17:44:58 2014 +0100
tweak assert so comment appears in abort message
Change-Id: Ibf78e5cd1620f0b61cae030e3870be4a6f87e71d
diff --git a/include/basegfx/raster/bpixelraster.hxx b/include/basegfx/raster/bpixelraster.hxx
index cac92e7..8d25049 100644
--- a/include/basegfx/raster/bpixelraster.hxx
+++ b/include/basegfx/raster/bpixelraster.hxx
@@ -81,14 +81,14 @@ namespace basegfx
// data access read only
const BPixel& getBPixel(sal_uInt32 nIndex) const
{
- assert(nIndex < mnCount); //Access out of range
+ assert(nIndex < mnCount && "Access out of range");
return mpContent[nIndex];
}
// data access read/write
BPixel& getBPixel(sal_uInt32 nIndex)
{
- assert(nIndex < mnCount); //Access out of range
+ assert(nIndex < mnCount && "Access out of range");
return mpContent[nIndex];
}
};
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx
index a44d0ae..825648a 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -611,14 +611,12 @@ void LwpParaStyle::ApplyTab(XFParaStyle *pParaStyle, LwpTabOverride *pTabOverRid
LwpObjectID& rTabRackID = pTabOverRide->GetTabRackID();
if(rTabRackID.IsNull())
{
- //assert(false);
return;
}
LwpTabRack* pTabRack = dynamic_cast<LwpTabRack*>(rTabRackID.obj().get());
if(!pTabRack)
{
- //assert(false);
return;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawline.cxx b/lotuswordpro/source/filter/xfilter/xfdrawline.cxx
index 3ac859b..cfdc590 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawline.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawline.cxx
@@ -70,7 +70,7 @@ void XFDrawLine::ToXml(IXFStream *pStrm)
if( !GetStyleName().isEmpty() )
pAttrList->AddAttribute( "draw:style-name", GetStyleName() );
- assert(!m_strName.isEmpty()); //name should not be null.
+ assert(!m_strName.isEmpty() && "name should not be null.");
if( !m_strName.isEmpty() )
pAttrList->AddAttribute( "draw:name", m_strName );
//anchor type:
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawobj.cxx b/lotuswordpro/source/filter/xfilter/xfdrawobj.cxx
index f769e2e..c663913 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawobj.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawobj.cxx
@@ -82,7 +82,7 @@ void XFDrawObject::ToXml(IXFStream *pStrm)
if( !GetStyleName().isEmpty() )
pAttrList->AddAttribute( "draw:style-name", GetStyleName() );
- assert(!m_strName.isEmpty()); //name should not be null.
+ assert(!m_strName.isEmpty() && "name should not be null.");
if( !m_strName.isEmpty() )
pAttrList->AddAttribute( "draw:name", m_strName );
//anchor type:
diff --git a/lotuswordpro/source/filter/xfilter/xfframe.cxx b/lotuswordpro/source/filter/xfilter/xfframe.cxx
index 2af0994..6cb2dde 100644
--- a/lotuswordpro/source/filter/xfilter/xfframe.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfframe.cxx
@@ -140,7 +140,7 @@ void XFFrame::StartFrame(IXFStream *pStrm)
if( !GetStyleName().isEmpty() )
pAttrList->AddAttribute( "draw:style-name", GetStyleName() );
- assert(!m_strName.isEmpty()); //name should not be null.
+ assert(!m_strName.isEmpty() && "name should not be null.");
if( !m_strName.isEmpty() && m_isTextBox == false)
pAttrList->AddAttribute( "draw:name", m_strName );
//anchor type:
diff --git a/lotuswordpro/source/filter/xfilter/xfimage.cxx b/lotuswordpro/source/filter/xfilter/xfimage.cxx
index 6315833..b8ae90f 100644
--- a/lotuswordpro/source/filter/xfilter/xfimage.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfimage.cxx
@@ -93,7 +93,7 @@ void XFImage::ToXml(IXFStream *pStrm)
if( !GetStyleName().isEmpty() )
pAttrList->AddAttribute( "draw:style-name", GetStyleName() );
- assert(!m_strName.isEmpty()); //name should not be null.
+ assert(!m_strName.isEmpty() && "name should not be null.");
if( !m_strName.isEmpty() )
pAttrList->AddAttribute( "draw:name", m_strName );
//anchor type:
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index ba60ccf..c12a961 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3084,7 +3084,7 @@ const char* getErrorBarStyle(sal_Int32 nErrorBarStyle)
case cssc::ErrorBarStyle::FROM_DATA:
return "cust";
default:
- assert(false); // can't happen
+ assert(false && "can't happen");
}
return NULL;
}
diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx
index a287bc1..e70bb3b 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -199,7 +199,7 @@ void OSection::init()
{
uno::Reference< report::XReportDefinition> xReport = getReportDefinition();
::boost::shared_ptr<rptui::OReportModel> pModel = OReportDefinition::getSdrModel(xReport);
- assert(pModel); //"No model set at the report definition!"
+ assert(pModel && "No model set at the report definition!");
if ( pModel )
{
uno::Reference<report::XSection> const xSection(this);
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y
index dba0b29..133f131 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -100,7 +100,7 @@ OUString flagName(unoidl::detail::SourceProviderFlags flag) {
case unoidl::detail::FLAG_TRANSIENT:
return OUString("transient");
default:
- assert(false); for (;;) { std::abort(); } // this cannot happen
+ assert(false && "this cannot happen"); for (;;) { std::abort(); }
}
}
@@ -480,7 +480,7 @@ Found findEntity(
argT = unoidl::detail::SourceProviderType::TYPE_INTERFACE;
break;
case unoidl::detail::SourceProviderEntity::KIND_MODULE:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
}
argType
= unoidl::detail::SourceProviderType(
@@ -725,7 +725,7 @@ Found findEntity(
n, e);
break;
case unoidl::detail::SourceProviderEntity::KIND_MODULE:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
}
}
} else {
@@ -789,7 +789,7 @@ Found findEntity(
+ " that is not a polymorphic struct type template"));
return FOUND_ERROR;
case unoidl::detail::SourceProviderEntity::KIND_MODULE:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
}
}
if (typedefedType != 0) {
@@ -1954,7 +1954,7 @@ typedefDefn:
case unoidl::detail::SourceProviderEntity::KIND_PUBLISHED_INTERFACE_DECL:
break;
case unoidl::detail::SourceProviderEntity::KIND_MODULE:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
default:
assert(t.entity->entity.is() || t.entity->pad.is());
unpub
@@ -1973,7 +1973,7 @@ typedefDefn:
}
break;
case unoidl::detail::SourceProviderType::TYPE_PARAMETER:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
default:
break;
}
@@ -3924,7 +3924,7 @@ type:
ok = true;
break;
case unoidl::Entity::SORT_TYPEDEF:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
// fall through
default:
break;
@@ -3946,7 +3946,7 @@ type:
ok = true;
break;
case unoidl::detail::SourceProviderEntity::KIND_MODULE:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
}
if (!ok) {
error(@1, yyscanner, "non-type entity " + name);
@@ -4020,7 +4020,7 @@ type:
case unoidl::detail::SourceProviderEntity::KIND_PUBLISHED_INTERFACE_DECL:
break;
case unoidl::detail::SourceProviderEntity::KIND_MODULE:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
}
if (!ok) {
error(@1, yyscanner, "non-type entity " + name);
@@ -4110,7 +4110,7 @@ OUString SourceProviderType::getName() const {
return n + ">";
}
default:
- assert(false); for (;;) { std::abort(); } // this cannot happen
+ assert(false && "this cannot happen"); for (;;) { std::abort(); }
}
}
diff --git a/unoidl/source/unoidl-check.cxx b/unoidl/source/unoidl-check.cxx
index 688a62c..3cf9bcc 100644
--- a/unoidl/source/unoidl-check.cxx
+++ b/unoidl/source/unoidl-check.cxx
@@ -135,7 +135,7 @@ OUString showDirection(
case unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN_OUT:
return OUString("[inout]");
default:
- assert(false); for (;;) { std::abort(); } // this cannot happen
+ assert(false && "this cannot happen"); for (;;) { std::abort(); }
}
}
@@ -193,7 +193,7 @@ void checkMap(
}
switch (entA->getSort()) {
case unoidl::Entity::SORT_MODULE:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
case unoidl::Entity::SORT_ENUM_TYPE:
{
rtl::Reference<unoidl::EnumTypeEntity> ent2A(
diff --git a/unoidl/source/unoidl-read.cxx b/unoidl/source/unoidl-read.cxx
index 1deb4d7..ea995d6 100644
--- a/unoidl/source/unoidl-read.cxx
+++ b/unoidl/source/unoidl-read.cxx
@@ -248,7 +248,7 @@ void scanMap(
.first);
switch (ent->getSort()) {
case unoidl::Entity::SORT_MODULE:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
case unoidl::Entity::SORT_ENUM_TYPE:
case unoidl::Entity::SORT_CONSTANT_GROUP:
break;
@@ -609,7 +609,7 @@ void writeEntity(
static_cast<unoidl::PublishableEntity *>(i->second.entity.get()));
switch (ent->getSort()) {
case unoidl::Entity::SORT_MODULE:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
case unoidl::Entity::SORT_ENUM_TYPE:
{
rtl::Reference<unoidl::EnumTypeEntity> ent2(
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 594f8ae..b0254ed 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -99,7 +99,7 @@ std::vector<OUString> getContents(OUString const & url) {
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
@@ -133,7 +133,7 @@ bool utl::UCBContentHelper::IsDocument(OUString const & url) {
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
@@ -154,7 +154,7 @@ css::uno::Any utl::UCBContentHelper::GetProperty(
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
@@ -173,7 +173,7 @@ bool utl::UCBContentHelper::IsFolder(OUString const & url) {
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
@@ -195,7 +195,7 @@ bool utl::UCBContentHelper::GetTitle(
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
@@ -217,7 +217,7 @@ bool utl::UCBContentHelper::Kill(OUString const & url) {
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
@@ -274,7 +274,7 @@ bool utl::UCBContentHelper::MakeFolder(
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
@@ -306,7 +306,7 @@ sal_Int64 utl::UCBContentHelper::GetSize(OUString const & url) {
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
@@ -335,7 +335,7 @@ bool utl::UCBContentHelper::IsYounger(
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
@@ -425,7 +425,7 @@ bool utl::UCBContentHelper::IsSubPath(
} catch (css::uno::RuntimeException const &) {
throw;
} catch (css::ucb::CommandAbortedException const &) {
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
css::uno::Any e(cppu::getCaughtException());
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index a1c59ef..f9fee0b 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -626,7 +626,7 @@ void Application::InitSettings()
{
ImplSVData* pSVData = ImplGetSVData();
- assert(!pSVData->maAppData.mpSettings); // initialization should not happen twice!
+ assert(!pSVData->maAppData.mpSettings && "initialization should not happen twice!");
pSVData->maAppData.mpCfgListener = new LocaleConfigurationListener;
pSVData->maAppData.mpSettings = new AllSettings();
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 2d3ce61..5730fcc 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -977,7 +977,7 @@ void CffSubsetterContext::convertOneTypeOp( void)
read2push();
} else {
popAll2Write( nType2Op);
- assert( false); // TODO?
+ assert(false && "TODO?");
}
break;
}
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index b81a6c0..7bfb28b 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -593,7 +593,7 @@ bool ImplBlendToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
nDstLinestep = -nDstLinestep;
}
- assert(rDstBuffer.mnHeight <= rSrcBuffer.mnHeight); // not sure about that?
+ assert(rDstBuffer.mnHeight <= rSrcBuffer.mnHeight && "not sure about that?");
for (int y = rDstBuffer.mnHeight; --y >= 0;)
{
ImplBlendLines<8>( aDstLine, rSrcLine, aMskLine, rDstBuffer.mnWidth );
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 12aa232..9cf4725 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -779,7 +779,7 @@ bool Dialog::ImplStartExecuteModal()
<< "\"cancelled in silent mode");
return false;
default:
- assert(false); // this cannot happen
+ assert(false && "this cannot happen");
// fall through
case Application::DIALOG_CANCEL_FATAL:
std::abort();
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx
index 511ff0a..45c0602 100644
--- a/vcl/unx/gtk/a11y/atklistener.cxx
+++ b/vcl/unx/gtk/a11y/atklistener.cxx
@@ -138,7 +138,7 @@ void AtkListener::updateChildList(accessibility::XAccessibleContext* pContext)
catch (lang::IndexOutOfBoundsException const&)
{
sal_Int32 nChildren2 = pContext->getAccessibleChildCount();
- assert(nChildren2 <= n); // consistency?
+ assert(nChildren2 <= n && "consistency?");
m_aChildList.resize(std::min(nChildren2, n));
break;
}
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index b1e7e23..c563395 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -824,7 +824,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType,
}
}
- assert(gdkDrawable); //rhbz#1050162
+ assert(gdkDrawable && "rhbz#1050162");
if (gdkDrawable == 0)
return false;
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index f02a695..4475819 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -794,7 +794,6 @@ OUString XMLTextParagraphExport::FindTextStyleAndHyperlink(
}
OUString sParent; // AutoStyles should not have parents!
sName = GetAutoStylePool().Find( XML_STYLE_FAMILY_TEXT_TEXT, sParent, xPropStates );
- // assert(!sName.isEmpty()); // AutoStyle could not be found
rbHasAutoStyle = true;
}
@@ -1068,7 +1067,7 @@ void XMLTextParagraphExport::exportListChange(
rPrevInfo.BelongsToSameList( rNextInfo ) &&
rPrevInfo.GetLevel() >= rNextInfo.GetLevel() )
{
- assert(pListElements && pListElements->size() >= 2); //list elements missing
+ assert(pListElements && pListElements->size() >= 2 && "list elements missing");
bEndElement = pListElements && pListElements->size() >= 2;
}
commit 05f5c4d4d6addf5321a40595f598e55dce376f6f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 26 17:34:29 2014 +0100
DBG_ASSERT->assert
Change-Id: Ic2933fc686d3bb030291756bd94127ee7583c833
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 24fc381..cf15b26 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -1254,13 +1254,11 @@ default unknown != sal_True - - -
dontcare unknown != sal_True - - -
unknown unknown != sal_True - - -
*/
-
-
static void MergeItem_Impl( SfxItemPool *_pPool, sal_uInt16 &rCount,
const SfxPoolItem **ppFnd1, const SfxPoolItem *pFnd2,
bool bIgnoreDefaults )
{
- DBG_ASSERT( ppFnd1 != 0, "Merging to 0-Item" );
+ assert(ppFnd1 != 0 && "Merging to 0-Item");
// 1. Item ist default?
if ( !*ppFnd1 )
@@ -1321,8 +1319,6 @@ static void MergeItem_Impl( SfxItemPool *_pPool, sal_uInt16 &rCount,
}
}
-
-
void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults )
{
// Achtung!!! Bei Aenderungen/Bugfixes immer obenstehende Tabelle pflegen!
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index e80b179..161e8aa 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -482,7 +482,7 @@ void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin)
void SdrPaintView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
{
- DBG_ASSERT(pOldWin, "SdrPaintView::DeleteWindowFromPaintView: No OutputDevice(!)");
+ assert(pOldWin && "SdrPaintView::DeleteWindowFromPaintView: No OutputDevice(!)");
SdrPaintWindow* pCandidate = FindPaintWindow(*pOldWin);
if(pCandidate)
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index ec98555..b8bc0b4 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1471,7 +1471,7 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara );
static void lcl_DelLine( SwTableLine* pLine, _DelTabPara* pPara )
{
- OSL_ENSURE( pPara, "The parameters are missing!" );
+ assert(pPara && "The parameters are missing!");
_DelTabPara aPara( *pPara );
for( SwTableBoxes::iterator it = pLine->GetTabBoxes().begin();
it != pLine->GetTabBoxes().end(); ++it)
@@ -1483,7 +1483,7 @@ static void lcl_DelLine( SwTableLine* pLine, _DelTabPara* pPara )
static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara )
{
- OSL_ENSURE( pDelPara, "The parameters are missing" );
+ assert(pDelPara && "The parameters are missing");
// Delete the Box's Lines
if( !pBox->GetTabLines().empty() )
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index f4212b6..9b9074d 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -61,7 +61,7 @@ using namespace ::com::sun::star;
void SwAttrIter::Chg( SwTxtAttr *pHt )
{
- OSL_ENSURE( pHt && pFnt, "No attribute of font available for change");
+ assert(pHt && pFnt && "No attribute of font available for change");
if( pRedln && pRedln->IsOn() )
pRedln->ChangeTxtAttr( pFnt, *pHt, true );
else
@@ -71,7 +71,7 @@ void SwAttrIter::Chg( SwTxtAttr *pHt )
void SwAttrIter::Rst( SwTxtAttr *pHt )
{
- OSL_ENSURE( pHt && pFnt, "No attribute of font available for reset");
+ assert(pHt && pFnt && "No attribute of font available for reset");
// get top from stack after removing pHt
if( pRedln && pRedln->IsOn() )
pRedln->ChangeTxtAttr( pFnt, *pHt, false );
More information about the Libreoffice-commits
mailing list