/* -*- 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_SW_INC_FMTORNT_HXX #define INCLUDED_SW_INC_FMTORNT_HXX #include #include #include #include "swdllapi.h" #include "hintids.hxx" #include "swtypes.hxx" #include "format.hxx" #include class IntlWrapper; /// Defines the vertical position of a fly frame. /// /// For example: from top (orientation), by 1cm (relative position), to the entire page (relation). class SW_DLLPUBLIC SwFormatVertOrient final : public SfxPoolItem { SwTwips m_nYPos; ///< Contains *always* the current RelPos. sal_Int16 m_eOrient; sal_Int16 m_eRelation; public: SwFormatVertOrient( SwTwips nY = 0, sal_Int16 eVert = css::text::VertOrientation::NONE, sal_Int16 eRel = css::text::RelOrientation::PRINT_AREA ); SwFormatVertOrient(SwFormatVertOrient const &) = default; // SfxPoolItem copy function dichotomy /// "Pure virtual methods" of SfxPoolItem. virtual bool operator==( const SfxPoolItem& ) const override; virtual SwFormatVertOrient* Clone( SfxItemPool* pPool = nullptr ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper& rIntl ) const override; 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; sal_Int16 GetVertOrient() const { return m_eOrient; } sal_Int16 GetRelationOrient() const { return m_eRelation; } void SetVertOrient( sal_Int16 eNew ) { m_eOrient = eNew; } void SetRelationOrient( sal_Int16 eNew ) { m_eRelation = eNew; } SwTwips GetPos() const { return m_nYPos; } void SetPos( SwTwips nNew ) { m_nYPos = nNew; } void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; /// Defines the horizontal position of a fly frame. /// /// For example: from left (orientation), by 1 cm (relative position), to the entire page /// (relation). class SW_DLLPUBLIC SwFormatHoriOrient final : public SfxPoolItem { SwTwips m_nXPos; ///< Contains *always* the current RelPos. sal_Int16 m_eOrient; sal_Int16 m_eRelation; bool m_bPosToggle : 1; ///< Flip position on even pages. public: SwFormatHoriOrient( SwTwips nX = 0, sal_Int16 eHori = css::text::HoriOrientation::NONE, sal_Int16 eRel = css::text::RelOrientation::PRINT_AREA, bool bPos = false ); SwFormatHoriOrient(SwFormatHoriOrient const &) = default; // SfxPoolItem copy function dichotomy /// "Pure virtual methods" of SfxPoolItem. virtual bool operator==( const SfxPoolItem& ) const override; virtual SwFormatHoriOrient* Clone( SfxItemPool* pPool = nullptr ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper& rIntl ) const override; 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; sal_Int16 GetHoriOrient() const { return m_eOrient; } sal_Int16 GetRelationOrient() const { return m_eRelation; } void SetHoriOrient( sal_Int16 eNew ) { m_eOrient = eNew; } void SetRelationOrient( sal_Int16 eNew ) { m_eRelation = eNew; } SwTwips GetPos() const { return m_nXPos; } void SetPos( SwTwips nNew ) { m_nXPos = nNew; } bool IsPosToggle() const { return m_bPosToggle; } void SetPosToggle( bool bNew ) { m_bPosToggle = bNew; } void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; inline const SwFormatVertOrient &SwAttrSet::GetVertOrient(bool bInP) const { return Get( RES_VERT_ORIENT,bInP); } inline const SwFormatHoriOrient &SwAttrSet::GetHoriOrient(bool bInP) const { return Get( RES_HORI_ORIENT,bInP); } inline const SwFormatVertOrient &SwFormat::GetVertOrient(bool bInP) const { return m_aSet.GetVertOrient(bInP); } inline const SwFormatHoriOrient &SwFormat::GetHoriOrient(bool bInP) const { return m_aSet.GetHoriOrient(bInP); } namespace sw { bool GetAtPageRelOrientation(sal_Int16 & rOrientation, bool const isIgnorePrintArea); } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ion> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-07loplugin:ostr in connectivityNoel Grandin
Change-Id: Ice633719b05240ab5a052b62ca4eafe89f97e12f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-01tdf#146619 Drop unused 'using namespace' in: connectivity/Gabor Kelemen
Change-Id: Ie185575d699751b79e98c4fae0bc5405a165df9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165529 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-05-04Just use Any ctor instead of makeAny in connectivityStephan Bergmann
Change-Id: I68e7354f094ee0e673d105dd8770a658810703d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133838 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-27use more OInterfaceContainerHelper3 in connectivity::sdbcx::OCollectionNoel Grandin
Change-Id: Idf3313b374eae05c4a65c101e1e7ce91c743b420 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125928 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-08Simplify Sequences initializations (comphelper+connectivity)Julien Nabet
Change-Id: I8a91f4bd2a1117acb571f1058af18071bc058c9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116815 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-02-22loplugin:refcounting in connectivityNoel
Change-Id: Iff2f096e7ee00d9cb29d47462dd7e1963c6b06e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-18loplugin:flatten connectivityNoel Grandin
Change-Id: Ic1d9eb84b64ebde99e15704a10b27f21447df4d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-14tdf#42949 Fix IWYU warnings in connectivity/*/*cxxGabor Kelemen
Except for platform specific drivers/ado and drivers/macab dirs Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I24b741cded8995e29ac3d518aeaa0d60b3c55b56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86317 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-09-06TyposAndrea Gelmini
Mainly fixing '....' and '..' Change-Id: Ic928701b319868671b826d757dd94c296fd5e942 Reviewed-on: https://gerrit.libreoffice.org/78668 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-15loplugin:simplifyconstructNoel Grandin
Change-Id: Ia74a2493ad780314a832b384ca6326c7fd420631
2018-10-14Revert removal of mysql jdbc connectorTamas Bunth
And also make some minor fixes so it cooperates with the new mysqlc library. Change-Id: I866add99a699150c6550ee7f7ff2ee947e07117c Reviewed-on: https://gerrit.libreoffice.org/61648 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>