Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / sfx2 / inc / orgmgr.hxx
blobefadaccf046bfe0a035236429163a6b002d2e7fa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _SFX_ORGMGR_HXX
29 #define _SFX_ORGMGR_HXX
31 #include <svl/svarray.hxx>
33 class SfxDocumentTemplates;
34 class SfxOrganizeListBox_Impl;
35 class SfxObjectShell;
36 struct _FileListEntry;
38 //=========================================================================
40 SV_DECL_PTRARR_SORT(_SfxObjectList, _FileListEntry*, 1)
42 class SfxObjectList: public _SfxObjectList
44 public:
45 SfxObjectList();
46 ~SfxObjectList();
48 const String& GetBaseName( sal_uInt16 nId ) const;
51 class IntlWrapper;
52 struct SfxOrganizeMgr_Impl
54 SfxObjectList* pDocList;
55 IntlWrapper* pIntlWrapper;
57 SfxOrganizeMgr_Impl() : pDocList( NULL ), pIntlWrapper( NULL ) {}
60 //=========================================================================
62 class SfxOrganizeMgr
64 private:
65 SfxOrganizeMgr_Impl* pImpl;
66 SfxDocumentTemplates* pTemplates;
67 SfxOrganizeListBox_Impl* pLeftBox;
68 SfxOrganizeListBox_Impl* pRightBox;
69 sal_Bool bDeleteTemplates :1;
70 sal_Bool bModified :1;
72 SfxOrganizeListBox_Impl* GetOther( SfxOrganizeListBox_Impl* );
74 public:
75 SfxOrganizeMgr( SfxOrganizeListBox_Impl* pLeft,
76 SfxOrganizeListBox_Impl* pRight,
77 SfxDocumentTemplates* pTempl = NULL );
78 ~SfxOrganizeMgr();
80 sal_Bool Copy( sal_uInt16 nTargetRegion, sal_uInt16 nTargetIdx, sal_uInt16 nSourceRegion, sal_uInt16 nSourceIdx );
81 sal_Bool Move( sal_uInt16 nTargetRegion, sal_uInt16 nTargetIdx, sal_uInt16 nSourceRegion, sal_uInt16 nSourceIdx );
82 sal_Bool Delete( SfxOrganizeListBox_Impl* pCaller, sal_uInt16 nRegion, sal_uInt16 nIdx );
83 sal_Bool InsertDir( SfxOrganizeListBox_Impl* pCaller, const String& rName, sal_uInt16 nRegion );
84 sal_Bool SetName( const String& rName, sal_uInt16 nRegion, sal_uInt16 nIdx = USHRT_MAX );
85 sal_Bool CopyTo( sal_uInt16 nRegion, sal_uInt16 nIdx, const String& rName ) const;
86 sal_Bool CopyFrom( SfxOrganizeListBox_Impl* pCaller, sal_uInt16 nRegion, sal_uInt16 nIdx, String& rName );
88 sal_Bool Rescan();
89 sal_Bool InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName );
91 sal_Bool IsModified() const { return bModified ? sal_True : sal_False; }
93 const SfxDocumentTemplates* GetTemplates() const { return pTemplates; }
94 SfxObjectList& GetObjectList() { return *pImpl->pDocList; }
95 const SfxObjectList& GetObjectList() const { return *pImpl->pDocList; }
97 SfxObjectShellRef CreateObjectShell( sal_uInt16 nIdx );
98 SfxObjectShellRef CreateObjectShell( sal_uInt16 nRegion, sal_uInt16 nIdx );
99 sal_Bool DeleteObjectShell( sal_uInt16 );
100 sal_Bool DeleteObjectShell( sal_uInt16, sal_uInt16 );
101 void SaveAll( Window* pParent );
104 #endif // #ifndef _SFX_ORGMGR_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */