[Libreoffice-commits] .: 2 commits - basegfx/inc basegfx/source formula/inc formula/source sc/source unusedcode.easy vcl/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Thu Jan 19 10:16:20 PST 2012


 basegfx/inc/basegfx/color/bcolortools.hxx      |   10 -
 basegfx/inc/basegfx/tools/canvastools.hxx      |   15 --
 basegfx/source/color/bcolortools.cxx           |   38 ------
 basegfx/source/tools/canvastools.cxx           |   78 ------------
 formula/inc/formula/formdata.hxx               |    1 
 formula/inc/formula/formula.hxx                |    1 
 formula/inc/formula/token.hxx                  |    2 
 formula/inc/formula/tokenarray.hxx             |    2 
 formula/source/core/api/token.cxx              |   29 ----
 formula/source/core/inc/core_resource.hxx      |    7 -
 formula/source/core/resource/core_resource.cxx |    7 -
 formula/source/ui/dlg/formula.cxx              |  151 -------------------------
 formula/source/ui/dlg/funcutl.cxx              |   21 ---
 formula/source/ui/dlg/structpg.cxx             |   10 -
 formula/source/ui/dlg/structpg.hxx             |    3 
 sc/source/ui/inc/formula.hxx                   |    2 
 unusedcode.easy                                |   31 -----
 vcl/source/gdi/pdfwriter_impl.cxx              |   77 ------------
 vcl/source/gdi/pdfwriter_impl.hxx              |    1 
 19 files changed, 486 deletions(-)

New commits:
commit d93536e52943c910936504e531956f04d9c0503f
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jan 19 19:14:49 2012 +0100

    remove unused methods

diff --git a/basegfx/inc/basegfx/color/bcolortools.hxx b/basegfx/inc/basegfx/color/bcolortools.hxx
index 5841f04..0bb0659 100644
--- a/basegfx/inc/basegfx/color/bcolortools.hxx
+++ b/basegfx/inc/basegfx/color/bcolortools.hxx
@@ -50,16 +50,6 @@ namespace basegfx
         /// Transform from HSV to RGB
         BASEGFX_DLLPUBLIC BColor hsv2rgb(const BColor& rHSVColor);
 
-        /// Transform from R'G'B' to YIQ (NTSC color model - Y is used in monochrome mode)
-        BASEGFX_DLLPUBLIC BColor rgb2yiq(const BColor& rRGBColor);
-        /// Transform from YIQ to R'G'B' (NTSC color model - Y is used in monochrome mode)
-        BASEGFX_DLLPUBLIC BColor yiq2rgb(const BColor& rYIQColor);
-
-        /// Transform from R'G'B' to Y'PbPr (the [0,1]x[-.5,.5]x[-.5,.5] equivalent of Y'CbCr (which is scaled into 8bit))
-        BASEGFX_DLLPUBLIC BColor rgb2ypbpr(const BColor& rRGBColor);
-        /// Transform from Y'PbPr (the [0,1]x[-.5,.5]x[-.5,.5] equivalent of Y'CbCr (which is scaled into 8bit)) into R'G'B'
-        BASEGFX_DLLPUBLIC BColor ypbpr2rgb(const BColor& rYPbPrColor);
-
         /// Transform from CIE XYZ into Rec. 709 RGB (D65 white point)
         BASEGFX_DLLPUBLIC BColor ciexyz2rgb( const BColor& rXYZColor );
         /// Transform from Rec. 709 RGB (D65 white point) into CIE XYZ
diff --git a/basegfx/inc/basegfx/tools/canvastools.hxx b/basegfx/inc/basegfx/tools/canvastools.hxx
index 5884563..ea1924a 100644
--- a/basegfx/inc/basegfx/tools/canvastools.hxx
+++ b/basegfx/inc/basegfx/tools/canvastools.hxx
@@ -138,7 +138,6 @@ namespace basegfx
             homMatrixFromAffineMatrix( ::basegfx::B2DHomMatrix&                             transform,
                                        const ::com::sun::star::geometry::AffineMatrix2D&    matrix );
 
-        BASEGFX_DLLPUBLIC ::basegfx::B2DHomMatrix homMatrixFromAffineMatrix( const ::com::sun::star::geometry::AffineMatrix2D& matrix );
         BASEGFX_DLLPUBLIC ::basegfx::B3DHomMatrix homMatrixFromAffineMatrix3D( const ::com::sun::star::geometry::AffineMatrix3D& matrix );
 
         BASEGFX_DLLPUBLIC ::com::sun::star::geometry::Matrix2D&
@@ -157,17 +156,13 @@ namespace basegfx
         BASEGFX_DLLPUBLIC ::com::sun::star::geometry::RealRectangle2D   rectangle2DFromB2DRectangle( const ::basegfx::B2DRange& );
         BASEGFX_DLLPUBLIC ::com::sun::star::geometry::RealRectangle3D   rectangle3DFromB3DRectangle( const ::basegfx::B3DRange& );
 
-        BASEGFX_DLLPUBLIC ::basegfx::B2DVector      b2DSizeFromRealSize2D( const ::com::sun::star::geometry::RealSize2D& );
         BASEGFX_DLLPUBLIC ::basegfx::B2DPoint       b2DPointFromRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& );
         BASEGFX_DLLPUBLIC ::basegfx::B2DRange       b2DRectangleFromRealRectangle2D( const ::com::sun::star::geometry::RealRectangle2D& );
         BASEGFX_DLLPUBLIC ::basegfx::B3DRange       b3DRectangleFromRealRectangle3D( const ::com::sun::star::geometry::RealRectangle3D& );
 
         BASEGFX_DLLPUBLIC ::com::sun::star::geometry::IntegerSize2D         integerSize2DFromB2ISize( const ::basegfx::B2IVector& );
