This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 75119930b7 Cleanup
75119930b7 is described below

commit 75119930b798a604486c59b90983c33a59d2f2f7
Author: mseidel <[email protected]>
AuthorDate: Thu May 1 17:22:54 2025 +0200

    Cleanup
---
 main/starmath/source/dialog.cxx   | 504 ++++++++++++++--------------
 main/starmath/source/document.cxx | 673 +++++++++++++++++++-------------------
 main/starmath/source/view.cxx     | 186 +++++------
 3 files changed, 672 insertions(+), 691 deletions(-)

diff --git a/main/starmath/source/dialog.cxx b/main/starmath/source/dialog.cxx
index f023b13a90..84b2511d4f 100644
--- a/main/starmath/source/dialog.cxx
+++ b/main/starmath/source/dialog.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,24 +7,21 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_starmath.hxx"
 
-
 #define SMDLL 1
 #include "tools/rcid.h"
 #include <svl/eitem.hxx>
@@ -45,7 +42,6 @@
 #include <tools/debug.hxx>
 #include <svx/ucsubset.hxx>
 
-
 #include "dialog.hxx"
 #include "starmath.hrc"
 #include "config.hxx"
@@ -56,67 +52,63 @@
 #include "document.hxx"
 #include "unomodel.hxx"
 
-
 using ::rtl::OUString;
 
-////////////////////////////////////////
-//
-// Da der FontStyle besser ueber die Attribute gesetzt/abgefragt wird als ueber
-// den StyleName bauen wir uns hier unsere eigene Uebersetzung
+// Da der FontStyle besser über die Attribute gesetzt/abgefragt wird als über
+// den StyleName bauen wir uns hier unsere eigene Übersetzung
 // Attribute <-> StyleName
-//
 
 class SmFontStyles
 {
-    String  aNormal;
-    String  aBold;
-    String  aItalic;
-    String  aBoldItalic;
-    String  aEmpty;
+       String  aNormal;
+       String  aBold;
+       String  aItalic;
+       String  aBoldItalic;
+       String  aEmpty;
 
 public:
-    SmFontStyles();
+       SmFontStyles();
 
-    sal_uInt16          GetCount() const    { return 4; }
-    const String &  GetStyleName( const Font &rFont ) const;
-    const String &  GetStyleName( sal_uInt16 nIdx ) const;
+       sal_uInt16          GetCount() const    { return 4; }
+       const String &  GetStyleName( const Font &rFont ) const;
+       const String &  GetStyleName( sal_uInt16 nIdx ) const;
 };
 
 
 SmFontStyles::SmFontStyles() :
-    aNormal ( ResId( RID_FONTREGULAR, *SM_MOD()->GetResMgr() ) ),
-    aBold   ( ResId( RID_FONTBOLD,    *SM_MOD()->GetResMgr() ) ),
-    aItalic ( ResId( RID_FONTITALIC,  *SM_MOD()->GetResMgr() ) )
+       aNormal ( ResId( RID_FONTREGULAR, *SM_MOD()->GetResMgr() ) ),
+       aBold   ( ResId( RID_FONTBOLD,    *SM_MOD()->GetResMgr() ) ),
+       aItalic ( ResId( RID_FONTITALIC,  *SM_MOD()->GetResMgr() ) )
 {
-//    SM_MOD()->GetResMgr().FreeResource();
+//     SM_MOD()->GetResMgr().FreeResource();
 
-    aBoldItalic = aBold;
-    aBoldItalic.AppendAscii( ", " );
-    aBoldItalic += aItalic;
+       aBoldItalic = aBold;
+       aBoldItalic.AppendAscii( ", " );
+       aBoldItalic += aItalic;
 }
 
 
 const String & SmFontStyles::GetStyleName( const Font &rFont ) const
 {
-    //! compare also SmSpecialNode::Prepare
-    sal_Bool bBold   = IsBold( rFont ),
-         bItalic = IsItalic( rFont );
+       //! compare also SmSpecialNode::Prepare
+       sal_Bool bBold   = IsBold( rFont ),
+               bItalic = IsItalic( rFont );
 
-    if (bBold && bItalic)
-        return aBoldItalic;
-    else if (bItalic)
-        return aItalic;
-    else if (bBold)
-        return aBold;
-    else
-        return aNormal;
+       if (bBold && bItalic)
+               return aBoldItalic;
+       else if (bItalic)
+               return aItalic;
+       else if (bBold)
+               return aBold;
+       else
+               return aNormal;
 }
 
 
 const String & SmFontStyles::GetStyleName( sal_uInt16 nIdx ) const
 {
-    // 0 = "normal",  1 = "italic",
-    // 2 = "bold",    3 = "bold italic"
+       // 0 = "normal",  1 = "italic",
+       // 2 = "bold",    3 = "bold italic"
 
 #if OSL_DEBUG_LEVEL > 1
     DBG_ASSERT( nIdx < GetCount(), "index out of range" );
@@ -134,26 +126,25 @@ const String & SmFontStyles::GetStyleName( sal_uInt16 
nIdx ) const
 
 const SmFontStyles & GetFontStyles()
 {
-    static const SmFontStyles aImpl;
-    return aImpl;
+       static const SmFontStyles aImpl;
+       return aImpl;
 }
 
-/////////////////////////////////////////////////////////////////
 
 void SetFontStyle(const XubString &rStyleName, Font &rFont)
 {
-       // finden des Index passend zum StyleName fuer den leeren StyleName wird
+       // finden des Index passend zum StyleName für den leeren StyleName wird
        // 0 (nicht bold nicht italic) angenommen.
        sal_uInt16  nIndex = 0;
        if (rStyleName.Len())
        {
                sal_uInt16 i;
-        const SmFontStyles &rStyles = GetFontStyles();
-        for (i = 0;  i < rStyles.GetCount();  i++)
-            if (rStyleName.CompareTo( rStyles.GetStyleName(i) ) == 
COMPARE_EQUAL)
+               const SmFontStyles &rStyles = GetFontStyles();
+               for (i = 0;  i < rStyles.GetCount();  i++)
+                       if (rStyleName.CompareTo( rStyles.GetStyleName(i) ) == 
COMPARE_EQUAL)
                                break;
 #if OSL_DEBUG_LEVEL > 1
-        DBG_ASSERT(i < rStyles.GetCount(), "style-name unknown");
+               DBG_ASSERT(i < rStyles.GetCount(), "style-name unknown");
 #endif
                nIndex = i;
        }
@@ -175,18 +166,18 @@ IMPL_LINK_INLINE_END( SmPrintOptionsTabPage, 
SizeButtonClickHdl, Button *, pButt
 
 SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet 
&rOptions)
        : SfxTabPage(pParent, SmResId(RID_PRINTOPTIONPAGE), rOptions),
-    aFixedLine1     (this, SmResId( FL_PRINTOPTIONS )),
-       aTitle                  (this, SmResId( CB_TITLEROW )),
+       aFixedLine1             (this, SmResId( FL_PRINTOPTIONS )),
+       aTitle                  (this, SmResId( CB_TITLEROW )),
        aText                   (this, SmResId( CB_EQUATION_TEXT )),
        aFrame                  (this, SmResId( CB_FRAME )),
-    aFixedLine2     (this, SmResId( FL_PRINT_FORMAT )),
-       aSizeNormal     (this, SmResId( RB_ORIGINAL_SIZE )),
-       aSizeScaled     (this, SmResId( RB_FIT_TO_PAGE )),
-       aSizeZoomed     (this, SmResId( RB_ZOOM )),
+       aFixedLine2             (this, SmResId( FL_PRINT_FORMAT )),
+       aSizeNormal             (this, SmResId( RB_ORIGINAL_SIZE )),
+       aSizeScaled             (this, SmResId( RB_FIT_TO_PAGE )),
+       aSizeZoomed             (this, SmResId( RB_ZOOM )),
        aZoom                   (this, SmResId( MF_ZOOM )),
-    aFixedLine3     (this, SmResId( FL_MISC_OPTIONS )),
-    aNoRightSpaces  (this, SmResId( CB_IGNORE_SPACING )),
-    aSaveOnlyUsedSymbols  (this, SmResId( CB_SAVE_ONLY_USED_SYMBOLS ))
+       aFixedLine3             (this, SmResId( FL_MISC_OPTIONS )),
+       aNoRightSpaces  (this, SmResId( CB_IGNORE_SPACING )),
+       aSaveOnlyUsedSymbols  (this, SmResId( CB_SAVE_ONLY_USED_SYMBOLS ))
 {
        FreeResource();
 
@@ -214,7 +205,7 @@ sal_Bool SmPrintOptionsTabPage::FillItemSet(SfxItemSet& 
rSet)
        rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTEXT), aText.IsChecked()));
        rSet.Put(SfxBoolItem(GetWhich(SID_PRINTFRAME), aFrame.IsChecked()));
        rSet.Put(SfxBoolItem(GetWhich(SID_NO_RIGHT_SPACES), 
aNoRightSpaces.IsChecked()));
-    rSet.Put(SfxBoolItem(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS), 
aSaveOnlyUsedSymbols.IsChecked()));
+       rSet.Put(SfxBoolItem(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS), 
aSaveOnlyUsedSymbols.IsChecked()));
 
        return sal_True;
 }
@@ -236,7 +227,7 @@ void SmPrintOptionsTabPage::Reset(const SfxItemSet& rSet)
        aText.Check(((const SfxBoolItem 
&)rSet.Get(GetWhich(SID_PRINTTEXT))).GetValue());
        aFrame.Check(((const SfxBoolItem 
&)rSet.Get(GetWhich(SID_PRINTFRAME))).GetValue());
        aNoRightSpaces.Check(((const SfxBoolItem 
&)rSet.Get(GetWhich(SID_NO_RIGHT_SPACES))).GetValue());
-    aSaveOnlyUsedSymbols.Check(((const SfxBoolItem 
&)rSet.Get(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS))).GetValue());
+       aSaveOnlyUsedSymbols.Check(((const SfxBoolItem 
&)rSet.Get(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS))).GetValue());
 }
 
 
@@ -250,7 +241,7 @@ SfxTabPage* SmPrintOptionsTabPage::Create(Window* pWindow, 
const SfxItemSet& rSe
 
 void SmShowFont::Paint(const Rectangle& rRect )
 {
-    Control::Paint( rRect );
+       Control::Paint( rRect );
 
        XubString       Text (GetFont().GetName());
        Size    TextSize(GetTextWidth(Text), GetTextHeight());
@@ -262,7 +253,7 @@ void SmShowFont::Paint(const Rectangle& rRect )
 
 void SmShowFont::SetFont(const Font& rFont)
 {
-    Color aTxtColor( GetTextColor() );
+       Color aTxtColor( GetTextColor() );
        Font aFont (rFont);
 
        Invalidate();
@@ -270,8 +261,8 @@ void SmShowFont::SetFont(const Font& rFont)
        aFont.SetAlign(ALIGN_TOP);
        Control::SetFont(aFont);
 
-    // keep old text color (new font may have different color)
-    SetTextColor( aTxtColor );
+       // keep old text color (new font may have different color)
+       SetTextColor( aTxtColor );
 }
 
 
@@ -317,16 +308,16 @@ void SmFontDialog::SetFont(const Font &rFont)
 {
        Face = rFont;
 
-    aFontBox.SetText( Face.GetName() );
-    aBoldCheckBox.Check( IsBold( Face ) );
-    aItalicCheckBox.Check( IsItalic( Face ) );
+       aFontBox.SetText( Face.GetName() );
+       aBoldCheckBox.Check( IsBold( Face ) );
+       aItalicCheckBox.Check( IsItalic( Face ) );
 
        aShowFont.SetFont(Face);
 }
 
 
 SmFontDialog::SmFontDialog(Window * pParent,
-        OutputDevice *pFntListDevice, sal_Bool bHideCheckboxes, sal_Bool 
bFreeRes)
+               OutputDevice *pFntListDevice, sal_Bool bHideCheckboxes, 
sal_Bool bFreeRes)
        : ModalDialog(pParent,SmResId(RID_FONTDIALOG)),
        aFixedText1     (this, SmResId(1)),
        aFontBox                (this, SmResId(1)),
@@ -335,7 +326,7 @@ SmFontDialog::SmFontDialog(Window * pParent,
        aOKButton1              (this, SmResId(1)),
        aCancelButton1  (this, SmResId(1)),
        aShowFont               (this, SmResId(1)),
-    aFixedText2     (this, SmResId(2))
+       aFixedText2             (this, SmResId(2))
 {
        if (bFreeRes)
                FreeResource();
@@ -343,11 +334,11 @@ SmFontDialog::SmFontDialog(Window * pParent,
        {
                WaitObject( this );
 
-        FontList aFontList( pFntListDevice );
+               FontList aFontList( pFntListDevice );
 
-        sal_uInt16  nCount = aFontList.GetFontNameCount();
+               sal_uInt16  nCount = aFontList.GetFontNameCount();
                for (sal_uInt16 i = 0;  i < nCount;  i++)
-            aFontBox.InsertEntry( aFontList.GetFontName(i).GetName() );
+                       aFontBox.InsertEntry( 
aFontList.GetFontName(i).GetName() );
 
                Face.SetSize(Size(0, 24));
                Face.SetWeight(WEIGHT_NORMAL);
@@ -357,10 +348,10 @@ SmFontDialog::SmFontDialog(Window * pParent,
                Face.SetCharSet(RTL_TEXTENCODING_DONTKNOW);
                Face.SetTransparent(sal_True);
 
-        InitColor_Impl();
+               InitColor_Impl();
 
-        // preview like controls should have a 2D look
-        aShowFont.SetBorderStyle( WINDOW_BORDER_MONO );
+               // preview like controls should have a 2D look
+               aShowFont.SetBorderStyle( WINDOW_BORDER_MONO );
        }
 
        aFontBox.SetSelectHdl(LINK(this, SmFontDialog, FontSelectHdl));
@@ -368,53 +359,53 @@ SmFontDialog::SmFontDialog(Window * pParent,
        aBoldCheckBox.SetClickHdl(LINK(this, SmFontDialog, AttrChangeHdl));
        aItalicCheckBox.SetClickHdl(LINK(this, SmFontDialog, AttrChangeHdl));
 
-    if (bHideCheckboxes)
-    {
-        aBoldCheckBox.Check( sal_False );
-        aBoldCheckBox.Enable( sal_False );
-        aBoldCheckBox.Show( sal_False );
-        aItalicCheckBox.Check( sal_False );
-        aItalicCheckBox.Enable( sal_False );
-        aItalicCheckBox.Show( sal_False );
-        aFixedText2.Show( sal_False );
-
-        Size  aSize( aFontBox.GetSizePixel() );
-        long nComboBoxBottom = aFontBox.GetPosPixel().Y() + 
aFontBox.GetSizePixel().Height();
-        long nCheckBoxBottom = aItalicCheckBox.GetPosPixel().Y() + 
aItalicCheckBox.GetSizePixel().Height();
-        aSize.Height() += nCheckBoxBottom - nComboBoxBottom;
-        aFontBox.SetSizePixel( aSize );
-    }
+       if (bHideCheckboxes)
+       {
+               aBoldCheckBox.Check( sal_False );
+               aBoldCheckBox.Enable( sal_False );
+               aBoldCheckBox.Show( sal_False );
+               aItalicCheckBox.Check( sal_False );
+               aItalicCheckBox.Enable( sal_False );
+               aItalicCheckBox.Show( sal_False );
+               aFixedText2.Show( sal_False );
+
+               Size  aSize( aFontBox.GetSizePixel() );
+               long nComboBoxBottom = aFontBox.GetPosPixel().Y() + 
aFontBox.GetSizePixel().Height();
+               long nCheckBoxBottom = aItalicCheckBox.GetPosPixel().Y() + 
aItalicCheckBox.GetSizePixel().Height();
+               aSize.Height() += nCheckBoxBottom - nComboBoxBottom;
+               aFontBox.SetSizePixel( aSize );
+       }
 }
 
 void SmFontDialog::InitColor_Impl()
 {
 #if OSL_DEBUG_LEVEL > 1
-    Color aBC( GetDisplayBackground().GetColor() );
+       Color aBC( GetDisplayBackground().GetColor() );
 #endif
-    ColorData   nBgCol  = COL_WHITE,
-                nTxtCol = COL_BLACK;
-    const StyleSettings &rS = GetSettings().GetStyleSettings();
-    if (rS.GetHighContrastMode())
-    {
-        nBgCol  = rS.GetFieldColor().GetColor();
-        nTxtCol = rS.GetFieldTextColor().GetColor();
-    }
+       ColorData       nBgCol  = COL_WHITE,
+                               nTxtCol = COL_BLACK;
+       const StyleSettings &rS = GetSettings().GetStyleSettings();
+       if (rS.GetHighContrastMode())
+       {
+               nBgCol  = rS.GetFieldColor().GetColor();
+               nTxtCol = rS.GetFieldTextColor().GetColor();
+       }
 
-    Color aTmpColor( nBgCol );
-    Wallpaper aWall( aTmpColor );
-    Color aTxtColor( nTxtCol );
-    aShowFont.SetBackground( aWall );
-    aShowFont.SetTextColor( aTxtColor );
+       Color aTmpColor( nBgCol );
+       Wallpaper aWall( aTmpColor );
+       Color aTxtColor( nTxtCol );
+       aShowFont.SetBackground( aWall );
+       aShowFont.SetTextColor( aTxtColor );
 }
 
 
 void SmFontDialog::DataChanged( const DataChangedEvent& rDCEvt )
 {
-    if ( rDCEvt.GetType() == DATACHANGED_SETTINGS  &&
-         (rDCEvt.GetFlags() & SETTINGS_STYLE) )
-            InitColor_Impl();
+       if ( rDCEvt.GetType() == DATACHANGED_SETTINGS  &&
+                (rDCEvt.GetFlags() & SETTINGS_STYLE) )
+                       InitColor_Impl();
 
-    ModalDialog::DataChanged( rDCEvt );
+       ModalDialog::DataChanged( rDCEvt );
 }
 
 /**************************************************************************/
@@ -426,10 +417,10 @@ IMPL_LINK( SmFontSizeDialog, DefaultButtonClickHdl, 
Button *, EMPTYARG /*pButton
 
        if (pQueryBox->Execute() == RET_YES)
        {
-        SmModule *pp = SM_MOD();
-        SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
-        WriteTo( aFmt );
-        pp->GetConfig()->SetStandardFormat( aFmt );
+               SmModule *pp = SM_MOD();
+               SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
+               WriteTo( aFmt );
+               pp->GetConfig()->SetStandardFormat( aFmt );
        }
 
        delete pQueryBox;
@@ -451,7 +442,7 @@ SmFontSizeDialog::SmFontSizeDialog(Window * pParent, 
sal_Bool bFreeRes)
        aOperatorSize(this, SmResId(7)),
        aFixedText8(this, SmResId(8)),
        aBorderSize(this, SmResId(8)),
-    aFixedLine1(this, SmResId(1)),
+       aFixedLine1(this, SmResId(1)),
        aOKButton1(this, SmResId(1)),
        aCancelButton1(this, SmResId(1)),
        aDefaultButton(this, SmResId(1))
@@ -479,7 +470,7 @@ void SmFontSizeDialog::ReadFrom(const SmFormat &rFormat)
 
 void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const
 {
-    rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< long 
>(aBaseSize.GetValue()))) );
+       rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< long 
>(aBaseSize.GetValue()))) );
 
        rFormat.SetRelSize(SIZ_TEXT,     (sal_uInt16) aTextSize    .GetValue());
        rFormat.SetRelSize(SIZ_INDEX,    (sal_uInt16) aIndexSize   .GetValue());
@@ -489,7 +480,7 @@ void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const
 
        const Size aTmp (rFormat.GetBaseSize());
        for (sal_uInt16  i = FNT_BEGIN;  i <= FNT_END;  i++)
-        rFormat.SetFontSize(i, aTmp);
+               rFormat.SetFontSize(i, aTmp);
 
        rFormat.RequestApplyChanges();
 }
@@ -502,22 +493,22 @@ IMPL_LINK( SmFontTypeDialog, MenuSelectHdl, Menu *, pMenu 
)
 {
        SmFontPickListBox *pActiveListBox;
 
-    sal_Bool bHideCheckboxes = sal_False;
+       sal_Bool bHideCheckboxes = sal_False;
        switch (pMenu->GetCurItemId())
        {
-        case 1: pActiveListBox = &aVariableFont; break;
+               case 1: pActiveListBox = &aVariableFont; break;
                case 2: pActiveListBox = &aFunctionFont; break;
                case 3: pActiveListBox = &aNumberFont;   break;
                case 4: pActiveListBox = &aTextFont;     break;
-        case 5: pActiveListBox = &aSerifFont; bHideCheckboxes = sal_True;   
break;
-        case 6: pActiveListBox = &aSansFont;  bHideCheckboxes = sal_True;   
break;
-        case 7: pActiveListBox = &aFixedFont; bHideCheckboxes = sal_True;   
break;
+               case 5: pActiveListBox = &aSerifFont; bHideCheckboxes = 
sal_True;   break;
+               case 6: pActiveListBox = &aSansFont;  bHideCheckboxes = 
sal_True;   break;
+               case 7: pActiveListBox = &aFixedFont; bHideCheckboxes = 
sal_True;   break;
                default:pActiveListBox = NULL;
        }
 
        if (pActiveListBox)
        {
-        SmFontDialog *pFontDialog = new SmFontDialog(this, pFontListDev, 
bHideCheckboxes);
+               SmFontDialog *pFontDialog = new SmFontDialog(this, 
pFontListDev, bHideCheckboxes);
 
                pActiveListBox->WriteTo(*pFontDialog);
                if (pFontDialog->Execute() == RET_OK)
@@ -533,10 +524,10 @@ IMPL_LINK_INLINE_START( SmFontTypeDialog, 
DefaultButtonClickHdl, Button *, EMPTY
        QueryBox *pQueryBox = new QueryBox(this, SmResId(RID_DEFAULTSAVEQUERY));
        if (pQueryBox->Execute() == RET_YES)
        {
-        SmModule *pp = SM_MOD();
-        SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
-        WriteTo( aFmt );
-        pp->GetConfig()->SetStandardFormat( aFmt, sal_True );
+               SmModule *pp = SM_MOD();
+               SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
+               WriteTo( aFmt );
+               pp->GetConfig()->SetStandardFormat( aFmt, sal_True );
        }
 
        delete pQueryBox;
@@ -561,13 +552,13 @@ SmFontTypeDialog::SmFontTypeDialog(Window * pParent, 
OutputDevice *pFntListDevic
        aSansFont          (this, SmResId(6)),
        aFixedText7    (this, SmResId(7)),
        aFixedFont         (this, SmResId(7)),
-    aFixedLine1    (this, SmResId(1)),
-    aFixedLine2    (this, SmResId(2)),
+       aFixedLine1    (this, SmResId(1)),
+       aFixedLine2    (this, SmResId(2)),
        aOKButton1         (this, SmResId(1)),
        aCancelButton1 (this, SmResId(1)),
        aMenuButton    (this, SmResId(1)),
-    aDefaultButton (this, SmResId(2)),
-    pFontListDev    (pFntListDevice)
+       aDefaultButton (this, SmResId(2)),
+       pFontListDev    (pFntListDevice)
 {
        if (bFreeRes)
                FreeResource();
@@ -579,7 +570,7 @@ SmFontTypeDialog::SmFontTypeDialog(Window * pParent, 
OutputDevice *pFntListDevic
 
 void SmFontTypeDialog::ReadFrom(const SmFormat &rFormat)
 {
-    SmModule *pp = SM_MOD();
+       SmModule *pp = SM_MOD();
 
        aVariableFont = pp->GetConfig()->GetFontPickList(FNT_VARIABLE);
        aFunctionFont = pp->GetConfig()->GetFontPickList(FNT_FUNCTION);
@@ -601,7 +592,7 @@ void SmFontTypeDialog::ReadFrom(const SmFormat &rFormat)
 
 void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const
 {
-    SmModule *pp = SM_MOD();
+       SmModule *pp = SM_MOD();
 
        pp->GetConfig()->GetFontPickList(FNT_VARIABLE) = aVariableFont;
        pp->GetConfig()->GetFontPickList(FNT_FUNCTION) = aFunctionFont;
@@ -656,8 +647,8 @@ static const FieldMinMax pMinMaxData[10][4] =
 };
 
 SmCategoryDesc::SmCategoryDesc(const ResId& rResId, sal_uInt16 nCategoryIdx) :
-    Resource(rResId),
-    bIsHighContrast(sal_False)
+       Resource(rResId),
+       bIsHighContrast(sal_False)
 {
        if (IsAvailableRes(ResId(1,*rResId.GetResMgr()).SetRT(RSC_STRING)))
        {
@@ -698,9 +689,9 @@ SmCategoryDesc::~SmCategoryDesc()
 {
        for (int i = 0; i < 4; i++)
        {
-        delete Strings  [i];
-        delete Graphics [i];
-        delete GraphicsH[i];
+               delete Strings  [i];
+               delete Graphics [i];
+               delete GraphicsH[i];
        }
 }
 
@@ -740,10 +731,10 @@ IMPL_LINK( SmDistanceDialog, DefaultButtonClickHdl, 
Button *, EMPTYARG /*pButton
 
        if (pQueryBox->Execute() == RET_YES)
        {
-        SmModule *pp = SM_MOD();
-        SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
-        WriteTo( aFmt );
-        pp->GetConfig()->SetStandardFormat( aFmt );
+               SmModule *pp = SM_MOD();
+               SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
+               WriteTo( aFmt );
+               pp->GetConfig()->SetStandardFormat( aFmt );
        }
        delete pQueryBox;
        return 0;
@@ -766,7 +757,7 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, 
pCheckBox )
 
 void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& 
sHelpId)
 {
-    //! HelpID's die auf diese Weise explizit gesetzt werden, muessen im
+       //! HelpID's die auf diese Weise explizit gesetzt werden, müssen im
        //! util Verzeichnis im File "hidother.src" mit Hilfe von "hidspecial"
        //! definiert werden!
 
@@ -784,7 +775,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, const 
rtl::OString& sHelpI
        Edit *pSubEdit = rField.GetSubEdit();
        if (pSubEdit)
        {
-           pSubEdit->SetHelpId(sHelpId);
+               pSubEdit->SetHelpId(sHelpId);
                pSubEdit->SetHelpText(aEmptyText);
        }
 }
@@ -800,12 +791,12 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
        // array to convert category- and metricfield-number in help ids.
        // 0 is used in case of unused combinations.
 #if OSL_DEBUG_LEVEL > 1
-    DBG_ASSERT(NOCATEGORIES == 10, "Sm : Array passt nicht zu Anzahl der 
Kategorien");
+       DBG_ASSERT(NOCATEGORIES == 10, "Sm : Array passt nicht zu Anzahl der 
Kategorien");
 #endif
-    const char* __READONLY_DATA  aCatMf2Hid[10][4] =
+       const char* __READONLY_DATA  aCatMf2Hid[10][4] =
        {
-        { HID_SMA_DEFAULT_DIST,         HID_SMA_LINE_DIST,          
HID_SMA_ROOT_DIST, 0 },
-        { HID_SMA_SUP_DIST,             HID_SMA_SUB_DIST ,          0, 0 },
+               { HID_SMA_DEFAULT_DIST,         HID_SMA_LINE_DIST,          
HID_SMA_ROOT_DIST, 0 },
+               { HID_SMA_SUP_DIST,             HID_SMA_SUB_DIST ,          0, 
0 },
         { HID_SMA_NUMERATOR_DIST,       HID_SMA_DENOMINATOR_DIST,   0, 0 },
         { HID_SMA_FRACLINE_EXCWIDTH,    HID_SMA_FRACLINE_LINEWIDTH, 0, 0 },
         { HID_SMA_UPPERLIMIT_DIST,      HID_SMA_LOWERLIMIT_DIST,    0, 0 },
@@ -819,10 +810,10 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
        // array to help iterate over the controls
        Window * __READONLY_DATA  aWin[4][2] =
        {
-        { &aFixedText1,  &aMetricField1 },
-        { &aFixedText2,  &aMetricField2 },
-        { &aFixedText3,  &aMetricField3 },
-        { &aFixedText4,  &aMetricField4 }
+               { &aFixedText1,  &aMetricField1 },
+               { &aFixedText2,  &aMetricField2 },
+               { &aFixedText3,  &aMetricField3 },
+               { &aFixedText4,  &aMetricField4 }
        };
 
        SmCategoryDesc *pCat;
@@ -843,16 +834,16 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
                aMenuButton.GetPopupMenu()->CheckItem(nActiveCategory + 1, 
sal_False);
        }
 
-    // aktivieren/deaktivieren der zugehoerigen Controls in Abhaengigkeit von 
der
-    // gewaehlten Kategorie.
+       // aktivieren/deaktivieren der zugehörigen Controls in Abhängigkeit von 
der
+       // gewählten Kategorie.
        sal_Bool  bActive;
-    for (sal_uInt16 i = 0;  i < 4;  i++)
+       for (sal_uInt16 i = 0;  i < 4;  i++)
        {
                FixedText   *pFT = (FixedText * const)   aWin[i][0];
                MetricField *pMF = (MetricField * const) aWin[i][1];
 
                // Um feststellen welche Controls aktiv sein sollen wird das
-        // vorhandensein einer zugehoerigen HelpID ueberprueft.
+               // vorhandensein einer zugehörigen HelpID überprüft.
                bActive = aCatMf2Hid[nCategory][i] != 0;
 
                pFT->Show(bActive);
@@ -860,12 +851,12 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
                pMF->Show(bActive);
                pMF->Enable(bActive);
 
-        // setzen von Masseinheit und Anzahl der Nachkommastellen
+               // setzen von Masseinheit und Anzahl der Nachkommastellen
                FieldUnit  eUnit;
                sal_uInt16     nDigits;
                if (nCategory < 9)
                {
-            eUnit = FUNIT_PERCENT;
+                       eUnit = FUNIT_PERCENT;
                        nDigits = 0;
                }
                else
@@ -873,7 +864,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
                        eUnit   = FUNIT_100TH_MM;
                        nDigits = 2;
                }
-        pMF->SetUnit(eUnit);            //! veraendert den Wert
+               pMF->SetUnit(eUnit); //! verändert den Wert
                pMF->SetDecimalDigits(nDigits);
 
                if (bActive)
@@ -888,7 +879,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
                        SetHelpId(*pMF, aCatMf2Hid[nCategory][i]);
                }
        }
-    // nun noch die CheckBox und das zugehoerige MetricField genau dann 
aktivieren,
+       // nun noch die CheckBox und das zugehörige MetricField genau dann 
aktivieren,
        // falls es sich um das Klammer Menu handelt.
        bActive = nCategory == 5;
        aCheckBox1.Show(bActive);
@@ -903,7 +894,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
        }
 
        aMenuButton.GetPopupMenu()->CheckItem(nCategory + 1, sal_True);
-    aFixedLine.SetText(Categories[nCategory]->GetName());
+       aFixedLine.SetText(Categories[nCategory]->GetName());
 
        nActiveCategory = nCategory;
 
@@ -915,23 +906,23 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
 
 SmDistanceDialog::SmDistanceDialog(Window *pParent, sal_Bool bFreeRes)
        : ModalDialog(pParent, SmResId(RID_DISTANCEDIALOG)),
-    aFixedText1    (this, SmResId(1)),
-    aMetricField1  (this, SmResId(1)),
-    aFixedText2    (this, SmResId(2)),
-    aMetricField2  (this, SmResId(2)),
-    aFixedText3    (this, SmResId(3)),
-    aMetricField3  (this, SmResId(3)),
-    aCheckBox1     (this, SmResId(1)),
-    aFixedText4    (this, SmResId(4)),
-    aMetricField4  (this, SmResId(4)),
-    aOKButton1     (this, SmResId(1)),
-    aCancelButton1 (this, SmResId(1)),
-    aMenuButton    (this, SmResId(1)),
-    aDefaultButton (this, SmResId(1)),
-    aBitmap        (this, SmResId(1)),
-    aFixedLine     (this, SmResId(1))
-{
-    for (sal_uInt16 i = 0; i < NOCATEGORIES; i++)
+       aFixedText1    (this, SmResId(1)),
+       aMetricField1  (this, SmResId(1)),
+       aFixedText2    (this, SmResId(2)),
+       aMetricField2  (this, SmResId(2)),
+       aFixedText3    (this, SmResId(3)),
+       aMetricField3  (this, SmResId(3)),
+       aCheckBox1     (this, SmResId(1)),
+       aFixedText4    (this, SmResId(4)),
+       aMetricField4  (this, SmResId(4)),
+       aOKButton1     (this, SmResId(1)),
+       aCancelButton1 (this, SmResId(1)),
+       aMenuButton    (this, SmResId(1)),
+       aDefaultButton (this, SmResId(1)),
+       aBitmap        (this, SmResId(1)),
+       aFixedLine     (this, SmResId(1))
+{
+       for (sal_uInt16 i = 0; i < NOCATEGORIES; i++)
                Categories[i] = new SmCategoryDesc(SmResId(i + 1), i);
        nActiveCategory   = CATEGORY_NONE;
        bScaleAllBrackets = sal_False;
@@ -939,10 +930,10 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, 
sal_Bool bFreeRes)
        if (bFreeRes)
                FreeResource();
 
-    ApplyImages();
+       ApplyImages();
 
-    // preview like controls should have a 2D look
-    aBitmap.SetBorderStyle( WINDOW_BORDER_MONO );
+       // preview like controls should have a 2D look
+       aBitmap.SetBorderStyle( WINDOW_BORDER_MONO );
 
        aMetricField1.SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
        aMetricField2.SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
@@ -964,21 +955,21 @@ SmDistanceDialog::~SmDistanceDialog()
 
 void SmDistanceDialog::ApplyImages()
 {
-    sal_Bool bHighContrast = 
GetSettings().GetStyleSettings().GetHighContrastMode();
-    for (int i = 0;  i < NOCATEGORIES;  ++i)
-    {
+       sal_Bool bHighContrast = 
GetSettings().GetStyleSettings().GetHighContrastMode();
+       for (int i = 0;  i < NOCATEGORIES;  ++i)
+       {
         SmCategoryDesc *pCat = Categories[i];
         if (pCat)
             pCat->SetHighContrast( bHighContrast );
-    }
+       }
 }
 
 void SmDistanceDialog::DataChanged( const DataChangedEvent &rEvt )
 {
-    if ( (rEvt.GetType() == DATACHANGED_SETTINGS) && (rEvt.GetFlags() & 
SETTINGS_STYLE) )
+       if ( (rEvt.GetType() == DATACHANGED_SETTINGS) && (rEvt.GetFlags() & 
SETTINGS_STYLE) )
             ApplyImages();
 
-    ModalDialog::DataChanged( rEvt );
+       ModalDialog::DataChanged( rEvt );
 }
 
 void SmDistanceDialog::ReadFrom(const SmFormat &rFormat)
@@ -1019,8 +1010,8 @@ void SmDistanceDialog::ReadFrom(const SmFormat &rFormat)
 
 void SmDistanceDialog::WriteTo(SmFormat &rFormat) /*const*/
 {
-    // hmm... koennen die tatsaechlich unterschiedlich sein?
-    // wenn nicht kann oben naemlich das const stehen!
+    // hmm... können die tatsächlich unterschiedlich sein?
+    // wenn nicht kann oben nämlich das const stehen!
        SetCategory(nActiveCategory);
 
        rFormat.SetDistance( DIS_HORIZONTAL,            
Categories[0]->GetValue(0) );
@@ -1136,7 +1127,7 @@ void SmShowSymbolSet::Paint(const Rectangle&)
 {
        Push(PUSH_MAPMODE);
 
-    // MapUnit einstellen fuer die 'nLen' berechnet wurde
+    // MapUnit einstellen für die 'nLen' berechnet wurde
        SetMapMode(MapMode(MAP_PIXEL));
 
     sal_uInt16 v        = sal::static_int_cast< sal_uInt16 
>((aVScrollBar.GetThumbPos() * nColumns));
@@ -1150,7 +1141,7 @@ void SmShowSymbolSet::Paint(const Rectangle&)
         aFont.SetAlign(ALIGN_TOP);
 
                // etwas kleinere FontSize nehmen (als nLen) um etwas Luft zu 
haben
-        // (hoffentlich auch genug fuer links und rechts!)
+        // (hoffentlich auch genug für links und rechts!)
                aFont.SetSize(Size(0, nLen - (nLen / 3)));
                SetFont(aFont);
         // keep text color
@@ -1279,7 +1270,7 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const 
ResId& rResId) :
 void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
 {
        aSymbolSet = rSymbolSet;
-    
+
     if (static_cast< sal_uInt16 >(aSymbolSet.size()) > (nColumns * nRows))
        {
         aVScrollBar.SetRange(Range(0, ((aSymbolSet.size() + (nColumns - 1)) / 
nColumns) - nRows));
@@ -1325,7 +1316,6 @@ IMPL_LINK( SmShowSymbolSet, ScrollHdl, ScrollBar*, 
EMPTYARG /*pScrollBar*/)
        return 0;
 }
 
-////////////////////////////////////////////////////////////////////////////////
 
 void SmShowSymbol::Paint(const Rectangle &rRect)
 {
@@ -1369,19 +1359,18 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
 }
 
 
-////////////////////////////////////////////////////////////////////////////////
 
 void SmSymbolDialog::FillSymbolSets(sal_Bool bDeleteText)
-    // fuellt die Eintraege der moeglichen 'SymbolsSet's im Dialog mit den
+       // füllt die Einträge der möglichen 'SymbolsSet's im Dialog mit den
        // aktuellen Werten des SymbolSet Managers, selektiert aber keinen.
 {
        aSymbolSets.Clear();
        if (bDeleteText)
                aSymbolSets.SetNoSelection();
 
-    std::set< String >  aSybolSetNames( rSymbolMgr.GetSymbolSetNames() );
-    std::set< String >::const_iterator aIt( aSybolSetNames.begin() );
-    for ( ; aIt != aSybolSetNames.end(); ++aIt)
+    std::set< String >  aSymbolSetNames( rSymbolMgr.GetSymbolSetNames() );
+    std::set< String >::const_iterator aIt( aSymbolSetNames.begin() );
+    for ( ; aIt != aSymbolSetNames.end(); ++aIt)
         aSymbolSets.InsertEntry( *aIt );
 }
 
@@ -1390,7 +1379,7 @@ IMPL_LINK( SmSymbolDialog, SymbolSetChangeHdl, ListBox *, 
EMPTYARG pListBox )
 {
     (void) pListBox;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pListBox == &aSymbolSets, "Sm : falsches Argument");
+       DBG_ASSERT(pListBox == &aSymbolSets, "Sm : Wrong argument");
 #endif
 
        SelectSymbolSet(aSymbolSets.GetSelectEntry());
@@ -1402,7 +1391,7 @@ IMPL_LINK( SmSymbolDialog, SymbolChangeHdl, 
SmShowSymbolSet *, EMPTYARG pShowSym
 {
     (void) pShowSymbolSet;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pShowSymbolSet == &aSymbolSetDisplay, "Sm : falsches 
Argument");
+       DBG_ASSERT(pShowSymbolSet == &aSymbolSetDisplay, "Sm : Wrong argument");
 #endif
 
        SelectSymbol(aSymbolSetDisplay.GetSelectSymbol());
@@ -1413,7 +1402,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, 
EMPTYARG pButton )
 {
     (void) pButton;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pButton == &aEditBtn, "Sm : falsches Argument");
+       DBG_ASSERT(pButton == &aEditBtn, "Sm : Wrong argument");
 #endif
 
     SmSymDefineDialog *pDialog = new SmSymDefineDialog(this, pFontListDev, 
rSymbolMgr);
@@ -1431,7 +1420,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, 
EMPTYARG pButton )
 
     sal_uInt16 nSymPos = GetSelectedSymbol();
 
-    // Dialog an evtl geaenderte Daten des SymbolSet Manager anpassen
+    // Dialog an evtl geänderte Daten des SymbolSet Manager anpassen
     if (pDialog->Execute() == RET_OK  &&  rSymbolMgr.IsModified())
        {
         rSymbolMgr.Save();
@@ -1449,7 +1438,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, 
EMPTYARG pButton )
                aSymbolSet      = rSymbolMgr.GetSymbolSet( aSymbolSetName );
         aSymbolSetDisplay.SetSymbolSet( aSymbolSet );
     }
-    
+
     if (nSymPos >= aSymbolSet.size())
         nSymPos = static_cast< sal_uInt16 >(aSymbolSet.size()) - 1;
     SelectSymbol( nSymPos );
@@ -1463,7 +1452,7 @@ IMPL_LINK( SmSymbolDialog, SymbolDblClickHdl, 
SmShowSymbolSet *, EMPTYARG pShowS
 {
     (void) pShowSymbolSet;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pShowSymbolSet == &aSymbolSetDisplay, "Sm : falsches 
Argument");
+       DBG_ASSERT(pShowSymbolSet == &aSymbolSetDisplay, "Sm : Wrong argument");
 #endif
 
        GetClickHdl(&aGetBtn);
@@ -1476,7 +1465,7 @@ IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, 
EMPTYARG pButton )
 {
     (void) pButton;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pButton == &aGetBtn, "Sm : falscher Button");
+       DBG_ASSERT(pButton == &aGetBtn, "Sm : Wrong button");
 #endif
 
        const SmSym *pSym = GetSymbol();
@@ -1499,7 +1488,7 @@ IMPL_LINK_INLINE_START( SmSymbolDialog, CloseClickHdl, 
Button *, EMPTYARG pButto
 {
     (void) pButton;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pButton == &aCloseBtn, "Sm : falscher Button");
+       DBG_ASSERT(pButton == &aCloseBtn, "Sm : Wrong button");
 #endif
 
        EndDialog(sal_True);
@@ -1636,7 +1625,6 @@ const SmSym * SmSymbolDialog::GetSymbol() const
 }
 
 
-////////////////////////////////////////////////////////////////////////////////
 
 
 void SmShowChar::Paint(const Rectangle &rRect)
@@ -1680,13 +1668,12 @@ void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font 
&rFont )
 }
 
 
-////////////////////////////////////////////////////////////////////////////////
 
 void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, sal_Bool bDeleteText)
 {
 #if OSL_DEBUG_LEVEL > 1
        DBG_ASSERT(&rComboBox == &aOldSymbols  ||  &rComboBox == &aSymbols,
-               "Sm : falsche ComboBox");
+               "Sm : Wrong comboBox");
 #endif
 
        rComboBox.Clear();
@@ -1704,7 +1691,7 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox 
&rComboBox, sal_Bool bDeleteText
 {
 #if OSL_DEBUG_LEVEL > 1
        DBG_ASSERT(&rComboBox == &aOldSymbolSets  ||  &rComboBox == 
&aSymbolSets,
-               "Sm : falsche ComboBox");
+               "Sm : Wrong comboBox");
 #endif
 
        rComboBox.Clear();
@@ -1763,7 +1750,7 @@ SmSym * SmSymDefineDialog::GetSymbol(const ComboBox 
&rComboBox)
 {
 #if OSL_DEBUG_LEVEL > 1
        DBG_ASSERT(&rComboBox == &aOldSymbols  ||  &rComboBox == &aSymbols,
-               "Sm : falsche ComboBox");
+               "Sm : Wrong comboBox");
 #endif
     return aSymbolMgrCopy.GetSymbolByName(rComboBox.GetText());
 }
@@ -1773,7 +1760,7 @@ IMPL_LINK( SmSymDefineDialog, OldSymbolChangeHdl, 
ComboBox *, EMPTYARG pComboBox
 {
     (void) pComboBox;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pComboBox == &aOldSymbols, "Sm : falsches Argument");
+       DBG_ASSERT(pComboBox == &aOldSymbols, "Sm : Wrong argument");
 #endif
     SelectSymbol(aOldSymbols, aOldSymbols.GetText(), sal_False);
        return 0;
@@ -1784,7 +1771,7 @@ IMPL_LINK( SmSymDefineDialog, OldSymbolSetChangeHdl, 
ComboBox *, EMPTYARG pCombo
 {
     (void) pComboBox;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pComboBox == &aOldSymbolSets, "Sm : falsches Argument");
+       DBG_ASSERT(pComboBox == &aOldSymbolSets, "Sm : Wrong argument");
 #endif
        SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), sal_False);
        return 0;
@@ -1812,7 +1799,7 @@ IMPL_LINK( SmSymDefineDialog, ModifyHdl, ComboBox *, 
pComboBox )
        else
     {
 #if OSL_DEBUG_LEVEL > 1
-               DBG_ASSERT(0, "Sm : falsche ComboBox Argument");
+               DBG_ASSERT(0, "Sm : Wrong comboBox argument");
 #endif
     }
 
@@ -1828,7 +1815,7 @@ IMPL_LINK( SmSymDefineDialog, FontChangeHdl, ListBox *, 
EMPTYARG pListBox )
 {
     (void) pListBox;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pListBox == &aFonts, "Sm : falsches Argument");
+       DBG_ASSERT(pListBox == &aFonts, "Sm : Wrong argument");
 #endif
 
        SelectFont(aFonts.GetSelectEntry());
@@ -1856,7 +1843,7 @@ IMPL_LINK( SmSymDefineDialog, StyleChangeHdl, ComboBox *, 
EMPTYARG pComboBox )
 {
     (void) pComboBox;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pComboBox == &aStyles, "Sm : falsches Argument");
+       DBG_ASSERT(pComboBox == &aStyles, "Sm : Wrong argument");
 #endif
 
        SelectStyle(aStyles.GetText());
@@ -1884,7 +1871,7 @@ IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control 
*, EMPTYARG )
 
        UpdateButtons();
 
-    // display Unicode position as symbol name while iterating over characters 
+    // display Unicode position as symbol name while iterating over characters
     const String aHex( String::CreateFromInt64( cChar, 16 ).ToUpperAscii() );
     const String aPattern( A2OU( aHex.Len() > 4 ? "Ux000000" : "Ux0000" ) );
     String aUnicodePos( aPattern.Copy( 0, aPattern.Len() - aHex.Len() ) );
@@ -1900,8 +1887,8 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, 
EMPTYARG pButton )
 {
     (void) pButton;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pButton == &aAddBtn, "Sm : falsches Argument");
-    DBG_ASSERT(aAddBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??");
+       DBG_ASSERT(pButton == &aAddBtn, "Sm : Wrong argument");
+    DBG_ASSERT(aAddBtn.IsEnabled(), "Sm : Voraussetzungen erfüllt?");
 #endif
 
     // add symbol
@@ -1915,9 +1902,9 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, 
EMPTYARG pButton )
     aSymbolName.SetText( aNewSymbol.GetName() );
     aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
 
-    // update list box entries
-    FillSymbolSets(aOldSymbolSets, sal_False);
-    FillSymbolSets(aSymbolSets,    sal_False);
+       // update list box entries
+       FillSymbolSets(aOldSymbolSets, sal_False);
+       FillSymbolSets(aSymbolSets,    sal_False);
        FillSymbols(aOldSymbols ,sal_False);
        FillSymbols(aSymbols    ,sal_False);
 
@@ -1929,37 +1916,37 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, 
EMPTYARG pButton )
 
 IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
 {
-    (void) pButton;
+       (void) pButton;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pButton == &aChangeBtn, "Sm : falsches Argument");
-    DBG_ASSERT(aChangeBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??");
+       DBG_ASSERT(pButton == &aChangeBtn, "Sm : Wrong argument");
+       DBG_ASSERT(aChangeBtn.IsEnabled(), "Sm : Voraussetzungen erfüllt?");
 #endif
 
-    // get new Sybol to use
-    //! get font from symbol-disp lay since charset-display does not keep
-    //! the bold attribut.
-    const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
+       // get new Symbol to use
+       //! get font from symbol-disp lay since charset-display does not keep
+       //! the bold attribute.
+       const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
             aCharsetDisplay.GetSelectCharacter(), 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() );
-    aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol, true );
+       // 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() );
+       aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol, true );
 
-    // clear display for original symbol if necessary
-    if (bNameChanged)
-        SetOrigSymbol(NULL, XubString());
+       // clear display for original symbol if necessary
+       if (bNameChanged)
+               SetOrigSymbol(NULL, XubString());
 
-    // update display of new symbol
-    aSymbolDisplay.SetSymbol( &aNewSymbol );
-    aSymbolName.SetText( aNewSymbol.GetName() );
-    aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
-    
-    // update list box entries
-    FillSymbolSets(aOldSymbolSets, sal_False);
-    FillSymbolSets(aSymbolSets,    sal_False);
+       // update display of new symbol
+       aSymbolDisplay.SetSymbol( &aNewSymbol );
+       aSymbolName.SetText( aNewSymbol.GetName() );
+       aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
+
+       // update list box entries
+       FillSymbolSets(aOldSymbolSets, sal_False);
+       FillSymbolSets(aSymbolSets,    sal_False);
     FillSymbols(aOldSymbols ,sal_False);
     FillSymbols(aSymbols    ,sal_False);
 
@@ -1973,8 +1960,8 @@ IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, 
EMPTYARG pButton )
 {
     (void) pButton;
 #if OSL_DEBUG_LEVEL > 1
-       DBG_ASSERT(pButton == &aDeleteBtn, "Sm : falsches Argument");
-    DBG_ASSERT(aDeleteBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??");
+       DBG_ASSERT(pButton == &aDeleteBtn, "Sm : Wrong argument");
+    DBG_ASSERT(aDeleteBtn.IsEnabled(), "Sm : Voraussetzungen erfüllt?");
 #endif
 
        if (pOrigSymbol)
@@ -2084,7 +2071,7 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
 
        pOrigSymbol = 0;
 
-    // auto completion is troublesome since that symbols character also gets 
automatically selected in the 
+    // auto completion is troublesome since that symbols character also gets 
automatically selected in the
     // display and if the user previously selected a character to 
define/redefine that one this is bad
     aOldSymbols.EnableAutocomplete( sal_False, sal_True );
     aSymbols   .EnableAutocomplete( sal_False, sal_True );
@@ -2148,7 +2135,7 @@ void SmSymDefineDialog::InitColor_Impl()
     aOldSymbolDisplay.SetTextColor( aTxtColor );
     aSymbolDisplay   .SetBackground( aWall );
     aSymbolDisplay   .SetTextColor( aTxtColor );
-    
+
     const Image &rArrowRight = bHighContrast ? aRigthArrow_Im_HC : 
aRigthArrow_Im;
     aRightArrow.SetImage( rArrowRight );
 }
@@ -2209,7 +2196,7 @@ sal_Bool SmSymDefineDialog::SelectSymbolSet(ComboBox 
&rComboBox,
 {
 #if OSL_DEBUG_LEVEL > 1
        DBG_ASSERT(&rComboBox == &aOldSymbolSets  ||  &rComboBox == 
&aSymbolSets,
-               "Sm : falsche ComboBox");
+               "Sm : Wrong comboBox");
 #endif
 
        // 'Normalisieren' des SymbolNamens (ohne leading und trailing 
Leerzeichen)
@@ -2232,16 +2219,16 @@ sal_Bool SmSymDefineDialog::SelectSymbolSet(ComboBox 
&rComboBox,
 
        sal_Bool  bIsOld = &rComboBox == &aOldSymbolSets;
 
-    // setzen des SymbolSet Namens an der zugehoerigen Darstellung
+    // setzen des SymbolSet Namens an der zugehörigen Darstellung
        FixedText &rFT = bIsOld ? aOldSymbolSetName : aSymbolSetName;
        rFT.SetText(rComboBox.GetText());
 
-    // setzen der zum SymbolSet gehoerenden Symbol Namen an der zugehoerigen
-       // Auswahbox
+    // setzen der zum SymbolSet gehörenden Symbol Namen an der zugehörigen
+       // Auswahlbox
        ComboBox  &rCB = bIsOld ? aOldSymbols : aSymbols;
        FillSymbols(rCB, sal_False);
 
-    // bei Wechsel des SymbolSets fuer das alte Zeichen ein gueltiges
+    // bei Wechsel des SymbolSets für das alte Zeichen ein gültiges
        // Symbol bzw keins zur Anzeige bringen
        if (bIsOld)
        {
@@ -2290,7 +2277,7 @@ sal_Bool SmSymDefineDialog::SelectSymbol(ComboBox 
&rComboBox,
 {
 #if OSL_DEBUG_LEVEL > 1
        DBG_ASSERT(&rComboBox == &aOldSymbols  ||  &rComboBox == &aSymbols,
-               "Sm : falsche ComboBox");
+               "Sm : Wrong comboBox");
 #endif
 
        // 'Normalisieren' des SymbolNamens (ohne Leerzeichen)
@@ -2462,5 +2449,4 @@ void SmSymDefineDialog::SelectChar(xub_Unicode cChar)
        UpdateButtons();
 }
 
-
-/**************************************************************************/
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/starmath/source/document.cxx 
b/main/starmath/source/document.cxx
index b0baacde5d..f02e45db53 100644
--- a/main/starmath/source/document.cxx
+++ b/main/starmath/source/document.cxx
@@ -19,12 +19,9 @@
  *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_starmath.hxx"
 
-
 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
 #include <com/sun/star/lang/Locale.hpp>
 #include <com/sun/star/uno/Any.h>
@@ -110,8 +107,6 @@ static const char __FAR_DATA pStarMathDoc[] = 
"StarMathDocument";
 #define SmDocShell
 #include "smslots.hxx"
 
-////////////////////////////////////////////////////////////
-
 
 TYPEINIT1( SmDocShell, SfxObjectShell );
 
@@ -178,52 +173,52 @@ void SmDocShell::SetText(const String& rBuffer)
                if( pViewSh )
                {
                        
pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT);
-            if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
-            {
-                // have SwOleClient::FormatChanged() to align the modified 
formula properly
-                // even if the vis area does not change (e.g. when formula 
text changes from
-                // "{a over b + c} over d" to "d over {a over b + c}"
-                SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, 
GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
+                       if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+                       {
+                               // have SwOleClient::FormatChanged() to align 
the modified formula properly
+                               // even if the vis area does not change (e.g. 
when formula text changes from
+                               // "{a over b + c} over d" to "d over {a over b 
+ c}"
+                               SFX_APP()->NotifyEvent(SfxEventHint( 
SFX_EVENT_VISAREACHANGED, 
GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
 
-                Repaint();
-            }
-            else
-                pViewSh->GetGraphicWindow().Invalidate();
-        }
+                               Repaint();
+                       }
+                       else
+                               pViewSh->GetGraphicWindow().Invalidate();
+               }
 
                if ( bIsEnabled )
                        EnableSetModified( bIsEnabled );
                SetModified(sal_True);
 
-        // launch accessible event if necessary
-        SmGraphicAccessible *pAcc = pViewSh ? 
pViewSh->GetGraphicWindow().GetAccessible_Impl() : 0;
-        if (pAcc)
-        {
+               // launch accessible event if necessary
+               SmGraphicAccessible *pAcc = pViewSh ? 
pViewSh->GetGraphicWindow().GetAccessible_Impl() : 0;
+               if (pAcc)
+               {
                        Any aOldValue, aNewValue;
                        if ( 
comphelper::OCommonAccessibleText::implInitTextChangedEvent( aText, rBuffer, 
aOldValue, aNewValue ) )
                        {
                                pAcc->LaunchEvent( 
AccessibleEventId::TEXT_CHANGED,
                                                aOldValue, aNewValue );
                        }
-        }
+               }
 
-        if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
-            OnDocumentPrinterChanged(0);
+               if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+                       OnDocumentPrinterChanged(0);
        }
 }
 
 void SmDocShell::SetFormat(SmFormat& rFormat)
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetFormat" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetFormat" );
 
        aFormat = rFormat;
        SetFormulaArranged( sal_False );
        SetModified( sal_True );
 
