diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h index e969cc8509a1..7fd4d96c4a45 100755 --- a/vcl/aqua/inc/salframeview.h +++ b/vcl/aqua/inc/salframeview.h @@ -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; /* diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index 560d80fd75d5..8c40e1acfe66 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -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; + } } // ----------------------------------------------------------------------- diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index 7de43d770385..a6213ca7b64d 100755 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -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; diff --git a/vcl/unx/headless/svpgdi.cxx b/vcl/unx/headless/svpgdi.cxx index cd3e286d167a..bd317c883b0b 100644 --- a/vcl/unx/headless/svpgdi.cxx +++ b/vcl/unx/headless/svpgdi.cxx @@ -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 ); diff --git a/vcl/unx/headless/svpvd.cxx b/vcl/unx/headless/svpvd.cxx index 3f48584036f6..6220af0b28b8 100644 --- a/vcl/unx/headless/svpvd.cxx +++ b/vcl/unx/headless/svpvd.cxx @@ -34,6 +34,8 @@ #include #include +#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; } diff --git a/vcl/workben/makefile.mk b/vcl/workben/makefile.mk index 83abbbf4e6bf..34316356a1a6 100644 --- a/vcl/workben/makefile.mk +++ b/vcl/workben/makefile.mk @@ -125,6 +125,7 @@ APP5OBJS= $(OBJ)$/svpclient.obj APP5STDLIBS= $(CPPULIB) \ $(CPPUHELPERLIB) \ $(COMPHELPERLIB) \ + $(UCBHELPERLIB) \ $(VCLLIB) \ $(TOOLSLIB) \ $(SALLIB) \ diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx index cf64d58110e8..7bea0b94f76a 100644 --- a/vcl/workben/svpclient.cxx +++ b/vcl/workben/svpclient.cxx @@ -50,6 +50,8 @@ #include #include #include +#include "ucbhelper/contentbroker.hxx" +#include "ucbhelper/configurationkeys.hxx" #include #include @@ -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();