/* -*- 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_VCL_MAPMOD_HXX #define INCLUDED_VCL_MAPMOD_HXX #include #include #include class Point; class Fraction; class SvStream; class OutputDevice; class VCL_DLLPUBLIC MapMode { friend class OutputDevice; public: struct ImplMapMode; MapMode(); MapMode( const MapMode& rMapMode ); MapMode( MapUnit eUnit ); MapMode( MapUnit eUnit, const Point& rLogicOrg, const Fraction& rScaleX, const Fraction& rScaleY ); ~MapMode(); void SetMapUnit( MapUnit eUnit ); MapUnit GetMapUnit() const; void SetOrigin( const Point& rOrigin ); const Point& GetOrigin() const; void SetScaleX( const Fraction& rScaleX ); const Fraction& GetScaleX() const; void SetScaleY( const Fraction& rScaleY ); const Fraction& GetScaleY() const; /// Gets the multiplier, which is relative to 1/100 mm units double GetUnitMultiplier() const; MapMode& operator=( const MapMode& rMapMode ); MapMode& operator=( MapMode&& rMapMode ); bool operator==( const MapMode& rMapMode ) const; bool operator!=( const MapMode& rMapMode ) const { return !(MapMode::operator==( rMapMode )); } bool IsDefault() const; friend VCL_DLLPUBLIC SvStream& ReadMapMode( SvStream& rIStm, MapMode& rMapMode ); friend VCL_DLLPUBLIC SvStream& WriteMapMode( SvStream& rOStm, const MapMode& rMapMode ); typedef o3tl::cow_wrapper< ImplMapMode > ImplType; private: ImplType mpImplMapMode; SAL_DLLPRIVATE bool IsSimple() const; }; #endif // INCLUDED_VCL_MAPMOD_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ o/collabora/co-24.04 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-06Drop unneeded forward declarations from include/ even harderGabor Kelemen
test drive the new bin/find-unneeded-includes --fwdecl mode with iwyu 0.23 instead of 0.21, this seems to find more unneeded fw declarations Change-Id: I451e571c70eb74f46c799753e3c5a53c0110da36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179707 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-12-24tdf#146619 Recheck include/ with find-unneeded-includes --noexcludeGabor Kelemen
to see if some exclusions became obsolete Change-Id: Id88351f5448511b35994c58c6cb749784da3b45e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156993 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2022-01-28We no longer know how to contact TLX anywayStephan Bergmann
GCC 12 trunk started to warn > svtools/source/control/asynclink.cxx: In member function ‘void svtools::AsynchronLink::HandleCall_PostUserEvent(void*)’: > svtools/source/control/asynclink.cxx:76:15: error: storing the address of local variable ‘bDeleted’ in ‘*this.svtools::AsynchronLink::_pDeleted’ [-Werror=dangling-pointer=] > 76 | _pDeleted = &bDeleted; > | ~~~~~~~~~~^~~~~~~~~~~ > svtools/source/control/asynclink.cxx:75:10: note: ‘bDeleted’ declared here > 75 | bool bDeleted = false; > | ^~~~~~~~ > svtools/source/control/asynclink.cxx:75:10: note: ‘<unknown>’ declared here And while that is arguably a false warning, it points at some dubious code anyway: The only reason for the AsynchronLink _bInCall and _pDeleted members is to potentially SAL_INFO some "valuable historical artefact", if AsynchronLink::Call were ever called recursively. But 0de7513cd73f1f35265e42f9a2b9befe81302c2c "osl::Mutex->std::mutex in AsynchronLink" apparently already argued that such recursive calls can never happen, as locking _aMutex in a recursive call of Call would now deadlock. Change-Id: I9ee47ac65652e40e23a37be3d0694fa1185b877a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129104 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-07-23simplify AsynchronLinkNoel Grandin
Change-Id: Ia13e256fcd0f332c4509ea4a9b47e1b050b56443 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119394 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-23osl::Mutex->std::mutex in AsynchronLinkNoel Grandin
and inline the mutex since the only two users of this class both want the mutex Change-Id: I7821d67ad77e08059ef2fe6ccc6cc06570e8070b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119393 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>