[Libreoffice-commits] core.git: include/svtools svtools/source svtools/uiconfig svtools/UIConfig_svt.mk svx/source vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Jun 21 19:15:12 UTC 2020


 include/svtools/calendar.hxx        |   21 --
 include/svtools/strings.hrc         |    3 
 svtools/UIConfig_svt.mk             |    1 
 svtools/source/control/calendar.cxx |  287 +++++++++++-------------------------
 svtools/uiconfig/ui/calendar.ui     |   77 +++++++++
 svx/source/fmcomp/gridcell.cxx      |    2 
 vcl/source/window/mouse.cxx         |    1 
 7 files changed, 174 insertions(+), 218 deletions(-)

New commits:
commit bafd50ee06d982e19d54fae0f9d8f968a2dedbd4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jun 20 19:28:14 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jun 21 21:14:36 2020 +0200

    weld DateField Calendar floating window
    
    Change-Id: I8d839a09b787e2b8ac1389633a39a3cd969fb1c9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96816
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 3b6ffb5bdc39..a547fb450221 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -23,18 +23,11 @@
 #include <config_options.h>
 #include <svtools/svtdllapi.h>
 
-#include <vcl/calendar.hxx>
 #include <vcl/field.hxx>
+#include <vcl/weld.hxx>
 
-class MouseEvent;
-class TrackingEvent;
-class KeyEvent;
-class HelpEvent;
-class DataChangedEvent;
 class FloatingWindow;