-        BASEGFX_DLLPUBLIC ::com::sun::star::geometry::IntegerPoint2D    integerPoint2DFromB2IPoint( const ::basegfx::B2IPoint& );
-        BASEGFX_DLLPUBLIC ::com::sun::star::geometry::IntegerRectangle2D    integerRectangle2DFromB2IRectangle( const ::basegfx::B2IRange& );
 
         BASEGFX_DLLPUBLIC ::basegfx::B2IVector      b2ISizeFromIntegerSize2D( const ::com::sun::star::geometry::IntegerSize2D& );
-        BASEGFX_DLLPUBLIC ::basegfx::B2IPoint       b2IPointFromIntegerPoint2D( const ::com::sun::star::geometry::IntegerPoint2D& );
         BASEGFX_DLLPUBLIC ::basegfx::B2IRange       b2IRectangleFromIntegerRectangle2D( const ::com::sun::star::geometry::IntegerRectangle2D& );
 
         BASEGFX_DLLPUBLIC ::com::sun::star::awt::Size       awtSizeFromB2ISize( const ::basegfx::B2IVector& );
@@ -181,16 +176,6 @@ namespace basegfx
         // Geometry comparisons
         // ===================================================================
 
-        BASEGFX_DLLPUBLIC bool RealSize2DAreEqual( const ::com::sun::star::geometry::RealSize2D& rA, const ::com::sun::star::geometry::RealSize2D& rB );
-        BASEGFX_DLLPUBLIC bool RealPoint2DAreEqual( const ::com::sun::star::geometry::RealPoint2D& rA, const ::com::sun::star::geometry::RealPoint2D& rB );
-        BASEGFX_DLLPUBLIC bool RealRectangle2DAreEqual( const ::com::sun::star::geometry::RealRectangle2D& rA, const ::com::sun::star::geometry::RealRectangle2D& rB );
-        BASEGFX_DLLPUBLIC bool RealRectangle3DAreEqual( const ::com::sun::star::geometry::RealRectangle3D& rA, const ::com::sun::star::geometry::RealRectangle3D& rB );
-        BASEGFX_DLLPUBLIC bool AffineMatrix2DAreEqual( const ::com::sun::star::geometry::AffineMatrix2D& rA, const ::com::sun::star::geometry::AffineMatrix2D& rB );
-
-        BASEGFX_DLLPUBLIC bool IntegerSize2DAreEqual( const ::com::sun::star::geometry::IntegerSize2D& rA, const ::com::sun::star::geometry::IntegerSize2D& rB );
-        BASEGFX_DLLPUBLIC bool IntegerPoint2DAreEqual( const ::com::sun::star::geometry::IntegerPoint2D& rA, const ::com::sun::star::geometry::IntegerPoint2D& rB );
-        BASEGFX_DLLPUBLIC bool IntegerRectangle2DAreEqual( const ::com::sun::star::geometry::IntegerRectangle2D& rA, const ::com::sun::star::geometry::IntegerRectangle2D& rB );
-
         BASEGFX_DLLPUBLIC bool awtSizeAreEqual( const ::com::sun::star::awt::Size& rA, const ::com::sun::star::awt::Size& rB );
         BASEGFX_DLLPUBLIC bool awtPointAreEqual( const ::com::sun::star::awt::Point& rA, const ::com::sun::star::awt::Point& rB );
         BASEGFX_DLLPUBLIC bool awtRectangleAreEqual( const ::com::sun::star::awt::Rectangle& rA, const ::com::sun::star::awt::Rectangle& rB );
diff --git a/basegfx/source/color/bcolortools.cxx b/basegfx/source/color/bcolortools.cxx
index fb225e9..f89a475 100644
--- a/basegfx/source/color/bcolortools.cxx
+++ b/basegfx/source/color/bcolortools.cxx
@@ -200,26 +200,6 @@ namespace basegfx { namespace tools
         }
     }
 
-    BColor rgb2yiq(const BColor& rRGBColor)
-    {
-        // from Foley, van Dam, Computer Graphics
-        const double r=rRGBColor.getRed(), g=rRGBColor.getGreen(), b=rRGBColor.getBlue();
-        return BColor(
-            0.299*r + 0.587*g + 0.114*b,
-            0.596*r - 0.274*g - 0.322*b,
-            0.211*r - 0.522*g + 0.311*b);
-    }
-
-    BColor yiq2rgb(const BColor& rYIQColor)
-    {
-        // from Foley, van Dam, Computer Graphics
-        const double y=rYIQColor.getRed(), i=rYIQColor.getGreen(), q=rYIQColor.getBlue();
-        return BColor(
-            y + 0.956*i + 0.623*q,
-            y - 0.272*i - 0.648*q,
-            y - 1.105*i + 1.705*q );
-    }
-
     BColor ciexyz2rgb( const BColor& rXYZColor )
     {
         // from Poynton color faq, and SMPTE RP 177-1993, Derivation
@@ -242,24 +222,6 @@ namespace basegfx { namespace tools
             0.019334*r + 0.119193*g + 0.950227*b);
     }
 
-    BColor rgb2ypbpr(const BColor& rRGBColor)
-    {
-        const double r=rRGBColor.getRed(), g=rRGBColor.getGreen(), b=rRGBColor.getBlue();
-        return BColor(
-             0.299*r    + 0.587*g    + 0.114*b,
-            -0.168736*r - 0.331264*g + 0.5*b,
-             0.5*r      - 0.418688*g - 0.081312*b);
-    }
-
-    BColor ypbpr2rgb(const BColor& rYPbPrColor)
-    {
-        const double y=rYPbPrColor.getRed(), pb=rYPbPrColor.getGreen(), pr=rYPbPrColor.getBlue();
-        return BColor(
-            1.*y +       0.*pb +    1.402*pr,
-            1.*y - 0.344136*pb - 0.714136*pr,
-            1.*y +    1.772*pb +       0.*pr);
-    }
-
 } } // end of namespace basegfx
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx
index a3d75ec..18e0ad3 100644
--- a/basegfx/source/tools/canvastools.cxx
+++ b/basegfx/source/tools/canvastools.cxx
@@ -363,20 +363,6 @@ namespace basegfx
             return output;
         }
 
