[Libreoffice-commits] core.git: accessibility/inc basctl/source cui/source editeng/source emfio/source extensions/source filter/source formula/source include/editeng
Noel Grandin
noel.grandin at collabora.co.uk
Thu Mar 1 06:19:35 UTC 2018
accessibility/inc/helper/listboxhelper.hxx | 4 ++--
basctl/source/basicide/layout.cxx | 5 ++++-
cui/source/dialogs/hangulhanjadlg.cxx | 6 ++++--
cui/source/inc/grfpage.hxx | 8 ++++----
editeng/source/editeng/impedit.cxx | 3 ++-
editeng/source/editeng/impedit2.cxx | 3 ++-
editeng/source/items/numitem.cxx | 8 ++++++--
editeng/source/uno/unofored.cxx | 10 ++++++++--
editeng/source/uno/unoforou.cxx | 10 ++++++++--
emfio/source/reader/mtftools.cxx | 6 +++---
extensions/source/propctrlr/standardcontrol.cxx | 5 ++++-
filter/source/graphicfilter/ios2met/ios2met.cxx | 4 ++--
filter/source/svg/svgwriter.cxx | 3 ++-
formula/source/ui/dlg/structpg.cxx | 2 +-
include/editeng/outliner.hxx | 6 +++---
include/editeng/paperinf.hxx | 4 ++--
16 files changed, 57 insertions(+), 30 deletions(-)
New commits:
commit b8ececb409cd94b24d71f29339e652857dd2063a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Feb 27 17:10:36 2018 +0200
drop old tools/gen methods in accessibility..formula
Change-Id: I075e29173945200854f2ef8e420867871659766a
Reviewed-on: https://gerrit.libreoffice.org/50446
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/accessibility/inc/helper/listboxhelper.hxx b/accessibility/inc/helper/listboxhelper.hxx
index ba6ad5c750ee..346fdf6a9ecb 100644
--- a/accessibility/inc/helper/listboxhelper.hxx
+++ b/accessibility/inc/helper/listboxhelper.hxx
@@ -65,9 +65,9 @@ public:
{
tools::Rectangle aTemp = m_aComboListBox.GetDropDownPosSizePixel();
Size aSize = aTemp.GetSize();
- aSize.Height() /= m_aComboListBox.GetDisplayLineCount();
+ aSize.setHeight( aSize.Height() / m_aComboListBox.GetDisplayLineCount() );
Point aTopLeft = aTemp.TopLeft();
- aTopLeft.Y() += aSize.Height() * ( nItem - m_aComboListBox.GetTopEntry() );
+ aTopLeft.AdjustY( aSize.Height() * ( nItem - m_aComboListBox.GetTopEntry() ) );
aRect = tools::Rectangle( aTopLeft, aSize );
}
else
diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx
index 54195c564898..57d5a9369753 100644
--- a/basctl/source/basicide/layout.cxx
+++ b/basctl/source/basicide/layout.cxx
@@ -349,7 +349,10 @@ void Layout::SplittedSide::ArrangeIn (tools::Rectangle const& rRect)
{
Item& rItem = vItems[iLastWin];
Size aSize = rItem.pWin->GetDockingSize();
- (bVertical ? aSize.Height() : aSize.Width()) += nLength - rItem.nEndPos;
+ if (bVertical)
+ aSize.AdjustHeight( nLength - rItem.nEndPos );
+ else
+ aSize.AdjustWidth( nLength - rItem.nEndPos );
rItem.pWin->ResizeIfDocking(aSize);
// and hiding the split line after the window
if (iLastWin < vItems.size() - 1)
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 64870256f944..9f66d58eef85 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -140,8 +140,10 @@ namespace svx
sal_Int32 nCombinedWidth = std::max( aSecondaryRect.GetWidth(), aPrimaryRect.GetWidth() );
// the rectangle where both texts will reside is as high as possible, and as wide as the
// widest of both text rects
- aPrimaryRect.Left() = aSecondaryRect.Left() = _rRect.Left();
- aPrimaryRect.Right() = aSecondaryRect.Right() = _rRect.Left() + nCombinedWidth;
+ aPrimaryRect.SetLeft( _rRect.Left() );
+ aSecondaryRect.SetLeft( aPrimaryRect.Left() );
+ aPrimaryRect.SetRight( _rRect.Left() + nCombinedWidth );
+ aSecondaryRect.SetRight( aPrimaryRect.Right() );
if (DrawTextFlags::Right & _nTextStyle)
{
// move the rectangles to the right
diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index 452dcbd7e9e4..87096615db68 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -39,10 +39,10 @@ public:
virtual void Resize() override;
virtual Size GetOptimalSize() const override;
- void SetTop( long nVal ) { aTopLeft.X() = nVal; }
- void SetBottom( long nVal ) { aBottomRight.X() = nVal; }
- void SetLeft( long nVal ) { aTopLeft.Y() = nVal; }
- void SetRight( long nVal) { aBottomRight.Y() = nVal; }
+ void SetTop( long nVal ) { aTopLeft.setX(nVal); }
+ void SetBottom( long nVal ) { aBottomRight.setX(nVal); }
+ void SetLeft( long nVal ) { aTopLeft.setY(nVal); }
+ void SetRight( long nVal) { aBottomRight.setY(nVal); }
void SetFrameSize( const Size& rSz );
void SetGraphic( const Graphic& rGrf ) { aGrf = rGrf; }
};
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index dd21886c78e1..2cb670cd73fe 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -907,7 +907,8 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
if ( aPaM.GetNode()->Len() && ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) )
{
// If we are behind a portion, and the next portion has other direction, we must change position...
- aEditCursor.Left() = aEditCursor.Right() = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly|GetCursorFlags::PreferPortionStart ).Left();
+ aEditCursor.SetLeft( pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly|GetCursorFlags::PreferPortionStart ).Left() );
+ aEditCursor.SetRight( aEditCursor.Left() );
sal_Int32 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, true );
const TextPortion& rTextPortion = pParaPortion->GetTextPortions()[nTextPortion];
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 695914548927..a79595251755 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4248,7 +4248,8 @@ tools::Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32
nX = GetXPos( pPortion, pLine, nIndex, bool( nFlags & GetCursorFlags::PreferPortionStart ) );
}
- aEditCursor.Left() = aEditCursor.Right() = nX;
+ aEditCursor.SetLeft(nX);
+ aEditCursor.SetRight(nX);
if ( nFlags & GetCursorFlags::TextOnly )
aEditCursor.SetTop( aEditCursor.Bottom() - pLine->GetTxtHeight() + 1 );
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 3e5fc65907ea..c65c4e5f5e02 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -407,7 +407,10 @@ void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem,
if(pSize)
aGraphicSize = *pSize;
else
- aGraphicSize.Width() = aGraphicSize.Height() = 0;
+ {
+ aGraphicSize.setWidth(0);
+ aGraphicSize.setHeight(0);
+ }
}
void SvxNumberFormat::SetGraphic( const OUString& rName )
@@ -419,7 +422,8 @@ void SvxNumberFormat::SetGraphic( const OUString& rName )
if( eVertOrient == text::VertOrientation::NONE )
eVertOrient = text::VertOrientation::TOP;
- aGraphicSize.Width() = aGraphicSize.Height() = 0;
+ aGraphicSize.setWidth(0);
+ aGraphicSize.setHeight(0);
}
sal_Int16 SvxNumberFormat::GetVertOrient() const
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index ebb27a72267b..450fadcce02b 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -290,7 +290,10 @@ tools::Rectangle SvxEditEngineForwarder::GetCharBounds( sal_Int32 nPara, sal_Int
// EditEngine's 'internal' methods like GetCharacterBounds()
// don't rotate for vertical text.
Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() );
- std::swap( aSize.Width(), aSize.Height() );
+ // swap width and height
+ long tmp = aSize.Width();
+ aSize.setWidth(aSize.Height());
+ aSize.setHeight(tmp);
bool bIsVertical( rEditEngine.IsVertical() );
// #108900# Handle virtual position one-past-the end of the string
@@ -372,7 +375,10 @@ OutputDevice* SvxEditEngineForwarder::GetRefDevice() const
bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nPara, sal_Int32& nIndex ) const
{
Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() );
- std::swap( aSize.Width(), aSize.Height() );
+ // swap width and height
+ long tmp = aSize.Width();
+ aSize.setWidth(aSize.Height());
+ aSize.setHeight(tmp);
Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos,
aSize,
rEditEngine.IsVertical() ));
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index 665e57675f9c..04267165fe55 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -291,7 +291,10 @@ tools::Rectangle SvxOutlinerForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32
// EditEngine's 'internal' methods like GetCharacterBounds()
// don't rotate for vertical text.
Size aSize( rOutliner.CalcTextSize() );
- std::swap( aSize.Width(), aSize.Height() );
+ // swap width and height
+ long tmp = aSize.Width();
+ aSize.setWidth(aSize.Height());
+ aSize.setHeight(tmp);
bool bIsVertical( rOutliner.IsVertical() );
// #108900# Handle virtual position one-past-the end of the string
@@ -368,7 +371,10 @@ OutputDevice* SvxOutlinerForwarder::GetRefDevice() const
bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nPara, sal_Int32& nIndex ) const
{
Size aSize( rOutliner.CalcTextSize() );
- std::swap( aSize.Width(), aSize.Height() );
+ // swap width and height
+ long tmp = aSize.Width();
+ aSize.setWidth(aSize.Height());
+ aSize.setHeight(tmp);
Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos,
aSize,
rOutliner.IsVertical() ));
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index a6caafd8cfe0..458386a3494f 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -1566,13 +1566,13 @@ namespace emfio
if ( mnTextAlign & TA_RIGHT_CENTER )
{
Point aDisplacement( ( ( mnTextAlign & TA_RIGHT_CENTER ) == TA_RIGHT ) ? nTextWidth : nTextWidth >> 1, 0 );
- Point().RotateAround(aDisplacement.X(), aDisplacement.Y(), maFont.GetOrientation());
+ Point().RotateAround(aDisplacement, maFont.GetOrientation());
rPosition -= aDisplacement;
}
if( mnTextAlign & TA_UPDATECP )
{
- Point().RotateAround(aActPosDelta.X(), aActPosDelta.Y(), maFont.GetOrientation());
+ Point().RotateAround(aActPosDelta, maFont.GetOrientation());
maActPos = rPosition + aActPosDelta;
}
}
@@ -1595,7 +1595,7 @@ namespace emfio
for (sal_Int32 i = 0; i < rText.getLength(); ++i)
{
Point aCharDisplacement( i ? pDXArry[i-1] : 0, i ? pDYArry[i-1] : 0 );
- Point().RotateAround(aCharDisplacement.X(), aCharDisplacement.Y(), maFont.GetOrientation());
+ Point().RotateAround(aCharDisplacement, maFont.GetOrientation());
mpGDIMetaFile->AddAction( new MetaTextArrayAction( rPosition + aCharDisplacement, OUString( rText[i] ), nullptr, 0, 1 ) );
}
}
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 0a318526dfb9..2fdaf166fd27 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -368,7 +368,10 @@ namespace pcr
if ( impl_textHitTest( rMEvt.GetPosPixel() ) )
m_aMouseButtonDownPos = rMEvt.GetPosPixel();
else
- m_aMouseButtonDownPos.X() = m_aMouseButtonDownPos.Y() = -1;
+ {
+ m_aMouseButtonDownPos.setX(-1);
+ m_aMouseButtonDownPos.setY(-1);
+ }
}
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 6d6d5ee7d38d..1c1a077355e5 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -894,8 +894,8 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen)
tools::Polygon aPolygon(nPolySize);
for (i=0; i<nPolySize; i++) {
sal_Int8 nsignedbyte;
- pOS2MET->ReadSChar( nsignedbyte ); aP0.X()+=static_cast<sal_Int32>(nsignedbyte);
- pOS2MET->ReadSChar( nsignedbyte ); aP0.Y()-=static_cast<sal_Int32>(nsignedbyte);
+ pOS2MET->ReadSChar( nsignedbyte ); aP0.AdjustX(static_cast<sal_Int32>(nsignedbyte));
+ pOS2MET->ReadSChar( nsignedbyte ); aP0.AdjustY(-static_cast<sal_Int32>(nsignedbyte));
aCalcBndRect.Union(tools::Rectangle(aP0,Size(1,1)));
aPolygon.SetPoint(aP0,i);
}
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 8a51f687ce4e..f72317933420 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2250,7 +2250,8 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo
// Setting x value of a gradient vector to rotation center to
// place a gradient vector in a target polygon.
// This would help editing it in SVG editors like inkscape.
- aPoly[ 0 ].X() = aPoly[ 1 ].X() = aCenter.X();
+ aPoly[ 0 ].setX( aCenter.X() );
+ aPoly[ 1 ].setX( aCenter.X() );
aPoly[ 0 ].setY( aRect.Top() );
aPoly[ 1 ].setY( aRect.Bottom() );
aPoly.Rotate( aCenter, nAngle );
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index 8f42601f5c53..e63ed7420c46 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -37,7 +37,7 @@ StructListBox::StructListBox(vcl::Window* pParent, WinBits nBits ):
vcl::Font aFont( GetFont() );
Size aSize = aFont.GetFontSize();
- aSize.Height() -= 2;
+ aSize.AdjustHeight(-2);
aFont.SetFontSize( aSize );
SetFont( aFont );
}
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index df2dfb6fa54c..ad0437ec3e6e 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -146,9 +146,9 @@ private:
bool bVisible;
bool IsVisible() const { return bVisible; }
- void SetText( const OUString& rText ) { aBulText = rText; aBulSize.Width() = -1; }
- void Invalidate() { aBulSize.Width() = -1; }
- void SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; }
+ void SetText( const OUString& rText ) { aBulText = rText; aBulSize.setWidth(-1); }
+ void Invalidate() { aBulSize.setWidth(-1); }
+ void SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.setWidth(-1); }
const OUString& GetText() const { return aBulText; }
Paragraph( sal_Int16 nDepth );
diff --git a/include/editeng/paperinf.hxx b/include/editeng/paperinf.hxx
index 66a945e12e8a..ba684c9b5aee 100644
--- a/include/editeng/paperinf.hxx
+++ b/include/editeng/paperinf.hxx
@@ -49,8 +49,8 @@ public:
inline Size &Swap(Size &rSize)
{
const long lVal = rSize.Width();
- rSize.Width() = rSize.Height();
- rSize.Height() = lVal;
+ rSize.setWidth( rSize.Height() );
+ rSize.setHeight( lVal );
return rSize;
}
More information about the Libreoffice-commits
mailing list