bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / srcview.hxx
blob74401059de46d5cc4fdd67ec0b196ebd6cb5adfe
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _SRCVIEW_HXX
20 #define _SRCVIEW_HXX
22 #include <sfx2/viewfac.hxx>
23 #include <sfx2/viewsh.hxx>
24 #include <vcl/outdev.hxx>
26 #include "srcedtw.hxx"
27 #include "shellid.hxx"
29 class SwDocShell;
30 class SvxSearchItem;
31 class SfxMedium;
33 class SwSrcView: public SfxViewShell
35 SwSrcEditWindow aEditWin;
37 SvxSearchItem* pSearchItem;
39 sal_Bool bSourceSaved :1;
40 rtl_TextEncoding eLoadEncoding;
41 void Init();
43 // for read-only switching
44 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
47 protected:
48 sal_uInt16 StartSearchAndReplace(const SvxSearchItem& rItem,
49 sal_Bool bFromStart,
50 sal_Bool bApi,
51 sal_Bool bRecursive = sal_False);
54 public:
56 SFX_DECL_VIEWFACTORY(SwSrcView);
57 SFX_DECL_INTERFACE(SW_SRC_VIEWSHELL)
58 TYPEINFO();
61 SwSrcView(SfxViewFrame* pFrame, SfxViewShell*);
63 ~SwSrcView();
65 SwDocShell* GetDocShell();
66 SwSrcEditWindow& GetEditWin() {return aEditWin;}
67 void SaveContent(const String& rTmpFile);
68 void SaveContentTo(SfxMedium& rMed);
70 sal_Bool IsModified() {return aEditWin.IsModified();}
74 void Execute(SfxRequest&);
75 void GetState(SfxItemSet&);
77 SvxSearchItem* GetSearchItem();
78 void SetSearchItem( const SvxSearchItem& rItem );
80 void Load(SwDocShell* pDocShell);
82 virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
83 virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
85 sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );
87 void SourceSaved() {bSourceSaved = sal_True;}
88 sal_Bool HasSourceSaved() const {return bSourceSaved;}
92 #endif
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */