[Libreoffice-commits] core.git: basctl/source editeng/source extensions/source filter/source sc/source sd/source sfx2/source svtools/source svx/source vcl/source xmloff/source xmlsecurity/source

Noel Grandin noelgrandin at gmail.com
Sun Jun 12 09:04:42 UTC 2016


 basctl/source/basicide/basides1.cxx                        |    2 +-
 basctl/source/basicide/sbxitem.cxx                         |    2 +-
 editeng/source/items/svxfont.cxx                           |    2 +-
 extensions/source/dbpilots/listcombowizard.cxx             |    2 +-
 filter/source/msfilter/svdfppt.cxx                         |    2 +-
 sc/source/core/data/attrib.cxx                             |    2 +-
 sd/source/ui/docshell/docshel4.cxx                         |    2 +-
 sd/source/ui/sidebar/MasterPageContainerProviders.cxx      |    2 +-
 sd/source/ui/sidebar/MasterPageDescriptor.cxx              |    2 +-
 sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx         |    2 +-
 sd/source/ui/view/ViewShellBase.cxx                        |    4 ++--
 sd/source/ui/view/ViewShellManager.cxx                     |    4 ++--
 sfx2/source/bastyp/bitset.cxx                              |    3 ++-
 sfx2/source/control/minfitem.cxx                           |    2 +-
 sfx2/source/dialog/dinfdlg.cxx                             |    2 +-
 sfx2/source/dialog/tabdlg.cxx                              |    2 +-
 sfx2/source/view/frame.cxx                                 |    2 +-
 svtools/source/brwbox/brwbox3.cxx                          |    2 +-
 svx/source/dialog/rulritem.cxx                             |    2 +-
 svx/source/items/SmartTagItem.cxx                          |    2 +-
 svx/source/svdraw/svdmodel.cxx                             |    3 ++-
 svx/source/svdraw/svdopath.cxx                             |    2 +-
 vcl/source/outdev/map.cxx                                  |    2 +-
 xmloff/source/draw/shapeexport.cxx                         |    2 +-
 xmlsecurity/source/component/documentdigitalsignatures.cxx |    2 +-
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx     |    2 +-
 26 files changed, 30 insertions(+), 28 deletions(-)

New commits:
commit ab10f9fc11948ca0f463aa8c0c784a574c89f8f7
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sat Jun 11 19:05:15 2016 +0200

    convert DBG_ASSERT(false, to SAL_WARN(
    
    Change-Id: I400d728c5d99228c5ca52e369037395b4da2af5c
    Reviewed-on: https://gerrit.libreoffice.org/26187
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index e09809f..d9fcf8d 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1166,7 +1166,7 @@ VclPtr<ModulWindow> Shell::ShowActiveModuleWindow( StarBASIC* pBasic )
             }
         }
         else
-            DBG_ASSERT(false, "No BASIC!");
+            SAL_WARN( "basctl", "No BASIC!");
         if (BasicManager* pBasicMgr = FindBasicManager(pBasic))
             StartListening( *pBasicMgr, true /* log on only once */ );
         return pWin;
diff --git a/basctl/source/basicide/sbxitem.cxx b/basctl/source/basicide/sbxitem.cxx
index 0078238..b68cadf 100644
--- a/basctl/source/basicide/sbxitem.cxx
+++ b/basctl/source/basicide/sbxitem.cxx
@@ -21,7 +21,7 @@
 
 namespace basctl
 {
-SfxPoolItem* SbxItem::CreateDefault() { DBG_ASSERT(false, "No SbxItem factory available"); return nullptr; }
+SfxPoolItem* SbxItem::CreateDefault() { SAL_WARN( "basctl", "No SbxItem factory available"); return nullptr; }
 SbxItem::SbxItem (
     sal_uInt16 nWhichItem,
     ScriptDocument const& rDocument,
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 3fa6dd5..52681d1 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -143,7 +143,7 @@ OUString SvxFont::CalcCaseMap(const OUString &rTxt) const
         }
         default:
         {
-            DBG_ASSERT(false, "SvxFont::CaseMapTxt: unknown casemap");
+            SAL_WARN( "editeng", "SvxFont::CaseMapTxt: unknown casemap");
             break;
         }
     }
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index 4c87f06..73f094d 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -254,7 +254,7 @@ namespace dbp
             }
             catch(const Exception&)
             {
-                DBG_ASSERT(false, "OLinkFieldsPage::initializePage: caught an exception while retrieving the columns!");
+                SAL_WARN( "extensions", "OLinkFieldsPage::initializePage: caught an exception while retrieving the columns!");
             }
         }
         return aColumnNames;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index a68a19e..f33c088 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -4220,7 +4220,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
                     }
                 }
                 if ( rIn.Tell() != aTxMasterStyleHd.GetRecEndFilePos() )
