[Libreoffice-commits] .: 2 commits - svtools/inc svtools/source vcl/inc vcl/source vcl/unx vcl/workben

Thomas Arnhold tarnhold at kemper.freedesktop.org
Mon Jul 25 06:14:31 PDT 2011


 svtools/inc/svtools/fmtfield.hxx    |    1 
 svtools/source/control/fmtfield.cxx |   12 ----
 vcl/inc/unx/saldisp.hxx             |   11 ----
 vcl/inc/vcl/button.hxx              |    1 
 vcl/inc/vcl/dockwin.hxx             |    3 -
 vcl/source/control/button.cxx       |    7 --
 vcl/source/window/dockwin.cxx       |   36 --------------
 vcl/source/window/menu.cxx          |    6 --
 vcl/unx/generic/app/saldisp.cxx     |   91 ------------------------------------
 vcl/unx/generic/window/salframe.cxx |   22 --------
 vcl/workben/vcldemo.cxx             |    9 ---
 11 files changed, 1 insertion(+), 198 deletions(-)

New commits:
commit 6b344d2654eb6a87f6e759376e7ee988f1a52761
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun Jul 24 18:11:31 2011 +0200

    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."

diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index f69b543..b209cde 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 a5a0f33..322808a 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 a41aca8..eb6d808 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 692d8f6..ff0f606 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 2360018..f1891a2 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
commit 04213a8183e40bad242873ebb4e1acfc7321b8f7
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun Jul 24 18:11:10 2011 +0200

    callcatcher: remove unused methods

diff --git a/svtools/inc/svtools/fmtfield.hxx b/svtools/inc/svtools/fmtfield.hxx
index 058e4c0..750299e 100644
--- a/svtools/inc/svtools/fmtfield.hxx
+++ b/svtools/inc/svtools/fmtfield.hxx
@@ -333,7 +333,6 @@ class DoubleCurrencyField : public FormattedField
 
 public:
     DoubleCurrencyField(Window* pParent, WinBits nStyle = 0);
-    DoubleCurrencyField(Window* pParent, const ResId& rResId);
 
     XubString	getCurrencySymbol() const { return m_sCurrencySymbol; }
     void		setCurrencySymbol(const XubString& _sSymbol);
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index e6e5ad0..363aa79 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -1262,18 +1262,6 @@ DoubleCurrencyField::DoubleCurrencyField(Window* pParent, WinBits nStyle)
 }
 
 //------------------------------------------------------------------------------
-DoubleCurrencyField::DoubleCurrencyField(Window* pParent, const ResId& rResId)
-    :FormattedField(pParent, rResId)
-    ,m_bChangingFormat(sal_False)
-{
-    m_bPrependCurrSym = sal_False;
-
-    // initialize with a system currency format
-    m_sCurrencySymbol = SvtSysLocale().GetLocaleData().getCurrSymbol();
-    UpdateCurrencyFormat();
-}
-
-//------------------------------------------------------------------------------
 void DoubleCurrencyField::FormatChanged(FORMAT_CHANGE_TYPE nWhat)
 {
     if (m_bChangingFormat)
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 5930473..ad3b2f3 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -556,7 +556,6 @@ class VCL_DLLPUBLIC DisclosureButton : public CheckBox
 protected:
     SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState();
 public:
-    DisclosureButton( Window* pParent, WinBits nStyle = 0 );
     DisclosureButton( Window* pParent, const ResId& rResId );
 
     virtual void    KeyInput( const KeyEvent& rKEvt );
diff --git a/vcl/inc/vcl/dockwin.hxx b/vcl/inc/vcl/dockwin.hxx
index 545b8ba..c001b06 100644
--- a/vcl/inc/vcl/dockwin.hxx
+++ b/vcl/inc/vcl/dockwin.hxx
@@ -329,7 +329,6 @@ public:
     virtual void	DataChanged( const DataChangedEvent& rDCEvt );
 
     void			ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible = sal_True );
-    sal_Bool			IsTitleButtonVisible( sal_uInt16 nButton ) const;
 
     void			SetPin( sal_Bool bPin );
     sal_Bool			IsPined() const;
@@ -345,7 +344,6 @@ public:
     const Size& 	GetMinOutputSizePixel() const;
 
     void			SetMaxOutputSizePixel( const Size& rSize );
-    const Size& 	GetMaxOutputSizePixel() const;
 
     sal_Bool			IsDocking() const { return mbDocking; }
     sal_Bool			IsDockable() const { return mbDockable; }
