[ooo-build-commit] .: starmath/source

Noel Power noelp at kemper.freedesktop.org
Thu Sep 30 14:35:53 PDT 2010


 starmath/source/cfgitem.cxx      |   16 ---
 starmath/source/cfgitem.hxx      |    8 -
 starmath/source/dialog.cxx       |    9 -
 starmath/source/document.cxx     |   11 --
 starmath/source/mathmlexport.cxx |   69 ---------------
 starmath/source/mathmlimport.cxx |  179 +--------------------------------------
 starmath/source/mathtype.cxx     |  156 ---------------------------------
 starmath/source/node.cxx         |    8 -
 starmath/source/parse.cxx        |   40 --------
 starmath/source/smdetect.cxx     |    1 
 starmath/source/smmod.cxx        |    9 -
 starmath/source/symbol.cxx       |   31 ------
 starmath/source/unomodel.cxx     |   42 ---------
 starmath/source/view.cxx         |   31 ------
 14 files changed, 16 insertions(+), 594 deletions(-)

New commits:
commit 4880e19059d2a51b2f2cfeef532878d215b9fe6d
Author: Phil Bordelon <phil at thenexusproject.org>
Date:   Thu Sep 30 22:35:03 2010 +0100

    Clean up dead code and comments in starmath
    
    This patch removes a bunch of commented-out code, gets rid of code
    sitting in #if 0 blocks, and gets rid of #if 1 statements.  It
    should have no functional changes.  Some revision-control-averse
    comments were removed as well, but they were not the focus of the
    patch.
    
    Some comment removal required reformatting of code afterwards
    (such as when all code in an else block was defunct, or when a
    starting if statement was removed).
    
    With a single exception, no line-internal commented-out code is
    handled by this patch to ease review.  In addition, no code that
    appears to have a debugging purpose was removed, even if it was
    commented out.

diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index bbc1294..d523882 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -74,7 +74,6 @@ static Sequence< OUString > lcl_GetFontPropertyNames()
     {
         pNames[i] = A2OU( *ppPropName );
     }
-    //aNames.realloc( i );
     return aNames;
 }
 
@@ -100,7 +99,6 @@ static Sequence< OUString > lcl_GetSymbolPropertyNames()
     {
         pNames[i] = A2OU( *ppPropName );
     }
-    //aNames.realloc( i );
     return aNames;
 }
 
@@ -113,7 +111,6 @@ static const char * aMathPropNames[] =
     "Print/Frame",
     "Print/Size",
     "Print/ZoomFactor",
-    //"Misc/NoSymbolsWarning",
     "Misc/IgnoreSpacesRight",
     "View/ToolboxVisible",
     "View/AutoRedraw",
@@ -181,7 +178,6 @@ static Sequence< OUString > lcl_GetPropertyNames(
     {
         pNames[i] = A2OU( *ppPropName );
     }
-    //aNames.realloc( i );
     return aNames;
 }
 
@@ -212,7 +208,6 @@ struct SmCfgOther
     BOOL            bToolboxVisible;
     BOOL            bAutoRedraw;
     BOOL            bFormulaCursor;
-    //BOOL            bNoSymbolsWarning;
 
     SmCfgOther();
 };
@@ -225,7 +220,7 @@ SmCfgOther::SmCfgOther()
     bPrintTitle         = bPrintFormulaText   =
     bPrintFrame         = bIgnoreSpacesRight  =
     bToolboxVisible     = bAutoRedraw         =
-    bFormulaCursor      = /*bNoSymbolsWarning   =*/ TRUE;
+    bFormulaCursor      = TRUE;
 }
 
 /////////////////////////////////////////////////////////////////
@@ -613,7 +608,6 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
     while (aIt != aEnd)
     {
         const SmSym &rSymbol = *aIt++;
-        //const Font  &rFont = rSymbol.GetFace(); 
         OUString  aNodeNameDelim( A2OU( SYMBOL_LIST ) );
         aNodeNameDelim += aDelim;
         aNodeNameDelim += rSymbol.GetExportName();
@@ -902,11 +896,6 @@ void SmMathConfig::LoadOther()
         // Print/ZoomFactor
         if (pVal->hasValue()  &&  (*pVal >>= nTmp16))
             pOther->nPrintZoomFactor = nTmp16;
-/*        ++pVal;
-        // Misc/NoSymbolsWarning
-        if (pVal->hasValue()  &&  (*pVal >>= bTmp))
-            pOther->bNoSymbolsWarning = bTmp;
-*/
         ++pVal;
         // Misc/IgnoreSpacesRight
         if (pVal->hasValue()  &&  (*pVal >>= bTmp))
@@ -953,9 +942,6 @@ void SmMathConfig::SaveOther()
     *pValue++ <<= (INT16) pOther->ePrintSize;
     // Print/ZoomFactor
     *pValue++ <<= (INT16) pOther->nPrintZoomFactor;
-/*    // Misc/NoSymbolsWarning
-    *pValue++ <<= (BOOL) pOther->bNoSymbolsWarning;
-*/
     // Misc/IgnoreSpacesRight
     *pValue++ <<= (BOOL) pOther->bIgnoreSpacesRight;
     // View/ToolboxVisible
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index be28437..d266bcb 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -174,14 +174,6 @@ public:
     virtual void    Notify( const com::sun::star::uno::Sequence< rtl::OUString > &rPropertyNames );
     virtual void    Commit();
 
-    // make some protected functions of utl::ConfigItem public
-    //using utl::ConfigItem::GetNodeNames;
-    //using utl::ConfigItem::GetProperties;
-    //using utl::ConfigItem::PutProperties;
-    //using utl::ConfigItem::SetSetProperties;
-    //using utl::ConfigItem::ReplaceSetProperties;
-    //using utl::ConfigItem::GetReadOnlyStates;
-
     SmSymbolManager &   GetSymbolManager();
     void                GetSymbols( std::vector< SmSym > &rSymbols ) const;
     void                SetSymbols( const std::vector< SmSym > &rNewSymbols );
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 916891c..a929045 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -91,7 +91,6 @@ SmFontStyles::SmFontStyles() :
     aBold   ( ResId( RID_FONTBOLD,    *SM_MOD()->GetResMgr() ) ),
     aItalic ( ResId( RID_FONTITALIC,  *SM_MOD()->GetResMgr() ) )
 {
-//    SM_MOD()->GetResMgr().FreeResource();
 
     aBoldItalic = aBold;
     aBoldItalic.AppendAscii( ", " );
@@ -1745,7 +1744,6 @@ void SmSymDefineDialog::FillStyles(BOOL bDeleteText)
     XubString aText (aFonts.GetSelectEntry());
     if (aText.Len() != 0)
     {
-        //aStyles.Fill(aText, &aFontList);
         // eigene StyleName's verwenden
         const SmFontStyles &rStyles = GetFontStyles();
         for (USHORT i = 0;  i < rStyles.GetCount();  i++)
@@ -1938,7 +1936,6 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
             aSymbolSets.GetText() );
 
     // remove old symbol if the name was changed then add new one
-//    const bool bSetNameChanged    = aOldSymbolSets.GetText() != aSymbolSets.GetText();
     const bool bNameChanged       = aOldSymbols.GetText() != aSymbols.GetText();
     if (bNameChanged)
         aSymbolMgrCopy.RemoveSymbol( aOldSymbols.GetText() );
@@ -2022,12 +2019,6 @@ void SmSymDefineDialog::UpdateButtons()
         // loeschen nur wenn alle Einstellungen gleich sind
         bDelete = pOrigSymbol != NULL;
 
-        // aendern wenn bei gleichem Namen mindestens eine Einstellung anders ist
-        // oder wenn es noch kein Symbol des neuen Namens gibt (wuerde implizites
-        // loeschen des bereits vorhandenen Symbols erfordern)
-//        BOOL  bEqualName = pOrigSymbol && aTmpSymbolName == pOrigSymbol->GetName();
-//		bChange = pOrigSymbol && ( (bEqualName && !bEqual) || (!bEqualName && bAdd) );
-
         // aendern nur falls altes Symbol vorhanden und am neuen etwas anders ist
         bChange = pOrigSymbol && !bEqual;
 }
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 94bd3e5..8c9127d 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -173,7 +173,6 @@ void SmDocShell::SetText(const String& rBuffer)
         SetFormulaArranged( FALSE );
 
         Parse();
-        //Repaint();
 
         SmViewShell *pViewSh = SmGetActiveView();
         if( pViewSh )
@@ -264,7 +263,6 @@ void SmDocShell::ArrangeFormula()
     //! Nur f�r die Dauer der Existenz dieses Objekts sind am Drucker die
     //! richtigen Einstellungen garantiert.
     SmPrinterAccess  aPrtAcc(*this);
-//	OutputDevice	*pOutDev = aPrtAcc.GetPrinter();
     OutputDevice* pOutDev = aPrtAcc.GetRefDev();
 
     if (!pOutDev)
@@ -420,9 +418,6 @@ EditEngine& SmDocShell::GetEditEngine()
 
         pEditEngine->ClearModifyFlag();
 
-        // forces new settings to be used if the itempool was modified
-        // after cthe creation of the EditEngine
-        //pEditEngine->Clear();	//#77957 incorrect font size
     }
     return *pEditEngine;
 }
