summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2009-12-07 09:34:25 +0100
committersb <sb@openoffice.org>2009-12-07 09:34:25 +0100
commit334c894c6fc1ac6d494b0256b7982ed7311d8854 (patch)
treeedbd496e0642fea062f8e50aa131f2c889e75465 /tools
parentfe537060e40a6d0c5411a800fd5c518d04a6209c (diff)
parentb31166829b6c56b963e6ca58cd1af8c746e8ab6a (diff)
merged in DEV300_m66
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/poly.hxx2
-rw-r--r--tools/inc/tools/solar.h2
-rw-r--r--tools/source/fsys/wntmsc.cxx2
-rw-r--r--tools/source/generic/poly.cxx53
-rw-r--r--tools/source/generic/poly2.cxx17
-rw-r--r--tools/source/stream/strmunx.cxx2
6 files changed, 4 insertions, 74 deletions
diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx
index a77782bc963c..05092957c48e 100644
--- a/tools/inc/tools/poly.hxx
+++ b/tools/inc/tools/poly.hxx
@@ -182,7 +182,6 @@ public:
void Clip( const Rectangle& rRect, BOOL bPolygon = TRUE );
void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL );
- void GetSimple( Polygon& rResult ) const;
/** Adaptive subdivision of polygons with curves
This method adaptively subdivides bezier arcs within the
@@ -288,7 +287,6 @@ public:
void Clip( const Rectangle& rRect );
void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL );
- void GetSimple( PolyPolygon& rResult ) const;
/** Adaptive subdivision of polygons with curves
This method adaptively subdivides bezier arcs within the
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index 4fe00adc9da0..195a6fd3ce87 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -385,6 +385,8 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
#define __DLLEXTENSION "la.so"
#elif defined LINUX && defined M68K
#define __DLLEXTENSION "lm.so"
+#elif defined LINUX && defined HPPA
+ #define __DLLEXTENSION "lh.so"
#elif defined LINUX
#error unknown plattform
#elif defined FREEBSD && defined X86
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index 0e8e5ebc7918..153fbf37de2e 100644
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -91,7 +91,7 @@ struct dirent *readdir( DIR *pDir )
pDir->h = FindFirstFile( pBuf, &pDir->aDirEnt );
bOk = pDir->h != INVALID_HANDLE_VALUE;
pDir->p = NULL;
- delete pBuf;
+ delete [] pBuf;
}
else
pDir->h = INVALID_HANDLE_VALUE;
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 5cca29b3066e..7f1eb94b646d 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -957,59 +957,6 @@ void Polygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
}
}
-// -----------------------------------------------------------------------
-
-void Polygon::GetSimple( Polygon& rResult ) const
-{
- if( !mpImplPolygon->mpFlagAry )
- rResult = *this;
- else
- {
- ::std::vector< Point > aPointVector;
-
- for( USHORT i = 0, nCount = GetSize(); i < nCount; )
- {
- if( ( ( i + 3 ) < nCount ) &&
- ( POLY_NORMAL == mpImplPolygon->mpFlagAry[ i ] ) &&
- ( POLY_CONTROL == mpImplPolygon->mpFlagAry[ i + 1 ] ) &&
- ( POLY_CONTROL == mpImplPolygon->mpFlagAry[ i + 2 ] ) &&
- ( POLY_NORMAL == mpImplPolygon->mpFlagAry[ i + 3 ] ) )
- {
- const USHORT nSegmentPoints = 25;
- const Polygon aSegmentPoly( mpImplPolygon->mpPointAry[ i ], mpImplPolygon->mpPointAry[ i + 1 ],
- mpImplPolygon->mpPointAry[ i + 3 ], mpImplPolygon->mpPointAry[ i + 2 ],
- nSegmentPoints );
- const USHORT nSegmentSize = aSegmentPoly.GetSize();
-
- if( nSegmentSize )
- {
- const Point* pPointArray = aSegmentPoly.mpImplPolygon->mpPointAry;
- const Point* pCur = pPointArray;
- const Point* pLast;
-
- aPointVector.push_back( *( pLast = pCur ) );
-
- for( USHORT j = 1; j < nSegmentSize; j++ )
- if( *( pCur = pPointArray + j ) != *pLast )
- aPointVector.push_back( *( pLast = pCur ) );
- }
-
- i += 3;
- }
- else
- aPointVector.push_back( mpImplPolygon->mpPointAry[ i++ ] );
- }
-
- // fill result polygon
- rResult = Polygon( (USHORT)aPointVector.size() );
- ::std::vector< Point >::iterator aIter( aPointVector.begin() ), aEnd( aPointVector.end() );
- Point* pPointArray = rResult.mpImplPolygon->mpPointAry;
- USHORT nPoints = rResult.mpImplPolygon->mnPoints;
- while( nPoints-- && aIter != aEnd )
- *pPointArray++ = *aIter++;
- }
-}
-
// =======================================================================
/* Recursively subdivide cubic bezier curve via deCasteljau.
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index ff97e6006a41..692e47a9d1d2 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -346,23 +346,6 @@ void PolyPolygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData
// -----------------------------------------------------------------------
-void PolyPolygon::GetSimple( PolyPolygon& rResult ) const
-{
- DBG_CHKTHIS( PolyPolygon, NULL );
-
- rResult.Clear();
-
- Polygon aPolygon;
-
- for( USHORT i = 0; i < mpImplPolyPolygon->mnCount; i++ )
- {
- mpImplPolyPolygon->mpPolyAry[ i ]->GetSimple( aPolygon );
- rResult.Insert( aPolygon );
- }
-}
-
-// -----------------------------------------------------------------------
-
void PolyPolygon::AdaptiveSubdivide( PolyPolygon& rResult, const double d ) const
{
DBG_CHKTHIS( PolyPolygon, NULL );
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 538c02e78fde..d27fe1f7f2c0 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -745,7 +745,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
aFileCopier.Execute();
}
}
- delete pBuf;
+ delete [] pBuf;
}
}
}