-    nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
+       nModifyCount++; //! see comment for SID_GAPHIC_SM in 
SmDocShell::GetState
 
-    // don't use SmGetActiveView since the view shell might not be active (0 
pointer)
-    // if for example the Basic Macro dialog currently has the focus. Thus:
+       // don't use SmGetActiveView since the view shell might not be active 
(0 pointer)
+       // if for example the Basic Macro dialog currently has the focus. Thus:
        SfxViewFrame* pFrm = SfxViewFrame::GetFirst( this );
        while (pFrm)
        {
@@ -234,110 +229,110 @@ void SmDocShell::SetFormat(SmFormat& rFormat)
 
 String SmDocShell::GetAccessibleText()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetAccessibleText" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetAccessibleText" );
 
-    if (!IsFormulaArranged())
-        ArrangeFormula();
-    if (0 == aAccText.Len())
-    {
-        DBG_ASSERT( pTree, "Tree missing" );
-        if (pTree)
-            pTree->GetAccessibleText( aAccText );
-    }
-    return aAccText;
+       if (!IsFormulaArranged())
+               ArrangeFormula();
+       if (0 == aAccText.Len())
+       {
+               DBG_ASSERT( pTree, "Tree missing" );
+               if (pTree)
+                       pTree->GetAccessibleText( aAccText );
+       }
+       return aAccText;
 }
 
 void SmDocShell::Parse()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Parse" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Parse" );
 
        if (pTree)
                delete pTree;
