[Libreoffice-commits] .: 6 commits - svx/AllLangResTarget_svx.mk svx/inc svx/source svx/uiconfig svx/UI_svx.mk sw/uiconfig sw/UI_swriter.mk vcl/generic vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 10 04:25:21 PST 2013


 svx/AllLangResTarget_svx.mk                  |    1 
 svx/UI_svx.mk                                |    1 
 svx/inc/helpid.hrc                           |    1 
 svx/inc/svx/dialogs.hrc                      |    2 
 svx/inc/svx/rubydialog.hxx                   |   95 ++----
 svx/source/dialog/rubydialog.cxx             |  289 ++++++++++---------
 svx/source/dialog/rubydialog.hrc             |   44 --
 svx/source/dialog/rubydialog.src             |  212 --------------
 svx/uiconfig/ui/asianphoneticguidedialog.ui  |  403 +++++++++++++++++++++++++++
 sw/UI_swriter.mk                             |    1 
 sw/uiconfig/swriter/ui/asianphoneticguide.ui |  286 -------------------
 vcl/generic/glyphs/graphite_serverfont.cxx   |    2 
 vcl/inc/svids.hrc                            |    1 
 vcl/inc/vcl/builder.hxx                      |    3 
 vcl/source/src/btntext.src                   |    5 
 vcl/source/window/builder.cxx                |   75 +++--
 vcl/source/window/layout.cxx                 |    4 
 17 files changed, 656 insertions(+), 769 deletions(-)

New commits:
commit c82390b5afb4f400ba16c3932ef8ad6a714baac9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 9 20:10:12 2013 +0000

    adapt code to Asian Phonetic Guide .ui conversion
    
    Change-Id: Ie7bf21269e11fd1b3982999fa16597ba9caba674

diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk
index c996c3a..c4f66e6 100644
--- a/svx/AllLangResTarget_svx.mk
+++ b/svx/AllLangResTarget_svx.mk
@@ -63,7 +63,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
     svx/source/dialog/optgrid.src \
     svx/source/dialog/passwd.src \
     svx/source/dialog/prtqry.src \
-    svx/source/dialog/rubydialog.src \
     svx/source/dialog/ruler.src \
     svx/source/dialog/sdstring.src \
     svx/source/dialog/srchdlg.src \
diff --git a/svx/UI_svx.mk b/svx/UI_svx.mk
index ae1ccf8..bba32ab 100644
--- a/svx/UI_svx.mk
+++ b/svx/UI_svx.mk
@@ -10,6 +10,7 @@
 $(eval $(call gb_UI_UI,svx))
 
 $(eval $(call gb_UI_add_uifiles,svx,\
+	svx/uiconfig/ui/asianphoneticguidedialog \
 	svx/uiconfig/ui/compressgraphicdialog \
 ))
 
diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc
index 0de9cf2..1668f71 100644
--- a/svx/inc/helpid.hrc
+++ b/svx/inc/helpid.hrc
@@ -181,7 +181,6 @@
 #define HID_REDLINING_VIEW_PB_REJECT                          "SVX_HID_REDLINING_VIEW_PB_REJECT"
 #define HID_REDLINING_VIEW_PB_REJECTALL                       "SVX_HID_REDLINING_VIEW_PB_REJECTALL"
 #define HID_REDLINING_VIEW_PB_UNDO                            "SVX_HID_REDLINING_VIEW_PB_UNDO"
-#define HID_RUBY_DIALOG                                       "SVX_HID_RUBY_DIALOG"
 #define HID_STYLE_LISTBOX                                     "SVX_HID_STYLE_LISTBOX"
 #define HID_SVXTBX_UNDO_REDO_CTRL                             "SVX_HID_SVXTBX_UNDO_REDO_CTRL"
 #define HID_SVX_CHINESE_DICTIONARY_CB_REVERSE                 "SVX_HID_SVX_CHINESE_DICTIONARY_CB_REVERSE"
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index 7141065..d9420b5 100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -250,8 +250,6 @@
 #define RID_SVXIMG_NOTCHECKED               (RID_SVX_START + 243)
 #define RID_SVXIMG_CHECKED                  (RID_SVX_START + 244)
 
-#define RID_SVXDLG_RUBY                     (RID_SVX_START + 247)
-
 #define RID_SVXDLG_TEXTCONTROL_CHARATTR     (RID_SVX_START + 286)
 #define RID_SVXDLG_TEXTCONTROL_PARAATTR     (RID_SVX_START + 287)
 
diff --git a/svx/inc/svx/rubydialog.hxx b/svx/inc/svx/rubydialog.hxx
index ab670b5..3ab0f25 100644
--- a/svx/inc/svx/rubydialog.hxx
+++ b/svx/inc/svx/rubydialog.hxx
@@ -23,6 +23,7 @@
 
 #include <sfx2/childwin.hxx>
 #include <sfx2/basedlgs.hxx>
+#include <vcl/layout.hxx>
 #include <vcl/lstbox.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/button.hxx>
@@ -43,10 +44,16 @@ class RubyPreview : public Window
 {
 protected:
     virtual void Paint( const Rectangle& rRect );
-    SvxRubyDialog&  rParentDlg;
+    SvxRubyDialog* m_pParentDlg;
 
 public:
     RubyPreview(SvxRubyDialog& rParent, const ResId& rResId);
+    RubyPreview(Window *pParent);
+    void setRubyDialog(SvxRubyDialog* pParentDlg)
+    {
+        m_pParentDlg = pParentDlg;
+    }
+    virtual Size GetOptimalSize(WindowSizeType eType) const;
 };
 
 class SVX_DLLPUBLIC SvxRubyChildWindow : public SfxChildWindow
@@ -66,8 +73,14 @@ class RubyEdit  : public Edit
     virtual void        GetFocus();
     virtual long        PreNotify( NotifyEvent& rNEvt );
 public:
-    RubyEdit(Window* pParent, const ResId& rResId) :
-        Edit(pParent, rResId){}
+    RubyEdit(Window* pParent, const ResId& rResId)
+        : Edit(pParent, rResId)
+    {
+    }
+    RubyEdit(Window* pParent)
+        : Edit(pParent, WB_BORDER)
+    {
+    }
     void    SetScrollHdl(Link& rLink) {aScrollHdl = rLink;}
     void    SetJumpHdl(Link& rLink) {aJumpHdl = rLink;}
 };
@@ -80,36 +93,33 @@ class SvxRubyDialog : public SfxModelessDialog
 
     friend class RubyPreview;
 
-    FixedText               aLeftFT;
-    RubyEdit                aLeft1ED;
-    FixedText               aRightFT;
-    RubyEdit                aRight1ED;
-    RubyEdit                aLeft2ED;
-    RubyEdit                aRight2ED;
-    RubyEdit                aLeft3ED;
-    RubyEdit                aRight3ED;
-    RubyEdit                aLeft4ED;
-    RubyEdit                aRight4ED;
+    FixedText*          m_pLeftFT;
+    FixedText*          m_pRightFT;
+    RubyEdit*           m_pLeft1ED;
+    RubyEdit*           m_pRight1ED;
+    RubyEdit*           m_pLeft2ED;
+    RubyEdit*           m_pRight2ED;
+    RubyEdit*           m_pLeft3ED;
+    RubyEdit*           m_pRight3ED;
+    RubyEdit*           m_pLeft4ED;
+    RubyEdit*           m_pRight4ED;
 
-    RubyEdit*               aEditArr[8];
-    ScrollBar           aScrollSB;
+    RubyEdit*           aEditArr[8];
+    VclScrolledWindow*  m_pScrolledWindow;
+    ScrollBar*          m_pScrollSB;
 
-    FixedText           aAdjustFT;
-    ListBox             aAdjustLB;
+    ListBox*            m_pAdjustLB;
 
-    FixedText           aPositionFT;
-    ListBox             aPositionLB;
+    ListBox*            m_pPositionLB;
 
-    FixedText           aCharStyleFT;
-    ListBox             aCharStyleLB;
-    PushButton          aStylistPB;
+    FixedText*          m_pCharStyleFT;
+    ListBox*            m_pCharStyleLB;
+    PushButton*         m_pStylistPB;
 
-    FixedText           aPreviewFT;
-    RubyPreview         aPreviewWin;
+    RubyPreview*        m_pPreviewWin;
 
