[Libreoffice-commits] .: 7 commits - config_host.mk.in configure.ac cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UI_cui.mk cui/util i18npool/CustomTarget_breakiterator.mk i18npool/qa i18npool/source sc/source sfx2/inc sfx2/source sfx2/uiconfig sfx2/UI_sfx.mk sw/source sw/uiconfig unusedcode.easy vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Dec 29 10:03:03 PST 2012


 config_host.mk.in                            |    2 
 configure.ac                                 |    8 
 cui/AllLangResTarget_cui.mk                  |    1 
 cui/UI_cui.mk                                |    1 
 cui/source/dialogs/SpellDialog.cxx           |  652 ++++++++++-----------------
 cui/source/dialogs/SpellDialog.hrc           |   45 -
 cui/source/dialogs/SpellDialog.src           |  228 ---------
 cui/source/inc/SpellDialog.hxx               |   74 +--
 cui/source/inc/helpid.hrc                    |    8 
 cui/uiconfig/ui/spellingdialog.ui            |  422 +++++++++++++++++
 cui/util/hidother.src                        |    7 
 i18npool/CustomTarget_breakiterator.mk       |   17 
 i18npool/qa/cppunit/test_breakiterator.cxx   |    8 
 i18npool/source/breakiterator/data/line.txt  |    2 
 sc/source/filter/inc/autofilterbuffer.hxx    |    4 
 sc/source/filter/oox/autofilterbuffer.cxx    |   65 --
 sc/source/ui/inc/docsh.hxx                   |    1 
 sfx2/UI_sfx.mk                               |    1 
 sfx2/inc/sfx2/app.hxx                        |    5 
 sfx2/inc/sfx2/basedlgs.hxx                   |   12 
 sfx2/inc/sfx2/doctempl.hxx                   |   11 
 sfx2/inc/sfx2/objsh.hxx                      |    6 
 sfx2/inc/sfx2/sfx.hrc                        |    2 
 sfx2/source/appl/app.src                     |    7 
 sfx2/source/appl/appopen.cxx                 |   77 ---
 sfx2/source/dialog/basedlgs.cxx              |   15 
 sfx2/source/dialog/templdlg.cxx              |   51 --
 sfx2/source/doc/doctempl.cxx                 |  428 -----------------
 sfx2/source/doc/objcont.cxx                  |  134 -----
 sfx2/source/inc/templdgi.hxx                 |    2 
 sfx2/uiconfig/ui/templatemanagementdialog.ui |  403 ----------------
 sw/source/core/text/porlay.cxx               |    4 
 sw/source/ui/frmdlg/colex.cxx                |   24 
 sw/source/ui/inc/colex.hxx                   |    1 
 sw/uiconfig/swriter/ui/spellingandgrammar.ui |  338 -------------
 unusedcode.easy                              |    1 
 vcl/inc/vcl/fixed.hxx                        |    4 
 vcl/source/control/fixed.cxx                 |   13 
 vcl/source/window/builder.cxx                |   12 
 vcl/source/window/layout.cxx                 |   48 +
 40 files changed, 760 insertions(+), 2384 deletions(-)

New commits:
commit 396a3e7c7b315e158115eb487a8dbf16a594e48a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 22 13:51:32 2012 +0000

    adapt spelling dialog to use .ui
    
    Change-Id: I51fdb40378253780cd15127f0c79eda54dce15f0

diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 9eefc3b..59d82a5 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -73,7 +73,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
     cui/source/dialogs/scriptdlg.src \
     cui/source/dialogs/sdrcelldlg.src \
     cui/source/dialogs/showcols.src \
-    cui/source/dialogs/SpellDialog.src \
     cui/source/dialogs/splitcelldlg.src \
     cui/source/dialogs/srchxtra.src \
     cui/source/dialogs/svuidlg.src \
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index f5ae69e..5048a67 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -46,8 +46,6 @@
 #include <vcl/graph.hxx>
 #include <osl/file.hxx>
 #include <cuires.hrc>
-#include <helpid.hrc>
-#include "SpellDialog.hrc"
 #include <editeng/optitems.hxx>
 #include <editeng/svxenum.hxx>
 #include <svx/SpellDialogChildWindow.hxx>
@@ -180,98 +178,66 @@ sal_uInt16 SpellUndoAction_Impl::GetId()const
     return m_nId;
 }
 
-HelpFixedText::HelpFixedText( Window* pParent, const ResId& rResId ):
-            FixedText( pParent, rResId )
-{
-}
-
-void HelpFixedText::Paint( const Rectangle& rRect )
-{
-    Rectangle aTextRect( rRect.Left() + 6, rRect.Top(), rRect.Right() - 6, rRect.Bottom() );
-    DrawText( aTextRect, GetText(), TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE );
-}
-
-long HelpFixedText::GetActualHeight( )
-{
-    Rectangle rRect( GetPosPixel( ), GetSizePixel() );
-    Rectangle aTextRect( rRect.Left() + 6, rRect.Top(), rRect.Right() - 6, rRect.Bottom() );
-    Rectangle aBounds = GetTextRect( aTextRect, GetText(), TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE );
-
-    return aBounds.getHeight();
-}
-
 // class SvxSpellCheckDialog ---------------------------------------------
 
-SpellDialog::SpellDialog(
-        SpellDialogChildWindow* pChildWindow,
-        Window * pParent,
-        SfxBindings* _pBindings)
-            : SfxModelessDialog (_pBindings,
-                                    pChildWindow,
-                                    pParent,
-                                    CUI_RES(RID_SVXDLG_SPELLCHECK)),
-
-    aLanguageFT     ( this, CUI_RES( FT_LANGUAGE ) ),
-    aLanguageLB     ( this, CUI_RES( LB_LANGUAGE ) ),
-    aExplainFT      ( this, CUI_RES( FT_EXPLAIN ) ),
-    aExplainLink    ( this, CUI_RES( LINK_EXPLAIN ) ),
-    aNotInDictFT    ( this, CUI_RES( FT_NOTINDICT ) ),
-    aSentenceED      ( this, CUI_RES( ED_NEWWORD ) ),
-    aSuggestionFT   ( this, CUI_RES( FT_SUGGESTION ) ),
-    aSuggestionLB   ( this, CUI_RES( LB_SUGGESTION ) ),
-
-    aIgnorePB       ( this, CUI_RES( PB_IGNORE ) ),
-    aIgnoreAllPB    ( this, CUI_RES( PB_IGNOREALL ) ),
-    aIgnoreRulePB   ( this, CUI_RES( PB_IGNORERULE ) ),
-    aAddToDictMB    ( this, CUI_RES( MB_ADDTODICT ) ),
-    aAddToDictPB    ( this, CUI_RES( PB_ADDTODICT ) ),
-
-    aChangePB       ( this, CUI_RES( PB_CHANGE ) ),
-    aChangeAllPB    ( this, CUI_RES( PB_CHANGEALL ) ),
-    aAutoCorrPB     ( this, CUI_RES( PB_AUTOCORR ) ),
-
-    aCheckGrammarCB ( this, CUI_RES( CB_CHECK_GRAMMAR ) ),
-
-    aHelpPB         ( this, CUI_RES( PB_HELP ) ),
-    aOptionsPB      ( this, CUI_RES( PB_OPTIONS ) ),
-    aUndoPB         ( this, CUI_RES( PB_UNDO ) ),
-    aClosePB        ( this, CUI_RES( PB_CLOSE ) ),
-    aBackgroundGB   ( this, CUI_RES( GB_BACKGROUND ) ),
-
-    aResumeST       ( CUI_RES(ST_RESUME )),
-    aIgnoreOnceST   ( aIgnorePB.GetText()),
-    aNoSuggestionsST( CUI_RES(ST_NOSUGGESTIONS)),
-    m_sTitleSpelling              ( CUI_RES( ST_SPELLING                        ) ),
-    m_sTitleSpellingGrammar       ( CUI_RES( ST_SPELLING_AND_GRAMMAR            ) ),
-    aDialogUndoLink( LINK (this, SpellDialog, DialogUndoHdl)),
-    bModified( false ),
-    bFocusLocked( true ),
-    rParent         ( *pChildWindow )
-{
-    FreeResource();
+SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow,
+    Window * pParent, SfxBindings* _pBindings)
+    : SfxModelessDialog (_pBindings, pChildWindow,
+        pParent, "SpellingDialog", "cui/ui/spellingdialog.ui")
+    , aDialogUndoLink(LINK (this, SpellDialog, DialogUndoHdl))
+    , bModified(false)
+    , bFocusLocked(true)
+    , rParent(*pChildWindow)
+{
+    m_sTitleSpellingGrammar = GetText();
+    m_sResumeST = get<FixedText>("resumeft")->GetText();
+    m_sNoSuggestionsST = get<FixedText>("nosuggestionsft")->GetText();
+    m_sTitleSpelling = get<FixedText>("alttitleft")->GetText();
+
+    get(m_pLanguageFT, "languageft");
+    get(m_pLanguageLB, "languagelb");
+    get(m_pExplainFT, "explain");
+    get(m_pExplainLink, "explainlink");
+    get(m_pNotInDictFT, "notindictft");
+    get(m_pSentenceED, "sentence");
+    Size aEdSize(LogicToPixel(Size(197, 48), MAP_APPFONT));
+    m_pSentenceED->set_width_request(aEdSize.Width());
+    m_pSentenceED->set_height_request(aEdSize.Height());
+    get(m_pSuggestionFT, "suggestionsft");
+    get(m_pSuggestionLB, "suggestionslb");
+    m_pSuggestionLB->SetDropDownLineCount(5);
+    m_pSuggestionLB->set_width_request(aEdSize.Width());
+    get(m_pIgnorePB, "ignore");
+    m_sIgnoreOnceST = m_pIgnorePB->GetText();
+    get(m_pIgnoreAllPB, "ignoreall");
+    get(m_pIgnoreRulePB, "ignorerule");
+    get(m_pAddToDictPB, "add");
+    get(m_pAddToDictMB, "addmb");
+    m_pAddToDictMB->SetHelpId(m_pAddToDictPB->GetHelpId());
+    get(m_pChangePB, "change");
+    get(m_pChangeAllPB, "changeall");
+    get(m_pAutoCorrPB, "autocorrect");
+    get(m_pCheckGrammarCB, "checkgrammar");
+    get(m_pOptionsPB, "options");
+    get(m_pUndoPB, "undo");
+    get(m_pClosePB, "close");
     xSpell = LinguMgr::GetSpellChecker();
     pImpl = new SpellDialog_Impl;
 
     const StyleSettings& rSettings = GetSettings().GetStyleSettings();
     Color aCol = rSettings.GetHelpColor();
     Wallpaper aWall( aCol );
-    aExplainLink.SetBackground( aWall );
-    aExplainFT.SetBackground( aWall );
-
-    //HelpIds
-    aClosePB.       SetHelpId(HID_SPLDLG_BUTTON_CLOSE    );
-    aIgnorePB.      SetHelpId(HID_SPLDLG_BUTTON_IGNORE   );
-    aIgnoreAllPB.   SetHelpId(HID_SPLDLG_BUTTON_IGNOREALL);
-    aIgnoreRulePB.  SetHelpId(HID_SPLDLG_BUTTON_IGNORERULE);
-    aChangePB.      SetHelpId(HID_SPLDLG_BUTTON_CHANGE   );
-    aChangeAllPB.   SetHelpId(HID_SPLDLG_BUTTON_CHANGEALL);
-    aExplainLink.   SetHelpId(HID_SPLDLG_BUTTON_EXPLAIN );
+    m_pExplainLink->SetBackground( aWall );
+    m_pExplainFT->SetBackground( aWall );
+
     Init_Impl();
 
     // disable controls if service is missing
-    if (!xSpell.is())
-        Enable( sal_False );
+    Enable(xSpell.is());
 
+    //InitHdl wants to use virtual methods, so it
+    //can't be called during the ctor, so init
+    //it on next event cycle post-ctor
     Application::PostUserEvent( STATIC_LINK(
                         this, SpellDialog, InitHdl ) );
 }
@@ -287,7 +253,6 @@ SpellDialog::~SpellDialog()
         linguistic::SaveDictionaries( xDicList );
     }
 
-    delete aAddToDictMB.GetPopupMenu();
     delete pImpl;
 }
 