-        ::basegfx::B2DHomMatrix homMatrixFromAffineMatrix( const geometry::AffineMatrix2D& input )
-        {
-            ::basegfx::B2DHomMatrix output;
-
-            output.set(0,0, input.m00);
-            output.set(0,1, input.m01);
-            output.set(0,2, input.m02);
-            output.set(1,0, input.m10);
-            output.set(1,1, input.m11);
-            output.set(1,2, input.m12);
-
-            return output;
-        }
-
         ::basegfx::B3DHomMatrix homMatrixFromAffineMatrix3D( const ::com::sun::star::geometry::AffineMatrix3D& input )
         {
             ::basegfx::B3DHomMatrix output;
@@ -482,12 +468,6 @@ namespace basegfx
                                               rRect.getMaxZ());
         }
 
-        ::basegfx::B2DVector b2DSizeFromRealSize2D( const geometry::RealSize2D& rSize )
-        {
-            return ::basegfx::B2DVector( rSize.Width,
-                                         rSize.Height );
-        }
-
         ::basegfx::B2DPoint b2DPointFromRealPoint2D( const geometry::RealPoint2D& rPoint )
         {
             return ::basegfx::B2DPoint( rPoint.X,
@@ -518,30 +498,12 @@ namespace basegfx
                                             rSize.getY() );
         }
 
-        geometry::IntegerPoint2D integerPoint2DFromB2IPoint( const ::basegfx::B2IPoint& rPoint )
-        {
-            return geometry::IntegerPoint2D( rPoint.getX(),
-                                             rPoint.getY() );
-        }
-
-        geometry::IntegerRectangle2D integerRectangle2DFromB2IRectangle( const ::basegfx::B2IRange& rRectangle )
-        {
-            return geometry::IntegerRectangle2D( rRectangle.getMinX(), rRectangle.getMinY(),
-                                                 rRectangle.getMaxX(), rRectangle.getMaxY() );
-        }
-
         ::basegfx::B2IVector b2ISizeFromIntegerSize2D( const geometry::IntegerSize2D& rSize )
         {
             return ::basegfx::B2IVector( rSize.Width,
                                          rSize.Height );
         }
 
-        ::basegfx::B2IPoint b2IPointFromIntegerPoint2D( const geometry::IntegerPoint2D& rPoint )
-        {
-            return ::basegfx::B2IPoint( rPoint.X,
-                                        rPoint.Y );
-        }
-
         ::basegfx::B2IRange b2IRectangleFromIntegerRectangle2D( const geometry::IntegerRectangle2D& rRectangle )
         {
             return ::basegfx::B2IRange( rRectangle.X1, rRectangle.Y1,
@@ -622,46 +584,6 @@ namespace basegfx
         // Geometry comparisons
         // ===================================================================
 
-        bool RealSize2DAreEqual( const ::com::sun::star::geometry::RealSize2D& rA, const ::com::sun::star::geometry::RealSize2D& rB )
-        {
-            return (rA.Width == rB.Width && rA.Height == rB.Height);
-        }
-
-        bool RealPoint2DAreEqual( const ::com::sun::star::geometry::RealPoint2D& rA, const ::com::sun::star::geometry::RealPoint2D& rB )
-        {
-            return (rA.X == rB.X && rA.Y == rB.Y);
-        }
-
-        bool RealRectangle2DAreEqual( const ::com::sun::star::geometry::RealRectangle2D& rA, const ::com::sun::star::geometry::RealRectangle2D& rB )
-        {
-            return (rA.X1 == rB.X1 && rA.Y1 == rB.Y1 && rA.X2 == rB.X2 && rA.Y2 == rB.Y2);
-        }
-
-        bool RealRectangle3DAreEqual( const ::com::sun::star::geometry::RealRectangle3D& rA, const ::com::sun::star::geometry::RealRectangle3D& rB )
-        {
-            return (rA.X1 == rB.X1 && rA.Y1 == rB.Y1 && rA.Z1 == rB.Z1 && rA.X2 == rB.X2 && rA.Y2 == rB.Y2 && rA.Z2 == rB.Z2);
-        }
-
-        bool AffineMatrix2DAreEqual( const ::com::sun::star::geometry::AffineMatrix2D& rA, const ::com::sun::star::geometry::AffineMatrix2D& rB )
-        {
-            return (rA.m00 == rB.m00 && rA.m01 == rB.m01 && rA.m02 == rB.m02 && rA.m10 == rB.m10 && rA.m11 == rB.m11 && rA.m12 == rB.m12);
-        }
-
-        bool IntegerSize2DAreEqual( const ::com::sun::star::geometry::IntegerSize2D& rA, const ::com::sun::star::geometry::IntegerSize2D& rB )
-        {
-            return (rA.Width == rB.Width && rA.Height == rB.Height);
-        }
-
-        bool IntegerPoint2DAreEqual( const ::com::sun::star::geometry::IntegerPoint2D& rA, const ::com::sun::star::geometry::IntegerPoint2D& rB )
-        {
-            return (rA.X == rB.X && rA.Y == rB.Y);
-        }
-
-        bool IntegerRectangle2DAreEqual( const ::com::sun::star::geometry::IntegerRectangle2D& rA, const ::com::sun::star::geometry::IntegerRectangle2D& rB )
-        {
-            return (rA.X1 == rB.X1 && rA.Y1 == rB.Y1 && rA.X2 == rB.X2 && rA.Y2 == rB.Y2);
-        }
-
         bool awtSizeAreEqual( const ::com::sun::star::awt::Size& rA, const ::com::sun::star::awt::Size& rB )
         {
             return (rA.Width == rB.Width && rA.Height == rB.Height);
diff --git a/formula/inc/formula/formdata.hxx b/formula/inc/formula/formdata.hxx
index b8540a7..b4099ed 100644
--- a/formula/inc/formula/formdata.hxx
+++ b/formula/inc/formula/formdata.hxx
@@ -43,7 +43,6 @@ public:
                         virtual ~FormEditData();
 
     virtual void            SaveValues();
-    void                    RestoreValues();
     sal_Bool                    HasParent() const   { return pParent != NULL; }
 
     inline sal_uInt16           GetMode() const     { return nMode; }
diff --git a/formula/inc/formula/formula.hxx b/formula/inc/formula/formula.hxx
index e846ae8..25f2ad8 100644
--- a/formula/inc/formula/formula.hxx
+++ b/formula/inc/formula/formula.hxx
@@ -116,7 +116,6 @@ protected:
     ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = NULL );
     void            RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL );
     void            RefInputDoneAfter( sal_Bool bForced = sal_False );
-    rtl::OString    FindFocusWin(Window *pWin);
     void            SetFocusWin(Window *pWin,const rtl::OString& nUniqueId);
     void            HighlightFunctionParas(const String& aFormula);
 
diff --git a/formula/inc/formula/token.hxx b/formula/inc/formula/token.hxx
index 738caa1..af3d573 100644
--- a/formula/inc/formula/token.hxx
+++ b/formula/inc/formula/token.hxx
@@ -114,7 +114,6 @@ public:
     inline  void                Delete()                { delete this; }
     inline  StackVar            GetType() const         { return eType; }
             bool                IsFunction() const; // pure functions, no operators
-            bool                IsMatrixFunction() const;   // if a function _always_ returns a Matrix
             bool                IsExternalRef() const;
             sal_uInt8           GetParamCount() const;
     inline  void                IncRef() const          { nRefCnt++; }
@@ -392,7 +391,6 @@ public:
     virtual                     ~FormulaSubroutineToken();
     virtual FormulaToken*       Clone() const { return new FormulaSubroutineToken(*this); }
     virtual bool                operator==( const FormulaToken& rToken ) const;
-    const FormulaTokenArray*    GetTokenArray() const;
 
 private:
     const FormulaTokenArray*    mpArray;
diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx
index 3947ed5..8b217a2 100644
--- a/formula/inc/formula/tokenarray.hxx
+++ b/formula/inc/formula/tokenarray.hxx
@@ -111,7 +111,6 @@ public:
     FormulaToken* FirstNoSpaces() { nIndex = 0; return NextNoSpaces(); }
     FormulaToken* NextNoSpaces();
     FormulaToken* GetNextName();
-    FormulaToken* GetNextDBArea();
     FormulaToken* GetNextReference();
     FormulaToken* GetNextReferenceRPN();
     FormulaToken* GetNextReferenceOrName();
@@ -207,7 +206,6 @@ public:
     FormulaToken* AddString( const sal_Unicode* pStr );
     FormulaToken* AddString( const String& rStr );
     FormulaToken* AddDouble( double fVal );
-    FormulaToken* AddName( sal_uInt16 n );
     FormulaToken* AddExternal( const sal_Unicode* pStr );
     /** Xcl import may play dirty tricks with OpCode!=ocExternal.
         Others don't use! */
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 8dab7d7..ca0186e 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -125,12 +125,6 @@ sal_uInt8 FormulaToken::GetParamCount() const
                             // if so then it should be in cByte
 }
 
