summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/bootstrp/makefile.mk8
-rw-r--r--tools/bootstrp/md5.cxx64
-rw-r--r--tools/inc/tools/errcode.hxx1
-rw-r--r--tools/inc/tools/poly.hxx1
-rw-r--r--tools/inc/tools/postx.h76
-rw-r--r--tools/inc/tools/prex.h81
-rw-r--r--tools/inc/tools/rc.h1
-rw-r--r--tools/prj/d.lst3
-rw-r--r--tools/source/fsys/urlobj.cxx16
-rw-r--r--tools/source/generic/makefile.mk4
-rw-r--r--tools/source/generic/poly.cxx4
-rw-r--r--tools/source/generic/poly2.cxx114
-rw-r--r--tools/util/makefile.mk7
-rw-r--r--tools/workben/solar.c2
-rw-r--r--tools/workben/urltest.cxx19
15 files changed, 276 insertions, 125 deletions
diff --git a/tools/bootstrp/makefile.mk b/tools/bootstrp/makefile.mk
index d0adff1278e4..60bfc57bf96b 100644
--- a/tools/bootstrp/makefile.mk
+++ b/tools/bootstrp/makefile.mk
@@ -81,18 +81,20 @@ LIB2OBJFILES=\
APP1TARGET= sspretty
APP1OBJS= $(OBJ)$/sspretty.obj
APP1LIBS= $(LB)$/$(TARGET).lib $(LB)$/$(TARGET1).lib
-APP1STDLIBS=$(SALLIB) $(VOSLIB) $(TOOLSLIB)
+APP1STDLIBS=$(SALLIB) $(VOSLIB) $(TOOLSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(SALHELPERLIB) $(I18NISOLANGLIB)
APP2TARGET= rscdep
APP2OBJS= $(OBJ)$/rscdep.obj
APP2LIBS= $(LB)$/$(TARGET).lib $(LB)$/$(TARGET1).lib
-APP2STDLIBS= $(SALLIB) $(VOSLIB) $(TOOLSLIB)
+APP2STDLIBS= $(SALLIB) $(VOSLIB) $(TOOLSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB)
+APP2RPATH= NONE
+APP2RPATH= NONE
APP2RPATH= NONE
APP3TARGET= so_checksum
APP3OBJS= $(OBJ)$/md5.obj \
$(OBJ)$/so_checksum.obj
-APP3STDLIBS= $(TOOLSLIB) $(SALLIB)
+APP3STDLIBS= $(TOOLSLIB) $(SALLIB) $(VOSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB)
DEPOBJFILES = $(APP1OBJS) $(APP2OBJS) $(APP3OBJS)
diff --git a/tools/bootstrp/md5.cxx b/tools/bootstrp/md5.cxx
index bca89725fac2..a234f278cc9d 100644
--- a/tools/bootstrp/md5.cxx
+++ b/tools/bootstrp/md5.cxx
@@ -44,8 +44,62 @@
#define FILE_OPEN_READ "r"
#endif
+// Extended calc_md5_checksum to recognize Windows executables and libraries. To
+// create the same md5 checksum for a (code/data) identical file it ignores a different
+// date and header checksum. Please see crashrep/source/win32/soreport.cpp
+// where the same method is also used. The crash reporter uses the MD5
+// checksums to transfer them to the crash database. You have to make sure that both
+// methods use the same algorithm otherwise there could be problems with stack reports.
+
+void normalize_pe_image(sal_uInt8* buffer, size_t nBufferSize)
+{
+ const int OFFSET_PE_OFFSET = 0x3c;
+ const int OFFSET_COFF_TIMEDATESTAMP = 4;
+ const int PE_SIGNATURE_SIZE = 4;
+ const int COFFHEADER_SIZE = 20;
+ const int OFFSET_PE_OPTIONALHEADER_CHECKSUM = 64;
+
+ // Check the header part of the file buffer
+ if (buffer[0] == sal_uInt8('M') && buffer[1] == sal_uInt8('Z'))
+ {
+ unsigned long PEHeaderOffset = (long)buffer[OFFSET_PE_OFFSET];
+ if (PEHeaderOffset < nBufferSize-4)
+ {
+ if ( buffer[PEHeaderOffset+0] == sal_uInt8('P') &&
+ buffer[PEHeaderOffset+1] == sal_uInt8('E') &&
+ buffer[PEHeaderOffset+2] == 0 &&
+ buffer[PEHeaderOffset+3] == 0 )
+ {
+ PEHeaderOffset += PE_SIGNATURE_SIZE;
+ if (PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP < nBufferSize-4)
+ {
+ // Set timedatestamp and checksum fields to a normalized
+ // value to enforce the same MD5 checksum for identical
+ // Windows executables/libraries.
+ buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+0] = 0;
+ buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+1] = 0;
+ buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+2] = 0;
+ buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+3] = 0;
+ }
+
+ if (PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM < nBufferSize-4)
+ {
+ // Set checksum to a normalized value
+ buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM] = 0;
+ buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM+1] = 0;
+ buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM+2] = 0;
+ buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM+3] = 0;
+ }
+ }
+ }
+ }
+}
+
rtlDigestError calc_md5_checksum( const char *filename, ByteString &aChecksum )
{
+ const size_t BUFFER_SIZE = 0x1000;
+ const size_t MINIMAL_SIZE = 512;
+
sal_uInt8 checksum[RTL_DIGEST_LENGTH_MD5];
rtlDigestError error = rtl_Digest_E_None;
@@ -58,11 +112,19 @@ rtlDigestError calc_md5_checksum( const char *filename, ByteString &aChecksum )
if ( digest )
{
size_t nBytesRead;
- sal_uInt8 buffer[0x1000];
+ sal_uInt8 buffer[BUFFER_SIZE];
+ bool bHeader(true);
while ( rtl_Digest_E_None == error &&
0 != (nBytesRead = fread( buffer, 1, sizeof(buffer), fp )) )
{
+ if (bHeader)
+ {
+ bHeader = false;
+ if (nBytesRead >= MINIMAL_SIZE && buffer[0] == sal_uInt8('M') && buffer[1] == sal_uInt8('Z') )
+ normalize_pe_image(buffer, nBytesRead);
+ }
+
error = rtl_digest_updateMD5( digest, buffer, nBytesRead );
}
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/postx.h b/tools/inc/tools/postx.h
new file mode 100644
index 000000000000..68a2c3a31cf8
--- /dev/null
+++ b/tools/inc/tools/postx.h
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: postx.h,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _POSTX_H
+#define _POSTX_H
+
+#if defined __cplusplus
+}
+#endif
+
+/* X-Types */
+#undef Window
+#undef BYTE
+#undef INT8
+#undef INT64
+#undef BOOL
+#undef Font
+#undef Cursor
+#undef String
+#undef KeyCode
+#undef Region
+#undef Icon
+#undef Time
+#undef Boolean
+
+#undef Min
+#undef Max
+#undef DestroyAll
+#undef Success
+
+#undef Printer
+/* #undef FontInfo */
+#undef Orientation
+
+#undef GetToken
+#undef ReleaseToken
+#undef InitializeToken
+#undef NextRequest
+
+#ifdef KeyPress
+#if KeyPress != 2
+Error KeyPress must be Equal 2
+#endif
+#undef KeyPress
+#endif
+#define XLIB_KeyPress 2
+
+#endif
+
diff --git a/tools/inc/tools/prex.h b/tools/inc/tools/prex.h
new file mode 100644
index 000000000000..705e33ca5188
--- /dev/null
+++ b/tools/inc/tools/prex.h
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: prex.h,v $
+ * $Revision: 1.17 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _PREX_H
+#define _PREX_H
+
+#define Window XLIB_Window
+#define BYTE XLIB_BYTE
+#define INT8 XLIB_INT8
+#define INT64 XLIB_INT64
+#define BOOL XLIB_BOOL
+#define Font XLIB_Font
+#define Cursor XLIB_Cursor
+#define String XLIB_String
+#define KeyCode XLIB_KeyCode
+#define Region XLIB_Region
+#define Icon XLIB_Icon
+#define Time XLIB_Time
+#define Region XLIB_Region
+#define Boolean XLIB_Boolean
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) // should really check for xfree86 or for X11R6.1 and higher
+#define __XKeyboardExtension__ 1
+#else
+#define __XKeyboardExtension__ 0
+#endif
+
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/StringDefs.h>
+#include <X11/extensions/Xrender.h>
+#if __XKeyboardExtension__
+#include <X11/XKBlib.h>
+#endif
+typedef unsigned long Pixel;
+
+#undef DestroyAll
+#define DestroyAll XLIB_DestroyAll
+#define XLIB_DestroyAll 0
+#undef String
+#define String XLIB_String
+
+#undef KeyCode
+#define KeyCode XLIB_KeyCode //undef in intrinsics
+
+#define __Ol_OlXlibExt_h__
+
+#endif
+
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/prj/d.lst b/tools/prj/d.lst
index 660afffc37e9..e8fde61686a4 100644
--- a/tools/prj/d.lst
+++ b/tools/prj/d.lst
@@ -31,6 +31,9 @@ mkdir: %_DEST%\inc%_EXT%\bootstrp
..\inc\tools\postwin.h %_DEST%\inc%_EXT%\tools\postwin.h
..\inc\tools\prewin.h %_DEST%\inc%_EXT%\tools\prewin.h
+..\inc\tools\postx.h %_DEST%\inc%_EXT%\tools\postx.h
+..\inc\tools\prex.h %_DEST%\inc%_EXT%\tools\prex.h
+
..\inc\tools\agapi.hxx %_DEST%\inc%_EXT%\tools\agapi.hxx
..\inc\tools\agapi.hxx %_DEST%\inc%_EXT%\tools\agapi.hxx
..\inc\tools\agitem.hxx %_DEST%\inc%_EXT%\tools\agitem.hxx
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index e3484aee4e2d..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,
@@ -1523,8 +1523,15 @@ bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef,
else if (pEnd - q >= 2 && q[0] == '\\' && q[1] == '\\')
{
q += 2;
- if (scanDomain(q, pEnd) > 0 && (q == pEnd || *q == '\\'))
+ sal_Int32 n = rtl_ustr_indexOfChar_WithLength(
+ q, pEnd - q, '\\');
+ sal_Unicode const * qe = n == -1 ? pEnd : q + n;
+ if (parseHostOrNetBiosName(
+ q, qe, bOctets, ENCODE_ALL, RTL_TEXTENCODING_DONTKNOW,
+ true, NULL))
+ {
bFSys = true; // 1st
+ }
}
if (bFSys)
{
@@ -4818,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/poly.cxx b/tools/source/generic/poly.cxx
index 21024f081383..5cca29b3066e 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1004,8 +1004,8 @@ void Polygon::GetSimple( Polygon& rResult ) const
rResult = Polygon( (USHORT)aPointVector.size() );
::std::vector< Point >::iterator aIter( aPointVector.begin() ), aEnd( aPointVector.end() );
Point* pPointArray = rResult.mpImplPolygon->mpPointAry;
-
- while( aIter != aEnd )
+ USHORT nPoints = rResult.mpImplPolygon->mnPoints;
+ while( nPoints-- && aIter != aEnd )
*pPointArray++ = *aIter++;
}
}
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
diff --git a/tools/workben/urltest.cxx b/tools/workben/urltest.cxx
index 542297eb4bd6..a232f8ebdd93 100644
--- a/tools/workben/urltest.cxx
+++ b/tools/workben/urltest.cxx
@@ -799,6 +799,25 @@ main()
bSuccess = false;
}
}
+ {
+ bool bWasAbsolute;
+ if (!rtl::OUString(INetURLObject(rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "file:///"))).
+ smartRel2Abs(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "\\\\unc_host\\path")),
+ bWasAbsolute).
+ GetMainURL(INetURLObject::NO_DECODE)).
+ equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("file://unc_host/path"))
+ || !bWasAbsolute)
+ {
+ printf("BAD smartRel2Abs(\"\\\\unc_host\\path\")\n");
+ bSuccess = false;
+ }
+ }
}
if (true)