diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-04 09:39:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-04 20:44:52 +0000 |
commit | 440fd8fa8c7ddcdffaa17028f37dc177701cbb1a (patch) | |
tree | b1d502c9ba224a7123bfbef4f8bcc287fb0abd28 /svtools | |
parent | 148cde5f7daad47ae1df1f92f77dd16499c6ac75 (diff) |
coverity#1242516 reorg to silence Arguments in wrong order
Change-Id: I0d7a93461f37d5ca18605cd94b630d70d871adfb
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/toolpanel/tabbargeometry.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/svtools/source/toolpanel/tabbargeometry.cxx b/svtools/source/toolpanel/tabbargeometry.cxx index 3390c7040976..da2c80043a23 100644 --- a/svtools/source/toolpanel/tabbargeometry.cxx +++ b/svtools/source/toolpanel/tabbargeometry.cxx @@ -110,20 +110,22 @@ namespace svt //= NormalizedArea - - NormalizedArea::NormalizedArea() :m_aReference() { } - NormalizedArea::NormalizedArea( const Rectangle& i_rReference, const bool i_bIsVertical ) - :m_aReference( i_bIsVertical ? Rectangle( i_rReference.TopLeft(), Size( i_rReference.GetHeight(), i_rReference.GetWidth() ) ) : i_rReference ) + : m_aReference(i_rReference) { + if (i_bIsVertical) + { + const long nRotatedWidth = i_rReference.GetHeight(); + const long nRotatedHeight = i_rReference.GetWidth(); + m_aReference = Rectangle(i_rReference.TopLeft(), Size(nRotatedWidth, nRotatedHeight)); + } } - Rectangle NormalizedArea::getTransformed( const Rectangle& i_rArea, const TabAlignment i_eTargetAlignment ) const { Rectangle aResult( i_rArea ); |