[Libreoffice-commits] core.git: 2 commits - reportdesign/inc reportdesign/source reportdesign/uiconfig sw/source

Herbert Dürr hdu at apache.org
Fri Aug 2 01:28:41 PDT 2013


 reportdesign/inc/helpids.hrc                        |    1 -
 reportdesign/source/ui/dlg/DateTime.cxx             |   20 +++++++++-----------
 reportdesign/uiconfig/dbreport/ui/datetimedialog.ui |    3 ++-
 sw/source/core/layout/layact.cxx                    |   17 +++++++++++------
 4 files changed, 22 insertions(+), 19 deletions(-)

New commits:
commit 6f1b6f6527b06b15aa29ccfd7089a9fb382d42d7
Author: Herbert Dürr <hdu at apache.org>
Date:   Fri Aug 2 07:59:30 2013 +0000

    Resolves: #i122885# handle SmartTag related exceptions gracefully
    
    and support diagnostics by providing exception details
    
    (cherry picked from commit 7334341e5986b7685866a836195fd6d189293cab)
    
    Conflicts:
    	sw/source/core/layout/layact.cxx
    
    Change-Id: I18f4ddafd48f53329d313ada5fe1624974a61894

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 71659ce..cc14c74 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2088,12 +2088,17 @@ sal_Bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
             }
             case SMART_TAGS : // SMARTTAGS
             {
-                const SwRect aRepaint( ((SwTxtFrm*)pCnt)->SmartTagScan( pCntntNode, nTxtPos ) );
-                bPageValid = bPageValid && !pTxtNode->IsSmartTagDirty();
-                if( !bPageValid )
-                    bAllValid = sal_False;
-                if ( aRepaint.HasArea() )
-                    pImp->GetShell()->InvalidateWindows( aRepaint );
+                try {
+                    const SwRect aRepaint( ((SwTxtFrm*)pCnt)->SmartTagScan( pCntntNode, nTxtPos ) );
+                    bPageValid = bPageValid && !pTxtNode->IsSmartTagDirty();
+                    if( !bPageValid )
+                        bAllValid = sal_False;
+                    if ( aRepaint.HasArea() )
+                        pImp->GetShell()->InvalidateWindows( aRepaint );
+                } catch( const ::com::sun::star::uno::RuntimeException& e) {
+                    // #i122885# handle smarttag problems gracefully and provide diagnostics
+                    SAL_WARN( "sw.core", "SMART_TAGS Exception:" << e.Message);
+                }
                 if ( Application::AnyInput( VCL_INPUT_MOUSEANDKEYBOARD|VCL_INPUT_OTHER|VCL_INPUT_PAINT ) )
                     return sal_True;
                 break;
commit 4f950ffb896ce3fb8af6f422a53ea132bc055e1c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 2 10:10:32 2013 +0200

    small expand tweak
    
    +
    
    a) use default dropdown count
    b) SAL_N_ELEMENTS
    
    Change-Id: I67f12137eedb19bcaf79309fc64bf5c29a70e64d

diff --git a/reportdesign/inc/helpids.hrc b/reportdesign/inc/helpids.hrc
index ec0d163..69a581a 100644
--- a/reportdesign/inc/helpids.hrc
+++ b/reportdesign/inc/helpids.hrc
@@ -41,7 +41,6 @@
 #define HID_RPT_SORTORDER                             "REPORTDESIGN_HID_RPT_SORTORDER"
 #define HID_RPT_GROUPSBRW                             "REPORTDESIGN_HID_RPT_GROUPSBRW"
 #define HID_RPT_GROUPSSORTING_DLG                     "REPORTDESIGN_HID_RPT_GROUPSSORTING_DLG"
-#define HID_RPT_DATETIME_DLG                          "REPORTDESIGN_HID_RPT_DATETIME_DLG"
 #define HID_RPT_CONDFORMAT_DLG                        "REPORTDESIGN_HID_RPT_CONDFORMAT_DLG"
 #define HID_RPT_CONDFORMAT_TB                         "REPORTDESIGN_HID_RPT_CONDFORMAT_TB"
 #define HID_RPT_CRTL_FORMAT_PREVIEW                   "REPORTDESIGN_HID_RPT_CRTL_FORMAT_PREVIEW"
diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx
index fecfb0b..2740fdb 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -53,10 +53,10 @@ ODateTimeDialog::ODateTimeDialog( Window* _pParent
                                            ,OReportController* _pController)
     : ModalDialog( _pParent, "DateTimeDialog" , "modules/dbreport/ui/datetimedialog.ui" )
 
-    ,m_aDateControlling()
-    ,m_aTimeControlling()
-    ,m_pController(_pController)
-    ,m_xHoldAlive(_xHoldAlive)
+    , m_aDateControlling()
+    , m_aTimeControlling()
+    , m_pController(_pController)
+    , m_xHoldAlive(_xHoldAlive)
 {
     get(m_pDate,"date");
     get(m_pFTDateFormat,"datelistbox_label");
@@ -76,23 +76,21 @@ ODateTimeDialog::ODateTimeDialog( Window* _pParent
         InsertEntry(util::NumberFormat::DATE);
         InsertEntry(util::NumberFormat::TIME);
     }
-    catch(uno::Exception&)
+    catch (const uno::Exception&)
     {
     }
 
-    m_pDateListBox->SetDropDownLineCount(20);
     m_pDateListBox->SelectEntryPos(0);
 
-    m_pTimeListBox->SetDropDownLineCount(20);
     m_pTimeListBox->SelectEntryPos(0);
 
     // use nice enhancement, to toggle enable/disable if a checkbox is checked or not
     m_aDateControlling.enableOnCheckMark( *m_pDate, *m_pFTDateFormat, *m_pDateListBox);
     m_aTimeControlling.enableOnCheckMark( *m_pTime, *m_pFTTimeFormat, *m_pTimeListBox);
 
-    CheckBox* pCheckBoxes[] = { m_pDate,m_pTime};
-    for ( size_t i = 0 ; i < sizeof(pCheckBoxes)/sizeof(pCheckBoxes[0]); ++i)
-        pCheckBoxes[i]->SetClickHdl(LINK(this,ODateTimeDialog,CBClickHdl));
+    CheckBox* aCheckBoxes[] = { m_pDate,m_pTime};
+    for ( size_t i = 0 ; i < SAL_N_ELEMENTS(aCheckBoxes); ++i)
+        aCheckBoxes[i]->SetClickHdl(LINK(this,ODateTimeDialog,CBClickHdl));
 
 }
 // -----------------------------------------------------------------------------
@@ -165,7 +163,7 @@ short ODateTimeDialog::Execute()
 
             m_pController->executeChecked(SID_DATETIME,aValues);
         }
-        catch(uno::Exception&)
+        catch (const uno::Exception&)
         {
             nRet = RET_NO;
         }
diff --git a/reportdesign/uiconfig/dbreport/ui/datetimedialog.ui b/reportdesign/uiconfig/dbreport/ui/datetimedialog.ui
index 2bf61bd..e8d45ff 100644
--- a/reportdesign/uiconfig/dbreport/ui/datetimedialog.ui
+++ b/reportdesign/uiconfig/dbreport/ui/datetimedialog.ui
@@ -75,7 +75,8 @@
           <object class="GtkGrid" id="grid2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="hexpand">True</property>
+            <property name="halign">start</property>
+            <property name="valign">start</property>
             <property name="vexpand">True</property>
             <property name="row_spacing">6</property>
             <property name="column_spacing">12</property>


More information about the Libreoffice-commits mailing list