-    ReplaceBadChars();
+       ReplaceBadChars();
        pTree = aInterpreter.Parse(aText);
        nModifyCount++; //! see comment for SID_GAPHIC_SM in 
SmDocShell::GetState
-    SetFormulaArranged( sal_False );
+       SetFormulaArranged( sal_False );
 
-    aUsedSymbols = aInterpreter.GetUsedSymbols();
+       aUsedSymbols = aInterpreter.GetUsedSymbols();
 }
 
 
 void SmDocShell::ArrangeFormula()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ArrangeFormula" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ArrangeFormula" );
 
        if (IsFormulaArranged())
                return;
 
        //! Nur für die Dauer der Existenz dieses Objekts sind am Drucker die
        //! richtigen Einstellungen garantiert.
-    SmPrinterAccess  aPrtAcc(*this);
+       SmPrinterAccess  aPrtAcc(*this);
 //     OutputDevice    *pOutDev = aPrtAcc.GetPrinter();
-    OutputDevice* pOutDev = aPrtAcc.GetRefDev();
+       OutputDevice* pOutDev = aPrtAcc.GetRefDev();
 
        if (!pOutDev)
-    {
+       {
 #if OSL_DEBUG_LEVEL > 1
                DBG_ERROR("!! SmDocShell::ArrangeFormula: reference device 
missing !!");
 #endif
-    }
+       }
 
-    // falls nötig ein anderes OutputDevice holen für das formatiert wird
+       // falls nötig ein anderes OutputDevice holen für das formatiert wird
        if (!pOutDev)
        {
                SmViewShell *pView = SmGetActiveView();
                if (pView)
                        pOutDev = &pView->GetGraphicWindow();
                else
-        {
-            pOutDev = &SM_MOD()->GetDefaultVirtualDev();
+               {
+                       pOutDev = &SM_MOD()->GetDefaultVirtualDev();
                        pOutDev->SetMapMode( MapMode(MAP_100TH_MM) );
                }
        }
        DBG_ASSERT(pOutDev->GetMapMode().GetMapUnit() == MAP_100TH_MM,
-                          "Sm : falscher MapMode");
+                          "Sm : Wrong MapMode");
 
        const SmFormat &rFormat = GetFormat();
        pTree->Prepare(rFormat, *this);
 
-    // format/draw formulas always from left to right,
-    // and numbers should not be converted
-    sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
-    pOutDev->SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
-    sal_Int16 nDigitLang = pOutDev->GetDigitLanguage();
-    pOutDev->SetDigitLanguage( LANGUAGE_ENGLISH );
-    //
-    pTree->Arrange(*pOutDev, rFormat);
-    //
-    pOutDev->SetLayoutMode( nLayoutMode );
-    pOutDev->SetDigitLanguage( nDigitLang );
+       // format/draw formulas always from left to right,
+       // and numbers should not be converted
+       sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
+       pOutDev->SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
+       sal_Int16 nDigitLang = pOutDev->GetDigitLanguage();
+       pOutDev->SetDigitLanguage( LANGUAGE_ENGLISH );
+       //
+       pTree->Arrange(*pOutDev, rFormat);
+       //
+       pOutDev->SetLayoutMode( nLayoutMode );
+       pOutDev->SetDigitLanguage( nDigitLang );
 
        SetFormulaArranged(sal_True);
 
-    // invalidate accessible text
-    aAccText = String();
+       // invalidate accessible text
+       aAccText = String();
 }
 
 
 void SetEditEngineDefaultFonts(
-        EditEngine &/*rEditEngine*/,
-        SfxItemPool &rEditEngineItemPool )
+               EditEngine &/*rEditEngine*/,
+               SfxItemPool &rEditEngineItemPool )
 {
-        //
-        // set fonts to be used
-        //
-        SvtLinguOptions aOpt;
-        SvtLinguConfig().GetOptions( aOpt );
-        //
-        struct FontDta {
-            sal_Int16       nFallbackLang;
-            sal_Int16       nLang;
-            sal_uInt16      nFontType;
-            sal_uInt16      nFontInfoId;
-            } aTable[3] =
-        {
-            // info to get western font to be used
-            {   LANGUAGE_ENGLISH_US,    LANGUAGE_NONE,
+               //
+               // set fonts to be used
+               //
+               SvtLinguOptions aOpt;
+               SvtLinguConfig().GetOptions( aOpt );
+               //
+               struct FontDta {
+                       sal_Int16       nFallbackLang;
+                       sal_Int16       nLang;
+                       sal_uInt16      nFontType;
+                       sal_uInt16      nFontInfoId;
+                       } aTable[3] =
+               {
+                       // info to get western font to be used
+                       {   LANGUAGE_ENGLISH_US,    LANGUAGE_NONE,
                 DEFAULTFONT_FIXED,      EE_CHAR_FONTINFO },
             // info to get CJK font to be used
             {   LANGUAGE_JAPANESE,      LANGUAGE_NONE,
@@ -390,17 +385,17 @@ void SetEditEngineDefaultFonts(
 
 EditEngine& SmDocShell::GetEditEngine()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetEditEngine" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetEditEngine" );
 
        if (!pEditEngine)
        {
-        //!
-        //! see also SmEditWindow::DataChanged !
-        //!
+               //!
+               //! see also SmEditWindow::DataChanged !
+               //!
 
                pEditEngineItemPool = EditEngine::CreatePool();
 
-        SetEditEngineDefaultFonts( *pEditEngine, *pEditEngineItemPool );
+               SetEditEngineDefaultFonts( *pEditEngine, *pEditEngineItemPool );
 
                pEditEngine = new EditEngine( pEditEngineItemPool );
 
@@ -420,11 +415,11 @@ EditEngine& SmDocShell::GetEditEngine()
 
                pEditEngine->EraseVirtualDevice();
 
-        // set initial text if the document already has some...
-        // (may be the case when reloading a doc)
-        String aTxt( GetText() );
-        if (aTxt.Len())
-            pEditEngine->SetText( aTxt );
+               // set initial text if the document already has some...
+               // (may be the case when reloading a doc)
+               String aTxt( GetText() );
+               if (aTxt.Len())
+                       pEditEngine->SetText( aTxt );
 
                pEditEngine->ClearModifyFlag();
 
@@ -438,7 +433,7 @@ EditEngine& SmDocShell::GetEditEngine()
 
 SfxItemPool& SmDocShell::GetEditEngineItemPool()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetEditEngineItemPool" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: 
SmDocShell::GetEditEngineItemPool" );
 
        if (!pEditEngineItemPool)
                GetEditEngine();
@@ -449,21 +444,21 @@ SfxItemPool& SmDocShell::GetEditEngineItemPool()
 
 void SmDocShell::Draw(OutputDevice &rDev, Point &rPosition)
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
 
-    if (!pTree)
+       if (!pTree)
                Parse();
        DBG_ASSERT(pTree, "Sm : NULL pointer");
 
        if (!IsFormulaArranged())
                ArrangeFormula();
 
-       //Problem: Was passiert mit dem WYSIWYG? Wir haben waehrend wir inplace 
aktiv
-       //sind kein Referenzdevice und sind auch nicht darauf ausgerichtet. Es 
kann
-       //also jetzt eine Differenz zwischen der VisArea (spricht die Groesse 
im Client)
-       //und der jetzt vorliegenden Groesse geben.
-       //Idee: Die Differenz koennte, zumindest behelfsmaessig, mit 
SmNod::SetSize
-       //angepasst werden.
+       // Problem: Was passiert mit dem WYSIWYG? Wir haben während wir inplace 
aktiv
+       // sind kein Referenzdevice und sind auch nicht darauf ausgerichtet. Es 
kann
+       // also jetzt eine Differenz zwischen der VisArea (spricht die Groesse 
im Client)
+       // und der jetzt vorliegenden Groesse geben.
+       // Idee: Die Differenz koennte, zumindest behelfsmässig, mit 
SmNod::SetSize
+       // angepasst werden.
 
        rPosition.X() += aFormat.GetDistance( DIS_LEFTSPACE );
        rPosition.Y() += aFormat.GetDistance( DIS_TOPSPACE      );
@@ -494,15 +489,15 @@ void SmDocShell::Draw(OutputDevice &rDev, Point 
&rPosition)
     rDev.SetLayoutMode( nLayoutMode );
     rDev.SetDigitLanguage( nDigitLang );
 
-    if (bRestoreDrawMode)
-        rDev.SetDrawMode( nOldDrawMode );
+       if (bRestoreDrawMode)
+               rDev.SetDrawMode( nOldDrawMode );
 }
 
 
 
 Size SmDocShell::GetSize()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetSize" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetSize" );
 
        Size aRet;
 
@@ -530,14 +525,13 @@ Size SmDocShell::GetSize()
        return aRet;
 }
 
-////////////////////////////////////////
 
 SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
 {
        if ( 0 != (pPrinter = rDocShell.GetPrt()) )
        {
                pPrinter->Push( PUSH_MAPMODE );
-        if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
+               if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
                {
                        // if it is an embedded object (without its own printer)
                        // we change the MapMode temporarily.
@@ -559,11 +553,11 @@ SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
                        }
                }
        }
-    if ( 0 != (pRefDev = rDocShell.GetRefDev()) && pPrinter != pRefDev )
-    {
-        pRefDev->Push( PUSH_MAPMODE );
-        if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
-        {
+       if ( 0 != (pRefDev = rDocShell.GetRefDev()) && pPrinter != pRefDev )
+       {
+               pRefDev->Push( PUSH_MAPMODE );
+               if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
+               {
             // if it is an embedded object (without its own printer)
             // we change the MapMode temporarily.
             //!If it is a document with its own printer the MapMode should
@@ -590,27 +584,26 @@ SmPrinterAccess::~SmPrinterAccess()
 {
        if ( pPrinter )
                pPrinter->Pop();
-    if ( pRefDev && pRefDev != pPrinter )
-        pRefDev->Pop();
+       if ( pRefDev && pRefDev != pPrinter )
+               pRefDev->Pop();
 }
 
-////////////////////////////////////////
 
 Printer* SmDocShell::GetPrt()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetPrt" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetPrt" );
 
-    if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+       if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
        {
-               //Normalerweise wird der Printer vom Server besorgt. Wenn 
dieser aber
-               //keinen liefert (weil etwa noch keine connection da ist), kann 
es
-               //dennoch sein, dass wir den Printer kennen, denn dieser wird in
-               //OnDocumentPrinterChanged vom Server durchgereicht und dann 
temporaer
-               //festgehalten.
-        Printer *pPrt = GetDocumentPrinter();
-        if ( !pPrt && pTmpPrinter )
-            pPrt = pTmpPrinter;
-        return pPrt;
+               // Normalerweise wird der Printer vom Server besorgt. Wenn 
dieser aber
+               // keinen liefert (weil etwa noch keine connection da ist), 
kann es
+               // dennoch sein, dass wir den Printer kennen, denn dieser wird 
in
+               // OnDocumentPrinterChanged vom Server durchgereicht und dann 
temporär
+               // festgehalten.
+               Printer *pPrt = GetDocumentPrinter();
+               if ( !pPrt && pTmpPrinter )
+                       pPrt = pTmpPrinter;
+               return pPrt;
        }
        else if ( !pPrinter )
        {
@@ -625,7 +618,7 @@ Printer* SmDocShell::GetPrt()
                            SID_SAVE_ONLY_USED_SYMBOLS, 
SID_SAVE_ONLY_USED_SYMBOLS,
                                                   0);
 
-        SmModule *pp = SM_MOD();
+               SmModule *pp = SM_MOD();
                pp->GetConfig()->ConfigToItemSet(*pOptions);
                pPrinter = new SfxPrinter(pOptions);
                pPrinter->SetMapMode( MapMode(MAP_100TH_MM) );
@@ -635,7 +628,7 @@ Printer* SmDocShell::GetPrt()
 
 OutputDevice* SmDocShell::GetRefDev()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetRefDev" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetRefDev" );
 
     if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
     {
@@ -644,29 +637,29 @@ OutputDevice* SmDocShell::GetRefDev()
             return pOutDev;
     }
 
-    return GetPrt();
+       return GetPrt();
 }
 
 
 void SmDocShell::SetPrinter( SfxPrinter *pNew )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetPrinter" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetPrinter" );
 
        delete pPrinter;
-       pPrinter = pNew;        //Eigentumsuebergang!
+       pPrinter = pNew;        // Eigentumsübergang!
        pPrinter->SetMapMode( MapMode(MAP_100TH_MM) );
        SetFormulaArranged(sal_False);
-    Repaint();
+       Repaint();
 }
 
 void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: 
SmDocShell::OnDocumentPrinterChanged" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: 
SmDocShell::OnDocumentPrinterChanged" );
 
-    pTmpPrinter = pPrt;
+       pTmpPrinter = pPrt;
        SetFormulaArranged(sal_False);
        Size aOldSize = GetVisArea().GetSize();
-    Repaint();
+       Repaint();
        if( aOldSize != GetVisArea().GetSize() && aText.Len() )
                SetModified( sal_True );
        pTmpPrinter = 0;
@@ -674,19 +667,19 @@ void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
 
 void SmDocShell::Repaint()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Repaint" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Repaint" );
 
        sal_Bool bIsEnabled = IsEnableSetModified();
        if ( bIsEnabled )
                EnableSetModified( sal_False );
 
-    SetFormulaArranged( sal_False );
+       SetFormulaArranged( sal_False );
 
        Size aVisSize = GetSize();
        SetVisAreaSize( aVisSize );
        SmViewShell *pViewSh = SmGetActiveView();
        if (pViewSh)
-        pViewSh->GetGraphicWindow().Invalidate();
+               pViewSh->GetGraphicWindow().Invalidate();
 
        if ( bIsEnabled )
                EnableSetModified( bIsEnabled );
@@ -696,19 +689,19 @@ void SmDocShell::Repaint()
 SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
        SfxObjectShell( i_nSfxCreationFlags ),
        pTree                           ( 0 ),