@@ -770,16 +765,11 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
                         Parse();
                 }
             }
-            else
-            {
-                //bSuccess = ImportSM20File( pStream );
-            }
         }
     }
 
     if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
     {
-        //???OnDocumentPrinterChanged(0);
         SetFormulaArranged( FALSE );
         Repaint();
     }
@@ -834,7 +824,6 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
 
     if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
     {
-        //???OnDocumentPrinterChanged(0);
         SetFormulaArranged( FALSE );
         Repaint();
     }
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index cf5c28e..7230178 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -380,10 +380,6 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
     sal_Bool bRet = WriteThroughComponent( xStream->getOutputStream(), xComponent, rFactory,
         rPropSet, pComponentName );
 
-    // stream is closed by SAX parser
-    //if ( bRet )
-    //    xStream->getOutputStream()->closeOutput();
-
     return bRet;
 }
 
@@ -445,7 +441,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExport_createInstance(
     throw( uno::Exception )
 {
     // #110680#
-    // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_ALL );
     // EXPORT_OASIS is required here allthough there is no differrence between
     // OOo and OASIS, because without the flag, a transformation to OOo would
     // be chained in.
@@ -472,7 +467,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMetaOOO_createInstance(
 throw( uno::Exception )
 {
     // #110680#
-    // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_META );
     return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_META );
 }
 
@@ -496,7 +490,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMeta_createInstance(
 throw( uno::Exception )
 {
     // #110680#
-    // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_META );
     return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_META );
 }
 
@@ -520,7 +513,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettingsOOO_createInstance
 throw( uno::Exception )
 {
     // #110680#
-    // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_SETTINGS );
     return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_SETTINGS );
 }
 
@@ -544,7 +536,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettings_createInstance(
 throw( uno::Exception )
 {
     // #110680#
-    // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_SETTINGS );
     return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_SETTINGS );
 }
 
@@ -568,7 +559,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportContent_createInstance(
 throw( uno::Exception )
 {
     // #110680#
-    // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_CONTENT );
     // The EXPORT_OASIS flag is only required to avoid that a transformer is
     // chanied in
     return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_CONTENT );
@@ -787,23 +777,9 @@ void SmXMLExport::ExportExpression(const SmNode *pNode, int nLevel)
     if (nSize > 1)
         pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, sal_True, sal_True);
 
-    //if (nSize)
-    //{
-        for (USHORT i = 0; i < nSize; i++)
-            if (const SmNode *pTemp = pNode->GetSubNode(i))
-                ExportNodes(pTemp, nLevel+1);
-    //}
-#if 0
-    else
-    {
-        //This saves us from situations like "a newline" where the
-        //lack of a term following the newline would otherwise create
-        //a incorrect token like <mtr/>
-        SvXMLElementExport aDummy(*this, XML_NAMESPACE_MATH, XML_MI, sal_True, sal_False);
-        sal_Unicode nArse[2] = {'\n','\0'};
-        GetDocHandler()->characters(nArse);
-    }
-#endif
+    for (USHORT i = 0; i < nSize; i++)
+        if (const SmNode *pTemp = pNode->GetSubNode(i))
+            ExportNodes(pTemp, nLevel+1);
 
     delete pRow;
 }
@@ -903,7 +879,6 @@ void SmXMLExport::ExportBlank(const SmNode * /*pNode*/, int /*nLevel*/)
     //!! <msub> tag in MathML !!
 
     SvXMLElementExport *pText;
-    //const SmBlankNode *pTemp = static_cast<const SmBlankNode *>(pNode);
 
     pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MI, sal_True, sal_False);
 
@@ -1124,14 +1099,6 @@ void SmXMLExport::ExportOperator(const SmNode *pNode, int nLevel)
 {
     /*we need to either use content or font and size attributes
      *here*/
-#if 0
-    {
-    SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO,
-        sal_True,sal_False);
-    SmTextNode *pTemp = (SmTextNode *)pNode->GetSubNode(0);
-    GetDocHandler()->characters(pTemp->GetText());
-    }
-#endif
     SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MROW,
         sal_True, sal_True);
     ExportNodes(pNode->GetSubNode(0), nLevel+1);
@@ -1165,12 +1132,7 @@ void SmXMLExport::ExportAttributes(const SmNode *pNode, int nLevel)
             //proper entity support required
             SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO,
                 sal_True,sal_True);
-#if 0
-            GetDocHandler()->characters(
-                OUString(RTL_CONSTASCII_USTRINGPARAM("&overbar;")));
-#else
             sal_Unicode nArse[2] = {0xAF,0x00};
-#endif
             GetDocHandler()->characters(nArse);
             }
             break;
@@ -1179,12 +1141,7 @@ void SmXMLExport::ExportAttributes(const SmNode *pNode, int nLevel)
             //proper entity support required
             SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO,
                 sal_True,sal_True);
-#if 0
-            GetDocHandler()->characters(
-                OUString(RTL_CONSTASCII_USTRINGPARAM("&underbar;")));
-#else
             sal_Unicode nArse[2] = {0x0332,0x00};