@@ -296,33 +261,33 @@ SpellDialog::~SpellDialog()
 void SpellDialog::Init_Impl()
 {
     // initialize handler
-    aClosePB.SetClickHdl(LINK( this, SpellDialog, CancelHdl ) );
-    aChangePB.SetClickHdl(LINK( this, SpellDialog, ChangeHdl ) );
-    aChangeAllPB.SetClickHdl(LINK( this, SpellDialog, ChangeAllHdl ) );
-    aIgnorePB.SetClickHdl(LINK( this, SpellDialog, IgnoreHdl ) );
-    aIgnoreAllPB.SetClickHdl(LINK( this, SpellDialog, IgnoreAllHdl ) );
-    aIgnoreRulePB.SetClickHdl(LINK( this, SpellDialog, IgnoreAllHdl ) );
-    aUndoPB.SetClickHdl(LINK( this, SpellDialog, UndoHdl ) );
+    m_pClosePB->SetClickHdl(LINK( this, SpellDialog, CancelHdl ) );
+    m_pChangePB->SetClickHdl(LINK( this, SpellDialog, ChangeHdl ) );
+    m_pChangeAllPB->SetClickHdl(LINK( this, SpellDialog, ChangeAllHdl ) );
+    m_pIgnorePB->SetClickHdl(LINK( this, SpellDialog, IgnoreHdl ) );
+    m_pIgnoreAllPB->SetClickHdl(LINK( this, SpellDialog, IgnoreAllHdl ) );
+    m_pIgnoreRulePB->SetClickHdl(LINK( this, SpellDialog, IgnoreAllHdl ) );
+    m_pUndoPB->SetClickHdl(LINK( this, SpellDialog, UndoHdl ) );
 
-    aAutoCorrPB.SetClickHdl( LINK( this, SpellDialog, ExtClickHdl ) );
-    aCheckGrammarCB.SetClickHdl( LINK( this, SpellDialog, CheckGrammarHdl ));
-    aOptionsPB .SetClickHdl( LINK( this, SpellDialog, ExtClickHdl ) );
+    m_pAutoCorrPB->SetClickHdl( LINK( this, SpellDialog, ExtClickHdl ) );
+    m_pCheckGrammarCB->SetClickHdl( LINK( this, SpellDialog, CheckGrammarHdl ));
+    m_pOptionsPB->SetClickHdl( LINK( this, SpellDialog, ExtClickHdl ) );
 
-    aSuggestionLB.SetDoubleClickHdl( LINK( this, SpellDialog, ChangeHdl ) );
+    m_pSuggestionLB->SetDoubleClickHdl( LINK( this, SpellDialog, ChangeHdl ) );
 
-    aSentenceED.SetModifyHdl(LINK ( this, SpellDialog, ModifyHdl) );
+    m_pSentenceED->SetModifyHdl(LINK ( this, SpellDialog, ModifyHdl) );
 
-    aAddToDictMB.SetSelectHdl(LINK ( this, SpellDialog, AddToDictSelectHdl ) );
-    aAddToDictPB.SetClickHdl(LINK ( this, SpellDialog, AddToDictClickHdl ) );
+    m_pAddToDictMB->SetSelectHdl(LINK ( this, SpellDialog, AddToDictSelectHdl ) );
+    m_pAddToDictPB->SetClickHdl(LINK ( this, SpellDialog, AddToDictClickHdl ) );
 
-    aLanguageLB.SetSelectHdl(LINK( this, SpellDialog, LanguageSelectHdl ) );
+    m_pLanguageLB->SetSelectHdl(LINK( this, SpellDialog, LanguageSelectHdl ) );
 
-    aExplainLink.SetClickHdl( LINK( this, SpellDialog, HandleHyperlink ) );
+    m_pExplainLink->SetClickHdl( LINK( this, SpellDialog, HandleHyperlink ) );
 
     // initialize language ListBox
-    aLanguageLB.SetLanguageList( LANG_LIST_SPELL_USED, sal_False, sal_False, sal_True );
+    m_pLanguageLB->SetLanguageList( LANG_LIST_SPELL_USED, sal_False, sal_False, sal_True );
 
-    aSentenceED.ClearModifyFlag();
+    m_pSentenceED->ClearModifyFlag();
     SvxGetChangeAllList()->clear();
 }
 
@@ -331,9 +296,9 @@ void SpellDialog::Init_Impl()
 void SpellDialog::UpdateBoxes_Impl()
 {
     sal_Int32 i;
-    aSuggestionLB.Clear();
+    m_pSuggestionLB->Clear();
 
-    const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives();
+    const SpellErrorDescription* pSpellErrorDescription = m_pSentenceED->GetAlternatives();
 
     LanguageType nAltLanguage = LANGUAGE_NONE;
     Sequence< ::rtl::OUString > aNewWords;
@@ -343,8 +308,8 @@ void SpellDialog::UpdateBoxes_Impl()
         nAltLanguage    = LanguageTag( pSpellErrorDescription->aLocale ).getLanguageType();
         aNewWords       = pSpellErrorDescription->aSuggestions;
         bIsGrammarError = pSpellErrorDescription->bIsGrammarError;
-        aExplainLink.SetURL( pSpellErrorDescription->sExplanationURL );
-        aExplainFT.SetText( pSpellErrorDescription->sExplanation );
+        m_pExplainLink->SetURL( pSpellErrorDescription->sExplanationURL );
+        m_pExplainFT->SetText( pSpellErrorDescription->sExplanation );
     }
     if( pSpellErrorDescription && !pSpellErrorDescription->sDialogTitle.isEmpty() )
     {
@@ -364,123 +329,49 @@ void SpellDialog::UpdateBoxes_Impl()
     for ( i = 0; i < nSize; ++i )
     {
         String aTmp( pNewWords[i] );
-        if ( LISTBOX_ENTRY_NOTFOUND == aSuggestionLB.GetEntryPos( aTmp ) )
+        if ( LISTBOX_ENTRY_NOTFOUND == m_pSuggestionLB->GetEntryPos( aTmp ) )
         {
-            aSuggestionLB.InsertEntry( aTmp );
-            aSuggestionLB.SetEntryFlags(aSuggestionLB.GetEntryCount() - 1, LISTBOX_ENTRY_FLAG_MULTILINE);
+            m_pSuggestionLB->InsertEntry( aTmp );
+            m_pSuggestionLB->SetEntryFlags(m_pSuggestionLB->GetEntryCount() - 1, LISTBOX_ENTRY_FLAG_MULTILINE);
         }
     }
     if(!nSize)
-        aSuggestionLB.InsertEntry( aNoSuggestionsST );
-    aAutoCorrPB.Enable( nSize > 0 );
+        m_pSuggestionLB->InsertEntry(m_sNoSuggestionsST);
+    m_pAutoCorrPB->Enable( nSize > 0 );
 
-    aSuggestionFT.Enable(nSize > 0);
-    aSuggestionLB.Enable(nSize > 0);
+    m_pSuggestionFT->Enable(nSize > 0);
+    m_pSuggestionLB->Enable(nSize > 0);
     if( nSize )
     {
-        aSuggestionLB.SelectEntryPos(0);
+        m_pSuggestionLB->SelectEntryPos(0);
     }
-    aChangePB.Enable( nSize > 0);
-    aChangeAllPB.Enable(nSize > 0);
+    m_pChangePB->Enable( nSize > 0);
+    m_pChangeAllPB->Enable(nSize > 0);
     bool bShowChangeAll = !bIsGrammarError;
-    aChangeAllPB.Show( bShowChangeAll );
-    aExplainFT.Show( !bShowChangeAll );
-    aLanguageLB.Enable( bShowChangeAll );
-    aIgnoreAllPB.Show( bShowChangeAll );
-
-    aAddToDictMB.Show( bShowChangeAll && nDicts > 1);
-    aAddToDictPB.Show( bShowChangeAll && nDicts <= 1);
-    aIgnoreRulePB.Show( !bShowChangeAll );
-    aIgnoreRulePB.Enable(pSpellErrorDescription && !pSpellErrorDescription->sRuleId.isEmpty());
-    aAutoCorrPB.Show( bShowChangeAll && rParent.HasAutoCorrection() );
-
-    bool bHasGrammarChecking = rParent.HasGrammarChecking();
-    aCheckGrammarCB.Show( bHasGrammarChecking );
-    if( !bHasGrammarChecking )
+    m_pChangeAllPB->Show( bShowChangeAll );
+    m_pExplainFT->Show( !bShowChangeAll );
+    m_pLanguageLB->Enable( bShowChangeAll );
+    m_pIgnoreAllPB->Show( bShowChangeAll );
+
+    m_pAddToDictMB->Show( bShowChangeAll && nDicts > 1);
+    m_pAddToDictPB->Show( bShowChangeAll && nDicts <= 1);
+    m_pIgnoreRulePB->Show( !bShowChangeAll );
+    m_pIgnoreRulePB->Enable(pSpellErrorDescription && !pSpellErrorDescription->sRuleId.isEmpty());
+    m_pAutoCorrPB->Show( bShowChangeAll && rParent.HasAutoCorrection() );
+
+    bool bOldShowGrammar = m_pCheckGrammarCB->IsVisible();
+    bool bOldShowExplain = m_pExplainLink->IsVisible();
+
+    m_pCheckGrammarCB->Show(rParent.HasGrammarChecking());
+    m_pExplainLink->Show(!m_pExplainLink->GetURL().isEmpty());
+    if (m_pExplainFT->GetText().Len() == 0)
     {
-        //resize the dialog to hide the hidden area of the CheckBox
-        Size aBackSize = aBackgroundGB.GetSizePixel();
-        sal_Int32 nDiff = aBackgroundGB.GetPosPixel().Y() + aBackSize.Height()
-                            - aCheckGrammarCB.GetPosPixel().Y();
-        aBackSize.Height() -= nDiff;
-        aBackgroundGB.SetSizePixel(aBackSize);
-        Button* aButtons[] = { &aHelpPB, &aOptionsPB, &aUndoPB, &aClosePB, 0 };
-        sal_Int32 nButton = 0;
-        while( aButtons[nButton])
-        {
-            Point aPos = aButtons[nButton]->GetPosPixel();
-            aPos.Y() -= nDiff;
-            aButtons[nButton]->SetPosPixel(aPos);
-            ++nButton;
-        }
-        Size aDlgSize = GetSizePixel();
-        aDlgSize.Height() -= nDiff;
-        SetSizePixel( aDlgSize );
+        m_pExplainFT->Hide();
+        m_pExplainLink->Hide();
     }
-    else
-    {
-        bool bHasExplainLink = !aExplainLink.GetURL().isEmpty();
-        aExplainLink.Show( bHasExplainLink );
-
-        sal_Int32 nExplainWidth = aExplainLink.GetPosPixel().X() - aExplainFT.GetPosPixel().X();
-        if ( !bHasExplainLink )
-            nExplainWidth += aExplainLink.GetSizePixel().Width();
-        sal_Int32 nExplainHeight = aExplainFT.GetActualHeight();
-        sal_Int32 nCurrentHeight = aExplainFT.GetSizePixel().Height();
-        if( aExplainFT.GetText().Len() == 0 )
-        {
-            nExplainHeight = 0;
-            aExplainFT.Hide();
-            aExplainLink.Hide();
-        }
 
-        Size aCtlSize = aExplainFT.GetSizePixel();
-        aCtlSize.Height() = nExplainHeight;
-        aCtlSize.Width() = nExplainWidth;
-        aExplainFT.SetSizePixel( aCtlSize );
-
-        aCtlSize = aExplainLink.GetSizePixel();
-        aCtlSize.Height() = nExplainHeight;
-        aExplainLink.SetSizePixel( aCtlSize );
-
-        sal_Int32 nDiff = - ( nCurrentHeight - nExplainHeight );
-        if ( nDiff != 0 )
-        {
-            Control* aControls[] = {
-                &aNotInDictFT,
-                &aSentenceED,
-                &aSuggestionFT,
-                &aSuggestionLB,
-                &aIgnorePB,
-                &aIgnoreAllPB,
-                &aIgnoreRulePB,
-                &aAddToDictMB,
-                &aAddToDictPB,
-                &aChangePB,
-                &aChangeAllPB,
-                &aAutoCorrPB,
-                &aCheckGrammarCB,
-                &aHelpPB,
-                &aOptionsPB,
-                &aUndoPB,
-                &aClosePB,
-                &aBackgroundGB,
-                0
-            };
-            sal_Int32 nControl = 0;
-            while( aControls[nControl])
-            {
-                Point aPos = aControls[nControl]->GetPosPixel();
-                aPos.Y() += nDiff;
-                aControls[nControl]->SetPosPixel(aPos);
-                ++nControl;
-            }
-            Size aDlgSize = GetSizePixel();
-            aDlgSize.Height() += nDiff;
-            SetSizePixel( aDlgSize );
-            Invalidate();
-        }
-    }
+    if (bOldShowExplain != m_pExplainLink->IsVisible() || bOldShowGrammar != m_pCheckGrammarCB->IsVisible())
+        setInitialLayoutSize();
 }
 // -----------------------------------------------------------------------
 