@@ -362,7 +360,6 @@ public:
 
     void			SetFloatStyle( WinBits nWinStyle );
     WinBits 		GetFloatStyle() const;
-    void			SetTabStop();
 
     virtual void	SetPosSizePixel( long nX, long nY,
                                      long nWidth, long nHeight,
diff --git a/vcl/inc/vcl/jobset.hxx b/vcl/inc/vcl/jobset.hxx
index 322808a..a5a0f33 100644
--- a/vcl/inc/vcl/jobset.hxx
+++ b/vcl/inc/vcl/jobset.hxx
@@ -66,7 +66,6 @@ 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/control/button.cxx b/vcl/source/control/button.cxx
index dbe76c4..39cafb6 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -4184,13 +4184,6 @@ TriStateBox::~TriStateBox()
 
 // =======================================================================
 
-DisclosureButton::DisclosureButton( Window* pParent, WinBits ) :
-    CheckBox( pParent, WB_NOBORDER )
-{
-}
-
-// -----------------------------------------------------------------------
-
 DisclosureButton::DisclosureButton( Window* pParent, const ResId& rResId ) :
     CheckBox( pParent, rResId.SetRT( RSC_CHECKBOX ) )
 {
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index eb6d808..a41aca8 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -210,19 +210,6 @@ 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/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index b912f55..d091ec2 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -806,21 +806,6 @@ void DockingWindow::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible )
 
 // -----------------------------------------------------------------------
 
-sal_Bool DockingWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const
-{
-    if ( mpFloatWin )
-        return mpFloatWin->IsTitleButtonVisible( nButton );
-    else
-    {
-        if ( nButton == TITLE_BUTTON_DOCKING )
-            return mbDockBtn;
-        else /* if ( nButton == TITLE_BUTTON_HIDE ) */
-            return mbHideBtn;
-    }
-}
-
-// -----------------------------------------------------------------------
-
 void DockingWindow::SetFloatingMode( sal_Bool bFloatMode )
 {
     ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
@@ -951,20 +936,6 @@ WinBits DockingWindow::GetFloatStyle() const
 
 // -----------------------------------------------------------------------
 
-void DockingWindow::SetTabStop()
-{
-    ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
-    if( pWrapper )
-    {
-        pWrapper->SetTabStop();
-        return;
-    }
-
-    mpWindowImpl->mnStyle |= WB_GROUP | WB_TABSTOP;
-}
-
-// -----------------------------------------------------------------------
-
 void DockingWindow::SetPosSizePixel( long nX, long nY,
                                      long nWidth, long nHeight,
                                      sal_uInt16 nFlags )
@@ -1109,11 +1080,4 @@ void DockingWindow::SetMaxOutputSizePixel( const Size& rSize )
     mpImplData->maMaxOutSize = rSize;
 }
 
-const Size& DockingWindow::GetMaxOutputSizePixel() const
-{
-    if ( mpFloatWin )
-        return mpFloatWin->GetMaxOutputSizePixel();
-    return mpImplData->maMaxOutSize;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index c5129d1..e5e5e24 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -522,7 +522,6 @@ class DecoToolBox : public ToolBox
     using Window::ImplInit;
 public:
             DecoToolBox( Window* pParent, WinBits nStyle = 0 );
-            DecoToolBox( Window* pParent, const ResId& rResId );
     void    ImplInit();
 
     void    DataChanged( const DataChangedEvent& rDCEvt );
@@ -540,11 +539,6 @@ DecoToolBox::DecoToolBox( Window* pParent, WinBits nStyle ) :
 {
     ImplInit();
 }
-DecoToolBox::DecoToolBox( Window* pParent, const ResId& rResId ) :
-    ToolBox( pParent, rResId )
-{
-    ImplInit();
-}
 
 void DecoToolBox::ImplInit()
 {
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 29f4f51..df226a2 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -37,8 +37,6 @@
 #include <vcl/svapp.hxx>
 #include <vcl/wrkwin.hxx>
 #include <vcl/msgbox.hxx>
-#include <vcl/introwin.hxx>
-#include <vcl/msgbox.hxx>
 
 #include <comphelper/processfactory.hxx>
 #include <cppuhelper/servicefactory.hxx>
@@ -90,13 +88,6 @@ public:
 
 void Main()
 {
-    /*
-    IntroWindow splash;
-    splash.Show();
-    sleep(5);
-    splash.Hide();
-    */
-
     MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
     aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCLDemo - VCL Workbench" ) ) );
     aMainWin.Show();


More information about the Libreoffice-commits mailing list