-    OKButton            aApplyPB;
-    PushButton          aClosePB;
-    HelpButton          aHelpPB;
+    PushButton*         m_pApplyPB;
+    PushButton*         m_pClosePB;
 
     long                nLastPos;
     long                nCurrentEdit;
@@ -145,28 +155,7 @@ class SvxRubyDialog : public SfxModelessDialog
     sal_Bool                IsModified() const {return bModified;}
     void                SetModified(sal_Bool bSet) {bModified = bSet;}
 
-    void EnableControls(sal_Bool bEnable)
-        {
-            aLeftFT.Enable(bEnable);
-            aRightFT.Enable(bEnable);
-            aLeft1ED.Enable(bEnable);
-            aRight1ED.Enable(bEnable);
-            aLeft2ED.Enable(bEnable);
-            aRight2ED.Enable(bEnable);
-            aLeft3ED.Enable(bEnable);
-            aRight3ED.Enable(bEnable);
-            aLeft4ED.Enable(bEnable);
-            aRight4ED.Enable(bEnable);
-            aScrollSB.Enable(bEnable);
-            aAdjustFT.Enable(bEnable);
-            aAdjustLB.Enable(bEnable);
-            aCharStyleFT.Enable(bEnable);
-            aCharStyleLB.Enable(bEnable);
-            aStylistPB.Enable(bEnable);
-            aPreviewFT.Enable(bEnable);
-            aPreviewWin.Enable(bEnable);
-            aApplyPB.Enable(bEnable);
-        }
+    void EnableControls(bool bEnable);
 
     void                GetCurrentText(String& rBase, String& rRuby);
 
@@ -175,8 +164,8 @@ protected:
     virtual void        DataChanged( const DataChangedEvent& rDCEvt );
 public:
 
-                        SvxRubyDialog( SfxBindings *pBindings, SfxChildWindow *pCW,
-                                    Window* pParent, const ResId& rResId );
+                        SvxRubyDialog(SfxBindings *pBindings, SfxChildWindow *pCW,
+                                    Window* pParent);
     virtual             ~SvxRubyDialog();
 
     virtual void        Activate();
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index b1698fd..dd58670 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -21,7 +21,6 @@
 #include <tools/shl.hxx>
 #include <svx/dialmgr.hxx>
 #include <svx/dialogs.hrc>
-#include <rubydialog.hrc>
 #include <sfx2/app.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/viewfrm.hxx>
@@ -39,6 +38,7 @@
 #include <com/sun/star/view/XSelectionSupplier.hpp>
 #include <cppuhelper/implbase1.hxx>
 #include <svtools/colorcfg.hxx>
+#include <vcl/layout.hxx>
 
 using namespace com::sun::star::uno;
 using namespace com::sun::star::frame;
@@ -68,8 +68,8 @@ SvxRubyChildWindow::SvxRubyChildWindow( Window* _pParent, sal_uInt16 nId,
     SfxBindings* pBindings, SfxChildWinInfo* pInfo) :
     SfxChildWindow(_pParent, nId)
 {
-    pWindow = new SvxRubyDialog( pBindings, this, _pParent, SVX_RES( RID_SVXDLG_RUBY ) );
-    SvxRubyDialog* pDlg = (SvxRubyDialog*) pWindow;
+    SvxRubyDialog* pDlg = new SvxRubyDialog(pBindings, this, _pParent);
+    pWindow = pDlg;
 
     if ( pInfo->nFlags & SFX_CHILDWIN_ZOOMIN )
         pDlg->RollUp();
@@ -194,54 +194,53 @@ void  SvxRubyData_Impl::AssertOneEntry()
     }
 }
 
-SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW,
-                                    Window* _pParent, const ResId& rResId ) :
-    SfxModelessDialog( pBind, pCW, _pParent, rResId ),
-    aLeftFT(this,               ResId(FT_LEFT,*rResId.GetResMgr() )),
-    aLeft1ED(this,              ResId(ED_LEFT_1,*rResId.GetResMgr()  )),
-    aRightFT(this,              ResId(FT_RIGHT,*rResId.GetResMgr()  )),
-    aRight1ED(this,             ResId(ED_RIGHT_1,*rResId.GetResMgr() )),
-    aLeft2ED(this,              ResId(ED_LEFT_2,*rResId.GetResMgr()  )),
-    aRight2ED(this,             ResId(ED_RIGHT_2,*rResId.GetResMgr() )),
-    aLeft3ED(this,              ResId(ED_LEFT_3,*rResId.GetResMgr()  )),
-    aRight3ED(this,             ResId(ED_RIGHT_3,*rResId.GetResMgr() )),
-    aLeft4ED(this,              ResId(ED_LEFT_4,*rResId.GetResMgr()  )),
-    aRight4ED(this,             ResId(ED_RIGHT_4,*rResId.GetResMgr() )),
-    aScrollSB(this,             ResId(SB_SCROLL,*rResId.GetResMgr()  )),
-    aAdjustFT(this,             ResId(FT_ADJUST,*rResId.GetResMgr()     )),
-    aAdjustLB(this,             ResId(LB_ADJUST,*rResId.GetResMgr()     )),
-    aPositionFT(this,           ResId(FT_POSITION,*rResId.GetResMgr()     )),
-    aPositionLB(this,           ResId(LB_POSITION,*rResId.GetResMgr()     )),
-    aCharStyleFT(this,          ResId(FT_CHAR_STYLE,*rResId.GetResMgr()     )),
-    aCharStyleLB(this,          ResId(LB_CHAR_STYLE,*rResId.GetResMgr()     )),
-    aStylistPB(this,            ResId(PB_STYLIST,*rResId.GetResMgr()        )),
-    aPreviewFT(this,            ResId(FT_PREVIEW,*rResId.GetResMgr()        )),
-    aPreviewWin(*this,          ResId(WIN_PREVIEW,*rResId.GetResMgr()       )),
-    aApplyPB(this,              ResId(PB_APPLY,*rResId.GetResMgr()          )),
-    aClosePB(this,              ResId(PB_CLOSE,*rResId.GetResMgr()          )),
-    aHelpPB(this,               ResId(PB_HELP,*rResId.GetResMgr()           )),
-    nLastPos(0),
-    nCurrentEdit(0),
-    bModified(sal_False),
-    pBindings(pBind)
+SvxRubyDialog::SvxRubyDialog(SfxBindings *pBind, SfxChildWindow *pCW,
+                                    Window* _pParent)
+    : SfxModelessDialog(pBind, pCW, _pParent, "AsianPhoneticGuideDialog",
+        "svx/ui/asianphoneticguidedialog.ui")
+    , nLastPos(0)
+    , nCurrentEdit(0)
+    , bModified(false)
+    , pBindings(pBind)
 {
     xImpl = pImpl = new SvxRubyData_Impl;
-    FreeResource();
-    aEditArr[0] = &aLeft1ED; aEditArr[1] = &aRight1ED;
-    aEditArr[2] = &aLeft2ED; aEditArr[3] = &aRight2ED;
-    aEditArr[4] = &aLeft3ED; aEditArr[5] = &aRight3ED;
-    aEditArr[6] = &aLeft4ED; aEditArr[7] = &aRight4ED;
-
-    aApplyPB.SetClickHdl(LINK(this, SvxRubyDialog, ApplyHdl_Impl));
-    aClosePB.SetClickHdl(LINK(this, SvxRubyDialog, CloseHdl_Impl));
-    aStylistPB.SetClickHdl(LINK(this, SvxRubyDialog, StylistHdl_Impl));
-    aAdjustLB.SetSelectHdl(LINK(this, SvxRubyDialog, AdjustHdl_Impl));
-    aPositionLB.SetSelectHdl(LINK(this, SvxRubyDialog, PositionHdl_Impl));
-    aCharStyleLB.SetSelectHdl(LINK(this, SvxRubyDialog, CharStyleHdl_Impl));
+    get(m_pLeftFT, "basetextft");
+    get(m_pRightFT, "rubytextft");
+    get(m_pAdjustLB, "adjustlb");
+    get(m_pPositionLB, "positionlb");
+    get(m_pCharStyleFT, "styleft");
+    get(m_pCharStyleLB, "stylelb");
+    m_pCharStyleLB->SetStyle(m_pCharStyleLB->GetStyle() | WB_SORT);
+    get(m_pStylistPB, "styles");
+    get(m_pApplyPB, "apply");
+    get(m_pClosePB, "close");
+    get(m_pPreviewWin, "preview");
+    m_pPreviewWin->setRubyDialog(this);
+    get(m_pScrolledWindow, "scrolledwindow");
+    m_pScrollSB = &m_pScrolledWindow->getVertScrollBar();
+    get(m_pLeft1ED, "Left1ED");
+    get(m_pRight1ED, "Right1ED");
+    get(m_pLeft2ED, "Left2ED");
+    get(m_pRight2ED, "Right2ED");
+    get(m_pLeft3ED, "Left3ED");
+    get(m_pRight3ED, "Right3ED");
+    get(m_pLeft4ED, "Left4ED");
+    get(m_pRight4ED, "Right4ED");
+    aEditArr[0] = m_pLeft1ED; aEditArr[1] = m_pRight1ED;
+    aEditArr[2] = m_pLeft2ED; aEditArr[3] = m_pRight2ED;
+    aEditArr[4] = m_pLeft3ED; aEditArr[5] = m_pRight3ED;
+    aEditArr[6] = m_pLeft4ED; aEditArr[7] = m_pRight4ED;
+
+    m_pApplyPB->SetClickHdl(LINK(this, SvxRubyDialog, ApplyHdl_Impl));
+    m_pClosePB->SetClickHdl(LINK(this, SvxRubyDialog, CloseHdl_Impl));
+    m_pStylistPB->SetClickHdl(LINK(this, SvxRubyDialog, StylistHdl_Impl));
+    m_pAdjustLB->SetSelectHdl(LINK(this, SvxRubyDialog, AdjustHdl_Impl));
+    m_pPositionLB->SetSelectHdl(LINK(this, SvxRubyDialog, PositionHdl_Impl));
+    m_pCharStyleLB->SetSelectHdl(LINK(this, SvxRubyDialog, CharStyleHdl_Impl));
 
     Link aScrLk(LINK(this, SvxRubyDialog, ScrollHdl_Impl));
-    aScrollSB.SetScrollHdl( aScrLk );
-    aScrollSB.SetEndScrollHdl( aScrLk );
+    m_pScrollSB->SetScrollHdl( aScrLk );
+    m_pScrollSB->SetEndScrollHdl( aScrLk );
 
     Link aEditLk(LINK(this, SvxRubyDialog, EditModifyHdl_Impl));
     Link aScrollLk(LINK(this, SvxRubyDialog, EditScrollHdl_Impl));
@@ -256,13 +255,13 @@ SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW,
 
     UpdateColors();
 
-    String leftLabelName = aLeftFT.GetText(), rightLabelName = aRightFT.GetText();
-    aLeft2ED.SetAccessibleName(leftLabelName);
-    aLeft3ED.SetAccessibleName(leftLabelName);
-    aLeft4ED.SetAccessibleName(leftLabelName);
-    aRight2ED.SetAccessibleName(rightLabelName);
-    aRight3ED.SetAccessibleName(rightLabelName);
-    aRight4ED.SetAccessibleName(rightLabelName);
+    String leftLabelName = m_pLeftFT->GetText(), rightLabelName = m_pRightFT->GetText();
+    m_pLeft2ED->SetAccessibleName(leftLabelName);
+    m_pLeft3ED->SetAccessibleName(leftLabelName);
+    m_pLeft4ED->SetAccessibleName(leftLabelName);
+    m_pRight2ED->SetAccessibleName(rightLabelName);
+    m_pRight3ED->SetAccessibleName(rightLabelName);
+    m_pRight4ED->SetAccessibleName(rightLabelName);
 }
 
 SvxRubyDialog::~SvxRubyDialog()
