namespace sw::mark
{
CrossRefBookmark::CrossRefBookmark(const SwPaM& rPaM, const vcl::KeyCode& rCode, const SwMarkName& rName,
std::u16string_view rPrefix)
: Bookmark( // ensure that m_pPos2 is null by only passing start to super
SwPaM(*rPaM.Start()), rCode, rName)
{
assert( IDocumentMarkAccess::IsLegalPaMForCrossRefHeadingBookmark(rPaM)
&& "<CrossRefBookmark::CrossRefBookmark(..)>" "- creation of cross-reference bookmark with an illegal PaM that does not expand over exactly one whole paragraph."); if(rName.isEmpty())
m_aName = MarkBase::GenerateNewName(rPrefix);
assert(!m_oPos2);
}
void CrossRefBookmark::SetMarkPos(const SwPosition& rNewPos)
{
assert(rNewPos.GetNode().GetTextNode() && "<sw::mark::CrossRefBookmark::SetMarkPos(..)>" " - new bookmark position for cross-reference bookmark doesn't mark text node");
assert(rNewPos.GetContentIndex() == 0 && "<sw::mark::CrossRefBookmark::SetMarkPos(..)>" " - new bookmark position for cross-reference bookmark doesn't mark start of text node");
MarkBase::SetMarkPos(rNewPos);
}
SwPosition& CrossRefBookmark::GetOtherMarkPos() const
{
assert(false && "<sw::mark::CrossRefBookmark::GetOtherMarkPos(..)>" " - this should never be called!"); for (;;) { std::abort(); } // avoid "must return a value" warnings
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.