1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
11 #ifndef INCLUDED_SC_SOURCE_UI_INC_PIVOTLAYOUTTREELISTBASE_HXX
12 #define INCLUDED_SC_SOURCE_UI_INC_PIVOTLAYOUTTREELISTBASE_HXX
14 #include <svtools/treelistbox.hxx>
16 #include <vcl/builder.hxx>
20 class ScPivotLayoutDialog
;
23 class ScPivotLayoutTreeListBase
: public SvTreeListBox
26 enum SvPivotTreeListType
37 SvPivotTreeListType meType
;
38 VclPtr
<ScPivotLayoutDialog
> mpParent
;
41 void Setup(ScPivotLayoutDialog
* pParent
);
43 ScPivotLayoutTreeListBase(vcl::Window
* pParent
, WinBits nBits
, SvPivotTreeListType eType
= UNDEFINED
);
44 virtual ~ScPivotLayoutTreeListBase();
45 virtual void dispose() SAL_OVERRIDE
;
47 virtual sal_Int8
AcceptDrop(const AcceptDropEvent
& rEvent
) SAL_OVERRIDE
;
48 virtual bool NotifyAcceptDrop(SvTreeListEntry
* pEntry
) SAL_OVERRIDE
;
49 virtual TriState
NotifyMoving(SvTreeListEntry
* pTarget
, SvTreeListEntry
* pSource
,
50 SvTreeListEntry
*& rpNewParent
, sal_uLong
& rNewChildPos
) SAL_OVERRIDE
;
51 virtual TriState
NotifyCopying(SvTreeListEntry
* pTarget
, SvTreeListEntry
* pSource
,
52 SvTreeListEntry
*& rpNewParent
, sal_uLong
& rNewChildPos
) SAL_OVERRIDE
;
53 virtual DragDropMode
NotifyStartDrag(TransferDataContainer
& aTransferDataContainer
,
54 SvTreeListEntry
* pEntry
) SAL_OVERRIDE
;
55 virtual void DragFinished(sal_Int8 nDropAction
) SAL_OVERRIDE
;
57 virtual void GetFocus() SAL_OVERRIDE
;
58 virtual void LoseFocus() SAL_OVERRIDE
;
60 void PushEntriesToPivotFieldVector(ScPivotFieldVector
& rVector
);
62 void RemoveEntryForItem(ScItemValue
* pItemValue
);
64 bool HasEntry(SvTreeListEntry
* pEntry
);
67 virtual void InsertEntryForSourceTarget(SvTreeListEntry
* pSource
, SvTreeListEntry
* pTarget
);
69 virtual void InsertEntryForItem(ScItemValue
* pItemValue
, sal_uLong nPosition
);
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */