summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2009-07-06 12:37:58 +0000
committerVladimir Glazounov <vg@openoffice.org>2009-07-06 12:37:58 +0000
commit047cc986976a353d7676eef1114ef4c46c22d147 (patch)
treee084e77a6fadccb0ffe21af2caa7c90d45fd32c9 /vcl
parentfe2fc695df1238e16110f542762d48bdf624e049 (diff)
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
Diffstat (limited to 'vcl')
-rwxr-xr-xvcl/aqua/inc/salframeview.h1
-rw-r--r--vcl/aqua/source/window/salframe.cxx12
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm12
-rw-r--r--vcl/unx/headless/svpgdi.cxx6
-rw-r--r--vcl/unx/headless/svpvd.cxx5
-rw-r--r--vcl/workben/makefile.mk1
-rw-r--r--vcl/workben/svpclient.cxx47
7 files changed, 73 insertions, 11 deletions
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 <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;
}
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 <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)
+ {
+ }
+
+ 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( xMS );
+ InitVCL( xFactory );
::Main();
DeInitVCL();