diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/errcode.hxx | 1 | ||||
-rw-r--r-- | tools/inc/tools/poly.hxx | 1 | ||||
-rw-r--r-- | tools/inc/tools/rc.h | 1 | ||||
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 7 | ||||
-rw-r--r-- | tools/source/generic/makefile.mk | 4 | ||||
-rw-r--r-- | tools/source/generic/poly2.cxx | 114 | ||||
-rw-r--r-- | tools/util/makefile.mk | 7 | ||||
-rw-r--r-- | tools/workben/solar.c | 2 |
8 files changed, 19 insertions, 118 deletions
diff --git a/tools/inc/tools/errcode.hxx b/tools/inc/tools/errcode.hxx index af420397eba2..337fedfea44a 100644 --- a/tools/inc/tools/errcode.hxx +++ b/tools/inc/tools/errcode.hxx @@ -314,6 +314,7 @@ inline ULONG ERRCODE_TOERROR( ULONG x ) #define PRINTER_ABORT ERRCODE_IO_ABORT #define PRINTER_OUTOFMEMORY ERRCODE_IO_OUTOFMEMORY #define PRINTER_GENERALERROR ERRCODE_IO_GENERAL +#define PRINTER_ACCESSDENIED ERRCODE_IO_ACCESSDENIED #define ERRCODE_INET_NAME_RESOLVE (ERRCODE_AREA_INET | ERRCODE_CLASS_READ | 1) #define ERRCODE_INET_CONNECT (ERRCODE_AREA_INET | ERRCODE_CLASS_READ | 2) diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx index 606c9c91e879..a77782bc963c 100644 --- a/tools/inc/tools/poly.hxx +++ b/tools/inc/tools/poly.hxx @@ -260,7 +260,6 @@ private: ImplPolyPolygon* mpImplPolyPolygon; //#if 0 // _SOLAR__PRIVATE - TOOLS_DLLPRIVATE void *ImplCreateGPCPolygon() const; TOOLS_DLLPRIVATE void ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, ULONG nOperation ) const; TOOLS_DLLPRIVATE void *ImplCreateArtVpath() const; TOOLS_DLLPRIVATE void ImplSetFromArtVpath( void *pVpath ); diff --git a/tools/inc/tools/rc.h b/tools/inc/tools/rc.h index 11d6e2030162..8bad7dbf3f8a 100644 --- a/tools/inc/tools/rc.h +++ b/tools/inc/tools/rc.h @@ -102,6 +102,7 @@ typedef short RSWND_STYLE; //#define NUMERICFORMATTER_I12 0x08 // erAck: got rid of class International (2005-06-17) #define NUMERICFORMATTER_DECIMALDIGITS 0x10 #define NUMERICFORMATTER_VALUE 0x20 +#define NUMERICFORMATTER_NOTHOUSANDSEP 0x40 #define METRICFORMATTER_UNIT 0x01 #define METRICFORMATTER_CUSTOMUNITTEXT 0x02 diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 2aff0d734bf6..f7ffed5e4dd1 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -407,7 +407,7 @@ static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END] { "out", "out://", 0, true, false, false, false, false, false, false, false }, { "vnd.sun.star.wfs", "vnd.sun.star.wfs://", 0, true, false, false, - false, true, false, true, false }, + false, true, true, true, false }, { "vnd.sun.star.hier", "vnd.sun.star.hier:", 0, true, false, false, false, false, false, true, false }, { "vim", "vim://", 0, true, true, false, true, false, false, true, @@ -4825,9 +4825,8 @@ bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath, break; } - rtl::OUStringBuffer aSynAbsURIRef( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file://"), - RTL_TEXTENCODING_ASCII_US)); + rtl::OUStringBuffer aSynAbsURIRef(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file://"))); + switch (eStyle) { case FSYS_VOS: diff --git a/tools/source/generic/makefile.mk b/tools/source/generic/makefile.mk index 9562999bd5d7..6340e4daae08 100644 --- a/tools/source/generic/makefile.mk +++ b/tools/source/generic/makefile.mk @@ -39,10 +39,6 @@ TARGET=gen .INCLUDE : settings.mk .INCLUDE : $(PRJ)$/util$/makefile.pmk -.IF "$(WITH_GPC)"!="NO" -CDEFS+=-DHAVE_GPC_H -.ENDIF - # --- Files -------------------------------------------------------- EXCEPTIONSFILES = $(SLO)$/poly.obj $(OBJ)$/poly.obj diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index a560c961f481..ff97e6006a41 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -33,17 +33,10 @@ #define _SV_POLY2_CXX -extern "C" -{ -#if defined (HAVE_GPC_H) && !defined (__gpc_h) -# include <external/gpc/gpc.h> -#else -# define GPC_INT 0 -# define GPC_UNION 1 -# define GPC_DIFF 2 -# define GPC_XOR 3 -#endif // HAVE_GPC_H -} +#define POLY_CLIP_INT 0 +#define POLY_CLIP_UNION 1 +#define POLY_CLIP_DIFF 2 +#define POLY_CLIP_XOR 3 #include <rtl/math.hxx> #include <poly.h> @@ -389,115 +382,34 @@ void PolyPolygon::AdaptiveSubdivide( PolyPolygon& rResult, const double d ) cons void PolyPolygon::GetIntersection( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const { - ImplDoOperation( rPolyPoly, rResult, GPC_INT ); + ImplDoOperation( rPolyPoly, rResult, POLY_CLIP_INT ); } // ----------------------------------------------------------------------- void PolyPolygon::GetUnion( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const { - ImplDoOperation( rPolyPoly, rResult, GPC_UNION ); + ImplDoOperation( rPolyPoly, rResult, POLY_CLIP_UNION ); } // ----------------------------------------------------------------------- void PolyPolygon::GetDifference( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const { - ImplDoOperation( rPolyPoly, rResult, GPC_DIFF ); + ImplDoOperation( rPolyPoly, rResult, POLY_CLIP_DIFF ); } // ----------------------------------------------------------------------- void PolyPolygon::GetXOR( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const { - ImplDoOperation( rPolyPoly, rResult, GPC_XOR ); -} - -// ----------------------------------------------------------------------- - -#ifdef HAVE_GPC_H - -void* PolyPolygon::ImplCreateGPCPolygon() const -{ - gpc_polygon* pRet = new gpc_polygon; - - pRet->num_contours = 0; - pRet->hole = NULL; - pRet->contour = NULL; - - for( USHORT i = 0, nCount = Count(); i < nCount; i++ ) - { - const Polygon& rPoly = GetObject( i ); - const USHORT nSize = rPoly.GetSize(); - - if( nSize > 1 ) - { - gpc_vertex_list aVertexList; - gpc_vertex* pVertex; - - aVertexList.num_vertices = nSize; - aVertexList.vertex = pVertex = new gpc_vertex[ nSize ]; - - for( USHORT nPos = 0; nPos < nSize; nPos++, pVertex++ ) - { - const Point& rPoint = rPoly[ nPos ]; - pVertex->x = rPoint.X(); - pVertex->y = rPoint.Y(); - } - - gpc_add_contour( pRet, &aVertexList, 0 ); - delete[] aVertexList.vertex; - } - } - - return pRet; + ImplDoOperation( rPolyPoly, rResult, POLY_CLIP_XOR ); } // ----------------------------------------------------------------------- void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, ULONG nOperation ) const { - gpc_polygon* pGPCPoly1 = (gpc_polygon*) ImplCreateGPCPolygon(); - gpc_polygon* pGPCPoly2 = (gpc_polygon*) rPolyPoly.ImplCreateGPCPolygon(); - gpc_polygon* pResult = new gpc_polygon; - - pResult->num_contours = 0; - pResult->hole = NULL; - pResult->contour = NULL; - - gpc_polygon_clip( (gpc_op) nOperation, pGPCPoly1, pGPCPoly2, pResult ); - - rResult.Clear(); - - for( int i = 0; i < pResult->num_contours; i++ ) - { - gpc_vertex_list& rVertexList = pResult->contour[ i ]; - Polygon aPoly( ::sal::static_int_cast< USHORT >( rVertexList.num_vertices ) ); - - for( int j = 0; j < rVertexList.num_vertices; j++ ) - { - Point& rPt = aPoly[ ::sal::static_int_cast< USHORT >( j ) ]; - rPt.X() = FRound( rVertexList.vertex[ j ].x ); - rPt.Y() = FRound( rVertexList.vertex[ j ].y ); - } - - rResult.Insert( aPoly ); - } - - gpc_free_polygon( pGPCPoly1 ); - delete pGPCPoly1; - - gpc_free_polygon( pGPCPoly2 ); - delete pGPCPoly2; - - gpc_free_polygon( pResult ); - delete pResult; -} - -#else - -void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, ULONG nOperation ) const -{ // Convert to B2DPolyPolygon, temporarily. It might be // advantageous in the future, to have a PolyPolygon adaptor that // just simulates a B2DPolyPolygon here... @@ -514,21 +426,21 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR // All code extracted from svx/source/svdraw/svedtv2.cxx // ----------------------------------------------------- - case GPC_UNION: + case POLY_CLIP_UNION: { // merge A and B (OR) aMergePolyPolygonA = basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aMergePolyPolygonB); break; } - case GPC_DIFF: + case POLY_CLIP_DIFF: { // substract B from A (DIFF) aMergePolyPolygonA = basegfx::tools::solvePolygonOperationDiff(aMergePolyPolygonA, aMergePolyPolygonB); break; } - case GPC_XOR: + case POLY_CLIP_XOR: { // compute XOR between poly A and B aMergePolyPolygonA = basegfx::tools::solvePolygonOperationXor(aMergePolyPolygonA, aMergePolyPolygonB); @@ -536,7 +448,7 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR } default: - case GPC_INT: + case POLY_CLIP_INT: { // cut poly 1 against polys 2..n (AND) aMergePolyPolygonA = basegfx::tools::solvePolygonOperationAnd(aMergePolyPolygonA, aMergePolyPolygonB); @@ -547,8 +459,6 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR rResult = PolyPolygon( aMergePolyPolygonA ); } -#endif // HAVE_GPC_H - // ----------------------------------------------------------------------- USHORT PolyPolygon::Count() const diff --git a/tools/util/makefile.mk b/tools/util/makefile.mk index 546ef29a449a..d9ba720543e3 100644 --- a/tools/util/makefile.mk +++ b/tools/util/makefile.mk @@ -113,13 +113,6 @@ SHL1IMPLIB= itools SHL1USE_EXPORTS=name SHL1STDLIBS+= $(SALLIB) $(VOSLIB) $(BASEGFXLIB) $(I18NISOLANGLIB) $(COMPHELPERLIB) -.IF "$(WITH_LIBART)"=="YES" -SHL1STDLIBS+= $(LIBART_LIBS) -.ELSE -SHL1STDLIBS+= $(GPC3RDLIB) -.ENDIF - - .IF "$(GUI)"=="WNT" SHL1STDLIBS+= $(SHELL32LIB) \ $(MPRLIB) \ diff --git a/tools/workben/solar.c b/tools/workben/solar.c index 91460614fe9b..05e9c103b8b4 100644 --- a/tools/workben/solar.c +++ b/tools/workben/solar.c @@ -352,6 +352,8 @@ void Description_Print( struct Description* pThis, char* name ) fprintf( f, "#define __SIZEOFDOUBLE\t%d\n", sizeof( double ) ); fprintf( f, "#define __IEEEDOUBLE\n" ); fprintf( f, "#define _SOLAR_NODESCRIPTION\n" ); + + fclose(f); } int |