GPU-Calc: remove Alloc_Host_Ptr for clmem of NAN vector
[LibreOffice.git] / svtools / source / contnr / viewdataentry.cxx
blob06ba46349cf2e9a6aaa19d2eddcdda9623a01152
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 #include "svtools/viewdataentry.hxx"
22 #include "tools/debug.hxx"
24 DBG_NAME(SvViewDataEntry);
26 SvViewDataEntry::SvViewDataEntry() :
27 nVisPos(0),
28 mbSelected(false),
29 mbHighlighted(false),
30 mbExpanded(false),
31 mbFocused(false),
32 mbCursored(false),
33 mbSelectable(true)
35 DBG_CTOR(SvViewDataEntry,0);
38 SvViewDataEntry::SvViewDataEntry( const SvViewDataEntry& rData ) :
39 nVisPos(rData.nVisPos),
40 mbSelected(false),
41 mbHighlighted(false),
42 mbExpanded(rData.mbExpanded),
43 mbFocused(false),
44 mbCursored(rData.mbCursored),
45 mbSelectable(rData.mbSelectable)
47 DBG_CTOR(SvViewDataEntry,0);
50 SvViewDataEntry::~SvViewDataEntry()
52 DBG_DTOR(SvViewDataEntry,0);
53 #ifdef DBG_UTIL
54 nVisPos = 0x12345678;
55 #endif
58 bool SvViewDataEntry::IsSelected() const
60 return mbSelected;
63 bool SvViewDataEntry::IsHighlighted() const
65 return mbHighlighted;
68 bool SvViewDataEntry::IsExpanded() const
70 return mbExpanded;
73 bool SvViewDataEntry::HasFocus() const
75 return mbFocused;
78 bool SvViewDataEntry::IsCursored() const
80 return mbCursored;
83 bool SvViewDataEntry::IsSelectable() const
85 return mbSelectable;
88 void SvViewDataEntry::SetFocus( bool bFocus )
90 mbFocused = bFocus;
93 void SvViewDataEntry::SetSelected( bool bSelected )
95 mbSelected = bSelected;
96 mbHighlighted = bSelected;
99 void SvViewDataEntry::SetHighlighted( bool bHighlighted )
101 mbHighlighted = bHighlighted;
104 void SvViewDataEntry::SetExpanded( bool bExpanded )
106 mbExpanded = bExpanded;
109 void SvViewDataEntry::SetSelectable( bool bSelectable )
111 mbSelectable = bSelectable;
114 void SvViewDataEntry::Init(size_t nSize)
116 maItems.resize(nSize);
119 const SvViewDataItem* SvViewDataEntry::GetItem(size_t nPos) const
121 return &maItems[nPos];
124 SvViewDataItem* SvViewDataEntry::GetItem(size_t nPos)
126 return &maItems[nPos];
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */