summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-07-24 18:11:31 +0200
committerThomas Arnhold <thomas@arnhold.org>2011-07-25 15:13:06 +0200
commit2804ecc0fe40f8317050043b169396845b1b520d (patch)
treed6cb6b9b17d1cc9bab54bda44012789870f9e891 /vcl
parent14ff4c2ca033f9d00a613eb28b65a3e16891c8f3 (diff)
Remove vendor specific properties handling.
This needs some testing on other platforms! About SAL_PROPERTIES in OOo Environment documentation: "If set contains a bitfield activating various bug Xserver bug workarounds. Not very useful nowadays."
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/saldisp.hxx11
-rw-r--r--vcl/inc/vcl/jobset.hxx1
-rw-r--r--vcl/source/gdi/jobset.cxx13
-rw-r--r--vcl/unx/generic/app/saldisp.cxx91
-rw-r--r--vcl/unx/generic/window/salframe.cxx22
5 files changed, 15 insertions, 123 deletions
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 5f0bc8c11f5f..ac0c3c4c70fd 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -57,25 +57,17 @@ class ColorMask;
namespace vcl_sal { class WMAdaptor; }
// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#define PROPERTY_SUPPORT_WM_SetPos 0x00000001
-#define PROPERTY_SUPPORT_WM_Screen 0x00000002
#define PROPERTY_SUPPORT_WM_Parent_Pixmap_None 0x00000004
#define PROPERTY_SUPPORT_WM_ClientPos 0x00000008
-#define PROPERTY_SUPPORT_XSetClipMask 0x00000010 // for bitmap ops.
#define PROPERTY_SUPPORT_3ButtonMouse 0x00000020
-#define PROPERTY_BUG_XA_FAMILY_NAME_nil 0x00001000
#define PROPERTY_BUG_XCopyArea_GXxor 0x00002000 // from window
-#define PROPERTY_BUG_Stipple 0x00004000 // 0/1 inverted
#define PROPERTY_BUG_Tile 0x00008000 // Recreate the
// dither brush each time
#define PROPERTY_BUG_FillPolygon_Tile 0x00010000 // always Toggle Fillstyle
#define PROPERTY_BUG_DrawLine 0x00020000 // a DrawLine is one point to short
-#define PROPERTY_BUG_CopyPlane_RevertBWPixel 0x00040000 // revert fg and bg for xcopyplane
-#define PROPERTY_BUG_CopyArea_OnlySmallSlices 0x00080000
#define PROPERTY_BUG_Bitmap_Bit_Order 0x00100000
-#define PROPERTY_FEATURE_Maximize 0x01000000
#define PROPERTY_FEATURE_SharedMemory 0x02000000
#define PROPERTY_FEATURE_TrustedSolaris 0x04000000
@@ -352,7 +344,6 @@ protected:
srv_vendor_t meServerVendor;
SalWM eWindowManager_;
- sal_uLong nProperties_; // PROPERTY_SUPPORT, BUG, FEATURE
sal_Bool bLocal_; // Server==Client? Init
// in SalDisplay::IsLocal()
sal_Bool mbLocalIsValid; // bLocal_ is valid ?
@@ -475,7 +466,7 @@ public:
RenderEntryMap& GetRenderEntries( int nScreen ) const { return getDataForScreen(nScreen).m_aRenderData; }
const Pair &GetResolution() const { return aResolution_; }
bool GetExactResolution() const { return mbExactResolution; }
- sal_uLong GetProperties() const { return nProperties_; }
+ sal_uLong GetProperties() const { return PROPERTY_DEFAULT; }
sal_uLong GetMaxRequestSize() const { return nMaxRequestSize_; }
XLIB_Time GetLastUserEventTime( bool bAlwaysReget = false ) const;
diff --git a/vcl/inc/vcl/jobset.hxx b/vcl/inc/vcl/jobset.hxx
index 3ec52df2644e..0340f5dd8587 100644
--- a/vcl/inc/vcl/jobset.hxx
+++ b/vcl/inc/vcl/jobset.hxx
@@ -66,6 +66,7 @@ public:
* by the printer driver. One possible use are phone
* numbers for faxes (which disguise as printers)
*/
+ String GetValue( const String& rKey ) const;
void SetValue( const String& rKey, const String& rValue );
JobSetup& operator=( const JobSetup& rJob );
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 785a4387e99c..d06e16dcf0cb 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -210,6 +210,19 @@ XubString JobSetup::GetDriverName() const
// -----------------------------------------------------------------------
+String JobSetup::GetValue( const String& rKey ) const
+{
+ if( mpData )
+ {
+ ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >::const_iterator it;
+ it = mpData->maValueMap.find( rKey );
+ return it != mpData->maValueMap.end() ? String( it->second ) : String();
+ }
+ return String();
+}
+
+// -----------------------------------------------------------------------
+
void JobSetup::SetValue( const String& rKey, const String& rValue )
{
if( ! mpData )
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 419dd6e631e2..57eec67f5c23 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -387,22 +387,6 @@ sal_GetServerVendor( Display *p_display )
return vendor_unknown;
}
-static sal_Bool sal_IsTrustedSolaris (Display *p_display)
-{
- int n_numextensions = 0;
- char **p_extensions = XListExtensions (p_display, &n_numextensions);
- sal_Bool b_is = sal_False;
-
- if (p_extensions != NULL)
- {
- for (int i = 0; !b_is && i < n_numextensions; i++)
- b_is = (strcmp (p_extensions[i], "SUN_TSOL") == 0);
- XFreeExtensionList (p_extensions);
- }
-
- return b_is;
-}
-
// -=-= SalDisplay -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
sal_Bool SalDisplay::BestVisual( Display *pDisplay,
@@ -805,7 +789,6 @@ void SalDisplay::Init()
aPointerCache_[i] = None;
eWindowManager_ = otherwm;
- nProperties_ = PROPERTY_DEFAULT;
hEventGuard_ = NULL;
mpFactory = (AttributeProvider*)NULL;
m_pCapture = NULL;
@@ -860,80 +843,6 @@ void SalDisplay::Init()
// - - - - - - - - - - Window Manager - - - - - - - - - - -
m_pWMAdaptor = ::vcl_sal::WMAdaptor::createWMAdaptor( this );
- // - - - - - - - - - - Properties - - - - - - - - - - - - -
- const char *pProperties = getenv( "SAL_PROPERTIES" );
- if( pProperties )
- sscanf( pProperties, "%li", &nProperties_ );
- else
- {
- nProperties_ |= PROPERTY_FEATURE_Maximize;
- // Server Bugs & Properties
- if( GetServerVendor() == vendor_excursion )
- {
- nProperties_ |= PROPERTY_BUG_Stipple;
- nProperties_ |= PROPERTY_BUG_DrawLine;
- nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask;
- }
- else
- if( GetServerVendor() == vendor_attachmate )
- {
- nProperties_ |= PROPERTY_BUG_CopyPlane_RevertBWPixel;
- }
- else
- if( GetServerVendor() == vendor_ibm )
- {
- nProperties_ |= PROPERTY_BUG_XA_FAMILY_NAME_nil;
-
- if( otherwm == eWindowManager_ ) eWindowManager_ = mwm;
- }
- else
- if( GetServerVendor() == vendor_sun )
- {
- // nicht alle! (bekannt: nur Sparc II CG3, CG6?)
- nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask;
-
- // trusted solaris doesn't allow to change properties on the
- // wm decoration window
- if (sal_IsTrustedSolaris (pDisp_))
- nProperties_ |= PROPERTY_FEATURE_TrustedSolaris;
-
- // Fehler im Sun-Solaris X86 Server !
- if (ImageByteOrder(GetDisplay()) == LSBFirst)
- {
- nProperties_ |= PROPERTY_BUG_Tile;
- nProperties_ |= PROPERTY_SUPPORT_3ButtonMouse;
- }
- else // MSBFirst Sun-Solaris Sparc Server
- {
- // XCopyPlane reverts black and white for 1bit bitmaps
- // only sun, only 8bit pseudocolor target
- if ( (GetVisual(m_nDefaultScreen).GetDepth() == 8)
- && (GetVisual(m_nDefaultScreen).GetClass() == PseudoColor))
- nProperties_ |= PROPERTY_BUG_CopyPlane_RevertBWPixel;
- // Fehler in Solaris 2.5.1
- if (VendorRelease ( GetDisplay() ) < 3600)
- nProperties_ |= PROPERTY_BUG_FillPolygon_Tile;
- }
- }
- else
- if( GetServerVendor() == vendor_hummingbird )
- {
- if (GetVisual(m_nDefaultScreen).GetDepth() == 24)
- nProperties_ |= PROPERTY_BUG_CopyArea_OnlySmallSlices;
- }
-
- if( winmgr == eWindowManager_ )
- {
- nProperties_ &= ~PROPERTY_SUPPORT_WM_SetPos;
- nProperties_ &= ~PROPERTY_SUPPORT_WM_Screen;
- nProperties_ |= PROPERTY_FEATURE_Maximize;
- }
- else if( pmwm == eWindowManager_ )
- {
- nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos;
- }
- }
-
InitXinerama();
#ifdef DBG_UTIL
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 98d6c367a0e0..8aba94d67a7f 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -4273,28 +4273,6 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
if ( mpInputContext != NULL )
mpInputContext->Map( this );
CallCallback( SALEVENT_RESIZE, NULL );
- if( pDisplay_->GetServerVendor() == vendor_hummingbird )
- {
- /*
- * With Exceed sometimes there does not seem to be
- * an Expose after the MapNotify.
- * so start a delayed paint here
- */
- maPaintRegion.Union( Rectangle( Point( 0, 0 ), Size( maGeometry.nWidth, maGeometry.nHeight ) ) );
- XEvent aEvent;
- aEvent.xexpose.type = Expose;
- aEvent.xexpose.display = pDisplay_->GetDisplay();
- aEvent.xexpose.x = 0;
- aEvent.xexpose.y = 0;
- aEvent.xexpose.width = maGeometry.nWidth;
- aEvent.xexpose.height = maGeometry.nHeight;
- aEvent.xexpose.count = 0;
- XSendEvent( pDisplay_->GetDisplay(),
- GetWindow(),
- True,
- ExposureMask,
- &aEvent );
- }
bool bSetFocus = m_bSetFocusOnMap;
/* another workaround for sawfish: if a transient window for the same parent is shown