-    pEditEngineItemPool ( 0 ),
-    pEditEngine         ( 0 ),
+       pEditEngineItemPool ( 0 ),
+       pEditEngine                     ( 0 ),
        pPrinter                        ( 0 ),
-    pTmpPrinter         ( 0 ),
+       pTmpPrinter                     ( 0 ),
        nModifyCount            ( 0 ),
        bIsFormulaArranged      ( sal_False )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SmDocShell" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SmDocShell" );
 
        SetPool(&SFX_APP()->GetPool());
 
-    SmModule *pp = SM_MOD();
-    aFormat = pp->GetConfig()->GetStandardFormat();
+       SmModule *pp = SM_MOD();
+       aFormat = pp->GetConfig()->GetStandardFormat();
 
        StartListening(aFormat);
        StartListening(*pp->GetConfig());
@@ -720,9 +713,9 @@ SmDocShell::SmDocShell( const sal_uInt64 
i_nSfxCreationFlags ) :
 
 SmDocShell::~SmDocShell()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::~SmDocShell" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::~SmDocShell" );
 
-    SmModule *pp = SM_MOD();
+       SmModule *pp = SM_MOD();
 
        EndListening(aFormat);
        EndListening(*pp->GetConfig());
@@ -736,7 +729,7 @@ SmDocShell::~SmDocShell()
 
 sal_Bool SmDocShell::SetData( const String& rData )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetData" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetData" );
 
        SetText( rData );
        return sal_True;
@@ -745,53 +738,53 @@ sal_Bool SmDocShell::SetData( const String& rData )
 
 sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertFrom" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertFrom" );
 
        sal_Bool         bSuccess = sal_False;
        const String& rFltName = rMedium.GetFilter()->GetFilterName();
 
-    DBG_ASSERT( !rFltName.EqualsAscii( STAROFFICE_XML ), "Wrong filter!");
+       DBG_ASSERT( !rFltName.EqualsAscii( STAROFFICE_XML ), "Wrong filter!");
 
-    if ( rFltName.EqualsAscii( MATHML_XML ) )
+       if ( rFltName.EqualsAscii( MATHML_XML ) )
        {
                if (pTree)
                {
                        delete pTree;
                        pTree = 0;
                }
-        Reference<com::sun::star::frame::XModel> xModel(GetModel());
-        SmXMLImportWrapper aEquation(xModel);
-        bSuccess = 0 == aEquation.Import(rMedium);
+               Reference<com::sun::star::frame::XModel> xModel(GetModel());
+               SmXMLImportWrapper aEquation(xModel);
+               bSuccess = 0 == aEquation.Import(rMedium);
        }
        else
        {
                SvStream *pStream = rMedium.GetInStream();
-        if ( pStream )
+               if ( pStream )
                {
-            if ( SotStorage::IsStorageFile( pStream ) )
-            {
-                SvStorageRef aStorage = new SotStorage( pStream, sal_False );
-                if ( aStorage->IsStream( C2S( "Equation Native" ) ) )
-                {
-                    // is this a MathType Storage?
-                    MathType aEquation( aText );
-                    if ( sal_True == (bSuccess = (1 == aEquation.Parse( 
aStorage )) ))
-                        Parse();
-                }
-            }
-            else
-            {
-                //bSuccess = ImportSM20File( pStream );
-            }
+                       if ( SotStorage::IsStorageFile( pStream ) )
+                       {
+                               SvStorageRef aStorage = new SotStorage( 
pStream, sal_False );
+                               if ( aStorage->IsStream( C2S( "Equation Native" 
) ) )
+                               {
+                                       // is this a MathType Storage?
+                                       MathType aEquation( aText );
+                                       if ( sal_True == (bSuccess = (1 == 
aEquation.Parse( aStorage )) ))
+                                               Parse();
+                               }
+                       }
+                       else
+                       {
+                               //bSuccess = ImportSM20File( pStream );
+                       }
                }
        }
 
-    if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
-    {
-        //???OnDocumentPrinterChanged(0);
-        SetFormulaArranged( sal_False );
-        Repaint();
-    }
+       if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+       {
+               //???OnDocumentPrinterChanged(0);
+               SetFormulaArranged( sal_False );
+               Repaint();
+       }
 
        FinishedLoading( SFX_LOADED_ALL );
        return bSuccess;
@@ -800,10 +793,10 @@ sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
 
 sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& 
xStorage )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::InitNew" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::InitNew" );
 
        sal_Bool bRet = sal_False;
-    if ( SfxObjectShell::InitNew( xStorage ) )
+       if ( SfxObjectShell::InitNew( xStorage ) )
        {
                bRet = sal_True;
                SetVisArea(Rectangle(Point(0, 0), Size(2000, 1000)));
@@ -814,39 +807,39 @@ sal_Bool SmDocShell::InitNew( const uno::Reference < 
embed::XStorage >& xStorage
 
 sal_Bool SmDocShell::Load( SfxMedium& rMedium )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Load" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Load" );
 
        sal_Bool bRet = sal_False;
-    if( SfxObjectShell::Load( rMedium ))
+       if( SfxObjectShell::Load( rMedium ))
        {
-        uno::Reference < embed::XStorage > xStorage = 
GetMedium()->GetStorage();
-        uno::Reference < container::XNameAccess > xAccess (xStorage, 
uno::UNO_QUERY);
-        if (
-            (
-             xAccess->hasByName( C2S( "content.xml" ) ) &&
-             xStorage->isStreamElement( C2S( "content.xml" ) )
-            ) ||
-            (
-             xAccess->hasByName( C2S( "Content.xml" ) ) &&
-             xStorage->isStreamElement( C2S( "Content.xml" ) )
-            )
-           )
-        {
-            // is this a fabulous math package ?
-            Reference<com::sun::star::frame::XModel> xModel(GetModel());
-            SmXMLImportWrapper aEquation(xModel);
-            sal_uLong nError = aEquation.Import(rMedium);
-            bRet = 0 == nError;
-            SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
OSL_LOG_PREFIX ) ) );
-        }
+               uno::Reference < embed::XStorage > xStorage = 
GetMedium()->GetStorage();
+               uno::Reference < container::XNameAccess > xAccess (xStorage, 
uno::UNO_QUERY);
+               if (
+                       (
+                        xAccess->hasByName( C2S( "content.xml" ) ) &&
+                        xStorage->isStreamElement( C2S( "content.xml" ) )
+                       ) ||
+                       (
+                        xAccess->hasByName( C2S( "Content.xml" ) ) &&
+                        xStorage->isStreamElement( C2S( "Content.xml" ) )
+                       )
+                  )
+               {
+                       // is this a fabulous math package?
+                       Reference<com::sun::star::frame::XModel> 
xModel(GetModel());
+                       SmXMLImportWrapper aEquation(xModel);
+                       sal_uLong nError = aEquation.Import(rMedium);
+                       bRet = 0 == nError;
+                       SetError( nError, ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+               }
        }
 
-    if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
-    {
-        //???OnDocumentPrinterChanged(0);
+       if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+       {
+               //???OnDocumentPrinterChanged(0);
                SetFormulaArranged( sal_False );
-        Repaint();
-    }
+               Repaint();
+       }
 
        FinishedLoading( SFX_LOADED_ALL );
        return bRet;
@@ -856,22 +849,22 @@ sal_Bool SmDocShell::Load( SfxMedium& rMedium )
 
 sal_Bool SmDocShell::Save()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Save" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Save" );
 
-    //! apply latest changes if necessary
-    UpdateText();
+       //! apply latest changes if necessary
+       UpdateText();
 
-    if ( SfxObjectShell::Save() )
+       if ( SfxObjectShell::Save() )
        {
                if (!pTree)
                        Parse();
                if( pTree && !IsFormulaArranged() )
                        ArrangeFormula();
 
-        Reference<com::sun::star::frame::XModel> xModel(GetModel());
-        SmXMLExportWrapper aEquation(xModel);
-        aEquation.SetFlat(sal_False);
-        return aEquation.Export(*GetMedium());
+               Reference<com::sun::star::frame::XModel> xModel(GetModel());
+               SmXMLExportWrapper aEquation(xModel);
+               aEquation.SetFlat(sal_False);
+               return aEquation.Export(*GetMedium());
        }
 
        return sal_False;
@@ -914,25 +907,25 @@ sal_Bool SmDocShell::ReplaceBadChars()
 
 void SmDocShell::UpdateText()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::UpdateText" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::UpdateText" );
 
-    if (pEditEngine && pEditEngine->IsModified())
-    {
-        String aEngTxt( pEditEngine->GetText( LINEEND_LF ) );
-        if (GetText() != aEngTxt)
-            SetText( aEngTxt );
-    }
+       if (pEditEngine && pEditEngine->IsModified())
+       {
+               String aEngTxt( pEditEngine->GetText( LINEEND_LF ) );
+               if (GetText() != aEngTxt)
+                       SetText( aEngTxt );
+       }
 }
 
 
 sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveAs" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveAs" );
 
        sal_Bool bRet = sal_False;
 
-    //! apply latest changes if necessary
-    UpdateText();
+       //! apply latest changes if necessary
+       UpdateText();
 
        if ( SfxObjectShell::SaveAs( rMedium ) )
        {
@@ -941,17 +934,17 @@ sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
                if( pTree && !IsFormulaArranged() )
                        ArrangeFormula();
 
-        Reference<com::sun::star::frame::XModel> xModel(GetModel());
-        SmXMLExportWrapper aEquation(xModel);
-        aEquation.SetFlat(sal_False);
-        bRet = aEquation.Export(rMedium);
+               Reference<com::sun::star::frame::XModel> xModel(GetModel());
+               SmXMLExportWrapper aEquation(xModel);
+               aEquation.SetFlat(sal_False);
+               bRet = aEquation.Export(rMedium);
        }
        return bRet;
 }
 
 sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertTo" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertTo" );
 
        sal_Bool bRet = sal_False;
        const SfxFilter* pFlt = rMedium.GetFilter();
@@ -965,29 +958,29 @@ sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
                const String& rFltName = pFlt->GetFilterName();
                if(rFltName.EqualsAscii( STAROFFICE_XML ))
                {
-            Reference<com::sun::star::frame::XModel> xModel(GetModel());
-            SmXMLExportWrapper aEquation(xModel);
+                       Reference<com::sun::star::frame::XModel> 
xModel(GetModel());
+                       SmXMLExportWrapper aEquation(xModel);
                        aEquation.SetFlat(sal_False);
                        bRet = aEquation.Export(rMedium);
                }
                else if(rFltName.EqualsAscii( MATHML_XML ))
                {
-            Reference<com::sun::star::frame::XModel> xModel(GetModel());
-            SmXMLExportWrapper aEquation(xModel);
+                       Reference<com::sun::star::frame::XModel> 
xModel(GetModel());
+                       SmXMLExportWrapper aEquation(xModel);
                        aEquation.SetFlat(sal_True);
                        bRet = aEquation.Export(rMedium);
                }
-        else if( pFlt->GetFilterName().EqualsAscii("MathType 3.x"))
-            bRet = WriteAsMathType3( rMedium );
+               else if( pFlt->GetFilterName().EqualsAscii("MathType 3.x"))
+                       bRet = WriteAsMathType3( rMedium );
        }
        return bRet;
 }
 
 sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< 
::com::sun::star::embed::XStorage >& xStorage )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveCompleted" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveCompleted" );
 
-    if( SfxObjectShell::SaveCompleted( xStorage ))
+       if( SfxObjectShell::SaveCompleted( xStorage ))
                return sal_True;
 
        return sal_False;