@@ -274,12 +273,12 @@ SvxRubyDialog::~SvxRubyDialog()
 
 void SvxRubyDialog::ClearCharStyleList()
 {
-    for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++)
+    for(sal_uInt16 i = 0; i < m_pCharStyleLB->GetEntryCount(); i++)
     {
-        void* pData = aCharStyleLB.GetEntryData(i);
+        void* pData = m_pCharStyleLB->GetEntryData(i);
         delete (OUString*)pData;
     }
-    aCharStyleLB.Clear();
+    m_pCharStyleLB->Clear();
 }
 
 sal_Bool    SvxRubyDialog::Close()
@@ -296,7 +295,7 @@ void SvxRubyDialog::Activate()
     SfxPoolItem* pState = 0;
     SfxItemState    eState = pBindings->QueryState( SID_STYLE_DESIGNER, pState );
     sal_Bool bEnable = (eState < SFX_ITEM_AVAILABLE) || !pState || !((SfxBoolItem*)pState)->GetValue();
-    aStylistPB.Enable(bEnable);
+    m_pStylistPB->Enable(bEnable);
     //get selection from current view frame
     SfxViewFrame* pCurFrm = SfxViewFrame::Current();
     Reference< XController > xCtrl = pCurFrm->GetFrame().GetController();
@@ -310,7 +309,7 @@ void SvxRubyDialog::Activate()
         if(xRubySel.is())
         {
             Reference< XModel > xModel = pImpl->GetModel();
-            const String sCharStyleSelect = aCharStyleLB.GetSelectEntry();
+            const String sCharStyleSelect = m_pCharStyleLB->GetSelectEntry();
             ClearCharStyleList();
             Reference<XStyleFamiliesSupplier> xSupplier(xModel, UNO_QUERY);
             if(xSupplier.is())
@@ -350,8 +349,8 @@ void SvxRubyDialog::Activate()
                             }
                             if(!sName.isEmpty())
                             {
-                                sal_uInt16 nPos = aCharStyleLB.InsertEntry(sName);
-                                aCharStyleLB.SetEntryData( nPos, new OUString(sCoreName) );
+                                sal_uInt16 nPos = m_pCharStyleLB->InsertEntry(sName);
+                                m_pCharStyleLB->SetEntryData( nPos, new OUString(sCoreName) );
 
                             }
                         }
@@ -362,13 +361,13 @@ void SvxRubyDialog::Activate()
                     OSL_FAIL("exception in style access");
                 }
                 if(sCharStyleSelect.Len())
-                    aCharStyleLB.SelectEntry(sCharStyleSelect);
+                    m_pCharStyleLB->SelectEntry(sCharStyleSelect);
             }
-            aCharStyleLB.Enable(xSupplier.is());
-            aCharStyleFT.Enable(xSupplier.is());
+            m_pCharStyleLB->Enable(xSupplier.is());
+            m_pCharStyleFT->Enable(xSupplier.is());
         }
         Update();
-        aPreviewWin.Invalidate();
+        m_pPreviewWin->Invalidate();
     }
 }
 
@@ -433,9 +432,9 @@ void SvxRubyDialog::Update()
 {
     const Sequence<PropertyValues>& aRubyValues = pImpl->GetRubyValues();
     sal_Int32 nLen = aRubyValues.getLength();
-    aScrollSB.Enable(nLen > 4);
-    aScrollSB.SetRange( Range(0, nLen > 4 ? nLen - 4 : 0));
-    aScrollSB.SetThumbPos(0);
+    m_pScrollSB->Enable(nLen > 4);
+    m_pScrollSB->SetRange( Range(0, nLen > 4 ? nLen - 4 : 0));
+    m_pScrollSB->SetThumbPos(0);
     SetLastPos(0);
     SetModified(sal_False);
 
@@ -483,29 +482,29 @@ void SvxRubyDialog::Update()
         nPosition = 0;
     }
     if(nAdjust > -1)
-        aAdjustLB.SelectEntryPos(nAdjust);
+        m_pAdjustLB->SelectEntryPos(nAdjust);
     else
-        aAdjustLB.SetNoSelection();
+        m_pAdjustLB->SetNoSelection();
     if(nPosition > -1)
-        aPositionLB.SelectEntryPos(nPosition ? 1 : 0);
+        m_pPositionLB->SelectEntryPos(nPosition ? 1 : 0);
     if(!nLen || (bCharStyleEqual && sCharStyleName.isEmpty()))
         sCharStyleName = C2U(cRubies);
     if(!sCharStyleName.isEmpty())
     {
-        for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++)
+        for(sal_uInt16 i = 0; i < m_pCharStyleLB->GetEntryCount(); i++)
         {
-            const OUString* pCoreName = (const OUString*)aCharStyleLB.GetEntryData(i);
+            const OUString* pCoreName = (const OUString*)m_pCharStyleLB->GetEntryData(i);
             if(pCoreName && sCharStyleName == *pCoreName)
             {
-                aCharStyleLB.SelectEntryPos(i);
+                m_pCharStyleLB->SelectEntryPos(i);
                 break;
             }
         }
     }
     else
