diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 18 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmresultdialogs.cxx | 4 |
5 files changed, 12 insertions, 20 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 70d2819b3952..2afbfdadbd08 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1126,14 +1126,14 @@ void SwCursorShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, rnVirtNum = pPg? pPg->GetVirtPageNum() : 1; } -sal_uInt16 SwCursorShell::GetPageNumSeqNonEmpty(bool bAtCursorPos, bool bCalcFrame) +sal_uInt16 SwCursorShell::GetPageNumSeqNonEmpty() { SET_CURR_SHELL(this); // page number: first visible page or the one at the cursor - const SwContentFrame* pCFrame = GetCurrFrame(bCalcFrame); + const SwContentFrame* pCFrame = GetCurrFrame(/*bCalcFrame*/true); const SwPageFrame* pPg = nullptr; - if (!bAtCursorPos || !pCFrame || nullptr == (pPg = pCFrame->FindPageFrame())) + if (!pCFrame || nullptr == (pPg = pCFrame->FindPageFrame())) { pPg = Imp()->GetFirstVisPage(GetOut()); while (pPg && pPg->IsEmptyPage()) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index e9ae6c5fd588..77101984d429 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1900,7 +1900,7 @@ void DocxAttributeOutput::DoWriteFieldRunProperties( const SwTextNode * pNode, s // 3. output all other character properties SwWW8AttrIter aAttrIt( m_rExport, *pNode ); - aAttrIt.OutAttr( nPos, false, bWriteCombChars ); + aAttrIt.OutAttr( nPos, bWriteCombChars ); // 4. explicitly write the font-properties, to ensure all runs in the field have them // see tdf#66401 diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 51fe41d0458c..5bd578015214 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -381,14 +381,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) return nMinPos; } -static bool lcl_isFontsizeItem( const SfxPoolItem& rItem ) -{ - return ( rItem.Which( ) == RES_CHRATR_FONTSIZE || - rItem.Which( ) == RES_CHRATR_CJK_FONTSIZE || - rItem.Which( ) == RES_CHRATR_CTL_FONTSIZE ); -} - -void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby , bool bWriteCombChars) +void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bWriteCombChars) { m_rExport.AttrOutput().RTLAndCJKState( mbCharIsRTL, GetScript() ); @@ -498,8 +491,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby , bool bWriteCombChars for ( const auto& aRangeItem : aRangeItems ) { - if ( !bRuby || !lcl_isFontsizeItem( *(aRangeItem.second) ) ) - aExportItems[aRangeItem.first] = aRangeItem.second; + aExportItems[aRangeItem.first] = aRangeItem.second; } if ( !aExportItems.empty() ) @@ -2471,7 +2463,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) // Output the character attributes // #i51277# do this before writing flys at end of paragraph AttrOutput().StartRunProperties(); - aAttrIter.OutAttr( nCurrentPos ); + aAttrIter.OutAttr( nCurrentPos, false ); AttrOutput().EndRunProperties( pRedlineData ); } @@ -2514,7 +2506,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) // do it after WriteCR for an empty paragraph (otherwise // WW8_WrFkp::Append throws SPRMs away...) AttrOutput().StartRunProperties(); - aAttrIter.OutAttr( nCurrentPos ); + aAttrIter.OutAttr( nCurrentPos, false ); AttrOutput().EndRunProperties( pRedlineData ); } @@ -2583,7 +2575,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) if (0 != nEnd) { AttrOutput().StartRunProperties(); - aAttrIter.OutAttr( nCurrentPos ); + aAttrIter.OutAttr( nCurrentPos, false ); AttrOutput().EndRunProperties( pRedlineData ); } AttrOutput().RunText( aSavedSnippet, eChrSet ); diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 8845e9a09477..03e6411475d2 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -1505,7 +1505,7 @@ public: void NextPos() { if ( nCurrentSwPos < SAL_MAX_INT32 ) nCurrentSwPos = SearchNext( nCurrentSwPos + 1 ); } - void OutAttr( sal_Int32 nSwPos, bool bRuby = false, bool bWriteCombinedChars = false ); + void OutAttr( sal_Int32 nSwPos, bool bWriteCombinedChars ); virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override; virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override; int OutAttrWithRange(const SwTextNode& rNode, sal_Int32 nPos); diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index c14289d70ccf..2636527176a9 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -480,7 +480,7 @@ int documentStartPageNumber(SwMailMergeConfigItem* pConfigItem, int document, bo if (!bIgnoreEmpty) shell.GetPageNum(page, o3tl::temporary(sal_uInt16())); else - page = shell.GetPageNumSeqNonEmpty(true, true); + page = shell.GetPageNumSeqNonEmpty(); shell.Pop(SwCursorShell::PopMode::DeleteCurrent); return page; } @@ -506,7 +506,7 @@ int documentEndPageNumber(SwMailMergeConfigItem* pConfigItem, int document, bool if (!bIgnoreEmpty) shell.GetPageNum(page, o3tl::temporary(sal_uInt16())); else - page = shell.GetPageNumSeqNonEmpty(true, true); + page = shell.GetPageNumSeqNonEmpty(); shell.Pop(SwCursorShell::PopMode::DeleteCurrent); return page; } |