LCOV - code coverage report
Current view: top level - libreoffice/sw/source/ui/inc - srcview.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 5 40.0 %
Date: 2012-12-27 Functions: 2 5 40.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : #ifndef _SRCVIEW_HXX
      20             : #define _SRCVIEW_HXX
      21             : 
      22             : #include <sfx2/viewfac.hxx>
      23             : #include <sfx2/viewsh.hxx>
      24             : #include <vcl/outdev.hxx>
      25             : 
      26             : #include "srcedtw.hxx"
      27             : #include "shellid.hxx"
      28             : 
      29             : class SwDocShell;
      30             : class SvxSearchItem;
      31             : class SfxMedium;
      32             : 
      33             : class SwSrcView: public SfxViewShell
      34             : {
      35             :     SwSrcEditWindow     aEditWin;
      36             : 
      37             :     SvxSearchItem*      pSearchItem;
      38             : 
      39             :     sal_Bool                bSourceSaved    :1;
      40             :     rtl_TextEncoding    eLoadEncoding;
      41             :     void                Init();
      42             : 
      43             :     // for read-only switching
      44             :     virtual void        Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
      45             : 
      46             : 
      47             : protected:
      48             :     sal_uInt16              StartSearchAndReplace(const SvxSearchItem& rItem,
      49             :                                                         sal_Bool bFromStart,
      50             :                                                         sal_Bool bApi,
      51             :                                                         sal_Bool bRecursive = sal_False);
      52             : 
      53             : 
      54             : public:
      55             : 
      56           8 :     SFX_DECL_VIEWFACTORY(SwSrcView);
      57          10 :     SFX_DECL_INTERFACE(SW_SRC_VIEWSHELL)
      58             :     TYPEINFO();
      59             : 
      60             : 
      61             :     SwSrcView(SfxViewFrame* pFrame, SfxViewShell*);
      62             : 
      63             :     ~SwSrcView();
      64             : 
      65             :     SwDocShell*         GetDocShell();
      66             :     SwSrcEditWindow&    GetEditWin() {return aEditWin;}
      67             :     void                SaveContent(const String& rTmpFile);
      68             :     void                SaveContentTo(SfxMedium& rMed);
      69             : 
      70           0 :     sal_Bool                IsModified() {return aEditWin.IsModified();}
      71             : 
      72             : 
      73             : 
      74             :     void            Execute(SfxRequest&);
      75             :     void            GetState(SfxItemSet&);
      76             : 
      77             :     SvxSearchItem*  GetSearchItem();
      78             :     void            SetSearchItem( const SvxSearchItem& rItem );
      79             : 
      80             :     void            Load(SwDocShell* pDocShell);
      81             : 
      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 );
      84             : 
      85             :     sal_Int32       PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );
      86             : 
      87           0 :     void            SourceSaved() {bSourceSaved = sal_True;}
      88           0 :     sal_Bool            HasSourceSaved() const {return bSourceSaved;}
      89             : 
      90             : };
      91             : 
      92             : #endif
      93             : 
      94             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10