@@ -996,66 +989,66 @@ sal_Bool SmDocShell::SaveCompleted( const 
::com::sun::star::uno::Reference< ::co
 
 void SmDocShell::Execute(SfxRequest& rReq)
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Execute" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Execute" );
 
        switch (rReq.GetSlot())
        {
                case SID_TEXTMODE:
                {
-            SmFormat aOldFormat  = GetFormat();
-            SmFormat aNewFormat( aOldFormat );
-            aNewFormat.SetTextmode(!aOldFormat.IsTextmode());
+                       SmFormat aOldFormat  = GetFormat();
+                       SmFormat aNewFormat( aOldFormat );
+                       aNewFormat.SetTextmode(!aOldFormat.IsTextmode());
 
-            ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
-            if (pTmpUndoMgr)
-                pTmpUndoMgr->AddUndoAction(
-                    new SmFormatAction(this, aOldFormat, aNewFormat));
+                       ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
+                       if (pTmpUndoMgr)
+                               pTmpUndoMgr->AddUndoAction(
+                                       new SmFormatAction(this, aOldFormat, 
aNewFormat));
 
-            SetFormat( aNewFormat );
-            Repaint();
+                       SetFormat( aNewFormat );
+                       Repaint();
                }
                break;
 
                case SID_AUTO_REDRAW :
                {
-            SmModule *pp = SM_MOD();
+                       SmModule *pp = SM_MOD();
                        sal_Bool bRedraw = pp->GetConfig()->IsAutoRedraw();
                        pp->GetConfig()->SetAutoRedraw(!bRedraw);
                }
                break;
 
                case SID_LOADSYMBOLS:
-            LoadSymbols();
+                       LoadSymbols();
                break;
 
                case SID_SAVESYMBOLS:
-            SaveSymbols();
+                       SaveSymbols();
                break;
 
                case SID_FONT:
                {
-            // get device used to retrieve the FontList
-            OutputDevice *pDev = GetPrinter();
-            if (!pDev || pDev->GetDevFontCount() == 0)
-                pDev = &SM_MOD()->GetDefaultVirtualDev();
-            DBG_ASSERT (pDev, "device for font list missing" );
+                       // get device used to retrieve the FontList
+                       OutputDevice *pDev = GetPrinter();
+                       if (!pDev || pDev->GetDevFontCount() == 0)
+                               pDev = &SM_MOD()->GetDefaultVirtualDev();
+                       DBG_ASSERT (pDev, "device for font list missing" );
 
-            SmFontTypeDialog *pFontTypeDialog = new SmFontTypeDialog( NULL, 
pDev );
+                       SmFontTypeDialog *pFontTypeDialog = new 
SmFontTypeDialog( NULL, pDev );
 
-            SmFormat aOldFormat  = GetFormat();
-            pFontTypeDialog->ReadFrom( aOldFormat );
+                       SmFormat aOldFormat  = GetFormat();
+                       pFontTypeDialog->ReadFrom( aOldFormat );
                        if (pFontTypeDialog->Execute() == RET_OK)
                        {
-                SmFormat aNewFormat( aOldFormat );
+                               SmFormat aNewFormat( aOldFormat );
 
                                pFontTypeDialog->WriteTo(aNewFormat);
-                ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
-                if (pTmpUndoMgr)
-                    pTmpUndoMgr->AddUndoAction(
+                               ::svl::IUndoManager *pTmpUndoMgr = 
GetUndoManager();
+                               if (pTmpUndoMgr)
+                                       pTmpUndoMgr->AddUndoAction(
                                                new SmFormatAction(this, 
aOldFormat, aNewFormat));
 
                                SetFormat( aNewFormat );
-                Repaint();
+                               Repaint();
                        }
                        delete pFontTypeDialog;
                }
@@ -1065,21 +1058,21 @@ void SmDocShell::Execute(SfxRequest& rReq)
                {
                        SmFontSizeDialog *pFontSizeDialog = new 
SmFontSizeDialog(NULL);
 
-            SmFormat aOldFormat  = GetFormat();
-            pFontSizeDialog->ReadFrom( aOldFormat );
+                       SmFormat aOldFormat  = GetFormat();
+                       pFontSizeDialog->ReadFrom( aOldFormat );
                        if (pFontSizeDialog->Execute() == RET_OK)
                        {
-                SmFormat aNewFormat( aOldFormat );
+                               SmFormat aNewFormat( aOldFormat );
 
                                pFontSizeDialog->WriteTo(aNewFormat);
 
-                ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
-                if (pTmpUndoMgr)
-                    pTmpUndoMgr->AddUndoAction(
+                               ::svl::IUndoManager *pTmpUndoMgr = 
GetUndoManager();
+                               if (pTmpUndoMgr)
+                                       pTmpUndoMgr->AddUndoAction(
                                                new SmFormatAction(this, 
aOldFormat, aNewFormat));
 
                                SetFormat( aNewFormat );
-                Repaint();
+                               Repaint();
                        }
                        delete pFontSizeDialog;
                }
@@ -1089,21 +1082,21 @@ void SmDocShell::Execute(SfxRequest& rReq)
                {
                        SmDistanceDialog *pDistanceDialog = new 
SmDistanceDialog(NULL);
 
-            SmFormat aOldFormat  = GetFormat();
-            pDistanceDialog->ReadFrom( aOldFormat );
+                       SmFormat aOldFormat  = GetFormat();
+                       pDistanceDialog->ReadFrom( aOldFormat );
                        if (pDistanceDialog->Execute() == RET_OK)
                        {
-                SmFormat aNewFormat( aOldFormat );
+                               SmFormat aNewFormat( aOldFormat );
 
                                pDistanceDialog->WriteTo(aNewFormat);
 
-                ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
-                if (pTmpUndoMgr)
-                    pTmpUndoMgr->AddUndoAction(
+                               ::svl::IUndoManager *pTmpUndoMgr = 
GetUndoManager();
+                               if (pTmpUndoMgr)
+                                       pTmpUndoMgr->AddUndoAction(
                                                new SmFormatAction(this, 
aOldFormat, aNewFormat));
 
                                SetFormat( aNewFormat );
-                Repaint();
+                               Repaint();
                        }
                        delete pDistanceDialog;
                }
@@ -1113,26 +1106,26 @@ void SmDocShell::Execute(SfxRequest& rReq)
                {
                        SmAlignDialog *pAlignDialog = new SmAlignDialog(NULL);
 
-            SmFormat aOldFormat  = GetFormat();
-            pAlignDialog->ReadFrom( aOldFormat );
+                       SmFormat aOldFormat  = GetFormat();
+                       pAlignDialog->ReadFrom( aOldFormat );
                        if (pAlignDialog->Execute() == RET_OK)
                        {
-                SmFormat aNewFormat( aOldFormat );
+                               SmFormat aNewFormat( aOldFormat );
 
                                pAlignDialog->WriteTo(aNewFormat);
 
-                SmModule *pp = SM_MOD();
-                SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
-                pAlignDialog->WriteTo( aFmt );
-                pp->GetConfig()->SetStandardFormat( aFmt );
+                               SmModule *pp = SM_MOD();
+                               SmFormat aFmt( 
pp->GetConfig()->GetStandardFormat() );
+                               pAlignDialog->WriteTo( aFmt );
+                               pp->GetConfig()->SetStandardFormat( aFmt );
 
-                ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
-                if (pTmpUndoMgr)
-                    pTmpUndoMgr->AddUndoAction(
-                        new SmFormatAction(this, aOldFormat, aNewFormat));
+                               ::svl::IUndoManager *pTmpUndoMgr = 
GetUndoManager();
+                               if (pTmpUndoMgr)
+                                       pTmpUndoMgr->AddUndoAction(
+                                               new SmFormatAction(this, 
aOldFormat, aNewFormat));
 
                                SetFormat( aNewFormat );
-                Repaint();
+                               Repaint();
                        }
                        delete pAlignDialog;
                }
@@ -1149,8 +1142,8 @@ void SmDocShell::Execute(SfxRequest& rReq)
                case SID_UNDO:
                case SID_REDO:
                {
-            ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager();
-            if( pTmpUndoMgr )
+                       ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager();
+                       if( pTmpUndoMgr )
                        {
                                sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
                                const SfxItemSet* pArgs = rReq.GetArgs();
@@ -1163,30 +1156,30 @@ void SmDocShell::Execute(SfxRequest& rReq)
                                sal_uInt16 nCount;
                                if( SID_UNDO == rReq.GetSlot() )
                                {
-                    nCount = pTmpUndoMgr->GetUndoActionCount();
+                                       nCount = 
pTmpUndoMgr->GetUndoActionCount();
                                        fnDo = &::svl::IUndoManager::Undo;
                                }
                                else
                                {
-                    nCount = pTmpUndoMgr->GetRedoActionCount();
+                                       nCount = 
pTmpUndoMgr->GetRedoActionCount();
                                        fnDo = &::svl::IUndoManager::Redo;
                                }
 
-                try
-                {
-                                   for( ; nCnt && nCount; --nCnt, --nCount )
-                        (pTmpUndoMgr->*fnDo)();
-                }
-                catch( const Exception& e )
-                {
-                    DBG_UNHANDLED_EXCEPTION();
-                }
+                               try
+                               {
+                                       for( ; nCnt && nCount; --nCnt, --nCount 
)
+                                               (pTmpUndoMgr->*fnDo)();
+                               }
+                               catch( const Exception& e )
+                               {
+                                       DBG_UNHANDLED_EXCEPTION();
+                               }
                        }
 
-            SmModule  *pModule = SM_MOD();
-            if ( pModule && pModule->GetConfig()->IsAutoRedraw() )
-                UpdateText();
-            Repaint();
+                       SmModule  *pModule = SM_MOD();
+                       if ( pModule && pModule->GetConfig()->IsAutoRedraw() )
+                               UpdateText();
+                       Repaint();
                        SfxViewFrame* pFrm = SfxViewFrame::GetFirst( this );
                        while( pFrm )
                        {
@@ -1207,7 +1200,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
 
 void SmDocShell::GetState(SfxItemSet &rSet)
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetState" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetState" );
 
        SfxWhichIter aIter(rSet);
 
@@ -1225,7 +1218,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
 
                case SID_AUTO_REDRAW :
                        {
-                SmModule  *pp = SM_MOD();
+                               SmModule  *pp = SM_MOD();
                                sal_Bool           bRedraw = 
pp->GetConfig()->IsAutoRedraw();
 
                                rSet.Put(SfxBoolItem(SID_AUTO_REDRAW, bRedraw));
@@ -1245,12 +1238,12 @@ void SmDocShell::GetState(SfxItemSet &rSet)
                        rSet.Put(SfxStringItem(SID_TEXT, GetText()));
                        break;
 
-        case SID_GAPHIC_SM:
-            //! very old (pre UNO) and ugly hack to invalidate the 
SmGraphicWindow.
-            //! If nModifyCount gets changed then the call below will 
implicitly notify
-            //! SmGraphicController::StateChanged and there the window gets 
invalidated.
-            //! Thus all the 'nModifyCount++' before invalidating this slot.
-            rSet.Put(SfxInt16Item(SID_GAPHIC_SM, nModifyCount));
+               case SID_GAPHIC_SM:
+                       //! very old (pre UNO) and ugly hack to invalidate the 
SmGraphicWindow.
+                       //! If nModifyCount gets changed then the call below 
will implicitly notify
+                       //! SmGraphicController::StateChanged and there the 
window gets invalidated.
+                       //! Thus all the 'nModifyCount++' before invalidating 
this slot.
+                       rSet.Put(SfxInt16Item(SID_GAPHIC_SM, nModifyCount));
                        break;
 
                case SID_UNDO:
@@ -1267,27 +1260,27 @@ void SmDocShell::GetState(SfxItemSet &rSet)
                case SID_GETUNDOSTRINGS:
                case SID_GETREDOSTRINGS:
                        {
-                ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager();
-                if( pTmpUndoMgr )
+                               ::svl::IUndoManager* pTmpUndoMgr = 
GetUndoManager();
+                               if( pTmpUndoMgr )
                                {
                                        UniString(::svl::IUndoManager:: 
*fnGetComment)( size_t, bool const ) const;
 
                                        sal_uInt16 nCount;
                                        if( SID_GETUNDOSTRINGS == nWh )
                                        {
-                        nCount = pTmpUndoMgr->GetUndoActionCount();
+                                               nCount = 
pTmpUndoMgr->GetUndoActionCount();
                                                fnGetComment = 
&::svl::IUndoManager::GetUndoActionComment;
                                        }
                                        else
                                        {
-                        nCount = pTmpUndoMgr->GetRedoActionCount();
+                                               nCount = 
pTmpUndoMgr->GetRedoActionCount();
                                                fnGetComment = 
&::svl::IUndoManager::GetRedoActionComment;
                                        }
                                        if( nCount )
                                        {
                                                String sList;
                                                for( sal_uInt16 n = 0; n < 
nCount; ++n )
-                            ( sList += (pTmpUndoMgr->*fnGetComment)( n, 
::svl::IUndoManager::TopLevel ) )
+                                                       ( sList += 
(pTmpUndoMgr->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
                                                                        += '\n';
 
                                                SfxStringListItem aItem( nWh );
@@ -1306,7 +1299,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
 
 ::svl::IUndoManager *SmDocShell::GetUndoManager()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetUndoManager" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetUndoManager" );
 
        if (!pEditEngine)
                GetEditEngine();
@@ -1316,18 +1309,18 @@ void SmDocShell::GetState(SfxItemSet &rSet)
 
 void SmDocShell::SaveSymbols()
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveSymbols" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveSymbols" );
 
-    SmModule *pp = SM_MOD();
-    pp->GetSymbolManager().Save();
+       SmModule *pp = SM_MOD();
+       pp->GetSymbolManager().Save();
 }
 
 
 void SmDocShell::Draw(OutputDevice *pDevice,
                                          const JobSetup &,
-                      sal_uInt16 /*nAspect*/)
+                                         sal_uInt16 /*nAspect*/)
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
 
        pDevice->IntersectClipRegion(GetVisArea());
        Point atmppoint;
@@ -1341,7 +1334,7 @@ SfxItemPool& SmDocShell::GetPool() const
 
 void SmDocShell::SetVisArea(const Rectangle & rVisArea)
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetVisArea" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetVisArea" );
 
        Rectangle aNewRect(rVisArea);
 
@@ -1354,11 +1347,11 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea)
        if ( bIsEnabled )
                EnableSetModified( sal_False );
 
-    //TODO/LATER: it's unclear how this interacts with the SFX code
-    // If outplace editing, then don't resize the OutplaceWindow. But the
+       // TODO/LATER: it's unclear how this interacts with the SFX code
+       // If outplace editing, then don't resize the OutplaceWindow. But the
        // ObjectShell has to resize. Bug 56470
        sal_Bool bUnLockFrame;
-    if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !IsInPlaceActive() && 
GetFrame() )
+       if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !IsInPlaceActive() 
&& GetFrame() )
        {
                GetFrame()->LockAdjustPosSizePixel();
                bUnLockFrame = sal_True;
@@ -1366,7 +1359,7 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea)
        else
                bUnLockFrame = sal_False;
 
-    SfxObjectShell::SetVisArea( aNewRect );
+       SfxObjectShell::SetVisArea( aNewRect );
 
        if( bUnLockFrame )
                GetFrame()->UnlockAdjustPosSizePixel();
@@ -1378,39 +1371,39 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea)
 
 void SmDocShell::FillClass(SvGlobalName* pClassName,
                                                   sal_uInt32*  pFormat,
-                           String* /*pAppName*/,
+                                                  String* /*pAppName*/,
                                                   String* pFullTypeName,
-                           String* pShortTypeName,
-                           sal_Int32 nFileFormat,
-                           sal_Bool bTemplate /* = sal_False */) const
+                                                  String* pShortTypeName,
+                                                  sal_Int32 nFileFormat,
+                                                  sal_Bool bTemplate /* = 
sal_False */) const
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::FillClass" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::FillClass" );
 
        if (nFileFormat == SOFFICE_FILEFORMAT_60 )
        {
                *pClassName     = SvGlobalName(SO3_SM_CLASSID_60);
                *pFormat                = SOT_FORMATSTR_ID_STARMATH_60;
-        *pFullTypeName  = String(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT));
+               *pFullTypeName  = 
String(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT));
                *pShortTypeName = String(SmResId(RID_DOCUMENTSTR));
        }
        else if (nFileFormat == SOFFICE_FILEFORMAT_8 )
        {
                *pClassName     = SvGlobalName(SO3_SM_CLASSID_60);
-        *pFormat               = bTemplate ? 
SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE : SOT_FORMATSTR_ID_STARMATH_8;
-        *pFullTypeName  = String(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT));
+               *pFormat                = bTemplate ? 
SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE : SOT_FORMATSTR_ID_STARMATH_8;
+               *pFullTypeName  = 
String(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT));
                *pShortTypeName = String(SmResId(RID_DOCUMENTSTR));
        }
 }
 
 sal_uLong SmDocShell::GetMiscStatus() const
 {
-    return SfxObjectShell::GetMiscStatus() | SVOBJ_MISCSTATUS_NOTRESIZEABLE
+       return SfxObjectShell::GetMiscStatus() | SVOBJ_MISCSTATUS_NOTRESIZEABLE
                                                                                
         | SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
 }
 
 void SmDocShell::SetModified(sal_Bool bModified)
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetModified" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetModified" );
 
        if( IsEnableSetModified() )
        {
@@ -1421,10 +1414,12 @@ void SmDocShell::SetModified(sal_Bool bModified)
 
 sal_Bool SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
 {
-    RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::WriteAsMathType3" );
+       RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::WriteAsMathType3" );
 
-    MathType aEquation( aText, pTree );
+       MathType aEquation( aText, pTree );
 
-    sal_Bool bRet = 0 != aEquation.ConvertFromStarMath( rMedium );
-    return bRet;
+       sal_Bool bRet = 0 != aEquation.ConvertFromStarMath( rMedium );
+       return bRet;
 }
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/starmath/source/view.cxx b/main/starmath/source/view.cxx
index ba3e011121..23f01014e6 100644
--- a/main/starmath/source/view.cxx
+++ b/main/starmath/source/view.cxx
@@ -213,28 +213,28 @@ 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 );
-    }
+       if (xAccessible.is())
+       {
+               uno::Any aOldValue, aNewValue;
+               // aOldValue remains empty
+               aNewValue <<= AccessibleStateType::FOCUSED;
+               pAccessible->LaunchEvent( AccessibleEventId::STATE_CHANGED,
+                               aOldValue, aNewValue );
+       }
 */
 }
 
 void SmGraphicWindow::LoseFocus()
 {
-    ScrollableWindow::LoseFocus();
-    if (xAccessible.is())
-    {
-        uno::Any aOldValue, aNewValue;
-        aOldValue <<= AccessibleStateType::FOCUSED;
-        // aNewValue remains empty
-        pAccessible->LaunchEvent( AccessibleEventId::STATE_CHANGED,
-                aOldValue, aNewValue );
-    }
+       ScrollableWindow::LoseFocus();
+       if (xAccessible.is())
+       {
+               uno::Any aOldValue, aNewValue;
+               aOldValue <<= AccessibleStateType::FOCUSED;
+               // aNewValue remains empty
+               pAccessible->LaunchEvent( AccessibleEventId::STATE_CHANGED,
+                               aOldValue, aNewValue );
+       }
 }
 
 void SmGraphicWindow::ShowCursor(sal_Bool bShow)
@@ -355,18 +355,18 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
                        case COMMAND_CONTEXTMENU:
                        {
                                GetParent()->ToTop();
-                SmResId aResId( RID_VIEWMENU );
-                PopupMenu* pPopupMenu = new PopupMenu(aResId);
+                               SmResId aResId( RID_VIEWMENU );
+                               PopupMenu* pPopupMenu = new PopupMenu(aResId);
                                pPopupMenu->SetSelectHdl(LINK(this, 
SmGraphicWindow, MenuSelectHdl));
-                Point aPos(5, 5);
-                if (rCEvt.IsMouseEvent())
-                    aPos = rCEvt.GetMousePosPixel();
-                DBG_ASSERT( pViewShell, "view shell missing" );
+                               Point aPos(5, 5);
+                               if (rCEvt.IsMouseEvent())
+                                       aPos = rCEvt.GetMousePosPixel();
+                               DBG_ASSERT( pViewShell, "view shell missing" );
 
-                // added for replaceability of context menus #96085, #93782
-                pViewShell->GetViewFrame()->GetBindings().GetDispatcher()
-                        ->ExecutePopup( aResId, this, &aPos );
-                //pPopupMenu->Execute( this, aPos );
+                               // added for replaceability of context menus 
#96085, #93782
+                               
pViewShell->GetViewFrame()->GetBindings().GetDispatcher()
+                                               ->ExecutePopup( aResId, this, 
&aPos );
+                               //pPopupMenu->Execute( this, aPos );
 
                                delete pPopupMenu;
                                bCallBase = sal_False;
@@ -378,12 +378,12 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
                                const CommandWheelData* pWData = 
rCEvt.GetWheelData();
                                if ( pWData && COMMAND_WHEEL_ZOOM == 
pWData->GetMode() )
                                {
-                    sal_uInt16 nTmpZoom = GetZoom();
+                                       sal_uInt16 nTmpZoom = GetZoom();
                                        if( 0L > pWData->GetDelta() )
-                        nTmpZoom -= 10;
+                                               nTmpZoom -= 10;
                                        else
-                        nTmpZoom += 10;
-                    SetZoom( nTmpZoom );
+                                               nTmpZoom += 10;
+                                       SetZoom( nTmpZoom );
                                        bCallBase = sal_False;
                                }
                        }
@@ -397,7 +397,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
 
 IMPL_LINK_INLINE_START( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu )
 {
-    SmViewShell *pViewSh = GetView();
+       SmViewShell *pViewSh = GetView();
        if (pViewSh)
                pViewSh->GetViewFrame()->GetDispatcher()->Execute( 
pMenu->GetCurItemId() );
        return 0;
@@ -411,7 +411,7 @@ void SmGraphicWindow::SetZoom(sal_uInt16 Factor)
        Fraction   aFraction (nZoom, 100);
        SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction) );
        SetTotalSize();
-    SmViewShell *pViewSh = GetView();
+       SmViewShell *pViewSh = GetView();
        if (pViewSh)
                
pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_ATTR_ZOOM);
        Invalidate();
@@ -429,31 +429,31 @@ void SmGraphicWindow::ZoomToFitInWindow()
        Size       aWindowSize (GetSizePixel());
 
        if (aSize.Width() > 0 && aSize.Height() > 0)
-    {
-        long nVal = Min ((85 * aWindowSize.Width()) / aSize.Width(),
-                      (85 * aWindowSize.Height()) / aSize.Height());
-        SetZoom ( sal::static_int_cast< sal_uInt16 >(nVal) );
-    }
+       {
+               long nVal = Min ((85 * aWindowSize.Width()) / aSize.Width(),
+                                                (85 * aWindowSize.Height()) / 
aSize.Height());
+               SetZoom ( sal::static_int_cast< sal_uInt16 >(nVal) );
+       }
 }
 
 uno::Reference< XAccessible > SmGraphicWindow::CreateAccessible()
 {
-    if (!pAccessible)
-    {
-        pAccessible = new SmGraphicAccessible( this );
-        xAccessible = pAccessible;
-    }
-    return xAccessible;
+       if (!pAccessible)
+       {
+               pAccessible = new SmGraphicAccessible( this );
+               xAccessible = pAccessible;
+       }
+       return xAccessible;
 }
 
 /**************************************************************************/
 
 
 SmGraphicController::SmGraphicController(SmGraphicWindow &rSmGraphic,
-                        sal_uInt16          nId_,
+                                               sal_uInt16          nId_,
                                                SfxBindings     &rBindings) :
-    SfxControllerItem(nId_, rBindings),
-    rGraphic(rSmGraphic)
+       SfxControllerItem(nId_, rBindings),
+       rGraphic(rSmGraphic)
 {
 }
 
@@ -470,10 +470,10 @@ void SmGraphicController::StateChanged(sal_uInt16 nSID, 
SfxItemState eState, con
 
 
 SmEditController::SmEditController(SmEditWindow &rSmEdit,
-                     sal_uInt16       nId_,
+                                        sal_uInt16       nId_,
                                         SfxBindings  &rBindings) :
-    SfxControllerItem(nId_, rBindings),
-    rEdit(rSmEdit)
+       SfxControllerItem(nId_, rBindings),
+       rEdit(rSmEdit)
 {
 }
 
@@ -499,29 +499,29 @@ void SmEditController::StateChanged(sal_uInt16 nSID, 
SfxItemState eState, const
 
 SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow 
*pChildWindow,
                                                           Window *pParent) :
-    SfxDockingWindow(pBindings_, pChildWindow, pParent, 
SmResId(RID_CMDBOXWINDOW)),
-    aEdit       (*this),
-    aController (aEdit, SID_TEXT, *pBindings_),
-    bExiting    (sal_False)
+       SfxDockingWindow(pBindings_, pChildWindow, pParent, 
SmResId(RID_CMDBOXWINDOW)),
+       aEdit       (*this),
+       aController (aEdit, SID_TEXT, *pBindings_),
+       bExiting    (sal_False)
 {
        Hide ();
 
-    aInitialFocusTimer.SetTimeoutHdl(LINK(this, SmCmdBoxWindow, 
InitialFocusTimerHdl));
-    aInitialFocusTimer.SetTimeout(100);
+       aInitialFocusTimer.SetTimeoutHdl(LINK(this, SmCmdBoxWindow, 
InitialFocusTimerHdl));
+       aInitialFocusTimer.SetTimeout(100);
 }
 
 
 SmCmdBoxWindow::~SmCmdBoxWindow ()
 {
-    aInitialFocusTimer.Stop();
-    bExiting = sal_True;
+       aInitialFocusTimer.Stop();
+       bExiting = sal_True;
 }
 
 
 SmViewShell * SmCmdBoxWindow::GetView()
 {
-    SfxViewShell *pView = 
GetBindings().GetDispatcher()->GetFrame()->GetViewShell();
-    return PTR_CAST(SmViewShell, pView);
+       SfxViewShell *pView = 
GetBindings().GetDispatcher()->GetFrame()->GetViewShell();
+       return PTR_CAST(SmViewShell, pView);
 }
 
 void SmCmdBoxWindow::Resize()
@@ -536,8 +536,8 @@ void SmCmdBoxWindow::Resize()
                        case SFX_ALIGN_BOTTOM:  aRect.Top()++;          break;
                        case SFX_ALIGN_LEFT:    aRect.Right()--;        break;
                        case SFX_ALIGN_RIGHT:   aRect.Left()++;         break;
-            default:
-                break;
+                       default:
+                               break;
                }
        }
 
@@ -582,8 +582,8 @@ void SmCmdBoxWindow::Paint(const Rectangle& /*rRect*/)
                                aRect.Left()++;
                                break;
 
-            default:
-                break;
+                       default:
+                               break;
                }
                DrawLine( aFrom, aTo );
                aView.DrawFrame(aRect, FRAME_DRAW_OUT);
@@ -601,8 +601,8 @@ Size SmCmdBoxWindow::CalcDockingSize(SfxChildAlignment 
eAlign)
                case SFX_ALIGN_LEFT:
                case SFX_ALIGN_RIGHT:
                        return Size();
-        default:
-            break;
+               default:
+                       break;
        }
        return SfxDockingWindow::CalcDockingSize(eAlign);
 }
@@ -617,8 +617,8 @@ SfxChildAlignment 
SmCmdBoxWindow::CheckAlignment(SfxChildAlignment eActual,
                case SFX_ALIGN_BOTTOM:
                case SFX_ALIGN_NOALIGNMENT:
                        return eWish;
-        default:
-            break;
+               default:
+                       break;
        }
 
        return eActual;
@@ -628,40 +628,40 @@ SfxChildAlignment 
SmCmdBoxWindow::CheckAlignment(SfxChildAlignment eActual,
 void SmCmdBoxWindow::StateChanged( StateChangedType nStateChange )
 {
        if (STATE_CHANGE_INITSHOW == nStateChange)
-    {
-        Resize(); // #98848# avoid SmEditWindow not being painted correctly
+       {
+               Resize(); // #98848# avoid SmEditWindow not being painted 
correctly
 
-        // set initial position of window in floating mode
-        if (sal_True == IsFloatingMode())
-            AdjustPosition(); //! don't change pos in docking-mode !
+               // set initial position of window in floating mode
+               if (sal_True == IsFloatingMode())
+                       AdjustPosition(); //! don't change pos in docking-mode !
 
-//        // make sure the formula can be edited right away
-//        aEdit.GrabFocus();
+//             // make sure the formula can be edited right away
+//             aEdit.GrabFocus();
 
-        // grab focus as above does not work...
+               // grab focus as above does not work...
                // Thus we implement a timer based solution to get the initial
-        // focus in the Edit window.
+               // focus in the Edit window.
                aInitialFocusTimer.Start();
-    }
+       }
 
-    SfxDockingWindow::StateChanged( nStateChange );
+       SfxDockingWindow::StateChanged( nStateChange );
 }
 
 
 IMPL_LINK( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
 {
-    // We want to have the focus in the edit window once Math has been opened
-    // to allow for immediate typing.
-    // Problem: There is no proper way to do this
-    // Thus: this timer based solution has been implemented (see GrabFocus 
below)
-    //
-    // Follow-up problem (#i114910): grabbing the focus may bust the help 
system since
-    // it relies on getting the current frame which conflicts with grabbing 
the focus.
-    // Thus aside from the 'GrabFocus' call everything else is to get the
-    // help reliably working despite using 'GrabFocus'.
-
-    try
-    {
+       // We want to have the focus in the edit window once Math has been 
opened
+       // to allow for immediate typing.
+       // Problem: There is no proper way to do this
+       // Thus: this timer based solution has been implemented (see GrabFocus 
below)
+       //
+       // Follow-up problem (#i114910): grabbing the focus may bust the help 
system since
+       // it relies on getting the current frame which conflicts with grabbing 
the focus.
+       // Thus aside from the 'GrabFocus' call everything else is to get the
+       // help reliably working despite using 'GrabFocus'.
+
+       try
+       {
         uno::Reference< frame::XDesktop > xDesktop;
         uno::Reference< lang::XMultiServiceFactory > xSMGR( 
comphelper::getProcessServiceFactory() );
         if (xSMGR.is())
@@ -1464,13 +1464,13 @@ void SmViewShell::Execute(SfxRequest& rReq)
                        break;
 
                case SID_ZOOMOUT:
-                       DBG_ASSERT(aGraphic.GetZoom() >= 25, "Sm: falsches 
sal_uInt16 Argument");
+                       DBG_ASSERT(aGraphic.GetZoom() >= 25, "Sm: Wrong 
sal_uInt16 argument");
                        aGraphic.SetZoom(aGraphic.GetZoom() - 25);
                        break;
 
         case SID_COPYOBJECT:
         {
-            //TODO/LATER: does not work because of UNO Tunneling - will be 
fixed later
+            // TODO/LATER: does not work because of UNO Tunneling - will be 
fixed later
             Reference< datatransfer::XTransferable > xTrans( 
GetDoc()->GetModel(), uno::UNO_QUERY );
             if( xTrans.is() )
             {

Reply via email to