summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx4
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx4
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx16
-rw-r--r--sw/source/filter/html/htmlform.cxx8
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmlsect.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx4
-rw-r--r--sw/source/filter/html/htmltabw.cxx10
-rw-r--r--sw/source/filter/html/svxcss1.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx16
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx10
-rw-r--r--sw/source/filter/xml/xmlexp.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/filter/xml/xmltexte.cxx2
-rw-r--r--sw/source/filter/xml/xmltexti.cxx10
26 files changed, 68 insertions, 68 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 609b344a90a8..47c8c7f98baf 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3400,7 +3400,7 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
OStringBuffer sOut;
if( Application::GetDefaultDevice() &&
nWidth <= Application::GetDefaultDevice()->PixelToLogic(
- Size( 1, 1 ), MapMode( MAP_TWIP) ).Width() )
+ Size( 1, 1 ), MapMode( MapUnit::MapTwip) ).Width() )
{
// If the width is smaller than one pixel, then export as 1px
// so that Netscape and IE show the line.
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 2d05d4b8e347..a2f846365e5e 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -2609,7 +2609,7 @@ sal_uInt32 SwHTMLWriter::ToPixel( sal_uInt32 nVal, const bool bVert )
if( Application::GetDefaultDevice() && nVal )
{
Size aSz( bVert ? 0 : nVal, bVert ? nVal : 0 );
- aSz = Application::GetDefaultDevice()->LogicToPixel(aSz, MapMode( MAP_TWIP ));
+ aSz = Application::GetDefaultDevice()->LogicToPixel(aSz, MapMode( MapUnit::MapTwip ));
nVal = bVert ? aSz.Height() : aSz.Width();
if( !nVal ) // if there is a Twip, there should be a pixel as well
nVal = 1;
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index aadcb2f17500..db0fae6876d2 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -93,7 +93,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
Size aTwipSpc( rPixSpace.Width(), rPixSpace.Height() );
aTwipSpc =
Application::GetDefaultDevice()->PixelToLogic( aTwipSpc,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
nLeftSpace = nRightSpace = (sal_uInt16)aTwipSpc.Width();
nUpperSpace = nLowerSpace = (sal_uInt16)aTwipSpc.Height();
}
@@ -465,7 +465,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
{
aTwipSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTwipSz, MapMode( MAP_TWIP ) );
+ ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
}
if( SVX_CSS1_LTYPE_TWIP== aPropInfo.eWidthType )
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index a134f085c64a..2debe01231ba 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -219,7 +219,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
{
nAmount = Application::GetDefaultDevice()
->LogicToPixel( Size(nAmount,0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
if( nAmount )
{
@@ -247,7 +247,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
{
Size aPixelSz =
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
aPixelSz.Width() = 1;
if( !aPixelSz.Height() && aTwipSz.Height() )
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index b82949226793..ebfcadbad895 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -626,7 +626,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
{
Size aPixelSpc =
Application::GetDefaultDevice()->LogicToPixel( aTwipSpc,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSpc.Width() && aTwipSpc.Width() )
aPixelSpc.Width() = 1;
if( !aPixelSpc.Height() && aTwipSpc.Height() )
@@ -699,7 +699,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
{
aPixelSz =
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
aPixelSz.Width() = 1;
if( !aPixelSz.Height() && aTwipSz.Height() )
@@ -893,7 +893,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
{
Size aPixelSpc =
Application::GetDefaultDevice()->LogicToPixel( aTwipSpc,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSpc.Width() && aTwipSpc.Width() )
aPixelSpc.Width() = 1;
if( !aPixelSpc.Height() && aTwipSpc.Height() )
@@ -964,7 +964,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
{
aPixelSz =
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
aPixelSz.Width() = 1;
if( !aPixelSz.Height() && aTwipSz.Height() )
@@ -1336,7 +1336,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat,
{
Size aPixelBorder =
Application::GetDefaultDevice()->LogicToPixel( aTwipBorder,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelBorder.Width() && aTwipBorder.Width() )
aPixelBorder.Width() = 1;
if( !aPixelBorder.Height() && aTwipBorder.Height() )
@@ -1575,7 +1575,7 @@ static Writer & OutHTML_FrameFormatAsMulticol( Writer& rWrt,
{
nGutter = (sal_uInt16)Application::GetDefaultDevice()
->LogicToPixel( Size(nGutter,0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_gutter).
append("=\"").append(static_cast<sal_Int32>(nGutter)).append("\"");
@@ -1795,7 +1795,7 @@ static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, const SwFrameFormat& rF
Size aMM100Size;
const SwFormatFrameSize& rSize = rFrameFormat.GetFrameSize();
aMM100Size = OutputDevice::LogicToLogic( rSize.GetSize(),
- MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM ));
+ MapMode( MapUnit::MapTwip ), MapMode( MapUnit::Map100thMM ));
sal_uInt16 nErr = XOutBitmap::WriteGraphic( pGrfNd->GetGrf(), aGraphicURL,
"JPG", nFlags, &aMM100Size );
@@ -1880,7 +1880,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrameFormat& rFrameFormat,
{
nSize -= HTML_PARSPACE;
nSize = (sal_Int16)Application::GetDefaultDevice()
- ->LogicToPixel( Size(nSize,0), MapMode(MAP_TWIP) ).Width();
+ ->LogicToPixel( Size(nSize,0), MapMode(MapUnit::MapTwip) ).Width();
aSpacer = OStringBuffer(OOO_STRING_SVTOOLS_HTML_spacer).
append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type).
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 6ef302379f81..9d233891db18 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -471,7 +471,7 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
{
Size aTmp(aNewSz.Width, aNewSz.Height);
aTmp = Application::GetDefaultDevice()
- ->PixelToLogic( aTmp, MapMode( MAP_100TH_MM ) );
+ ->PixelToLogic( aTmp, MapMode( MapUnit::Map100thMM ) );
aNewSz.Width = aTmp.Width();
aNewSz.Height = aTmp.Height();
}
@@ -734,7 +734,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
{
Size aTmpSz( aNewSz.Width, aNewSz.Height );
aTmpSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTmpSz, MapMode( MAP_100TH_MM ) );
+ ->PixelToLogic( aTmpSz, MapMode( MapUnit::Map100thMM ) );
aNewSz.Width = aTmpSz.Width();
aNewSz.Height = aTmpSz.Height();
}
@@ -1694,7 +1694,7 @@ void SwHTMLParser::InsertInput()
if( (aSz.Width() || aSz.Height()) && Application::GetDefaultDevice() )
{
aSz = Application::GetDefaultDevice()
- ->PixelToLogic( aSz, MapMode( MAP_100TH_MM ) );
+ ->PixelToLogic( aSz, MapMode( MapUnit::Map100thMM ) );
}
aTmp <<= FormButtonType_SUBMIT;
xPropSet->setPropertyValue("ButtonType", aTmp );
@@ -1782,7 +1782,7 @@ void SwHTMLParser::InsertInput()
{
Size aNewSz( nSize, 0 );
aNewSz = Application::GetDefaultDevice()
- ->PixelToLogic( aNewSz, MapMode( MAP_100TH_MM ) );
+ ->PixelToLogic( aNewSz, MapMode( MapUnit::Map100thMM ) );
aSz.Width() = aNewSz.Width();
OSL_ENSURE( !aTextSz.Width(), "Text-Breite ist gegeben" );
bMinWidth = false;
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index d50fe551a8cf..6250b987b451 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -992,7 +992,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
{
aPixelSz =
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
aPixelSz.Width() = 1;
if( !aPixelSz.Height() && aTwipSz.Height() )
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 401415ad1fd2..44e68132bc16 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -553,7 +553,7 @@ IMAGE_SETEVENT:
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
{
aTwipSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTwipSz, MapMode( MAP_TWIP ) );
+ ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
}
// CSS1-Groesse auf "normale" Groesse umrechnen
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 5d0988613579..bdbef48e5043 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -232,7 +232,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
{
aTwipSz =
Application::GetDefaultDevice()->PixelToLogic( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
pTwipSz = &aTwipSz;
}
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index d00f20c457af..fc5ba47e2d2b 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -138,7 +138,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
{
aTwipSz =
Application::GetDefaultDevice()->PixelToLogic( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
}
// die Breite bearbeiten
@@ -214,7 +214,7 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
Size aTwipSpc( rPixSpace.Width(), rPixSpace.Height() );
aTwipSpc =
Application::GetDefaultDevice()->PixelToLogic( aTwipSpc,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
nLeftSpace = nRightSpace = aTwipSpc.Width();
nUpperSpace = nLowerSpace = (sal_uInt16)aTwipSpc.Height();
}
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 7b8d2c8ed2ae..767d86378e26 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -603,7 +603,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
{
nTwipWidth = Application::GetDefaultDevice()
->PixelToLogic( Size(nWidth, 0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
if( !nPrcWidth && nTwipWidth < MINFLY )
@@ -694,7 +694,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
{
nGutter = (sal_uInt16)Application::GetDefaultDevice()
->PixelToLogic( Size(nGutter, 0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
SwFormatCol aFormatCol;
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 9ffcb7a0dfc3..0229c4aa6837 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2111,7 +2111,7 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts,
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
{
aTwipSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTwipSz, MapMode( MAP_TWIP ) );
+ ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
}
// die Breite nur in die erste Zelle setzen!
@@ -2248,7 +2248,7 @@ void HTMLTable::InsertCol( sal_uInt16 nSpan, sal_uInt16 nColWidth, bool bRelWidt
if( aTwipSz.Width() && Application::GetDefaultDevice() )
{
aTwipSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTwipSz, MapMode( MAP_TWIP ) );
+ ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
}
for( i=nCurCol; i<nColsReq; i++ )
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 3f98d4103c5e..3becd8c66092 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -116,10 +116,10 @@ void SwHTMLWrtTable::Pixelize( sal_uInt16& rValue )
if( rValue && Application::GetDefaultDevice() )
{
Size aSz( rValue, 0 );
- aSz = Application::GetDefaultDevice()->LogicToPixel( aSz, MapMode(MAP_TWIP) );
+ aSz = Application::GetDefaultDevice()->LogicToPixel( aSz, MapMode(MapUnit::MapTwip) );
if( !aSz.Width() )
aSz.Width() = 1;
- aSz = Application::GetDefaultDevice()->PixelToLogic( aSz, MapMode(MAP_TWIP) );
+ aSz = Application::GetDefaultDevice()->PixelToLogic( aSz, MapMode(MapUnit::MapTwip) );
rValue = (sal_uInt16)aSz.Width();
}
}
@@ -360,7 +360,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
{
Size aOldSz( aPixelSz );
aPixelSz = Application::GetDefaultDevice()->LogicToPixel( aPixelSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( aOldSz.Width() && !aPixelSz.Width() )
aPixelSz.Width() = 1;
if( aOldSz.Height() && !aPixelSz.Height() )
@@ -651,7 +651,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
else if( Application::GetDefaultDevice() )
{
sal_Int32 nPixWidth = Application::GetDefaultDevice()->LogicToPixel(
- Size(m_nTabWidth,0), MapMode(MAP_TWIP) ).Width();
+ Size(m_nTabWidth,0), MapMode(MapUnit::MapTwip) ).Width();
if( !nPixWidth )
nPixWidth = 1;
@@ -669,7 +669,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
{
Size aPixelSpc =
Application::GetDefaultDevice()->LogicToPixel( Size(nHSpace,nVSpace),
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSpc.Width() && nHSpace )
aPixelSpc.Width() = 1;
if( !aPixelSpc.Height() && nVSpace )
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 556b8db75c4a..26fd9cec82e8 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -874,7 +874,7 @@ void SvxCSS1Parser::PixelToTwip( long &rWidth, long &rHeight )
{
Size aTwipSz( rWidth, rHeight );
aTwipSz = Application::GetDefaultDevice()->PixelToLogic( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
rWidth = aTwipSz.Width();
rHeight = aTwipSz.Height();
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index adf16e459d6a..81b6417e6db4 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -4892,7 +4892,7 @@ void SwHTMLParser::InsertSpacer()
{
nSize = Application::GetDefaultDevice()
->PixelToLogic( Size(0,nSize),
- MapMode(MAP_TWIP) ).Height();
+ MapMode(MapUnit::MapTwip) ).Height();
}
// einen Absatz-Abstand setzen
@@ -4940,7 +4940,7 @@ void SwHTMLParser::InsertSpacer()
{
nSize = Application::GetDefaultDevice()
->PixelToLogic( Size(nSize,0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
if( !m_pPam->GetPoint()->nContent.GetIndex() )
@@ -4975,7 +4975,7 @@ sal_uInt16 SwHTMLParser::ToTwips( sal_uInt16 nPixel )
if( nPixel && Application::GetDefaultDevice() )
{
long nTwips = Application::GetDefaultDevice()->PixelToLogic(
- Size( nPixel, nPixel ), MapMode( MAP_TWIP ) ).Width();
+ Size( nPixel, nPixel ), MapMode( MapUnit::MapTwip ) ).Width();
return nTwips <= USHRT_MAX ? (sal_uInt16)nTwips : USHRT_MAX;
}
else
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 741dd6fe80a7..147d17532208 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -646,7 +646,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
if( nGutter && Application::GetDefaultDevice() )
{
nGutter = (sal_uInt16)Application::GetDefaultDevice()
- ->LogicToPixel( Size(nGutter, 0), MapMode(MAP_TWIP) ).Width();
+ ->LogicToPixel( Size(nGutter, 0), MapMode(MapUnit::MapTwip) ).Width();
}
sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_gutter "=\"" + OString::number(nGutter) + "\"");
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2f77017756ee..62e8e8f5ec6c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4140,9 +4140,9 @@ void DocxAttributeOutput::WriteSrcRect(const SdrObject* pSdrObj )
css::text::GraphicCrop aGraphicCropStruct;
xPropSet->getPropertyValue( "GraphicCrop" ) >>= aGraphicCropStruct;
- const MapMode aMap100mm( MAP_100TH_MM );
+ const MapMode aMap100mm( MapUnit::Map100thMM );
const MapMode& rMapMode = aGrafObj.GetPrefMapMode();
- if (rMapMode.GetMapUnit() == MAP_PIXEL)
+ if (rMapMode.GetMapUnit() == MapUnit::MapPixel)
{
aOriginalSize = Application::GetDefaultDevice()->PixelToLogic(aOriginalSize, aMap100mm);
}
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 54c04acdbbce..4de75bc3f9d6 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -175,9 +175,9 @@ namespace ww8
, mbForBullet(true)
, maGrf(rGrf)
{
- const MapMode aMap100mm( MAP_100TH_MM );
+ const MapMode aMap100mm( MapUnit::Map100thMM );
Size aSize( rGrf.GetPrefSize() );
- if ( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() )
+ if ( MapUnit::MapPixel == rGrf.GetPrefMapMode().GetMapUnit() )
{
aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap100mm );
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index ea93c9152709..d5d62a18c8c5 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1622,9 +1622,9 @@ void SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf)
OString aUniqueId = aGraphicObject.GetUniqueID();
if ( !aUniqueId.isEmpty() )
{
- const MapMode aMap100mm( MAP_100TH_MM );
+ const MapMode aMap100mm( MapUnit::Map100thMM );
Size aSize( rGrf.GetPrefSize() );
- if ( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() )
+ if ( MapUnit::MapPixel == rGrf.GetPrefMapMode().GetMapUnit() )
{
aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap100mm );
}
@@ -1706,10 +1706,10 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uI
if (!aUniqueId.isEmpty())
{
- const MapMode aMap100mm( MAP_100TH_MM );
+ const MapMode aMap100mm( MapUnit::Map100thMM );
Size aSize( aGraphic.GetPrefSize() );
- if ( MAP_PIXEL == aGraphic.GetPrefMapMode().GetMapUnit() )
+ if ( MapUnit::MapPixel == aGraphic.GetPrefMapMode().GetMapUnit() )
{
aSize = Application::GetDefaultDevice()->PixelToLogic(
aSize, aMap100mm );
@@ -1914,8 +1914,8 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
{
const Graphic &rGraphic = pGraphicObject->GetGraphic();
Size aSize(rGraphic.GetPrefSize());
- const MapMode aMap100mm(MAP_100TH_MM);
- if (MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit())
+ const MapMode aMap100mm(MapUnit::Map100thMM);
+ if (MapUnit::MapPixel == rGraphic.GetPrefMapMode().GetMapUnit())
{
aSize = Application::GetDefaultDevice()->PixelToLogic(
aSize, aMap100mm);
@@ -2211,7 +2211,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, MSO_SPT eS
void SwBasicEscherEx::Init()
{
- MapUnit eMap = MAP_TWIP;
+ MapUnit eMap = MapUnit::MapTwip;
if (SwDrawModel *pModel = rWrt.m_pDoc->getIDocumentDrawModelAccess().GetDrawModel())
{
// PPT arbeitet nur mit Einheiten zu 576DPI
@@ -2222,7 +2222,7 @@ void SwBasicEscherEx::Init()
// MS-DFF-Properties sind grossteils in EMU (English Metric Units) angegeben
// 1mm=36000emu, 1twip=635emu
Fraction aFact(360, 1);
- aFact /= GetMapFactor(MAP_100TH_MM, eMap).X();
+ aFact /= GetMapFactor(MapUnit::Map100thMM, eMap).X();
// create little values
aFact = Fraction(aFact.GetNumerator(), aFact.GetDenominator());
mnEmuMul = aFact.GetNumerator();
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 4d7229e4519b..63324ec652e6 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1583,10 +1583,10 @@ void MSWordExportBase::BulletDefinitions()
{
for (size_t i = 0; i < m_vecBulletPic.size(); ++i)
{
- const MapMode aMapMode(MAP_TWIP);
+ const MapMode aMapMode(MapUnit::MapTwip);
const Graphic& rGraphic = *m_vecBulletPic[i];
Size aSize(rGraphic.GetPrefSize());
- if (MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit())
+ if (MapUnit::MapPixel == rGraphic.GetPrefMapMode().GetMapUnit())
aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMapMode);
else
aSize = OutputDevice::LogicToLogic(aSize,rGraphic.GetPrefMapMode(), aMapMode);
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 33cf02b8677c..3f41f87415ea 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2365,8 +2365,8 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
static_cast<const SvxFontHeightItem*>(pItem)->GetHeight() );
aTmp <<= ((float)aSize.Height()) / 20.0;
- aFont.SetFontSize(OutputDevice::LogicToLogic(aSize, MAP_TWIP,
- MAP_100TH_MM));
+ aFont.SetFontSize(OutputDevice::LogicToLogic(aSize, MapUnit::MapTwip,
+ MapUnit::Map100thMM));
}
break;
@@ -2405,7 +2405,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
if (pOut)
{
pOut->Push( PushFlags::FONT | PushFlags::MAPMODE );
- pOut->SetMapMode( MapMode( MAP_100TH_MM ));
+ pOut->SetMapMode( MapMode( MapUnit::Map100thMM ));
pOut->SetFont( aFont );
aRet.Width = pOut->GetTextWidth(rString);
aRet.Width += 500; //plus size of button, total hack territory
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index cbecacd75432..7f88b578b634 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -164,7 +164,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
return false;
}
- rWMF.SetPrefMapMode( MapMode( MAP_100TH_MM ) );
+ rWMF.SetPrefMapMode( MapMode( MapUnit::Map100thMM ) );
// Scale MetaFile to new size and save new size to MetaFile
Size aOldSiz( rWMF.GetPrefSize() );
@@ -270,7 +270,7 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
pTempSet->Put( aAnchor );
const Size aSizeTwip = OutputDevice::LogicToLogic(
- aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MAP_TWIP );
+ aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MapUnit::MapTwip );
pTempSet->Put( SwFormatFrameSize( ATT_FIX_SIZE, aSizeTwip.Width(),
aSizeTwip.Height() ) );
@@ -319,7 +319,7 @@ bool SwWW8ImplReader::ImportOleWMF(tools::SvRef<SotStorage> xSrc1,GDIMetaFile &r
aFinalSize.Width() = rX;
aFinalSize.Height() = rY;
aFinalSize = OutputDevice::LogicToLogic(
- aFinalSize, MAP_TWIP, rWMF.GetPrefMapMode() );
+ aFinalSize, MapUnit::MapTwip, rWMF.GetPrefMapMode() );
aOrigSize = rWMF.GetPrefSize();
Fraction aScaleX(aFinalSize.Width(),aOrigSize.Width());
Fraction aScaleY(aFinalSize.Height(),aOrigSize.Height());
@@ -354,7 +354,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
{
rGraph = *pGrf;
const Size aSizeTwip = OutputDevice::LogicToLogic(
- rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MAP_TWIP );
+ rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapUnit::MapTwip );
nX = aSizeTwip.Width();
nY = aSizeTwip.Height();
}
@@ -368,7 +368,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
{
// 03-META stream is not available. Maybe it's a 03-PICT?
const Size aSizeTwip = OutputDevice::LogicToLogic(
- rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MAP_TWIP );
+ rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapUnit::MapTwip );
nX = aSizeTwip.Width();
nY = aSizeTwip.Height();
// PICT: no WMF available -> Graphic instead of OLE
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index b87a04cfbea9..abbb8f5bc6c5 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -357,7 +357,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
SwDoc *pDoc = getDoc();
const Rectangle rRect =
pDoc->GetDocShell()->GetVisArea( ASPECT_CONTENT );
- bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MAP_TWIP;
+ bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MapUnit::MapTwip;
OSL_ENSURE( bTwip, "Map unit for visible area is not in TWIPS!" );
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 341154e71b82..4ee54299d8a2 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1021,8 +1021,8 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps)
bool bChangeShowRedline = false, bChangeBrowseMode = false;
//TODO/LATER: why that cast?!
- bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MAP_TWIP;
- //sal_Bool bTwip = pDoc->GetDocShell()->SfxInPlaceObject::GetMapUnit ( ) == MAP_TWIP;
+ bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MapUnit::MapTwip;
+ //sal_Bool bTwip = pDoc->GetDocShell()->SfxInPlaceObject::GetMapUnit ( ) == MapUnit::MapTwip;
for (sal_Int32 i = 0; i < nCount ; i++)
{
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index f652a32b176d..651ba668ac59 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -132,7 +132,7 @@ static void lcl_addOutplaceProperties(
const rtl::Reference < XMLPropertySetMapper >& rMapper )
{
{
- MapMode aMode( MAP_100TH_MM ); // the API expects this map mode for the embedded objects
+ MapMode aMode( MapUnit::Map100thMM ); // the API expects this map mode for the embedded objects
Size aSize = rObj.GetSize( &aMode ); // get the size in the requested map mode
if( aSize.Width() && aSize.Height() )
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index b83ef45d8da7..784909fdbfdd 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -286,7 +286,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
if ( xObj.is() )
{
//TODO/LATER: is it enough to only set the VisAreaSize?
- lcl_setObjectVisualArea( xObj, nAspect, aTwipSize, MAP_TWIP );
+ lcl_setObjectVisualArea( xObj, nAspect, aTwipSize, MapUnit::MapTwip );
}
if( pTextCursor )
@@ -527,7 +527,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
pDoc->GetPersist()->GetEmbeddedObjectContainer().GetEmbeddedObject( aObjName );
if( xObj.is() )
lcl_setObjectVisualArea( xObj, ( nDrawAspect ? nDrawAspect : embed::Aspects::MSOLE_CONTENT ),
- aVisArea.GetSize(), MAP_100TH_MM );
+ aVisArea.GetSize(), MapUnit::Map100thMM );
}
return xPropSet;
@@ -656,7 +656,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet(
lcl_setObjectVisualArea( aAppletImpl.GetApplet(),
embed::Aspects::MSOLE_CONTENT,
Size( nWidth, nHeight ),
- MAP_100TH_MM );
+ MapUnit::Map100thMM );
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(),
::svt::EmbeddedObjectRef( aAppletImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ),
@@ -718,7 +718,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
lcl_setObjectVisualArea( xObj,
embed::Aspects::MSOLE_CONTENT,
Size( nWidth, nHeight ),
- MAP_100TH_MM );
+ MapUnit::Map100thMM );
if ( svt::EmbeddedObjectRef::TryRunningState( xObj ) )
{
@@ -851,7 +851,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
lcl_setObjectVisualArea( xObj,
embed::Aspects::MSOLE_CONTENT,
Size( nWidth, nHeight ),
- MAP_100TH_MM );
+ MapUnit::Map100thMM );
if ( svt::EmbeddedObjectRef::TryRunningState( xObj ) )
{