1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: orgmgr.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SFX_ORGMGR_HXX
31 #define _SFX_ORGMGR_HXX
33 #include <svtools/svarray.hxx>
35 class SfxDocumentTemplates
;
36 class SfxOrganizeListBox_Impl
;
38 struct _FileListEntry
;
40 //=========================================================================
42 SV_DECL_PTRARR_SORT(_SfxObjectList
, _FileListEntry
*, 1, 4)
44 class SfxObjectList
: public _SfxObjectList
50 const String
& GetBaseName( USHORT nId
) const;
51 const String
& GetFileName( USHORT nId
) const;
55 struct SfxOrganizeMgr_Impl
57 SfxObjectList
* pDocList
;
58 IntlWrapper
* pIntlWrapper
;
60 SfxOrganizeMgr_Impl() : pDocList( NULL
), pIntlWrapper( NULL
) {}
63 //=========================================================================
68 SfxOrganizeMgr_Impl
* pImpl
;
69 SfxDocumentTemplates
* pTemplates
;
70 SfxOrganizeListBox_Impl
* pLeftBox
;
71 SfxOrganizeListBox_Impl
* pRightBox
;
72 BOOL bDeleteTemplates
:1;
75 SfxOrganizeListBox_Impl
* GetOther( SfxOrganizeListBox_Impl
* );
78 SfxOrganizeMgr( SfxOrganizeListBox_Impl
* pLeft
,
79 SfxOrganizeListBox_Impl
* pRight
,
80 SfxDocumentTemplates
* pTempl
= NULL
);
83 BOOL
Copy( USHORT nTargetRegion
, USHORT nTargetIdx
, USHORT nSourceRegion
, USHORT nSourceIdx
);
84 BOOL
Move( USHORT nTargetRegion
, USHORT nTargetIdx
, USHORT nSourceRegion
, USHORT nSourceIdx
);
85 BOOL
Delete( SfxOrganizeListBox_Impl
* pCaller
, USHORT nRegion
, USHORT nIdx
);
86 BOOL
InsertDir( SfxOrganizeListBox_Impl
* pCaller
, const String
& rName
, USHORT nRegion
);
87 BOOL
SetName( const String
& rName
, USHORT nRegion
, USHORT nIdx
= USHRT_MAX
);
88 BOOL
CopyTo( USHORT nRegion
, USHORT nIdx
, const String
& rName
) const;
89 BOOL
CopyFrom( SfxOrganizeListBox_Impl
* pCaller
, USHORT nRegion
, USHORT nIdx
, String
& rName
);
92 BOOL
InsertFile( SfxOrganizeListBox_Impl
* pCaller
, const String
& rFileName
);
94 BOOL
IsModified() const { return bModified
? TRUE
: FALSE
; }
96 const SfxDocumentTemplates
* GetTemplates() const { return pTemplates
; }
97 SfxObjectList
& GetObjectList() { return *pImpl
->pDocList
; }
98 const SfxObjectList
& GetObjectList() const { return *pImpl
->pDocList
; }
100 SfxObjectShellRef
CreateObjectShell( USHORT nIdx
);
101 SfxObjectShellRef
CreateObjectShell( USHORT nRegion
, USHORT nIdx
);
102 BOOL
DeleteObjectShell( USHORT
);
103 BOOL
DeleteObjectShell( USHORT
, USHORT
);
104 void SaveAll( Window
* pParent
);
107 #endif // #ifndef _SFX_ORGMGR_HXX