summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-03-23 18:06:39 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-03-23 18:06:39 +0100
commitd67e92069b9fb109e33a5133326eef51bf99aeb8 (patch)
tree8e403c695b28b8ba6adf2dc305a5c62388f7ae01 /vcl/unx
parent4617694b3fd830c8560f8d75d5f6afca618a8d65 (diff)
parent78f80b020fe009bc48e9e5f8b7862de51f1f8381 (diff)
vcl2gnumake: rebase to DEV300m103
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/app/saldisp.cxx32
-rw-r--r--vcl/unx/generic/dtrans/X11_clipboard.hxx26
-rw-r--r--vcl/unx/generic/dtrans/X11_dndcontext.hxx6
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx68
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.hxx39
-rw-r--r--vcl/unx/generic/dtrans/X11_service.cxx24
-rw-r--r--vcl/unx/generic/dtrans/X11_transferable.hxx4
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx10
-rw-r--r--vcl/unx/generic/gdi/pspgraphics.cxx36
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx108
-rw-r--r--vcl/unx/generic/gdi/salgdi2.cxx12
-rw-r--r--vcl/unx/generic/gdi/salgdi3.cxx24
-rw-r--r--vcl/unx/generic/gdi/salprnpsp.cxx2
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx6
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx25
-rw-r--r--vcl/unx/headless/svpgdi.cxx50
-rw-r--r--vcl/unx/headless/svpgdi.hxx5
-rw-r--r--vcl/unx/headless/svppspgraphics.cxx36
-rw-r--r--vcl/unx/headless/svppspgraphics.hxx5
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx12
-rw-r--r--vcl/unx/kde4/KDESalFrame.hxx4
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx22
-rw-r--r--vcl/unx/kde4/KDESalGraphics.hxx12
-rw-r--r--vcl/unx/kde4/KDESalInstance.cxx2
-rw-r--r--vcl/unx/kde4/KDESalInstance.hxx2
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx2
26 files changed, 281 insertions, 293 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index b06a664c57a6..5a228676e722 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -912,7 +912,7 @@ void SalDisplay::Init()
// carefully. if we are running linux (i.e. not netbsd) on an xfree
// display, fvwm is most probable the wm to choose, confusing with mwm
// doesn't harm. #57791# start maximized if possible
- if( (otherwm == eWindowManager_)
+ if( (otherwm == eWindowManager_)
|| (olwm == eWindowManager_ ))
{
eWindowManager_ = fvwm; // ???
@@ -2790,44 +2790,44 @@ SalVisual::SalVisual( const XVisualInfo* pXVI )
if( blue_mask == 0xFF )
eRGBMode_ = RGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( blue_mask == 0xFF00 )
if( green_mask == 0xFF )
eRGBMode_ = RBG;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( green_mask == 0xFF0000 )
if( red_mask == 0xFF00 )
if( blue_mask == 0xFF )
eRGBMode_ = GRB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( blue_mask == 0xFF00 )
if( red_mask == 0xFF )
eRGBMode_ = GBR;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( blue_mask == 0xFF0000 )
if( red_mask == 0xFF00 )
if( green_mask == 0xFF )
eRGBMode_ = BRG;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( green_mask == 0xFF00 )
if( red_mask == 0xFF )
eRGBMode_ = BGR;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
}
}
@@ -2851,7 +2851,7 @@ sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 )
switch( GetMode() )
{
- case other:
+ case otherSalRGB:
return sal_False;
case SALCOLOR:
break;
@@ -2886,7 +2886,7 @@ sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2 )
switch( GetMode() )
{
- case other:
+ case otherSalRGB:
return sal_False;
case SALCOLOR:
break;
@@ -2939,7 +2939,7 @@ SalColor SalVisual::GetTCColor( Pixel nPixel ) const
Pixel g = nPixel & green_mask;
Pixel b = nPixel & blue_mask;
- if( other != eRGBMode_ ) // 8+8+8=24
+ if( otherSalRGB != eRGBMode_ ) // 8+8+8=24
return MAKE_SALCOLOR( r >> nRedShift_,
g >> nGreenShift_,
b >> nBlueShift_ );
@@ -2970,7 +2970,7 @@ Pixel SalVisual::GetTCPixel( SalColor nSalColor ) const
if( SALCOLORREVERSE == eRGBMode_ )
return (b << 16) | (g << 8) | (r);
- if( other != eRGBMode_ ) // 8+8+8=24
+ if( otherSalRGB != eRGBMode_ ) // 8+8+8=24
return (r << nRedShift_) | (g << nGreenShift_) | (b << nBlueShift_);
if( nRedShift_ > 0 ) r <<= nRedShift_; else r >>= -nRedShift_;
diff --git a/vcl/unx/generic/dtrans/X11_clipboard.hxx b/vcl/unx/generic/dtrans/X11_clipboard.hxx
index 21bf547a9cb7..2c0ee2d95c0d 100644
--- a/vcl/unx/generic/dtrans/X11_clipboard.hxx
+++ b/vcl/unx/generic/dtrans/X11_clipboard.hxx
@@ -54,12 +54,12 @@ namespace x11 {
>,
public SelectionAdaptor
{
- Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents;
- Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner;
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents;
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner;
SelectionManager& m_rSelectionManager;
- Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager;
- ::std::list< Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener > > m_aListeners;
+ com::sun::star::uno::Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager;
+ ::std::list< com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener > > m_aListeners;
Atom m_aSelection;
protected:
@@ -100,12 +100,12 @@ namespace x11 {
* XClipboard
*/
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
+ virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
throw(RuntimeException);
virtual void SAL_CALL setContents(
- const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
throw(RuntimeException);
virtual ::rtl::OUString SAL_CALL getName()
@@ -122,27 +122,27 @@ namespace x11 {
* XClipboardNotifier
*/
virtual void SAL_CALL addClipboardListener(
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw(RuntimeException);
virtual void SAL_CALL removeClipboardListener(
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw(RuntimeException);
/*
* SelectionAdaptor
*/
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable();
+ virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable();
virtual void clearTransferable();
virtual void fireContentsChanged();
- virtual Reference< XInterface > getReference() throw();
+ virtual com::sun::star::uno::Reference< XInterface > getReference() throw();
};
// ------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL X11Clipboard_getSupportedServiceNames();
- Reference< XInterface > SAL_CALL X11Clipboard_createInstance(
- const Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
+ com::sun::star::uno::Reference< XInterface > SAL_CALL X11Clipboard_createInstance(
+ const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
// ------------------------------------------------------------------------
diff --git a/vcl/unx/generic/dtrans/X11_dndcontext.hxx b/vcl/unx/generic/dtrans/X11_dndcontext.hxx
index 9b48d346f03b..d8ef87444a7a 100644
--- a/vcl/unx/generic/dtrans/X11_dndcontext.hxx
+++ b/vcl/unx/generic/dtrans/X11_dndcontext.hxx
@@ -51,7 +51,7 @@ namespace x11 {
XLIB_Window m_aDropWindow;
XLIB_Time m_nTimestamp;
SelectionManager& m_rManager;
- Reference< XInterface > m_xManagerRef;
+ com::sun::star::uno::Reference< XInterface > m_xManagerRef;
public:
DropTargetDropContext( XLIB_Window, XLIB_Time, SelectionManager& );
virtual ~DropTargetDropContext();
@@ -70,7 +70,7 @@ namespace x11 {
XLIB_Window m_aDropWindow;
XLIB_Time m_nTimestamp;
SelectionManager& m_rManager;
- Reference< XInterface > m_xManagerRef;
+ com::sun::star::uno::Reference< XInterface > m_xManagerRef;
public:
DropTargetDragContext( XLIB_Window, XLIB_Time, SelectionManager& );
virtual ~DropTargetDragContext();
@@ -88,7 +88,7 @@ namespace x11 {
XLIB_Window m_aDropWindow;
XLIB_Time m_nTimestamp;
SelectionManager& m_rManager;
- Reference< XInterface > m_xManagerRef;
+ com::sun::star::uno::Reference< XInterface > m_xManagerRef;
public:
DragSourceContext( XLIB_Window, XLIB_Time, SelectionManager& );
virtual ~DragSourceContext();
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 2561df0ec591..e7b0e754e395 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -80,6 +80,12 @@
EnterWindowMask |\
LeaveWindowMask
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::dnd;
using namespace com::sun::star::lang;
@@ -279,7 +285,8 @@ SelectionManager::SelectionManager() :
m_nXdndActionMove( None ),
m_nXdndActionLink( None ),
m_nXdndActionAsk( None ),
- m_nXdndActionPrivate( None )
+ m_nXdndActionPrivate( None ),
+ m_bShutDown( false )
{
m_aDropEnterEvent.data.l[0] = None;
m_aDragRunning.reset();
@@ -632,7 +639,7 @@ OString SelectionManager::convertToCompound( const OUString& rText )
// ------------------------------------------------------------------------
bool SelectionManager::convertData(
- const Reference< XTransferable >& xTransferable,
+ const css::uno::Reference< XTransferable >& xTransferable,
Atom nType,
Atom nSelection,
int& rFormat,
@@ -1527,7 +1534,7 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor,
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "trying bitmap conversion\n" );
#endif
- Reference<XBitmap> xBM( new BmpTransporter( aData ) );
+ css::uno::Reference<XBitmap> xBM( new BmpTransporter( aData ) );
Sequence<Any> aArgs(2), aOutArgs;
Sequence<sal_Int16> aOutIndex;
aArgs.getArray()[0] = makeAny( xBM );
@@ -1674,7 +1681,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
if( pAdaptor &&
XGetSelectionOwner( m_pDisplay, rRequest.selection ) == m_aWindow )
{
- Reference< XTransferable > xTrans( pAdaptor->getTransferable() );
+ css::uno::Reference< XTransferable > xTrans( pAdaptor->getTransferable() );
if( rRequest.target == m_nTARGETSAtom )
{
// someone requests our types
@@ -1843,7 +1850,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
dsde.DropAction = DNDConstants::ACTION_NONE;
dsde.DropSuccess = sal_False;
}
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
if( xListener.is() )
@@ -2364,7 +2371,7 @@ void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow,
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = getUserDragAction();
dsde.DropSuccess = bSuccess;
- Reference< XDragSourceListener > xListener = m_xDragSourceListener;
+ css::uno::Reference< XDragSourceListener > xListener = m_xDragSourceListener;
m_xDragSourceListener.clear();
aGuard.clear();
@@ -2448,7 +2455,7 @@ void SelectionManager::sendDragStatus( Atom nDropAction )
dsde.DropAction = m_nSourceActions;
dsde.UserAction = getUserDragAction();
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
// caution: do not change anything after this
aGuard.clear();
if( xListener.is() )
@@ -2710,7 +2717,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = m_nTargetAcceptAction;
dsde.DropSuccess = m_bDropSuccess;
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
xListener->dragDropEnd( dsde );
@@ -2776,7 +2783,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = DNDConstants::ACTION_NONE;
dsde.DropSuccess = sal_False;
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
xListener->dragDropEnd( dsde );
@@ -2902,7 +2909,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
m_nDropTimeout = time( NULL );
// HACK :-)
aGuard.clear();
- static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() );
+ static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, css::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() );
aGuard.reset();
bCancel = false;
}
@@ -2917,7 +2924,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = DNDConstants::ACTION_NONE;
dsde.DropSuccess = sal_False;
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
xListener->dragDropEnd( dsde );
@@ -3071,7 +3078,7 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot )
{
ResettableMutexGuard aGuard( m_aMutex );
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_nLastDragX = nX;
m_nLastDragY = nY;
@@ -3231,8 +3238,8 @@ void SelectionManager::startDrag(
sal_Int8 sourceActions,
sal_Int32,
sal_Int32,
- const Reference< XTransferable >& transferable,
- const Reference< XDragSourceListener >& listener
+ const css::uno::Reference< XTransferable >& transferable,
+ const css::uno::Reference< XDragSourceListener >& listener
) throw()
{
#if OSL_DEBUG_LEVEL > 1
@@ -3516,8 +3523,8 @@ void SelectionManager::dragDoDispatch()
{
ClearableMutexGuard aGuard(m_aMutex);
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
- Reference< XTransferable > xTransferable( m_xDragSourceTransferable );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XTransferable > xTransferable( m_xDragSourceTransferable );
m_xDragSourceListener.clear();
m_xDragSourceTransferable.clear();
@@ -3787,10 +3794,10 @@ void SelectionManager::run( void* pThis )
timeval aLast;
gettimeofday( &aLast, 0 );
- Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
+ css::uno::Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
if( xFact.is() )
{
- Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
+ css::uno::Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
if( xDesktop.is() )
xDesktop->addTerminateListener(This);
}
@@ -3805,7 +3812,7 @@ void SelectionManager::run( void* pThis )
if( (aNow.tv_sec - aLast.tv_sec) > 0 )
{
ClearableMutexGuard aGuard(This->m_aMutex);
- std::list< std::pair< SelectionAdaptor*, Reference< XInterface > > > aChangeList;
+ std::list< std::pair< SelectionAdaptor*, css::uno::Reference< XInterface > > > aChangeList;
for( std::hash_map< Atom, Selection* >::iterator it = This->m_aSelections.begin(); it != This->m_aSelections.end(); ++it )
{
@@ -3815,7 +3822,7 @@ void SelectionManager::run( void* pThis )
if( aOwner != it->second->m_aLastOwner )
{
it->second->m_aLastOwner = aOwner;
- std::pair< SelectionAdaptor*, Reference< XInterface > >
+ std::pair< SelectionAdaptor*, css::uno::Reference< XInterface > >
aKeep( it->second->m_pAdaptor, it->second->m_pAdaptor->getReference() );
aChangeList.push_back( aKeep );
}
@@ -3838,6 +3845,11 @@ void SelectionManager::run( void* pThis )
void SelectionManager::shutdown() throw()
{
ResettableMutexGuard aGuard(m_aMutex);
+ if( m_bShutDown )
+ {
+ return;
+ }
+ m_bShutDown = true;
// stop dispatching
if( m_aThread )
{
@@ -3927,7 +3939,7 @@ void SAL_CALL SelectionManager::queryTermination( const ::com::sun::star::lang::
void SAL_CALL SelectionManager::notifyTermination( const ::com::sun::star::lang::EventObject& rEvent )
throw( ::com::sun::star::uno::RuntimeException )
{
- Reference< XDesktop > xDesktop( rEvent.Source, UNO_QUERY );
+ css::uno::Reference< XDesktop > xDesktop( rEvent.Source, UNO_QUERY );
if( xDesktop.is() == sal_True )
xDesktop->removeTerminateListener( this );
#if OSL_DEBUG_LEVEL > 1
@@ -4060,7 +4072,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow )
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = DNDConstants::ACTION_NONE;
dsde.DropSuccess = sal_False;
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
xListener->dragDropEnd( dsde );
@@ -4071,7 +4083,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow )
* SelectionAdaptor
*/
-Reference< XTransferable > SelectionManager::getTransferable() throw()
+css::uno::Reference< XTransferable > SelectionManager::getTransferable() throw()
{
return m_xDragSourceTransferable;
}
@@ -4091,9 +4103,9 @@ void SelectionManager::fireContentsChanged() throw()
// ------------------------------------------------------------------------
-Reference< XInterface > SelectionManager::getReference() throw()
+css::uno::Reference< XInterface > SelectionManager::getReference() throw()
{
- return Reference< XInterface >( static_cast<OWeakObject*>(this) );
+ return css::uno::Reference< XInterface >( static_cast<OWeakObject*>(this) );
}
// ------------------------------------------------------------------------
@@ -4124,7 +4136,7 @@ void SelectionManagerHolder::initialize( const Sequence< Any >& arguments ) thro
if( arguments.getLength() > 0 )
{
- Reference< XDisplayConnection > xConn;
+ css::uno::Reference< XDisplayConnection > xConn;
arguments.getConstArray()[0] >>= xConn;
if( xConn.is() )
{
@@ -4159,8 +4171,8 @@ sal_Int32 SelectionManagerHolder::getDefaultCursor( sal_Int8 dragAction ) throw(
void SelectionManagerHolder::startDrag(
const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
- const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
- const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
+ const css::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
+ const css::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
) throw()
{
if( m_xRealDragSource.is() )
diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx
index 47baa1776d1a..34a50819bfed 100644
--- a/vcl/unx/generic/dtrans/X11_selection.hxx
+++ b/vcl/unx/generic/dtrans/X11_selection.hxx
@@ -66,10 +66,10 @@ namespace x11 {
class SelectionAdaptor
{
public:
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() = 0;
+ virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() = 0;
virtual void clearTransferable() = 0;
virtual void fireContentsChanged() = 0;
- virtual Reference< XInterface > getReference() = 0;
+ virtual com::sun::star::uno::Reference< XInterface > getReference() = 0;
// returns a reference that will keep the SelectionAdaptor alive until the
// refernce is released
};
@@ -87,9 +87,9 @@ namespace x11 {
sal_Int8 m_nDefaultActions;
XLIB_Window m_aTargetWindow;
class SelectionManager* m_pSelectionManager;
- Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
m_xSelectionManager;
- ::std::list< Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > >
+ ::std::list< com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > >
m_aListeners;
DropTarget();
@@ -105,8 +105,8 @@ namespace x11 {
virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( ::com::sun::star::uno::Exception );
// XDropTarget
- virtual void SAL_CALL addDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
- virtual void SAL_CALL removeDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
+ virtual void SAL_CALL addDropTargetListener( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
+ virtual void SAL_CALL removeDropTargetListener( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
virtual sal_Bool SAL_CALL isActive() throw();
virtual void SAL_CALL setActive( sal_Bool active ) throw();
virtual sal_Int8 SAL_CALL getDefaultActions() throw();
@@ -127,7 +127,7 @@ namespace x11 {
>
{
::osl::Mutex m_aMutex;
- Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
m_xRealDragSource;
public:
SelectionManagerHolder();
@@ -148,8 +148,8 @@ namespace x11 {
virtual void SAL_CALL startDrag(
const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
- const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
- const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
) throw();
};
@@ -260,9 +260,9 @@ namespace x11 {
oslThread m_aDragExecuteThread;
::osl::Condition m_aDragRunning;
XLIB_Window m_aWindow;
- Reference< ::com::sun::star::awt::XDisplayConnection >
+ com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayConnection >
m_xDisplayConnection;
- Reference< com::sun::star::script::XInvocation >
+ com::sun::star::uno::Reference< com::sun::star::script::XInvocation >
m_xBitmapConverter;
sal_Int32 m_nSelectionTimeout;
XLIB_Time m_nSelectionTimestamp;
@@ -285,7 +285,7 @@ namespace x11 {
XLIB_Time m_nDropTime;
sal_Int8 m_nLastDropAction;
// XTransferable for Xdnd with foreign drag source
- Reference< ::com::sun::star::datatransfer::XTransferable >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
m_xDropTransferable;
int m_nLastX, m_nLastY;
XLIB_Time m_nDropTimestamp;
@@ -303,9 +303,9 @@ namespace x11 {
XLIB_Window m_aDropProxy;
XLIB_Window m_aDragSourceWindow;
// XTransferable for Xdnd when we are drag source
- Reference< ::com::sun::star::datatransfer::XTransferable >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
m_xDragSourceTransferable;
- Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >
m_xDragSourceListener;
// root coordinates
int m_nLastDragX, m_nLastDragY;
@@ -383,6 +383,7 @@ namespace x11 {
// since this leads to deadlocks in different Xlib implentations
// (XFree as well as Xsun) use an own mutex instead
::osl::Mutex m_aMutex;
+ bool m_bShutDown;
SelectionManager();
~SelectionManager();
@@ -409,7 +410,7 @@ namespace x11 {
bool getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData );
// returns true if conversion was successful
- bool convertData( const Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
+ bool convertData( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
Atom nType,
Atom nSelection,
int & rFormat,
@@ -494,15 +495,15 @@ namespace x11 {
virtual void SAL_CALL startDrag(
const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
- const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
- const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
) throw();
// SelectionAdaptor for XdndSelection Drag (we are drag source)
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() throw();
+ virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() throw();
virtual void clearTransferable() throw();
virtual void fireContentsChanged() throw();
- virtual Reference< XInterface > getReference() throw();
+ virtual com::sun::star::uno::Reference< XInterface > getReference() throw();
// XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException );
diff --git a/vcl/unx/generic/dtrans/X11_service.cxx b/vcl/unx/generic/dtrans/X11_service.cxx
index fcd99535eb61..fa7fc6a65589 100644
--- a/vcl/unx/generic/dtrans/X11_service.cxx
+++ b/vcl/unx/generic/dtrans/X11_service.cxx
@@ -39,6 +39,12 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/compbase1.hxx>
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
using namespace rtl;
using namespace cppu;
using namespace com::sun::star::lang;
@@ -69,9 +75,9 @@ Sequence< OUString > SAL_CALL x11::Xdnd_dropTarget_getSupportedServiceNames()
// ------------------------------------------------------------------------
-Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments )
+css::uno::Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments )
{
- static std::hash_map< OUString, ::std::hash_map< Atom, Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances;
+ static std::hash_map< OUString, ::std::hash_map< Atom, css::uno::Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances;
OUString aDisplayName;
Atom nSelection;
@@ -80,7 +86,7 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >&
// by SelectionManager.initialize() if no display connection is given.
if( arguments.getLength() > 0 )
{
- Reference< XDisplayConnection > xConn;
+ css::uno::Reference< XDisplayConnection > xConn;
arguments.getConstArray()[0] >>= xConn;
if( xConn.is() )
@@ -107,8 +113,8 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >&
nSelection = rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) );
}
- ::std::hash_map< Atom, Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] );
- ::std::hash_map< Atom, Reference< XClipboard > >::iterator it = rMap.find( nSelection );
+ ::std::hash_map< Atom, css::uno::Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] );
+ ::std::hash_map< Atom, css::uno::Reference< XClipboard > >::iterator it = rMap.find( nSelection );
if( it != rMap.end() )
return it->second;
@@ -120,16 +126,16 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >&
// ------------------------------------------------------------------------
-Reference< XInterface > X11SalInstance::CreateDragSource()
+css::uno::Reference< XInterface > X11SalInstance::CreateDragSource()
{
- return Reference < XInterface >( ( OWeakObject * ) new SelectionManagerHolder() );
+ return css::uno::Reference < XInterface >( ( OWeakObject * ) new SelectionManagerHolder() );
}
// ------------------------------------------------------------------------
-Reference< XInterface > X11SalInstance::CreateDropTarget()
+css::uno::Reference< XInterface > X11SalInstance::CreateDropTarget()
{
- return Reference < XInterface >( ( OWeakObject * ) new DropTarget() );
+ return css::uno::Reference < XInterface >( ( OWeakObject * ) new DropTarget() );
}
diff --git a/vcl/unx/generic/dtrans/X11_transferable.hxx b/vcl/unx/generic/dtrans/X11_transferable.hxx
index 57f0d6682cab..65f7d1fdc475 100644
--- a/vcl/unx/generic/dtrans/X11_transferable.hxx
+++ b/vcl/unx/generic/dtrans/X11_transferable.hxx
@@ -44,10 +44,10 @@ namespace x11 {
::osl::Mutex m_aMutex;
SelectionManager& m_rManager;
- Reference< XInterface > m_xCreator;
+ com::sun::star::uno::Reference< XInterface > m_xCreator;
Atom m_aSelection;
public:
- X11Transferable( SelectionManager& rManager, const Reference< XInterface >& xCreator, Atom selection = None );
+ X11Transferable( SelectionManager& rManager, const com::sun::star::uno::Reference< XInterface >& xCreator, Atom selection = None );
virtual ~X11Transferable();
/*
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index f5431026fb02..8b9ba153e7e3 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -86,6 +86,12 @@
#define PRINTER_METRICDIR "fontmetric"
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
using namespace vcl;
using namespace utl;
using namespace psp;
@@ -3941,10 +3947,10 @@ bool PrintFontManager::readOverrideMetrics()
if( ! m_aOverrideFonts.empty() )
return false;
- Reference< XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory() );
+ css::uno::Reference< XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory() );
if( !xFact.is() )
return false;
- Reference< XMaterialHolder > xMat(
+ css::uno::Reference< XMaterialHolder > xMat(
xFact->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.psprint.CompatMetricOverride" ) ) ),
UNO_QUERY );
if( !xMat.is() )
diff --git a/vcl/unx/generic/gdi/pspgraphics.cxx b/vcl/unx/generic/gdi/pspgraphics.cxx
index f2e5b1669e0c..e68568a81aa9 100644
--- a/vcl/unx/generic/gdi/pspgraphics.cxx
+++ b/vcl/unx/generic/gdi/pspgraphics.cxx
@@ -50,6 +50,7 @@
#include "outfont.hxx"
#include "fontsubset.hxx"
#include "salprn.hxx"
+#include "region.h"
#ifdef ENABLE_GRAPHITE
#include <graphite_layout.hxx>
@@ -292,28 +293,27 @@ long PspGraphics::GetGraphicsWidth() const
void PspGraphics::ResetClipRegion()
{
- m_pPrinterGfx->ResetClipRegion ();
+ m_pPrinterGfx->ResetClipRegion();
}
-void PspGraphics::BeginSetClipRegion( sal_uLong n )
+bool PspGraphics::setClipRegion( const Region& i_rClip )
{
- m_pPrinterGfx->BeginSetClipRegion(n);
-}
-
-sal_Bool PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
-{
- return (sal_Bool)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY);
-}
+ // TODO: support polygonal clipregions here
+ m_pPrinterGfx->BeginSetClipRegion( i_rClip.GetRectCount() );
-bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
-
-void PspGraphics::EndSetClipRegion()
-{
- m_pPrinterGfx->EndSetClipRegion ();
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if ( nW && nH )
+ {
+ m_pPrinterGfx->UnionClipRegion( nX, nY, nW, nH );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
+ m_pPrinterGfx->EndSetClipRegion();
+ return true;
}
void PspGraphics::SetLineColor()
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 6dc8135a53d7..39205ab2e321 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -53,6 +53,7 @@
#include "printergfx.hxx"
#include "xrender_peer.hxx"
+#include "region.h"
#include <vector>
#include <queue>
@@ -104,7 +105,7 @@ X11SalGraphics::X11SalGraphics()
m_aRenderPicture = 0;
m_pRenderFormat = NULL;
- pClipRegion_ = NULL;
+ mpClipRegion = NULL;
pPaintRegion_ = NULL;
pPenGC_ = NULL;
@@ -167,7 +168,7 @@ void X11SalGraphics::freeResources()
Display *pDisplay = GetXDisplay();
DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" );
- if( pClipRegion_ ) XDestroyRegion( pClipRegion_ ), pClipRegion_ = None;
+ if( mpClipRegion ) XDestroyRegion( mpClipRegion ), mpClipRegion = None;
if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None;
if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ ), pPenGC_ = None;
@@ -257,8 +258,8 @@ void X11SalGraphics::SetClipRegion( GC pGC, XLIB_Region pXReg ) const
int n = 0;
XLIB_Region Regions[3];
- if( pClipRegion_ /* && !XEmptyRegion( pClipRegion_ ) */ )
- Regions[n++] = pClipRegion_;
+ if( mpClipRegion /* && !XEmptyRegion( mpClipRegion ) */ )
+ Regions[n++] = mpClipRegion;
// if( pPaintRegion_ /* && !XEmptyRegion( pPaintRegion_ ) */ )
// Regions[n++] = pPaintRegion_;
@@ -571,7 +572,7 @@ long X11SalGraphics::GetGraphicsHeight() const
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalGraphics::ResetClipRegion()
{
- if( pClipRegion_ )
+ if( mpClipRegion )
{
bPenGC_ = sal_False;
bFontGC_ = sal_False;
@@ -583,46 +584,36 @@ void X11SalGraphics::ResetClipRegion()
bStippleGC_ = sal_False;
bTrackingGC_ = sal_False;
- XDestroyRegion( pClipRegion_ );
- pClipRegion_ = NULL;
+ XDestroyRegion( mpClipRegion );
+ mpClipRegion = NULL;
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::BeginSetClipRegion( sal_uLong )
+bool X11SalGraphics::setClipRegion( const Region& i_rClip )
{
- if( pClipRegion_ )
- XDestroyRegion( pClipRegion_ );
- pClipRegion_ = XCreateRegion();
-}
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
-{
- if (!nDX || !nDY)
- return sal_True;
-
- XRectangle aRect;
- aRect.x = (short)nX;
- aRect.y = (short)nY;
- aRect.width = (unsigned short)nDX;
- aRect.height = (unsigned short)nDY;
-
- XUnionRectWithRegion( &aRect, pClipRegion_, pClipRegion_ );
-
- return sal_True;
-}
+ if( mpClipRegion )
+ XDestroyRegion( mpClipRegion );
+ mpClipRegion = XCreateRegion();
+
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if ( nW && nH )
+ {
+ XRectangle aRect;
+ aRect.x = (short)nX;
+ aRect.y = (short)nY;
+ aRect.width = (unsigned short)nW;
+ aRect.height = (unsigned short)nH;
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-bool X11SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
+ XUnionRectWithRegion( &aRect, mpClipRegion, mpClipRegion );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::EndSetClipRegion()
-{
+ // done, invalidate GCs
bPenGC_ = sal_False;
bFontGC_ = sal_False;
bBrushGC_ = sal_False;
@@ -633,11 +624,12 @@ void X11SalGraphics::EndSetClipRegion()
bStippleGC_ = sal_False;
bTrackingGC_ = sal_False;
- if( XEmptyRegion( pClipRegion_ ) )
+ if( XEmptyRegion( mpClipRegion ) )
{
- XDestroyRegion( pClipRegion_ );
- pClipRegion_= NULL;
+ XDestroyRegion( mpClipRegion );
+ mpClipRegion= NULL;
}
+ return true;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -1047,8 +1039,8 @@ XID X11SalGraphics::GetXRenderPicture()
#if 0
// setup clipping so the callers don't have to do it themselves
// TODO: avoid clipping if already set correctly
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
+ rRenderPeer.SetPictureClipRegion( aDstPic, mpClipRegion );
else
#endif
{
@@ -1185,8 +1177,8 @@ bool X11SalGraphics::drawFilledTrapezoids( const ::basegfx::B2DTrapezoid* pB2DTr
// set clipping
// TODO: move into GetXRenderPicture?
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
+ rRenderPeer.SetPictureClipRegion( aDstPic, mpClipRegion );
// render the trapezoids
const XRenderPictFormat* pMaskFormat = rRenderPeer.GetStandardFormatA8();
@@ -1225,6 +1217,7 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double
aPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix(+fHalfWidth,+fHalfWidth) );
// shortcut for hairline drawing to improve performance
+ bool bDrawnOk = true;
if( bIsHairline )
{
// hairlines can benefit from a simplified tesselation
@@ -1233,17 +1226,13 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double
basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() );
// draw tesselation result
- if( ! aB2DTrapVector.empty() )
- {
- const int nTrapCount = aB2DTrapVector.size();
- const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency );
+ const int nTrapCount = aB2DTrapVector.size();
+ if( nTrapCount > 0 )
+ bDrawnOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency );
- // restore the original brush GC
- nBrushColor_ = aKeepBrushColor;
- return bDrawOk;
- }
- else
- return true;
+ // restore the original brush GC
+ nBrushColor_ = aKeepBrushColor;
+ return bDrawnOk;
}
// get the area polygon for the line polygon
@@ -1266,19 +1255,18 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double
// draw each area polypolygon component individually
// to emulate the polypolygon winding rule "non-zero"
- bool bDrawOk = true;
const int nPolyCount = aAreaPolyPoly.count();
for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx )
{
const ::basegfx::B2DPolyPolygon aOnePoly( aAreaPolyPoly.getB2DPolygon( nPolyIdx ) );
- bDrawOk = drawPolyPolygon( aOnePoly, fTransparency );
- if( !bDrawOk )
+ bDrawnOk = drawPolyPolygon( aOnePoly, fTransparency );
+ if( !bDrawnOk )
break;
}
// restore the original brush GC
nBrushColor_ = aKeepBrushColor;
- return bDrawOk;
+ return bDrawnOk;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
index 266d3cd41be7..314797946ecf 100644
--- a/vcl/unx/generic/gdi/salgdi2.cxx
+++ b/vcl/unx/generic/gdi/salgdi2.cxx
@@ -310,8 +310,8 @@ int X11SalGraphics::Clip( int &nX,
&& RectangleOut == Clip( pPaintRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) )
return RectangleOut;
- if( pClipRegion_
- && RectangleOut == Clip( pClipRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) )
+ if( mpClipRegion
+ && RectangleOut == Clip( mpClipRegion, nX, nY, nDX, nDY, nSrcX, nSrcY ) )
return RectangleOut;
int nPaint;
@@ -325,9 +325,9 @@ int X11SalGraphics::Clip( int &nX,
nPaint = RectangleIn;
int nClip;
- if( pClipRegion_ )
+ if( mpClipRegion )
{
- nClip = XRectInRegion( pClipRegion_, nX, nY, nDX, nDY );
+ nClip = XRectInRegion( mpClipRegion, nX, nY, nDX, nDY );
if( RectangleOut == nClip )
return RectangleOut;
}
@@ -890,8 +890,8 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
return false;
// set clipping
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- rPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
+ rPeer.SetPictureClipRegion( aDstPic, mpClipRegion );
// paint source * mask over destination picture
rPeer.CompositePicture( PictOpOver, aSrcPic, aAlphaPic, aDstPic,
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 8cbecd1e259a..fc278dd250eb 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -530,16 +530,16 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
if (const void *pOptions = Application::GetSettings().GetStyleSettings().GetCairoFontOptions())
rCairo.set_font_options( cr, pOptions);
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- {
- for (long i = 0; i < pClipRegion_->numRects; ++i)
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
{
+ for (long i = 0; i < mpClipRegion->numRects; ++i)
+ {
rCairo.rectangle(cr,
- pClipRegion_->rects[i].x1,
- pClipRegion_->rects[i].y1,
- pClipRegion_->rects[i].x2 - pClipRegion_->rects[i].x1,
- pClipRegion_->rects[i].y2 - pClipRegion_->rects[i].y1);
- }
+ mpClipRegion->rects[i].x1,
+ mpClipRegion->rects[i].y1,
+ mpClipRegion->rects[i].x2 - mpClipRegion->rects[i].x1,
+ mpClipRegion->rects[i].y2 - mpClipRegion->rects[i].y1);
+ }
rCairo.clip(cr);
}
@@ -623,8 +623,8 @@ void X11SalGraphics::DrawServerAAFontString( const ServerFontLayout& rLayout )
// set clipping
// TODO: move into GetXRenderPicture()?
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
+ rRenderPeer.SetPictureClipRegion( aDstPic, mpClipRegion );
ServerFont& rFont = rLayout.GetServerFont();
X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer();
@@ -707,10 +707,10 @@ bool X11SalGraphics::DrawServerAAForcedString( const ServerFontLayout& rLayout )
else if( m_pVDev )
nWidth = m_pVDev->GetWidth(), nHeight = m_pVDev->GetHeight();
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
{
// get bounding box
- XClipBox( pClipRegion_, &aXRect );
+ XClipBox( mpClipRegion, &aXRect );
// clip with window
if( aXRect.x < 0 ) aXRect.x = 0;
diff --git a/vcl/unx/generic/gdi/salprnpsp.cxx b/vcl/unx/generic/gdi/salprnpsp.cxx
index 4ab0cecb8f3e..0a278cab971f 100644
--- a/vcl/unx/generic/gdi/salprnpsp.cxx
+++ b/vcl/unx/generic/gdi/salprnpsp.cxx
@@ -1188,6 +1188,8 @@ sal_Bool PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJo
aContext.Tagged = false;
aContext.EmbedStandardFonts = true;
aContext.DocumentLocale = Application::GetSettings().GetLocale();
+ aContext.ColorMode = i_rController.getPrinter()->GetPrinterOptions().IsConvertToGreyscales()
+ ? vcl::PDFWriter::DrawGreyscale : vcl::PDFWriter::DrawColor;
// prepare doc info
aContext.DocumentInfo.Title = i_rJobName;
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 4140894c36af..ffa61bc52c10 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -246,13 +246,15 @@ int GtkSalDisplay::GetDefaultMonitorNumber() const
int n = 0;
GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, m_nDefaultScreen );
#if GTK_CHECK_VERSION(2,20,0)
- n = m_aXineramaScreenIndexMap[gdk_screen_get_primary_monitor(pScreen)];
+ n = gdk_screen_get_primary_monitor(pScreen);
#else
static screen_get_primary_monitor sym_gdk_screen_get_primary_monitor =
(screen_get_primary_monitor)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_primary_monitor" );
if (sym_gdk_screen_get_primary_monitor)
- n = m_aXineramaScreenIndexMap[sym_gdk_screen_get_primary_monitor( pScreen )];
+ n = sym_gdk_screen_get_primary_monitor( pScreen );
#endif
+ if( n >= 0 && size_t(n) < m_aXineramaScreenIndexMap.size() )
+ n = m_aXineramaScreenIndexMap[n];
return n;
}
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index ff5063def03d..3657e3a0d770 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -479,30 +479,13 @@ void GtkSalGraphics::ResetClipRegion()
X11SalGraphics::ResetClipRegion();
}
-void GtkSalGraphics::BeginSetClipRegion( sal_uLong nCount )
-{
- m_aClipRegion.SetNull();
- X11SalGraphics::BeginSetClipRegion( nCount );
-}
-
-sal_Bool GtkSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight )
-{
- Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
- m_aClipRegion.Union( aRect );
- return X11SalGraphics::unionClipRegion( nX, nY, nWidth, nHeight );
-}
-
-bool GtkSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
-
-void GtkSalGraphics::EndSetClipRegion()
+bool GtkSalGraphics::setClipRegion( const Region& i_rClip )
{
+ m_aClipRegion = i_rClip;
+ bool bRet = X11SalGraphics::setClipRegion( m_aClipRegion );
if( m_aClipRegion.IsEmpty() )
m_aClipRegion.SetNull();
- X11SalGraphics::EndSetClipRegion();
+ return bRet;
}
void GtkSalGraphics::copyBits( const SalTwoRect* pPosAry,
diff --git a/vcl/unx/headless/svpgdi.cxx b/vcl/unx/headless/svpgdi.cxx
index 95ce1bb45a1d..a460bb271198 100644
--- a/vcl/unx/headless/svpgdi.cxx
+++ b/vcl/unx/headless/svpgdi.cxx
@@ -29,6 +29,7 @@
#include "svpbmp.hxx"
#include <vcl/sysdata.hxx>
+#include <vcl/region.h>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/range/b2irange.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
@@ -152,11 +153,16 @@ void SvpSalGraphics::ResetClipRegion()
m_aClipMap.reset();
}
-void SvpSalGraphics::BeginSetClipRegion( sal_uLong n )
+bool SvpSalGraphics::setClipRegion( const Region& i_rClip )
{
- if( n <= 1 )
+ if( i_rClip.IsEmpty() )
+ m_aClipMap.reset();
+ else if( i_rClip.GetRectCount() == 1 )
{
m_aClipMap.reset();
+ Rectangle aBoundRect( i_rClip.GetBoundRect() );
+ m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice,
+ basegfx::B2IRange(aBoundRect.Left(),aBoundRect.Top(),aBoundRect.Right(),aBoundRect.Bottom()) );
}
else
{
@@ -164,34 +170,22 @@ void SvpSalGraphics::BeginSetClipRegion( sal_uLong n )
B2IVector aSize = m_aDevice->getSize();
m_aClipMap = createBitmapDevice( aSize, false, Format::ONE_BIT_MSB_GREY );
m_aClipMap->clear( basebmp::Color(0xFFFFFFFF) );
- }
-}
-sal_Bool SvpSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight )
-{
- if( m_aClipMap )
- {
- B2DPolyPolygon aFull;
- aFull.append( tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nWidth, nY+nHeight ) ) );
- m_aClipMap->fillPolyPolygon( aFull, basebmp::Color(0), DrawMode_PAINT );
- }
- else
- {
- m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice,
- basegfx::B2IRange(nX,nY,nX+nWidth,nY+nHeight) );
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if ( nW && nH )
+ {
+ B2DPolyPolygon aFull;
+ aFull.append( tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nW, nY+nH ) ) );
+ m_aClipMap->fillPolyPolygon( aFull, basebmp::Color(0), DrawMode_PAINT );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
}
-
- return sal_True;
-}
-
-bool SvpSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
-
-void SvpSalGraphics::EndSetClipRegion()
-{
+ return true;
}
void SvpSalGraphics::SetLineColor()
diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx
index 54acdf384d63..217d50940b11 100644
--- a/vcl/unx/headless/svpgdi.hxx
+++ b/vcl/unx/headless/svpgdi.hxx
@@ -69,10 +69,7 @@ public:
virtual long GetGraphicsWidth() const;
virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( sal_uLong nCount );
- virtual sal_Bool unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+ virtual bool setClipRegion( const Region& );
virtual void SetLineColor();
virtual void SetLineColor( SalColor nSalColor );
diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx
index 365a0b34632c..cdd664c7b76a 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -55,6 +55,7 @@
#include "printergfx.hxx"
#include "svppspgraphics.hxx"
#include "svpbmp.hxx"
+#include "region.h"
using namespace psp;
using namespace rtl;
@@ -217,28 +218,27 @@ long PspGraphics::GetGraphicsWidth() const
void PspGraphics::ResetClipRegion()
{
- m_pPrinterGfx->ResetClipRegion ();
+ m_pPrinterGfx->ResetClipRegion();
}
-void PspGraphics::BeginSetClipRegion( sal_uLong n )
+bool PspGraphics::setClipRegion( const Region& i_rClip )
{
- m_pPrinterGfx->BeginSetClipRegion(n);
-}
-
-sal_Bool PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
-{
- return (sal_Bool)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY);
-}
+ // TODO: support polygonal clipregions here
+ m_pPrinterGfx->BeginSetClipRegion( i_rClip.GetRectCount() );
-bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
-
-void PspGraphics::EndSetClipRegion()
-{
- m_pPrinterGfx->EndSetClipRegion ();
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if ( nW && nH )
+ {
+ m_pPrinterGfx->UnionClipRegion( nX, nY, nW, nH );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
+ m_pPrinterGfx->EndSetClipRegion();
+ return true;
}
void PspGraphics::SetLineColor()
diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx
index b677382f2fe9..74f2f097a1af 100644
--- a/vcl/unx/headless/svppspgraphics.hxx
+++ b/vcl/unx/headless/svppspgraphics.hxx
@@ -91,10 +91,7 @@ public:
virtual long GetGraphicsWidth() const;
virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( sal_uLong nCount );
- virtual sal_Bool unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+ virtual bool setClipRegion( const Region& );
virtual void SetLineColor();
virtual void SetLineColor( SalColor nSalColor );
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 6741fb7449ae..1e96c3e2f7a4 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -57,12 +57,12 @@
#include <stdio.h>
#endif
-KDESalFrame::KDESalFrame( SalFrame* pParent, ULONG nState ) :
+KDESalFrame::KDESalFrame( SalFrame* pParent, sal_uLong nState ) :
X11SalFrame( pParent, nState )
{
}
-void KDESalFrame::Show( BOOL bVisible, BOOL bNoActivate )
+void KDESalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
{
if ( !GetParent() && ! (GetStyle() & SAL_FRAME_STYLE_INTRO) )
{
@@ -182,7 +182,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
void KDESalFrame::UpdateSettings( AllSettings& rSettings )
{
StyleSettings style( rSettings.GetStyleSettings() );
- BOOL bSetTitleFont = false;
+ bool bSetTitleFont = false;
// General settings
QPalette pal = kapp->palette();
@@ -275,9 +275,9 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
{
Color aColor2 = style.GetLightColor();
style.
- SetCheckedColor( Color( (BYTE)(((USHORT)aBack.GetRed()+(USHORT)aColor2.GetRed())/2),
- (BYTE)(((USHORT)aBack.GetGreen()+(USHORT)aColor2.GetGreen())/2),
- (BYTE)(((USHORT)aBack.GetBlue()+(USHORT)aColor2.GetBlue())/2)
+ SetCheckedColor( Color( (sal_uInt8)(((sal_uInt16)aBack.GetRed()+(sal_uInt16)aColor2.GetRed())/2),
+ (sal_uInt8)(((sal_uInt16)aBack.GetGreen()+(sal_uInt16)aColor2.GetGreen())/2),
+ (sal_uInt8)(((sal_uInt16)aBack.GetBlue()+(sal_uInt16)aColor2.GetBlue())/2)
) );
}
diff --git a/vcl/unx/kde4/KDESalFrame.hxx b/vcl/unx/kde4/KDESalFrame.hxx
index a518017855cb..c5071ce85ffa 100644
--- a/vcl/unx/kde4/KDESalFrame.hxx
+++ b/vcl/unx/kde4/KDESalFrame.hxx
@@ -47,12 +47,12 @@ class KDESalFrame : public X11SalFrame
GraphicsHolder m_aGraphics[ nMaxGraphics ];
public:
- KDESalFrame( SalFrame* pParent, ULONG nStyle );
+ KDESalFrame( SalFrame* pParent, sal_uLong nStyle );
virtual ~KDESalFrame();
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics *pGraphics );
virtual void updateGraphics( bool bClear );
virtual void UpdateSettings( AllSettings& rSettings );
- virtual void Show( BOOL bVisible, BOOL bNoActivate );
+ virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate );
};
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 5a5cd11c52d9..9b37bf5e8e2a 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -100,7 +100,7 @@ KDESalGraphics::~KDESalGraphics()
delete m_image;
}
-BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
+sal_Bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
{
if (type == CTRL_PUSHBUTTON) return true;
@@ -154,9 +154,9 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par
return false;
}
-BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
+sal_Bool KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
const Rectangle&, const Point&,
- BOOL& )
+ sal_Bool& )
{
return FALSE;
}
@@ -232,7 +232,7 @@ namespace
}
}
-BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
+sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
const Rectangle& rControlRegion, ControlState nControlState,
const ImplControlValue& value,
const OUString& )
@@ -243,7 +243,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
return false;
}
- BOOL returnVal = true;
+ sal_Bool returnVal = true;
QRect widgetRect = region2QRect(rControlRegion);
if( type == CTRL_SPINBOX && part == PART_ALL_BUTTONS )
@@ -562,8 +562,8 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
{
if( pTempClipRegion )
{
- if( pClipRegion_ )
- XIntersectRegion( pTempClipRegion, pClipRegion_, pTempClipRegion );
+ if( mpClipRegion )
+ XIntersectRegion( pTempClipRegion, mpClipRegion, pTempClipRegion );
XSetRegion( GetXDisplay(), gc, pTempClipRegion );
}
QPixmap pixmap = QPixmap::fromImage(*m_image, Qt::ColorOnly | Qt::OrderedDither | Qt::OrderedAlphaDither);
@@ -574,8 +574,8 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
if( pTempClipRegion )
{
- if( pClipRegion_ )
- XSetRegion( GetXDisplay(), gc, pClipRegion_ );
+ if( mpClipRegion )
+ XSetRegion( GetXDisplay(), gc, mpClipRegion );
else
XSetClipMask( GetXDisplay(), gc, None );
}
@@ -589,7 +589,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
return returnVal;
}
-BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
+sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
const Rectangle& controlRegion, ControlState controlState,
const ImplControlValue& val,
const OUString&,
@@ -769,7 +769,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
if( part == PART_BORDER )
{
int nFrameWidth = getFrameWidth();
- USHORT nStyle = val.getNumericVal();
+ sal_uInt16 nStyle = val.getNumericVal();
if( nStyle & FRAME_DRAW_NODRAW )
{
// in this case the question is: how thick would a frame be
diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx
index 327ba0b3d464..ea1deebfc35c 100644
--- a/vcl/unx/kde4/KDESalGraphics.hxx
+++ b/vcl/unx/kde4/KDESalGraphics.hxx
@@ -50,16 +50,16 @@ class KDESalGraphics : public X11SalGraphics
@param part Specification of the widget's part if it consists of more than one.
@return true if the platform supports native drawing of the widget type defined by part.
*/
- virtual BOOL IsNativeControlSupported( ControlType type, ControlPart part );
+ virtual sal_Bool IsNativeControlSupported( ControlType type, ControlPart part );
/** Test whether the position is in the native widget.
If the return value is TRUE, bIsInside contains information whether
aPos was or was not inside the native widget specified by the
type/part combination.
*/
- virtual BOOL hitTestNativeControl( ControlType type, ControlPart part,
+ virtual sal_Bool hitTestNativeControl( ControlType type, ControlPart part,
const Rectangle& rControlRegion, const Point& aPos,
- BOOL& rIsInside );
+ sal_Bool& rIsInside );
/** Draw the requested control described by part/nControlState.
@param rControlRegion
@@ -71,7 +71,7 @@ class KDESalGraphics : public X11SalGraphics
@param aCaption
A caption or title string (like button text etc.)
*/
- virtual BOOL drawNativeControl( ControlType type, ControlPart part,
+ virtual sal_Bool drawNativeControl( ControlType type, ControlPart part,
const Rectangle& rControlRegion, ControlState nControlState,
const ImplControlValue& aValue,
const rtl::OUString& aCaption );
@@ -84,7 +84,7 @@ class KDESalGraphics : public X11SalGraphics
@param aValue An optional value (tristate/numerical/string)
@param aCaption A caption or title string (like button text etc.)
*/
- virtual BOOL drawNativeControlText( ControlType, ControlPart,
+ virtual sal_Bool drawNativeControlText( ControlType, ControlPart,
const Rectangle&, ControlState,
const ImplControlValue&,
const rtl::OUString& ) { return false; }
@@ -105,7 +105,7 @@ class KDESalGraphics : public X11SalGraphics
@param aCaption
A caption or title string (like button text etc.)
*/
- virtual BOOL getNativeControlRegion( ControlType type, ControlPart part,
+ virtual sal_Bool getNativeControlRegion( ControlType type, ControlPart part,
const Rectangle& rControlRegion, ControlState nControlState,
const ImplControlValue& aValue,
const rtl::OUString& aCaption,
diff --git a/vcl/unx/kde4/KDESalInstance.cxx b/vcl/unx/kde4/KDESalInstance.cxx
index e06bf1a3cf7a..c8d0858279f3 100644
--- a/vcl/unx/kde4/KDESalInstance.cxx
+++ b/vcl/unx/kde4/KDESalInstance.cxx
@@ -29,7 +29,7 @@
#include "KDESalFrame.hxx"
-SalFrame* KDESalInstance::CreateFrame( SalFrame *pParent, ULONG nState )
+SalFrame* KDESalInstance::CreateFrame( SalFrame *pParent, sal_uLong nState )
{
return new KDESalFrame( pParent, nState );
}
diff --git a/vcl/unx/kde4/KDESalInstance.hxx b/vcl/unx/kde4/KDESalInstance.hxx
index dc1e52b26717..32f51c4e8c0e 100644
--- a/vcl/unx/kde4/KDESalInstance.hxx
+++ b/vcl/unx/kde4/KDESalInstance.hxx
@@ -37,5 +37,5 @@ class KDESalInstance : public X11SalInstance
public:
KDESalInstance( SalYieldMutex* pMutex ) : X11SalInstance( pMutex ) {}
virtual ~KDESalInstance() {}
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
};
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index f60e84c0bc02..427c9e7576a8 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -103,7 +103,7 @@ void KDEXLib::Init()
//kAboutData->setProgramIconName("OpenOffice");
m_nFakeCmdLineArgs = 1;
- USHORT nIdx;
+ int nIdx;
vos::OExtCommandLine aCommandLine;
int nParams = aCommandLine.getCommandArgCount();
rtl::OString aDisplay;