-
-bool FormulaToken::IsMatrixFunction() const
-{
-    return formula::FormulaCompiler::IsMatrixFunction(GetOpCode());
-}
-
 bool FormulaToken::IsExternalRef() const
 {
     bool bRet = false;
@@ -443,20 +437,6 @@ FormulaToken* FormulaTokenArray::GetNextName()
     return NULL;
 }
 
-FormulaToken* FormulaTokenArray::GetNextDBArea()
-{
-    if( pCode )
-    {
-        while ( nIndex < nLen )
-        {
-            FormulaToken* t = pCode[ nIndex++ ];
-            if( t->GetOpCode() == ocDBArea )
-                return t;
-        } // while ( nIndex < nLen )+
-    }
-    return NULL;
-}
-
 FormulaToken* FormulaTokenArray::GetNextOpCodeRPN( OpCode eOp )
 {
     while( nIndex < nRPN )
@@ -782,11 +762,6 @@ FormulaToken* FormulaTokenArray::AddDouble( double fVal )
     return Add( new FormulaDoubleToken( fVal ) );
 }
 
-FormulaToken* FormulaTokenArray::AddName( sal_uInt16 n )
-{
-    return Add( new FormulaIndexToken( ocName, n ) );
-}
-
 FormulaToken* FormulaTokenArray::AddExternal( const sal_Unicode* pStr )
 {
     return AddExternal( String( pStr ) );
@@ -1409,10 +1384,6 @@ FormulaSubroutineToken::~FormulaSubroutineToken()
 {
     delete mpArray;
 }
-const FormulaTokenArray* FormulaSubroutineToken::GetTokenArray() const
-{
-    return mpArray;
-}
 bool FormulaSubroutineToken::operator==( const FormulaToken& r ) const
 {
     // Arrays don't equal..
diff --git a/formula/source/core/resource/core_resource.cxx b/formula/source/core/resource/core_resource.cxx
index a8c068d..139d52a 100644
--- a/formula/source/core/resource/core_resource.cxx
+++ b/formula/source/core/resource/core_resource.cxx
@@ -68,13 +68,6 @@ namespace formula
         return sReturn;
     }
 
-    //------------------------------------------------------------------
-    ::rtl::OUString ResourceManager::loadString( sal_uInt16 _nResId, const sal_Char* _pPlaceholderAscii, const ::rtl::OUString& _rReplace )
-    {
-        String sString( loadString( _nResId ) );
-        sString.SearchAndReplaceAscii( _pPlaceholderAscii, _rReplace );
-        return sString;
-    }
     //-------------------------------------------------------------------------
     void ResourceManager::registerClient()
     {
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index a64242e..685b42f 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -26,8 +26,6 @@
  *
  ************************************************************************/
 
-
-//----------------------------------------------------------------------------
 #include <sfx2/dispatch.hxx>
 #include <sfx2/docfile.hxx>
 #include <sfx2/viewfrm.hxx>
@@ -113,18 +111,14 @@ namespace formula
         void            FillDialog(sal_Bool nFlag=sal_True);
         void            EditNextFunc( sal_Bool bForward, xub_StrLen nFStart=NOT_FOUND );
         void            EditThisFunc(xub_StrLen nFStart);
-        void            EditFuncParas(xub_StrLen nEditPos);
-
 
         void            UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 nInput );
         void            Update();
         void            Update(const String& _sExp);
 
-
         void            SaveArg( sal_uInt16 nEd );
         void            UpdateSelection();
         void            DoEnter( sal_Bool bOk );
-        void            UpdateFunctionDesc();
         void            ResizeArgArr( const IFunctionDescription* pNewFunc );
         void            FillListboxes();
         void            FillControls(sal_Bool &rbNext, sal_Bool &rbPrev);
@@ -142,7 +136,6 @@ namespace formula
         void            PreNotify( NotifyEvent& rNEvt );
 
         RefEdit*        GetCurrRefEdit();
-        rtl::OString    FindFocusWin(Window *pWin);
 
         const FormulaHelper& GetFormulaHelper() const;
         uno::Reference< sheet::XFormulaOpCodeMapper > GetFormulaOpCodeMapper() const;
@@ -813,9 +806,6 @@ void FormulaDlg_Impl::FillListboxes()
     }
     FuncSelHdl(NULL);
 
