editeng/source/editeng/editdoc.cxx | 8 ++++++++ editeng/source/outliner/outliner.cxx | 8 ++++++++ 2 files changed, 16 insertions(+)
New commits: commit 070a5b039b181c380b1b9724a015314ff78c30ed Author: Gokce Kuler <gokceku...@gmail.com> AuthorDate: Mon Jul 5 01:02:59 2021 +0300 Commit: Gülşah Köse <gulsah.k...@collabora.com> CommitDate: Wed Jul 7 08:21:20 2021 +0200 tdf#57585 Add new bullet behaviour to impress Added the feature of removing bullets from blank lines and showing the bullet in a faded color on lines that have not yet added text. Change-Id: Ifb3beed7a0127d85660842555c85ceb466258441 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118450 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com> diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 2a7f43032245..99a7e22fbdc9 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -2258,6 +2258,9 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, bool bKeepEndingAttribs ) // for a new paragraph we like to have the bullet/numbering visible by default aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, true) ); + if(aPaM.GetNode()->Len() == 0) + aPaM.GetNode()->GetContentAttribs().GetItems().Put( SfxBoolItem(EE_PARA_BULLETSTATE, false)); + // ContentNode constructor copies also the paragraph attributes ContentNode* pNode = new ContentNode( aStr, aContentAttribs ); @@ -2307,6 +2310,11 @@ EditPaM EditDoc::InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem ) EditPaM EditDoc::ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight ) { const EditPaM aPaM( pLeft, pLeft->Len() ); + if(pLeft->Len()==0) + { + EditPaM aCopyPaM(aPaM); + aCopyPaM.GetNode()->GetContentAttribs().GetItems().Put( SfxBoolItem(EE_PARA_BULLETSTATE, true)); + } // First the attributes, otherwise nLen will not be correct! pLeft->AppendAttribs( pRight ); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 9c474131352c..49ac38415987 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -867,6 +867,8 @@ vcl::Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const aBulletFont.SetOrientation( Degree10(bVertical ? (IsTopToBottom() ? 2700 : 900) : 0) ); Color aColor( COL_AUTO ); + OUString sText = GetText(GetParagraph(nPara)); + if( !pEditEngine->IsFlatMode() && !( pEditEngine->GetControlWord() & EEControlBits::NOCOLORS ) ) { aColor = pFmt->GetBulletColor(); @@ -875,6 +877,12 @@ vcl::Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const if ( ( aColor == COL_AUTO ) || ( IsForceAutoColor() ) ) aColor = pEditEngine->GetAutoColor(); + if( sText.getLength()>0) + aColor.SetAlpha(255); + + else + aColor.SetAlpha(95); + aBulletFont.SetColor( aColor ); return aBulletFont; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits