/* -*- 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_SVX_SDTAKITM_HXX #define INCLUDED_SVX_SDTAKITM_HXX #include #include #include /** * Animation type for text frame. */ enum SdrTextAniKind { SDRTEXTANI_NONE, /// no animation SDRTEXTANI_BLINK, /// blinking SDRTEXTANI_SCROLL, /// scroll through SDRTEXTANI_ALTERNATE, /// scroll back and forth SDRTEXTANI_SLIDE /// scroll in }; // - SDRTEXTANI_BLINK: // Just blink. Direction and Amount don't effect things. // Frequency delay: 0 = 0.5Hz (Delay = 250). // Count = number of blinks. (0 = forever) // start inside: sal_False = begin with the blinker off, sal_True = begin with the blinker on // stop inside: sal_False = end with the blinker off, sal_True = end with the blinker on // (Only if count! = 0) // - SDRTEXTANI_SCROLL: // Text just scrolls all the way through, and starts over when it is done. // Delay in ms: (except delay = 0 means 50ms (20Hz) default) // Count = number of passes (0 = go forever) // Direction: the direction to scroll // StartInside: sal_False = on the first pass, scroll the text in (not initially visible) // sal_True = on the first pass, the left part of the text is already visible // in the scroll area before starting. // StopInside: sal_False = on the last pass, scroll the text all the way out. // sal_True = on the last pass, keep the right part of the text visible. // (Only if count! = 0) // Amount: Step size in logical units. Negative values = use Pixels instead // of logical units. If Amount = 0, then default to 1 Pixel. // - SDRTEXTANI_ALTERNATE: // Like SDRTEXTANI_SCROLL, except don't scroll until all of the text is out, // but just until the last part is visible. Then, change direction and // scroll the text the other way. // Count = number of passes (number of direction changes minus 1) // If count = 1, this is the same as SDRTEXTANI_SCROLL // Direction = the starting direction. // All Other Parameters: just like SDRTEXTANI_SCROLL // - SDRTEXTANI_SLIDE: // Text will slide in to the original position. // -> same as SCROLL with StartInside = sal_False, StopInside = sal_True // and Count = 1 (Count = 0 is interpreted as count = 1). // For each count > 1, the text, will be slid out backwards // (much like ALTERNATE) and then slid back in again. // StopInside is not evaluated, because inside is always stopped. // StartInside is not evaluated, because outside is always started. // All other parameters are like SDRTEXTANI_SCROLL // StartInside, StopInside: When sal_True, the starting / final position // of the text depends on the anchor of the drawing object. This // corresponds to the position of the text in normal Paint (without scrolling). class SVX_DLLPUBLIC SdrTextAniKindItem: public SfxEnumItem { public: SdrTextAniKindItem(SdrTextAniKind eKind=SDRTEXTANI_NONE): SfxEnumItem(SDRATTR_TEXT_ANIKIND,(sal_uInt16)eKind) {} SdrTextAniKindItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_ANIKIND,rIn) {} virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override; virtual sal_uInt16 GetValueCount() const override; // { return 5; } SdrTextAniKind GetValue() const { return (SdrTextAniKind)SfxEnumItem::GetValue(); } virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; virtual OUString GetValueTextByPos(sal_uInt16 nPos) const override; virtual bool GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, OUString& rText, const IntlWrapper * = nullptr) const override; }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ alue='distro/collabora/libreoffice-7-5+backports'>distro/collabora/libreoffice-7-5+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-15Turn onlineupdate into external/onlineupdateStephan Bergmann
...and update to latest Mozilla sources. Originally, this was a non-external onlineupdate module (plus correspsonding top-level include/onlineupdate/ directory) that apparently contained sources originally copied from Mozilla and subsequently modified in-place (plus, mixed in, presumably some sources that were not copied from Mozilla but were our own inventions). To clean up this mess, this has been turned into a proper external/onlineupdate module with a tarball containing the pristine external Mozilla sources. The sources for the onlineupdate-c003be8b9727672e7d30972983b375f4c200233f.tar.xz tarball are taken, somewhat arbitrarily, from a recent <https://github.com/mozilla/gecko-dev/commit/c003be8b9727672e7d30972983b375f4c200233f> ("Bug 1867784 - Force reflow all kids in the last column balancing reflow. r=layout-reviewers,dholbert") trunk state, by running `external/onlineupdate/generate-sources.sh ~/github.com/mozilla/gecko-dev` on a Fedora 39 machine. The layout of the tarball still mostly follows the old onlineupdate/ layout, even if that deviates heavily from the actual source layout at <https://github.com/mozilla/gecko-dev/>. (And some files, which apparently are not needed, anyway, lacked sources, see the "Missing source for" in external/onlineupdate/generate-sources.sh. And win_dirent.h/.cpp has meanwhile been superseded by updateutils_win.h/.cpp.) Merely newly included source files are laid out in the tarball according to the actual source layout. Any LO-specific modifications are made via patch files (rather than modifying the sources inline, as was done in the past): external/onlineupdate/lo.patch contains whatever modifications are needed to adapt the functionality, while external/onlineupdate/gtk3deprecated.patch fixes > workdir/UnpackedTarball/onlineupdate/onlineupdate/source/update/updater/progressui_gtk.cpp:97:21: error: use of undeclared identifier 'gtk_vbox_new'; did you mean 'gtk_box_new'? > 97 | GtkWidget* vbox = gtk_vbox_new(TRUE, 6); > | ^~~~~~~~~~~~ > | gtk_box_new to not use the deprecated gtk_vbox_new, which is hidden because we include -DGTK_DISABLE_DEPRECATED in our GTK3_CFLAGS as per our configure.ac. On Windows, the definition of __BYTE_ORDER__ etc. is needed because workdir/UnpackedTarball/onlineupdate/include/mozilla/ says "Our supported compilers provide architecture-independent macros for this", but MSVC doesn't actually, so define here what would implicitly be defined by GCC. Similarly, on Windows -U_WIN32_WINNT is needed to undo -D_WIN32_WINNT=0x0601 in solenv/gbuild/platform/windows.mk, which would cause > workdir\UnpackedTarball\onlineupdate\include\mozilla/WinHeaderOnlyUtils.h(537): error C2065: 'FILE_ID_INFO': undeclared identifier etc., despite the #include <windws.h> there. Curiously, the original gb_CustomTarget_CustomTarget,onlineupdate/generated from onlineupdate/CustomTarget_generated.mk had to be renamed to gb_CustomTarget_CustomTarget,external/onlineupdate/generated when the file was moved to external/onlineupdate/CustomTarget_generated.mk, as otherwise a top-level `make CustomTarget_onlineupdate/generated` would have failed with "No rule to make target..." Also, as there is no gb_CustomTarget_use_unpacked, its effect has been poorly mimicked for now in external/onlineupdate/CustomTarget_generated.mk. Similarly, as there is no gb_WinResTarget_use_unpacked, its effect has been poorly mimicked for now in external/onlineupdate/WinResTarget_updater.mk. The original onlineupdate/workben/test_dialog.cxx, which is actually code written by us, has been moved to external/onlineupdate/workben/test_dialog.cxx. The original onlineupdate/qa/ sources (which were apparently not used during the build) have been preserved for now as external/onlineupdate/qa/, for documentation purposes. The original onlineupdate/astyle.options (which was apparently not used during the build) has been removed. Change-Id: I5ea606202e7837269e7b128e45af2f0b8c277f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160492 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>