[ooo-build-commit] Branch 'ooo/master' - 2 commits - canvas/source toolkit/source vcl/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Oct 14 18:53:18 PDT 2009
canvas/source/directx/dx_9rm.cxx | 44 +++++++++++++++++++++++----
canvas/source/directx/dx_surfacegraphics.cxx | 5 ++-
toolkit/source/awt/vclxwindow.cxx | 9 ++++-
vcl/source/gdi/region.cxx | 13 ++++---
4 files changed, 58 insertions(+), 13 deletions(-)
New commits:
commit 44712f6dea093a002c07b3e592a8260bd43e0027
Author: Kurt Zenker <kz at openoffice.org>
Date: Wed Oct 14 18:48:09 2009 +0000
CWS-TOOLING: integrate CWS dba32h
2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed
2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI
2009-10-02 12:50:19 +0200 fs r276632 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes
2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS
2009-10-01 11:13:22 +0200 fs r276583 : improved logs
2009-10-01 11:10:44 +0200 fs r276581 : #i105505#
2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run
2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition
2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 11:47:45 +0200 fs r276549 : #i105235#
2009-09-29 12:27:40 +0200 fs r276521 : #i105367#
2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well
2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well
2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty
2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk at 276429 (milestone: DEV300:m60)
2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar
2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends
2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand
2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand
2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand
2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support
2009-09-18 13:06:50 +0200 fs r276277 : #i105147#
2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety
2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk at 276192 (milestone: DEV300:m59)
2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so
2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes
2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency
2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue
2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue
2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity
2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView
2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk at 276043 (milestone: DEV300:m58)
2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 985dff8..1eb1d6a 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2506,7 +2506,14 @@ void VCLXWindow::setZoom( float fZoomX, float /*fZoomY*/ ) throw(::com::sun::sta
::vos::OGuard aGuard( GetMutex() );
if ( GetWindow() )
- GetWindow()->SetZoom( Fraction( fZoomX ) );
+ {
+ // Fraction::Fraction takes a double, but we have a float only.
+ // The implicit conversion from float to double can result in a precision loss, i.e. 1.2 is converted to
+ // 1.200000000047something. To prevent this, we convert explicitly to double, and round it.
+ double nZoom( fZoomX );
+ nZoom = ::rtl::math::round( nZoom, 4 );
+ GetWindow()->SetZoom( Fraction( nZoom ) );
+ }
}
// ::com::sun::star::lang::XEventListener
commit f0ace0221aaa677dea91f15464b3486152a41398
Author: Kurt Zenker <kz at openoffice.org>
Date: Wed Oct 14 15:14:05 2009 +0000
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 at 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
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index a9b425b..c6705e9 100755
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -228,7 +228,7 @@ namespace dxcanvas
bool createDevice();
bool verifyDevice( const UINT nAdapter );
UINT getAdapterFromWindow();
-
+
/** This object represents the DirectX state machine. In order
to serialize access to DirectX's global state, a global
mutex is required.
@@ -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 7796e1e..1ba6dcb 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();
}
}
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 87a0801..0e9280e 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -153,7 +153,8 @@ void ImplAddMissingBands (
// We still have to cover two cases:
// 1. The region does not yet contain any bands.
// 2. The intervall nTop->nBottom extends past the bottom most band.
- if (nCurrentTop < nBottom && (pBand==NULL || nBottom>pBand->mnYBottom))
+ if (nCurrentTop <= nBottom
+ && (pBand==NULL || nBottom>pBand->mnYBottom))
{
// When there is no previous band then the new one will be the
// first. Otherwise the new band is inserted behind the last band.
@@ -232,8 +233,9 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
ImplRegionBand* pTopBand = pBand;
// If necessary split the band at nTop so that nTop is contained
// in the lower band.
- if ( // Prevent the current band from becoming 0 pixel high
- pBand->mnYTop<nTop
+ if (pBand!=NULL
+ // Prevent the current band from becoming 0 pixel high
+ && pBand->mnYTop<nTop
// this allows the lowest pixel of the band to be split off
&& pBand->mnYBottom>=nTop
// do not split a band that is just one pixel high
@@ -248,8 +250,9 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
pBand = pBand->mpNextBand;
// The lowest band may have to be split at nBottom so that
// nBottom itself remains in the upper band.
- if ( // allow the current band becoming 1 pixel high
- pBand->mnYTop<=nBottom
+ if (pBand!=NULL
+ // allow the current band becoming 1 pixel high
+ && pBand->mnYTop<=nBottom
// prevent splitting off a band that is 0 pixel high
&& pBand->mnYBottom>nBottom
// do not split a band that is just one pixel high
More information about the ooo-build-commit
mailing list