-class PushButton;
-class ImplCFieldFloatWin;
-class Button;
+struct ImplCFieldFloatWin;
 
 /*************************************************************************
 
@@ -76,14 +69,13 @@ class UNLESS_MERGELIBS(SVT_DLLPUBLIC) CalendarField final : public DateField
 {
 private:
     VclPtr<ImplCFieldFloatWin> mpFloatWin;
-    VclPtr<Calendar>    mpCalendar;
-    VclPtr<PushButton>  mpTodayBtn;
-    VclPtr<PushButton>  mpNoneBtn;
+    weld::Button*       mpTodayBtn;
+    weld::Button*       mpNoneBtn;
     bool                mbToday;
     bool                mbNone;
 
-                        DECL_DLLPRIVATE_LINK( ImplSelectHdl, Calendar*, void );
-                        DECL_DLLPRIVATE_LINK( ImplClickHdl, Button*, void );
+                        DECL_DLLPRIVATE_LINK( ImplSelectHdl, weld::Calendar&, void );
+                        DECL_DLLPRIVATE_LINK( ImplClickHdl, weld::Button&, void );
                         DECL_DLLPRIVATE_LINK( ImplPopupModeEndHdl, FloatingWindow*, void );
 
 public:
@@ -92,7 +84,6 @@ public:
     virtual void        dispose() override;
 
     virtual bool        ShowDropDown( bool bShow ) override;
-    Calendar*           GetCalendar();
 
     void                EnableToday() { mbToday = true; }
     void                EnableNone() { mbNone = true; }
diff --git a/include/svtools/strings.hrc b/include/svtools/strings.hrc
index a71792e20026..c8b84f0e53a4 100644
--- a/include/svtools/strings.hrc
+++ b/include/svtools/strings.hrc
@@ -150,9 +150,6 @@
 #define STR_SVT_INDEXENTRY_PHONETIC_LS          NC_("STR_SVT_INDEXENTRY_PHONETIC_LS", "Phonetic (alphanumeric last, grouped by syllables)")
 #define STR_SVT_INDEXENTRY_PHONETIC_LC          NC_("STR_SVT_INDEXENTRY_PHONETIC_LC", "Phonetic (alphanumeric last, grouped by consonants)")
 
-#define STR_SVT_CALENDAR_TODAY                  NC_("STR_SVT_CALENDAR_TODAY", "Today")
-#define STR_SVT_CALENDAR_NONE                   NC_("STR_SVT_CALENDAR_NONE", "None")
-
 #define STR_SVT_STYLE_LIGHT                     NC_("STR_SVT_STYLE_LIGHT", "Light")
 #define STR_SVT_STYLE_LIGHT_ITALIC              NC_("STR_SVT_STYLE_LIGHT_ITALIC", "Light Italic")
 #define STR_SVT_STYLE_NORMAL                    NC_("STR_SVT_STYLE_NORMAL", "Regular")
diff --git a/svtools/UIConfig_svt.mk b/svtools/UIConfig_svt.mk
index e6c205b37f6d..9cf052bbc0da 100644
--- a/svtools/UIConfig_svt.mk
+++ b/svtools/UIConfig_svt.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_UIConfig_UIConfig,svt))
 
 $(eval $(call gb_UIConfig_add_uifiles,svt,\
 	svtools/uiconfig/ui/addresstemplatedialog \
+	svtools/uiconfig/ui/calendar \
 	svtools/uiconfig/ui/combocontrol \
 	svtools/uiconfig/ui/datewindow \
 	svtools/uiconfig/ui/editcontrol \
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index d1b7f5d119c9..f768e803185d 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -17,49 +17,64 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <vcl/floatwin.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
+#include <vcl/InterimItemWindow.hxx>
 #include <vcl/event.hxx>
+#include <vcl/dockwin.hxx>
+#include <vcl/svapp.hxx>
 
 #include <svtools/strings.hrc>
 #include <svtools/svtresid.hxx>
 #include <svtools/calendar.hxx>
 
-#define CALFIELD_EXTRA_BUTTON_WIDTH         14
-#define CALFIELD_EXTRA_BUTTON_HEIGHT        8
-#define CALFIELD_SEP_X                      6
-#define CALFIELD_BORDERLINE_X               5
-#define CALFIELD_BORDER_YTOP                4
-#define CALFIELD_BORDER_Y                   5
-
-class ImplCFieldFloatWin : public FloatingWindow
+namespace
 {
-private:
-    VclPtr<Calendar>    mpCalendar;
-    VclPtr<PushButton>  mpTodayBtn;
-    VclPtr<PushButton>  mpNoneBtn;
-    VclPtr<FixedLine>   mpFixedLine;
+    class ImplCFieldFloat final
+    {
+    private:
+        std::unique_ptr<weld::Builder> mxBuilder;
+        std::unique_ptr<weld::Container> mxContainer;
+        std::unique_ptr<weld::Calendar> mxCalendar;
+        std::unique_ptr<weld::Button> mxTodayBtn;
+        std::unique_ptr<weld::Button> mxNoneBtn;
 
-public:
-                    explicit ImplCFieldFloatWin( vcl::Window* pParent );
-    virtual         ~ImplCFieldFloatWin() override;
-    virtual void    dispose() override;
+    public:
+        ImplCFieldFloat(vcl::Window* pContainer)
+            : mxBuilder(Application::CreateInterimBuilder(pContainer, "svt/ui/calendar.ui"))
+            , mxContainer(mxBuilder->weld_container("Calendar"))
+            , mxCalendar(mxBuilder->weld_calendar("date"))
+            , mxTodayBtn(mxBuilder->weld_button("today"))
+            , mxNoneBtn(mxBuilder->weld_button("none"))
+        {
+        }
 
-    void            SetCalendar( Calendar* pCalendar )
-                        { mpCalendar = pCalendar; }
+        weld::Calendar* GetCalendar() { return mxCalendar.get(); }
+        weld::Button*   EnableTodayBtn(bool bEnable);
+        weld::Button*   EnableNoneBtn(bool bEnable);
+
+        void GrabFocus()
+        {
+            mxCalendar->grab_focus();
+        }
+    };
+}
 
-    PushButton*     EnableTodayBtn( bool bEnable );
-    PushButton*     EnableNoneBtn( bool bEnable );
-    void            ArrangeButtons();
+struct ImplCFieldFloatWin : public DockingWindow
+{
+    explicit ImplCFieldFloatWin(vcl::Window* pParent);
+    virtual void dispose() override;
+    virtual ~ImplCFieldFloatWin() override;
+    virtual void GetFocus() override;
 
-    virtual bool    EventNotify( NotifyEvent& rNEvt ) override;
+    VclPtr<vcl::Window> mxBox;
+    std::unique_ptr<ImplCFieldFloat> mxWidget;
 };
 
-ImplCFieldFloatWin::ImplCFieldFloatWin( vcl::Window* pParent ) :
-    FloatingWindow( pParent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW  ),
-    mpCalendar(nullptr), mpTodayBtn(nullptr), mpNoneBtn(nullptr), mpFixedLine(nullptr)
+ImplCFieldFloatWin::ImplCFieldFloatWin(vcl::Window* pParent)
+    : DockingWindow(pParent, "InterimDockParent", "svx/ui/interimdockparent.ui")
+    , mxBox(get("box"))
 {
+    setDeferredProperties();
+    mxWidget.reset(new ImplCFieldFloat(mxBox.get()));
 }
 
 ImplCFieldFloatWin::~ImplCFieldFloatWin()
@@ -69,141 +84,34 @@ ImplCFieldFloatWin::~ImplCFieldFloatWin()
 
 void ImplCFieldFloatWin::dispose()
 {
-    mpTodayBtn.disposeAndClear();
-    mpNoneBtn.disposeAndClear();
-    mpFixedLine.disposeAndClear();
-    mpCalendar.clear();
-    FloatingWindow::dispose();
+    mxWidget.reset();
+    mxBox.disposeAndClear();
+    DockingWindow::dispose();
 }
 
-PushButton* ImplCFieldFloatWin::EnableTodayBtn( bool bEnable )
+void ImplCFieldFloatWin::GetFocus()
 {
-    if ( bEnable )
-    {
-        if ( !mpTodayBtn )
-        {
-            mpTodayBtn = VclPtr<PushButton>::Create( this, WB_NOPOINTERFOCUS );
-            OUString aTodayText(SvtResId(STR_SVT_CALENDAR_TODAY));
-            mpTodayBtn->SetText( aTodayText );
-            Size aSize;
-            aSize.setWidth( mpTodayBtn->GetCtrlTextWidth( mpTodayBtn->GetText() ) );
-            aSize.setHeight( mpTodayBtn->GetTextHeight() );
-            aSize.AdjustWidth(CALFIELD_EXTRA_BUTTON_WIDTH );
-            aSize.AdjustHeight(CALFIELD_EXTRA_BUTTON_HEIGHT );
-            mpTodayBtn->SetSizePixel( aSize );
-            mpTodayBtn->Show();
-        }
-    }
-    else
-    {
-        mpTodayBtn.disposeAndClear();
-    }
-
-    return mpTodayBtn;
-}
-
-PushButton* ImplCFieldFloatWin::EnableNoneBtn( bool bEnable )
-{
-    if ( bEnable )
-    {
-        if ( !mpNoneBtn )
-        {
-            mpNoneBtn = VclPtr<PushButton>::Create( this, WB_NOPOINTERFOCUS );
-            OUString aNoneText(SvtResId(STR_SVT_CALENDAR_NONE));
-            mpNoneBtn->SetText( aNoneText );
-            Size aSize;
-            aSize.setWidth( mpNoneBtn->GetCtrlTextWidth( mpNoneBtn->GetText() ) );
-            aSize.setHeight( mpNoneBtn->GetTextHeight() );
-            aSize.AdjustWidth(CALFIELD_EXTRA_BUTTON_WIDTH );
-            aSize.AdjustHeight(CALFIELD_EXTRA_BUTTON_HEIGHT );
-            mpNoneBtn->SetSizePixel( aSize );
-            mpNoneBtn->Show();
-        }
-    }
-    else
-    {
-        mpNoneBtn.disposeAndClear();
-    }
-
-    return mpNoneBtn;
+    DockingWindow::GetFocus();
+    if (!mxWidget)
+        return;
+    mxWidget->GrabFocus();
 }
 
-void ImplCFieldFloatWin::ArrangeButtons()
+weld::Button* ImplCFieldFloat::EnableTodayBtn(bool bEnable)
 {
-    long nBtnHeight = 0;
-    long nBtnWidth  = 0;
-    Size aOutSize   = GetOutputSizePixel();
-    if ( mpTodayBtn && mpNoneBtn )
-    {
-        Size aTodayBtnSize = mpTodayBtn->GetSizePixel();
-        Size aNoneBtnSize  = mpNoneBtn->GetSizePixel();
-        if ( aTodayBtnSize.Width() < aNoneBtnSize.Width() )
-            aTodayBtnSize.setWidth( aNoneBtnSize.Width() );
-        else
-            aNoneBtnSize.setWidth( aTodayBtnSize.Width() );
-        if ( aTodayBtnSize.Height() < aNoneBtnSize.Height() )
-            aTodayBtnSize.setHeight( aNoneBtnSize.Height() );
-        else
-            aNoneBtnSize.setHeight( aTodayBtnSize.Height() );
-
-        nBtnWidth  = aTodayBtnSize.Width() + aNoneBtnSize.Width() + CALFIELD_SEP_X;
-        nBtnHeight = aTodayBtnSize.Height();
-        long nX = (aOutSize.Width()-nBtnWidth)/2;
-        long nY = aOutSize.Height()+CALFIELD_BORDER_Y+CALFIELD_BORDER_YTOP;
-        mpTodayBtn->SetPosSizePixel( Point( nX, nY ), aTodayBtnSize );
-        nX += aTodayBtnSize.Width() + CALFIELD_SEP_X;
-        mpNoneBtn->SetPosSizePixel( Point( nX, nY ), aNoneBtnSize );
-    }
-    else if ( mpTodayBtn )
-    {
-        Size aTodayBtnSize = mpTodayBtn->GetSizePixel();
-        nBtnWidth  = aTodayBtnSize.Width();
-        nBtnHeight = aTodayBtnSize.Height();
-        mpTodayBtn->SetPosPixel( Point( (aOutSize.Width()-nBtnWidth)/2, aOutSize.Height()+CALFIELD_BORDER_Y+CALFIELD_BORDER_YTOP ) );
-    }
-    else if ( mpNoneBtn )
-    {
-        Size aNoneBtnSize  = mpNoneBtn->GetSizePixel();
-        nBtnWidth  = aNoneBtnSize.Width();
-        nBtnHeight = aNoneBtnSize.Height();
-        mpNoneBtn->SetPosPixel( Point( (aOutSize.Width()-nBtnWidth)/2, aOutSize.Height()+CALFIELD_BORDER_Y+CALFIELD_BORDER_YTOP ) );
-    }
-
-    if ( nBtnHeight )
-    {
-        if ( !mpFixedLine )
-        {
-            mpFixedLine = VclPtr<FixedLine>::Create( this );
-            mpFixedLine->Show();
-        }
-        long nLineWidth = aOutSize.Width()-(CALFIELD_BORDERLINE_X*2);
-        mpFixedLine->setPosSizePixel( (aOutSize.Width()-nLineWidth)/2, aOutSize.Height()+((CALFIELD_BORDER_YTOP-2)/2),
-                                      nLineWidth, 2 );
-        aOutSize.AdjustHeight(nBtnHeight + (CALFIELD_BORDER_Y*2) + CALFIELD_BORDER_YTOP );
-        SetOutputSizePixel( aOutSize );
-    }
-    else
-    {
-        mpFixedLine.disposeAndClear();
-    }
+    mxTodayBtn->set_visible(bEnable);
+    return bEnable ? mxTodayBtn.get() : nullptr;
 }
 
-bool ImplCFieldFloatWin::EventNotify( NotifyEvent& rNEvt )
+weld::Button* ImplCFieldFloat::EnableNoneBtn(bool bEnable)
 {
-    if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
-    {
-        const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
-        if ( pKEvt->GetKeyCode().GetCode() == KEY_RETURN )
-            mpCalendar->Select();
-    }
-
-    return FloatingWindow::EventNotify( rNEvt );
+    mxNoneBtn->set_visible(bEnable);
+    return bEnable ? mxNoneBtn.get() : nullptr;
 }
 
 CalendarField::CalendarField(vcl::Window* pParent, WinBits nWinStyle)
     : DateField(pParent, nWinStyle)
     , mpFloatWin(nullptr)
-    , mpCalendar(nullptr)
     , mpTodayBtn(nullptr)
     , mpNoneBtn(nullptr)
     , mbToday(false)
@@ -218,22 +126,20 @@ CalendarField::~CalendarField()
 
 void CalendarField::dispose()
 {
-    mpCalendar.disposeAndClear();
+    mpTodayBtn = nullptr;
+    mpNoneBtn = nullptr;
     mpFloatWin.disposeAndClear();
-    mpTodayBtn.clear();
-    mpNoneBtn.clear();
     DateField::dispose();
 }
 
-IMPL_LINK( CalendarField, ImplSelectHdl, Calendar*, pCalendar, void )
+IMPL_LINK(CalendarField, ImplSelectHdl, weld::Calendar&, rCalendar, void)
 {
-    if ( pCalendar->IsTravelSelect() )
-        return;
+    Date aNewDate = rCalendar.get_date();
 
-    mpFloatWin->EndPopupMode();
+    vcl::Window::GetDockingManager()->EndPopupMode(mpFloatWin);
+    mpFloatWin->EnableDocking(false);
     EndDropDown();
     GrabFocus();
-    Date aNewDate = mpCalendar->GetFirstSelectedDate();
     if ( IsEmptyDate() || ( aNewDate != GetDate() ) )
     {
         SetDate( aNewDate );
@@ -242,14 +148,14 @@ IMPL_LINK( CalendarField, ImplSelectHdl, Calendar*, pCalendar, void )
     }
 }
 
-IMPL_LINK( CalendarField, ImplClickHdl, Button*, pButton, void )
+IMPL_LINK(CalendarField, ImplClickHdl, weld::Button&, rBtn, void)
 {
-    PushButton* pBtn = static_cast<PushButton*>(pButton);
-    mpFloatWin->EndPopupMode();
+    vcl::Window::GetDockingManager()->EndPopupMode(mpFloatWin);
+    mpFloatWin->EnableDocking(false);
     EndDropDown();
     GrabFocus();
 
-    if ( pBtn == mpTodayBtn )
+    if (&rBtn == mpTodayBtn)
     {
         Date aToday( Date::SYSTEM );
         if ( (aToday != GetDate()) || IsEmptyDate() )
@@ -259,7 +165,7 @@ IMPL_LINK( CalendarField, ImplClickHdl, Button*, pButton, void )
             Modify();
         }
     }
-    else if ( pBtn == mpNoneBtn )
+    else if (&rBtn == mpNoneBtn)
     {
         if ( !IsEmptyDate() )
         {
@@ -274,63 +180,46 @@ IMPL_LINK_NOARG(CalendarField, ImplPopupModeEndHdl, FloatingWindow*, void)
 {
     EndDropDown();
     GrabFocus();
-    mpCalendar->EndSelection();
 }
 
 bool CalendarField::ShowDropDown( bool bShow )
 {
     if ( bShow )
     {
-        Calendar* pCalendar = GetCalendar();
+        if ( !mpFloatWin )
+            mpFloatWin = VclPtr<ImplCFieldFloatWin>::Create( this );
 
         Date aDate = GetDate();
         if ( IsEmptyDate() || !aDate.IsValidAndGregorian() )
         {
             aDate = Date( Date::SYSTEM );
         }
-        pCalendar->SetCurDate( aDate );
-        Point       aPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) );
-        tools::Rectangle   aRect( aPos, GetSizePixel() );
+        weld::Calendar* pCalendar = mpFloatWin->mxWidget->GetCalendar();
+        pCalendar->set_date( aDate );
+        pCalendar->connect_activated(LINK(this, CalendarField, ImplSelectHdl));
+        mpTodayBtn = mpFloatWin->mxWidget->EnableTodayBtn(mbToday);
+        mpNoneBtn = mpFloatWin->mxWidget->EnableNoneBtn(mbNone);
+        if (mpTodayBtn)
+            mpTodayBtn->connect_clicked( LINK( this, CalendarField, ImplClickHdl ) );
+        if (mpNoneBtn)
+            mpNoneBtn->connect_clicked( LINK( this, CalendarField, ImplClickHdl ) );
+        Point aPos(GetParent()->OutputToScreenPixel(GetPosPixel()));
+        tools::Rectangle aRect(aPos, GetSizePixel());
         aRect.AdjustBottom( -1 );
-        mpCalendar->SetOutputSizePixel( mpCalendar->CalcWindowSizePixel() );
-        mpFloatWin->SetOutputSizePixel( mpCalendar->GetSizePixel() );
-        mpFloatWin->SetCalendar( mpCalendar );
-        mpTodayBtn = mpFloatWin->EnableTodayBtn( mbToday );
-        mpNoneBtn = mpFloatWin->EnableNoneBtn( mbNone );
-        if ( mpTodayBtn )
-            mpTodayBtn->SetClickHdl( LINK( this, CalendarField, ImplClickHdl ) );
-        if ( mpNoneBtn )
-            mpNoneBtn->SetClickHdl( LINK( this, CalendarField, ImplClickHdl ) );
-        mpFloatWin->ArrangeButtons();
-        mpCalendar->EnableCallEverySelect();
-        mpCalendar->StartSelection();
-        mpCalendar->GrabFocus();
-        mpCalendar->Show();
-        mpFloatWin->StartPopupMode( aRect, FloatWinPopupFlags::Down );
+        DockingManager* pDockingManager = vcl::Window::GetDockingManager();
+        mpFloatWin->EnableDocking(true);
+        pDockingManager->SetPopupModeEndHdl(mpFloatWin, LINK(this, CalendarField, ImplPopupModeEndHdl));
+        pDockingManager->StartPopupMode(mpFloatWin, aRect, FloatWinPopupFlags::Down | FloatWinPopupFlags::GrabFocus);
     }
     else
     {
-        mpFloatWin->EndPopupMode( FloatWinPopupEndFlags::Cancel );
-        mpCalendar->EndSelection();
+        vcl::Window::GetDockingManager()->EndPopupMode(mpFloatWin);
+        mpFloatWin->EnableDocking(false);
         EndDropDown();
     }
     return true;
 }
 
-Calendar* CalendarField::GetCalendar()
-{
-    if ( !mpFloatWin )
-    {
-        mpFloatWin = VclPtr<ImplCFieldFloatWin>::Create( this );
-        mpFloatWin->SetPopupModeEndHdl( LINK( this, CalendarField, ImplPopupModeEndHdl ) );
-        mpCalendar = VclPtr<Calendar>::Create( mpFloatWin, WB_TABSTOP );
-        mpCalendar->SetPosPixel( Point() );
-        mpCalendar->SetSelectHdl( LINK( this, CalendarField, ImplSelectHdl ) );
-    }
-
-    return mpCalendar;
-}
-
 void CalendarField::StateChanged( StateChangedType nStateChange )
 {
     DateField::StateChanged( nStateChange );
diff --git a/svtools/uiconfig/ui/calendar.ui b/svtools/uiconfig/ui/calendar.ui
new file mode 100644
index 000000000000..ded23beba3c9
--- /dev/null
+++ b/svtools/uiconfig/ui/calendar.ui
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.2 -->
+<interface domain="svt">
+  <requires lib="gtk+" version="3.18"/>
+  <object class="GtkBox" id="Calendar">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">6</property>
+    <child>
+      <object class="GtkCalendar" id="date">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="year">2019</property>
+        <property name="month">1</property>
+        <property name="day">14</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkSeparator">
+        <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">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkButtonBox" id="buttonbox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <property name="layout_style">spread</property>
+        <child>
+          <object class="GtkButton" id="today">
+            <property name="label" context="calendar|STR_SVT_CALENDAR_TODAY">Today</property>
+            <property name="can_focus">True</property>
+            <property name="can_default">True</property>
+            <property name="receives_default">True</property>
+            <property name="no_show_all">True</property>
+            <property name="use_underline">True</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="none">
+            <property name="label" context="calendar|STR_SVT_CALENDAR_NONE">None</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="no_show_all">True</property>
+          </object>
+          <packing>
+            <property name="expand">True</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">2</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index fcbb633fb003..aa645b39e74b 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2168,7 +2168,9 @@ VclPtr<SpinField> DbDateField::createField( vcl::Window* _pParent, WinBits _nFie
 
     VclPtr<CalendarField> pField = VclPtr<CalendarField>::Create( _pParent, _nFieldStyle );
 
+    fprintf(stderr, "start EnableToday\n");
     pField->EnableToday();
+    fprintf(stderr, "end EnableToday\n");
     pField->EnableNone();
 
     return pField;
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 5894d88bd94b..a4219c62df28 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -439,7 +439,6 @@ void Window::SetMouseTransparent( bool bTransparent )
 
 void Window::CaptureMouse()
 {
-
     ImplSVData* pSVData = ImplGetSVData();
 
     // possibly stop tracking


More information about the Libreoffice-commits mailing list