[Libreoffice-commits] .: binfilter/bf_starmath binfilter/inc

Joseph Powers jpowers at kemper.freedesktop.org
Tue Sep 13 09:36:35 PDT 2011


 binfilter/bf_starmath/source/mathtype.hxx          |  166 ---------------------
 binfilter/bf_starmath/source/starmath_cfgitem.cxx  |   34 ++--
 binfilter/bf_starmath/source/starmath_document.cxx |    5 
 binfilter/bf_starmath/source/starmath_mathml.cxx   |    2 
 binfilter/bf_starmath/source/starmath_node.cxx     |   76 ---------
 binfilter/bf_starmath/source/starmath_unomodel.cxx |   13 -
 binfilter/bf_starmath/source/starmath_utility.cxx  |   64 --------
 binfilter/inc/bf_starmath/document.hxx             |    2 
 binfilter/inc/bf_starmath/node.hxx                 |   54 +++---
 binfilter/inc/bf_starmath/utility.hxx              |  145 ++----------------
 10 files changed, 72 insertions(+), 489 deletions(-)

New commits:
commit 1ae724877fe4b08ee680565d90d4dcb91affcd3d
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue Sep 13 09:35:19 2011 -0700

    Cleanup of DBG_BF_ASSERT() in bf_starmath

