summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/excel')
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx6
-rw-r--r--sc/source/filter/excel/xiescher.cxx6
-rw-r--r--sc/source/filter/excel/xlescher.cxx10
-rw-r--r--sc/source/filter/excel/xlroot.cxx6
5 files changed, 15 insertions, 15 deletions
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 1c03ccec29d6..181eb60dc20e 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -3311,7 +3311,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
Reference< XChartDocument > const & xChartDoc, const Rectangle& rChartRect ) :
XclExpChGroupBase( XclExpChRoot( rRoot, *this ), EXC_CHFRBLOCK_TYPE_CHART, EXC_ID_CHCHART, 16 )
{
- Size aPtSize = OutputDevice::LogicToLogic( rChartRect.GetSize(), MapMode( MAP_100TH_MM ), MapMode( MAP_POINT ) );
+ Size aPtSize = OutputDevice::LogicToLogic( rChartRect.GetSize(), MapMode( MapUnit::Map100thMM ), MapMode( MapUnit::MapPoint ) );
// rectangle is stored in 16.16 fixed-point format
maRect.mnX = maRect.mnY = 0;
maRect.mnWidth = static_cast< sal_Int32 >( aPtSize.Width() << 16 );
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 6e2ee0622e64..c5a66a5a2e5b 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -258,7 +258,7 @@ void XclExpDffAnchorBase::SetFlags( const SdrObject& rSdrObj )
void XclExpDffAnchorBase::SetSdrObject( const SdrObject& rSdrObj )
{
ImplSetFlags( rSdrObj );
- ImplCalcAnchorRect( rSdrObj.GetCurrentBoundRect(), MAP_100TH_MM );
+ ImplCalcAnchorRect( rSdrObj.GetCurrentBoundRect(), MapUnit::Map100thMM );
}
void XclExpDffAnchorBase::WriteDffData( EscherEx& rEscherEx ) const
@@ -271,7 +271,7 @@ void XclExpDffAnchorBase::WriteDffData( EscherEx& rEscherEx ) const
void XclExpDffAnchorBase::WriteData( EscherEx& rEscherEx, const Rectangle& rRect )
{
// the passed rectangle is in twips
- ImplCalcAnchorRect( rRect, MAP_TWIP );
+ ImplCalcAnchorRect( rRect, MapUnit::MapTwip );
WriteDffData( rEscherEx );
}
@@ -327,7 +327,7 @@ void XclExpDffEmbeddedAnchor::ImplCalcAnchorRect( const Rectangle& rRect, MapUni
XclExpDffNoteAnchor::XclExpDffNoteAnchor( const XclExpRoot& rRoot, const Rectangle& rRect ) :
XclExpDffAnchorBase( rRoot, EXC_ESC_ANCHOR_SIZELOCKED )
{
- maAnchor.SetRect( rRoot, rRoot.GetCurrScTab(), rRect, MAP_100TH_MM );
+ maAnchor.SetRect( rRoot, rRoot.GetCurrScTab(), rRect, MapUnit::Map100thMM );
}
XclExpDffDropDownAnchor::XclExpDffDropDownAnchor( const XclExpRoot& rRoot, const ScAddress& rScPos ) :
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 0ae25f02a302..9a1484d0ac55 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1703,7 +1703,7 @@ SdrObjectPtr XclImpChartObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const
inserted into the draw page. */
sal_Int64 nAspect = css::embed::Aspects::MSOLE_CONTENT;
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xEmbObj->getMapUnit( nAspect ) );
- Size aSize( vcl::Window::LogicToLogic( rAnchorRect.GetSize(), MapMode( MAP_100TH_MM ), MapMode( aUnit ) ) );
+ Size aSize( vcl::Window::LogicToLogic( rAnchorRect.GetSize(), MapMode( MapUnit::Map100thMM ), MapMode( aUnit ) ) );
css::awt::Size aAwtSize( aSize.Width(), aSize.Height() );
xEmbObj->setVisualAreaSize( nAspect, aAwtSize );
@@ -1766,7 +1766,7 @@ void XclImpChartObj::FinalizeTabChart()
// create the object anchor
XclObjAnchor aAnchor;
- aAnchor.SetRect( GetRoot(), GetCurrScTab(), Rectangle( 1000, 500, nWidth, nHeight ), MAP_100TH_MM );
+ aAnchor.SetRect( GetRoot(), GetCurrScTab(), Rectangle( 1000, 500, nWidth, nHeight ), MapUnit::Map100thMM );
SetAnchor( aAnchor );
}
@@ -4131,7 +4131,7 @@ void XclImpSheetDrawing::ConvertObjects( XclImpDffConverter& rDffConv )
Rectangle XclImpSheetDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool /*bDffAnchor*/ ) const
{
- return rAnchor.GetRect( GetRoot(), maScUsedArea.aStart.Tab(), MAP_100TH_MM );
+ return rAnchor.GetRect( GetRoot(), maScUsedArea.aStart.Tab(), MapUnit::Map100thMM );
}
void XclImpSheetDrawing::OnObjectInserted( const XclImpDrawObjBase& rDrawObj )
diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx
index 70a4d79dcb15..de02aaab6ac0 100644
--- a/sc/source/filter/excel/xlescher.cxx
+++ b/sc/source/filter/excel/xlescher.cxx
@@ -45,13 +45,13 @@ double lclGetTwipsScale( MapUnit eMapUnit )
Calc's strange definition of a point (1 inch == 72.27 points, instead
of 72 points).
NOTE: Calc's definition changed from TeX points (72.27) to PS points
- (72), so the MAP_TWIP case now actually also delivers a scale of 1.0
+ (72), so the MapUnit::MapTwip case now actually also delivers a scale of 1.0
*/
double fScale = 1.0;
switch( eMapUnit )
{
- case MAP_TWIP: fScale = 1; break; // Calc twips <-> real twips
- case MAP_100TH_MM: fScale = HMM_PER_TWIPS; break; // Calc twips <-> 1/100mm
+ case MapUnit::MapTwip: fScale = 1; break; // Calc twips <-> real twips
+ case MapUnit::Map100thMM: fScale = HMM_PER_TWIPS; break; // Calc twips <-> 1/100mm
default: OSL_FAIL( "lclGetTwipsScale - map unit not implemented" );
}
return fScale;
@@ -183,8 +183,8 @@ void XclObjAnchor::SetRect( const Size& rPageSize, sal_Int32 nScaleX, sal_Int32
double fScale = 1.0;
switch( eMapUnit )
{
- case MAP_TWIP: fScale = HMM_PER_TWIPS; break; // Calc twips -> 1/100mm
- case MAP_100TH_MM: fScale = 1.0; break; // Calc 1/100mm -> 1/100mm
+ case MapUnit::MapTwip: fScale = HMM_PER_TWIPS; break; // Calc twips -> 1/100mm
+ case MapUnit::Map100thMM: fScale = 1.0; break; // Calc 1/100mm -> 1/100mm
default: OSL_FAIL( "XclObjAnchor::SetRect - map unit not implemented" );
}
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index a1d9a20cd703..97ece71e8236 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -344,7 +344,7 @@ ScEditEngineDefaulter& XclRoot::GetEditEngine() const
{
mrData.mxEditEngine.reset( new ScEditEngineDefaulter( GetDoc().GetEnginePool() ) );
ScEditEngineDefaulter& rEE = *mrData.mxEditEngine;
- rEE.SetRefMapMode( MAP_100TH_MM );
+ rEE.SetRefMapMode( MapUnit::Map100thMM );
rEE.SetEditTextObjectPool( GetDoc().GetEditPool() );
rEE.SetUpdateMode( false );
rEE.EnableUndo( false );
@@ -359,7 +359,7 @@ ScHeaderEditEngine& XclRoot::GetHFEditEngine() const
{
mrData.mxHFEditEngine.reset( new ScHeaderEditEngine( EditEngine::CreatePool() ) );
ScHeaderEditEngine& rEE = *mrData.mxHFEditEngine;
- rEE.SetRefMapMode( MAP_TWIP ); // headers/footers use twips as default metric
+ rEE.SetRefMapMode( MapUnit::MapTwip ); // headers/footers use twips as default metric
rEE.SetUpdateMode( false );
rEE.EnableUndo( false );
rEE.SetControlWord( rEE.GetControlWord() & ~EEControlBits::ALLOWBIGOBJS );
@@ -386,7 +386,7 @@ EditEngine& XclRoot::GetDrawEditEngine() const
{
mrData.mxDrawEditEng.reset( new EditEngine( &GetDoc().GetDrawLayer()->GetItemPool() ) );
EditEngine& rEE = *mrData.mxDrawEditEng;
- rEE.SetRefMapMode( MAP_100TH_MM );
+ rEE.SetRefMapMode( MapUnit::Map100thMM );
rEE.SetUpdateMode( false );
rEE.EnableUndo( false );
rEE.SetControlWord( rEE.GetControlWord() & ~EEControlBits::ALLOWBIGOBJS );