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

Overriden item randomly moved

Participant ,
Jun 09, 2023 Jun 09, 2023

Hi everyone,

I'm applying a master page to a normal page, but when apply the master to the normal one all the item on it are invisible.

So i want to unlock the all the master item applied to the normal page, I've found this method: 

Schermata 2023-06-09 alle 14.06.36.png

Unfortunately sometimes the "overridenItem" isn't in the same position of the masterItem: 

MasterPage

Schermata 2023-06-09 alle 14.11.38.png

Normal page after applying master page and unlock all the items with IMasterSpreadUtils->OverrideMasterPageItem()

Schermata 2023-06-09 alle 14.12.16.png

When I apply the master page the items are perfectly positioned, the problem is when I unlock items.

This shift does not always happen, for most of the time do it correct, but sometimes they are shifted and I don't know why.

Thanks in advance anyone who can help me.

- Stefano

TOPICS
SDK
185
Translate
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
Community Expert ,
Jun 29, 2023 Jun 29, 2023

Are you sure that all pages and parent pages (used to be master pages) are the same physical size?

Mike Witherell
Translate
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
Explorer ,
Jan 31, 2024 Jan 31, 2024

Hi @Stefano5C37 

Did you found any solution to this problem? I am also facing same issue

Translate
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
Explorer ,
Jan 31, 2024 Jan 31, 2024
LATEST

Hi @Stefano5C37 

This is how I fixed position related issue

InterfacePtr<ITransform> iTransform(overriddenItem, UseDefaultIID());
                                        if(iTransform)
                                        {
                                            PMPoint point(pageRect.Left() - mpageRect.Left(),pageRect.Top() - mpageRect.Top());
                                            iTransform->TranslateItemBy(point);
                                        }
Translate
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