[Libreoffice-commits] .: 2 commits - vcl/aqua vcl/inc vcl/os2 vcl/unx vcl/win
Lubos Lunak
llunak at kemper.freedesktop.org
Mon Jan 17 09:43:22 PST 2011
vcl/aqua/inc/salgdi.h | 2 +-
vcl/aqua/source/gdi/salgdi.cxx | 2 +-
vcl/inc/vcl/salgdi.hxx | 2 +-
vcl/os2/inc/salgdi.h | 2 +-
vcl/os2/source/gdi/salgdi.cxx | 2 +-
vcl/unx/headless/svpgdi.cxx | 2 +-
vcl/unx/headless/svpgdi.hxx | 2 +-
vcl/unx/headless/svppspgraphics.cxx | 2 +-
vcl/unx/headless/svppspgraphics.hxx | 2 +-
vcl/unx/inc/pspgraphics.h | 2 +-
vcl/unx/inc/salgdi.h | 2 +-
vcl/unx/source/gdi/pspgraphics.cxx | 2 +-
vcl/unx/source/gdi/salgdi.cxx | 8 ++++----
vcl/win/inc/salgdi.h | 2 +-
vcl/win/source/gdi/salgdi.cxx | 2 +-
15 files changed, 18 insertions(+), 18 deletions(-)
New commits:
commit 79dac55204ed7a58c64951881be0e515aeb4b3ba
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Jan 17 18:42:44 2011 +0100
fix cases of using screen visual for a drawable
But I fear the assumption that there is just one visual per screen
is quite spread in the code :-/.
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 14f5b90..e25aea7 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -1051,10 +1051,10 @@ SystemGraphicsData X11SalGraphics::GetGraphicsData() const
aRes.nSize = sizeof(aRes);
aRes.pDisplay = GetXDisplay();
aRes.hDrawable = hDrawable_;
- aRes.pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual();
+ aRes.pVisual = GetVisual().visual;
aRes.nScreen = m_nScreen;
- aRes.nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth();
- aRes.aColormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap();
+ aRes.nDepth = GetBitCount();
+ aRes.aColormap = GetColormap().GetXColormap();
aRes.pXRenderFormat = m_pXRenderFormat;
return aRes;
}
commit 4fff39f59ca0d78aa2ec98e41b679404d953a058
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Jan 17 18:42:24 2011 +0100
add const to GetBitCount()
diff --git a/vcl/aqua/inc/salgdi.h b/vcl/aqua/inc/salgdi.h
index eb20386..2c5f37c 100644
--- a/vcl/aqua/inc/salgdi.h
+++ b/vcl/aqua/inc/salgdi.h
@@ -245,7 +245,7 @@ public:
// get device resolution
virtual void GetResolution( long& rDPIX, long& rDPIY );
// get the depth of the device
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount() const;
// get the width of the device
virtual long GetGraphicsWidth() const;
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 4585699..a892aaa 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -452,7 +452,7 @@ void AquaSalGraphics::copyResolution( AquaSalGraphics& rGraphics )
// -----------------------------------------------------------------------
-USHORT AquaSalGraphics::GetBitCount()
+USHORT AquaSalGraphics::GetBitCount() const
{
USHORT nBits = mnBitmapDepth ? mnBitmapDepth : 32;//24;
return nBits;
diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx
index a92a7d9..15b2c70 100644
--- a/vcl/inc/vcl/salgdi.hxx
+++ b/vcl/inc/vcl/salgdi.hxx
@@ -200,7 +200,7 @@ public:
// get device resolution
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0;
// get the depth of the device
- virtual USHORT GetBitCount() = 0;
+ virtual USHORT GetBitCount() const = 0;
// get the width of the device
virtual long GetGraphicsWidth() const = 0;
diff --git a/vcl/os2/inc/salgdi.h b/vcl/os2/inc/salgdi.h
index 621451d..d7be9a6 100644
--- a/vcl/os2/inc/salgdi.h
+++ b/vcl/os2/inc/salgdi.h
@@ -206,7 +206,7 @@ public:
// get device resolution
virtual void GetResolution( long& rDPIX, long& rDPIY );
// get the depth of the device
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount() const;
// get the width of the device
virtual long GetGraphicsWidth() const;
diff --git a/vcl/os2/source/gdi/salgdi.cxx b/vcl/os2/source/gdi/salgdi.cxx
index c5fc42c..6db8bb4 100644
--- a/vcl/os2/source/gdi/salgdi.cxx
+++ b/vcl/os2/source/gdi/salgdi.cxx
@@ -165,7 +165,7 @@ void Os2SalGraphics::GetResolution( long& rDPIX, long& rDPIY )
// -----------------------------------------------------------------------
-USHORT Os2SalGraphics::GetBitCount()
+USHORT Os2SalGraphics::GetBitCount() const
{
LONG nBitCount;
DevQueryCaps( mhDC, CAPS_COLOR_BITCOUNT, 1, &nBitCount );
diff --git a/vcl/unx/headless/svpgdi.cxx b/vcl/unx/headless/svpgdi.cxx
index f1cf483..582c870 100644
--- a/vcl/unx/headless/svpgdi.cxx
+++ b/vcl/unx/headless/svpgdi.cxx
@@ -132,7 +132,7 @@ void SvpSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
rDPIX = rDPIY = 96;
}
-USHORT SvpSalGraphics::GetBitCount()
+USHORT SvpSalGraphics::GetBitCount() const
{
return SvpElement::getBitCountFromScanlineFormat( m_aDevice->getScanlineFormat() );
}
diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx
index 2a05b10..ed3396e 100644
--- a/vcl/unx/headless/svpgdi.hxx
+++ b/vcl/unx/headless/svpgdi.hxx
@@ -65,7 +65,7 @@ public:
// overload all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount() const;
virtual long GetGraphicsWidth() const;
virtual void ResetClipRegion();
diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx
index a7b3c11..7c3df8b 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -205,7 +205,7 @@ void PspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY )
}
}
-USHORT PspGraphics::GetBitCount()
+USHORT PspGraphics::GetBitCount() const
{
return m_pPrinterGfx->GetBitCount();
}
diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx
index 6e865f3..a438ef3 100644
--- a/vcl/unx/headless/svppspgraphics.hxx
+++ b/vcl/unx/headless/svppspgraphics.hxx
@@ -87,7 +87,7 @@ public:
// overload all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount() const;
virtual long GetGraphicsWidth() const;
virtual void ResetClipRegion();
diff --git a/vcl/unx/inc/pspgraphics.h b/vcl/unx/inc/pspgraphics.h
index 9616202..275c3a9 100644
--- a/vcl/unx/inc/pspgraphics.h
+++ b/vcl/unx/inc/pspgraphics.h
@@ -84,7 +84,7 @@ public:
// overload all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount() const;
virtual long GetGraphicsWidth() const;
virtual void ResetClipRegion();
diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h
index 038e129..938e220 100644
--- a/vcl/unx/inc/salgdi.h
+++ b/vcl/unx/inc/salgdi.h
@@ -231,7 +231,7 @@ public:
// overload all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount() const;
virtual long GetGraphicsWidth() const;
virtual long GetGraphicsHeight() const;
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index c25e065..5c30d53 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -279,7 +279,7 @@ void PspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY )
}
}
-USHORT PspGraphics::GetBitCount()
+USHORT PspGraphics::GetBitCount() const
{
return m_pPrinterGfx->GetBitCount();
}
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 9a4912e..14f5b90 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -531,7 +531,7 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-USHORT X11SalGraphics::GetBitCount() // const
+USHORT X11SalGraphics::GetBitCount() const
{
return GetVisual().GetDepth();
}
diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h
index 0ba816c..6b80293 100644
--- a/vcl/win/inc/salgdi.h
+++ b/vcl/win/inc/salgdi.h
@@ -251,7 +251,7 @@ public:
// get device resolution
virtual void GetResolution( long& rDPIX, long& rDPIY );
// get the depth of the device
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount() const;
// get the width of the device
virtual long GetGraphicsWidth() const;
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 89d54b9..1ca0068 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -804,7 +804,7 @@ void WinSalGraphics::GetResolution( long& rDPIX, long& rDPIY )
// -----------------------------------------------------------------------
-USHORT WinSalGraphics::GetBitCount()
+USHORT WinSalGraphics::GetBitCount() const
{
return (USHORT)GetDeviceCaps( mhDC, BITSPIXEL );
}
More information about the Libreoffice-commits
mailing list