summaryrefslogtreecommitdiff
path: root/sal/Library_uwinapi.mk
blob: 8d91ef61d015f8ac27519005c32ec302d5afab31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
#
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

$(eval $(call gb_Library_Library,uwinapi))

$(eval $(call gb_Library_use_system_win32_libs,uwinapi,\
	$(if $(filter $(COM),MSC), \
		kernel32 \
		msvcrt \
		shlwapi \
		user32 \
		version \
	) \
))

$(eval $(call gb_Library_add_defs,uwinapi,\
	$(if $(filter $(COM),GCC), \
		-Wno-unused-parameter -Wno-return-type) \
	$(LFS_CFLAGS) \
))

$(eval $(call gb_Library_add_cobjects,uwinapi,\
	sal/systools/win32/uwinapi/snprintf \
	sal/systools/win32/uwinapi/snwprintf \
))

ifeq ($(COM),MSC)


$(eval $(call gb_Library_add_cobjects,uwinapi,\
	sal/systools/win32/uwinapi/legacy \
))

$(eval $(call gb_Library_add_ldflags,uwinapi,\
	/DEF:$(SRCDIR)/sal/systools/win32/uwinapi/uwinapi.def \
))

endif


# vim: set noet sw=4 ts=4:
9162f3014bac9da4406e'>chart2/source/view/axes/Tickmarks.cxx6
-rw-r--r--chart2/source/view/axes/VAxisProperties.cxx48
-rw-r--r--chart2/source/view/axes/VAxisProperties.hxx17
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx102
-rw-r--r--chart2/source/view/axes/VCartesianAxis.hxx4
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.cxx6
6 files changed, 83 insertions, 100 deletions
diff --git a/chart2/source/view/axes/Tickmarks.cxx b/chart2/source/view/axes/Tickmarks.cxx
index a8cd9a56cc44..9942753ca828 100644
--- a/chart2/source/view/axes/Tickmarks.cxx
+++ b/chart2/source/view/axes/Tickmarks.cxx
@@ -237,7 +237,7 @@ B2DVector TickFactory2D::getDistanceAxisTickToText( const AxisProperties& rAxisP
|| ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END == rAxisProperties.m_eLabelPos )
bFarAwayLabels = true;
- double fInnerDirectionSign = rAxisProperties.maLabelAlignment.mfInnerTickDirection;
+ double fInnerDirectionSign = rAxisProperties.m_fInnerDirectionSign;
if( fInnerDirectionSign==0.0 )
fInnerDirectionSign = 1.0;
@@ -269,11 +269,11 @@ B2DVector TickFactory2D::getDistanceAxisTickToText( const AxisProperties& rAxisP
}
B2DVector aLabelDirection(aStart);
- if (rAxisProperties.maLabelAlignment.mfInnerTickDirection != rAxisProperties.maLabelAlignment.mfLabelDirection)
+ if( rAxisProperties.m_fInnerDirectionSign != rAxisProperties.m_fLabelDirectionSign )
aLabelDirection = aEnd;
B2DVector aOrthoLabelDirection(aOrthoDirection);
- if (rAxisProperties.maLabelAlignment.mfInnerTickDirection != rAxisProperties.maLabelAlignment.mfLabelDirection)
+ if( rAxisProperties.m_fInnerDirectionSign != rAxisProperties.m_fLabelDirectionSign )
aOrthoLabelDirection*=-1.0;
aOrthoLabelDirection.normalize();
if( bIncludeSpaceBetweenTickAndText )
diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx
index 9b449d5a96d4..80c226114759 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -30,16 +30,11 @@
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
+namespace chart
+{
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-namespace chart {
-
-AxisLabelAlignment::AxisLabelAlignment() :
- mfLabelDirection(1.0),
- mfInnerTickDirection(1.0),
- meAlignment(LABEL_ALIGN_RIGHT_TOP) {}
-
sal_Int32 lcl_calcTickLengthForDepth(sal_Int32 nDepth,sal_Int32 nTickmarkStyle)
{
sal_Int32 nWidth = AXIS2D_TICKLENGTH; //@maybefuturetodo this length could be offered by the model
@@ -117,7 +112,7 @@ TickmarkProperties AxisProperties::makeTickmarkProperties(
nTickmarkStyle = m_nMinorTickmarks;
}
- if (maLabelAlignment.mfInnerTickDirection == 0.0)
+ if( m_fInnerDirectionSign == 0.0 )
{
if( nTickmarkStyle != 0 )
nTickmarkStyle = 3; //inner and outer tickmarks
@@ -133,7 +128,7 @@ TickmarkProperties AxisProperties::makeTickmarkProperties(
TickmarkProperties AxisProperties::makeTickmarkPropertiesForComplexCategories(
sal_Int32 nTickLength, sal_Int32 nTickStartDistanceToAxis, sal_Int32 /*nTextLevel*/ ) const
{
- sal_Int32 nTickmarkStyle = (maLabelAlignment.mfLabelDirection == maLabelAlignment.mfInnerTickDirection) ? 2/*outside*/ : 1/*inside*/;
+ sal_Int32 nTickmarkStyle = (m_fLabelDirectionSign==m_fInnerDirectionSign) ? 2/*outside*/ : 1/*inside*/;
TickmarkProperties aTickmarkProperties;
aTickmarkProperties.Length = nTickLength;// + nTextLevel*( lcl_calcTickLengthForDepth(0,nTickmarkStyle) );
@@ -163,6 +158,9 @@ AxisProperties::AxisProperties( const uno::Reference< XAxis >& xAxisModel
, m_eTickmarkPos( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS )
, m_bCrossingAxisHasReverseDirection(false)
, m_bCrossingAxisIsCategoryAxes(false)
+ , m_fLabelDirectionSign(1.0)
+ , m_fInnerDirectionSign(1.0)
+ , m_aLabelAlignment(LABEL_ALIGN_RIGHT_TOP)
, m_bDisplayLabels( true )
, m_nNumberFormatKey(0)
, m_nMajorTickmarks(1)
@@ -187,7 +185,9 @@ AxisProperties::AxisProperties( const AxisProperties& rAxisProperties )
, m_eTickmarkPos( rAxisProperties.m_eTickmarkPos )
, m_bCrossingAxisHasReverseDirection( rAxisProperties.m_bCrossingAxisHasReverseDirection )
, m_bCrossingAxisIsCategoryAxes( rAxisProperties.m_bCrossingAxisIsCategoryAxes )
- , maLabelAlignment( rAxisProperties.maLabelAlignment )
+ , m_fLabelDirectionSign( rAxisProperties.m_fLabelDirectionSign )
+ , m_fInnerDirectionSign( rAxisProperties.m_fInnerDirectionSign )
+ , m_aLabelAlignment( rAxisProperties.m_aLabelAlignment )
, m_bDisplayLabels( rAxisProperties.m_bDisplayLabels )
, m_nNumberFormatKey( rAxisProperties.m_nNumberFormatKey )
, m_nMajorTickmarks( rAxisProperties.m_nMajorTickmarks )
@@ -209,7 +209,7 @@ AxisProperties::AxisProperties( const AxisProperties& rAxisProperties )
LabelAlignment lcl_getLabelAlignmentForZAxis( const AxisProperties& rAxisProperties )
{
LabelAlignment aRet( LABEL_ALIGN_RIGHT );
- if (rAxisProperties.maLabelAlignment.mfLabelDirection < 0)
+ if( rAxisProperties.m_fLabelDirectionSign<0 )
aRet = LABEL_ALIGN_LEFT;
return aRet;
}
@@ -217,7 +217,7 @@ LabelAlignment lcl_getLabelAlignmentForZAxis( const AxisProperties& rAxisPropert
LabelAlignment lcl_getLabelAlignmentForYAxis( const AxisProperties& rAxisProperties )
{
LabelAlignment aRet( LABEL_ALIGN_RIGHT );
- if (rAxisProperties.maLabelAlignment.mfLabelDirection < 0)
+ if( rAxisProperties.m_fLabelDirectionSign<0 )
aRet = LABEL_ALIGN_LEFT;
return aRet;
}
@@ -225,7 +225,7 @@ LabelAlignment lcl_getLabelAlignmentForYAxis( const AxisProperties& rAxisPropert
LabelAlignment lcl_getLabelAlignmentForXAxis( const AxisProperties& rAxisProperties )
{
LabelAlignment aRet( LABEL_ALIGN_BOTTOM );
- if (rAxisProperties.maLabelAlignment.mfLabelDirection < 0)
+ if( rAxisProperties.m_fLabelDirectionSign<0 )
aRet = LABEL_ALIGN_TOP;
return aRet;
}
@@ -291,35 +291,35 @@ void AxisProperties::init( bool bCartesian )
m_bComplexCategories = true;
if( ::com::sun::star::chart::ChartAxisPosition_END == m_eCrossoverType )
- maLabelAlignment.mfInnerTickDirection = m_bCrossingAxisHasReverseDirection ? 1.0 : -1.0;
+ m_fInnerDirectionSign = m_bCrossingAxisHasReverseDirection ? 1 : -1;
else
- maLabelAlignment.mfInnerTickDirection = m_bCrossingAxisHasReverseDirection ? -1.0 : 1.0;
+ m_fInnerDirectionSign = m_bCrossingAxisHasReverseDirection ? -1 : 1;
if( ::com::sun::star::chart::ChartAxisLabelPosition_NEAR_AXIS == m_eLabelPos )
- maLabelAlignment.mfLabelDirection = maLabelAlignment.mfInnerTickDirection;
+ m_fLabelDirectionSign = m_fInnerDirectionSign;
else if( ::com::sun::star::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE == m_eLabelPos )
- maLabelAlignment.mfLabelDirection = -maLabelAlignment.mfInnerTickDirection;
+ m_fLabelDirectionSign = -m_fInnerDirectionSign;
else if( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START == m_eLabelPos )
- maLabelAlignment.mfLabelDirection = m_bCrossingAxisHasReverseDirection ? -1 : 1;
+ m_fLabelDirectionSign = m_bCrossingAxisHasReverseDirection ? -1 : 1;
else if( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END == m_eLabelPos )
- maLabelAlignment.mfLabelDirection = m_bCrossingAxisHasReverseDirection ? 1 : -1;
+ m_fLabelDirectionSign = m_bCrossingAxisHasReverseDirection ? 1 : -1;
if( m_nDimensionIndex==2 )
- maLabelAlignment.meAlignment = lcl_getLabelAlignmentForZAxis(*this);
+ m_aLabelAlignment = lcl_getLabelAlignmentForZAxis(*this);
else
{
bool bIsYAxisPosition = (m_nDimensionIndex==1 && !m_bSwapXAndY)
|| (m_nDimensionIndex==0 && m_bSwapXAndY);
if( bIsYAxisPosition )
{
- maLabelAlignment.mfLabelDirection *= -1.0;
- maLabelAlignment.mfInnerTickDirection *= -1.0;
+ m_fLabelDirectionSign*=-1;
+ m_fInnerDirectionSign*=-1;
}
if( bIsYAxisPosition )
- maLabelAlignment.meAlignment = lcl_getLabelAlignmentForYAxis(*this);
+ m_aLabelAlignment = lcl_getLabelAlignmentForYAxis(*this);
else
- maLabelAlignment.meAlignment = lcl_getLabelAlignmentForXAxis(*this);
+ m_aLabelAlignment = lcl_getLabelAlignmentForXAxis(*this);
}
}
diff --git a/chart2/source/view/axes/VAxisProperties.hxx b/chart2/source/view/axes/VAxisProperties.hxx
index 7495c21a03b4..b43f97b03f46 100644
--- a/chart2/source/view/axes/VAxisProperties.hxx
+++ b/chart2/source/view/axes/VAxisProperties.hxx
@@ -84,16 +84,6 @@ struct AxisLabelProperties SAL_FINAL
bool getIsStaggered() const;
};
-struct AxisLabelAlignment
-{
- double mfLabelDirection; /// which direction the labels are to be drawn.
- double mfInnerTickDirection; /// which direction the inner tickmarks are to be drawn.