[Libreoffice-commits] core.git: 40 commits - connectivity/source cui/source cui/uiconfig cui/UIConfig_cui.mk editeng/source filter/qa filter/source include/vcl include/xmlreader lotuswordpro/source padmin/source reportdesign/source sc/qa sd/source svtools/source sw/source ucb/source unotools/source uui/source uui/uiconfig uui/UIConfig_uui.mk vcl/generic vcl/source vcl/unx writerfilter/inc writerfilter/source

Caolán McNamara caolanm at redhat.com
Thu Mar 6 08:36:17 PST 2014


 connectivity/source/drivers/hsqldb/HView.cxx            |   23 -
 connectivity/source/inc/hsqldb/HView.hxx                |    8 
 cui/UIConfig_cui.mk                                     |    1 
 cui/source/dialogs/passwdomdlg.cxx                      |  195 ++-------
 cui/source/dialogs/passwdomdlg.hrc                      |   50 --
 cui/source/dialogs/passwdomdlg.src                      |  193 ---------
 cui/source/inc/cuires.hrc                               |    9 
 cui/source/inc/helpid.hrc                               |    7 
 cui/uiconfig/ui/password.ui                             |  329 ++++++++++++++++
 editeng/source/items/numitem.cxx                        |   18 
 filter/qa/cppunit/xslt-test.cxx                         |    2 
 filter/source/msfilter/msdffimp.cxx                     |    2 
 include/vcl/cursor.hxx                                  |    2 
 include/xmlreader/xmlreader.hxx                         |    3 
 lotuswordpro/source/filter/LotusWordProImportFilter.cxx |    1 
 lotuswordpro/source/filter/LotusWordProImportFilter.hxx |   11 
 lotuswordpro/source/filter/bencont.cxx                  |    1 
 lotuswordpro/source/filter/benname.cxx                  |    8 
 lotuswordpro/source/filter/xfilter/xftable.cxx          |    1 
 padmin/source/cmddlg.cxx                                |    3 
 reportdesign/source/ui/inc/ViewsWindow.hxx              |    1 
 sc/qa/unit/ucalc_sharedformula.cxx                      |    1 
 sd/source/ui/annotations/annotationwindow.cxx           |    2 
 sd/source/ui/unoidl/sddetect.cxx                        |   24 -
 svtools/source/contnr/svimpbox.cxx                      |    4 
 svtools/source/svrtf/svparser.cxx                       |    7 
 sw/source/core/layout/fly.cxx                           |    2 
 sw/source/core/text/inftxt.cxx                          |   16 
 sw/source/core/undo/unnum.cxx                           |    4 
 sw/source/filter/ww8/ww8atr.cxx                         |    4 
 sw/source/ui/docvw/SidebarWin.cxx                       |    2 
 sw/source/ui/misc/glossary.cxx                          |    1 
 ucb/source/ucp/cmis/cmis_content.cxx                    |    4 
 unotools/source/config/fontcfg.cxx                      |   56 +-
 uui/UIConfig_uui.mk                                     |    1 
 uui/source/ids.hrc                                      |    2 
 uui/source/passworddlg.cxx                              |  137 +-----
 uui/source/passworddlg.hxx                              |   15 
 uui/source/passworddlg.src                              |  119 +----
 uui/uiconfig/ui/password.ui                             |  151 +++++++
 vcl/generic/fontmanager/parseAFM.cxx                    |   20 
 vcl/source/filter/graphicfilter.cxx                     |    4 
 vcl/source/window/cursor.cxx                            |    4 
 vcl/source/window/dlgctrl.cxx                           |    4 
 vcl/source/window/keycod.cxx                            |    2 
 vcl/unx/generic/app/i18n_xkb.cxx                        |    9 
 writerfilter/inc/resourcemodel/OutputWithDepth.hxx      |    5 
 writerfilter/source/dmapper/NumberingManager.cxx        |   11 
 writerfilter/source/dmapper/SectionColumnHandler.cxx    |   13 
 49 files changed, 770 insertions(+), 722 deletions(-)

New commits:
commit 5ba5083af2a1575bee28f1a91e53180a2df74a11
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:24:26 2014 +0000

    coverity#708878 Unused pointer value
    
    Change-Id: I7c417ccff113ed9610f609e6bcead30d727b2a0c

diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 40cdc3f..7b063d1 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -261,7 +261,6 @@ IMPL_LINK( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox )
         OUString aName(pBox->GetEntryText(pEntry));
         m_pNameED->SetText(aName);
         m_pShortNameEdit->SetText(*reinterpret_cast<OUString*>(pEntry->GetUserData()));
-        pEntry = pBox->GetParent(pEntry);
         m_pInsertBtn->Enable( !bIsDocReadOnly);
         ShowAutoText(::GetCurrGlosGroup(), m_pShortNameEdit->GetText());
     }
commit 7591a91fe3e517303b8840c83a0d824b16a5410a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:22:52 2014 +0000

    coverity#708894 Unused pointer value
    
    Change-Id: I159f172171281e6b65190f65fedcb93975560dd1

diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 531581f..cb43d34 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -1142,7 +1142,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
         bool bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE);
         // get index, form start and form end
         sal_uInt16 nIndex=0, nFormStart=0, nFormEnd=0;
