[Libreoffice-commits] core.git: 3 commits - cui/source helpcontent2 sc/source svx/inc sw/source

Caolán McNamara caolanm at redhat.com
Tue Feb 26 04:44:54 PST 2013


 cui/source/dialogs/postdlg.cxx    |   10 +---------
 cui/source/factory/dlgfact.cxx    |    4 ++--
 cui/source/factory/dlgfact.hxx    |    2 +-
 cui/source/inc/helpid.hrc         |    4 ----
 cui/source/inc/postdlg.hxx        |    4 +---
 helpcontent2                      |    2 +-
 sc/source/ui/dbgui/sortkeydlg.cxx |   17 ++++++++++++++++-
 sc/source/ui/inc/sortkeydlg.hxx   |    2 ++
 sc/source/ui/miscdlgs/redcom.cxx  |    2 +-
 svx/inc/svx/svxdlg.hxx            |    2 +-
 sw/source/ui/shells/textfld.cxx   |    2 +-
 11 files changed, 27 insertions(+), 24 deletions(-)

New commits:
commit 07c584ad8ce44cc6fe098a177c8b07e6cfc7881e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 26 12:26:25 2013 +0000

    postit dialog is always used for redline comments now
    
    Change-Id: Id3ec1c12c354aabf2556e91e4fa75d60bb2c0f3c

diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index 7fbf2e7..cec8c01 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -41,7 +41,7 @@
 // class SvxPostItDialog -------------------------------------------------
 
 SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet,
-    bool bPrevNext, bool bRedline)
+    bool bPrevNext)
     : SfxModalDialog(pParent, "CommentDialog", "cui/ui/comment.ui")
     , rSet(rCoreSet)
     , pOutSet(0)
@@ -54,14 +54,6 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet,
     get(m_pNextBtn, "next");
     get(m_pEditED, "edit");
 
-    if (bRedline)   // HelpIDs for redlining
-    {
-        SetHelpId(HID_REDLINING_DLG);
-        m_pEditED->SetHelpId(HID_REDLINING_EDIT);
-        m_pPrevBtn->SetHelpId(HID_REDLINING_PREV);
-        m_pNextBtn->SetHelpId(HID_REDLINING_NEXT);
-    }
-
     m_pPrevBtn->SetClickHdl( LINK( this, SvxPostItDialog, PrevHdl ) );
     m_pNextBtn->SetClickHdl( LINK( this, SvxPostItDialog, NextHdl ) );
     m_pAuthorBtn->SetClickHdl( LINK( this, SvxPostItDialog, Stamp ) );
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index e63292e..dfe6cce 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1665,9 +1665,9 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
 
 AbstractSvxPostItDialog* AbstractDialogFactory_Impl::CreateSvxPostItDialog( Window* pParent,
                                                                         const SfxItemSet& rCoreSet,
-                                                                        sal_Bool bPrevNext, sal_Bool bRedline )
+                                                                        sal_Bool bPrevNext )
 {
-    SvxPostItDialog* pDlg = new SvxPostItDialog( pParent, rCoreSet, bPrevNext, bRedline );
+    SvxPostItDialog* pDlg = new SvxPostItDialog( pParent, rCoreSet, bPrevNext );
     return new AbstractSvxPostItDialog_Impl( pDlg );
 }
 
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 539dfe1..e8211f8 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -742,7 +742,7 @@ public:
                                                                 sal_Bool bHasObj = sal_True );
     virtual AbstractSvxPostItDialog*        CreateSvxPostItDialog( Window* pParent, //add for SvxPostItDialog
                                                                         const SfxItemSet& rCoreSet,
-                                                                        sal_Bool bPrevNext = sal_False, sal_Bool bRedline = sal_False );
+                                                                        sal_Bool bPrevNext = sal_False );
 
     // For TabPage
     virtual CreateTabPage               GetTabPageCreatorFunc( sal_uInt16 nId );
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index c62a335..8f26261 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -258,10 +258,6 @@
 #define HID_PAGE_MEASURE "CUI_HID_PAGE_MEASURE"
 #define HID_MEASURE_CTL_POSITION "CUI_HID_MEASURE_CTL_POSITION"
 #define HID_FORMAT_PAGE "CUI_HID_FORMAT_PAGE"
-#define HID_REDLINING_DLG "CUI_HID_REDLINING_DLG"
-#define HID_REDLINING_EDIT "CUI_HID_REDLINING_EDIT"
-#define HID_REDLINING_PREV "CUI_HID_REDLINING_PREV"
-#define HID_REDLINING_NEXT "CUI_HID_REDLINING_NEXT"
 #define HID_FORMAT_PARAGRAPH_STD "CUI_HID_FORMAT_PARAGRAPH_STD"
 #define HID_VALUESET_NUM "CUI_HID_VALUESET_NUM"
 #define HID_MEASURE_CTL_PREVIEW "CUI_HID_MEASURE_CTL_PREVIEW"
diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx
index 21b49a9..74c763b 100644
--- a/cui/source/inc/postdlg.hxx
+++ b/cui/source/inc/postdlg.hxx
@@ -29,8 +29,6 @@
 
 // class SvxPostItDialog -------------------------------------------------
 /*
-    {k:\svx\prototyp\dialog\memo.bmp}
-
     [Description]
     In this dialog a note can be created or edited. If the
     application holds a list of notes, it can be iterated
@@ -46,7 +44,7 @@ class SvxPostItDialog : public SfxModalDialog
 {
 public:
     SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet,
-                     bool bPrevNext = false, bool bRedline = false);
+                     bool bPrevNext = false);
     ~SvxPostItDialog();
 
     static sal_uInt16*      GetRanges();
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index df61609..8cb6c7b 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -33,7 +33,7 @@ ScRedComDialog::ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet,
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     if(pFact)
     {
-        pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext, true );
+        pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext );
         OSL_ENSURE(pDlg, "Dialog creation failed!");
         pDocShell=pShell;
         pDlg->DontChangeAuthor();
diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx
index 007841d..ba27a6f 100644
--- a/svx/inc/svx/svxdlg.hxx
+++ b/svx/inc/svx/svxdlg.hxx
@@ -461,7 +461,7 @@ public:
                                                                         )=0;
     virtual AbstractSvxPostItDialog*        CreateSvxPostItDialog( Window* pParent, //add for SvxPostItDialog
                                                                         const SfxItemSet& rCoreSet,
-                                                                        sal_Bool bPrevNext = sal_False, sal_Bool bRedline = sal_False )=0;
+                                                                        sal_Bool bPrevNext = sal_False) = 0;
     virtual VclAbstractDialog*          CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage ) = 0;
 
     virtual CreateSvxDistributePage     GetSvxDistributePageCreatorFunc() = 0; //  add for SvxDistributePage
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index cb8294c..81dc574 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -453,7 +453,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
 
                     SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
                     OSL_ENSURE(pFact2, "Dialogdiet fail!");
-                    AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, sal_True );
+                    AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel );
                     OSL_ENSURE(pDlg, "Dialogdiet fail!");
                     pDlg->HideAuthor();
 
commit 217a0f0c2a920f5aef66a383e470258f5547f792
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 26 12:20:58 2013 +0000

    SOME BROKEN FOO
    
    Change-Id: I37b7dc860c7fd2272724eb58345a7ab4391fba34

diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx
index 806f284..11df6da 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -111,7 +111,7 @@ ScSortKeyCtrl::ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems& rItems)
     , m_rVertScroll(m_rScrolledWindow.getVertScrollBar())
 {
     m_rVertScroll.EnableDrag();
-    m_rVertScroll.Show();
+    m_rVertScroll.Show(m_rScrolledWindow.GetStyle() & WB_VSCROLL);
 
     m_rVertScroll.SetRangeMin( 0 );
     m_rVertScroll.SetVisibleSize( 0xFFFF );
@@ -120,6 +120,19 @@ ScSortKeyCtrl::ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems& rItems)
     m_rVertScroll.SetScrollHdl( aScrollLink );
 }
 
+void ScSortKeyCtrl::checkAutoVScroll()
+{
+    WinBits nBits = m_rScrolledWindow.GetStyle();
+    if (nBits & WB_VSCROLL)
+        return;
+    if (nBits & WB_AUTOVSCROLL)
+    {
+        bool bShow = m_rVertScroll.GetRangeMax() > m_rVertScroll.GetVisibleSize();
+        if (bShow != m_rVertScroll.IsVisible())
+            m_rVertScroll.Show(bShow);
+    }
+}
+
 void ScSortKeyCtrl::setScrollRange()
 {
     sal_Int32 nScrollOffset = m_aSortWin.GetItemHeight();
@@ -127,6 +140,7 @@ void ScSortKeyCtrl::setScrollRange()
     m_rVertScroll.SetPageSize( nVisibleItems - 1 );
     m_rVertScroll.SetVisibleSize( nVisibleItems );
     m_rVertScroll.Scroll();
+    checkAutoVScroll();
 }
 
 // -----------------------------------------------------------------------
@@ -146,6 +160,7 @@ void ScSortKeyCtrl::AddSortKey( sal_uInt16 nItem )
     m_rVertScroll.SetRangeMax( nItem );
     m_rVertScroll.DoScroll( nItem );
     m_aSortWin.AddSortKey( nItem );
+    checkAutoVScroll();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx
index dd394f1..060e8ad 100644
--- a/sc/source/ui/inc/sortkeydlg.hxx
+++ b/sc/source/ui/inc/sortkeydlg.hxx
@@ -94,6 +94,8 @@ private:
 
     DECL_LINK(ScrollHdl, ScrollBar*);
 
+    void checkAutoVScroll();
+
 public:
     ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems& mrSortKeyItems);
     void setScrollRange();
commit def720964edcbb6426cd098a8958896921db9926
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 26 12:29:49 2013 +0000

    Updated core
    Project: help  7c7158b88241fbd10350495567eb5b8420755780

diff --git a/helpcontent2 b/helpcontent2
index 6e3f40c..7c7158b 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6e3f40c9ca05ba234fac04074f594530f2e89e75
+Subproject commit 7c7158b88241fbd10350495567eb5b8420755780


More information about the Libreoffice-commits mailing list