diff --git a/binfilter/bf_starmath/source/mathtype.hxx b/binfilter/bf_starmath/source/mathtype.hxx
deleted file mode 100644
index e1f87d8..0000000
--- a/binfilter/bf_starmath/source/mathtype.hxx
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 MATHTYPE_HXX
-#define MATHTYPE_HXX
-
-#include "node.hxx"
-
-#include <bf_so3/svstor.hxx>
-
-#include <set>
-namespace binfilter {
-
-#define EQNOLEFILEHDR_SIZE 28
-class EQNOLEFILEHDR
-{
-public:
-    EQNOLEFILEHDR() {}
-    EQNOLEFILEHDR(sal_uInt32 nLenMTEF) : nCBHdr(0x1c),nVersion(0x20000),
-        nCf(0xc1c6),nCBObject(nLenMTEF),nReserved1(0),nReserved2(0x0014F690),
-        nReserved3(0x0014EBB4), nReserved4(0) {}
-    sal_uInt16   nCBHdr;     // length of header, sizeof(EQNOLEFILEHDR) = 28
-    sal_uInt32   nVersion;   // hiword = 2, loword = 0
-    sal_uInt16   nCf;        // clipboard format ("MathType EF")
-    sal_uInt32   nCBObject;  // length of MTEF data following this header
-    sal_uInt32   nReserved1; // not used
-    sal_uInt32   nReserved2; // not used
-    sal_uInt32   nReserved3; // not used
-    sal_uInt32   nReserved4; // not used
-
-};
-
-class MathTypeFont
-{
-public:
-    sal_uInt8 nTface;
-    sal_uInt8 nStyle;
-    MathTypeFont() : nTface(0),nStyle(0) {}
-    MathTypeFont(sal_uInt8 nFace) : nTface(nFace),nStyle(0) {}
-};
-
-struct LessMathTypeFont
-{
-    sal_Bool operator() (const MathTypeFont &rValue1,
-        const MathTypeFont &rValue2) const
-    {
-        return rValue1.nTface < rValue2.nTface;
-    }
-};
-
-typedef ::std::set< MathTypeFont, LessMathTypeFont > MathTypeFontSet;
-
-class MathType
-{
-public:
-    MathType(String &rIn)
-        : rRet(rIn)
-        , nHAlign(0)
-        , nVAlign(0)
-        , nDefaultSize(12)
-        , nLSize(0)
-        , nDSize(0)
-        , nCurSize(0)
-        , nLastSize(0)
-        , bSilent(sal_False)
-    {
-        DBG_BF_ASSERT(0, "STRIP");
-    }
-    MathType(String &rIn,SmNode *pIn)
-        : rRet(rIn)
-        , pTree(pIn)
-        , nHAlign(2)
-        , nVAlign(0)
-        , nInsertion(0)
-        , nDefaultSize(12)
-        , nLSize(0)
-        , nDSize(0)
-        , nCurSize(0)
-        , nLastSize(0)
-        , nSpec(0)
-        , bSilent(sal_False)
-    {
-        DBG_BF_ASSERT(0, "STRIP");
-    }
-private:
-/*Ver 2 Header*/
-    sal_uInt8 nVersion;
-    sal_uInt8 nPlatform;
-    sal_uInt8 nProduct;
-    sal_uInt8 nProdVersion;
-    sal_uInt8 nProdSubVersion;
-
-    SvStorageStream *pS;
-
-
-    int xfLMOVE(sal_uInt8 nTest) const {return nTest&0x80;}
-    int xfAUTO(sal_uInt8 nTest) const {return nTest&0x10;}
-    int xfEMBELL(sal_uInt8 nTest) const {return nTest&0x20;}
-    int xfNULL(sal_uInt8 nTest) const {return nTest&0x10;}
-    int xfLSPACE(sal_uInt8 nTest) const {return nTest&0x40;}
-    int xfRULER(sal_uInt8 nTest) const {return nTest&0x20;}
-
-
-    String &rRet;
-    SmNode *pTree;
-
-    sal_uInt8 nHAlign;
-    sal_uInt8 nVAlign;
-
-    int nPendingAttributes;
-    ULONG nInsertion;
-
-    sal_Int16 aSizeTable[7];
-    sal_Int16 nDefaultSize;
-    sal_Int16 nLSize;
-    sal_Int16 nDSize;
-    sal_Int16 nCurSize;
-    sal_Int16 nLastSize;
-    sal_uInt8 nSpec;
-    sal_Bool bSilent,bReInterpBrace;
-    String sPost;
-    xub_StrLen nPostSup;
-    xub_StrLen nPostlSup;
-    sal_uInt8 nTypeFace;
-    MathTypeFontSet aUserStyles;
-
-    enum MTOKENS {END,LINE,CHAR,TMPL,PILE,MATRIX,EMBEL,RULER,FONT,SIZE};
-    enum MTEMPLATES
-    {
-        tmANGLE,tmPAREN,tmBRACE,tmBRACK,tmBAR,tmDBAR,tmFLOOR,tmCEILING,
-        tmLBLB,tmRBRB,tmRBLB,tmLBRP,tmLPRB,tmROOT,tmFRACT,tmSCRIPT,tmUBAR,
-        tmOBAR,tmLARROW,tmRARROW,tmBARROW,tmSINT,tmDINT,tmTINT,tmSSINT,
-        tmDSINT,tmTSINT,tmUHBRACE,tmLHBRACE,tmSUM
-    };
-public:
-};
-
-
-} //namespace binfilter
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_starmath/source/starmath_cfgitem.cxx b/binfilter/bf_starmath/source/starmath_cfgitem.cxx
index 9a4743f..879e4b0 100644
--- a/binfilter/bf_starmath/source/starmath_cfgitem.cxx
+++ b/binfilter/bf_starmath/source/starmath_cfgitem.cxx
@@ -488,28 +488,26 @@ static const char* aRootName = "Office.Math";
 
 /*N*/ void SmMathConfig::LoadFontFormatList()
 /*N*/ {
-/*N*/     if (!pFontFormatList)
-/*N*/         pFontFormatList = new SmFontFormatList;
-/*N*/     else
-/*?*/     {DBG_BF_ASSERT(0, "STRIP");}
+/*N*/   if (!pFontFormatList)
+/*N*/       pFontFormatList = new SmFontFormatList;
 /*N*/
-/*N*/     SmMathConfigItem aCfg( String::CreateFromAscii( aRootName ) );
+/*N*/   SmMathConfigItem aCfg( String::CreateFromAscii( aRootName ) );
 /*N*/
-/*N*/     Sequence< OUString > aNodes( aCfg.GetNodeNames( A2OU( FONT_FORMAT_LIST ) ) );
+/*N*/   Sequence< OUString > aNodes( aCfg.GetNodeNames( A2OU( FONT_FORMAT_LIST ) ) );
 /*N*/   const OUString *pNode = aNodes.getConstArray();
 /*N*/   INT32 nNodes = aNodes.getLength();
 /*N*/
 /*N*/   for (INT32 i = 0;  i < nNodes;  ++i)
 /*N*/   {
-/*N*/         SmFontFormat aFntFmt( ReadFontFormat( aCfg, pNode[i], A2OU( FONT_FORMAT_LIST ) ) );
-/*N*/         if (!pFontFormatList->GetFontFormat( pNode[i] ))
-/*N*/         {
-/*N*/             DBG_ASSERT( 0 == pFontFormatList->GetFontFormat( pNode[i] ),
+/*N*/       SmFontFormat aFntFmt( ReadFontFormat( aCfg, pNode[i], A2OU( FONT_FORMAT_LIST ) ) );
+/*N*/       if (!pFontFormatList->GetFontFormat( pNode[i] ))
+/*N*/       {
+/*N*/           DBG_ASSERT( 0 == pFontFormatList->GetFontFormat( pNode[i] ),
 /*N*/                     "FontFormat ID already exists" );
-/*N*/             pFontFormatList->AddFontFormat( pNode[i], aFntFmt );
-/*N*/         }
+/*N*/           pFontFormatList->AddFontFormat( pNode[i], aFntFmt );
+/*N*/       }
 /*N*/   }
-/*N*/     pFontFormatList->SetModified( FALSE );
+/*N*/   pFontFormatList->SetModified( FALSE );
 /*N*/ }
 
 
@@ -812,11 +810,11 @@ static const char* aRootName = "Office.Math";
 /*N*/     return pOther->bAutoRedraw;
 /*N*/ }
 