@@ -490,18 +381,18 @@ void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrent
     //then GetNextSentence() has to be called followed again by MarkNextError()
     //MarkNextError is not initally called if the UndoEdit mode is active
     bool bNextSentence = false;
-    if((!aSentenceED.IsUndoEditMode() && aSentenceED.MarkNextError( bIgnoreCurrentError )) ||
-            true == ( bNextSentence = GetNextSentence_Impl(bUseSavedSentence, aSentenceED.IsUndoEditMode()) && aSentenceED.MarkNextError( false )))
+    if((!m_pSentenceED->IsUndoEditMode() && m_pSentenceED->MarkNextError( bIgnoreCurrentError )) ||
+            true == ( bNextSentence = GetNextSentence_Impl(bUseSavedSentence, m_pSentenceED->IsUndoEditMode()) && m_pSentenceED->MarkNextError( false )))
     {
-        const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives();
+        const SpellErrorDescription* pSpellErrorDescription = m_pSentenceED->GetAlternatives();
         if( pSpellErrorDescription )
         {
             UpdateBoxes_Impl();
             Control* aControls[] =
             {
-                &aNotInDictFT,
-                &aSentenceED,
-                &aLanguageFT,
+                m_pNotInDictFT,
+                m_pSentenceED,
+                m_pLanguageFT,
                 0
             };
             sal_Int32 nIdx = 0;
@@ -515,8 +406,8 @@ void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrent
         if( bNextSentence )
         {
             //remove undo if a new sentence is active
-            aSentenceED.ResetUndo();
-            aUndoPB.Enable(sal_False);
+            m_pSentenceED->ResetUndo();
+            m_pUndoPB->Enable(sal_False);
         }
     }
 }
@@ -527,10 +418,10 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG )
 {
     pThis->SetUpdateMode( sal_False );
     //show or hide AutoCorrect depending on the modules abilities
-    pThis->aAutoCorrPB.Show(pThis->rParent.HasAutoCorrection());
+    pThis->m_pAutoCorrPB->Show(pThis->rParent.HasAutoCorrection());
     pThis->SpellContinue_Impl();
-    pThis->aSentenceED.ResetUndo();
-    pThis->aUndoPB.Enable(sal_False);
+    pThis->m_pSentenceED->ResetUndo();
+    pThis->m_pUndoPB->Enable(sal_False);
 
     // get current language
     pThis->UpdateBoxes_Impl();
@@ -539,15 +430,15 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG )
     pThis->InitUserDicts();
 
     pThis->LockFocusChanges(true);
-    if( pThis->aChangePB.IsEnabled() )
-        pThis->aChangePB.GrabFocus();
-    else if( pThis->aIgnorePB.IsEnabled() )
-        pThis->aIgnorePB.GrabFocus();
-    else if( pThis->aClosePB.IsEnabled() )
-        pThis->aClosePB.GrabFocus();
+    if( pThis->m_pChangePB->IsEnabled() )
+        pThis->m_pChangePB->GrabFocus();
+    else if( pThis->m_pIgnorePB->IsEnabled() )
+        pThis->m_pIgnorePB->GrabFocus();
+    else if( pThis->m_pClosePB->IsEnabled() )
+        pThis->m_pClosePB->GrabFocus();
     pThis->LockFocusChanges(false);
     //show grammar CheckBox depending on the modules abilities
-    pThis->aCheckGrammarCB.Check( pThis->rParent.IsGrammarChecking() );
+    pThis->m_pCheckGrammarCB->Check( pThis->rParent.IsGrammarChecking() );
     pThis->SetUpdateMode( sal_True );
     pThis->Show();
     return 0;
@@ -557,14 +448,14 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG )
 
 IMPL_LINK( SpellDialog, ExtClickHdl, Button *, pBtn )
 {
-    if (&aOptionsPB == pBtn)
+    if (m_pOptionsPB == pBtn)
         StartSpellOptDlg_Impl();
-    else if(&aAutoCorrPB == pBtn)
+    else if (m_pAutoCorrPB == pBtn)
     {
         //get the currently selected wrong word
-        String sCurrentErrorText = aSentenceED.GetErrorText();
+        String sCurrentErrorText = m_pSentenceED->GetErrorText();
         //get the wrong word from the XSpellAlternative
-        const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives();
+        const SpellErrorDescription* pSpellErrorDescription = m_pSentenceED->GetAlternatives();
         if( pSpellErrorDescription )
         {
             String sWrong(pSpellErrorDescription->sErrorText);
@@ -572,10 +463,10 @@ IMPL_LINK( SpellDialog, ExtClickHdl, Button *, pBtn )
             //the current suggestion should be used
             //if it's not the 'no suggestions' entry
             if(sWrong == sCurrentErrorText &&
-                    aSuggestionLB.IsEnabled() && aSuggestionLB.GetSelectEntryCount() > 0 &&
-                    aNoSuggestionsST != aSuggestionLB.GetSelectEntry())
+                    m_pSuggestionLB->IsEnabled() && m_pSuggestionLB->GetSelectEntryCount() > 0 &&
+                    !m_sNoSuggestionsST.equals(m_pSuggestionLB->GetSelectEntry()))
             {
-                sCurrentErrorText = aSuggestionLB.GetSelectEntry();
+                sCurrentErrorText = m_pSuggestionLB->GetSelectEntry();
             }
             if(sWrong != sCurrentErrorText)
             {
@@ -642,14 +533,14 @@ namespace
 
 String SpellDialog::getReplacementString() const
 {
-    String sOrigString = aSentenceED.GetErrorText();
+    String sOrigString = m_pSentenceED->GetErrorText();
 
     String sReplacement(sOrigString);
 
-    if(aSuggestionLB.IsEnabled() &&
-            aSuggestionLB.GetSelectEntryCount()>0 &&
-            aNoSuggestionsST != aSuggestionLB.GetSelectEntry())
-        sReplacement = aSuggestionLB.GetSelectEntry();
+    if(m_pSuggestionLB->IsEnabled() &&
+            m_pSuggestionLB->GetSelectEntryCount()>0 &&
+            !m_sNoSuggestionsST.equals(m_pSuggestionLB->GetSelectEntry()))
+        sReplacement = m_pSuggestionLB->GetSelectEntry();
 
     return getDotReplacementString(sOrigString, sReplacement);
 }
@@ -658,21 +549,21 @@ String SpellDialog::getReplacementString() const
 
 IMPL_LINK_NOARG(SpellDialog, ChangeHdl)
 {
-    if(aSentenceED.IsUndoEditMode())
+    if(m_pSentenceED->IsUndoEditMode())
     {
         SpellContinue_Impl();
     }
     else
     {
-        aSentenceED.UndoActionStart( SPELLUNDO_CHANGE_GROUP );
+        m_pSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP );
         String aString = getReplacementString();
-        aSentenceED.ChangeMarkedWord(aString, GetSelectedLang_Impl());
+        m_pSentenceED->ChangeMarkedWord(aString, GetSelectedLang_Impl());
         SpellContinue_Impl();
         bModified = false;
-        aSentenceED.UndoActionEnd();
+        m_pSentenceED->UndoActionEnd();
     }
-    if(!aChangePB.IsEnabled())
-        aIgnorePB.GrabFocus();
+    if(!m_pChangePB->IsEnabled())
+        m_pIgnorePB->GrabFocus();
     return 1;
 }
 
@@ -680,12 +571,12 @@ IMPL_LINK_NOARG(SpellDialog, ChangeHdl)
 
 IMPL_LINK_NOARG(SpellDialog, ChangeAllHdl)
 {
-    aSentenceED.UndoActionStart( SPELLUNDO_CHANGE_GROUP );
+    m_pSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP );
     String aString = getReplacementString();
     LanguageType eLang = GetSelectedLang_Impl();
 
     // add new word to ChangeAll list
-    String  aOldWord( aSentenceED.GetErrorText() );
+    String  aOldWord( m_pSentenceED->GetErrorText() );
     SvxPrepareAutoCorrect( aOldWord, aString );
     Reference<XDictionary> aXDictionary( SvxGetChangeAllList(), UNO_QUERY );
     sal_uInt8 nAdded = linguistic::AddEntryToDic( aXDictionary,
@@ -698,27 +589,27 @@ IMPL_LINK_NOARG(SpellDialog, ChangeAllHdl)
                         SPELLUNDO_CHANGE_ADD_TO_DICTIONARY, aDialogUndoLink);
         pAction->SetDictionary(aXDictionary);
         pAction->SetAddedWord(aOldWord);
-        aSentenceED.AddUndoAction(pAction);
+        m_pSentenceED->AddUndoAction(pAction);
     }
 
-    aSentenceED.ChangeMarkedWord(aString, eLang);
+    m_pSentenceED->ChangeMarkedWord(aString, eLang);
     SpellContinue_Impl();
     bModified = false;
-    aSentenceED.UndoActionEnd();
+    m_pSentenceED->UndoActionEnd();
     return 1;
 }
 // -----------------------------------------------------------------------
 
 IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton )
 {
-    aSentenceED.UndoActionStart( SPELLUNDO_CHANGE_GROUP );
+    m_pSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP );
     // add word to IgnoreAll list
     Reference< XDictionary > aXDictionary( SvxGetIgnoreAllList(), UNO_QUERY );
     //in case the error has been changed manually it has to be restored
-    aSentenceED.RestoreCurrentError();
-    if( pButton == &aIgnoreRulePB )
+    m_pSentenceED->RestoreCurrentError();
+    if (pButton == m_pIgnoreRulePB)
     {
-        const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives();
+        const SpellErrorDescription* pSpellErrorDescription = m_pSentenceED->GetAlternatives();
         try
         {
             if( pSpellErrorDescription && pSpellErrorDescription->xGrammarChecker.is() )
@@ -733,7 +624,7 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton )
     }
     else
     {
-        String sErrorText(aSentenceED.GetErrorText());
+        String sErrorText(m_pSentenceED->GetErrorText());
         sal_uInt8 nAdded = linguistic::AddEntryToDic( aXDictionary,
             sErrorText, sal_False,
             ::rtl::OUString(), LANGUAGE_NONE );
@@ -743,22 +634,22 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton )
                             SPELLUNDO_CHANGE_ADD_TO_DICTIONARY, aDialogUndoLink);
             pAction->SetDictionary(aXDictionary);
             pAction->SetAddedWord(sErrorText);
-            aSentenceED.AddUndoAction(pAction);
+            m_pSentenceED->AddUndoAction(pAction);
         }
     }
 
     SpellContinue_Impl();
     bModified = false;
-    aSentenceED.UndoActionEnd();
+    m_pSentenceED->UndoActionEnd();
     return 1;
 }
 
 //-----------------------------------------------------------------------
 IMPL_LINK_NOARG(SpellDialog, UndoHdl)
 {
-    aSentenceED.Undo();
-    if(!aSentenceED.GetUndoActionCount())
-        aUndoPB.Enable(sal_False);
+    m_pSentenceED->Undo();
+    if(!m_pSentenceED->GetUndoActionCount())
+        m_pUndoPB->Enable(sal_False);
     return 0;
 }
 
