You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/12/17 16:01:25 UTC
svn commit: r1551563 - in /openoffice/trunk/main/vcl: aqua/source/gdi/
aqua/source/window/ inc/aqua/ inc/os2/ inc/win/ os2/source/gdi/
unx/generic/gdi/ win/source/gdi/
Author: hdu
Date: Tue Dec 17 15:01:25 2013
New Revision: 1551563
URL: http://svn.apache.org/r1551563
Log:
#i123840# normalize SalFrame resolution type to sal_Int32
Modified:
openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx
openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx
openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx
openoffice/trunk/main/vcl/inc/aqua/salframe.h
openoffice/trunk/main/vcl/inc/aqua/salgdi.h
openoffice/trunk/main/vcl/inc/os2/salgdi.h
openoffice/trunk/main/vcl/inc/win/salgdi.h
openoffice/trunk/main/vcl/os2/source/gdi/salgdi.cxx
openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx
openoffice/trunk/main/vcl/win/source/gdi/salgdi.cxx
Modified: openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx Tue Dec 17 15:01:25 2013
@@ -430,13 +430,13 @@ void AquaSalGraphics::initResolution( NS
mfFakeDPIScale = 1.0;
}
-void AquaSalGraphics::GetResolution( long& rDPIX, long& rDPIY )
+void AquaSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
{
if( !mnRealDPIY )
initResolution( (mbWindow && mpFrame) ? mpFrame->getNSWindow() : nil );
- rDPIX = static_cast<long>(mfFakeDPIScale * mnRealDPIX);
- rDPIY = static_cast<long>(mfFakeDPIScale * mnRealDPIY);
+ rDPIX = lrint( mfFakeDPIScale * mnRealDPIX);
+ rDPIY = lrint( mfFakeDPIScale * mnRealDPIY);
}
void AquaSalGraphics::copyResolution( AquaSalGraphics& rGraphics )
Modified: openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx Tue Dec 17 15:01:25 2013
@@ -407,7 +407,7 @@ void AquaSalInfoPrinter::GetPageInfo( co
{
if( mpPrintInfo )
{
- long nDPIX = 72, nDPIY = 72;
+ sal_Int32 nDPIX = 72, nDPIY = 72;
mpGraphics->GetResolution( nDPIX, nDPIY );
const double fXScaling = static_cast<double>(nDPIX)/72.0,
fYScaling = static_cast<double>(nDPIY)/72.0;
Modified: openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx Tue Dec 17 15:01:25 2013
@@ -1219,7 +1219,7 @@ static Font getFont( NSFont* pFont, long
return aResult;
}
-void AquaSalFrame::getResolution( long& o_rDPIX, long& o_rDPIY )
+void AquaSalFrame::getResolution( sal_Int32& o_rDPIX, sal_Int32& o_rDPIY )
{
if( ! mpGraphics )
{
@@ -1264,7 +1264,7 @@ void AquaSalFrame::UpdateSettings( AllSe
// get the system font settings
Font aAppFont = aStyleSettings.GetAppFont();
- long nDPIX = 72, nDPIY = 72;
+ sal_Int32 nDPIX = 72, nDPIY = 72;
getResolution( nDPIX, nDPIY );
aAppFont = getFont( [NSFont systemFontOfSize: 0], nDPIY, aAppFont );
Modified: openoffice/trunk/main/vcl/inc/aqua/salframe.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/aqua/salframe.h?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/aqua/salframe.h (original)
+++ openoffice/trunk/main/vcl/inc/aqua/salframe.h Tue Dec 17 15:01:25 2013
@@ -179,7 +179,7 @@ public:
NSView* getNSView() const { return mpNSView; }
unsigned int getStyleMask() const { return mnStyleMask; }
- void getResolution( long& o_rDPIX, long& o_rDPIY );
+ void getResolution( sal_Int32& o_rDPIX, sal_Int32& o_rDPIY );
// actually the follwing methods do the same thing: flipping y coordinates
// but having two of them makes clearer what the coordinate system
Modified: openoffice/trunk/main/vcl/inc/aqua/salgdi.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/aqua/salgdi.h?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/aqua/salgdi.h (original)
+++ openoffice/trunk/main/vcl/inc/aqua/salgdi.h Tue Dec 17 15:01:25 2013
@@ -248,7 +248,7 @@ public:
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
// get device resolution
- virtual void GetResolution( long& rDPIX, long& rDPIY );
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
// get the depth of the device
virtual sal_uInt16 GetBitCount();
// get the width of the device
Modified: openoffice/trunk/main/vcl/inc/os2/salgdi.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/os2/salgdi.h?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/os2/salgdi.h (original)
+++ openoffice/trunk/main/vcl/inc/os2/salgdi.h Tue Dec 17 15:01:25 2013
@@ -233,7 +233,7 @@ public:
// public SalGraphics methods, the interface to teh independent vcl part
// get device resolution
- virtual void GetResolution( long& rDPIX, long& rDPIY );
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
// get the depth of the device
virtual USHORT GetBitCount();
// get the width of the device
Modified: openoffice/trunk/main/vcl/inc/win/salgdi.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/win/salgdi.h?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/win/salgdi.h (original)
+++ openoffice/trunk/main/vcl/inc/win/salgdi.h Tue Dec 17 15:01:25 2013
@@ -263,7 +263,7 @@ public:
// public SalGraphics methods, the interface to teh independent vcl part
// get device resolution
- virtual void GetResolution( long& rDPIX, long& rDPIY );
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
// get the depth of the device
virtual sal_uInt16 GetBitCount();
// get the width of the device
Modified: openoffice/trunk/main/vcl/os2/source/gdi/salgdi.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/os2/source/gdi/salgdi.cxx?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/os2/source/gdi/salgdi.cxx (original)
+++ openoffice/trunk/main/vcl/os2/source/gdi/salgdi.cxx Tue Dec 17 15:01:25 2013
@@ -151,13 +151,16 @@ static SalColor ImplGetROPSalColor( SalR
// -----------------------------------------------------------------------
-void Os2SalGraphics::GetResolution( long& rDPIX, long& rDPIY )
+void Os2SalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
{
// since OOo asks for DPI, I will query FONT_RES, which seems to be
// more correct than _RESOLUTION fields (on my wide screen lcd)
// and does not require conversion
- DevQueryCaps( mhDC, CAPS_HORIZONTAL_FONT_RES, 1, &rDPIX );
- DevQueryCaps( mhDC, CAPS_VERTICAL_FONT_RES, 1, &rDPIY );
+ long nDPIX = 72, nDPIY = 72;
+ DevQueryCaps( mhDC, CAPS_HORIZONTAL_FONT_RES, 1, &nDPIX );
+ DevQueryCaps( mhDC, CAPS_VERTICAL_FONT_RES, 1, &nDPIY );
+ rDPIX = nDPIX;
+ rDPIY = nDPIY;
}
// -----------------------------------------------------------------------
Modified: openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx Tue Dec 17 15:01:25 2013
@@ -1279,10 +1279,8 @@ SalLayout* X11SalGraphics::GetTextLayout
if (!bDisableGraphite_ &&
GraphiteFontAdaptor::IsGraphiteEnabledFont(*mpServerFont[nFallbackLevel]))
{
- sal_Int32 xdpi, ydpi;
-
- xdpi = GetDisplay()->GetResolution().A();
- ydpi = GetDisplay()->GetResolution().B();
+ sal_Int32 xdpi = GetDisplay()->GetResolution().A();
+ sal_Int32 ydpi = GetDisplay()->GetResolution().B();
GraphiteFontAdaptor * pGrfont = new GraphiteFontAdaptor( *mpServerFont[nFallbackLevel], xdpi, ydpi);
if (!pGrfont) return NULL;
Modified: openoffice/trunk/main/vcl/win/source/gdi/salgdi.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/win/source/gdi/salgdi.cxx?rev=1551563&r1=1551562&r2=1551563&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/win/source/gdi/salgdi.cxx (original)
+++ openoffice/trunk/main/vcl/win/source/gdi/salgdi.cxx Tue Dec 17 15:01:25 2013
@@ -791,7 +791,7 @@ WinSalGraphics::~WinSalGraphics()
// -----------------------------------------------------------------------
-void WinSalGraphics::GetResolution( long& rDPIX, long& rDPIY )
+void WinSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
{
rDPIX = GetDeviceCaps( getHDC(), LOGPIXELSX );
rDPIY = GetDeviceCaps( getHDC(), LOGPIXELSY );