/* -*- 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 . */ #ifndef INCLUDED_XMLOFF_SINGLEPROPERTYSETINFOCACHE_HXX #define INCLUDED_XMLOFF_SINGLEPROPERTYSETINFOCACHE_HXX #include #include #include class SinglePropertySetInfoCache { typedef std::map, bool> Map; OUString sName; Map map_; public: inline SinglePropertySetInfoCache( const OUString& rName ); ~SinglePropertySetInfoCache() {}; bool hasProperty( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rPropSet, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >& rPropSetInfo ); inline bool hasProperty( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rPropSet ); }; inline SinglePropertySetInfoCache::SinglePropertySetInfoCache( const OUString& rName ) : sName( rName ) { } inline bool SinglePropertySetInfoCache::hasProperty( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rPropSet ) { ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo; return hasProperty( rPropSet, xInfo ); } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ tion> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-10-05crashtesting: fix font-dependent infinite loop in kashida justificationJonathan Clark
Commit c3c29d31d77ff93aa50634cfd51c62d12dc0f6ec (tdf#140767 Implemented Syriac justification) indirectly introduced a font-dependent infinite loop in Writer layout by relaxing some restrictions on kashida candidate positions. The infinite loop was found in tdf97806-2.odt. This change fixes an underlying logic bug in Writer, which caused Writer to attempt to apply kashida justification to non-Arabic/Syriac CTL scripts. This change also reintroduces some of the previously-lifted restrictions on kashida candidate positions. Change-Id: I783bf327f4ef0f1f6a032f0d3dddbcfd60a026fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174503 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-09-27tdf#140767 Implemented Syriac justificationJonathan Clark
This change extends kashida justification to Syriac, using custom insertion rules. Change-Id: I7508d2c32e95abb12a098e989c7153828ba81c87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173990 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-09-26tdf#163105 Use HB data while selecting kashida insertion positionsJonathan Clark
Previously, Writer and Edit Engine would skip inserting kashida in words if the highest-priority candidate position is marked as invalid by HarfBuzz. This would happen even if the word contained multiple lower-ranked valid candidate positions. This change updates Writer and Edit Engine to pass HarfBuzz kashida position data to the selection algorithm. The algorithm has been updated to return the highest-priority valid position, if any. The algorithm has also been updated to use raw positions marked as valid by HarfBuzz as a fallback, if no better positions could be found. Change-Id: I40c6432c4607aee197e8767e5667db504469956a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173963 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-09-25tdf#163105 Require kashida after Seen, even before a final YehJonathan Clark
Small tweak to the kashida insertion rules to restore some previous behavior. Kashida should not be inserted after a final Yeh, but should be inserted after an initial or medial Seen, even if it is followed by a final Yeh. Change-Id: I1fef2d32961c6f55006b2df456827588f62af40b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173889 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Tested-by: Jenkins
2024-09-25tdf#163105 Restore some missing kashida opportunitiesJonathan Clark
This change partially reverts the fix for tdf#65344, to allow more candidate kashida insertion positions. The final position fallback from the original ruleset has been restored. Instead, tdf#65344 is now fixed by explicitly prohibiting kashida under a final-position Yeh. Change-Id: I9fe8c656768777c160205ad9892f2fe916a2a926 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173887 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-09-25tdf#163105 Consolidated duplicated kashida justification codeJonathan Clark
The kashida candidate position selection logic was copied-and-pasted from Writer into Edit Engine. This change consolidates the shared code into a library. This change also adds some minimal characteristic tests, which previously did not exist. Change-Id: I2bfbfa79858347803474b754566436f3e74d1a54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173883 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Tested-by: Jenkins