-    //  ResizeArgArr is now already in UpdateFunctionDesc
-
-
     m_pHelper->setDispatcherLock( sal_True );// Activate Modal-Mode
 
     aNewTitle = aTitle1;
@@ -1050,48 +1040,6 @@ void FormulaDlg_Impl::ResizeArgArr( const IFunctionDescription* pNewFunc )
 }
 // -----------------------------------------------------------------------------
 
-void FormulaDlg_Impl::UpdateFunctionDesc()
-{
-    FormEditData* pData = m_pHelper->getFormEditData();
-    if (!pData)
-        return;
-    sal_uInt16 nCat = pFuncPage->GetCategory();
-    if ( nCat == LISTBOX_ENTRY_NOTFOUND )
-        nCat = 0;
-    pData->SetCatSel( nCat );
-    sal_uInt16 nFunc = pFuncPage->GetFunction();
-    if ( nFunc == LISTBOX_ENTRY_NOTFOUND )
-        nFunc = 0;
-    pData->SetFuncSel( nFunc );
-
-    if (   (pFuncPage->GetFunctionEntryCount() > 0)
-        && (pFuncPage->GetFunction() != LISTBOX_ENTRY_NOTFOUND) )
-    {
-        const IFunctionDescription* pDesc = pFuncPage->GetFuncDesc(pFuncPage->GetFunction() );
-        if (pDesc)
-        {
-            pDesc->initArgumentInfo();      // full argument info is needed
-
-            String aSig = pDesc->getSignature();
-
-            aFtFuncName.SetText( aSig );
-            aFtFuncDesc.SetText( pDesc->getDescription() );
-            ResizeArgArr( pDesc );
-
-            if ( !m_aArguments.empty() )        // still arguments there?
-                aSig = pDesc->getFormula( m_aArguments );           // for input line
-        }
-    }
-    else
-    {
-        aFtFuncName.SetText( String() );
-        aFtFuncDesc.SetText( String() );
-
-        m_pHelper->setCurrentFormula( String() );
-    }
-}
-// -----------------------------------------------------------------------------
-
 // Handler for Listboxes
 
 IMPL_LINK( FormulaDlg_Impl, DblClkHdl, FuncPage*, EMPTYARG )
@@ -1230,51 +1178,6 @@ void FormulaDlg_Impl::EditNextFunc( sal_Bool bForward, xub_StrLen nFStart )
     }
 }
 
-void FormulaDlg_Impl::EditFuncParas(xub_StrLen nEditPos)
-{
-    if(pFuncDesc!=NULL)
-    {
-        FormEditData* pData = m_pHelper->getFormEditData();
-        if (!pData) return;
-
-        String aFormula = m_pHelper->getCurrentFormula();
-        aFormula +=')';
-        xub_StrLen nFStart = pData->GetFStart();
-
-        DeleteArgs();
-
-        nArgs = pFuncDesc->getSuppressedArgumentCount();
-
-        sal_Int32 nArgPos=m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 );
-        m_aFormulaHelper.GetArgStrings(m_aArguments,aFormula, nFStart, nArgs );
-
-        sal_uInt16 nActiv=pParaWin->GetSliderPos();
-        sal_Bool    bFlag=sal_False;
-        ::std::vector< ::rtl::OUString >::iterator aIter = m_aArguments.begin();
-        ::std::vector< ::rtl::OUString >::iterator aEnd = m_aArguments.end();
-        for(sal_uInt16 i=0;aIter != aEnd;i++,++aIter)
-        {
-            sal_Int32 nLength=(*aIter).getLength();
-            pParaWin->SetArgument(i,(*aIter));
-            if(nArgPos<=nEditPos && nEditPos<nArgPos+nLength)
-            {
-                nActiv=i;
-                bFlag=sal_True;
-            }
-            nArgPos+=nLength+1;
-        }
-
-        if(bFlag)
-        {
-            pParaWin->SetSliderPos(nActiv);
-        }
-
-        pParaWin->UpdateParas();
-        UpdateValues();
-    }
-
-}
-
 void FormulaDlg_Impl::SaveArg( sal_uInt16 nEd )
 {
     if (nEd<nArgs)
@@ -1736,38 +1639,6 @@ sal_Bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
     }
     return pTheRefEdit == NULL;
 }
