[Libreoffice-commits] core.git: editeng/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue May 5 07:41:19 UTC 2020


 editeng/source/editeng/editdbg.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1138adc105e18cc0ef6af5de7529fba1723e960b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 4 20:45:30 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 5 09:40:44 2020 +0200

    use SfxStyleSheetIterator::Count directly
    
    Change-Id: I0715066cfbbf3457b3e000506d312b9cc0aea2d1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93445
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 3dba4a206b4c..b2753839fad0 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -426,12 +426,12 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox )
 
     if ( pEE->pImpEditEngine->GetStyleSheetPool() )
     {
-        sal_uInt16 nStyles = pEE->pImpEditEngine->GetStyleSheetPool() ? pEE->pImpEditEngine->GetStyleSheetPool()->Count() : 0;
+        SfxStyleSheetIterator aIter( pEE->pImpEditEngine->GetStyleSheetPool(), SfxStyleFamily::All );
+        sal_uInt16 nStyles = aIter.Count();
         fprintf( fp, "\n\n================================================================================" );
         fprintf( fp, "\n==================   Stylesheets   =============================================" );
         fprintf( fp, "\n================================================================================" );
         fprintf( fp, "\n#Template:   %" SAL_PRIuUINT32 "\n", sal_uInt32(nStyles) );
-        SfxStyleSheetIterator aIter( pEE->pImpEditEngine->GetStyleSheetPool(), SfxStyleFamily::All );
         SfxStyleSheetBase* pStyle = aIter.First();
         while ( pStyle )
         {


More information about the Libreoffice-commits mailing list