-/*N*/ IMPL_LINK( SmMathConfig, TimeOut, Timer *, EMPTYARG )
-/*N*/ {
-/*N*/   DBG_BF_ASSERT(0, "STRIP");
-/*N*/   return 0;
-/*N*/ }
+IMPL_LINK( SmMathConfig, TimeOut, Timer *, EMPTYARG )
+{
+    DBG_BF_ASSERT(0, "STRIP");  // IMPL_LINK
+    return 0;
+}
 
 /////////////////////////////////////////////////////////////////
 
diff --git a/binfilter/bf_starmath/source/starmath_document.cxx b/binfilter/bf_starmath/source/starmath_document.cxx
index 7607803..680bd55 100644
--- a/binfilter/bf_starmath/source/starmath_document.cxx
+++ b/binfilter/bf_starmath/source/starmath_document.cxx
@@ -319,10 +319,6 @@ static const char pStarMathDoc[] = "StarMathDocument";
 /*N*/ }
 
 
-/*N*/ void SmDocShell::SetPrinter( SfxPrinter * /*pNew*/ )
-/*N*/ {DBG_BF_ASSERT(0, "STRIP");
-/*N*/ }
-
 /*N*/ void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
 /*N*/ {
 /*N*/   pTmpPrinter = pPrt;
@@ -445,7 +441,6 @@ static const char pStarMathDoc[] = "StarMathDocument";
 /*N*/       String aTmpStr( C2S( "Equation Native" ));
 /*N*/       if( pStor->IsStream( aTmpStr ))
 /*N*/       {
-/*N*/           // is this a MathType Storage?
 /*?*/           DBG_BF_ASSERT(0, "STRIP");
 /*N*/       }
 /*N*/       else if( pStor->IsStream(C2S("content.xml")) ||
diff --git a/binfilter/bf_starmath/source/starmath_mathml.cxx b/binfilter/bf_starmath/source/starmath_mathml.cxx
index a2b5b4b..16295ea 100644
--- a/binfilter/bf_starmath/source/starmath_mathml.cxx
+++ b/binfilter/bf_starmath/source/starmath_mathml.cxx
@@ -90,8 +90,6 @@ using namespace ::binfilter::xmloff::token;
 using ::rtl::OUString;
 using ::rtl::OUStringBuffer;
 
-#include "mathtype.hxx"
-
 #include <starmath.hrc>
 #include <parse.hxx>
 #include <legacysmgr/legacy_binfilters_smgr.hxx>
diff --git a/binfilter/bf_starmath/source/starmath_node.cxx b/binfilter/bf_starmath/source/starmath_node.cxx
index 901d385..2396a97 100644
--- a/binfilter/bf_starmath/source/starmath_node.cxx
+++ b/binfilter/bf_starmath/source/starmath_node.cxx
@@ -36,7 +36,7 @@
 
 #include "symbol.hxx"
 #include <document.hxx>
-#include "mathtype.hxx"
+#include "node.hxx"
 
 #include <math.h>
 #include <float.h>
@@ -137,29 +137,6 @@ namespace binfilter {
 /*N*/ }
 
 
-/*N*/ SmNode::~SmNode()
-/*N*/ {
-/*N*/ }
-
-
-/*N*/ BOOL SmNode::IsVisible() const
-/*N*/ {
-/*N*/     return FALSE;
-/*N*/ }
-
-
-/*N*/ USHORT SmNode::GetNumSubNodes() const
-/*N*/ {
-/*N*/   return 0;
-/*N*/ }
-
-
-/*N*/ SmNode * SmNode::GetSubNode(USHORT /*nIndex*/)
-/*N*/ {
-/*N*/   return NULL;
-/*N*/ }
-
-
 /*N*/ SmNode * SmNode::GetLeftMost()
 /*N*/   //  returns leftmost node of current subtree.
 /*N*/   //! (this assumes the one with index 0 is always the leftmost subnode
@@ -383,20 +360,6 @@ void SmNode::SetColor(const Color& rColor)
 /*N*/           pNode->Arrange(rDev, rFormat);
 /*N*/ }
 
-/*N*/ void SmNode::CreateTextFromNode(String & /*rText*/)
-/*N*/ {DBG_BF_ASSERT(0, "STRIP");
-/*N*/ }
-
-
-/*N*/ void SmNode::AdaptToX(const OutputDevice & /*rDev*/, ULONG /*nWidth*/)
-/*N*/ {
-/*N*/ }
-
-
-/*N*/ void SmNode::AdaptToY(const OutputDevice & /*rDev*/, ULONG /*nHeight*/)
-/*N*/ {
-/*N*/ }
-
 
 /*N*/ void SmNode::Draw(OutputDevice &rDev, const Point &rPosition) const
 /*N*/ {
@@ -519,12 +482,6 @@ SmStructureNode & SmStructureNode::operator = ( const SmStructureNode &rNode )
 /*N*/ }
 
 
-/*N*/ BOOL SmStructureNode::IsVisible() const
-/*N*/ {
-/*N*/   return FALSE;
-/*N*/ }
-
-
 /*N*/ USHORT SmStructureNode::GetNumSubNodes() const
 /*N*/ {
 /*N*/   return (USHORT) aSubNodes.GetSize();
@@ -540,35 +497,6 @@ SmStructureNode & SmStructureNode::operator = ( const SmStructureNode &rNode )
 
 ///////////////////////////////////////////////////////////////////////////
 
-
-/*N*/ BOOL SmVisibleNode::IsVisible() const
-/*N*/ {
-/*N*/   return TRUE;
-/*N*/ }
-
-
-/*N*/ USHORT SmVisibleNode::GetNumSubNodes() const
-/*N*/ {
-/*N*/   return 0;
-/*N*/ }
-
-
-SmNode * SmVisibleNode::GetSubNode(USHORT /*nIndex*/)
-{
-    return NULL;
-}
-
-
-///////////////////////////////////////////////////////////////////////////
-
-
-///////////////////////////////////////////////////////////////////////////
-
-
-
-
-///////////////////////////////////////////////////////////////////////////
-
 /*N*/ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
 /*N*/   // arranges all subnodes in one column
 /*N*/ {
@@ -799,7 +727,7 @@ SmNode * SmTableNode::GetLeftMost()
 /*N*/              * GetFont().GetSize().Height() / 100L;
 /*N*/
 /*N*/     // font specialist advised to change the width first
-/*N*/     pRootSym->AdaptToY(rDev, nHeight);
+/*N*/   pRootSym->AdaptToY(rDev, nHeight);
 /*N*/   pRootSym->AdaptToX(rDev, pBody->GetItalicWidth());
 /*N*/
 /*N*/   pRootSym->Arrange(rDev, rFormat);
diff --git a/binfilter/bf_starmath/source/starmath_unomodel.cxx b/binfilter/bf_starmath/source/starmath_unomodel.cxx
index 12c3a6e..e601751 100644
--- a/binfilter/bf_starmath/source/starmath_unomodel.cxx
+++ b/binfilter/bf_starmath/source/starmath_unomodel.cxx
@@ -525,15 +525,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
                 if (pPrinter)
                 {
                     OUString sPrinterName;
-                    if (*pValues >>= sPrinterName )
-                    {
-                        SfxPrinter *pNewPrinter = new SfxPrinter ( pPrinter->GetOptions().Clone(), sPrinterName );
-                        if (pNewPrinter->IsKnown())
-                            pDocSh->SetPrinter ( pNewPrinter );
-                        else
-                            delete pNewPrinter;
-                    }
-                    else
+                    if ( !(*pValues >>= sPrinterName) )
                         throw IllegalArgumentException();
                 }
             }
@@ -559,9 +551,6 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
                     SfxItemSet *pItemSet = new SfxItemSet( pDocSh->GetPool(), nRange );
                     SmModule *pp = SM_MOD1();
                     pp->GetConfig()->ConfigToItemSet(*pItemSet);
-                    SfxPrinter *pPrinter = SfxPrinter::Create ( aStream, pItemSet );
-
-                    pDocSh->SetPrinter( pPrinter );
                 }
                 else
                     throw IllegalArgumentException();
diff --git a/binfilter/bf_starmath/source/starmath_utility.cxx b/binfilter/bf_starmath/source/starmath_utility.cxx
index e47f3d9..735b22a 100644
--- a/binfilter/bf_starmath/source/starmath_utility.cxx
+++ b/binfilter/bf_starmath/source/starmath_utility.cxx
@@ -83,11 +83,6 @@ namespace binfilter {
 // SmRectCache
 //
 
-
-/*N*/ SmRectCache::Key::Key(const XubString & /*rText*/, const Font & /*rFont*/)
-/*N*/ {
-/*N*/ }
-
 /*N*/ SmRectCache::SmRectCache()
 /*N*/ {
 /*N*/   pVirDev = 0;
@@ -100,23 +95,11 @@ namespace binfilter {
 /*N*/ }
 
 
-/*N*/ const SmRect * SmRectCache::Search(const Key & /*rKey*/) const
-/*N*/ {
-/*N*/   return 0;
-/*N*/ }
-
-
-/*N*/ const SmRect * SmRectCache::Add(const Key & /*rKey*/, const SmRect & /*rRect*/)
-/*N*/ {
-/*N*/   return (const SmRect *)-1;
-/*N*/ }
-
-
 /*N*/ VirtualDevice * SmRectCache::GetVirDev()
 /*N*/ {
 /*N*/   if (!pVirDev)
 /*N*/   {
-             pVirDev = new VirtualDevice;
+            pVirDev = new VirtualDevice;
 /*N*/       pVirDev->SetMapMode( MapMode(MAP_100TH_MM) );
 /*N*/   }
 /*N*/   DBG_ASSERT(pVirDev->GetMapMode().GetMapUnit() == MAP_100TH_MM,
@@ -126,11 +109,6 @@ namespace binfilter {
 /*N*/ }
 
 
-/*N*/ void SmRectCache::Reset()
-/*N*/ {
-/*N*/ }
-
-
 ////////////////////////////////////////////////////////////
 
 #define TE_UCS2     "UCS2"
@@ -276,40 +254,12 @@ int GetTextEncodingTabIndex( const String &rTxt, xub_StrLen nPos )
 /**************************************************************************/
 /**************************************************************************/
 
-/*?*/ void * SmFontPickList::CreateItem(const String& /*rString*/)
-/*?*/ {
-/*?*/ DBG_BF_ASSERT(0, "STRIP"); return NULL;
-/*?*/ }
-
-/*?*/ void * SmFontPickList::CreateItem(const void * /*pItem*/)
-/*?*/ {
-/*?*/ DBG_BF_ASSERT(0, "STRIP"); return NULL;
-/*?*/ }
-
-/*?*/ void SmFontPickList::DestroyItem(void * /*pItem*/)
-/*?*/ {
-/*?*/ DBG_BF_ASSERT(0, "STRIP");
-/*?*/ }
-
-/*?*/ BOOL SmFontPickList::CompareItem(const void * /*pFirstItem*/, const void * /*pSecondItem*/) const
-/*?*/ {
-/*?*/ DBG_BF_ASSERT(0, "STRIP"); return FALSE;
-/*?*/ }
-
-/*?*/ String SmFontPickList::GetStringItem(void * /*pItem*/)
-/*?*/ {
-/*?*/   DBG_BF_ASSERT(0, "STRIP"); String   aString; return aString;
-/*?*/ }
-
-/*?*/ void SmFontPickList::LoadItem(SvStream& /*rStream*/, void * /*pItem*/)
-/*?*/ {
-/*?*/   DBG_BF_ASSERT(0, "STRIP");
-/*?*/ }
-
-/*?*/ void SmFontPickList::SaveItem(SvStream& /*rStream*/, const void * /*pItem*/) const
-/*?*/ {
-/*?*/   DBG_BF_ASSERT(0, "STRIP");
-/*?*/ }
+String SmFontPickList::GetStringItem(void * /*pItem*/)
+{
+    DBG_BF_ASSERT(0, "STRIP");  // VIRTUAL
+    String aString;
+    return aString;
+}
 
 ////////////////////////////////////////
 
diff --git a/binfilter/inc/bf_starmath/document.hxx b/binfilter/inc/bf_starmath/document.hxx
index 8c26f43..951e5db 100644
--- a/binfilter/inc/bf_starmath/document.hxx
+++ b/binfilter/inc/bf_starmath/document.hxx
@@ -174,8 +174,6 @@ public:
     //den SmPrinterAccess funktionieren.
     BOOL        HasPrinter()    { return 0 != pPrinter; }
     SfxPrinter *GetPrinter()    { GetPrt(); return pPrinter; }
-    void        SetPrinter( SfxPrinter * );
-
 
     void        SetText(const String& rBuffer);
     String&     GetText() { return (aText); }
diff --git a/binfilter/inc/bf_starmath/node.hxx b/binfilter/inc/bf_starmath/node.hxx
index e3a1707..0918f1b 100644
--- a/binfilter/inc/bf_starmath/node.hxx
+++ b/binfilter/inc/bf_starmath/node.hxx
@@ -105,40 +105,42 @@ protected:
     sal_Int32       nAccIndex;
 
 public:
-    virtual             ~SmNode();
+    virtual             ~SmNode() {};
 
-    virtual BOOL        IsVisible() const;
+    virtual BOOL        IsVisible() const { return FALSE; }
 
-    virtual USHORT      GetNumSubNodes() const;
-    virtual SmNode *    GetSubNode(USHORT nIndex);
-            const SmNode * GetSubNode(USHORT nIndex) const
+    virtual USHORT      GetNumSubNodes() const { return 0; }
+    virtual SmNode *    GetSubNode(USHORT nIndex) { return NULL; }
+
+    const SmNode * GetSubNode(USHORT nIndex) const
             {
                 return ((SmNode *) this)->GetSubNode(nIndex);
             }
 
     virtual SmNode *       GetLeftMost();
-            const SmNode * GetLeftMost() const
+
+    const SmNode * GetLeftMost() const
             {
                 return ((SmNode *) this)->GetLeftMost();
             }
 
-            USHORT &    Flags() { return nFlags; }
-            USHORT &    Attributes() { return nAttributes; }
+    USHORT &    Flags() { return nFlags; }
+    USHORT &    Attributes() { return nAttributes; }
 
-            BOOL IsDebug() const { return bIsDebug; }
-            BOOL IsPhantom() const { return bIsPhantom; }
-            void SetPhantom(BOOL bIsPhantom);
-            void SetColor(const Color &rColor);
+    BOOL IsDebug() const { return bIsDebug; }
+    BOOL IsPhantom() const { return bIsPhantom; }
+    void SetPhantom(BOOL bIsPhantom);
+    void SetColor(const Color &rColor);
 
-            void SetAttribut(USHORT nAttrib);
-            void ClearAttribut(USHORT nAttrib);
+    void SetAttribut(USHORT nAttrib);
+    void ClearAttribut(USHORT nAttrib);
 
-            const SmFace & GetFont() const { return aFace; };
-                  SmFace & GetFont()       { return aFace; };
+    const SmFace & GetFont() const { return aFace; };
+    SmFace & GetFont()       { return aFace; };
 
-            void SetFont(const SmFace &rFace);
-            void SetFontSize(const Fraction &rRelSize, USHORT nType);
-            void SetSize(const Fraction &rScale);
+    void SetFont(const SmFace &rFace);
+    void SetFontSize(const Fraction &rRelSize, USHORT nType);
+    void SetSize(const Fraction &rScale);
 
     virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
     virtual void PrepareAttributes();
@@ -153,7 +155,7 @@ public:
     virtual void Move(const Point &rPosition);
     void MoveTo(const Point &rPosition) { Move(rPosition - GetTopLeft()); }
     virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
-    virtual void CreateTextFromNode(String &rText);
+    virtual void CreateTextFromNode(String /* &rText */) {};
 
     virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
 
@@ -164,8 +166,8 @@ public:
     SmScaleMode     GetScaleMode() const { return eScaleMode; }
     void            SetScaleMode(SmScaleMode eMode) { eScaleMode = eMode; }
 
-    virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
-    virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+    virtual void AdaptToX(const OutputDevice& /* rDev */, ULONG /* nWidth */) {}
+    virtual void AdaptToY(const OutputDevice& /* rDev */, ULONG /* nHeight */) {}
 
     SmNodeType      GetType() const  { return eType; }
     const SmToken & GetToken() const { return aNodeToken; }
@@ -193,7 +195,7 @@ public:
              SmStructureNode( const SmStructureNode &rNode );
     virtual ~SmStructureNode();
 
-    virtual BOOL        IsVisible() const;
+    virtual BOOL        IsVisible() const { return FALSE; }
 
     virtual USHORT      GetNumSubNodes() const;
             void        SetNumSubNodes(USHORT nSize) { aSubNodes.SetSize(nSize); }
@@ -220,9 +222,9 @@ protected:
 
 public:
 
-    virtual BOOL        IsVisible() const;
-    virtual USHORT      GetNumSubNodes() const;
-    virtual SmNode *    GetSubNode(USHORT nIndex);
+    virtual BOOL        IsVisible() const { return FALSE; }
+    virtual USHORT      GetNumSubNodes() const { return 0; }
+    virtual SmNode *    GetSubNode(USHORT /* nIndex */) { return NULL; }
 };
 
 
diff --git a/binfilter/inc/bf_starmath/utility.hxx b/binfilter/inc/bf_starmath/utility.hxx
index 45b3809..1eeb5af 100644
--- a/binfilter/inc/bf_starmath/utility.hxx
+++ b/binfilter/inc/bf_starmath/utility.hxx
@@ -123,19 +123,20 @@ public:
         FontWeight  eFontWeight;
         FontItalic  eFontItalic;
 
-        Key(const XubString &rText, const Font &rFont);
-
+        Key(const XubString& /* rText */, const Font& /* rFont */) {}
     };
 
     SmRectCache();
     ~SmRectCache();
 
-    const SmRect *  Search(const Key &rKey) const;
-    const SmRect *  Add(const Key &rKey, const SmRect &rRect);
+    const SmRect *  Search(const Key & /* rKey */) const { return 0; }
+
+    const SmRect *  Add(const Key& /* rKey */, const SmRect& /* rRect */)
+                    { return (const SmRect *)-1; }
 
     VirtualDevice * GetVirDev();
 
-    void Reset();
+    void Reset() {};
 };
 
 
@@ -179,29 +180,6 @@ public:
 SmFace & operator *= (SmFace &rFace, const Fraction &rFrac);
 
 
-#ifdef NEVER
-////////////////////////////////////////////////////////////
-//
-// SmInfoText
-//
-
-class SmInfoText : public FixedText
-{
-protected:
-    USHORT  nMaxLen;
-    String  aText;
-
-public:
-    SmInfoText(Window* pParent, WinBits nWinStyle = 0, USHORT nMax = 128);
-    SmInfoText(Window* pParent, const ResId& rResId, USHORT nMax = 128);
-
-    void    SetText(const String& rStr);
-
-    XubString GetText() const { return (aText); }
-};
-#endif
-
-
 ////////////////////////////////////////////////////////////
 //
 // SmPickList
@@ -244,67 +222,6 @@ public:
 
 };
 
-
-////////////////////////////////////////////////////////////
-//
-// SmStringPickList
-//
-#ifdef NEVER
-class SmStringPickList : public SmPickList
-{
-protected:
-    virtual void   *CreateItem(const String& rString);
-    virtual void   *CreateItem(const void *pItem);
-    virtual void    DestroyItem(void *pItem);
-
-    virtual BOOL    CompareItem(const void *pFirstItem, const void *pSecondItem) const;
-
-    virtual String  GetStringItem(void *pItem);
-
-    virtual void    LoadItem(SvStream& rStream, void *pItem);
-    virtual void    SaveItem(SvStream& rStream, const void *pItem) const;
-
-public:
-    SmStringPickList()
-        : SmPickList(0, 5) {}
-    SmStringPickList(USHORT nInitSize, USHORT nMaxSize)
-        : SmPickList(nInitSize, nMaxSize) {}
-    SmStringPickList(const SmPickList& rOrig )
-        : SmPickList(rOrig) {}
-    ~SmStringPickList() { Clear(); }
-
-    virtual void    Insert(const String &rString);
-    virtual void    Update(const String &rString, const String &rNewString);
-    virtual void    Remove(const String &rString);
-
-    inline BOOL     Contains(const String &rString) const;
-    inline String   Get(USHORT nPos = 0) const;
-
-    inline SmStringPickList& operator = (const SmStringPickList& rList);
-    inline String            operator [] (USHORT nPos) const;
-};
-
-inline SmStringPickList& SmStringPickList::operator = (const SmStringPickList& rList)
-{
-    *(SmPickList *)this = *(SmPickList *)&rList; return *this;
-}
-
-inline String SmStringPickList::operator [] (USHORT nPos) const
-{
-    return *((String *)SmPickList::operator[](nPos));
-}
-
-inline String SmStringPickList::Get(USHORT nPos) const
-{
-    return nPos < Count() ? *((String *)SmPickList::Get(nPos)) : String();
-}
-
-inline BOOL SmStringPickList::Contains(const String &rString) const
-{
-    return SmPickList::Contains((void *)&rString);
-}
-#endif
-
 ////////////////////////////////////////////////////////////
 //
 // SmFontPickList
@@ -315,16 +232,22 @@ class SmFontDialog;
 class SmFontPickList : public SmPickList
 {
 protected:
-    virtual void   *CreateItem(const String& rString);
-    virtual void   *CreateItem(const void *pItem);
-    virtual void    DestroyItem(void *pItem);
+    virtual void   *CreateItem(const String& /* rString */)
+                    { return NULL; }
 
-    virtual BOOL    CompareItem(const void *pFirstItem, const void *pSecondItem) const;
+    virtual void   *CreateItem(const void* /* pItem */)
+                    { return NULL; }
+
+    virtual void    DestroyItem(void* /* pItem */)
+                    {}
+
+    virtual BOOL    CompareItem(const void *pFirstItem, const void *pSecondItem) const
+                    { return FALSE; }
 
     virtual String  GetStringItem(void *pItem);
 
-    virtual void    LoadItem(SvStream& rStream, void *pItem);
-    virtual void    SaveItem(SvStream& rStream, const void *pItem) const;
+    virtual void    LoadItem(SvStream& /* rStream */, void* /* pItem */) {}
+    virtual void    SaveItem(SvStream& /* rStream */, const void* /* pItem */) const {};
 
 public:
     SmFontPickList()
@@ -359,38 +282,6 @@ inline Font SmFontPickList::Get(USHORT nPos) const
     return nPos < Count() ? *((Font *)SmPickList::Get(nPos)) : Font();
 }
 
-////////////////////////////////////////////////////////////
-//
-// SmStringPickComboBox
-//
-#ifdef NEVER
-class SmStringPickComboBox : public SmStringPickList, public ComboBox
-{
-protected:
-    virtual void LoseFocus();
-
-    DECL_LINK(SelectHdl, ComboBox *);
-
-public:
-    SmStringPickComboBox(Window* pParent, WinBits nWinStyle = 0, USHORT nMax = 4);
-    SmStringPickComboBox(Window* pParent, const ResId& rResId, USHORT nMax = 4);
-
-    SmStringPickComboBox& operator = (const SmStringPickList& rList);
-
-    void            SetText(const String& rStr);
-
-    virtual void    Insert(const String &rString);
-    virtual void    Update(const String &rString, const String &rNewString);
-    virtual void    Remove(const String &rString);
-};
-#endif
-
-////////////////////////////////////////////////////////////
-//
-//  SmFontPickListBox
-//
-
-
 } //namespace binfilter
 #endif
 


More information about the Libreoffice-commits mailing list