tdf#103680: Implement fallback logic for OpenTypeNode

Change-Id: Idf225fbfb2b761dcd0d230242215e875217f02da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209083
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Aya Jamal
2026-08-12 23:20:50 +02:00
committed by Khaled Hosny
parent b5b7c96470
commit 5324caa4ba
4 changed files with 35 additions and 1 deletions
+1
View File
@@ -82,6 +82,7 @@ $(eval $(call gb_Library_add_exception_objects,sm,\
starmath/source/format \ starmath/source/format \
starmath/source/mathtype \ starmath/source/mathtype \
starmath/source/node \ starmath/source/node \
starmath/source/OpenTypeNode\
starmath/source/ooxmlexport \ starmath/source/ooxmlexport \
starmath/source/ooxmlimport \ starmath/source/ooxmlimport \
starmath/source/rtfexport \ starmath/source/rtfexport \
+1
View File
@@ -310,6 +310,7 @@ public:
* @return * @return
*/ */
virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) = 0; virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) = 0;
virtual void ArrangeOpenType(OutputDevice &rDev, const SmFormat &rFormat);
/** /**
* Appends to rText the node text. * Appends to rText the node text.
+28
View File
@@ -0,0 +1,28 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <node.hxx>
void SmNode::ArrangeOpenType(OutputDevice& rDev, const SmFormat& rFormat)
{
// Fallback: Default to legacy arrange if OpenType is not implemented
Arrange(rDev, rFormat);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+5 -1
View File
@@ -278,7 +278,11 @@ void SmDocShell::ArrangeFormula()
// Numbers should not be converted, for now. // Numbers should not be converted, for now.
pOutDev->SetDigitLanguage( LANGUAGE_ENGLISH ); pOutDev->SetDigitLanguage( LANGUAGE_ENGLISH );
mpTree->Arrange(*pOutDev, rFormat); if (pOutDev->SupportsOpenTypeMath())
mpTree->ArrangeOpenType(*pOutDev, rFormat);
else
mpTree->Arrange(*pOutDev, rFormat);
pOutDev->EnableRTL(bOldRTL); pOutDev->EnableRTL(bOldRTL);