sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx |  592 +++++++++----------
 ucb/source/ucp/file/bc.cxx                           |   14 
 ucb/source/ucp/file/filcmd.cxx                       |   10 
 ucb/source/ucp/file/filinpstr.cxx                    |   24 
 ucb/source/ucp/file/filrow.cxx                       |   44 -
 ucb/source/ucp/file/filrset.cxx                      |   18 
 ucb/source/ucp/file/filstr.cxx                       |   30 
 ucb/source/ucp/file/filtask.cxx                      |   20 
 ucb/source/ucp/file/prov.cxx                         |    9 
 9 files changed, 353 insertions(+), 408 deletions(-)

New commits:
commit a4375f4f9d82543d5a7da2f2ba91ff5ac59d97ea
Author:     Noel Grandin <[email protected]>
AuthorDate: Fri Feb 6 10:44:18 2026 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat Feb 7 12:36:08 2026 +0100

    flatten DomainMapper_Impl a little
    
    Change-Id: Iedb092b2ceaa3d1900d7222ea895a508dc44c0bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198826
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index b316163e8694..43aa24ba04c8 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -704,14 +704,14 @@ void DomainMapper_Impl::AddDummyParaForTableInSection()
     if (IsInShape() || IsInHeaderFooter() || 
m_StreamStateStack.top().bIsInTextBox)
         return;
 
-    if (!m_aTextAppendStack.empty())
+    if (m_aTextAppendStack.empty())
+        return;
+
+    uno::Reference< text::XTextAppend > xTextAppend = 
m_aTextAppendStack.top().xTextAppend;
+    if (xTextAppend.is())
     {
-        uno::Reference< text::XTextAppend >  xTextAppend = 
m_aTextAppendStack.top().xTextAppend;
-        if (xTextAppend.is())
-        {
-            xTextAppend->finishParagraph(  uno::Sequence< beans::PropertyValue 
>() );
-            SetIsDummyParaAddedForTableInSection(true);
-        }
+        xTextAppend->finishParagraph(  uno::Sequence< beans::PropertyValue >() 
);
+        SetIsDummyParaAddedForTableInSection(true);
     }
 }
 
@@ -1282,7 +1282,7 @@ void DomainMapper_Impl::PopSdt()
     m_pSdtHelper->clear();
 }
 
