[Libreoffice-commits] core.git: editeng/source oox/inc oox/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 10 11:19:45 UTC 2021


 editeng/source/editeng/impedit.hxx  |    1 
 editeng/source/editeng/impedit2.cxx |   69 ------------------------------------
 oox/inc/drawingml/textbody.hxx      |    2 -
 oox/source/drawingml/textbody.cxx   |    5 --
 4 files changed, 77 deletions(-)

New commits:
commit cea5df84466fb7cbecada6840b918d736f9b89c3
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 10 09:39:00 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jun 10 13:19:07 2021 +0200

    loplugin:unusedmethods
    
    Change-Id: I2890e29b3e18cdf7822bf93ee7c17cd8221497a5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116971
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 4a39269507ff..2c17b0882631 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -625,7 +625,6 @@ private:
     tools::Long GetXPos(const ParaPortion* pParaPortion, const EditLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false) const;
     tools::Long GetPortionXOffset(const ParaPortion* pParaPortion, const EditLine* pLine, sal_Int32 nTextPortion) const;
     sal_Int32 GetChar(const ParaPortion* pParaPortion, const EditLine* pLine, tools::Long nX, bool bSmart = true);
-    Range               GetInvalidYOffsets( ParaPortion* pPortion );
     Range GetLineXPosStartEnd( const ParaPortion* pParaPortion, const EditLine* pLine ) const;
 
     void                ParaAttribsToCharAttribs( ContentNode* pNode );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 05ae8ee6a464..14685e7e1314 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3869,75 +3869,6 @@ EditSelection ImpEditEngine::PasteText( uno::Reference< datatransfer::XTransfera
     return aNewSelection;
 }
 
-Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion )
-{
-    Range aRange( 0, 0 );
-
-    if ( pPortion->IsVisible() )
-    {
-        const SvxULSpaceItem& rULSpace = pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
-        const SvxLineSpacingItem& rLSItem = pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
-        sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SvxInterLineSpaceRule::Fix )
-                            ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
-
-        // only from the top ...
-        sal_Int32 nFirstInvalid = -1;
-        sal_Int32 nLine;
-        for ( nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
-        {
-            const EditLine& rL = pPortion->GetLines()[nLine];
-            if ( rL.IsInvalid() )
-            {
-                nFirstInvalid = nLine;
-                break;
-            }
-            if ( nLine && !aStatus.IsOutliner() )   // not the first line
-                aRange.Min() += nSBL;
-            aRange.Min() += rL.GetHeight();
-        }
-        OSL_ENSURE( nFirstInvalid != -1, "No invalid line found in GetInvalidYOffset(1)" );
-
-
-        // Syndicate and more ...
-        aRange.Max() = aRange.Min();
-        aRange.Max() += pPortion->GetFirstLineOffset();
-        if (nFirstInvalid >= 0)   // Only if the first line is invalid
-            aRange.Min() = aRange.Max();
-
-        sal_Int32 nLastInvalid = pPortion->GetLines().Count()-1;
-        if (nFirstInvalid >= 0)
-        {
-            for ( nLine = nFirstInvalid; nLine < pPortion->GetLines().Count(); nLine++ )
-            {
-                const EditLine& rL = pPortion->GetLines()[nLine];
-                if ( rL.IsValid() )
-                {
-                    nLastInvalid = nLine;
-                    break;
-                }
-                if ( nLine && !aStatus.IsOutliner() )
-                    aRange.Max() += nSBL;
-                aRange.Max() += rL.GetHeight();
-            }
-
-            sal_uInt16 nPropLineSpace = rLSItem.GetPropLineSpace();
-            if ( ( rLSItem.GetInterLineSpaceRule() == SvxInterLineSpaceRule::Prop )
-                && nPropLineSpace && ( nPropLineSpace < 100 ) )
-            {
-                const EditLine& rL = pPortion->GetLines()[nFirstInvalid];
-                auto n = rL.GetTxtHeight() * ( 100 - nPropLineSpace );
-                n /= 100;
-                aRange.Min() -= n;
-                aRange.Max() += n;
-            }
-
-            if ( ( nLastInvalid == pPortion->GetLines().Count()-1 ) && ( !aStatus.IsOutliner() ) )
-                aRange.Max() += GetYValue( rULSpace.GetLower() );
-        }
-    }
-    return aRange;
-}
-
 sal_Int32 ImpEditEngine::GetChar(
     const ParaPortion* pParaPortion, const EditLine* pLine, tools::Long nXPos, bool bSmart)
 {
diff --git a/oox/inc/drawingml/textbody.hxx b/oox/inc/drawingml/textbody.hxx
index 093642f30d97..ac6c66b49515 100644
--- a/oox/inc/drawingml/textbody.hxx
+++ b/oox/inc/drawingml/textbody.hxx
@@ -46,8 +46,6 @@ public:
 
     const TextParagraphVector&          getParagraphs() const { return maParagraphs; }
     TextParagraph&                      addParagraph();
-    /// Appends an existing paragraph to this text body.
-    void appendParagraph(std::shared_ptr<TextParagraph> pTextParagraph);
 
     const TextListStyle&                getTextListStyle() const { return maTextListStyle; }
     TextListStyle&                      getTextListStyle() { return maTextListStyle; }
diff --git a/oox/source/drawingml/textbody.cxx b/oox/source/drawingml/textbody.cxx
index c6abacf7d485..1326c790328f 100644
--- a/oox/source/drawingml/textbody.cxx
+++ b/oox/source/drawingml/textbody.cxx
@@ -48,11 +48,6 @@ TextParagraph& TextBody::addParagraph()
     return *xPara;
 }
 
-void TextBody::appendParagraph(std::shared_ptr<TextParagraph> pTextParagraph)
-{
-    maParagraphs.push_back(pTextParagraph);
-}
-
 void TextBody::insertAt(
         const ::oox::core::XmlFilterBase& rFilterBase,
         const Reference < XText > & xText,


More information about the Libreoffice-commits mailing list