summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/drawfunc
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
commit9ae5a91f7955e44d3b24a3f7741f9bca02ac7f24 (patch)
tree13c111a6380728f470fa177e679b80089a01efc4 /sc/source/ui/drawfunc
downloadcore-9ae5a91f7955e44d3b24a3f7741f9bca02ac7f24.tar.gz
core-9ae5a91f7955e44d3b24a3f7741f9bca02ac7f24.zip
initial import
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r--sc/source/ui/drawfunc/chartsh.cxx123
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx843
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx568
-rw-r--r--sc/source/ui/drawfunc/drawsh4.cxx423
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx255
-rw-r--r--sc/source/ui/drawfunc/drformsh.cxx367
-rw-r--r--sc/source/ui/drawfunc/drformsh.src563
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx876
-rw-r--r--sc/source/ui/drawfunc/drtxtob1.cxx475
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx597
-rw-r--r--sc/source/ui/drawfunc/fuconarc.cxx411
-rw-r--r--sc/source/ui/drawfunc/fuconpol.cxx384
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx415
-rw-r--r--sc/source/ui/drawfunc/fuconstr.cxx518
-rw-r--r--sc/source/ui/drawfunc/fuconuno.cxx489
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx403
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx355
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx692
-rw-r--r--sc/source/ui/drawfunc/fumark.cxx325
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx550
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx538
-rw-r--r--sc/source/ui/drawfunc/fusel2.cxx417
-rw-r--r--sc/source/ui/drawfunc/futext.cxx1001
-rw-r--r--sc/source/ui/drawfunc/futext2.cxx340
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx427
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx124
-rw-r--r--sc/source/ui/drawfunc/makefile.mk158
-rw-r--r--sc/source/ui/drawfunc/objdraw.src1441
-rw-r--r--sc/source/ui/drawfunc/oleobjsh.cxx124
29 files changed, 14202 insertions, 0 deletions
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
new file mode 100644
index 000000000000..fa606c6507de
--- /dev/null
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * $RCSfile: chartsh.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+#include <svx/eeitem.hxx>
+#include <svx/fontwork.hxx>
+#include <svx/labdlg.hxx>
+#include <svx/srchitem.hxx>
+#include <svx/tabarea.hxx>
+#include <svx/tabline.hxx>
+#include <svx/textanim.hxx>
+#include <svx/transfrm.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/objface.hxx>
+#include <sfx2/request.hxx>
+#include <svtools/whiter.hxx>
+#include <vcl/msgbox.hxx>
+#include <segmentc.hxx>
+
+#include "chartsh.hxx"
+#include "drwlayer.hxx"
+#include "sc.hrc"
+#include "viewdata.hxx"
+#include "document.hxx"
+#include "docpool.hxx"
+#include "drawview.hxx"
+#include "scresid.hxx"
+
+#ifndef _SVDOBJ_HXX //autogen
+#include <svx/svdobj.hxx>
+#endif
+
+#define ScChartShell
+#include "scslots.hxx"
+
+
+SFX_IMPL_INTERFACE(ScChartShell, ScDrawShell, ScResId(SCSTR_CHARTSHELL) )
+{
+ SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ ScResId(RID_DRAW_OBJECTBAR) );
+ SFX_POPUPMENU_REGISTRATION( ScResId(RID_POPUP_CHART) );
+ SFX_OBJECTMENU_REGISTRATION( SID_OBJECTMENU0, ScResId(RID_OBJECTMENU_DRAW) );
+}
+
+TYPEINIT1( ScChartShell, ScDrawShell );
+
+ScChartShell::ScChartShell(ScViewData* pData) :
+ ScDrawShell(pData)
+{
+ SetHelpId(HID_SCSHELL_CHARTSH);
+ SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ChartObject")));
+}
+
+ScChartShell::~ScChartShell()
+{
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
new file mode 100644
index 000000000000..c3e4a1f8ebb5
--- /dev/null
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -0,0 +1,843 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawsh.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _FILDLG_HXX ***
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX ***
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+//#define _SVTREELIST_HXX
+#define _FILTER_HXX
+//#define _SVLBOXITM_HXX
+//#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+//#define _SFXINIMGR_HXX
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+//#define _SFX_BINDINGS_HXX
+//#define _SFXDISPATCH_HXX
+//#define _SFXMSG_HXX
+//#define _SFXOBJFACE_HXX
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+// SFX
+//#define _SFXAPPWIN_HXX
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+//#define _SFXTBXCTRL_HXX ***
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX
+//#define _SFX_CLIENTSH_HXX
+//#define _SFXDOCINF_HXX
+//#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+//#define _SFXDOCFILE_HXX
+//define _VIEWFAC_HXX
+//#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX
+//#define _MDIFRM_HXX
+#define _SFX_IPFRM_HXX
+//#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+//#define _BASEDLGS_HXX
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+//#define _SFXDOCTEMPL_HXX
+//#define _SFXDOCTDLG_HXX
+//#define _SFX_TEMPLDLG_HXX
+//#define _SFXNEW_HXX
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX ***
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+#define _ARGS_HXX
+//#define _SFXPOOLITEM_HXX
+//#define _SFXINTITEM_HXX
+//#define _SFXENUMITEM_HXX
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX
+#define _SFXPTITEM_HXX
+#define _SFXRECTITEM_HXX
+//#define _SFXITEMPOOL_HXX
+//#define _SFXITEMSET_HXX
+#define _SFXITEMITER_HXX
+//#define _SFX_WHITER_HXX ***
+#define _SFXPOOLCACH_HXX
+//#define _AEITEM_HXX
+#define _SFXRNGITEM_HXX
+//#define _SFXSLSTITM_HXX
+//#define _SFXSTYLE_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXX
+//#define _XOUTX_HXX
+//#define _XPOOL_HXX
+//#define _XTABLE_HXX
+
+//svdraw.hxx
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+//#define _SDR_NOOBJECTS
+//#define _SDR_NOVIEWS
+
+//#define SI_NOITEMS
+//#define SI_NODRW
+#define _SI_NOSBXCONTROLS
+//#define _VCATTR_HXX
+#define _VCONT_HXX
+//#define _VCSBX_HXX
+#define _SI_NOOTHERFORMS
+#define _VCTRLS_HXX
+//#define _VCDRWOBJ_HXX
+#define _SI_NOCONTROL
+#define _SETBRW_HXX
+#define _VCBRW_HXX
+#define _SI_NOSBXCONTROLS
+//#define _SIDLL_HXX
+
+//------------------------------------------------------------------
+
+#include <svx/eeitem.hxx>
+#include <svx/fontwork.hxx>
+#include <svx/labdlg.hxx>
+#include <svx/srchitem.hxx>
+#include <svx/tabarea.hxx>
+#include <svx/tabline.hxx>
+#include <svx/textanim.hxx>
+#include <svx/transfrm.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/objface.hxx>
+#include <sfx2/request.hxx>
+#include <svtools/whiter.hxx>
+#include <vcl/msgbox.hxx>
+#include <segmentc.hxx>
+
+#include "drawsh.hxx"
+#include "drwlayer.hxx"
+#include "sc.hrc"
+#include "viewdata.hxx"
+#include "document.hxx"
+#include "docpool.hxx"
+#include "drawview.hxx"
+#include "scresid.hxx"
+
+#ifndef _SVDOBJ_HXX //autogen
+#include <svx/svdobj.hxx>
+#endif
+
+#define ScDrawShell
+#include "scslots.hxx"
+
+//------------------------------------------------------------------
+
+SEG_EOFGLOBALS()
+
+#pragma SEG_SEGCLASS(SFXMACROS_SEG,STARTWORK_CODE)
+
+TYPEINIT1( ScDrawShell, SfxShell );
+
+SFX_IMPL_INTERFACE(ScDrawShell, SfxShell, ScResId(SCSTR_DRAWSHELL) )
+{
+ SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ ScResId(RID_DRAW_OBJECTBAR) );
+ SFX_POPUPMENU_REGISTRATION( ScResId(RID_POPUP_DRAW) );
+ SFX_OBJECTMENU_REGISTRATION( SID_OBJECTMENU0, ScResId(RID_OBJECTMENU_DRAW) );
+ SFX_CHILDWINDOW_REGISTRATION( SvxFontWorkChildWindow::GetChildWindowId() );
+}
+
+
+// abschalten der nicht erwuenschten Acceleratoren:
+
+#pragma SEG_FUNCDEF(drawsh_09)
+
+void ScDrawShell::StateDisableItems( SfxItemSet &rSet )
+{
+ SfxWhichIter aIter(rSet);
+ USHORT nWhich = aIter.FirstWhich();
+
+ while (nWhich)
+ {
+ rSet.DisableItem( nWhich );
+ nWhich = aIter.NextWhich();
+ }
+}
+
+
+#pragma SEG_FUNCDEF(drawsh_05)
+
+void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
+{
+ USHORT nSlot = rReq.GetSlot();
+ Window* pWin = pViewData->GetActiveWin();
+ Window* pDlgParent = pViewData->GetDialogParent();
+// SfxViewFrame* pViewFrame = SfxViewShell::Current()->GetViewFrame(); //!!! koennte knallen
+ ScDrawView* pView = pViewData->GetScDrawView();
+ SdrModel* pDoc = pViewData->GetDocument()->GetDrawLayer();
+
+ switch ( nSlot )
+ {
+ case SID_TEXT_STANDARD: // Harte Textattributierung loeschen
+ {
+ SfxItemSet aEmptyAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
+ pView->SetAttributes(aEmptyAttr, TRUE);
+ }
+ break;
+
+ case SID_ATTR_LINE_STYLE:
+ case SID_ATTR_LINEEND_STYLE:
+ case SID_ATTR_LINE_DASH:
+ case SID_ATTR_LINE_WIDTH:
+ case SID_ATTR_LINE_COLOR:
+ case SID_ATTR_FILL_STYLE:
+ case SID_ATTR_FILL_COLOR:
+ case SID_ATTR_FILL_GRADIENT:
+ case SID_ATTR_FILL_HATCH:
+ case SID_ATTR_FILL_BITMAP:
+ {
+ // Wenn ToolBar vertikal :
+ if ( !rReq.GetArgs() )
+ {
+ switch ( nSlot )
+ {
+ case SID_ATTR_LINE_STYLE:
+ case SID_ATTR_LINE_DASH:
+ case SID_ATTR_LINE_WIDTH:
+ case SID_ATTR_LINE_COLOR:
+ ExecuteLineDlg( rReq );
+ break;
+
+ case SID_ATTR_FILL_STYLE:
+ case SID_ATTR_FILL_COLOR:
+ case SID_ATTR_FILL_GRADIENT:
+ case SID_ATTR_FILL_HATCH:
+ case SID_ATTR_FILL_BITMAP:
+ ExecuteAreaDlg( rReq );
+ break;
+
+ default:
+ break;
+ }
+
+ //=====
+ return;
+ //=====
+ }
+
+ if( pView->HasMarkedObj() )
+ pView->SetAttrToMarked( *rReq.GetArgs(), FALSE );
+ else
+ pView->SetDefaultAttr( *rReq.GetArgs(), FALSE);
+ pView->InvalidateAttribs();
+ }
+ break;
+
+ case SID_ATTRIBUTES_LINE:
+ ExecuteLineDlg( rReq );
+ break;
+
+ case SID_ATTRIBUTES_AREA:
+ ExecuteAreaDlg( rReq );
+ break;
+
+ case SID_DRAWTEXT_ATTR_DLG:
+ ExecuteTextAttrDlg( rReq );
+ break;
+
+ case SID_ATTR_TRANSFORM:
+ {
+ if ( pView->HasMarkedObj() )
+ {
+ const SfxItemSet* pArgs = rReq.GetArgs();
+
+ if( !pArgs )
+ {
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if( rMarkList.GetMark(0) != 0 )
+ {
+ SdrObject* pObj = rMarkList.GetMark(0)->GetObj();
+ if( pObj->GetObjIdentifier() == OBJ_CAPTION )
+ {
+ // --------- Itemset fuer Caption --------
+ SfxItemSet aNewAttr(pDoc->GetItemPool());
+ pView->GetAttributes(aNewAttr);
+ // --------- Itemset fuer Groesse und Position --------
+ SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked());
+
+ SvxCaptionTabDialog* pDlg = new SvxCaptionTabDialog(pWin, pView);
+
+ const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+ SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
+ aCombSet.Put( aNewAttr );
+ aCombSet.Put( aNewGeoAttr );
+ pDlg->SetInputSet( &aCombSet );
+
+ if (pDlg->Execute() == RET_OK)
+ {
+ rReq.Done(*(pDlg->GetOutputItemSet()));
+ pView->SetAttributes(*pDlg->GetOutputItemSet());
+ pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
+ }
+
+ delete pDlg;
+ }
+ else
+ {
+ SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
+ SvxTransformTabDialog* pDlg = new SvxTransformTabDialog(pWin, &aNewAttr, pView);
+
+ if (pDlg->Execute() == RET_OK)
+ {
+ rReq.Done(*(pDlg->GetOutputItemSet()));
+ pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
+ }
+ delete pDlg;
+ }
+ }
+
+
+ }
+ else
+ pView->SetGeoAttrToMarked( *pArgs );
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+#pragma SEG_FUNCDEF(drawsh_06)
+
+void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
+{
+ ScDrawView* pView = pViewData->GetScDrawView();
+ BOOL bHasMarked = pView->HasMarkedObj();
+ const SdrObject* pObj = NULL;
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+
+ if( rMarkList.GetMarkCount() == 1 )
+ pObj = rMarkList.GetMark(0)->GetObj();
+
+ SfxItemSet aNewAttr( pView->GetDefaultAttr() );
+ if( bHasMarked )
+ pView->MergeAttrFromMarked( aNewAttr, FALSE );
+
+ SvxLineTabDialog* pDlg
+ = new SvxLineTabDialog( pViewData->GetDialogParent(),
+ &aNewAttr,
+ pViewData->GetDocument()->GetDrawLayer(),
+ pObj,
+ bHasMarked );
+
+ if ( nTabPage != 0xffff )
+ pDlg->SetCurPageId( nTabPage );
+
+ if ( pDlg->Execute() == RET_OK )
+ {
+ if( bHasMarked )
+ pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE );
+ else
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE );
+
+ pView->InvalidateAttribs();
+ rReq.Done();
+ }
+
+ delete pDlg;
+}
+
+#pragma SEG_FUNCDEF(drawsh_07)
+
+void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage )
+{
+ ScDrawView* pView = pViewData->GetScDrawView();
+ BOOL bHasMarked = pView->HasMarkedObj();
+
+ SfxItemSet aNewAttr( pView->GetDefaultAttr() );
+ if( bHasMarked )
+ pView->MergeAttrFromMarked( aNewAttr, FALSE );
+
+ SvxAreaTabDialog* pDlg
+ = new SvxAreaTabDialog( pViewData->GetDialogParent(),
+ &aNewAttr,
+ pViewData->GetDocument()->GetDrawLayer(),
+ pView );
+
+ if ( nTabPage != 0xffff )
+ pDlg->SetCurPageId( nTabPage );
+
+ if ( pDlg->Execute() == RET_OK )
+ {
+ if( bHasMarked )
+ pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE );
+ else
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE );
+
+ pView->InvalidateAttribs();
+ rReq.Done();
+ }
+
+ delete pDlg;
+}
+
+#pragma SEG_FUNCDEF(drawsh_08)
+
+void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, USHORT nTabPage )
+{
+ ScDrawView* pView = pViewData->GetScDrawView();
+ BOOL bHasMarked = pView->HasMarkedObj();
+ SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
+
+ if( bHasMarked )
+ pView->MergeAttrFromMarked( aNewAttr, FALSE );
+
+ SvxTextTabDialog* pDlg =
+ new SvxTextTabDialog( pViewData->GetDialogParent(), &aNewAttr , pView);
+
+ USHORT nResult = pDlg->Execute();
+
+ if ( RET_OK == nResult )
+ {
+ if ( bHasMarked )
+ pView->SetAttributes( *pDlg->GetOutputItemSet() );
+ else
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE );
+
+ rReq.Done();
+ }
+ delete( pDlg );
+}
+
+/*------------------------------------------------------------------------
+
+ $Log: not supported by cvs2svn $
+ Revision 1.70 2000/09/17 14:09:01 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.69 2000/08/31 16:38:23 willem.vandorp
+ Header and footer replaced
+
+ Revision 1.68 2000/05/09 18:30:02 nn
+ use IMPL_INTERFACE macro without IDL
+
+ Revision 1.67 2000/02/11 12:25:38 hr
+ #70473# changes for unicode ( patched by automated patchtool )
+
+ Revision 1.66 1999/06/22 08:55:54 NN
+ pass ItemSet to GetAttributes
+
+
+ Rev 1.65 22 Jun 1999 10:55:54 NN
+ pass ItemSet to GetAttributes
+
+ Rev 1.64 22 Feb 1999 20:49:50 ANK
+ #47158# Erweiterungen fuer neue DrawForm-Shell
+
+ Rev 1.63 12 Jan 1998 14:06:46 TJ
+ include
+
+ Rev 1.62 05 Dec 1997 19:31:10 NN
+ Includes
+
+ Rev 1.61 04 Sep 1997 14:30:38 RG
+ change header
+
+ Rev 1.60 27 Aug 1997 13:41:54 TRI
+ VCL includes
+
+ Rev 1.59 05 Aug 1997 15:21:44 TJ
+ include svx/srchitem.hxx
+
+ Rev 1.58 14 Apr 1997 13:05:16 HJS
+ includes
+
+ Rev 1.57 04 Apr 1997 16:27:02 TRI
+ includes
+
+ Rev 1.56 23 Jan 1997 15:37:02 NN
+ beim SvxAreaTabDialog die View uebergeben
+
+ Rev 1.55 08 Jan 1997 20:50:12 HJS
+ forward
+
+ Rev 1.54 15 Nov 1996 17:55:46 NN
+ SvxTextTabDialog aufrufen
+
+ Rev 1.53 08 Nov 1996 08:43:00 NF
+ includes...
+
+ Rev 1.52 29 Oct 1996 14:05:14 NN
+ ueberall ScResId statt ResId
+
+ Rev 1.51 21 Oct 1996 15:36:18 NN
+ include tbxalign war ueberfluessig
+
+ Rev 1.50 22 Aug 1996 15:39:42 NF
+ clooks
+
+ Rev 1.49 09 Aug 1996 20:37:12 NN
+ Svx-Includes aus scitems.hxx raus
+
+ Rev 1.48 22 May 1996 14:52:46 NN
+ GetDrawView -> GetScDrawView
+
+ Rev 1.47 10 Apr 1996 09:31:42 NF
+ sv.hxx als ertes includen
+
+ Rev 1.46 22 Mar 1996 14:03:20 MH
+ add: include sfxiiter.hxx
+
+ Rev 1.45 07 Mar 1996 12:27:38 NF
+ Zuviele defines
+
+ Rev 1.44 13 Feb 1996 08:26:50 TRI
+ CLOOKS
+
+ Rev 1.43 23 Jan 1996 23:43:50 HJS
+ anpassung fuer die nicht-b
+
+ Rev 1.42 18 Dec 1995 14:18:42 MO
+ Visibility-Flags auf Server gesetzt
+
+ Rev 1.41 12 Dec 1995 18:58:44 MO
+ Disable-Methode fuer div. Acceleratoren
+
+ Rev 1.40 12 Dec 1995 17:41:40 MO
+ Standard-Textattribute setzen
+
+ Rev 1.39 11 Dec 1995 18:42:58 MO
+ ExecuteTextAttrDlg
+
+ Rev 1.37 10 Dec 1995 15:51:54 TRI
+ define entfernt
+
+ Rev 1.36 30 Nov 1995 20:09:40 MO
+ Linienenden-Control Execute
+
+ Rev 1.35 28 Nov 1995 21:43:52 MO
+ include-Reihenfolge geandert
+
+ Rev 1.34 10 Nov 1995 18:36:30 NN
+ static -> lcl
+
+ Rev 1.33 26 Oct 1995 14:24:20 JN
+ richtigen Dialog bei Legende aufrufen
+
+ Rev 1.32 06 Oct 1995 08:05:46 NN
+ 300: Parameter bOnlyHardAttr bei MergeAttrFromMarked
+
+ Rev 1.31 10 Aug 1995 00:36:10 HJS
+ svundo muss da sein
+
+ Rev 1.30 07 Aug 1995 13:04:22 MO
+ 253b: Transform-Dialog Aufrufparameter
+
+ Rev 1.29 03 Aug 1995 13:22:26 MO
+ FontWork-ChildWindow Register
+
+ Rev 1.28 21 Jul 1995 10:06:14 NN
+ InvalidateAttribs beim direkten Setzen von Attributen
+
+ Rev 1.27 20 Jul 1995 18:37:38 MO
+ BugFix: vertikale Anordnung der ObjBar (BugId: 16227)
+
+ Rev 1.26 08 Jul 1995 19:14:00 HJS
+ ein define zuviel
+
+ Rev 1.25 06 Jul 1995 22:11:12 HJS
+ ein #define zuviel
+
+ Rev 1.24 04 Jul 1995 11:57:40 MO
+ Parameterkorrektur fuer LineDlg
+
+ Rev 1.23 20 Jun 1995 16:23:46 NN
+ nochmal Segmentierung
+
+ Rev 1.22 13 Jun 1995 18:30:40 MO
+ seg-pragmas korrigiert
+
+ Rev 1.21 13 Jun 1995 14:43:30 MO
+ spezielles Segmentierungs-pragma
+
+ Rev 1.20 07 Jun 1995 10:09:00 MO
+ SFX_OBJECTBAR_OBJECT
+
+ Rev 1.19 07 Jun 1995 08:43:22 MO
+ SvxIds fuer DrawUI
+
+ Rev 1.18 23 May 1995 14:46:04 MO
+ Aufruf Transform-Dialog angepasst
+
+ Rev 1.17 10 May 1995 14:44:36 TRI
+
+ Rev 1.16 04 May 1995 09:28:36 TRI
+ SvxAreaTabPage: geanderte Paramteranzahl
+
+ Rev 1.15 05 Apr 1995 18:16:34 NN
+ tabvwsh-include raus (Funktionen nach viewdata)
+
+ Rev 1.14 04 Apr 1995 18:14:20 TRI
+ Out of Keys
+
+ Rev 1.13 30 Mar 1995 18:31:12 TRI
+ Out of Keys
+
+ Rev 1.12 27 Mar 1995 17:44:54 TRI
+ Out of Keys - Aufteilung
+
+ Rev 1.11 21 Mar 1995 11:12:18 MO
+ 242-Aenderungen
+
+ Rev 1.10 15 Mar 1995 12:59:28 NN
+ MarkAll
+
+ Rev 1.9 03 Mar 1995 22:59:16 NN
+ 2.41 Anpassung
+
+ Rev 1.8 27 Feb 1995 13:25:36 SC
+ * syntax-Fehler korrigiert
+
+
+ Rev 1.7 27 Feb 1995 08:53:52 NN
+ Anordnung
+
+ Rev 1.6 25 Feb 1995 20:18:46 NN
+ Alignment-Funktionen
+
+ Rev 1.5 17 Feb 1995 18:59:50 NN
+ Paste mit Fenster
+
+ Rev 1.4 15 Feb 1995 02:00:44 NN
+ Cut/Copy/Paste
+
+ Rev 1.3 14 Feb 1995 19:55:38 NN
+ ObjectMenue (disabled)
+
+ Rev 1.2 13 Feb 1995 20:59:58 NN
+ Popup Menue
+
+ Rev 1.1 12 Feb 1995 21:42:34 NN
+ Drawing Objektleiste
+
+ Rev 1.0 01 Feb 1995 18:21:42 NN
+ Initial revision.
+
+------------------------------------------------------------------------*/
+
+#pragma SEG_EOFMODULE
+
+
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
new file mode 100644
index 000000000000..3261c17370d2
--- /dev/null
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -0,0 +1,568 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawsh2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+//#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+#define _MOREBTN_HXX
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+#define _FILDLG_HXX
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+#ifdef WIN
+#define _MENU_HXX
+#endif
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+#define _SVTREELIST_HXX
+#define _FILTER_HXX
+#define _SVLBOXITM_HXX
+#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+#define _SFXINIMGR_HXX
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+//#define _SFX_BINDINGS_HXX
+//#define _SFXDISPATCH_HXX
+//#define _SFXMSG_HXX ***
+#define _SFXOBJFACE_HXX
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+// SFX
+#define _SFXAPPWIN_HXX
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX
+//#define _SFX_CLIENTSH_HXX
+//#define _SFXDOCINF_HXX
+//#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+#define _SFXDOCFILE_HXX
+//define _VIEWFAC_HXX
+//#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX
+#define _MDIFRM_HXX
+#define _SFX_IPFRM_HXX
+//#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+#define _BASEDLGS_HXX
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+#define _SFXDOCTEMPL_HXX
+#define _SFXDOCTDLG_HXX
+#define _SFX_TEMPLDLG_HXX
+#define _SFXNEW_HXX
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+//#define _ARGS_HXX
+//#define _SFXPOOLITEM_HXX
+//#define _SFXINTITEM_HXX
+//#define _SFXENUMITEM_HXX
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX
+//#define _SFXPTITEM_HXX ***
+#define _SFXRECTITEM_HXX
+//#define _SFXITEMPOOL_HXX
+//#define _SFXITEMSET_HXX
+#define _SFXITEMITER_HXX
+//#define _SFX_WHITER_HXX
+#define _SFXPOOLCACH_HXX
+//#define _AEITEM_HXX
+#define _SFXRNGITEM_HXX
+//#define _SFXSLSTITM_HXX
+//#define _SFXSTYLE_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXX
+//#define _XOUTX_HXX
+//#define _XPOOL_HXX
+//#define _XTABLE_HXX
+
+//#define SI_NOITEMS
+//#define SI_NODRW
+#define _SI_NOSBXCONTROLS
+//#define _VCATTR_HXX
+#define _VCONT_HXX
+//#define _VCSBX_HXX
+#define _SI_NOOTHERFORMS
+#define _VCTRLS_HXX
+//#define _VCDRWOBJ_HXX
+#define _SI_NOCONTROL
+#define _SETBRW_HXX
+#define _VCBRW_HXX
+#define _SI_NOSBXCONTROLS
+#define _SIDLL_HXX
+
+//svdraw.hxx
+#define _SDR_NOTRANSFORM // Transformationen, selten verwendet
+#define _SDR_NOTOUCH // Hit-Tests, selten verwendet
+
+#define _SDR_NOEXTDEV // ExtOutputDevice
+//#define _SDR_NOUNDO // Undo-Objekte
+#define _SDR_NOSURROGATEOBJ // SdrObjSurrogate
+//#define _SDR_NOPAGEOBJ // SdrPageObj
+#define _SDR_NOVIRTOBJ // SdrVirtObj
+#define _SDR_NOGROUPOBJ // SdrGroupObj
+#define _SDR_NOTEXTOBJ // SdrTextObj
+#define _SDR_NOPATHOBJ // SdrPathObj
+#define _SDR_NOEDGEOBJ // SdrEdgeObj
+#define _SDR_NORECTOBJ // SdrRectObj
+#define _SDR_NOCAPTIONOBJ // SdrCaptionObj
+#define _SDR_NOCIRCLEOBJ // SdrCircleObj
+#define _SDR_NOGRAFOBJ // SdrGrafObj
+#define _SDR_NOOLE2OBJ // SdrOle2Obj
+
+//------------------------------------------------------------------
+
+#include "scitems.hxx"
+#include <svx/sizeitem.hxx>
+#include <svx/svdpagv.hxx>
+#include <svx/xdef.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <svtools/ptitem.hxx>
+#include <svtools/whiter.hxx>
+#include <svx/svdobj.hxx>
+#include <svx/svdouno.hxx>
+
+#include "drawsh.hxx"
+#include "drawview.hxx"
+#include "viewdata.hxx"
+#include "sc.hrc"
+#include "tabvwsh.hxx"
+
+USHORT ScGetFontWorkId(); // in drtxtob
+
+//------------------------------------------------------------------
+
+ScDrawShell::ScDrawShell( ScViewData* pData ) :
+ SfxShell(pData->GetViewShell()),
+ pViewData( pData )
+{
+ SetPool( &pViewData->GetScDrawView()->GetModel()->GetItemPool() );
+ SetUndoManager( pViewData->GetSfxDocShell()->GetUndoManager() );
+ SetHelpId( HID_SCSHELL_DRAWSH );
+ SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Drawing")));
+}
+
+ScDrawShell::~ScDrawShell()
+{
+}
+
+void ScDrawShell::GetState( SfxItemSet& rSet ) // Zustaende / Toggles
+{
+ ScDrawView* pView = pViewData->GetScDrawView();
+ SdrDragMode eMode = pView->GetDragMode();
+
+ rSet.Put( SfxBoolItem( SID_OBJECT_ROTATE, eMode == SDRDRAG_ROTATE ) );
+ rSet.Put( SfxBoolItem( SID_OBJECT_MIRROR, eMode == SDRDRAG_MIRROR ) );
+ rSet.Put( SfxBoolItem( SID_BEZIER_EDIT, !pView->IsFrameDragSingles() ) );
+
+ USHORT nFWId = ScGetFontWorkId();
+ SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
+ rSet.Put(SfxBoolItem(SID_FONTWORK, pViewFrm->HasChildWindow(nFWId)));
+
+ switch( pView->GetAnchor() )
+ {
+ case SCA_PAGE:
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, FALSE ) );
+ break;
+
+ case SCA_CELL:
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, FALSE ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, TRUE ) );
+ break;
+
+ default:
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, FALSE ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, FALSE ) );
+ break;
+ }
+}
+
+void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disablen
+{
+ ScDrawView* pView = pViewData->GetScDrawView();
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ ULONG nMarkCount = rMarkList.GetMarkCount();
+
+ if ( nMarkCount <= 1 || !pView->IsGroupPossible() )
+ rSet.DisableItem( SID_GROUP );
+ if ( nMarkCount == 0 || !pView->IsUnGroupPossible() )
+ rSet.DisableItem( SID_UNGROUP );
+ if ( nMarkCount != 1 || !pView->IsGroupEnterPossible() )
+ rSet.DisableItem( SID_ENTER_GROUP );
+ if ( !pView->IsGroupEntered() )
+ rSet.DisableItem( SID_LEAVE_GROUP );
+
+ if (!pView->IsMirrorAllowed(TRUE,TRUE))
+ {
+ rSet.DisableItem( SID_MIRROR_HORIZONTAL );
+ rSet.DisableItem( SID_MIRROR_VERTICAL );
+ }
+
+ if ( nMarkCount <= 1 ) // nichts oder nur ein Objekt selektiert
+ {
+ // Ausrichtung
+ rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); // keine Ausrichtung an der Seite
+ rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
+ rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
+ rSet.DisableItem( SID_OBJECT_ALIGN_UP );
+ rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
+ rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
+ }
+
+ if ( !nMarkCount || pView->HasMarkedControl() )
+ {
+ // Layer von Controls darf nicht veraendert werden
+ rSet.DisableItem( SID_OBJECT_HEAVEN );
+ rSet.DisableItem( SID_OBJECT_HELL );
+ }
+ else
+ {
+ if(AreAllObjectsOnLayer(SC_LAYER_FRONT,rMarkList))
+ {
+ rSet.DisableItem( SID_OBJECT_HEAVEN );
+ }
+ else if(AreAllObjectsOnLayer(SC_LAYER_BACK,rMarkList))
+ {
+ rSet.DisableItem( SID_OBJECT_HELL );
+ }
+ }
+
+
+ if ( !nMarkCount ) // nichts selektiert
+ {
+ // Anordnung
+ rSet.DisableItem( SID_FRAME_UP );
+ rSet.DisableItem( SID_FRAME_DOWN );
+ rSet.DisableItem( SID_FRAME_TO_TOP );
+ rSet.DisableItem( SID_FRAME_TO_BOTTOM );
+ // Clipboard / loeschen
+ rSet.DisableItem( SID_DELETE );
+ rSet.DisableItem( SID_DELETE_CONTENTS );
+ rSet.DisableItem( SID_CUT );
+ rSet.DisableItem( SID_COPY );
+ // sonstiges
+ rSet.DisableItem( SID_ANCHOR_TOGGLE );
+ rSet.DisableItem( SID_ORIGINALSIZE );
+ rSet.DisableItem( SID_ATTR_TRANSFORM );
+ }
+}
+
+//
+// Attribute fuer Drawing-Objekte
+//
+
+void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
+{
+ Point aMousePos = pViewData->GetMousePosPixel();
+ Window* pWindow = pViewData->GetActiveWin();
+ ScDrawView* pDrView = pViewData->GetScDrawView();
+ Point aPos = pWindow->PixelToLogic(aMousePos);
+ BOOL bHasMarked = pDrView->HasMarkedObj();
+
+ if( bHasMarked )
+ {
+ rSet.Put( pDrView->GetAttrFromMarked(FALSE) );
+
+ // Wenn die View selektierte Objekte besitzt, muessen entspr. Items
+ // von SFX_ITEM_DEFAULT (_ON) auf SFX_ITEM_DISABLED geaendert werden
+
+ SfxWhichIter aIter( rSet, XATTR_LINE_FIRST, XATTR_FILL_LAST );
+ USHORT nWhich = aIter.FirstWhich();
+ while( nWhich )
+ {
+ if( SFX_ITEM_DEFAULT == rSet.GetItemState( nWhich ) )
+ rSet.DisableItem( nWhich );
+
+ nWhich = aIter.NextWhich();
+ }
+ }
+ else
+ rSet.Put( pDrView->GetDefaultAttr() );
+
+ // Position- und Groesse-Items
+ if ( pDrView->IsAction() )
+ {
+ Rectangle aRect;
+ pDrView->TakeActionRect( aRect );
+
+ if ( aRect.IsEmpty() )
+ rSet.Put( SfxPointItem(SID_ATTR_POSITION, aPos) );
+ else
+ {
+ pDrView->GetPageViewPvNum(0)->LogicToPagePos(aRect);
+ rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
+ rSet.Put( SvxSizeItem( SID_ATTR_SIZE,
+ Size( aRect.Right() - aRect.Left(),
+ aRect.Bottom() - aRect.Top() ) ) );
+ }
+ }
+ else
+ {
+ rSet.Put( SfxPointItem(SID_ATTR_POSITION, aPos) );
+
+ if ( bHasMarked )
+ {
+ Rectangle aRect = pDrView->GetAllMarkedRect();
+ pDrView->GetPageViewPvNum(0)->LogicToPagePos(aRect);
+ rSet.Put( SvxSizeItem( SID_ATTR_SIZE,
+ Size( aRect.Right() - aRect.Left(),
+ aRect.Bottom() - aRect.Top()) ) );
+ }
+ else
+ rSet.Put( SvxSizeItem( SID_ATTR_SIZE, Size( 0, 0 ) ) );
+ }
+
+}
+
+void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet)
+{
+ // Dialoge fuer Draw-Attribute disablen, wenn noetig
+
+ ScDrawView* pDrView = pViewData->GetScDrawView();
+ SfxItemSet aViewSet = pDrView->GetAttrFromMarked(FALSE);
+
+ if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SFX_ITEM_DEFAULT )
+ {
+ rSet.DisableItem( SID_ATTRIBUTES_LINE );
+ rSet.DisableItem( SID_ATTR_LINEEND_STYLE ); // Tbx-Controller
+ }
+
+ if ( aViewSet.GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT )
+ rSet.DisableItem( SID_ATTRIBUTES_AREA );
+}
+
+BOOL ScDrawShell::AreAllObjectsOnLayer(USHORT nLayerNo,const SdrMarkList& rMark)
+{
+ BOOL bResult=TRUE;
+ ULONG nCount = rMark.GetMarkCount();
+ for (ULONG i=0; i<nCount; i++)
+ {
+ SdrObject* pObj = rMark.GetMark(i)->GetObj();
+ if ( !pObj->ISA(SdrUnoObj) )
+ {
+ if(nLayerNo!=pObj->GetLayer())
+ {
+ bResult=FALSE;
+ break;
+ }
+ }
+ }
+ return bResult;
+}
+
+
diff --git a/sc/source/ui/drawfunc/drawsh4.cxx b/sc/source/ui/drawfunc/drawsh4.cxx
new file mode 100644
index 000000000000..1d878d03004d
--- /dev/null
+++ b/sc/source/ui/drawfunc/drawsh4.cxx
@@ -0,0 +1,423 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawsh4.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+#if defined WIN
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX ***
+//#define _LINK_HXX ***
+//#define _ERRCODE_HXX ***
+//#define _GEN_HXX ***
+//#define _FRACT_HXX ***
+//#define _STRING_HXX ***
+//#define _MTF_HXX ***
+//#define _CONTNR_HXX ***
+//#define _LIST_HXX ***
+//#define _TABLE_HXX ***
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX ***
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX ***
+//#define _DEBUG_HXX ***
+//#define _DATE_HXX ***
+//#define _TIME_HXX ***
+//#define _DATETIME_HXX ***
+//#define _INTN_HXX ***
+//#define _WLDCRD_HXX ***
+//#define _FSYS_HXX ***
+//#define _STREAM_HXX ***
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+
+//SV
+#define _CLIP_HXX
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX ***
+//#define _PAL_HXX ***
+//#define _BITMAP_HXX ***
+//#define _GDIOBJ_HXX ***
+//#define _POINTR_HXX ***
+//#define _ICON_HXX ***
+//#define _IMAGE_HXX ***
+//#define _KEYCOD_HXX ***
+//#define _EVENT_HXX ***
+#define _HELP_HXX
+//#define _APP_HXX ***
+//#define _MDIAPP_HXX ***
+//#define _TIMER_HXX ***
+//#define _METRIC_HXX ***
+//#define _REGION_HXX ***
+//#define _OUTDEV_HXX ***
+//#define _SYSTEM_HXX ***
+//#define _VIRDEV_HXX ***
+//#define _JOBSET_HXX ***
+//#define _PRINT_HXX ***
+//#define _WINDOW_HXX ***
+//#define _SYSWIN_HXX ***
+//#define _WRKWIN_HXX ***
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX ***
+//#define _DOCKWIN_HXX ***
+//#define _CTRL_HXX ***
+//#define _SCRBAR_HXX ***
+//#define _BUTTON_HXX ***
+#define _IMAGEBTN_HXX
+//#define _FIXED_HXX ***
+//#define _GROUP_HXX ***
+//#define _EDIT_HXX ***
+//#define _COMBOBOX_HXX ***
+//#define _LSTBOX_HXX ***
+//#define _SELENG_HXX ***
+#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX ***
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX ***
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX ***
+//#define _MSGBOX_HXX ***
+//#define _SYSDLG_HXX ***
+#define _FILDLG_HXX
+//#define _PRNDLG_HXX ***
+#define _COLDLG_HXX
+#define _TABDLG_HXX
+#define _MENU_HXX
+//#define _GDIMTF_HXX ***
+//#define _POLY_HXX ***
+//#define _ACCEL_HXX ***
+//#define _GRAPH_HXX ***
+#define _SOUND_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+#define _TABBAR_HXX
+//#define _VALUESET_HXX ***
+#define _STDMENU_HXX
+#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX ***
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _SVTREELIST_HXX
+#define _FILTER_HXX
+#define _SVLBOXITM_HXX
+#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//svdraw.hxx
+#define _SDR_NOVIEWMARKER
+#define _SDR_NODRAGMETHODS
+#define _SDR_NOXOUTDEV
+#define _SDR_NOITEMS
+
+
+
+#define _SDR_NOTRANSFORM // Transformationen, selten verwendet
+#define _SDR_NOTOUCH // Hit-Tests, selten verwendet
+
+#define _SDR_NOEXTDEV // ExtOutputDevice
+//#define _SDR_NOUNDO // Undo-Objekte
+#define _SDR_NOSURROGATEOBJ // SdrObjSurrogate
+#define _SDR_NOPAGEOBJ // SdrPageObj
+#define _SDR_NOVIRTOBJ // SdrVirtObj
+#define _SDR_NOGROUPOBJ // SdrGroupObj
+#define _SDR_NOTEXTOBJ // SdrTextObj
+#define _SDR_NOPATHOBJ // SdrPathObj
+#define _SDR_NOEDGEOBJ // SdrEdgeObj
+#define _SDR_NORECTOBJ // SdrRectObj
+#define _SDR_NOCAPTIONOBJ // SdrCaptionObj
+#define _SDR_NOCIRCLEOBJ // SdrCircleObj
+#define _SDR_NOGRAFOBJ // SdrGrafObj
+#define _SDR_NOOLE2OBJ // SdrOle2Obj
+
+
+//sfxcore.hxx
+//#define _SFXINIMGR_HXX
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+//#define _SFX_BINDINGS_HXX
+//#define _SFXDISPATCH_HXX
+//#define _SFXMSG_HXX
+//#define _SFXOBJFACE_HXX
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+//#define _BASEDLGS_HXX
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+#define _SFXDOCTEMPL_HXX //*
+#define _SFXDOCTDLG_HXX //*
+#define _SFX_TEMPLDLG_HXX //*
+#define _SFXNEW_HXX //*
+#define _SFXDOCMAN_HXX
+
+
+// SFX
+//#define _SFXAPPWIN_HXX ***
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX ***
+//#define _SFXCTRLITEM_HXX ***
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+
+
+// sfxdoc.hxx:
+//#define _SFXDOCINF_HXX ***
+#define _SFXVIEWFRM_HXX
+#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+#define _SFXDOCFILE_HXX
+#define _VIEWFAC_HXX
+//#define _SFXVIEWSH_HXX ***
+#define _MDIFRM_HXX
+#define _SFX_IPFRM_HXX
+#define _SFX_INTERNO_HXX
+
+#define _SIDLL_HXX
+#define _SI_NODRW_HXX
+#define _SI_NOITEMS_HXX
+#define _SI_NOCONTROL_HXX
+#define _SI_NOOTHERFORMS_HXX
+#define _SI_NOSBXCONTROLS_HXX
+#define _VCBRW_HXX
+#define _VCTRLS_HXX
+#define _VCONT_HXX
+#define _VDRWOBJ_HXX
+
+// drawlayer
+//#define _SVDLAYER_HXX ***
+//#define _SVDATTR_HXX ***
+#define _SVDIO_HXX
+#define _SVBOXITM_HXX
+#define _SVDEC_HXX
+#define _SVDXOUT_HXX
+
+#define _SVX_DAILDLL_HXX
+#define _SVX_HYPHEN_HXX
+#define _SVX_IMPGRF_HXX
+#define _SVX_OPTITEMS_HXX
+#define _SVX_OPTGERL_HXX
+#define _SVX_OPTSAVE_HXX
+#define _SVX_OPTSPELL_HXX
+#define _SVX_OPTPATH_HXX
+#define _SVX_OPTLINGU_HXX
+#define _SVX_RULER_HXX
+#define _SVX_RULRITEM_HXX
+#define _SVX_SPLWRAP_HXX
+#define _SVX_SPLDLG_HXX
+#define _SVX_THESDLG_HXX
+
+//inet
+#define _INETINDP_HXX
+#define _INETIMP_HXX
+#define _INETWRAP_HXX
+#define _INETKEEP_HXX
+#define _PLUGMGR_HXX
+//#define _URLOBJ_HXX ***
+
+#define SFX_NOCLOOKS
+#endif
+
+//------------------------------------------------------------------
+
+#include "scitems.hxx"
+#include <svx/drawitem.hxx>
+#include <svx/fontwork.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/xdef.hxx>
+#include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
+
+#include "drawsh.hxx"
+#include "drawview.hxx"
+#include "viewdata.hxx"
+#include "tabvwsh.hxx"
+#include "sc.hrc"
+
+
+//------------------------------------------------------------------
+
+void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
+{
+ const SdrObject* pObj = NULL;
+ SvxFontWorkDialog* pDlg = NULL;
+ ScDrawView* pDrView = pViewData->GetScDrawView();
+ const SdrMarkList& rMarkList = pDrView->GetMarkList();
+ USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+
+ SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
+ if ( pViewFrm->HasChildWindow(nId) )
+ pDlg = (SvxFontWorkDialog*)(pViewFrm->GetChildWindow(nId)->GetWindow());
+
+ if ( rMarkList.GetMarkCount() == 1 )
+ pObj = rMarkList.GetMark(0)->GetObj();
+
+ if ( pObj == NULL || !pObj->ISA(SdrTextObj) ||
+ !((SdrTextObj*) pObj)->HasText() )
+ {
+ if ( pDlg )
+ pDlg->SetActive(FALSE);
+
+ rSet.DisableItem(XATTR_FORMTXTSTYLE);
+ rSet.DisableItem(XATTR_FORMTXTADJUST);
+ rSet.DisableItem(XATTR_FORMTXTDISTANCE);
+ rSet.DisableItem(XATTR_FORMTXTSTART);
+ rSet.DisableItem(XATTR_FORMTXTMIRROR);
+ rSet.DisableItem(XATTR_FORMTXTSTDFORM);
+ rSet.DisableItem(XATTR_FORMTXTHIDEFORM);
+ rSet.DisableItem(XATTR_FORMTXTOUTLINE);
+ rSet.DisableItem(XATTR_FORMTXTSHADOW);
+ rSet.DisableItem(XATTR_FORMTXTSHDWCOLOR);
+ rSet.DisableItem(XATTR_FORMTXTSHDWXVAL);
+ rSet.DisableItem(XATTR_FORMTXTSHDWYVAL);
+ }
+ else
+ {
+ if ( pDlg )
+ {
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+
+ if ( pDocSh )
+ {
+ const SfxPoolItem* pItem = pDocSh->GetItem( ITEMID_COLOR_TABLE );
+ XColorTable* pColorTable = NULL;
+
+ if ( pItem )
+ pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable();
+
+ pDlg->SetActive();
+
+ if ( pColorTable )
+ pDlg->SetColorTable( pColorTable );
+ else
+ { DBG_ERROR( "ColorList not found :-/" ); }
+ }
+ }
+ SfxItemSet aViewAttr(pDrView->GetModel()->GetItemPool());
+ pDrView->GetAttributes(aViewAttr);
+ rSet.Set(aViewAttr);
+ }
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
new file mode 100644
index 000000000000..cdd58e3bc616
--- /dev/null
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawsh5.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+#include <sfx2/request.hxx>
+#include <tools/urlobj.hxx>
+#include <svx/fmglob.hxx>
+#include <svx/hlnkitem.hxx>
+#include <svx/svdouno.hxx>
+
+#include <com/sun/star/form/FormButtonType.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/awt/XControlModel.hpp>
+
+#include "drawsh.hxx"
+#include "drawview.hxx"
+#include "viewdata.hxx"
+#include "tabvwsh.hxx"
+#include "docsh.hxx"
+
+using namespace com::sun::star;
+
+//------------------------------------------------------------------
+
+void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
+{
+ ScDrawView* pView = pViewData->GetScDrawView();
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ ULONG nMarkCount = rMarkList.GetMarkCount();
+
+ // Hyperlink
+
+ SvxHyperlinkItem aHLinkItem;
+
+ if ( nMarkCount == 1 ) // URL-Button markiert ?
+ {
+ SdrObject* pObj = rMarkList.GetMark(0)->GetObj();
+ SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObj);
+ if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
+ {
+ uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel();
+ DBG_ASSERT( xControlModel.is(), "UNO-Control ohne Model" );
+ if( !xControlModel.is() )
+ return;
+
+ uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo();
+
+ rtl::OUString sPropButtonType = rtl::OUString::createFromAscii( "ButtonType" );
+ rtl::OUString sPropTargetURL = rtl::OUString::createFromAscii( "TargetURL" );
+ rtl::OUString sPropTargetFrame = rtl::OUString::createFromAscii( "TargetFrame" );
+ rtl::OUString sPropLabel = rtl::OUString::createFromAscii( "Label" );
+
+ if(xInfo->hasPropertyByName( sPropButtonType ))
+ {
+ uno::Any aAny = xPropSet->getPropertyValue( sPropButtonType );
+ form::FormButtonType eTmp;
+ if ( (aAny >>= eTmp) && eTmp == form::FormButtonType_URL )
+ {
+ rtl::OUString sTmp;
+ // Label
+ if(xInfo->hasPropertyByName( sPropLabel ))
+ {
+ aAny = xPropSet->getPropertyValue( sPropLabel );
+ if ( (aAny >>= sTmp) && sTmp.len() )
+ {
+ aHLinkItem.SetName(sTmp);
+ }
+ }
+ // URL
+ if(xInfo->hasPropertyByName( sPropTargetURL ))
+ {
+ aAny = xPropSet->getPropertyValue( sPropTargetURL );
+ if ( (aAny >>= sTmp) && sTmp.len() )
+ {
+ aHLinkItem.SetURL(sTmp);
+ }
+ }
+ // Target
+ if(xInfo->hasPropertyByName( sPropTargetFrame ))
+ {
+ aAny = xPropSet->getPropertyValue( sPropTargetFrame );
+ if ( (aAny >>= sTmp) && sTmp.len() )
+ {
+ aHLinkItem.SetTargetFrame(sTmp);
+ }
+ }
+ aHLinkItem.SetInsertMode(HLINK_BUTTON);
+ }
+ }
+ }
+ }
+
+ rSet.Put(aHLinkItem);
+}
+
+void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
+{
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+
+ USHORT nSlot = rReq.GetSlot();
+ switch ( nSlot )
+ {
+ case SID_HYPERLINK_SETLINK:
+ if( pReqArgs )
+ {
+ const SfxPoolItem* pItem;
+ if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET )
+ {
+ const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
+ const String& rName = pHyper->GetName();
+ const String& rURL = pHyper->GetURL();
+ const String& rTarget = pHyper->GetTargetFrame();
+ SvxLinkInsertMode eMode = pHyper->GetInsertMode();
+
+ BOOL bDone = FALSE;
+ if ( eMode == HLINK_DEFAULT || eMode == HLINK_BUTTON )
+ {
+ ScDrawView* pView = pViewData->GetScDrawView();
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if ( rMarkList.GetMarkCount() == 1 )
+ {
+ SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, rMarkList.GetMark(0)->GetObj());
+ if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
+ {
+ uno::Reference<awt::XControlModel> xControlModel =
+ pUnoCtrl->GetUnoControlModel();
+ DBG_ASSERT( xControlModel.is(), "UNO-Control ohne Model" );
+ if( !xControlModel.is() )
+ return;
+
+ uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo();
+
+ rtl::OUString sPropTargetURL =
+ rtl::OUString::createFromAscii( "TargetURL" );
+
+ // Darf man eine URL an dem Objekt setzen?
+ if (xInfo->hasPropertyByName( sPropTargetURL ))
+ {
+ // Ja!
+
+ rtl::OUString sPropButtonType =
+ rtl::OUString::createFromAscii( "ButtonType" );
+ rtl::OUString sPropTargetFrame =
+ rtl::OUString::createFromAscii( "TargetFrame" );
+ rtl::OUString sPropLabel =
+ rtl::OUString::createFromAscii( "Label" );
+
+ uno::Any aAny;
+ aAny <<= rtl::OUString(rName);
+ xPropSet->setPropertyValue( sPropLabel, aAny );
+
+ aAny <<= rtl::OUString(INetURLObject::RelToAbs(rURL));
+ xPropSet->setPropertyValue( sPropTargetURL, aAny );
+
+ if( rTarget.Len() )
+ {
+ aAny <<= rtl::OUString(rTarget);
+ xPropSet->setPropertyValue( sPropTargetFrame, aAny );
+ }
+
+ form::FormButtonType eButtonType = form::FormButtonType_URL;
+ aAny <<= eButtonType;
+ xPropSet->setPropertyValue( sPropButtonType, aAny );
+
+ //! Undo ???
+ pViewData->GetDocShell()->SetDocumentModified();
+ bDone = TRUE;
+ }
+ }
+ }
+ }
+
+ if (!bDone)
+ pViewData->GetViewShell()->
+ InsertURL( rName, rURL, rTarget, (USHORT) eMode );
+
+ // InsertURL an der ViewShell schaltet bei "Text" die DrawShell ab !!!
+ }
+ }
+ break;
+ default:
+ DBG_ERROR("falscher Slot");
+ }
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx
new file mode 100644
index 000000000000..9e5848814089
--- /dev/null
+++ b/sc/source/ui/drawfunc/drformsh.cxx
@@ -0,0 +1,367 @@
+/*************************************************************************
+ *
+ * $RCSfile: drformsh.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _FILDLG_HXX ***
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX ***
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+//#define _SVTREELIST_HXX
+#define _FILTER_HXX
+//#define _SVLBOXITM_HXX
+//#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+//#define _SFXINIMGR_HXX
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+//#define _SFX_BINDINGS_HXX
+//#define _SFXDISPATCH_HXX
+//#define _SFXMSG_HXX
+//#define _SFXOBJFACE_HXX
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+// SFX
+//#define _SFXAPPWIN_HXX
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+//#define _SFXTBXCTRL_HXX ***
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX
+//#define _SFX_CLIENTSH_HXX
+//#define _SFXDOCINF_HXX
+//#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+//#define _SFXDOCFILE_HXX
+//define _VIEWFAC_HXX
+//#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX
+//#define _MDIFRM_HXX
+#define _SFX_IPFRM_HXX
+//#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+//#define _BASEDLGS_HXX
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+//#define _SFXDOCTEMPL_HXX
+//#define _SFXDOCTDLG_HXX
+//#define _SFX_TEMPLDLG_HXX
+//#define _SFXNEW_HXX
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX ***
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+#define _ARGS_HXX
+//#define _SFXPOOLITEM_HXX
+//#define _SFXINTITEM_HXX
+//#define _SFXENUMITEM_HXX
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX
+#define _SFXPTITEM_HXX
+#define _SFXRECTITEM_HXX
+//#define _SFXITEMPOOL_HXX
+//#define _SFXITEMSET_HXX
+#define _SFXITEMITER_HXX
+//#define _SFX_WHITER_HXX ***
+#define _SFXPOOLCACH_HXX
+//#define _AEITEM_HXX
+#define _SFXRNGITEM_HXX
+//#define _SFXSLSTITM_HXX
+//#define _SFXSTYLE_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXX
+//#define _XOUTX_HXX
+//#define _XPOOL_HXX
+//#define _XTABLE_HXX
+
+//svdraw.hxx
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+//#define _SDR_NOOBJECTS
+//#define _SDR_NOVIEWS
+
+//#define SI_NOITEMS
+//#define SI_NODRW
+#define _SI_NOSBXCONTROLS
+//#define _VCATTR_HXX
+#define _VCONT_HXX
+//#define _VCSBX_HXX
+#define _SI_NOOTHERFORMS
+#define _VCTRLS_HXX
+//#define _VCDRWOBJ_HXX
+#define _SI_NOCONTROL
+#define _SETBRW_HXX
+#define _VCBRW_HXX
+#define _SI_NOSBXCONTROLS
+//#define _SIDLL_HXX
+
+//------------------------------------------------------------------
+
+#include <svx/eeitem.hxx>
+#include <svx/fontwork.hxx>
+#include <svx/labdlg.hxx>
+#include <svx/srchitem.hxx>
+#include <svx/tabarea.hxx>
+#include <svx/tabline.hxx>
+#include <svx/textanim.hxx>
+#include <svx/transfrm.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/objface.hxx>
+#include <sfx2/request.hxx>
+#include <svtools/whiter.hxx>
+#include <vcl/msgbox.hxx>
+#include <segmentc.hxx>
+
+#include "drformsh.hxx"
+#include "drwlayer.hxx"
+#include "sc.hrc"
+#include "viewdata.hxx"
+#include "document.hxx"
+#include "docpool.hxx"
+#include "drawview.hxx"
+#include "scresid.hxx"
+
+#ifndef _SVDOBJ_HXX //autogen
+#include <svx/svdobj.hxx>
+#endif
+
+#define ScDrawFormShell
+#include "scslots.hxx"
+
+
+SFX_IMPL_INTERFACE(ScDrawFormShell, ScDrawShell, ScResId(SCSTR_DRAWFORMSHELL) )
+{
+ SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ ScResId(RID_OBJECTBAR_DRAWFORM) );
+ SFX_POPUPMENU_REGISTRATION( ScResId(RID_POPUP_DRAWFORM) );
+ SFX_OBJECTMENU_REGISTRATION( SID_OBJECTMENU0, ScResId(RID_OBJECTMENU_DRAWFORM) );
+}
+
+TYPEINIT1( ScDrawFormShell, ScDrawShell );
+
+ScDrawFormShell::ScDrawFormShell(ScViewData* pData) :
+ ScDrawShell(pData)
+{
+ SetHelpId(HID_SCSHELL_DRAWFORMSH);
+ SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("DrawForm")));
+}
+
+ScDrawFormShell::~ScDrawFormShell()
+{
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/drformsh.src b/sc/source/ui/drawfunc/drformsh.src
new file mode 100644
index 000000000000..d005612b087f
--- /dev/null
+++ b/sc/source/ui/drawfunc/drformsh.src
@@ -0,0 +1,563 @@
+/*************************************************************************
+ *
+ * $RCSfile: drformsh.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "sc.hrc"
+#include "submenu.hrc"
+#include <offmgr/offmenu.hrc>
+ //
+ // Defines -------------------------------------------------------------------------------
+ //
+#define MN_LAYER\
+ ToolBoxItem\
+ {\
+ Identifier = SID_FRAME_TO_TOP ; \
+ HelpID = SID_FRAME_TO_TOP ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_FRAME_TO_BOTTOM ; \
+ HelpID = SID_FRAME_TO_BOTTOM ; \
+ };
+
+#define MN_ARRANGESUB \
+ MenuItem\
+ {\
+ Identifier = SUBMENU_OBJARRANGE ; \
+ HelpID = HID_SCMENU_OBJARRANGE ; \
+ Text = "~Anordnung" ; \
+ Text [ ENGLISH ] = "Arrange" ; \
+ Text [ norwegian ] = "Arrange" ; \
+ Text [ italian ] = "~Disponi" ; \
+ Text [ portuguese_brazilian ] = "Organizar" ; \
+ Text [ portuguese ] = "~Disposio" ; \
+ Text [ finnish ] = "Jrjest" ; \
+ Text [ danish ] = "Pl~acering" ; \
+ Text [ french ] = "~Disposition" ; \
+ Text [ swedish ] = "~Placering" ; \
+ Text [ dutch ] = "~Positie" ; \
+ Text [ spanish ] = "~Posicin" ; \
+ Text [ english_us ] = "~Arrange" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ ITEM_FORMAT_FRAME_TO_TOP\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_FRAME_UP ; \
+ HelpId = SID_FRAME_UP ; \
+ /* ### ACHTUNG: Neuer Text in Resource? W~eiter nach vorn : Weiter nach vorn */\
+ Text = "W~eiter nach vorn" ; \
+ Text [ ENGLISH ] = "Bring Forward" ; \
+ Text [ norwegian ] = "Flytt Framover" ; \
+ Text [ italian ] = "Porta pi ~avanti" ; \
+ Text [ portuguese_brazilian ] = "Tazer Para Frente" ; \
+ Text [ portuguese ] = "~Trazer para a frente" ; \
+ Text [ finnish ] = "Yksi eteen" ; \
+ Text [ danish ] = "F~lyt fremad" ; \
+ Text [ french ] = "V~ers l'avant" ; \
+ Text [ swedish ] = "Flytta l~ngre fram" ; \
+ Text [ dutch ] = "Naar ~voren" ; \
+ Text [ spanish ] = "Traer ms a~delante" ; \
+ Text [ english_us ] = "Bring ~Forward" ; \
+ Text[ chinese_simplified ] = "ǰ(~F)";\
+ Text[ russian ] = " ~";\
+ Text[ polish ] = "Przesu do przodu";\
+ Text[ japanese ] = "Oʂֈړ(~F)";\
+ Text[ greek ] = "~ ";\
+ Text[ korean ] = " (~ F)";\
+ Text[ chinese_traditional ] = "Aem(~F)";\
+ Text[ arabic ] = " ";\
+ Text[ turkish ] = "~Bir ne getir";\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_FRAME_DOWN ; \
+ HelpId = SID_FRAME_DOWN ; \
+ /* ### ACHTUNG: Neuer Text in Resource? Weiter ~nach hinten : Weiter nach hinten */\
+ Text = "Weiter ~nach hinten" ; \
+ Text [ ENGLISH ] = "Send Backward" ; \
+ Text [ norwegian ] = "Send Bakover" ; \
+ Text [ italian ] = "Porta pi i~ndietro" ; \
+ Text [ portuguese_brazilian ] = "Enviar Para o Fundo" ; \
+ Text [ portuguese ] = "Enviar para o ~fundo" ; \
+ Text [ finnish ] = "Yksi taakse" ; \
+ Text [ danish ] = "Flyt bag~ud" ; \
+ Text [ french ] = "~Vers l'arrire" ; \
+ Text [ swedish ] = "Flytta l~ngre bak" ; \
+ Text [ dutch ] = "Naar ~achteren" ; \
+ Text [ spanish ] = "Enviar hacia a~trs" ; \
+ Text [ english_us ] = "Send Back~ward" ; \
+ Text[ chinese_simplified ] = "ٺ(~W)";\
+ Text[ russian ] = " ~";\
+ Text[ polish ] = "Przesu do tyu";\
+ Text[ japanese ] = "wʂɈړ(~W)";\
+ Text[ greek ] = "~ ";\
+ Text[ korean ] = "ڷ (~W)";\
+ Text[ chinese_traditional ] = "Am(~W)";\
+ Text[ arabic ] = " ";\
+ Text[ turkish ] = "Bir alta gnder";\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_FRAME_TO_BOTTOM\
+ };\
+ MenuItem { Separator = TRUE ; }; \
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_HEAVEN\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_HELL\
+ };\
+ };\
+ };\
+ Text[ chinese_simplified ] = "(~A)";\
+ Text[ russian ] = "~";\
+ Text[ polish ] = "~Rozmieszczenie";\
+ Text[ japanese ] = "(~A)";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "(~A)";\
+ Text[ chinese_traditional ] = "Ƨ(~A)";\
+ Text[ arabic ] = "~";\
+ Text[ turkish ] = "Dzen";\
+ };
+
+#define MN_ANCHORSUB \
+ MenuItem\
+ {\
+ Identifier = SUBMENU_ANCHOR ; \
+ HelpID = HID_SCMENU_ANCHOR ; \
+ Text = "~Verankerung" ; \
+ Text [ ENGLISH ] = "Anchor" ; \
+ Text [ english_us ] = "An~chor" ; \
+ Text [ italian ] = "Anco~raggio" ; \
+ Text [ spanish ] = "~Anclaje" ; \
+ Text [ french ] = "~Ancrage" ; \
+ Text [ dutch ] = "~Verankering" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ Identifier = SID_ANCHOR_PAGE ; \
+ HelpId = SID_ANCHOR_PAGE ; \
+ Text = "An der ~Seite" ; \
+ Text [ ENGLISH ] = "To the ~page" ; \
+ Text [ dutch ] = "Aan ~pagina" ; \
+ Text [ english_us ] = "To P~age" ; \
+ Text [ italian ] = "Alla ~pagina" ; \
+ Text [ spanish ] = "A la ~pgina" ; \
+ Text [ french ] = " la ~page" ; \
+ Text [ swedish ] = "Vid ~sidan" ; \
+ Text [ danish ] = "Til ~siden" ; \
+ Text [ portuguese_brazilian ] = "An der ~Seite" ; \
+ Text [ portuguese ] = "~Na pgina" ; \
+ Text[ chinese_simplified ] = "ҳ(~A)";\
+ Text[ russian ] = "~ ";\
+ Text[ polish ] = "~Na stronie";\
+ Text[ japanese ] = "߰ނ(~A)";\
+ Text[ greek ] = "~ ";\
+ Text[ korean ] = "(~A)";\
+ Text[ chinese_traditional ] = "bW(~A)";\
+ Text[ arabic ] = " ";\
+ Text[ turkish ] = "Sayfa";\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_ANCHOR_CELL ; \
+ HelpId = SID_ANCHOR_CELL ; \
+ Text = "An der ~Zelle" ; \
+ Text [ ENGLISH ] = "To the ~cell" ; \
+ Text [ dutch ] = "Aan ~cel" ; \
+ Text [ english_us ] = "To ~Cell" ; \
+ Text [ italian ] = "Alla ~cella" ; \
+ Text [ spanish ] = "A la ~celda" ; \
+ Text [ french ] = " la ~cellule" ; \
+ Text [ swedish ] = "Vid ~cellen" ; \
+ Text [ danish ] = "Til cellen" ; \
+ Text [ portuguese ] = "~Na clula" ; \
+ Text [ portuguese_brazilian ] = "An der ~Zelle" ; \
+ Text[ chinese_simplified ] = "ڵԪ(~C)";\
+ Text[ russian ] = " ";\
+ Text[ polish ] = "Przy komrce";\
+ Text[ japanese ] = "ق(~C)";\
+ Text[ greek ] = " ~";\
+ Text[ korean ] = " (~C)";\
+ Text[ chinese_traditional ] = "bxsW(~C)";\
+ Text[ arabic ] = " ";\
+ Text[ turkish ] = "Hcre";\
+ };\
+ };\
+ };\
+ Text [ swedish ] = "~Frankring" ; \
+ Text [ danish ] = "~Forankring" ; \
+ Text [ portuguese ] = "~ncora" ; \
+ Text [ portuguese_brazilian ] = "~Verankerung" ; \
+ Text[ chinese_simplified ] = "(~C)";\
+ Text[ russian ] = "~";\
+ Text[ polish ] = "~Zakotwiczenie";\
+ Text[ japanese ] = "ݶ(~C)";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "(~C)";\
+ Text[ chinese_traditional ] = "w(~C)";\
+ Text[ arabic ] = "~";\
+ Text[ turkish ] = "~Sabitleyici";\
+ };
+
+#define MN_ALIGNSUB \
+ MenuItem\
+ {\
+ Identifier = SID_OBJECT_ALIGN ; \
+ HelpId = SID_OBJECT_ALIGN ; \
+ Text = "Aus~richtung" ; \
+ Text [ ENGLISH ] = "Ali~gnment" ; \
+ Text [ norwegian ] = "Ali~gnment" ; \
+ Text [ italian ] = "~Allineamento" ; \
+ Text [ portuguese_brazilian ] = "Ali~nhamento" ; \
+ Text [ portuguese ] = "Ali~nhamento" ; \
+ Text [ finnish ] = "~Tasaus" ; \
+ Text [ danish ] = "~Justering" ; \
+ Text [ french ] = "~Alignement" ; \
+ Text [ swedish ] = "Juste~ring" ; \
+ Text [ dutch ] = "~Uitlijning" ; \
+ Text [ spanish ] = "Ali~neacin" ; \
+ Text [ english_us ] = "A~lignment" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_LEFT\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_CENTER\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_RIGHT\
+ };\
+ MenuItem\
+ {\
+ Separator = TRUE ; \
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_UP\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_MIDDLE\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_DOWN\
+ };\
+ };\
+ };\
+ Text[ chinese_simplified ] = "(~L)";\
+ Text[ russian ] = "~";\
+ Text[ polish ] = "~Wyrwnanie";\
+ Text[ japanese ] = "zu(~L)";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "(~L)";\
+ Text[ chinese_traditional ] = "(~L)";\
+ Text[ arabic ] = "~";\
+ Text[ turkish ] = "Hi~zalama";\
+ };
+
+
+ //
+ // ------------------------------------------------------------------------------
+ //
+ //
+ // Objekt-Leisten
+ //
+String RID_OBJECTBAR_DRAWFORM
+{
+ Text = "Kontrollfeldleiste" ;
+ Text [ English ] = "Control bar" ;
+ Text [ portuguese ] = "Barra de controlos" ;
+ Text [ english_us ] = "Controls Toolbar" ;
+ Text [ portuguese_brazilian ] = "Kontrollfeldleiste" ;
+ Text [ swedish ] = "Kontrollfltlist" ;
+ Text [ danish ] = "Kontrolelementlinje" ;
+ Text [ italian ] = "Barra dei campi di controllo" ;
+ Text [ spanish ] = "Barra de campos de control" ;
+ Text [ french ] = "Barre de contrles" ;
+ Text [ dutch ] = "Controlebalk" ;
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pasek formantw";
+ Text[ japanese ] = "۰ °ް";
+ Text[ chinese_traditional ] = "C";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Controlebalk";
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ʈ ";
+ Text[ turkish ] = "Komut alan ubuu";
+};
+
+ToolBox RID_OBJECTBAR_DRAWFORM
+{
+ HelpID = RID_OBJECTBAR_DRAWFORM;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Dockable = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ LineSpacing = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ Customize = TRUE ;
+ MenuStrings = TRUE ;
+ Hide = TRUE ;
+ Scroll = TRUE ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_ANCHOR_TOGGLE ;
+ HelpId = SID_ANCHOR_TOGGLE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_TRANSFORM ;
+ HelpID = SID_ATTR_TRANSFORM ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_CTL_PROPERTIES ;
+ HelpID = SID_FM_CTL_PROPERTIES ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_PROPERTIES ;
+ HelpID = SID_FM_PROPERTIES ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_SHOW_FMEXPLORER ;
+ HelpID = SID_FM_SHOW_FMEXPLORER ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_TAB_DIALOG ;
+ HelpID = SID_FM_TAB_DIALOG ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_ADD_FIELD ;
+ HelpID = SID_FM_ADD_FIELD ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_DESIGN_MODE ;
+ HelpID = SID_FM_DESIGN_MODE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ MN_LAYER
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_GROUP ;
+ HelpID = SID_GROUP ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_UNGROUP ;
+ HelpID = SID_UNGROUP ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ENTER_GROUP ;
+ HelpID = SID_ENTER_GROUP ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_LEAVE_GROUP ;
+ HelpID = SID_LEAVE_GROUP ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_GRID_VISIBLE;
+ HelpID = SID_GRID_VISIBLE;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_GRID_USE;
+ HelpID = SID_GRID_USE;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELPLINES_MOVE;
+ HelpID = SID_HELPLINES_MOVE;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_ALIGN ;
+ HelpID = SID_OBJECT_ALIGN ;
+ DropDown = TRUE ;
+ };
+ };
+};
+ //
+ // Objekt-Menue, Draw
+ //
+
+Menu RID_OBJECTMENU_DRAWFORM
+{
+ ItemList =
+ {
+ MenuItem { ITEM_FORMAT_ATTR_TRANSFORM };
+ MenuItem { ITEM_FORM_CONTROL_PROPERTIES };
+ MenuItem { ITEM_FORM_PROPERTIES };
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MN_ARRANGESUB
+ MN_ALIGNSUB
+ MN_ANCHORSUB
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ ITEM_GROUP_MENU
+ };
+};
+ //
+ // Popup-Menues ---------------------------------------------------------------------
+ //
+String RID_POPUP_DRAWFORM
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Popup-Men fr Zeichenobjekte : Popup-Men fr Zeichenobjekte */
+ Text = "Popup-Men fr Formularobjekte" ;
+ Text [ ENGLISH ] = "Toolbar for form objects" ;
+ Text[ english_us ] = "Popup menu for form objects";
+ Text[ portuguese ] = "Menu instantneo para objectos de formulrio";
+ Text[ russian ] = " ";
+ Text[ dutch ] = "Popup-menu voor formulierobjecten";
+ Text[ french ] = "Menu Pop-Up pour les objets de formulaire";
+ Text[ spanish ] = "Men emergente para objetos de formulario";
+ Text[ italian ] = "Menu popup degli oggetti per formulario";
+ Text[ danish ] = "Popup-menu for formularobjekter";
+ Text[ swedish ] = "Popup-meny fr formulrobjekt";
+ Text[ polish ] = "Menu podrczne dla obiektw formularzy";
+ Text[ portuguese_brazilian ] = "Toolbar for form objects";
+ Text[ japanese ] = "̫ѵ޼ުėp߯߱ƭ";
+ Text[ chinese_simplified ] = "ĵʽ˵";
+ Text[ chinese_traditional ] = "檫󪺧\\";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Popup-menu voor formulierobjecten";
+ Text[ chinese_simplified ] = "ĵʽ˵";
+ Text[ greek ] = " ";
+ Text[ korean ] = "İü ˾ ޴";
+ Text[ turkish ] = "Form nesneleri iin popup mn";
+};
+ //
+ // Popup-Menue fuer (Uno-) Controls
+ //
+Menu RID_POPUP_DRAWFORM
+{
+ ItemList =
+ {
+ MenuItem { ITEM_FORMAT_ATTR_TRANSFORM };
+ MenuItem { ITEM_FORM_CONTROL_PROPERTIES };
+ MenuItem { ITEM_FORM_PROPERTIES };
+ MenuItem { ITEM_REPLACE_CONTROL };
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MN_ARRANGESUB
+ MN_ALIGNSUB
+ MN_ANCHORSUB
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ ITEM_GROUP_MENU
+ };
+};
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
new file mode 100644
index 000000000000..05cc2eee739e
--- /dev/null
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -0,0 +1,876 @@
+/*************************************************************************
+ *
+ * $RCSfile: drtxtob.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// T
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+
+//SV
+//#define _CLIP_HXX
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+#define _TABBAR_HXX
+#define _VALUESET_HXX
+#define _STDMENU_HXX
+#define _STDCTRL_HXX
+// #define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+
+//SVTOOLS
+#define _SVTREELIST_HXX
+#define _FILTER_HXX
+#define _SVLBOXITM_HXX
+#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+// SFX
+#define _SFXAPPWIN_HXX
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+
+
+//svdraw.hxx
+#define _SDR_NOTRANSFORM // Transformationen, selten verwendet
+#define _SDR_NOTOUCH // Hit-Tests, selten verwendet
+
+#define _SDR_NOEXTDEV // ExtOutputDevice
+//#define _SDR_NOUNDO // Undo-Objekte
+#define _SDR_NOSURROGATEOBJ // SdrObjSurrogate
+#define _SDR_NOPAGEOBJ // SdrPageObj
+#define _SDR_NOVIRTOBJ // SdrVirtObj
+#define _SDR_NOGROUPOBJ // SdrGroupObj
+//#define _SDR_NOTEXTOBJ // SdrTextObj
+#define _SDR_NOPATHOBJ // SdrPathObj
+#define _SDR_NOEDGEOBJ // SdrEdgeObj
+//#define _SDR_NORECTOBJ // SdrRectObj
+#define _SDR_NOCAPTIONOBJ // SdrCaptionObj
+#define _SDR_NOCIRCLEOBJ // SdrCircleObj
+#define _SDR_NOGRAFOBJ // SdrGrafObj
+//#define _SDR_NOOLE2OBJ // SdrOle2Obj
+
+
+// si.hxx:
+//#define _SI_HXX
+#define _SIDLL_HXX
+
+#define SI_NOITEMS
+//#define SI_NODRW
+#define SI_NOOTHERFORMS
+#define SI_NOSBXCONTROLS
+#define SI_NOCONTROL
+#define _VCATTR_HXX
+#define _VCONT_HXX
+#define _VCTRLS_HXX
+//#define _VCSBX_HXX
+//#define _VCDRWOBJ_HXX
+#define _VCBRW_HXX
+
+//-------------------------------------------------------------------------
+
+#include "scitems.hxx"
+#include "eetext.hxx"
+#define ITEMID_FIELD EE_FEATURE_FIELD
+
+#include <svx/adjitem.hxx>
+#include <svx/cntritem.hxx>
+#include <svx/crsditem.hxx>
+#include <svx/editeng.hxx>
+#include <svx/escpitem.hxx>
+#include <svx/flditem.hxx>
+#include <svx/fontitem.hxx>
+#include <svx/hlnkitem.hxx>
+#include <svx/lspcitem.hxx>
+#include <svx/svdoutl.hxx>
+#include <svx/postitem.hxx>
+#include <svx/shdditem.hxx>
+#include <svx/srchitem.hxx>
+#include <svx/textanim.hxx>
+#include <svx/udlnitem.hxx>
+#include <svx/wghtitem.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/objface.hxx>
+#include <sfx2/objsh.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <svtools/whiter.hxx>
+#include <vcl/msgbox.hxx>
+
+#include "sc.hrc"
+#include "globstr.hrc"
+#include "drtxtob.hxx"
+#include "viewdata.hxx"
+#include "document.hxx"
+#include "drwlayer.hxx"
+#include "drawview.hxx"
+#include "viewutil.hxx"
+#include "scresid.hxx"
+#include "tabvwsh.hxx"
+
+#define ScDrawTextObjectBar
+#include "scslots.hxx"
+
+SFX_IMPL_INTERFACE( ScDrawTextObjectBar, SfxShell, ScResId(SCSTR_DRAWTEXTSHELL) )
+{
+ SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ ScResId(RID_TEXT_TOOLBOX) );
+ SFX_POPUPMENU_REGISTRATION( ScResId(RID_POPUP_DRAWTEXT) );
+ SFX_OBJECTMENU_REGISTRATION( SID_OBJECTMENU0, ScResId(RID_OBJECTMENU_DRAWTEXT) );
+ SFX_CHILDWINDOW_REGISTRATION( ScGetFontWorkId() );
+}
+
+TYPEINIT1( ScDrawTextObjectBar, SfxShell );
+
+
+
+// abschalten der nicht erwuenschten Acceleratoren:
+
+void ScDrawTextObjectBar::StateDisableItems( SfxItemSet &rSet )
+{
+ SfxWhichIter aIter(rSet);
+ USHORT nWhich = aIter.FirstWhich();
+
+ while (nWhich)
+ {
+ rSet.DisableItem( nWhich );
+ nWhich = aIter.NextWhich();
+ }
+}
+
+ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) :
+ SfxShell(pData->GetViewShell()),
+ pViewData(pData)
+{
+ SetPool( pViewData->GetScDrawView()->GetDefaultAttr().GetPool() );
+
+ // UndoManager wird beim Umschalten in den Edit-Modus umgesetzt...
+ SetUndoManager( pViewData->GetSfxDocShell()->GetUndoManager() );
+
+ SetHelpId( HID_SCSHELL_DRTXTOB );
+ SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("DrawText")));
+}
+
+__EXPORT ScDrawTextObjectBar::~ScDrawTextObjectBar()
+{
+}
+
+//========================================================================
+//
+// Funktionen
+//
+//========================================================================
+
+void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq )
+{
+ SdrView* pView = pViewData->GetScDrawView();
+ OutlinerView* pOutView = pView->GetTextEditOutlinerView();
+ Outliner* pOutliner = pView->GetTextEditOutliner();
+
+ if (!pOutView || !pOutliner)
+ {
+ ExecuteGlobal( rReq ); // auf ganze Objekte
+ return;
+ }
+
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+ switch ( rReq.GetSlot() )
+ {
+ case SID_COPY:
+ pOutView->Copy();
+ break;
+
+ case SID_CUT:
+ pOutView->Cut();
+ break;
+
+ case SID_PASTE:
+ pOutView->PasteSpecial();
+ break;
+
+ case FID_PASTE_CONTENTS:
+ {
+ ExecutePasteContents( rReq );
+/*
+ SvDataObjectRef pClipObj = SvDataObject::PasteClipboard();
+ if (pClipObj.Is())
+ {
+ SvPasteObjectDialog* pDlg = new SvPasteObjectDialog;
+ pDlg->Insert( FORMAT_STRING, ResId( SCSTR_CLIP_STRING ) );
+ pDlg->Insert( FORMAT_RTF, ResId( SCSTR_CLIP_RTF ) );
+ ULONG nFormat = pDlg->Execute( Application::GetAppWindow(), pClipObj );
+ if (nFormat == FORMAT_STRING)
+ pOutView->Paste();
+ else
+ pOutView->PasteSpecial();
+ delete pDlg;
+ }
+*/
+ }
+ break;
+
+ case SID_SELECTALL:
+ {
+ ULONG nCount = pOutliner->GetParagraphCount();
+ ESelection aSel( 0,0,(USHORT)nCount,0 );
+ pOutView->SetSelection( aSel );
+ }
+ break;
+
+ case SID_CHARMAP:
+ {
+ const SvxFontItem& rItem = (const SvxFontItem&)
+ pOutView->GetAttribs().Get(EE_CHAR_FONTINFO);
+
+ String aString;
+ SvxFontItem aNewItem( EE_CHAR_FONTINFO );
+
+ if (ScViewUtil::ExecuteCharMap( rItem, aNewItem, aString ))
+ {
+ SfxItemSet aSet( pOutliner->GetEmptyItemSet() );
+ aSet.Put( aNewItem );
+ // SetAttribs an der View selektiert ein Wort, wenn nichts selektiert ist
+ pOutView->GetOutliner()->QuickSetAttribs( aSet, pOutView->GetSelection() );
+ pOutView->InsertText(aString);
+ }
+
+ Invalidate( SID_ATTR_CHAR_FONT );
+ }
+ break;
+
+ case SID_HYPERLINK_SETLINK:
+ if( pReqArgs )
+ {
+ const SfxPoolItem* pItem;
+ if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET )
+ {
+ const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
+ const String& rName = pHyper->GetName();
+ const String& rURL = pHyper->GetURL();
+ const String& rTarget = pHyper->GetTargetFrame();
+ SvxLinkInsertMode eMode = pHyper->GetInsertMode();
+
+ BOOL bDone = FALSE;
+ if ( pOutView && ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD ) )
+ {
+ const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection();
+ if (pFieldItem)
+ {
+ const SvxFieldData* pField = pFieldItem->GetField();
+ if ( pField && pField->ISA(SvxURLField) )
+ {
+ // altes Feld selektieren
+
+ ESelection aSel = pOutView->GetSelection();
+ aSel.Adjust();
+ aSel.nEndPara = aSel.nStartPara;
+ aSel.nEndPos = aSel.nStartPos + 1;
+ pOutView->SetSelection( aSel );
+ }
+ }
+
+ // neues Feld einfuegen
+
+ SvxURLField aURLField( rURL, rName, SVXURLFORMAT_REPR );
+ aURLField.SetTargetFrame( rTarget );
+ SvxFieldItem aURLItem( aURLField );
+ pOutView->InsertField( aURLItem );
+
+ // select new field
+
+ ESelection aSel = pOutView->GetSelection();
+ if ( aSel.nStartPos == aSel.nEndPos && aSel.nStartPos > 0 )
+ {
+ // Cursor is behind the inserted field -> extend selection to the left
+
+ --aSel.nStartPos;
+ pOutView->SetSelection( aSel );
+ }
+
+ bDone = TRUE;
+ }
+
+ if (!bDone)
+ ExecuteGlobal( rReq ); // normal an der View
+
+ // InsertURL an der ViewShell schaltet bei "Text" die DrawShell ab !!!
+ }
+ }
+ break;
+ }
+}
+
+void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
+{
+ if (IsNoteEdit())
+ {
+ // Funktionen, die bei Notizen disabled sind:
+
+ rSet.DisableItem( SID_TEXT_STANDARD );
+ rSet.DisableItem( SID_DRAWTEXT_ATTR_DLG );
+
+ SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
+ if(!pViewFrm->HasChildWindow(SID_FONTWORK))
+ rSet.DisableItem( SID_FONTWORK );
+ }
+
+ if ( rSet.GetItemState( SID_HYPERLINK_GETLINK ) != SFX_ITEM_UNKNOWN )
+ {
+ SvxHyperlinkItem aHLinkItem;
+ SdrView* pView = pViewData->GetScDrawView();
+ OutlinerView* pOutView = pView->GetTextEditOutlinerView();
+ if ( pOutView )
+ {
+ BOOL bField = FALSE;
+ const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection();
+ if (pFieldItem)
+ {
+ const SvxFieldData* pField = pFieldItem->GetField();
+ if ( pField && pField->ISA(SvxURLField) )
+ {
+ const SvxURLField* pURLField = (const SvxURLField*) pField;
+ aHLinkItem.SetName( pURLField->GetRepresentation() );
+ aHLinkItem.SetURL( pURLField->GetURL() );
+ aHLinkItem.SetTargetFrame( pURLField->GetTargetFrame() );
+ bField = TRUE;
+ }
+ }
+ if (!bField)
+ {
+ // use selected text as name for urls
+ String sReturn = pOutView->GetSelected();
+ sReturn.Erase(255);
+ sReturn.EraseTrailingChars();
+ aHLinkItem.SetName(sReturn);
+ }
+ }
+ rSet.Put(aHLinkItem);
+ }
+}
+
+void __EXPORT ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet )
+{
+ SdrView* pView = pViewData->GetScDrawView();
+ if ( !pView->GetTextEditOutlinerView() )
+ {
+ GetGlobalClipState( rSet );
+ return;
+ }
+
+ BOOL bPaste = HasPasteContents();
+/*
+ BOOL bPaste = FALSE;
+ SvDataObjectRef pClipObj = SvDataObject::PasteClipboard();
+ if (pClipObj.Is())
+ {
+ const SvDataTypeList& rTypeLst = pClipObj->GetTypeList();
+
+ if( rTypeLst.Get( FORMAT_STRING ) || rTypeLst.Get( FORMAT_RTF ) )
+ bPaste = TRUE;
+ }
+*/
+
+ SfxWhichIter aIter( rSet );
+ USHORT nWhich = aIter.FirstWhich();
+ while (nWhich)
+ {
+ switch (nWhich)
+ {
+ case SID_PASTE:
+ case FID_PASTE_CONTENTS:
+ if( !bPaste )
+ rSet.DisableItem( nWhich );
+ break;
+ }
+ nWhich = aIter.NextWhich();
+ }
+}
+
+//========================================================================
+//
+// Attribute
+//
+//========================================================================
+
+void __EXPORT ScDrawTextObjectBar::ExecuteToggle( SfxRequest &rReq )
+{
+ // Unterstreichung
+
+ SdrView* pView = pViewData->GetScDrawView();
+
+ const SfxItemSet* pArgs = rReq.GetArgs();
+ USHORT nSlot = rReq.GetSlot();
+
+ SfxItemSet aSet( pView->GetDefaultAttr() );
+
+ SfxItemSet aViewAttr(pView->GetModel()->GetItemPool());
+ pView->GetAttributes(aViewAttr);
+
+ // Unterstreichung
+ FontUnderline eOld = ((const SvxUnderlineItem&) aViewAttr.
+ Get(EE_CHAR_UNDERLINE)).GetUnderline();
+ FontUnderline eNew = eOld;
+ switch (nSlot)
+ {
+ case SID_ULINE_VAL_NONE:
+ eNew = UNDERLINE_NONE;
+ break;
+ case SID_ULINE_VAL_SINGLE:
+ eNew = ( eOld == UNDERLINE_SINGLE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE;
+ break;
+ case SID_ULINE_VAL_DOUBLE:
+ eNew = ( eOld == UNDERLINE_DOUBLE ) ? UNDERLINE_NONE : UNDERLINE_DOUBLE;
+ break;
+ case SID_ULINE_VAL_DOTTED:
+ eNew = ( eOld == UNDERLINE_DOTTED ) ? UNDERLINE_NONE : UNDERLINE_DOTTED;
+ break;
+ default:
+ break;
+ }
+ aSet.Put( SvxUnderlineItem( eNew, EE_CHAR_UNDERLINE ) );
+
+ pView->SetAttributes( aSet );
+ rReq.Done();
+ pViewData->GetScDrawView()->InvalidateDrawTextAttrs();
+}
+
+void lcl_RemoveFields( OutlinerView& rOutView )
+{
+ //! Outliner should have RemoveFields with a selection
+
+ Outliner* pOutliner = rOutView.GetOutliner();
+ if (!pOutliner) return;
+
+ ESelection aOldSel = rOutView.GetSelection();
+ ESelection aSel = aOldSel;
+ aSel.Adjust();
+ xub_StrLen nNewEnd = aSel.nEndPos;
+
+ BOOL bUpdate = pOutliner->GetUpdateMode();
+ BOOL bChanged = FALSE;
+
+ //! GetPortions and GetAttribs should be const!
+ EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine();
+
+ ULONG nParCount = pOutliner->GetParagraphCount();
+ for (ULONG nPar=0; nPar<nParCount; nPar++)
+ if ( nPar >= aSel.nStartPara && nPar <= aSel.nEndPara )
+ {
+ SvUShorts aPortions;
+ rEditEng.GetPortions( nPar, aPortions );
+ //! GetPortions should use xub_StrLen instead of USHORT
+
+ for ( USHORT nPos = aPortions.Count(); nPos; )
+ {
+ --nPos;
+ USHORT nEnd = aPortions.GetObject( nPos );
+ USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
+ // fields are single characters
+ if ( nEnd == nStart+1 &&
+ ( nPar > aSel.nStartPara || nStart >= aSel.nStartPos ) &&
+ ( nPar < aSel.nEndPara || nEnd <= aSel.nEndPos ) )
+ {
+ ESelection aFieldSel( nPar, nStart, nPar, nEnd );
+ SfxItemSet aSet = rEditEng.GetAttribs( aFieldSel );
+ if ( aSet.GetItemState( EE_FEATURE_FIELD ) == SFX_ITEM_ON )
+ {
+ if (!bChanged)
+ {
+ if (bUpdate)
+ pOutliner->SetUpdateMode( FALSE );
+ String aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS );
+ pOutliner->GetUndoManager().EnterListAction( aName, aName );
+ bChanged = TRUE;
+ }
+
+ String aFieldText = rEditEng.GetText( aFieldSel );
+ pOutliner->QuickInsertText( aFieldText, aFieldSel );
+ if ( nPar == aSel.nEndPara )
+ {
+ nNewEnd += aFieldText.Len();
+ --nNewEnd;
+ }
+ }
+ }
+ }
+ }
+
+ if (bUpdate && bChanged)
+ {
+ pOutliner->GetUndoManager().LeaveListAction();
+ pOutliner->SetUpdateMode( TRUE );
+ }
+
+ if ( aOldSel.IsEqual( aSel ) ) // aSel is adjusted
+ aOldSel.nEndPos = nNewEnd;
+ else
+ aOldSel.nStartPos = nNewEnd; // if aOldSel is backwards
+ rOutView.SetSelection( aOldSel );
+}
+
+void __EXPORT ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
+{
+ SdrView* pView = pViewData->GetScDrawView();
+ const SfxItemSet* pArgs = rReq.GetArgs();
+
+ if ( !pArgs )
+ {
+ SfxItemSet aEditAttr(pView->GetModel()->GetItemPool());
+ pView->GetAttributes(aEditAttr);
+ SfxItemSet aNewAttr( *aEditAttr.GetPool(), aEditAttr.GetRanges() );
+ BOOL bDone = TRUE;
+
+ switch ( rReq.GetSlot() )
+ {
+ case SID_TEXT_STANDARD: // Harte Textattributierung loeschen
+ {
+ OutlinerView* pOutView = pView->IsTextEdit() ?
+ pView->GetTextEditOutlinerView() : NULL;
+ if ( pOutView )
+ pOutView->Paint( Rectangle() );
+
+ SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), EE_ITEMS_START, EE_ITEMS_END );
+ pView->SetAttributes( aEmptyAttr, TRUE );
+
+ if ( pOutView )
+ {
+ lcl_RemoveFields( *pOutView );
+ pOutView->ShowCursor();
+ }
+
+ rReq.Done( aEmptyAttr );
+ pViewData->GetScDrawView()->InvalidateDrawTextAttrs();
+ bDone = FALSE; // bereits hier passiert
+ }
+ break;
+
+ case SID_CHAR_DLG: // Dialog-Button
+ case SID_ATTR_CHAR_FONT: // Controller nicht angezeigt
+ case SID_ATTR_CHAR_FONTHEIGHT:
+ bDone = ExecuteCharDlg( aEditAttr, aNewAttr );
+ break;
+
+ case SID_PARA_DLG:
+ bDone = ExecuteParaDlg( aEditAttr, aNewAttr );
+ break;
+
+ case SID_ATTR_CHAR_WEIGHT:
+ aNewAttr.Put( (const SvxWeightItem&)aEditAttr.Get( EE_CHAR_WEIGHT ) );
+ break;
+
+ case SID_ATTR_CHAR_POSTURE:
+ aNewAttr.Put( (const SvxPostureItem&)aEditAttr.Get( EE_CHAR_ITALIC ) );
+ break;
+
+ case SID_ATTR_CHAR_UNDERLINE:
+ aNewAttr.Put( (const SvxUnderlineItem&)aEditAttr.Get( EE_CHAR_UNDERLINE ) );
+ break;
+
+ case SID_ATTR_CHAR_CONTOUR:
+ aNewAttr.Put( (const SvxContourItem&)aEditAttr.Get( EE_CHAR_OUTLINE ) );
+ break;
+
+ case SID_ATTR_CHAR_SHADOWED:
+ aNewAttr.Put( (const SvxShadowedItem&)aEditAttr.Get( EE_CHAR_SHADOW ) );
+ break;
+
+ case SID_ATTR_CHAR_STRIKEOUT:
+ aNewAttr.Put( (const SvxCrossedOutItem&)aEditAttr.Get( EE_CHAR_STRIKEOUT ) );
+ break;
+
+ case SID_ATTR_PARA_ADJUST_LEFT:
+ aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ break;
+
+ case SID_ATTR_PARA_ADJUST_CENTER:
+ aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ break;
+
+ case SID_ATTR_PARA_ADJUST_RIGHT:
+ aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ break;
+
+ case SID_ATTR_PARA_ADJUST_BLOCK:
+ aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+ break;
+
+ case SID_ATTR_PARA_LINESPACE_10:
+ {
+ SvxLineSpacingItem aItem( SVX_LINESPACE_ONE_LINE, EE_PARA_SBL );
+ aItem.SetPropLineSpace( 100 );
+ aNewAttr.Put( aItem );
+ }
+ break;
+
+ case SID_ATTR_PARA_LINESPACE_15:
+ {
+ SvxLineSpacingItem aItem( SVX_LINESPACE_ONE_POINT_FIVE_LINES, EE_PARA_SBL );
+ aItem.SetPropLineSpace( 150 );
+ aNewAttr.Put( aItem );
+ }
+ break;
+
+ case SID_ATTR_PARA_LINESPACE_20:
+ {
+ SvxLineSpacingItem aItem( SVX_LINESPACE_TWO_LINES, EE_PARA_SBL );
+ aItem.SetPropLineSpace( 200 );
+ aNewAttr.Put( aItem );
+ }
+ break;
+
+ case SID_SET_SUPER_SCRIPT:
+ {
+ SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT);
+ SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+ aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+
+ if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
+ aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
+ else
+ aItem.SetEscapement( SVX_ESCAPEMENT_SUPERSCRIPT );
+ aNewAttr.Put( aItem );
+ }
+ break;
+ case SID_SET_SUB_SCRIPT:
+ {
+ SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT);
+ SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+ aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+
+ if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
+ aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
+ else
+ aItem.SetEscapement( SVX_ESCAPEMENT_SUBSCRIPT );
+ aNewAttr.Put( aItem );
+ }
+ break;
+
+ case SID_DRAWTEXT_ATTR_DLG:
+ {
+ SvxTextTabDialog* pDlg =
+ new SvxTextTabDialog( pViewData->GetDialogParent(),
+ &aEditAttr,
+ pView );
+
+ bDone = ( RET_OK == pDlg->Execute() );
+
+ if ( bDone )
+ aNewAttr.Put( *pDlg->GetOutputItemSet() );
+
+ delete pDlg;
+ }
+ break;
+ }
+
+ if ( bDone ) // wurden Attribute geaendert?
+ {
+ rReq.Done( aNewAttr );
+ pArgs = rReq.GetArgs();
+ }
+ }
+
+ if ( pArgs )
+ {
+ pView->SetAttributes( *pArgs );
+ pViewData->GetScDrawView()->InvalidateDrawTextAttrs();
+ }
+}
+
+void __EXPORT ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
+{
+ if ( IsNoteEdit() )
+ {
+ // Notizen haben keine Text-Attribute !!!
+ SfxWhichIter aIter(rDestSet);
+ USHORT nWhich = aIter.FirstWhich();
+ while ( nWhich )
+ {
+ rDestSet.DisableItem( nWhich );
+ nWhich = aIter.NextWhich();
+ }
+ return;
+ }
+
+
+ SdrView* pView = pViewData->GetScDrawView();
+ SfxItemSet aAttrSet(pView->GetModel()->GetItemPool());
+ pView->GetAttributes(aAttrSet);
+
+ // direkte Attribute
+
+ rDestSet.Put( aAttrSet );
+
+ // Ausrichtung
+
+ SvxAdjust eAdj = ((const SvxAdjustItem&)aAttrSet.Get(EE_PARA_JUST)).GetAdjust();
+ switch( eAdj )
+ {
+ case SVX_ADJUST_LEFT:
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, TRUE ) );
+ break;
+ case SVX_ADJUST_CENTER:
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, TRUE ) );
+ break;
+ case SVX_ADJUST_RIGHT:
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, TRUE ) );
+ break;
+ case SVX_ADJUST_BLOCK:
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, TRUE ) );
+ break;
+ }
+
+ // Zeilenabstand
+
+ USHORT nLineSpace = (USHORT)
+ ((const SvxLineSpacingItem&)aAttrSet.
+ Get( EE_PARA_SBL )).GetPropLineSpace();
+ switch( nLineSpace )
+ {
+ case 100:
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, TRUE ) );
+ break;
+ case 150:
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, TRUE ) );
+ break;
+ case 200:
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, TRUE ) );
+ break;
+ }
+
+ // hoch-/tiefgestellt
+
+ SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+ aAttrSet.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+ if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
+ rDestSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, TRUE ) );
+ else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
+ rDestSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, TRUE ) );
+
+ // Unterstreichung
+
+ SfxItemState eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, TRUE );
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ rDestSet.InvalidateItem( SID_ULINE_VAL_NONE );
+ rDestSet.InvalidateItem( SID_ULINE_VAL_SINGLE );
+ rDestSet.InvalidateItem( SID_ULINE_VAL_DOUBLE );
+ rDestSet.InvalidateItem( SID_ULINE_VAL_DOTTED );
+ }
+ else
+ {
+ FontUnderline eUnderline = ((const SvxUnderlineItem&)
+ aAttrSet.Get(EE_CHAR_UNDERLINE)).GetUnderline();
+ USHORT nId = SID_ULINE_VAL_NONE;
+ switch (eUnderline)
+ {
+ case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break;
+ case UNDERLINE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break;
+ case UNDERLINE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break;
+ default:
+ break;
+ }
+ rDestSet.Put( SfxBoolItem( nId, TRUE ) );
+ }
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
new file mode 100644
index 000000000000..4f4bb209262d
--- /dev/null
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -0,0 +1,475 @@
+/*************************************************************************
+ *
+ * $RCSfile: drtxtob1.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+//#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+#define _MOREBTN_HXX
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+#define _FILDLG_HXX
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX ***
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+#define _SVTREELIST_HXX
+#define _FILTER_HXX
+#define _SVLBOXITM_HXX
+#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+#define _SFXINIMGR_HXX
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+//#define _SFX_BINDINGS_HXX
+//#define _SFXDISPATCH_HXX
+#define _SFXMSG_HXX
+#define _SFXOBJFACE_HXX
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+// SFX
+#define _SFXAPPWIN_HXX
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX
+//#define _SFX_CLIENTSH_HXX
+//#define _SFXDOCINF_HXX
+//#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+#define _SFXDOCFILE_HXX
+//define _VIEWFAC_HXX
+//#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX
+#define _MDIFRM_HXX
+//#define _SFX_IPFRM_HXX ***
+//#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+#define _BASEDLGS_HXX
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+#define _SFXDOCTEMPL_HXX
+#define _SFXDOCTDLG_HXX
+#define _SFX_TEMPLDLG_HXX
+#define _SFXNEW_HXX
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+#define _ARGS_HXX
+//#define _SFXPOOLITEM_HXX
+//#define _SFXINTITEM_HXX
+//#define _SFXENUMITEM_HXX
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX
+#define _SFXPTITEM_HXX
+//#define _SFXRECTITEM_HXX ***
+//#define _SFXITEMPOOL_HXX
+//#define _SFXITEMSET_HXX
+#define _SFXITEMITER_HXX
+//#define _SFX_WHITER_HXX ***
+#define _SFXPOOLCACH_HXX
+//#define _AEITEM_HXX
+//#define _SFXRNGITEM_HXX ***
+//#define _SFXSLSTITM_HXX
+//#define _SFXSTYLE_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXX
+//#define _XOUTX_HXX
+//#define _XPOOL_HXX
+//#define _XTABLE_HXX
+
+//svdraw.hxx
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+//#define _SDR_NOOBJECTS
+//#define _SDR_NOVIEWS
+
+//#define SI_NOITEMS
+//#define SI_NODRW
+#define _SI_NOSBXCONTROLS
+//#define _VCATTR_HXX
+#define _VCONT_HXX
+//#define _VCSBX_HXX
+#define _SI_NOOTHERFORMS
+#define _VCTRLS_HXX
+//#define _VCDRWOBJ_HXX
+#define _SI_NOCONTROL
+#define _SETBRW_HXX
+#define _VCBRW_HXX
+#define _SI_NOSBXCONTROLS
+#define _SIDLL_HXX
+
+#define _SVX_DAILDLL_HXX
+#define _SVX_HYPHEN_HXX
+#define _SVX_IMPGRF_HXX
+#define _SVX_OPTITEMS_HXX
+#define _SVX_OPTGERL_HXX
+#define _SVX_OPTSAVE_HXX
+#define _SVX_OPTSPELL_HXX
+#define _SVX_OPTPATH_HXX
+#define _SVX_OPTLINGU_HXX
+#define _SVX_RULER_HXX
+#define _SVX_RULRITEM_HXX
+#define _SVX_SPLWRAP_HXX
+#define _SVX_SPLDLG_HXX
+#define _SVX_THESDLG_HXX
+
+// svdraw.hxx
+#define _SDR_NOITEMS
+#define _SVDXOUT_HXX
+#define _SDR_NOTRANSFORM // Transformationen, selten verwendet
+#define _SDR_NOTOUCH // Hit-Tests, selten verwendet
+#define _SDR_NOEXTDEV // ExtOutputDevice
+//#define _SDR_NOUNDO // Undo-Objekte
+#define _SDR_NOSURROGATEOBJ // SdrObjSurrogate
+#define _SDR_NOPAGEOBJ // SdrPageObj
+#define _SDR_NOVIRTOBJ // SdrVirtObj
+#define _SDR_NOGROUPOBJ // SdrGroupObj
+#define _SDR_NOTEXTOBJ // SdrTextObj //*
+#define _SDR_NOPATHOBJ // SdrPathObj
+#define _SDR_NOEDGEOBJ // SdrEdgeObj
+#define _SDR_NORECTOBJ // SdrRectObj
+#define _SDR_NOCAPTIONOBJ // SdrCaptionObj
+#define _SDR_NOCIRCLEOBJ // SdrCircleObj
+#define _SDR_NOGRAFOBJ // SdrGrafObj
+#define _SDR_NOOLE2OBJ // SdrOle2Obj
+
+//-------------------------------------------------------------------------
+
+#include "scitems.hxx"
+#include "eetext.hxx"
+#include <svx/brkitem.hxx>
+#include <svx/eeitem.hxx>
+#include <svx/hyznitem.hxx>
+#include <svx/orphitem.hxx>
+#include <svx/outliner.hxx>
+#include <svx/spltitem.hxx>
+#include <svx/widwitem.hxx>
+#include <so3/dtrans.hxx>
+#include <so3/pastedlg.hxx>
+#include <sot/exchange.hxx>
+#include <vcl/msgbox.hxx>
+
+#include "sc.hrc"
+#include "drtxtob.hxx"
+#include "drawview.hxx"
+#include "viewdata.hxx"
+#include "textdlgs.hxx"
+#include "scresid.hxx"
+
+
+//------------------------------------------------------------------------
+
+BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
+ SfxItemSet& rOutSet )
+{
+ ScCharDlg* pDlg = new ScCharDlg( pViewData->GetDialogParent(),
+ &rArgs,
+ pViewData->GetSfxDocShell() );
+
+ BOOL bRet = ( pDlg->Execute() == RET_OK );
+
+ if ( bRet )
+ {
+ const SfxItemSet* pNewAttrs = pDlg->GetOutputItemSet();
+ if ( pNewAttrs )
+ rOutSet.Put( *pNewAttrs );
+ }
+ delete pDlg;
+
+ return bRet;
+}
+
+BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
+ SfxItemSet& rOutSet )
+{
+ SfxItemPool* pPool = rArgs.GetPool();
+ SfxItemSet aNewAttr( *pPool,
+ EE_ITEMS_START, EE_ITEMS_END,
+ SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
+ SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_PAGEBREAK,
+ SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
+ SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
+ SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS,
+ 0 );
+ aNewAttr.Put( rArgs );
+
+ // Die Werte sind erst einmal uebernommen worden, um den Dialog anzuzeigen.
+ // Muss natuerlich noch geaendert werden
+ // aNewAttr.Put( SvxParaDlgLimitsItem( 567 * 50, 5670) );
+
+ aNewAttr.Put( SvxHyphenZoneItem() );
+ aNewAttr.Put( SvxFmtBreakItem() );
+ aNewAttr.Put( SvxFmtSplitItem() );
+ aNewAttr.Put( SvxWidowsItem() );
+ aNewAttr.Put( SvxOrphansItem() );
+
+ ScParagraphDlg* pDlg = new ScParagraphDlg( pViewData->GetDialogParent(),
+ &aNewAttr );
+
+ BOOL bRet = ( pDlg->Execute() == RET_OK );
+
+ if ( bRet )
+ {
+ const SfxItemSet* pNewAttrs = pDlg->GetOutputItemSet();
+ if ( pNewAttrs )
+ rOutSet.Put( *pNewAttrs );
+ }
+ delete pDlg;
+
+ return bRet;
+}
+
+void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest &rReq )
+{
+ SvDataObjectRef pClipObj = SvDataObject::PasteClipboard();
+ if (pClipObj.Is())
+ {
+ SdrView* pView = pViewData->GetScDrawView();
+ OutlinerView* pOutView = pView->GetTextEditOutlinerView();
+ SvPasteObjectDialog* pDlg = new SvPasteObjectDialog;
+
+ pDlg->Insert( FORMAT_STRING, ScResId( SCSTR_CLIP_STRING ) );
+ pDlg->Insert( FORMAT_RTF, ScResId( SCSTR_CLIP_RTF ) );
+
+ ULONG nFormat = pDlg->Execute( pViewData->GetDialogParent(), pClipObj );
+
+ //! test if outliner view is still valid
+
+ if (nFormat == FORMAT_STRING)
+ pOutView->Paste();
+ else
+ pOutView->PasteSpecial();
+ delete pDlg;
+ }
+}
+
+BOOL ScDrawTextObjectBar::HasPasteContents()
+{
+ BOOL bResult = FALSE;
+
+ SvDataObjectRef pClipObj = SvDataObject::PasteClipboard();
+ if (pClipObj.Is())
+ {
+ const SvDataTypeList& rTypeLst = pClipObj->GetTypeList();
+
+ if( rTypeLst.Get( FORMAT_STRING ) || rTypeLst.Get( FORMAT_RTF ) )
+ bResult = TRUE;
+ }
+
+ return bResult;
+}
+
+
+
+
+
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
new file mode 100644
index 000000000000..5bacc55a6a06
--- /dev/null
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -0,0 +1,597 @@
+/*************************************************************************
+ *
+ * $RCSfile: drtxtob2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+//#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+#define _MOREBTN_HXX
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+#define _FILDLG_HXX
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX ***
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+#define _SVTREELIST_HXX
+#define _FILTER_HXX
+#define _SVLBOXITM_HXX
+#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+#define _SFXINIMGR_HXX
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+//#define _SFX_BINDINGS_HXX
+//#define _SFXDISPATCH_HXX
+#define _SFXMSG_HXX
+#define _SFXOBJFACE_HXX
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+// SFX
+#define _SFXAPPWIN_HXX
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX
+//#define _SFX_CLIENTSH_HXX
+//#define _SFXDOCINF_HXX
+//#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+#define _SFXDOCFILE_HXX
+//define _VIEWFAC_HXX
+//#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX
+#define _MDIFRM_HXX
+//#define _SFX_IPFRM_HXX ***
+//#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+//#define _BASEDLGS_HXX
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+#define _SFXDOCTEMPL_HXX
+#define _SFXDOCTDLG_HXX
+#define _SFX_TEMPLDLG_HXX
+#define _SFXNEW_HXX
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX ***
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+#define _ARGS_HXX
+//#define _SFXPOOLITEM_HXX
+//#define _SFXINTITEM_HXX
+//#define _SFXENUMITEM_HXX
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX
+#define _SFXPTITEM_HXX
+//#define _SFXRECTITEM_HXX ***
+//#define _SFXITEMPOOL_HXX
+//#define _SFXITEMSET_HXX
+#define _SFXITEMITER_HXX
+//#define _SFX_WHITER_HXX ***
+#define _SFXPOOLCACH_HXX
+//#define _AEITEM_HXX
+//#define _SFXRNGITEM_HXX ***
+//#define _SFXSLSTITM_HXX
+//#define _SFXSTYLE_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXX
+//#define _XOUTX_HXX
+//#define _XPOOL_HXX
+//#define _XTABLE_HXX
+
+//svdraw.hxx
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+//#define _SDR_NOOBJECTS
+//#define _SDR_NOVIEWS
+
+//#define SI_NOITEMS
+//#define SI_NODRW
+#define _SI_NOSBXCONTROLS
+//#define _VCATTR_HXX
+#define _VCONT_HXX
+//#define _VCSBX_HXX
+#define _SI_NOOTHERFORMS
+#define _VCTRLS_HXX
+//#define _VCDRWOBJ_HXX
+#define _SI_NOCONTROL
+#define _SETBRW_HXX
+#define _VCBRW_HXX
+#define _SI_NOSBXCONTROLS
+#define _SIDLL_HXX
+
+#define _SVX_DAILDLL_HXX
+#define _SVX_HYPHEN_HXX
+#define _SVX_IMPGRF_HXX
+#define _SVX_OPTITEMS_HXX
+#define _SVX_OPTGERL_HXX
+#define _SVX_OPTSAVE_HXX
+#define _SVX_OPTSPELL_HXX
+#define _SVX_OPTPATH_HXX
+#define _SVX_OPTLINGU_HXX
+#define _SVX_RULER_HXX
+#define _SVX_RULRITEM_HXX
+#define _SVX_SPLWRAP_HXX
+#define _SVX_SPLDLG_HXX
+#define _SVX_THESDLG_HXX
+
+// svdraw.hxx
+#define _SDR_NOITEMS
+#define _SVDXOUT_HXX
+#define _SDR_NOTRANSFORM // Transformationen, selten verwendet
+#define _SDR_NOTOUCH // Hit-Tests, selten verwendet
+#define _SDR_NOEXTDEV // ExtOutputDevice
+//#define _SDR_NOUNDO // Undo-Objekte
+#define _SDR_NOSURROGATEOBJ // SdrObjSurrogate
+#define _SDR_NOPAGEOBJ // SdrPageObj
+#define _SDR_NOVIRTOBJ // SdrVirtObj
+#define _SDR_NOGROUPOBJ // SdrGroupObj
+#define _SDR_NOTEXTOBJ // SdrTextObj //*
+#define _SDR_NOPATHOBJ // SdrPathObj
+#define _SDR_NOEDGEOBJ // SdrEdgeObj
+#define _SDR_NORECTOBJ // SdrRectObj
+#define _SDR_NOCAPTIONOBJ // SdrCaptionObj
+#define _SDR_NOCIRCLEOBJ // SdrCircleObj
+#define _SDR_NOGRAFOBJ // SdrGrafObj
+#define _SDR_NOOLE2OBJ // SdrOle2Obj
+
+//-------------------------------------------------------------------------
+
+#include "scitems.hxx"
+#include <svx/drawitem.hxx>
+#include <svx/fontwork.hxx>
+#include <svx/svdocapt.hxx>
+#include <svx/xtextit.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/objsh.hxx>
+#include <sfx2/request.hxx>
+#include <sot/formats.hxx>
+
+#include "sc.hrc"
+#include "drtxtob.hxx"
+#include "viewdata.hxx"
+#include "drawview.hxx"
+#include "tabvwsh.hxx"
+#include "impex.hxx"
+#include "docsh.hxx"
+
+//------------------------------------------------------------------------
+
+USHORT ScGetFontWorkId()
+{
+ return SvxFontWorkChildWindow::GetChildWindowId();
+}
+
+BOOL ScDrawTextObjectBar::IsNoteEdit()
+{
+ ScTabView* pTabView = pViewData->GetView();
+ SdrView* pSdrView = pTabView->GetSdrView();
+ SdrObject* pObject = pSdrView->GetTextEditObject();
+ return ( pObject && pObject->GetLayer() == SC_LAYER_INTERN && pObject->ISA( SdrCaptionObj ) );
+}
+
+// wenn kein Text editiert wird, Funktionen wie in drawsh
+
+void __EXPORT ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
+{
+ ScTabView* pTabView = pViewData->GetView();
+ ScDrawView* pView = pTabView->GetScDrawView();
+
+ switch ( rReq.GetSlot() )
+ {
+ case SID_COPY:
+ pView->DoCopy();
+ break;
+
+ case SID_CUT:
+ pView->DoCut();
+ if (!pTabView->IsDrawSelMode())
+ pViewData->GetViewShell()->SetDrawShell( FALSE );
+ break;
+
+ case SID_PASTE:
+ case FID_PASTE_CONTENTS:
+ case SID_HYPERLINK_SETLINK:
+ pViewData->GetViewShell()->ExecuteSlot( rReq );
+ break;
+
+ case SID_SELECTALL:
+ pView->MarkAll();
+ break;
+ }
+}
+
+void ScDrawTextObjectBar::GetGlobalClipState( SfxItemSet& rSet )
+{
+ //pViewData->GetViewShell()->GetClipState( rSet );
+
+ ScTabViewShell* pTabViewShell = pViewData->GetViewShell();
+
+ BOOL bDisable = TRUE;
+
+// SID_PASTE
+// FID_PASTE_CONTENTS
+
+ if ( ScGlobal::IsClipCaptured() || ScGlobal::IsClipDraw() )
+ bDisable = FALSE;
+ else
+ {
+ SvDataObjectRef pClipObj = SvDataObject::PasteClipboard();
+ if (pClipObj.Is())
+ {
+ const SvDataTypeList& rTypeLst = pClipObj->GetTypeList();
+
+ if( rTypeLst.Get( FORMAT_BITMAP ) ||
+ rTypeLst.Get( FORMAT_GDIMETAFILE ) ||
+ rTypeLst.Get( SOT_FORMATSTR_ID_SVXB ) ||
+ rTypeLst.Get( FORMAT_PRIVATE ) ||
+ rTypeLst.Get( FORMAT_RTF ) ||
+ rTypeLst.Get( SOT_FORMATSTR_ID_EMBED_SOURCE ) ||
+ rTypeLst.Get( SOT_FORMATSTR_ID_LINK_SOURCE ) ||
+ rTypeLst.Get( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) ||
+ rTypeLst.Get( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) ||
+ ScImportExport::IsFormatSupported( pClipObj ) )
+ bDisable = FALSE;
+ }
+ }
+
+ // Zellschutz / Multiselektion
+
+ if (!bDisable)
+ {
+ USHORT nCol = pViewData->GetCurX();
+ USHORT nRow = pViewData->GetCurY();
+ USHORT nTab = pViewData->GetTabNo();
+ ScDocument* pDoc = pViewData->GetDocShell()->GetDocument();
+ if (!pDoc->IsBlockEditable( nTab, nCol,nRow, nCol,nRow ))
+ bDisable = TRUE;
+ ScMarkData& rMark = pViewData->GetMarkData();
+ if (rMark.IsMultiMarked())
+ bDisable = TRUE;
+ }
+
+ if (bDisable)
+ {
+ rSet.DisableItem( SID_PASTE );
+ rSet.DisableItem( FID_PASTE_CONTENTS );
+ }
+
+ return;
+}
+
+void __EXPORT ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
+{
+ ScTabView* pTabView = pViewData->GetView();
+ ScDrawView* pView = pTabView->GetScDrawView();
+
+ switch ( rReq.GetSlot() )
+ {
+ case SID_FONTWORK:
+ {
+ USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
+
+ if ( rReq.GetArgs() )
+ pViewFrm->SetChildWindow( nId,
+ ((const SfxBoolItem&)
+ (rReq.GetArgs()->Get(SID_FONTWORK))).
+ GetValue() );
+ else
+ pViewFrm->ToggleChildWindow( nId );
+
+ SFX_BINDINGS().Invalidate( SID_FONTWORK );
+ rReq.Done();
+ }
+ break;
+ }
+}
+
+void ScDrawTextObjectBar::ExecFormText(SfxRequest& rReq)
+{
+ ScTabView* pTabView = pViewData->GetView();
+ ScDrawView* pDrView = pTabView->GetScDrawView();
+ const SdrMarkList& rMarkList = pDrView->GetMarkList();
+
+ if ( rMarkList.GetMarkCount() == 1 && rReq.GetArgs() )
+ {
+ const SfxItemSet& rSet = *rReq.GetArgs();
+ const SfxPoolItem* pItem;
+
+ if ( pDrView->IsTextEdit() )
+ pDrView->ScEndTextEdit();
+
+ if ( SFX_ITEM_SET ==
+ rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem)
+ && XFTFORM_NONE !=
+ ((const XFormTextStdFormItem*) pItem)->GetValue() )
+ {
+
+ USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
+ SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)
+ (pViewFrm->
+ GetChildWindow(nId)->GetWindow());
+
+ pDlg->CreateStdFormObj(*pDrView, *pDrView->GetPageViewPvNum(0),
+ rSet, *rMarkList.GetMark(0)->GetObj(),
+ ((const XFormTextStdFormItem*) pItem)->
+ GetValue());
+ }
+ else
+ pDrView->SetAttributes(rSet);
+ }
+}
+
+void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet)
+{
+ const SdrObject* pObj = NULL;
+ SvxFontWorkDialog* pDlg = NULL;
+ ScDrawView* pDrView = pViewData->GetView()->GetScDrawView();
+ const SdrMarkList& rMarkList = pDrView->GetMarkList();
+ USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+
+ SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
+ if ( pViewFrm->HasChildWindow(nId) )
+ pDlg = (SvxFontWorkDialog*)(pViewFrm->GetChildWindow(nId)->GetWindow());
+
+ if ( rMarkList.GetMarkCount() == 1 )
+ pObj = rMarkList.GetMark(0)->GetObj();
+
+ if ( pObj == NULL || !pObj->ISA(SdrTextObj) ||
+ !((SdrTextObj*) pObj)->HasText() )
+ {
+ if ( pDlg )
+ pDlg->SetActive(FALSE);
+
+ rSet.DisableItem(XATTR_FORMTXTSTYLE);
+ rSet.DisableItem(XATTR_FORMTXTADJUST);
+ rSet.DisableItem(XATTR_FORMTXTDISTANCE);
+ rSet.DisableItem(XATTR_FORMTXTSTART);
+ rSet.DisableItem(XATTR_FORMTXTMIRROR);
+ rSet.DisableItem(XATTR_FORMTXTSTDFORM);
+ rSet.DisableItem(XATTR_FORMTXTHIDEFORM);
+ rSet.DisableItem(XATTR_FORMTXTOUTLINE);
+ rSet.DisableItem(XATTR_FORMTXTSHADOW);
+ rSet.DisableItem(XATTR_FORMTXTSHDWCOLOR);
+ rSet.DisableItem(XATTR_FORMTXTSHDWXVAL);
+ rSet.DisableItem(XATTR_FORMTXTSHDWYVAL);
+ }
+ else
+ {
+ if ( pDlg )
+ {
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+
+ if ( pDocSh )
+ {
+ const SfxPoolItem* pItem = pDocSh->GetItem( ITEMID_COLOR_TABLE );
+ XColorTable* pColorTable = NULL;
+
+ if ( pItem )
+ pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable();
+
+ pDlg->SetActive();
+
+ if ( pColorTable )
+ pDlg->SetColorTable( pColorTable );
+ else
+ { DBG_ERROR( "ColorList not found :-/" ); }
+ }
+ }
+ SfxItemSet aViewAttr(pDrView->GetModel()->GetItemPool());
+ pDrView->GetAttributes(aViewAttr);
+ rSet.Set(aViewAttr);
+ }
+}
+
+
+
+
diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx
new file mode 100644
index 000000000000..723ab8986b61
--- /dev/null
+++ b/sc/source/ui/drawfunc/fuconarc.cxx
@@ -0,0 +1,411 @@
+/*************************************************************************
+ *
+ * $RCSfile: fuconarc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _FILDLG_HXX
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+#define _TABBAR_HXX
+#define _VALUESET_HXX
+#define _STDMENU_HXX
+#define _STDCTRL_HXX
+#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+//SVTOOLS
+#define _SVTREELIST_HXX
+#define _FILTER_HXX
+#define _SVLBOXITM_HXX
+#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+
+#define _BASE_DLGS_HXX
+#define _BIGINT_HXX
+#define _CACHESTR_HXX
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _DLGCFG_HXX
+#define _DYNARR_HXX
+#define _EXTATTR_HXX
+//#define _FILDLG_HXX
+#define _FILTER_HXX
+#define _FONTDLG_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXH
+#define _XOUTX_HXX
+//#define _XPOOL_HXX
+#define _XTABLE_HXX
+
+
+//#define _SVDLAYER_HXX
+//#define _SVDATTR_HXX
+#define _SVDIO_HXX
+#define _SVBOXITM_HXX
+#define _SVDEC_HXX
+#define _SVDXOUT_HXX
+#define _SDR_NOVIEWMARKER
+#define _SDR_NODRAGMETHODS
+#define _SDR_NOUNDO
+#define _SDR_NOXOUTDEV
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+#define _SDR_NOOBJECTS
+//#define _SDR_NOVIEWS
+
+#define _SVDRAG_HXX
+#define _SVINCVW_HXX
+#define _SV_MULTISEL_HXX
+#define _SVRTV_HXX
+#define _SVTABBX_HXX
+
+#define _SVX_DAILDLL_HXX
+#define _SVX_HYPHEN_HXX
+#define _SVX_IMPGRF_HXX
+#define _SVX_OPTITEMS_HXX
+#define _SVX_OPTGERL_HXX
+#define _SVX_OPTSAVE_HXX
+#define _SVX_OPTSPELL_HXX
+#define _SVX_OPTPATH_HXX
+#define _SVX_OPTLINGU_HXX
+#define _SVX_RULER_HXX
+#define _SVX_RULRITEM_HXX
+#define _SVX_SPLWRAP_HXX
+#define _SVX_SPLDLG_HXX
+#define _SVX_THESDLG_HXX
+
+//------------------------------------------------------------------------
+
+#ifndef _SVDOBJ_HXX
+#include <svx/svdobj.hxx>
+#endif
+
+#include <svx/svdview.hxx>
+
+#include "fuconarc.hxx"
+#include "sc.hrc"
+#include "tabvwsh.hxx"
+
+
+//------------------------------------------------------------------------
+
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+FuConstArc::FuConstArc( ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq )
+ : FuConstruct( pViewSh, pWin, pView, pDoc, rReq )
+{
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuConstArc::~FuConstArc()
+{
+}
+
+/*************************************************************************
+|*
+|* MouseButtonDown-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstArc::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ BOOL bReturn = FuConstruct::MouseButtonDown( rMEvt );
+
+ if ( rMEvt.IsLeft() && !pView->IsAction() )
+ {
+ Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+ pWindow->CaptureMouse();
+ pView->BegCreateObj( aPnt );
+ bReturn = TRUE;
+ }
+ return bReturn;
+}
+
+/*************************************************************************
+|*
+|* MouseMove-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstArc::MouseMove( const MouseEvent& rMEvt )
+{
+ return FuConstruct::MouseMove(rMEvt);
+}
+
+/*************************************************************************
+|*
+|* MouseButtonUp-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstArc::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ BOOL bReturn = FALSE;
+
+ if ( pView->IsCreateObj() && rMEvt.IsLeft() )
+ {
+ // Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+ pView->EndCreateObj( SDRCREATE_NEXTPOINT );
+ bReturn = TRUE;
+ }
+/*
+ else if ( pView->IsCreateObj() && rMEvt.IsRight() )
+ {
+ // Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+ pView->EndCreateObj( SDRCREATE_FORCEEND );
+ bReturn = TRUE;
+ }
+*/
+ return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
+}
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstArc::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ return(bReturn);
+}
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuConstArc::Activate()
+{
+ SdrObjKind aObjKind;
+
+ switch (aSfxRequest.GetSlot() )
+ {
+ case SID_DRAW_ARC:
+ aNewPointer = Pointer( POINTER_DRAW_ARC );
+ aObjKind = OBJ_CARC;
+ break;
+
+ case SID_DRAW_PIE:
+ aNewPointer = Pointer( POINTER_DRAW_PIE );
+ aObjKind = OBJ_SECT;
+ break;
+
+ case SID_DRAW_CIRCLECUT:
+ aNewPointer = Pointer( POINTER_DRAW_CIRCLECUT );
+ aObjKind = OBJ_CCUT;
+ break;
+
+ default:
+ aNewPointer = Pointer( POINTER_CROSS );
+ aObjKind = OBJ_CARC;
+ break;
+ }
+
+ pView->SetCurrentObj( aObjKind );
+
+ aOldPointer = pWindow->GetPointer();
+ pViewShell->SetActivePointer( aNewPointer );
+
+ FuDraw::Activate();
+}
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuConstArc::Deactivate()
+{
+ FuDraw::Deactivate();
+ pViewShell->SetActivePointer( aOldPointer );
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx
new file mode 100644
index 000000000000..d3a3685dca05
--- /dev/null
+++ b/sc/source/ui/drawfunc/fuconpol.cxx
@@ -0,0 +1,384 @@
+/*************************************************************************
+ *
+ * $RCSfile: fuconpol.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _FILDLG_HXX
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+//------------------------------------------------------------------------
+
+#include <svx/svdview.hxx>
+#ifndef _SVDOBJ_HXX
+#include <svx/svdobj.hxx>
+#endif
+
+#include "fuconpol.hxx"
+#include "tabvwsh.hxx"
+#include "sc.hrc"
+
+// Pixelabstand zum Schliessen von Freihand-Zeichnungen
+
+#ifndef CLOSE_PIXDIST
+#define CLOSE_PIXDIST 5
+#endif
+
+//------------------------------------------------------------------------
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+FuConstPolygon::FuConstPolygon(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq)
+ : FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
+{
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuConstPolygon::~FuConstPolygon()
+{
+}
+
+/*************************************************************************
+|*
+|* MouseButtonDown-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+
+ SdrViewEvent aVEvt;
+ SdrHitKind eHit = pView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
+ if (aVEvt.eEvent == SDREVENT_BEGTEXTEDIT)
+ {
+ // Texteingabe hier nicht zulassen
+ aVEvt.eEvent = SDREVENT_BEGDRAGOBJ;
+ pView->EnableExtendedMouseEventDispatcher(FALSE);
+ }
+ else
+ {
+ pView->EnableExtendedMouseEventDispatcher(TRUE);
+ }
+
+ if ( pView->MouseButtonDown(rMEvt, pWindow) )
+ bReturn = TRUE;
+
+ return bReturn;
+}
+
+/*************************************************************************
+|*
+|* MouseMove-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstPolygon::MouseMove(const MouseEvent& rMEvt)
+{
+ pView->MouseMove(rMEvt, pWindow);
+ BOOL bReturn = FuConstruct::MouseMove(rMEvt);
+ return bReturn;
+}
+
+/*************************************************************************
+|*
+|* MouseButtonUp-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FALSE;
+ BOOL bSimple = FALSE;
+
+ SdrViewEvent aVEvt;
+ SdrHitKind eHit = pView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt);
+
+ pView->MouseButtonUp(rMEvt, pWindow);
+
+ if (aVEvt.eEvent == SDREVENT_ENDCREATE)
+ {
+ bReturn = TRUE;
+ bSimple = TRUE; // Doppelklick nicht weiterreichen
+ }
+
+ BOOL bParent;
+ if (bSimple)
+ bParent = FuConstruct::SimpleMouseButtonUp(rMEvt);
+ else
+ bParent = FuConstruct::MouseButtonUp(rMEvt);
+
+ return (bParent || bReturn);
+}
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstPolygon::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+
+ return(bReturn);
+}
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuConstPolygon::Activate()
+{
+ pView->EnableExtendedMouseEventDispatcher(TRUE);
+
+ SdrObjKind eKind;
+
+ switch (GetSlotID())
+ {
+ case SID_DRAW_POLYGON_NOFILL:
+ case SID_DRAW_XPOLYGON_NOFILL:
+ {
+ eKind = OBJ_PLIN;
+ }
+ break;
+
+ case SID_DRAW_POLYGON:
+ case SID_DRAW_XPOLYGON:
+ {
+ eKind = OBJ_POLY;
+ }
+ break;
+
+ case SID_DRAW_BEZIER_NOFILL:
+ {
+ eKind = OBJ_PATHLINE;
+ }
+ break;
+
+ case SID_DRAW_BEZIER_FILL:
+ {
+ eKind = OBJ_PATHFILL;
+ }
+ break;
+
+ case SID_DRAW_FREELINE_NOFILL:
+ {
+ eKind = OBJ_FREELINE;
+ }
+ break;
+
+ case SID_DRAW_FREELINE:
+ {
+ eKind = OBJ_FREEFILL;
+ }
+ break;
+
+ default:
+ {
+ eKind = OBJ_PATHLINE;
+ }
+ break;
+ }
+
+ pView->SetCurrentObj(eKind);
+
+ pView->SetEditMode(SDREDITMODE_CREATE);
+
+ FuConstruct::Activate();
+
+ aNewPointer = Pointer( POINTER_DRAW_POLYGON );
+ aOldPointer = pWindow->GetPointer();
+ pViewShell->SetActivePointer( aNewPointer );
+}
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuConstPolygon::Deactivate()
+{
+ pView->SetEditMode(SDREDITMODE_EDIT);
+
+ pView->EnableExtendedMouseEventDispatcher(FALSE);
+
+ FuConstruct::Deactivate();
+
+ pViewShell->SetActivePointer( aOldPointer );
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
new file mode 100644
index 000000000000..f73015301af8
--- /dev/null
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -0,0 +1,415 @@
+/*************************************************************************
+ *
+ * $RCSfile: fuconrec.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _FILDLG_HXX
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+#define _TABBAR_HXX
+#define _VALUESET_HXX
+#define _STDMENU_HXX
+#define _STDCTRL_HXX
+#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+//SVTOOLS
+#define _SVTREELIST_HXX
+#define _FILTER_HXX
+#define _SVLBOXITM_HXX
+#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+
+#define _BASE_DLGS_HXX
+#define _BIGINT_HXX
+#define _CACHESTR_HXX
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _DLGCFG_HXX
+#define _DYNARR_HXX
+#define _EXTATTR_HXX
+//#define _FILDLG_HXX ***
+#define _FILTER_HXX
+#define _FONTDLG_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXH
+#define _XOUTX_HXX
+//#define _XPOOL_HXX
+#define _XTABLE_HXX
+
+
+//#define _SVDLAYER_HXX
+//#define _SVDATTR_HXX
+#define _SVDIO_HXX
+#define _SVBOXITM_HXX
+#define _SVDEC_HXX
+#define _SVDXOUT_HXX
+#define _SDR_NOVIEWMARKER
+#define _SDR_NODRAGMETHODS
+#define _SDR_NOUNDO
+#define _SDR_NOXOUTDEV
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+#define _SDR_NOOBJECTS
+//#define _SDR_NOVIEWS ***
+
+#define _SVDRAG_HXX
+#define _SVINCVW_HXX
+#define _SV_MULTISEL_HXX
+#define _SVRTV_HXX
+#define _SVTABBX_HXX
+
+#define _SVX_DAILDLL_HXX
+#define _SVX_HYPHEN_HXX
+#define _SVX_IMPGRF_HXX
+#define _SVX_OPTITEMS_HXX
+#define _SVX_OPTGERL_HXX
+#define _SVX_OPTSAVE_HXX
+#define _SVX_OPTSPELL_HXX
+#define _SVX_OPTPATH_HXX
+#define _SVX_OPTLINGU_HXX
+#define _SVX_RULER_HXX
+#define _SVX_RULRITEM_HXX
+#define _SVX_SPLWRAP_HXX
+#define _SVX_SPLDLG_HXX
+#define _SVX_THESDLG_HXX
+
+//------------------------------------------------------------------------
+
+#include <svx/svdview.hxx>
+#include <svx/svdobj.hxx>
+
+#include "fuconrec.hxx"
+#include "tabvwsh.hxx"
+#include "sc.hrc"
+
+
+//------------------------------------------------------------------------
+
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+FuConstRectangle::FuConstRectangle(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq)
+ : FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
+{
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuConstRectangle::~FuConstRectangle()
+{
+}
+
+/*************************************************************************
+|*
+|* MouseButtonDown-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+
+ if ( rMEvt.IsLeft() && !pView->IsAction() )
+ {
+ Point aPos( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+
+ pWindow->CaptureMouse();
+
+ if ( pView->GetCurrentObjIdentifier() == OBJ_CAPTION )
+ {
+ Size aCaptionSize ( 2268, 1134 ); // 4x2cm
+
+ bReturn = pView->BegCreateCaptionObj( aPos, aCaptionSize );
+
+ // wie stellt man den Font ein, mit dem geschrieben wird
+ }
+ else
+ bReturn = pView->BegCreateObj(aPos);
+ }
+ return bReturn;
+}
+
+/*************************************************************************
+|*
+|* MouseMove-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstRectangle::MouseMove(const MouseEvent& rMEvt)
+{
+ return FuConstruct::MouseMove(rMEvt);
+}
+
+/*************************************************************************
+|*
+|* MouseButtonUp-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FALSE;
+
+ if ( pView->IsCreateObj() && rMEvt.IsLeft() )
+ {
+ Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+ pView->EndCreateObj(SDRCREATE_FORCEEND);
+ bReturn = TRUE;
+ }
+ return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
+}
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstRectangle::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ return(bReturn);
+}
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuConstRectangle::Activate()
+{
+ SdrObjKind aObjKind;
+
+ switch (aSfxRequest.GetSlot() )
+ {
+ case SID_DRAW_LINE:
+ aNewPointer = Pointer( POINTER_DRAW_LINE );
+ aObjKind = OBJ_LINE;
+ break;
+
+ case SID_DRAW_RECT:
+ aNewPointer = Pointer( POINTER_DRAW_RECT );
+ aObjKind = OBJ_RECT;
+ break;
+
+ case SID_DRAW_ELLIPSE:
+ aNewPointer = Pointer( POINTER_DRAW_ELLIPSE );
+ aObjKind = OBJ_CIRC;
+ break;
+
+ case SID_DRAW_CAPTION:
+ aNewPointer = Pointer( POINTER_DRAW_CAPTION );
+ aObjKind = OBJ_CAPTION;
+ break;
+
+ default:
+ aNewPointer = Pointer( POINTER_CROSS );
+ aObjKind = OBJ_RECT;
+ break;
+ }
+
+ pView->SetCurrentObj(aObjKind);
+
+ aOldPointer = pWindow->GetPointer();
+ pViewShell->SetActivePointer( aNewPointer );
+
+ FuConstruct::Activate();
+}
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuConstRectangle::Deactivate()
+{
+ FuConstruct::Deactivate();
+ pViewShell->SetActivePointer( aOldPointer );
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx
new file mode 100644
index 000000000000..5a92e8b22864
--- /dev/null
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -0,0 +1,518 @@
+/*************************************************************************
+ *
+ * $RCSfile: fuconstr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+
+//SV
+//#define _CLIP_HXX
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+//#define _SVTREELIST_HXX ***
+#define _FILTER_HXX
+//#define _SVLBOXITM_HXX ***
+//#define _SVTREEBOX_HXX ***
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+//#define _SFXINIMGR_HXX ***
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+//#define _SFXDOCINF_HXX ***
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+//#define _SFX_BINDINGS_HXX
+//#define _SFXDISPATCH_HXX
+//#define _SFXMSG_HXX ***
+//#define _SFXOBJFACE_HXX ***
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+// SFX
+//#define _SFXAPPWIN_HXX ***
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//------------------------------------------------------------------------
+
+#include <svx/outliner.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svdouno.hxx>
+#include <svx/svdview.hxx>
+#include <sfx2/dispatch.hxx>
+
+#include "fuconstr.hxx"
+#include "fudraw.hxx"
+#include "tabvwsh.hxx"
+#include "futext.hxx"
+#include "sc.hrc"
+
+// Maximal erlaubte Mausbewegung um noch Drag&Drop zu starten
+//! fusel,fuconstr,futext - zusammenfassen!
+#define SC_MAXDRAGMOVE 3
+
+//------------------------------------------------------------------------
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+FuConstruct::FuConstruct(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq) :
+ FuDraw(pViewSh, pWin, pView, pDoc, rReq)
+{
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuConstruct::~FuConstruct()
+{
+}
+
+BYTE FuConstruct::Command(const CommandEvent& rCEvt)
+{
+ // special code for non-VCL OS2/UNX removed
+
+ return FuDraw::Command( rCEvt );
+}
+
+/*************************************************************************
+|*
+|* MouseButtonDown-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+
+ if ( pView->IsAction() )
+ {
+ if ( rMEvt.IsRight() )
+ pView->BckAction();
+ return TRUE;
+ }
+
+ aDragTimer.Start();
+
+ aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
+
+ if ( rMEvt.IsLeft() )
+ {
+ pWindow->CaptureMouse();
+
+ SdrHdl* pHdl = pView->HitHandle(aMDPos, *pWindow);
+
+ if ( pHdl != NULL || pView->IsMarkedHit(aMDPos) )
+ {
+ pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, 1);
+ bReturn = TRUE;
+ }
+ else if ( pView->HasMarkedObj() )
+ {
+ pView->UnmarkAll();
+ bReturn = TRUE;
+ }
+ }
+
+ bIsInDragMode = FALSE;
+
+ return bReturn;
+}
+
+/*************************************************************************
+|*
+|* MouseMove-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstruct::MouseMove(const MouseEvent& rMEvt)
+{
+ FuDraw::MouseMove(rMEvt);
+
+ if (aDragTimer.IsActive() )
+ {
+ Point aOldPixel = pWindow->LogicToPixel( aMDPos );
+ Point aNewPixel = rMEvt.GetPosPixel();
+ if ( Abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
+ Abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
+ aDragTimer.Stop();
+ }
+
+ Point aPix(rMEvt.GetPosPixel());
+ Point aPnt( pWindow->PixelToLogic(aPix) );
+
+ if ( pView->IsAction() )
+ {
+ ForceScroll(aPix);
+ pView->MovAction(aPnt);
+ }
+ else
+ {
+ SdrHdl* pHdl=pView->HitHandle(aPnt, *pWindow);
+
+ if ( pHdl != NULL )
+ {
+ pViewShell->SetActivePointer(pHdl->GetPointer());
+ }
+ else if ( pView->IsMarkedHit(aPnt) )
+ {
+ pViewShell->SetActivePointer(Pointer(POINTER_MOVE));
+ }
+ else
+ {
+ pViewShell->SetActivePointer( aNewPointer );
+ }
+ }
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* MouseButtonUp-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = SimpleMouseButtonUp( rMEvt );
+
+ // Doppelklick auf Textobjekt? (->fusel)
+
+ USHORT nClicks = rMEvt.GetClicks();
+ if ( nClicks == 2 && rMEvt.IsLeft() )
+ {
+ if ( pView->HasMarkedObj() )
+ {
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ SdrMark* pMark = rMarkList.GetMark(0);
+ SdrObject* pObj = pMark->GetObj();
+
+ // #49458# bei Uno-Controls nicht in Textmodus
+ if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) )
+ {
+ SFX_DISPATCHER().Execute(SID_DRAW_TEXT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+
+ // jetzt den erzeugten FuText holen und in den EditModus setzen
+ FuPoor* pPoor = pViewShell->GetViewData()->GetView()->GetDrawFuncPtr();
+ if ( pPoor && pPoor->GetSlotID() == SID_DRAW_TEXT ) // hat keine RTTI
+ {
+ FuText* pText = (FuText*)pPoor;
+ Point aMousePixel = rMEvt.GetPosPixel();
+ pText->SetInEditMode( pObj, &aMousePixel );
+ }
+ bReturn = TRUE;
+ }
+ }
+ }
+ }
+
+ FuDraw::MouseButtonUp(rMEvt);
+
+ return bReturn;
+}
+
+// SimpleMouseButtonUp - ohne Test auf Doppelklick
+
+BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = TRUE;
+
+ if (aDragTimer.IsActive() )
+ {
+ aDragTimer.Stop();
+ }
+
+ Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+
+ if ( pView->IsDragObj() )
+ pView->EndDragObj( rMEvt.IsMod1() );
+
+ else if ( pView->IsMarkObj() )
+ pView->EndMarkObj();
+
+ else bReturn = FALSE;
+
+ if ( !pView->IsAction() )
+ {
+ pWindow->ReleaseMouse();
+
+ if ( !pView->HasMarkedObj() && rMEvt.GetClicks() < 2 )
+ {
+ pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1());
+
+ if ( pView->HasMarkedObj() )
+ SFX_DISPATCHER().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ else
+ SFX_DISPATCHER().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ }
+ }
+
+ return bReturn;
+}
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstruct::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FALSE;
+
+ switch ( rKEvt.GetKeyCode().GetCode() )
+ {
+ case KEY_ESCAPE:
+ if ( pView->IsAction() )
+ {
+ pView->BrkAction();
+ pWindow->ReleaseMouse();
+ bReturn = TRUE;
+ }
+ else // Zeichenmodus beenden
+ {
+ SFX_DISPATCHER().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ }
+ break;
+
+ case KEY_DELETE:
+ pView->DeleteMarked();
+ bReturn = TRUE;
+ break;
+ }
+
+ if ( !bReturn )
+ {
+ bReturn = FuDraw::KeyInput(rKEvt);
+ }
+
+ return(bReturn);
+}
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuConstruct::Activate()
+{
+ FuDraw::Activate();
+}
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuConstruct::Deactivate()
+{
+ FuDraw::Deactivate();
+}
+
+
+
+
diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx
new file mode 100644
index 000000000000..85e9caa37105
--- /dev/null
+++ b/sc/source/ui/drawfunc/fuconuno.cxx
@@ -0,0 +1,489 @@
+/*************************************************************************
+ *
+ * $RCSfile: fuconuno.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _FILDLG_HXX ***
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX ***
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+//******************************+++
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+//#define _SVTREELIST_HXX ***
+#define _FILTER_HXX
+//#define _SVLBOXITM_HXX ***
+//#define _SVTREEBOX_HXX ***
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+
+//************************
+
+//sfxcore.hxx
+//#define _SFXINIMGR_HXX ***
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+#define _SFX_BINDINGS_HXX //???
+#define _SFXDISPATCH_HXX //???
+//#define _SFXMSG_HXX ***
+//#define _SFXOBJFACE_HXX ***
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+// SFX
+//#define _SFXAPPWIN_HXX ***
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX
+//#define _SFX_CLIENTSH_HXX
+//#define _SFXDOCINF_HXX
+//#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+//#define _SFXDOCFILE_HXX ***
+//define _VIEWFAC_HXX
+//#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX
+//#define _MDIFRM_HXX ***
+#define _SFX_IPFRM_HXX
+//#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+//#define _BASEDLGS_HXX ***
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+//#define _SFXDOCTEMPL_HXX ***
+//#define _SFXDOCTDLG_HXX ***
+//#define _SFX_TEMPLDLG_HXX ***
+//#define _SFXNEW_HXX ***
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX ***
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+#define _ARGS_HXX
+//#define _SFXPOOLITEM_HXX
+//#define _SFXINTITEM_HXX
+//#define _SFXENUMITEM_HXX
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX
+#define _SFXPTITEM_HXX
+#define _SFXRECTITEM_HXX
+//#define _SFXITEMPOOL_HXX
+//#define _SFXITEMSET_HXX
+#define _SFXITEMITER_HXX
+#define _SFX_WHITER_HXX
+#define _SFXPOOLCACH_HXX
+//#define _AEITEM_HXX
+#define _SFXRNGITEM_HXX
+//#define _SFXSLSTITM_HXX
+#define _SFXSTYLE_HXX //???
+
+
+
+//************************
+
+
+
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX ***
+//#define _LINK_HXX ***
+//#define _ERRCODE_HXX ***
+//#define _GEN_HXX ***
+//#define _FRACT_HXX ***
+//#define _STRING_HXX ***
+//#define _MTF_HXX ***
+//#define _CONTNR_HXX ***
+//#define _LIST_HXX ***
+//#define _TABLE_HXX ***
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX ***
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX ***
+//#define _DEBUG_HXX ***
+//#define _DATE_HXX ***
+//#define _TIME_HXX ***
+//#define _DATETIME_HXX ***
+//#define _INTN_HXX ***
+//#define _WLDCRD_HXX ***
+//#define _FSYS_HXX ***
+//#define _STREAM_HXX ***
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+#ifdef WIN
+#define _SVDOUKWN_HXX
+#define _SVDORECT_HXX
+#define _SVDCAPT_HXX
+#define _SVDOCIRC_HXX
+#define _SVDOEDGE_HXX
+#define _SVDOGRAF_HXX
+#define _SVDRAW_HXX
+#define _SVDOGRP_HXX
+#define _SVDOMEAS_HXX
+#define _SVDOOLE2_HXX
+#define _SVDOPAGE_HXX
+#define _SVDOPATH_HXX
+
+#endif
+
+#define SI_DLL_HXX
+#define SIDLL_HXX
+//#define SI_NOITEMS
+//#define SI_NODRW
+#define SI_NOOTHERFORMS
+#define SI_NOSBXCONTROLS
+#define SINOSBXCONTROLS
+#define SI_NOCONTROL
+
+//------------------------------------------------------------------------
+
+#include <svx/svdview.hxx>
+//#include <svx/vcsbxdef.hxx>
+
+#include "fuconuno.hxx"
+#include "tabvwsh.hxx"
+#include "sc.hrc"
+
+//------------------------------------------------------------------------
+
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+FuConstUnoControl::FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq)
+ : FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
+{
+ SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, FALSE );
+ SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, FALSE );
+ if( pInventorItem )
+ nInventor = pInventorItem->GetValue();
+ if( pIdentifierItem )
+ nIdentifier = pIdentifierItem->GetValue();
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuConstUnoControl::~FuConstUnoControl()
+{
+}
+
+/*************************************************************************
+|*
+|* MouseButtonDown-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+
+ if ( rMEvt.IsLeft() && !pView->IsAction() )
+ {
+ Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+ pWindow->CaptureMouse();
+ pView->BegCreateObj(aPnt);
+ bReturn = TRUE;
+ }
+ return bReturn;
+}
+
+/*************************************************************************
+|*
+|* MouseMove-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstUnoControl::MouseMove(const MouseEvent& rMEvt)
+{
+ return FuConstruct::MouseMove(rMEvt);
+}
+
+/*************************************************************************
+|*
+|* MouseButtonUp-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FALSE;
+
+ if ( pView->IsCreateObj() && rMEvt.IsLeft() )
+ {
+ Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+ pView->EndCreateObj(SDRCREATE_FORCEEND);
+ bReturn = TRUE;
+ }
+ return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
+}
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuConstUnoControl::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ return(bReturn);
+}
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuConstUnoControl::Activate()
+{
+ pView->SetCurrentObj( nIdentifier, nInventor );
+
+ aNewPointer = Pointer( POINTER_DRAW_RECT );
+ aOldPointer = pWindow->GetPointer();
+ pViewShell->SetActivePointer( aNewPointer );
+
+ SdrLayer* pLayer = pView->GetModel()->GetLayerAdmin().GetLayerPerID(SC_LAYER_CONTROLS);
+ if (pLayer)
+ pView->SetActiveLayer( pLayer->GetName() );
+
+ FuConstruct::Activate();
+}
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuConstUnoControl::Deactivate()
+{
+ FuConstruct::Deactivate();
+
+ SdrLayer* pLayer = pView->GetModel()->GetLayerAdmin().GetLayerPerID(SC_LAYER_FRONT);
+ if (pLayer)
+ pView->SetActiveLayer( pLayer->GetName() );
+
+ pViewShell->SetActivePointer( aOldPointer );
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
new file mode 100644
index 000000000000..46c6d5f3f35c
--- /dev/null
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -0,0 +1,403 @@
+/*************************************************************************
+ *
+ * $RCSfile: fudraw.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+#include <svx/svdobj.hxx>
+#include <svx/svdview.hxx>
+#include <sfx2/dispatch.hxx>
+
+#include "sc.hrc"
+#include "fudraw.hxx"
+#include "tabvwsh.hxx"
+#include "drwlayer.hxx"
+#include "scresid.hxx"
+
+
+/*************************************************************************
+|*
+|* Basisklasse fuer alle Drawmodul-spezifischen Funktionen
+|*
+\************************************************************************/
+
+FuDraw::FuDraw(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq) :
+ FuPoor (pViewSh, pWin, pView, pDoc, rReq),
+ aNewPointer ( POINTER_ARROW ),
+ aOldPointer ( POINTER_ARROW )
+{
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuDraw::~FuDraw()
+{
+}
+
+/*************************************************************************
+|*
+|* Modifier-Tasten auswerten
+|*
+\************************************************************************/
+
+void FuDraw::DoModifiers(const MouseEvent& rMEvt)
+{
+ // Shift = Ortho und AngleSnap
+ // Control = Snap (Toggle)
+ // Alt = zentrisch
+
+ BOOL bShift = rMEvt.IsShift();
+ BOOL bCtrl = rMEvt.IsMod1();
+ BOOL bAlt = rMEvt.IsMod2();
+
+ ScViewData* pViewData = pViewShell->GetViewData();
+ const ScViewOptions& rOpt = pViewData->GetOptions();
+ const ScGridOptions& rGrid = rOpt.GetGridOptions();
+ BOOL bGridOpt = rGrid.GetUseGridSnap();
+
+ BOOL bOrtho = bShift;
+ BOOL bAngleSnap = bShift;
+ BOOL bGridSnap = ( bGridOpt != bCtrl ); // andere Snap's nicht unterstuetzt
+ BOOL bCenter = bAlt;
+
+ if (pView->IsOrtho() != bOrtho)
+ pView->SetOrtho(bOrtho);
+ if (pView->IsAngleSnapEnabled() != bAngleSnap)
+ pView->SetAngleSnapEnabled(bAngleSnap);
+
+/* Control fuer Snap beisst sich beim Verschieben mit "kopieren" !!!
+
+ if (pView->IsGridSnap() != bGridSnap)
+ pView->SetGridSnap(bGridSnap);
+ if (pView->IsSnapEnabled() != bGridSnap)
+ pView->SetSnapEnabled(bGridSnap);
+*/
+ if (pView->IsCreate1stPointAsCenter() != bCenter)
+ pView->SetCreate1stPointAsCenter(bCenter);
+ if (pView->IsResizeAtCenter() != bCenter)
+ pView->SetResizeAtCenter(bCenter);
+}
+
+void FuDraw::ResetModifiers()
+{
+ ScViewData* pViewData = pViewShell->GetViewData();
+ const ScViewOptions& rOpt = pViewData->GetOptions();
+ const ScGridOptions& rGrid = rOpt.GetGridOptions();
+ BOOL bGridOpt = rGrid.GetUseGridSnap();
+
+ if (pView->IsOrtho())
+ pView->SetOrtho(FALSE);
+ if (pView->IsAngleSnapEnabled())
+ pView->SetAngleSnapEnabled(FALSE);
+
+ if (pView->IsGridSnap() != bGridOpt)
+ pView->SetGridSnap(bGridOpt);
+ if (pView->IsSnapEnabled() != bGridOpt)
+ pView->SetSnapEnabled(bGridOpt);
+
+ if (pView->IsCreate1stPointAsCenter())
+ pView->SetCreate1stPointAsCenter(FALSE);
+ if (pView->IsResizeAtCenter())
+ pView->SetResizeAtCenter(FALSE);
+}
+
+/*************************************************************************
+|*
+|* MouseButtonDown-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ DoModifiers( rMEvt );
+ return FALSE;
+}
+
+/*************************************************************************
+|*
+|* MouseMove-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuDraw::MouseMove(const MouseEvent& rMEvt)
+{
+ DoModifiers( rMEvt );
+ return FALSE;
+}
+
+/*************************************************************************
+|*
+|* MouseButtonUp-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ ResetModifiers();
+ return FALSE;
+}
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FALSE;
+
+ switch ( rKEvt.GetKeyCode().GetCode() )
+ {
+ case KEY_ESCAPE:
+
+ /* 18.12.95: TextShell beibehalten nicht mehr gewuenscht...
+ *
+ * if ( pView->IsAction() )
+ * {
+ * pView->BrkAction();
+ * pWindow->ReleaseMouse();
+ * bReturn = TRUE;
+ * }
+ * else if ( pView->IsTextEdit() )
+ * {
+ * pView->EndTextEdit();
+ * pView->SetCreateMode();
+ * pViewShell->GetScDrawView()->InvalidateDrawTextAttrs();
+ * bReturn = TRUE;
+ * }
+ * else
+ */
+
+ if ( pViewShell->IsDrawTextShell() || aSfxRequest.GetSlot() == SID_DRAW_NOTEEDIT )
+ {
+ // in normale Draw-Shell, wenn Objekt selektiert, sonst Zeichnen aus
+ SFX_DISPATCHER().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ bReturn = TRUE;
+ }
+ else if ( pViewShell->IsDrawSelMode() )
+ {
+ pView->UnmarkAll();
+ SFX_DISPATCHER().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ bReturn = TRUE;
+ }
+ else if ( pView->HasMarkedObj() )
+ {
+ pView->UnmarkAll();
+ // Beim Bezier-Editieren ist jetzt wieder das Objekt selektiert
+ if (!pView->HasMarkedObj())
+ pViewShell->SetDrawShell( FALSE );
+ bReturn = TRUE;
+ }
+ break;
+
+ case KEY_DELETE: //! ueber Accelerator
+ pView->DeleteMarked();
+ bReturn = TRUE;
+ break;
+ }
+
+ if (!bReturn)
+ {
+ bReturn = FuPoor::KeyInput(rKEvt);
+ }
+
+ return (bReturn);
+}
+
+/*************************************************************************
+|*
+|* Vor dem Scrollen Selektionsdarstellung ausblenden
+|*
+\************************************************************************/
+
+void FuDraw::ScrollStart()
+{
+// HideShownXor in Gridwin
+}
+
+/*************************************************************************
+|*
+|* Nach dem Scrollen Selektionsdarstellung wieder anzeigen
+|*
+\************************************************************************/
+
+void FuDraw::ScrollEnd()
+{
+// ShowShownXor in Gridwin
+}
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuDraw::Activate()
+{
+ FuPoor::Activate();
+}
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuDraw::Deactivate()
+{
+ FuPoor::Deactivate();
+}
+
+/*************************************************************************
+|*
+|* Maus-Pointer umschalten
+|*
+\************************************************************************/
+
+BOOL lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow )
+{
+ SdrViewEvent aVEvt;
+ MouseEvent aMEvt( rPosPixel, 1, 0, MOUSE_LEFT );
+ SdrHitKind eHit = pView->PickAnything( aMEvt, SDRMOUSEBUTTONDOWN, aVEvt );
+
+ if ( eHit != SDRHIT_NONE && aVEvt.pObj != NULL )
+ {
+ if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) && ScDrawLayer::GetHitIMapObject(
+ aVEvt.pObj, pWindow->PixelToLogic(rPosPixel), *pWindow ) )
+ return TRUE;
+
+ if ( aVEvt.eEvent == SDREVENT_EXECUTEURL )
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void FuDraw::ForcePointer(const MouseEvent* pMEvt)
+{
+ if ( !pView->IsAction() )
+ {
+#ifdef VCL
+ Point aPosPixel = pWindow->GetPointerPosPixel();
+#else
+ Point aPosPixel = pWindow->ScreenToOutputPixel( Pointer::GetPosPixel() );
+#endif
+ BOOL bAlt = pMEvt && pMEvt->IsMod2();
+ Point aPnt = pWindow->PixelToLogic( aPosPixel );
+ SdrHdl* pHdl = pView->HitHandle(aPnt, *pWindow);
+ SdrObject* pObj;
+ SdrPageView* pPV;
+
+ if ( pView->IsTextEdit() )
+ {
+ pViewShell->SetActivePointer(Pointer(POINTER_TEXT)); // kann nicht sein ?
+ }
+ else if ( pHdl )
+ {
+ pViewShell->SetActivePointer(
+ pView->GetPreferedPointer( aPnt, pWindow ) );
+ }
+ else if ( pView->IsMarkedHit(aPnt) )
+ {
+ pViewShell->SetActivePointer( Pointer(POINTER_MOVE) );
+ }
+ else if ( !bAlt && ( !pMEvt || !pMEvt->GetButtons() )
+ && lcl_UrlHit( pView, aPosPixel, pWindow ) )
+ {
+ // kann mit ALT unterdrueckt werden
+ pWindow->SetPointer( Pointer( POINTER_REFHAND ) ); // Text-URL / ImageMap
+ }
+ else if ( !bAlt && pView->PickObj(aPnt, pObj, pPV, SDRSEARCH_PICKMACRO) )
+ {
+ // kann mit ALT unterdrueckt werden
+ SdrObjMacroHitRec aHitRec; //! muss da noch irgendwas gesetzt werden ????
+ pViewShell->SetActivePointer( pObj->GetMacroPointer(aHitRec) );
+ }
+ else if ( IsDetectiveHit( aPnt ) )
+#ifdef VCL
+ pViewShell->SetActivePointer( Pointer( POINTER_DETECTIVE ) );
+#else
+ pViewShell->SetActivePointer( ScResId( RID_SCPTR_DETECTIVE ) );
+#endif
+ else
+ pViewShell->SetActivePointer( aNewPointer ); //! in Gridwin?
+ }
+}
+
+
+
+
+
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
new file mode 100644
index 000000000000..18889198e8b1
--- /dev/null
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -0,0 +1,355 @@
+/*************************************************************************
+ *
+ * $RCSfile: fuins1.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+#include <svx/impgrf.hxx>
+#include <svx/svdograf.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svdpagv.hxx>
+#include <svx/svdview.hxx>
+#include <svtools/filter.hxx>
+#include <svtools/stritem.hxx>
+#include <vcl/msgbox.hxx>
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+#include "fuinsert.hxx"
+#include "tabvwsh.hxx"
+#include "drwlayer.hxx"
+#include "drawview.hxx"
+#include "scresid.hxx"
+#include "progress.hxx"
+#include "sc.hrc"
+
+
+
+//========================================================================
+// class ImportProgress
+//
+// Bemerkung:
+// Diese Klasse stellt lediglich den Handler fuer den ImportProgress des
+// Grafikfilters bereit.
+//========================================================================
+
+class ImportProgress
+{
+public:
+ ImportProgress( GraphicFilter& rFilter );
+ ~ImportProgress();
+
+ DECL_LINK( Update, GraphicFilter* );
+
+private:
+ ScProgress aProgress;
+};
+
+//------------------------------------------------------------------------
+
+ImportProgress::ImportProgress( GraphicFilter& rFilter )
+ : aProgress( NULL, // SfxViewFrame*, NULL == alle Docs locken
+ String( ScResId(STR_INSERTGRAPHIC) ),
+ 100 )
+{
+ rFilter.SetUpdatePercentHdl( LINK( this, ImportProgress, Update) );
+}
+
+//------------------------------------------------------------------------
+
+__EXPORT ImportProgress::~ImportProgress()
+{
+ aProgress.SetState( 100 );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( ImportProgress, Update, GraphicFilter*, pGraphicFilter )
+{
+ aProgress.SetState( pGraphicFilter->GetPercent() );
+ return 0;
+}
+
+
+//------------------------------------------------------------------------
+
+void LimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage )
+{
+ if ( !rPage.Width() || !rPage.Height() )
+ return;
+
+ if ( rSize.Width() > rPage.Width() || rSize.Height() > rPage.Height() )
+ {
+ double fX = rPage.Width() / (double) rSize.Width();
+ double fY = rPage.Height() / (double) rSize.Height();
+
+ if ( fX < fY )
+ {
+ rSize.Width() = rPage.Width();
+ rSize.Height() = (long) ( rSize.Height() * fX );
+ }
+ else
+ {
+ rSize.Height() = rPage.Height();
+ rSize.Width() = (long) ( rSize.Width() * fY );
+ }
+
+ if (!rSize.Width())
+ rSize.Width() = 1;
+ if (!rSize.Height())
+ rSize.Height() = 1;
+ }
+
+ if ( rPos.X() + rSize.Width() > rPage.Width() )
+ rPos.X() = rPage.Width() - rSize.Width();
+ if ( rPos.Y() + rSize.Height() > rPage.Height() )
+ rPos.Y() = rPage.Height() - rSize.Height();
+}
+
+/*************************************************************************
+|*
+|* FuInsertGraphic::Konstruktor
+|*
+\************************************************************************/
+
+#ifdef WNT
+#pragma optimize("",off)
+#endif
+
+FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
+ Window* pWin,
+ SdrView* pView,
+ SdrModel* pDoc,
+ SfxRequest& rReq )
+ : FuPoor(pViewSh, pWin, pView, pDoc, rReq)
+{
+ SvxImportGraphicDialog* pDlg = NULL;
+ Graphic aImportGraphic;
+ String aPath;
+ String aFilterName;
+ BOOL bError = FALSE;
+ BOOL bAsLink = FALSE;
+ Graphic* pInsGraphic = NULL;
+
+ const SfxItemSet *pArgs = rReq.GetArgs();
+ const SfxPoolItem* pItem;
+ if ( pArgs && pArgs->GetItemState( SID_INSERT_GRAPHIC, TRUE, &pItem ) == SFX_ITEM_SET )
+ {
+ DBG_ASSERT( pItem->ISA(SfxStringItem), "falsches Item" );
+ aPath = ((const SfxStringItem*) pItem)->GetValue();
+
+ if ( pArgs->GetItemState( FN_PARAM_FILTER, TRUE, &pItem ) == SFX_ITEM_SET )
+ {
+ DBG_ASSERT( pItem->ISA(SfxStringItem), "falsches Item" );
+ aFilterName = ((const SfxStringItem*) pItem)->GetValue();
+ }
+ if ( pArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ {
+ DBG_ASSERT( pItem->ISA(SfxBoolItem), "falsches Item" );
+ bAsLink = ((const SfxBoolItem*) pItem)->GetValue();
+ }
+
+ if ( GRFILTER_OK == ::LoadGraphic( aPath, aFilterName, aImportGraphic ) )
+ pInsGraphic = &aImportGraphic;
+ else
+ bError = TRUE;
+ }
+
+ if ( !pInsGraphic && !bError ) // noch keine geladen -> Dialog
+ {
+ pDlg = new SvxImportGraphicDialog( pWindow,
+ String( ScResId(STR_INSERTGRAPHIC) ),
+ ENABLE_STANDARD | ENABLE_LINK );
+
+ if ( pDlg->Execute() == RET_OK )
+ {
+ aPath = pDlg->GetPath();
+ aFilterName = pDlg->GetCurFilter();
+ bAsLink = pDlg->AsLink();
+ pInsGraphic = pDlg->GetGraphic(); // per Preview schon geladen?
+
+ if ( !pInsGraphic )
+ {
+ // Grafik laden, wenn Dialog es nicht bereits getan hat
+
+ GraphicFilter& rFilter = pDlg->GetFilter();
+ ImportProgress aImportProgress( rFilter );
+ INetURLObject aURL;
+ aURL.SetSmartURL( aPath );
+ USHORT nError = rFilter.ImportGraphic( aImportGraphic, aURL );
+ if ( nError == GRFILTER_OK )
+ pInsGraphic = &aImportGraphic;
+ else
+ {
+ //! merge error strings with Writer and Impress!!!
+ USHORT nRes = 0;
+ switch ( nError )
+ {
+ case GRFILTER_OPENERROR: nRes = SCSTR_GRFILTER_OPENERROR; break;
+ case GRFILTER_IOERROR: nRes = SCSTR_GRFILTER_IOERROR; break;
+ case GRFILTER_FORMATERROR: nRes = SCSTR_GRFILTER_FORMATERROR; break;
+ case GRFILTER_VERSIONERROR: nRes = SCSTR_GRFILTER_VERSIONERROR; break;
+ case GRFILTER_FILTERERROR: nRes = SCSTR_GRFILTER_FILTERERROR; break;
+ case GRFILTER_TOOBIG: nRes = SCSTR_GRFILTER_TOOBIG; break;
+ }
+ if ( nRes )
+ {
+ InfoBox aInfoBox( pWindow, String(ScResId(nRes)) );
+ aInfoBox.Execute();
+ }
+ }
+ }
+
+ rReq.AppendItem( SfxStringItem( SID_INSERT_GRAPHIC, aPath ) );
+ rReq.AppendItem( SfxStringItem( FN_PARAM_FILTER, aFilterName ) );
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) );
+ }
+ }
+
+ if ( pInsGraphic ) // irgendwo eine Grafik gefunden -> einfuegen
+ {
+ // #74778# set the size so the graphic has its original pixel size
+ // at 100% view scale (as in SetMarkedOriginalSize),
+ // instead of respecting the current view scale
+
+ ScDrawView* pDrawView = pViewSh->GetScDrawView();
+ MapMode aSourceMap = pInsGraphic->GetPrefMapMode();
+ MapMode aDestMap( MAP_100TH_MM );
+ if ( aSourceMap.GetMapUnit() == MAP_PIXEL && pDrawView )
+ {
+ Fraction aScaleX, aScaleY;
+ pDrawView->CalcNormScale( aScaleX, aScaleY );
+ aDestMap.SetScaleX(aScaleX);
+ aDestMap.SetScaleY(aScaleY);
+ }
+ Size aLogicSize = pWindow->LogicToLogic(
+ pInsGraphic->GetPrefSize(), &aSourceMap, &aDestMap );
+
+ // Groesse begrenzen
+
+ SdrPageView* pPV = pView->GetPageViewPvNum(0);
+ SdrPage* pPage = pPV->GetPage();
+ Point aInsertPos = pViewSh->GetInsertPos();
+ LimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
+
+ Rectangle aRect ( aInsertPos, aLogicSize );
+
+ SdrGrafObj* pObj = new SdrGrafObj( *pInsGraphic, aRect );
+
+ if ( bAsLink )
+ pObj->SetGraphicLink( aPath, aFilterName );
+
+ // #49961# Pfad wird nicht mehr als Name der Grafik gesetzt
+
+ ScDrawLayer* pLayer = (ScDrawLayer*) pView->GetModel();
+ String aName = pLayer->GetNewGraphicName(); // "Grafik x"
+ pObj->SetName(aName);
+
+ pView->InsertObject( pObj, *pPV );
+
+ rReq.Done();
+ }
+
+ rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), pInsGraphic != NULL ) );
+
+ delete pDlg; // Dialog erst am Ende loeschen
+}
+
+/*************************************************************************
+|*
+|* FuInsertGraphic::Destruktor
+|*
+\************************************************************************/
+
+FuInsertGraphic::~FuInsertGraphic()
+{
+}
+
+/*************************************************************************
+|*
+|* FuInsertGraphic::Function aktivieren
+|*
+\************************************************************************/
+
+void FuInsertGraphic::Activate()
+{
+ FuPoor::Activate();
+}
+
+/*************************************************************************
+|*
+|* FuInsertGraphic::Function deaktivieren
+|*
+\************************************************************************/
+
+void FuInsertGraphic::Deactivate()
+{
+ FuPoor::Deactivate();
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
new file mode 100644
index 000000000000..7ffa794b6f7f
--- /dev/null
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -0,0 +1,692 @@
+/*************************************************************************
+ *
+ * $RCSfile: fuins2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+#include <sfx2/frameobj.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <svtools/stritem.hxx>
+#include <so3/insdlg.hxx>
+#include <so3/svstor.hxx>
+#include <so3/plugin.hxx>
+#include <sch/schdll.hxx>
+#include <sch/memchrt.hxx>
+#include <sch/schdll0.hxx>
+#include <sim2/simdll0.hxx>
+#include <starmath/smdll0.hxx>
+#include <svx/svdoole2.hxx>
+#include <svx/svdview.hxx>
+#include <svx/pfiledlg.hxx>
+#include <tools/urlobj.hxx>
+#include <vcl/msgbox.hxx>
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
+
+#include "fuinsert.hxx"
+#include "tabvwsh.hxx"
+#include "sc.hrc"
+#include "chartarr.hxx"
+#include "docsh.hxx"
+#include "document.hxx"
+#include "undotab.hxx"
+#include "chartlis.hxx"
+#include "uiitems.hxx"
+#include "globstr.hrc"
+
+extern SdrObject* pSkipPaintObj; // output.cxx - dieses Objekt nicht zeichnen
+
+//------------------------------------------------------------------------
+
+#define IS_AVAILABLE(WhichId,ppItem) \
+ (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+
+void lcl_ChartInit( SvInPlaceObjectRef aIPObj, ScViewData* pViewData, Window* pWin )
+{
+ USHORT nCol1 = 0;
+ USHORT nRow1 = 0;
+ USHORT nTab1 = 0;
+ USHORT nCol2 = 0;
+ USHORT nRow2 = 0;
+ USHORT nTab2 = 0;
+
+ ScMarkData& rMark = pViewData->GetMarkData();
+ if ( !rMark.IsMarked() )
+ pViewData->GetView()->MarkDataArea( TRUE );
+
+ if ( pViewData->GetSimpleArea( nCol1,nRow1,nTab1, nCol2,nRow2,nTab2 ) )
+ {
+ PutInOrder( nCol1, nCol2 );
+ PutInOrder( nRow1, nRow2 );
+ if ( nCol2>nCol1 || nRow2>nRow1 )
+ {
+ String aChartName;
+ SvInfoObject* pInfoObj = pViewData->GetDocShell()->Find( aIPObj );
+ if ( pInfoObj )
+ aChartName = pInfoObj->GetObjName();
+ else
+ DBG_ERROR( "IP-Object not found :-/" );
+
+ ScDocument* pDoc = pViewData->GetDocument();
+ pDoc->LimitChartArea( nTab1, nCol1,nRow1, nCol2,nRow2 );
+
+ // Chart-Collection gibt's nicht mehr
+
+ ScRange aRange( nCol1,nRow1,nTab1, nCol2,nRow2,nTab1 );
+ ScChartListener* pCL = new ScChartListener( aChartName, pDoc, aRange );
+ pDoc->GetChartListenerCollection()->Insert( pCL );
+ pCL->StartListeningTo();
+
+ ScChartArray aParam( pDoc, nTab1, nCol1,nRow1, nCol2,nRow2, String() );
+ SchMemChart* pMemChart = aParam.CreateMemChart();
+ SchDLL::Update( aIPObj, pMemChart, pWin );
+ delete pMemChart;
+ }
+ }
+}
+
+#ifdef WNT
+#pragma optimize("",off)
+#endif
+
+void lcl_ChartInit2( SvInPlaceObjectRef aIPObj, ScViewData* pViewData, Window* pWin,
+ const SfxItemSet* pReqArgs, const String& rChartName )
+{
+ ScDocument* pDoc = pViewData->GetDocument();
+ ScMarkData& rMark = pViewData->GetMarkData();
+
+ const SfxPoolItem* pItem;
+ BOOL bRowHeader = TRUE;
+ BOOL bColHeader = TRUE;
+
+ if( IS_AVAILABLE( SID_ATTR_ROWHEADERS, &pItem ) )
+ bRowHeader = ((const SfxBoolItem*)pItem)->GetValue();
+
+ if( IS_AVAILABLE( SID_ATTR_COLHEADERS, &pItem ) )
+ bColHeader = ((const SfxBoolItem*)pItem)->GetValue();
+
+ SchMemChart* pMemChart;
+ ScChartListener* pChartListener;
+ BOOL bMulti;
+ if ( IS_AVAILABLE( FN_PARAM_5, &pItem ) )
+ {
+ String aStr( ((const SfxStringItem*)pItem)->GetValue() );
+ ScRangeListRef aRangeListRef( new ScRangeList() );
+ aRangeListRef->Parse( aStr, pDoc );
+
+ if ( aRangeListRef->Count() )
+ {
+ ScChartArray aParam( pDoc, aRangeListRef, String() );
+ aParam.SetHeaders( bColHeader, bRowHeader );
+ pMemChart = aParam.CreateMemChart();
+
+ pChartListener = new ScChartListener( rChartName, pDoc, aRangeListRef );
+ bMulti = TRUE;
+ }
+ else
+ bMulti = FALSE;
+ }
+ else
+ bMulti = FALSE;
+ if ( !bMulti )
+ {
+ ScRange aMarkRange;
+ rMark.GetMarkArea( aMarkRange );
+ USHORT nColStart = aMarkRange.aStart.Col();
+ USHORT nRowStart = aMarkRange.aStart.Row();
+ USHORT nColEnd = aMarkRange.aEnd.Col();
+ USHORT nRowEnd = aMarkRange.aEnd.Row();
+ USHORT nTab = aMarkRange.aStart.Tab();
+
+ pDoc->LimitChartArea( nTab, nColStart, nRowStart, nColEnd, nRowEnd );
+
+ // Chart-Collection gibt's nicht mehr
+
+ ScChartArray aParam( pDoc, nTab, nColStart, nRowStart, nColEnd, nRowEnd, String() );
+ aParam.SetHeaders( bColHeader, bRowHeader );
+ pMemChart = aParam.CreateMemChart();
+
+ pChartListener = new ScChartListener( rChartName, pDoc,
+ ScRange( nColStart, nRowStart, nTab, nColEnd, nRowEnd, nTab ) );
+ }
+ pDoc->GetChartListenerCollection()->Insert( pChartListener );
+ pChartListener->StartListeningTo();
+ SchDLL::Update( aIPObj, pMemChart, *pReqArgs, pWin );
+ delete pMemChart;
+}
+
+#ifdef WNT
+#pragma optimize("",on)
+#endif
+
+/*************************************************************************
+|*
+|* FuInsertOLE::Konstruktor
+|*
+\************************************************************************/
+
+FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq)
+ : FuPoor(pViewSh, pWin, pView, pDoc, rReq)
+{
+ if( ! rReq.IsAPI() )
+ rReq.Done();
+
+ //! hier DLL's initalisieren, damit die Factories existieren?
+
+ SvInPlaceObjectRef aIPObj;
+ SvStorageRef aStor = new SvStorage( String() );
+ BOOL bIsFromFile = FALSE;
+
+ USHORT nSlot = rReq.GetSlot();
+ if (nSlot == SID_INSERT_FLOATINGFRAME)
+ {
+ SfxInsertFloatingFrameDialog aDlg( pWin );
+// aDlg.SetHelpId(nSlot);
+ aIPObj = aDlg.Execute( aStor );
+
+ // damit DrawShell eingeschaltet wird (Objekt aktivieren ist unnoetig):
+ bIsFromFile = TRUE;
+ }
+#ifdef SO3
+ else if (nSlot == SID_INSERT_SIMAGE)
+ {
+ if ( SFX_APP()->HasFeature(SFX_FEATURE_SIMAGE) )
+ aIPObj = &((SvFactory*)SvInPlaceObject::ClassFactory())->CreateAndInit(
+ *SIM_MOD()->pSimDrawDocShellFactory,
+ aStor );
+ }
+ else if (nSlot == SID_INSERT_SMATH)
+ {
+ if ( SFX_APP()->HasFeature(SFX_FEATURE_SMATH) )
+ aIPObj = &((SvFactory*)SvInPlaceObject::ClassFactory())->CreateAndInit(
+// *OFF_APP()->GetSmDLL()->pSmDocShellFactory,
+ *SM_MOD()->pSmDocShellFactory,
+ aStor );
+ }
+#else
+ else if (nSlot == SID_INSERT_SIMAGE)
+ {
+ if ( SFX_APP()->HasFeature(SFX_FEATURE_SIMAGE) )
+ aIPObj = &SvInPlaceObject::ClassFactory()->CreateAndInit(
+ *SIM_MOD()->pSimDrawDocShellFactory,
+ aStor );
+ }
+ else if (nSlot == SID_INSERT_SMATH)
+ {
+ if ( SFX_APP()->HasFeature(SFX_FEATURE_SMATH) )
+ aIPObj = &SvInPlaceObject::ClassFactory()->CreateAndInit(
+// *OFF_APP()->GetSmDLL()->pSmDocShellFactory,
+ *SM_MOD()->pSmDocShellFactory,
+ aStor );
+ }
+#endif
+ else if (nSlot == SID_INSERT_PLUGIN)
+ {
+ SvInsertPlugInDialog aDlg;
+ aDlg.SetHelpId(nSlot);
+ aIPObj = aDlg.Execute( pWin, aStor );
+ bIsFromFile = TRUE; // nicht aktivieren
+ }
+ else if (nSlot == SID_INSERT_SOUND || nSlot == SID_INSERT_VIDEO)
+ {
+ // create special filedialog for plugins
+ SvxPluginFileDlg aPluginFileDialog(pWin, nSlot);
+
+ // open filedlg
+ if (RET_OK == aPluginFileDialog.Execute())
+ {
+ // get URL
+ String aStrURL(aPluginFileDialog.GetPath());
+ aStrURL = URIHelper::SmartRelToAbs( aStrURL );
+
+ INetURLObject aURL;
+ aURL.SetSmartProtocol( INET_PROT_FILE );
+
+ if ( aURL.SetURL( aStrURL ) )
+ {
+ // create plugin, initialize, etc.
+ SvFactory * pPlugIn = SvFactory::GetDefaultPlugInFactory();
+ SvStorageRef aStor = new SvStorage( EMPTY_STRING, STREAM_STD_READWRITE );
+ SvPlugInObjectRef xObj = &pPlugIn->CreateAndInit( *pPlugIn, aStor );
+ xObj->SetPlugInMode( (USHORT)PLUGIN_EMBEDED );
+ xObj->SetURL( aURL );
+ aIPObj = (SvInPlaceObject*)&xObj;
+ }
+ else
+ {
+ //! error message
+ //! can this happen???
+ }
+ }
+ }
+ else if (nSlot == SID_INSERT_APPLET)
+ {
+ SvInsertAppletDialog aDlg;
+ aDlg.SetHelpId(nSlot);
+ aIPObj = aDlg.Execute( pWin, aStor );
+ bIsFromFile = TRUE; // nicht aktivieren
+ }
+ else // SID_INSERT_OBJECT
+ {
+ SvInsertOleObjectDialog aDlg;
+ aDlg.SetHelpId(nSlot);
+ SvObjectServerList aServerLst;
+ aDlg.FillObjectServerList(&aServerLst);
+ aServerLst.Remove( *ScDocShell::ClassFactory() ); // Starcalc nicht anzeigen
+ aIPObj = aDlg.Execute(pWin, aStor, &aServerLst );
+ bIsFromFile = !aDlg.IsCreateNew();
+ }
+
+ // SvInsertObjectDialog (alles in einem Dialog) wird nicht mehr benutzt
+
+ if( aIPObj.Is() )
+ {
+ pView->UnmarkAll();
+
+ SvEmbeddedInfoObject* pInfoObj = pViewSh->GetViewFrame()->GetObjectShell()->
+ InsertObject(aIPObj, String());
+ if ( !pInfoObj )
+ pViewSh->ErrorMessage( STR_ERR_INSERTOBJ );
+ else
+ {
+ String aName = pInfoObj->GetObjName();
+
+ // aSize immer in 1/100mm, egal was das Ole-Objekt hat
+
+ Size aSize = aIPObj->GetVisArea().GetSize();
+ if (aSize.Height() == 0 || aSize.Width() == 0)
+ {
+ aSize.Width() = 5000;
+ aSize.Height() = 5000;
+ Size aObjSize = Window::LogicToLogic( aSize,
+ MapMode( MAP_100TH_MM ), MapMode( aIPObj->GetMapUnit() ) );
+ aIPObj->SetVisAreaSize(aObjSize);
+
+ // re-convert aSize to 1/100th mm to avoid rounding errors in comparison below
+ aSize = Window::LogicToLogic( aObjSize,
+ MapMode( aIPObj->GetMapUnit() ), MapMode( MAP_100TH_MM ) );
+ }
+ else
+ aSize = Window::LogicToLogic( aSize,
+ MapMode( aIPObj->GetMapUnit() ), MapMode( MAP_100TH_MM ) );
+
+ // Chart initialisieren ?
+
+ if ( SFX_APP()->HasFeature(SFX_FEATURE_SCHART) &&
+ aIPObj->GetClassName() == *SCH_MOD()->pSchChartDocShellFactory )
+ lcl_ChartInit( aIPObj, pViewSh->GetViewData(), pWin );
+
+ Point aPnt = pViewSh->GetInsertPos();
+ Rectangle aRect (aPnt, aSize);
+ SdrOle2Obj* pObj = new SdrOle2Obj(aIPObj, aName, aRect);
+
+ // Dieses Objekt nicht vor dem Aktivieren zeichnen
+ // (in MarkListHasChanged kommt ein Update)
+ if (!bIsFromFile)
+ pSkipPaintObj = pObj;
+
+ SdrPageView* pPV = pView->GetPageViewPvNum(0);
+ pView->InsertObject(pObj, *pPV);
+ pObj->SetOleLink(pInfoObj);
+
+ // #73279# Math objects change their object size during InsertObject.
+ // New size must be set in SdrObject, or a wrong scale will be set at
+ // ActivateObject.
+
+ Size aNewSize = Window::LogicToLogic( aIPObj->GetVisArea().GetSize(),
+ MapMode( aIPObj->GetMapUnit() ), MapMode( MAP_100TH_MM ) );
+ if ( aNewSize != aSize )
+ {
+ aRect.SetSize( aNewSize );
+ pObj->SetLogicRect( aRect );
+ }
+
+ if ( !rReq.IsAPI() )
+ {
+ // XXX Activate aus Makro ist toedlich !!! ???
+ if (bIsFromFile)
+ {
+ // #45012# Objekt ist selektiert, also Draw-Shell aktivieren
+ pViewShell->SetDrawShell( TRUE );
+ }
+ else
+ {
+ pViewShell->ActivateObject( (SdrOle2Obj*) pObj, SVVERB_SHOW );
+ pSkipPaintObj = NULL;
+ }
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* FuInsertOLE::Destruktor
+|*
+\************************************************************************/
+
+FuInsertOLE::~FuInsertOLE()
+{
+}
+
+/*************************************************************************
+|*
+|* FuInsertOLE::Function aktivieren
+|*
+\************************************************************************/
+
+void FuInsertOLE::Activate()
+{
+ FuPoor::Activate();
+}
+
+/*************************************************************************
+|*
+|* FuInsertOLE::Function deaktivieren
+|*
+\************************************************************************/
+
+void FuInsertOLE::Deactivate()
+{
+ FuPoor::Deactivate();
+}
+
+/*************************************************************************
+|*
+|* FuInsertChart::Konstruktor
+|*
+\************************************************************************/
+
+FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq)
+ : FuPoor(pViewSh, pWin, pView, pDoc, rReq)
+{
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+
+ if( ! rReq.IsAPI() )
+ rReq.Done();
+
+ SvStorageRef aStor = new SvStorage( String() );
+ SvInPlaceObjectRef aIPObj;
+ if ( SFX_APP()->HasFeature(SFX_FEATURE_SCHART) )
+ aIPObj = &((SvFactory*)SvInPlaceObject::ClassFactory())->CreateAndInit(
+ *SCH_MOD()->pSchChartDocShellFactory,
+ aStor );
+
+ if( aIPObj.Is() )
+ {
+ pView->UnmarkAll();
+
+ SvEmbeddedInfoObject* pInfoObj = pViewSh->GetViewFrame()->GetObjectShell()->
+ InsertObject(aIPObj, String());
+ if ( !pInfoObj )
+ pViewSh->ErrorMessage( STR_ERR_INSERTOBJ );
+ else
+ {
+ String aName = pInfoObj->GetObjName();
+
+ ScRangeListRef aDummy;
+ Rectangle aMarkDest;
+ USHORT nMarkTab;
+ BOOL bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab );
+
+ // Objekt-Groesse
+
+ Size aSize = aIPObj->GetVisArea().GetSize();
+ BOOL bSizeCh = FALSE;
+ if (bDrawRect && !aMarkDest.IsEmpty())
+ {
+ aSize = aMarkDest.GetSize();
+ bSizeCh = TRUE;
+ }
+ if (aSize.Height() <= 0 || aSize.Width() <= 0)
+ {
+ aSize.Width() = 5000;
+ aSize.Height() = 5000;
+ bSizeCh = TRUE;
+ }
+ if (bSizeCh)
+ {
+ aSize = Window::LogicToLogic( aSize, MapMode( MAP_100TH_MM ), MapMode( aIPObj->GetMapUnit() ) );
+ aIPObj->SetVisAreaSize(aSize);
+ }
+
+ ScViewData* pData = pViewSh->GetViewData();
+ ScDocShell* pScDocSh = pData->GetDocShell();
+ ScDocument* pScDoc = pScDocSh->GetDocument();
+
+ if( pReqArgs )
+ {
+ lcl_ChartInit2( aIPObj, pData, pWin, pReqArgs, aName );
+ const SfxPoolItem* pItem;
+ UINT16 nToTable = 0;
+
+ if( IS_AVAILABLE( FN_PARAM_4, &pItem ) )
+ {
+ if ( pItem->ISA( SfxUInt16Item ) )
+ nToTable = ((const SfxUInt16Item*)pItem)->GetValue();
+ else if ( pItem->ISA( SfxBoolItem ) )
+ {
+ // #46033# in der idl fuer Basic steht FN_PARAM_4 als SfxBoolItem
+ // -> wenn gesetzt, neue Tabelle, sonst aktuelle Tabelle
+
+ if ( ((const SfxBoolItem*)pItem)->GetValue() )
+ nToTable = pScDoc->GetTableCount();
+ else
+ nToTable = pData->GetTabNo();
+ }
+ }
+ else
+ {
+ if (bDrawRect)
+ nToTable = nMarkTab;
+ rReq.AppendItem( SfxUInt16Item( FN_PARAM_4, nToTable ) );
+ }
+
+ // auf neue Tabelle ausgeben?
+ if ( nToTable == pScDoc->GetTableCount() )
+ {
+ // dann los...
+ String aTabName;
+ USHORT nNewTab = pScDoc->GetTableCount();
+
+ pScDoc->CreateValidTabName( aTabName );
+
+ if ( pScDoc->InsertTab( nNewTab, aTabName ) )
+ {
+ BOOL bAppend = TRUE;
+
+ pScDocSh->GetUndoManager()->AddUndoAction(
+ new ScUndoInsertTab( pScDocSh, nNewTab,
+ bAppend, aTabName ) );
+
+ pScDocSh->Broadcast( ScTablesHint( SC_TAB_INSERTED, nNewTab ) );
+ pViewSh->SetTabNo( nNewTab, TRUE );
+ pScDocSh->PostPaintExtras(); //! erst hinterher ???
+ }
+ else
+ {
+ DBG_ERROR( "Could not create new table :-/" );
+ }
+ }
+ else if ( nToTable != pData->GetTabNo() )
+ {
+ pViewSh->SetTabNo( nToTable, TRUE );
+ }
+ }
+ else
+ lcl_ChartInit( aIPObj, pData, pWin );
+
+ // Objekt-Position
+
+ Point aStart;
+ if ( bDrawRect )
+ aStart = aMarkDest.TopLeft(); // per Hand markiert
+ else
+ {
+ USHORT nC0, nR0, nT0, nC1, nR1, nT1;
+ if( pData->GetSimpleArea( nC0, nR0, nT0, nC1, nR1, nT1 )
+ && ( nT0 == nT1 ) )
+ {
+ // Einfache Selektion in der gleichen Tabelle:
+ // Positionieren 1/2 Spalte rechts
+ // und 1 1/2 Zeilen unterhalb des Starts
+ ScDocument* pScDoc = pData->GetDocument();
+ ULONG x = 0, y = 0;
+ for( USHORT i = 0; i <= nC1; i++ )
+ x += pScDoc->GetColWidth( i, nT0 );
+ while( ++i <= MAXCOL )
+ {
+ USHORT n = pScDoc->GetColWidth( i, nT0 );
+ if( n )
+ {
+ x += n / 2; break;
+ }
+ }
+ for( i = 0; i <= nR0; i++ )
+ y += pScDoc->FastGetRowHeight( i, nT0 );
+ while( ++i <= MAXROW )
+ {
+ USHORT n = pScDoc->FastGetRowHeight( i, nT0 );
+ if( n )
+ {
+ y += n / 2; break;
+ }
+ }
+ // Das ganze von Twips nach 1/100 mm
+ x = (ULONG) ((double) x * HMM_PER_TWIPS);
+ y = (ULONG) ((double) y * HMM_PER_TWIPS);
+ aStart = Point( x, y );
+ }
+ else
+ aStart = pViewSh->GetInsertPos();
+ }
+
+ Rectangle aRect (aStart, aSize);
+ SdrOle2Obj* pObj = new SdrOle2Obj(aIPObj, aName, aRect);
+
+ // Dieses Objekt nicht vor dem Aktivieren zeichnen
+ // (in MarkListHasChanged kommt ein Update)
+ pSkipPaintObj = pObj;
+
+ SdrPageView* pPV = pView->GetPageViewPvNum(0);
+ pView->InsertObject(pObj, *pPV);
+ pObj->SetOleLink(pInfoObj);
+
+ // Dies veranlaesst Chart zum sofortigen Update
+ SvData aEmpty;
+
+ aIPObj->SendDataChanged( aEmpty );
+ aIPObj->SendViewChanged();
+
+ if (!rReq.IsAPI())
+ {
+ // XXX Activate aus Makro ist toedlich !!! ???
+ pViewShell->ActivateObject( (SdrOle2Obj*) pObj, SVVERB_SHOW );
+ }
+
+ pSkipPaintObj = NULL;
+ }
+ }
+
+ pViewShell->ResetChartArea(); // Einstellungen nur einmal auslesen
+}
+
+/*************************************************************************
+|*
+|* FuInsertChart::Destruktor
+|*
+\************************************************************************/
+
+FuInsertChart::~FuInsertChart()
+{
+}
+
+/*************************************************************************
+|*
+|* FuInsertChart::Function aktivieren
+|*
+\************************************************************************/
+
+void FuInsertChart::Activate()
+{
+ FuPoor::Activate();
+}
+
+/*************************************************************************
+|*
+|* FuInsertChart::Function deaktivieren
+|*
+\************************************************************************/
+
+void FuInsertChart::Deactivate()
+{
+ FuPoor::Deactivate();
+}
+
+
diff --git a/sc/source/ui/drawfunc/fumark.cxx b/sc/source/ui/drawfunc/fumark.cxx
new file mode 100644
index 000000000000..5e479f535865
--- /dev/null
+++ b/sc/source/ui/drawfunc/fumark.cxx
@@ -0,0 +1,325 @@
+/*************************************************************************
+ *
+ * $RCSfile: fumark.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+#include <svx/svdview.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
+
+#include "fumark.hxx"
+#include "sc.hrc"
+#include "tabvwsh.hxx"
+#include "scmod.hxx"
+#include "reffact.hxx"
+#include "document.hxx"
+#include "scresid.hxx"
+
+//------------------------------------------------------------------
+
+/*************************************************************************
+|*
+|* Funktion zum Aufziehen eines Rechtecks
+|*
+\************************************************************************/
+
+FuMarkRect::FuMarkRect(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq) :
+ FuPoor(pViewSh, pWin, pView, pDoc, rReq),
+ bVisible(FALSE),
+ bStartDrag(FALSE)
+{
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuMarkRect::~FuMarkRect()
+{
+}
+
+/*************************************************************************
+|*
+|* MouseButtonDown-event
+|*
+\************************************************************************/
+
+BOOL FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ pWindow->CaptureMouse();
+ pView->UnmarkAll(); // der Einheitlichkeit halber und wegen #50558#
+ bStartDrag = TRUE;
+
+ aBeginPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
+ aZoomRect = Rectangle( aBeginPos, Size() );
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* MouseMove-event
+|*
+\************************************************************************/
+
+BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt)
+{
+ if ( bStartDrag )
+ {
+ if ( bVisible )
+ pViewShell->DrawMarkRect(aZoomRect);
+ Point aPixPos= rMEvt.GetPosPixel();
+ ForceScroll(aPixPos);
+
+ Point aEndPos = pWindow->PixelToLogic(aPixPos);
+ Rectangle aRect(aBeginPos, aEndPos);
+ aZoomRect = aRect;
+ aZoomRect.Justify();
+ pViewShell->DrawMarkRect(aZoomRect);
+ bVisible = TRUE;
+ }
+
+ ForcePointer(&rMEvt);
+
+ return bStartDrag;
+}
+
+/*************************************************************************
+|*
+|* MouseButtonUp-event
+|*
+\************************************************************************/
+
+BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ if ( bVisible )
+ {
+ // Hide ZoomRect
+ pViewShell->DrawMarkRect(aZoomRect);
+ bVisible = FALSE;
+ }
+
+ Size aZoomSizePixel = pWindow->LogicToPixel(aZoomRect).GetSize();
+
+ USHORT nMinMove = pView->GetMinMoveDistancePixel();
+ if ( aZoomSizePixel.Width() < nMinMove || aZoomSizePixel.Height() < nMinMove )
+ {
+ // Klick auf der Stelle
+
+ aZoomRect.SetSize(Size()); // dann ganz leer
+ }
+
+ bStartDrag = FALSE;
+ pWindow->ReleaseMouse();
+
+ SFX_DISPATCHER().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD);
+
+ // Daten an der View merken
+
+ pViewShell->SetChartArea( aSourceRange, aZoomRect );
+
+ // Chart-Dialog starten:
+
+ USHORT nId = ScChartDlgWrapper::GetChildWindowId();
+ SfxChildWindow* pWnd = pViewShell->GetViewFrame()->GetChildWindow( nId );
+ SC_MOD()->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* Command-event
+|*
+\************************************************************************/
+
+BYTE FuMarkRect::Command(const CommandEvent& rCEvt)
+{
+ if ( COMMAND_STARTDRAG == rCEvt.GetCommand() )
+ {
+ // #29877# nicht anfangen, auf der Tabelle rumzudraggen,
+ // aber Maus-Status nicht zuruecksetzen
+ return SC_CMD_IGNORE;
+ }
+ else
+ return FuPoor::Command(rCEvt);
+}
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL FuMarkRect::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FALSE;
+
+ switch ( rKEvt.GetKeyCode().GetCode() )
+ {
+ case KEY_ESCAPE:
+ // beenden
+ SFX_DISPATCHER().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ bReturn = TRUE;
+ break;
+ }
+
+ if (!bReturn)
+ {
+ bReturn = FuPoor::KeyInput(rKEvt);
+ }
+
+ return (bReturn);
+}
+
+/*************************************************************************
+|*
+|* Vor dem Scrollen Selektionsdarstellung ausblenden
+|*
+\************************************************************************/
+
+void FuMarkRect::ScrollStart()
+{
+}
+
+/*************************************************************************
+|*
+|* Nach dem Scrollen Selektionsdarstellung wieder anzeigen
+|*
+\************************************************************************/
+
+void FuMarkRect::ScrollEnd()
+{
+}
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuMarkRect::Activate()
+{
+ FuPoor::Activate();
+
+ // Markierung merken, bevor evtl. Tabelle umgeschaltet wird
+
+ ScViewData* pViewData = pViewShell->GetViewData();
+ ScMarkData& rMark = pViewData->GetMarkData();
+
+ if ( !rMark.IsMultiMarked() && !rMark.IsMarked() )
+ pViewShell->MarkDataArea( TRUE );
+
+ pViewData->GetMultiArea( aSourceRange ); // Mehrfachselektion erlaubt
+
+// pViewShell->Unmark();
+
+ ForcePointer(NULL);
+}
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuMarkRect::Deactivate()
+{
+ FuPoor::Deactivate();
+
+ if (bVisible)
+ {
+ // Hide ZoomRect
+ pViewShell->DrawMarkRect(aZoomRect);
+ bVisible = FALSE;
+ bStartDrag = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* Maus-Pointer umschalten
+|*
+\************************************************************************/
+
+void FuMarkRect::ForcePointer(const MouseEvent* pMEvt)
+{
+#ifdef VCL
+ pViewShell->SetActivePointer( Pointer( POINTER_CHART ) );
+#else
+ pViewShell->SetActivePointer( ScResId( RID_SCPTR_CHART ) );
+#endif
+}
+
+
+
+
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
new file mode 100644
index 000000000000..859a58c02caa
--- /dev/null
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -0,0 +1,550 @@
+/*************************************************************************
+ *
+ * $RCSfile: fupoor.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX ***
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX ***
+//#define _MSGBOX_HXX ***
+//#define _SYSDLG_HXX ***
+//#define _PRNDLG_HXX ***
+#define _COLDLG_HXX
+#define _TABDLG_HXX
+//#define _GDIMTF_HXX ***
+//#define _POLY_HXX ***
+#ifdef WIN
+#define _ACCEL_HXX
+#endif
+//#define _GRAPH_HXX ***
+#define _SOUND_HXX
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+#define _TABBAR_HXX
+#define _VALUESET_HXX
+#define _STDMENU_HXX
+#define _STDCTRL_HXX
+#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+//#define _SVTREELIST_HXX ***
+#define _FILTER_HXX
+//#define _SVLBOXITM_HXX ***
+//#define _SVTREEBOX_HXX ***
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+//#define _SFXINIMGR_HXX ***
+//#define _SFXCFGITEM_HXX ***
+//#define _SFX_PRINTER_HXX ***
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+// #define _SFXDOCINF_HXX ***
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX ***
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX ***
+//#define _SFXAPP_HXX ***
+//#define _SFX_BINDINGS_HXX ***
+#define _SFXDISPATCH_HXX
+//#define _SFXMSG_HXX ***
+//#define _SFXOBJFACE_HXX ***
+//#define _SFXREQUEST_HXX ***
+#define _SFXMACRO_HXX
+
+// SFX
+//#define _SFXAPPWIN_HXX ***
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX ***
+#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX ***
+//#define _SFX_CLIENTSH_HXX ***
+//#define _SFXDOCINF_HXX ***
+//#define _SFX_OBJFAC_HXX ***
+#define _SFX_DOCFILT_HXX
+//#define _SFXDOCFILE_HXX ***
+//#define _VIEWFAC_HXX ***
+#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX ***
+#define _MDIFRM_HXX
+#define _SFX_IPFRM_HXX
+#define _SFX_INTERNO_HXX
+
+
+//svdraw.hxx
+#define _SDR_NOVIEWMARKER
+#define _SDR_NODRAGMETHODS
+//#define _SDR_NOUNDO
+#define _SDR_NOXOUTDEV
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+#define _SDR_NOOBJECTS
+//#define _SDR_NOVIEWS
+
+//------------------------------------------------------------------------
+
+#include <svx/outliner.hxx>
+#include <svx/svditer.hxx>
+#include <svx/svdobj.hxx>
+#include <svx/svdpagv.hxx>
+
+#include "fupoor.hxx"
+#include "tabvwsh.hxx"
+#include "drawview.hxx"
+#include "detfunc.hxx"
+
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+FuPoor::FuPoor(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq) :
+ pViewShell(pViewSh),
+ pWindow(pWin),
+ pView(pView),
+ pDrDoc(pDoc),
+ aSfxRequest(rReq),
+ pDialog(NULL),
+ bIsInDragMode(FALSE)
+{
+ aScrollTimer.SetTimeoutHdl( LINK(this, FuPoor, ScrollHdl) );
+ aScrollTimer.SetTimeout(SELENG_AUTOREPEAT_INTERVAL);
+
+ aDragTimer.SetTimeoutHdl( LINK(this, FuPoor, DragTimerHdl) );
+ aDragTimer.SetTimeout(SELENG_DRAGDROP_TIMEOUT);
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuPoor::~FuPoor()
+{
+ aDragTimer.Stop();
+ aScrollTimer.Stop();
+
+ if (pDialog)
+ delete pDialog;
+}
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuPoor::Activate()
+{
+ if (pDialog)
+ {
+ pDialog->Show();
+ }
+}
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuPoor::Deactivate()
+{
+ aDragTimer.Stop();
+ aScrollTimer.Stop();
+
+ if (pDialog)
+ {
+ pDialog->Hide();
+ }
+}
+
+/*************************************************************************
+|*
+|* Scrollen bei Erreichen des Fensterrandes; wird von
+|* MouseMove aufgerufen
+|*
+\************************************************************************/
+
+void FuPoor::ForceScroll(const Point& aPixPos)
+{
+ aScrollTimer.Stop();
+
+ Size aSize = pWindow->GetSizePixel();
+ short dx = 0, dy = 0;
+
+ if ( aPixPos.X() <= 0 ) dx = -1;
+ if ( aPixPos.X() >= aSize.Width() ) dx = 1;
+ if ( aPixPos.Y() <= 0 ) dy = -1;
+ if ( aPixPos.Y() >= aSize.Height() ) dy = 1;
+
+ ScViewData* pViewData = pViewShell->GetViewData();
+ ScSplitPos eWhich = pViewData->GetActivePart();
+ if ( dx > 0 && pViewData->GetHSplitMode() == SC_SPLIT_FIX && WhichH(eWhich) == SC_SPLIT_LEFT )
+ {
+ pViewShell->ActivatePart( ( eWhich == SC_SPLIT_TOPLEFT ) ?
+ SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT );
+ dx = 0;
+ }
+ if ( dy > 0 && pViewData->GetVSplitMode() == SC_SPLIT_FIX && WhichV(eWhich) == SC_SPLIT_TOP )
+ {
+ pViewShell->ActivatePart( ( eWhich == SC_SPLIT_TOPLEFT ) ?
+ SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT );
+ dy = 0;
+ }
+
+ if ( dx != 0 || dy != 0 )
+ {
+ ScrollStart(); // Scrollaktion in abgeleiteter Klasse
+ pViewShell->ScrollLines(2*dx, 4*dy);
+ ScrollEnd();
+ aScrollTimer.Start();
+ }
+}
+
+/*************************************************************************
+|*
+|* Timer-Handler fuer Fensterscrolling
+|*
+\************************************************************************/
+
+IMPL_LINK_INLINE_START( FuPoor, ScrollHdl, Timer *, pTimer )
+{
+#ifdef VCL
+ Point aPosPixel = pWindow->GetPointerPosPixel();
+#else
+ Point aPosPixel = pWindow->ScreenToOutputPixel( Pointer::GetPosPixel() );
+#endif
+ MouseMove(MouseEvent(aPosPixel));
+ return 0;
+}
+IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer )
+
+/*************************************************************************
+|*
+|* String in Applikations-Statuszeile ausgeben
+|*
+\************************************************************************/
+
+// WriteStatus gibt's nicht mehr
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FALSE;
+
+ return(bReturn);
+}
+
+BYTE FuPoor::Command(const CommandEvent& rCEvt)
+{
+ if ( COMMAND_STARTDRAG == rCEvt.GetCommand() )
+ {
+ //!!! sollte Joe eigentlich machen:
+ // nur, wenn im Outliner was selektiert ist, darf
+ // Command TRUE zurueckliefern:
+
+ OutlinerView* pOutView = pView->GetTextEditOutlinerView();
+
+ if ( pOutView )
+ return pOutView->HasSelection() ? pView->Command(rCEvt,pWindow) : SC_CMD_NONE;
+ else
+ return pView->Command(rCEvt,pWindow);
+ }
+ else
+ return pView->Command(rCEvt,pWindow);
+}
+
+/*************************************************************************
+|*
+|* Cut object to clipboard
+|*
+\************************************************************************/
+
+void FuPoor::DoCut()
+{
+ if (pView)
+ {
+//! pView->DoCut(pWindow);
+ }
+}
+
+/*************************************************************************
+|*
+|* Copy object to clipboard
+|*
+\************************************************************************/
+
+void FuPoor::DoCopy()
+{
+ if (pView)
+ {
+//! pView->DoCopy(pWindow);
+ }
+}
+
+/*************************************************************************
+|*
+|* Paste object from clipboard
+|*
+\************************************************************************/
+
+void FuPoor::DoPaste()
+{
+ if (pView)
+ {
+//! pView->DoPaste(pWindow);
+ }
+}
+
+/*************************************************************************
+|*
+|* Timer-Handler fuer Drag&Drop
+|*
+\************************************************************************/
+
+IMPL_LINK( FuPoor, DragTimerHdl, Timer *, EMPTYARG )
+{
+ // ExecuteDrag (und das damit verbundene Reschedule) direkt aus dem Timer
+ // aufzurufen, bringt die VCL-Timer-Verwaltung durcheinander, wenn dabei
+ // (z.B. im Drop) wieder ein Timer gestartet wird (z.B. ComeBack-Timer der
+ // DrawView fuer Solid Handles / ModelHasChanged) - der neue Timer laeuft
+ // dann um die Dauer des Drag&Drop zu spaet ab.
+ // Darum Drag&Drop aus eigenem Event:
+
+ Application::PostUserEvent( LINK( this, FuPoor, DragHdl ) );
+ return 0;
+}
+
+IMPL_LINK( FuPoor, DragHdl, void *, EMPTYARG )
+{
+ SdrHdl* pHdl = pView->HitHandle(aMDPos, *pWindow);
+
+ if ( pHdl==NULL && pView->IsMarkedHit(aMDPos) )
+ {
+ pWindow->ReleaseMouse();
+ bIsInDragMode = TRUE;
+
+// pView->BeginDrag(pWindow, aMDPos);
+ pViewShell->GetScDrawView()->BeginDrag(pWindow, aMDPos);
+ }
+ return 0;
+}
+
+
+// Detektiv-Linie
+
+BOOL FuPoor::IsDetectiveHit( const Point& rLogicPos )
+{
+ SdrPageView* pPV = pView->GetPageViewPvNum(0);
+ if (!pPV)
+ return FALSE;
+
+ BOOL bFound = FALSE;
+ SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT );
+ SdrObject* pObject = aIter.Next();
+ while (pObject && !bFound)
+ {
+ if (ScDetectiveFunc::IsNonAlienArrow( pObject ))
+ {
+ USHORT nHitLog = (USHORT) pWindow->PixelToLogic(
+ Size(pView->GetHitTolerancePixel(),0)).Width();
+ if ( pObject->IsHit( rLogicPos, nHitLog ) )
+ bFound = TRUE;
+ }
+
+ pObject = aIter.Next();
+ }
+ return bFound;
+}
+
+void FuPoor::StopDragTimer()
+{
+ if (aDragTimer.IsActive() )
+ aDragTimer.Stop();
+}
+
+
+
+
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
new file mode 100644
index 000000000000..ca9488fe9c78
--- /dev/null
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -0,0 +1,538 @@
+/*************************************************************************
+ *
+ * $RCSfile: fusel.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+
+// INCLUDE ---------------------------------------------------------------
+
+#include <svx/eeitem.hxx>
+#define ITEMID_FIELD EE_FEATURE_FIELD
+
+#include <svx/flditem.hxx>
+#include <svx/svdoole2.hxx>
+#include <svx/svdotext.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/ipfrm.hxx>
+#include <so3/ipobj.hxx>
+#include <svtools/imapobj.hxx>
+#include <svx/svdview.hxx>
+#include <svx/svdouno.hxx>
+#include <svx/svdpagv.hxx>
+
+
+
+#include "fusel.hxx"
+#include "sc.hrc"
+#include "fudraw.hxx"
+#include "futext.hxx"
+#include "tabvwsh.hxx"
+#include "drawpage.hxx"
+#include "globstr.hrc"
+#include "drwlayer.hxx"
+
+// -----------------------------------------------------------------------
+
+// Maximal erlaubte Mausbewegung um noch Drag&Drop zu starten
+//! fusel,fuconstr,futext - zusammenfassen!
+#define SC_MAXDRAGMOVE 3
+
+// -----------------------------------------------------------------------
+
+#ifdef WNT
+#pragma optimize ( "", off )
+#endif
+
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+FuSelection::FuSelection(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq ) :
+ FuDraw(pViewSh, pWin, pView, pDoc, rReq),
+ bVCAction(FALSE)
+{
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuSelection::~FuSelection()
+{
+}
+
+BYTE FuSelection::Command(const CommandEvent& rCEvt)
+{
+ // special code for non-VCL OS2/UNX removed
+
+ return FuDraw::Command( rCEvt );
+}
+
+/*************************************************************************
+|*
+|* MouseButtonDown-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ if ( pView->IsAction() )
+ {
+ if ( rMEvt.IsRight() )
+ pView->BckAction();
+ return TRUE;
+ }
+
+ bVCAction = FALSE;
+ bIsInDragMode = FALSE; // irgendwo muss es ja zurueckgesetzt werden (#50033#)
+
+ BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+
+ aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
+
+ if ( rMEvt.IsLeft() )
+ {
+ SdrHdl* pHdl = pView->HitHandle(aMDPos, *pWindow);
+ SdrObject* pObj;
+ SdrPageView* pPV;
+
+ if ( pHdl!=NULL || pView->IsMarkedHit(aMDPos) )
+ {
+ aDragTimer.Start();
+ pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
+ bReturn = TRUE;
+ }
+ else
+ {
+ BOOL bAlt = rMEvt.IsMod2();
+ if ( !bAlt && pView->PickObj(aMDPos, pObj, pPV, SDRSEARCH_PICKMACRO) )
+ {
+ pView->BegMacroObj(aMDPos, pObj, pPV, pWindow);
+ bReturn = TRUE;
+ }
+ else
+ {
+ // URL / ImageMap
+
+ SdrViewEvent aVEvt;
+ if ( !bAlt &&
+ pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ) != SDRHIT_NONE &&
+ aVEvt.pObj != NULL )
+ {
+ if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) ) // ImageMap
+ {
+ const IMapObject* pIMapObj =
+ ScDrawLayer::GetHitIMapObject( aVEvt.pObj, aMDPos, *pWindow );
+ if ( pIMapObj && pIMapObj->GetURL().Len() )
+ {
+ ScGlobal::OpenURL( pIMapObj->GetURL(), pIMapObj->GetTarget() );
+
+ pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() );
+ return TRUE; // kein CaptureMouse etc.
+ }
+ }
+ if ( aVEvt.eEvent == SDREVENT_EXECUTEURL && aVEvt.pURLField ) // URL
+ {
+ ScGlobal::OpenURL( aVEvt.pURLField->GetURL(),
+ aVEvt.pURLField->GetTargetFrame() );
+
+ pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() );
+ return TRUE; // kein CaptureMouse etc.
+ }
+ }
+
+ // Markieren
+
+ if ( !rMEvt.IsShift() )
+ pView->UnmarkAll();
+
+ if ( pView->MarkObj(aMDPos, -2, FALSE, rMEvt.IsMod1()) )
+ {
+ //*********************************************************
+ //Objekt verschieben
+ //********************************************************
+ if (pView->IsMarkedHit(aMDPos))
+ {
+ aDragTimer.Start();
+ pHdl=pView->HitHandle(aMDPos, *pWindow);
+ pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
+ bReturn = TRUE;
+ }
+ else // Objekt am Rand getroffen
+ if (pViewShell->IsDrawSelMode())
+ bReturn = TRUE;
+ }
+ else
+ {
+ // nichts getroffen
+
+ if (pViewShell->IsDrawSelMode())
+ {
+ //*********************************************************
+ //Objekt selektieren
+ //********************************************************
+ pView->BegMarkObj(aMDPos, (OutputDevice*) NULL);
+ bReturn = TRUE;
+ }
+ }
+ }
+ }
+
+ if ( !bReturn )
+ bReturn = TestComment( pView->GetPageViewPvNum(0), aMDPos );
+ }
+
+ if (!bIsInDragMode)
+ {
+ if (!bVCAction) // VC rufen selber CaptureMouse
+ pWindow->CaptureMouse();
+ ForcePointer(&rMEvt);
+ }
+
+ return bReturn;
+}
+
+/*************************************************************************
+|*
+|* MouseMove-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FuDraw::MouseMove(rMEvt);
+
+ if (aDragTimer.IsActive() )
+ {
+ Point aOldPixel = pWindow->LogicToPixel( aMDPos );
+ Point aNewPixel = rMEvt.GetPosPixel();
+ if ( Abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
+ Abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
+ aDragTimer.Stop();
+ }
+
+ if ( pView->IsAction() )
+ {
+ Point aPix(rMEvt.GetPosPixel());
+ Point aPnt(pWindow->PixelToLogic(aPix));
+
+ ForceScroll(aPix);
+ pView->MovAction(aPnt);
+ bReturn = TRUE;
+ }
+
+ // Ein VCControl ist aktiv
+ // Event an den Manager weiterleiten
+ if( bVCAction )
+ {
+ // GetSbxForm gibts nicht mehr - Basic-Controls sind tot
+ //SdrPageView* pPgView = pView->GetPageViewPvNum(0);
+ //ScDrawPage* pPage = (ScDrawPage*)pPgView->GetPage();
+ //VCSbxForm* pForm = (VCSbxForm*)(SbxObject*)(pPage->GetSbxForm());
+ //((VCManager*)(pForm->GetVCContainer()))->
+ // MouseMove( pWindow, rMEvt );
+ bReturn = TRUE;
+ }
+
+ ForcePointer(&rMEvt);
+
+ return (bReturn);
+}
+
+/*************************************************************************
+|*
+|* MouseButtonUp-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FuDraw::MouseButtonUp(rMEvt);
+// BOOL bOle = pViewShell->GetViewData()->IsOle();
+ BOOL bOle = pViewShell->GetViewFrame()->ISA(SfxInPlaceFrame);
+
+ if (aDragTimer.IsActive() )
+ {
+ aDragTimer.Stop();
+ }
+
+ Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+
+ if ( rMEvt.IsLeft() )
+ {
+ if ( pView->IsDragObj() )
+ {
+ /******************************************************************
+ * Objekt wurde verschoben
+ ******************************************************************/
+ pView->EndDragObj( rMEvt.IsMod1() );
+ pView->ForceMarkedToAnotherPage();
+ bReturn = TRUE;
+ }
+ else if (pView->IsAction() )
+ {
+ pView->EndAction();
+ if ( pView->HasMarkedObj() )
+ bReturn = TRUE;
+ }
+ }
+
+/*
+ if ( pView->IsObjEdit() )
+ {
+ BOOL bShowCursor = TRUE;
+//! pOutlinerView = pView->GetOutlinerView(pWindow, bShowCursor);
+ bReturn = TRUE;
+ }
+*/
+ /**************************************************************************
+ * Ggf. OLE-Objekt beruecksichtigen
+ **************************************************************************/
+ SfxInPlaceClient* pIPClient = pViewShell->GetIPClient();
+
+ if (pIPClient)
+ {
+ if ( pIPClient->IsInPlaceActive() )
+ {
+ pIPClient->GetProtocol().Reset2Open();
+// SFX_APP()->SetDispatcher(pViewShell->GetViewFrame()->GetDispatcher() );
+ SFX_APP()->SetViewFrame(pViewShell->GetViewFrame()); // 242.a: ???
+ }
+ }
+
+ USHORT nClicks = rMEvt.GetClicks();
+ if ( nClicks == 2 && rMEvt.IsLeft() )
+ {
+ if ( pView->HasMarkedObj() )
+ {
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ SdrMark* pMark = rMarkList.GetMark(0);
+ SdrObject* pObj = pMark->GetObj();
+
+ // #43984# aktivieren nur, wenn die Maus auch (noch) ueber dem
+ // selektierten Objekt steht
+
+ SdrViewEvent aVEvt;
+ SdrHitKind eHit = pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt );
+ if ( eHit != SDRHIT_NONE && aVEvt.pObj == pObj )
+ {
+ UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+
+ //
+ // OLE: aktivieren
+ //
+
+ if (nSdrObjKind == OBJ_OLE2)
+ {
+ if (!bOle)
+ {
+ SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*) pObj)->GetObjRef();
+ if (aIPObj.Is())
+ {
+ pView->HideMarkHdl(NULL);
+ pViewShell->ActivateObject( (SdrOle2Obj*) pObj, 0 );
+ }
+ }
+ }
+
+ //
+ // Text: editieren
+ // #49458# nicht bei Uno-Controls
+ //
+ else if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) )
+ {
+ SFX_DISPATCHER().Execute(SID_DRAW_TEXT, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD);
+
+ // jetzt den erzeugten FuText holen und in den EditModus setzen
+ FuPoor* pPoor = pViewShell->GetViewData()->GetView()->GetDrawFuncPtr();
+ if ( pPoor && pPoor->GetSlotID() == SID_DRAW_TEXT ) // hat keine RTTI
+ {
+ FuText* pText = (FuText*)pPoor;
+ Point aMousePixel = rMEvt.GetPosPixel();
+ pText->SetInEditMode( pObj, &aMousePixel );
+ }
+ bReturn = TRUE;
+ }
+ }
+ }
+ }
+ else if ( TestDetective( pView->GetPageViewPvNum(0), aPnt ) )
+ bReturn = TRUE;
+ }
+
+ // Ein VCControl ist aktiv
+ // Event an den Manager weiterleiten
+ if( bVCAction )
+ {
+ // GetSbxForm gibts nicht mehr - Basic-Controls sind tot
+ //SdrPageView* pPgView = pView->GetPageViewPvNum(0);
+ //ScDrawPage* pPage = (ScDrawPage*)pPgView->GetPage();
+ //VCSbxForm* pForm = (VCSbxForm*)(SbxObject*)(pPage->GetSbxForm());
+ //((VCManager*)(pForm->GetVCContainer()))->
+ // MouseButtonUp( pWindow, rMEvt );
+ pView->ShowMarkHdl( pWindow );
+ bVCAction = FALSE;
+ bReturn = TRUE;
+ }
+
+ ForcePointer(&rMEvt);
+
+ pWindow->ReleaseMouse();
+
+ // Command-Handler fuer Kontext-Menue kommt erst nach MouseButtonUp,
+ // darum hier die harte IsLeft-Abfrage
+ if ( !bReturn && rMEvt.IsLeft() )
+ if (pViewShell->IsDrawSelMode())
+ SFX_DISPATCHER().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+
+ return (bReturn);
+}
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL FuSelection::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FALSE;
+
+ if (!bReturn)
+ {
+ bReturn = FuDraw::KeyInput(rKEvt);
+ }
+
+ return(bReturn);
+}
+
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuSelection::Activate()
+{
+/*
+ SdrDragMode eMode;
+ switch (aSfxRequest.GetSlot() )
+ {
+ case SID_OBJECT_SELECT:
+ eMode = SDRDRAG_MOVE;
+ break;
+ case SID_OBJECT_ROTATE:
+ eMode = SDRDRAG_ROTATE;
+ break;
+ case SID_OBJECT_MIRROR:
+ eMode = SDRDRAG_MIRROR;
+ break;
+ }
+ pView->SetDragMode(eMode);
+*/
+ FuDraw::Activate();
+}
+
+
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuSelection::Deactivate()
+{
+ /**************************************************************************
+ * Hide Cursor
+ **************************************************************************/
+ BOOL bShowCursor = FALSE;
+//! pOutlinerView = pView->GetOutlinerView(pWindow, bShowCursor);
+
+// pView->SetDragMode(SDRDRAG_MOVE);
+ FuDraw::Deactivate();
+}
+
+
+#ifdef WNT
+#pragma optimize ( "", on )
+#endif
+
+
+
+
+
diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx
new file mode 100644
index 000000000000..f9c7f5897f33
--- /dev/null
+++ b/sc/source/ui/drawfunc/fusel2.cxx
@@ -0,0 +1,417 @@
+/*************************************************************************
+ *
+ * $RCSfile: fusel2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+//#define _STATUS_HXX ***
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+// SFX
+//#define _SFXAPPWIN_HXX ***
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX
+//#define _SFX_CLIENTSH_HXX
+//#define _SFXDOCINF_HXX
+//#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+//#define _SFXDOCFILE_HXX ***
+//define _VIEWFAC_HXX
+//#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX
+//#define _MDIFRM_HXX ***
+#define _SFX_IPFRM_HXX
+//#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+//#define _BASEDLGS_HXX ***
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+//#define _SFXDOCTEMPL_HXX ***
+//#define _SFXDOCTDLG_HXX ***
+//#define _SFX_TEMPLDLG_HXX ***
+//#define _SFXNEW_HXX ***
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+#define _ARGS_HXX
+//#define _SFXPOOLITEM_HXX
+//#define _SFXINTITEM_HXX
+//#define _SFXENUMITEM_HXX
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX
+#define _SFXPTITEM_HXX
+#define _SFXRECTITEM_HXX
+//#define _SFXITEMPOOL_HXX
+//#define _SFXITEMSET_HXX
+#define _SFXITEMITER_HXX
+#define _SFX_WHITER_HXX
+#define _SFXPOOLCACH_HXX
+//#define _AEITEM_HXX
+#define _SFXRNGITEM_HXX
+//#define _SFXSLSTITM_HXX
+//#define _SFXSTYLE_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXX
+//#define _XOUTX_HXX
+//#define _XPOOL_HXX
+#define _XTABLE_HXX //???
+
+//svdraw.hxx
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+#define _SDR_NOOBJECTS //???
+//#define _SDR_NOVIEWS ***
+
+//#define SI_NOITEMS
+//#define SI_NODRW
+#define _SI_NOSBXCONTROLS
+//#define _VCATTR_HXX
+#define _VCONT_HXX
+//#define _VCSBX_HXX
+#define _SI_NOOTHERFORMS
+#define _VCTRLS_HXX
+//#define _VCDRWOBJ_HXX
+#define _SI_NOCONTROL
+#define _SETBRW_HXX
+#define _VCBRW_HXX
+#define _SI_NOSBXCONTROLS
+//#define _SIDLL_HXX ***
+
+
+
+
+#define _SVX_DAILDLL_HXX
+#define _SVX_HYPHEN_HXX
+#define _SVX_IMPGRF_HXX
+#define _SVX_OPTITEMS_HXX
+#define _SVX_OPTGERL_HXX
+#define _SVX_OPTSAVE_HXX
+#define _SVX_OPTSPELL_HXX
+#define _SVX_OPTPATH_HXX
+#define _SVX_OPTLINGU_HXX
+#define _SVX_RULER_HXX
+#define _SVX_RULRITEM_HXX
+#define _SVX_SPLWRAP_HXX
+#define _SVX_SPLDLG_HXX
+#define _SVX_THESDLG_HXX
+
+
+// INCLUDE ---------------------------------------------------------------
+
+#include <svx/svditer.hxx>
+#include <svx/svdocapt.hxx>
+#include <svx/svdpagv.hxx>
+#include <sfx2/dispatch.hxx>
+#include <svx/svdview.hxx>
+
+#include "fusel.hxx"
+#include "tabvwsh.hxx"
+#include "document.hxx"
+#include "detfunc.hxx"
+#include "futext.hxx"
+#include "sc.hrc"
+
+// -----------------------------------------------------------------------
+
+inline long Diff( const Point& rP1, const Point& rP2 )
+{
+ long nX = rP1.X() - rP2.X();
+ if (nX<0) nX = -nX;
+ long nY = rP1.Y() - rP2.Y();
+ if (nY<0) nY = -nY;
+ return nX+nY;
+}
+
+BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
+{
+ if (!pPV)
+ return FALSE;
+
+ BOOL bFound = FALSE;
+ SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT );
+ SdrObject* pObject = aIter.Next();
+ while (pObject && !bFound)
+ {
+ if (ScDetectiveFunc::IsNonAlienArrow( pObject ))
+ {
+ USHORT nHitLog = (USHORT) pWindow->PixelToLogic(
+ Size(pView->GetHitTolerancePixel(),0)).Width();
+ if ( pObject->IsHit( rPos, nHitLog ) )
+ {
+ ScViewData* pViewData = pViewShell->GetViewData();
+ ScSplitPos ePos = pViewShell->FindWindow( pWindow );
+ Point aLineStart = pObject->GetPoint(0);
+ Point aLineEnd = pObject->GetPoint(1);
+ Point aPixel = pWindow->LogicToPixel( aLineStart );
+ short nStartCol;
+ short nStartRow;
+ pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nStartCol, nStartRow );
+ aPixel = pWindow->LogicToPixel( aLineEnd );
+ short nEndCol;
+ short nEndRow;
+ pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nEndCol, nEndRow );
+ short nCurX = (short) pViewData->GetCurX();
+ short nCurY = (short) pViewData->GetCurY();
+ BOOL bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) );
+ if ( nCurX == nStartCol && nCurY == nStartRow )
+ bStart = FALSE;
+ else if ( nCurX == nEndCol && nCurY == nEndRow )
+ bStart = TRUE;
+
+ short nDifX;
+ short nDifY;
+ if ( bStart )
+ {
+ nDifX = nStartCol - nCurX;
+ nDifY = nStartRow - nCurY;
+ }
+ else
+ {
+ nDifX = nEndCol - nCurX;
+ nDifY = nEndRow - nCurY;
+ }
+ pViewShell->MoveCursorRel( nDifX, nDifY, SC_FOLLOW_JUMP, FALSE );
+
+ bFound = TRUE;
+ }
+ }
+
+ pObject = aIter.Next();
+ }
+ return bFound;
+}
+
+BOOL FuSelection::TestComment( SdrPageView* pPV, const Point& rPos )
+{
+ if (!pPV)
+ return FALSE;
+
+ BOOL bFound = FALSE;
+ SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT );
+ SdrObject* pObject = aIter.Next();
+ while (pObject && !bFound)
+ {
+ if ( pObject->GetLayer()==SC_LAYER_INTERN && pObject->ISA(SdrCaptionObj)
+ && pObject->GetLogicRect().IsInside( rPos ) )
+ {
+// SdrHdl* pHdl = pView->HitHandle( rPos, *pWindow );
+// BOOL bDrag = pView->BegDragObj( rPos, NULL, pHdl );
+
+ SFX_DISPATCHER().Execute(SID_DRAW_NOTEEDIT, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD);
+ // jetzt den erzeugten FuText holen und in den EditModus setzen
+ FuPoor* pPoor = pViewShell->GetViewData()->GetView()->GetDrawFuncPtr();
+ if ( pPoor && pPoor->GetSlotID() == SID_DRAW_NOTEEDIT ) // hat keine RTTI
+ {
+ FuText* pText = (FuText*)pPoor;
+ Point aPixel = pWindow->LogicToPixel( rPos );
+ pText->SetInEditMode( pObject, &aPixel );
+ }
+
+ bFound = TRUE;
+ }
+
+ pObject = aIter.Next();
+ }
+
+ return bFound;
+}
+
+//==================================================================
+
+
+
+
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
new file mode 100644
index 000000000000..2f1bc5c4b079
--- /dev/null
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -0,0 +1,1001 @@
+/*************************************************************************
+ *
+ * $RCSfile: futext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+#define _STATUS_HXX
+#define _SVTCTRL3_HXX
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _FILDLG_HXX ***
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX ***
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+//#define _SVTREELIST_HXX
+#define _FILTER_HXX
+//#define _SVLBOXITM_HXX
+//#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+//#define _SFXINIMGR_HXX
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+//#define _SFX_BINDINGS_HXX
+//#define _SFXDISPATCH_HXX
+//#define _SFXMSG_HXX
+//#define _SFXOBJFACE_HXX
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+// SFX
+//#define _SFXAPPWIN_HXX
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX
+//#define _SFX_CLIENTSH_HXX
+//#define _SFXDOCINF_HXX
+//#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+//#define _SFXDOCFILE_HXX
+//define _VIEWFAC_HXX
+//#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX
+//#define _MDIFRM_HXX
+#define _SFX_IPFRM_HXX
+//#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+//#define _BASEDLGS_HXX
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+//#define _SFXDOCTEMPL_HXX
+//#define _SFXDOCTDLG_HXX
+//#define _SFX_TEMPLDLG_HXX
+//#define _SFXNEW_HXX
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX **
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+#define _ARGS_HXX
+//#define _SFXPOOLITEM_HXX
+//#define _SFXINTITEM_HXX
+//#define _SFXENUMITEM_HXX
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX
+#define _SFXPTITEM_HXX
+#define _SFXRECTITEM_HXX
+//#define _SFXITEMPOOL_HXX
+//#define _SFXITEMSET_HXX
+#define _SFXITEMITER_HXX
+#define _SFX_WHITER_HXX
+#define _SFXPOOLCACH_HXX
+//#define _AEITEM_HXX
+#define _SFXRNGITEM_HXX
+//#define _SFXSLSTITM_HXX
+//#define _SFXSTYLE_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXX
+//#define _XOUTX_HXX
+//#define _XPOOL_HXX
+//#define _XTABLE_HXX
+
+//svdraw.hxx
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+//#define _SDR_NOOBJECTS
+//#define _SDR_NOVIEWS
+
+//#define SI_NOITEMS
+//#define SI_NODRW
+#define _SI_NOSBXCONTROLS
+#define _VCATTR_HXX
+#define _VCONT_HXX
+//#define _VCSBX_HXX ***
+#define _SI_NOOTHERFORMS
+#define _VCTRLS_HXX
+//#define _VCDRWOBJ_HXX ***
+#define _SI_NOCONTROL
+#define _SETBRW_HXX
+#define _VCBRW_HXX
+#define _SI_NOSBXCONTROLS
+#define _SIDLL_HXX
+
+//------------------------------------------------------------------
+
+#include <svx/svddef.hxx>
+#include <svx/svdoutl.hxx>
+#include <svx/sdtaaitm.hxx>
+#include <svx/sdtacitm.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svdview.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <svx/svxids.hrc>
+
+#include "futext.hxx"
+#include "drwlayer.hxx"
+#include "sc.hrc"
+#include "tabvwsh.hxx"
+
+// Maximal erlaubte Mausbewegung um noch Drag&Drop zu starten
+//! fusel,fuconstr,futext - zusammenfassen!
+#define SC_MAXDRAGMOVE 3
+
+//------------------------------------------------------------------
+
+void lcl_InvalidateAttribs()
+{
+ SfxBindings& rBindings = SFX_BINDINGS();
+
+ rBindings.Invalidate( SID_ATTR_CHAR_WEIGHT );
+ rBindings.Invalidate( SID_ATTR_CHAR_POSTURE );
+ rBindings.Invalidate( SID_ATTR_CHAR_UNDERLINE );
+ rBindings.Invalidate( SID_ULINE_VAL_NONE );
+ rBindings.Invalidate( SID_ULINE_VAL_SINGLE );
+ rBindings.Invalidate( SID_ULINE_VAL_DOUBLE );
+ rBindings.Invalidate( SID_ULINE_VAL_DOTTED );
+ rBindings.Invalidate( SID_ATTR_CHAR_COLOR );
+ rBindings.Invalidate( SID_ATTR_CHAR_FONT );
+ rBindings.Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
+ rBindings.Invalidate( SID_ATTR_PARA_ADJUST_LEFT );
+ rBindings.Invalidate( SID_ATTR_PARA_ADJUST_CENTER );
+ rBindings.Invalidate( SID_ATTR_PARA_ADJUST_RIGHT );
+ rBindings.Invalidate( SID_ATTR_PARA_ADJUST_BLOCK );
+ rBindings.Invalidate( SID_ATTR_PARA_LINESPACE_10 );
+ rBindings.Invalidate( SID_ATTR_PARA_LINESPACE_15 );
+ rBindings.Invalidate( SID_ATTR_PARA_LINESPACE_20 );
+ rBindings.Invalidate( SID_SET_SUPER_SCRIPT );
+ rBindings.Invalidate( SID_SET_SUB_SCRIPT );
+ rBindings.Invalidate( SID_HYPERLINK_GETLINK );
+}
+
+/*************************************************************************
+|*
+|* Basisklasse fuer Textfunktionen
+|*
+\************************************************************************/
+
+FuText::FuText(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView,
+ SdrModel* pDoc, SfxRequest& rReq) :
+ FuConstruct(pViewSh, pWin, pView, pDoc, rReq),
+ pTextObj(NULL)
+{
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+FuText::~FuText()
+{
+// StopEditMode(); // in Deactivate !
+}
+
+/*************************************************************************
+|*
+|* MouseButtonDown-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FALSE;
+
+ if ( pView->MouseButtonDown(rMEvt, pWindow) )
+ return (TRUE); // Event von der SdrView ausgewertet
+
+ if ( pView->IsTextEdit() )
+ {
+ StopEditMode(); // Danebengeklickt, Ende mit Edit
+ pView->SetCreateMode();
+ }
+
+ aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
+
+ if ( rMEvt.IsLeft() )
+ {
+ SdrHdl* pHdl = pView->HitHandle(aMDPos, *pWindow);
+
+ ULONG nHdlNum = pView->GetHdlNum(pHdl);
+
+ if (pHdl != NULL)
+ {
+ if (pView->HasMarkablePoints() && pView->IsPointMarkable(*pHdl))
+ {
+ BOOL bPointMarked=pView->IsPointMarked(*pHdl);
+
+ if ( rMEvt.IsShift() )
+ {
+ if (!bPointMarked)
+ {
+ pView->MarkPoint(*pHdl);
+ }
+ else
+ {
+ pView->UnmarkPoint(*pHdl);
+ }
+ }
+ else
+ {
+ if (!bPointMarked)
+ {
+ pView->UnmarkAllPoints();
+ pView->MarkPoint(*pHdl);
+ }
+ }
+ pHdl=pView->GetHdl(nHdlNum);
+ }
+ }
+
+ SdrObject* pObj;
+ SdrPageView* pPV;
+
+ if ( pHdl != NULL || pView->IsMarkedHit(aMDPos) )
+ {
+ if (pHdl == NULL &&
+// pView->TakeTextEditObject(aMDPos, pObj, pPV) )
+ pView->PickObj(aMDPos, pObj, pPV, SDRSEARCH_PICKTEXTEDIT) )
+ {
+ SdrOutliner* pO = MakeOutliner();
+ //!?? ohne uebergebenen Outliner stimmen die Defaults nicht ???!?
+ if ( pView->BegTextEdit(pObj, pPV, pWindow, (FASTBOOL)TRUE, pO) )
+ {
+ // EditEngine-UndoManager anmelden
+ pViewShell->SetDrawTextUndo( &pO->GetUndoManager() );
+
+ OutlinerView* pOLV = pView->GetTextEditOutlinerView();
+ if ( pOLV->MouseButtonDown(rMEvt) )
+ return (TRUE); // Event an den Outliner
+ }
+ }
+ else
+ {
+ aDragTimer.Start();
+ pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
+ }
+ }
+ else
+ {
+ BOOL bMacro = FALSE;
+
+// if (bMacro && pView->TakeMacroObject(aMDPos,pObj,pPV))
+ if (bMacro && pView->PickObj(aMDPos, pObj, pPV, SDRSEARCH_PICKMACRO) )
+
+ {
+ pView->BegMacroObj(aMDPos,pObj,pPV,pWindow);
+ }
+ else
+ {
+ if (pView->IsEditMode())
+ {
+ BOOL bPointMode=pView->HasMarkablePoints();
+
+ if (!rMEvt.IsShift())
+ {
+ if (bPointMode)
+ {
+ pView->UnmarkAllPoints();
+ }
+ else
+ {
+ pView->UnmarkAll();
+ }
+
+ pView->SetDragMode(SDRDRAG_MOVE);
+ SfxBindings& rBindings = SFX_BINDINGS();
+ rBindings.Invalidate( SID_OBJECT_ROTATE );
+ rBindings.Invalidate( SID_OBJECT_MIRROR );
+ pHdl=pView->GetHdl(nHdlNum);
+ }
+
+ if ( pView->MarkObj(aMDPos, -2, FALSE, rMEvt.IsMod1()) )
+ {
+ aDragTimer.Start();
+
+ pHdl=pView->HitHandle(aMDPos,*pWindow);
+
+ if (pHdl!=NULL)
+ {
+ pView->MarkPoint(*pHdl);
+ pHdl=pView->GetHdl(nHdlNum);
+ }
+
+ pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
+ }
+ else
+ {
+ if (bPointMode)
+ {
+ pView->BegMarkPoints(aMDPos, (OutputDevice*) NULL);
+ }
+ else
+ {
+ pView->BegMarkObj(aMDPos, (OutputDevice*) NULL);
+ }
+ }
+ }
+ else if (aSfxRequest.GetSlot() == SID_DRAW_NOTEEDIT )
+ {
+ // Notizen editieren -> keine neuen Textobjekte erzeugen,
+ // stattdessen Textmodus verlassen
+
+ SFX_DISPATCHER().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ }
+ else
+ {
+ /**********************************************************
+ * Objekt erzeugen
+ **********************************************************/
+ pView->BegCreateObj(aMDPos, (OutputDevice*) NULL);
+ }
+ }
+ }
+ }
+
+ if (!bIsInDragMode)
+ {
+ pWindow->CaptureMouse();
+// ForcePointer(&rMEvt);
+ lcl_InvalidateAttribs();
+ }
+
+ pViewShell->SetActivePointer(pView->GetPreferedPointer(
+ pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow ));
+
+// return (bReturn);
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* MouseMove-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuText::MouseMove(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FALSE;
+
+// pViewShell->SetActivePointer(aNewPointer);
+
+ pViewShell->SetActivePointer(pView->GetPreferedPointer(
+ pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow ));
+
+ if (aDragTimer.IsActive() )
+ {
+ Point aOldPixel = pWindow->LogicToPixel( aMDPos );
+ Point aNewPixel = rMEvt.GetPosPixel();
+ if ( Abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
+ Abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
+ aDragTimer.Stop();
+ }
+
+ if ( pView->MouseMove(rMEvt, pWindow) )
+ return (TRUE); // Event von der SdrView ausgewertet
+
+ if ( pView->IsAction() )
+ {
+/* aNewPointer = Pointer(POINTER_TEXT);
+ pViewShell->SetActivePointer(aNewPointer);
+*/
+ Point aPix(rMEvt.GetPosPixel());
+ Point aPnt(pWindow->PixelToLogic(aPix));
+
+ ForceScroll(aPix);
+ pView->MovAction(aPnt);
+ }
+
+// ForcePointer(&rMEvt);
+
+ return (bReturn);
+}
+
+/*************************************************************************
+|*
+|* MouseButtonUp-event
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ BOOL bReturn = FALSE;
+
+ if (aDragTimer.IsActive() )
+ {
+ aDragTimer.Stop();
+ }
+
+ lcl_InvalidateAttribs();
+
+ Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+
+ if ( pView->MouseButtonUp(rMEvt, pWindow) )
+ return (TRUE); // Event von der SdrView ausgewertet
+
+ if ( pView->IsDragObj() )
+ {
+ pView->EndDragObj( rMEvt.IsShift() );
+ pView->ForceMarkedToAnotherPage();
+ }
+ else if ( pView->IsCreateObj() )
+ {
+ if (rMEvt.IsLeft())
+ {
+ pView->EndCreateObj(SDRCREATE_FORCEEND);
+ if (aSfxRequest.GetSlot() == SID_DRAW_TEXT_MARQUEE)
+ {
+ // Lauftext-Objekt erzeugen?
+
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if (rMarkList.GetMark(0))
+ {
+ SdrObject* pObj = rMarkList.GetMark(0)->GetObj();
+
+ // die fuer das Scrollen benoetigten Attribute setzen
+ SfxItemSet aItemSet( pDrDoc->GetItemPool(),
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
+
+ aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
+ aItemSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
+ aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
+ aItemSet.Put( SdrTextAniCountItem( 1 ) );
+ aItemSet.Put( SdrTextAniAmountItem(
+ (INT16)pWindow->PixelToLogic(Size(2,1)).Width()) );
+ pObj->SetAttributes(aItemSet, FALSE);
+ }
+ }
+ SetInEditMode();
+
+ // Modus verlassen bei einzelnem Klick
+ // (-> fuconstr)
+
+ if ( !pView->HasMarkedObj() )
+ {
+ pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1());
+
+ if ( pView->HasMarkedObj() )
+ SFX_DISPATCHER().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ else
+ SFX_DISPATCHER().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ }
+ }
+ }
+ else if ( pView->IsAction() )
+ {
+ pView->EndAction();
+ }
+
+/* aNewPointer = Pointer(POINTER_TEXT);
+ pViewShell->SetActivePointer(aNewPointer);
+*/
+ ForcePointer(&rMEvt);
+ pWindow->ReleaseMouse();
+
+ if ( !pView->HasMarkedObj() )
+ {
+ SdrObject* pObj;
+ SdrPageView* pPV;
+
+ if ( pView->PickObj(aPnt, pObj, pPV) )
+ {
+ if ( pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1()) )
+ {
+ UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+
+ if (nSdrObjKind != OBJ_TEXT &&
+ nSdrObjKind != OBJ_TITLETEXT &&
+ nSdrObjKind != OBJ_OUTLINETEXT &&
+ ! pObj->ISA(SdrTextObj) )
+ {
+// SFX_DISPATCHER().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
+ }
+ }
+ }
+ }
+
+ return (bReturn);
+}
+
+/*************************************************************************
+|*
+|* Maus-Pointer umschalten
+|*
+\************************************************************************/
+
+void FuText::ForcePointer(const MouseEvent* pMEvt)
+{
+ pViewShell->SetActivePointer( aNewPointer );
+
+/*
+ if ( !pView->IsAction() )
+ {
+ Point aPnt(pWindow->PixelToLogic( pWindow->ScreenToOutputPixel(
+ Pointer::GetPosPixel() ) ) );
+ SdrHdl* pHdl=pView->HitHandle(aPnt, *pWindow);
+
+ if (pHdl!=NULL)
+ {
+ pViewShell->SetActivePointer(pHdl->GetPointer() );
+ }
+ else
+ {
+ SdrObject* pObj;
+ SdrPageView* pPV;
+
+ if ( pView->IsMarkedHit(aPnt) )
+ {
+ if ( pView->TakeTextEditObject(aPnt, pObj, pPV) )
+ {
+ pViewShell->SetActivePointer(Pointer(POINTER_TEXT));
+ }
+ else
+ {
+ pViewShell->SetActivePointer(Pointer(POINTER_MOVE));
+ }
+ }
+ else
+ {
+// if ( pView->TakeMacroObject(aPnt, pObj, pPV) )
+ if ( pView->PickObj(aPnt, pObj, pPV, SDRSEARCH_PICKMACRO) )
+ {
+ pViewShell->SetActivePointer( pObj->GetMacroPointer() );
+ }
+ else
+ {
+ pViewShell->SetActivePointer( aNewPointer );
+ }
+ }
+ }
+ }
+*/
+}
+
+
+
+/*************************************************************************
+|*
+|* Tastaturereignisse bearbeiten
+|*
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* FALSE.
+|*
+\************************************************************************/
+
+BOOL __EXPORT FuText::KeyInput(const KeyEvent& rKEvt)
+{
+ BOOL bReturn = FALSE;
+
+ if ( pView->KeyInput(rKEvt, pWindow) )
+ {
+ bReturn = TRUE;
+ lcl_InvalidateAttribs();
+ }
+ else
+ {
+ bReturn = FuDraw::KeyInput(rKEvt);
+ }
+
+ return (bReturn);
+}
+
+
+
+/*************************************************************************
+|*
+|* Function aktivieren
+|*
+\************************************************************************/
+
+void FuText::Activate()
+{
+ pView->SetDragMode(SDRDRAG_MOVE);
+ SfxBindings& rBindings = SFX_BINDINGS();
+ rBindings.Invalidate( SID_OBJECT_ROTATE );
+ rBindings.Invalidate( SID_OBJECT_MIRROR );
+
+// Sofort in den Edit Mode setzen
+// SetInEditMode();
+
+// if (!pTextObj)
+ {
+ /**********************************************************************
+ * Kein Textobjekt im EditMode, daher CreateMode setzen
+ **********************************************************************/
+ USHORT nObj = OBJ_TEXT;
+
+/* UINT16 nIdent;
+ UINT32 nInvent;
+ pView->TakeCurrentObj(nIdent, nInvent);
+*/
+ pView->SetCurrentObj(nObj);
+
+ pView->SetCreateMode();
+ }
+
+ aNewPointer = Pointer(POINTER_TEXT);
+// aNewPointer = Pointer(POINTER_CROSS); //! ???
+
+ aOldPointer = pWindow->GetPointer();
+ pViewShell->SetActivePointer( aNewPointer );
+
+ FuConstruct::Activate();
+}
+
+
+/*************************************************************************
+|*
+|* Function deaktivieren
+|*
+\************************************************************************/
+
+void FuText::Deactivate()
+{
+ FuConstruct::Deactivate();
+ pViewShell->SetActivePointer( aOldPointer );
+ StopEditMode();
+}
+
+
+/*************************************************************************
+|*
+|* Selektion hat sich geaendert
+|*
+\************************************************************************/
+
+void FuText::SelectionHasChanged()
+{
+ pView->SetDragMode(SDRDRAG_MOVE);
+ SfxBindings& rBindings = SFX_BINDINGS();
+ rBindings.Invalidate( SID_OBJECT_ROTATE );
+ rBindings.Invalidate( SID_OBJECT_MIRROR );
+
+ pTextObj = NULL;
+
+ if ( pView->HasMarkedObj() )
+ {
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ SdrMark* pMark = rMarkList.GetMark(0);
+ SdrObject* pObj = pMark->GetObj();
+
+ UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+
+ if (nSdrObjKind == OBJ_TEXT ||
+ nSdrObjKind == OBJ_TITLETEXT ||
+ nSdrObjKind == OBJ_OUTLINETEXT /* ||
+ pObj->ISA(SdrTextObj) */ )
+ {
+ pTextObj = (SdrTextObj*) pObj;
+ }
+ }
+ }
+
+ if (!pTextObj)
+ {
+ /**********************************************************************
+ * Kein Textobjekt im EditMode, daher CreateMode setzen
+ **********************************************************************/
+ USHORT nObj = OBJ_TEXT;
+ UINT16 nIdent;
+ UINT32 nInvent;
+ pView->TakeCurrentObj(nIdent, nInvent);
+
+// if (! pView->IsEditMode() )
+// {
+// if (nIdent == OBJ_TEXT)
+// {
+// nObj = OBJ_TEXT;
+// }
+// else if (nIdent == OBJ_OUTLINETEXT)
+// {
+// nObj = OBJ_OUTLINETEXT;
+// }
+// else if (nIdent == OBJ_TITLETEXT)
+// {
+// nObj = OBJ_TITLETEXT;
+// }
+// }
+
+ pView->SetCurrentObj(nObj);
+
+ pView->SetCreateMode();
+ }
+}
+
+/*************************************************************************
+|*
+|* Objekt in Edit-Mode setzen
+|*
+\************************************************************************/
+
+void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel)
+{
+ // pObj != NULL, wenn ein spezielles (nicht markiertes) Objekt editiert werden soll
+ // (-> Legendenobjekt von Notizen)
+ // wenn pObj == NULL, markiertes Objekt nehmen
+
+ SdrLayer* pLockLayer = NULL;
+ if ( pObj && pObj->GetLayer() == SC_LAYER_INTERN )
+ {
+ // auf gelocktem Layer kann nicht editiert werden, darum den Layer
+ // temporaer auf nicht gelockt setzen
+
+ pLockLayer = pDrDoc->GetLayerAdmin().GetLayerPerID(SC_LAYER_INTERN);
+ if (pLockLayer)
+ pView->SetLayerLocked( pLockLayer->GetName(), FALSE );
+ }
+
+ if ( !pObj && pView->HasMarkedObj() )
+ {
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ SdrMark* pMark = rMarkList.GetMark(0);
+ pObj = pMark->GetObj();
+ }
+ }
+
+ pTextObj = NULL;
+
+ if ( pObj )
+ {
+ UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+
+ if (nSdrObjKind == OBJ_TEXT ||
+ nSdrObjKind == OBJ_TITLETEXT ||
+ nSdrObjKind == OBJ_OUTLINETEXT ||
+ pObj->ISA(SdrTextObj))
+ {
+ SdrPageView* pPV = pView->GetPageViewPvNum(0);
+ Rectangle aRect = pObj->GetLogicRect();
+ Point aPnt = aRect.Center();
+
+ if ( pObj->HasTextEdit() )
+ {
+ SdrOutliner* pO = MakeOutliner();
+ //!?? ohne uebergebenen Outliner stimmen die Defaults nicht ???!?
+ if ( pView->BegTextEdit(pObj, pPV, pWindow, (FASTBOOL)TRUE, pO) )
+ {
+ // EditEngine-UndoManager anmelden
+ pViewShell->SetDrawTextUndo( &pO->GetUndoManager() );
+
+ pTextObj = (SdrTextObj*) pObj;
+ pView->SetEditMode();
+
+ // ggf. Text-Cursor an Klickposition setzen
+ if (pMousePixel)
+ {
+ OutlinerView* pOLV = pView->GetTextEditOutlinerView();
+ if (pOLV)
+ {
+ MouseEvent aEditEvt( *pMousePixel, 1, MOUSE_SYNTHETIC, MOUSE_LEFT, 0 );
+ pOLV->MouseButtonDown(aEditEvt);
+ pOLV->MouseButtonUp(aEditEvt);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (pLockLayer)
+ pView->SetLayerLocked( pLockLayer->GetName(), TRUE );
+}
+
+
+
+
diff --git a/sc/source/ui/drawfunc/futext2.cxx b/sc/source/ui/drawfunc/futext2.cxx
new file mode 100644
index 000000000000..e78b10ca383e
--- /dev/null
+++ b/sc/source/ui/drawfunc/futext2.cxx
@@ -0,0 +1,340 @@
+/*************************************************************************
+ *
+ * $RCSfile: futext2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+#define _CURSOR_HXX
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+#define _STATUS_HXX
+#define _SVTCTRL3_HXX
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _FILDLG_HXX ***
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX ***
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+//#define _SVTREELIST_HXX
+#define _FILTER_HXX
+//#define _SVLBOXITM_HXX
+//#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+//#define _SFXINIMGR_HXX
+//#define _SFXCFGITEM_HXX
+//#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+//#define _SFX_BINDINGS_HXX
+//#define _SFXDISPATCH_HXX
+//#define _SFXMSG_HXX
+//#define _SFXOBJFACE_HXX
+//#define _SFXREQUEST_HXX
+#define _SFXMACRO_HXX
+
+// SFX
+//#define _SFXAPPWIN_HXX
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX
+//#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX
+//#define _SFX_CLIENTSH_HXX
+//#define _SFXDOCINF_HXX
+//#define _SFX_OBJFAC_HXX
+#define _SFX_DOCFILT_HXX
+//#define _SFXDOCFILE_HXX
+//define _VIEWFAC_HXX
+//#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX
+//#define _MDIFRM_HXX
+#define _SFX_IPFRM_HXX
+//#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX
+//#define _BASEDLGS_HXX
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+//#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+//#define _SFXDOCTEMPL_HXX
+//#define _SFXDOCTDLG_HXX
+//#define _SFX_TEMPLDLG_HXX
+//#define _SFXNEW_HXX
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX **
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+//#define _ARGS_HXX ***
+//#define _SFXPOOLITEM_HXX
+//#define _SFXINTITEM_HXX
+//#define _SFXENUMITEM_HXX
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX
+#define _SFXPTITEM_HXX
+#define _SFXRECTITEM_HXX
+//#define _SFXITEMPOOL_HXX
+//#define _SFXITEMSET_HXX
+#define _SFXITEMITER_HXX
+#define _SFX_WHITER_HXX
+#define _SFXPOOLCACH_HXX
+//#define _AEITEM_HXX
+#define _SFXRNGITEM_HXX
+//#define _SFXSLSTITM_HXX
+//#define _SFXSTYLE_HXX
+
+//xout.hxx
+//#define _XENUM_HXX
+//#define _XPOLY_HXX
+//#define _XATTR_HXX
+//#define _XOUTX_HXX
+//#define _XPOOL_HXX
+//#define _XTABLE_HXX
+
+//svdraw.hxx
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+//#define _SDR_NOOBJECTS
+//#define _SDR_NOVIEWS
+
+//#define SI_NOITEMS
+//#define SI_NODRW
+#define _SI_NOSBXCONTROLS
+#define _VCATTR_HXX
+#define _VCONT_HXX
+//#define _VCSBX_HXX ***
+#define _SI_NOOTHERFORMS
+#define _VCTRLS_HXX
+//#define _VCDRWOBJ_HXX ***
+#define _SI_NOCONTROL
+#define _SETBRW_HXX
+#define _VCBRW_HXX
+#define _SI_NOSBXCONTROLS
+#define _SIDLL_HXX
+
+//------------------------------------------------------------------------
+
+#include <svx/svdoutl.hxx>
+#include <svx/svdetc.hxx>
+
+#include "futext.hxx"
+#include "tabvwsh.hxx"
+
+//------------------------------------------------------------------------
+
+SdrOutliner* FuText::MakeOutliner()
+{
+ ScViewData* pViewData = pViewShell->GetViewData();
+ SdrOutliner* pOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, pDrDoc);
+
+ pViewData->UpdateOutlinerFlags(*pOutl);
+
+ // Die EditEngine benutzt beim RTF Export (Clipboard / Drag&Drop)
+ // den MapMode des RefDevices, um die Fontgroesse zu setzen
+
+ OutputDevice* pRef = pOutl->GetRefDevice(); // das sollte der Drucker sein
+ if (pRef && pRef != pWindow)
+ pRef->SetMapMode( MapMode(MAP_100TH_MM) );
+
+ return pOutl;
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
new file mode 100644
index 000000000000..0c58ccbef886
--- /dev/null
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -0,0 +1,427 @@
+/*************************************************************************
+ *
+ * $RCSfile: futext3.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+// TOOLS
+#define _BIGINT_HXX
+#define _SFXMULTISEL_HXX
+#define _STACK_HXX
+#define _QUEUE_HXX
+#define _DYNARR_HXX
+#define _TREELIST_HXX
+#define _CACHESTR_HXX
+#define _NEW_HXX
+//#define _SHL_HXX
+//#define _LINK_HXX
+//#define _ERRCODE_HXX
+//#define _GEN_HXX
+//#define _FRACT_HXX
+//#define _STRING_HXX
+//#define _MTF_HXX
+//#define _CONTNR_HXX
+//#define _LIST_HXX
+//#define _TABLE_HXX
+#define _DYNARY_HXX
+//#define _UNQIDX_HXX
+#define _SVMEMPOOL_HXX
+//#define _UNQID_HXX
+//#define _DEBUG_HXX
+//#define _DATE_HXX
+//#define _TIME_HXX
+//#define _DATETIME_HXX
+//#define _INTN_HXX
+//#define _WLDCRD_HXX
+//#define _FSYS_HXX
+//#define _STREAM_HXX
+#define _CACHESTR_HXX
+#define _SV_MULTISEL_HXX
+
+//SV
+//#define _CLIP_HXX ***
+#define _CONFIG_HXX
+//#define _CURSOR_HXX ***
+#define _FONTDLG_HXX
+#define _PRVWIN_HXX
+//#define _COLOR_HXX
+//#define _PAL_HXX
+//#define _BITMAP_HXX
+//#define _GDIOBJ_HXX
+//#define _POINTR_HXX
+//#define _ICON_HXX
+//#define _IMAGE_HXX
+//#define _KEYCOD_HXX
+//#define _EVENT_HXX
+#define _HELP_HXX
+//#define _APP_HXX
+//#define _MDIAPP_HXX
+//#define _TIMER_HXX
+//#define _METRIC_HXX
+//#define _REGION_HXX
+//#define _OUTDEV_HXX
+//#define _SYSTEM_HXX
+//#define _VIRDEV_HXX
+//#define _JOBSET_HXX
+//#define _PRINT_HXX
+//#define _WINDOW_HXX
+//#define _SYSWIN_HXX
+//#define _WRKWIN_HXX
+#define _MDIWIN_HXX
+//#define _FLOATWIN_HXX
+//#define _DOCKWIN_HXX
+//#define _CTRL_HXX
+//#define _SCRBAR_HXX
+//#define _BUTTON_HXX
+//#define _IMAGEBTN_HXX
+//#define _FIXED_HXX
+//#define _GROUP_HXX
+//#define _EDIT_HXX
+//#define _COMBOBOX_HXX
+//#define _LSTBOX_HXX
+//#define _SELENG_HXX ***
+//#define _SPLIT_HXX
+#define _SPIN_HXX
+//#define _FIELD_HXX
+//#define _MOREBTN_HXX ***
+//#define _TOOLBOX_HXX
+#define _STATUS_HXX
+#define _SVTCTRL3_HXX
+//#define _DIALOG_HXX
+//#define _MSGBOX_HXX
+//#define _SYSDLG_HXX
+//#define _FILDLG_HXX ***
+//#define _PRNDLG_HXX
+#define _COLDLG_HXX
+//#define _TABDLG_HXX
+//#define _MENU_HXX ***
+//#define _GDIMTF_HXX
+//#define _POLY_HXX
+//#define _ACCEL_HXX
+//#define _GRAPH_HXX
+#define _SOUND_HXX
+
+#if defined WIN
+#define _MENUBTN_HXX
+#endif
+
+//svtools
+#define _SCRWIN_HXX
+#define _RULER_HXX
+//#define _TABBAR_HXX
+//#define _VALUESET_HXX
+#define _STDMENU_HXX
+//#define _STDCTRL_HXX
+//#define _CTRLBOX_HXX
+#define _CTRLTOOL_HXX
+#define _EXTATTR_HXX
+#define _FRM3D_HXX
+#define _EXTATTR_HXX
+
+//SVTOOLS
+//#define _SVTREELIST_HXX
+#define _FILTER_HXX
+//#define _SVLBOXITM_HXX
+//#define _SVTREEBOX_HXX
+#define _SVICNVW_HXX
+#define _SVTABBX_HXX
+
+//sfxcore.hxx
+#define _SFXINIMGR_HXX //???
+//#define _SFXCFGITEM_HXX ***
+#define _SFX_PRINTER_HXX
+#define _SFXGENLINK_HXX
+#define _SFXHINTPOST_HXX
+#define _SFXDOCINF_HXX
+#define _SFXLINKHDL_HXX
+//#define _SFX_PROGRESS_HXX ***
+
+//sfxsh.hxx
+//#define _SFX_SHELL_HXX
+//#define _SFXAPP_HXX
+#define _SFX_BINDINGS_HXX
+#define _SFXDISPATCH_HXX
+#define _SFXMSG_HXX
+#define _SFXOBJFACE_HXX
+//#define _SFXREQUEST_HXX ***
+#define _SFXMACRO_HXX
+
+// SFX
+#define _SFXAPPWIN_HXX
+#define _SFX_SAVEOPT_HXX
+//#define _SFX_CHILDWIN_HXX ***
+#define _SFXCTRLITEM_HXX
+#define _SFXPRNMON_HXX
+#define _INTRO_HXX
+#define _SFXMSGDESCR_HXX
+#define _SFXMSGPOOL_HXX
+#define _SFXFILEDLG_HXX
+#define _PASSWD_HXX
+#define _SFXTBXCTRL_HXX
+#define _SFXSTBITEM_HXX
+#define _SFXMNUITEM_HXX
+#define _SFXIMGMGR_HXX
+#define _SFXTBXMGR_HXX
+#define _SFXSTBMGR_HXX
+#define _SFX_MINFITEM_HXX
+#define _SFXEVENT_HXX
+
+//sfxdoc.hxx
+//#define _SFX_OBJSH_HXX ***
+//#define _SFX_CLIENTSH_HXX ***
+#define _SFXDOCINF_HXX
+#define _SFX_DOCFILT_HXX
+#define _SFXDOCFILE_HXX
+//define _VIEWFAC_HXX
+#define _SFXVIEWFRM_HXX
+//#define _SFXVIEWSH_HXX ***
+#define _MDIFRM_HXX
+#define _SFX_IPFRM_HXX
+#define _SFX_INTERNO_HXX
+
+//sfxdlg.hxx
+//#define _SFXTABDLG_HXX ***
+#define _BASEDLGS_HXX
+#define _SFX_DINFDLG_HXX
+#define _SFXDINFEDT_HXX
+#define _SFX_MGETEMPL_HXX
+#define _SFX_TPLPITEM_HXX
+#define _SFX_STYLEDLG_HXX
+#define _NEWSTYLE_HXX
+#define _SFXDOCTEMPL_HXX
+#define _SFXDOCTDLG_HXX
+#define _SFX_TEMPLDLG_HXX
+#define _SFXNEW_HXX
+#define _SFXDOCMAN_HXX
+//#define _SFXDOCKWIN_HXX **
+
+//sfxitems.hxx
+#define _SFX_WHMAP_HXX
+//#define _ARGS_HXX ***
+//#define _SFXPOOLITEM_HXX ***
+//#define _SFXINTITEM_HXX ***
+//#define _SFXENUMITEM_HXX ***
+#define _SFXFLAGITEM_HXX
+//#define _SFXSTRITEM_HXX ***
+#define _SFXPTITEM_HXX
+#define _SFXRECTITEM_HXX
+//#define _SFXITEMPOOL_HXX ***
+//#define _SFXITEMSET_HXX ***
+#define _SFXITEMITER_HXX
+#define _SFX_WHITER_HXX
+#define _SFXPOOLCACH_HXX
+#define _AEITEM_HXX
+#define _SFXRNGITEM_HXX
+#define _SFXSLSTITM_HXX
+#define _SFXSTYLE_HXX
+
+//xout.hxx
+//#define _XENUM_HXX ***
+//#define _XPOLY_HXX ***
+//deefine _XATTR_HXX ***
+#define _XOUTX_HXX
+//#define _XPOOL_HXX ***
+#define _XTABLE_HXX
+
+//svdraw.hxx
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+#define _SDR_NOOBJECTS
+#define _SDR_NOVIEWS
+
+#define SI_NOITEMS
+#define SI_NODRW
+#define _SI_NOSBXCONTROLS
+#define _VCATTR_HXX
+#define _VCONT_HXX
+//#define _VCSBX_HXX ***
+#define _SI_NOOTHERFORMS
+#define _VCTRLS_HXX
+//#define _VCDRWOBJ_HXX ***
+#define _SI_NOCONTROL
+#define _SETBRW_HXX
+#define _VCBRW_HXX
+#define _SI_NOSBXCONTROLS
+#define _SIDLL_HXX
+
+//------------------------------------------------------------------------
+
+#include <svx/editeng.hxx>
+#include <svx/outlobj.hxx>
+#include <svx/svdocapt.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svdundo.hxx>
+#include <svx/svdview.hxx>
+#include <vcl/cursor.hxx>
+#include <sfx2/objsh.hxx>
+
+#include "global.hxx"
+#include "drwlayer.hxx"
+#include "userdat.hxx"
+#include "tabvwsh.hxx" // oder GetDocument irgendwo
+#include "document.hxx"
+#include "editutil.hxx"
+#include "futext.hxx"
+#include "globstr.hrc"
+
+//------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------
+// Editieren von Notiz-Legendenobjekten muss immer ueber StopEditMode beendet werden,
+// damit die Aenderungen ins Dokument uebernommen werden!
+// (Fontwork-Execute in drawsh und drtxtob passiert nicht fuer Legendenobjekte)
+// ------------------------------------------------------------------------------------
+
+void FuText::StopEditMode()
+{
+ BOOL bComment = FALSE;
+ ScAddress aTabPos;
+
+ SdrObject* pObject = pView->GetTextEditObject();
+ if ( pObject && pObject->GetLayer()==SC_LAYER_INTERN && pObject->ISA(SdrCaptionObj) )
+ {
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pObject );
+ if( pData )
+ {
+ aTabPos = pData->aStt;
+ bComment = TRUE;
+ }
+ }
+
+ ScDocument* pDoc = pViewShell->GetViewData()->GetDocument();
+
+ SfxObjectShell* pObjSh = pViewShell->GetViewData()->GetSfxDocShell();
+ SfxUndoManager* pUndoMan = pObjSh->GetUndoManager();
+ if ( bComment )
+ {
+ // einblenden, editieren, ausblenden, Notiz aendern zusammen in eine ListAction
+
+ String aUndoStr = ScGlobal::GetRscString( STR_UNDO_EDITNOTE );
+ pUndoMan->EnterListAction( aUndoStr, aUndoStr );
+
+ ScDrawLayer* pModel = pDoc->GetDrawLayer();
+ SdrUndoGroup* pShowUndo = pModel->GetCalcUndo();
+ if (pShowUndo)
+ pUndoMan->AddUndoAction( pShowUndo );
+ }
+
+ SdrEndTextEditKind eResult = pView->EndTextEdit();
+ pViewShell->SetDrawTextUndo(NULL); // oder ScEndTextEdit (mit drawview.hxx)
+
+ Cursor* pCur = pWindow->GetCursor();
+ if (pCur && pCur->IsVisible())
+ pCur->Hide();
+
+ if ( bComment )
+ {
+ ScPostIt aNote;
+ BOOL bWas = pDoc->GetNote( aTabPos.Col(), aTabPos.Row(), aTabPos.Tab(), aNote );
+
+ // ignorieren nur, wenn Text unveraendert und Notiz dauerhaft angezeigt
+ // wenn nicht angezeigt, muss mindestens das Objekt weg (#43155#)
+
+ if ( eResult != SDRENDTEXTEDIT_UNCHANGED || !bWas || !aNote.IsShown() )
+ {
+ String aNewText; //! formatierten Text behalten ???
+ if ( eResult != SDRENDTEXTEDIT_DELETED )
+ {
+ OutlinerParaObject* pParaObj = pObject->GetOutlinerParaObject();
+ if ( pParaObj )
+ {
+ ScFieldEditEngine aEngine( pDoc->GetEnginePool() );
+ aEngine.SetText( pParaObj->GetTextObject() );
+ aNewText = aEngine.GetText( LINEEND_LF );
+ aNewText.ConvertLineEnd();
+ }
+ }
+ aNote.AutoSetText( aNewText ); // setzt auch Author und Date
+
+ BOOL bRemove = ( !aNote.IsShown() || !aNewText.Len() || !bWas );
+ if ( bRemove )
+ aNote.SetShown( FALSE );
+// pDoc->SetNote( aTabPos.Col(), aTabPos.Row(), aTabPos.Tab(), aNote );
+ pViewShell->SetNote( aTabPos.Col(), aTabPos.Row(), aTabPos.Tab(), aNote ); // mit Undo
+
+ if ( bRemove && eResult != SDRENDTEXTEDIT_DELETED ) // Legenden-Objekt loeschen ?
+ {
+ SdrPage* pPage = pDrDoc->GetPage( aTabPos.Tab() );
+// ER 28.04.97 19:12 laut JOE ist hier RecalcObjOrdNums unnoetig
+// pPage->RecalcObjOrdNums();
+ pDrDoc->AddUndo( new SdrUndoRemoveObj( *pObject ) );
+ pPage->RemoveObject( pObject->GetOrdNum() );
+ // #39351# RemoveObject loescht nicht (analog zu anderen Containern)
+ // trotzden kein "delete pObject" mehr, das Objekt gehoert jetzt dem Undo
+ }
+ }
+
+ pUndoMan->LeaveListAction();
+ }
+}
+
+
+
+
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
new file mode 100644
index 000000000000..a5045ef42c15
--- /dev/null
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: graphsh.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+#include <svx/eeitem.hxx>
+#include <svx/fontwork.hxx>
+#include <svx/labdlg.hxx>
+#include <svx/srchitem.hxx>
+#include <svx/tabarea.hxx>
+#include <svx/tabline.hxx>
+#include <svx/textanim.hxx>
+#include <svx/transfrm.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/objface.hxx>
+#include <sfx2/request.hxx>
+#include <svtools/whiter.hxx>
+#include <vcl/msgbox.hxx>
+#include <segmentc.hxx>
+
+#include "graphsh.hxx"
+#include "drwlayer.hxx"
+#include "sc.hrc"
+#include "viewdata.hxx"
+#include "document.hxx"
+#include "docpool.hxx"
+#include "drawview.hxx"
+#include "scresid.hxx"
+
+#ifndef _SVDOBJ_HXX //autogen
+#include <svx/svdobj.hxx>
+#endif
+
+#define ScGraphicShell
+#include "scslots.hxx"
+
+
+SFX_IMPL_INTERFACE(ScGraphicShell, ScDrawShell, ScResId(SCSTR_GRAPHICSHELL) )
+{
+ SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ ScResId(RID_DRAW_OBJECTBAR) );
+ SFX_POPUPMENU_REGISTRATION( ScResId(RID_POPUP_GRAPHIC) );
+ SFX_OBJECTMENU_REGISTRATION( SID_OBJECTMENU0, ScResId(RID_OBJECTMENU_DRAW) );
+}
+
+TYPEINIT1( ScGraphicShell, ScDrawShell );
+
+ScGraphicShell::ScGraphicShell(ScViewData* pData) :
+ ScDrawShell(pData)
+{
+ SetHelpId(HID_SCSHELL_GRAPHIC);
+ SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("GraphicObject")));
+}
+
+ScGraphicShell::~ScGraphicShell()
+{
+}
+
+
+
diff --git a/sc/source/ui/drawfunc/makefile.mk b/sc/source/ui/drawfunc/makefile.mk
new file mode 100644
index 000000000000..655f06e1c512
--- /dev/null
+++ b/sc/source/ui/drawfunc/makefile.mk
@@ -0,0 +1,158 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# 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.
+#
+# 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.
+#
+# 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
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (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.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=sc
+TARGET=drawfunc
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=ui_pch
+PDBTARGET=ui_pch
+PROJECTPCHSOURCE=..$/pch$/ui_pch
+
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : scpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sc.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+CXXFILES = \
+ fupoor.cxx \
+ fumark.cxx \
+ fudraw.cxx \
+ fusel.cxx \
+ fusel2.cxx \
+ fuconstr.cxx \
+ fuconrec.cxx \
+ fuconarc.cxx \
+ fuconctl.cxx \
+ fuconuno.cxx \
+ fuconpol.cxx \
+ fuins1.cxx \
+ fuins2.cxx \
+ futext.cxx \
+ futext2.cxx \
+ futext3.cxx \
+ drawsh.cxx \
+ drawsh1.cxx \
+ drawsh2.cxx \
+ drawsh3.cxx \
+ drawsh4.cxx \
+ drawsh5.cxx \
+ drtxtob.cxx \
+ drtxtob1.cxx \
+ drtxtob2.cxx \
+ drformsh.cxx \
+ oleobjsh.cxx \
+ chartsh.cxx \
+ graphsh.cxx \
+
+
+SRCFILES = \
+ objdraw.src\
+ drformsh.src
+
+SLOFILES = \
+ $(SLO)$/fupoor.obj \
+ $(SLO)$/fumark.obj \
+ $(SLO)$/fudraw.obj \
+ $(SLO)$/fusel.obj \
+ $(SLO)$/fusel2.obj \
+ $(SLO)$/fuconstr.obj \
+ $(SLO)$/fuconrec.obj \
+ $(SLO)$/fuconarc.obj \
+ $(SLO)$/fuconctl.obj \
+ $(SLO)$/fuconuno.obj \
+ $(SLO)$/fuconpol.obj \
+ $(SLO)$/fuins1.obj \
+ $(SLO)$/fuins2.obj \
+ $(SLO)$/futext.obj \
+ $(SLO)$/futext2.obj \
+ $(SLO)$/futext3.obj \
+ $(SLO)$/drawsh.obj \
+ $(SLO)$/drawsh1.obj \
+ $(SLO)$/drawsh2.obj \
+ $(SLO)$/drawsh3.obj \
+ $(SLO)$/drawsh4.obj \
+ $(SLO)$/drawsh5.obj \
+ $(SLO)$/drtxtob.obj \
+ $(SLO)$/drtxtob1.obj \
+ $(SLO)$/drtxtob2.obj \
+ $(SLO)$/drformsh.obj \
+ $(SLO)$/oleobjsh.obj \
+ $(SLO)$/chartsh.obj \
+ $(SLO)$/graphsh.obj
+
+
+NOOPTFILES=\
+ $(SLO)$/fusel.obj
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sc/source/ui/drawfunc/objdraw.src b/sc/source/ui/drawfunc/objdraw.src
new file mode 100644
index 000000000000..af1165a6d501
--- /dev/null
+++ b/sc/source/ui/drawfunc/objdraw.src
@@ -0,0 +1,1441 @@
+/*************************************************************************
+ *
+ * $RCSfile: objdraw.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "sc.hrc"
+#include "submenu.hrc"
+#include <offmgr/offmenu.hrc>
+ //
+ // Defines -------------------------------------------------------------------------------
+ //
+#define MN_RESET\
+ MenuItem\
+ {\
+ Identifier = SID_TEXT_STANDARD ; \
+ HelpID = SID_TEXT_STANDARD ; \
+ Text = "Standar~d" ; \
+ Text [ ENGLISH ] = "Standar~d" ; \
+ Text [ dutch ] = "Standaar~d" ; \
+ Text [ english_us ] = "~Default" ; \
+ Text [ italian ] = "Standar~d" ; \
+ Text [ spanish ] = "~Predeterminado" ; \
+ Text [ french ] = "Par d~faut" ; \
+ Text [ swedish ] = "Standar~d" ; \
+ Text [ danish ] = "Standar~d" ; \
+ Text [ portuguese ] = "~Padro" ; \
+ Text [ portuguese_brazilian ] = "Standar~d" ; \
+ Text[ chinese_simplified ] = "׼(~D)";\
+ Text[ russian ] = "~";\
+ Text[ polish ] = "~Standard";\
+ Text[ japanese ] = "W(~D)";\
+ Text[ chinese_traditional ] = "з(~D)";\
+ Text[ arabic ] = "~";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "⺻(~D)";\
+ Text[ turkish ] = "Standar~t";\
+ Text[ language_user1 ] = " ";\
+ };
+
+ // Font (SID_ATTR_CHAR_FONT) und Groesse (SID_ATTR_CHAR_FONTHEIGHT) duerfen nicht im
+ // Formatmenue auftauchen, weil die Controller im ExeEnv sonst im Container angelegt werden
+#define MN_TEXT_ATTR\
+ MenuItem\
+ {\
+ Identifier = RID_MN_FORMAT_STYLE ; \
+ HelpID = RID_MN_FORMAT_STYLE ; \
+ Text = "Sti~l" ; \
+ Text [ English ] = "St~yle" ; \
+ Text [ norwegian ] = "M~al" ; \
+ Text [ italian ] = "St~ile" ; \
+ Text [ portuguese_brazilian ] = "Es~tilo" ; \
+ Text [ portuguese ] = "Estil~o" ; \
+ Text [ finnish ] = "~Tyyli" ; \
+ Text [ danish ] = "Typografi" ; \
+ Text [ french ] = "St~yle" ; \
+ Text [ swedish ] = "Sti~l" ; \
+ Text [ dutch ] = "~Opmaak" ; \
+ Text [ spanish ] = "Est~ilo" ; \
+ Text [ english_us ] = "~Style" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_WEIGHT\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_POSTURE\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_UNDERLINE\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_SHADOWED\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_CONTOUR\
+ };\
+ MenuItem\
+ {\
+ Separator = TRUE ; \
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_SET_SUPER_SCRIPT ; \
+ HelpID = SID_SET_SUPER_SCRIPT ; \
+ Text = "~Hochstellen" ; \
+ Text [ English ] = "Su~perscript" ; \
+ Text [ norwegian ] = "Su~perskript" ; \
+ Text [ italian ] = "Apice" ; \
+ Text [ portuguese_brazilian ] = "So~brescrito" ; \
+ Text [ portuguese ] = "~Superior linha" ; \
+ Text [ finnish ] = "~Ylindeksi" ; \
+ Text [ danish ] = "Hvet" ; \
+ Text [ french ] = "~Exposant" ; \
+ Text [ swedish ] = "~Upphjt" ; \
+ Text [ dutch ] = "Su~perscript" ; \
+ Text [ spanish ] = "Supern~dice" ; \
+ Text [ english_us ] = "~Superscript" ; \
+ Text[ chinese_simplified ] = "ϱ(~S)";\
+ Text[ russian ] = " ";\
+ Text[ polish ] = "Indeks grny";\
+ Text[ japanese ] = "t(~S)";\
+ Text[ chinese_traditional ] = "W(~S)";\
+ Text[ arabic ] = "";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = " ÷(~S)";\
+ Text[ turkish ] = "~st simge";\
+ Text[ language_user1 ] = " ";\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_SET_SUB_SCRIPT ; \
+ HelpID = SID_SET_SUB_SCRIPT ; \
+ Text = "~Tiefstellen" ; \
+ Text [ English ] = "Su~bscript" ; \
+ Text [ norwegian ] = "Su~bskript" ; \
+ Text [ italian ] = "Pedice" ; \
+ Text [ portuguese_brazilian ] = "Su~bscrito" ; \
+ Text [ portuguese ] = "~Inferior linha" ; \
+ Text [ finnish ] = "~Alaindeksi" ; \
+ Text [ danish ] = "Snket" ; \
+ Text [ french ] = "~Indice infrieur" ; \
+ Text [ swedish ] = "~Nedsnkt" ; \
+ Text [ dutch ] = "Su~bscript" ; \
+ Text [ spanish ] = "Su~bndice" ; \
+ Text [ english_us ] = "S~ubscript" ; \
+ Text[ chinese_simplified ] = "±(~U)";\
+ Text[ russian ] = " ";\
+ Text[ polish ] = "Indeks dolny";\
+ Text[ japanese ] = "t(~U)";\
+ Text[ chinese_traditional ] = "U(~U)";\
+ Text[ arabic ] = "";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "Ʒ÷(~U)";\
+ Text[ turkish ] = "~Alt simge";\
+ Text[ language_user1 ] = " ";\
+ };\
+ };\
+ };\
+ Text[ chinese_simplified ] = "ʽ(~S)";\
+ Text[ russian ] = "";\
+ Text[ polish ] = "Styl";\
+ Text[ japanese ] = "(~S)";\
+ Text[ chinese_traditional ] = "˦(~S)";\
+ Text[ arabic ] = "";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "Ÿ(~S)";\
+ Text[ turkish ] = "Bi~im";\
+ Text[ language_user1 ] = " ";\
+ };\
+ MenuItem\
+ {\
+ Identifier = RID_MN_FORMAT_ALGN ; \
+ HelpID = RID_MN_FORMAT_ALGN ; \
+ Text = "~Ausrichtung" ; \
+ Text [ English ] = "~Alignment" ; \
+ Text [ norwegian ] = "~Justering" ; \
+ Text [ italian ] = "~Allineamento" ; \
+ Text [ portuguese_brazilian ] = "~Alinhamento" ; \
+ Text [ portuguese ] = "~Alinhamento" ; \
+ Text [ finnish ] = "~Tasaus" ; \
+ Text [ danish ] = "Justering" ; \
+ Text [ french ] = "~Alignement" ; \
+ Text [ swedish ] = "~Justering" ; \
+ Text [ dutch ] = "~Uitlijning" ; \
+ Text [ spanish ] = "~Alineacin" ; \
+ Text [ english_us ] = "~Alignment" ; \
+ RadioCheck = TRUE ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\
+ RadioCheck = TRUE ; \
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\
+ RadioCheck = TRUE ; \
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\
+ RadioCheck = TRUE ; \
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \
+ HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \
+ RadioCheck = TRUE ; \
+ Text = "~Blocksatz" ; \
+ Text [ English ] = "~Justified" ; \
+ Text [ norwegian ] = "~Stillt inn" ; \
+ Text [ italian ] = "~Giustificato" ; \
+ Text [ portuguese_brazilian ] = "~Justificado" ; \
+ Text [ portuguese ] = "~Justificado" ; \
+ Text [ finnish ] = "~Reunat" ; \
+ Text [ danish ] = "~Lige margener" ; \
+ Text [ french ] = "~Justifi" ; \
+ Text [ swedish ] = "~Marginaljusterad" ; \
+ Text [ dutch ] = "~Uitgevuld" ; \
+ Text [ spanish ] = "~Justificado" ; \
+ Text [ english_us ] = "~Justified" ; \
+ Text[ chinese_simplified ] = "Ҷ(~J)";\
+ Text[ russian ] = " ";\
+ Text[ polish ] = "Wyjustuj";\
+ Text[ japanese ] = "ϓt(~J)";\
+ Text[ chinese_traditional ] = "k(~J)";\
+ Text[ arabic ] = "";\
+ Text[ greek ] = "~ ";\
+ Text[ korean ] = " (~J)";\
+ Text[ turkish ] = "~ki yana yasla";\
+ Text[ language_user1 ] = " ";\
+ };\
+ };\
+ };\
+ Text[ chinese_simplified ] = "(~A)";\
+ Text[ russian ] = "";\
+ Text[ polish ] = "Wyrwnanie";\
+ Text[ japanese ] = "zu(~A)";\
+ Text[ chinese_traditional ] = "(~A)";\
+ Text[ arabic ] = "";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "(~A)";\
+ Text[ turkish ] = "~Hizalama";\
+ Text[ language_user1 ] = " ";\
+ };\
+ MenuItem\
+ {\
+ Identifier = RID_MN_FORMAT_LINESPACE ; \
+ HelpID = RID_MN_FORMAT_LINESPACE ; \
+ Text = "~Zeilenabstand" ; \
+ Text [ English ] = "~Line Spacing" ; \
+ Text [ norwegian ] = "~Linjeavstand" ; \
+ Text [ italian ] = "Interli~nea" ; \
+ Text [ portuguese_brazilian ] = "~Espaamento de linha" ; \
+ Text [ portuguese ] = "~Entrelinhas" ; \
+ Text [ finnish ] = "~Rivivli" ; \
+ Text [ danish ] = "~Linjeafstand" ; \
+ Text [ french ] = "Inter~ligne" ; \
+ Text [ swedish ] = "~Radavstnd" ; \
+ Text [ dutch ] = "~Regelafstand" ; \
+ Text [ spanish ] = "Inter~lineado" ; \
+ Text [ english_us ] = "~Line Spacing" ; \
+ _MenuItemFlags = MIB_RADIOCHECK ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ ITEM_FORMAT_PARA_LINESPACE_10\
+ RadioCheck = TRUE ; \
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_PARA_LINESPACE_15\
+ RadioCheck = TRUE ; \
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_PARA_LINESPACE_20\
+ RadioCheck = TRUE ; \
+ };\
+ };\
+ };\
+ Text[ chinese_simplified ] = "о(~L)";\
+ Text[ russian ] = "";\
+ Text[ polish ] = "Odstp wierszy";\
+ Text[ japanese ] = "s(~L)";\
+ Text[ chinese_traditional ] = "Cj(~L)";\
+ Text[ arabic ] = " ";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = " (~L)";\
+ Text[ turkish ] = "~Satr aral";\
+ Text[ language_user1 ] = " ";\
+ };
+
+#define MN_DRWTXT \
+ MenuItem\
+ {\
+ ITEM_FORMAT_CHAR_DLG\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_PARA_DLG\
+ };
+
+#define MN_DRWTXTATTR \
+ MenuItem\
+ {\
+ Identifier = SID_DRAWTEXT_ATTR_DLG ; \
+ HelpID = SID_DRAWTEXT_ATTR_DLG ; \
+ Text = "~Text..." ; \
+ Text [ ENGLISH ] = "Te~xt..." ; \
+ Text [ english_us ] = "Te~xt..." ; \
+ Text [ italian ] = "~Testo..." ; \
+ Text [ spanish ] = "Te~xto..." ; \
+ Text [ french ] = "Te~xte..." ; \
+ Text [ dutch ] = "Te~kst..." ; \
+ /* ### ACHTUNG: Neuer Text in Resource? Textattribute fr die selektierten Textobjekte festlegen : Textattribute fr die selektierten Textobjekte festlegen */\
+ Text [ swedish ] = "~Text..." ; \
+ Text [ danish ] = "~Tekst..." ; \
+ Text [ portuguese ] = "Te~xto..." ; \
+ Text [ portuguese_brazilian ] = "Te~xt..." ; \
+ Text[ chinese_simplified ] = "(~X)...";\
+ Text[ russian ] = "~...";\
+ Text[ polish ] = "~Tekst...";\
+ Text[ japanese ] = "÷(~X)...";\
+ Text[ chinese_traditional ] = "r(~X)...";\
+ Text[ arabic ] = "~...";\
+ Text[ greek ] = "~...";\
+ Text[ korean ] = "ؽƮ(~X)...";\
+ Text[ turkish ] = "~Metin...";\
+ Text[ language_user1 ] = " ";\
+ };
+
+#define MN_ORIGINALSIZE \
+ MenuItem\
+ {\
+ Identifier = SID_ORIGINALSIZE ; \
+ HelpId = SID_ORIGINALSIZE ; \
+ /* ### ACHTUNG: Neuer Text in Resource? Originalgre : Originalgre */\
+ Text = "Original~gre" ; \
+ Text [ ENGLISH ] = "Real Size" ; \
+ Text [ norwegian ] = "Real Size" ; \
+ Text [ italian ] = "Dimensione ori~ginale" ; \
+ Text [ portuguese_brazilian ] = "Tamanho real" ; \
+ Text [ portuguese ] = "Tamanho original" ; \
+ Text [ finnish ] = "Todellinen koko" ; \
+ Text [ danish ] = "Oprindelig strrelse" ; \
+ Text [ french ] = "Taille d'origine" ; \
+ Text [ swedish ] = "Ori~ginalstorlek" ; \
+ Text [ dutch ] = "Originele ~grootte" ; \
+ Text [ spanish ] = "Ta~mao original" ; \
+ Text [ english_us ] = "~Original Size" ; \
+ Text[ chinese_simplified ] = "ԭС(~O)";\
+ Text[ russian ] = " ";\
+ Text[ polish ] = "Rozmiar oryginalny";\
+ Text[ japanese ] = "ؼ (~O)";\
+ Text[ chinese_traditional ] = "jp(~O)";\
+ Text[ arabic ] = " ";\
+ Text[ greek ] = " ~";\
+ Text[ korean ] = " ũ(~O)";\
+ Text[ turkish ] = "Gerek ~boyut";\
+ Text[ language_user1 ] = " ";\
+ };
+
+#define MN_MIRRORSUB \
+ MenuItem\
+ {\
+ Identifier = SUBMENU_OBJMIRROR ; \
+ HelpID = HID_SCMENU_OBJMIRROR ; \
+ Text = "Sp~iegeln" ; \
+ Text [ ENGLISH ] = "~Mirror" ; \
+ Text [ norwegian ] = "~Mirror" ; \
+ Text [ italian ] = "Ri~specchia" ; \
+ Text [ portuguese_brazilian ] = "~Espelho" ; \
+ Text [ portuguese ] = "~Reflectir" ; \
+ Text [ finnish ] = "P~eilaa" ; \
+ Text [ danish ] = "Spejl~vend" ; \
+ Text [ french ] = "~Reflter" ; \
+ Text [ swedish ] = "Sp~egla" ; \
+ Text [ dutch ] = "~Spiegelen" ; \
+ Text [ spanish ] = "~Reflejar" ; \
+ Text [ english_us ] = "~Flip" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ Identifier = SID_MIRROR_VERTICAL ; \
+ HelpId = SID_MIRROR_VERTICAL ; \
+ Text = "~Vertikal" ; \
+ Text [ ENGLISH ] = "~Vertical" ; \
+ Text [ norwegian ] = "~Vertikal" ; \
+ Text [ italian ] = "~Verticale" ; \
+ Text [ portuguese_brazilian ] = "~Vertical" ; \
+ Text [ portuguese ] = "~Vertical" ; \
+ Text [ finnish ] = "~Rinnakkain" ; \
+ Text [ danish ] = "~Lodret" ; \
+ Text [ french ] = "~Verticalement" ; \
+ Text [ swedish ] = "~Vertikalt" ; \
+ Text [ dutch ] = "~Verticaal" ; \
+ Text [ spanish ] = "~Vertical" ; \
+ Text [ english_us ] = "~Vertically" ; \
+ Text[ chinese_simplified ] = "ֱ(~V)";\
+ Text[ russian ] = "~ ";\
+ Text[ polish ] = "~W pionie";\
+ Text[ japanese ] = "E(~V)";\
+ Text[ chinese_traditional ] = "V(~V)";\
+ Text[ arabic ] = "~";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "(~V)";\
+ Text[ turkish ] = "~Dikey";\
+ Text[ language_user1 ] = " ";\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_MIRROR_HORIZONTAL ; \
+ HelpId = SID_MIRROR_HORIZONTAL ; \
+ Text = "~Horizontal" ; \
+ Text [ ENGLISH ] = "~Horizontal" ; \
+ Text [ norwegian ] = "~Horisontal" ; \
+ Text [ italian ] = "Orizzontale" ; \
+ Text [ portuguese_brazilian ] = "~Horizontal" ; \
+ Text [ portuguese ] = "~Horizontal" ; \
+ Text [ finnish ] = "~Allekkain" ; \
+ Text [ danish ] = "~Vandret" ; \
+ Text [ french ] = "H~orizontale" ; \
+ Text [ swedish ] = "~Horisontellt" ; \
+ Text [ dutch ] = "~Horizontaal" ; \
+ Text [ spanish ] = "~Horizontal" ; \
+ Text [ english_us ] = "~Horizontal" ; \
+ Text[ chinese_simplified ] = "ˮƽ(~H)";\
+ Text[ russian ] = " ";\
+ Text[ polish ] = "W pionie";\
+ Text[ japanese ] = "(~H)";\
+ Text[ chinese_traditional ] = "V(~H)";\
+ Text[ arabic ] = "";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "(~H)";\
+ Text[ turkish ] = "~Yatay";\
+ Text[ language_user1 ] = " ";\
+ };\
+ };\
+ };\
+ Text[ chinese_simplified ] = "ӳ(~F)";\
+ Text[ russian ] = "~";\
+ Text[ polish ] = "~Przerzu";\
+ Text[ japanese ] = "](~F)";\
+ Text[ chinese_traditional ] = "ϬM(~F)";\
+ Text[ arabic ] = "~";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "Ī(~F)";\
+ Text[ turkish ] = "~Yanst";\
+ Text[ language_user1 ] = " ";\
+ };
+
+#define MN_ARRANGESUB \
+ MenuItem\
+ {\
+ Identifier = SUBMENU_OBJARRANGE ; \
+ HelpID = HID_SCMENU_OBJARRANGE ; \
+ Text = "~Anordnung" ; \
+ Text [ ENGLISH ] = "Arrange" ; \
+ Text [ norwegian ] = "Arrange" ; \
+ Text [ italian ] = "~Disponi" ; \
+ Text [ portuguese_brazilian ] = "Organizar" ; \
+ Text [ portuguese ] = "~Dispoo" ; \
+ Text [ finnish ] = "Jrjest" ; \
+ Text [ danish ] = "Pl~acering" ; \
+ Text [ french ] = "~Disposition" ; \
+ Text [ swedish ] = "Pl~acering" ; \
+ Text [ dutch ] = "~Positie" ; \
+ Text [ spanish ] = "~Posicin" ; \
+ Text [ english_us ] = "~Arrange" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ ITEM_FORMAT_FRAME_TO_TOP\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_FRAME_UP ; \
+ HelpId = SID_FRAME_UP ; \
+ /* ### ACHTUNG: Neuer Text in Resource? W~eiter nach vorn : Weiter nach vorn */\
+ Text = "W~eiter nach vorn" ; \
+ Text [ ENGLISH ] = "Bring Forward" ; \
+ Text [ norwegian ] = "Flytt Framover" ; \
+ Text [ italian ] = "Porta pi ~avanti" ; \
+ Text [ portuguese_brazilian ] = "Tazer Para Frente" ; \
+ Text [ portuguese ] = "~Trazer para a frente" ; \
+ Text [ finnish ] = "Yksi eteen" ; \
+ Text [ danish ] = "F~lyt fremad" ; \
+ Text [ french ] = "V~ers l'avant" ; \
+ Text [ swedish ] = "Flytta l~ngre fram" ; \
+ Text [ dutch ] = "Verder naar ~voren" ; \
+ Text [ spanish ] = "Traer ms a~delante" ; \
+ Text [ english_us ] = "Bring ~Forward" ; \
+ Text[ chinese_simplified ] = "ǰ(~F)";\
+ Text[ russian ] = " ~";\
+ Text[ polish ] = "Przesu do przodu";\
+ Text[ japanese ] = "Oʂֈړ(~F)";\
+ Text[ chinese_traditional ] = "Aem(~F)";\
+ Text[ arabic ] = " ";\
+ Text[ greek ] = "~ ";\
+ Text[ korean ] = " (~ F)";\
+ Text[ turkish ] = "B~ir ne getir";\
+ Text[ language_user1 ] = " ";\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_FRAME_DOWN ; \
+ HelpId = SID_FRAME_DOWN ; \
+ /* ### ACHTUNG: Neuer Text in Resource? Weiter ~nach hinten : Weiter nach hinten */\
+ Text = "Weiter ~nach hinten" ; \
+ Text [ ENGLISH ] = "Send Backward" ; \
+ Text [ norwegian ] = "Send Bakover" ; \
+ Text [ italian ] = "Porta pi indietro" ; \
+ Text [ portuguese_brazilian ] = "Enviar Para o Fundo" ; \
+ Text [ portuguese ] = "Enviar para o ~fundo" ; \
+ Text [ finnish ] = "Yksi taakse" ; \
+ Text [ danish ] = "Flyt bag~ud" ; \
+ Text [ french ] = "~Vers l'arrire" ; \
+ Text [ swedish ] = "Flytta l~ngre bak" ; \
+ Text [ dutch ] = "Verder naar ~achteren" ; \
+ Text [ spanish ] = "Enviar hacia a~trs" ; \
+ Text [ english_us ] = "Send Back~ward" ; \
+ Text[ chinese_simplified ] = "ٺ(~W)";\
+ Text[ russian ] = " ~";\
+ Text[ polish ] = "Przesu do tyu";\
+ Text[ japanese ] = "wʂɈړ(~W)";\
+ Text[ chinese_traditional ] = "Am(~W)";\
+ Text[ arabic ] = " ";\
+ Text[ greek ] = "~ ";\
+ Text[ korean ] = "ڷ (~W)";\
+ Text[ turkish ] = "Bir ~geri gnder";\
+ Text[ language_user1 ] = " ";\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_FRAME_TO_BOTTOM\
+ };\
+ MenuItem { Separator = TRUE ; }; \
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_HEAVEN\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_HELL\
+ };\
+ };\
+ };\
+ Text[ chinese_simplified ] = "(~A)";\
+ Text[ russian ] = "~";\
+ Text[ polish ] = "~Rozmieszczenie";\
+ Text[ japanese ] = "(~A)";\
+ Text[ chinese_traditional ] = "Ƨ(~A)";\
+ Text[ arabic ] = "~";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "(~A)";\
+ Text[ turkish ] = "~Hizalama";\
+ Text[ language_user1 ] = " ";\
+ };
+
+#define MN_ANCHORSUB \
+ MenuItem\
+ {\
+ Identifier = SUBMENU_ANCHOR ; \
+ HelpID = HID_SCMENU_ANCHOR ; \
+ Text = "~Verankerung" ; \
+ Text [ ENGLISH ] = "Anchor" ; \
+ Text [ english_us ] = "An~chor" ; \
+ Text [ italian ] = "Anco~raggio" ; \
+ Text [ spanish ] = "~Anclaje" ; \
+ Text [ french ] = "~Ancrage" ; \
+ Text [ dutch ] = "~Verankering" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ Identifier = SID_ANCHOR_PAGE ; \
+ HelpId = SID_ANCHOR_PAGE ; \
+ Text = "An der ~Seite" ; \
+ Text [ ENGLISH ] = "To the ~page" ; \
+ Text [ dutch ] = "Aan ~pagina" ; \
+ Text [ english_us ] = "To P~age" ; \
+ Text [ italian ] = "Alla ~pagina" ; \
+ Text [ spanish ] = "A la ~pgina" ; \
+ Text [ french ] = " la ~page" ; \
+ Text [ swedish ] = "Vid ~sidan" ; \
+ Text [ danish ] = "Til ~siden" ; \
+ Text [ portuguese_brazilian ] = "An der ~Seite" ; \
+ Text [ portuguese ] = "~Na pgina" ; \
+ Text[ chinese_simplified ] = "ҳ(~A)";\
+ Text[ russian ] = "~ ";\
+ Text[ polish ] = "~Na stronie";\
+ Text[ japanese ] = "߰ނ(~A)";\
+ Text[ chinese_traditional ] = "bW(~A)";\
+ Text[ arabic ] = " ~";\
+ Text[ greek ] = "~ ";\
+ Text[ korean ] = "(~A)";\
+ Text[ turkish ] = "Sayfa~da";\
+ Text[ language_user1 ] = " ";\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_ANCHOR_CELL ; \
+ HelpId = SID_ANCHOR_CELL ; \
+ Text = "An der ~Zelle" ; \
+ Text [ ENGLISH ] = "To the ~cell" ; \
+ Text [ dutch ] = "Aan ~cel" ; \
+ Text [ english_us ] = "To ~Cell" ; \
+ Text [ italian ] = "Alla ~cella" ; \
+ Text [ spanish ] = "A la ~celda" ; \
+ Text [ french ] = " la ~cellule" ; \
+ Text [ swedish ] = "Vid ~cellen" ; \
+ Text [ danish ] = "Til cellen" ; \
+ Text [ portuguese ] = "~Clula" ; \
+ Text [ portuguese_brazilian ] = "An der ~Zelle" ; \
+ Text[ chinese_simplified ] = "ڵԪ(~C)";\
+ Text[ russian ] = " ";\
+ Text[ polish ] = "Przy komrce";\
+ Text[ japanese ] = "ق(~C)";\
+ Text[ chinese_traditional ] = "bxsW(~C)";\
+ Text[ arabic ] = "";\
+ Text[ greek ] = " ~";\
+ Text[ korean ] = " (~C)";\
+ Text[ turkish ] = "Hcre~de";\
+ Text[ language_user1 ] = " ";\
+ };\
+ };\
+ };\
+ Text [ swedish ] = "~Frankring" ; \
+ Text [ danish ] = "~Forankring" ; \
+ Text [ portuguese ] = "~ncora para" ; \
+ Text [ portuguese_brazilian ] = "~Verankerung" ; \
+ Text[ chinese_simplified ] = "(~C)";\
+ Text[ russian ] = "~";\
+ Text[ polish ] = "~Zakotwiczenie";\
+ Text[ japanese ] = "ݶ(~C)";\
+ Text[ chinese_traditional ] = "w(~C)";\
+ Text[ arabic ] = "~";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "(~C)";\
+ Text[ turkish ] = "Sa~bitleyici";\
+ Text[ language_user1 ] = " ";\
+ };
+
+#define MN_ALIGNSUB \
+ MenuItem\
+ {\
+ Identifier = SID_OBJECT_ALIGN ; \
+ HelpId = SID_OBJECT_ALIGN ; \
+ Text = "Aus~richtung" ; \
+ Text [ ENGLISH ] = "Ali~gnment" ; \
+ Text [ norwegian ] = "Ali~gnment" ; \
+ Text [ italian ] = "~Allineamento" ; \
+ Text [ portuguese_brazilian ] = "Ali~nhamento" ; \
+ Text [ portuguese ] = "Ali~nhamento" ; \
+ Text [ finnish ] = "~Tasaus" ; \
+ Text [ danish ] = "~Justering" ; \
+ Text [ french ] = "~Alignement" ; \
+ Text [ swedish ] = "Juste~ring" ; \
+ Text [ dutch ] = "~Uitlijning" ; \
+ Text [ spanish ] = "Ali~neacin" ; \
+ Text [ english_us ] = "A~lignment" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_LEFT\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_CENTER\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_RIGHT\
+ };\
+ MenuItem\
+ {\
+ Separator = TRUE ; \
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_UP\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_MIDDLE\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_OBJECT_ALIGN_DOWN\
+ };\
+ };\
+ };\
+ Text[ chinese_simplified ] = "(~L)";\
+ Text[ russian ] = "~";\
+ Text[ polish ] = "~Wyrwnanie";\
+ Text[ japanese ] = "zu(~L)";\
+ Text[ chinese_traditional ] = "(~L)";\
+ Text[ arabic ] = "~";\
+ Text[ greek ] = "~";\
+ Text[ korean ] = "(~L)";\
+ Text[ turkish ] = "Hiz~alama";\
+ Text[ language_user1 ] = " ";\
+ };
+
+ //
+ // ------------------------------------------------------------------------------
+ //
+ //
+ // Objekt-Leisten
+ //
+String RID_DRAW_OBJECTBAR
+{
+ Text = "Zeichenobjektleiste" ;
+ Text [ ENGLISH ] = "Toolbar for drawing objects" ;
+ Text [ norwegian ] = "Verktylinje for tegneobjekter " ;
+ Text [ italian ] = "Barra degli oggetti per disegno" ;
+ Text [ portuguese_brazilian ] = "Barra de Ferramentas para desenhar objetos" ;
+ Text [ portuguese ] = "Barra de objectos de desenho" ;
+ Text [ finnish ] = "Piirto-objektien tykalurivi" ;
+ Text [ danish ] = "Vrktjslinje for tegneobjekter" ;
+ Text [ french ] = "Barre d'objets de dessin" ;
+ Text [ swedish ] = "Ritobjektslist" ;
+ Text [ dutch ] = "Werkbalk voor tekenobjecten" ;
+ Text [ spanish ] = "Barra de objetos de dibujo" ;
+ Text [ english_us ] = "Drawing Object Bar" ;
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pasek obiektw rysunkowych";
+ Text[ japanese ] = "}``޼ުް";
+ Text[ chinese_traditional ] = "øϪuC";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "׸ ü ";
+ Text[ turkish ] = "izim nesne ubuu";
+ Text[ language_user1 ] = " ";
+};
+ToolBox RID_DRAW_OBJECTBAR
+{
+ HelpId = HID_SC_TOOLBOX_DRAW ;
+ Dockable = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Customize = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ LineSpacing = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ MenuStrings = TRUE ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_BEZIER_EDIT ;
+ HelpID = SID_BEZIER_EDIT ;
+
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ // Linien
+ ToolBoxItem
+ {
+ Identifier = SID_ATTRIBUTES_LINE ;
+ HelpId = SID_ATTRIBUTES_LINE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_LINEEND_STYLE ;
+ HelpID = SID_ATTR_LINEEND_STYLE ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_LINE_STYLE ;
+ HelpId = SID_ATTR_LINE_STYLE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_LINE_WIDTH ;
+ HelpId = SID_ATTR_LINE_WIDTH ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_LINE_COLOR ;
+ HelpId = SID_ATTR_LINE_COLOR ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_ATTRIBUTES_AREA ;
+ HelpId = SID_ATTRIBUTES_AREA ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_FILL_STYLE ;
+ HelpId = SID_ATTR_FILL_STYLE ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ // Rest
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_ROTATE ;
+ HelpId = SID_OBJECT_ROTATE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ANCHOR_TOGGLE ;
+ HelpId = SID_ANCHOR_TOGGLE ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_FRAME_TO_TOP ;
+ HelpId = SID_FRAME_TO_TOP ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FRAME_TO_BOTTOM ;
+ HelpId = SID_FRAME_TO_BOTTOM ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_HEAVEN ;
+ HelpID = SID_OBJECT_HEAVEN ;
+
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_HELL ;
+ HelpID = SID_OBJECT_HELL ;
+
+ };
+
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+
+ ToolBoxItem
+ {
+ Identifier = SID_GRID_VISIBLE;
+ HelpID = SID_GRID_VISIBLE;
+ Hide = TRUE;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_GRID_USE;
+ HelpID = SID_GRID_USE;
+ Hide = TRUE;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELPLINES_MOVE;
+ HelpID = SID_HELPLINES_MOVE;
+ Hide = TRUE;
+ };
+
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_ALIGN ;
+ HelpId = SID_OBJECT_ALIGN ;
+ };
+ };
+ Scroll = TRUE ;
+};
+ //
+ // Text-Toolbox
+ //
+String RID_TEXT_TOOLBOX
+{
+ Text = "Textobjektleiste" ;
+ Text [ ENGLISH ] = "Toolbar for text objects" ;
+ Text [ norwegian ] = "Verktylinje for tekstobjekter" ;
+ Text [ italian ] = "Barra degli oggetti di testo" ;
+ Text [ portuguese_brazilian ] = "Barra de ferramentas para objetos de texto" ;
+ Text [ portuguese ] = "Barra de objectos de texto" ;
+ Text [ finnish ] = "Tekstiobjektien tykalurivi" ;
+ Text [ danish ] = "Vrktjslinje for tekstobjekter" ;
+ Text [ french ] = "Barre d'objets de texte" ;
+ Text [ swedish ] = "Textobjektlist" ;
+ Text [ dutch ] = "Werkbalk voor tekstobjecten" ;
+ Text [ spanish ] = "Barra de objetos de texto" ;
+ Text [ english_us ] = "Text Object Bar" ;
+ Text[ chinese_simplified ] = "ֶ󹤾";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pasek obiektw tekstowych";
+ Text[ japanese ] = "÷ĵ޼ު ް";
+ Text[ chinese_traditional ] = "ruC";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ؽƮ ü ";
+ Text[ turkish ] = "Metin nesne ubuu";
+ Text[ language_user1 ] = " ";
+};
+ToolBox RID_TEXT_TOOLBOX
+{
+ HelpId = HID_SC_TOOLBOX_DRTEXT ;
+ LineSpacing = TRUE ;
+ Dockable = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Scroll = TRUE ;
+ Customize = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 0 , 0 ) ;
+ Align = BOXALIGN_TOP ;
+ MenuStrings = TRUE ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_CHAR_FONT ;
+ HelpId = SID_ATTR_CHAR_FONT ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_CHAR_FONTHEIGHT ;
+ HelpId = SID_ATTR_CHAR_FONTHEIGHT ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_CHAR_WEIGHT ;
+ HelpId = SID_ATTR_CHAR_WEIGHT ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_CHAR_POSTURE ;
+ HelpId = SID_ATTR_CHAR_POSTURE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_CHAR_UNDERLINE ;
+ HelpId = SID_ATTR_CHAR_UNDERLINE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ULINE_VAL_DOUBLE;
+ HelpId = SID_ULINE_VAL_DOUBLE;
+ AutoCheck = TRUE ;
+ Hide=TRUE;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_CHAR_COLOR ;
+ HelpId = SID_ATTR_CHAR_COLOR ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_PARA_LINESPACE_10 ;
+ HelpId = SID_ATTR_PARA_LINESPACE_10 ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_PARA_LINESPACE_15 ;
+ HelpId = SID_ATTR_PARA_LINESPACE_15 ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_PARA_LINESPACE_20 ;
+ HelpId = SID_ATTR_PARA_LINESPACE_20 ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_PARA_ADJUST_LEFT ;
+ HelpId = SID_ATTR_PARA_ADJUST_LEFT ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_PARA_ADJUST_CENTER ;
+ HelpId = SID_ATTR_PARA_ADJUST_CENTER ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_PARA_ADJUST_RIGHT ;
+ HelpId = SID_ATTR_PARA_ADJUST_RIGHT ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_ATTR_PARA_ADJUST_BLOCK ;
+ HelpId = SID_ATTR_PARA_ADJUST_BLOCK ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_SET_SUPER_SCRIPT ;
+ HelpID = SID_SET_SUPER_SCRIPT ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_SET_SUB_SCRIPT ;
+ HelpID = SID_SET_SUB_SCRIPT ;
+ };
+ //---------------------------------------------
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+ //---------------------------------------------
+ ToolBoxItem
+ {
+ Identifier = SID_CHAR_DLG ;
+ HelpID = SID_CHAR_DLG ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_PARA_DLG ;
+ HelpID = SID_PARA_DLG ;
+ };
+ };
+};
+ //
+ // Objekt-Menue, Draw
+ //
+Menu RID_OBJECTMENU_DRAW
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_FORMAT_ATTRIBUTES_LINE
+ };
+ MenuItem
+ {
+ ITEM_FORMAT_ATTRIBUTES_AREA
+ };
+ MN_DRWTXTATTR
+ MenuItem
+ {
+ ITEM_FORMAT_ATTR_TRANSFORM
+ };
+ MenuItem
+ {
+ ITEM_FORM_CONTROL_PROPERTIES
+ };
+ MenuItem
+ {
+ ITEM_FORM_PROPERTIES
+ };
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MN_MIRRORSUB
+ MN_ARRANGESUB
+ MN_ALIGNSUB
+ MN_ANCHORSUB
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MenuItem
+ {
+ ITEM_FORMAT_BEZIER_EDIT
+ RadioCheck = FALSE ;
+ AutoCheck = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_FORMAT_FONTWORK
+ };
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ ITEM_GROUP_MENU
+ };
+};
+ //
+ // Menu Text
+ //
+Menu RID_OBJECTMENU_DRAWTEXT
+{
+ ItemList =
+ {
+ MN_RESET
+ MenuItem { Separator = TRUE ; };
+ MN_TEXT_ATTR
+ MenuItem { Separator = TRUE ; };
+ MN_DRWTXT
+ MenuItem { Separator = TRUE ; };
+ MN_DRWTXTATTR
+ MenuItem
+ {
+ ITEM_FORMAT_FONTWORK
+ };
+ };
+};
+ //
+ // Popup-Menues ---------------------------------------------------------------------
+ //
+String RID_POPUP_DRAW
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Popup-Men fr Zeichenobjekte : Popup-Men fr Zeichenobjekte */
+ Text = "Popup-Men fr Zeichenobjekte" ;
+ Text [ ENGLISH ] = "Toolbar for drawing objects" ;
+ Text [ norwegian ] = "Verktylinje for tegneobjekter " ;
+ Text [ italian ] = "Barra degli strumenti per disegnare gli oggetti" ;
+ Text [ portuguese_brazilian ] = "Barra de Ferramentas para desenhar objetos" ;
+ Text [ portuguese ] = "Menu instantneo para objectos de desenho" ;
+ Text [ french ] = "Menu Pop-Up pour les objets de dessin" ;
+ Text [ dutch ] = "PopUp-menu voor tekenobjecten" ;
+ Text [ spanish ] = "Men emergente para objetos de dibujo" ;
+ Text [ danish ] = "Popup-menu for tegneobjekter" ;
+ Text [ swedish ] = "Popup-meny fr ritobjekt" ;
+ Text [ finnish ] = "Toolbar for drawing objects" ;
+ Text [ english_us ] = "Pop-up menu for drawing objects" ;
+ Text[ chinese_simplified ] = "ͼʽ˵";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Menu podrczne dla obiektw rysunkowych";
+ Text[ japanese ] = "߯߱ƭ `°ޯ";
+ Text[ chinese_traditional ] = "øϧ\\";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "׸ ü ˾ ޴";
+ Text[ turkish ] = "izim nesneleri iin alan mn";
+ Text[ language_user1 ] = " ";
+};
+ //
+ // Popup-Menue fuer (allgemeine) Zeichenobjekte
+ //
+Menu RID_POPUP_DRAW
+{
+ ItemList =
+ {
+ MenuItem { ITEM_FORMAT_ATTRIBUTES_LINE };
+ MenuItem { ITEM_FORMAT_ATTRIBUTES_AREA };
+ MN_DRWTXTATTR // Text...
+ MenuItem { ITEM_FORMAT_ATTR_TRANSFORM };
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MN_MIRRORSUB
+ MN_ARRANGESUB
+ MN_ALIGNSUB
+ MN_ANCHORSUB
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MenuItem
+ {
+ ITEM_FORMAT_BEZIER_EDIT
+ RadioCheck = FALSE ;
+ AutoCheck = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_FORMAT_FONTWORK
+ };
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ ITEM_GROUP_MENU
+ };
+};
+
+ //
+ // Popup-Menue fuer (Uno-) Controls
+ //
+
+Menu RID_POPUP_CONTROL
+{
+ ItemList =
+ {
+ MenuItem { ITEM_FORMAT_ATTR_TRANSFORM };
+ MenuItem { ITEM_FORM_CONTROL_PROPERTIES };
+ MenuItem { ITEM_FORM_PROPERTIES };
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MN_ARRANGESUB
+ MN_ALIGNSUB
+ MN_ANCHORSUB
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ ITEM_GROUP_MENU
+ };
+};
+
+ //
+ // Grafik
+ //
+
+Menu RID_POPUP_GRAPHIC
+{
+ ItemList =
+ {
+ MN_DRWTXTATTR
+ MenuItem { ITEM_FORMAT_ATTR_TRANSFORM };
+ MN_ORIGINALSIZE
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MN_MIRRORSUB
+ MN_ARRANGESUB
+ MN_ALIGNSUB
+ MN_ANCHORSUB
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ ITEM_GROUP_MENU
+ };
+};
+
+ //
+ // Ole-Objekt
+ //
+
+Menu RID_POPUP_OLE
+{
+ ItemList =
+ {
+ MenuItem { ITEM_FORMAT_ATTR_TRANSFORM };
+ MN_ORIGINALSIZE
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MN_ARRANGESUB
+ MN_ALIGNSUB
+ MN_ANCHORSUB
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ ITEM_GROUP_MENU
+ };
+};
+
+ //
+ // Charts
+ //
+
+Menu RID_POPUP_CHART
+{
+ ItemList =
+ {
+ MenuItem { ITEM_FORMAT_ATTR_TRANSFORM };
+ MN_ORIGINALSIZE
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ MN_ARRANGESUB
+ MN_ALIGNSUB
+ MN_ANCHORSUB
+ MenuItem
+ {
+ Identifier = SID_OPENDLG_MODCHART ;
+ HelpId = SID_OPENDLG_MODCHART ;
+ /* ### ACHTUNG: Neuer Text in Resource? Datenbereich ndern... : Datenbereich ndern... */
+ Text = "~Datenbereich ndern..." ;
+ Text [ ENGLISH ] = "Change data area..." ;
+ Text [ english_us ] = "~Modify Data Range..." ;
+ Text [ italian ] = "Cambia area dati..." ;
+ Text [ spanish ] = "Modificar rea de ~datos..." ;
+ Text [ french ] = "M~odifier la plage de donnes..." ;
+ Text [ dutch ] = "~Gegevensbereik veranderen..." ;
+ Text [ swedish ] = "ndra ~dataomrde..." ;
+ Text [ danish ] = "Rediger dataomrde..." ;
+ Text [ portuguese_brazilian ] = "Datenbereich ndern..." ;
+ Text [ portuguese ] = "~Modificar rea de dados..." ;
+ Text[ chinese_simplified ] = "(~M)...";
+ Text[ russian ] = " ...";
+ Text[ polish ] = "Zmie obszar danych..";
+ Text[ japanese ] = "ް̈̕ύX(~M)...";
+ Text[ chinese_traditional ] = "קưϰ(~M)...";
+ Text[ arabic ] = "... ";
+ Text[ greek ] = " ~...";
+ Text[ korean ] = " (~M)...";
+ Text[ turkish ] = "~Veri alann deitir...";
+ Text[ language_user1 ] = " ";
+ };
+ //------------------------------
+ MenuItem { Separator = TRUE ; };
+ //------------------------------
+ ITEM_GROUP_MENU
+ };
+};
+
+ //
+ // PopUpDraw Text
+ //
+
+String RID_POPUP_DRAWTEXT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Popup-Men fr Text-Objekte : Popup-Men fr Text-Objekte */
+ Text = "Popup-Men fr Text-Objekte" ;
+ Text [ English ] = "Popup menu for text objects" ;
+ Text [ english_us ] = "Pop-up menu for text objects" ;
+ Text [ italian ] = "Menu popup per gli oggetti di testo" ;
+ Text [ spanish ] = "Men emergente para objetos de texto" ;
+ Text [ french ] = "Menu Pop-Up pour les objets de texte" ;
+ Text [ dutch ] = "PopUp-menu voor tekstobjecten" ;
+ Text [ swedish ] = "Popup-meny fr textobjekt" ;
+ Text [ danish ] = "Popup-menu for tekstobjekter" ;
+ Text [ portuguese_brazilian ] = "Popup-Men fr Text-Objekte" ;
+ Text [ portuguese ] = "Menu instantneo para objectos de texto" ;
+ Text[ chinese_simplified ] = "ֶĵʽ˵";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Menu podrczne dla obiektw tekstowych";
+ Text[ japanese ] = "߯߱ƭ ÷ ޼ުėp";
+ Text[ chinese_traditional ] = "r\\";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ؽƮ ü ˾ ޴";
+ Text[ turkish ] = "Metin nesneleri iin alan mn";
+ Text[ language_user1 ] = " ";
+};
+
+Menu RID_POPUP_DRAWTEXT
+{
+ ItemList =
+ {
+ MN_RESET
+ MenuItem { Separator = TRUE ; };
+ MN_DRWTXTATTR
+ MenuItem { Separator = TRUE ; };
+ MenuItem
+ {
+ ITEM_FORMAT_ATTR_CHAR_FONT
+ };
+ MenuItem
+ {
+ ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT
+ };
+ // Stil, Ausrichtung, Zeilenabstand
+ MN_TEXT_ATTR
+ MenuItem { Separator = TRUE ; };
+ // Zeichen, Absatz
+ MN_DRWTXT
+ };
+};
+
+
diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx
new file mode 100644
index 000000000000..a94f3218ac18
--- /dev/null
+++ b/sc/source/ui/drawfunc/oleobjsh.cxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: oleobjsh.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:44:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+#include <svx/eeitem.hxx>
+#include <svx/fontwork.hxx>
+#include <svx/labdlg.hxx>
+#include <svx/srchitem.hxx>
+#include <svx/tabarea.hxx>
+#include <svx/tabline.hxx>
+#include <svx/textanim.hxx>
+#include <svx/transfrm.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/objface.hxx>
+#include <sfx2/request.hxx>
+#include <svtools/whiter.hxx>
+#include <vcl/msgbox.hxx>
+#include <segmentc.hxx>
+
+#include "oleobjsh.hxx"
+#include "drwlayer.hxx"
+#include "sc.hrc"
+#include "viewdata.hxx"
+#include "document.hxx"
+#include "docpool.hxx"
+#include "drawview.hxx"
+#include "scresid.hxx"
+
+#ifndef _SVDOBJ_HXX //autogen
+#include <svx/svdobj.hxx>
+#endif
+
+#define ScOleObjectShell
+#include "scslots.hxx"
+
+
+SFX_IMPL_INTERFACE(ScOleObjectShell, ScDrawShell, ScResId(SCSTR_OLEOBJECTSHELL) )
+{
+ SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ ScResId(RID_DRAW_OBJECTBAR) );
+ SFX_POPUPMENU_REGISTRATION( ScResId(RID_POPUP_OLE) );
+ SFX_OBJECTMENU_REGISTRATION( SID_OBJECTMENU0, ScResId(RID_OBJECTMENU_DRAW) );
+}
+
+TYPEINIT1( ScOleObjectShell, ScDrawShell );
+
+ScOleObjectShell::ScOleObjectShell(ScViewData* pData) :
+ ScDrawShell(pData)
+{
+ SetHelpId(HID_SCSHELL_OLEOBEJCTSH);
+ SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("OleObject")));
+}
+
+ScOleObjectShell::~ScOleObjectShell()
+{
+}
+
+
+