-rtl::OString FormulaDlg_Impl::FindFocusWin(Window *pWin)
-{
-    rtl::OString aUniqueId;
-    if(pWin->HasFocus())
-    {
-        aUniqueId=pWin->GetUniqueId();
-        if(aUniqueId.isEmpty())
-        {
-            Window* pParent=pWin->GetParent();
-            while(pParent!=NULL)
-            {
-                aUniqueId=pParent->GetUniqueId();
-
-                if(!aUniqueId.isEmpty()) break;
-
-                pParent=pParent->GetParent();
-            }
-        }
-    }
-    else
-    {
-        sal_uInt16 nCount=pWin->GetChildCount();
-
-        for(sal_uInt16 i=0;i<nCount;i++)
-        {
-            Window* pChild=pWin->GetChild(i);
-            aUniqueId=FindFocusWin(pChild);
-            if(!aUniqueId.isEmpty()) break;
-        }
-    }
-    return aUniqueId;
-}
 
 void FormulaDlg_Impl::SetEdSelection()
 {
@@ -1955,11 +1826,6 @@ void FormulaDlg::RefInputDoneAfter( sal_Bool bForced )
     m_pImpl->RefInputDoneAfter( bForced );
 }
 
-rtl::OString FormulaDlg::FindFocusWin(Window *pWin)
-{
-    return m_pImpl->FindFocusWin( pWin );
-}
-
 void FormulaDlg::SetFocusWin(Window *pWin,const rtl::OString& nUniqueId)
 {
     if(pWin->GetUniqueId()==nUniqueId)
@@ -1985,11 +1851,6 @@ long FormulaDlg::PreNotify( NotifyEvent& rNEvt )
     return SfxModelessDialog::PreNotify(rNEvt);
 }
 
-void FormulaDlg::HighlightFunctionParas(const String& aFormula)
-{
-    m_pImpl->m_pHelper->showReference(aFormula);
-}
-
 void FormulaDlg::disableOk()
 {
     m_pImpl->aBtnEnd.Disable();
@@ -2062,18 +1923,6 @@ void FormEditData::Reset()
     aUndoStr.Erase();
 }
 // -----------------------------------------------------------------------------
-void FormEditData::RestoreValues()
-{
-    FormEditData* pTemp = pParent;
-    DBG_ASSERT(pTemp,"RestoreValues ohne Parent");
-    if (pTemp)
-    {
-        *this = *pTemp;
-        pTemp->pParent = NULL;      // otherwise it would be cleared too!
-        delete pTemp;
-    }
-}
-// -----------------------------------------------------------------------------
 const FormEditData& FormEditData::operator=( const FormEditData& r )
 {
     pParent         = r.pParent;
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index 1a8192c..d13a4b6 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -307,7 +307,6 @@ String ArgInput::GetArgName()
     return aPrivArgName;
 }
 
