[Libreoffice-commits] core.git: 3 commits - cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UI_cui.mk solenv/bin svx/inc sw/source

Caolán McNamara caolanm at redhat.com
Tue Feb 26 02:03:22 PST 2013


 cui/AllLangResTarget_cui.mk       |    1 
 cui/UI_cui.mk                     |    1 
 cui/source/dialogs/postdlg.cxx    |  110 ++++++++------------
 cui/source/dialogs/postdlg.hrc    |   41 -------
 cui/source/dialogs/postdlg.src    |  123 ----------------------
 cui/source/factory/dlgfact.cxx    |   13 --
 cui/source/factory/dlgfact.hxx    |    2 
 cui/source/inc/helpid.hrc         |    1 
 cui/source/inc/postdlg.hxx        |   68 +++++++-----
 cui/uiconfig/ui/comment.ui        |  203 +++++++++++++++++++++++++++----------
 cui/uiconfig/ui/protectrecords.ui |  204 --------------------------------------
 solenv/bin/callcatcher.Makefile   |    2 
 svx/inc/svx/dialogs.hrc           |    1 
 svx/inc/svx/svxdlg.hxx            |    2 
 sw/source/ui/misc/redlndlg.cxx    |    2 
 sw/source/ui/shells/textfld.cxx   |    2 
 16 files changed, 239 insertions(+), 537 deletions(-)

New commits:
commit 58ba8835bcf615cb6d3563c24b3d4d69b32f1b4f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 26 00:05:58 2013 +0000

    adapt code to comment .ui conversion
    
    Change-Id: I93f98f50443ab3b2fb0ce9f3126b03c8a3281ad2

diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 13aead5..bcf726e 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -67,7 +67,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
     cui/source/dialogs/iconcdlg.src \
     cui/source/dialogs/multipat.src \
     cui/source/dialogs/passwdomdlg.src \
-    cui/source/dialogs/postdlg.src \
     cui/source/dialogs/scriptdlg.src \
     cui/source/dialogs/sdrcelldlg.src \
     cui/source/dialogs/showcols.src \
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 9e3a396..7f34a87 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
 	cui/uiconfig/ui/borderpage \
 	cui/uiconfig/ui/charnamepage \
 	cui/uiconfig/ui/colorpage \
+	cui/uiconfig/ui/comment \
 	cui/uiconfig/ui/gradientpage \
 	cui/uiconfig/ui/colorconfigwin \
 	cui/uiconfig/ui/effectspage \
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index 7a944e2..7fbf2e7 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -28,77 +28,56 @@
 #include <unotools/localedatawrapper.hxx>
 #include <comphelper/processfactory.hxx>
 #include <svx/svxids.hrc>   // SID_ATTR_...
-#include <svx/dialogs.hrc>  // RID_SVXDLG_POSTIT
 
 #define _SVX_POSTDLG_CXX
 
 #include <cuires.hrc>
-#include "postdlg.hrc"
 #include <svx/postattr.hxx>
 #include "postdlg.hxx"
 #include <dialmgr.hxx>
 
 #include "helpid.hrc"
 
-// static ----------------------------------------------------------------
-
-static sal_uInt16 pRanges[] =
-{
-    SID_ATTR_POSTIT_AUTHOR,
-    SID_ATTR_POSTIT_TEXT,
-    0
-};
-
 // class SvxPostItDialog -------------------------------------------------
 