@@ -770,14 +661,14 @@ IMPL_LINK( SpellDialog, DialogUndoHdl, SpellUndoAction_Impl*, pAction )
         case SPELLUNDO_CHANGE_TEXTENGINE:
         {
             if(pAction->IsEnableChangePB())
-                aChangePB.Enable(sal_False);
+                m_pChangePB->Enable(sal_False);
             if(pAction->IsEnableChangeAllPB())
-                aChangeAllPB.Enable(sal_False);
+                m_pChangeAllPB->Enable(sal_False);
         }
         break;
         case SPELLUNDO_CHANGE_NEXTERROR:
         {
-            aSentenceED.MoveErrorMarkTo((sal_uInt16)pAction->GetOldErrorStart(), (sal_uInt16)pAction->GetOldErrorEnd(), false);
+            m_pSentenceED->MoveErrorMarkTo((sal_uInt16)pAction->GetOldErrorStart(), (sal_uInt16)pAction->GetOldErrorEnd(), false);
             if(pAction->IsErrorLanguageSelected())
             {
                 UpdateBoxes_Impl();
@@ -793,7 +684,7 @@ IMPL_LINK( SpellDialog, DialogUndoHdl, SpellUndoAction_Impl*, pAction )
         case SPELLUNDO_MOVE_ERROREND :
         {
             if(pAction->GetOffset() != 0)
-                aSentenceED.MoveErrorEnd(pAction->GetOffset());
+                m_pSentenceED->MoveErrorEnd(pAction->GetOffset());
         }
         break;
         case SPELLUNDO_UNDO_EDIT_MODE :
@@ -815,16 +706,16 @@ void SpellDialog::Impl_Restore()
     //clear the "ChangeAllList"
     SvxGetChangeAllList()->clear();
     //get a new sentence
-    aSentenceED.SetText(rtl::OUString());
-    aSentenceED.ResetModified();
+    m_pSentenceED->SetText(rtl::OUString());
+    m_pSentenceED->ResetModified();
     //Resolves: fdo#39348 refill the dialog with the currently spelled sentence
     SpellContinue_Impl(true);
-    aIgnorePB.SetText(aIgnoreOnceST);
+    m_pIgnorePB->SetText(m_sIgnoreOnceST);
 }
 
 IMPL_LINK_NOARG(SpellDialog, IgnoreHdl)
 {
-    if(aIgnorePB.GetText() == aResumeST)
+    if (m_sResumeST.equals(m_pIgnorePB->GetText()))
     {
         Impl_Restore();
     }
@@ -832,7 +723,7 @@ IMPL_LINK_NOARG(SpellDialog, IgnoreHdl)
     {
         //in case the error has been changed manually it has to be restored,
         // since the users choice now was to ignore the error
-        aSentenceED.RestoreCurrentError();
+        m_pSentenceED->RestoreCurrentError();
 
         // the word is being ignored
         SpellContinue_Impl( false, true );
@@ -853,14 +744,14 @@ sal_Bool SpellDialog::Close()
 
 void SpellDialog::SetSelectedLang_Impl( LanguageType nLang )
 {
-    aLanguageLB.SelectLanguage( nLang );
+    m_pLanguageLB->SelectLanguage( nLang );
 }
 
 // -----------------------------------------------------------------------
 
 LanguageType SpellDialog::GetSelectedLang_Impl() const
 {
-    sal_Int16 nLang = aLanguageLB.GetSelectLanguage();
+    sal_Int16 nLang = m_pLanguageLB->GetSelectLanguage();
     return nLang;
 }
 
@@ -873,22 +764,22 @@ IMPL_LINK(SpellDialog, LanguageSelectHdl, SvxLanguageBox*, pBox)
 
     //if currently an error is selected then search for alternatives for
     //this word and fill the alternatives ListBox accordingly
-    String sError = aSentenceED.GetErrorText();
-    aSuggestionLB.Clear();
+    String sError = m_pSentenceED->GetErrorText();
+    m_pSuggestionLB->Clear();
     if(sError.Len())
     {
         LanguageType eLanguage = pBox->GetSelectLanguage();
         Reference <XSpellAlternatives> xAlt = xSpell->spell( sError, eLanguage,
                                             Sequence< PropertyValue >() );
         if( xAlt.is() )
-            aSentenceED.SetAlternatives( xAlt );
+            m_pSentenceED->SetAlternatives( xAlt );
         else
         {
-            aSentenceED.ChangeMarkedWord( sError, eLanguage );
+            m_pSentenceED->ChangeMarkedWord( sError, eLanguage );
             SpellContinue_Impl();
         }
 
-         aSentenceED.AddUndoAction(new SpellUndoAction_Impl(SPELLUNDO_CHANGE_LANGUAGE, aDialogUndoLink));
+         m_pSentenceED->AddUndoAction(new SpellUndoAction_Impl(SPELLUNDO_CHANGE_LANGUAGE, aDialogUndoLink));
     }
     SpellDialog::UpdateBoxes_Impl();
     return 0;
@@ -903,7 +794,7 @@ void SpellDialog::SetLanguage( sal_uInt16 nLang )
 */
 {
     SetTitle_Impl( nLang );
-    aLanguageLB.SelectLanguage( nLang );
+    m_pLanguageLB->SelectLanguage( nLang );
 }
 
 static Image lcl_GetImageFromPngUrl( const ::rtl::OUString &rFileUrl )
@@ -928,7 +819,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
 
 int SpellDialog::InitUserDicts()
 {
-    const LanguageType nLang = aLanguageLB.GetSelectLanguage();
+    const LanguageType nLang = m_pLanguageLB->GetSelectLanguage();
 
     const Reference< XDictionary >  *pDic = 0;
 
@@ -952,8 +843,9 @@ int SpellDialog::InitUserDicts()
     bool bEnable = false;
     const sal_Int32 nSize = pImpl->aDics.getLength();
     pDic = pImpl->aDics.getConstArray();
-    delete aAddToDictMB.GetPopupMenu();
-    PopupMenu* pMenu = new PopupMenu;
+    PopupMenu* pMenu = m_pAddToDictMB->GetPopupMenu();
+    assert(pMenu);
+    pMenu->Clear();
     pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
     sal_uInt16 nItemId = 1;     // menu items should be enumerated from 1 and not 0
     for (sal_Int32 i = 0; i < nSize; ++i)
@@ -987,14 +879,13 @@ int SpellDialog::InitUserDicts()
             ++nItemId;
         }
     }
-    aAddToDictMB.SetPopupMenu(pMenu);
-    aAddToDictMB.Enable( bEnable );
-    aAddToDictPB.Enable( bEnable );
+    m_pAddToDictMB->Enable( bEnable );
+    m_pAddToDictPB->Enable( bEnable );
 
     int nDicts = nItemId-1;
 
-    aAddToDictMB.Show( nDicts > 1 );
-    aAddToDictPB.Show( nDicts <= 1 );
+    m_pAddToDictMB->Show( nDicts > 1 );
+    m_pAddToDictPB->Show( nDicts <= 1 );
 
     return nDicts;
 }
@@ -1002,7 +893,7 @@ int SpellDialog::InitUserDicts()
 //-----------------------------------------------------------------------
 IMPL_LINK(SpellDialog, AddToDictClickHdl, PushButton*, EMPTYARG )
 {
-    return AddToDictionaryExecute(1, aAddToDictMB.GetPopupMenu());
+    return AddToDictionaryExecute(1, m_pAddToDictMB->GetPopupMenu());
 }
 
 //-----------------------------------------------------------------------
@@ -1014,11 +905,11 @@ IMPL_LINK(SpellDialog, AddToDictSelectHdl, MenuButton*, pButton )
 //-----------------------------------------------------------------------
 int SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu )
 {
-    aSentenceED.UndoActionStart( SPELLUNDO_CHANGE_GROUP );
+    m_pSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP );
 
     //GetErrorText() returns the current error even if the text is already
     //manually changed
-    const String aNewWord= aSentenceED.GetErrorText();
+    const String aNewWord= m_pSentenceED->GetErrorText();
 
     String aDicName ( pMenu->GetItemText( nItemId ) );
 
@@ -1042,7 +933,7 @@ int SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu )
                             SPELLUNDO_CHANGE_ADD_TO_DICTIONARY, aDialogUndoLink);
             pAction->SetDictionary( xDic );
             pAction->SetAddedWord( aNewWord );
-            aSentenceED.AddUndoAction( pAction );
+            m_pSentenceED->AddUndoAction( pAction );
         }
         // failed because there is already an entry?
         if (DIC_ERR_NONE != nAddRes && xDic->getEntry( aNewWord ).is())
@@ -1056,32 +947,32 @@ int SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu )
 
     // go on
     SpellContinue_Impl();
-    aSentenceED.UndoActionEnd();
+    m_pSentenceED->UndoActionEnd();
     return 0;
 }
 
 //-----------------------------------------------------------------------
 IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd)
 {
-    if (&aSentenceED == pEd)
+    if (m_pSentenceED == pEd)
     {
         bModified = true;
-        aSuggestionLB.SetNoSelection();
-        aSuggestionLB.Disable();
-        String sNewText( aSentenceED.GetText() );
-        aAutoCorrPB.Enable( sNewText != aSentenceED.GetText() );
+        m_pSuggestionLB->SetNoSelection();
+        m_pSuggestionLB->Disable();
+        String sNewText( m_pSentenceED->GetText() );
+        m_pAutoCorrPB->Enable( sNewText != m_pSentenceED->GetText() );
         SpellUndoAction_Impl* pSpellAction = new SpellUndoAction_Impl(SPELLUNDO_CHANGE_TEXTENGINE, aDialogUndoLink);
-        if(!aChangeAllPB.IsEnabled())
+        if(!m_pChangeAllPB->IsEnabled())
         {
-            aChangeAllPB.Enable();
+            m_pChangeAllPB->Enable();
             pSpellAction->SetEnableChangeAllPB();
         }
-        if(!aChangePB.IsEnabled())
+        if(!m_pChangePB->IsEnabled())
         {
-            aChangePB.Enable();
+            m_pChangePB->Enable();
             pSpellAction->SetEnableChangePB();
         }
-        aSentenceED.AddUndoAction(pSpellAction);
+        m_pSentenceED->AddUndoAction(pSpellAction);
     }
     return 0;
 };
@@ -1090,21 +981,12 @@ IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd)
 IMPL_LINK_NOARG(SpellDialog, CancelHdl)
 {
     //apply changes and ignored text parts first - if there are any
-    rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(true), false);
+    rParent.ApplyChangedSentence(m_pSentenceED->CreateSpellPortions(true), false);
     Close();
     return 0;
 }
 
 //-----------------------------------------------------------------------
