[Libreoffice-commits] core.git: 3 commits - extensions/source include/svx sc/inc sc/source svx/source
Caolán McNamara
caolanm at redhat.com
Fri May 1 05:10:17 PDT 2015
extensions/source/dbpilots/unoautopilot.hxx | 6 ++++--
include/svx/ctredlin.hxx | 3 ++-
sc/inc/chgviset.hxx | 13 +++++--------
sc/source/core/tool/chgviset.cxx | 6 +++---
sc/source/filter/xml/xmlimprt.cxx | 2 +-
sc/source/ui/miscdlgs/highred.cxx | 2 +-
sc/source/ui/view/viewutil.cxx | 14 +++++++-------
svx/source/dialog/ctredlin.cxx | 4 ++++
8 files changed, 27 insertions(+), 23 deletions(-)
New commits:
commit 0978dbbab46ce1f37ed4f27b8358c1a44c02143f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 1 12:53:35 2015 +0100
another attempt to get coverity to parse this
i.e.
coverity#1296212 Misused comma operator
coverity#1296213 Misused comma operator
Change-Id: I8f02530e151ac597f58710894891c3ac559d91ce
diff --git a/extensions/source/dbpilots/unoautopilot.hxx b/extensions/source/dbpilots/unoautopilot.hxx
index a7678c1..0a0bcf8 100644
--- a/extensions/source/dbpilots/unoautopilot.hxx
+++ b/extensions/source/dbpilots/unoautopilot.hxx
@@ -84,12 +84,14 @@ namespace dbp
// XServiceInfo - static methods
static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw( ::com::sun::star::uno::RuntimeException )
{
- return SERVICEINFO().getServiceNames();
+ SERVICEINFO aInfo;
+ return aInfo.getServiceNames();
}
static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException )
{
- return SERVICEINFO().getImplementationName();
+ SERVICEINFO aInfo;
+ return aInfo.getImplementationName();
}
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
commit aeeb79486305efa46ea76d1041b6c9a9c745bfea
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 1 12:50:33 2015 +0100
coverity#1296292 merge these two enum types
Change-Id: I4f82ca5f7a6b392322225c0b871dbaffeba44377
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 93e8390..43e7181 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -38,7 +38,7 @@
enum class SvxRedlinDateMode
{
- BEFORE, SINCE, EQUAL, NOTEQUAL, BETWEEN, SAVE
+ BEFORE, SINCE, EQUAL, NOTEQUAL, BETWEEN, SAVE, NONE
};
/// Struct for sorting data.
diff --git a/sc/inc/chgviset.hxx b/sc/inc/chgviset.hxx
index aa66f76..55440e8 100644
--- a/sc/inc/chgviset.hxx
+++ b/sc/inc/chgviset.hxx
@@ -20,13 +20,10 @@
#define INCLUDED_SC_INC_CHGVISET_HXX
#include <tools/datetime.hxx>
+#include <svx/ctredlin.hxx>
#include "rangelst.hxx"
#include "scdllapi.h"
-enum ScChgsDateMode{ SCDM_DATE_BEFORE=0,SCDM_DATE_SINCE=1,SCDM_DATE_EQUAL=2,
- SCDM_DATE_NOTEQUAL=3,SCDM_DATE_BETWEEN=4, SCDM_DATE_SAVE=5,
- SCDM_NO_DATEMODE=6};
-
namespace utl {
class TextSearch;
}
@@ -43,7 +40,7 @@ private:
OUString aAuthorToShow;
OUString aComment;
ScRangeList aRangeList;
- ScChgsDateMode eDateMode;
+ SvxRedlinDateMode eDateMode;
bool bShowIt;
bool bIsDate;
bool bIsAuthor;
@@ -62,7 +59,7 @@ public:
: pCommentSearcher(NULL)
, aFirstDateTime(DateTime::EMPTY)
, aLastDateTime(DateTime::EMPTY)
- , eDateMode(SCDM_DATE_BEFORE)
+ , eDateMode(SvxRedlinDateMode::BEFORE)
, bShowIt(false)
, bIsDate(false)
, bIsAuthor(false)
@@ -87,8 +84,8 @@ public:
bool HasDate() const {return bIsDate;}
void SetHasDate(bool nFlag) {bIsDate=nFlag;}
- void SetTheDateMode(ScChgsDateMode eDatMod){ eDateMode=eDatMod; }
- ScChgsDateMode GetTheDateMode() const { return eDateMode; }
+ void SetTheDateMode(SvxRedlinDateMode eDatMod){ eDateMode=eDatMod; }
+ SvxRedlinDateMode GetTheDateMode() const { return eDateMode; }
void SetTheFirstDateTime(const DateTime& aDateTime) {aFirstDateTime=aDateTime;}
const DateTime& GetTheFirstDateTime()const {return aFirstDateTime;}
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index 01f830c..0526c64 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -115,13 +115,13 @@ void ScChangeViewSettings::AdjustDateMode( const ScDocument& rDoc )
{
switch ( eDateMode )
{ // corresponds with ScViewUtil::IsActionShown
- case SCDM_DATE_EQUAL :
- case SCDM_DATE_NOTEQUAL :
+ case SvxRedlinDateMode::EQUAL :
+ case SvxRedlinDateMode::NOTEQUAL :
aFirstDateTime.SetTime( 0 );
aLastDateTime = aFirstDateTime;
aLastDateTime.SetTime( 23595999 );
break;
- case SCDM_DATE_SAVE:
+ case SvxRedlinDateMode::SAVE:
{
const ScChangeAction* pLast = 0;
ScChangeTrack* pTrack = rDoc.GetChangeTrack();
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 695f847..5823cd3 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2476,7 +2476,7 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
else if (sName == "ShowChangesByDatetimeMode")
{
if (rChangeProps[i].Value >>= nTemp16)
- pViewSettings->SetTheDateMode(ScChgsDateMode(nTemp16));
+ pViewSettings->SetTheDateMode(static_cast<SvxRedlinDateMode>(nTemp16));
}
else if (sName == "ShowChangesByDatetimeFirstDatetime")
{
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index 8141ca0..6d75620 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -223,7 +223,7 @@ IMPL_LINK( ScHighlightChgDlg, OKBtnHdl, PushButton*, pOKBtn )
{
aChangeViewSet.SetShowChanges(m_pHighlightBox->IsChecked());
aChangeViewSet.SetHasDate(m_pFilterCtr->IsDate());
- ScChgsDateMode eMode = (ScChgsDateMode) m_pFilterCtr->GetDateMode();
+ SvxRedlinDateMode eMode = m_pFilterCtr->GetDateMode();
aChangeViewSet.SetTheDateMode( eMode );
Date aFirstDate( m_pFilterCtr->GetFirstDate() );
tools::Time aFirstTime( m_pFilterCtr->GetFirstTime() );
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 4c82a4f..b70211e 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -178,35 +178,35 @@ bool ScViewUtil::IsActionShown( const ScChangeAction& rAction,
if ( !rSettings.GetTheRangeList().Intersects( rAction.GetBigRange().MakeRange() ) )
return false;
- if ( rSettings.HasDate() && rSettings.GetTheDateMode() != SCDM_NO_DATEMODE )
+ if (rSettings.HasDate() && rSettings.GetTheDateMode() != SvxRedlinDateMode::NONE)
{
DateTime aDateTime = rAction.GetDateTime();
const DateTime& rFirst = rSettings.GetTheFirstDateTime();
const DateTime& rLast = rSettings.GetTheLastDateTime();
switch ( rSettings.GetTheDateMode() )
{ // corresponds with ScHighlightChgDlg::OKBtnHdl
- case SCDM_DATE_BEFORE:
+ case SvxRedlinDateMode::BEFORE:
if ( aDateTime > rFirst )
return false;
break;
- case SCDM_DATE_SINCE:
+ case SvxRedlinDateMode::SINCE:
if ( aDateTime < rFirst )
return false;
break;
- case SCDM_DATE_EQUAL:
- case SCDM_DATE_BETWEEN:
+ case SvxRedlinDateMode::EQUAL:
+ case SvxRedlinDateMode::BETWEEN:
if ( aDateTime < rFirst || aDateTime > rLast )
return false;
break;
- case SCDM_DATE_NOTEQUAL:
+ case SvxRedlinDateMode::NOTEQUAL:
if ( aDateTime >= rFirst && aDateTime <= rLast )
return false;
break;
- case SCDM_DATE_SAVE:
+ case SvxRedlinDateMode::SAVE:
{
ScChangeTrack* pTrack = rDocument.GetChangeTrack();
if ( !pTrack || pTrack->GetLastSavedActionNumber() >=
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 641926c..27d580a 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -215,6 +215,8 @@ void SvxRedlinTable::UpdateFilterTest()
aDaTiFilterFirst=aDaTiFirst;
aDaTiFilterLast=aDaTiLast;
break;
+ case SvxRedlinDateMode::NONE:
+ break;
}
}
@@ -668,6 +670,8 @@ void SvxTPFilter::ShowDateFields(SvxRedlinDateMode nKind)
EnableDateLine1(false);
EnableDateLine2(false);
break;
+ case SvxRedlinDateMode::NONE:
+ break;
}
}
commit ee494e4a157cdcb016e45fa5cb52604f29e074d9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 1 12:44:57 2015 +0100
missing header for Checkbox
Change-Id: I7eab4aa6b248bd57aca3c2ef2a68b79a29fa9dac
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 07e0578..93e8390 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -26,6 +26,7 @@
#include <svtools/svtabbx.hxx>
#include <svtools/treelistentry.hxx>
#include <tools/datetime.hxx>
+#include <vcl/button.hxx>
#include <vcl/combobox.hxx>
#include <vcl/field.hxx>
#include <vcl/fixed.hxx>
More information about the Libreoffice-commits
mailing list