-SvxPostItDialog::SvxPostItDialog( Window* pParent,
-                                  const SfxItemSet& rCoreSet,
-                                  sal_Bool bPrevNext,
-                                  sal_Bool bRedline ) :
-
-    SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_POSTIT ) ),
-
-    aPostItFL       ( this, CUI_RES( FL_POSTIT ) ),
-    aLastEditLabelFT( this, CUI_RES( FT_LASTEDITLABEL ) ),
-    aLastEditFT     ( this, CUI_RES( FT_LASTEDIT ) ),
-    aEditFT         ( this, CUI_RES( FT_EDIT ) ),
-    aEditED         ( this, CUI_RES( ED_EDIT ) ),
-    aAuthorFT       ( this, CUI_RES( FT_AUTHOR) ),
-    aAuthorBtn      ( this, CUI_RES( BTN_AUTHOR ) ),
-    aOKBtn          ( this, CUI_RES( BTN_POST_OK ) ),
-    aCancelBtn      ( this, CUI_RES( BTN_POST_CANCEL ) ),
-    aHelpBtn        ( this, CUI_RES( BTN_POST_HELP ) ),
-    aPrevBtn        ( this, CUI_RES( BTN_PREV ) ),
-    aNextBtn        ( this, CUI_RES( BTN_NEXT ) ),
-
-    rSet        ( rCoreSet ),
-    pOutSet     ( 0 )
-
+SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet,
+    bool bPrevNext, bool bRedline)
+    : SfxModalDialog(pParent, "CommentDialog", "cui/ui/comment.ui")
+    , rSet(rCoreSet)
+    , pOutSet(0)
 {
+    get(m_pLastEditFT, "lastedit");
+    get(m_pInsertAuthor, "insertauthor");
+    get(m_pAuthorBtn, "author");
+    get(m_pOKBtn, "ok");
+    get(m_pPrevBtn, "previous");
+    get(m_pNextBtn, "next");
+    get(m_pEditED, "edit");
+
     if (bRedline)   // HelpIDs for redlining
     {
         SetHelpId(HID_REDLINING_DLG);
-        aEditED.SetHelpId(HID_REDLINING_EDIT);
-        aPrevBtn.SetHelpId(HID_REDLINING_PREV);
-        aNextBtn.SetHelpId(HID_REDLINING_NEXT);
+        m_pEditED->SetHelpId(HID_REDLINING_EDIT);
+        m_pPrevBtn->SetHelpId(HID_REDLINING_PREV);
+        m_pNextBtn->SetHelpId(HID_REDLINING_NEXT);
     }
 
-    aPrevBtn.SetClickHdl( LINK( this, SvxPostItDialog, PrevHdl ) );
-    aNextBtn.SetClickHdl( LINK( this, SvxPostItDialog, NextHdl ) );
-    aAuthorBtn.SetClickHdl( LINK( this, SvxPostItDialog, Stamp ) );
-    aOKBtn.SetClickHdl( LINK( this, SvxPostItDialog, OKHdl ) );
+    m_pPrevBtn->SetClickHdl( LINK( this, SvxPostItDialog, PrevHdl ) );
+    m_pNextBtn->SetClickHdl( LINK( this, SvxPostItDialog, NextHdl ) );
+    m_pAuthorBtn->SetClickHdl( LINK( this, SvxPostItDialog, Stamp ) );
+    m_pOKBtn->SetClickHdl( LINK( this, SvxPostItDialog, OKHdl ) );
 
-    Font aFont( aEditED.GetFont() );
+    Font aFont( m_pEditED->GetFont() );
     aFont.SetWeight( WEIGHT_LIGHT );
-    aEditED.SetFont( aFont );
+    m_pEditED->SetFont( aFont );
 
     sal_Bool bNew = sal_True;
-    sal_uInt16 nWhich            = 0;
+    sal_uInt16 nWhich = 0;
 
     if ( !bPrevNext )
     {
-        aPrevBtn.Hide();
-        aNextBtn.Hide();
+        m_pPrevBtn->Hide();
+        m_pNextBtn->Hide();
     }
 
     nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR );
@@ -139,19 +118,16 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent,
     }
 
     ShowLastAuthor(aAuthorStr, aDateStr);
-    aEditED.SetText(convertLineEnd(aTextStr, GetSystemLineEnd()));
 
