/* -*- 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_SVDLAYER_HXX #define INCLUDED_SVX_SVDLAYER_HXX #include #include #include #include #include /** * Note on the layer mix with symbolic/ID-based interface: * You create a new layer with * pLayerAdmin->NewLayer("A new layer"); * This layer is automatically appended to the end of the list. * * The same holds true for layer sets. * * The interface for SdrLayerSet is based on LayerIDs. The app must get * an ID for it at the SdrLayerAdmin, like so: * SdrLayerID nLayerID=pLayerAdmin->GetLayerID("A new layer"); * * If the layer cannot be found, SDRLAYER_NOTFOUND is returned. * The methods with the ID interface usually handle that error in a * meaningful way. * If you not only got a name, but even a SdrLayer*, you can get the ID * much faster via the layer directly. * * @param bInherited: * TRUE If the layer/layer set cannot be found, we examine the parent layer admin, * whether there's a corresponding definition * FALSE We only search this layer admin * * Every page's layer admin has a parent layer admin (the model's). The model * itself does not have a parent. */ class SdrModel; class SVX_DLLPUBLIC SdrLayer { friend class SdrLayerAdmin; OUString maName; OUString maTitle; OUString maDescription; SdrModel* pModel; // For broadcasting sal_uInt16 nType; // 0= userdefined, 1= default layer SdrLayerID nID; SdrLayer(SdrLayerID nNewID, const OUString& rNewName); public: bool operator==(const SdrLayer& rCmpLayer) const; void SetName(const OUString& rNewName); const OUString& GetName() const { return maName; } void SetTitle(const OUString& rTitle) { maTitle = rTitle; } const OUString& GetTitle() const { return maTitle; } void SetDescription(const OUString& rDesc) { maDescription = rDesc; } const OUString& GetDescription() const { return maDescription; } SdrLayerID GetID() const { return nID; } void SetModel(SdrModel* pNewModel) { pModel=pNewModel; } // A SdrLayer should be considered the standard Layer. It shall then set the // appropriate country-specific name. SetName() sets the "StandardLayer" flag // and if necessary returns "Userdefined". void SetStandardLayer(); }; #define SDRLAYER_MAXCOUNT 255 #define SDRLAYERPOS_NOTFOUND 0xffff // When Changing the layer data you currently have to set the Modify flag manually class SVX_DLLPUBLIC SdrLayerAdmin { friend class SdrView; friend class SdrModel; friend class SdrPage; protected: std::vector aLayer; SdrLayerAdmin* pParent; // The page's admin knows the doc's admin SdrModel* pModel; // For broadcasting OUString maControlLayerName; protected: // Find a LayerID which is not in use yet. If all have been used up, // we return 0. // If you want to play safe, check GetLayerCount()SetModel(pModel); Broadcast(); } SdrLayer* RemoveLayer(sal_uInt16 nPos); // Delete the entire layer void ClearLayer(); // New layer is created and inserted SdrLayer* NewLayer(const OUString& rName, sal_uInt16 nPos=0xFFFF); // New layer, name is retrieved from the resource void NewStandardLayer(sal_uInt16 nPos); // Iterate over all layers sal_uInt16 GetLayerCount() const { return sal_uInt16(aLayer.size()); } SdrLayer* GetLayer(sal_uInt16 i) { return aLayer[i]; } const SdrLayer* GetLayer(sal_uInt16 i) const { return aLayer[i]; } sal_uInt16 GetLayerPos(SdrLayer* pLayer) const; SdrLayer* GetLayer(const OUString& rName); const SdrLayer* GetLayer(const OUString& rName) const; SdrLayerID GetLayerID(const OUString& rName) const; SdrLayer* GetLayerPerID(SdrLayerID nID) { return const_cast(const_cast(this)->GetLayerPerID(nID)); } const SdrLayer* GetLayerPerID(SdrLayerID nID) const; void SetControlLayerName(const OUString& rNewName); const OUString& GetControlLayerName() const { return maControlLayerName; } }; #endif // INCLUDED_SVX_SVDLAYER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ s LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrizmut <riz_17_oke@yahoo.co.id>2019-06-19 00:38:26 +0700
committerRizal Muttaqin <riz_17_oke@yahoo.co.id>2019-06-18 23:50:46 +0200
commit11a1bdc5fa0312111ddf9c1b7779a114b97e361c (patch)
tree23555133a2ad97054b7aff0ce9b00bfe0cfb7d3e /icon-themes/colibre_svg/svx
parent881e6fdd47386e430ad4c5489e3a6bbf0b46c85f (diff)
Colibre, elementary, KJ: Fix for tdf#107144
elementary: - Fix blurred zoom icons - Reverse top arrow on Small Capitals icons Change-Id: I81883334e5cfaf3dab528ed61ea46894017a6c36 Reviewed-on: https://gerrit.libreoffice.org/74301 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
Diffstat (limited to 'icon-themes/colibre_svg/svx')