-void SpellDialog::Paint( const Rectangle& rRect )
-{
-    ModelessDialog::Paint(rRect );
-    Rectangle aRect(aBackgroundGB.GetPosPixel(), aBackgroundGB.GetSizePixel());
-    DecorationView aDecoView( this );
-    aDecoView.DrawButton( aRect, BUTTON_DRAW_NOFILL);
-}
-
-//-----------------------------------------------------------------------
 long SpellDialog::Notify( NotifyEvent& rNEvt )
 {
     /* #i38338#
@@ -1137,25 +1019,25 @@ void SpellDialog::InvalidateDialog()
 {
     if( bFocusLocked )
         return;
-    aIgnorePB.SetText(aResumeST);
+    m_pIgnorePB->SetText(m_sResumeST);
     Window* aDisableArr[] =
-            {
-                &aNotInDictFT,
-                &aSentenceED,
-                &aSuggestionFT,
-                &aSuggestionLB,
-                &aLanguageFT,
-                &aLanguageLB,
-                &aIgnoreAllPB,
-                &aIgnoreRulePB,
-                &aAddToDictMB,
-                &aAddToDictPB,
-                &aChangePB,
-                &aChangeAllPB,
-                &aAutoCorrPB,
-                &aUndoPB,
-                0
-            };
+    {
+        m_pNotInDictFT,
+        m_pSentenceED,
+        m_pSuggestionFT,
+        m_pSuggestionLB,
+        m_pLanguageFT,
+        m_pLanguageLB,
+        m_pIgnoreAllPB,
+        m_pIgnoreRulePB,
+        m_pAddToDictMB,
+        m_pAddToDictPB,
+        m_pChangePB,
+        m_pChangeAllPB,
+        m_pAutoCorrPB,
+        m_pUndoPB,
+        0
+    };
     sal_Int16 i = 0;
     while(aDisableArr[i])
     {
@@ -1172,10 +1054,10 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck)
     if(!bUseSavedSentence)
     {
         //apply changes and ignored text parts
-        rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(true), bRecheck);
+        rParent.ApplyChangedSentence(m_pSentenceED->CreateSpellPortions(true), bRecheck);
     }
-    aSentenceED.ResetIgnoreErrorsAt();
-    aSentenceED.ResetModified();
+    m_pSentenceED->ResetIgnoreErrorsAt();
+    m_pSentenceED->ResetModified();
     SpellPortions aSentence = bUseSavedSentence ? m_aSavedSentence : rParent.GetNextWrongSentence( bRecheck );
     if(!bUseSavedSentence)
         m_aSavedSentence = aSentence;
@@ -1205,7 +1087,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck)
                 sText += aStart->sText;
             ++aStart;
         }
-        aSentenceED.SetText(sText);
+        m_pSentenceED->SetText(sText);
         aStart = aSentence.begin();
         sal_Int32 nStartPosition = 0;
         sal_Int32 nEndPosition = 0;
@@ -1224,7 +1106,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck)
                         sServiceName = xNamed->getName();
                     SpellErrorDescription aDesc( false, aStart->xAlternatives->getWord(),
                                     aStart->xAlternatives->getLocale(), aStart->xAlternatives->getAlternatives(), 0, sServiceName);
-                    aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition );
+                    m_pSentenceED->SetAttrib( SpellErrorAttrib(aDesc), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition );
                 }
                 else if(aStart->bIsGrammarError )
                 {
@@ -1252,20 +1134,20 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck)
                         &aStart->aGrammarError.aFullComment,
                         &aStart->aGrammarError.aRuleIdentifier,
                         &sFullCommentURL );
-                    aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition );
+                    m_pSentenceED->SetAttrib( SpellErrorAttrib(aDesc), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition );
                 }
                 if(aStart->bIsField)
-                    aSentenceED.SetAttrib( SpellBackgroundAttrib(COL_LIGHTGRAY), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition );
-                aSentenceED.SetAttrib( SpellLanguageAttrib(aStart->eLanguage), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition );
+                    m_pSentenceED->SetAttrib( SpellBackgroundAttrib(COL_LIGHTGRAY), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition );
+                m_pSentenceED->SetAttrib( SpellLanguageAttrib(aStart->eLanguage), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition );
                 nStartPosition = nEndPosition;
             }
             ++aStart;
         }
         //the edit field needs to be modified to apply the change from the ApplyChangeAllList
         if(!bHasReplaced)
-            aSentenceED.ClearModifyFlag();
-        aSentenceED.ResetUndo();
-        aUndoPB.Enable(sal_False);
+            m_pSentenceED->ClearModifyFlag();
+        m_pSentenceED->ResetUndo();
+        m_pUndoPB->Enable(sal_False);
         bRet = nStartPosition > 0;
     }
     return bRet;
@@ -1308,16 +1190,32 @@ bool SpellDialog::ApplyChangeAllList_Impl(SpellPortions& rSentence, bool &bHasRe
 }
 
 //-----------------------------------------------------------------------
-SentenceEditWindow_Impl::SentenceEditWindow_Impl( SpellDialog* pParent, const ResId& rResId ) :
-    MultiLineEdit( pParent, rResId ),
-    m_nErrorStart(0),
-    m_nErrorEnd(0),
-    m_bIsUndoEditMode(false)
+SentenceEditWindow_Impl::SentenceEditWindow_Impl(Window* pParent, const ResId& rResId)
+    : MultiLineEdit(pParent, rResId)
+    , m_nErrorStart(0)
+    , m_nErrorEnd(0)
+    , m_bIsUndoEditMode(false)
 {
     DisableSelectionOnFocus();
 }
 
 //-----------------------------------------------------------------------
+SentenceEditWindow_Impl::SentenceEditWindow_Impl(Window * pParent, WinBits nBits)
+    : MultiLineEdit(pParent, nBits)
+    , m_nErrorStart(0)
+    , m_nErrorEnd(0)
+    , m_bIsUndoEditMode(false)
+{
+    DisableSelectionOnFocus();
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSentenceEditWindow(Window *pParent,
+    VclBuilder::stringmap &)
+{
+    return new SentenceEditWindow_Impl(pParent, WB_BORDER|WB_VSCROLL|WB_IGNORETAB);
+}
+
+//-----------------------------------------------------------------------
 SentenceEditWindow_Impl::~SentenceEditWindow_Impl()
 {
 }
@@ -1733,7 +1631,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError )
                 pTextEngine->FindAttrib( TextPaM(0, nOldErrorStart), TEXTATTR_SPELL_ERROR ));
         pAction->SetErrorLanguageSelected(pOldAttrib && pOldAttrib->GetErrorDescription().aSuggestions.getLength() &&
                 LanguageTag( pOldAttrib->GetErrorDescription().aLocale).getLanguageType() ==
-                                        GetSpellDialog()->aLanguageLB.GetSelectLanguage());
+                                        GetSpellDialog()->m_pLanguageLB->GetSelectLanguage());
         AddUndoAction(pAction);
     }
     else
@@ -1741,11 +1639,11 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError )
     if( !bModified )
         ClearModifyFlag();
     SpellDialog* pSpellDialog = GetSpellDialog();
-    pSpellDialog->aIgnorePB.Enable(bRet);
-    pSpellDialog->aIgnoreAllPB.Enable(bRet);
-    pSpellDialog->aAutoCorrPB.Enable(bRet);
-    pSpellDialog->aAddToDictMB.Enable(bRet);
-    pSpellDialog->aAddToDictPB.Enable(bRet);
+    pSpellDialog->m_pIgnorePB->Enable(bRet);
+    pSpellDialog->m_pIgnoreAllPB->Enable(bRet);
+    pSpellDialog->m_pAutoCorrPB->Enable(bRet);
+    pSpellDialog->m_pAddToDictMB->Enable(bRet);
+    pSpellDialog->m_pAddToDictPB->Enable(bRet);
     return bRet;
 }
 
@@ -2062,7 +1960,7 @@ void SentenceEditWindow_Impl::AddUndoAction( SfxUndoAction *pAction, sal_Bool bT
 {
     ::svl::IUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager();
     rUndoMgr.AddUndoAction(pAction, bTryMerg);
-    GetSpellDialog()->aUndoPB.Enable();
+    GetSpellDialog()->m_pUndoPB->Enable();
 }
 
 //-----------------------------------------------------------------------
@@ -2101,18 +1999,18 @@ void  SentenceEditWindow_Impl::SetUndoEditMode(bool bSet)
     SpellDialog* pSpellDialog = GetSpellDialog();
     Control* aControls[] =
     {
-        &pSpellDialog->aChangeAllPB,
-        &pSpellDialog->aExplainFT,
-        &pSpellDialog->aIgnoreAllPB,
-        &pSpellDialog->aIgnoreRulePB,
-        &pSpellDialog->aIgnorePB,
-        &pSpellDialog->aSuggestionLB,
-        &pSpellDialog->aSuggestionFT,
-        &pSpellDialog->aLanguageFT,
-        &pSpellDialog->aLanguageLB,
-        &pSpellDialog->aAddToDictMB,
-        &pSpellDialog->aAddToDictPB,
-        &pSpellDialog->aAutoCorrPB,
+        pSpellDialog->m_pChangeAllPB,
+        pSpellDialog->m_pExplainFT,
+        pSpellDialog->m_pIgnoreAllPB,
+        pSpellDialog->m_pIgnoreRulePB,
+        pSpellDialog->m_pIgnorePB,
+        pSpellDialog->m_pSuggestionLB,
+        pSpellDialog->m_pSuggestionFT,
+        pSpellDialog->m_pLanguageFT,
+        pSpellDialog->m_pLanguageLB,
+        pSpellDialog->m_pAddToDictMB,
+        pSpellDialog->m_pAddToDictPB,
+        pSpellDialog->m_pAutoCorrPB,
         0
     };
     sal_Int32 nIdx = 0;
@@ -2131,7 +2029,7 @@ void  SentenceEditWindow_Impl::SetUndoEditMode(bool bSet)
     SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl(
                         SPELLUNDO_UNDO_EDIT_MODE, GetSpellDialog()->aDialogUndoLink);
     AddUndoAction(pAction);
-    pSpellDialog->aChangePB.Enable();
+    pSpellDialog->m_pChangePB->Enable();
 }
 
 IMPL_LINK( SpellDialog, HandleHyperlink, FixedHyperlink*, pHyperlink )
diff --git a/cui/source/dialogs/SpellDialog.hrc b/cui/source/dialogs/SpellDialog.hrc
deleted file mode 100644
index 39657fd..0000000
--- a/cui/source/dialogs/SpellDialog.hrc
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   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 regarding copyright
- *   ownership. The ASF licenses this file 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 .
- */
-
-#define FT_SUGGESTION   31
-#define LB_SUGGESTION   32
-#define FT_NOTINDICT    33
-#define ED_NEWWORD      34
-#define FT_LANGUAGE     35
-#define LB_LANGUAGE     36
-#define PB_IGNORE       37
-#define PB_IGNOREALL    38
-#define MB_ADDTODICT    39
-#define PB_CHANGE       40
-#define PB_CHANGEALL    41
-#define PB_AUTOCORR     42
-#define GB_BACKGROUND   43
-#define PB_OPTIONS      44
-#define PB_HELP         45
-#define PB_UNDO         46
-#define PB_CLOSE        47
-#define ST_NOSUGGESTIONS 48
-#define ST_RESUME       50
-#define ST_SPELLING                 51
-#define ST_SPELLING_AND_GRAMMAR     52
-#define CB_CHECK_GRAMMAR            54
-#define LINK_EXPLAIN                  55
-#define FT_EXPLAIN                  56
-#define PB_IGNORERULE               59
-#define PB_ADDTODICT    60
diff --git a/cui/source/dialogs/SpellDialog.src b/cui/source/dialogs/SpellDialog.src
deleted file mode 100644
index d65adfc..0000000
--- a/cui/source/dialogs/SpellDialog.src
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   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 regarding copyright
- *   ownership. The ASF licenses this file 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 .
- */
-
-#include <cuires.hrc>
-#include "helpid.hrc"
-#include "SpellDialog.hrc"
-
-// RID_SVXDLG_SPELLCHECK -------------------------------------------------
-
-#define STD_MASKCOLOR Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; }
-
-ModelessDialog RID_SVXDLG_SPELLCHECK
-{
-    HelpId = HID_SPELLCHECK ;
-    Size = MAP_APPFONT( 270, 208 );
-    OutputSize = TRUE;
-    Closeable = TRUE ;
-    SVLook = TRUE;
-    Hide = TRUE;
-    Text [ en-US ] = "Spellcheck: " ;
-
-    Moveable = TRUE ;
-
-    FixedText FT_LANGUAGE
-    {
-        Pos = MAP_APPFONT(  6, 8 );
-        Size = MAP_APPFONT( 100, 8 );
-        Text [ en-US ] = "Text languag~e" ;
-    };
-    ListBox LB_LANGUAGE
-    {
-        HelpID = "cui:ListBox:RID_SVXDLG_SPELLCHECK:LB_LANGUAGE";
-        Pos = MAP_APPFONT( 110, 6 );
-        Size = MAP_APPFONT( 93, 55 );
-        Border = TRUE;
-        Sort = TRUE;
-        DropDown = TRUE;
-    };
-    FixedText FT_EXPLAIN
-    {
-        Pos = MAP_APPFONT( 1, 18 );
-        Size = MAP_APPFONT( 239, 20 );
-        VCenter = TRUE ;
-    };
-    FixedText LINK_EXPLAIN
-    {
-        Pos = MAP_APPFONT( 240, 18 );
-        Size = MAP_APPFONT( 29, 20 );
-        Text [ en-US ] = "More..." ;
-        Right = TRUE ;
-        VCenter = TRUE ;
-    };
-    FixedText FT_NOTINDICT
-    {
-        Pos = MAP_APPFONT(  6, 46 );
-        Size = MAP_APPFONT( 120, 8 );
-        Text [ en-US ] = "~Not in dictionary" ;
-    };
-
-    MultiLineEdit ED_NEWWORD
-    {
-        HelpID = "cui:MultiLineEdit:RID_SVXDLG_SPELLCHECK:ED_NEWWORD";
-        Pos = MAP_APPFONT( 6, 57 );
-        Size = MAP_APPFONT( 197, 48 );
-        Border = TRUE;
-        VScroll = TRUE;
-        IgnoreTab = TRUE;
-    };
-
-    FixedText FT_SUGGESTION
-    {
-        Pos = MAP_APPFONT( 6, 108 );
-        Size = MAP_APPFONT( 120, 8 );
-        Text [ en-US ] = "~Suggestions" ;
-    };
-    ListBox LB_SUGGESTION
-    {
-        HelpID = "cui:ListBox:RID_SVXDLG_SPELLCHECK:LB_SUGGESTION";
-        Pos = MAP_APPFONT( 6, 119 );
-        Size = MAP_APPFONT( 197, 48 );
-        Border = TRUE;
-    };
-
-    CheckBox CB_CHECK_GRAMMAR
-    {
-        HelpID = "cui:CheckBox:RID_SVXDLG_SPELLCHECK:CB_CHECK_GRAMMAR";
-        Pos = MAP_APPFONT(  6, 173 );
-        Size = MAP_APPFONT( 100, 10 );
-        Text [ en-US ] = "Check ~grammar" ;
-        Hide = TRUE;
-    };
-
-    PushButton PB_IGNORE
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_SPELLCHECK:PB_IGNORE";
-        Pos = MAP_APPFONT( 209, 57 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "~Ignore Once" ;
-    };
-
-    PushButton PB_IGNOREALL
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_SPELLCHECK:PB_IGNOREALL";
-        Pos = MAP_APPFONT( 209, 74 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "I~gnore All" ;
-    };
-
-    PushButton PB_IGNORERULE
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_SPELLCHECK:PB_IGNORERULE";
-        Pos = MAP_APPFONT( 209, 74 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "I~gnore Rule" ;
-        Hide = TRUE;
-    };
-
-    MenuButton MB_ADDTODICT
-    {
-        HelpID = "cui:MenuButton:RID_SVXDLG_SPELLCHECK:MB_ADDTODICT";
-        Pos = MAP_APPFONT( 209, 91 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "~Add" ;
-    };
-
-    PushButton PB_ADDTODICT
-    {
-        HelpID = "cui:MenuButton:RID_SVXDLG_SPELLCHECK:MB_ADDTODICT";
-        Pos = MAP_APPFONT( 209, 91 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "~Add" ;
-    };
-
-    PushButton PB_CHANGE
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_SPELLCHECK:PB_CHANGE";
-        Pos = MAP_APPFONT( 209, 119 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "~Change" ;
-        DefButton = TRUE ;
-    };
-
-    PushButton PB_CHANGEALL
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_SPELLCHECK:PB_CHANGEALL";
-        Pos = MAP_APPFONT( 209, 137 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "Change A~ll" ;
-    };
-    PushButton PB_AUTOCORR
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_SPELLCHECK:PB_AUTOCORR";
-        Pos = MAP_APPFONT( 209, 154 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "AutoCor~rect" ;
-    };
-    GroupBox GB_BACKGROUND
-    {
-        Pos = MAP_APPFONT( 1, 41 );
-        Size = MAP_APPFONT( 268, 146 );
-        Hide=TRUE;
-    };
-
-    HelpButton PB_HELP
-    {
-        Pos = MAP_APPFONT( 6, 191 );
-        Size = MAP_APPFONT( 55, 14 );
-    };
-    PushButton PB_OPTIONS
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_SPELLCHECK:PB_OPTIONS";
-        Pos = MAP_APPFONT( 87, 191 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "O~ptions..." ;
-    };
-    PushButton PB_UNDO
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_SPELLCHECK:PB_UNDO";
-        Pos = MAP_APPFONT( 148, 191 );
-        Size = MAP_APPFONT( 55, 14 );
-        Text [ en-US ] = "~Undo" ;
-    };
-
-    PushButton PB_CLOSE
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_SPELLCHECK:PB_CLOSE";
-        Pos = MAP_APPFONT ( 209 , 191 ) ;
-        Size = MAP_APPFONT ( 55 , 14 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Cl~ose" ;
-    };
-    String ST_RESUME
-    {
-        Text[ en-US ] = "Resu~me";
-    };
-    String ST_NOSUGGESTIONS
-    {
-        Text [en-US] = "(no suggestions)";
-    };
-    String ST_SPELLING
-    {
-        Text[ en-US ] = "Spelling: $LANGUAGE ($LOCATION)";
-    };
-    String ST_SPELLING_AND_GRAMMAR
-    {
-        Text[ en-US ] = "Spelling and Grammar: $LANGUAGE ($LOCATION)";
-    };
-};
- // ********************************************************************** EOF
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 60102a4..d3004d2 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -70,13 +70,14 @@ private:
 
     void            CallModifyLink() {m_aModifyLink.Call(this);}
 
-    SpellDialog*    GetSpellDialog() const {return (SpellDialog*)GetParent();}
+    SpellDialog*    GetSpellDialog() const {return (SpellDialog*)GetParentDialog();}
 protected:
     virtual long    PreNotify( NotifyEvent& rNEvt );
 
 public:
-                    SentenceEditWindow_Impl( SpellDialog* pParent, const ResId& rResId );
-                    ~SentenceEditWindow_Impl();
+    SentenceEditWindow_Impl(Window* pParent, const ResId& rResId);
+    SentenceEditWindow_Impl(Window* pParent, WinBits nBits);
+    ~SentenceEditWindow_Impl();
 
     void            SetModifyHdl(const Link& rLink) { m_aModifyLink = rLink;}
 
@@ -115,15 +116,6 @@ public:
     void            ResetIgnoreErrorsAt()   { m_aIgnoreErrorsAt.clear(); }
 };
 
-class HelpFixedText : public FixedText
-{
-    public:
-        HelpFixedText( Window* pParent, const ResId& rResId );
-
-        virtual void Paint( const Rectangle& rRect );
-        long GetActualHeight( );
-};
-
 // class SvxSpellDialog ---------------------------------------------
 class SpellDialogChildWindow;
 
@@ -134,47 +126,41 @@ class SpellDialog : public SfxModelessDialog
     friend class SentenceEditWindow_Impl;
 private:
 
-    FixedText       aLanguageFT;
-    SvxLanguageBox  aLanguageLB;
-
-    HelpFixedText   aExplainFT;
-    FixedHyperlink  aExplainLink;
-
-    FixedText       aNotInDictFT;
-    SentenceEditWindow_Impl  aSentenceED;
+    FixedText*      m_pLanguageFT;
+    SvxLanguageBox* m_pLanguageLB;
 
-    FixedText       aSuggestionFT;
-    ListBox         aSuggestionLB;
+    FixedText*      m_pExplainFT;
+    FixedHyperlink* m_pExplainLink;
 
-    PushButton      aIgnorePB;
-    PushButton      aIgnoreAllPB;
-    PushButton      aIgnoreRulePB;
-    MenuButton      aAddToDictMB;
-    PushButton      aAddToDictPB;
+    FixedText*      m_pNotInDictFT;
+    SentenceEditWindow_Impl* m_pSentenceED;
 
-    PushButton      aChangePB;
-    PushButton      aChangeAllPB;
-    PushButton      aAutoCorrPB;
+    FixedText*      m_pSuggestionFT;
+    ListBox*        m_pSuggestionLB;
 
-    CheckBox        aCheckGrammarCB;
+    PushButton*     m_pIgnorePB;
+    PushButton*     m_pIgnoreAllPB;
+    PushButton*     m_pIgnoreRulePB;
+    PushButton*     m_pAddToDictPB;
+    MenuButton*     m_pAddToDictMB;
 
-    HelpButton      aHelpPB;
-    PushButton      aOptionsPB;
-    PushButton      aUndoPB;
-    PushButton      aClosePB;
+    PushButton*     m_pChangePB;
+    PushButton*     m_pChangeAllPB;
+    PushButton*     m_pAutoCorrPB;
 
-    GroupBox        aBackgroundGB;
+    CheckBox*       m_pCheckGrammarCB;
 
-    Image           aVendorImage;
+    PushButton*     m_pOptionsPB;
+    PushButton*     m_pUndoPB;
+    PushButton*     m_pClosePB;
 
-    String          aResumeST;
-    String          aIgnoreOnceST;
-    String          aNoSuggestionsST;
+    OUString        m_sResumeST;
+    OUString        m_sIgnoreOnceST;
+    OUString        m_sNoSuggestionsST;
 
-    const String    m_sTitleSpelling;
-    const String    m_sTitleSpellingGrammar;
+    String          m_sTitleSpelling;
+    String          m_sTitleSpellingGrammar;
 
-    Size            aOldWordEDSize;
     Link            aDialogUndoLink;
 
     bool            bModified;
@@ -225,7 +211,6 @@ private:
     void            SetTitle_Impl(LanguageType nLang);
 
 protected:
-    virtual void    Paint( const Rectangle& rRect );
     virtual long    Notify( NotifyEvent& rNEvt );
 
     String getReplacementString() const;
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index db0725d..f12b152 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -187,12 +187,6 @@
 #define HID_HANGULDLG_EDIT_NEWWORD "CUI_HID_HANGULDLG_EDIT_NEWWORD"
 #define HID_OFA_SUBST_APPLY "CUI_HID_OFA_SUBST_APPLY"
 #define HID_OFA_SUBST_DELETE "CUI_HID_OFA_SUBST_DELETE"
-#define HID_SPLDLG_BUTTON_CLOSE "CUI_HID_SPLDLG_BUTTON_CLOSE"
-#define HID_SPLDLG_BUTTON_IGNORE "CUI_HID_SPLDLG_BUTTON_IGNORE"
-#define HID_SPLDLG_BUTTON_IGNOREALL "CUI_HID_SPLDLG_BUTTON_IGNOREALL"
-#define HID_SPLDLG_BUTTON_CHANGE "CUI_HID_SPLDLG_BUTTON_CHANGE"
-#define HID_SPLDLG_BUTTON_CHANGEALL "CUI_HID_SPLDLG_BUTTON_CHANGEALL"
-#define HID_SPLDLG_BUTTON_EXPLAIN "CUI_HID_SPLDLG_BUTTON_EXPLAIN"
 #define HID_CHARMAP_CTL_SHOWSET "CUI_HID_CHARMAP_CTL_SHOWSET"
 #define HID_CHARMAP_CTL_SHOWTEXT "CUI_HID_CHARMAP_CTL_SHOWTEXT"
 #define HID_CHARMAP_CTL_SHOWCHAR "CUI_HID_CHARMAP_CTL_SHOWCHAR"
@@ -236,7 +230,6 @@
 #define HID_GALLERY_BROWSER "CUI_HID_GALLERY_BROWSER"
 #define HID_GALLERY_SEARCH "CUI_HID_GALLERY_SEARCH"
 #define HID_GALLERY_APPLY "CUI_HID_GALLERY_APPLY"
-#define HID_SPLDLG_BUTTON_IGNORERULE "CUI_HID_SPLDLG_BUTTON_IGNORERULE"
 #define HID_CONFIG_ACCEL "CUI_HID_CONFIG_ACCEL"
 #define HID_ACCELCONFIG_LISTBOX "CUI_HID_ACCELCONFIG_LISTBOX"
 #define HID_CONFIGGROUP_ACC_LISTBOX "CUI_HID_CONFIGGROUP_ACC_LISTBOX"
@@ -250,7 +243,6 @@
 #define HID_HANGULHANJA_EDIT_DLG "CUI_HID_HANGULHANJA_EDIT_DLG"
 #define HID_HANGULHANJA_OPT_DICTS_LB "CUI_HID_HANGULHANJA_OPT_DICTS_LB"
 #define HID_MULTIPATH "CUI_HID_MULTIPATH"
-#define HID_SPELLCHECK "CUI_HID_SPELLCHECK"
 #define HID_TPSIZE_CTRL "CUI_HID_TPSIZE_CTRL"
 #define HID_TPROTATION_CTRL1 "CUI_HID_TPROTATION_CTRL1"
 #define HID_TPROTATION_CTRL2 "CUI_HID_TPROTATION_CTRL2"
diff --git a/cui/uiconfig/ui/spellingdialog.ui b/cui/uiconfig/ui/spellingdialog.ui
index 06b607b..26bfdfe 100644
--- a/cui/uiconfig/ui/spellingdialog.ui
+++ b/cui/uiconfig/ui/spellingdialog.ui
@@ -31,7 +31,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button8">
+              <object class="GtkButton" id="options">
                 <property name="label" translatable="yes">O_ptions...</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -45,7 +45,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button9">
+              <object class="GtkButton" id="undo">
                 <property name="label" translatable="yes">_Undo</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -86,237 +86,322 @@
           <object class="GtkGrid" id="grid1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="row_spacing">12</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="row_spacing">6</property>
             <property name="column_spacing">12</property>
             <child>
-              <object class="GtkLabel" id="label1">
+              <object class="svxcorelo:SvxLanguageBox" id="languagelb">
+                <property name="visible">True</property>
+                <property name="halign">end</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="notindictft">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes">Text languag_e</property>
+                <property name="label" translatable="yes">_Not in dictionary</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
-                <property name="width">1</property>
+                <property name="top_attach">2</property>
+                <property name="width">3</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkComboBoxText" id="comboboxtext1">
+              <object class="GtkButton" id="ignore">
+                <property name="label" translatable="yes">_Ignore Once</property>
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">end</property>
-                <property name="entry_text_column">0</property>
-                <property name="id_column">1</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="valign">center</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
+                <property name="left_attach">2</property>
+                <property name="top_attach">3</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label2">
+              <object class="cuilo:SentenceEditWindow" id="sentence">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">3</property>
+                <property name="width">2</property>
+                <property name="height">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="suggestionsft">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes">_Not in dictionary</property>
+                <property name="label" translatable="yes">_Suggestions</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
+                <property name="top_attach">8</property>
                 <property name="width">3</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button1">
-                <property name="label" translatable="yes">_Ignore Once</property>
+              <object class="GtkButton" id="change">
+                <property name="label" translatable="yes">_Change</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="valign">center</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
-                <property name="top_attach">2</property>
+                <property name="top_attach">9</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button3">
-                <property name="label">gtk-add</property>
+              <object class="GtkButton" id="changeall">
+                <property name="label" translatable="yes">Change A_ll</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="valign">center</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
-                <property name="top_attach">5</property>
+                <property name="top_attach">10</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkScrolledWindow" id="scrolledwindow1">
+              <object class="GtkButton" id="autocorrect">
+                <property name="label" translatable="yes">AutoCor_rect</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="hexpand">True</property>
-                <property name="vscrollbar_policy">always</property>
-                <property name="shadow_type">in</property>
-                <child>
-                  <object class="GtkTextView" id="textview2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                  </object>
-                </child>
+                <property name="receives_default">True</property>
+                <property name="valign">center</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-                <property name="width">2</property>
-                <property name="height">4</property>
+                <property name="left_attach">2</property>
+                <property name="top_attach">11</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label3">
+              <object class="GtkCheckButton" id="checkgrammar">
+                <property name="label" translatable="yes">Check _grammar</property>
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">_Suggestions</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">6</property>
+                <property name="top_attach">12</property>
                 <property name="width">3</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button4">
-                <property name="label" translatable="yes">_Change</property>
-                <property name="visible">True</property>
+              <object class="GtkButton" id="ignoreall">
+                <property name="label" translatable="yes">I_gnore All</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="no_show_all">True</property>
+                <property name="valign">center</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
-                <property name="top_attach">7</property>
+                <property name="top_attach">4</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button5">
-                <property name="label" translatable="yes">Change A_ll</property>
-                <property name="visible">True</property>
+              <object class="GtkButton" id="ignorerule">
+                <property name="label" translatable="yes">I_gnore Rule</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="no_show_all">True</property>
+                <property name="valign">center</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
-                <property name="top_attach">8</property>
+                <property name="top_attach">5</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkScrolledWindow" id="scrolledwindow2">
+              <object class="GtkLabel" id="languageft">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="vscrollbar_policy">always</property>
-                <property name="shadow_type">in</property>
-                <child>
-                  <object class="GtkTextView" id="textview1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                  </object>
-                </child>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Text languag_e</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">7</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="explain">
+                <property name="can_focus">False</property>
+                <property name="no_show_all">True</property>
+                <property name="xalign">0</property>
+                <property name="use_underline">True</property>
+                <property name="wrap">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
                 <property name="width">2</property>
-                <property name="height">3</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button6">
-                <property name="label" translatable="yes">AutoCor_rect</property>
-                <property name="visible">True</property>
+              <object class="GtkLinkButton" id="explainlink">
+                <property name="label" translatable="yes">More...</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
+                <property name="no_show_all">True</property>
+                <property name="has_tooltip">True</property>
+                <property name="relief">none</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
-                <property name="top_attach">9</property>
+                <property name="top_attach">1</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkCheckButton" id="checkbutton1">
-                <property name="label" translatable="yes">Check _grammar</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
+              <object class="GtkLabel" id="resumeft">
+                <property name="can_focus">False</property>
+                <property name="no_show_all">True</property>
+                <property name="label" translatable="yes">Res_ume</property>
                 <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="draw_indicator">True</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">10</property>
-                <property name="width">3</property>
+                <property name="top_attach">13</property>
+                <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <placeholder/>
+              <object class="GtkLabel" id="nosuggestionsft">
+                <property name="can_focus">False</property>
+                <property name="no_show_all">True</property>
+                <property name="label" translatable="yes">(no suggestions)</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">13</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button2">
-                <property name="label" translatable="yes">I_gnore All</property>
+              <object class="GtkLabel" id="alttitleft">
+                <property name="can_focus">False</property>
+                <property name="no_show_all">True</property>
+                <property name="label" translatable="yes">Spelling: $LANGUAGE ($LOCATION)</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">13</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTreeView" id="suggestionslb">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="treeview-selection1"/>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">9</property>
+                <property name="width">2</property>
+                <property name="height">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="add">
+                <property name="label">gtk-add</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
+                <property name="valign">center</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
-                <property name="top_attach">3</property>
+                <property name="top_attach">6</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button7">
-                <property name="label" translatable="yes">I_gnore Rule</property>
-                <property name="visible">True</property>
+              <object class="GtkButton" id="addmb:addmenu">
+                <property name="label">gtk-add</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
+                <property name="no_show_all">True</property>
+                <property name="valign">center</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
-                <property name="top_attach">4</property>
+                <property name="top_attach">7</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
+            <child>
+              <placeholder/>
+            </child>
           </object>
           <packing>
-            <property name="expand">False</property>
+            <property name="expand">True</property>
             <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
@@ -325,9 +410,13 @@
     </child>
     <action-widgets>
       <action-widget response="0">help</action-widget>
-      <action-widget response="0">button8</action-widget>
-      <action-widget response="0">button9</action-widget>
+      <action-widget response="0">options</action-widget>
+      <action-widget response="0">undo</action-widget>
       <action-widget response="0">close</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkMenu" id="addmenu">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+  </object>
 </interface>
diff --git a/cui/util/hidother.src b/cui/util/hidother.src
index 3827af0..11037a6 100644
--- a/cui/util/hidother.src
+++ b/cui/util/hidother.src
@@ -148,13 +148,6 @@ hidspecial HID_REDLINING_DLG                { HelpID = HID_REDLINING_DLG; };
 hidspecial HID_REDLINING_EDIT               { HelpID = HID_REDLINING_EDIT; };
 hidspecial HID_REDLINING_NEXT               { HelpID = HID_REDLINING_NEXT; };
 hidspecial HID_REDLINING_PREV               { HelpID = HID_REDLINING_PREV; };
-hidspecial HID_SPLDLG_BUTTON_CHANGE             { HelpID =  HID_SPLDLG_BUTTON_CHANGE      ; };
-hidspecial HID_SPLDLG_BUTTON_CHANGEALL          { HelpID =  HID_SPLDLG_BUTTON_CHANGEALL   ; };
-hidspecial HID_SPLDLG_BUTTON_CLOSE              { HelpID =  HID_SPLDLG_BUTTON_CLOSE       ; };
-hidspecial HID_SPLDLG_BUTTON_EXPLAIN            { HelpID =  HID_SPLDLG_BUTTON_EXPLAIN     ; };
-hidspecial HID_SPLDLG_BUTTON_IGNORE             { HelpID =  HID_SPLDLG_BUTTON_IGNORE      ; };
-hidspecial HID_SPLDLG_BUTTON_IGNOREALL          { HelpID =  HID_SPLDLG_BUTTON_IGNOREALL   ; };
-hidspecial HID_SPLDLG_BUTTON_IGNORERULE          { HelpID =  HID_SPLDLG_BUTTON_IGNORERULE   ; };
 hidspecial HID_SVX_CONFIG_EVENT       { HelpId = HID_SVX_CONFIG_EVENT; };
 hidspecial HID_SVX_CONFIG_ICON_SELECTOR { HelpId = HID_SVX_CONFIG_ICON_SELECTOR; };
 hidspecial HID_SVX_CONFIG_MENU        { HelpId = HID_SVX_CONFIG_MENU; };
commit 7d48d41d9e7bee273628ed55a4bac720751ba328
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 29 16:58:31 2012 +0000

    don't remove blank rows/cols more than once
    
    Change-Id: I7b46ac1f9fcca5a3ae9dbb6b6c4f92917f522295

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 91017d5..f8a7505 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -543,11 +543,14 @@ VclGrid::array_type VclGrid::assembleGrid() const
         }
     }
 
