/* -*- 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 . */ /** Parses the starmath code and creates the nodes. * */ #pragma once #include "parsebase.hxx" #include class SmParser5 final : public AbstractSmParser { OUString m_aBufferString; SmToken m_aCurToken; ESelection m_aCurESelection; std::vector m_aErrDescList; int m_nCurError; sal_Int32 m_nBufferIndex, m_nTokenIndex; sal_Int32 m_nRow, // 1-based m_nColOff; // 0-based bool m_bImportSymNames, m_bExportSymNames; sal_Int32 m_nParseDepth; // map of used symbols (used to reduce file size by exporting only actually used symbols) std::set m_aUsedSymbols; // CharClass representing a locale for parsing numbers CharClass m_aNumCC; // pointer to System locale's CharClass, which is alive inside SM_MOD() const CharClass* m_pSysCC; SmParser5(const SmParser5&) = delete; SmParser5& operator=(const SmParser5&) = delete; // Moves between tokens inside starmath code. void NextToken(); void NextTokenColor(SmTokenType dvipload); void NextTokenFontSize(); sal_Int32 GetTokenIndex() const { return m_nTokenIndex; } void Replace(sal_Int32 nPos, sal_Int32 nLen, std::u16string_view aText); inline bool TokenInGroup(TG nGroup); // grammar std::unique_ptr DoTable(); std::unique_ptr DoLine(); std::unique_ptr DoExpression(bool bUseExtraSpaces = true); std::unique_ptr DoRelation(); std::unique_ptr DoSum(); std::unique_ptr DoProduct(); std::unique_ptr DoSubSup(TG nActiveGroup, std::unique_ptr xGivenNode); std::unique_ptr DoSubSupEvaluate(std::unique_ptr xGivenNode); std::unique_ptr DoOpSubSup(); std::unique_ptr DoPower(); std::unique_ptr DoBlank(); std::unique_ptr DoTerm(bool bGroupNumberIdent); std::unique_ptr DoEscape(); std::unique_ptr DoOperator(); std::unique_ptr DoOper(); std::unique_ptr DoUnOper(); std::unique_ptr DoAlign(bool bUseExtraSpaces = true); std::unique_ptr DoFontAttribute(); std::unique_ptr DoAttribute(); std::unique_ptr DoFont(); std::unique_ptr DoFontSize(); std::unique_ptr DoColor(); std::unique_ptr DoBrace(); std::unique_ptr DoBracebody(bool bIsLeftRight); std::unique_ptr DoEvaluate(); std::unique_ptr DoFunction(); std::unique_ptr DoBinom(); std::unique_ptr DoFrac(); std::unique_ptr DoStack(); std::unique_ptr DoMatrix(); std::unique_ptr DoSpecial(); std::unique_ptr DoGlyphSpecial(); std::unique_ptr DoError(SmParseError Error); // end of grammar public: SmParser5(); virtual ~SmParser5(); /** Parse rBuffer to formula tree */ std::unique_ptr Parse(const OUString& rBuffer); /** Parse rBuffer to formula subtree that constitutes an expression */ std::unique_ptr ParseExpression(const OUString& rBuffer); const OUString& GetText() const { return m_aBufferString; }; bool IsImportSymbolNames() const { return m_bImportSymNames; } void SetImportSymbolNames(bool bVal) { m_bImportSymNames = bVal; } bool IsExportSymbolNames() const { return m_bExportSymNames; } void SetExportSymbolNames(bool bVal) { m_bExportSymNames = bVal; } const SmErrorDesc* NextError(); const SmErrorDesc* PrevError(); const SmErrorDesc* GetError() const; const std::set& GetUsedSymbols() const { return m_aUsedSymbols; } }; inline bool SmParser5::TokenInGroup(TG nGroup) { return bool(m_aCurToken.nGroup & nGroup); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ora/libreoffice-7-6+backports'>distro/collabora/libreoffice-7-6+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-27Remove support for AIXStephan Bergmann
As discussed in the mailing list thread starting at <https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html> "Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)", the bridge implementation at bridges/source/cpp_uno/gcc3_aix_powerpc is apparently dead and should thus be removed. However, that was the only bridge implementation for AIX, which implies that support for the AIX platform as a whole is dead and should thus be removed. Change-Id: I96de3f7f97d4fd770ff78256f0ea435383688be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-05WASM: add initial support for Emscripten cross buildJan-Marek Glogowski
- configure with: - --host=wasm64-local-emscripten - had to make a few externals optional, so adding: - --disable-nss - --disable-cmis - --disable-curl Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2020-10-09Enable building for WSL (Linux) on WSLTor Lillqvist
Change-Id: I47a81a730735ff8c315a57a78c418da2b771e838 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104123 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-10-04Step towards building for Windows on WSL: ProgramFiles(x86) handlingTor Lillqvist
autogen.sh is a Perl script. When running Perl on WSL, weirdly named environment variables like the "ProgramFiles(x86)" one don't seem to get imported to a shell child process of the Perl process. So export it as PROGRAMFILESX86 instead. configure.ac will look for that on WSL. (Changes to configure.ac will be coming in small careful steps.) Change-Id: I572c3b1e2f2fab3629d1856d33fcf0dda51217d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103921 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-02-11Introduce INCLUDE: in the distro-configs...Jan Holesovsky
...to be able to have a common base for things, and then apply some additional stuff on top - in this case the Android branding for the CP builds. Change-Id: I43118bba84fddb8508cc4688c83c2d81a103d781 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88440 Tested-by: Jan Holesovsky <kendy@collabora.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 8dd75f47d9d571ed557fd360b8f9ff7aaca335af) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88400 Tested-by: Jenkins
2019-12-18Remove "--clean" option from autogen.shStepas Toliautas
autogen.sh seems to be used as a preprocessor for configure script, so it has only a few options itself. However, "--clean" option, which is even documented in script's help message, now touches only two items in repository (on Windows): autom4te.cache folder, which is refreshed during autogen.sh run anyway, and install-sh script, which is NOT regenerated afterwards. So using --clean actually breaks configuration setup. Please check if anyone still uses --clean for its original purpose and remove this feature or automate install-sh regeneration. Change-Id: Ic3991ea4e53cea5ad07696f9b75acf9176eb7ce1 Reviewed-on: https://gerrit.libreoffice.org/85247 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-26autogen.sh: add --help description about the --with-distro switchGabor Kelemen
Change-Id: I8d9732251b05ec4ec93ce0fc0ba24f2f27d54b18 Reviewed-on: https://gerrit.libreoffice.org/69712 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-30don't require /autoconf/ to be 2.68 (also allow e.g. autoconf268)Christian Lohmaier
partially reverts 182f5a0f34fa45d2f74ba22eda41d4e39dca93e5 in the sense that configure still insists on autoconf 2.68, but in a way that allows to specify an already installed copy (that the libnumbertext build already picked up successfully) While there is autoconf268 package, it gets installed as autoconf268, but aclocal doesn't provide a way to use something else than "autoconf" In the spirit of "keeping it simple", no conditional check is done whether libnumbertext is actually enabled or not. Change-Id: Ice05a70ef56a4ed3428c74d15d6aeeaa54f71c0b Reviewed-on: https://gerrit.libreoffice.org/67159 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2018-11-25Better way of enabling Developer Toolset 7 for Jenkins' linux_gcc_release_64Stephan Bergmann
Enabling it in the relevant distro-configs/Jenkins/* file is more intuitive than enabling it in autogen.sh (and avoids issues like d057e61cb5aae15ea37ce9ac824647cd2060e331 "Restrict Developer Toolset to Config=linux_gcc_release_64"), and will also be used for other Jenkins jobs like <https://gerrit.libreoffice.org/#/c/63982/> "Enabling Developer Toolset 7 for Jenkins' lo_tb_master_linux_dbg". Change-Id: If633044a90c35a12a73d60335839af0a106aa20f Reviewed-on: https://gerrit.libreoffice.org/63989 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-25Restrict Developer Toolset to Config=linux_gcc_release_64Stephan Bergmann
The Jenkins "Gerrit Linux clang/dbgutil" builds started to fail in odd ways, presumably because of having the Developer Toolset in the PATH now when building compilerplugins. So change compilerplugins/clang/pluginhandler.hxx slightly to force rebuild. Change-Id: I97b8f89dc2e20c85f130284ca5326a5c96c2a1ba Reviewed-on: https://gerrit.libreoffice.org/63962 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-24Make Jenkins linux_gcc_release_64 pick up Developer Toolset 7Stephan Bergmann
...as discussed at <https://lists.freedesktop.org/archives/libreoffice/2018-November/081423.html> "Re: Compiler baselines". It doesn't look exactly right to enable the Developer Toolset from autogen.sh. But the alternative would be to "hide" that in <https://ci.libreoffice.org/job/gerrit_linux_gcc_release/configure>, which would probably not be helpful when developers try to track down why a certain Jenkins build behaves the way it does. So pragmatically stick it in autogen.sh. (Also, it puts Developer Toolset on the PATH whenever it is found on a system using LODE_HOME, not just for the specific Config=linux_gcc_release_64 case. Lets see how that works out in practice.) However, it turns out that the Developer Toolset 7's GCC 7.3.1 with --enable-werror (that is implicitly enabled for LODE-driven builds in configure.ac) and (implicit) --enable-optimized produces many false warnings (i.e., errors), see below for a sample. (Actually, my experience is that contemporary GCC hardly ever work with -Werror in optimized builds, due to analysis being done on already optimized code; it surprised me to find out that the Jnekins linux_gcc_release_64 builds were apparently successfully done with --enable-werror with GCC 4.8.5.) So explicitly --disable-werror for these builds. (Which means that <https://gerrit.libreoffice.org/plugins/gitiles/lode/ +/b82e0a9d26ef4c81046c053ff831dccfc84c56be%5E!> "For linux_gcc_release_64, don't let ccache strip comments" could probably be reverted again if it has negative impact on Jenkins' performance.) Some of the false warnings encountered: > [CXX] jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx > In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/vector:69:0, > from /home/tdf/sberg/core/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:39: > /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/vector.tcc: In function ‘javaPluginError jfw_plugin_startJavaVirtualMachine(const JavaInfo*, const JavaVMOption*, sal_Int32, JavaVM**, JNIEnv**)’: > /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/vector.tcc:407:15: error: variable ‘__new_finish’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] > pointer __new_finish(__new_start); > ^~~~~~~~~~~~ > cc1plus: all warnings being treated as errors > [CXX] libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx > /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx: In function ‘gboolean gtv_calc_header_bar_draw(GtkWidget*, cairo_t*)’: > /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:89:117: error: ‘aRectangle._cairo_rectangle_int::height’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > cairo_move_to(pCairo, rRectangle.x + rRectangle.width / 2 - extents.width / 2, rRectangle.y + rRectangle.height / 2 + extents.height / 2); > ~~~~~~~~~~~~~~~~~~^~~ > /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:102:22: note: ‘aRectangle._cairo_rectangle_int::height’ was declared here > GdkRectangle aRectangle; > ^~~~~~~~~~ > /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:89:59: error: ‘aRectangle._cairo_rectangle_int::width’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > cairo_move_to(pCairo, rRectangle.x + rRectangle.width / 2 - extents.width / 2, rRectangle.y + rRectangle.height / 2 + extents.height / 2); > ~~~~~~~~~~~~~~~~~^~~ > /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:102:22: note: ‘aRectangle._cairo_rectangle_int::width’ was declared here > GdkRectangle aRectangle; > ^~~~~~~~~~ > /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:89:97: error: ‘aRectangle._cairo_rectangle_int::y’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > cairo_move_to(pCairo, rRectangle.x + rRectangle.width / 2 - extents.width / 2, rRectangle.y + rRectangle.height / 2 + extents.height / 2); > ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ > /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:102:22: note: ‘aRectangle._cairo_rectangle_int::y’ was declared here > GdkRectangle aRectangle; > ^~~~~~~~~~ > /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:89:40: error: ‘aRectangle._cairo_rectangle_int::x’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > cairo_move_to(pCairo, rRectangle.x + rRectangle.width / 2 - extents.width / 2, rRectangle.y + rRectangle.height / 2 + extents.height / 2); > ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ > /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:102:22: note: ‘aRectangle._cairo_rectangle_int::x’ was declared here > GdkRectangle aRectangle; > ^~~~~~~~~~ > cc1plus: all warnings being treated as errors > [CXX] svl/source/misc/lockfilecommon.cxx > /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx: In static member function ‘static rtl::OUString svt::LockFileCommon::GetCurrentLocalTime()’: > /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx:190:10: error: ‘%02d’ directive writing between 2 and 5 bytes into a region of size between 1 and 9 [-Werror=format-overflow=] > OUString LockFileCommon::GetCurrentLocalTime() > ^~~~~~~~~~~~~~ > /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx:190:10: note: directive argument in the range [0, 65535] > /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx:190:10: note: directive argument in the range [0, 65535] > /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx:204:24: note: ‘sprintf’ output between 17 and 31 bytes into a destination of size 20 > sprintf( pDateTime, "%02d.%02d.%4d %02d:%02d", aDateTime.Day, aDateTime.Month, aDateTime.Year, aDateTime.Hours, aDateTime.Minutes ); > ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1plus: all warnings being treated as errors Change-Id: I3a851b7591274a8cf8b4729ae036afeb8e82eedc Reviewed-on: https://gerrit.libreoffice.org/63884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-27avoid error message about removing non-existent fileLuboš Luňák
If it's a first build, there are no Makefiles in the build dir. Change-Id: Idec99145a5fb273921f58d92013a1c882cb8b026
2018-06-30autogen.sh: fix out-of-tree module Makefiles for Win32 makeMichael Stahl
These were created as symlinks, which doesn't work with Win32 make as it doesn't understand Cygwin symlinks. Instead, create them as actual files. Note: the reason why they work as symlinks at all is that the Makefile uses $(realpath) and partial_build.mk does not, so they can resolve relative paths from 2 different directories... Change-Id: I4a9abffae82561111a9525fb35ed4b174cc8d96a Reviewed-on: https://gerrit.libreoffice.org/56691 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-19Don't set autogen.sh KEY=VALUE arguments as environment variablesStephan Bergmann
> Jan 18 15:18:25 <sberg> tml__, do you remember anything about > e3a07b8a6cc03b6d5063e4da5a474d8c91a84b0a ? looks odd to add configure > KEY=VALUE args to the environment > Jan 18 15:18:27 <IZBot> core - Include environment variables already in > autogen.sh's environment - > http://cgit.freedesktop.org/libreoffice/core/commit/?id=e3a07b8a6cc03b6d5063e4da5a474d8c91a84b0a > Jan 18 15:22:54 <tml__> sberg: not really any recollection, sorry > Jan 18 15:23:09 <tml__> sberg: are you sure this isn't what makes it possible > to have CC=clang etc in autogen.input? > Jan 18 15:24:07 <tml__> or maybe this is related to propagating stuff when > make re-runs autogen.sh? > Jan 18 15:24:28 <sberg> tml__, configure already takes care itself of its > KEY=VALUE command line arguments > Jan 18 15:24:36 <tml__> sad that I didn't write a better commit message > Jan 18 15:24:55 <tml__> feel free to revert it, and see if anybody notices;) > Jan 18 15:25:04 * cloph_away used it for CC/CXX and devtools repo > Jan 18 15:26:11 <tml__> cloph_away: yes, but I think sberg says that should > work anyway, even without that commit The only reading from ENV after that code in autogen.sh (both today and at the time of e3a07b8a6cc03b6d5063e4da5a474d8c91a84b0a) is the if (defined $ENV{NOCONFIGURE}) { print "Skipping configure process."; check, which would now no longer work if you pass NOCONFIGURE= as an argument to autogen.sh (in autogen.input or on the command line) instead of as an environment variable. Change-Id: If50639978190d219b063ff39f81e29d2054c0443 Reviewed-on: https://gerrit.libreoffice.org/48133 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19Also strip leading whitespace from autogen.input linesStephan Bergmann
...which allows to align --enable/--disable switches on the part being en-/dis- abled, as in > --disable-assert-always-abort > --enable-avahi > --enable-breakpad > --enable-build-unowinreg > --disable-ccache for better readability Change-Id: I490402c74ea1ee535deee6ef79274b588b614820 Reviewed-on: https://gerrit.libreoffice.org/48130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-22Revert "Goodbye autogen.lastrun"Tor Lillqvist
Welcome back autogen.lastrun. I just don't have the energy to convince tinderbox maintainers to fix their scripts. Oh well. This reverts commit 7496c83374f68148c62ac23a6e4c4c314d67273d.
2017-09-22Goodbye autogen.lastrunTor Lillqvist
Change-Id: I46b92baf88661d49da2905699b9639522c0940d8 Reviewed-on: https://gerrit.libreoffice.org/42418 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-08-17Fix typosAndrea Gelmini
Change-Id: Iaa9c0aea3ea1a239e378bd714ba335f91bb1faf3 Reviewed-on: https://gerrit.libreoffice.org/41194 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-17Revert "Don't worry if there is no distro-configs/Foo.conf"Stephan Bergmann
This reverts commit 47bca2f06434346b556d4aa14b16770e0ae990ab. I worry very much when some --with-distro=foo due to a typo doesn't do what I'd expect, and the non-fatal error message scrolled by so quickly nobody would notice. Conflicts: autogen.sh Change-Id: I8e0938e28e5aa23b59c82bbd10db0018e32a44dd Reviewed-on: https://gerrit.libreoffice.org/37701 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-17Show all available distro configsStephan Bergmann
Change-Id: Ibecd89bb12b3e488a4cf25766bd6ffe5a097f135