summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rwxr-xr-xvcl/aqua/inc/salframeview.h1
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.cxx43
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.hxx2
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm5
-rw-r--r--vcl/inc/vcl/cursor.hxx6
-rw-r--r--vcl/source/control/ilstbox.cxx2
-rw-r--r--vcl/source/gdi/jobset.cxx7
-rwxr-xr-xvcl/source/gdi/print3.cxx28
-rw-r--r--vcl/source/window/cursor.cxx20
-rwxr-xr-x[-rw-r--r--]vcl/source/window/printdlg.cxx11
-rw-r--r--vcl/source/window/window.cxx7
-rw-r--r--vcl/unx/kde4/KDEData.cxx2
-rw-r--r--vcl/unx/kde4/KDEData.hxx2
-rw-r--r--vcl/unx/kde4/KDESalDisplay.cxx2
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx16
-rw-r--r--vcl/unx/kde4/KDESalFrame.hxx6
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx22
-rw-r--r--vcl/unx/kde4/KDESalGraphics.hxx14
-rw-r--r--vcl/unx/kde4/KDESalInstance.cxx4
-rw-r--r--vcl/unx/kde4/KDESalInstance.hxx4
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx2
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.cxx2
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.hxx2
-rwxr-xr-xvcl/win/source/gdi/salgdi.cxx4
24 files changed, 131 insertions, 83 deletions
diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h
index 5e93839719b5..a41e5cf656ba 100755
--- a/vcl/aqua/inc/salframeview.h
+++ b/vcl/aqua/inc/salframeview.h
@@ -85,6 +85,7 @@
}
+(void)unsetMouseFrame: (AquaSalFrame*)pFrame;
-(id)initWithSalFrame: (AquaSalFrame*)pFrame;
+-(AquaSalFrame*)getSalFrame;
-(BOOL)acceptsFirstResponder;
-(BOOL)acceptsFirstMouse: (NSEvent *)pEvent;
-(BOOL)isOpaque;
diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx
index 01a58b171b02..103b6dc47d44 100644
--- a/vcl/aqua/source/dtrans/DropTarget.cxx
+++ b/vcl/aqua/source/dtrans/DropTarget.cxx
@@ -50,6 +50,8 @@
#include <Carbon/Carbon.h>
#include <postmac.h>
+#include <salframe.h>
+#include <salframeview.h>
using namespace rtl;
using namespace cppu;
@@ -60,6 +62,7 @@ using namespace com::sun::star::datatransfer::dnd::DNDConstants;
using namespace com::sun::star::datatransfer::clipboard;
using namespace com::sun::star::lang;
using namespace com::sun::star::uno;
+using namespace com::sun::star;
using namespace comphelper;
OUString dropTarget_getImplementationName()
@@ -149,6 +152,8 @@ namespace /* private */
DropTarget::DropTarget() :
WeakComponentImplHelper5<XInitialization, XDropTarget, XDropTargetDragContext, XDropTargetDropContext, XServiceInfo>(m_aMutex),
+ mView(nil),
+ mpFrame(NULL),
mDropTargetHelper(nil),
mbActive(false),
mDragSourceSupportedActions(DNDConstants::ACTION_NONE),
@@ -161,8 +166,9 @@ DropTarget::DropTarget() :
DropTarget::~DropTarget()
{
- [(id <DraggingDestinationHandler>)mView unregisterDraggingDestinationHandler:mDropTargetHelper];
- [mDropTargetHelper release];
+ if( AquaSalFrame::isAlive( mpFrame ) )
+ [(id <DraggingDestinationHandler>)mView unregisterDraggingDestinationHandler:mDropTargetHelper];
+ [mDropTargetHelper release];
}
@@ -243,7 +249,7 @@ NSDragOperation DropTarget::draggingEntered(id sender)
NSPasteboard* dragPboard = [sender draggingPasteboard];
mXCurrentDragClipboard = new AquaClipboard(dragPboard, false);
- Reference<XTransferable> xTransferable = DragSource::g_XTransferable.is() ?
+ uno::Reference<XTransferable> xTransferable = DragSource::g_XTransferable.is() ?
DragSource::g_XTransferable : mXCurrentDragClipboard->getContents();
DropTargetDragEnterEvent dtdee(static_cast<OWeakObject*>(this),
@@ -333,7 +339,7 @@ BOOL DropTarget::performDragOperation(id sender)
if (mSelectedDropAction != DNDConstants::ACTION_NONE)
{
- Reference<XTransferable> xTransferable = DragSource::g_XTransferable;
+ uno::Reference<XTransferable> xTransferable = DragSource::g_XTransferable;
if (!DragSource::g_XTransferable.is())
{
@@ -370,7 +376,7 @@ BOOL DropTarget::performDragOperation(id sender)
{
mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
mSelectedDropAction = DNDConstants::ACTION_NONE;
- mXCurrentDragClipboard = Reference<XClipboard>();
+ mXCurrentDragClipboard = uno::Reference<XClipboard>();
SetThemeCursor(kThemeArrowCursor);
}
@@ -396,6 +402,7 @@ BOOL DropTarget::performDragOperation(id sender)
sal_uInt64 tmp = 0;
pNSView >>= tmp;
mView = (id)tmp;
+ mpFrame = [(SalFrameView*)mView getSalFrame];
mDropTargetHelper = [[DropTargetHelper alloc] initWithDropTarget: this];
@@ -415,14 +422,14 @@ BOOL DropTarget::performDragOperation(id sender)
}
- void SAL_CALL DropTarget::addDropTargetListener(const Reference<XDropTargetListener>& dtl)
+ void SAL_CALL DropTarget::addDropTargetListener(const uno::Reference<XDropTargetListener>& dtl)
throw(RuntimeException)
{
rBHelper.addListener(::getCppuType(&dtl), dtl);
}
- void SAL_CALL DropTarget::removeDropTargetListener(const Reference<XDropTargetListener>& dtl)
+ void SAL_CALL DropTarget::removeDropTargetListener(const uno::Reference<XDropTargetListener>& dtl)
throw(RuntimeException)
{
rBHelper.removeListener(::getCppuType(&dtl), dtl);
@@ -486,7 +493,7 @@ BOOL DropTarget::performDragOperation(id sender)
{
// Reset the internal transferable used as shortcut in case this is
// an internal D&D operation
- DragSource::g_XTransferable = Reference<XTransferable>();
+ DragSource::g_XTransferable = uno::Reference<XTransferable>();
DragSource::g_DropSuccessSet = true;
DragSource::g_DropSuccess = success;
}
@@ -494,13 +501,13 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_drop( const DropTargetDropEvent& dte)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->drop( dte); }
catch(RuntimeException&) {}
@@ -511,13 +518,13 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_dragEnter(const DropTargetDragEnterEvent& e)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->dragEnter( e); }
catch (RuntimeException&) {}
@@ -528,14 +535,14 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_dragExit(const DropTargetEvent& dte)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->dragExit( dte); }
catch (RuntimeException&) {}
@@ -546,13 +553,13 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_dragOver(const DropTargetDragEvent& dtde)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer );
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->dragOver( dtde); }
catch (RuntimeException&) {}
@@ -563,13 +570,13 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_dropActionChanged(const DropTargetDragEvent& dtde)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->dropActionChanged( dtde); }
catch (RuntimeException&) {}
diff --git a/vcl/aqua/source/dtrans/DropTarget.hxx b/vcl/aqua/source/dtrans/DropTarget.hxx
index 231df7fd5157..77e2a08c5de7 100644
--- a/vcl/aqua/source/dtrans/DropTarget.hxx
+++ b/vcl/aqua/source/dtrans/DropTarget.hxx
@@ -51,6 +51,7 @@
#include <postmac.h>
class DropTarget;
+class AquaSalFrame;
/* The functions declared in this protocol are actually
declared in vcl/aqua/inc/salframe.h. Because we want
@@ -159,6 +160,7 @@ private:
com::sun::star::uno::Reference< com::sun::star::datatransfer::clipboard::XClipboard > mXCurrentDragClipboard;
DataFlavorMapperPtr_t mDataFlavorMapper;
id mView;
+ AquaSalFrame* mpFrame;
DropTargetHelper* mDropTargetHelper;
bool mbActive;
sal_Int8 mDragSourceSupportedActions;
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 783d203c76fd..ba8751307c70 100755
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -398,6 +398,11 @@ static AquaSalFrame* getMouseContainerFrame()
return self;
}
+-(AquaSalFrame*)getSalFrame
+{
+ return mpFrame;
+}
+
-(void)resetCursorRects
{
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
diff --git a/vcl/inc/vcl/cursor.hxx b/vcl/inc/vcl/cursor.hxx
index 14fd58296b0d..c143e49002fa 100644
--- a/vcl/inc/vcl/cursor.hxx
+++ b/vcl/inc/vcl/cursor.hxx
@@ -64,15 +64,13 @@ private:
sal_Bool mbVisible; // Ist Cursor sichtbar
unsigned char mnDirection; // indicates direction
-//#if 0 // _SOLAR__PRIVATE
public:
SAL_DLLPRIVATE void ImplDraw();
SAL_DLLPRIVATE void ImplRestore();
DECL_DLLPRIVATE_LINK( ImplTimerHdl, AutoTimer* );
- SAL_DLLPRIVATE void ImplShow( sal_Bool bDrawDirect = sal_True );
- SAL_DLLPRIVATE void ImplHide();
+ SAL_DLLPRIVATE void ImplShow( bool bDrawDirect = true, bool bRestore = false );
+ SAL_DLLPRIVATE bool ImplHide();
SAL_DLLPRIVATE void ImplNew();
-//#endif
public:
Cursor();
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 670d6dad0ada..793d12a0e93e 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2069,8 +2069,6 @@ void ImplListBoxWindow::SetTopEntry( sal_uInt16 nTop )
mnTop = nTop;
Scroll( 0, nDiff );
Update();
- maFocusRect.Top() += nDiff;
- maFocusRect.Bottom() += nDiff;
if( HasFocus() )
ImplShowFocusRect();
maScrollHdl.Call( this );
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index ff3c9a20ef06..8321e56443f3 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -299,13 +299,16 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
// Zur Zeit haben wir noch kein neues FileFormat
// if ( rIStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
- sal_uInt16 nLen;
- sal_uInt16 nSystem;
sal_Size nFirstPos = rIStream.Tell();
+
+ sal_uInt16 nLen = 0;
rIStream >> nLen;
if ( !nLen )
return rIStream;
+
+ sal_uInt16 nSystem = 0;
rIStream >> nSystem;
+
char* pTempBuf = new char[nLen];
rIStream.Read( pTempBuf, nLen - sizeof( nLen ) - sizeof( nSystem ) );
if ( nLen >= sizeof(ImplOldJobSetupData)+4 )
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 34276fafdfe5..c917ea8aa718 100755
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -344,15 +344,19 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
if( ! pController->getPrinter() )
{
rtl::OUString aPrinterName( i_rInitSetup.GetPrinterName() );
+ bool bSetJobSetup = true;
if( ! aPrinterName.getLength() && pController->isShowDialogs() && ! pController->isDirectPrint() )
{
// get printer name from configuration
SettingsConfigItem* pItem = SettingsConfigItem::get();
aPrinterName = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPrinterUsed" ) ) );
+ bSetJobSetup = false;
}
boost::shared_ptr<Printer> pPrinter( new Printer( aPrinterName ) );
+ if( bSetJobSetup )
+ pPrinter->SetJobSetup( i_rInitSetup );
pController->setPrinter( pPrinter );
}
@@ -399,17 +403,25 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
{
if( nContent == 0 )
{
- sal_Int32 nPages = i_pController->getPageCount();
- if( nPages > 0 )
+ // do not overwrite PageRange if it is already set
+ beans::PropertyValue* pRangeVal = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ) );
+ rtl::OUString aRange;
+ if( pRangeVal )
+ pRangeVal->Value >>= aRange;
+ if( aRange.getLength() == 0 )
{
- rtl::OUStringBuffer aBuf( 32 );
- aBuf.appendAscii( "1" );
- if( nPages > 1 )
+ sal_Int32 nPages = i_pController->getPageCount();
+ if( nPages > 0 )
{
- aBuf.appendAscii( "-" );
- aBuf.append( nPages );
+ rtl::OUStringBuffer aBuf( 32 );
+ aBuf.appendAscii( "1" );
+ if( nPages > 1 )
+ {
+ aBuf.appendAscii( "-" );
+ aBuf.append( nPages );
+ }
+ i_pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), makeAny( aBuf.makeStringAndClear() ) );
}
- i_pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), makeAny( aBuf.makeStringAndClear() ) );
}
}
}
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 3be6fad02366..c59978077412 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -171,7 +171,7 @@ void Cursor::ImplRestore()
// -----------------------------------------------------------------------
-void Cursor::ImplShow( sal_Bool bDrawDirect )
+void Cursor::ImplShow( bool bDrawDirect, bool bRestore )
{
if ( mbVisible )
{
@@ -199,10 +199,10 @@ void Cursor::ImplShow( sal_Bool bDrawDirect )
mpData->mpWindow = pWindow;
mpData->mnStyle = mnStyle;
- if ( bDrawDirect )
+ if ( bDrawDirect || bRestore )
ImplDraw();
- if ( !mpWindow )
+ if ( !mpWindow && ! ( ! bDrawDirect && mpData->maTimer.IsActive()) )
{
mpData->maTimer.SetTimeout( pWindow->GetSettings().GetStyleSettings().GetCursorBlinkTime() );
if ( mpData->maTimer.GetTimeout() != STYLE_CURSOR_NOBLINKTIME )
@@ -216,16 +216,16 @@ void Cursor::ImplShow( sal_Bool bDrawDirect )
// -----------------------------------------------------------------------
-void Cursor::ImplHide()
+bool Cursor::ImplHide()
{
+ bool bWasCurVisible = false;
if ( mpData && mpData->mpWindow )
{
+ bWasCurVisible = mpData->mbCurVisible;
if ( mpData->mbCurVisible )
ImplRestore();
-
- mpData->maTimer.Stop();
- mpData->mpWindow = NULL;
}
+ return bWasCurVisible;
}
// -----------------------------------------------------------------------
@@ -329,6 +329,12 @@ void Cursor::Hide()
{
mbVisible = sal_False;
ImplHide();
+
+ if( mpData )
+ {
+ mpData->maTimer.Stop();
+ mpData->mpWindow = NULL;
+ }
}
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 5569759a3fff..98e93e748737 100644..100755
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1061,6 +1061,13 @@ void PrintDialog::readFromSettings()
}
}
maOKButton.SetText( maOptionsPage.maToFileBox.IsChecked() ? maPrintToFileText : maPrintText );
+
+ // persistent window state
+ rtl::OUString aWinState( pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WindowState" ) ) ) );
+ if( aWinState.getLength() )
+ SetWindowState( rtl::OUStringToOString( aWinState, RTL_TEXTENCODING_UTF8 ) );
+
if( maOptionsPage.maToFileBox.IsChecked() )
{
maPController->resetPrinterOptions( true );
@@ -1083,6 +1090,10 @@ void PrintDialog::storeToSettings()
pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPage" ) ),
maTabCtrl.GetPageText( maTabCtrl.GetCurPageId() ) );
+ pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WindowState" ) ),
+ rtl::OStringToOUString( GetWindowState(), RTL_TEXTENCODING_UTF8 )
+ );
pItem->Commit();
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 6ddb10c92cd7..96e787928772 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2405,8 +2405,9 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags )
mpWindowImpl->mnPaintFlags = 0;
if ( !mpWindowImpl->maInvalidateRegion.IsEmpty() )
{
+ bool bRestoreCursor = false;
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplHide();
+ bRestoreCursor = mpWindowImpl->mpCursor->ImplHide();
mbInitClipRegion = sal_True;
mpWindowImpl->mbInPaint = sal_True;
@@ -2453,7 +2454,7 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags )
mbInitClipRegion = sal_True;
mpWindowImpl->mpPaintRegion = NULL;
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplShow( sal_False );
+ mpWindowImpl->mpCursor->ImplShow( false, bRestoreCursor );
}
}
else
@@ -3042,7 +3043,7 @@ void Window::ImplScroll( const Rectangle& rRect,
Update();
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplShow( sal_False );
+ mpWindowImpl->mpCursor->ImplShow( false );
}
// -----------------------------------------------------------------------
diff --git a/vcl/unx/kde4/KDEData.cxx b/vcl/unx/kde4/KDEData.cxx
index 99871edadae3..dcf1db32068e 100644
--- a/vcl/unx/kde4/KDEData.cxx
+++ b/vcl/unx/kde4/KDEData.cxx
@@ -51,4 +51,4 @@ void KDEData::initNWF()
void KDEData::deInitNWF()
{
-} \ No newline at end of file
+}
diff --git a/vcl/unx/kde4/KDEData.hxx b/vcl/unx/kde4/KDEData.hxx
index 7cf5836c9688..6daa0c81a4fb 100644
--- a/vcl/unx/kde4/KDEData.hxx
+++ b/vcl/unx/kde4/KDEData.hxx
@@ -39,4 +39,4 @@ class KDEData : public X11SalData
virtual void Init();
virtual void initNWF();
virtual void deInitNWF();
-}; \ No newline at end of file
+};
diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx
index d67399528a7c..41fa9fedde3f 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -42,4 +42,4 @@ SalKDEDisplay::~SalKDEDisplay()
doDestruct();
// prevent SalDisplay from closing KApplication's display
pDisp_ = NULL;
-} \ No newline at end of file
+}
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 0c8f04f9fe41..abd1dc993f9e 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -56,12 +56,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) )
{
@@ -86,12 +86,14 @@ static OUString readEntryUntranslated( KConfigGroup *pGroup, const char *pKey )
return OUString::createFromAscii( (const char *) pGroup->readEntryUntranslated( pKey ).toAscii() );
}
+#if 0
/** Helper function to read color from KConfig configuration repository.
*/
static Color readColor( KConfigGroup *pGroup, const char *pKey )
{
return toColor( pGroup->readEntry( pKey, QColor(Qt::white) ) );
}
+#endif
/** Helper function to add information to Font from QFont.
@@ -179,7 +181,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();
@@ -272,9 +274,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)
) );
}
@@ -402,4 +404,4 @@ SalGraphics* KDESalFrame::GetGraphics()
}
return NULL;
-} \ No newline at end of file
+}
diff --git a/vcl/unx/kde4/KDESalFrame.hxx b/vcl/unx/kde4/KDESalFrame.hxx
index 643be72c27f3..6ea6f6ef283e 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 );
-}; \ No newline at end of file
+ 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 0bce1700f1fc..92b9a6b676a0 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,9 +105,9 @@ 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,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
-}; \ No newline at end of file
+};
diff --git a/vcl/unx/kde4/KDESalInstance.cxx b/vcl/unx/kde4/KDESalInstance.cxx
index 01c4723bd530..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 );
-} \ No newline at end of file
+}
diff --git a/vcl/unx/kde4/KDESalInstance.hxx b/vcl/unx/kde4/KDESalInstance.hxx
index 7d050fe6819e..91907e586b0c 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 );
-}; \ No newline at end of file
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
+};
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 6a2793b8abe3..3fb2bcaf487d 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -102,7 +102,7 @@ void KDEXLib::Init()
//kAboutData->setProgramIconName("OpenOffice");
m_nFakeCmdLineArgs = 1;
- USHORT nIdx;
+ int nIdx;
vos::OExtCommandLine aCommandLine;
int nParams = aCommandLine.getCommandArgCount();
rtl::OString aDisplay;
diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx
index 2cfb071e96ae..5e3a85256313 100644
--- a/vcl/unx/kde4/VCLKDEApplication.cxx
+++ b/vcl/unx/kde4/VCLKDEApplication.cxx
@@ -49,4 +49,4 @@ bool VCLKDEApplication::x11EventFilter(XEvent* event)
}
return false;
-} \ No newline at end of file
+}
diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx
index 2edfddd69a9c..7cbbe38b61df 100644
--- a/vcl/unx/kde4/VCLKDEApplication.hxx
+++ b/vcl/unx/kde4/VCLKDEApplication.hxx
@@ -50,4 +50,4 @@ class VCLKDEApplication : public KApplication
virtual bool x11EventFilter(XEvent* event);
SalKDEDisplay* disp;
-}; \ No newline at end of file
+};
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 62bdb4403c1f..73d93d42dd03 100755
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -541,7 +541,9 @@ void ImplSalInitGraphics( WinSalGraphics* pData )
void ImplSalDeInitGraphics( WinSalGraphics* pData )
{
- // Default Objekte selektieren
+ // clear clip region
+ SelectClipRgn( pData->mhDC, 0 );
+ // select default objects
if ( pData->mhDefPen )
SelectPen( pData->mhDC, pData->mhDefPen );
if ( pData->mhDefBrush )