-    //reduce the spans of elements that span empty rows or columns
+    //reduce the spans of elements that span empty columns
     for (sal_Int32 x = 0; x < nMaxX; ++x)
     {
+        std::set<ExtendedGridEntry*> candidates;
         for (sal_Int32 y = 0; y < nMaxY; ++y)
         {
+            if (aNonEmptyCols[x])
+                continue;
             ExtendedGridEntry &rSpan = A[x][y];
             //cell x/y is spanned by the widget at cell rSpan.x/rSpan.y,
             //just points back to itself if there's no cell spanning
@@ -558,10 +561,41 @@ VclGrid::array_type VclGrid::assembleGrid() const
                 continue;
             }
             ExtendedGridEntry &rEntry = A[rSpan.x][rSpan.y];
-            if (aNonEmptyCols[x] == false)
-                --rEntry.nSpanWidth;
-            if (aNonEmptyRows[y] == false)
-                --rEntry.nSpanHeight;
+            candidates.insert(&rEntry);
+        }
+        for (std::set<ExtendedGridEntry*>::iterator aI = candidates.begin(), aEnd = candidates.end();
+            aI != aEnd; ++aI)
+        {
+            ExtendedGridEntry *pEntry = *aI;
+            --pEntry->nSpanWidth;
+        }
+    }
+
+    //reduce the spans of elements that span empty rows
+    for (sal_Int32 y = 0; y < nMaxY; ++y)
+    {
+        std::set<ExtendedGridEntry*> candidates;
+        for (sal_Int32 x = 0; x < nMaxX; ++x)
+        {
+            if (aNonEmptyRows[y])
+                continue;
+            ExtendedGridEntry &rSpan = A[x][y];
+            //cell x/y is spanned by the widget at cell rSpan.x/rSpan.y,
+            //just points back to itself if there's no cell spanning
+            if ((rSpan.x == -1) || (rSpan.y == -1))
+            {
+                //there is no entry for this cell, i.e. this is a cell
+                //with no widget in it, or spanned by any other widget
+                continue;
+            }
+            ExtendedGridEntry &rEntry = A[rSpan.x][rSpan.y];
+            candidates.insert(&rEntry);
+        }
+        for (std::set<ExtendedGridEntry*>::iterator aI = candidates.begin(), aEnd = candidates.end();
+            aI != aEnd; ++aI)
+        {
+            ExtendedGridEntry *pEntry = *aI;
+            --pEntry->nSpanHeight;
         }
     }
 
