diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:29:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:29:03 +0000 |
commit | 5a7157d319477830426797532e02ac39d3b859f4 (patch) | |
tree | 3773f5ce209bee14a5643e98672e0f3828c71434 /sw/source/core/doc | |
parent | Releasing progress-linux version 4:24.2.0-3~progress7.99u1. (diff) | |
download | libreoffice-5a7157d319477830426797532e02ac39d3b859f4.tar.xz libreoffice-5a7157d319477830426797532e02ac39d3b859f4.zip |
Merging upstream version 4:24.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r-- | sw/source/core/doc/DocumentSettingManager.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/doc/docdraw.cxx | 17 | ||||
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 6 |
5 files changed, 39 insertions, 23 deletions
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index ebe116c682..baa0f29326 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -192,6 +192,7 @@ bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id) const case DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION: return mbConsiderWrapOnObjPos; case DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK: return mbDoNotJustifyLinesWithManualBreak; case DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING: return mbIgnoreFirstLineIndentInNumbering; + case DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER: return mbNoGapAfterNoteNumber; case DocumentSettingId::TABLE_ROW_KEEP: return mbTableRowKeep; case DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION: return mbIgnoreTabsAndBlanksForLineCalculation; case DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE: return mbDoNotCaptureDrawObjsOnPage; @@ -337,6 +338,9 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo case DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING: mbIgnoreFirstLineIndentInNumbering = value; break; + case DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER: + mbNoGapAfterNoteNumber = value; + break; case DocumentSettingId::TABLE_ROW_KEEP: mbTableRowKeep = value; @@ -697,6 +701,7 @@ void sw::DocumentSettingManager::ReplaceCompatibilityOptions(const DocumentSetti mbStylesNoDefault = rSource.mbStylesNoDefault; mbOldNumbering = rSource.mbOldNumbering; mbIgnoreFirstLineIndentInNumbering = rSource.mbIgnoreFirstLineIndentInNumbering; + mbNoGapAfterNoteNumber = rSource.mbNoGapAfterNoteNumber; mbDoNotJustifyLinesWithManualBreak = rSource.mbDoNotJustifyLinesWithManualBreak; mbDoNotResetParaAttrsForNumFont = rSource.mbDoNotResetParaAttrsForNumFont; mbTableRowKeep = rSource.mbTableRowKeep; @@ -880,6 +885,12 @@ void sw::DocumentSettingManager::dumpAsXml(xmlTextWriterPtr pWriter) const BAD_CAST(OString::boolean(mbIgnoreFirstLineIndentInNumbering).getStr())); (void)xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("mbNoGapAfterNoteNumber")); + (void)xmlTextWriterWriteAttribute( + pWriter, BAD_CAST("value"), + BAD_CAST(OString::boolean(mbNoGapAfterNoteNumber).getStr())); + (void)xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("mbDoNotJustifyLinesWithManualBreak")); (void)xmlTextWriterWriteAttribute( pWriter, BAD_CAST("value"), diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 00681135b4..730da32625 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1410,6 +1410,16 @@ namespace sw::mark return IDocumentMarkAccess::iterator(ret); } + // find the first Mark that does not start before + IDocumentMarkAccess::const_iterator_t MarkManager::findFirstMarkNotStartsBefore(const SwPosition& rPos) const + { + return std::lower_bound( + m_vAllMarks.begin(), + m_vAllMarks.end(), + rPos, + CompareIMarkStartsBefore()); + } + IDocumentMarkAccess::const_iterator_t MarkManager::getAllMarksBegin() const { return m_vAllMarks.begin(); } diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index aecbe2ac82..521ca2b0ba 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -463,14 +463,17 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr ) { - SwDrawContact *pC = static_cast<SwDrawContact*>(GetUserCall(pObj)); - SwDrawFrameFormat *pFrameFormat = static_cast<SwDrawFrameFormat*>(pC->GetFormat()); - if( pFrameFormat && - RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() ) + if (SwDrawContact* pC = static_cast<SwDrawContact*>(GetUserCall(pObj))) { - rDrawView.MarkObj( pObj, rDrawView.Imp().GetPageView(), true ); - --i; - getIDocumentLayoutAccess().DelLayoutFormat( pFrameFormat ); + SwDrawFrameFormat* pFrameFormat + = static_cast<SwDrawFrameFormat*>(pC->GetFormat()); + if (pFrameFormat + && RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId()) + { + rDrawView.MarkObj(pObj, rDrawView.Imp().GetPageView(), true); + --i; + getIDocumentLayoutAccess().DelLayoutFormat(pFrameFormat); + } } } } diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 57c42c529e..d6c943dbcd 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -25,10 +25,10 @@ #include <editeng/lrspitem.hxx> #include <editeng/formatbreakitem.hxx> #include <editeng/rsiditem.hxx> -#include <editeng/colritem.hxx> #include <officecfg/Office/Common.hxx> #include <osl/diagnose.h> #include <svl/zforlist.hxx> +#include <svx/DocumentColorHelper.hxx> #include <comphelper/processfactory.hxx> #include <unotools/configmgr.hxx> #include <sal/log.hxx> @@ -2036,17 +2036,11 @@ std::set<Color> SwDoc::GetDocColors() { std::set<Color> aDocColors; SwAttrPool& rPool = GetAttrPool(); - const sal_uInt16 pAttribs[] = {RES_CHRATR_COLOR, RES_CHRATR_HIGHLIGHT, RES_BACKGROUND}; - for (sal_uInt16 nAttrib : pAttribs) - { - for (const SfxPoolItem* pItem : rPool.GetItemSurrogates(nAttrib)) - { - auto pColorItem = static_cast<const SvxColorItem*>(pItem); - Color aColor( pColorItem->GetValue() ); - if (COL_AUTO != aColor) - aDocColors.insert(aColor); - } - } + + svx::DocumentColorHelper::queryColors<SvxColorItem>(RES_CHRATR_COLOR, &rPool, aDocColors); + svx::DocumentColorHelper::queryColors<SvxBrushItem>(RES_CHRATR_HIGHLIGHT, &rPool, aDocColors); + svx::DocumentColorHelper::queryColors<SvxBrushItem>(RES_CHRATR_BACKGROUND, &rPool, aDocColors); + return aDocColors; } diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 2ecea30dc3..ebbefd9738 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -554,10 +554,8 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, for(SwAnchoredObject* pAnchoredObj : rObjs) { SwFrameFormat *pFly; - if ( pAnchoredObj->DynCastFlyFrame() != nullptr ) - pFly = &(pAnchoredObj->GetFrameFormat()); - else if ( bDrawAlso ) - pFly = &(pAnchoredObj->GetFrameFormat()); + if (bDrawAlso || pAnchoredObj->DynCastFlyFrame()) + pFly = pAnchoredObj->GetFrameFormat(); else continue; |