merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / dlg / dlgassim.hxx
blobed1f4e423fde0c03ca2c8a0afde7239626b738d8
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dlgassim.hxx,v $
10 * $Revision: 1.6 $
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 ************************************************************************/
31 #include <svtools/dateitem.hxx>
32 #include "drawdoc.hxx"
33 #include <svx/svdotext.hxx>
34 #include <svtools/svtreebx.hxx>
36 #include "sdresid.hxx"
38 class SdPageListControl : public SvTreeListBox
40 private:
41 SvLBoxButtonData* m_pCheckButton;
43 SvLBoxEntry* InsertPage( const String& rPageName );
44 void InsertTitle( SvLBoxEntry* pEntry, const String& rTitle );
46 public:
47 SdPageListControl( Window* pParent, const ResId& rResId );
48 ~SdPageListControl();
50 void Fill( SdDrawDocument* pDoc );
51 void Clear();
53 USHORT GetSelectedPage();
54 BOOL IsPageChecked( USHORT nPage );
56 DECL_LINK( CheckButtonClickHdl, SvLBoxButtonData * );
58 virtual void DataChanged( const DataChangedEvent& rDCEvt );
62 class TemplateCacheInfo
64 private:
65 DateTime m_aDateTime;
66 String m_aFile;
67 BOOL m_bImpress;
68 BOOL m_bValid;
69 BOOL m_bModified;
71 public:
72 TemplateCacheInfo();
73 TemplateCacheInfo( const String& rFile, const DateTime& rDateTime, BOOL bImpress );
75 BOOL IsValid() const { return m_bValid; }
76 void SetValid( BOOL bValid = TRUE ) { m_bValid = bValid; }
78 BOOL IsImpress() const { return m_bImpress; }
79 void SetImpress( BOOL bImpress = TRUE ) { m_bImpress = bImpress; }
81 const String& GetFile() const { return m_aFile; }
82 void SetFile( const String& rFile ) { m_aFile = rFile; }
84 const DateTime& GetDateTime() const { return m_aDateTime; }
85 void SetDateTime( const DateTime& rDateTime ) { m_aDateTime = rDateTime; }
87 BOOL IsModified() const { return m_bModified; }
88 void SetModified( BOOL bModified = TRUE ) { m_bModified = bModified; }
90 friend SvStream& operator >> (SvStream& rIn, TemplateCacheInfo& rInfo);
91 friend SvStream& operator << (SvStream& rOut, const TemplateCacheInfo& rInfo);
94 DECLARE_LIST( TemplateCacheInfoList, TemplateCacheInfo * )
96 class TemplateCacheDirEntry
98 public:
99 String m_aPath;
100 TemplateCacheInfoList m_aFiles;
103 DECLARE_LIST( TemplateCacheDirEntryList, TemplateCacheDirEntry * )
105 class TemplateCache
107 private:
108 TemplateCacheDirEntryList m_aDirs;
109 TemplateCacheDirEntry* GetDirEntry( const String& rPath );
110 void Clear();
111 public:
112 TemplateCache();
113 ~TemplateCache();
115 void Load();
116 void Save();
118 TemplateCacheInfo* GetFileInfo( const String& rPath );
119 TemplateCacheInfo* AddFileInfo( const String& rPath );
121 BOOL ClearInvalidEntrys();