-    if ( !bNew )
-        SetText( CUI_RESSTR( STR_NOTIZ_EDIT ) );
-    else
-        // create newly
-        SetText( CUI_RESSTR( STR_NOTIZ_INSERT ) );
+    //lock to initial .ui placeholder size before replacing contents
+    Size aSize(m_pEditED->get_preferred_size());
+    m_pEditED->set_width_request(aSize.Width());
+    m_pEditED->set_height_request(aSize.Height());
 
-    FreeResource();
+    m_pEditED->SetText(convertLineEnd(aTextStr, GetSystemLineEnd()));
 
-    aEditED.SetAccessibleRelationLabeledBy(&aEditFT);
-    aEditED.SetAccessibleRelationMemberOf(&aPostItFL);
-    aAuthorBtn.SetAccessibleRelationMemberOf(&aPostItFL);
+    if (!bNew)
+        SetText( get<FixedText>("alttitle")->GetText() );
 }
 
 // -----------------------------------------------------------------------
@@ -169,13 +145,19 @@ void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& rDate)
     String sTxt( rAuthor );
     sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
     sTxt += rDate;
-    aLastEditFT.SetText( sTxt );
+    m_pLastEditFT->SetText( sTxt );
 }
 
 // -----------------------------------------------------------------------
 
 sal_uInt16* SvxPostItDialog::GetRanges()
 {
+    static sal_uInt16 pRanges[] =
+    {
+        SID_ATTR_POSTIT_AUTHOR,
+        SID_ATTR_POSTIT_TEXT,
+        0
+    };
     return pRanges;
 }
 
@@ -183,8 +165,8 @@ sal_uInt16* SvxPostItDialog::GetRanges()
 
 void SvxPostItDialog::EnableTravel(sal_Bool bNext, sal_Bool bPrev)
 {
-    aPrevBtn.Enable(bPrev);
-    aNextBtn.Enable(bNext);
+    m_pPrevBtn->Enable(bPrev);
+    m_pNextBtn->Enable(bNext);
 }
 
 // -----------------------------------------------------------------------
@@ -213,7 +195,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
     Time aTime( Time::SYSTEM );
     String aTmp( SvtUserOptions().GetID() );
     const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
-    String aStr( aEditED.GetText() );
+    String aStr( m_pEditED->GetText() );
     aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) );
 
     if ( aTmp.Len() > 0 )
@@ -228,10 +210,10 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
 
     aStr = convertLineEnd(aStr, GetSystemLineEnd());
 
-    aEditED.SetText(aStr);
+    m_pEditED->SetText(aStr);
     xub_StrLen nLen = aStr.Len();
-    aEditED.GrabFocus();
-    aEditED.SetSelection( Selection( nLen, nLen ) );
+    m_pEditED->GrabFocus();
+    m_pEditED->SetSelection( Selection( nLen, nLen ) );
     return 0;
 }
 
@@ -245,7 +227,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, OKHdl)
                                          rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) );
     pOutSet->Put( SvxPostItDateItem( rLocaleWrapper.getDate( Date( Date::SYSTEM ) ),
                                      rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ) ) );
-    pOutSet->Put( SvxPostItTextItem( aEditED.GetText(),
+    pOutSet->Put( SvxPostItTextItem( m_pEditED->GetText(),
                                      rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ) ) );
     EndDialog( RET_OK );
     return 0;
diff --git a/cui/source/dialogs/postdlg.hrc b/cui/source/dialogs/postdlg.hrc
deleted file mode 100644
index 63cbd68..0000000
--- a/cui/source/dialogs/postdlg.hrc
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _SVX_POSTDLG_HRC
-#define _SVX_POSTDLG_HRC
-
-// defines ------------------------------------------------------------------
-
-#define FT_LASTEDITLABEL    10
-#define FT_LASTEDIT         11
-#define FT_EDIT                         12
-#define ED_EDIT             13
-#define FL_POSTIT                       14
-#define BTN_PREV            15
-#define BTN_NEXT            16
-#define BTN_AUTHOR          17
-#define FT_AUTHOR           18
-
-#define STR_NOTIZ_EDIT      20
-#define STR_NOTIZ_INSERT    21
-
-#define BTN_POST_OK         30
-#define BTN_POST_CANCEL     31
-#define BTN_POST_HELP       32
-
-
-#endif
diff --git a/cui/source/dialogs/postdlg.src b/cui/source/dialogs/postdlg.src
deleted file mode 100644
index a4589a1..0000000
--- a/cui/source/dialogs/postdlg.src
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <cuires.hrc>
-#include "postdlg.hrc"
-#include "helpid.hrc"
-#include <svx/dialogs.hrc> // for RID_SVXDLG_POSTIT
-
- // RID_SVXDLG_POSTIT -----------------------------------------------------
-ModalDialog RID_SVXDLG_POSTIT
-{
-    HelpId = HID_POSTIT_DIALOG ;
-    OutputSize = TRUE ;
-    SvLook = TRUE ;
-    Size = MAP_APPFONT ( 198 , 134 ) ;
-    Text [ en-US ] = "Comment" ;
-    Moveable = TRUE ;
-    FixedText FT_LASTEDITLABEL
-    {
-        Pos = MAP_APPFONT ( 12 , 14 ) ;
-        Size = MAP_APPFONT ( 34 , 8 ) ;
-        Text [ en-US ] = "Author" ;
-        Left = TRUE ;
-    };
-    FixedText FT_LASTEDIT
-    {
-        Pos = MAP_APPFONT ( 48 , 14 ) ;
-        Size = MAP_APPFONT ( 83 , 8 ) ;
-        Left = TRUE ;
-    };
-    FixedText FT_EDIT
-    {
-        Pos = MAP_APPFONT ( 12 , 27 ) ;
-        Size = MAP_APPFONT ( 100 , 8 ) ;
-        Text [ en-US ] = "~Text" ;
-        Left = TRUE ;
-    };
-    MultiLineEdit ED_EDIT
-    {
-        HelpID = "cui:MultiLineEdit:RID_SVXDLG_POSTIT:ED_EDIT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 38 ) ;
-        Size = MAP_APPFONT ( 123 , 72 ) ;
-        Left = TRUE ;
-        VScroll = TRUE ;
-        HScroll = TRUE ;
-        IgnoreTab = TRUE ;
-    };
-    FixedLine FL_POSTIT
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 129 , 8 ) ;
-        Text [ en-US ] = "Contents" ;
-    };
-    OKButton BTN_POST_OK
-    {
-        Pos = MAP_APPFONT ( 141 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 15 ) ;
-        DefButton = TRUE ;
-    };
-    CancelButton BTN_POST_CANCEL
-    {
-        Pos = MAP_APPFONT ( 141 , 23 ) ;
-        Size = MAP_APPFONT ( 50 , 15 ) ;
-    };
-    HelpButton BTN_POST_HELP
-    {
-        Pos = MAP_APPFONT ( 141 , 40 ) ;
-        Size = MAP_APPFONT ( 50 , 15 ) ;
-    };
-    ImageButton BTN_PREV
-    {
-        HelpID = "cui:ImageButton:RID_SVXDLG_POSTIT:BTN_PREV";
-        Pos = MAP_APPFONT ( 141 , 60 ) ;
-        Size = MAP_APPFONT ( 24 , 14 ) ;
-        Symbol = IMAGEBUTTON_ARROW_LEFT ;
-    };
-    ImageButton BTN_NEXT
-    {
-        HelpID = "cui:ImageButton:RID_SVXDLG_POSTIT:BTN_NEXT";
-        Pos = MAP_APPFONT ( 167 , 60 ) ;
-        Size = MAP_APPFONT ( 24 , 14 ) ;
-        Symbol = IMAGEBUTTON_ARROW_RIGHT ;
-    };
-    FixedText FT_AUTHOR
-    {
-        Pos = MAP_APPFONT ( 12 , 116 ) ;
-        Size = MAP_APPFONT ( 60 , 8 ) ;
-        Text [ en-US ] = "~Insert";
-    };
-    PushButton BTN_AUTHOR
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_POSTIT:BTN_AUTHOR";
-        Pos = MAP_APPFONT ( 75 , 114 ) ;
-        Size = MAP_APPFONT ( 60 , 14 ) ;
-        Text [ en-US ] = "Author" ;
-    };
-     // lokale Strings
-    String STR_NOTIZ_EDIT
-    {
-        Text [ en-US ] = "Edit Comment" ;
-    };
-    String STR_NOTIZ_INSERT
-    {
-        Text [ en-US ] = "Insert Comment" ;
-    };
-};
- // ********************************************************************** EOF
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 26532ef..e63292e 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1793,18 +1793,11 @@ CreateSvxDistributePage AbstractDialogFactory_Impl::GetSvxDistributePageCreatorF
     return SvxDistributePage::Create;
 }
 
-DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc( sal_uInt16 nId )
+DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc()
 {
-        switch ( nId )
-    {
-        case RID_SVXDLG_POSTIT:
-            return SvxPostItDialog::GetRanges;  //add for SvxPostItDialog
-        default:
-            break;
-    }
-
-    return 0;
+    return SvxPostItDialog::GetRanges;  //add for SvxPostItDialog
 }
+
 GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
 {
     switch ( nId )
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index dd4c37a..539dfe1 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -749,7 +749,7 @@ public:
     virtual CreateSvxDistributePage     GetSvxDistributePageCreatorFunc();
 
     virtual GetTabPageRanges            GetTabPageRangesFunc( sal_uInt16 nId );
-    virtual DialogGetRanges         GetDialogGetRangesFunc( sal_uInt16 nId ); //add for SvxPostItDialog
+    virtual DialogGetRanges             GetDialogGetRangesFunc(); //add for SvxPostItDialog
     virtual VclAbstractDialog*          CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage );
 
     virtual AbstractScriptSelectorDialog*
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 8f14929..c62a335 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -305,7 +305,6 @@
 #define HID_GALLERY_TITLE_EDIT "CUI_HID_GALLERY_TITLE_EDIT"
 #define HID_OFAPAGE_QUOTE_SW_CLB "CUI_HID_OFAPAGE_QUOTE_SW_CLB"
 #define HID_OFAPAGE_QUOTE_CLB "CUI_HID_OFAPAGE_QUOTE_CLB"
-#define HID_POSTIT_DIALOG "CUI_HID_POSTIT_DIALOG"
 
 #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"
diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx
index 4918714..21b49a9 100644
--- a/cui/source/inc/postdlg.hxx
+++ b/cui/source/inc/postdlg.hxx
@@ -19,9 +19,10 @@
 #ifndef _SVX_POSTDLG_HXX
 #define _SVX_POSTDLG_HXX
 
-#include <vcl/group.hxx>
 #include <vcl/button.hxx>
 #include <vcl/edit.hxx>
+#include <vcl/group.hxx>
+#include <vcl/layout.hxx>
 #include <svtools/stdctrl.hxx>
 #include <sfx2/basedlgs.hxx>
 #include <svtools/svmedit.hxx>
@@ -44,8 +45,8 @@
 class SvxPostItDialog : public SfxModalDialog
 {
 public:
-    SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet,
-                     sal_Bool bPrevNext = sal_False, sal_Bool bRedline = sal_False );
+    SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet,
+                     bool bPrevNext = false, bool bRedline = false);
     ~SvxPostItDialog();
 
     static sal_uInt16*      GetRanges();
@@ -58,38 +59,47 @@ public:
     void                SetNextHdl( const Link& rLink )
                             { aNextHdlLink = rLink; }
 
-    void                EnableTravel(sal_Bool bNext, sal_Bool bPrev);
-    inline String       GetNote() { return aEditED.GetText(); }
-    inline void         SetNote(const String& rTxt) { aEditED.SetText(rTxt); }
-
-    void                ShowLastAuthor(const String& rAuthor, const String& rDate);
-    inline void         DontChangeAuthor()  { aAuthorBtn.Enable(sal_False); }
-    inline void         HideAuthor()        { aAuthorFT.Hide(); aAuthorBtn.Hide(); }
-    inline void         SetReadonlyPostIt(sal_Bool bDisable)
-                            {
-                                aOKBtn.Enable( !bDisable );
-                                aEditED.SetReadOnly( bDisable );
-                                aAuthorBtn.Enable( !bDisable );
-                            }
-    inline sal_Bool         IsOkEnabled() const { return aOKBtn.IsEnabled(); }
+    void EnableTravel(sal_Bool bNext, sal_Bool bPrev);
+    String GetNote()
+    {
+        return m_pEditED->GetText();
+    }
+    void SetNote(const OUString& rTxt)
+    {
+        m_pEditED->SetText(rTxt);
+    }
+    void ShowLastAuthor(const String& rAuthor, const String& rDate);
+    void DontChangeAuthor()
+    {
+        m_pAuthorBtn->Enable(false);
+    }
+    void HideAuthor()
+    {
+        m_pInsertAuthor->Hide();
+    }
+    void SetReadonlyPostIt(bool bDisable)
+    {
+        m_pOKBtn->Enable( !bDisable );
+        m_pEditED->SetReadOnly( bDisable );
+        m_pAuthorBtn->Enable( !bDisable );
+    }
+    bool IsOkEnabled() const
+    {
+        return m_pOKBtn->IsEnabled();
+    }
 
 private:
-    FixedLine           aPostItFL;
-    FixedText           aLastEditLabelFT;
-    FixedInfo           aLastEditFT;
+    FixedText*          m_pLastEditFT;
 
-    FixedText           aEditFT;
-    MultiLineEdit       aEditED;
+    MultiLineEdit*      m_pEditED;
 
-    FixedText           aAuthorFT;
-    PushButton          aAuthorBtn;
+    VclContainer*       m_pInsertAuthor;
+    PushButton*         m_pAuthorBtn;
 
-    OKButton            aOKBtn;
-    CancelButton        aCancelBtn;
-    HelpButton          aHelpBtn;
+    OKButton*           m_pOKBtn;
 
-    ImageButton         aPrevBtn;
-    ImageButton         aNextBtn;
+    PushButton*         m_pPrevBtn;
+    PushButton*         m_pNextBtn;
 
     const SfxItemSet&   rSet;
     SfxItemSet*         pOutSet;
diff --git a/cui/uiconfig/ui/comment.ui b/cui/uiconfig/ui/comment.ui
index 26d55b8..12137d2 100644
--- a/cui/uiconfig/ui/comment.ui
+++ b/cui/uiconfig/ui/comment.ui
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkAction" id="action1"/>
-  <object class="GtkDialog" id="Comment: Insertion">
+  <object class="GtkDialog" id="CommentDialog">
     <property name="can_focus">False</property>
-    <property name="border_width">5</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Insert Comment</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="spacing">2</property>
+        <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
@@ -20,6 +20,8 @@
                 <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>
                 <property name="yalign">0.50999999046325684</property>
@@ -59,6 +61,55 @@
                 <property name="position">2</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkGrid" id="grid2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="row_spacing">6</property>
+                <property name="row_homogeneous">True</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkButton" id="previous">
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="no_show_all">True</property>
+                    <property name="halign">center</property>
+                    <property name="valign">center</property>
+                    <property name="image">image2</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="GtkButton" id="next">
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="no_show_all">True</property>
+                    <property name="halign">center</property>
+                    <property name="valign">center</property>
+                    <property name="image">image3</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -71,28 +122,34 @@
           <object class="GtkFrame" id="frame1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</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="GtkBox" id="box1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkBox" id="box2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="spacing">10</property>
+                        <property name="spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="label2">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
                             <property name="label" translatable="yes">Author</property>
                           </object>
                           <packing>
@@ -102,55 +159,10 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkBox" id="box3">
+                          <object class="GtkLabel" id="lastedit">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="spacing">1</property>
-                            <child>
-                              <object class="GtkLabel" id="label3">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="label6">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">,</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="label7">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="label8">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">3</property>
-                              </packing>
-                            </child>
+                            <property name="xalign">0</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -172,6 +184,7 @@
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Text</property>
                         <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">edit</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -183,9 +196,20 @@
                       <object class="GtkScrolledWindow" id="scrolledwindow1">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="hscrollbar_policy">always</property>
+                        <property name="vscrollbar_policy">always</property>
                         <property name="shadow_type">in</property>
                         <child>
-                          <placeholder/>
+                          <object class="GtkTextView" id="edit">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="vexpand">True</property>
+                            <property name="wrap_mode">char</property>
+                            <property name="buffer">textbuffer1</property>
+                          </object>
                         </child>
                       </object>
                       <packing>
@@ -195,12 +219,40 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="label5">
+                      <object class="GtkGrid" id="insertauthor">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">_Insert</property>
-                        <property name="use_underline">True</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">_Insert</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">author</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="GtkButton" id="author">
+                            <property name="label" translatable="yes">Author</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -208,6 +260,18 @@
                         <property name="position">3</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkLabel" id="alttitle">
+                        <property name="can_focus">False</property>
+                        <property name="no_show_all">True</property>
+                        <property name="label" translatable="yes">Edit Comment</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
                   </object>
                 </child>
               </object>
@@ -217,11 +281,14 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Contents</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
               </object>
             </child>
           </object>
           <packing>
-            <property name="expand">False</property>
+            <property name="expand">True</property>
             <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
@@ -234,4 +301,24 @@
       <action-widget response="0">help</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkImage" id="image2">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-go-back</property>
+  </object>
+  <object class="GtkImage" id="image3">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-go-forward</property>
+  </object>
+  <object class="GtkTextBuffer" id="textbuffer1">
+    <property name="text">12345678901234567890123456789012345
+2
+3
+4
+5
+6
+7
+8</property>
+  </object>
 </interface>
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index 0e83191..fa41623 100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -111,7 +111,6 @@
 #define RID_SVX_GRFFILTER_DLG_SMOOTH        (RID_SVX_START + 337)
 #define RID_SVXDLG_SEARCHFORMAT             (RID_SVX_START +  21)
 #define RID_SVXDLG_CHARMAP                  ( RID_SVX_START +  10 )
-#define RID_SVXDLG_POSTIT                   ( RID_SVX_START +   8 )
 
 // IDs of options pages of applications
 #define RID_SW_TP_MAILCONFIG            (RID_OFA_START + 102)
diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx
index fd1d676..007841d 100644
--- a/svx/inc/svx/svxdlg.hxx
+++ b/svx/inc/svx/svxdlg.hxx
@@ -465,7 +465,7 @@ public:
     virtual VclAbstractDialog*          CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage ) = 0;
 
     virtual CreateSvxDistributePage     GetSvxDistributePageCreatorFunc() = 0; //  add for SvxDistributePage
-    virtual DialogGetRanges         GetDialogGetRangesFunc( sal_uInt16 nId ) = 0; //add for SvxPostItDialog
+    virtual DialogGetRanges             GetDialogGetRangesFunc() = 0; //add for SvxPostItDialog
 
     virtual AbstractScriptSelectorDialog*
         CreateScriptSelectorDialog(
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 0706fbc..06b1357 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -1061,7 +1061,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl)
                         rtl::OUString sComment = convertLineEnd(rRedline.GetComment(), GetSystemLineEnd());
                         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
                         OSL_ENSURE(pFact, "Dialogdiet fail!");
