[Libreoffice-commits] .: 2 commits - basegfx/source svl/source

David Tardon dtardon at kemper.freedesktop.org
Tue Jan 25 01:13:04 PST 2011


 basegfx/source/polygon/b2dsvgpolypolygon.cxx |    6 +++---
 svl/source/items/style.cxx                   |   12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit e46d800dc9d39c2ae377175dd141df1cded7e92b
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 25 10:12:34 2011 +0100

    use OSL-style asserts

diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index a8a5fb8..670b98e 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -641,7 +641,7 @@ BOOL SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rSty
     SfxStyleSheetIterator aIter(this,eFam,SFXSTYLEBIT_ALL);
     SfxStyleSheetBase *pStyle =
         aIter.Find(rStyle);
-    DBG_ASSERT(pStyle, "Vorlage nicht gefunden. Writer mit Solar <2541??");
+    OSL_ENSURE(pStyle, "Vorlage nicht gefunden. Writer mit Solar <2541??");
     if(pStyle)
         return pStyle->SetParent(rParent);
     else
@@ -698,11 +698,11 @@ SfxStyleSheetBase* SfxStyleSheetBasePool::Create( const SfxStyleSheetBase& r )
 
 SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const XubString& rName, SfxStyleFamily eFam, USHORT mask, USHORT nPos)
 {
-    DBG_ASSERT( eFam != SFX_STYLE_FAMILY_ALL, "svl::SfxStyleSheetBasePool::Make(), FamilyAll is not a allowed Familie" );
+    OSL_ENSURE( eFam != SFX_STYLE_FAMILY_ALL, "svl::SfxStyleSheetBasePool::Make(), FamilyAll is not a allowed Familie" );
 
     SfxStyleSheetIterator aIter(this, eFam, mask);
     rtl::Reference< SfxStyleSheetBase > xStyle( aIter.Find( rName ) );
-    DBG_ASSERT( !xStyle.is(), "svl::SfxStyleSheetBasePool::Make(), StyleSheet already exists" );
+    OSL_ENSURE( !xStyle.is(), "svl::SfxStyleSheetBasePool::Make(), StyleSheet already exists" );
     SfxStyleSheetIterator& rIter = GetIterator_Impl();
 
     if( !xStyle.is() )
@@ -827,15 +827,15 @@ void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p )
 void SfxStyleSheetBasePool::Insert( SfxStyleSheetBase* p )
 {
 #if OSL_DEBUG_LEVEL > 0
-    DBG_ASSERT( p, "svl::SfxStyleSheetBasePool::Insert(), no stylesheet?" );
+    OSL_ENSURE( p, "svl::SfxStyleSheetBasePool::Insert(), no stylesheet?" );
 
     SfxStyleSheetIterator aIter(this, p->GetFamily(), p->GetMask());
     SfxStyleSheetBase* pOld = aIter.Find( p->GetName() );
-    DBG_ASSERT( !pOld, "svl::SfxStyleSheetBasePool::Insert(), StyleSheet already inserted" );
+    OSL_ENSURE( !pOld, "svl::SfxStyleSheetBasePool::Insert(), StyleSheet already inserted" );
     if( p->GetParent().Len() )
     {
         pOld = aIter.Find( p->GetParent() );
-        DBG_ASSERT( pOld, "svl::SfxStyleSheetBasePool::Insert(), Parent not found!" );
+        OSL_ENSURE( pOld, "svl::SfxStyleSheetBasePool::Insert(), Parent not found!" );
     }
 #endif
     aStyles.push_back( rtl::Reference< SfxStyleSheetBase >( p ) );
commit e9e39195e7e0a68c53dbae255cad4ee368923047
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 25 10:10:27 2011 +0100

    split the expr, as gcc 4.6 bails out on it

diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 7f5ed07..51b8740 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -787,9 +787,9 @@ namespace basegfx
                                 // (since
                                 // createPolygonFromEllipseSegment()
                                 // normalizes to e.g. cw arc)
-                                const bool bFlipSegment( (bLargeArcFlag!=0) == 
-                                    (fmod(fTheta2+2*M_PI-fTheta1,
-                                          2*M_PI)<M_PI) );
+                                const bool bLessThanPi(fmod(fTheta2+2*M_PI-fTheta1,
+                                          2*M_PI)<M_PI);
+                                const bool bFlipSegment( (bLargeArcFlag!=0) == bLessThanPi );
                                 if( bFlipSegment )
                                     std::swap(fTheta1,fTheta2);
 


More information about the Libreoffice-commits mailing list