-        Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow,
+        ::ImplFindDlgCtrlWindow( pFrameWindow,
                                            pLabel,
                                            nIndex,
                                            nFormStart,
@@ -1164,7 +1164,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
             while( nIndex < nFormEnd )
             {
                 nIndex++;
-                pSWindow = ::ImplGetChildWindow( pFrameWindow,
+                Window* pSWindow = ::ImplGetChildWindow( pFrameWindow,
                                                  nIndex,
                                                  nIndex,
                                                  false );
commit 2f41b934e5538e4de51f39eca55ec86df5ce32c7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:21:45 2014 +0000

    coverity#708896 Unused pointer value
    
    Change-Id: Id2a4e43c1f32d997ee2656ef2e55a1951ce60f9d

diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index 9ad2c2f..1567c9e 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -542,7 +542,7 @@ static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
                     /* ignore y-width for now */
                     break;
                 case METRICSSETS:
-                    keyword = token(fp,tokenlen);
+                    token(fp,tokenlen); /*eat token*/
                     break; /* ignore this for now */
                 case NOPE:
                 default:
commit a61d15e0c4f0756218ff39c980b13cc9e0b830ef
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:21:10 2014 +0000

    coverity#708897 Unused pointer value
    
    Change-Id: Iab37796be5c9d6fef3e68e9ec9b6828c643b822d

diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index 8ed65c0..9ad2c2f 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -613,7 +613,7 @@ static int parseCharWidths( FileInputStream* fp, int* cwi)
             switch(recognize(keyword,tokenlen))
             {
                 case COMMENT:
-                    keyword = linetoken(fp);
+                    linetoken(fp); /*eat token*/
                     break;
                 case CODE:
                     if ((keyword = token(fp,tokenlen)) != NULL)
commit f3770d0d041dad2c41383cd7f8b7c867542d270d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:20:17 2014 +0000

    coverity#708898 Unused pointer value
    
    Change-Id: I3190fa5c49de84319bf08f286c1511d2b23e4922

diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index 2660314..8ed65c0 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -654,8 +654,8 @@ static int parseCharWidths( FileInputStream* fp, int* cwi)
                     keyword = token(fp,tokenlen); keyword = token(fp,tokenlen);
                     break;
                 case VVECTOR:
-                    keyword = token(fp,tokenlen);
-                    keyword = token(fp,tokenlen);
+                    token(fp,tokenlen); /*eat token*/
+                    token(fp,tokenlen); /*eat token*/
                     break;
                 case NOPE:
                 default:
commit 827d9168ee861c2d5f457c984f19f0753e4344b3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:19:29 2014 +0000

    coverity#708899 Unused pointer value
    
    Change-Id: I7b8c2a01a59f939805d09612968d8f90acf1849a

diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index 956e22e..2660314 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -747,7 +747,7 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
         switch(recognize(keyword,tokenlen))
         {
             case COMMENT:
-                keyword = linetoken(fp);
+                linetoken(fp); /*eat token*/
                 break;
             case CODE:
                 if (!(count < fi->numOfChars))
commit 7e5fdb00f9dde1208cf6dfeea3a4fa14a903b75b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:18:20 2014 +0000

    coverity#708900 Unused pointer value
    
    Change-Id: I2b644bf795bcfe2978aac25696cf362d7505c9a5

diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index f8bb6de..956e22e 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -850,8 +850,8 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
                 error = normalEOF;
                 break;
             case VVECTOR:
-                keyword = token(fp,tokenlen);
-                keyword = token(fp,tokenlen);
+                token(fp,tokenlen); /*eat token*/
+                token(fp,tokenlen); /*eat token*/
                 break;
             case NOPE:
             default:
commit 8770c1de8df41de87105d34b1281357c70f88dca
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:17:32 2014 +0000

    coverity#708901 Unused pointer value
    
    Change-Id: Ie12718b9de452ccd5b8031694d6e70792b438d89

diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index 6d3f2a6..f8bb6de 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -1177,7 +1177,7 @@ static int parseCompCharData( FileInputStream* fp, FontInfo* fi)
             switch(recognize(keyword,tokenlen))
             {
                 case COMMENT:
-                    keyword = linetoken(fp);
+                    linetoken(fp); /*eat token*/
                     break;
                 case COMPCHAR:
                     if (!(ccount < fi->numOfComps))
commit a1630627935f8daad21792787ff91c442b69a527
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:16:52 2014 +0000

    coverity#708902 Unused pointer value
    
    Change-Id: Ia8e140da22d67013a1485445a6359aa001a14826

diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index e736a16..6d3f2a6 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -1033,7 +1033,7 @@ static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
             switch(recognize(keyword,tokenlen))
             {
                 case COMMENT:
-                    keyword = linetoken(fp);
+                    linetoken(fp); /*eat token*/
                     break;
                 case KERNPAIR:
                     if (!(pcount < fi->numOfPairs))
commit be9c3a83b28720492d4e80bd27285344bc696505
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:16:10 2014 +0000

    coverity#708903 Unused pointer value
    
    Change-Id: I86bf2361e06bc9beac20b76894b247c46c265b1a

diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index cac5b13..e736a16 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -925,7 +925,7 @@ static int parseTrackKernData( FileInputStream* fp, FontInfo* fi)
             switch(recognize(keyword,tokenlen))
             {
                 case COMMENT:
-                    keyword = linetoken(fp);
+                    linetoken(fp); /*eat token*/
                     break;
                 case TRACKKERN:
                     if (!(tcount < fi->numOfTracks))
commit 0404e92b01707a1b314d8a1dd5df6f38247e64b9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:13:45 2014 +0000

    coverity#738961 Unused pointer value
    
    Change-Id: I160da56b4af35a8859d60f015fe1412f484a4500

diff --git a/lotuswordpro/source/filter/xfilter/xftable.cxx b/lotuswordpro/source/filter/xfilter/xftable.cxx
index 322fb69..842b0aa 100644
--- a/lotuswordpro/source/filter/xfilter/xftable.cxx
+++ b/lotuswordpro/source/filter/xfilter/xftable.cxx
@@ -259,7 +259,6 @@ void    XFTable::ToXml(IXFStream *pStrm)
     //output rows:
     {
         int     lastRow = 0;
-        pAttrList = pStrm->GetAttrList();
 
         std::map<sal_uInt16, XFRow* >::iterator it = m_aRows.begin();
         for( ; it!=m_aRows.end(); ++it )
commit 3613bd098a718b45883d6e56d6d401004550e3c8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 16:12:06 2014 +0000

    coverity#738966 Unused pointer value
    
    Change-Id: Ia18b6e6d9462a8bcd3371d04b105db67fd397cc5

diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index 034e51a..143b52f 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -90,10 +90,6 @@ void SwUndoInsNum::UndoImpl(::sw::UndoRedoContext & rContext)
         if( nLRSavePos )
         {
             // Update immediately so that potential "old" LRSpaces will be valid again.
-            // For that search firstly the correct NumRule names!
-            if( !pNd && nSttNode )
-                pNd = rDoc.GetNodes()[ nSttNode ]->GetTxtNode();
-
             pHistory->TmpRollback( &rDoc, nLRSavePos );
 
         }
commit 1122464b10e7bb2cf44954390ded491c002c2c86
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 15:25:03 2014 +0000

    convert password dialog to .ui
    
    Change-Id: I29e58d3992f43c5ee469484d0587843b06663bf1

diff --git a/uui/UIConfig_uui.mk b/uui/UIConfig_uui.mk
index df6d3e8..6c0ca42 100644
--- a/uui/UIConfig_uui.mk
+++ b/uui/UIConfig_uui.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UIConfig_UIConfig,uui))
 $(eval $(call gb_UIConfig_add_uifiles,uui,\
 	uui/uiconfig/ui/logindialog \
 	uui/uiconfig/ui/masterpassworddlg \
+	uui/uiconfig/ui/password \
 	uui/uiconfig/ui/setmasterpassworddlg \
 	uui/uiconfig/ui/sslwarndialog \
 	uui/uiconfig/ui/unknownauthdialog \
diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc
index c40067b6..06653b9 100644
--- a/uui/source/ids.hrc
+++ b/uui/source/ids.hrc
@@ -34,7 +34,6 @@
 
 #define RID_UUI_ERRHDL                                  (RID_UUI_START + 20)
 #define DLG_UUI_MASTERPASSWORD_CRT                      (RID_UUI_START + 21)
-#define DLG_UUI_PASSWORD                                (RID_UUI_START + 22)
 #define STR_ERROR_SIMPLE_PASSWORD_WRONG                 (RID_UUI_START + 23)
 #define STR_ERROR_PASSWORD_TO_OPEN_WRONG                (RID_UUI_START + 24)
 #define STR_ERROR_PASSWORD_TO_MODIFY_WRONG              (RID_UUI_START + 25)
@@ -154,7 +153,6 @@
 #define TITLE_UUI_SSLWARN_INVALID (ERRCODE_AREA_UUI_UNKNOWNAUTH + SSLWARN_TYPE_INVALID + 3)
 
 #define HID_DLG_FILTER_SELECT                                  "UUI_HID_DLG_FILTER_SELECT"
-#define HID_DLG_PASSWORD_UUI                                   "UUI_HID_DLG_PASSWORD_UUI"
 #define HID_XMLSECDLG_MACROWARN                                "UUI_HID_XMLSECDLG_MACROWARN"
 #define HID_DLG_NEWERVERSIONWARNING                            "UUI_HID_DLG_NEWERVERSIONWARNING"
 
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 83dd4cb..6d6bc02 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -23,43 +23,23 @@
 
 #include <vcl/msgbox.hxx>
 
-
 using namespace ::com::sun::star;
 
-
-
-
-static void lcl_Move( Window &rWin, long nOffset )
+PasswordDialog::PasswordDialog(Window* _pParent,
+    task::PasswordRequestMode nDlgMode, ResMgr * pResMgr,
+    OUString& aDocURL, bool bOpenToModify, bool bIsSimplePasswordRequest)
+    : ModalDialog(_pParent, "PasswordDialog", "uui/ui/password.ui")
+    , nMinLen(1)
+    , aPasswdMismatch(ResId(STR_PASSWORD_MISMATCH, *pResMgr))
+    , nDialogMode(nDlgMode)
+    , pResourceMgr(pResMgr)
 {
-    Point aTmp( rWin.GetPosPixel() );
-    aTmp.Y() += nOffset;
-    rWin.SetPosPixel( aTmp );
-}
-
-
+    get(m_pFTPassword, "newpassFT");
+    get(m_pEDPassword, "newpassEntry");
+    get(m_pFTConfirmPassword, "confirmpassFT");
+    get(m_pEDConfirmPassword, "confirmpassEntry");
+    get(m_pOKBtn, "ok");
 
-PasswordDialog::PasswordDialog(
-    Window* _pParent,
-    task::PasswordRequestMode nDlgMode,
-    ResMgr * pResMgr,
-    OUString& aDocURL,
-    bool bOpenToModify,
-    bool bIsSimplePasswordRequest )
-
-    :ModalDialog( _pParent, ResId( DLG_UUI_PASSWORD, *pResMgr ) )
-    ,aFTPassword( this, ResId( FT_PASSWORD, *pResMgr ))
-    ,aEDPassword( this, ResId( ED_PASSWORD, *pResMgr ))
-    ,aFTConfirmPassword( this, ResId( FT_CONFIRM_PASSWORD, *pResMgr ))
-    ,aEDConfirmPassword( this, ResId( ED_CONFIRM_PASSWORD, *pResMgr ))
-    ,aOKBtn ( this, ResId( BTN_PASSWORD_OK, *pResMgr ))
-    ,aCancelBtn ( this, ResId( BTN_PASSWORD_CANCEL, *pResMgr ))
-    ,aHelpBtn ( this, ResId( BTN_PASSWORD_HELP, *pResMgr ))
-    ,aFixedLine1( this, ResId( FL_FIXED_LINE_1, *pResMgr ))
-    ,nMinLen(1)
-    ,aPasswdMismatch( ResId( STR_PASSWORD_MISMATCH, *pResMgr ))
-    ,nDialogMode( nDlgMode )
-    ,pResourceMgr ( pResMgr )
-{
     if( nDialogMode == task::PasswordRequestMode_PASSWORD_REENTER )
     {
         const sal_uInt16 nOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG;
@@ -71,101 +51,46 @@ PasswordDialog::PasswordDialog(
 
     // default settings for enter password or reenter passwd...
     OUString aTitle(ResId(STR_TITLE_ENTER_PASSWORD, *pResourceMgr).toString());
-    aFTConfirmPassword.Hide();
-    aEDConfirmPassword.Hide();
-    aFTConfirmPassword.Enable( false );
-    aEDConfirmPassword.Enable( false );
+    m_pFTConfirmPassword->Hide();
+    m_pEDConfirmPassword->Hide();
+    m_pFTConfirmPassword->Enable( false );
+    m_pEDConfirmPassword->Enable( false );
 
     // settings for create password
     if (nDialogMode == task::PasswordRequestMode_PASSWORD_CREATE)
     {
         aTitle = ResId(STR_TITLE_CREATE_PASSWORD, *pResourceMgr).toString();
 
-        aFTConfirmPassword.SetText(ResId(STR_CONFIRM_SIMPLE_PASSWORD, *pResourceMgr).toString());
-
-        aFTConfirmPassword.Show();
-        aEDConfirmPassword.Show();
-        aFTConfirmPassword.Enable( true );
-        aEDConfirmPassword.Enable( true );
-    }
-    else
-    {
-        // shrink dialog by size of hidden controls and move rest up accordingly
-
-        long nDelta = aFixedLine1.GetPosPixel().Y() - aFTConfirmPassword.GetPosPixel().Y();
-
-        lcl_Move( aFixedLine1, -nDelta );
-        lcl_Move( aOKBtn, -nDelta );
-        lcl_Move( aCancelBtn, -nDelta );
-        lcl_Move( aHelpBtn, -nDelta );
+        m_pFTConfirmPassword->SetText(ResId(STR_CONFIRM_SIMPLE_PASSWORD, *pResourceMgr).toString());
 
-        Size aNewDlgSize = GetSizePixel();
-        aNewDlgSize.Height() -= nDelta;
-        SetSizePixel( aNewDlgSize );
+        m_pFTConfirmPassword->Show();
+        m_pEDConfirmPassword->Show();
+        m_pFTConfirmPassword->Enable( true );
+        m_pEDConfirmPassword->Enable( true );
     }
 
     SetText( aTitle );
 
     sal_uInt16 nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN;
-    aFTPassword.SetText(ResId(nStrId, *pResourceMgr).toString());
-    aFTPassword.SetText( aFTPassword.GetText() + aDocURL );
+    m_pFTPassword->SetText(ResId(nStrId, *pResourceMgr).toString());
+    m_pFTPassword->SetText( m_pFTPassword->GetText() + aDocURL );
     if (bIsSimplePasswordRequest)
     {
         DBG_ASSERT( aDocURL.isEmpty(), "A simple password request should not have a document URL! Use document password request instead." );
-        aFTPassword.SetText(ResId(STR_ENTER_SIMPLE_PASSWORD, *pResourceMgr).toString());
+        m_pFTPassword->SetText(ResId(STR_ENTER_SIMPLE_PASSWORD, *pResourceMgr).toString());
     }
 
-    FreeResource();
-
-    aOKBtn.SetClickHdl( LINK( this, PasswordDialog, OKHdl_Impl ) );
-
-
-
-    // move controls down by extra height needed for aFTPassword
-    // (usually only needed if a URL was provided)
-
-
-    long nLabelWidth    = aFTPassword.GetSizePixel().Width();
-    long nLabelHeight   = aFTPassword.GetSizePixel().Height();
-    long nTextWidth     = aFTPassword.GetCtrlTextWidth( aFTPassword.GetText() );
-    long nTextHeight    = aFTPassword.GetTextHeight();
-
-    Rectangle aLabelRect( aFTPassword.GetPosPixel(), aFTPassword.GetSizePixel() );
-    Rectangle aRect = aFTPassword.GetTextRect( aLabelRect, aFTPassword.GetText() );
-
-    long nNewLabelHeight = 0;
-    for( nNewLabelHeight = ( nTextWidth / nLabelWidth + 1 ) * nTextHeight;
-        nNewLabelHeight < aRect.GetHeight();
-        nNewLabelHeight += nTextHeight ) {} ;
-
-    long nDelta = nNewLabelHeight - nLabelHeight;
-
-    Size aNewDlgSize = GetSizePixel();
-    aNewDlgSize.Height() += nDelta;
-    SetSizePixel( aNewDlgSize );
-
-    Size aNewLabelSize = aFTPassword.GetSizePixel();
-    aNewLabelSize.Height() = nNewLabelHeight;
-    aFTPassword.SetPosSizePixel( aFTPassword.GetPosPixel(), aNewLabelSize );
-
-    lcl_Move( aEDPassword, nDelta );
-    lcl_Move( aFTConfirmPassword, nDelta );
-    lcl_Move( aEDConfirmPassword, nDelta );
-    lcl_Move( aFixedLine1, nDelta );
-    lcl_Move( aOKBtn, nDelta );
-    lcl_Move( aCancelBtn, nDelta );
-    lcl_Move( aHelpBtn, nDelta );
+    m_pOKBtn->SetClickHdl( LINK( this, PasswordDialog, OKHdl_Impl ) );
 }
 
-
 IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl)
 {
-    bool bEDPasswdValid = aEDPassword.GetText().getLength() >= nMinLen;
-    bool bPasswdMismatch = aEDConfirmPassword.GetText() != aEDPassword.GetText();
-    bool bValid = (!aEDConfirmPassword.IsVisible() && bEDPasswdValid) ||
-            (aEDConfirmPassword.IsVisible() && bEDPasswdValid && !bPasswdMismatch);
+    bool bEDPasswdValid = m_pEDPassword->GetText().getLength() >= nMinLen;
+    bool bPasswdMismatch = m_pEDConfirmPassword->GetText() != m_pEDPassword->GetText();
+    bool bValid = (!m_pEDConfirmPassword->IsVisible() && bEDPasswdValid) ||
+            (m_pEDConfirmPassword->IsVisible() && bEDPasswdValid && !bPasswdMismatch);
 
-    if (aEDConfirmPassword.IsVisible() && bPasswdMismatch)
+    if (m_pEDConfirmPassword->IsVisible() && bPasswdMismatch)
     {
         ErrorBox aErrorBox( this, WB_OK, aPasswdMismatch );
         aErrorBox.Execute();
diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx
index 933c713..bb5a592 100644
--- a/uui/source/passworddlg.hxx
+++ b/uui/source/passworddlg.hxx
@@ -32,14 +32,11 @@
 
 class PasswordDialog : public ModalDialog
 {
-    FixedText       aFTPassword;
-    Edit            aEDPassword;
-    FixedText       aFTConfirmPassword;
-    Edit            aEDConfirmPassword;
-    OKButton        aOKBtn;
-    CancelButton    aCancelBtn;
-    HelpButton      aHelpBtn;
-    FixedLine       aFixedLine1;
+    FixedText*      m_pFTPassword;
+    Edit*           m_pEDPassword;
+    FixedText*      m_pFTConfirmPassword;
+    Edit*           m_pEDConfirmPassword;
+    OKButton*       m_pOKBtn;
     sal_uInt16      nMinLen;
     OUString        aPasswdMismatch;
 
@@ -51,7 +48,7 @@ public:
             bool bOpenToModify = false, bool bIsSimplePasswordRequest = false );
 
     void            SetMinLen( sal_uInt16 nMin ) { nMinLen = nMin; }
-    OUString        GetPassword() const { return aEDPassword.GetText(); }
+    OUString        GetPassword() const { return m_pEDPassword->GetText(); }
 
 private:
     ::com::sun::star::task::PasswordRequestMode     nDialogMode;
diff --git a/uui/source/passworddlg.src b/uui/source/passworddlg.src
index e7a4aaa..bbbb874 100644
--- a/uui/source/passworddlg.src
+++ b/uui/source/passworddlg.src
@@ -22,106 +22,39 @@
 #include <ids.hrc>
 #include <passworddlg.hrc>
 
-ModalDialog DLG_UUI_PASSWORD
+String STR_ENTER_PASSWORD_TO_OPEN
 {
-    HelpId = HID_DLG_PASSWORD_UUI;
-    Border = TRUE ;
-    Moveable = TRUE ;
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT( 165, 95 );
-
-    FixedText FT_PASSWORD
-    {
-        Pos = MAP_APPFONT( 3, 6 );
-        Size = MAP_APPFONT( 159, 8 );
-        WordBreak = TRUE;
-    };
-
-    Edit ED_PASSWORD
-    {
-        HelpID = "uui:Edit:DLG_UUI_PASSWORD:ED_PASSWORD";
-        Pos = MAP_APPFONT( 3, 17 );
-        Size = MAP_APPFONT( 159, 12 );
-        Border = TRUE ;
-        PassWord = TRUE ;
-    };
-
-    FixedText FT_CONFIRM_PASSWORD
-    {
-        Pos = MAP_APPFONT( 3, 34 );
-        Size = MAP_APPFONT( 159, 8 );
-        WordBreak = TRUE;
-    };
-
-    Edit ED_CONFIRM_PASSWORD
-    {
-        HelpID = "uui:Edit:DLG_UUI_PASSWORD:ED_CONFIRM_PASSWORD";
-        Pos = MAP_APPFONT( 3, 45 );
-        Size = MAP_APPFONT( 159, 12 );
-        Border = TRUE ;
-        PassWord = TRUE ;
-    };
-
-    FixedLine FL_FIXED_LINE_1
-    {
-        Pos = MAP_APPFONT( 0, 63 );
-        Size = MAP_APPFONT( 165, 8 );
-    };
-
-    HelpButton BTN_PASSWORD_HELP
-    {
-        Pos = MAP_APPFONT( 3, 76 );
-        Size = MAP_APPFONT( 50, 14 );
-    };
-
-    OKButton BTN_PASSWORD_OK
-    {
-        Pos = MAP_APPFONT( 59, 76 );
-        Size = MAP_APPFONT( 50, 14 );
-        DefButton = TRUE ;
-    };
-
-    CancelButton BTN_PASSWORD_CANCEL
-    {
-        Pos = MAP_APPFONT( 112, 76 );
-        Size = MAP_APPFONT( 50, 14 );
-    };
-
-    String STR_ENTER_PASSWORD_TO_OPEN
-    {
-        Text [ en-US ] = "Enter password to open file: \n";
-    };
+    Text [ en-US ] = "Enter password to open file: \n";
+};
 
-    String STR_ENTER_PASSWORD_TO_MODIFY
-    {
-        Text [ en-US ] = "Enter password to modify file: \n";
-    };
+String STR_ENTER_PASSWORD_TO_MODIFY
+{
+    Text [ en-US ] = "Enter password to modify file: \n";
+};
 
-    String STR_ENTER_SIMPLE_PASSWORD
-    {
-        Text [ en-US ] = "Enter password: ";
-    };
+String STR_ENTER_SIMPLE_PASSWORD
+{
+    Text [ en-US ] = "Enter password: ";
+};
 
-    String STR_CONFIRM_SIMPLE_PASSWORD
-    {
-        Text [ en-US ] = "Confirm password: ";
-    };
+String STR_CONFIRM_SIMPLE_PASSWORD
+{
+    Text [ en-US ] = "Confirm password: ";
+};
 
-    String STR_TITLE_CREATE_PASSWORD
-    {
-        Text [ en-US ] = "Set Password";
-    };
+String STR_TITLE_CREATE_PASSWORD
+{
+    Text [ en-US ] = "Set Password";
+};
 
-    String STR_TITLE_ENTER_PASSWORD
-    {
-        Text [ en-US ] = "Enter Password";
-    };
+String STR_TITLE_ENTER_PASSWORD
+{
+    Text [ en-US ] = "Enter Password";
+};
 
-    String STR_PASSWORD_MISMATCH
-    {
-        Text [ en-US ] = "The confirmation password did not match the password. Set the password again by entering the same password in both boxes." ;
-    };
+String STR_PASSWORD_MISMATCH
+{
+    Text [ en-US ] = "The confirmation password did not match the password. Set the password again by entering the same password in both boxes." ;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/uiconfig/ui/password.ui b/uui/uiconfig/ui/password.ui
new file mode 100644
index 0000000..f3b7c9b
--- /dev/null
+++ b/uui/uiconfig/ui/password.ui
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <object class="GtkDialog" id="PasswordDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Set Password</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">12</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="ok">
+                <property name="label">gtk-ok</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="cancel">
+                <property name="label">gtk-cancel</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="button1">
+                <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="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">12</property>
+            <child>
+              <object class="GtkLabel" id="confirmpassFT">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">confirmpassEntry</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="GtkLabel" id="newpassFT">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">newpassEntry</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="GtkEntry" id="newpassEntry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="visibility">False</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="GtkEntry" id="confirmpassEntry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="visibility">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>
+          <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">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup1"/>
+</interface>
commit 43556658f04abaf01d936b4ad447bf64920e0d2f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 14:01:18 2014 +0000

    convert another password dialog to .ui
    
    Change-Id: I208854a35886959a439954e7848dc277ee6fa96b

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 4991972..9a70405 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -117,6 +117,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/paragalignpage \
 	cui/uiconfig/ui/paraindentspacing \
 	cui/uiconfig/ui/paratabspage \
+	cui/uiconfig/ui/password \
 	cui/uiconfig/ui/pastespecial \
 	cui/uiconfig/ui/percentdialog \
 	cui/uiconfig/ui/personalization_tab \
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index fba3492..1a86bc4 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "passwdomdlg.hrc"
 #include "passwdomdlg.hxx"
 
 #include "cuires.hrc"
@@ -27,78 +26,21 @@
 #include <vcl/fixed.hxx>
 #include <vcl/edit.hxx>
 #include <vcl/button.hxx>
-#include <vcl/morebtn.hxx>
+#include <vcl/layout.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/msgbox.hxx>
 
-
-
-
-class PasswordReenterEdit_Impl : public Edit
-{
-    OUString  m_aDefaultTxt;
-
-    // disallow use of copy c-tor and assignment operator
-    PasswordReenterEdit_Impl( const PasswordReenterEdit_Impl & );
-    PasswordReenterEdit_Impl & operator = ( const PasswordReenterEdit_Impl & );
-
-public:
-    PasswordReenterEdit_Impl( Window * pParent, const ResId &rResId );
-    virtual ~PasswordReenterEdit_Impl();
-
-    // Edit
-    virtual void        Paint( const Rectangle& rRect );
-};
-
-
-PasswordReenterEdit_Impl::PasswordReenterEdit_Impl( Window * pParent, const ResId &rResId ) :
-    Edit( pParent, rResId )
-{
-}
-
-
-PasswordReenterEdit_Impl::~PasswordReenterEdit_Impl()
-{
-}
-
-
-void PasswordReenterEdit_Impl::Paint( const Rectangle& rRect )
-{
-    if (GetText().isEmpty())
-    {
-        Push( PUSH_TEXTCOLOR );
-        SetTextColor( Color( COL_GRAY ) );
-        DrawText( Point(), m_aDefaultTxt );
-
-        Pop();
-    }
-    else
-        Edit::Paint( rRect );
-}
-
-
-
-
 struct PasswordToOpenModifyDialog_Impl
 {
     PasswordToOpenModifyDialog *    m_pParent;
 
-    FixedLine                   m_aFileEncryptionFL;
-    FixedText                   m_aPasswdToOpenFT;
-    Edit                        m_aPasswdToOpenED;
-    FixedText                   m_aReenterPasswdToOpenFT;
-    PasswordReenterEdit_Impl    m_aReenterPasswdToOpenED;
-    FixedText                   m_aPasswdNoteFT;
-    FixedLine                   m_aButtonsFL;
-    MoreButton                  m_aMoreFewerOptionsBTN;
-    OKButton                    m_aOk;
-    CancelButton                m_aCancel;
-    FixedLine                   m_aFileSharingOptionsFL;
-    CheckBox                    m_aOpenReadonlyCB;
-    FixedText                   m_aPasswdToModifyFT;
-    Edit                        m_aPasswdToModifyED;
-    FixedText                   m_aReenterPasswdToModifyFT;
-    PasswordReenterEdit_Impl    m_aReenterPasswdToModifyED;
+    Edit*                       m_pPasswdToOpenED;
+    Edit*                       m_pReenterPasswdToOpenED;
+    VclExpander*                m_pOptionsExpander;
+    OKButton*                   m_pOk;
+    CheckBox*                   m_pOpenReadonlyCB;
+    Edit*                       m_pPasswdToModifyED;
+    Edit*                       m_pReenterPasswdToModifyED;
 
     OUString                    m_aOneMismatch;
     OUString                    m_aTwoMismatch;
@@ -112,70 +54,52 @@ struct PasswordToOpenModifyDialog_Impl
 
     PasswordToOpenModifyDialog_Impl( PasswordToOpenModifyDialog * pParent,
             sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify );
-    ~PasswordToOpenModifyDialog_Impl();
 };
 
-
 PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl(
         PasswordToOpenModifyDialog * pParent,
         sal_uInt16 nMinPasswdLen,
         sal_uInt16 nMaxPasswdLen,
-        bool bIsPasswordToModify ) :
-    m_pParent( pParent ),
-    m_aFileEncryptionFL         ( pParent, CUI_RES( FL_FILE_ENCRYPTION ) ),
-    m_aPasswdToOpenFT           ( pParent, CUI_RES( FT_PASSWD_TO_OPEN ) ),
-    m_aPasswdToOpenED           ( pParent, CUI_RES( ED_PASSWD_TO_OPEN ) ),
-    m_aReenterPasswdToOpenFT    ( pParent, CUI_RES( FT_REENTER_PASSWD_TO_OPEN ) ),
-    m_aReenterPasswdToOpenED    ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_OPEN ) ),
-    m_aPasswdNoteFT             ( pParent, CUI_RES( FT_PASSWD_NOTE ) ),
-    m_aButtonsFL                ( pParent, CUI_RES( FL_BUTTONS ) ),
-    m_aMoreFewerOptionsBTN      ( pParent, CUI_RES( BTN_MORE_FEWER_OPTIONS ) ),
-    m_aOk                       ( pParent, CUI_RES( BTN_OK ) ),
-    m_aCancel                   ( pParent, CUI_RES( BTN_CANCEL ) ),
-    m_aFileSharingOptionsFL     ( pParent, CUI_RES( FL_FILE_SHARING_OPTIONS ) ),
-    m_aOpenReadonlyCB           ( pParent, CUI_RES( CB_OPEN_READONLY ) ),
-    m_aPasswdToModifyFT         ( pParent, CUI_RES( FT_PASSWD_TO_MODIFY ) ),
-    m_aPasswdToModifyED         ( pParent, CUI_RES( ED_PASSWD_TO_MODIFY ) ),
-    m_aReenterPasswdToModifyFT  ( pParent, CUI_RES( FT_REENTER_PASSWD_TO_MODIFY ) ),
-    m_aReenterPasswdToModifyED  ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_MODIFY ) ),
-    m_aOneMismatch( CUI_RES( STR_ONE_PASSWORD_MISMATCH ) ),
-    m_aTwoMismatch( CUI_RES( STR_TWO_PASSWORDS_MISMATCH ) ),
-    m_aInvalidStateForOkButton( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON ) ),
-    m_aInvalidStateForOkButton_v2( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON_V2 ) ),
-    m_bIsPasswordToModify( bIsPasswordToModify )
+        bool bIsPasswordToModify )
+    : m_pParent( pParent )
+    , m_aOneMismatch( CUI_RES( RID_SVXSTR_ONE_PASSWORD_MISMATCH ) )
+    , m_aTwoMismatch( CUI_RES( RID_SVXSTR_TWO_PASSWORDS_MISMATCH ) )
+    , m_aInvalidStateForOkButton( CUI_RES( RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON ) )
+    , m_aInvalidStateForOkButton_v2( CUI_RES( RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON_V2 ) )
+    , m_bIsPasswordToModify( bIsPasswordToModify )
 {
-    m_aMoreFewerOptionsBTN.SetMoreText( CUI_RES( STR_MORE_OPTIONS ) );
-    m_aMoreFewerOptionsBTN.SetLessText( CUI_RES( STR_FEWER_OPTIONS ) );
+    pParent->get(m_pPasswdToOpenED, "newpassEntry");
+    pParent->get(m_pReenterPasswdToOpenED, "confirmpassEntry");
+    pParent->get(m_pOk, "ok");
+    pParent->get(m_pOpenReadonlyCB, "readonly");
+    pParent->get(m_pPasswdToModifyED, "newpassroEntry");
+    pParent->get(m_pReenterPasswdToModifyED, "confirmropassEntry");
+    pParent->get(m_pOptionsExpander, "expander");
 
-    m_aOk.SetClickHdl( LINK( this, PasswordToOpenModifyDialog_Impl, OkBtnClickHdl ) );
+    m_pOk->SetClickHdl( LINK( this, PasswordToOpenModifyDialog_Impl, OkBtnClickHdl ) );
 
     if (nMaxPasswdLen)
     {
-        m_aPasswdToOpenED.SetMaxTextLen( nMaxPasswdLen );
-        m_aReenterPasswdToOpenED.SetMaxTextLen( nMaxPasswdLen );
-        m_aPasswdToModifyED.SetMaxTextLen( nMaxPasswdLen );
-        m_aReenterPasswdToModifyED.SetMaxTextLen( nMaxPasswdLen );
+        m_pPasswdToOpenED->SetMaxTextLen( nMaxPasswdLen );
+        m_pReenterPasswdToOpenED->SetMaxTextLen( nMaxPasswdLen );
+        m_pPasswdToModifyED->SetMaxTextLen( nMaxPasswdLen );
+        m_pReenterPasswdToModifyED->SetMaxTextLen( nMaxPasswdLen );
     }
 
     (void) nMinPasswdLen;   // currently not supported
 
-    m_aPasswdToOpenED.GrabFocus();
+    m_pPasswdToOpenED->GrabFocus();
 
-    m_aMoreFewerOptionsBTN.Enable( bIsPasswordToModify );
+    m_pOptionsExpander->Enable(bIsPasswordToModify);
     if (!bIsPasswordToModify)
-        m_aMoreFewerOptionsBTN.Hide();
-}
-
-
-PasswordToOpenModifyDialog_Impl::~PasswordToOpenModifyDialog_Impl()
-{
+        m_pOptionsExpander->Hide();
 }
 
 IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG /*pBtn*/ )
 {
-    bool bInvalidState = !m_aOpenReadonlyCB.IsChecked() &&
-            m_aPasswdToOpenED.GetText().isEmpty() &&
-            m_aPasswdToModifyED.GetText().isEmpty();
+    bool bInvalidState = !m_pOpenReadonlyCB->IsChecked() &&
+            m_pPasswdToOpenED->GetText().isEmpty() &&
+            m_pPasswdToModifyED->GetText().isEmpty();
     if (bInvalidState)
     {
         ErrorBox aErrorBox( m_pParent, WB_OK,
@@ -184,30 +108,30 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG
     }
     else // check for mismatched passwords...
     {
-        const bool bToOpenMatch     = m_aPasswdToOpenED.GetText()   == m_aReenterPasswdToOpenED.GetText();
-        const bool bToModifyMatch   = m_aPasswdToModifyED.GetText() == m_aReenterPasswdToModifyED.GetText();
+        const bool bToOpenMatch     = m_pPasswdToOpenED->GetText()   == m_pReenterPasswdToOpenED->GetText();
+        const bool bToModifyMatch   = m_pPasswdToModifyED->GetText() == m_pReenterPasswdToModifyED->GetText();
         const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1);
         if (nMismatch > 0)
         {
             ErrorBox aErrorBox( m_pParent, WB_OK, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch );
             aErrorBox.Execute();
 
-            Edit &rEdit = !bToOpenMatch? m_aPasswdToOpenED : m_aPasswdToModifyED;
-            PasswordReenterEdit_Impl &rRepeatEdit = !bToOpenMatch? m_aReenterPasswdToOpenED : m_aReenterPasswdToModifyED;
+            Edit* pEdit = !bToOpenMatch ? m_pPasswdToOpenED : m_pPasswdToModifyED;
+            Edit* pRepeatEdit = !bToOpenMatch? m_pReenterPasswdToOpenED : m_pReenterPasswdToModifyED;
             OUString aEmpty;
             if (nMismatch == 1)
             {
-                rEdit.SetText( aEmpty );
-                rRepeatEdit.SetText( aEmpty );
+                pEdit->SetText( aEmpty );
+                pRepeatEdit->SetText( aEmpty );
             }
             else if (nMismatch == 2)
             {
-                m_aPasswdToOpenED.SetText( aEmpty );
-                m_aReenterPasswdToOpenED.SetText( aEmpty );
-                m_aPasswdToModifyED.SetText( aEmpty );
-                m_aReenterPasswdToModifyED.SetText( aEmpty );
+                m_pPasswdToOpenED->SetText( aEmpty );
+                m_pReenterPasswdToOpenED->SetText( aEmpty );
+                m_pPasswdToModifyED->SetText( aEmpty );
+                m_pReenterPasswdToModifyED->SetText( aEmpty );
             }
-            rEdit.GrabFocus();
+            pEdit->GrabFocus();
         }
         else
         {
@@ -218,20 +142,13 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG
     return 0;
 }
 
-
-
-
 PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(
-        Window * pParent,
-        sal_uInt16 nMinPasswdLen,
-        sal_uInt16 nMaxPasswdLen,
-        bool bIsPasswordToModify ) :
-    SfxModalDialog( pParent, CUI_RES( RID_DLG_PASSWORD_TO_OPEN_MODIFY ) )
+    Window * pParent, sal_uInt16 nMinPasswdLen,
+    sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify)
+    : SfxModalDialog( pParent, "PasswordDialog", "cui/ui/password.ui" )
 {
-    m_pImpl.reset(
-            new PasswordToOpenModifyDialog_Impl( this, nMinPasswdLen, nMaxPasswdLen, bIsPasswordToModify ) );
-
-    FreeResource();
+    m_pImpl.reset(new PasswordToOpenModifyDialog_Impl(this,
+        nMinPasswdLen, nMaxPasswdLen, bIsPasswordToModify ) );
 }
 
 
@@ -243,24 +160,24 @@ PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog()
 OUString PasswordToOpenModifyDialog::GetPasswordToOpen() const
 {
     const bool bPasswdOk =
-            !m_pImpl->m_aPasswdToOpenED.GetText().isEmpty() &&
-            m_pImpl->m_aPasswdToOpenED.GetText() == m_pImpl->m_aReenterPasswdToOpenED.GetText();
-    return bPasswdOk ? m_pImpl->m_aPasswdToOpenED.GetText() : OUString();
+            !m_pImpl->m_pPasswdToOpenED->GetText().isEmpty() &&
+            m_pImpl->m_pPasswdToOpenED->GetText() == m_pImpl->m_pReenterPasswdToOpenED->GetText();
+    return bPasswdOk ? m_pImpl->m_pPasswdToOpenED->GetText() : OUString();
 }
 
 
 OUString PasswordToOpenModifyDialog::GetPasswordToModify() const
 {
     const bool bPasswdOk =
-            !m_pImpl->m_aPasswdToModifyED.GetText().isEmpty() &&
-            m_pImpl->m_aPasswdToModifyED.GetText() == m_pImpl->m_aReenterPasswdToModifyED.GetText();
-    return bPasswdOk ? m_pImpl->m_aPasswdToModifyED.GetText() : OUString();
+            !m_pImpl->m_pPasswdToModifyED->GetText().isEmpty() &&
+            m_pImpl->m_pPasswdToModifyED->GetText() == m_pImpl->m_pReenterPasswdToModifyED->GetText();
+    return bPasswdOk ? m_pImpl->m_pPasswdToModifyED->GetText() : OUString();
 }
 
 
 bool PasswordToOpenModifyDialog::IsRecommendToOpenReadonly() const
 {
-    return m_pImpl->m_aOpenReadonlyCB.IsChecked();
+    return m_pImpl->m_pOpenReadonlyCB->IsChecked();
 }
 
 
diff --git a/cui/source/dialogs/passwdomdlg.hrc b/cui/source/dialogs/passwdomdlg.hrc
deleted file mode 100644
index 5c54fa1..0000000
--- a/cui/source/dialogs/passwdomdlg.hrc
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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 .
- */
-
-#ifndef _CUI_PASSWDOMDLG_HRC_
-#define _CUI_PASSWDOMDLG_HRC_
-
-#define FL_FILE_ENCRYPTION              10
-#define FT_PASSWD_TO_OPEN               11
-#define ED_PASSWD_TO_OPEN               12
-#define FT_REENTER_PASSWD_TO_OPEN       13
-#define ED_REENTER_PASSWD_TO_OPEN       14
-#define FT_PASSWD_NOTE                  17
-#define FL_BUTTONS                      18
-#define BTN_MORE_FEWER_OPTIONS          19
-#define BTN_OK                          20
-#define BTN_CANCEL                      21
-#define FL_FILE_SHARING_OPTIONS         22
-#define FT_PASSWD_TO_MODIFY             23
-#define ED_PASSWD_TO_MODIFY             24
-#define FT_REENTER_PASSWD_TO_MODIFY     25
-#define ED_REENTER_PASSWD_TO_MODIFY     26
-#define CB_OPEN_READONLY                29
-
-#define STR_MORE_OPTIONS                    51
-#define STR_FEWER_OPTIONS                   52
-#define STR_PASSWD_MUST_BE_CONFIRMED        53
-#define STR_ONE_PASSWORD_MISMATCH           54
-#define STR_TWO_PASSWORDS_MISMATCH          55
-#define STR_INVALID_STATE_FOR_OK_BUTTON     56
-#define STR_INVALID_STATE_FOR_OK_BUTTON_V2  57
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/passwdomdlg.src b/cui/source/dialogs/passwdomdlg.src
index 8de7bc1..8ea1c09 100644
--- a/cui/source/dialogs/passwdomdlg.src
+++ b/cui/source/dialogs/passwdomdlg.src
@@ -17,187 +17,32 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include <cuires.hrc>
-#include "passwdomdlg.hrc"
-#include "helpid.hrc"
-
 
-ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY
+String RID_SVXSTR_PASSWD_MUST_BE_CONFIRMED
 {
-    Size = MAP_APPFONT( 171, 150 );
-    Text [ en-US ] = "Set Password";
-    HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY;
-    Border = TRUE ;
-    Moveable = TRUE ;
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-
-    FixedLine FL_FILE_ENCRYPTION
-    {
-        Pos = MAP_APPFONT( 3, 3 );
-        Size = MAP_APPFONT( 165, 8 );
-        Text [ en-US ] = "File encryption password";
-    };
-
-    FixedText FT_PASSWD_TO_OPEN
-    {
-        Pos = MAP_APPFONT( 6, 17 );
-        Size = MAP_APPFONT( 159, 8 );
-        Text [ en-US ] = "~Enter password to open";
-        WordBreak = TRUE;
-    };
-
-    Edit ED_PASSWD_TO_OPEN
-    {
-        HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN;
-        Pos = MAP_APPFONT( 6, 28 );
-        Size = MAP_APPFONT( 159, 12 );
-        Border = TRUE ;
-        PassWord = TRUE ;
-    };
-
-    FixedText FT_REENTER_PASSWD_TO_OPEN
-    {
-        Pos = MAP_APPFONT( 6, 45 );
-        Size = MAP_APPFONT( 159, 8 );
-        Text [ en-US ] = "Confirm password";
-        WordBreak = TRUE;
-    };
-
-    Edit ED_REENTER_PASSWD_TO_OPEN
-    {
-        HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN;
-        Pos = MAP_APPFONT( 6, 56 );
-        Size = MAP_APPFONT( 159, 12 );
-        Border = TRUE ;
-        PassWord = TRUE ;
-    };
-
-    FixedText FT_PASSWD_NOTE
-    {
-        Pos = MAP_APPFONT( 6, 80 );
-        Size = MAP_APPFONT( 159, 4*8 );     // some extra space for translation in other languages
-        Text [ en-US ] = "Note: After a password has been set, the document will only open with "\
-                "the password. Should you lose the password, there will be no way to "\
-                "recover the document. Please also note that this password is case-sensitive.";
-        WordBreak = TRUE;
-    };
-
-    FixedLine FL_BUTTONS
-    {
-        Pos = MAP_APPFONT( 0, 117 );
-        Size = MAP_APPFONT( 171, 8 );
-    };
-
-    MoreButton BTN_MORE_FEWER_OPTIONS
-    {
-        HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE;
-        Pos = MAP_APPFONT( 6 , 130 ) ;
-        Size = MAP_APPFONT( 50 , 14 ) ;
-        Delta = 92 ;
-        MapUnit = MAP_APPFONT ;
-        State = FALSE ;
-    };
-
-    OKButton BTN_OK
-    {
-        Pos = MAP_APPFONT( 62, 130 );
-        Size = MAP_APPFONT( 50, 14 );
-        DefButton = TRUE ;
-    };
-
-    CancelButton BTN_CANCEL
-    {
-        Pos = MAP_APPFONT( 115, 130 );
-        Size = MAP_APPFONT( 50, 14 );
-    };
-
-    FixedLine FL_FILE_SHARING_OPTIONS
-    {
-        Pos = MAP_APPFONT( 3, 154 );
-        Size = MAP_APPFONT( 165, 8 );
-        Text [ en-US ] = "File sharing password";
-    };
-
-    CheckBox CB_OPEN_READONLY
-    {
-        HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY;
-        Pos = MAP_APPFONT( 6, 170 );
-        Size = MAP_APPFONT( 159, 8 );
-
-        Text [ en-US ] = "Open file read-only";
-    };
-
-    FixedText FT_PASSWD_TO_MODIFY
-    {
-        Pos = MAP_APPFONT( 6, 186 );
-        Size = MAP_APPFONT( 159, 8 );
-        Text [ en-US ] = "Enter password to allow editing";
-        WordBreak = TRUE;
-    };
-
-    Edit ED_PASSWD_TO_MODIFY
-    {
-        HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY;
-        Pos = MAP_APPFONT( 6, 196 );
-        Size = MAP_APPFONT( 159, 12 );
-        Border = TRUE ;
-        PassWord = TRUE ;
-    };
-
-    FixedText FT_REENTER_PASSWD_TO_MODIFY
-    {
-        Pos = MAP_APPFONT( 6, 214 );
-        Size = MAP_APPFONT( 159, 8 );
-        Text [ en-US ] = "Confirm password";
-        WordBreak = TRUE;
-    };
-
-    Edit ED_REENTER_PASSWD_TO_MODIFY
-    {
-        HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY;
-        Pos = MAP_APPFONT( 6, 224 );
-        Size = MAP_APPFONT( 159, 12 );
-        Border = TRUE ;
-        PassWord = TRUE ;
-    };
-
-    String STR_PASSWD_MUST_BE_CONFIRMED
-    {
-        Text [ en-US ] = "Password must be confirmed" ;
-    };
-
-    String STR_MORE_OPTIONS
-    {
-        Text [ en-US ] = "More ~Options" ;
-    };
-
-    String STR_FEWER_OPTIONS
-    {
-        Text [ en-US ] = "Fewer ~Options" ;
-    };
+    Text [ en-US ] = "Password must be confirmed" ;
+};
 
-    String STR_ONE_PASSWORD_MISMATCH
-    {
-        Text [ en-US ] = "The confirmation password did not match the password. Set the password again by entering the same password in both boxes." ;
-    };
+String RID_SVXSTR_ONE_PASSWORD_MISMATCH
+{
+    Text [ en-US ] = "The confirmation password did not match the password. Set the password again by entering the same password in both boxes." ;
+};
 
-    String STR_TWO_PASSWORDS_MISMATCH
-    {
-        Text [ en-US ] = "The confirmation passwords did not match the original passwords. Set the passwords again." ;
-    };
+String RID_SVXSTR_TWO_PASSWORDS_MISMATCH
+{
+    Text [ en-US ] = "The confirmation passwords did not match the original passwords. Set the passwords again." ;
+};
 
-    String STR_INVALID_STATE_FOR_OK_BUTTON
-    {
-        Text [ en-US ] = "Please enter a password to open or to modify, or check the open read-only option to continue." ;
-    };
+String RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON
+{
+    Text [ en-US ] = "Please enter a password to open or to modify, or check the open read-only option to continue." ;
+};
 
-    // this missing string was detected late - so for 3.4 we just add an english string
-    String STR_INVALID_STATE_FOR_OK_BUTTON_V2
-    {
-        Text = "Set the password by entering the same password in both boxes." ;
-    };
+// this missing string was detected late - so for 3.4 we just add an english string
+String RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON_V2
+{
+    Text = "Set the password by entering the same password in both boxes." ;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 3d598e2..5397c4f 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -225,9 +225,6 @@
 #define RID_SVXSTR_ARCHIVE_HEADLINE         (RID_SVX_START + 485)
 #define RID_SVXSTR_MULTIFILE_DBL_ERR        (RID_SVX_START + 486)
 
-// password to open/modify dialog
-#define RID_DLG_PASSWORD_TO_OPEN_MODIFY     (RID_SVX_START + 500)
-
 // multi path dialog
 #define RID_SVXDLG_MULTIPATH                (RID_SVX_START + 201)
 #define RID_MULTIPATH_DBL_ERR               (RID_SVX_START + 207)
@@ -441,6 +438,12 @@
 #define RID_SVXSTR_THES                                     (RID_SVX_START + 1255)
 #define RID_SVXSTR_GRAMMAR                                  (RID_SVX_START + 1256)
 
+#define RID_SVXSTR_PASSWD_MUST_BE_CONFIRMED                 (RID_SVX_START + 1257)
+#define RID_SVXSTR_ONE_PASSWORD_MISMATCH                    (RID_SVX_START + 1258)
+#define RID_SVXSTR_TWO_PASSWORDS_MISMATCH                   (RID_SVX_START + 1259)
+#define RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON              (RID_SVX_START + 1260)
+#define RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON_V2           (RID_SVX_START + 1261)
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 0180f13..ac0ff86 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -224,13 +224,6 @@
 #define HID_LINKDLG_TABLB "CUI_HID_LINKDLG_TABLB"
 #define HID_MACRO_HEADERTABLISTBOX "CUI_HID_MACRO_HEADERTABLISTBOX"
 
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY                             "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN            "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN    "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE                        "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY               "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY          "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY  "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY"
 #define HID_HYPERLINK_DIALOG                                        "CUI_HID_HYPERLINK_DIALOG"
 #define HID_DLG_CERTPATH					    "CUI_HID_DLG_CERTPATH"
 
diff --git a/cui/uiconfig/ui/password.ui b/cui/uiconfig/ui/password.ui
new file mode 100644
index 0000000..e59220c
--- /dev/null
+++ b/cui/uiconfig/ui/password.ui
@@ -0,0 +1,329 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <object class="GtkDialog" id="PasswordDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Set Password</property>
+    <property name="type_hint">normal</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">12</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="ok">
+                <property name="label">gtk-ok</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="cancel">
+                <property name="label">gtk-cancel</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>
+          </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="hexpand">True</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkGrid" id="grid1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                        <property name="row_spacing">6</property>
+                        <property name="column_spacing">12</property>
+                        <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">Confirm password</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">confirmpassEntry</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="GtkLabel" id="label4">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Enter password to open</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">newpassEntry</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="GtkEntry" id="newpassEntry">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="visibility">False</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="GtkEntry" id="confirmpassEntry">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="visibility">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>
+                        <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">Note: After a password has been set, the document will only open with the password. Should you lose the password, there will be no way to recover the document. Please also note that this password is case-sensitive.</property>
+                            <property name="wrap">True</property>
+                            <property name="max_width_chars">60</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">4</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkExpander" id="expander">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <child>
+                              <object class="GtkFrame" id="frame1">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="margin_top">12</property>
+                                <property name="label_xalign">0</property>
+                                <property name="shadow_type">none</property>
+                                <child>
+                                  <object class="GtkAlignment" id="alignment1">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="top_padding">6</property>
+                                    <property name="left_padding">12</property>
+                                    <child>
+                                      <object class="GtkGrid" id="grid3">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="row_spacing">6</property>
+                                        <child>
+                                          <object class="GtkCheckButton" id="readonly">
+                                            <property name="label" translatable="yes">Open file read-only</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="draw_indicator">True</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="label7">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">Enter password to allow editing</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="mnemonic_widget">newpassroEntry</property>
+                                            <property name="ellipsize">middle</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="GtkEntry" id="newpassroEntry">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="hexpand">True</property>
+                                            <property name="visibility">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="GtkLabel" id="label8">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">Confirm password</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="mnemonic_widget">confirmropassEntry</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>
+                                        <child>
+                                          <object class="GtkEntry" id="confirmropassEntry">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="hexpand">True</property>
+                                            <property name="visibility">False</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">0</property>
+                                            <property name="top_attach">4</property>
+                                            <property name="width">1</property>
+                                            <property name="height">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child type="label">
+                                  <object class="GtkLabel" id="label6">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">File sharing password</property>
+                                    <attributes>
+                                      <attribute name="weight" value="bold"/>
+                                    </attributes>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label">
+                              <object class="GtkLabel" id="label3">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">_Options</property>
+                                <property name="use_underline">True</property>
+                                <property name="ellipsize">middle</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">5</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">File encryption password</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</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">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup1"/>
+</interface>
commit ca789f8ea47e20788f577f74b70b9e110aad8158
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:47:17 2014 +0000

    coverity#1190356 Dereference null return value
    
    Change-Id: I9a857423cd190b2da9f535e8897a9c9baba40b73

diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 2a1a348..e49e0c3 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -814,11 +814,21 @@ void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, bool bI
 {
     DBG_ASSERT(i < SVX_MAX_NUM, "Wrong Level" );
 
-    if( (i < SVX_MAX_NUM) && (!aFmtsSet[i] || !(rNumFmt == *Get( i ))) )
+    if( (i < SVX_MAX_NUM) )
     {
-        delete aFmts[ i ];
-        aFmts[ i ] = new SvxNumberFormat( rNumFmt );
-        aFmtsSet[i] = bIsValid;
+        bool bReplace = !aFmtsSet[i];
+        if (!bReplace)
+        {
+            const SvxNumberFormat *pFmt = Get(i);
+            bReplace = pFmt ? rNumFmt != *pFmt : true;
+        }
+
+        if (bReplace)
+        {
+            delete aFmts[i];
+            aFmts[i] = new SvxNumberFormat(rNumFmt);
+            aFmtsSet[i] = bIsValid;
+        }
     }
 }
 
commit cfb2d0fe2f38d112e901c20e6ac8e04cdfde08aa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:39:54 2014 +0000

    coverity#1190351 Missing break in switch
    
    it's been like this since the initial checkin
    of 2000, so I got to assume it's intentional
    
    Change-Id: Ifc1300c193f2ddbc3f9ab978464199432430fd8b

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 5d0aede..38db766 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1036,7 +1036,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
                 else if ( GetPrevLink() )
                     SwFlyFrm::UnchainFrames( GetPrevLink(), this );
             }
-
+            //fall-through
         default:
             bClear = false;
     }
commit cd5acc5fc21e7b32f634665a1f4324abe58dc3a4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:32:28 2014 +0000

    coverity#735429 Dead default in switch
    
    Change-Id: I18d497f1e8dc339bd1ac7154a5ca9bb59895c52e

diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index f759592..cdc30bc 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5078,8 +5078,6 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
                             nTextBottom = nOldTextLeft;
                         }
                         break;
-                    default:
-                        break;
                 }
             }
 
commit f0622f3848a4c3dbbcf0b61eb2ea5748f604ce99
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:29:11 2014 +0000

    coverity#738782 Uninitialized scalar field
    
    Change-Id: Ie34b70887827ad9f38ae7e0d732471c6051ba4d7

diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index c63728a..2620e5f 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -129,7 +129,6 @@ namespace rptui
         svtools::ColorConfig                    m_aColorConfig;
         OReportWindow*                          m_pParent;
         OUString                         m_sShapeType;
-        sal_Bool                                m_bInSplitHandler;
         sal_Bool                                m_bInUnmark;
 
         void ImplInitSettings();
commit 26c805f555d286753f198320029cbc2759a6b9aa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:28:32 2014 +0000

    coverity#738778 Uninitialized scalar field
    
    Change-Id: Ie5e07148fcffdc5e603b681fad32e61bc2614b9c

diff --git a/padmin/source/cmddlg.cxx b/padmin/source/cmddlg.cxx
index 8f8b306..1190b09 100644
--- a/padmin/source/cmddlg.cxx
+++ b/padmin/source/cmddlg.cxx
@@ -232,7 +232,8 @@ RTSCommandPage::RTSCommandPage( RTSDialog* pParent ) :
         m_aRemovePB( this, PaResId( RID_RTS_CMD_BTN_REMOVE ) ),
         m_aFaxHelp( PaResId( RID_RTS_CMD_STR_FAXHELP ) ),
         m_aPrinterHelp( PaResId( RID_RTS_CMD_STR_PRINTERHELP ) ),
-        m_aPdfHelp( PaResId( RID_RTS_CMD_STR_PDFHELP ) )
+        m_aPdfHelp( PaResId( RID_RTS_CMD_STR_PDFHELP ) ),
+        m_bWasExternalDialog(false)
 {
     // configuring as printer is only sensible in default print system
     PrinterInfoManager& rMgr( PrinterInfoManager::get() );
commit 5534c989374f743e49e48e8c998397172e10ecfb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:27:24 2014 +0000

    coverity#738681 Uninitialized scalar field
    
    Change-Id: I50d39ae4ae5795031833d73d8f46add0129fe72f

diff --git a/lotuswordpro/source/filter/benname.cxx b/lotuswordpro/source/filter/benname.cxx
index 234b4f0..24806ad 100644
--- a/lotuswordpro/source/filter/benname.cxx
+++ b/lotuswordpro/source/filter/benname.cxx
@@ -59,9 +59,11 @@ namespace OpenStormBento
 // changed to remove warning
 CBenNamedObject::CBenNamedObject(pLtcBenContainer pContainer,
   BenObjectID ObjectID, pCBenObject pPrevObject, const char * sName,
-  pCBenNamedObjectListElmt pPrevNamedObjectListElmt) :
-  CBenObject(pContainer, ObjectID, pPrevObject), csName(sName),
-  cNameListElmt( pPrevNamedObjectListElmt)
+  pCBenNamedObjectListElmt pPrevNamedObjectListElmt)
+    : CBenObject(pContainer, ObjectID, pPrevObject)
+    , csName(sName)
+    , cNameListElmt(pPrevNamedObjectListElmt)
+    , cPos(0)
 {
     cNameListElmt.SetNamedObject(this);
 }
commit 302410ec47f206793a0fc31752412e7bf460804a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:26:20 2014 +0000

    coverity#738680 Uninitialized scalar field
    
    Change-Id: I0db24150f143c3b5f6459b518d0fc9649fe8a786

diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index f6a414e..1033f67 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -164,6 +164,7 @@ LtcBenContainer::FindNextObjectWithProperty(pCBenObject pCurrObject,
 *   @return
 */
 LtcBenContainer::LtcBenContainer(LwpSvStream * pStream)
+    : cNextAvailObjectID(0)
 {
     cpStream = pStream;
     pStream->Seek(STREAM_SEEK_TO_END);
commit 2790ad95964173b30e70c67a766683c058ce8adb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:25:21 2014 +0000

    coverity#738679 Uninitialized scalar field
    
    Change-Id: Idfec68c208403db08cee7b1b6930b336e532055b

diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index 5e028d2..72bbf74 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
@@ -274,7 +274,6 @@ void SAL_CALL LotusWordProImportFilter::cancel(  )
 void SAL_CALL LotusWordProImportFilter::setTargetDocument( const uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
     throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException, std::exception)
 {
-    meType = FILTER_IMPORT;
     mxDoc = xDoc;
 }
 
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.hxx b/lotuswordpro/source/filter/LotusWordProImportFilter.hxx
index 9e01414..b0f23e2 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.hxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.hxx
@@ -29,11 +29,6 @@
 #include <cppuhelper/implbase5.hxx>
 #include <rtl/ustrbuf.hxx>
 
-enum FilterType
-{
-    FILTER_IMPORT,
-    FILTER_EXPORT
-};
 /* This component will be instantiated for both import or export. Whether it calls
  * setSourceDocument or setTargetDocument determines which Impl function the filter
  * member calls */
@@ -55,14 +50,14 @@ protected:
     OUString msFilterName;
     ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
 
-    FilterType meType;
-
     sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
         throw (::com::sun::star::uno::RuntimeException);
 
 public:
     LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
-        : mxContext( rxContext ) {}
+        : mxContext( rxContext )
+    {
+    }
     virtual ~LotusWordProImportFilter() {}
 
     // XFilter
commit 5d4f20a09ff53cbd0cbadbcc063eee5b576d7339
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:22:22 2014 +0000

    coverity#708726 Uninitialized scalar field
    
    Change-Id: Idaa6cfffe33d4ab9451e322fcdbdbf5ad0e7629b

diff --git a/include/xmlreader/xmlreader.hxx b/include/xmlreader/xmlreader.hxx
index 4ffc84e..716c6c7 100644
--- a/include/xmlreader/xmlreader.hxx
+++ b/include/xmlreader/xmlreader.hxx
@@ -84,7 +84,8 @@ private:
         Span prefix;
         int nsId;
 
-        NamespaceData() {}
+        NamespaceData():
+            nsId(-1) {}
 
         NamespaceData(Span const & thePrefix, int theNsId):
             prefix(thePrefix), nsId(theNsId) {}
commit 8b6926b93979bba26407d839cebdd2c9f770c83b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:20:48 2014 +0000

    coverity#708679 Uninitialized scalar field
    
    Change-Id: I198f9a163730edcd18f7359a4dd99f0d61911214

diff --git a/writerfilter/source/dmapper/SectionColumnHandler.cxx b/writerfilter/source/dmapper/SectionColumnHandler.cxx
index fce0b16..ddb5b0b 100644
--- a/writerfilter/source/dmapper/SectionColumnHandler.cxx
+++ b/writerfilter/source/dmapper/SectionColumnHandler.cxx
@@ -29,13 +29,14 @@ namespace dmapper {
 using namespace ::com::sun::star;
 
 
-SectionColumnHandler::SectionColumnHandler() :
-LoggedProperties(dmapper_logger, "SectionColumnHandler"),
-bEqualWidth( false ),
-nSpace( 0 ),
-nNum( 0 ),
-bSep( false )
+SectionColumnHandler::SectionColumnHandler()
+    : LoggedProperties(dmapper_logger, "SectionColumnHandler")
+    , bEqualWidth(false)
+    , nSpace(0)
+    , nNum(0)
+    , bSep(false)
 {
+    aTempColumn.nWidth = aTempColumn.nSpace = 0;
 }
 
 SectionColumnHandler::~SectionColumnHandler()
commit 276df883e4ead7468b6cd6ed439c16c992789909
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:17:57 2014 +0000

    coverity#708678 Uninitialized scalar field
    
    Change-Id: I28c383f47697cce3306a2f8b4ed5d866edd32686

diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 384ada9..856fbeb 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -698,11 +698,12 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
 
 
 ListsManager::ListsManager(DomainMapper& rDMapper,
-                           const uno::Reference< lang::XMultiServiceFactory > xFactory) :
-LoggedProperties(dmapper_logger, "ListsManager"),
-LoggedTable(dmapper_logger, "ListsManager"),
-m_rDMapper( rDMapper ),
-m_xFactory( xFactory )
+    const uno::Reference< lang::XMultiServiceFactory > xFactory)
+    : LoggedProperties(dmapper_logger, "ListsManager")
+    , LoggedTable(dmapper_logger, "ListsManager")
+    , m_rDMapper(rDMapper)
+    , m_xFactory(xFactory)
+    , m_bIsLFOImport(false)
 {
 }
 
commit 30406c6e64837553d650cd5b78fa7165d73c1ba4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:14:30 2014 +0000

    coverity#708676 Uninitialized scalar field
    
    Change-Id: Ia335de7960984f9700cb5a69f20b3c7773d1176c

diff --git a/writerfilter/inc/resourcemodel/OutputWithDepth.hxx b/writerfilter/inc/resourcemodel/OutputWithDepth.hxx
index 9188c1b..6899de4 100644
--- a/writerfilter/inc/resourcemodel/OutputWithDepth.hxx
+++ b/writerfilter/inc/resourcemodel/OutputWithDepth.hxx
@@ -57,7 +57,10 @@ public:
 
 template <typename T>
 OutputWithDepth<T>::OutputWithDepth(const T & aOpenTag, const T & aEndTag)
-: mOpenTag(aOpenTag), mCloseTag(aEndTag)
+    : mnCurrentDepth(0)
+    , mnGroupDepth(0)
+    , mOpenTag(aOpenTag)
+    , mCloseTag(aEndTag)
 {
 }
 
commit 7994dafaa4978b29a2223b652c03face51c9efbd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:13:10 2014 +0000

    coverity#708652 Uninitialized scalar field
    
    Change-Id: Ideadc6cd30edeb993ca19fd28f97c8665c6bb4a6

diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx
index 9a12c97..3201d15 100644
--- a/vcl/unx/generic/app/i18n_xkb.cxx
+++ b/vcl/unx/generic/app/i18n_xkb.cxx
@@ -24,10 +24,13 @@
 #include "unx/i18n_xkb.hxx"
 
 SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
-    : mbUseExtension( true ),
-      mnDefaultGroup( 0 )
+    : mbUseExtension(true)
+    , mnDefaultGroup(0)
+    , mnGroup(0)
+    , mnEventBase(0)
+    , mnErrorBase(0)
+    , mpDisplay(pDisplay)
 {
-    mpDisplay = pDisplay;
 
     // allow user to set the default keyboard group idx or to disable the usage
     // of x keyboard extension at all:
commit f61c95381f623d560bed47d2a457c4737fe2a0f4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 13:10:57 2014 +0000

    coverity#708646 Uninitialized scalar field
    
    Change-Id: I16d70c8e8d7da22a98ec04fca6b88f3b51577fde

diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index 9ed1e45..a31ba0a 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -76,6 +76,8 @@ KeyCode::KeyCode( KeyFuncType eFunction )
 
 
 KeyCode::KeyCode( const ResId& rResId )
+    : nCode(0)
+    , eFunc(KEYFUNC_DONTKNOW)
 {
     rResId.SetRT( RSC_KEYCODE );
 
commit 92204f06b53846cd60055df1757a0b20cbe5eb6e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 12:18:29 2014 +0000

    coverity#708643 nOffsetY missing from copy ctor
    
    its normally always 0, so shrink the code based
    on that
    
    Change-Id: Ic9a4615f0ecb0713a00e4acd73485f99fd50a859

diff --git a/include/vcl/cursor.hxx b/include/vcl/cursor.hxx
index 42d741b..1030406 100644
--- a/include/vcl/cursor.hxx
+++ b/include/vcl/cursor.hxx
@@ -39,7 +39,6 @@ private:
     ImplCursorData* mpData;
     Window*         mpWindow;           // only for shadow cursor
     long            mnSlant;
-    long            mnOffsetY;          // Offset for rotation
     Size            maSize;
     Point           maPos;
     short           mnOrientation;
@@ -74,7 +73,6 @@ public:
 
     void            SetPos( const Point& rNewPos );
     const Point&    GetPos() const { return maPos; }
-    long            GetOffsetY() const { return mnOffsetY; }
 
     void            SetSize( const Size& rNewSize );
     const Size&     GetSize() const { return maSize; }
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 0ffcf5d..2e1c6fd 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -450,7 +450,7 @@ void AnnotationWindow::SetSizePixel( const Size& rNewSize )
 
 void AnnotationWindow::SetScrollbar()
 {
-    mpVScrollbar->SetThumbPos( mpOutlinerView->GetVisArea().Top()+ mpOutlinerView->GetEditView().GetCursor()->GetOffsetY());
+    mpVScrollbar->SetThumbPos(mpOutlinerView->GetVisArea().Top());
 }
 
 void AnnotationWindow::ResizeIfNecessary(long aOldHeight, long aNewHeight)
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index 503549e..14553ad 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -757,7 +757,7 @@ void SwSidebarWin::SetSizePixel( const Size& rNewSize )
 
 void SwSidebarWin::SetScrollbar()
 {
-    mpVScrollbar->SetThumbPos( mpOutlinerView->GetVisArea().Top()+ mpOutlinerView->GetEditView().GetCursor()->GetOffsetY());
+    mpVScrollbar->SetThumbPos(mpOutlinerView->GetVisArea().Top());
 }
 
 void SwSidebarWin::ResizeIfNecessary(long aOldHeight, long aNewHeight)
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 16bc80b..669b054 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -133,12 +133,9 @@ void Cursor::ImplDraw()
         mpData->mnPixSlant      = pWindow->LogicToPixel( Size( mnSlant, 0 ) ).Width();
         mpData->mnOrientation   = mnOrientation;
         mpData->mnDirection     = mnDirection;
-        long nOffsetY           = pWindow->LogicToPixel( Size( 0, mnOffsetY ) ).Height();
 
         // correct the position with the offset
-        mpData->maPixPos.Y() -= nOffsetY;
         mpData->maPixRotOff = mpData->maPixPos;
-        mpData->maPixRotOff.Y() += nOffsetY;
 
         // use width (as set in Settings) if size is 0,
         if ( !mpData->maPixSize.Width() )
@@ -278,7 +275,6 @@ Cursor::Cursor()
     mpData          = NULL;
     mpWindow        = NULL;
     mnSlant         = 0;
-    mnOffsetY       = 0;
     mnOrientation   = 0;
     mnDirection     = 0;
     mnStyle         = 0;
commit 11abf53b9ddec37df333632eb06e3e28d31ffec2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 12:13:57 2014 +0000

    coverity#708336 Uninitialized scalar field
    
    Change-Id: I9ccd8e1cf6fd06d7a6b7af57803f1e96e26b9963

diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index 1286851..1fc8fde 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -59,11 +59,14 @@ SvParser::SvParser( SvStream& rIn, sal_uInt8 nStackSize )
     , bTokenHasValue( false )
     , eState( SVPAR_NOTSTARTED )
     , eSrcEnc( RTL_TEXTENCODING_DONTKNOW )
-    , bDownloadingFile( sal_False )
+    , nNextChPos(0)
+    , bDownloadingFile(false)
+    , bUCS2BSrcEnc(false)
+    , bSwitchToUCS2(false)
+    , bRTF_InTextRead(false)
     , nTokenStackSize( nStackSize )
     , nTokenStackPos( 0 )
 {
-    bUCS2BSrcEnc = bSwitchToUCS2 = sal_False;
     eState = SVPAR_NOTSTARTED;
     if( nTokenStackSize < 3 )
         nTokenStackSize = 3;
commit a9531d2e534148c017d08ed29431cc79ca3569ee
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 12:09:02 2014 +0000

    coverity#982487 Unchecked dynamic_cast
    
    Change-Id: I011ab1fc6a4c69891c17c867fbe951c00811eac2

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 0d90941..a7c2d94 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1408,6 +1408,10 @@ namespace cmis
         try
         {
             libcmis::Document* document = dynamic_cast< libcmis::Document* >( getObject( xEnv ).get() );
+
+            if (!document)
+                return sal_False;
+
             boost::shared_ptr< istream > aIn = document->getContentStream( );
 
             uno::Reference< io::XInputStream > xIn = new ucbhelper::StdInputStream( aIn );
commit d60392fb5b387175dbd2e575848993c02c56922f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 12:05:24 2014 +0000

    coverity#706316 help out coverity re tortured logic
    
    Change-Id: I6d6a948fdac4442c69972316275349fe73b9e741

diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx
index 15cec42..4749a06 100644
--- a/connectivity/source/drivers/hsqldb/HView.cxx
+++ b/connectivity/source/drivers/hsqldb/HView.cxx
@@ -101,7 +101,7 @@ namespace connectivity { namespace hsqldb
         aRestoreCommand.appendAscii( "CREATE VIEW " );
         aRestoreCommand.append     ( sQualifiedName );
         aRestoreCommand.appendAscii( " AS " );
-        aRestoreCommand.append     ( impl_getCommand_throw( true ) );
+        aRestoreCommand.append     ( impl_getCommand_throw() );
         OUString sRestoreCommand( aRestoreCommand.makeStringAndClear() );
 
         bool bDropSucceeded( false );
@@ -150,15 +150,23 @@ namespace connectivity { namespace hsqldb
         {
             // retrieve the very current command, don't rely on the base classes cached value
             // (which we initialized empty, anyway)
-            _rValue <<= impl_getCommand_throw( false );
-            return;
+            try
+            {
+                _rValue <<= impl_getCommand_throw();
+            }
+            catch (const SQLException& e)
+            {
+                throw WrappedTargetException(e.Message,
+                    static_cast< XAlterView* >( const_cast< HView* >( this ) ),
+                        ::cppu::getCaughtException() );
+            }
         }
 
         HView_Base::getFastPropertyValue( _rValue, _nHandle );
     }
 
 
-    OUString HView::impl_getCommand_throw( bool _bAllowSQLException ) const
+    OUString HView::impl_getCommand_throw() const
     {
         OUString sCommand;
 
@@ -180,12 +188,7 @@ namespace connectivity { namespace hsqldb
             sCommand = xRow->getString( 1 );
         }
         catch( const RuntimeException& ) { throw; }
-        catch( const SQLException& e )
-        {
-            if ( _bAllowSQLException )
-                throw;
-            throw WrappedTargetException( e.Message, static_cast< XAlterView* >( const_cast< HView* >( this ) ), ::cppu::getCaughtException() );
-        }
+        catch( const SQLException& ) { throw; }
         catch( const Exception& )
         {
             DBG_UNHANDLED_EXCEPTION();
diff --git a/connectivity/source/inc/hsqldb/HView.hxx b/connectivity/source/inc/hsqldb/HView.hxx
index 3752a12..a554a0b 100644
--- a/connectivity/source/inc/hsqldb/HView.hxx
+++ b/connectivity/source/inc/hsqldb/HView.hxx
@@ -65,14 +65,10 @@ namespace connectivity { namespace hsqldb
     private:
         /** retrieves the current command of the View
 
-            @throws ::com::sun::star::lang::WrappedTargetException
-                if an error occurs while retrieving the command from the database and
-                <arg>_bAllowSQLExceptin</arg> is <FALSE/>
             @throws ::com::sun::star::sdbc::SQLException
-                if an error occurs while retrieving the command from the database and
-                <arg>_bAllowSQLException</arg> is <TRUE/>
+                if an error occurs while retrieving the command from the database.
         */
-        OUString impl_getCommand_throw( bool _bAllowSQLException ) const;
+        OUString impl_getCommand_throw() const;
 
     private:
         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
commit 553554d0c837b768bd24847320e0b4087a172aad
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 11:54:59 2014 +0000

    coverity#982472 Dereference after null check
    
    Change-Id: Ie797775184260fe5b5024d85be4244a56aee274a

diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index d6312cb..34609f8 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -621,6 +621,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
         pViewDataNewCur= pView->GetViewDataEntry(pEntry);
     if( pEntry &&
         pEntry == pCursor &&
+        pViewDataNewCur &&
         pViewDataNewCur->HasFocus() &&
         pViewDataNewCur->IsSelected())
     {
@@ -645,7 +646,8 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
     pCursor = pEntry;
     if( pCursor )
     {
-        pViewDataNewCur->SetFocus( true );
+        if (pViewDataNewCur)
+            pViewDataNewCur->SetFocus( true );
         if(!bForceNoSelect && bSimpleTravel && !(nFlags & F_DESEL_ALL) && GetUpdateMode())
         {
             pView->Select( pCursor, true );
commit 056a9a8b49fc081b092026a16ff4bf63d47052f6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 11:50:51 2014 +0000

    coverity#1190349 Division or modulo by zero
    
    Change-Id: Ia32e9197d0b5d5a02187d11f05bcf2dcae5ccb76

diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index a797fb5..e3d19f58 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -833,19 +833,13 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
 
     // The maximum width depends on the current orientation
     const sal_uInt16 nDir = m_pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
-    SwTwips nMaxWidth = 0;
-    switch ( nDir )
+    SwTwips nMaxWidth;
+    if (nDir == 900 || nDir == 2700)
+        nMaxWidth = rRect.Height();
+    else
     {
-    case 0 :
+        assert(nDir == 0); //Unknown direction set at font
         nMaxWidth = rRect.Width();
-        break;
-    case 900 :
-    case 2700 :
-        nMaxWidth = rRect.Height();
-        break;
-    default:
-        OSL_FAIL( "Unknown direction set at font" );
-        break;
     }
 
     // check if char fits into rectangle
commit 5d81ffe587f8d54efc077facdd61214a5329a322
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 6 11:47:30 2014 +0000


... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list