@@ -612,7 +646,7 @@ void VclGrid::calcMaxs(const array_type &A, std::vector<Value> &rWidths, std::ve
         {
             const GridEntry &rEntry = A[x][y];
             const Window *pChild = rEntry.pChild;
-            if (!pChild)
+            if (!pChild || !pChild->IsVisible())
                 continue;
 
             sal_Int32 nWidth = rEntry.nSpanWidth;
@@ -643,7 +677,7 @@ void VclGrid::calcMaxs(const array_type &A, std::vector<Value> &rWidths, std::ve
         {
             const GridEntry &rEntry = A[x][y];
             const Window *pChild = rEntry.pChild;
-            if (!pChild)
+            if (!pChild || !pChild->IsVisible())
                 continue;
 
             sal_Int32 nWidth = rEntry.nSpanWidth;
commit fd38d60c54cf59eb533089fb478bd7d686893ac7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Dec 21 23:42:07 2012 +0000

    now that the print dialog is fixed the SYMBOL_PREV/NEXT hack can go
    
    Change-Id: I870a46e1b1e2bcd05795e423d3bb67a61e4c22d0

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 52d57a1..30a2188 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -508,18 +508,6 @@ namespace
                 pWindow = new CancelButton(pParent, nBits);
             else if (sType == "gtk-help")
                 pWindow = new HelpButton(pParent, nBits);
-            else if (sType == "gtk-media-next")
-            {
-                PushButton *pBtn = new PushButton(pParent, nBits);
-                pBtn->SetSymbol(SYMBOL_NEXT);
-                pWindow = pBtn;
-            }
-            else if (sType == "gtk-media-previous")
-            {
-                PushButton *pBtn = new PushButton(pParent, nBits);
-                pBtn->SetSymbol(SYMBOL_PREV);
-                pWindow = pBtn;
-            }
             else
             {
                 pWindow = new PushButton(pParent, nBits);
commit 5aa0ac02a0cb9b7a387366f841bc603cbe396eaa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Dec 21 20:33:57 2012 +0000

    callcatcher: update unused code list
    
    Change-Id: I47467b53705f8059a829126a598e29a1105df13c

diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 32b64d4..764f1ce 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
 	cui/uiconfig/ui/scriptorganizer \
 	cui/uiconfig/ui/select_persona_dialog \
 	cui/uiconfig/ui/specialcharacters \
+	cui/uiconfig/ui/spellingdialog \
 	cui/uiconfig/ui/thesaurus \
 	cui/uiconfig/ui/twolinespage \
 	cui/uiconfig/ui/zoomdialog \
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx b/sc/source/filter/inc/autofilterbuffer.hxx
index 7b4ca5c..6cfc7c5 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -135,10 +135,6 @@ struct FilterCriterionModel
 
     /** Imports the criterion model from the passed BIFF12 stream. */
     void                readBiffData( SequenceInputStream& rStrm );
-    /** Imports the initial criterion data from the passed BIFF5/BIFF8 stream. */
-    void                readBiffData( BiffInputStream& rStrm );
-    /** Imports the trailing string data from the passed BIFF5/BIFF8 stream. */
-    void                readString( BiffInputStream& rStrm, BiffType eBiff, rtl_TextEncoding eTextEnc );
 };
 
 // ----------------------------------------------------------------------------
diff --git a/sc/source/filter/oox/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx
index 6ccb193..9665e5c 100644
--- a/sc/source/filter/oox/autofilterbuffer.cxx
+++ b/sc/source/filter/oox/autofilterbuffer.cxx
@@ -389,71 +389,6 @@ void FilterCriterionModel::readBiffData( SequenceInputStream& rStrm )
     }
 }
 
-void FilterCriterionModel::readBiffData( BiffInputStream& rStrm )
-{
-    sal_uInt8 nOperator;
-    rStrm >> mnDataType >> nOperator;
-    setBiffOperator( nOperator );
-
-    switch( mnDataType )
-    {
-        case BIFF_FILTER_DATATYPE_NONE:
-            rStrm.skip( 8 );
-        break;
-        case BIFF_FILTER_DATATYPE_RK:
-            maValue <<= BiffHelper::calcDoubleFromRk( rStrm.readInt32() );
-            rStrm.skip( 4 );
-        break;
-        case BIFF_FILTER_DATATYPE_DOUBLE:
-            maValue <<= rStrm.readDouble();
-        break;
-        case BIFF_FILTER_DATATYPE_STRING:
-            rStrm.skip( 4 );
-            rStrm >> mnStrLen;
-            rStrm.skip( 3 );
-        break;
-        case BIFF_FILTER_DATATYPE_BOOLEAN:
-        {
-            sal_uInt8 nValue, nType;
-            rStrm >> nValue >> nType;
-            rStrm.skip( 6 );
-            switch( nType )
-            {
-                case BIFF_BOOLERR_BOOL:     maValue <<= (nValue != 0);                              break;
-                case BIFF_BOOLERR_ERROR:    maValue <<= BiffHelper::calcDoubleFromError( nValue );  break;
-                default:                    OSL_ENSURE( false, "FilterCriterionModel::readBiffData - unknown type" );
-            }
-        }
-        break;
-        case BIFF_FILTER_DATATYPE_EMPTY:
-            rStrm.skip( 8 );
-            if( mnOperator == XML_equal )
-                maValue <<= OUString();
-        break;
-        case BIFF_FILTER_DATATYPE_NOTEMPTY:
-            rStrm.skip( 8 );
-            if( mnOperator == XML_notEqual )
-                maValue <<= OUString();
-        break;
-        default:
-            OSL_ENSURE( false, "FilterCriterionModel::readBiffData - unexpected data type" );
-            rStrm.skip( 8 );
-    }
-}
-
-void FilterCriterionModel::readString( BiffInputStream& rStrm, BiffType eBiff, rtl_TextEncoding eTextEnc )
-{
-    if( (mnDataType == BIFF_FILTER_DATATYPE_STRING) && (mnStrLen > 0) )
-    {
-        OUString aValue = (eBiff == BIFF8) ?
-            rStrm.readUniStringBody( mnStrLen, true ) :
-            rStrm.readCharArrayUC( mnStrLen, eTextEnc, true );
-        aValue = aValue.trim();
-        if( !aValue.isEmpty() )
-            maValue <<= aValue;
-    }
-}
-
 // ----------------------------------------------------------------------------
 
 CustomFilter::CustomFilter( const WorkbookHelper& rHelper ) :
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index aa0afde..d445194 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -180,7 +180,6 @@ public:
     using SotObject::GetInterface;
     using SfxShell::Activate;           // with sal_Bool bMDI
     using SfxShell::Deactivate;         // with sal_Bool bMDI
-    using SfxObjectShell::Print;        // print styles
 
 #ifdef ENABLE_TELEPATHY
     SC_DLLPRIVATE ScCollaboration* GetCollaboration();
diff --git a/sfx2/UI_sfx.mk b/sfx2/UI_sfx.mk
index a00ed98..c5077bb 100644
--- a/sfx2/UI_sfx.mk
+++ b/sfx2/UI_sfx.mk
@@ -19,7 +19,6 @@ $(eval $(call gb_UI_add_uifiles,sfx,\
 	sfx2/uiconfig/ui/password \
 	sfx2/uiconfig/ui/printeroptionsdialog \
 	sfx2/uiconfig/ui/securityinfopage \
-	sfx2/uiconfig/ui/templatemanagementdialog \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 5ff15f2..6fe8bc0 100644
--- a/sfx2/inc/sfx2/app.hxx
+++ b/sfx2/inc/sfx2/app.hxx
@@ -200,11 +200,6 @@ public:
     void                        NotifyEvent(const SfxEventHint& rEvent, bool bSynchron = true );
     sal_Bool                        IsDowning() const;
     sal_Bool                        IsSecureURL( const INetURLObject &rURL, const String *pReferer ) const;
-    static SfxObjectShellRef    DocAlreadyLoaded( const String &rName,
-                                                  sal_Bool bSilent,
-                                                  sal_Bool bActivate,
-                                                  sal_Bool bForbidVisible = sal_False,
-                                                  const String* pPostStr = 0);
     void                        ResetLastDir();
 
     SAL_DLLPRIVATE static SfxApplication* Get() { return pApp;}
diff --git a/sfx2/inc/sfx2/basedlgs.hxx b/sfx2/inc/sfx2/basedlgs.hxx
index 2251eaf..2d3abba 100644
--- a/sfx2/inc/sfx2/basedlgs.hxx
+++ b/sfx2/inc/sfx2/basedlgs.hxx
@@ -40,18 +40,6 @@ class HelpButton;
 class Button;
 class FixedLine;
 
-// class SfxModalDefParentHelper -----------------------------------------
-
-class SfxModalDefParentHelper
-{
-private:
-    Window *pOld;
-
-public:
-    SfxModalDefParentHelper(Window* pWindow);
-    ~SfxModalDefParentHelper();
-};
-
 // class SfxModalDialog --------------------------------------------------
 
 class SFX2_DLLPUBLIC SfxModalDialog: public ModalDialog
diff --git a/sfx2/inc/sfx2/doctempl.hxx b/sfx2/inc/sfx2/doctempl.hxx
index 507117c..01d398f 100644
--- a/sfx2/inc/sfx2/doctempl.hxx
+++ b/sfx2/inc/sfx2/doctempl.hxx
@@ -60,17 +60,14 @@ public:
 
     const SfxDocumentTemplates &operator=(const SfxDocumentTemplates &);
 
-    sal_Bool                           Rescan( );
     void                ReInitFromComponent();
 
-    sal_Bool                IsRegionLoaded( sal_uInt16 nIdx ) const;
     sal_uInt16              GetRegionCount() const;
     const String&       GetRegionName(sal_uInt16 nIdx) const;                   //dv!
     String              GetFullRegionName(sal_uInt16 nIdx) const;
 
     sal_uInt16              GetCount(sal_uInt16 nRegion) const;
     const String&       GetName(sal_uInt16 nRegion, sal_uInt16 nIdx) const;         //dv!
-    String              GetFileName(sal_uInt16 nRegion, sal_uInt16 nIdx) const;
     String              GetPath(sal_uInt16 nRegion, sal_uInt16 nIdx) const;
 
     // Allows to retrieve the target template URL from the UCB
@@ -94,14 +91,10 @@ public:
                          sal_uInt16 nSourceIdx);
     sal_Bool            Delete(sal_uInt16 nRegion, sal_uInt16 nIdx);
     sal_Bool            InsertDir(const String &rText, sal_uInt16 nRegion);
-    sal_Bool            SetName(const String &rName, sal_uInt16 nRegion, sal_uInt16 nIdx);
 
     sal_Bool            CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const String &rName) const;
     sal_Bool            CopyFrom(sal_uInt16 nRegion, sal_uInt16 nIdx, String &rName);
 
-    SfxObjectShellRef CreateObjectShell(sal_uInt16 nRegion, sal_uInt16 nIdx);
-    sal_Bool            DeleteObjectShell(sal_uInt16, sal_uInt16);
-
     sal_Bool            GetFull( const String& rRegion, const String& rName, String& rPath );
     sal_Bool            GetLogicNames( const String& rPath, String& rRegion, String& rName ) const;
 
@@ -121,10 +114,6 @@ public:
         So set <arg>_bSmart</arg> to <TRUE/> to do a check for necessity first.
     */
     void            Update( sal_Bool _bSmart = sal_True );
-
-    // allows to detect whether it is allowed to delete ( at least partially )
-    // a group or a template, or to edit a template
-    sal_Bool        HasUserContents( sal_uInt16 nRegion, sal_uInt16 nIdx ) const;
 };
 
 #endif // #ifndef _SFXDOCTEMPL_HXX
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index d2a3b3d..8e1e2f6 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -526,12 +526,6 @@ public:
                                         sal_uInt16 nIdx2 = INDEX_IGNORE,
                                         sal_uInt16 nIdx3 = INDEX_IGNORE);
 