-        aCharStyleLB.SetNoSelection();
+        m_pCharStyleLB->SetNoSelection();
 
-    ScrollHdl_Impl(&aScrollSB);
+    ScrollHdl_Impl(m_pScrollSB);
 }
 
 void    SvxRubyDialog::GetCurrentText(String& rBase, String& rRuby)
@@ -521,12 +520,12 @@ IMPL_LINK(SvxRubyDialog, ScrollHdl_Impl, ScrollBar*, pScroll)
     {
         GetText();
     }
-    SetText(nPos++, aLeft1ED, aRight1ED);
-    SetText(nPos++, aLeft2ED, aRight2ED);
-    SetText(nPos++, aLeft3ED, aRight3ED);
-    SetText(nPos, aLeft4ED, aRight4ED);
+    SetText(nPos++, *m_pLeft1ED, *m_pRight1ED);
+    SetText(nPos++, *m_pLeft2ED, *m_pRight2ED);
+    SetText(nPos++, *m_pLeft3ED, *m_pRight3ED);
+    SetText(nPos, *m_pLeft4ED, *m_pRight4ED);
     SetLastPos(nPos - 3);
-    aPreviewWin.Invalidate();
+    m_pPreviewWin->Invalidate();
     return 0;
 }
 
@@ -536,13 +535,13 @@ IMPL_LINK_NOARG(SvxRubyDialog, ApplyHdl_Impl)
     if(!aRubyValues.getLength())
     {
         AssertOneEntry();
-        PositionHdl_Impl(&aPositionLB);
-        AdjustHdl_Impl(&aAdjustLB);
-        CharStyleHdl_Impl(&aCharStyleLB);
+        PositionHdl_Impl(m_pPositionLB);
+        AdjustHdl_Impl(m_pAdjustLB);
+        CharStyleHdl_Impl(m_pCharStyleLB);
     }
     GetText();
     //reset all edit fields - SaveValue is called
-    ScrollHdl_Impl(&aScrollSB);
+    ScrollHdl_Impl(m_pScrollSB);
 
     Reference<XRubySelection>  xSelection = pImpl->GetRubySelection();
     if(IsModified() && xSelection.is())
@@ -594,7 +593,7 @@ IMPL_LINK(SvxRubyDialog, AdjustHdl_Impl, ListBox*, pBox)
         }
         SetModified(sal_True);
     }
-    aPreviewWin.Invalidate();
+    m_pPreviewWin->Invalidate();
     return 0;
 }
 
@@ -615,7 +614,7 @@ IMPL_LINK(SvxRubyDialog, PositionHdl_Impl, ListBox*, pBox)
         }
         SetModified(sal_True);
     }
-    aPreviewWin.Invalidate();
+    m_pPreviewWin->Invalidate();
     return 0;
 }
 
@@ -623,8 +622,8 @@ IMPL_LINK_NOARG(SvxRubyDialog, CharStyleHdl_Impl)
 {
     AssertOneEntry();
     OUString sStyleName;
-    if(LISTBOX_ENTRY_NOTFOUND != aCharStyleLB.GetSelectEntryPos())
-        sStyleName = *(OUString*) aCharStyleLB.GetEntryData(aCharStyleLB.GetSelectEntryPos());
+    if(LISTBOX_ENTRY_NOTFOUND != m_pCharStyleLB->GetSelectEntryPos())
+        sStyleName = *(OUString*) m_pCharStyleLB->GetEntryData(m_pCharStyleLB->GetSelectEntryPos());
     Sequence<PropertyValues>&  aRubyValues = pImpl->GetRubyValues();
     for(sal_Int32 nRuby = 0; nRuby < aRubyValues.getLength(); nRuby++)
     {
@@ -652,34 +651,34 @@ IMPL_LINK(SvxRubyDialog, EditModifyHdl_Impl, Edit*, pEdit)
             break;
         }
     }
-    aPreviewWin.Invalidate();
+    m_pPreviewWin->Invalidate();
     return 0;
 }
 
 IMPL_LINK(SvxRubyDialog, EditScrollHdl_Impl, sal_Int32*, pParam)
 {
     long nRet = 0;
-    if(aScrollSB.IsEnabled())
+    if(m_pScrollSB->IsEnabled())
     {
         //scroll forward
         if(*pParam > 0 && (aEditArr[7]->HasFocus() || aEditArr[6]->HasFocus() ))
         {
-            if(aScrollSB.GetRangeMax() > aScrollSB.GetThumbPos())
+            if(m_pScrollSB->GetRangeMax() > m_pScrollSB->GetThumbPos())
             {
-                aScrollSB.SetThumbPos(aScrollSB.GetThumbPos() + 1);
+                m_pScrollSB->SetThumbPos(m_pScrollSB->GetThumbPos() + 1);
                 aEditArr[6]->GrabFocus();
                 nRet = 1;
             }
         }
         //scroll backward
-        else if(aScrollSB.GetThumbPos() && (aEditArr[0]->HasFocus()||aEditArr[1]->HasFocus()) )
+        else if(m_pScrollSB->GetThumbPos() && (aEditArr[0]->HasFocus()||aEditArr[1]->HasFocus()) )
         {
-            aScrollSB.SetThumbPos(aScrollSB.GetThumbPos() - 1);
+            m_pScrollSB->SetThumbPos(m_pScrollSB->GetThumbPos() - 1);
             aEditArr[1]->GrabFocus();
             nRet = 1;
         }
         if(nRet)
-            ScrollHdl_Impl(&aScrollSB);
+            ScrollHdl_Impl(m_pScrollSB);
     }
     return nRet;
 }
@@ -724,7 +723,7 @@ void SvxRubyDialog::UpdateColors( void )
     const StyleSettings&    rStyleSettings = GetSettings().GetStyleSettings();
     svtools::ColorConfig        aColorConfig;
 
-    Font                    aFnt( aPreviewWin.GetFont() );
+    Font                    aFnt( m_pPreviewWin->GetFont() );
 
     Color                   aNewTextCol( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
     Color                   aNewFillCol( rStyleSettings.GetWindowColor() );
@@ -733,9 +732,9 @@ void SvxRubyDialog::UpdateColors( void )
     {
         aFnt.SetFillColor( aNewFillCol );
         aFnt.SetColor( aNewTextCol );
-        aPreviewWin.SetFont( aFnt );
+        m_pPreviewWin->SetFont( aFnt );
 
-        aPreviewWin.Invalidate();
+        m_pPreviewWin->Invalidate();
     }
 }
 
@@ -749,42 +748,59 @@ void SvxRubyDialog::DataChanged( const DataChangedEvent& rDCEvt )
         UpdateColors();
 }
 
-RubyPreview::RubyPreview(SvxRubyDialog& rParent, const ResId& rResId) :
-        Window(&rParent, rResId),
-        rParentDlg(rParent)
+void SvxRubyDialog::EnableControls(bool bEnable)
 {
-    SetMapMode(MAP_TWIP);
-    Size aWinSize = GetOutputSize();
+    get_content_area()->Enable(bEnable);
+    m_pApplyPB->Enable(bEnable);
+}
 
-    Font aFont = GetFont();
-    aFont.SetHeight(aWinSize.Height() / 4);
-    SetFont(aFont);
+RubyPreview::RubyPreview(SvxRubyDialog& rParent, const ResId& rResId)
+    : Window(&rParent, rResId)
+    , m_pParentDlg(&rParent)
+{
+    SetMapMode(MAP_TWIP);
+    SetBorderStyle( WINDOW_BORDER_MONO );
+}
 
+RubyPreview::RubyPreview(Window *pParent)
+    : Window(pParent, WB_BORDER)
+    , m_pParentDlg(NULL)
+{
+    SetMapMode(MAP_TWIP);
     SetBorderStyle( WINDOW_BORDER_MONO );
 }
 