-                    DBG_ASSERT(false, "SJ: Falsche Anzahl von Bytes gelesen beim Import der PPT-Formatvorlagen");
+                    SAL_WARN( "filter", "SJ: Falsche Anzahl von Bytes gelesen beim Import der PPT-Formatvorlagen");
             }
 #endif
         }
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 5b6c922..d1f393f 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -43,7 +43,7 @@ using namespace com::sun::star;
 
 
 SfxPoolItem* ScProtectionAttr::CreateDefault() { return new ScProtectionAttr; }
-SfxPoolItem* ScDoubleItem::CreateDefault() { DBG_ASSERT(false, "No ScDoubleItem factory available"); return nullptr; }
+SfxPoolItem* ScDoubleItem::CreateDefault() { SAL_WARN( "sc", "No ScDoubleItem factory available"); return nullptr; }
 
 /**
  * General Help Function
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 5743e4e..844548f 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -218,7 +218,7 @@ void DrawDocShell::UpdateRefDevice()
                 // We are confronted with an invalid or un-implemented
                 // layout mode.  Use the printer as formatting device
                 // as a fall-back.
-                DBG_ASSERT(false, "DrawDocShell::UpdateRefDevice(): Unexpected printer layout mode");
+                SAL_WARN( "sd", "DrawDocShell::UpdateRefDevice(): Unexpected printer layout mode");
 
                 pRefDevice = mpPrinter.get();
                 break;
diff --git a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
index 3bec4c2..86958f6 100644
--- a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
@@ -186,7 +186,7 @@ SdPage* DefaultPageObjectProvider::operator () (SdDrawDocument* pContainerDocume
 
     if (pLocalMasterPage == nullptr)
     {
-        DBG_ASSERT(false, "can not create master page for slide");
+        SAL_WARN( "sd", "can not create master page for slide");
     }
 
     return pLocalMasterPage;
diff --git a/sd/source/ui/sidebar/MasterPageDescriptor.cxx b/sd/source/ui/sidebar/MasterPageDescriptor.cxx
index 3b5e5f8..b607255 100644
--- a/sd/source/ui/sidebar/MasterPageDescriptor.cxx
+++ b/sd/source/ui/sidebar/MasterPageDescriptor.cxx
@@ -200,7 +200,7 @@ int MasterPageDescriptor::UpdatePageObject (
         }
         else
         {
-            DBG_ASSERT(false, "UpdatePageObject: master page is NULL");
+            SAL_WARN( "sd", "UpdatePageObject: master page is NULL");
             return -1;
         }
 
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
index 46d1c24..2164102 100644
--- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
@@ -485,7 +485,7 @@ void Layer::RemovePainter (const SharedILayerPainter& rpPainter)
     }
     else
     {
-        DBG_ASSERT(false,"LayeredDevice::RemovePainter called for painter that is not registered");
+        SAL_WARN("sd", "LayeredDevice::RemovePainter called for painter that is not registered");
     }
 }
 
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 72b3f3b..e5c92f4 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -907,7 +907,7 @@ OUString ViewShellBase::GetInitialViewShellType()
                         // The page kind is invalid.  This is probably an
                         // error by the caller.  We use the standard type to
                         // keep things going.
-                        DBG_ASSERT(false, "ViewShellBase::GetInitialViewShellType: invalid page kind");
+                        SAL_WARN( "sd", "ViewShellBase::GetInitialViewShellType: invalid page kind");
                         sRequestedView = FrameworkHelper::msImpressViewURL;
                         break;
                 }
@@ -1415,7 +1415,7 @@ void CurrentPageSetter::operator() (bool)
         }
         catch (const beans::UnknownPropertyException&)
         {
-            DBG_ASSERT(false,"CurrentPage property unknown");
+            SAL_WARN("sd", "CurrentPage property unknown");
         }
     }
 }
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index ded5aa5..c2432ac 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -438,7 +438,7 @@ void ViewShellManager::Implementation::ActivateViewShell (ViewShell* pViewShell)
         }
         else
         {
-            DBG_ASSERT(false,
+            SAL_WARN("sd",
                 "ViewShellManager::ActivateViewShell: "
                 "new view shell has no active window");
         }
@@ -1132,7 +1132,7 @@ void ViewShellManager::Implementation::Shutdown()
             }
             else
             {
-                DBG_ASSERT(false,
+                SAL_WARN("sd",
                     "ViewShellManager::Implementation::Shutdown(): empty active shell descriptor");
                 maActiveViewShells.pop_front();
             }
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index df4c2c726..5f1c3bd 100644
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <tools/debug.hxx>
+#include <sal/log.hxx>
 
 #include "bitset.hxx"
 
@@ -106,7 +107,7 @@ sal_uInt16 IndexBitSet::GetFreeIndex()
         *this|=i;
         return i;
       }
-  DBG_ASSERT(false, "IndexBitSet enthaelt mehr als USHRT_MAX Eintraege");
+  SAL_WARN( "sfx2", "IndexBitSet enthaelt mehr als USHRT_MAX Eintraege");
   return 0;
 }
 
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx
index e734694..ffc352b 100644
--- a/sfx2/source/control/minfitem.cxx
+++ b/sfx2/source/control/minfitem.cxx
@@ -19,7 +19,7 @@
 
 #include <sfx2/minfitem.hxx>
 
-SfxPoolItem* SfxMacroInfoItem::CreateDefault() { DBG_ASSERT(false, "No SfxMacroInfItem factory available"); return nullptr; }
+SfxPoolItem* SfxMacroInfoItem::CreateDefault() { SAL_WARN( "sfx2", "No SfxMacroInfItem factory available"); return nullptr; }
 
 
 SfxMacroInfoItem::SfxMacroInfoItem(
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index a2d9990..2c5bad6 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -245,7 +245,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const OUString& rFile,
                 // "fix" property? => not a custom property => ignore it!
                 if (!(pProps[i].Attributes & css::beans::PropertyAttribute::REMOVABLE))
                 {
-                    DBG_ASSERT(false, "non-removable user-defined property?");
+                    SAL_WARN( "sfx2", "non-removable user-defined property?");
                     continue;
                 }
 
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 55621be..9159ee2 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -285,7 +285,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
 
 void SfxTabPage::PageCreated( const SfxAllItemSet& /*aSet*/ )
 {
-    DBG_ASSERT(false, "SfxTabPage::PageCreated should not be called");
+    SAL_WARN( "sfx2", "SfxTabPage::PageCreated should not be called");
 }
 
 void SfxTabPage::ChangesApplied()
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 8ff9dda..d8cb2bf 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::container;
 