-void    DomainMapper_Impl::PushProperties(ContextType eId)
+void DomainMapper_Impl::PushProperties(ContextType eId)
 {
     PropertyMapPtr pInsert(eId == CONTEXT_SECTION ?
         (new SectionPropertyMap( m_bIsFirstSection )) :
@@ -1351,7 +1351,7 @@ void DomainMapper_Impl::PushListProperties(const 
PropertyMapPtr& pListProperties
 }
 
 
-void    DomainMapper_Impl::PopProperties(ContextType eId)
+void DomainMapper_Impl::PopProperties(ContextType eId)
 {
     OSL_ENSURE(!m_aPropertyStacks[eId].empty(), "section stack already empty");
     if ( m_aPropertyStacks[eId].empty() )
@@ -1669,8 +1669,7 @@ OUString DomainMapper_Impl::GetListStyleName(sal_Int32 
nListId)
 ListsManager::Pointer const & DomainMapper_Impl::GetListTable()
 {
     if(!m_pListTable)
-        m_pListTable =
-            new ListsManager( m_rDMapper, m_xTextDocument );
+        m_pListTable = new ListsManager( m_rDMapper, m_xTextDocument );
     return m_pListTable;
 }
 
@@ -3321,143 +3320,143 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 void DomainMapper_Impl::applyToggleAttributes(const PropertyMapPtr& 
pPropertyMap)
 {
     std::optional<PropertyMap::Property> charStyleProperty = 
pPropertyMap->getProperty(PROP_CHAR_STYLE_NAME);
-    if (charStyleProperty.has_value())
-    {
-        OUString sCharStyleName;
-        charStyleProperty->second >>= sCharStyleName;
-        float fCharStyleBold = css::awt::FontWeight::NORMAL;
-        float fCharStyleBoldComplex = css::awt::FontWeight::NORMAL;
-        css::awt::FontSlant eCharStylePosture = css::awt::FontSlant_NONE;
-        css::awt::FontSlant eCharStylePostureComplex = 
css::awt::FontSlant_NONE;
-        sal_Int16 nCharStyleCaseMap = css::style::CaseMap::NONE;
-        sal_Int16 nCharStyleRelief = css::awt::FontRelief::NONE;
-        bool bCharStyleContoured = false;//Outline;
-        bool bCharStyleShadowed = false;
-        sal_Int16 nCharStyleStrikeThrough = awt::FontStrikeout::NONE;
-        bool bCharStyleHidden = false;
-
-        rtl::Reference<SwXStyle> xCharStylePropertySet = 
GetCharacterStyles()->getCharacterStyleByName(sCharStyleName);
-        xCharStylePropertySet->getToggleAttributes(
-                fCharStyleBold,
-                fCharStyleBoldComplex,
-                eCharStylePosture,
-                eCharStylePostureComplex,
-                nCharStyleCaseMap,
-                nCharStyleRelief,
-                bCharStyleContoured,
-                bCharStyleShadowed,
-                nCharStyleStrikeThrough,
-                bCharStyleHidden);
-
-        if (fCharStyleBold > css::awt::FontWeight::NORMAL || eCharStylePosture 
!= css::awt::FontSlant_NONE|| nCharStyleCaseMap != css::style::CaseMap::NONE ||
-            nCharStyleRelief != css::awt::FontRelief::NONE || 
bCharStyleContoured || bCharStyleShadowed ||
-            nCharStyleStrikeThrough == awt::FontStrikeout::SINGLE || 
bCharStyleHidden)
-        {
-            rtl::Reference<SwXStyle> const xParaStylePropertySet =
-                
GetParagraphStyles()->getParagraphStyleByName(m_StreamStateStack.top().sCurrentParaStyleName);
-            float fParaStyleBold = css::awt::FontWeight::NORMAL;
-            float fParaStyleBoldComplex = css::awt::FontWeight::NORMAL;
-            css::awt::FontSlant eParaStylePosture = css::awt::FontSlant_NONE;
-            css::awt::FontSlant eParaStylePostureComplex = 
css::awt::FontSlant_NONE;
-            sal_Int16 nParaStyleCaseMap = css::style::CaseMap::NONE;
-            sal_Int16 nParaStyleRelief = css::awt::FontRelief::NONE;
-            bool bParaStyleContoured = false;
-            bool bParaStyleShadowed = false;
-            sal_Int16 nParaStyleStrikeThrough = awt::FontStrikeout::NONE;
-            bool bParaStyleHidden = false;
-            xParaStylePropertySet->getToggleAttributes(
-                    fParaStyleBold,
-                    fParaStyleBoldComplex,
-                    eParaStylePosture,
-                    eParaStylePostureComplex,
-                    nParaStyleCaseMap,
-                    nParaStyleRelief,
-                    bParaStyleContoured,
-                    bParaStyleShadowed,
-                    nParaStyleStrikeThrough,
-                    bParaStyleHidden);
-            if (fCharStyleBold > css::awt::FontWeight::NORMAL && 
fParaStyleBold > css::awt::FontWeight::NORMAL)
-            {
-                std::optional<PropertyMap::Property> charBoldProperty = 
pPropertyMap->getProperty(PROP_CHAR_WEIGHT);
-                if (!charBoldProperty.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_WEIGHT, 
uno::Any(css::awt::FontWeight::NORMAL));
-                }
-            }
-            if (fCharStyleBoldComplex > css::awt::FontWeight::NORMAL && 
fParaStyleBoldComplex > css::awt::FontWeight::NORMAL)
-            {
-                std::optional<PropertyMap::Property> charBoldPropertyComplex = 
pPropertyMap->getProperty(PROP_CHAR_WEIGHT_COMPLEX);
-                if (!charBoldPropertyComplex.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_WEIGHT_COMPLEX, 
uno::Any(css::awt::FontWeight::NORMAL));
-                    pPropertyMap->Insert(PROP_CHAR_WEIGHT_ASIAN, 
uno::Any(css::awt::FontWeight::NORMAL));
-                }
-            }
-            if (eCharStylePosture != css::awt::FontSlant_NONE && 
eParaStylePosture != css::awt::FontSlant_NONE)
-            {
-                std::optional<PropertyMap::Property> charItalicProperty = 
pPropertyMap->getProperty(PROP_CHAR_POSTURE);
-                if (!charItalicProperty.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_POSTURE, 
uno::Any(css::awt::FontSlant_NONE));
-                }
-            }
-            if (eCharStylePostureComplex != css::awt::FontSlant_NONE && 
eParaStylePostureComplex != css::awt::FontSlant_NONE)
-            {
-                std::optional<PropertyMap::Property> charItalicPropertyComplex 
= pPropertyMap->getProperty(PROP_CHAR_POSTURE_COMPLEX);
-                if (!charItalicPropertyComplex.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_POSTURE_COMPLEX, 
uno::Any(css::awt::FontSlant_NONE));
-                    pPropertyMap->Insert(PROP_CHAR_POSTURE_ASIAN, 
uno::Any(css::awt::FontSlant_NONE));
-                }
-            }
-            if (nCharStyleCaseMap == nParaStyleCaseMap && nCharStyleCaseMap != 
css::style::CaseMap::NONE)
-            {
-                std::optional<PropertyMap::Property> charCaseMap = 
pPropertyMap->getProperty(PROP_CHAR_CASE_MAP);
-                if (!charCaseMap.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_CASE_MAP, 
uno::Any(css::style::CaseMap::NONE));
-                }
-            }
-            if (nParaStyleRelief != css::awt::FontRelief::NONE && 
nCharStyleRelief == nParaStyleRelief)
-            {
-                std::optional<PropertyMap::Property> charRelief = 
pPropertyMap->getProperty(PROP_CHAR_RELIEF);
-                if (!charRelief.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_RELIEF, 
uno::Any(css::awt::FontRelief::NONE));
-                }
-            }
-            if (bParaStyleContoured && bCharStyleContoured)
-            {
-                std::optional<PropertyMap::Property> charContoured = 
pPropertyMap->getProperty(PROP_CHAR_CONTOURED);
-                if (!charContoured.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_CONTOURED, uno::Any(false));
-                }
-            }
-            if (bParaStyleShadowed && bCharStyleShadowed)
-            {
-                std::optional<PropertyMap::Property> charShadow = 
pPropertyMap->getProperty(PROP_CHAR_SHADOWED);
-                if (!charShadow.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_SHADOWED, uno::Any(false));
-                }
-            }
-            if (nParaStyleStrikeThrough == css::awt::FontStrikeout::SINGLE && 
nParaStyleStrikeThrough == nCharStyleStrikeThrough)
-            {
-                std::optional<PropertyMap::Property> charStrikeThrough = 
pPropertyMap->getProperty(PROP_CHAR_STRIKEOUT);
-                if (!charStrikeThrough.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_STRIKEOUT, 
uno::Any(css::awt::FontStrikeout::NONE));
-                }
-            }
-            if (bParaStyleHidden && bCharStyleHidden)
-            {
-                std::optional<PropertyMap::Property> charHidden = 
pPropertyMap->getProperty(PROP_CHAR_HIDDEN);
-                if (!charHidden.has_value())
-                {
-                    pPropertyMap->Insert(PROP_CHAR_HIDDEN, uno::Any(false));
-                }
-            }
+    if (!charStyleProperty.has_value())
+        return;
+
+    OUString sCharStyleName;
+    charStyleProperty->second >>= sCharStyleName;
+    float fCharStyleBold = css::awt::FontWeight::NORMAL;
+    float fCharStyleBoldComplex = css::awt::FontWeight::NORMAL;
+    css::awt::FontSlant eCharStylePosture = css::awt::FontSlant_NONE;
+    css::awt::FontSlant eCharStylePostureComplex = css::awt::FontSlant_NONE;
+    sal_Int16 nCharStyleCaseMap = css::style::CaseMap::NONE;
+    sal_Int16 nCharStyleRelief = css::awt::FontRelief::NONE;
+    bool bCharStyleContoured = false;//Outline;
+    bool bCharStyleShadowed = false;
+    sal_Int16 nCharStyleStrikeThrough = awt::FontStrikeout::NONE;
+    bool bCharStyleHidden = false;
+
+    rtl::Reference<SwXStyle> xCharStylePropertySet = 
GetCharacterStyles()->getCharacterStyleByName(sCharStyleName);
+    xCharStylePropertySet->getToggleAttributes(
+            fCharStyleBold,
+            fCharStyleBoldComplex,
+            eCharStylePosture,
+            eCharStylePostureComplex,
+            nCharStyleCaseMap,
+            nCharStyleRelief,
+            bCharStyleContoured,
+            bCharStyleShadowed,
+            nCharStyleStrikeThrough,
+            bCharStyleHidden);
+
+    if (!(fCharStyleBold > css::awt::FontWeight::NORMAL || eCharStylePosture 
!= css::awt::FontSlant_NONE|| nCharStyleCaseMap != css::style::CaseMap::NONE ||
+          nCharStyleRelief != css::awt::FontRelief::NONE || 
bCharStyleContoured || bCharStyleShadowed ||
+          nCharStyleStrikeThrough == awt::FontStrikeout::SINGLE || 
bCharStyleHidden))
+        return;
+
+    rtl::Reference<SwXStyle> const xParaStylePropertySet =
+        
GetParagraphStyles()->getParagraphStyleByName(m_StreamStateStack.top().sCurrentParaStyleName);
+    float fParaStyleBold = css::awt::FontWeight::NORMAL;
+    float fParaStyleBoldComplex = css::awt::FontWeight::NORMAL;
+    css::awt::FontSlant eParaStylePosture = css::awt::FontSlant_NONE;
+    css::awt::FontSlant eParaStylePostureComplex = css::awt::FontSlant_NONE;
+    sal_Int16 nParaStyleCaseMap = css::style::CaseMap::NONE;
+    sal_Int16 nParaStyleRelief = css::awt::FontRelief::NONE;
+    bool bParaStyleContoured = false;
+    bool bParaStyleShadowed = false;
+    sal_Int16 nParaStyleStrikeThrough = awt::FontStrikeout::NONE;
+    bool bParaStyleHidden = false;
+    xParaStylePropertySet->getToggleAttributes(
+            fParaStyleBold,
+            fParaStyleBoldComplex,
+            eParaStylePosture,
+            eParaStylePostureComplex,
+            nParaStyleCaseMap,
+            nParaStyleRelief,
+            bParaStyleContoured,
+            bParaStyleShadowed,
+            nParaStyleStrikeThrough,
+            bParaStyleHidden);
+    if (fCharStyleBold > css::awt::FontWeight::NORMAL && fParaStyleBold > 
css::awt::FontWeight::NORMAL)
+    {
+        std::optional<PropertyMap::Property> charBoldProperty = 
pPropertyMap->getProperty(PROP_CHAR_WEIGHT);
+        if (!charBoldProperty.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_WEIGHT, 
uno::Any(css::awt::FontWeight::NORMAL));
+        }
+    }
+    if (fCharStyleBoldComplex > css::awt::FontWeight::NORMAL && 
fParaStyleBoldComplex > css::awt::FontWeight::NORMAL)
+    {
+        std::optional<PropertyMap::Property> charBoldPropertyComplex = 
pPropertyMap->getProperty(PROP_CHAR_WEIGHT_COMPLEX);
+        if (!charBoldPropertyComplex.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_WEIGHT_COMPLEX, 
uno::Any(css::awt::FontWeight::NORMAL));
+            pPropertyMap->Insert(PROP_CHAR_WEIGHT_ASIAN, 
uno::Any(css::awt::FontWeight::NORMAL));
+        }
+    }
+    if (eCharStylePosture != css::awt::FontSlant_NONE && eParaStylePosture != 
css::awt::FontSlant_NONE)
+    {
+        std::optional<PropertyMap::Property> charItalicProperty = 
pPropertyMap->getProperty(PROP_CHAR_POSTURE);
+        if (!charItalicProperty.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_POSTURE, 
uno::Any(css::awt::FontSlant_NONE));
+        }
+    }
+    if (eCharStylePostureComplex != css::awt::FontSlant_NONE && 
eParaStylePostureComplex != css::awt::FontSlant_NONE)
+    {
+        std::optional<PropertyMap::Property> charItalicPropertyComplex = 
pPropertyMap->getProperty(PROP_CHAR_POSTURE_COMPLEX);
+        if (!charItalicPropertyComplex.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_POSTURE_COMPLEX, 
uno::Any(css::awt::FontSlant_NONE));
+            pPropertyMap->Insert(PROP_CHAR_POSTURE_ASIAN, 
uno::Any(css::awt::FontSlant_NONE));
+        }
+    }
+    if (nCharStyleCaseMap == nParaStyleCaseMap && nCharStyleCaseMap != 
css::style::CaseMap::NONE)
+    {
+        std::optional<PropertyMap::Property> charCaseMap = 
pPropertyMap->getProperty(PROP_CHAR_CASE_MAP);
+        if (!charCaseMap.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_CASE_MAP, 
uno::Any(css::style::CaseMap::NONE));
+        }
+    }
+    if (nParaStyleRelief != css::awt::FontRelief::NONE && nCharStyleRelief == 
nParaStyleRelief)
+    {
+        std::optional<PropertyMap::Property> charRelief = 
pPropertyMap->getProperty(PROP_CHAR_RELIEF);
+        if (!charRelief.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_RELIEF, 
uno::Any(css::awt::FontRelief::NONE));
+        }
+    }
+    if (bParaStyleContoured && bCharStyleContoured)
+    {
+        std::optional<PropertyMap::Property> charContoured = 
pPropertyMap->getProperty(PROP_CHAR_CONTOURED);
+        if (!charContoured.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_CONTOURED, uno::Any(false));
+        }
+    }
+    if (bParaStyleShadowed && bCharStyleShadowed)
+    {
+        std::optional<PropertyMap::Property> charShadow = 
pPropertyMap->getProperty(PROP_CHAR_SHADOWED);
+        if (!charShadow.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_SHADOWED, uno::Any(false));
+        }
+    }
+    if (nParaStyleStrikeThrough == css::awt::FontStrikeout::SINGLE && 
nParaStyleStrikeThrough == nCharStyleStrikeThrough)
+    {
+        std::optional<PropertyMap::Property> charStrikeThrough = 
pPropertyMap->getProperty(PROP_CHAR_STRIKEOUT);
+        if (!charStrikeThrough.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_STRIKEOUT, 
uno::Any(css::awt::FontStrikeout::NONE));
+        }
+    }
+    if (bParaStyleHidden && bCharStyleHidden)
+    {
+        std::optional<PropertyMap::Property> charHidden = 
pPropertyMap->getProperty(PROP_CHAR_HIDDEN);
+        if (!charHidden.has_value())
+        {
+            pPropertyMap->Insert(PROP_CHAR_HIDDEN, uno::Any(false));
         }
     }
 }
