[Libreoffice-commits] core.git: sw/inc sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 16 11:05:00 UTC 2020
sw/inc/IDocumentFieldsAccess.hxx | 2 +-
sw/source/core/doc/DocumentFieldsManager.cxx | 3 ++-
sw/source/core/docnode/ndsect.cxx | 4 ++--
sw/source/core/inc/DocumentFieldsManager.hxx | 2 +-
sw/source/core/text/porlay.cxx | 2 +-
sw/source/core/undo/unsect.cxx | 2 +-
6 files changed, 8 insertions(+), 7 deletions(-)
New commits:
commit 009899190ef1e606cac82ab4de2ce0d8438eb09e
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu Jun 11 16:29:51 2020 +0200
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Tue Jun 16 13:04:16 2020 +0200
sw: fix type of FieldsToCalc() parameter
Change-Id: Ic59c65f67c9479c5d43bef4abd67b8e4ee4192b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96128
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx
index 2a2e8935e698..99da34854751 100644
--- a/sw/inc/IDocumentFieldsAccess.hxx
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -122,7 +122,7 @@ namespace com::sun::star::uno { class Any; }
// (Node [ + css::ucb::Content]).
// A generated list of all fields may be passed along too
// (if the address != 0 and the pointer == 0 a new list will be returned).
- virtual void FieldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt) = 0;
+ virtual void FieldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_Int32 nLastCnt) = 0;
virtual void FieldsToCalc(SwCalc& rCalc, const SetGetExpField& rToThisField, SwRootFrame const* pLayout) = 0;
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index 800c9096722f..af90f08f8270 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -1562,7 +1562,8 @@ void DocumentFieldsManager::FieldsToCalc(SwCalc& rCalc,
#endif
}
-void DocumentFieldsManager::FieldsToCalc( SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt )
+void DocumentFieldsManager::FieldsToCalc(SwCalc& rCalc,
+ sal_uLong const nLastNd, sal_Int32 const nLastCnt)
{
// create the sorted list of all SetFields
mpUpdateFields->MakeFieldList( m_rDoc, mbNewFieldLst, GETFLD_CALC );
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 845e3156c765..1c08f9ecbdc9 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -344,7 +344,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
SwCalc aCalc( *this );
if( ! IsInReading() )
{
- getIDocumentFieldsAccess().FieldsToCalc( aCalc, pNewSectNode->GetIndex(), USHRT_MAX );
+ getIDocumentFieldsAccess().FieldsToCalc(aCalc, pNewSectNode->GetIndex(), SAL_MAX_INT32);
}
SwSection& rNewSect = pNewSectNode->GetSection();
rNewSect.SetCondHidden( aCalc.Calculate( rNewSect.GetCondition() ).GetBool() );
@@ -715,7 +715,7 @@ void SwDoc::UpdateSection( size_t const nPos, SwSectionData & rNewData,
SwCalc aCalc( *this );
if( !pIdx )
pIdx = pFormat->GetContent().GetContentIdx();
- getIDocumentFieldsAccess().FieldsToCalc( aCalc, pIdx->GetIndex(), USHRT_MAX );
+ getIDocumentFieldsAccess().FieldsToCalc(aCalc, pIdx->GetIndex(), SAL_MAX_INT32);
/// Because on using SwSection::operator=() to set up <pSection>
/// with <rNewData> and the above given note, the hidden condition flag
diff --git a/sw/source/core/inc/DocumentFieldsManager.hxx b/sw/source/core/inc/DocumentFieldsManager.hxx
index c73345f669c5..493d91acdd03 100644
--- a/sw/source/core/inc/DocumentFieldsManager.hxx
+++ b/sw/source/core/inc/DocumentFieldsManager.hxx
@@ -55,7 +55,7 @@ public:
virtual SwDocUpdateField& GetUpdateFields() const override;
virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen) override;
virtual void SetFixFields(const DateTime* pNewDateTime) override;
- virtual void FieldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt) override;
+ virtual void FieldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_Int32 nLastCnt) override;
virtual void FieldsToCalc(SwCalc& rCalc, const SetGetExpField& rToThisField, SwRootFrame const* pLayout) override;
virtual void FieldsToExpand(SwHashTable<HashStr>& rTable, const SetGetExpField& rToThisField, SwRootFrame const& rLayout) override;
virtual bool IsNewFieldLst() const override;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index b9ed4ec5a393..5f2b74368feb 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2529,7 +2529,7 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTextNode& rNode,
{
SwDoc& rDoc = *const_cast<SwDoc*>(rNode.GetDoc());
SwCalc aCalc(rDoc);
- rDoc.getIDocumentFieldsAccess().FieldsToCalc(aCalc, rNode.GetIndex(), USHRT_MAX);
+ rDoc.getIDocumentFieldsAccess().FieldsToCalc(aCalc, rNode.GetIndex(), SAL_MAX_INT32);
SwSbxValue aValue = aCalc.Calculate(pBookmark->GetHideCondition());
if(!aValue.IsVoidValue())
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index ae2ba60a31c8..db5deea3e57f 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -393,7 +393,7 @@ void SwUndoDelSection::UndoImpl(::sw::UndoRedoContext & rContext)
!aInsertedSect.GetCondition().isEmpty() )
{
SwCalc aCalc( rDoc );
- rDoc.getIDocumentFieldsAccess().FieldsToCalc(aCalc, pInsertedSectNd->GetIndex(), USHRT_MAX);
+ rDoc.getIDocumentFieldsAccess().FieldsToCalc(aCalc, pInsertedSectNd->GetIndex(), SAL_MAX_INT32);
bool bRecalcCondHidden =
aCalc.Calculate( aInsertedSect.GetCondition() ).GetBool();
aInsertedSect.SetCondHidden( bRecalcCondHidden );
More information about the Libreoffice-commits
mailing list