-                        ::DialogGetRanges fnGetRange = pFact->GetDialogGetRangesFunc( RID_SVXDLG_POSTIT );
+                        ::DialogGetRanges fnGetRange = pFact->GetDialogGetRangesFunc();
                         OSL_ENSURE(fnGetRange, "Dialogdiet fail! GetRanges()");
                         SfxItemSet aSet( pSh->GetAttrPool(), fnGetRange() );
 
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index ba0c85c..cb8294c 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -408,7 +408,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
 
                     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
                     OSL_ENSURE(pFact, "Dialogdiet fail!");
-                    ::DialogGetRanges fnGetRange = pFact->GetDialogGetRangesFunc( RID_SVXDLG_POSTIT );
+                    ::DialogGetRanges fnGetRange = pFact->GetDialogGetRangesFunc();
                     OSL_ENSURE(fnGetRange, "Dialogdiet fail! GetRanges()");
                     SfxItemSet aSet(GetPool(), fnGetRange());
                     aSet.Put(SvxPostItTextItem(sComment, SID_ATTR_POSTIT_TEXT));
commit 67f6b20eccc39d94118e81cdc45fcf40bd7bc9d8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Feb 25 20:29:35 2013 +0000

    turns out protect changes dialog is converted SfxPasswordDialog
    
    Change-Id: Ie4cbbc51baaf609c067abdf110a7843e71a8b2c2

diff --git a/cui/uiconfig/ui/protectrecords.ui b/cui/uiconfig/ui/protectrecords.ui
deleted file mode 100644
index c0498d3..0000000
--- a/cui/uiconfig/ui/protectrecords.ui
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkAction" id="action1"/>
-  <object class="GtkDialog" id="Enter Password">
-    <property name="can_focus">False</property>
-    <property name="border_width">5</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox1">
-        <property name="can_focus">False</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">6</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="can_focus">False</property>
-            <property name="layout_style">center</property>
-            <child>
-              <object class="GtkButton" id="help">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <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="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="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">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkBox" id="box1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
-            <property name="spacing">6</property>
-            <child>
-              <object class="GtkFrame" id="frame1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</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="left_padding">12</property>
-                    <child>
-                      <object class="GtkGrid" id="grid1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="row_spacing">6</property>
-                        <property name="column_spacing">6</property>
-                        <child>
-                          <object class="GtkLabel" id="label3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Password</property>
-                            <property name="use_underline">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="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">_Confirm</property>
-                            <property name="use_underline">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkEntry" id="entry1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">•</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkEntry" id="entry2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">•</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Password</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">(Minimum 1 characters)</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="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkSeparator" id="separator1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="0">help</action-widget>
-      <action-widget response="0">ok</action-widget>
-      <action-widget response="0">cancel</action-widget>
-    </action-widgets>
-  </object>
-</interface>
commit 9b0a630127f875fbf09d7dd9facecf08abaac17c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Feb 25 20:19:08 2013 +0000

    tweak findunusedcode target
    
    Change-Id: Iceef7676b96d2c60e34d413b564b860013430838

diff --git a/solenv/bin/callcatcher.Makefile b/solenv/bin/callcatcher.Makefile
index 4bcd737..f5a0edb 100644
--- a/solenv/bin/callcatcher.Makefile
+++ b/solenv/bin/callcatcher.Makefile
@@ -30,7 +30,7 @@ export dbglevel:=2
 include $(SOLARENV)/gbuild/gbuild.mk
 
 findunusedcode:
-	cd instsetoo_native && unset MAKEFLAGS && \
+	cd $(SRCDIR)/postprocess && unset MAKEFLAGS && \
         $(SOLARENV)/bin/build.pl -P$(PARALLELISM) --all -- -P$(PARALLELISM)
 	ooinstall -l $(DEVINSTALLDIR)/opt
 	$(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f Makefile.post subsequentcheck


More information about the Libreoffice-commits mailing list