-
 /*************************************************************************
 #*  Member:     SetArgName                                  Date:13.01.97
 #*------------------------------------------------------------------------
@@ -365,26 +364,6 @@ Selection ArgInput::GetArgSelection ()
 }
 
 /*************************************************************************
-#*  Member:     SetArgSelection                             Date:13.01.97
-#*------------------------------------------------------------------------
-#*
-#*  Class:      ArgInput
-#*
-#*  Function:   Replaces the Selection in the EditBox.
-#*
-#*  Input:      String
-#*
-#*  Output:     ---
-#*
-#************************************************************************/
-void ArgInput::ReplaceSelOfArg(const String& rStr )
-{
-    if(pEdArg !=NULL) pEdArg ->ReplaceSelected(rStr );
-}
-
-
-
-/*************************************************************************
 #*  Member:     SetArgVal                                   Date:13.01.97
 #*------------------------------------------------------------------------
 #*
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index ffdba35..21b1bb8 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -203,16 +203,6 @@ IMPL_LINK( StructPage, SelectHdl, SvTreeListBox*, pTlb )
     return 0;
 }
 
-IFormulaToken* StructPage::GetSelectedToken()
-{
-    return pSelectedToken;
-}
-
-String StructPage::GetSelectedEntryText()
-{
-    return aTlbStruct.GetEntryText(aTlbStruct.GetCurEntry());
-}
-
 } // formula
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index 3cceca6..8ae7715 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -108,9 +108,6 @@ public:
     virtual String          GetEntryText(SvLBoxEntry* pEntry) const;
     virtual SvLBoxEntry*    GetParent(SvLBoxEntry* pEntry) const;
 
-    String          GetSelectedEntryText();
-    IFormulaToken*  GetSelectedToken();
-
     void            SetSelectionHdl( const Link& rLink ) { aSelLink = rLink; }
     const Link&     GetSelectionHdl() const { return aSelLink; }
 };
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index e9e0b34..07b86ff 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -117,9 +117,7 @@ public:
 protected:
 
     virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
-    sal_uLong        FindFocusWin(Window *pWin);
     void         SaveLRUEntry(const ScFuncDesc* pFuncDesc);
-    void         HighlightFunctionParas(const String& aFormula);
 
     sal_Bool        IsInputHdl(ScInputHandler* pHdl);
     ScInputHandler* GetNextInputHandler(ScDocShell* pDocShell,PtrTabViewShell* ppViewSh);
diff --git a/unusedcode.easy b/unusedcode.easy
index c472c72..18a54b3 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -985,21 +985,9 @@ basegfx::tools::isInside(basegfx::B3DPolygon const&, basegfx::B3DPolygon const&,
 basegfx::tools::isPolyPolygonEqualRectangle(basegfx::B2DPolyPolygon const&, basegfx::B2DRange const&)
 basegfx::tools::liangBarskyClip2D(basegfx::B2DPoint&, basegfx::B2DPoint&, basegfx::B2DRange const&)
 basegfx::tools::reSegmentPolyPolygonEdges(basegfx::B2DPolyPolygon const&, unsigned int, bool, bool)
-basegfx::tools::rgb2yiq(basegfx::BColor const&)
-basegfx::tools::rgb2ypbpr(basegfx::BColor const&)
 basegfx::tools::rotateAroundPoint(basegfx::B2DPolyPolygon const&, basegfx::B2DPoint const&, double)
 basegfx::tools::setContinuity(basegfx::B2DPolyPolygon const&, basegfx::B2VectorContinuity)
 basegfx::tools::solveCrossovers(basegfx::B2DPolygon const&)
-basegfx::tools::yiq2rgb(basegfx::BColor const&)
-basegfx::tools::ypbpr2rgb(basegfx::BColor const&)
-basegfx::unotools::AffineMatrix2DAreEqual(com::sun::star::geometry::AffineMatrix2D const&, com::sun::star::geometry::AffineMatrix2D const&)
-basegfx::unotools::IntegerPoint2DAreEqual(com::sun::star::geometry::IntegerPoint2D const&, com::sun::star::geometry::IntegerPoint2D const&)
-basegfx::unotools::IntegerRectangle2DAreEqual(com::sun::star::geometry::IntegerRectangle2D const&, com::sun::star::geometry::IntegerRectangle2D const&)
-basegfx::unotools::IntegerSize2DAreEqual(com::sun::star::geometry::IntegerSize2D const&, com::sun::star::geometry::IntegerSize2D const&)
-basegfx::unotools::RealPoint2DAreEqual(com::sun::star::geometry::RealPoint2D const&, com::sun::star::geometry::RealPoint2D const&)
-basegfx::unotools::RealRectangle2DAreEqual(com::sun::star::geometry::RealRectangle2D const&, com::sun::star::geometry::RealRectangle2D const&)
-basegfx::unotools::RealRectangle3DAreEqual(com::sun::star::geometry::RealRectangle3D const&, com::sun::star::geometry::RealRectangle3D const&)
-basegfx::unotools::RealSize2DAreEqual(com::sun::star::geometry::RealSize2D const&, com::sun::star::geometry::RealSize2D const&)
 basegfx::unotools::UnoPolyPolygon::getPolyPolygonUnsafe() const
 basegfx::unotools::awtPointAreEqual(com::sun::star::awt::Point const&, com::sun::star::awt::Point const&)
 basegfx::unotools::awtPointFromB2IPoint(basegfx::B2IPoint const&)
@@ -1007,13 +995,8 @@ basegfx::unotools::awtRectangleAreEqual(com::sun::star::awt::Rectangle const&, c
 basegfx::unotools::awtRectangleFromB2IRectangle(basegfx::B2IRange const&)
 basegfx::unotools::awtSizeAreEqual(com::sun::star::awt::Size const&, com::sun::star::awt::Size const&)
 basegfx::unotools::awtSizeFromB2ISize(basegfx::B2IVector const&)
-basegfx::unotools::b2DSizeFromRealSize2D(com::sun::star::geometry::RealSize2D const&)
 basegfx::unotools::b2IPointFromAwtPoint(com::sun::star::awt::Point const&)
-basegfx::unotools::b2IPointFromIntegerPoint2D(com::sun::star::geometry::IntegerPoint2D const&)
 basegfx::unotools::b2ISizeFromAwtSize(com::sun::star::awt::Size const&)
-basegfx::unotools::homMatrixFromAffineMatrix(com::sun::star::geometry::AffineMatrix2D const&)
-basegfx::unotools::integerPoint2DFromB2IPoint(basegfx::B2IPoint const&)
-basegfx::unotools::integerRectangle2DFromB2IRectangle(basegfx::B2IRange const&)
 basic::ScriptExtensionIterator::implGetScriptPackageFromPackage(com::sun::star::uno::Reference<com::sun::star::deployment::XPackage>, bool&)
 basic::vba::getCurrentDirectory(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&)
 binfilter::B3dEdgeEntryBucketMemArr::Insert(binfilter::B3dEdgeEntryBucketMemArr const*, unsigned short, unsigned short, unsigned short)
@@ -1499,22 +1482,9 @@ drawinglayer::primitive2d::RenderGraphicPrimitive2D::setCurrentRasterizer(vcl::R
 drawinglayer::primitive3d::PolygonStrokePrimitive3D::PolygonStrokePrimitive3D(basegfx::B3DPolygon const&, drawinglayer::attribute::LineAttribute const&)
 drawinglayer::processor3d::CollectingProcessor3D::CollectingProcessor3D(drawinglayer::geometry::ViewInformation3D const&)
 formula::ArgInput::GetArgSelection()
-formula::ArgInput::ReplaceSelOfArg(String const&)
 formula::EditBox::EditBox(Window*, long)
-formula::FormEditData::RestoreValues()
-formula::FormulaDlg::FindFocusWin(Window*)
-formula::FormulaDlg::HighlightFunctionParas(String const&)
-formula::FormulaDlg_Impl::EditFuncParas(unsigned short)
-formula::FormulaDlg_Impl::UpdateFunctionDesc()
 formula::FormulaListBox::FormulaListBox(Window*, long)
-formula::FormulaSubroutineToken::GetTokenArray() const
-formula::FormulaToken::IsMatrixFunction() const
-formula::FormulaTokenArray::AddName(unsigned short)
-formula::FormulaTokenArray::GetNextDBArea()
 formula::FormulaTokenIterator::First()
-formula::ResourceManager::loadString(unsigned short, char const*, rtl::OUString const&)
-formula::StructPage::GetSelectedEntryText()
-formula::StructPage::GetSelectedToken()
 framework::TabWindow::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
 framework::UIConfigElementWrapperBase::dispose()
 framework::UIElementWrapperBase::dispose()
@@ -1826,6 +1796,5 @@ vcl::PDFExtOutDevData::SetOutlineItemDest(int, int)
 vcl::PDFExtOutDevData::SetOutlineItemParent(int, int)
 vcl::PDFExtOutDevData::SetOutlineItemText(int, rtl::OUString const&)
 vcl::PDFWriter::DrawPixel(Polygon const&, Color const*)
-vcl::PDFWriterImpl::drawPolyPolygon(PolyPolygon const&, int, bool)
 vcl::unx::GtkPrintWrapper::print_operation_set_has_selection(_GtkPrintOperation*, int) const
 vcl::unx::GtkPrintWrapper::print_operation_set_support_selection(_GtkPrintOperation*, int) const
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 6b52a12..703b6f4 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10256,83 +10256,6 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
     }
 }
 
-void PDFWriterImpl::drawPolyPolygon( const PolyPolygon& rPolyPoly, sal_Int32 nPattern, bool bEOFill )
-{
-    if( nPattern < 0 || nPattern >= (sal_Int32)m_aTilings.size() )
-        return;
-
-    m_aPages.back().endStream();
-    sal_Int32 nXObject = createObject();
-    OStringBuffer aNameBuf( 16 );
-    aNameBuf.append( "Pol" );
-    aNameBuf.append( nXObject );
-    OString aObjName( aNameBuf.makeStringAndClear() );
-    Rectangle aObjRect;
-    if( updateObject( nXObject ) )
-    {
-        // get bounding rect of object
-        PolyPolygon aSubDiv;
-        rPolyPoly.AdaptiveSubdivide( aSubDiv );
-        aObjRect = aSubDiv.GetBoundRect();
-        Rectangle aConvObjRect( aObjRect );
-        m_aPages.back().convertRect( aConvObjRect );
-
-        // move polypolygon to bottom left of page
-        PolyPolygon aLocalPath( rPolyPoly );
-        sal_Int32 nPgWd = getReferenceDevice()->ImplGetDPIX() * m_aPages.back().getWidth() / 72;
-        sal_Int32 nPgHt = getReferenceDevice()->ImplGetDPIY() * m_aPages.back().getHeight() / 72;
-        Size aLogicPgSz = getReferenceDevice()->PixelToLogic( Size( nPgWd, nPgHt ), m_aGraphicsStack.front().m_aMapMode );
-        sal_Int32 nXOff = aObjRect.Left();
-        sal_Int32 nYOff = aLogicPgSz.Height() - aObjRect.Bottom();
-        aLocalPath.Move( -nXOff, nYOff );
-
-        // prepare XObject's content stream
-        OStringBuffer aStream( 512 );
-        aStream.append( "/Pattern cs /P" );
-        aStream.append( m_aTilings[ nPattern ].m_nObject );
-        aStream.append( " scn\n" );
-        m_aPages.back().appendPolyPolygon( aLocalPath, aStream );
-        aStream.append( bEOFill ? "f*" : "f" );
-        SvMemoryStream aMemStream( aStream.getLength() );
-        aMemStream.Write( aStream.getStr(), aStream.getLength() );
-        bool bDeflate = compressStream( &aMemStream );
-        aMemStream.Seek( STREAM_SEEK_TO_END );
-        sal_Int32 nStreamLen = (sal_Int32)aMemStream.Tell();
-        aMemStream.Seek( STREAM_SEEK_TO_BEGIN );
-
-        // add new XObject to global resource dict
-        m_aGlobalResourceDict.m_aXObjects[ aObjName ] = nXObject;
-
-        // write XObject
-        OStringBuffer aLine( 512 );
-        aLine.append( nXObject );
-        aLine.append( " 0 obj\n"
-                      "<</Type/XObject/Subtype/Form/BBox[0 0 " );
-        appendFixedInt( aConvObjRect.GetWidth(), aLine );
-        aLine.append( ' ' );
-        appendFixedInt( aConvObjRect.GetHeight(), aLine );
-        aLine.append( "]/Length " );
-        aLine.append( nStreamLen );
-        if( bDeflate )
-            aLine.append( "/Filter/FlateDecode" );
-        aLine.append( ">>\n"
-                      "stream\n" );
-        writeBuffer( aLine.getStr(), aLine.getLength() );
-        checkAndEnableStreamEncryption( nXObject );
-        writeBuffer( aMemStream.GetData(), nStreamLen );
-        disableStreamEncryption();
-        writeBuffer( "\nendstream\nendobj\n\n", 19 );
-    }
-    m_aPages.back().beginStream();
-    OStringBuffer aLine( 80 );
-    aLine.append( "q 1 0 0 1 " );
-    m_aPages.back().appendPoint( aObjRect.BottomLeft(), aLine );
-    aLine.append( " cm/" );
-    aLine.append( aObjName );
-    aLine.append( " Do Q\n" );
-    writeBuffer( aLine.getStr(), aLine.getLength() );
-}
-
 void PDFWriterImpl::updateGraphicsState()
 {
     OStringBuffer aLine( 256 );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index fd1c2d7..b5f1167 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -1248,7 +1248,6 @@ public:
     void drawTransparent( const PolyPolygon& rPolyPoly, sal_uInt32 nTransparentPercent );
     void beginTransparencyGroup();
     void endTransparencyGroup( const Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent );
-    void drawPolyPolygon( const PolyPolygon& rPolyPoly, sal_Int32 nPattern, bool bEOFill );
 
     void emitComment( const char* pComment );
 
commit 3e7151db8d6ffe1688f2b3c68dbc0741fe953cdc
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jan 19 17:41:57 2012 +0100

    remove unused macros

diff --git a/formula/source/core/inc/core_resource.hxx b/formula/source/core/inc/core_resource.hxx
index 9ede1af..d581321 100644
--- a/formula/source/core/inc/core_resource.hxx
+++ b/formula/source/core/inc/core_resource.hxx
@@ -36,13 +36,6 @@ class ResMgr;
 //.........................................................................
 namespace formula
 {
-
-#define FORMULA_RES( id )                       ResourceManager::loadString( id )
-#define FORMULA_RES_PARAM( id, ascii, replace ) ResourceManager::loadString( id, ascii, replace )
-
-#define FORMULACORE_RESSTRING( id ) FORMULA_RES( id )
-        // (compatibility)
-
     //==================================================================
     //= ResourceManager
     //= handling ressources within the FORMULA-Core library


More information about the Libreoffice-commits mailing list