diff options
author | Andras Timar <andras.timar@collabora.com> | 2023-03-08 22:00:47 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-03-08 22:01:58 +0100 |
commit | 09b2c42e3085ba548b7e6ed6fa03afe6fc11c830 (patch) | |
tree | bf14e9d6379a17b0ecaa58ab69438a4aba2eb77a /editeng | |
parent | 0b689354e2a5d0b227cb6ea214f8d01a3d7826f7 (diff) |
Revert "editeng: add method SetSingleLineCharAttribs"
This reverts commit d73a947288788ee59a4a1a2f0b50ae1cb6e55cef.
Reason for revert: regression and change of behaviour of LO
Change-Id: I4b6bc353c6f74eb5d20c9bc2bac7d9881d24d168
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 5 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 1 | ||||
-rw-r--r-- | editeng/source/editeng/impedit5.cxx | 25 |
3 files changed, 0 insertions, 31 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index e8747e0323ef..615fca65028f 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1771,11 +1771,6 @@ const SfxPoolItem& EditEngine::GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich return pImpEditEngine->GetParaAttrib( nPara, nWhich ); } -void EditEngine::SetSingleLineCharAttribs(const EditTextObject* pTxtObj) -{ - pImpEditEngine->SetSingleLineCharAttribs(pTxtObj); -} - void EditEngine::SetCharAttribs(sal_Int32 nPara, const SfxItemSet& rSet) { EditSelection aSel(pImpEditEngine->ConvertSelection(nPara, 0, nPara, GetTextLen(nPara))); diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index b7a68fe1b0be..ed7b5b5e0dd8 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -919,7 +919,6 @@ public: SfxItemSet GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags = GetAttribsFlags::ALL ) const; SfxItemSet GetAttribs( EditSelection aSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ); void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, SetAttribsMode nSpecial = SetAttribsMode::NONE, bool bSetSelection = true ); - void SetSingleLineCharAttribs(const EditTextObject* pTxtObj); void RemoveCharAttribs( EditSelection aSel, EERemoveParaAttribsMode eMode, sal_uInt16 nWhich ); void RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false ); void SetFlatMode( bool bFlat ); diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index 030cb4e1277a..1fbb56a6e789 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -484,31 +484,6 @@ SfxItemSet ImpEditEngine::GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int return aAttribs; } -void ImpEditEngine::SetSingleLineCharAttribs(const EditTextObject* pTxtObj) -{ - assert(pTxtObj); - - int nCharOff = 0; - std::vector<EECharAttrib> aAttribs; - std::unique_ptr<SfxPoolItem> pPoolItem; - SfxItemSet aItemSet(GetEmptyItemSet()); - auto nParaCount = pTxtObj->GetParagraphCount(); - for (auto nPara = 0; nPara < nParaCount; nPara++) - { - pTxtObj->GetCharAttribs(nPara, aAttribs); - for (const auto& aAttrib : aAttribs) - { - pPoolItem.reset(aAttrib.pAttr->Clone()); - aItemSet.Put(std::move(pPoolItem)); - - SetAttribs(EditSelection(ConvertSelection(0, aAttrib.nStart + nCharOff, 0, aAttrib.nEnd + nCharOff)), - aItemSet); - aItemSet.ClearItem(aAttrib.pAttr->Which()); - } - nCharOff += pTxtObj->GetText(nPara).getLength() + 1; - aAttribs.clear(); - } -} void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, SetAttribsMode nSpecial, bool bSetSelection ) { |