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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 19 07:39:33 UTC 2019


 sw/source/filter/ww8/docxattributeoutput.cxx |    8 ++++----
 sw/source/ui/index/cnttab.cxx                |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 9a7e98a1c61667a406eaf7aabe1bf60323877d37
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 18 11:50:19 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 19 09:39:05 2019 +0200

    cid#1448358 Improper use of negative value
    
    Change-Id: Ife6a57484734cab759c31ca4ded688a03400e9b7
    Reviewed-on: https://gerrit.libreoffice.org/75909
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 3f39e6f9a22c..5b1f6c53d099 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2150,7 +2150,7 @@ IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, weld::Button&, rButton, void)
         sal_Int32 nSelPos = m_xAuthFieldsLB->get_active();
         const OUString sToInsert(m_xAuthFieldsLB->get_active_text());
         SwFormToken aInsert(TOKEN_AUTHORITY);
-        aInsert.nAuthorityField = m_xAuthFieldsLB->get_id(nSelPos).toInt32();
+        aInsert.nAuthorityField = m_xAuthFieldsLB->get_id(nSelPos).toUInt32();
         m_xTokenWIN->InsertAtSelection(aInsert);
         m_xAuthFieldsLB->remove_text(sToInsert);
         m_xAuthFieldsLB->set_active(nSelPos ? nSelPos - 1 : 0);
commit 81831152df74f9b097992d9924f25f93872c41f8
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 18 12:31:07 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 19 09:38:52 2019 +0200

    cid#14561625 Unchecked dynamic_cast
    
    Change-Id: Ibe350b00633ae55434da6aafc5829682cead35af
    Reviewed-on: https://gerrit.libreoffice.org/75919
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index d53d51d5d51f..1e5b7ccc9a9c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1921,8 +1921,8 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP
     }
     else if ( rInfos.eType == ww::eFORMDATE )
     {
-        const sw::mark::IDateFieldmark* const pFieldmark = dynamic_cast<const sw::mark::IDateFieldmark* const>(rInfos.pFieldmark);
-        FieldMarkParamsHelper params( *pFieldmark );
+        const sw::mark::IDateFieldmark& rFieldmark = dynamic_cast<const sw::mark::IDateFieldmark&>(*rInfos.pFieldmark);
+        FieldMarkParamsHelper params(rFieldmark);
 
         OUString sFullDate;
         OUString sCurrentDate;
@@ -1933,10 +1933,10 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP
         }
         else
         {
-            std::pair<bool, double> aResult = pFieldmark->GetCurrentDate();
+            std::pair<bool, double> aResult = rFieldmark.GetCurrentDate();
             if(aResult.first)
             {
-                sFullDate = pFieldmark->GetDateInStandardDateFormat(aResult.second) + "T00:00:00Z";
+                sFullDate = rFieldmark.GetDateInStandardDateFormat(aResult.second) + "T00:00:00Z";
             }
         }
 


More information about the Libreoffice-commits mailing list