diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2016-11-29 18:48:15 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2016-11-29 20:46:53 +0000 |
commit | bbda0736edb3c3c0e57e0d6abcd47accfbfe790f (patch) | |
tree | 1bcdcdbfdfde57e70c18d573d0bd76df2acc7f91 /sw | |
parent | 0d9a7d03e325d8b7487c08e9448c8a6890821866 (diff) |
Use derived classes' methods instead of Pair::A/B
Change-Id: I7ffd9a23dbd00672630bc8412e95525a920c5065
Reviewed-on: https://gerrit.libreoffice.org/31379
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/bastyp/swrect.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 16 | ||||
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 16 |
4 files changed, 20 insertions, 20 deletions
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx index 175c73beb74c..120b0d5df7bb 100644 --- a/sw/source/core/bastyp/swrect.cxx +++ b/sw/source/core/bastyp/swrect.cxx @@ -216,9 +216,9 @@ void SwRect::SetBottomAndHeight( long nBottom, long nNew ) void SwRect::SetUpperLeftCorner( const Point& rNew ) { m_Point = rNew; } void SwRect::SetUpperRightCorner( const Point& rNew ) - { m_Point = Point(rNew.A() - m_Size.getWidth(), rNew.B()); } + { m_Point = Point(rNew.X() - m_Size.getWidth(), rNew.Y()); } void SwRect::SetLowerLeftCorner( const Point& rNew ) - { m_Point = Point(rNew.A(), rNew.B() - m_Size.getHeight()); } + { m_Point = Point(rNew.X(), rNew.Y() - m_Size.getHeight()); } #ifdef DBG_UTIL SvStream& WriteSwRect(SvStream &rStream, const SwRect &rRect) diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 0f467d28e713..2db0f1997ef7 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -748,22 +748,22 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor, aSize.Height() = nTmp; if ( 1 == GetDirection() ) { - aPoint.A() = X() - rPor.GetAscent(); - aPoint.B() = Y() - aSize.Height(); + aPoint.X() = X() - rPor.GetAscent(); + aPoint.Y() = Y() - aSize.Height(); } else { - aPoint.A() = X() - rPor.Height() + rPor.GetAscent(); - aPoint.B() = Y(); + aPoint.X() = X() - rPor.Height() + rPor.GetAscent(); + aPoint.Y() = Y(); } } else { - aPoint.A() = X(); + aPoint.X() = X(); if ( GetTextFrame()->IsVertLR() ) - aPoint.B() = Y() - rPor.Height() + rPor.GetAscent(); + aPoint.Y() = Y() - rPor.Height() + rPor.GetAscent(); else - aPoint.B() = Y() - rPor.GetAscent(); + aPoint.Y() = Y() - rPor.GetAscent(); } // Adjust x coordinate if we are inside a bidi portion @@ -772,7 +772,7 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor, ( bFrameDir && DIR_LEFT2RIGHT == GetDirection() ); if ( bCounterDir ) - aPoint.A() -= aSize.Width(); + aPoint.X() -= aSize.Width(); SwRect aRect( aPoint, aSize ); diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index eb0aaac0be13..32eebd796318 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2026,8 +2026,8 @@ void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat if( pSdrObj ) { Point aPos( pSdrObj->GetRelativePos() ); - nXPos = aPos.A(); - nYPos = aPos.B(); + nXPos = aPos.X(); + nYPos = aPos.Y(); } bOutXPos = bOutYPos = true; } diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 1ba8da31965d..6e7de7dcc844 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1570,17 +1570,17 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt ) { const Selection& rSel = GetSelection(); const sal_Int32 nTextLen = GetText().getLength(); - if((rSel.A() == rSel.B() && - !rSel.A()) || rSel.A() == nTextLen ) + if((rSel.Min() == rSel.Max() && + !rSel.Min()) || rSel.Min() == nTextLen ) { bool bCall = false; vcl::KeyCode aCode = rKEvt.GetKeyCode(); - if(aCode.GetCode() == KEY_RIGHT && rSel.A() == nTextLen) + if(aCode.GetCode() == KEY_RIGHT && rSel.Min() == nTextLen) { bNextControl = true; bCall = true; } - else if(aCode.GetCode() == KEY_LEFT && !rSel.A() ) + else if(aCode.GetCode() == KEY_LEFT && !rSel.Min() ) { bNextControl = false; bCall = true; @@ -3080,8 +3080,8 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken& aSel.Justify(); const OUString sEditText = static_cast<SwTOXEdit*>(pActiveCtrl.get())->GetText(); - const OUString sLeft = sEditText.copy( 0, aSel.A() ); - const OUString sRight = sEditText.copy( aSel.B() ); + const OUString sLeft = sEditText.copy( 0, aSel.Min() ); + const OUString sRight = sEditText.copy( aSel.Max() ); static_cast<SwTOXEdit*>(pActiveCtrl.get())->SetText(sLeft); static_cast<SwTOXEdit*>(pActiveCtrl.get())->AdjustSize(); @@ -3511,8 +3511,8 @@ IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton&, rBtn, void ) { const sal_Int32 nLen = static_cast<SwTOXEdit*>(pCtrlFocus)->GetText().getLength(); - aSel.A() = nLen; - aSel.B() = nLen; + aSel.Min() = nLen; + aSel.Max() = nLen; } static_cast<SwTOXEdit*>(pCtrlFocus)->SetSelection(aSel); |