2000-09-18 16:15:01 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-09 09:02:22 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 09:02:22 +00:00
|
|
|
* $RCSfile: srcview.hxx,v $
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2007-09-27 11:10:01 +00:00
|
|
|
* $Revision: 1.8 $
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2007-09-27 11:10:01 +00:00
|
|
|
* last change: $Author: hr $ $Date: 2007-09-27 12:10:01 $
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 09:02:22 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-09 09:02:22 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 09:02:22 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 09:02:22 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 09:02:22 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _SRCVIEW_HXX
|
|
|
|
#define _SRCIEW_HXX
|
|
|
|
|
|
|
|
#ifndef _VIEWFAC_HXX //autogen
|
|
|
|
#include <sfx2/viewfac.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _SFXVIEWSH_HXX //autogen
|
|
|
|
#include <sfx2/viewsh.hxx>
|
|
|
|
#endif
|
|
|
|
#include "srcedtw.hxx"
|
|
|
|
#include "shellid.hxx"
|
|
|
|
|
|
|
|
class SwDocShell;
|
|
|
|
class SvxSearchItem;
|
|
|
|
class SfxMedium;
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung:
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
class SwSrcView: public SfxViewShell
|
|
|
|
{
|
|
|
|
SwSrcEditWindow aEditWin;
|
|
|
|
|
|
|
|
SvxSearchItem* pSearchItem;
|
|
|
|
|
|
|
|
BOOL bSourceSaved :1;
|
2002-01-11 08:43:53 +00:00
|
|
|
rtl_TextEncoding eLoadEncoding;
|
2000-09-18 16:15:01 +00:00
|
|
|
void Init();
|
|
|
|
|
|
|
|
// fuer Readonly-Umschaltung
|
|
|
|
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
USHORT StartSearchAndReplace(const SvxSearchItem& rItem,
|
|
|
|
BOOL bFromStart,
|
|
|
|
BOOL bApi,
|
|
|
|
BOOL bRecursive = FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
SFX_DECL_VIEWFACTORY(SwSrcView);
|
2007-09-27 11:10:01 +00:00
|
|
|
SFX_DECL_INTERFACE(SW_SRC_VIEWSHELL)
|
2000-09-18 16:15:01 +00:00
|
|
|
TYPEINFO();
|
|
|
|
|
|
|
|
|
|
|
|
SwSrcView(SfxViewFrame* pFrame, SfxViewShell*);
|
|
|
|
|
|
|
|
~SwSrcView();
|
|
|
|
|
|
|
|
SwDocShell* GetDocShell();
|
|
|
|
SwSrcEditWindow& GetEditWin() {return aEditWin;}
|
|
|
|
void SaveContent(const String& rTmpFile);
|
|
|
|
void SaveContentTo(SfxMedium& rMed);
|
|
|
|
|
|
|
|
BOOL IsModified() {return aEditWin.IsModified();}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Execute(SfxRequest&);
|
|
|
|
void GetState(SfxItemSet&);
|
|
|
|
|
|
|
|
SvxSearchItem* GetSearchItem();
|
|
|
|
void SetSearchItem( const SvxSearchItem& rItem );
|
|
|
|
|
|
|
|
void Load(SwDocShell* pDocShell);
|
|
|
|
|
|
|
|
virtual USHORT SetPrinter( SfxPrinter* pNew,
|
2007-07-17 12:11:18 +00:00
|
|
|
USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
|
2007-01-25 10:45:23 +00:00
|
|
|
virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
|
2000-09-18 16:15:01 +00:00
|
|
|
virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
|
|
|
|
|
|
|
|
void SourceSaved() {bSourceSaved = TRUE;}
|
|
|
|
BOOL HasSourceSaved() const {return bSourceSaved;}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|