-#endif
             GetDocHandler()->characters(nArse);
             }
             break;
@@ -1371,11 +1328,6 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel)
             break;
 
     }
-#if 0
-    if (pNode->GetNumSubNodes() > 1) //or in the future is a node that
-                                     //cannot take the currently supported
-                                     //properties
-#endif
     //for now we will just always export with a style and not worry about
     //anyone else for the moment.
     {
@@ -1383,10 +1335,6 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel)
         SvXMLElementExport aStyle(*this, XML_NAMESPACE_MATH, XML_MSTYLE, sal_True,sal_True);
         ExportExpression(pNode, nLevel);
     }
-#if 0
-    else
-        ExportNodes(pNode->GetSubNode(0), nLevel+1);
-#endif
 
     delete pElement;
 }
@@ -1417,7 +1365,6 @@ void SmXMLExport::ExportVerticalBrace(const SmNode *pNode, int nLevel)
         // using accents will draw the over-/underbraces too close to the base
         // see http://www.w3.org/TR/MathML2/chapter3.html#id.3.4.5.2
         // also XML_ACCENT is illegal with XML_MUNDER. Thus no XML_ACCENT attribut here!
-//        AddAttribute(XML_NAMESPACE_MATH, XML_ACCENT, XML_TRUE);
         SvXMLElementExport aOver2(*this, XML_NAMESPACE_MATH,which, sal_True, sal_True);
         ExportNodes(pNode->GetSubNode(0), nLevel);
         ExportNodes(pNode->GetSubNode(1), nLevel);
@@ -1547,16 +1494,6 @@ void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel)
             DBG_ASSERT( 0, "Warning: failed to export a node?" );
             break;
 