-SfxPoolItem* SfxUsrAnyItem::CreateDefault() { DBG_ASSERT(false, "No SfxUsrAnyItem factory available"); return nullptr; }
+SfxPoolItem* SfxUsrAnyItem::CreateDefault() { SAL_WARN( "sfx2", "No SfxUsrAnyItem factory available"); return nullptr; }
 
 SfxPoolItem* SfxUnoFrameItem::CreateDefault()
 {
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index 4562ddd..b98291c 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -397,7 +397,7 @@ void BrowseBox::GrabTableFocus()
 
 OUString BrowseBox::GetCellText(long, sal_uInt16 ) const
 {
-    DBG_ASSERT(false,"This method has to be implemented by the derived classes! BUG!!");
+    SAL_WARN("svtools", "This method has to be implemented by the derived classes! BUG!!");
     return OUString();
 }
 
diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx
index 262c268..33077bb 100644
--- a/svx/source/dialog/rulritem.cxx
+++ b/svx/source/dialog/rulritem.cxx
@@ -29,7 +29,7 @@ SfxPoolItem* SvxPagePosSizeItem::CreateDefault() { return new SvxPagePosSizeItem
 SfxPoolItem* SvxLongLRSpaceItem::CreateDefault() { return new SvxLongLRSpaceItem; }
 SfxPoolItem* SvxLongULSpaceItem::CreateDefault() { return new SvxLongULSpaceItem; }
 SfxPoolItem* SvxColumnItem::CreateDefault() { return new SvxColumnItem; }
-SfxPoolItem* SvxObjectItem::CreateDefault() { DBG_ASSERT(false, "No SvxObjectItem factory available"); return nullptr; }
+SfxPoolItem* SvxObjectItem::CreateDefault() { SAL_WARN( "svx", "No SvxObjectItem factory available"); return nullptr; }
 
 /* SvxLongLRSpaceItem */
 
diff --git a/svx/source/items/SmartTagItem.cxx b/svx/source/items/SmartTagItem.cxx
index e80c6f8..4bc8856 100644
--- a/svx/source/items/SmartTagItem.cxx
+++ b/svx/source/items/SmartTagItem.cxx
@@ -26,7 +26,7 @@
 using namespace ::com::sun::star;
 
 
-SfxPoolItem* SvxSmartTagItem::CreateDefault() { DBG_ASSERT(false, "No SvxSmartTagItem factory available"); return nullptr; }
+SfxPoolItem* SvxSmartTagItem::CreateDefault() { SAL_WARN( "svx", "No SvxSmartTagItem factory available"); return nullptr; }
 
 SvxSmartTagItem::SvxSmartTagItem( const sal_uInt16 nId,
                                   const css::uno::Sequence < css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > >& rActionComponentsSequence,
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 1483a0f..f0fc1df 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -25,6 +25,7 @@
 
 #include <osl/endian.h>
 #include <rtl/strbuf.hxx>
+#include <sal/log.hxx>
 
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/document/XStorageBasedDocument.hpp>
@@ -1806,7 +1807,7 @@ void SdrModel::SetStarDrawPreviewMode(bool bPreview)
     if (!bPreview && bStarDrawPreviewMode && GetPageCount())
     {
         // Resetting is not allowed, because the Model might not be loaded completely
-        DBG_ASSERT(false,"SdrModel::SetStarDrawPreviewMode(): Resetting not allowed, because Model might not be complete.");
+        SAL_WARN("svx", "SdrModel::SetStarDrawPreviewMode(): Resetting not allowed, because Model might not be complete.");
     }
     else
     {
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index fdc9c9c..34a107bf 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2466,7 +2466,7 @@ Point SdrPathObj::GetSnapPoint(sal_uInt32 nSnapPnt) const
     sal_uInt32 nPoly,nPnt;
     if(!PolyPolygonEditor::GetRelativePolyPoint(GetPathPoly(), nSnapPnt, nPoly, nPnt))
     {
-        DBG_ASSERT(false,"SdrPathObj::GetSnapPoint: Point nSnapPnt does not exist.");
+        SAL_WARN("svx", "SdrPathObj::GetSnapPoint: Point nSnapPnt does not exist.");
     }
 
     const basegfx::B2DPoint aB2DPoint(GetPathPoly().getB2DPolygon(nPoly).getB2DPoint(nPnt));
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index 950a088..af4c2a8 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -44,7 +44,7 @@ static Fraction ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 )
 {
     if( nD1 == 0 || nD2 == 0 ) //under these bad circumstances the following while loop will be endless
     {
-        DBG_ASSERT(false,"Invalid parameter for ImplMakeFraction");
+        SAL_WARN("vcl", "Invalid parameter for ImplMakeFraction");
         return Fraction( 1, 1 );
     }
 
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 44551b4..aea951b 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -352,7 +352,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
                 catch(const beans::UnknownPropertyException&)
                 {
                     // Ignored.
-                    DBG_ASSERT(false,
+                    SAL_WARN( "xmloff",
                         "XMLShapeExport::collectShapeAutoStyles: style has no 'Family' property");
                 }
 
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index e7777ce..d57fc6b 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -259,7 +259,7 @@ DocumentDigitalSignatures::ImplVerifySignatures(
 {
     if (!rxStorage.is())
     {
-        DBG_ASSERT(false, "Error, no XStorage provided");
+        SAL_WARN( "xmlsecurity", "Error, no XStorage provided");
         return Sequence<css::security::DocumentSignatureInformation>();
     }
     // First check for the InputStream, to avoid unnecessary initialization of the security environment...
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index aa6db52..fa0b180 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -447,7 +447,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
                 //in the digital signature dialog.
                 //Comparing the X509IssuerName with the one from the X509Certificate in order
                 //to find out if the X509IssuerName was modified does not work. See #i62684
-                DBG_ASSERT(false, "Could not find embedded certificate!");
+                SAL_WARN( "xmlsecurity", "Could not find embedded certificate!");
             }
 
             //In case there is no embedded certificate we try to get it from a local store


More information about the Libreoffice-commits mailing list