2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-11-05 02:17:53 +01:00
|
|
|
#ifndef INCLUDED_SW_SOURCE_UI_INC_BASESH_HXX
|
|
|
|
#define INCLUDED_SW_SOURCE_UI_INC_BASESH_HXX
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#include <shellid.hxx>
|
|
|
|
|
|
|
|
#include <tools/link.hxx>
|
|
|
|
#include <vcl/timer.hxx>
|
2000-12-22 11:07:52 +00:00
|
|
|
#include <sfx2/module.hxx>
|
|
|
|
#include <sfx2/shell.hxx>
|
2012-02-21 14:50:04 +00:00
|
|
|
#include <viewopt.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 10:53:48 +00:00
|
|
|
#include <mdiexp.hxx>
|
2011-06-13 10:55:23 +01:00
|
|
|
#include <set>
|
2007-09-27 10:53:48 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
class SwWrtShell;
|
|
|
|
class SwView;
|
|
|
|
class SfxItemSet;
|
|
|
|
|
2001-10-16 10:12:00 +00:00
|
|
|
struct DBTextStruct_Impl;
|
2000-09-18 16:15:01 +00:00
|
|
|
class SwBaseShell: public SfxShell
|
|
|
|
{
|
|
|
|
SwView &rView;
|
|
|
|
|
2011-04-20 15:36:36 +02:00
|
|
|
// DragMode
|
2007-09-27 10:53:48 +00:00
|
|
|
static FlyMode eFrameMode;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
// Bug 75078 - if in GetState the asynch call of GetGraphic returns
|
|
|
|
// synch, the set the state directly into the itemset
|
|
|
|
SfxItemSet* pGetStateSet;
|
|
|
|
|
2011-04-20 15:36:36 +02:00
|
|
|
// Update-Timer for graphic
|
2011-06-13 10:55:23 +01:00
|
|
|
std::set<sal_uInt16> aGrfUpdateSlots;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK( GraphicArrivedHdl, void* );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
protected:
|
2004-06-01 06:45:49 +00:00
|
|
|
SwWrtShell& GetShell();
|
|
|
|
SwWrtShell* GetShellPtr();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-06-01 06:45:49 +00:00
|
|
|
inline SwView& GetView() { return rView; }
|
|
|
|
inline void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; }
|
2013-01-26 20:14:11 +09:00
|
|
|
inline bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.insert( nSlot ).second; }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-06-01 06:45:49 +00:00
|
|
|
DECL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl* );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2013-10-09 12:58:34 +02:00
|
|
|
void InsertURLButton( const OUString& rURL, const OUString& rTarget, const OUString& rTxt );
|
2004-06-01 06:45:49 +00:00
|
|
|
void InsertTable( SfxRequest& _rRequest );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
SwBaseShell(SwView &rShell);
|
|
|
|
virtual ~SwBaseShell();
|
2007-09-27 10:53:48 +00:00
|
|
|
|
|
|
|
SFX_DECL_INTERFACE(SW_BASESHELL)
|
2000-09-18 16:15:01 +00:00
|
|
|
TYPEINFO();
|
|
|
|
|
|
|
|
void ExecDelete(SfxRequest &);
|
|
|
|
|
|
|
|
void ExecClpbrd(SfxRequest &);
|
|
|
|
void StateClpbrd(SfxItemSet &);
|
|
|
|
|
|
|
|
void ExecUndo(SfxRequest &);
|
|
|
|
void StateUndo(SfxItemSet &);
|
|
|
|
|
|
|
|
void Execute(SfxRequest &);
|
|
|
|
void GetState(SfxItemSet &);
|
|
|
|
void StateStyle(SfxItemSet &);
|
|
|
|
|
|
|
|
void ExecuteGallery(SfxRequest&);
|
|
|
|
void GetGalleryState(SfxItemSet&);
|
|
|
|
|
|
|
|
void ExecDlg(SfxRequest &);
|
|
|
|
|
|
|
|
void StateStatusLine(SfxItemSet &rSet);
|
|
|
|
void ExecTxtCtrl(SfxRequest& rReq);
|
2000-11-13 11:32:43 +00:00
|
|
|
void GetTxtFontCtrlState(SfxItemSet& rSet);
|
2000-09-18 16:15:01 +00:00
|
|
|
void GetTxtCtrlState(SfxItemSet& rSet);
|
|
|
|
void GetBorderState(SfxItemSet &rSet);
|
|
|
|
void GetBckColState(SfxItemSet &rSet);
|
|
|
|
|
|
|
|
void ExecBckCol(SfxRequest& rReq);
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetWrapMode( sal_uInt16 nSlot );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
void StateDisableItems(SfxItemSet &);
|
|
|
|
|
|
|
|
void EditRegionDialog(SfxRequest& rReq);
|
|
|
|
void InsertRegionDialog(SfxRequest& rReq);
|
|
|
|
|
|
|
|
void ExecField(SfxRequest& rReq);
|
|
|
|
|
2011-04-20 15:36:36 +02:00
|
|
|
static void SetFrmMode( FlyMode eMode, SwWrtShell *pShell ); // with update!
|
2007-09-27 10:53:48 +00:00
|
|
|
static void _SetFrmMode( FlyMode eMode ) { eFrameMode = eMode; }
|
|
|
|
static FlyMode GetFrmMode() { return eFrameMode; }
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|