-#if 0
-        default:
-            {
-            ULONG  nSize = pNode->GetNumSubNodes();
-            for (ULONG i = 0; i < nSize; i++)
-                if (SmNode *pTemp = pNode->GetSubNode(i))
-                    ExportNodes(pTemp, nLevel+1);
-            }
-            break;
-#endif
     }
 }
 
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 689e1e8..6f267ef 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -120,19 +120,16 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
             static_cast<SmDocShell*>(pModel->GetObjectShell()) : 0;
     if (pDocShell)
     {
-//        if (pDocShell->GetMedium())
-        {
-            DBG_ASSERT( pDocShell->GetMedium() == &rMedium,
-                    "different SfxMedium found" );
+        DBG_ASSERT( pDocShell->GetMedium() == &rMedium,
+                "different SfxMedium found" );
 
-            SfxItemSet* pSet = rMedium.GetItemSet();
-            if (pSet)
-            {
-                const SfxUnoAnyItem* pItem = static_cast<const SfxUnoAnyItem*>(
-                    pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL) );
-                if (pItem)
-                    pItem->GetValue() >>= xStatusIndicator;
-            }
+        SfxItemSet* pSet = rMedium.GetItemSet();
+        if (pSet)
+        {
+            const SfxUnoAnyItem* pItem = static_cast<const SfxUnoAnyItem*>(
+                pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL) );
+            if (pItem)
+                pItem->GetValue() >>= xStatusIndicator;
         }
 
         if ( SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
@@ -472,7 +469,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImport_createInstance(
     throw( uno::Exception )
 {
     // #110680#
-    // return (cppu::OWeakObject*)new SmXMLImport(IMPORT_ALL);
     return (cppu::OWeakObject*)new SmXMLImport(rSMgr, IMPORT_ALL);
 }
 
@@ -496,7 +492,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImportMeta_createInstance(
 throw( uno::Exception )
 {
     // #110680#
-    // return (cppu::OWeakObject*)new SmXMLImport( IMPORT_META );
     return (cppu::OWeakObject*)new SmXMLImport( rSMgr, IMPORT_META );
 }
 
@@ -520,7 +515,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImportSettings_createInstance(
     throw( uno::Exception )
 {
     // #110680#
-    // return (cppu::OWeakObject*)new SmXMLImport( IMPORT_SETTINGS );
     return (cppu::OWeakObject*)new SmXMLImport( rSMgr, IMPORT_SETTINGS );
 }
 
@@ -926,62 +920,7 @@ public:
 void SmXMLStyleContext_Impl::StartElement(const uno::Reference<
     xml::sax::XAttributeList > & xAttrList )
 {
-#if 1
     aStyleHelper.RetrieveAttrs(xAttrList);
-#else
-    sal_Int8 nOldIsBold=nIsBold;
-    sal_Int8 nOldIsItalic=nIsItalic;
-    double nOldFontSize=nFontSize;
-    sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
-    OUString sOldFontFamily = sFontFamily;
-    for (sal_Int16 i=0;i<nAttrCount;i++)
-    {
-        OUString sAttrName = xAttrList->getNameByIndex(i);
-        OUString aLocalName;
-        sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-            GetKeyByAttrName(sAttrName,&aLocalName);
-        OUString sValue = xAttrList->getValueByIndex(i);
-        const SvXMLTokenMap &rAttrTokenMap =
-            GetSmImport().GetPresLayoutAttrTokenMap();
-        switch(rAttrTokenMap.Get(nPrefix,aLocalName))
-        {
-            case XML_TOK_FONTWEIGHT:
-                nIsBold = sValue.equals(GetXMLToken(XML_BOLD));
-                break;
-            case XML_TOK_FONTSTYLE:
-                nIsItalic = sValue.equals(GetXMLToken(XML_ITALIC));
-                break;
-            case XML_TOK_FONTSIZE:
-                SvXMLUnitConverter::convertDouble(nFontSize,sValue);
-                GetSmImport().GetMM100UnitConverter().
-                    setXMLMeasureUnit(MAP_POINT);
-                if (-1 == sValue.indexOf(GetXMLToken(XML_UNIT_PT)))
-                    if (-1 == sValue.indexOf('%'))
-                        nFontSize=0.0;
-                    else
-                    {
-                        GetSmImport().GetMM100UnitConverter().
-                            setXMLMeasureUnit(MAP_RELATIVE);
-                    }
-                break;
-            case XML_TOK_FONTFAMILY:
-                sFontFamily = sValue;
-                break;
-            case XML_TOK_COLOR:
-                sColor = sValue;
-                break;
-            default:
-                break;
-        }
-    }
-
-    if ((nOldIsBold!=nIsBold) || (nOldIsItalic!=nIsItalic) ||
-        (nOldFontSize!=nFontSize) || (sOldFontFamily!=sFontFamily)
-        || sColor.getLength())
-        bFontNodeNeeded=sal_True;
-    else
-        bFontNodeNeeded=sal_False;
-#endif
 }
 
 
@@ -995,96 +934,7 @@ void SmXMLStyleContext_Impl::EndElement()
     SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
     if (rNodeStack.Count() - nElementCount > 1)
         SmXMLRowContext_Impl::EndElement();
-#if 1
     aStyleHelper.ApplyAttrs();
-#else
-    if (bFontNodeNeeded)
-    {
-        SmToken aToken;
-        aToken.cMathChar = '\0';
-        aToken.nGroup = 0;
-        aToken.nLevel = 5;
-
-        if (nIsBold != -1)
-        {
-            if (nIsBold)
-                aToken.eType = TBOLD;
-            else
-                aToken.eType = TNBOLD;
-            SmStructureNode *pFontNode = static_cast<SmStructureNode *>
-                (new SmFontNode(aToken));
-            pFontNode->SetSubNodes(0,rNodeStack.Pop());
-            rNodeStack.Push(pFontNode);
-        }
-        if (nIsItalic != -1)
-        {
-            if (nIsItalic)
-                aToken.eType = TITALIC;
-            else
-                aToken.eType = TNITALIC;
-            SmStructureNode *pFontNode = static_cast<SmStructureNode *>
-                (new SmFontNode(aToken));
-            pFontNode->SetSubNodes(0,rNodeStack.Pop());
-            rNodeStack.Push(pFontNode);
-        }
-        if (nFontSize != 0.0)
-        {
-            aToken.eType = TSIZE;
-            SmFontNode *pFontNode = new SmFontNode(aToken);
-
-            if (MAP_RELATIVE == GetSmImport().GetMM100UnitConverter().
-                getXMLMeasureUnit())
-            {
-                if (nFontSize < 100.00)
-                    pFontNode->SetSizeParameter(Fraction(100.00/nFontSize),
-                        FNTSIZ_DIVIDE);
-                else
-                    pFontNode->SetSizeParameter(Fraction(nFontSize/100.00),
-                        FNTSIZ_MULTIPLY);
-            }
-            else
-                pFontNode->SetSizeParameter(Fraction(nFontSize),FNTSIZ_ABSOLUT);
-
-            pFontNode->SetSubNodes(0,rNodeStack.Pop());
-            rNodeStack.Push(pFontNode);
-        }
-        if (sFontFamily.getLength())
-        {
-            if (sFontFamily.equalsIgnoreCase(GetXMLToken(XML_FIXED)))
-                aToken.eType = TFIXED;
-            else if (sFontFamily.equalsIgnoreCase(OUString(
-                RTL_CONSTASCII_USTRINGPARAM("sans"))))
-                aToken.eType = TSANS;
-            else if (sFontFamily.equalsIgnoreCase(OUString(
-                RTL_CONSTASCII_USTRINGPARAM("serif"))))
-                aToken.eType = TSERIF;
-            else //Just give up, we need to extend our font mechanism to be
-                //more general
-                return;
-
-            aToken.aText = sFontFamily;
-            SmFontNode *pFontNode = new SmFontNode(aToken);
-            pFontNode->SetSubNodes(0,rNodeStack.Pop());
-            rNodeStack.Push(pFontNode);
-        }
-        if (sColor.getLength())
-        {
-            //Again we can only handle a small set of colours in
-            //StarMath for now.
-            const SvXMLTokenMap& rTokenMap =
-                GetSmImport().GetColorTokenMap();
-            aToken.eType = static_cast<SmTokenType>(rTokenMap.Get(
-                XML_NAMESPACE_MATH, sColor));
-            if (aToken.eType != -1)
-            {
-                SmFontNode *pFontNode = new SmFontNode(aToken);
-                pFontNode->SetSubNodes(0,rNodeStack.Pop());
-                rNodeStack.Push(pFontNode);
-            }
-        }
-
-    }
-#endif
 }
 
 ////////////////////////////////////////////////////////////
@@ -1759,12 +1609,6 @@ void SmXMLUnderContext_Impl::EndElement()
         GenericEndElement(TCSUB,CSUB);
     else
         HandleAccent();
-#if 0
-    //UnderBrace trick
-    SmStructureNode *pNode = rNodeStack.Pop();
-    if (pNode->GetSubNode(1)->GetToken().cMathChar == (0x0332|0xf000))
-    if (pNode->GetSubNode(0)->GetToken().cMathChar == (0x0332|0xf000))
-#endif
 }
 
 ////////////////////////////////////////////////////////////
@@ -2229,8 +2073,6 @@ SvXMLImportContext *SmXMLDocContext_Impl::CreateChildContext(
 
     const SvXMLTokenMap& rTokenMap = GetSmImport().GetPresLayoutElemTokenMap();
 
-    //UINT32 nTest = rTokenMap.Get(nPrefix, rLocalName);
-
     switch(rTokenMap.Get(nPrefix, rLocalName))
     {
         //Consider semantics a dummy except for any starmath annotations
@@ -2644,7 +2486,6 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
             /*On each loop the base and its sub sup pair becomes the
              base for the next loop to which the next sub sup pair is
              attached, i.e. wheels within wheels*/
-            //if (nCount == 0)
             aSubNodes[0] = aReverseStack.Pop();
 
             SmNode *pScriptNode = aReverseStack.Pop();
@@ -2798,7 +2639,6 @@ void SmXMLMultiScriptsContext_Impl::EndElement()
             /*On each loop the base and its sub sup pair becomes the
              base for the next loop to which the next sub sup pair is
              attached, i.e. wheels within wheels*/
-            //if (nCount == 0)
             aSubNodes[0] = aReverseStack.Pop();
 
             SmNode *pScriptNode = aReverseStack.Pop();
@@ -3109,7 +2949,6 @@ void SmXMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps)
     const PropertyValue *pValue = aViewProps.getConstArray();
 
     long nTmp = 0;
-    //sal_Bool bShowDeletes = sal_False, bShowInserts = sal_False, bShowFooter = sal_False, bShowHeader = sal_False;
 
     for (sal_Int32 i = 0; i < nCount ; i++)
     {
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 1b15ae0..46088ee 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -39,126 +39,6 @@
 
 #define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii))
 
-#if 0
-String aEmbelList[21] =
-{
-    " ",
-    " ",
-    "single dot",
-    "double dot",
-    "triple dot",
-    "single prime",
-    "double prime",
-    "backwards prime (left of character)",
-    "tilde",
-    "hat (circumflex)",
-    "diagonal slash through character",
-    "right arrow",
-    "left arrow",
-    "double-headed arrow",
-    "right single-barbed arrow",
-    "left single-barbed arrow",
-    "mid-height horizontal bar",
-    "over-bar",
-    "triple prime",
-    "over-arc, concave downward",
-    "over-arc, concave upward"
-};
-
-String aSelectorList[49] =
-{
-    "angle brackets",
-    "parentheses",
-    "braces (curly brackets)",
-    "square brackets",
-    "vertical bars",
-    "double vertical bars",
-    "floor brackets",
-    "ceiling brackets",
-    "left brace, left brace",
-    "right brace, right brace",
-    "right brace, left brace",
-    "left brace, right parenthesis",
-    "left parenthesis, right brace",
-    "radical",
-    "fractions",
-    "subscript/superscript",
-    "underbar",
-    "overbar",
-    "left-pointing arrow",
-    "right-pointing arrow",
-    "left- and right-pointing arrow",
-    "single integral",
-    "double integral",
-    "triple integral",
-    "single summation-style integral",
-    "double summation-style integral",
-    "triple summation-style integral",
-    "upper horizontal brace",
-    "lower horizontal brace",
-    "summation",
-    "summation (integral-style limits)",
-    "product",
-    "product (integral-style limits)",
-    "coproduct",
-    "coproduct (integral-style limits)",
-    "union",
-    "union (integral-style limits)",
-    "intersection",
-    "intersection (integral-style limits)",
-    "limit",
-    "long division",
-    "slash fractions",
-    "big integral-style operators",
-    "big summation-style operators",
-    "leading sub- and superscripts",
-    "Dirac delta",
-    "under arrow",
-    "over arrow",
-    "over arc"
-};
-
-String aIntegralOpt[2] =
-{
-    "fixed-size integral",
-    "integral expands vertically to fit its contents"
-};
-
-String aFenceOpt[3] =
-{
-    "center fence on math axis",
-    "center fence on contents, place math axis of contents on math axis of containing line",
-    "center fence on contents, center contents on math axis of containing line"
-};
-
-String aTypeFaces[12] =
-{
-    "",
-    "fnTEXT",
-    "fnFUNCTION",
-    "fnVARIABLE",
-    "fnLCGREEK",
-    "fnUCGREEK",
-    "fnSYMBOL",
-    "fnVECTOR",
-    "fnNUMBER",
-    "fnUSER1",
-    "fnUSER2",
-    "fnMTEXTRA"
-};
-
-String aSizes[7] =
-{
-    "full",
-    "subscript",
-    "sub-subscript",
-    "symbol",
-    "sub-symbol",
-    "user 1",
-    "user 2"
-};
-#endif
-
 static sal_Unicode Convert(sal_Unicode nIn)
 {
     //Find the best match in accepted unicode for our private area symbols
@@ -862,8 +742,6 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
                 {
                     if (xfLMOVE(nTag))
                         HandleNudge();
-                    //if (xfLSPACE(nTag))
-                    //if (xfRULER(nTag))
 
                     if (newline>0)
                         APPEND(rRet,"\nnewline\n");
@@ -1972,12 +1850,6 @@ void MathType::HandleAlign(sal_uInt8 nHorAlign, sal_uInt8 /*nVAlign*/, int &rSet
         APPEND(rRet,"alignr {");
         break;
     }
-#if 0
-    switch(nVAlign)
-    {
-    }
-    rSetAlign+=2;
-#endif
     rSetAlign++;
 }
 
@@ -2017,7 +1889,6 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
          itself anyway in which case the size setting could be ignored*/
         nLstSize = aSizeTable[nLstSize];
         nLstSize = nLstSize + nDefSize;
-        //if (nLstSize != nDefaultSize)
         if (nLstSize != nCurSize)
         {
             if (rSetSize)
@@ -2297,7 +2168,6 @@ void MathType::HandleTable(SmNode *pNode,int nLevel)
 
 void MathType::HandleRoot(SmNode *pNode,int nLevel)
 {
-    //USHORT  nSize = pNode->GetNumSubNodes();
     SmNode *pTemp;
     *pS << sal_uInt8(TMPL); //Template
     *pS << sal_uInt8(0x0D); //selector
@@ -2307,10 +2177,6 @@ void MathType::HandleRoot(SmNode *pNode,int nLevel)
         *pS << sal_uInt8(0x00); //variation
     *pS << sal_uInt8(0x00); //options
 
-    /*
-    if (pTemp = pNode->GetSubNode(1))
-            HandleNodes(pTemp,nLevel+1);
-    */
     if (NULL != (pTemp = pNode->GetSubNode(2)))
     {
         *pS << sal_uInt8(LINE); //line
@@ -2397,7 +2263,6 @@ sal_uInt8 MathType::HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
  */
 void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
 {
-    //USHORT  nSize = pNode->GetNumSubNodes();
     SmNode *pTemp;
 
     sal_uInt8 nVariation=0xff;
@@ -2443,10 +2308,7 @@ void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
 
     if (NULL != (pTemp = pNode->GetSubNode(0)))
     {
-//		*pS << sal_uInt8(0x0A);
-//		*pS << sal_uInt8(LINE);
         HandleNodes(pTemp,nLevel+1);
-//		*pS << sal_uInt8(END);
     }
 
     if (nVariation2 != 0xff)
@@ -2496,7 +2358,6 @@ void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
 
 void MathType::HandleFractions(SmNode *pNode,int nLevel)
 {
-    //USHORT  nSize = pNode->GetNumSubNodes();
     SmNode *pTemp;
     *pS << sal_uInt8(TMPL); //Template
     *pS << sal_uInt8(0x0E); //selector
@@ -2521,7 +2382,6 @@ void MathType::HandleFractions(SmNode *pNode,int nLevel)
 
 void MathType::HandleBrace(SmNode *pNode,int nLevel)
 {
-    //USHORT  nSize = pNode->GetNumSubNodes();
     SmNode *pTemp;
     SmNode *pLeft=pNode->GetSubNode(0);
     SmNode *pRight=pNode->GetSubNode(2);
@@ -2632,8 +2492,6 @@ void MathType::HandleVerticalBrace(SmNode *pNode,int nLevel)
 
 void MathType::HandleOperator(SmNode *pNode,int nLevel)
 {
-    //USHORT  nSize = pNode->GetNumSubNodes();
-
     if (HandleLim(pNode,nLevel))
         return;
 
@@ -3092,7 +2950,6 @@ int MathType::HandleChar(xub_StrLen &rTextStart,int &rSetSize,int nLevel,
     if (!bSilent)
     {
         xub_StrLen nOldLen = rRet.Len();
-        //nLastSize = nCurSize;
         if (
             HandleSize(nLSize,nDSize,rSetSize) ||
             (nOldTypeFace != nTypeFace)
@@ -3344,13 +3201,9 @@ void MathType::HandleMath(SmNode *pNode, int /*nLevel*/)
 void MathType::HandleAttributes(SmNode *pNode,int nLevel)
 {
     int nOldPending = 0;
-    //USHORT  nSize = pNode->GetNumSubNodes();
     SmNode *pTemp       = 0;
     SmTextNode *pIsText = 0;
 
-    //SmTextNode *pTemp=(SmTextNode *)pNode;
-    //for(int i=0;i<pTemp->GetText().Len();i++)
-
     if (NULL != (pTemp = pNode->GetSubNode(0)))
     {
         pIsText = (SmTextNode *)pNode->GetSubNode(1);
@@ -3481,22 +3334,13 @@ void MathType::HandleText(SmNode *pNode, int /*nLevel*/)
         }
         else
             *pS << sal_uInt8(CHAR);
-            //*pS << sal_uInt8(CHAR|0x10); //char with formula recognition
 
-#if 1
         sal_uInt8 nFace = 0x1;
         if (pNode->GetFont().GetItalic() == ITALIC_NORMAL)
             nFace = 0x3;
         else if (pNode->GetFont().GetWeight() == WEIGHT_BOLD)
             nFace = 0x7;
         *pS << sal_uInt8(nFace+128); //typeface
-#else
-        if ((pTemp->GetText().GetChar(i) >= '0') &&
-            (pTemp->GetText().GetChar(i) <= '9'))
-            *pS << sal_uInt8(0x8+128); //typeface
-        else
-            *pS << sal_uInt8(0x3+128); //typeface
-#endif
         sal_uInt16 nChar = pTemp->GetText().GetChar(i);
         *pS << Convert(nChar);
 
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index a01cab2..f46bfe0 100755
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -264,7 +264,6 @@ void SmNode::SetFontSize(const Fraction &rSize, USHORT nType)
     {
         Fraction  aVal (SmPtsTo100th_mm(rSize.GetNumerator()),
                         rSize.GetDenominator());
-        //long	  nHeight = ::rtl::math::round(aVal);
         long	  nHeight = (long)aVal;
 
         aFntSize = GetFont().GetSize();
@@ -364,7 +363,6 @@ void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
     }
 
     GetFont() = rFormat.GetFont(FNT_MATH);
-    //GetFont().SetCharSet(RTL_TEXTENCODING_SYMBOL);
     DBG_ASSERT( GetFont().GetCharSet() == RTL_TEXTENCODING_UNICODE,
             "unexpected CharSet" );
     GetFont().SetWeight(WEIGHT_NORMAL);
@@ -667,8 +665,6 @@ void SmStructureNode::GetAccessibleText( String &rText ) const
             if (pNode->IsVisible())
                 ((SmStructureNode *) pNode)->nAccIndex = rText.Len();
             pNode->GetAccessibleText( rText );
-//            if (rText.Len()  &&  ' ' != rText.GetChar( rText.Len() - 1 ))
-//                rText += String::CreateFromAscii( " " );
         }
     }
 }
@@ -763,7 +759,6 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
     {   if (NULL != (pNode = GetSubNode(i)))
         {	const SmRect &rNodeRect = pNode->GetRect();
             const SmNode *pCoNode	= pNode->GetLeftMost();
-            //SmTokenType   eType    = pCoNode->GetToken().eType;
             RectHorAlign  eHorAlign = pCoNode->GetRectHorAlign();
 
             aPos = rNodeRect.AlignTo(*this, RP_BOTTOM,
@@ -1103,7 +1098,6 @@ void SmBinVerNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
 void SmBinVerNode::CreateTextFromNode(String &rText)
 {
     SmNode *pNum   = GetSubNode(0),
-    //      *pLine  = GetSubNode(1),
            *pDenom = GetSubNode(2);
     pNum->CreateTextFromNode(rText);
     APPEND(rText,"over ");
@@ -2254,7 +2248,6 @@ void SmRootSymbolNode::Draw(OutputDevice &rDev, const Point &rPosition) const
     //  This is done by shifting it's output-position to a point that
     //  corresponds exactly to a pixel on the output device.
     Point  aDrawPos( rDev.PixelToLogic(rDev.LogicToPixel(aBar.TopLeft())) );
-    //aDrawPos.X() = aBar.Left();     //! don't change X position
     aBar.SetPos( aDrawPos );
 
     rDev.DrawRect( aBar );
@@ -2300,7 +2293,6 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
 
     // add some borderspace
     ULONG  nTmpBorderWidth = GetFont().GetBorderWidth();
-    //nWidth  += nTmpBorderWidth;
     nHeight += 2 * nTmpBorderWidth;
 
     //! use this method in order to have 'SmRect::HasAlignInfo() == TRUE'
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index af5c02c..4409d4f 100755
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -97,27 +97,6 @@ struct SmTokenTableEntry
 
 static const SmTokenTableEntry aTokenTable[] =
 {
-//	{ "#", TPOUND, '\0', 0, 0 },
-//	{ "##", TDPOUND, '\0', 0, 0 },
-//	{ "&", TAND, MS_AND, TGPRODUCT, 0 },
-//	{ "(", TLPARENT, MS_LPARENT, TGLBRACES, 5 },	//! 5 to continue expression
-//	{ ")", TRPARENT, MS_RPARENT, TGRBRACES, 0 },	//! 0 to terminate expression
-//	{ "*", TMULTIPLY, MS_MULTIPLY, TGPRODUCT, 0 },
-//	{ "+", TPLUS, MS_PLUS, TGUNOPER | TGSUM, 5 },
-//	{ "+-", TPLUSMINUS, MS_PLUSMINUS, TGUNOPER | TGSUM, 5 },
-//	{ "-", TMINUS, MS_MINUS, TGUNOPER | TGSUM, 5 },
-//	{ "-+", TMINUSPLUS, MS_MINUSPLUS, TGUNOPER | TGSUM, 5 },
-//	{ ".", TPOINT, '\0', 0, 0 },
-//	{ "/", TDIVIDEBY, MS_SLASH, TGPRODUCT, 0 },
-//	{ "<", TLT, MS_LT, TGRELATION, 0 },
-//	{ "<<", TLL, MS_LL, TGRELATION, 0 },
-//	{ "<=", TLE, MS_LE, TGRELATION, 0 },
-//	{ "<>", TNEQ, MS_NEQ, TGRELATION, 0},
-//	{ "<?>", TPLACE, MS_PLACE, 0, 5 },
-//	{ "=", TASSIGN, MS_ASSIGN, TGRELATION, 0},
-//	{ ">", TGT, MS_GT, TGRELATION, 0 },
-//	{ ">=", TGE, MS_GE, TGRELATION, 0 },
-//	{ ">>", TGG, MS_GG, TGRELATION, 0 },
     { "Im" , TIM, MS_IM, TGSTANDALONE, 5 },
     { "MZ23", TDEBUG, '\0', TGATTRIBUT, 0 },
     { "Re" , TRE, MS_RE, TGSTANDALONE, 5 },
@@ -325,16 +304,6 @@ static const SmTokenTableEntry aTokenTable[] =
     { "widevec", TWIDEVEC, MS_VEC, TGATTRIBUT, 5},
     { "wp" , TWP, MS_WP, TGSTANDALONE, 5},
     { "yellow", TYELLOW, '\0', TGCOLOR, 0},
-//	{ "[", TLBRACKET, MS_LBRACKET, TGLBRACES, 5},	//! 5 to continue expression
-//	{ "\\", TESCAPE, '\0', 0, 5},
-//	{ "]", TRBRACKET, MS_RBRACKET, TGRBRACES, 0},	//! 0 to terminate expression
-//	{ "^", TRSUP, '\0', TGPOWER, 0},
-//	{ "_", TRSUB, '\0', TGPOWER, 0},
-//	{ "`", TSBLANK, '\0', TGBLANK, 5},
-//	{ "{", TLGROUP, MS_LBRACE, 0, 5},		//! 5 to continue expression
-//	{ "|", TOR, MS_OR, TGSUM, 0},
-//	{ "}", TRGROUP, MS_RBRACE, 0, 0},		//! 0 to terminate expression
-//	{ "~", TBLANK, '\0', TGBLANK, 5},
     { "", TEND, '\0', 0, 0}
 };
 
@@ -450,15 +419,6 @@ void SmParser::NextToken()
         sal_Int32 nStartFlags = coStartFlags;
         sal_Int32 nContFlags  = coContFlags;
         sal_Unicode cFirstChar = BufferString.GetChar( BufferIndex );
-/*
-        removed because of #i11752#
-        bNumStart = cFirstChar == '.' || ('0' <= cFirstChar && cFirstChar <= '9');
-        if (bNumStart)
-        {
-            nStartFlags = coNumStartFlags;
-            nContFlags  = coNumContFlags;
-        }
-*/
         aRes = aCC.parseAnyToken( BufferString, BufferIndex,
                                             nStartFlags, aEmptyStr,
                                             nContFlags, aEmptyStr );
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index e6f4e12..8f39de2 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -176,7 +176,6 @@ SmFilterDetect::~SmFilterDetect()
 
     // can't check the type for external filters, so set the "dont" flag accordingly
     ::vos::OGuard aGuard( Application::GetSolarMutex() );
-    //SfxFilterFlags nMust = SFX_FILTER_IMPORT, nDont = SFX_FILTER_NOTINSTALLED;
 
     SfxApplication* pApp = SFX_APP();
     SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index f96760b..076136a 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -349,9 +349,6 @@ void SmModule::FillStatusBar(StatusBar &rBar)
 
 }
 
-/* -----------------15.02.99 12:45-------------------
- *
- * --------------------------------------------------*/
 SfxItemSet*	 SmModule::CreateItemSet( USHORT nId )
 {
     SfxItemSet*	 pRet = 0;
@@ -371,9 +368,6 @@ SfxItemSet*	 SmModule::CreateItemSet( USHORT nId )
     }
     return pRet;
 }
-/* -----------------15.02.99 12:45-------------------
- *
- * --------------------------------------------------*/
 void SmModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
 {
     if(nId == SID_SM_EDITOPTIONS)
@@ -381,9 +375,6 @@ void SmModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
         GetConfig()->ItemSetToConfig(rSet);
     }
 }
-/* -----------------15.02.99 12:45-------------------
- *
- * --------------------------------------------------*/
 SfxTabPage*	 SmModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
 {
     SfxTabPage*	 pRet = 0;
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 6c23a07..2370af8 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -88,17 +88,6 @@ SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
     m_aFace.SetAlign(ALIGN_BASELINE);
 
     m_cChar   = cChar;
-//! according to HDU this should not be used anymore now 
-//! since this was necessary in the early days but should
-//! not be done now since this is handled now at a more
-//! bottom layer by HDU.
-//! He can still imagine scenarios where this will be wrong
-//! now though, for example when importing *some* old documents.
-//! But overall it should be a large improvement, and
-//! likely everything will still work... #_- (eyes shut and "go"!)
-//
-//    if (RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet())
-//        Character |= 0xF000;
     m_aSetName      = rSet;
     m_bPredefined   = bIsPredefined;
     m_bDocSymbol    = FALSE;
@@ -320,23 +309,6 @@ void SmSymbolManager::Save()
     {
         SmMathConfig &rCfg = *SM_MOD()->GetConfig();
 
-#if 0
-        USHORT nSymbolCount     = GetSymbolCount();
-        USHORT nSaveSymbolCnt   = 0;
-        const SmSym **pSymbols  = new const SmSym* [ nSymbolCount ];
-        const SmSym **pSym      = pSymbols;
-        for (USHORT j = 0;  j < nSymbolCount;  ++j)
-        {
-            const SmSym &rSym = *pSymSet->GetSymbol( j );
-            if (!rSym.IsDocSymbol())
-            {
-                *pSym++ = &rSym;
-                ++nSaveSymbolCnt;
-            }
-        }
-        DBG_ASSERT(pSym - pSymbols == nSaveSymbolCnt, "wrong number of symbols" );
-#endif        
-
         // prepare to skip symbols from iGreek on saving
         SmLocalizedSymbolData   aLocalizedData;
         String aSymbolSetName( (sal_Unicode) 'i' );
@@ -352,9 +324,6 @@ void SmSymbolManager::Save()
                 aSymbols.push_back( *aTmp[i] );
         }
         rCfg.SetSymbols( aSymbols );
-#if 0        
-        delete [] pSymbols;
-#endif
 
         m_bModified = false;
     }
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index a3139d0..bd85070 100755
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -155,15 +155,6 @@ SmPrintUIOptions::SmPrintUIOptions()
     aHintNoLayoutPage[0].Value = makeAny( sal_True );
     m_aUIProperties[8].Value <<= aHintNoLayoutPage;
 
-// IsIgnoreSpacesRight is a parser option! Thus we don't add it to the printer UI.
-//
-//    // create subgroup for misc options
-//    m_aUIProperties[8].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 9 ) );
-//
-//    // create a bool option for ignore spacing (matches to SID_NO_RIGHT_SPACES)
-//    m_aUIProperties[9].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ),
-//                                                  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_NO_RIGHT_SPACE ) ),
-//                                                  pConfig->IsIgnoreSpacesRight() );
 }
 
 
@@ -315,7 +306,7 @@ PropertySetInfo * lcl_createModelPropertyInfo ()
     PropertySetInfo *pInfo = new PropertySetInfo ( aModelPropertyInfoMap );
     return pInfo;
 }
-//-----------------------------------------------------------------------
+
 SmModel::SmModel( SfxObjectShell *pObjSh )
 : SfxBaseModel(pObjSh)
 , PropertySetHelper ( lcl_createModelPropertyInfo () )
@@ -323,14 +314,12 @@ SmModel::SmModel( SfxObjectShell *pObjSh )
 
 {
 }
-//-----------------------------------------------------------------------
+
 SmModel::~SmModel() throw ()
 {
     delete m_pPrintUIOptions;
 }
-/*-- 28.03.00 14:18:17---------------------------------------------------
 
-  -----------------------------------------------------------------------*/
 uno::Any SAL_CALL SmModel::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException)
 {
     uno::Any aRet =  ::cppu::queryInterface ( rType,
@@ -348,23 +337,17 @@ uno::Any SAL_CALL SmModel::queryInterface( const uno::Type& rType ) throw(uno::R
         aRet = SfxBaseModel::queryInterface ( rType );
     return aRet;
 }
-/*-- 28.03.00 14:18:18---------------------------------------------------
 
-  -----------------------------------------------------------------------*/
 void SAL_CALL SmModel::acquire() throw()
 {
     OWeakObject::acquire();
 }
-/*-- 28.03.00 14:18:18---------------------------------------------------
 
-  -----------------------------------------------------------------------*/
 void SAL_CALL SmModel::release() throw()
 {
     OWeakObject::release();
 }
-/*-- 28.03.00 14:18:19---------------------------------------------------
 
-  -----------------------------------------------------------------------*/
 uno::Sequence< uno::Type > SAL_CALL SmModel::getTypes(  ) throw(uno::RuntimeException)
 {
     ::vos::OGuard aGuard(Application::GetSolarMutex());
@@ -377,15 +360,9 @@ uno::Sequence< uno::Type > SAL_CALL SmModel::getTypes(  ) throw(uno::RuntimeExce
     pTypes[nLen++] = ::getCppuType((Reference<XMultiPropertySet>*)0);
     pTypes[nLen++] = ::getCppuType((Reference<XRenderable>*)0);
 
-    // XPropertyState not supported?? (respective virtual functions from
-    // PropertySetHelper not overloaded)
-    //pTypes[nLen++] = ::getCppuType((Reference<XPropertyState>*)0);
-
     return aTypes;
 }
-/* -----------------------------28.03.00 14:23--------------------------------
 
- ---------------------------------------------------------------------------*/
 const uno::Sequence< sal_Int8 > & SmModel::getUnoTunnelId()
 {
     static osl::Mutex aCreateMutex;
@@ -398,9 +375,8 @@ const uno::Sequence< sal_Int8 > & SmModel::getUnoTunnelId()
         rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0,	sal_True );
     }
     return aSeq;
-} /* -----------------------------28.03.00 14:23--------------------------------
+}
 
- ---------------------------------------------------------------------------*/
 sal_Int64 SAL_CALL SmModel::getSomething( const uno::Sequence< sal_Int8 >& rId )
     throw(uno::RuntimeException)
 {
@@ -413,12 +389,7 @@ sal_Int64 SAL_CALL SmModel::getSomething( const uno::Sequence< sal_Int8 >& rId )
 
     return SfxBaseModel::getSomething( rId );
 }
-/*-- 07.01.00 16:32:59---------------------------------------------------
 
-  -----------------------------------------------------------------------*/
-/*-- 07.01.00 16:33:00---------------------------------------------------
-
-  -----------------------------------------------------------------------*/
 sal_Int16 lcl_AnyToINT16(const uno::Any& rAny)
 {
     uno::TypeClass eType = rAny.getValueType().getTypeClass();
@@ -432,7 +403,6 @@ sal_Int16 lcl_AnyToINT16(const uno::Any& rAny)
         rAny >>= nRet;
     return nRet;
 }
-//-----------------------------------------------------------------------------
 
 OUString SmModel::getImplementationName(void) throw( uno::RuntimeException )
 {
@@ -445,9 +415,6 @@ OUString SmModel::getImplementationName(void) throw( uno::RuntimeException )
     return rtl::OUString::createFromAscii("com.sun.star.comp.math.FormulaDocument");
 }
 
-/*-- 20.01.04 11:21:00---------------------------------------------------
-
-  -----------------------------------------------------------------------*/
 sal_Bool SmModel::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
 {
     return (
@@ -455,9 +422,7 @@ sal_Bool SmModel::supportsService(const OUString& rServiceName) throw( uno::Runt
             rServiceName == A2OU("com.sun.star.formula.FormulaProperties")
            );
 }
-/*-- 20.01.04 11:21:00---------------------------------------------------
 
-  -----------------------------------------------------------------------*/
 uno::Sequence< OUString > SmModel::getSupportedServiceNames(void) throw( uno::RuntimeException )
 {
     return getSupportedServiceNames_Static();
@@ -1010,7 +975,6 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer(
 
     SmPrinterAccess aPrinterAccess( *pDocSh );
     Printer *pPrinter = aPrinterAccess.GetPrinter();
-    //Point   aPrtPageOffset( pPrinter->GetPageOffset() );
     Size    aPrtPaperSize ( pPrinter->GetPaperSize() );
 
     // if paper size is 0 (usually if no 'real' printer is found),
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index d67635d..913e5ff 100755
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -214,16 +214,6 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
 
 void SmGraphicWindow::GetFocus()
 {
-/*
-    if (xAccessible.is())
-    {
-        uno::Any aOldValue, aNewValue;
-        // aOldValue remains empty
-        aNewValue <<= AccessibleStateType::FOCUSED;
-        pAccessible->LaunchEvent( AccessibleEventId::STATE_CHANGED,
-                aOldValue, aNewValue );
-    }
-*/
 }
 
 void SmGraphicWindow::LoseFocus()
@@ -368,7 +358,6 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
                 // added for replaceability of context menus #96085, #93782
                 pViewShell->GetViewFrame()->GetBindings().GetDispatcher()
                         ->ExecutePopup( aResId, this, &aPos );
-                //pPopupMenu->Execute( this, aPos );
 
                 delete pPopupMenu;
                 bCallBase = FALSE;
@@ -637,12 +626,6 @@ void SmCmdBoxWindow::StateChanged( StateChangedType nStateChange )
         if (TRUE == IsFloatingMode())
             AdjustPosition();   //! don't change pos in docking-mode !
 
-//        // make sure the formula can be edited right away
-//        aEdit.GrabFocus();
-
-        // grab focus as above does not work...
-        // Thus we implement a timer based solution to get the inital
-        // focus in the Edit window.
         aInitialFocusTimer.Start();
     }
 
@@ -739,9 +722,6 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0))
                                 SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER,
                                 SmResId(RID_MATH_TOOLBOX ));
     //Dummy-Objectbar, damit es bei aktivieren nicht staendig zuppelt.
-// Wegen #58705# entfernt (RID wurde nirgends verwendet)
-//	SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_SERVER,
-//								SmResId(RID_DRAW_OBJECTBAR) );
 
     SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE);
     SFX_CHILDWINDOW_REGISTRATION(SmToolBoxWrapper::GetChildWindowId());
@@ -1018,8 +998,6 @@ void SmViewShell::Impl_Print(
     const bool bIsPrintFormulaText = rPrintUIOptions.getBoolValue( PRTUIOPT_FORMULA_TEXT, sal_True );
     SmPrintSize ePrintSize( static_cast< SmPrintSize >( rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_FORMAT, PRINT_SIZE_NORMAL ) ));
     const USHORT nZoomFactor = static_cast< USHORT >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
-// IsIgnoreSpacesRight is a parser option! Thus it does not get evaluated here anymore (too late).
-//    const bool bNoRightSpaces = rPrintUIOptions.getBoolValue( PRTUIOPT_NO_RIGHT_SPACE, sal_True );
 
     rOutDev.Push();
     rOutDev.SetLineColor( Color(COL_BLACK) );
@@ -1338,10 +1316,6 @@ BOOL SmViewShell::InsertFrom(SfxMedium &rMedium)
             SmXMLImportWrapper aEquation(xModel);    //!! modifies the result of pDoc->GetText() !!
             bSuccess = 0 == aEquation.Import(rMedium);
         }
-        else
-        {
-            //bSuccess = ImportSM20File( pStream );
-        }
     }
 
     if( bSuccess )
@@ -1786,8 +1760,6 @@ SmViewShell::SmViewShell(SfxViewFrame *pFrame_, SfxViewShell *):
 {
     RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SmViewShell" );
 
-//    pViewFrame = &pFrame_->GetWindow();
-
     SetStatusText(String());
     SetWindow(&aGraphic);
     SfxShell::SetName(C2S("SmView"));
@@ -1842,8 +1814,6 @@ void SmViewShell::Activate( BOOL bIsMDIActivate )
     }
 }
 
-//------------------------------------------------------------------
-
 IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
 {
     DBG_ASSERT( _pFileDlg, "SmViewShell::DialogClosedHdl(): no file dialog" );
@@ -1851,7 +1821,6 @@ IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
 
     if ( ERRCODE_NONE == _pFileDlg->GetError() )
     {
-        //USHORT nSlot = pImpl->pRequest->GetSlot();
         SfxMedium* pMedium = pImpl->pDocInserter->CreateMedium();
 
         if ( pMedium != NULL )


More information about the ooo-build-commit mailing list