• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CC 2018: how can I know that the markers "kTextChar_ZeroSpaceNoBreak" found in a "endnote story" are related with endnotes?

New Here ,
Dec 15, 2017 Dec 15, 2017

Copy link to clipboard

Copied

Hi all!

I have been working in this new feature of InDesign CC 2018, endnotes, but all information is related with the "owned item" referenced by endnotes and the way to create a pointer to IEndnoteTextRangeData from IEndnoteReferenceData.

Something like that:

          ....

     do {

        Utils<ITextUtils> iTextUtils;

        if (iTextUtils == nil) {

            ASSERT(iTextUtils);

            break;

        }

        OwnedItemDataList ownedItemList;

        int32 primarySpan = iTextModel->GetPrimaryStoryThreadSpan() - 1;

        if (primarySpan == 0) {

            result = kSuccess;

            break;

        }

        iTextUtils->CollectOwnedItems(iTextModel, 0, primarySpan, &ownedItemList);

        bool16 abortLoop = kFalse;

        for (int32 i = 0; i<ownedItemList.size(); i++) {

            // filter for only references to endnotes

            if (ownedItemList.fClassID == kEndnoteAnchorBoss) {

                InterfacePtr<IEndnoteReferenceData> iEndnoteReferenceData(::GetDataBase(iTextModel), ownedItemList.fUID, UseDefaultIID());

                if (!iEndnoteReferenceData)

                    continue;

                InterfacePtr<IEndnoteTextRangeData>  iEndnoteTextRangeData(iEndnoteReferenceData->QueryEndnoteReference());

                if (!iEndnoteTextRangeData)

                    continue;

                TextIndex    rangeStart = iEndnoteTextRangeData->GetStartTextIndex();

         }

      .....

But, if I know that I am in a "endnote story":

     if ( ::GetClass(iTextModell) == kEndnoteStoryBoss ){ ...}

how can I know that the markers "kTextChar_ZeroSpaceNoBreak" found in this story are related with endnotes? (here there is no "owned items" to identify start and end of endnote text range).

Thank you very much in advance for your help and hints.

Kind regards,

Juanma.

TOPICS
SDK

Views

442

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 10, 2018 Jan 10, 2018

Copy link to clipboard

Copied

Endnote text range contains XML markers at start and end.

kTextChar_ZeroSpaceNoBreak is a XML marker.

Refer sdk/source/sdksamples/codesnippets/SnpManipulateTextEndnode::GetRawEndnoteTextRange().

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 11, 2018 Jan 11, 2018

Copy link to clipboard

Copied

LATEST

Hi Norio!

First of all, thank you very much for your comments.

But I think you have not understood my question, or maybe I did not explain very well.

Yes, I know "kTextChar_ZeroSpaceNoBreak" is a XML marker, but If I am processing all elements of a story, concretly endnote story, and I find this marker, I cannot tell if it's a start or end marker of endnote, or just another type of marker.

That's my question and my problem, if there is a way to know the orgin of these makers only processing the "endnote story".

Thanks in advance for your help.

Kind regards,

Juanma.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines