[ooo-build-commit] .: 2 commits - sfx2/inc sfx2/source xmloff/inc xmloff/source

Fridrich Strba fridrich at kemper.freedesktop.org
Wed Sep 15 05:28:59 PDT 2010


 sfx2/inc/sfx2/passwd.hxx        |    6 ++++++
 sfx2/source/dialog/passwd.cxx   |   26 ++++++++++++++++++++++++++
 sfx2/source/dialog/passwd.hrc   |    3 +++
 sfx2/source/dialog/passwd.src   |   16 ++++++++++++++++
 xmloff/inc/xmloff/xmltoken.hxx  |    1 +
 xmloff/source/core/xmltoken.cxx |    1 +
 6 files changed, 53 insertions(+)

New commits:
commit d5ce120eee62dde8982e6ad0f50860184fb1e104
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Sep 15 12:12:18 2010 +0200

    sc-save-password-minlength.diff: Display min password length in dialog
    
    i#21923

diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx
index e6cbed2..6a583fe 100644
--- a/sfx2/inc/sfx2/passwd.hxx
+++ b/sfx2/inc/sfx2/passwd.hxx
@@ -55,6 +55,7 @@ private:
     Edit			maPasswordED;
     FixedText		maConfirmFT;
     Edit			maConfirmED;
+    FixedText		maMinLengthFT;
     FixedLine       maPasswordBox;
 
     OKButton		maOKBtn;
@@ -63,12 +64,17 @@ private:
 
     String			maConfirmStr;
     USHORT			mnMinLen;
+    String			maMinLenPwdStr;
+    String			maEmptyPwdStr;
+    String			maMainPwdStr;
     USHORT			mnExtras;
 
     bool            mbAsciiOnly;
     DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* );
     DECL_DLLPRIVATE_LINK( OKHdl, OKButton* );
 
+    void			SetPasswdText();
+
 public:
     SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL );
 
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 0999ae5..d454c8c 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -103,6 +103,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
     maPasswordED	( this, SfxResId( ED_PASSWD_PASSWORD ) ),
     maConfirmFT		( this, SfxResId( FT_PASSWD_CONFIRM ) ),
     maConfirmED		( this, SfxResId( ED_PASSWD_CONFIRM ) ),
+    maMinLengthFT	( this, SfxResId( FT_PASSWD_MINLEN ) ),
     maPasswordBox	( this, SfxResId( GB_PASSWD_PASSWORD ) ),
     maOKBtn			( this, SfxResId( BTN_PASSWD_OK ) ),
     maCancelBtn		( this, SfxResId( BTN_PASSWD_CANCEL ) ),
@@ -110,6 +111,9 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
     maConfirmStr	( 		SfxResId( STR_PASSWD_CONFIRM ) ),
 
     mnMinLen		( 5 ),
+    maMinLenPwdStr	( SfxResId( STR_PASSWD_MIN_LEN ) ),
+    maEmptyPwdStr	( SfxResId( STR_PASSWD_EMPTY ) ),
+    maMainPwdStr    ( ),
     mnExtras		( 0 ),
     mbAsciiOnly     ( false )
 
@@ -123,6 +127,25 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
 
     if ( pGroupText )
           maPasswordBox.SetText( *pGroupText );
+
+//set the text to the pasword length
+    SetPasswdText();
+}
+
+// -----------------------------------------------------------------------
+
+void SfxPasswordDialog::SetPasswdText( )
+{
+//set the new string to the minimum password length
+    if( mnMinLen == 0 )
+        maMinLengthFT.SetText( maEmptyPwdStr );
+    else
+    {
+        maMainPwdStr = maMinLenPwdStr;
+        maMainPwdStr.SearchAndReplace( String::CreateFromAscii( "$(MINLEN)" ), String::CreateFromInt32((sal_Int32) mnMinLen ), 0);
+        maMinLengthFT.SetText( maMainPwdStr );
+        maMinLengthFT.Show();
+    }
 }
 
 // -----------------------------------------------------------------------
@@ -130,6 +153,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
 void SfxPasswordDialog::SetMinLen( USHORT nLen )
 {
     mnMinLen = nLen;
+    SetPasswdText();
     EditModifyHdl( NULL );
 }
 
@@ -189,8 +213,10 @@ short SfxPasswordDialog::Execute()
             aPos = maUserED.GetPosPixel();
             maPasswordED.SetPosPixel( aPos );
 
+            aPos = maConfirmFT.GetPosPixel();
             maConfirmFT.SetPosPixel( aPwdPos1 );
             maConfirmED.SetPosPixel( aPwdPos2 );
+            maMinLengthFT.SetPosPixel(aPos);
         }
 
         Size aBoxSize = maPasswordBox.GetSizePixel();
diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc
index 7c96e13..059619a 100644
--- a/sfx2/source/dialog/passwd.hrc
+++ b/sfx2/source/dialog/passwd.hrc
@@ -36,12 +36,15 @@
 #define ED_PASSWD_PASSWORD 14
 #define FT_PASSWD_CONFIRM 15
 #define ED_PASSWD_CONFIRM 16
+#define FT_PASSWD_MINLEN 17
 
 #define BTN_PASSWD_OK 20
 #define BTN_PASSWD_CANCEL 21
 #define BTN_PASSWD_HELP 22
 
 #define STR_PASSWD_CONFIRM 30
+#define STR_PASSWD_MIN_LEN	31
+#define STR_PASSWD_EMPTY	32
 
 #endif
 
diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src
index b95c14c..b335bf0 100644
--- a/sfx2/source/dialog/passwd.src
+++ b/sfx2/source/dialog/passwd.src
@@ -77,6 +77,22 @@ ModalDialog DLG_PASSWD
         Pos = MAP_APPFONT( 57, 44 );
         Size = MAP_APPFONT( 75, 12 );
     };
+
+    String STR_PASSWD_MIN_LEN
+    {
+        Text [ en-US ] = "(Minimum $(MINLEN) characters)" ;
+    };
+    String STR_PASSWD_EMPTY
+    {
+        Text [ en-US ] = "(The password can be empty)" ;
+    };
+
+    FixedText FT_PASSWD_MINLEN
+    {
+        Pos = MAP_APPFONT(12, 65 );
+        Size = MAP_APPFONT( 126, 10 );
+    };
+
     FixedLine GB_PASSWD_PASSWORD
     {
         Pos = MAP_APPFONT( 6, 3 );
commit a7ef13538591b5e269516b028b62536384b1e7d0
Author: Jody Goldberg <jody at gnome.org>
Date:   Wed Sep 15 11:41:11 2010 +0200

    sc-dp-gridlayout.diff: Something with grid layout :)
    
    i#68544, n#190970

diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index 13c8e98..db2e3f9 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -2511,6 +2511,7 @@ namespace xmloff { namespace token {
 
         XML_SHOW_FILTER_BUTTON,
         XML_DRILL_DOWN_ON_DOUBLE_CLICK,
+        XML_HEADER_GRID_LAYOUT,
         XML_GROUPED_BY,
         XML_DAYS,
         XML_MONTHS,
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index fd878dd..39db498 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -2516,6 +2516,7 @@ namespace xmloff { namespace token {
 
         TOKEN( "show-filter-button",                   XML_SHOW_FILTER_BUTTON ),
         TOKEN( "drill-down-on-double-click",           XML_DRILL_DOWN_ON_DOUBLE_CLICK ),
+        TOKEN( "header-grid-layout",                   XML_HEADER_GRID_LAYOUT ),
         TOKEN( "grouped-by",                           XML_GROUPED_BY ),
         TOKEN( "days",                                 XML_DAYS ),
         TOKEN( "months",                               XML_MONTHS ),


More information about the ooo-build-commit mailing list