2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 15:20:58 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:20:58 -05:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:20:58 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:20:58 -05:00
|
|
|
* $RCSfile: futext.hxx,v $
|
|
|
|
* $Revision: 1.9 $
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:20:58 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:20:58 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:20:58 -05:00
|
|
|
* OpenOffice.org 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 version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:20:58 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2004-01-20 06:39:28 -06:00
|
|
|
#ifndef SD_FU_TEXT_HXX
|
|
|
|
#define SD_FU_TEXT_HXX
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
#ifndef _EDITDATA_HXX
|
|
|
|
#include <svx/editdata.hxx>
|
|
|
|
#endif
|
|
|
|
#include "fuconstr.hxx"
|
2008-03-12 05:44:16 -05:00
|
|
|
#include <svx/svdotext.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
struct StyleRequestData;
|
|
|
|
class SdrTextObj;
|
|
|
|
class OutlinerParaObject;
|
|
|
|
|
2004-01-20 06:39:28 -06:00
|
|
|
namespace sd {
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Basisklasse fuer Textfunktionen
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
2002-02-15 10:02:42 -06:00
|
|
|
|
2004-01-20 06:39:28 -06:00
|
|
|
class FuText
|
|
|
|
: public FuConstruct
|
|
|
|
{
|
|
|
|
public:
|
2000-09-18 11:07:07 -05:00
|
|
|
TYPEINFO();
|
|
|
|
|
2005-12-14 10:18:22 -06:00
|
|
|
static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
|
|
|
|
virtual void DoExecute( SfxRequest& rReq );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
virtual BOOL KeyInput(const KeyEvent& rKEvt);
|
|
|
|
virtual BOOL MouseMove(const MouseEvent& rMEvt);
|
|
|
|
virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
|
|
|
|
virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
|
|
|
|
virtual BOOL Command(const CommandEvent& rCEvt);
|
|
|
|
virtual BOOL RequestHelp(const HelpEvent& rHEvt);
|
|
|
|
virtual void ReceiveRequest(SfxRequest& rReq);
|
|
|
|
virtual void DoubleClick(const MouseEvent& rMEvt);
|
|
|
|
|
|
|
|
virtual void Activate(); // Function aktivieren
|
|
|
|
virtual void Deactivate(); // Function deaktivieren
|
|
|
|
|
|
|
|
void SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag);
|
|
|
|
BOOL DeleteDefaultText();
|
2008-03-12 05:44:16 -05:00
|
|
|
SdrTextObj* GetTextObj() { return static_cast< SdrTextObj* >( mxTextObj.get() ); }
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
DECL_LINK(SpellError, void* );
|
2002-02-15 10:02:42 -06:00
|
|
|
|
|
|
|
// #97016#
|
|
|
|
virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle);
|
2002-11-29 07:23:07 -06:00
|
|
|
|
|
|
|
/** is called when the currenct function should be aborted. <p>
|
|
|
|
This is used when a function gets a KEY_ESCAPE but can also
|
|
|
|
be called directly.
|
|
|
|
|
|
|
|
@returns true if a active function was aborted
|
|
|
|
*/
|
|
|
|
virtual bool cancel();
|
2003-12-01 04:51:30 -06:00
|
|
|
|
2004-01-20 06:39:28 -06:00
|
|
|
protected:
|
2005-12-14 10:18:22 -06:00
|
|
|
FuText (ViewShell* pViewSh,
|
|
|
|
::sd::Window* pWin,
|
|
|
|
::sd::View* pView,
|
|
|
|
SdDrawDocument* pDoc,
|
|
|
|
SfxRequest& rReq);
|
|
|
|
|
|
|
|
virtual void disposing();
|
|
|
|
|
2008-03-12 05:44:16 -05:00
|
|
|
SdrObjectWeakRef mxTextObj;
|
2004-01-20 06:39:28 -06:00
|
|
|
Link aOldLink;
|
|
|
|
BOOL bFirstObjCreated;
|
|
|
|
|
|
|
|
SfxRequest& rRequest;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// #97016#
|
|
|
|
void ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj);
|
|
|
|
void ImpSetAttributesFitToSize(SdrTextObj* pTxtObj);
|
|
|
|
void ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj);
|
|
|
|
void ImpSetAttributesFitCommon(SdrTextObj* pTxtObj);
|
|
|
|
};
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2004-01-20 06:39:28 -06:00
|
|
|
} // end of namespace sd
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2004-01-20 06:39:28 -06:00
|
|
|
#endif
|