summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/toolpanel/tabbargeometry.cxx12
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 );