-    sal_Bool                    Print( Printer &rPrt,
-                                       sal_uInt16 nIdx1,
-                                       sal_uInt16 nIdx2 = INDEX_IGNORE,
-                                       sal_uInt16 nIdx3 = INDEX_IGNORE,
-                                       const String *pObjectName = 0 );
-
     virtual void                LoadStyles( SfxObjectShell &rSource );
     void                        ReadNote( INote * );
     void                        UpdateNote( INote * );
diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
index c2103d3..500063c 100644
--- a/sfx2/inc/sfx2/sfx.hrc
+++ b/sfx2/inc/sfx2/sfx.hrc
@@ -129,8 +129,6 @@
 
 #define RID_APPTITLE                        (RID_SFX_START+4)
 
-#define RID_DOCALREADYLOADED_DLG            (RID_SFX_START+1)
-
 #define DLG_DOCINFO_EDT                     (RID_SFX_START+6)
 #define TP_MANAGE_STYLES                    (RID_SFX_START+7)
 #define DLG_STYLE_DESIGNER                  (RID_SFX_START+8)
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index be348fd..78457ae 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -59,16 +59,11 @@ QueryBox MSG_QUERY_LASTVERSION
     Message [ en-US ] = "Cancel all changes?" ;
 };
 
-InfoBox RID_DOCALREADYLOADED_DLG
-{
-    Message [ en-US ] = "Document already open." ;
-};
-
 ErrorBox MSG_ERR_NO_WEBBROWSER_FOUND
 {
     BUTTONS = WB_OK ;
     DEFBUTTON = WB_DEF_OK ;
-    Message[ en-US ] = "%PRODUCTNAME could not find a web browser on your system. Please check your Desktop Preferences or install a web browser (for example, Mozilla) in the default  location requested during the browser installation." ;
+    Message[ en-US ] = "%PRODUCTNAME could not find a web browser on your system. Please check your Desktop Preferences or install a web browser (for example, Firefox) in the default  location requested during the browser installation." ;
 };
 
 ErrorBox MSG_ERR_NO_ABS_URI_REF

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list