[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/quartz

Tor Lillqvist tml at collabora.com
Wed Jan 15 02:15:08 PST 2014


 vcl/Library_vcl.mk              |    1 
 vcl/inc/quartz/salmathutils.hxx |   81 ---------------------
 vcl/quartz/salmathutils.cxx     |  154 ----------------------------------------
 3 files changed, 236 deletions(-)

New commits:
commit c923a9de575a1167aef1f68921a2dfa772436289
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Jan 15 12:02:07 2014 +0200

    Bin unused code
    
    Change-Id: Ie10881ab3f6e252c87fc3fedcf6a2b7fa0af2c56

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index a3f36ac..9660161 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -423,7 +423,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/osx/service_entry \
     $(vcl_quartz_code) \
     vcl/quartz/salgdiutils \
-    vcl/quartz/salmathutils \
     vcl/osx/salnativewidgets \
     vcl/osx/salprn \
     vcl/osx/salframe \
diff --git a/vcl/inc/quartz/salmathutils.hxx b/vcl/inc/quartz/salmathutils.hxx
deleted file mode 100644
index 5c6641b..0000000
--- a/vcl/inc/quartz/salmathutils.hxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_INC_QUARTZ_SALMATHUTILS_HXX
-#define INCLUDED_VCL_INC_QUARTZ_SALMATHUTILS_HXX
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// ------------------------------------------------------------------
-//
-//                            Structures
-//
-// ------------------------------------------------------------------
-
-// LRectCoor is an abreviation for rectangular coordinates
-// represented as long integers
-
-struct LRectCoor
-{
-    long  x;
-    long  y;
-    long  z;
-};
-
-// ------------------------------------------------------------------
-//
-//                       Type Definitions
-//
-// ------------------------------------------------------------------
-
-// LRectCoorVec is an abreviation for vectors in rectangular
-// coordinates represented as long integers
-
-typedef struct LRectCoor   LRectCoor;
-typedef LRectCoor         *LRectCoorVector;
-typedef LRectCoorVector   *LRectCoorTensor;
-
-// ------------------------------------------------------------------
-//
-//                      Function Headers
-//
-// ------------------------------------------------------------------
-
-void CSwap  ( char            &rX, char            &rY );
-void UCSwap ( unsigned char   &rX, unsigned char   &rY );
-void SSwap  ( short           &rX, short           &rY );
-void USSwap ( unsigned short  &rX, unsigned short  &rY );
-void LSwap  ( long            &rX, long            &rY );
-void ULSwap ( unsigned long   &rX, unsigned long   &rY );
-
-// ------------------------------------------------------------------
-
-unsigned long  Euclidian2Norm ( const LRectCoorVector  pVec );
-
-// ------------------------------------------------------------------
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // INCLUDED_VCL_INC_QUARTZ_SALMATHUTILS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/quartz/salmathutils.cxx b/vcl/quartz/salmathutils.cxx
deleted file mode 100644
index e1222aa..0000000
--- a/vcl/quartz/salmathutils.cxx
+++ /dev/null
@@ -1,154 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include "quartz/salmathutils.hxx"
-
-#include <stdlib.h>
-
-// =======================================================================
-
-// =======================================================================
-
-#define Swap( x, y ) { x ^= y; y ^= x; x ^= y; }
-
-// =======================================================================
-
-// =======================================================================
-
-// Storage free swapping using XOR
-
-void CSwap ( char &rX, char &rY )
-{
-    Swap( rX, rY );
-} // CSwap
-
-// -----------------------------------------------------------------------
-
-// Storage free swapping using XOR
-
-void UCSwap ( unsigned char &rX, unsigned char &rY )
-{
-    Swap( rX, rY );
-} // UCSwap
-
-// -----------------------------------------------------------------------
-
-// Storage free swapping using XOR
-
-void SSwap ( short &rX, short &rY )
-{
-    Swap( rX, rY );
-} // SSwap
-
-// -----------------------------------------------------------------------
-
-// Storage free swapping using XOR
-
-void USSwap ( unsigned short &rX, unsigned short &rY )
-{
-    Swap( rX, rY );
-} // USSwap
-
-// -----------------------------------------------------------------------
-
-// Storage free swapping using XOR
-
-void LSwap ( long &rX, long &rY )
-{
-    Swap( rX, rY );
-} // LSwap
-
-// -----------------------------------------------------------------------
-
-// Storage free swapping using XOR
-
-void ULSwap ( unsigned long &rX, unsigned long &rY )
-{
-    Swap( rX, rY );
-} // ULSwap
-
-// =======================================================================
-
-// =======================================================================
-
-// -----------------------------------------------------------------------
-//
-// This way of measuring distance is also called the "Manhattan distance."
-// Manhattan distance takes advantage of the fact that the sum of the
-// lengths of the three components of a 3D vector is a rough approxima-
-// tion of the vector's length.
-//
-// -----------------------------------------------------------------------
-
-unsigned long  Euclidian2Norm ( const LRectCoorVector  pVec )
-{
-    unsigned long  ndist = 0;
-
-    if ( pVec )
-    {
-        long           nDX  = 0;
-        long           nDY  = 0;
-        long           nDZ  = 0;
-        unsigned long  nMax = 0;
-        unsigned long  nMed = 0;
-        unsigned long  nMin = 0;
-
-        // Find |x'-x|, |y'-y|, and |z'-z| from (x,y,z) and (x',y',z')
-
-        nDX = pVec[1].x - pVec[0].x;
-        nDY = pVec[1].y - pVec[0].y;
-        nDZ = pVec[1].z - pVec[0].z;
-
-        nMax = (unsigned long)abs( nDX );
-        nMed = (unsigned long)abs( nDY );
-        nMin = (unsigned long)abs( nDZ );
-
-        // Sort them (3 compares, 0-3 swaps)
-
-        if ( nMax < nMed )
-        {
-            Swap( nMax, nMed );
-        } // if
-
-        if ( nMax < nMin )
-        {
-            Swap( nMax, nMin );
-        } // if
-
-        // Approximate Euclidian distance:
-        //
-        //    d = max + (11/32)*med + (1/4)*min
-        //
-        // with +/- 8% error, where the exact formulae for d is
-        //
-        //  || (x',y',z') - (x,y,z) || = { |x'-x|^2 + |y'-y|^2 + |z'-z|^2 }^(1/2)
-
-        ndist = nMax + ( nMin >> 2UL )
-                     + ( ( ( nMed << 3UL ) + ( nMed << 1UL ) + nMed ) >> 5UL );
-    } // if
-
-    return ndist;
-} // RGBDistance
-
-// =======================================================================
-
-// =======================================================================
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list