sw/source/filter/html/htmlatr.cxx |    8 --------
 1 file changed, 8 deletions(-)

New commits:
commit 69494a9345273bd30ff7c833019d83b888009819
Author:     Mike Kaganski <[email protected]>
AuthorDate: Mon Nov 24 11:21:28 2025 +0100
Commit:     Mike Kaganski <[email protected]>
CommitDate: Mon Nov 24 14:59:00 2025 +0100

    Drop redundant OSL_ENSURE
    
    StaticWhichCast itself includes respective asserts.
    
    Change-Id: I4db5a9c0c040faed45219167d657831c38c45c18
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194432
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/sw/source/filter/html/htmlatr.cxx 
b/sw/source/filter/html/htmlatr.cxx
index 1a5b991efd12..1fc954052c1e 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1668,8 +1668,6 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& 
rItem,
 
     case HTML_CHRFMT_VALUE:
         {
-            OSL_ENSURE( RES_TXTATR_CHARFMT == rItem.Which(),
-                    "Not a character style after all" );
             const SwFormatCharFormat& rChrFormat = 
rItem.StaticWhichCast(RES_TXTATR_CHARFMT);
             const SwCharFormat* pFormat = rChrFormat.GetCharFormat();
 
@@ -1690,8 +1688,6 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& 
rItem,
 
     case HTML_AUTOFMT_VALUE:
         {
-            OSL_ENSURE( RES_TXTATR_AUTOFMT == rItem.Which(),
-                    "Not an automatic style, after all" );
             const SwFormatAutoFormat& rAutoFormat = 
rItem.StaticWhichCast(RES_TXTATR_AUTOFMT);
             const std::shared_ptr<SfxItemSet>& pSet = 
rAutoFormat.GetStyleHandle();
             if( pSet )
@@ -1703,8 +1699,6 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& 
rItem,
         // A foreground color as a paragraph attribute is only exported if
         // it is not the same as the default color.
         {
-            OSL_ENSURE( RES_CHRATR_COLOR == rItem.Which(),
-                    "Not a foreground color, after all" );
             Color aColor( rItem.StaticWhichCast(RES_CHRATR_COLOR).GetValue() );
             if( COL_AUTO == aColor )
                 aColor = COL_BLACK;
@@ -1714,8 +1708,6 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& 
rItem,
 
     case HTML_DROPCAP_VALUE:
         {
-            OSL_ENSURE( RES_PARATR_DROP == rItem.Which(),
-                    "Not a drop cap, after all" );
             const SwFormatDrop& rDrop = rItem.StaticWhichCast(RES_PARATR_DROP);
             nEnd = nStart + rDrop.GetChars();
             if (!m_bOutStyles)

Reply via email to