summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/crstrvl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-06 13:33:15 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-07 08:42:04 +0000
commit08f5355dee375503167989e21271a4601449a257 (patch)
tree051ae7e50b005417f77ee0fd909fc3c27cbb3bbf /sw/source/core/crsr/crstrvl.cxx
parent14f982775cdff2e3779f9a9bcbc0341247ed90aa (diff)
convert RES_FIELDS to scoped enum
and rename to SwFieldIds Change-Id: I50d2b7550f68b4b020ffc1603f931c671c8e1de6 Reviewed-on: https://gerrit.libreoffice.org/34924 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/core/crsr/crstrvl.cxx')
-rw-r--r--sw/source/core/crsr/crstrvl.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index b0de2a06ce62..ea71014b361a 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -646,7 +646,7 @@ lcl_FindField(bool & o_rFound, SetGetExpFields const& rSrtLst,
bool SwCursorShell::MoveFieldType(
const SwFieldType* pFieldType,
const bool bNext,
- const sal_uInt16 nResType,
+ const SwFieldIds nResType,
const bool bAddSetExpressionFieldsToInputFields )
{
// sorted list of all fields
@@ -654,7 +654,7 @@ bool SwCursorShell::MoveFieldType(
if ( pFieldType )
{
- if( RES_INPUTFLD != pFieldType->Which() && !pFieldType->HasWriterListeners() )
+ if( SwFieldIds::Input != pFieldType->Which() && !pFieldType->HasWriterListeners() )
{
return false;
}
@@ -662,7 +662,7 @@ bool SwCursorShell::MoveFieldType(
// found Modify object, add all fields to array
::lcl_MakeFieldLst( aSrtLst, *pFieldType, IsReadOnlyAvailable() );
- if( RES_INPUTFLD == pFieldType->Which() && bAddSetExpressionFieldsToInputFields )
+ if( SwFieldIds::Input == pFieldType->Which() && bAddSetExpressionFieldsToInputFields )
{
// there are hidden input fields in the set exp. fields
const SwFieldTypes& rFieldTypes = *mpDoc->getIDocumentFieldsAccess().GetFieldTypes();
@@ -670,7 +670,7 @@ bool SwCursorShell::MoveFieldType(
for( size_t i=0; i < nSize; ++i )
{
pFieldType = rFieldTypes[ i ];
- if ( RES_SETEXPFLD == pFieldType->Which() )
+ if ( SwFieldIds::SetExp == pFieldType->Which() )
{
::lcl_MakeFieldLst( aSrtLst, *pFieldType, IsReadOnlyAvailable(), true );
}
@@ -714,7 +714,7 @@ bool SwCursorShell::MoveFieldType(
{
// create dummy for the search
SwFormatField* pFormatField = new SwFormatField( SwDateTimeField(
- static_cast<SwDateTimeFieldType*>(mpDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_DATETIMEFLD ) ) ) );
+ static_cast<SwDateTimeFieldType*>(mpDoc->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::DateTime ) ) ) );
pTextField = new SwTextField( *pFormatField, rPos.nContent.GetIndex(),
mpDoc->IsClipBoard() );
@@ -852,7 +852,7 @@ SwField* SwCursorShell::GetCurField( const bool bIncludeInputFieldAtStart ) cons
SwField* pCurField = GetFieldAtCursor( pCursor, bIncludeInputFieldAtStart );
if ( pCurField != nullptr
- && RES_TABLEFLD == pCurField->GetTyp()->Which() )
+ && SwFieldIds::Table == pCurField->GetTyp()->Which() )
{
// TabellenFormel ? wandel internen in externen Namen um
const SwTableNode* pTableNd = IsCursorInTable();
@@ -1249,13 +1249,13 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
// allow click fields in protected sections
// only placeholder is not possible
if( IsAttrAtPos::Field & rContentAtPos.eContentAtPos
- || RES_JUMPEDITFLD == pField->Which() )
+ || SwFieldIds::JumpEdit == pField->Which() )
pField = nullptr;
}
else
UpdateCursor();
}
- else if( RES_TABLEFLD == pField->Which() &&
+ else if( SwFieldIds::Table == pField->Which() &&
static_cast<const SwTableField*>(pField)->IsIntrnlName() )
{
// create from internal (for CORE) the external
@@ -1654,7 +1654,7 @@ const SwPostItField* SwCursorShell::GetPostItFieldAtCursor() const
{
SwTextAttr* pTextAttr = pTextNd->GetFieldTextAttrAt( pCursorPos->nContent.GetIndex() );
const SwField* pField = pTextAttr != nullptr ? pTextAttr->GetFormatField().GetField() : nullptr;
- if ( pField && pField->Which()== RES_POSTITFLD )
+ if ( pField && pField->Which()== SwFieldIds::Postit )
{
pPostItField = static_cast<const SwPostItField*>(pField);
}