@@ -3467,7 +3466,7 @@ void 
DomainMapper_Impl::MergeAtContentImageRedlineWithNext(const css::uno::Refer
     // remove workaround for change tracked images, if they are part of a 
redline,
     // i.e. if the next run is a tracked change with the same type, author and 
date,
     // as in the change tracking of the image.
-    if ( m_bRedlineImageInPreviousRun )
+    if ( !m_bRedlineImageInPreviousRun )
     {
         auto pCurrentRedline = m_aRedlines.top().size() > 0
             ? m_aRedlines.top().back()
@@ -3499,7 +3498,7 @@ void 
DomainMapper_Impl::MergeAtContentImageRedlineWithNext(const css::uno::Refer
     }
 }
 
-    void DomainMapper_Impl::appendTextPortion( const OUString& rString, const 
PropertyMapPtr& pPropertyMap )
+void DomainMapper_Impl::appendTextPortion( const OUString& rString, const 
PropertyMapPtr& pPropertyMap )
 {
     if (m_bDiscardHeaderFooter)
         return;
@@ -3929,43 +3928,41 @@ rtl::Reference< SwXTextSection > 
DomainMapper_Impl::appendTextSectionAfter(
     if (m_aTextAppendStack.empty())
         return xSection;
     uno::Reference< text::XTextAppend >  xTextAppend = 
m_aTextAppendStack.top().xTextAppend;
-    if(xTextAppend.is())
-    {
-        try
-        {
-            uno::Reference< text::XParagraphCursor > xCursor(
-                xTextAppend->createTextCursorByRange( xBefore ), 
uno::UNO_QUERY_THROW);
-            //the cursor has been moved to the end of the paragraph because of 
the appendTextPortion() calls
-            xCursor->gotoStartOfParagraph( false );
-            if (m_aTextAppendStack.top().xInsertPosition.is())
-                xCursor->gotoRange( m_aTextAppendStack.top().xInsertPosition, 
true );
-            else
-                xCursor->gotoEnd( true );
-            // The paragraph after this new section is already inserted. The 
previous node may be a
-            // table; then trying to go left would skip the whole table. Split 
the trailing
-            // paragraph; let the section span over the first of the two 
resulting paragraphs;
-            // destroy the last section's paragraph afterwards.
-            xTextAppend->insertControlCharacter(
-                xCursor->getEnd(), 
css::text::ControlCharacter::PARAGRAPH_BREAK, false);
-            auto xNewPara = getParagraphOfRange(xCursor->getEnd());
-            xCursor->gotoPreviousParagraph(true);
-            auto xEndPara = getParagraphOfRange(xCursor->getEnd());
-            // xEndPara may already have properties (like page break); make 
sure to apply them
-            // to the newly appended paragraph, which will be kept in the end.
-            copyAllProps(xEndPara, xNewPara);
-
-            xSection = m_xTextDocument->createTextSection();
-            xSection->attach(xCursor);
-
-            // Remove the extra paragraph (last inside the section)
-            xEndPara->dispose();
-        }
-        catch(const uno::Exception&)
-        {
-        }
+    if(!xTextAppend)
+        return xSection;
 
+    try
+    {
+        uno::Reference< text::XParagraphCursor > xCursor(
+            xTextAppend->createTextCursorByRange( xBefore ), 
uno::UNO_QUERY_THROW);
+        //the cursor has been moved to the end of the paragraph because of the 
appendTextPortion() calls
+        xCursor->gotoStartOfParagraph( false );
+        if (m_aTextAppendStack.top().xInsertPosition.is())
+            xCursor->gotoRange( m_aTextAppendStack.top().xInsertPosition, true 
);
+        else
+            xCursor->gotoEnd( true );
+        // The paragraph after this new section is already inserted. The 
previous node may be a
+        // table; then trying to go left would skip the whole table. Split the 
trailing
+        // paragraph; let the section span over the first of the two resulting 
paragraphs;
+        // destroy the last section's paragraph afterwards.
+        xTextAppend->insertControlCharacter(
+            xCursor->getEnd(), css::text::ControlCharacter::PARAGRAPH_BREAK, 
false);
+        auto xNewPara = getParagraphOfRange(xCursor->getEnd());
+        xCursor->gotoPreviousParagraph(true);
+        auto xEndPara = getParagraphOfRange(xCursor->getEnd());
+        // xEndPara may already have properties (like page break); make sure 
to apply them
+        // to the newly appended paragraph, which will be kept in the end.
+        copyAllProps(xEndPara, xNewPara);
+
+        xSection = m_xTextDocument->createTextSection();
+        xSection->attach(xCursor);
+
+        // Remove the extra paragraph (last inside the section)
+        xEndPara->dispose();
+    }
+    catch(const uno::Exception&)
+    {
     }
-
     return xSection;
 }
 
@@ -5262,23 +5259,22 @@ void DomainMapper_Impl::PopShapeContext()
 
 bool DomainMapper_Impl::IsSdtEndBefore()
 {
-    bool bIsSdtEndBefore = false;
     PropertyMapPtr pContext = GetTopContextOfType(CONTEXT_CHARACTER);
-    if(pContext)
+    if(!pContext)
+        return false;
+    bool bIsSdtEndBefore = false;
+    const uno::Sequence< beans::PropertyValue > currentCharProps = 
pContext->GetPropertyValues();
+    for (const auto& rCurrentCharProp : currentCharProps)
     {
-        const uno::Sequence< beans::PropertyValue > currentCharProps = 
pContext->GetPropertyValues();
-        for (const auto& rCurrentCharProp : currentCharProps)
+        if (rCurrentCharProp.Name == "CharInteropGrabBag")
         {
-            if (rCurrentCharProp.Name == "CharInteropGrabBag")
+            uno::Sequence<beans::PropertyValue> aCharGrabBag;
+            rCurrentCharProp.Value >>= aCharGrabBag;
+            for (const auto& rProp : aCharGrabBag)
             {
-                uno::Sequence<beans::PropertyValue> aCharGrabBag;
-                rCurrentCharProp.Value >>= aCharGrabBag;
-                for (const auto& rProp : aCharGrabBag)
+                if(rProp.Name == "SdtEndBefore")
                 {
-                    if(rProp.Name == "SdtEndBefore")
-                    {
-                        rProp.Value >>= bIsSdtEndBefore;
-                    }
+                    rProp.Value >>= bIsSdtEndBefore;
                 }
             }
         }
@@ -5566,102 +5562,102 @@ static sal_Int16 lcl_ParseNumberingType( 
std::u16string_view rCommand )
         sNumber = o3tl::getToken(rCommand, 0, ' ', nStartIndex2);
     }
 
-    if( !sNumber.isEmpty() )
+    if( sNumber.isEmpty() )
+        return nRet;
+
+    //todo: might make sense to hash this list, too
+    struct NumberingPairs
     {
-        //todo: might make sense to hash this list, too
-        struct NumberingPairs
-        {
-            const char* cWordName;
-            sal_Int16 nType;
-        };
-        static const NumberingPairs aNumberingPairs[] =
-        {
-            {"Arabic", style::NumberingType::ARABIC}
-            ,{"ROMAN", style::NumberingType::ROMAN_UPPER}
-            ,{"roman", style::NumberingType::ROMAN_LOWER}
-            ,{"ALPHABETIC", style::NumberingType::CHARS_UPPER_LETTER}
-            ,{"alphabetic", style::NumberingType::CHARS_LOWER_LETTER}
-            ,{"CircleNum", style::NumberingType::CIRCLE_NUMBER}
-            ,{"ThaiArabic", style::NumberingType::CHARS_THAI}
-            ,{"ThaiCardText", style::NumberingType::CHARS_THAI}
-            ,{"ThaiLetter", style::NumberingType::CHARS_THAI}
+        const char* cWordName;
+        sal_Int16 nType;
+    };
+    static const NumberingPairs aNumberingPairs[] =
+    {
+        {"Arabic", style::NumberingType::ARABIC}
+        ,{"ROMAN", style::NumberingType::ROMAN_UPPER}
+        ,{"roman", style::NumberingType::ROMAN_LOWER}
+        ,{"ALPHABETIC", style::NumberingType::CHARS_UPPER_LETTER}
+        ,{"alphabetic", style::NumberingType::CHARS_LOWER_LETTER}
+        ,{"CircleNum", style::NumberingType::CIRCLE_NUMBER}
+        ,{"ThaiArabic", style::NumberingType::CHARS_THAI}
+        ,{"ThaiCardText", style::NumberingType::CHARS_THAI}
+        ,{"ThaiLetter", style::NumberingType::CHARS_THAI}
 //            ,{"SBCHAR", style::NumberingType::}
 //            ,{"DBCHAR", style::NumberingType::}
 //            ,{"DBNUM1", style::NumberingType::}
 //            ,{"DBNUM2", style::NumberingType::}
 //            ,{"DBNUM3", style::NumberingType::}
 //            ,{"DBNUM4", style::NumberingType::}
-            ,{"Aiueo", style::NumberingType::AIU_FULLWIDTH_JA}
-            ,{"Iroha", style::NumberingType::IROHA_FULLWIDTH_JA}
+        ,{"Aiueo", style::NumberingType::AIU_FULLWIDTH_JA}
+        ,{"Iroha", style::NumberingType::IROHA_FULLWIDTH_JA}
 //            ,{"ZODIAC1", style::NumberingType::}
 //            ,{"ZODIAC2", style::NumberingType::}
 //            ,{"ZODIAC3", style::NumberingType::}
 //            ,{"CHINESENUM1", style::NumberingType::}
 //            ,{"CHINESENUM2", style::NumberingType::}
 //            ,{"CHINESENUM3", style::NumberingType::}
-            ,{"ArabicAlpha", style::NumberingType::CHARS_ARABIC}
-            ,{"ArabicAbjad", style::NumberingType::FULLWIDTH_ARABIC}
-            ,{"Ganada", style::NumberingType::HANGUL_JAMO_KO}
-            ,{"Chosung", style::NumberingType::HANGUL_SYLLABLE_KO}
-            ,{"KoreanCounting", style::NumberingType::NUMBER_HANGUL_KO}
-            ,{"KoreanLegal", style::NumberingType::NUMBER_LEGAL_KO}
-            ,{"KoreanDigital", style::NumberingType::NUMBER_DIGITAL_KO}
-            ,{"KoreanDigital2", style::NumberingType::NUMBER_DIGITAL2_KO}
+        ,{"ArabicAlpha", style::NumberingType::CHARS_ARABIC}
+        ,{"ArabicAbjad", style::NumberingType::FULLWIDTH_ARABIC}
+        ,{"Ganada", style::NumberingType::HANGUL_JAMO_KO}
+        ,{"Chosung", style::NumberingType::HANGUL_SYLLABLE_KO}
+        ,{"KoreanCounting", style::NumberingType::NUMBER_HANGUL_KO}
+        ,{"KoreanLegal", style::NumberingType::NUMBER_LEGAL_KO}
+        ,{"KoreanDigital", style::NumberingType::NUMBER_DIGITAL_KO}
+        ,{"KoreanDigital2", style::NumberingType::NUMBER_DIGITAL2_KO}
 /* possible values:
 style::NumberingType::
 
-    CHARS_UPPER_LETTER_N
-    CHARS_LOWER_LETTER_N
-    TRANSLITERATION
-    NATIVE_NUMBERING
-    CIRCLE_NUMBER
-    NUMBER_LOWER_ZH
-    NUMBER_UPPER_ZH
-    NUMBER_UPPER_ZH_TW
-    TIAN_GAN_ZH
-    DI_ZI_ZH
-    NUMBER_TRADITIONAL_JA
-    AIU_HALFWIDTH_JA
-    IROHA_HALFWIDTH_JA
-    NUMBER_UPPER_KO
-    NUMBER_HANGUL_KO
-    HANGUL_JAMO_KO
-    HANGUL_SYLLABLE_KO
-    HANGUL_CIRCLED_JAMO_KO
-    HANGUL_CIRCLED_SYLLABLE_KO
-    CHARS_HEBREW
-    CHARS_NEPALI
-    CHARS_KHMER
-    CHARS_LAO
-    CHARS_TIBETAN
-    CHARS_CYRILLIC_UPPER_LETTER_BG
-    CHARS_CYRILLIC_LOWER_LETTER_BG
-    CHARS_CYRILLIC_UPPER_LETTER_N_BG
-    CHARS_CYRILLIC_LOWER_LETTER_N_BG
-    CHARS_CYRILLIC_UPPER_LETTER_RU
-    CHARS_CYRILLIC_LOWER_LETTER_RU
-    CHARS_CYRILLIC_UPPER_LETTER_N_RU
-    CHARS_CYRILLIC_LOWER_LETTER_N_RU
-    CHARS_CYRILLIC_UPPER_LETTER_SR
-    CHARS_CYRILLIC_LOWER_LETTER_SR
-    CHARS_CYRILLIC_UPPER_LETTER_N_SR
-    CHARS_CYRILLIC_LOWER_LETTER_N_SR
-    CHARS_CYRILLIC_UPPER_LETTER_UK
-    CHARS_CYRILLIC_LOWER_LETTER_UK
-    CHARS_CYRILLIC_UPPER_LETTER_N_UK
-    CHARS_CYRILLIC_LOWER_LETTER_N_UK*/
+CHARS_UPPER_LETTER_N
+CHARS_LOWER_LETTER_N
+TRANSLITERATION
+NATIVE_NUMBERING
+CIRCLE_NUMBER
+NUMBER_LOWER_ZH
+NUMBER_UPPER_ZH
+NUMBER_UPPER_ZH_TW
+TIAN_GAN_ZH
+DI_ZI_ZH
+NUMBER_TRADITIONAL_JA
+AIU_HALFWIDTH_JA
+IROHA_HALFWIDTH_JA
+NUMBER_UPPER_KO
+NUMBER_HANGUL_KO
+HANGUL_JAMO_KO
+HANGUL_SYLLABLE_KO
+HANGUL_CIRCLED_JAMO_KO
+HANGUL_CIRCLED_SYLLABLE_KO
+CHARS_HEBREW
+CHARS_NEPALI
+CHARS_KHMER
+CHARS_LAO
+CHARS_TIBETAN
+CHARS_CYRILLIC_UPPER_LETTER_BG
+CHARS_CYRILLIC_LOWER_LETTER_BG
+CHARS_CYRILLIC_UPPER_LETTER_N_BG
+CHARS_CYRILLIC_LOWER_LETTER_N_BG
+CHARS_CYRILLIC_UPPER_LETTER_RU
+CHARS_CYRILLIC_LOWER_LETTER_RU
+CHARS_CYRILLIC_UPPER_LETTER_N_RU
+CHARS_CYRILLIC_LOWER_LETTER_N_RU
+CHARS_CYRILLIC_UPPER_LETTER_SR
+CHARS_CYRILLIC_LOWER_LETTER_SR
+CHARS_CYRILLIC_UPPER_LETTER_N_SR
+CHARS_CYRILLIC_LOWER_LETTER_N_SR
+CHARS_CYRILLIC_UPPER_LETTER_UK
+CHARS_CYRILLIC_LOWER_LETTER_UK
+CHARS_CYRILLIC_UPPER_LETTER_N_UK
+CHARS_CYRILLIC_LOWER_LETTER_N_UK*/
 
-        };
-        for(const NumberingPairs& rNumberingPair : aNumberingPairs)
+    };
+    for(const NumberingPairs& rNumberingPair : aNumberingPairs)
+    {
+        if( /*sCommand*/sNumber.equalsAscii(rNumberingPair.cWordName ))
         {
-            if( /*sCommand*/sNumber.equalsAscii(rNumberingPair.cWordName ))
-            {
-                nRet = rNumberingPair.nType;
-                break;
-            }
+            nRet = rNumberingPair.nType;
+            break;
         }
-
     }
+
     return nRet;
 }
 
@@ -5671,24 +5667,22 @@ static OUString lcl_ParseFormat( const OUString& 
rCommand )
     //  The command looks like: " DATE \@"dd MMMM yyyy" or "09/02/2014"
     OUString command;
     sal_Int32 delimPos = rCommand.indexOf("\@");
-    if (delimPos != -1)
+    if (delimPos == -1)
+        return command;
+
+    // Remove whitespace permitted by standard between \@ and "
+    const sal_Int32 nQuoteIndex = rCommand.indexOf('\"');
+    if (nQuoteIndex != -1)
     {
-        // Remove whitespace permitted by standard between \@ and "
-        const sal_Int32 nQuoteIndex = rCommand.indexOf('\"');
-        if (nQuoteIndex != -1)
-        {
-            sal_Int32 wsChars = nQuoteIndex - delimPos - 2;
-            command = rCommand.replaceAt(delimPos+2, wsChars, u"");
-        }
-        else
-        {
-            // turn date \@ MM into date \@"MM"
-            command = OUString::Concat(rCommand.subView(0, delimPos + 2)) + 
"\"" + o3tl::trim(rCommand.subView(delimPos + 2)) + "\"";
-        }
-        return OUString(msfilter::util::findQuotedText(command, u"\@\"", 
'\"'));
+        sal_Int32 wsChars = nQuoteIndex - delimPos - 2;
+        command = rCommand.replaceAt(delimPos+2, wsChars, u"");
     }
-
-    return OUString();
+    else
+    {
+        // turn date \@ MM into date \@"MM"
+        command = OUString::Concat(rCommand.subView(0, delimPos + 2)) + "\"" + 
o3tl::trim(rCommand.subView(delimPos + 2)) + "\"";
+    }
+    return OUString(msfilter::util::findQuotedText(command, u"\@\"", '\"'));
 }
 /*-------------------------------------------------------------------------
 extract a parameter (with or without quotes) between the command and the 
following backslash
@@ -6138,21 +6132,21 @@ void DomainMapper_Impl::ChainTextFrames()
         //Finally - go through and attach the chains based on matching ID and 
incremented sequence number (dml-style).
         for (const auto& rOuter : chainingWPS)
         {
-                for (const auto& rInner : chainingWPS)
+            for (const auto& rInner : chainingWPS)
+            {
+                if (rInner.nId == rOuter.nId)
                 {
-                    if (rInner.nId == rOuter.nId)
+                    if (rInner.nSeq == (rOuter.nSeq + nDirection))
                     {
-                        if (rInner.nSeq == (rOuter.nSeq + nDirection))
-                        {
-                            uno::Reference<text::XTextContent> const 
xTextContent(rOuter.xShape, uno::UNO_QUERY_THROW);
-                            uno::Reference<beans::XPropertySet> 
xPropertySet(xTextContent, uno::UNO_QUERY);
+                        uno::Reference<text::XTextContent> const 
xTextContent(rOuter.xShape, uno::UNO_QUERY_THROW);
+                        uno::Reference<beans::XPropertySet> 
xPropertySet(xTextContent, uno::UNO_QUERY);
 
-                            //The reverse chaining happens automatically, so 
only one direction needs to be set
-                            xPropertySet->setPropertyValue(sChainNextName, 
uno::Any(rInner.shapeName));
-                            break ; //there cannot be more than one next frame
-                        }
+                        //The reverse chaining happens automatically, so only 
one direction needs to be set
+                        xPropertySet->setPropertyValue(sChainNextName, 
uno::Any(rInner.shapeName));
+                        break ; //there cannot be more than one next frame
                     }
                 }
+            }
         }
         m_vTextFramesForChaining.clear(); //clear the vector
     }
commit 65c0a263385d0104677ece672512bea4ae4633c0
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Feb 4 11:31:32 2026 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat Feb 7 12:35:56 2026 +0100

    no need to use SAL_WHERE when throwing exception
    
    we already add the source location to UNO exception messages
    
    Change-Id: I01e68faad85d144b41e0abd2df3c783750862654
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198650
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index d5e12cf4fa07..554cdbc397b1 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -47,12 +47,6 @@ using namespace com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::ucb;
 
-#if OSL_DEBUG_LEVEL > 0
-#define THROW_WHERE SAL_WHERE
-#else
-#define THROW_WHERE ""
-#endif
-
 class fileaccess::PropertyListeners
 {
     typedef 
comphelper::OInterfaceContainerHelper4<beans::XPropertiesChangeListener> 
ContainerHelper;
@@ -463,7 +457,7 @@ BaseContent::addProperty(
 {
     if( ( m_nState & JustInserted ) || ( m_nState & Deleted ) || 
Name.isEmpty() )
     {
-        throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< 
uno::XInterface >(), 0 );
+        throw lang::IllegalArgumentException( u""_ustr, uno::Reference< 
uno::XInterface >(), 0 );
     }
 
     m_pMyShell->associate( m_aUncPath,Name,DefaultValue,Attributes );
@@ -596,7 +590,7 @@ void SAL_CALL
 BaseContent::setParent(
     const Reference< XInterface >& )
 {
-    throw lang::NoSupportException( u"" THROW_WHERE ""_ustr );
+    throw lang::NoSupportException();
 }
 
 
@@ -768,12 +762,12 @@ BaseContent::setPropertyValues(
             OUString NewTitle;
             if( !( Values[i].Value >>= NewTitle ) )
             {
-                retRange[i] <<= beans::IllegalTypeException( u"" THROW_WHERE 
""_ustr );
+                retRange[i] <<= beans::IllegalTypeException();
                 break;
             }
             else if( NewTitle.isEmpty() )
             {
-                retRange[i] <<= lang::IllegalArgumentException( THROW_WHERE, 
uno::Reference< uno::XInterface >(), 0 );
+                retRange[i] <<= lang::IllegalArgumentException( u""_ustr, 
uno::Reference< uno::XInterface >(), 0 );
                 break;
             }
 
diff --git a/ucb/source/ucp/file/filcmd.cxx b/ucb/source/ucp/file/filcmd.cxx
index 1307670f77b3..ddbe70c4d1a3 100644
--- a/ucb/source/ucp/file/filcmd.cxx
+++ b/ucb/source/ucp/file/filcmd.cxx
@@ -29,12 +29,6 @@ using namespace fileaccess;
 using namespace com::sun::star;
 using namespace com::sun::star::ucb;
 
-#if OSL_DEBUG_LEVEL > 0
-#define THROW_WHERE SAL_WHERE
-#else
-#define THROW_WHERE ""
-#endif
-
 XCommandInfo_impl::XCommandInfo_impl( TaskManager* pMyShell )
     : m_pMyShell( pMyShell )
 {
@@ -86,7 +80,7 @@ XCommandInfo_impl::getCommandInfoByName(
     if (pCommand != std::cend(m_pMyShell->m_sCommandInfo))
         return *pCommand;
 
-    throw UnsupportedCommandException( u"" THROW_WHERE ""_ustr );
+    throw UnsupportedCommandException();
 }
 
 
@@ -99,7 +93,7 @@ XCommandInfo_impl::getCommandInfoByHandle(
     if (pCommand != std::cend(m_pMyShell->m_sCommandInfo))
         return *pCommand;
 
-    throw UnsupportedCommandException( u"" THROW_WHERE ""_ustr );
+    throw UnsupportedCommandException();
 }
 
 
diff --git a/ucb/source/ucp/file/filinpstr.cxx 
b/ucb/source/ucp/file/filinpstr.cxx
index a7ee43673995..cbb114763919 100644
--- a/ucb/source/ucp/file/filinpstr.cxx
+++ b/ucb/source/ucp/file/filinpstr.cxx
@@ -30,12 +30,6 @@
 using namespace fileaccess;
 using namespace com::sun::star;
 
-#if OSL_DEBUG_LEVEL > 0
-#define THROW_WHERE SAL_WHERE
-#else
-#define THROW_WHERE ""
-#endif
-
 XInputStream_impl::XInputStream_impl( const OUString& aUncPath, bool bLock )
     : m_aFile( aUncPath ),
       m_nErrorCode( TaskHandlerErr::NO_ERROR ),
@@ -80,7 +74,7 @@ XInputStream_impl::readBytes(
                  uno::Sequence< sal_Int8 >& aData,
                  sal_Int32 nBytesToRead )
 {
-    if( ! m_nIsOpen ) throw io::IOException( u"" THROW_WHERE ""_ustr );
+    if( ! m_nIsOpen ) throw io::IOException();
 
     aData.realloc(nBytesToRead);
         //TODO! translate memory exhaustion (if it were detectable...) into
@@ -89,7 +83,7 @@ XInputStream_impl::readBytes(
     sal_uInt64 nrc(0);
     if(m_aFile.read( aData.getArray(),sal_uInt64(nBytesToRead),nrc )
        != osl::FileBase::E_None)
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
 
     // Shrink aData in case we read less than nBytesToRead (XInputStream
     // documentation does not tell whether this is required, and I do not know
@@ -104,7 +98,7 @@ XInputStream_impl::readSomeBytes(
                  sal_Int8* aData,
                  sal_Int32 nBytesToRead )
 {
-    if( ! m_nIsOpen ) throw io::IOException( u"" THROW_WHERE ""_ustr );
+    if( ! m_nIsOpen ) throw io::IOException();
 
         //TODO! translate memory exhaustion (if it were detectable...) into
         // io::BufferSizeExceededException
@@ -112,7 +106,7 @@ XInputStream_impl::readSomeBytes(
     sal_uInt64 nrc(0);
     if(m_aFile.read( aData, sal_uInt64(nBytesToRead),nrc )
        != osl::FileBase::E_None)
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
 
     return static_cast<sal_Int32>(nrc);
 }
@@ -148,7 +142,7 @@ XInputStream_impl::closeInput()
     {
         osl::FileBase::RC err = m_aFile.close();
         if( err != osl::FileBase::E_None )
-            throw io::IOException( u"" THROW_WHERE ""_ustr );
+            throw io::IOException();
         m_nIsOpen = false;
     }
 }
@@ -158,9 +152,9 @@ void SAL_CALL
 XInputStream_impl::seek( sal_Int64 location )
 {
     if( location < 0 )
-        throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< 
uno::XInterface >(), 0 );
+        throw lang::IllegalArgumentException( u""_ustr, uno::Reference< 
uno::XInterface >(), 0 );
     if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( 
location ) ) )
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
 }
 
 
@@ -169,7 +163,7 @@ XInputStream_impl::getPosition()
 {
     sal_uInt64 uPos;
     if( osl::FileBase::E_None != m_aFile.getPos( uPos ) )
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
     return sal_Int64( uPos );
 }
 
@@ -178,7 +172,7 @@ XInputStream_impl::getLength()
 {
     sal_uInt64 uEndPos;
     if ( m_aFile.getSize(uEndPos) != osl::FileBase::E_None )
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
     return sal_Int64( uEndPos );
 }
 
diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx
index 066233aafc2f..bfbf25b4dafb 100644
--- a/ucb/source/ucp/file/filrow.cxx
+++ b/ucb/source/ucp/file/filrow.cxx
@@ -27,12 +27,6 @@ using namespace fileaccess;
 using namespace com::sun::star;
 using namespace css::uno;
 
-#if OSL_DEBUG_LEVEL > 0
-#define THROW_WHERE SAL_WHERE
-#else
-#define THROW_WHERE ""
-#endif
-
 // Function for TypeConverting
 
 template< class _type_ >
@@ -100,7 +94,7 @@ XRow_impl::getString(
              sal_Int32 columnIndex )
 {
   if( isIndexOutOfBounds( columnIndex ) )
-    throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+    throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface >(), 
OUString(), 0, uno::Any() );
   return getValue<OUString>(columnIndex);
 }
 
@@ -109,7 +103,7 @@ XRow_impl::getBoolean(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<bool>(columnIndex);
 }
 
@@ -119,7 +113,7 @@ XRow_impl::getByte(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<sal_Int8>(columnIndex);
 }
 
@@ -128,7 +122,7 @@ XRow_impl::getShort(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<sal_Int16>(columnIndex);
 }
 
@@ -138,7 +132,7 @@ XRow_impl::getInt(
           sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<sal_Int32>(columnIndex);
 }
 
@@ -147,7 +141,7 @@ XRow_impl::getLong(
            sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<sal_Int64>(columnIndex);
 }
 
@@ -156,7 +150,7 @@ XRow_impl::getFloat(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<float>(columnIndex);
 }
 
@@ -165,7 +159,7 @@ XRow_impl::getDouble(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<double>(columnIndex);
 }
 
@@ -174,7 +168,7 @@ XRow_impl::getBytes(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<uno::Sequence< sal_Int8 >>(columnIndex);
 }
 
@@ -183,7 +177,7 @@ XRow_impl::getDate(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<util::Date>(columnIndex);
 }
 
@@ -192,7 +186,7 @@ XRow_impl::getTime(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<util::Time>(columnIndex);
 }
 
@@ -201,7 +195,7 @@ XRow_impl::getTimestamp(
             sal_Int32 columnIndex )
 {
   if( isIndexOutOfBounds( columnIndex ) )
-    throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+    throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface >(), 
OUString(), 0, uno::Any() );
   return getValue<util::DateTime>(columnIndex);
 }
 
@@ -211,7 +205,7 @@ XRow_impl::getBinaryStream(
                sal_Int32 columnIndex )
 {
   if( isIndexOutOfBounds( columnIndex ) )
-    throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+    throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface >(), 
OUString(), 0, uno::Any() );
   return getValue<uno::Reference< io::XInputStream >>(columnIndex);
 }
 
@@ -221,7 +215,7 @@ XRow_impl::getCharacterStream(
                   sal_Int32 columnIndex )
 {
   if( isIndexOutOfBounds( columnIndex ) )
-      throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+      throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface >(), 
OUString(), 0, uno::Any() );
   return getValue<uno::Reference< io::XInputStream >>(columnIndex);
 }
 
@@ -232,7 +226,7 @@ XRow_impl::getObject(
     const uno::Reference< container::XNameAccess >& )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     std::scoped_lock aGuard( m_aMutex );
     uno::Any Value = m_aValueMap[columnIndex - 1];
     m_nWasNull = !Value.hasValue();
@@ -244,7 +238,7 @@ XRow_impl::getRef(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<uno::Reference< sdbc::XRef >>(columnIndex);
 }
 
@@ -253,7 +247,7 @@ XRow_impl::getBlob(
            sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<uno::Reference< sdbc::XBlob >>(columnIndex);
 }
 
@@ -262,7 +256,7 @@ XRow_impl::getClob(
            sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<uno::Reference< sdbc::XClob >>(columnIndex);
 }
 
@@ -272,7 +266,7 @@ XRow_impl::getArray(
     sal_Int32 columnIndex )
 {
     if( isIndexOutOfBounds( columnIndex ) )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     return getValue<uno::Reference< sdbc::XArray >>(columnIndex);
 }
 
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index a3a1fdb27850..165beb39ca4a 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -41,12 +41,6 @@
 using namespace fileaccess;
 using namespace com::sun::star;
 
-#if OSL_DEBUG_LEVEL > 0
-#define THROW_WHERE SAL_WHERE
-#else
-#define THROW_WHERE ""
-#endif
-
 XResultSet_impl::XResultSet_impl( TaskManager* pMyShell,
                                   const OUString& aUnqPath,
                                   sal_Int32 OpenMode,
@@ -222,7 +216,7 @@ XResultSet_impl::OneMore(std::unique_lock<std::mutex>& 
rGuard)
         }
         else  // error fetching anything
         {
-            throw sdbc::SQLException( THROW_WHERE, uno::Reference< 
uno::XInterface >(), OUString(), 0, uno::Any() );
+            throw sdbc::SQLException( u""_ustr, uno::Reference< 
uno::XInterface >(), OUString(), 0, uno::Any() );
         }
     }
 }
@@ -345,7 +339,7 @@ sal_Bool SAL_CALL
 XResultSet_impl::relative( sal_Int32 row )
 {
     if( isAfterLast() || isBeforeFirst() )
-        throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
+        throw sdbc::SQLException( u""_ustr, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
     if( row > 0 )
         while( row-- ) next();
     else if( row < 0 )
@@ -463,7 +457,7 @@ XResultSet_impl::getStaticResultSet()
     std::unique_lock aGuard( m_aMutex );
 
     if ( m_xListener.is() )
-        throw ucb::ListenerAlreadySetException( u"" THROW_WHERE ""_ustr );
+        throw ucb::ListenerAlreadySetException();
 
     return uno::Reference< sdbc::XResultSet >( this );
 }
@@ -477,7 +471,7 @@ XResultSet_impl::setListener(
     std::unique_lock aGuard( m_aMutex );
 
     if ( m_xListener.is() )
-        throw ucb::ListenerAlreadySetException( u"" THROW_WHERE ""_ustr );
+        throw ucb::ListenerAlreadySetException();
 
     m_xListener = Listener;
 
@@ -515,7 +509,7 @@ XResultSet_impl::connectToCache(
     {
         std::unique_lock aGuard( m_aMutex );
         if( m_xListener.is() )
-            throw ucb::ListenerAlreadySetException( u"" THROW_WHERE ""_ustr );
+            throw ucb::ListenerAlreadySetException();
     }
     uno::Reference< ucb::XSourceInitialization > xTarget(
         xCache, uno::UNO_QUERY );
@@ -539,7 +533,7 @@ XResultSet_impl::connectToCache(
             return;
         }
     }
-    throw ucb::ServiceNotFoundException( u"" THROW_WHERE ""_ustr );
+    throw ucb::ServiceNotFoundException();
 }
 
 
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index 4ecd466450e3..4dfb516e9e56 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -30,12 +30,6 @@
 using namespace fileaccess;
 using namespace com::sun::star;
 
-#if OSL_DEBUG_LEVEL > 0
-#define THROW_WHERE SAL_WHERE
-#else
-#define THROW_WHERE ""
-#endif
-
 
/******************************************************************************/
 /*                                                                            
*/
 /*               XStream_impl implementation                                  
*/
@@ -109,10 +103,10 @@ XStream_impl::getOutputStream(  )
 void SAL_CALL XStream_impl::truncate()
 {
     if (osl::FileBase::E_None != m_aFile.setSize(0))
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
 
     if (osl::FileBase::E_None != m_aFile.setPos(osl_Pos_Absolut,sal_uInt64(0)))
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
 }
 
 
@@ -125,7 +119,7 @@ XStream_impl::readBytes(
     sal_Int32 nBytesToRead )
 {
     if( ! m_nIsOpen )
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
 
     try
     {
@@ -134,14 +128,14 @@ XStream_impl::readBytes(
     catch (const std::bad_alloc&)
     {
         if( m_nIsOpen ) m_aFile.close();
-        throw io::BufferSizeExceededException( u"" THROW_WHERE ""_ustr );
+        throw io::BufferSizeExceededException();
     }
 
     sal_uInt64 nrc(0);
     if(m_aFile.read( aData.getArray(), sal_uInt64(nBytesToRead), nrc )
        != osl::FileBase::E_None)
     {
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
     }
     if (nrc != static_cast<sal_uInt64>(nBytesToRead))
         aData.realloc(nrc);
@@ -154,13 +148,13 @@ XStream_impl::readSomeBytes(
     sal_Int32 nBytesToRead )
 {
     if( ! m_nIsOpen )
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
 
     sal_uInt64 nrc(0);
     if(m_aFile.read( pData, sal_uInt64(nBytesToRead), nrc )
        != osl::FileBase::E_None)
     {
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
     }
     return static_cast<sal_Int32>(nrc);
 }
@@ -199,7 +193,7 @@ XStream_impl::writeBytes( const uno::Sequence< sal_Int8 >& 
aData )
         const sal_Int8* p = aData.getConstArray();
         if(osl::FileBase::E_None != m_aFile.write(static_cast<void const 
*>(p),sal_uInt64(length),nWrittenBytes) ||
            nWrittenBytes != length )
-            throw io::IOException( u"" THROW_WHERE ""_ustr );
+            throw io::IOException();
     }
 }
 
@@ -245,9 +239,9 @@ void SAL_CALL
 XStream_impl::seek( sal_Int64 location )
 {
     if( location < 0 )
-        throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< 
uno::XInterface >(), 0 );
+        throw lang::IllegalArgumentException( u""_ustr, uno::Reference< 
uno::XInterface >(), 0 );
     if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( 
location ) ) )
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
 }
 
 
