bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / swcont.hxx
bloba5daaba4012d33dee6a2fa8f3555457023073cf3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SWCONT_HXX
21 #define _SWCONT_HXX
23 #include <tools/string.hxx>
25 class SwContentType;
27 // synchronize order and number with ResIds!!
28 #define CONTENT_TYPE_OUTLINE 0
29 #define CONTENT_TYPE_TABLE 1
30 #define CONTENT_TYPE_FRAME 2
31 #define CONTENT_TYPE_GRAPHIC 3
32 #define CONTENT_TYPE_OLE 4
33 #define CONTENT_TYPE_BOOKMARK 5
34 #define CONTENT_TYPE_REGION 6
35 #define CONTENT_TYPE_URLFIELD 7
36 #define CONTENT_TYPE_REFERENCE 8
37 #define CONTENT_TYPE_INDEX 9
38 #define CONTENT_TYPE_POSTIT 10
39 #define CONTENT_TYPE_DRAWOBJECT 11
40 #define CONTENT_TYPE_MAX CONTENT_TYPE_DRAWOBJECT +1
42 // types for global document
43 #define GLOBAL_CONTENT_TEXT 102
45 // strings for context menus
46 #define CONTEXT_COUNT 12
47 #define GLOBAL_CONTEXT_COUNT 14
49 // modes for Drag 'n Drop
50 #define REGION_MODE_NONE 0
51 #define REGION_MODE_LINK 1
52 #define REGION_MODE_EMBEDDED 2
54 //----------------------------------------------------------------------------
55 //----------------------------------------------------------------------------
57 //mini rtti
58 class SwTypeNumber
60 sal_uInt8 nTypeId;
62 public:
63 SwTypeNumber(sal_uInt8 nId) :nTypeId(nId){}
64 virtual ~SwTypeNumber();
66 sal_uInt8 GetTypeId() const;
68 //----------------------------------------------------------------------------
70 class SwContent : public SwTypeNumber
72 const SwContentType* pParent;
73 String sContentName;
74 long nYPosition;
75 sal_Bool bInvisible;
76 public:
77 SwContent(const SwContentType* pCnt, const String& rName, long nYPos );
79 virtual sal_Bool IsProtect() const;
80 const SwContentType* GetParent() const {return pParent;}
81 const String& GetName() const {return sContentName;}
82 int operator==(const SwContent& /*rCont*/) const
84 // they're never equal, otherwise they'd fall out of the array
85 return sal_False;
87 int operator<(const SwContent& rCont) const
89 // at first sort by position and then by name
90 return nYPosition != rCont.nYPosition ?
91 nYPosition < rCont.nYPosition :
92 sContentName < rCont.sContentName;
95 long GetYPos() const {return nYPosition;}
97 sal_Bool IsInvisible() const {return bInvisible;}
98 void SetInvisible(){ bInvisible = sal_True;}
101 #endif
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */