sw/source/uibase/app/docstyle.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit c17659cc51e4eea7b26f936604c2c3a29b308ba7
Author:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
AuthorDate: Sat Jul 27 15:45:35 2024 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Jul 30 09:11:08 2024 +0200

    tdf#159168: consider dflt char format 'applied', even if it apparently is 
not
    
    Change-Id: Id525b934a0e329e5c630f81e2e959f29b5dffc0e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171096
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/uibase/app/docstyle.cxx 
b/sw/source/uibase/app/docstyle.cxx
index 5262bf79eb02..bf05f3dbff7d 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -2450,9 +2450,10 @@ bool SwDocStyleSheet::IsUsed() const
     const sw::BroadcastingModify* pMod;
     switch( nFamily )
     {
-    case SfxStyleFamily::Char : pMod = m_pCharFormat;   break;
     case SfxStyleFamily::Para : pMod = m_pColl;      break;
     case SfxStyleFamily::Frame: pMod = m_pFrameFormat;    break;
+    case SfxStyleFamily::Char:
+            return m_pCharFormat->IsUsed();
     case SfxStyleFamily::Page:
             return m_pDesc->IsUsed();
 
@@ -2868,7 +2869,8 @@ SfxStyleSheetBase*  SwStyleSheetIterator::First()
         {
             SwCharFormat* pFormat = (*rDoc.GetCharFormats())[ i ];
 
-            const bool bUsed = bIsSearchUsed && (bOrganizer || 
rDoc.IsUsed(*pFormat));
+            // tdf#159168: default char format should be considered 
'applied'/used, even if it apparently is not
+            const bool bUsed = bIsSearchUsed && (bOrganizer || 
pFormat->IsUsed() || pFormat == rDoc.GetDfltCharFormat());
             if( ( !bSearchHidden && pFormat->IsHidden() && !bUsed ) || ( 
pFormat->IsDefault() && pFormat != rDoc.GetDfltCharFormat() ) )
                 continue;
 

Reply via email to