@@ -256,7 +250,7 @@ XStream_impl::getPosition()
 {
     sal_uInt64 uPos;
     if( osl::FileBase::E_None != m_aFile.getPos( uPos ) )
-        throw io::IOException( u"" THROW_WHERE ""_ustr );
+        throw io::IOException();
     return sal_Int64( uPos );
 }
 
@@ -265,7 +259,7 @@ XStream_impl::getLength()
 {
     sal_uInt64 uEndPos;
     if ( m_aFile.getSize(uEndPos) != osl::FileBase::E_None )
-            throw io::IOException( u"" THROW_WHERE ""_ustr );
+            throw io::IOException();
     return sal_Int64( uEndPos );
 }
 
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index 05b0759c2220..8019e935d04b 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -70,12 +70,6 @@ using namespace com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::ucb;
 
-#if OSL_DEBUG_LEVEL > 0
-#define THROW_WHERE SAL_WHERE
-#else
-#define THROW_WHERE ""
-#endif
-
 TaskManager::UnqPathData::UnqPathData() = default;
 
 TaskManager::UnqPathData::UnqPathData(TaskManager::UnqPathData&&) = default;
@@ -542,7 +536,7 @@ TaskManager::associate( const OUString& aUnqPath,
 
     auto it1 = m_aDefaultProperties.find( newProperty );
     if( it1 != m_aDefaultProperties.end() )
-        throw beans::PropertyExistException( u"" THROW_WHERE ""_ustr );
+        throw beans::PropertyExistException();
 
     {
         std::unique_lock aGuard( m_aMutex );
@@ -555,7 +549,7 @@ TaskManager::associate( const OUString& aUnqPath,
         PropertySet& properties = it->second.properties;
         it1 = properties.find( newProperty );
         if( it1 != properties.end() )
-            throw beans::PropertyExistException(u"" THROW_WHERE ""_ustr );
+            throw beans::PropertyExistException();
 
         // Property does not exist
         properties.insert( newProperty );
@@ -573,7 +567,7 @@ TaskManager::deassociate( const OUString& aUnqPath,
 
     auto it1 = m_aDefaultProperties.find( oldProperty );
     if( it1 != m_aDefaultProperties.end() )
-        throw beans::NotRemoveableException( u"" THROW_WHERE ""_ustr );
+        throw beans::NotRemoveableException();
 
     std::unique_lock aGuard( m_aMutex );
 
@@ -855,7 +849,7 @@ TaskManager::setv( const OUString& aUnqPath,
         it1 = properties.find( toset );
         if( it1 == properties.end() )
         {
-            retRange[i] <<= beans::UnknownPropertyException( u"" THROW_WHERE 
""_ustr );
+            retRange[i] <<= beans::UnknownPropertyException();
             continue;
         }
 
@@ -865,7 +859,7 @@ TaskManager::setv( const OUString& aUnqPath,
 
         if( it1->getAttributes() & beans::PropertyAttribute::READONLY )
         {
-            retRange[i] <<= lang::IllegalAccessException( u"" THROW_WHERE 
""_ustr );
+            retRange[i] <<= lang::IllegalAccessException();
             continue;
         }
 
@@ -934,7 +928,7 @@ TaskManager::setv( const OUString& aUnqPath,
                     }
                 }
                 else
-                    retRange[i] <<= beans::IllegalTypeException( u"" 
THROW_WHERE ""_ustr );
+                    retRange[i] <<= beans::IllegalTypeException();
             }
             else if(values[i].Name == IsReadOnly ||
                     values[i].Name == IsHidden)
@@ -1041,7 +1035,7 @@ TaskManager::setv( const OUString& aUnqPath,
                     }
                 }
                 else
-                    retRange[i] <<= beans::IllegalTypeException( u"" 
THROW_WHERE ""_ustr );
+                    retRange[i] <<= beans::IllegalTypeException();
             }
         }
     }   // end for
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index aaad0607a482..0449942651d5 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -39,13 +39,6 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::ucb;
 
-#if OSL_DEBUG_LEVEL > 0
-#define THROW_WHERE SAL_WHERE
-#else
-#define THROW_WHERE ""
-#endif
-
-
 /****************************************************************************/
 /*                                                                          */
 /*                                                                          */
@@ -117,7 +110,7 @@ FileProvider::queryContent(
 
     if(  err )
     {
-        throw IllegalIdentifierException( u"" THROW_WHERE ""_ustr );
+        throw IllegalIdentifierException();
     }
 
     return Reference<XContent>(new BaseContent(m_pMyShell.get(), xIdentifier, 
aUnc));

Reply via email to