summaryrefslogtreecommitdiff
path: root/canvas/source
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-10-14 15:14:05 +0000
committerKurt Zenker <kz@openoffice.org>2009-10-14 15:14:05 +0000
commitf5463072488be735e80f463b412c927eb4b9c467 (patch)
treeb8e126df2ce883ed06478469bc56c65bab3613a2 /canvas/source
parent9e18c9ee07c6e8f9a62cdcb0237b183283a275ae (diff)
CWS-TOOLING: integrate CWS impress177
2009-10-07 13:02:12 +0200 sj r276751 : #i104579# fixed horz and vert adjustment for master styles (excluding notes master) 2009-10-06 18:09:14 +0200 sj r276724 : #i104579# fixed horz and vert adjustment for master styles 2009-10-05 15:02:38 +0200 sj r276679 : #i104685# fixed text color problem 2009-10-02 14:01:22 +0200 aw r276641 : #i105508# added own flag for ClipOnBounds to SdrBlockTextPrimitive2D and the helper createTextPrimitive; adapted usages; corrected VerticalText stuff; corrected ClipOnBounds for CustomShapes 2009-09-30 11:55:44 +0200 cl r276550 : CWS-TOOLING: rebase CWS impress177 to trunk@276429 (milestone: DEV300:m60) 2009-09-28 17:57:37 +0200 cl r276498 : #i94900# after a paste special make sure the stylesheets for outline shapes are correct 2009-09-24 17:36:29 +0200 af r276425 : #i103464# Restore device more reliably. 2009-09-24 12:29:31 +0200 sj r276417 : #i104685# fixed text color propblem 2009-09-22 16:48:06 +0200 sj r276360 : #i104682# fixed table border line thickness 2009-09-22 16:46:29 +0200 sj r276359 : #i104682# fixed table border line thickness 2009-09-22 10:29:30 +0200 sj r276346 : #104579# fixed horz and vert adjustment for master styles 2009-09-21 14:18:29 +0200 af r276330 : #i100905# Fixed crash when region is split into bands. 2009-09-15 15:44:30 +0200 cl r276181 : #i103179# always hide presentation shapes from master page if rendered as slide background 2009-09-15 10:44:52 +0200 cl r276155 : #i104579# return correct IsEmptyPresObj state 2009-09-14 16:51:41 +0200 cl r276132 : #i96538# restored OOo 3.0 numbering behaviour
Diffstat (limited to 'canvas/source')
-rwxr-xr-xcanvas/source/directx/dx_9rm.cxx42
-rwxr-xr-xcanvas/source/directx/dx_surfacegraphics.cxx5
2 files changed, 41 insertions, 6 deletions
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index 932a15e1f5c1..acef323ddc1b 100755
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -956,11 +956,43 @@ namespace dxcanvas
{
if(hr != D3DERR_DEVICELOST)
return false;
- hr = mpDevice->Reset(&mad3dpp);
- if(SUCCEEDED(hr))
- return true;
- if(hr == D3DERR_DEVICELOST)
- return true;
+
+ // interestingly enough, sometimes the Reset() below
+ // *still* causes DeviceLost errors. So, cycle until
+ // DX was kind enough to really reset the device...
+ do
+ {
+ mpVertexBuffer.reset();
+ hr = mpDevice->Reset(&mad3dpp);
+ if(SUCCEEDED(hr))
+ {
+ IDirect3DVertexBuffer9 *pVB(NULL);
+ DWORD aFVF(D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1);
+ if( FAILED(mpDevice->CreateVertexBuffer(sizeof(dxvertex)*maNumVertices,
+ D3DUSAGE_DYNAMIC|D3DUSAGE_WRITEONLY,
+ aFVF,
+ D3DPOOL_DEFAULT,
+ &pVB,
+ NULL)) )
+ {
+ throw lang::NoSupportException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "Could not create DirectX device - out of memory!")),NULL);
+ }
+ mpVertexBuffer=COMReference<IDirect3DVertexBuffer9>(pVB);
+
+ // retry after the restore
+ if(SUCCEEDED(mpSwapChain->Present(&aRect,&aRect,NULL,NULL,0)))
+ return true;
+ }
+
+ TimeValue aTimeout;
+ aTimeout.Seconds=1;
+ aTimeout.Nanosec=0;
+ osl_waitThread(&aTimeout);
+ }
+ while(hr == D3DERR_DEVICELOST);
+
return false;
}
diff --git a/canvas/source/directx/dx_surfacegraphics.cxx b/canvas/source/directx/dx_surfacegraphics.cxx
index 128095c1315d..8b9af6be6827 100755
--- a/canvas/source/directx/dx_surfacegraphics.cxx
+++ b/canvas/source/directx/dx_surfacegraphics.cxx
@@ -34,6 +34,8 @@
#include "dx_surfacegraphics.hxx"
#include "dx_impltools.hxx"
+using namespace ::com::sun::star;
+
namespace dxcanvas
{
namespace
@@ -75,11 +77,12 @@ namespace dxcanvas
tools::setupGraphics( *pGraphics );
pRet.reset(pGraphics,
GraphicsDeleter(rSurface, aHDC));
+ return pRet;
}
else
rSurface->ReleaseDC( aHDC );
}
- return pRet;
+ throw uno::RuntimeException();
}
}