-void RubyPreview::Paint( const Rectangle& /* rRect */ )
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRubyPreview(Window *pParent, VclBuilder::stringmap &)
 {
-    Font aRubyFont = GetFont();
-    Font aSaveFont(aRubyFont);
-    aRubyFont.SetHeight(aRubyFont.GetHeight() * 70 / 100);
+    return new RubyPreview(pParent);
+}
 
+void RubyPreview::Paint( const Rectangle& /* rRect */ )
+{
     Size aWinSize = GetOutputSize();
+
+    Font aSaveFont = GetFont();
+    aSaveFont.SetHeight(aWinSize.Height() / 4);
+    SetFont(aSaveFont);
+
     Rectangle aRect(Point(0, 0), aWinSize);
     SetLineColor();
     SetFillColor( aSaveFont.GetFillColor() );
     DrawRect(aRect);
 
     String sBaseText, sRubyText;
-    rParentDlg.GetCurrentText(sBaseText, sRubyText);
+    m_pParentDlg->GetCurrentText(sBaseText, sRubyText);
 
     long nTextHeight = GetTextHeight();
     long nBaseWidth = GetTextWidth(sBaseText);
+
+    Font aRubyFont(aSaveFont);
+    aRubyFont.SetHeight(aRubyFont.GetHeight() * 70 / 100);
     SetFont(aRubyFont);
     long nRubyWidth = GetTextWidth(sRubyText);
     SetFont(aSaveFont);
 
-    sal_uInt16 nAdjust = rParentDlg.aAdjustLB.GetSelectEntryPos();
+    sal_uInt16 nAdjust = m_pParentDlg->m_pAdjustLB->GetSelectEntryPos();
     //use center if no adjustment is available
     if(nAdjust > 4)
         nAdjust = 1;
@@ -800,7 +816,7 @@ void RubyPreview::Paint( const Rectangle& /* rRect */ )
     long nYBase = aWinSize.Height() * 3 / 4 - nTextHeight / 2;
 
     //use above also if no selection is set
-    sal_Bool bAbove = rParentDlg.aPositionLB.GetSelectEntryPos() != 1;
+    sal_Bool bAbove = m_pParentDlg->m_pPositionLB->GetSelectEntryPos() != 1;
     if(!bAbove)
     {
         long nTmp = nYRuby;
@@ -870,6 +886,13 @@ void RubyPreview::Paint( const Rectangle& /* rRect */ )
     SetFont(aSaveFont);
 }
 
+Size RubyPreview::GetOptimalSize(WindowSizeType eType) const
+{
+    if (eType == WINDOWSIZE_PREFERRED)
+        return LogicToPixel(Size(215, 50), MapMode(MAP_APPFONT));
+    return Window::GetOptimalSize(eType);
+}
+
 void RubyEdit::GetFocus()
 {
     GetModifyHdl().Call(this);
@@ -902,4 +925,9 @@ long  RubyEdit::PreNotify( NotifyEvent& rNEvt )
     return nHandled;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRubyEdit(Window *pParent, VclBuilder::stringmap &)
+{
+    return new RubyEdit(pParent);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/rubydialog.hrc b/svx/source/dialog/rubydialog.hrc
deleted file mode 100644
index d4f4b6c..0000000
--- a/svx/source/dialog/rubydialog.hrc
+++ /dev/null
@@ -1,43 +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_CHAR_STYLE           2
-#define LB_CHAR_STYLE           3
-#define PB_STYLIST              4
-#define FT_PREVIEW              5
-#define WIN_PREVIEW             6
-#define PB_APPLY                7
-#define PB_CLOSE                8
-#define PB_HELP                 9
-#define ED_LEFT_1               10
-#define ED_LEFT_2               11
-#define ED_LEFT_3               12
-#define ED_LEFT_4               13
-#define ED_RIGHT_1              14
-#define ED_RIGHT_2              15
-#define ED_RIGHT_3              16
-#define ED_RIGHT_4              17
-#define HB_HEADER               18
-#define SB_SCROLL               19
-#define FT_LEFT                 20
-#define FT_RIGHT                21
-#define FT_ADJUST               22
-#define LB_ADJUST               23
-#define FT_POSITION             24
-#define LB_POSITION             25
-
diff --git a/svx/source/dialog/rubydialog.src b/svx/source/dialog/rubydialog.src
deleted file mode 100644
index 658b793..0000000
--- a/svx/source/dialog/rubydialog.src
+++ /dev/null
@@ -1,205 +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 <rubydialog.hrc>
-#include "helpid.hrc"
-#include <svx/dialogs.hrc>
-
-ModelessDialog RID_SVXDLG_RUBY
-{
-    OutputSize = TRUE ;
-    Hide = TRUE ;
-    SVLook = TRUE ;
-    HelpId = HID_RUBY_DIALOG;
-    Pos = MAP_APPFONT ( 0 , 0 ) ;
-    Size = MAP_APPFONT ( 227 , 195 ) ;
-    Text [ en-US ] = "Asian Phonetic Guide" ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    FixedText FT_LEFT
-    {
-        Pos = MAP_APPFONT ( 6 , 17 ) ;
-        Size = MAP_APPFONT ( 80 , 8 ) ;
-        Text [ en-US ] = "Base text";
-    };
-    FixedText FT_RIGHT
-    {
-        Pos = MAP_APPFONT ( 109 , 17 ) ;
-        Size = MAP_APPFONT ( 80 , 8 ) ;
-        Text [ en-US ] = "Ruby text";
-    };
-    Edit ED_LEFT_1
-    {
-        HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_1";
-        Pos = MAP_APPFONT ( 6 , 30 ) ;
-        Size = MAP_APPFONT ( 102 , 12 ) ;
-        Hide = False;
-        Border = TRUE;
-    };
-    Edit ED_RIGHT_1
-    {
-        HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_1";
-        Pos = MAP_APPFONT ( 109 , 30 ) ;
-        Size = MAP_APPFONT ( 102 , 12 ) ;
-        Border = TRUE;
-    };
-    Edit ED_LEFT_2
-    {
-        HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_2";
-        Pos = MAP_APPFONT ( 6 ,  42) ;
-        Size = MAP_APPFONT ( 102 , 12 ) ;
-        Border = TRUE;
-    };
-    Edit ED_RIGHT_2
-    {
-        HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_2";
-        Pos = MAP_APPFONT ( 109 , 42 ) ;
-        Size = MAP_APPFONT ( 102 , 12 ) ;
-        Border = TRUE;
-    };
-    Edit ED_LEFT_3
-    {
-        HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_3";
-        Pos = MAP_APPFONT ( 6 , 54 ) ;
-        Size = MAP_APPFONT ( 102 , 12 ) ;
-        Border = TRUE;
-    };
-    Edit ED_RIGHT_3
-    {
-        HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_3";
-        Pos = MAP_APPFONT ( 109 , 54 ) ;
-        Size = MAP_APPFONT ( 102 , 12 ) ;
-        Border = TRUE;
-    };
-    Edit ED_LEFT_4
-    {
-        HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_4";
-        Pos = MAP_APPFONT ( 6 , 66 ) ;
-        Size = MAP_APPFONT ( 102 , 12 ) ;
-        Border = TRUE;
-    };
-    Edit ED_RIGHT_4
-    {
-        HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_4";
-        Pos = MAP_APPFONT ( 109 , 66 ) ;
-        Size = MAP_APPFONT ( 102 , 12 ) ;
-        Border = TRUE;
-    };
-    ScrollBar SB_SCROLL
-    {
-        Pos = MAP_APPFONT ( 213 , 30 ) ;
-        Size = MAP_APPFONT ( 8 , 48 ) ;
-        VScroll = TRUE ;
-        Drag = TRUE ;
-    };
-    FixedText FT_ADJUST
-    {
-        Pos = MAP_APPFONT ( 6 , 82 ) ;
-        Size = MAP_APPFONT ( 35 , 8 ) ;
-        Text [ en-US ] = "Alignment";
-    };
-    ListBox LB_ADJUST
-    {
-        HelpID = "svx:ListBox:RID_SVXDLG_RUBY:LB_ADJUST";
-        Pos = MAP_APPFONT ( 6 , 93) ;
-        Size = MAP_APPFONT ( 35 , 60 ) ;
-        DropDown = TRUE;
-        Border = TRUE;
-    StringList [ en-US ] =
-    {
-            "Left" ;
-            "Center" ;
-            "Right" ;
-            "0 1 0" ;
-            "1 2 1" ;
-    };
-    };
-    FixedText FT_POSITION
-    {
-        Pos = MAP_APPFONT ( 43 , 82 ) ;
-        Size = MAP_APPFONT ( 35 , 8 ) ;
-        Text [ en-US ] = "Position";
-    };
-    ListBox LB_POSITION
-    {
-        HelpID = "svx:ListBox:RID_SVXDLG_RUBY:LB_POSITION";
-        Pos = MAP_APPFONT ( 43 , 93) ;
-        Size = MAP_APPFONT ( 35 , 60 ) ;
-        DropDown = TRUE;
-        Border = TRUE;
-    StringList [ en-US ] =
-    {
-        "Top" ;
-        "Bottom" ;
-    };
-    };
-    FixedText FT_CHAR_STYLE
-    {
-        Pos = MAP_APPFONT ( 80 , 82 ) ;
-        Size = MAP_APPFONT ( 141 , 8 ) ;
-        Text [ en-US ] = "Character Style for ruby text";
-    };
-    ListBox LB_CHAR_STYLE
-    {
-        HelpID = "svx:ListBox:RID_SVXDLG_RUBY:LB_CHAR_STYLE";
-        Pos = MAP_APPFONT ( 80 , 93) ;
-        Size = MAP_APPFONT ( 89 , 60 ) ;
-        DropDown = TRUE;
-        Border = TRUE;
-        Sort = TRUE;
-    };
-    PushButton PB_STYLIST
-    {
-        HelpID = "svx:PushButton:RID_SVXDLG_RUBY:PB_STYLIST";
-        Pos = MAP_APPFONT ( 171 , 92 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "Styles";
-    };
-    FixedText FT_PREVIEW
-    {
-        Pos = MAP_APPFONT ( 6, 110 ) ;
-        Size = MAP_APPFONT ( 195 , 8 ) ;
-        Text [ en-US ] = "Preview:";
-    };
-    Window WIN_PREVIEW
-    {
-        Pos = MAP_APPFONT ( 6 , 121 ) ;
-        Size = MAP_APPFONT ( 215 , 50 ) ;
-        Border = TRUE ;
-    };
-    OKButton PB_APPLY
-    {
-        DefButton = TRUE;
-        Pos = MAP_APPFONT ( 65 , 175 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Apply";
-    };
-    PushButton PB_CLOSE
-    {
-        HelpID = "svx:PushButton:RID_SVXDLG_RUBY:PB_CLOSE";
-        Pos = MAP_APPFONT (  118, 175 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Close";
-    };
-    HelpButton PB_HELP
-    {
-        Pos = MAP_APPFONT ( 171 , 175 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-};
-
diff --git a/svx/uiconfig/ui/asianphoneticguidedialog.ui b/svx/uiconfig/ui/asianphoneticguidedialog.ui
new file mode 100644
index 0000000..17df036
--- /dev/null
+++ b/svx/uiconfig/ui/asianphoneticguidedialog.ui
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="AsianPhoneticGuideDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Asian Phonetic Guide</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="apply">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="close">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkGrid" id="grid3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="column_spacing">12</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel" id="basetextft">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Base text </property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="rubytextft">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Ruby text</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>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">always</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkGrid" id="grid1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_right">3</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="column_spacing">3</property>
+                    <child>
+                      <object class="svxlo:RubyEdit" id="Left2ED">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="svxlo:RubyEdit" id="Left1ED">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="svxlo:RubyEdit" id="Right1ED">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</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="svxlo:RubyEdit" id="Right2ED">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="svxlo:RubyEdit" id="Left3ED">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="svxlo:RubyEdit" id="Right3ED">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="svxlo:RubyEdit" id="Right4ED">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">3</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="svxlo:RubyEdit" id="Left4ED">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">3</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkGrid" id="grid2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_top">6</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">6</property>
+                <child>
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Alignment </property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Position </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="styleft">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Character Style for ruby text</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="stylelb">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="styles">
+                    <property name="label" translatable="yes">Styles</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBoxText" id="adjustlb">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="entry_text_column">0</property>
+                    <property name="id_column">1</property>
+                    <items>
+                      <item translatable="yes">Left</item>
+                      <item translatable="yes">Center</item>
+                      <item translatable="yes">Right</item>
+                      <item translatable="yes">0 1 0</item>
+                      <item translatable="yes">1 2 1</item>
+                    </items>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBoxText" id="positionlb">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="entry_text_column">0</property>
+                    <property name="id_column">1</property>
+                    <items>
+                      <item translatable="yes">Top</item>
+                      <item translatable="yes">Bottom</item>
+                    </items>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</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="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_top">6</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Preview:</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="svxlo:RubyPreview" id="preview">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">apply</action-widget>
+      <action-widget response="0">close</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index e89575f..2caf62f 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -12,7 +12,6 @@ $(eval $(call gb_UI_UI,modules/swriter))
 $(eval $(call gb_UI_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/autoformattable \
 	sw/uiconfig/swriter/ui/autotext \
-	sw/uiconfig/swriter/ui/asianphoneticguide \
 	sw/uiconfig/swriter/ui/bibliographyentry \
 	sw/uiconfig/swriter/ui/bulletsandnumbering \
 	sw/uiconfig/swriter/ui/captionoptions \
diff --git a/sw/uiconfig/swriter/ui/asianphoneticguide.ui b/sw/uiconfig/swriter/ui/asianphoneticguide.ui
deleted file mode 100644
index 92bc10d..0000000
--- a/sw/uiconfig/swriter/ui/asianphoneticguide.ui
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkDialog" id="Asian Phonetic Guide">
-    <property name="can_focus">False</property>
-    <property name="border_width">5</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox1">
-        <property name="can_focus">False</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="apply">
-                <property name="label">gtk-apply</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="close">
-                <property name="label">gtk-close</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="help">
-                <property name="label">gtk-help</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkBox" id="box1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
-            <property name="spacing">15</property>
-            <child>
-              <object class="GtkGrid" id="grid3">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="column_spacing">80</property>
-                <child>
-                  <object class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Base text </property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Ruby text</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>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkScrolledWindow" id="scrolledwindow1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="shadow_type">in</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkGrid" id="grid2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="column_spacing">15</property>
-                <child>
-                  <object class="GtkLabel" id="label4">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Alignment </property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label5">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Position </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="label6">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Character Style for ruby text</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkGrid" id="grid1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="column_spacing">15</property>
-                <child>
-                  <object class="GtkComboBox" id="combobox1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkComboBox" id="combobox2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</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="GtkComboBox" id="combobox3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="button1">
-                    <property name="label" translatable="yes">button</property>
-                    <property name="use_action_appearance">False</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="use_action_appearance">False</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Preview:</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkDrawingArea" id="drawingarea1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">5</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="0">apply</action-widget>
-      <action-widget response="0">close</action-widget>
-      <action-widget response="0">help</action-widget>
-    </action-widgets>
-  </object>
-</interface>
commit b350eb3cdc0e52362dc227c3d8336504d89fb42b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 9 20:42:07 2013 +0000

    aAutoDetectionCB is always hidden and always unchecked
    
    Change-Id: Ic8ed8fa3e883da387e8cf0f2bd953081cf75ebc3

diff --git a/svx/inc/svx/rubydialog.hxx b/svx/inc/svx/rubydialog.hxx
index 39b4676..ab670b5 100644
--- a/svx/inc/svx/rubydialog.hxx
+++ b/svx/inc/svx/rubydialog.hxx
@@ -94,8 +94,6 @@ class SvxRubyDialog : public SfxModelessDialog
     RubyEdit*               aEditArr[8];
     ScrollBar           aScrollSB;
 
-    CheckBox            aAutoDetectionCB;
-
     FixedText           aAdjustFT;
     ListBox             aAdjustLB;
 
@@ -125,7 +123,6 @@ class SvxRubyDialog : public SfxModelessDialog
     DECL_LINK(ApplyHdl_Impl, void *);
     DECL_LINK(CloseHdl_Impl, void *);
     DECL_LINK(StylistHdl_Impl, void *);
-    DECL_LINK(AutomaticHdl_Impl, CheckBox*);
     DECL_LINK(ScrollHdl_Impl, ScrollBar*);
     DECL_LINK(PositionHdl_Impl, ListBox*);
     DECL_LINK(AdjustHdl_Impl, ListBox*);
@@ -161,7 +158,6 @@ class SvxRubyDialog : public SfxModelessDialog
             aLeft4ED.Enable(bEnable);
             aRight4ED.Enable(bEnable);
             aScrollSB.Enable(bEnable);
-            aAutoDetectionCB.Enable(bEnable);
             aAdjustFT.Enable(bEnable);
             aAdjustLB.Enable(bEnable);
             aCharStyleFT.Enable(bEnable);
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index eee5bbe..b1698fd 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -111,12 +111,12 @@ class SvxRubyData_Impl : public cppu::WeakImplHelper1
                                         xSelection = Reference<XRubySelection>(xController, UNO_QUERY);
                                         return xSelection;
                                     }
-    void                            UpdateRubyValues(sal_Bool bAutoUpdate)
+    void                            UpdateRubyValues()
                                     {
                                         if(!xSelection.is())
                                             aRubyValues.realloc(0);
                                         else
-                                            aRubyValues = xSelection->getRubyList(bAutoUpdate);
+                                            aRubyValues = xSelection->getRubyList(false);
                                         bHasSelectionChanged = sal_False;
                                     }
     Sequence<PropertyValues>&       GetRubyValues() {return aRubyValues;}
@@ -152,8 +152,9 @@ void    SvxRubyData_Impl::SetController(Reference<XController> xCtrl)
             if(xSelSupp.is())
                 xSelSupp->addSelectionChangeListener(this);
         }
-        catch(Exception&)
-        {}
+        catch (const Exception&)
+        {
+        }
     }
 }
 //-----------------------------------------------------------------------------
@@ -170,8 +171,9 @@ void SvxRubyData_Impl::disposing( const EventObject&) throw (RuntimeException)
         if(xSelSupp.is())
             xSelSupp->removeSelectionChangeListener(this);
     }
-    catch(Exception&)
-    {}
+    catch (const Exception&)
+    {
+    }
     xController = 0;
 }
 //-----------------------------------------------------------------------------
@@ -206,7 +208,6 @@ SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW,
     aLeft4ED(this,              ResId(ED_LEFT_4,*rResId.GetResMgr()  )),
     aRight4ED(this,             ResId(ED_RIGHT_4,*rResId.GetResMgr() )),
     aScrollSB(this,             ResId(SB_SCROLL,*rResId.GetResMgr()  )),
-    aAutoDetectionCB(this,      ResId(CB_AUTO_DETECT,*rResId.GetResMgr()    )),
     aAdjustFT(this,             ResId(FT_ADJUST,*rResId.GetResMgr()     )),
     aAdjustLB(this,             ResId(LB_ADJUST,*rResId.GetResMgr()     )),
     aPositionFT(this,           ResId(FT_POSITION,*rResId.GetResMgr()     )),
@@ -226,8 +227,6 @@ SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW,
 {
     xImpl = pImpl = new SvxRubyData_Impl;
     FreeResource();
-    // automatic detection not yet available
-    aAutoDetectionCB.Hide();
     aEditArr[0] = &aLeft1ED; aEditArr[1] = &aRight1ED;
     aEditArr[2] = &aLeft2ED; aEditArr[3] = &aRight2ED;
     aEditArr[4] = &aLeft3ED; aEditArr[5] = &aRight3ED;
@@ -236,7 +235,6 @@ SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW,
     aApplyPB.SetClickHdl(LINK(this, SvxRubyDialog, ApplyHdl_Impl));
     aClosePB.SetClickHdl(LINK(this, SvxRubyDialog, CloseHdl_Impl));
     aStylistPB.SetClickHdl(LINK(this, SvxRubyDialog, StylistHdl_Impl));
-    aAutoDetectionCB.SetClickHdl(LINK(this, SvxRubyDialog, AutomaticHdl_Impl));
     aAdjustLB.SetSelectHdl(LINK(this, SvxRubyDialog, AdjustHdl_Impl));
     aPositionLB.SetSelectHdl(LINK(this, SvxRubyDialog, PositionHdl_Impl));
     aCharStyleLB.SetSelectHdl(LINK(this, SvxRubyDialog, CharStyleHdl_Impl));
@@ -307,7 +305,7 @@ void SvxRubyDialog::Activate()
     {
 
         Reference< XRubySelection > xRubySel = pImpl->GetRubySelection();
-        pImpl->UpdateRubyValues(aAutoDetectionCB.IsChecked());
+        pImpl->UpdateRubyValues();
         EnableControls(xRubySel.is());
         if(xRubySel.is())
         {
@@ -359,7 +357,7 @@ void SvxRubyDialog::Activate()
                         }
                     }
                 }
-                catch(Exception&)
+                catch (const Exception&)
                 {
                     OSL_FAIL("exception in style access");
                 }
@@ -551,9 +549,9 @@ IMPL_LINK_NOARG(SvxRubyDialog, ApplyHdl_Impl)
     {
         try
         {
-            xSelection->setRubyList(aRubyValues, aAutoDetectionCB.IsChecked());
+            xSelection->setRubyList(aRubyValues, false);
         }
-        catch(Exception& )
+        catch (const Exception&)
         {
             OSL_FAIL("Exception caught");
         }
@@ -580,13 +578,6 @@ IMPL_LINK_NOARG(SvxRubyDialog, StylistHdl_Impl)
     return 0;
 }
 
-IMPL_LINK(SvxRubyDialog, AutomaticHdl_Impl, CheckBox*, pBox)
-{
-    pImpl->UpdateRubyValues(pBox->IsChecked());
-    Update();
-    return 0;
-}
-
 IMPL_LINK(SvxRubyDialog, AdjustHdl_Impl, ListBox*, pBox)
 {
     AssertOneEntry();
diff --git a/svx/source/dialog/rubydialog.hrc b/svx/source/dialog/rubydialog.hrc
index 010f984..d4f4b6c 100644
--- a/svx/source/dialog/rubydialog.hrc
+++ b/svx/source/dialog/rubydialog.hrc
@@ -16,7 +16,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#define CB_AUTO_DETECT          1
 #define FT_CHAR_STYLE           2
 #define LB_CHAR_STYLE           3
 #define PB_STYLIST              4
diff --git a/svx/source/dialog/rubydialog.src b/svx/source/dialog/rubydialog.src
index 8967850..658b793 100644
--- a/svx/source/dialog/rubydialog.src
+++ b/svx/source/dialog/rubydialog.src
@@ -31,13 +31,6 @@ ModelessDialog RID_SVXDLG_RUBY
     Text [ en-US ] = "Asian Phonetic Guide" ;
     Moveable = TRUE ;
     Closeable = TRUE ;
-    CheckBox CB_AUTO_DETECT
-    {
-        HelpID = "svx:CheckBox:RID_SVXDLG_RUBY:CB_AUTO_DETECT";
-        Pos = MAP_APPFONT ( 6, 6 ) ;
-        Size = MAP_APPFONT ( 186 , 12 ) ;
-        Text [ en-US ] = "Automatic detection";
-    };
     FixedText FT_LEFT
     {
         Pos = MAP_APPFONT ( 6 , 17 ) ;
commit ab893f2523545d4b06ef5c992026d6d4a777ae98
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 10 12:15:29 2013 +0000

    Show takes a sal_Bool, 0x2000 gets truncated to 0, instead of true
    
    Change-Id: I2226213019077e5882b6e27650f9a673e12710b5

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 6a071b1..5c0d7fd 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1326,8 +1326,8 @@ Size VclScrolledWindow::getVisibleChildSize() const
 bool VclScrolledWindow::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
 {
     bool bRet = VclBin::set_property(rKey, rValue);
-    m_aVScroll.Show(GetStyle() & WB_VERT);
-    m_aHScroll.Show(GetStyle() & WB_HORZ);
+    m_aVScroll.Show((GetStyle() & WB_VSCROLL) != 0);
+    m_aHScroll.Show((GetStyle() & WB_HSCROLL) != 0);
     return bRet;
 }
 
commit cc28bdc494d59181db58ade3bbafab3dc91c40a7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 10 10:12:13 2013 +0000

    split scrolling support for internal/external scrolling support
    
    so for widgets that support their own scrolling we
    throw away the intermediate scrolling widget and for widgets
    that don't we retain it.
    
    Change-Id: I12444bcf1c6c5b51469ef75f0011ce0d965ebc62

diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx
index ebda427..cba9738 100644
--- a/vcl/inc/vcl/builder.hxx
+++ b/vcl/inc/vcl/builder.hxx
@@ -250,6 +250,9 @@ private:
     PackingData get_window_packing_data(const Window *pWindow) const;
     void set_window_packing_position(const Window *pWindow, sal_Int32 nPosition);
 
+    Window* prepareWidgetOwnScrolling(Window *pParent, WinBits &rWinStyle);
+    void cleanupWidgetOwnScrolling(Window *pScrollParent, Window *pWindow, stringmap &rMap);
+
     //Helpers to retrofit all the existing code to the builder
     static void reorderWithinParent(Window &rWindow, sal_uInt16 nNewPosition);
 };
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 472eed3..e9e427e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -702,6 +702,33 @@ bool VclBuilder::extractImage(const OString &id, stringmap &rMap)
     return false;
 }
 
+Window* VclBuilder::prepareWidgetOwnScrolling(Window *pParent, WinBits &rWinStyle)
+{
+    //For Widgets that manage their own scrolling, if one appears as a child of
+    //a scrolling window shoehorn that scrolling settings to this widget and
+    //return the real parent to use
+    if (pParent && pParent->GetType() == WINDOW_SCROLLWINDOW)
+    {
+        WinBits nScrollBits = pParent->GetStyle();
+        nScrollBits &= (WB_AUTOHSCROLL|WB_HSCROLL|WB_AUTOVSCROLL|WB_VSCROLL);
+        rWinStyle |= nScrollBits;
+        pParent = pParent->GetParent();
+    }
+
+    return pParent;
+}
+
+void VclBuilder::cleanupWidgetOwnScrolling(Window *pScrollParent, Window *pWindow, stringmap &rMap)
+{
+    //remove the redundant scrolling parent
+    sal_Int32 nWidthReq = pScrollParent->get_width_request();
+    rMap[OString("width-request")] = OString::valueOf(nWidthReq);
+    sal_Int32 nHeightReq = pScrollParent->get_height_request();
+    rMap[OString("height-request")] = OString::valueOf(nHeightReq);
+
+    m_pParserState->m_aRedundantParentWidgets[pScrollParent] = pWindow;
+}
+
 #ifndef DISABLE_DYNLOADING
 extern "C" { static void SAL_CALL thisModule() {} }
 #endif
@@ -895,7 +922,12 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
         //   everything over to SvTreeViewBox
         //d) remove the users of makeSvTreeViewBox
         extractModel(id, rMap);
-        pWindow = new ListBox(pParent, WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE);
+        WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
+        //ListBox manages its own scrolling,
+        Window *pRealParent = prepareWidgetOwnScrolling(pParent, nWinStyle);
+        pWindow = new ListBox(pRealParent, nWinStyle);
+        if (pRealParent != pParent)
+            cleanupWidgetOwnScrolling(pParent, pWindow, rMap);
     }
     else if (name == "GtkLabel")
     {
@@ -957,32 +989,11 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
         extractBuffer(id, rMap);
 
         WinBits nWinStyle = WB_LEFT | WB_BORDER;
-        //VclMultiLineEdit manage their own scrolling,
-        //so if it appears as a child of a scrolling window
-        //shoehorn that scrolling settings to this
-        //widget and remove the parent
-        Window *pScrollParent = NULL;
-        if (pParent && pParent->GetType() == WINDOW_SCROLLWINDOW)
-        {
-            WinBits nScrollBits = pParent->GetStyle();
-            nScrollBits &= (WB_AUTOHSCROLL|WB_HSCROLL|WB_AUTOVSCROLL|WB_VSCROLL);
-            nWinStyle |= nScrollBits;
-
-            pScrollParent = pParent;
-            pParent = pParent->GetParent();
-        }
-
-        pWindow = new VclMultiLineEdit(pParent, nWinStyle);
-
-        if (pScrollParent)
-        {
-            sal_Int32 nWidthReq = pScrollParent->get_width_request();
-            rMap[OString("width-request")] = OString::valueOf(nWidthReq);
-            sal_Int32 nHeightReq = pScrollParent->get_height_request();
-            rMap[OString("height-request")] = OString::valueOf(nHeightReq);
-
-            m_pParserState->m_aRedundantParentWidgets[pScrollParent] = pWindow;
-        }
+        //VclMultiLineEdit manages its own scrolling,
+        Window *pRealParent = prepareWidgetOwnScrolling(pParent, nWinStyle);
+        pWindow = new VclMultiLineEdit(pRealParent, nWinStyle);
+        if (pRealParent != pParent)
+            cleanupWidgetOwnScrolling(pParent, pWindow, rMap);
     }
     else
     {
@@ -1892,8 +1903,12 @@ void VclBuilder::applyPackingProperty(Window *pCurrent,
 
     if (pCurrent->GetType() == WINDOW_SCROLLWINDOW)
     {
-        pCurrent = m_pParserState->m_aRedundantParentWidgets[pCurrent];
-        assert(pCurrent);
+        std::map<Window*, Window*>::iterator aFind = m_pParserState->m_aRedundantParentWidgets.find(pCurrent);
+        if (aFind != m_pParserState->m_aRedundantParentWidgets.end())
+        {
+            pCurrent = aFind->second;
+            assert(pCurrent);
+        }
     }
 
     while (reader.nextAttribute(&nsId, &name))
commit 1a87393fbb65416b8b50f62f21f871e7f07e3d90
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 10 11:14:55 2013 +0000

    add a stock apply button text and map to gtk-apply
    
    Change-Id: I97522b314088d4b5fd1f7b2b46e49d00c155c5c5

diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc
index 19e13a4..27e5e0a 100644
--- a/vcl/inc/svids.hrc
+++ b/vcl/inc/svids.hrc
@@ -155,6 +155,7 @@
 #define SV_BUTTONTEXT_REMOVE                10114
 #define SV_BUTTONTEXT_NEW                   10115
 #define SV_BUTTONTEXT_EDIT                  10116
+#define SV_BUTTONTEXT_APPLY                 10117
 
 #define SV_STDTEXT_FIRST                    SV_STDTEXT_SERVICENOTAVAILABLE
 #define SV_STDTEXT_SERVICENOTAVAILABLE      10200
diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src
index ee301b1..5f93307 100644
--- a/vcl/source/src/btntext.src
+++ b/vcl/source/src/btntext.src
@@ -97,3 +97,8 @@ String SV_BUTTONTEXT_EDIT
 {
     Text [ en-US ] = "~Edit";
 };
+
+String SV_BUTTONTEXT_APPLY
+{
+    Text [ en-US ] = "~Apply";
+};
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 1873198..472eed3 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -463,6 +463,8 @@ namespace
             return (VclResId(SV_BUTTONTEXT_NEW).toString());
         else if (rType == "gtk-edit")
             return (VclResId(SV_BUTTONTEXT_EDIT).toString());
+        else if (rType == "gtk-apply")
+            return (VclResId(SV_BUTTONTEXT_APPLY).toString());
         SAL_WARN("vcl.layout", "unknown stock type: " << rType.getStr());
         return OUString();
     }
commit e353b8de425738ef6d24ff39e4893527f23af7df
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 10 09:22:48 2013 +0000

    maName is now private, use GetFamilyName()
    
    Change-Id: Id3e0484175fb62e96bdf6dd9abb95ec35117aebf

diff --git a/vcl/generic/glyphs/graphite_serverfont.cxx b/vcl/generic/glyphs/graphite_serverfont.cxx
index 87cd464..9678da6 100644
--- a/vcl/generic/glyphs/graphite_serverfont.cxx
+++ b/vcl/generic/glyphs/graphite_serverfont.cxx
@@ -89,7 +89,7 @@ GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) thro
 #ifdef DEBUG
         if (mpFeatures)
             printf("GraphiteServerFontLayout %s/%s/%s %x language %d features %d errors\n",
-                rtl::OUStringToOString( rServerFont.GetFontSelData().maName,
+                rtl::OUStringToOString( rServerFont.GetFontSelData().GetFamilyName(),
                 RTL_TEXTENCODING_UTF8 ).getStr(),
                 rtl::OUStringToOString( rServerFont.GetFontSelData().maTargetName,
                 RTL_TEXTENCODING_UTF8 ).getStr(),


More information about the Libreoffice-commits mailing list