tdf#163634 Format empty paragraph if they have a bullet/numbering
Some optimization in commit 52abeff6d5836b29dbefe69f284bbd89f6672ae2 ignores paragph attributes if the paragraph is empty. But it is not empty if it has an active list. Change-Id: I8885d0f201fc48279263a3d41ec6d660b534ded2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178311 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
This commit is contained in:
parent
cc65bec38c
commit
fdb13df0cb
@ -69,6 +69,8 @@ public:
|
||||
|
||||
virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ) override;
|
||||
|
||||
sal_Int16 GetDepth( sal_Int32 nPara ) const;
|
||||
|
||||
/// @returns state of the SdrCompatibilityFlag
|
||||
std::optional<bool> GetCompatFlag(SdrCompatibilityFlag eFlag) const;
|
||||
|
||||
|
@ -75,6 +75,7 @@
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <fstream>
|
||||
#include <outleeng.hxx>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
@ -4501,10 +4502,17 @@ bool ImpEditEngine::isInEmptyClusterAtTheEnd(ParaPortion& rPortion)
|
||||
return false;
|
||||
|
||||
sal_Int32 nCurrent = rParagraphs.lastIndex();
|
||||
|
||||
while (nCurrent > 0 && rParagraphs.getRef(nCurrent).IsEmpty())
|
||||
{
|
||||
if (nCurrent == nPortion)
|
||||
return true;
|
||||
{
|
||||
OutlinerEditEng* pOutlEditEng{ dynamic_cast<OutlinerEditEng*>(mpEditEngine)};
|
||||
if (pOutlEditEng)
|
||||
return pOutlEditEng->GetDepth(nCurrent) < 0;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
nCurrent--;
|
||||
}
|
||||
return false;
|
||||
|
@ -191,4 +191,9 @@ void OutlinerEditEng::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet )
|
||||
pOwner->UndoActionEnd();
|
||||
}
|
||||
|
||||
sal_Int16 OutlinerEditEng::GetDepth(sal_Int32 nPara) const
|
||||
{
|
||||
return pOwner->GetDepth(nPara);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
Loading…
x
Reference in New Issue
Block a user