summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-08-07 09:15:52 +0200
committerNoel Grandin <noel@peralex.com>2013-08-12 11:56:46 +0200
commitb417e5b5b8e6ca375082975f44aa70702d57e9bd (patch)
treeba652e86486ddaa5b23de54d5504911e8f4f4d4a /vcl
parentaf1fbabc71ed92293de51d1d5e7e6ec58aa56c57 (diff)
convert vcl/inc/unx/wmadaptor.hxx from String to OUString
Change-Id: I1396e75f1d52005339101d568eb36e5d7051014b
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/wmadaptor.hxx6
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx26
-rw-r--r--vcl/unx/generic/window/salframe.cxx8
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx2
4 files changed, 21 insertions, 21 deletions
diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx
index 171e66ae4038..9eb7ad275abb 100644
--- a/vcl/inc/unx/wmadaptor.hxx
+++ b/vcl/inc/unx/wmadaptor.hxx
@@ -143,7 +143,7 @@ public:
protected:
SalDisplay* m_pSalDisplay; // Display to use
Display* m_pDisplay; // X Display of SalDisplay
- String m_aWMName;
+ OUString m_aWMName;
Atom m_aWMAtoms[ NetAtomMax];
int m_nDesktops;
bool m_bEqualWorkAreas;
@@ -181,7 +181,7 @@ public:
* may return an empty string if the window manager could
* not be identified.
*/
- const String& getWindowManagerName() const
+ const OUString& getWindowManagerName() const
{ return m_aWMName; }
/*
@@ -213,7 +213,7 @@ public:
/*
* sets window title
*/
- virtual void setWMName( X11SalFrame* pFrame, const String& rWMName ) const;
+ virtual void setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const;
/*
* set NET_WM_PID
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index eabea01c04e9..40bbb3f9e256 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -54,7 +54,7 @@ public:
NetWMAdaptor( SalDisplay* );
virtual ~NetWMAdaptor();
- virtual void setWMName( X11SalFrame* pFrame, const String& rWMName ) const;
+ virtual void setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const;
virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const;
virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const;
virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const;
@@ -250,7 +250,7 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
initAtoms();
getNetWmName(); // try to discover e.g. Sawfish
- if( m_aWMName.Len() == 0 )
+ if( m_aWMName.isEmpty() )
{
// check for ReflectionX wm (as it needs a workaround in Windows mode
Atom aRwmRunning = XInternAtom( m_pDisplay, "RWM_RUNNING", True );
@@ -268,7 +268,7 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
&pProperty ) == 0 )
{
if( aRealType == aRwmRunning )
- m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM("ReflectionX" ) );
+ m_aWMName = "ReflectionX";
XFree( pProperty );
}
else if( (aRwmRunning = XInternAtom( m_pDisplay, "_WRQ_WM_RUNNING", True )) != None &&
@@ -285,11 +285,11 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
&pProperty ) == 0 )
{
if( aRealType == XA_STRING )
- m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM( "ReflectionX Windows" ) );
+ m_aWMName = "ReflectionX Windows";
XFree( pProperty );
}
}
- if( m_aWMName.Len() == 0 )
+ if( m_aWMName.isEmpty() )
{
Atom aTTAPlatform = XInternAtom( m_pDisplay, "TTA_CLIENT_PLATFORM", True );
if( aTTAPlatform != None &&
@@ -307,7 +307,7 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
{
if( aRealType == XA_STRING )
{
- m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM("Tarantella" ) );
+ m_aWMName = "Tarantella";
// #i62319# pretend that AlwaysOnTop works since
// the alwaysontop workaround in salframe.cxx results
// in a raise/lower loop on a Windows tarantella client
@@ -673,7 +673,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
}
if( strncmp( "_ICEWM_TRAY", pAtomNames[i], 11 ) == 0 )
{
- m_aWMName = String(RTL_CONSTASCII_USTRINGPARAM("IceWM" ));
+ m_aWMName = "IceWM";
m_nWinGravity = NorthWestGravity;
m_nInitWinGravity = NorthWestGravity;
}
@@ -809,9 +809,9 @@ bool WMAdaptor::getNetWmName()
)
{
if (aRealType == m_aWMAtoms[ UTF8_STRING ])
- m_aWMName = String( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_UTF8 );
+ m_aWMName = OUString( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_UTF8 );
else if (aRealType == XA_STRING)
- m_aWMName = String( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_ISO_8859_1 );
+ m_aWMName = OUString( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_ISO_8859_1 );
XFree( pProperty );
pProperty = NULL;
@@ -823,7 +823,7 @@ bool WMAdaptor::getNetWmName()
}
// if this is metacity, check for version to enable a legacy workaround
- if( m_aWMName.EqualsAscii( "Metacity" ) )
+ if( m_aWMName.equalsAscii( "Metacity" ) )
{
int nVersionMajor = 0, nVersionMinor = 0;
Atom nVersionAtom = XInternAtom( m_pDisplay, "_METACITY_VERSION", True );
@@ -892,7 +892,7 @@ bool WMAdaptor::getWMshouldSwitchWorkspace() const
OUString( "ShouldSwitchWorkspace" ) ) );
if( aSetting.isEmpty() )
{
- if( m_aWMName.EqualsAscii( "awesome" ) )
+ if( m_aWMName.equalsAscii( "awesome" ) )
{
pWMA->m_bWMshouldSwitchWorkspace = false;
}
@@ -979,7 +979,7 @@ void GnomeWMAdaptor::initAtoms()
* WM_ICON_NAME
*/
-void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const
+void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const
{
OString aTitle(OUStringToOString(rWMName,
osl_getThreadTextEncoding()));
@@ -1086,7 +1086,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const
* WM_ICON_NAME
* _NET_WM_ICON_NAME
*/
-void NetWMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const
+void NetWMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const
{
WMAdaptor::setWMName( pFrame, rWMName );
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 1a2c1667b2b2..65bd389cede9 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -970,8 +970,8 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
}
else
{
- const String& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() );
- if( rWM.EqualsAscii( "KWin" ) ) // assume KDE is running
+ const OUString& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() );
+ if( rWM.equalsAscii( "KWin" ) ) // assume KDE is running
iconSize = 48;
static bool bGnomeIconSize = false;
static bool bGnomeChecked = false;
@@ -3333,7 +3333,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
{
// ReflectionX in Windows mode changes focus while mouse is grabbed
- if( nVisibleFloats > 0 && GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "ReflectionX Windows" ) )
+ if( nVisibleFloats > 0 && GetDisplay()->getWMAdaptor()->getWindowManagerName().equalsAscii( "ReflectionX Windows" ) )
return 1;
/* ignore focusout resulting from keyboard grabs
@@ -4025,7 +4025,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
/* another workaround for sawfish: if a transient window for the same parent is shown
* sawfish does not set the focus to it. Applies only for click to focus mode.
*/
- if( ! (nStyle_ & SAL_FRAME_STYLE_FLOAT ) && mbInShow && GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "Sawfish" ) )
+ if( ! (nStyle_ & SAL_FRAME_STYLE_FLOAT ) && mbInShow && GetDisplay()->getWMAdaptor()->getWindowManagerName().equalsAscii( "Sawfish" ) )
{
// don't set the focus into the IME status window
// since this will lead to a parent loose-focus, close status,
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 6780d9cc41d8..bff9da291187 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -1107,7 +1107,7 @@ static void lcl_set_accept_focus( GtkWindow* pWindow, gboolean bAccept, bool bBe
XSetWMHints( pDisplay, aWindow, pHints );
XFree( pHints );
- if (GetGtkSalData()->GetGtkDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz"))
+ if (GetGtkSalData()->GetGtkDisplay()->getWMAdaptor()->getWindowManagerName().equalsAscii("compiz"))
return;
/* remove WM_TAKE_FOCUS protocol; this would usually be the