CWS-TOOLING: integrate CWS ooo311gsl03_DEV300

2009-06-08 19:08:54 +0200 pl  r272745 : #159965# add missing link dependency
2009-06-08 18:14:12 +0200 pl  r272743 : #159965# join svp02, fix copyArea, copyBits and getBitmap from subsetted devices
2009-06-05 14:55:00 +0200 pl  r272689 : #i101082# adjust GetClientSize to behavior on other platforms
2009-06-04 20:21:35 +0200 pl  r272658 : #i96031# try key event if special key codes fail
This commit is contained in:
Vladimir Glazounov 2009-07-06 12:37:58 +00:00
parent fe2fc695df
commit 047cc98697
7 changed files with 73 additions and 11 deletions

View file

@ -108,6 +108,7 @@
-(void)sendMouseEventToFrame:(NSEvent*)pEvent button:(USHORT)nButton eventtype:(USHORT)nEvent;
-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar;
-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
-(MacOSBOOL)sendKeyToFrameDirect: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
-(MacOSBOOL)sendSingleCharacter:(NSEvent*)pEvent;
-(MacOSBOOL)handleKeyDownException:(NSEvent*)pEvent;
/*

View file

@ -520,8 +520,16 @@ void AquaSalFrame::SetClientSize( long nWidth, long nHeight )
void AquaSalFrame::GetClientSize( long& rWidth, long& rHeight )
{
rWidth = mbShown ? maGeometry.nWidth : 0;
rHeight = mbShown ? maGeometry.nHeight : 0;
if( mbShown || mbInitShow )
{
rWidth = maGeometry.nWidth;
rHeight = maGeometry.nHeight;
}
else
{
rWidth = 0;
rHeight = 0;
}
}
// -----------------------------------------------------------------------

View file

@ -1242,12 +1242,18 @@ private:
}
}
-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar
-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar
{
return [self sendKeyInputAndReleaseToFrame: nKeyCode character: aChar modifiers: mpFrame->mnLastModifierFlags];
}
-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
{
return [self sendKeyToFrameDirect: nKeyCode character: aChar modifiers: nMod] ||
[self sendSingleCharacter: mpLastEvent];
}
-(MacOSBOOL)sendKeyToFrameDirect: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
{
YIELD_GUARD;
@ -1283,7 +1289,7 @@ private:
// don't send unicodes in the private use area
if( keyChar >= 0xf700 && keyChar < 0xf780 )
keyChar = 0;
MacOSBOOL bRet = [self sendKeyInputAndReleaseToFrame: nKeyCode character: keyChar];
MacOSBOOL bRet = [self sendKeyToFrameDirect: nKeyCode character: keyChar modifiers: mpFrame->mnLastModifierFlags];
mbInKeyInput = false;
return bRet;

View file

@ -429,7 +429,7 @@ void SvpSalGraphics::copyArea( long nDestX,
{
B2IRange aSrcRect( nSrcX, nSrcY, nSrcX+nSrcWidth, nSrcY+nSrcHeight );
B2IRange aDestRect( nDestX, nDestY, nDestX+nSrcWidth, nDestY+nSrcHeight );
m_aDevice->drawBitmap( m_aDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
m_aDevice->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
dbgOut( m_aDevice );
}
@ -444,7 +444,7 @@ void SvpSalGraphics::copyBits( const SalTwoRect* pPosAry,
B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
pPosAry->mnDestX+pPosAry->mnDestWidth,
pPosAry->mnDestY+pPosAry->mnDestHeight );
m_aDevice->drawBitmap( pSrc->m_aDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
m_aDevice->drawBitmap( pSrc->m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
dbgOut( m_aDevice );
}
@ -519,7 +519,7 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh
m_aDevice );
B2IRange aSrcRect( nX, nY, nX+nWidth, nY+nHeight );
B2IRange aDestRect( 0, 0, nWidth, nHeight );
aCopy->drawBitmap( m_aDevice, aSrcRect, aDestRect, DrawMode_PAINT );
aCopy->drawBitmap( m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT );
SvpSalBitmap* pBitmap = new SvpSalBitmap();
pBitmap->setBitmap( aCopy );

View file

@ -34,6 +34,8 @@
#include <basegfx/vector/b2ivector.hxx>
#include <basebmp/scanlineformats.hxx>
#include "stdio.h"
using namespace basegfx;
using namespace basebmp;
@ -80,16 +82,19 @@ BOOL SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
#else
case 16: nFormat = Format::SIXTEEN_BIT_LSB_TC_MASK; break;
#endif
case 0:
case 24: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break;
case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK; break;
}
m_aDevice = aDevPal.empty()
? createBitmapDevice( aDevSize, false, nFormat )
: createBitmapDevice( aDevSize, false, nFormat, PaletteMemorySharedVector( new std::vector< basebmp::Color >(aDevPal) ) );
// update device in existing graphics
for( std::list< SvpSalGraphics* >::iterator it = m_aGraphics.begin();
it != m_aGraphics.end(); ++it )
(*it)->setDevice( m_aDevice );
}
return true;
}

View file

@ -125,6 +125,7 @@ APP5OBJS= $(OBJ)$/svpclient.obj
APP5STDLIBS= $(CPPULIB) \
$(CPPUHELPERLIB) \
$(COMPHELPERLIB) \
$(UCBHELPERLIB) \
$(VCLLIB) \
$(TOOLSLIB) \
$(SALLIB) \

View file

@ -50,6 +50,8 @@
#include <comphelper/processfactory.hxx>
#include <cppuhelper/servicefactory.hxx>
#include <cppuhelper/bootstrap.hxx>
#include "ucbhelper/contentbroker.hxx"
#include "ucbhelper/configurationkeys.hxx"
#include <errno.h>
#include <unistd.h>
@ -60,6 +62,8 @@
using namespace rtl;
using namespace cppu;
using namespace comphelper;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
// -----------------------------------------------------------------------
@ -73,10 +77,47 @@ SAL_IMPLEMENT_MAIN()
{
tools::extendApplicationEnvironment();
Reference< XMultiServiceFactory > xMS;
xMS = cppu::createRegistryServiceFactory( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True );
//-------------------------------------------------
// create the global service-manager
//-------------------------------------------------
Reference< XMultiServiceFactory > xFactory;
try
{
Reference< XComponentContext > xCtx = defaultBootstrap_InitialComponentContext();
xFactory = Reference< XMultiServiceFactory >( xCtx->getServiceManager(), UNO_QUERY );
if( xFactory.is() )
setProcessServiceFactory( xFactory );
}
catch( com::sun::star::uno::Exception& rExc)
{
}
InitVCL( xMS );
if( ! xFactory.is() )
{
fprintf( stderr, "Could not bootstrap UNO, installation must be in disorder. Exiting.\n" );
exit( 1 );
}
/*
* Create UCB.
*/
Sequence< Any > aArgs( 2 );
aArgs[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL );
aArgs[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE );
#if OSL_DEBUG_LEVEL > 1
sal_Bool bSuccess =
#endif
::ucbhelper::ContentBroker::initialize( xFactory, aArgs );
#if OSL_DEBUG_LEVEL > 1
if ( !bSuccess )
{
fprintf( stderr, "Error creating UCB, installation must be in disorder. Exiting.\n" );
exit( 1 );
}
#endif
InitVCL( xFactory );
::Main();
DeInitVCL();