svl/source/items/itempool.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit b65f742d7a3d843570c75ffcab99d5029b01a772
Author: Jochen Nitschke <j.nitschke+loger...@ok.de>
Date:   Thu Feb 23 16:53:38 2017 +0000

    fix inverted warning logic
    
    warning says the item pool is not empty,
    so test item pointers for not null.
    ever since initial commit cf7e1f9cc99e7c260cfab823f2c47f56035bdbd0
    
    and make warning more descriptive by adding pool names
    
    Change-Id: I3a8a6ca69e319d01418eac527b15f61adfd0fb13
    Reviewed-on: https://gerrit.libreoffice.org/34589
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 679a097..ef2a481 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -413,10 +413,11 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
                     break;
                 if (rSecArrayPtr)
                 {
-                    for (auto const& rItemPtr : *rSecArrayPtr)
-                        if (!rItemPtr)
+                    for (const SfxPoolItem* pItem : *rSecArrayPtr)
+                        if (pItem)
                         {
-                            OSL_FAIL( "old secondary pool must be empty" );
+                            SAL_WARN("svl.items", "old secondary pool: " << 
pImpl->mpSecondary->pImpl->aName
+                                            << " of pool: " << pImpl->aName << 
" must be empty.");
                             bOK = false;
                             break;
                         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to