update dev300-m58
[ooovba.git] / sw / source / ui / inc / srcview.hxx
blob00fb8b29950599d6e0c5dd8851f6a43d1dbd58cf
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: srcview.hxx,v $
10 * $Revision: 1.9 $
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 _SRCVIEW_HXX
31 #define _SRCIEW_HXX
33 #include <sfx2/viewfac.hxx>
34 #include <sfx2/viewsh.hxx>
35 #include "srcedtw.hxx"
36 #include "shellid.hxx"
38 class SwDocShell;
39 class SvxSearchItem;
40 class SfxMedium;
42 /*--------------------------------------------------------------------
43 Beschreibung:
44 --------------------------------------------------------------------*/
46 class SwSrcView: public SfxViewShell
48 SwSrcEditWindow aEditWin;
50 SvxSearchItem* pSearchItem;
52 BOOL bSourceSaved :1;
53 rtl_TextEncoding eLoadEncoding;
54 void Init();
56 // fuer Readonly-Umschaltung
57 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
60 protected:
61 USHORT StartSearchAndReplace(const SvxSearchItem& rItem,
62 BOOL bFromStart,
63 BOOL bApi,
64 BOOL bRecursive = FALSE);
67 public:
69 SFX_DECL_VIEWFACTORY(SwSrcView);
70 SFX_DECL_INTERFACE(SW_SRC_VIEWSHELL)
71 TYPEINFO();
74 SwSrcView(SfxViewFrame* pFrame, SfxViewShell*);
76 ~SwSrcView();
78 SwDocShell* GetDocShell();
79 SwSrcEditWindow& GetEditWin() {return aEditWin;}
80 void SaveContent(const String& rTmpFile);
81 void SaveContentTo(SfxMedium& rMed);
83 BOOL IsModified() {return aEditWin.IsModified();}
87 void Execute(SfxRequest&);
88 void GetState(SfxItemSet&);
90 SvxSearchItem* GetSearchItem();
91 void SetSearchItem( const SvxSearchItem& rItem );
93 void Load(SwDocShell* pDocShell);
95 virtual USHORT SetPrinter( SfxPrinter* pNew,
96 USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
97 virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
98 virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
100 void SourceSaved() {bSourceSaved = TRUE;}
101 BOOL HasSourceSaved() const {return bSourceSaved;}
106 #endif