From f4b21849851f96f6b91946998ace4f939389f994 Mon Sep 17 00:00:00 2001 From: Elena Subbotina Date: Wed, 22 Apr 2026 09:12:47 +0300 Subject: [PATCH] fix bug #75103 (cherry picked from commit 1c9ce65ba9969ccdfd874509b5a1d977c7d3825f) --- OOXML/PPTXFormat/Logic/Runs/Fld.h | 14 ++++---------- OOXML/PPTXFormat/Logic/Shape.cpp | 23 ++++++++++++++--------- OOXML/PPTXFormat/Logic/Shape.h | 7 ++++--- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/OOXML/PPTXFormat/Logic/Runs/Fld.h b/OOXML/PPTXFormat/Logic/Runs/Fld.h index 11147428d9..6cdba61d42 100644 --- a/OOXML/PPTXFormat/Logic/Runs/Fld.h +++ b/OOXML/PPTXFormat/Logic/Runs/Fld.h @@ -30,8 +30,6 @@ * */ #pragma once -#ifndef PPTX_LOGIC_FLD_INCLUDE_H_ -#define PPTX_LOGIC_FLD_INCLUDE_H_ #include "RunBase.h" #include "./../RunProperties.h" @@ -60,14 +58,12 @@ namespace PPTX void SetText(const std::wstring& src); virtual std::wstring GetText() const; - public: - std::wstring id; + std::wstring id; - nullable_string type; - - nullable rPr; - nullable pPr; + nullable_string type; + nullable rPr; + nullable pPr; private: nullable_string text; @@ -76,5 +72,3 @@ namespace PPTX }; } // namespace Logic } // namespace PPTX - -#endif // PPTX_LOGIC_FLD_INCLUDE_H diff --git a/OOXML/PPTXFormat/Logic/Shape.cpp b/OOXML/PPTXFormat/Logic/Shape.cpp index 8f036133d8..fef0cef817 100644 --- a/OOXML/PPTXFormat/Logic/Shape.cpp +++ b/OOXML/PPTXFormat/Logic/Shape.cpp @@ -247,11 +247,11 @@ namespace PPTX pWriter->StartNode(name_); pWriter->StartAttributes(); - - pWriter->WriteAttribute(L"useBgFill", useBgFill); - pWriter->WriteAttribute2(L"macro", macro); - pWriter->WriteAttribute(L"modelId", modelId); - pWriter->WriteAttribute(L"fLocksText", fLocksText); + pWriter->WriteAttribute(L"useBgFill", useBgFill); + pWriter->WriteAttribute2(L"macro", macro); + pWriter->WriteAttribute(L"modelId", modelId); + pWriter->WriteAttribute(L"fLocksText", fLocksText); + pWriter->WriteAttribute(L"textlink", textlink); pWriter->EndAttributes(); if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX || @@ -375,10 +375,14 @@ namespace PPTX switch (_at) { - case 0: - { - useBgFill = pReader->GetBool(); - }break; + case 0: + { + useBgFill = pReader->GetBool(); + }break; + case 1: + { + textlink = pReader->GetString2(); + }break; default: break; } @@ -499,6 +503,7 @@ namespace PPTX pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart); pWriter->WriteBool2(0, useBgFill); + pWriter->WriteString2(1, textlink); pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd); pWriter->WriteRecord1(0, nvSpPr); diff --git a/OOXML/PPTXFormat/Logic/Shape.h b/OOXML/PPTXFormat/Logic/Shape.h index 43a37db8f9..151fc4a353 100644 --- a/OOXML/PPTXFormat/Logic/Shape.h +++ b/OOXML/PPTXFormat/Logic/Shape.h @@ -299,7 +299,8 @@ namespace PPTX WritingElement_ReadAttributes_Read_if( oReader, _T("useBgFill"), useBgFill) WritingElement_ReadAttributes_Read_else_if(oReader, _T("macro"), macro) WritingElement_ReadAttributes_Read_else_if(oReader, _T("modelId"), modelId) - WritingElement_ReadAttributes_Read_else_if(oReader, _T("fLocksText"), fLocksText) + WritingElement_ReadAttributes_Read_else_if(oReader, _T("fLocksText"), fLocksText) + WritingElement_ReadAttributes_Read_else_if(oReader, _T("textlink"), textlink) WritingElement_ReadAttributes_End( oReader ) } @@ -340,8 +341,8 @@ namespace PPTX nullable_bool useBgFill; nullable_string macro; nullable_bool fLocksText; - ;; - //------------------------------------------------------------------------------------------------- + nullable_string textlink; +//------------------------------------------------------------------------------------------------- nullable signatureLine; std::wstring m_sClientDataXml; protected: