diff options
Diffstat (limited to 'svtools/source/dialogs')
-rw-r--r-- | svtools/source/dialogs/mcvmath.cxx | 159 | ||||
-rw-r--r-- | svtools/source/dialogs/mcvmath.hxx | 9 | ||||
-rw-r--r-- | svtools/source/dialogs/prnsetup.cxx | 5 |
3 files changed, 0 insertions, 173 deletions
diff --git a/svtools/source/dialogs/mcvmath.cxx b/svtools/source/dialogs/mcvmath.cxx index 5d5ad14c82c2..f34737b8a4f0 100644 --- a/svtools/source/dialogs/mcvmath.cxx +++ b/svtools/source/dialogs/mcvmath.cxx @@ -71,23 +71,6 @@ Fix ImpMultBig2( const Fix& a, const Fix& b ) /************************************************************************** |* -|* ImpMultBig2() -|* -|* Beschreibung Multiplikation fuer FixPoint-Berechnungen -|* -**************************************************************************/ - -// first parameter should be the bigger one - -FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb ) -{ - Fix rr = ImpMultBig2(ra.r,rb.r)-ImpMultBig2(ra.i,rb.i); - Fix ii = ImpMultBig2(ra.r,rb.i)+ImpMultBig2(ra.i,rb.r); - return FixCpx( rr,ii ); -} - -/************************************************************************** -|* |* ImpSqrt() |* |* Beschreibung Wurzelfunktion fuer FixPoint-Berechnungen @@ -146,146 +129,4 @@ FixCpx ImpExPI( sal_uInt16 nPhi ) return aIter; } -/************************************************************************** -|* -|* ImpATanx2() -|* -|* Beschreibung ATANX2-Funktion fuer FixPoint-Berechnungen -|* -**************************************************************************/ - -// use for x*x+y*y==1 only - -static sal_uInt16 ImpATanx2( const Fix& rX, const Fix& rY ) -{ - sal_uInt16 phi0 = 0; // result angel higher part - sal_uInt16 phi = 0; // dito lower part - long x = rX.x; - long y = rY.x; - long z; - const char Sft=14-FIX_POST; - short i; - FixCpx aTry; - FixCpx aInc; - FixCpx aIter(1L); - sal_Bool Small = sal_False; - - if ( (x==0) && (y==0) ) - return 0; - - if ( y < 0) - { - // reduce 3. to 1. quadrant (0..90 Degree) - phi0 += 180L * 65536L / 360L; - // turn 180 degree - y *= -1; - x *= -1; - } - - if ( x < 0) - { - // 2. to 1. q. - phi0 += 90L * 65536L / 360L; - // turn 90 degree clockwise - z = y; - y = -x; - x = z; - } - - for ( i = 13; i >= 0; i-- ) - { - aInc.r.x = CosTab[i]>>Sft; // e**(i(phi1+phi2)) = - aInc.i.x = SinTab[i]>>Sft; // e**(i*phi1)) * e**(i*phi2)) - aTry = aIter*aInc; - - if ( Small ) - { - // is try ok - if ( aTry.r.x >= x ) - { - aIter = aTry; - phi += (1<<i); - } - } - else - { - // is try ok - if ( aTry.i.x <= y ) - { - aIter = aTry; - phi += (1<<i); - - if ( i > 11 ) - Small=sal_True; - } - } - } - - return phi0+phi; -} - -/************************************************************************** -|* -|* ImpATan2() -|* -|* Beschreibung ATAN-Funktion fuer FixPoint-Berechnungen -|* -**************************************************************************/ - -sal_uInt16 ImpATan2( const short x, const short y ) -{ - Fix rRad = ImpSqrt(sal_uLong(long(x)*x+long(y)*y)); - - if ( !rRad.x ) - return 0; - Fix fx = x; - fx.DivBig( rRad ); // Normiere auf Einheitskreis - Fix fy = y; - fy.DivBig( rRad ); - - return ImpATanx2( fx, fy ); -} - -/************************************************************************** -|* -|* ImpCartToPolar() -|* -|* Beschreibung Koordinaaten-Wandlung -|* -**************************************************************************/ - -void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi ) -{ - rRad = Fix( ImpSqrt( sal_uLong( long(x)*x+long(y)*y ) ) ); - - if ( !rRad.x ) - rPhi=0; - else - { - // Normiere auf Einheitskreis - Fix fx = x; - fx.DivBig(rRad); - Fix fy = y; - fy.DivBig(rRad); - rPhi = ImpATanx2(fx, fy); - } -} - -/************************************************************************** -|* -|* ImpPolarToCart() -|* -|* Beschreibung Koordinaaten-Wandlung -|* -**************************************************************************/ - -void ImpPolarToCart( const Fix& rR, const sal_uInt16 Phi, short& rX, short& rY ) -{ - FixCpx fc = ImpExPI( Phi ); // calculate sin() & cos() - fc.GetReal().MultBig( rR ); - rX = sal::static_int_cast< short >(long( fc.GetReal() )); - fc.GetImag().MultBig( rR ); - rY = sal::static_int_cast< short >(long( fc.GetImag() )); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/dialogs/mcvmath.hxx b/svtools/source/dialogs/mcvmath.hxx index 5e0d47e655ef..c3e2005352ab 100644 --- a/svtools/source/dialogs/mcvmath.hxx +++ b/svtools/source/dialogs/mcvmath.hxx @@ -75,8 +75,6 @@ private: friend class FixCpx; friend class ColWheel; -// friend Fix ImpMultBig2( const Fix& a, const Fix& b ); - public: long x; @@ -122,8 +120,6 @@ public: class FixCpx { -// friend FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb ); - public: Fix r; Fix i; @@ -217,13 +213,8 @@ inline FixCpx operator/ ( const FixCpx& a, const FixCpx& b ) // ----------------------------------------------------------------------- Fix ImpMultBig2( const Fix& a, const Fix& b ); -FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb ); - -void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi ); -void ImpPolarToCart( const Fix& rR, const sal_uInt16 Phi, short& rX, short& rY ); sal_uInt16 ImpSqrt( sal_uLong nRadi ); -sal_uInt16 ImpATan2( const short x, const short y ); FixCpx ImpExPI( sal_uInt16 nPhi ); #endif // _MCVMATH_HXX diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index 728d0e6ea5c7..1c39b8e6f70d 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -281,11 +281,6 @@ void PrinterSetupDialog::SetOptionsHdl( const Link& rLink ) maBtnOptions.Show( rLink.IsSet() ); } -const Link& PrinterSetupDialog::GetOptionsHdl() const -{ - return maBtnOptions.GetClickHdl(); -} - void PrinterSetupDialog::ImplSetInfo() { const QueueInfo* pInfo = Printer::GetQueueInfo(maLbName.GetSelectEntry(), true); |