LibreOffice Module sw (master) 1
Functions
edsect.cxx File Reference
#include <editsh.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentContentOperations.hxx>
#include <pam.hxx>
#include <docary.hxx>
#include <swundo.hxx>
#include <section.hxx>
#include <sectfrm.hxx>
#include <cntfrm.hxx>
#include <tabfrm.hxx>
#include <rootfrm.hxx>
#include <osl/diagnose.h>
Include dependency graph for edsect.cxx:

Go to the source code of this file.

Functions

static const SwNodelcl_SpecialInsertNode (const SwPosition *pCurrentPos)
 Find the suitable node for a special insert (alt-enter). More...
 

Function Documentation

◆ lcl_SpecialInsertNode()

static const SwNode * lcl_SpecialInsertNode ( const SwPosition pCurrentPos)
static

Find the suitable node for a special insert (alt-enter).

This should enable inserting text before/after sections and tables.

A node is found if: 1) the innermost table/section is not in a write-protected area 2) pCurrentPos is at or just before an end node (or at or just after a start node) 3) there are only start/end nodes between pCurrentPos and the innermost table/section

If a suitable node is found, an SwNode* is returned; else it is NULL.

Definition at line 299 of file edsect.cxx.

References SwNode::EndOfSectionNode(), SwNode::FindSectionNode(), SwNode::FindTableNode(), SwPosition::GetContentIndex(), SwNode::GetContentNode(), SwNode::GetIndex(), SwNodeIndex::GetNode(), SwPosition::GetNode(), SwNode::IsContentNode(), SwNode::IsEndNode(), SwNode::IsProtect(), SwNode::IsSectionNode(), SwNode::IsStartNode(), SwNode::IsTableNode(), and SwContentNode::Len().

Referenced by SwEditShell::CanSpecialInsert(), and SwEditShell::DoSpecialInsert().