diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-10 09:39:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-10 13:19:07 +0200 |
commit | cea5df84466fb7cbecada6840b918d736f9b89c3 (patch) | |
tree | 6345a9458d8bdc22f5b0da554145cca2b3398683 /editeng/source | |
parent | 5de138edf041ea56652f8a41471f63859ef3318a (diff) |
loplugin:unusedmethods
Change-Id: I2890e29b3e18cdf7822bf93ee7c17cd8221497a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116971
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 1 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 69 |
2 files changed, 0 insertions, 70 deletions
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) { |