office-gobmx/sd/source/ui/func/futext.cxx

1544 lines
54 KiB
C++
Raw Normal View History

2000-09-18 11:07:07 -05:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 11:07:07 -05:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 11:07:07 -05:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 11:07:07 -05:00
*
* This file is part of OpenOffice.org.
2000-09-18 11:07:07 -05:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 11:07:07 -05:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 11:07:07 -05:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 11:07:07 -05:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
2000-09-18 11:07:07 -05:00
#include "futext.hxx"
#include <editeng/eeitem.hxx>
#include <editeng/editerr.hxx>
2000-09-18 11:07:07 -05:00
#include <svx/dlgutil.hxx>
#include <svx/svxerr.hxx>
#include <tools/urlobj.hxx>
2000-09-18 11:07:07 -05:00
#include <vcl/help.hxx>
#include <editeng/editstat.hxx>
#include <svl/aeitem.hxx>
#include <svl/intitem.hxx>
2000-09-18 11:07:07 -05:00
#include <svx/svdotext.hxx>
#include <svx/svdogrp.hxx>
#include <editeng/flditem.hxx>
#include <svl/style.hxx>
2000-09-18 11:07:07 -05:00
#include <svx/svdpagv.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
#include <editeng/editeng.hxx>
2000-09-18 11:07:07 -05:00
#include <svx/svdoutl.hxx>
#include <svx/svxids.hrc>
#include <sfx2/docfile.hxx>
2000-11-17 04:13:31 -06:00
#include <comphelper/processfactory.hxx>
#include <editeng/outlobj.hxx>
#include <svtools/langtab.hxx>
// #104122#
#include <editeng/frmdiritem.hxx>
#include <svx/svdetc.hxx>
#include <editeng/editview.hxx>
2000-09-18 11:07:07 -05:00
#include "sdresid.hxx"
#include "app.hrc"
#include "res_bmp.hrc"
#include "ViewShell.hxx"
#include "ViewShellBase.hxx"
#include "View.hxx"
#include "Outliner.hxx"
#include "Window.hxx"
2000-09-18 11:07:07 -05:00
#include "drawdoc.hxx"
#include "sdpage.hxx"
#include "sdmod.hxx"
#include "FrameView.hxx"
#include "ToolBarManager.hxx"
#include "DrawDocShell.hxx"
2000-09-18 11:07:07 -05:00
#include "glob.hrc"
#include "pres.hxx"
#include "optsitem.hxx"
2000-09-18 11:07:07 -05:00
using ::rtl::OUString;
2000-09-18 11:07:07 -05:00
using namespace ::com::sun::star;
2000-10-25 04:34:04 -05:00
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2;
2000-09-18 11:07:07 -05:00
namespace sd {
2000-09-18 11:07:07 -05:00
static USHORT SidArray[] = {
SID_STYLE_FAMILY2, // 5542
SID_STYLE_FAMILY5, // 5545
SID_CUT, // 5710
SID_COPY, // 5711
SID_ATTR_TABSTOP, // 10002
2000-09-18 11:07:07 -05:00
SID_ATTR_CHAR_FONT, // 10007
SID_ATTR_CHAR_POSTURE, // 10008
SID_ATTR_CHAR_WEIGHT, // 10009
SID_ATTR_CHAR_UNDERLINE, // 10014
SID_ATTR_CHAR_FONTHEIGHT, // 10015
SID_ATTR_CHAR_COLOR, // 10017
SID_ATTR_PARA_ADJUST_LEFT, // 10028
SID_ATTR_PARA_ADJUST_RIGHT, // 10029
SID_ATTR_PARA_ADJUST_CENTER, // 10030
SID_ATTR_PARA_ADJUST_BLOCK, // 10031
SID_ATTR_PARA_LINESPACE_10, // 10034
SID_ATTR_PARA_LINESPACE_15, // 10035
SID_ATTR_PARA_LINESPACE_20, // 10036
SID_ATTR_PARA_LRSPACE, // 10043
SID_OUTLINE_UP, // 10150
SID_OUTLINE_DOWN, // 10151
SID_OUTLINE_LEFT, // 10152
SID_OUTLINE_RIGHT, // 10153
SID_FORMTEXT_STYLE, // 10257
SID_SET_SUPER_SCRIPT, // 10294
SID_SET_SUB_SCRIPT, // 10295
SID_HYPERLINK_GETLINK, // 10361
CWS-TOOLING: integrate CWS mba32issues01 2009-05-05 18:23:27 +0200 mba r271547 : apply diffs from m45->m47 for all files moved from dialog to cui 2009-05-05 18:22:02 +0200 mba r271545 : apply diffs from m45->m47 for all files moved from dialog to cui 2009-05-05 18:16:42 +0200 mba r271544 : apply diffs from m45->m47 for all files moved from dialog to cui 2009-04-29 19:35:58 +0200 mba r271392 : #i73672#: unify commands for inserting special characters 2009-04-29 18:01:27 +0200 mba r271391 : #i101337#: missing string resources 2009-04-29 18:01:10 +0200 mba r271390 : #i101337#: missing string resources 2009-04-29 15:42:47 +0200 mba r271380 : concurrency problem in multithreaded dmake due to missing dependency 2009-04-28 17:36:03 +0200 tbo r271336 : #i99432# 2009-04-28 13:57:52 +0200 mba r271322 : #i101302#: ctor might be called with pSet=0 2009-04-22 19:32:39 +0200 tbo r271138 : #i99432# 2009-04-09 14:46:03 +0200 mba r270709 : make sendreportw32.cxx compile with pch 2009-04-06 16:05:07 +0200 mba r270568 : #i99432#: some tweaks for build order 2009-04-06 15:38:52 +0200 mba r270558 : typo 2009-04-06 13:36:19 +0200 mba r270542 : #i99432#: split of localization also 2009-04-06 13:19:06 +0200 mba r270539 : #i99432#: split up srs files also 2009-04-03 17:57:59 +0200 mba r270513 : #i99432#: split dialog folder into two 2009-04-03 17:56:46 +0200 mba r270512 : #i99432#: split dialog folder into two 2009-04-01 22:15:00 +0200 mba r270364 : warnings on Linux 2009-04-01 22:10:44 +0200 mba r270363 : warnings on Linux 2009-04-01 21:43:54 +0200 mba r270362 : warning fixed 2009-04-01 21:41:27 +0200 mba r270361 : warning on Linux fixed 2009-04-01 21:35:44 +0200 mba r270360 : warning fixed 2009-04-01 20:19:59 +0200 mba r270358 : warning found on Linux fixed 2009-04-01 19:23:38 +0200 mba r270354 : warning due to missing eof 2009-04-01 18:56:25 +0200 mba r270352 : linking problem fixed that appeared only on mac 2009-04-01 18:41:30 +0200 mba r270350 : warnings discovered on Linux fixed 2009-04-01 18:34:28 +0200 mba r270349 : some fixes for warnings and include problems discoverd after resync and build on mac 2009-04-01 14:08:22 +0200 mba r270328 : CWS-TOOLING: rebase CWS mba32issues01 to trunk@270033 (milestone: DEV300:m45) 2009-03-04 18:13:35 +0100 mba r268858 : #i99432#: more dialogs moved to cui 2009-03-04 17:47:41 +0100 mba r268854 : #i99432#: more dialogs moved to cui 2009-03-04 17:32:39 +0100 mba r268851 : warning fixed 2009-03-04 12:59:26 +0100 mba r268814 : #i99432#: more dialogs moved to cui 2009-03-04 11:49:03 +0100 mba r268802 : #i99432#: CharmapDialog moved to cui 2009-03-04 10:46:00 +0100 mba r268795 : #i99432#: CharmapDialog moved to cui 2009-03-04 10:43:50 +0100 mba r268794 : #i99432#: CharmapDialog moved to cui 2009-03-04 10:00:29 +0100 mba r268792 : #i99432#: CharmapDialog moved to cui 2009-03-04 10:00:03 +0100 mba r268791 : #i99432#: CharmapDialog moved to cui 2009-03-04 09:59:43 +0100 mba r268790 : #i99432#: CharmapDialog moved to cui 2009-03-04 09:58:51 +0100 mba r268789 : #i99432#: CharmapDialog moved to cui 2009-03-04 09:58:16 +0100 mba r268788 : #i99432#: CharmapDialog moved to cui 2009-03-03 16:33:14 +0100 mba r268763 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:32:28 +0100 mba r268762 : #i99432#: some tabpages moved to cui 2009-03-03 16:32:09 +0100 mba r268761 : #i99432#: some tabpages moved to cui 2009-03-03 16:29:40 +0100 mba r268760 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:29:08 +0100 mba r268759 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:28:41 +0100 mba r268758 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:28:18 +0100 mba r268757 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:27:36 +0100 mba r268756 : #i99465#: replace FN_SYMBOL by SID_CHARMAP 2009-03-03 16:27:02 +0100 mba r268755 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:26:23 +0100 mba r268754 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:25:30 +0100 mba r268753 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:24:49 +0100 mba r268752 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:24:35 +0100 mba r268751 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:23:20 +0100 mba r268750 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:23:04 +0100 mba r268749 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:21:56 +0100 mba r268748 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:18:39 +0100 mba r268747 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:13:14 +0100 mba r268745 : #i99465#: replace FN_SYMBOL by SID_CHARMAP 2009-03-03 16:02:54 +0100 mba r268738 : #i99432#: moved MacroAssignment TabPage from sfx2 2009-03-03 14:57:58 +0100 mba r268729 : #i99465#: transport return value via ItemSet 2009-03-03 00:08:10 +0100 mba r268701 : #i99432#: move acccfg to cuilib 2009-03-03 00:07:32 +0100 mba r268700 : #i99432#: move acccfg to cuilib 2009-03-03 00:02:01 +0100 mba r268699 : #i99432#: move acccfg to cuilib 2009-03-03 00:01:38 +0100 mba r268698 : #i99432#: move acccfg to cuilib 2009-03-03 00:01:11 +0100 mba r268697 : #i99432#: move acccfg to cuilib 2009-03-03 00:00:40 +0100 mba r268696 : #i99432#: move acccfg to cuilib 2009-03-03 00:00:06 +0100 mba r268695 : #i99432#: replace SfxAbstractSingleTabDialog by SfxAbstractDialog 2009-03-02 23:59:22 +0100 mba r268694 : #i99432#: move acccfg to cuilib 2009-03-02 23:57:19 +0100 mba r268693 : #i99432#: move acccfg to svx 2009-03-02 23:56:14 +0100 mba r268692 : #i99432#: replace SfxAbstractSingleTabDialog by SfxAbstractDialog 2009-03-02 23:49:37 +0100 mba r268691 : #i99785#: consolidate dialogs library 2009-03-02 17:26:40 +0100 mba r268683 : #i99785#: consolidate dialogs library 2009-03-02 17:24:28 +0100 mba r268682 : i99465#: consolidate slot for InsertSymbol command 2009-03-02 17:22:29 +0100 mba r268681 : #i99785#: consolidate dialogs library 2009-03-02 17:18:11 +0100 mba r268680 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 17:08:30 +0100 mba r268679 : #i99785#: consolidate dialogs library 2009-03-02 17:06:57 +0100 mba r268678 : #i99785#: consolidate dialogs library 2009-03-02 17:06:30 +0100 mba r268677 : #i99785#: consolidate dialogs library 2009-03-02 17:05:02 +0100 mba r268676 : #i99785#: consolidate dialogs library 2009-03-02 17:04:35 +0100 mba r268675 : #i99785#: consolidate dialogs library 2009-03-02 16:47:53 +0100 mba r268673 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:45:17 +0100 mba r268671 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:39:59 +0100 mba r268670 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:38:59 +0100 mba r268668 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:38:28 +0100 mba r268667 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:36:06 +0100 mba r268666 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:29:50 +0100 mba r268663 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:24:00 +0100 mba r268659 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:23:31 +0100 mba r268658 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:22:41 +0100 mba r268657 : i99432#: move accelconfig and macroassignment to cui 2009-02-25 16:57:26 +0100 mba r268453 : obsolete 2009-02-17 10:50:51 +0100 mba r267846 : obsolete 2009-02-12 16:33:54 +0100 mba r267676 : #i96834#: warning fixed 2009-02-11 19:28:47 +0100 mba r267626 : #i91978#: unused code 2009-02-11 18:37:47 +0100 mba r267625 : metafile output, fixes for 3 layer office 2009-02-11 12:56:28 +0100 mba r267593 : selective trees; incomplete build lists; metafile output
2009-05-06 05:59:57 -05:00
SID_CHARMAP, // 10503
2001-02-07 02:08:30 -06:00
SID_TEXTDIRECTION_LEFT_TO_RIGHT, // 10907
SID_TEXTDIRECTION_TOP_TO_BOTTOM, // 10908
2002-08-01 05:30:12 -05:00
SID_ATTR_PARA_LEFT_TO_RIGHT, // 10950
SID_ATTR_PARA_RIGHT_TO_LEFT, // 10951
2000-09-18 11:07:07 -05:00
FN_NUM_BULLET_ON, // 20138
SID_PARASPACE_INCREASE, // 27346
SID_PARASPACE_DECREASE, // 27347
0 };
TYPEINIT1( FuText, FuConstruct );
static BOOL bTestText = 0;
/*************************************************************************
|*
|* Basisklasse fuer Textfunktionen
|*
\************************************************************************/
FuText::FuText( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
: FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
, bFirstObjCreated(FALSE)
, rRequest (rReq)
{
}
FunctionReference FuText::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
{
FunctionReference xFunc( new FuText( pViewSh, pWin, pView, pDoc, rReq ) );
return xFunc;
}
2000-09-18 11:07:07 -05:00
/*************************************************************************
|*
|* Destruktor
|*
\************************************************************************/
void FuText::disposing()
2000-09-18 11:07:07 -05:00
{
if(mpView)
{
if(mpView->SdrEndTextEdit(FALSE) == SDRENDTEXTEDIT_DELETED)
mxTextObj.reset( 0 );
2000-09-18 11:07:07 -05:00
// die RequestHandler der benutzten Outliner zuruecksetzen auf den
// Handler am Dokument
::Outliner* pOutliner = mpView->GetTextEditOutliner();
2000-09-18 11:07:07 -05:00
if (pOutliner)
pOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(mpDoc->GetStyleSheetPool()));
2000-09-18 11:07:07 -05:00
}
}
/*************************************************************************
|*
|* Execute functionality of this class:
|*
|* #71422: Start the functionality of this class in this method
|* and not in the ctor.
|* If you construct an object of this class and you put the
|* address of this object to pFuActual you've got a problem,
|* because some methods inside DoExecute use the pFuActual-Pointer.
|* If the code inside DoExecute is executed inside the ctor,
|* the value of pFuActual is not right. And the value will not
|* be right until the ctor finished !!!
|*
\************************************************************************/
void FuText::DoExecute( SfxRequest& )
2000-09-18 11:07:07 -05:00
{
mpViewShell->GetViewShellBase().GetToolBarManager()->SetToolBarShell(
ToolBarManager::TBG_FUNCTION,
RID_DRAW_TEXT_TOOLBOX);
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_EDIT);
2000-09-18 11:07:07 -05:00
MouseEvent aMEvt(mpWindow->GetPointerPosPixel());
2000-09-18 11:07:07 -05:00
if (nSlotId == SID_TEXTEDIT)
2000-09-18 11:07:07 -05:00
{
// Try to select an object
SdrPageView* pPV = mpView->GetSdrPageView();
SdrViewEvent aVEvt;
mpView->PickAnything(aMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
mpView->MarkObj(aVEvt.pRootObj, pPV);
2000-09-18 11:07:07 -05:00
mxTextObj.reset( dynamic_cast< SdrTextObj* >( aVEvt.pObj ) );
}
else if (mpView->AreObjectsMarked())
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
if (rMarkList.GetMarkCount() == 1)
2000-09-18 11:07:07 -05:00
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
mxTextObj.reset( dynamic_cast< SdrTextObj* >( pObj ) );
}
}
2000-09-18 11:07:07 -05:00
// check for table
if (mpView->AreObjectsMarked())
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
if (rMarkList.GetMarkCount() == 1)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
if( pObj && (pObj->GetObjInventor() == SdrInventor ) && (pObj->GetObjIdentifier() == OBJ_TABLE) )
2000-09-18 11:07:07 -05:00
{
mpViewShell->GetViewShellBase().GetToolBarManager()->AddToolBarShell( ToolBarManager::TBG_FUNCTION, RID_DRAW_TABLE_TOOLBOX );
2000-09-18 11:07:07 -05:00
}
}
}
2000-09-18 11:07:07 -05:00
BOOL bQuickDrag = TRUE;
2000-09-18 11:07:07 -05:00
const SfxItemSet* pArgs = rRequest.GetArgs();
2000-09-18 11:07:07 -05:00
if (pArgs
// #98198# test for type before using
&& SID_TEXTEDIT == nSlotId
&& SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT)
&& (UINT16)((SfxUInt16Item&)pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
{
// Selection by doubleclick -> don't allow QuickDrag
bQuickDrag = FALSE;
2000-09-18 11:07:07 -05:00
}
SetInEditMode(aMEvt, bQuickDrag);
2000-09-18 11:07:07 -05:00
}
/*************************************************************************
|*
|* MouseButtonDown-event
|*
\************************************************************************/
BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
bMBDown = TRUE;
BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
/* af: (de)Select object before showing the context menu.
2000-09-18 11:07:07 -05:00
// Fuer PopupMenu (vorher DrawViewShell)
if ((rMEvt.GetButtons() == MOUSE_RIGHT) && rMEvt.GetClicks() == 1 &&
mpView->IsTextEdit())
2000-09-18 11:07:07 -05:00
{
return (TRUE);
}
*/
2000-09-18 11:07:07 -05:00
mpView->SetMarkHdlWhenTextEdit(TRUE);
2000-09-18 11:07:07 -05:00
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
2000-09-18 11:07:07 -05:00
if (eHit == SDRHIT_TEXTEDIT)
{
// Text getroffen -> Event von SdrView auswerten lassen
if (mpView->MouseButtonDown(rMEvt, mpWindow))
2000-09-18 11:07:07 -05:00
return (TRUE);
}
if (rMEvt.GetClicks() == 1)
{
if (mpView->IsTextEdit() && eHit != SDRHIT_MARKEDOBJECT && eHit != SDRHIT_HANDLE)
2000-09-18 11:07:07 -05:00
{
// Texteingabe beenden
if(mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
2000-09-18 11:07:07 -05:00
{
// Bugfix von MBA: bei Doppelclick auf der Wiese im Modus Text wird
// beim zweiten Click eHit = SDRHIT_TEXTEDITOBJ erhalten, weil ja der
// zweite Click auf das im ersten Click angelegte TextObject geht.
// Dieses wird aber in SdrEndTextEdit entfernt, weil es leer ist. Es
2000-09-18 11:07:07 -05:00
// befindet sich aber noch in der Mark-Liste und der Aufruf MarkObj
// weiter unten greift dann auf das tote Object zu.
// Als einfacher Fix wird nach SdrEndTextEdit noch einmal eHit ermittelt,
2000-09-18 11:07:07 -05:00
// was dann SDRHIT_NONE liefert.
mxTextObj.reset( NULL );
eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
2000-09-18 11:07:07 -05:00
}
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_EDIT);
2000-09-18 11:07:07 -05:00
}
if (rMEvt.IsLeft() || rMEvt.IsRight())
2000-09-18 11:07:07 -05:00
{
mpWindow->CaptureMouse();
2000-09-18 11:07:07 -05:00
SdrObject* pObj;
SdrPageView* pPV = mpView->GetSdrPageView();
2000-09-18 11:07:07 -05:00
if (eHit == SDRHIT_TEXTEDIT)
{
SetInEditMode(rMEvt, FALSE);
}
else
{
BOOL bMacro = FALSE;
CWS-TOOLING: integrate CWS aw065 2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation 2009-06-16 15:45:28 +0200 wg r273021 : i102838 2009-06-16 12:46:07 +0200 wg r273016 : i102833 2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper 2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected 2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect 2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition 2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct) 2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync 2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync 2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync 2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49) 2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives 2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged() 2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition 2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping 2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping 2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped 2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped 2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped 2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped 2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state 2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state 2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state 2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state 2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state 2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state 2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications 2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications 2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications 2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications 2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications 2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications 2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications 2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds 2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling 2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations 2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked 2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared 2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes 2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes 2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH 2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH 2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH 2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync 2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync 2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47) 2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed 2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected 2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done 2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done 2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done 2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done 2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done 2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done 2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done 2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done 2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done 2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping 2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes 2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes 2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes 2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change 2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 09:28:15 -05:00
if (bMacro && mpView->PickObj(aMDPos,mpView->getHitTolLog(),pObj,pPV,SDRSEARCH_PICKMACRO))
2000-09-18 11:07:07 -05:00
{
// Makro
USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
mpView->BegMacroObj(aMDPos,nHitLog,pObj,pPV,mpWindow);
2000-09-18 11:07:07 -05:00
}
else
{
if (eHit != SDRHIT_HANDLE)
{
// Selektion aufheben
if (!rMEvt.IsShift() && eHit == SDRHIT_TEXTEDITOBJ)
{
mpView->UnmarkAll();
mpView->SetDragMode(SDRDRAG_MOVE);
2000-09-18 11:07:07 -05:00
}
}
if ( aVEvt.eEvent == SDREVENT_EXECUTEURL ||
eHit == SDRHIT_HANDLE ||
eHit == SDRHIT_MARKEDOBJECT ||
eHit == SDRHIT_TEXTEDITOBJ ||
( eHit == SDRHIT_UNMARKEDOBJECT && bFirstObjCreated &&
!bPermanent ) )
{
/**********************************************************
* Handle, markiertes oder unmarkiertes Objekt getroffen
**********************************************************/
if (eHit == SDRHIT_TEXTEDITOBJ)
{
/******************************************************
* Text eines unmarkierten Objekts getroffen:
* Objekt wird selektiert und in EditMode versetzt
******************************************************/
mpView->MarkObj(aVEvt.pRootObj, pPV);
2000-09-18 11:07:07 -05:00
if (aVEvt.pObj && aVEvt.pObj->ISA(SdrTextObj))
{
mxTextObj.reset( static_cast<SdrTextObj*>(aVEvt.pObj) );
2000-09-18 11:07:07 -05:00
}
SetInEditMode(rMEvt, TRUE);
}
else if (aVEvt.eEvent == SDREVENT_EXECUTEURL && !rMEvt.IsMod2())
{
/******************************************************
* URL ausfuehren
******************************************************/
mpWindow->ReleaseMouse();
2000-09-18 11:07:07 -05:00
SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL());
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
2001-06-12 06:46:15 -05:00
SfxBoolItem aBrowseItem( SID_BROWSE, TRUE );
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
mpWindow->ReleaseMouse();
2000-09-18 11:07:07 -05:00
if (rMEvt.IsMod1())
{
// Im neuen Frame oeffnen
pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aStrItem, &aBrowseItem, &aReferer, 0L);
}
else
{
// Im aktuellen Frame oeffnen
SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
}
}
else
{
/******************************************************
* Objekt oder Handle draggen
******************************************************/
// #i78748#
// do the EndTextEdit first, it will delete the handles and force a
// recreation. This will make aVEvt.pHdl to point to a deleted handle,
// thus it is necessary to reset it and to get it again.
::Outliner* pOutl = mpView->GetTextEditOutliner();
if (mxTextObj.is() && (mxTextObj->GetOutlinerParaObject() ||
(pOutl && pOutl->GetText(pOutl->GetParagraph( 0 )).Len() != 0)))
{
mpView->SdrEndTextEdit();
if(aVEvt.pHdl)
{
// force new handle identification, the pointer will be dead here
// since SdrEndTextEdit has resetted (deleted) the handles.
aVEvt.pHdl = 0;
mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
}
}
2000-09-18 11:07:07 -05:00
if (!aVEvt.pHdl)
{
if( eHit == SDRHIT_UNMARKEDOBJECT )
{
if ( !rMEvt.IsShift() )
mpView->UnmarkAll();
2000-09-18 11:07:07 -05:00
mpView->MarkObj(aVEvt.pRootObj, pPV);
2000-09-18 11:07:07 -05:00
}
// Objekt draggen
bFirstMouseMove = TRUE;
aDragTimer.Start();
}
if ( ! rMEvt.IsRight())
{
// we need to pick again since SdrEndTextEdit can rebuild the handles list
eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
if( (eHit == SDRHIT_HANDLE) || (eHit == SDRHIT_MARKEDOBJECT) )
{
USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog);
}
}
bReturn = true;
2000-09-18 11:07:07 -05:00
}
}
else if ( nSlotId != SID_TEXTEDIT &&
(bPermanent || !bFirstObjCreated) )
{
/**********************************************************
* Objekt erzeugen
**********************************************************/
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_CREATE);
USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegCreateObj(aMDPos, (OutputDevice*) NULL, nDrgLog);
2000-09-18 11:07:07 -05:00
}
else
{
/**********************************************************
* Selektieren
**********************************************************/
if( !rMEvt.IsShift() )
mpView->UnmarkAll();
2000-09-18 11:07:07 -05:00
mpView->BegMarkObj( aMDPos );
2000-09-18 11:07:07 -05:00
}
}
}
}
}
else if ( rMEvt.GetClicks() == 2 && !mpView->IsTextEdit() )
2000-09-18 11:07:07 -05:00
{
MouseEvent aMEvt( mpWindow->GetPointerPosPixel() );
2000-09-18 11:07:07 -05:00
SetInEditMode( aMEvt, FALSE );
}
if (!bIsInDragMode)
{
ForcePointer(&rMEvt);
mpViewShell->GetViewFrame()->GetBindings().Invalidate(SidArray);
2000-09-18 11:07:07 -05:00
}
return (bReturn);
}
/*************************************************************************
|*
|* MouseMove-event
|*
\************************************************************************/
BOOL FuText::MouseMove(const MouseEvent& rMEvt)
{
BOOL bReturn = FuDraw::MouseMove(rMEvt);
if (aDragTimer.IsActive() )
{
if( bFirstMouseMove )
bFirstMouseMove = FALSE;
else
aDragTimer.Stop();
}
if (!bReturn && mpView->IsAction() && !mpDocSh->IsReadOnly())
2000-09-18 11:07:07 -05:00
{
Point aPix(rMEvt.GetPosPixel());
Point aPnt(mpWindow->PixelToLogic(aPix));
2000-09-18 11:07:07 -05:00
ForceScroll(aPix);
mpView->MovAction(aPnt);
2000-09-18 11:07:07 -05:00
}
ForcePointer(&rMEvt);
return (bReturn);
}
/*************************************************************************
|*
|* MouseButtonUp-event
|*
\************************************************************************/
// #97016#
void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
{
if(mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS)
{
if( nSlotId == SID_ATTR_CHAR )
{
// Impress-Textobjekt wird erzeugt (faellt auf Zeilenhoehe zusammen)
// Damit das Objekt beim anschliessenden Erzeugen gleich die richtige
// Hoehe bekommt (sonst wird zuviel gepainted)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameHeightItem(0));
aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
aSet.Put(SdrTextAutoGrowHeightItem(TRUE));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
aSet.Put(SdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height()));
pTxtObj->SetMergedItemSet(aSet);
}
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
{
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameWidthItem(0));
aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
// #91853# Needs to be set since default is SDRTEXTHORZADJUST_BLOCK
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
aSet.Put(SdrTextMaxFrameWidthItem(pTxtObj->GetLogicRect().GetSize().Width()));
pTxtObj->SetMergedItemSet(aSet);
}
}
else
{
if( nSlotId == SID_ATTR_CHAR_VERTICAL )
{
// draw text object, needs to be initialized when vertical text is used
SfxItemSet aSet(mpViewShell->GetPool());
// #91510#
aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
// #91508#
//aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
//aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
// #107235#
// Set defaults for vertical klick-n'drag text object, pool defaults are:
// SdrTextVertAdjustItem: SDRTEXTVERTADJUST_TOP
// SdrTextHorzAdjustItem: SDRTEXTHORZADJUST_BLOCK
// Analog to that (thus, #91508# was not completely correct):
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_BLOCK));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
pTxtObj->SetMergedItemSet(aSet);
}
}
}
// #97016#
void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
{
// FitToSize (An Rahmen anpassen)
SfxItemSet aSet(mpViewShell->GetPool(), SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
}
// #97016#
void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj)
{
SfxItemSet aSet(mpViewShell->GetPool(),
SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
}
// #97016#
void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj)
{
// Normales Textobjekt
if (mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS)
{
if( nSlotId == SID_ATTR_CHAR )
{
// Impress-Textobjekt (faellt auf Zeilenhoehe zusammen)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameHeightItem(0));
aSet.Put(SdrTextMaxFrameHeightItem(0));
aSet.Put(SdrTextAutoGrowHeightItem(TRUE));
aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
pTxtObj->SetMergedItemSet(aSet);
}
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
{
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameWidthItem(0));
aSet.Put(SdrTextMaxFrameWidthItem(0));
aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
pTxtObj->SetMergedItemSet(aSet);
}
pTxtObj->AdjustTextFrameWidthAndHeight();
}
}
2000-09-18 11:07:07 -05:00
BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
{
BOOL bReturn = FALSE;
if (aDragTimer.IsActive())
{
aDragTimer.Stop();
bIsInDragMode = FALSE;
}
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
2000-09-18 11:07:07 -05:00
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
2000-09-18 11:07:07 -05:00
CWS-TOOLING: integrate CWS impress172 2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 12:01:07 -05:00
if( (mpView && mpView->MouseButtonUp(rMEvt, mpWindow)) || rMEvt.GetClicks() == 2 )
2000-09-18 11:07:07 -05:00
return (TRUE); // Event von der SdrView ausgewertet
BOOL bEmptyTextObj = FALSE;
if (mxTextObj.is())
2000-09-18 11:07:07 -05:00
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
2000-09-18 11:07:07 -05:00
if (rMarkList.GetMarkCount() == 1
&& ( rMarkList.GetMark(0)->GetMarkedSdrObj() == mxTextObj.get()) )
2000-09-18 11:07:07 -05:00
{
if( mxTextObj.is() && !GetTextObj()->GetOutlinerParaObject() )
2000-09-18 11:07:07 -05:00
bEmptyTextObj = TRUE;
else
bFirstObjCreated = TRUE;
}
else
{
mxTextObj.reset( 0 );
}
2000-09-18 11:07:07 -05:00
}
if( mpView && mpView->IsDragObj())
2000-09-18 11:07:07 -05:00
{
/**********************************************************************
* Objekt wurde verschoben
**********************************************************************/
FrameView* pFrameView = mpViewShell->GetFrameView();
2000-09-18 11:07:07 -05:00
BOOL bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
if (bDragWithCopy)
{
bDragWithCopy = !mpView->IsPresObjSelected(FALSE, TRUE);
2000-09-18 11:07:07 -05:00
}
mpView->SetDragWithCopy(bDragWithCopy);
mpView->EndDragObj( mpView->IsDragWithCopy() );
mpView->ForceMarkedToAnotherPage();
mpView->SetCurrentObj(OBJ_TEXT);
2000-09-18 11:07:07 -05:00
}
else if( mpView && mpView->IsCreateObj() && rMEvt.IsLeft())
2000-09-18 11:07:07 -05:00
{
/**********************************************************************
* Objekt wurde erzeugt
**********************************************************************/
mxTextObj.reset( dynamic_cast< SdrTextObj* >( mpView->GetCreateObj() ) );
if( mxTextObj.is() )
2000-09-18 11:07:07 -05:00
{
//AW outliner needs to be set to vertical when there is no
// outliner object up to now; also it needs to be set back to not
// vertical when there was a vertical one used last time.
OutlinerParaObject* pOPO = GetTextObj()->GetOutlinerParaObject();
SdrOutliner& rOutl = mxTextObj->GetModel()->GetDrawOutliner(GetTextObj());
BOOL bVertical((pOPO && pOPO->IsVertical())
|| nSlotId == SID_ATTR_CHAR_VERTICAL
|| nSlotId == SID_TEXT_FITTOSIZE_VERTICAL);
rOutl.SetVertical(bVertical);
// #107235#
// Before ImpSetAttributesForNewTextObject the vertical writing mode
// needs to be set at the object. This is done here at the OutlinerParaObject
// directly to not mirror the layout text items involved. These items will be set
// from ImpSetAttributesForNewTextObject and below.
OutlinerParaObject* pPara = GetTextObj()->GetOutlinerParaObject();
if(!pPara)
{
GetTextObj()->ForceOutlinerParaObject();
pPara = GetTextObj()->GetOutlinerParaObject();
}
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 08:16:02 -06:00
if(pPara && (bool)bVertical != pPara->IsVertical())
{
// set ParaObject orientation accordingly
pPara->SetVertical(bVertical);
}
// #97016#
ImpSetAttributesForNewTextObject(GetTextObj());
2000-09-18 11:07:07 -05:00
}
if (!mpView->EndCreateObj(SDRCREATE_FORCEEND))
2000-09-18 11:07:07 -05:00
{
// Textobjekt konnte nicht erzeugt werden
mxTextObj.reset(0);
2000-09-18 11:07:07 -05:00
}
else if (nSlotId == SID_TEXT_FITTOSIZE)
{
// #97016#
ImpSetAttributesFitToSize(GetTextObj());
2000-09-18 11:07:07 -05:00
SetInEditMode(rMEvt, FALSE);
}
2001-02-07 02:08:30 -06:00
else if ( nSlotId == SID_TEXT_FITTOSIZE_VERTICAL )
{
// #97016#
ImpSetAttributesFitToSizeVertical(GetTextObj());
2001-02-07 02:08:30 -06:00
SetInEditMode(rMEvt, FALSE);
}
2000-09-18 11:07:07 -05:00
else
{
// #97016#
ImpSetAttributesFitCommon(GetTextObj());
2000-09-18 11:07:07 -05:00
// Damit die Handles und der graue Rahmen stimmen
mpView->AdjustMarkHdl();
mpView->PickHandle(aPnt);
2000-09-18 11:07:07 -05:00
SetInEditMode(rMEvt, FALSE);
}
}
else if ( mpView && mpView->IsAction())
2000-09-18 11:07:07 -05:00
{
mpView->EndAction();
2000-09-18 11:07:07 -05:00
}
ForcePointer(&rMEvt);
mpWindow->ReleaseMouse();
USHORT nDrgLog1 = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
2000-09-18 11:07:07 -05:00
if ( mpView && !mpView->AreObjectsMarked() &&
Abs(aMDPos.X() - aPnt.X()) < nDrgLog1 &&
Abs(aMDPos.Y() - aPnt.Y()) < nDrgLog1 &&
2000-09-18 11:07:07 -05:00
!rMEvt.IsShift() && !rMEvt.IsMod2() )
{
SdrPageView* pPV = mpView->GetSdrPageView();
2000-09-18 11:07:07 -05:00
SdrViewEvent aVEvt;
mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
mpView->MarkObj(aVEvt.pRootObj, pPV);
2000-09-18 11:07:07 -05:00
}
if ( !mxTextObj.is() && mpView )
2000-09-18 11:07:07 -05:00
{
if ( ( (!bEmptyTextObj && bPermanent) ||
(!bFirstObjCreated && !bPermanent) ) &&
!mpDocSh->IsReadOnly() &&
2000-09-18 11:07:07 -05:00
nSlotId != SID_TEXTEDIT )
{
/**********************************************************************
* Mengentext (linksbuendiges AutoGrow)
**********************************************************************/
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_CREATE);
USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegCreateObj(aMDPos, (OutputDevice*) NULL, nDrgLog);
2000-09-18 11:07:07 -05:00
BOOL bSnapEnabled = mpView->IsSnapEnabled();
2000-09-18 11:07:07 -05:00
if (bSnapEnabled)
mpView->SetSnapEnabled(FALSE);
2000-09-18 11:07:07 -05:00
aPnt.X() += nDrgLog + nDrgLog;
aPnt.Y() += nDrgLog + nDrgLog;
mpView->MovAction(aPnt);
2000-09-18 11:07:07 -05:00
mxTextObj.reset( dynamic_cast< SdrTextObj* >( mpView->GetCreateObj() ) );
2000-09-18 11:07:07 -05:00
if(mxTextObj.is())
2000-09-18 11:07:07 -05:00
{
GetTextObj()->SetDisableAutoWidthOnDragging(TRUE);
2000-09-18 11:07:07 -05:00
}
if(!mpView->EndCreateObj(SDRCREATE_FORCEEND))
2000-09-18 11:07:07 -05:00
{
mxTextObj.reset(0);
2000-09-18 11:07:07 -05:00
}
if(bSnapEnabled)
mpView->SetSnapEnabled(bSnapEnabled);
2000-09-18 11:07:07 -05:00
if(mxTextObj.is())
2000-09-18 11:07:07 -05:00
{
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameHeightItem(0));
aSet.Put(SdrTextMinFrameWidthItem(0));
aSet.Put(SdrTextAutoGrowHeightItem(TRUE));
aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
// #91508#
if(nSlotId == SID_ATTR_CHAR_VERTICAL)
{
// #107235#
//
// Here, all items which need to be different from pool default need to be set
// again on the newly created text object.
// Since this is a simple klick text object, it is first created, then SetVertical()
// is used, then ImpSetAttributesForNewTextObject is called and then the object is
// deleted again since not the minimum drag distance was travelled. Then, a new
// klick text object is created and thus all that stuff needs to be set again here.
//
// Before using the new object the vertical writing mode
// needs to be set. This is done here at the OutlinerParaObject
// directly to not mirror the layout text items involved. These items will be set
// below.
OutlinerParaObject* pPara = GetTextObj()->GetOutlinerParaObject();
if(!pPara)
{
GetTextObj()->ForceOutlinerParaObject();
pPara = GetTextObj()->GetOutlinerParaObject();
}
if(pPara && sal_True != pPara->IsVertical())
{
// set ParaObject orientation accordingly
pPara->SetVertical(sal_True);
}
// #91508#
// aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
// #107235#
// Analog to the else case below, for vertical simple click texts
// one of the defaulted setted items from ImpSetAttributesForNewTextObject
// needs to be adapted to non-block mode. This could have been done with the
// #104122#, but was obviously overseen.
const SfxItemSet& rSet = mpView->GetDefaultAttr();
SvxFrameDirection eDirection = (SvxFrameDirection)((SvxFrameDirectionItem&)rSet.Get(EE_PARA_WRITINGDIR)).GetValue();
if(FRMDIR_HORI_RIGHT_TOP == eDirection || FRMDIR_VERT_TOP_RIGHT == eDirection)
{
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_BOTTOM));
}
else
{
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
}
}
else
{
// #104122# This is for Format/Page settings. Since this also leads
// to the object defaults to be changed, i think this code can be
// removed. CL. wanted to take a look before adding this.
//const SdrTextHorzAdjust eHA = ( ( pDoc && pDoc->GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB ) ?
// SDRTEXTHORZADJUST_RIGHT : SDRTEXTHORZADJUST_LEFT );
//aSet.Put( SdrTextHorzAdjustItem( eHA ) );
// #104122# Look in the object defaults if left-to-right is wanted. If
// yes, set text anchoring to right to let the box grow to left.
const SfxItemSet& rSet = mpView->GetDefaultAttr();
SvxFrameDirection eDirection = (SvxFrameDirection)((SvxFrameDirectionItem&)rSet.Get(EE_PARA_WRITINGDIR)).GetValue();
if(FRMDIR_HORI_RIGHT_TOP == eDirection)
{
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
}
else
{
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_LEFT));
}
}
GetTextObj()->SetMergedItemSet(aSet);
GetTextObj()->SetDisableAutoWidthOnDragging(TRUE);
2000-09-18 11:07:07 -05:00
SetInEditMode(rMEvt, FALSE);
}
bFirstObjCreated = TRUE;
}
else
{
// In die Fkt. Selektion wechseln
if (mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
2000-09-18 11:07:07 -05:00
{
mxTextObj.reset(0);
2000-09-18 11:07:07 -05:00
}
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_OBJECT_SELECT,
2000-09-18 11:07:07 -05:00
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
}
}
bMBDown = FALSE;
FuConstruct::MouseButtonUp(rMEvt);
return (bReturn);
}
/*************************************************************************
|*
|* Tastaturereignisse bearbeiten
|*
|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
|* FALSE.
|*
\************************************************************************/
BOOL FuText::KeyInput(const KeyEvent& rKEvt)
{
BOOL bReturn = FALSE;
mpView->SetMarkHdlWhenTextEdit(TRUE);
2000-09-18 11:07:07 -05:00
KeyCode nCode = rKEvt.GetKeyCode();
BOOL bShift = nCode.IsShift();
// #97016# IV
if(mxTextObj.is())
{
// maybe object is deleted, test if it's equal to the selected object
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
SdrObject* pSelectedObj = 0L;
if(1 == rMarkList.GetMarkCount())
{
SdrMark* pMark = rMarkList.GetMark(0);
pSelectedObj = pMark->GetMarkedSdrObj();
}
if(mxTextObj.get() != pSelectedObj)
{
mxTextObj.reset(0);
}
}
if ( mxTextObj.is() && mxTextObj->GetObjInventor() == SdrInventor && mxTextObj->GetObjIdentifier() == OBJ_TITLETEXT && rKEvt.GetKeyCode().GetCode() == KEY_RETURN )
2000-09-18 11:07:07 -05:00
{
// Titeltext-Objekt: immer "weiche" Umbrueche
bShift = TRUE;
}
USHORT nKey = nCode.GetCode();
CWS-TOOLING: integrate CWS macshortcuts01 2009-04-02 18:13:38 +0200 pl r270430 : CWS-TOOLING: rebase CWS macshortcuts01 to trunk@270033 (milestone: DEV300:m45) 2009-03-04 13:02:01 +0100 pl r268816 : make compile with oldish gtk headers 2009-03-04 11:23:41 +0100 rvojta r268799 : Remove #ifndef MACOSX as Mac OS X X11 port is obsolote, no need to check for non Mac OS X 2009-03-03 16:33:34 +0100 rvojta r268764 : Meta/Super to MOD3 on all Unix platforms except Mac OS X 2009-03-03 16:08:46 +0100 rvojta r268744 : Map GDK_Meta_L/R and GDK_Super_L/R keys to KEY_MOD3 on Unix systems except Mac OS X 2009-03-03 16:04:23 +0100 rvojta r268742 : IsMod3(), IsLeftMod3(), IsRightMod3() added 2009-03-03 16:03:48 +0100 rvojta r268741 : MODKEY_LMOD3, MODKEY_RMOD3, MODKEY_MOD3 support 2009-02-28 00:09:26 +0100 rvojta r268620 : New KeyCode constructors support, by default MOD3 is not used here (probably temporary solution) 2009-02-25 22:53:02 +0100 rvojta r268469 : MOD3 support (META_DOWN_MASK) 2009-02-25 13:22:13 +0100 rvojta r268435 : Cmd-M to minimize window, Cmd-Option-M to minimize all windows 2009-02-25 11:09:20 +0100 rvojta r268417 : Add back F11 for non Mac OS X platforms (removed by accident in r268405) 2009-02-24 18:32:31 +0100 rvojta r268405 : F11 replaced by Cmd-T on Mac OS X 2009-02-23 15:21:53 +0100 sb r268358 : #i99296# support values with both xml:lang and install:module (which are moved into the spool tree, not the res tree) 2009-02-16 22:45:34 +0100 rvojta r267839 : Multiplatform shortcuts support 2009-02-16 22:41:03 +0100 rvojta r267838 : Use install:module instead of separate xcu file 2009-02-16 18:35:36 +0100 rvojta r267833 : Removed accelerators target 2009-02-16 09:27:42 +0100 rvojta r267776 : MOD3 added 2009-02-16 09:18:32 +0100 rvojta r267775 : MOD3 support 2009-02-16 09:17:11 +0100 rvojta r267774 : MOD3 support 2009-02-15 22:11:37 +0100 rvojta r267773 : Check for MOD3 too 2009-02-15 22:11:15 +0100 rvojta r267772 : Check for MOD3 too 2009-02-15 22:10:37 +0100 rvojta r267771 : Check for MOD3 too 2009-02-15 22:10:15 +0100 rvojta r267770 : Check for MOD3 during mouse event too 2009-02-15 22:09:54 +0100 rvojta r267769 : IsMod3() added 2009-02-15 19:34:59 +0100 rvojta r267768 : MOD3 added (Ctrl on Mac OS X) 2009-02-15 19:33:43 +0100 rvojta r267767 : Cmd-M -> Ctrl-M for default format 2009-02-15 19:32:19 +0100 rvojta r267766 : MOD3 added (Ctrl on Mac OS X) 2009-02-15 19:31:30 +0100 rvojta r267765 : MOD3 added (Ctrl on Mac OS X) 2009-02-15 19:31:04 +0100 rvojta r267764 : MOD3 added (Ctrl on Mac OS X) 2009-02-15 19:30:33 +0100 rvojta r267763 : MOD3 added (Ctrl on Mac OS X) 2009-02-15 19:30:09 +0100 rvojta r267762 : MOD3 added (Ctrl on Mac OS X) 2009-02-13 22:11:22 +0100 rvojta r267751 : Cmd-Shift-Z for .uno:Redo 2009-02-13 22:04:19 +0100 rvojta r267748 : F11 -> Cmd-T for .uno:DesignerDialog 2009-02-13 21:09:11 +0100 rvojta r267743 : F11 -> Cmd-T (all occurences) 2009-02-13 19:47:21 +0100 rvojta r267741 : accelerators target added for Mac OS X shortcuts 2009-02-13 19:46:58 +0100 rvojta r267740 : Spreadsheet - replace F11 with Cmd-T 2009-02-13 19:24:19 +0100 rvojta r267739 : Remove Accelerators-Mac.xcs 2009-02-13 18:50:01 +0100 rvojta r267738 : Accelerators-Mac.xcs test 2009-02-13 18:48:10 +0100 rvojta r267737 : Accelerators-Mac.xcu added 2009-02-13 18:46:48 +0100 rvojta r267736 : F11 -> Cmd-T for stylist in Spreadsheet
2009-04-11 23:24:43 -05:00
KeyCode aKeyCode (nKey, bShift, nCode.IsMod1(), nCode.IsMod2(), nCode.IsMod3() );
2000-09-18 11:07:07 -05:00
KeyEvent aKEvt(rKEvt.GetCharCode(), aKeyCode);
BOOL bOK = TRUE;
if (mpDocSh->IsReadOnly())
2000-09-18 11:07:07 -05:00
{
bOK = !EditEngine::DoesKeyChangeText(aKEvt);
}
if( aKeyCode.GetCode() == KEY_PAGEUP || aKeyCode.GetCode() == KEY_PAGEDOWN )
{
bOK = FALSE; // default handling in base class
}
if (bOK && mpView->KeyInput(aKEvt, mpWindow) )
2000-09-18 11:07:07 -05:00
{
bReturn = TRUE;
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
2000-09-18 11:07:07 -05:00
2001-03-26 07:37:56 -06:00
// if ( pTextObj )
// pTextObj->SetEmptyPresObj(FALSE);
2000-09-18 11:07:07 -05:00
}
else if (aKeyCode == KEY_ESCAPE)
{
bReturn = cancel();
2000-09-18 11:07:07 -05:00
}
if( bPermanent )
{
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_CREATE);
2000-09-18 11:07:07 -05:00
}
if (!bReturn)
{
bReturn = FuDraw::KeyInput(aKEvt);
}
return (bReturn);
}
/*************************************************************************
|*
|* Function aktivieren
|*
\************************************************************************/
void FuText::Activate()
{
mpView->SetQuickTextEditMode(mpViewShell->GetFrameView()->IsQuickEdit());
2000-09-18 11:07:07 -05:00
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 08:05:59 -06:00
// #i89661# it's no longer necessary to make it so big here, it's fine tuned
CWS-TOOLING: integrate CWS aw065 2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation 2009-06-16 15:45:28 +0200 wg r273021 : i102838 2009-06-16 12:46:07 +0200 wg r273016 : i102833 2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper 2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected 2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect 2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition 2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct) 2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync 2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync 2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync 2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49) 2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives 2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged() 2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition 2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping 2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping 2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped 2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped 2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped 2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped 2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state 2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state 2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state 2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state 2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state 2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state 2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications 2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications 2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications 2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications 2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications 2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications 2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications 2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds 2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling 2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations 2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked 2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared 2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes 2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes 2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH 2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH 2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH 2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync 2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync 2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47) 2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed 2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected 2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done 2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done 2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done 2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done 2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done 2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done 2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done 2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done 2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done 2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping 2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes 2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes 2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes 2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change 2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 09:28:15 -05:00
// for text objects in SdrMarkView::CheckSingleSdrObjectHit
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 08:05:59 -06:00
mpView->SetHitTolerancePixel( 2 * HITPIX );
2000-09-18 11:07:07 -05:00
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
2000-09-18 11:07:07 -05:00
if (pOLV)
pOLV->ShowCursor();
FuConstruct::Activate();
if( pOLV )
mpView->SetEditMode(SDREDITMODE_EDIT);
2000-09-18 11:07:07 -05:00
}
/*************************************************************************
|*
|* Function deaktivieren
|*
\************************************************************************/
void FuText::Deactivate()
{
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
2000-09-18 11:07:07 -05:00
if (pOLV)
pOLV->HideCursor();
mpView->SetHitTolerancePixel( HITPIX );
2000-09-18 11:07:07 -05:00
FuConstruct::Deactivate();
}
/*************************************************************************
|*
|* Objekt in Edit-Mode setzen
|*
\************************************************************************/
void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
{
SdrPageView* pPV = mpView->GetSdrPageView();
if( mxTextObj.is() && (mxTextObj->GetPage() == pPV->GetPage()) )
2000-09-18 11:07:07 -05:00
{
mpView->SetCurrentObj(OBJ_TEXT);
2000-09-18 11:07:07 -05:00
if( bPermanent )
mpView->SetEditMode(SDREDITMODE_CREATE);
2000-09-18 11:07:07 -05:00
else
mpView->SetEditMode(SDREDITMODE_EDIT);
2000-09-18 11:07:07 -05:00
BOOL bEmptyOutliner = FALSE;
if (!GetTextObj()->GetOutlinerParaObject() && mpView->GetTextEditOutliner())
2000-09-18 11:07:07 -05:00
{
::Outliner* pOutl = mpView->GetTextEditOutliner();
2000-09-18 11:07:07 -05:00
ULONG nParaAnz = pOutl->GetParagraphCount();
Paragraph* p1stPara = pOutl->GetParagraph( 0 );
if (nParaAnz==1 && p1stPara)
{
// Bei nur einem Pararaph
if (pOutl->GetText(p1stPara).Len() == 0)
{
bEmptyOutliner = TRUE;
}
}
}
if (GetTextObj() != mpView->GetTextEditObject() || bEmptyOutliner)
2000-09-18 11:07:07 -05:00
{
UINT32 nInv = mxTextObj->GetObjInventor();
UINT16 nSdrObjKind = mxTextObj->GetObjIdentifier();
2000-09-18 11:07:07 -05:00
if (nInv == SdrInventor && GetTextObj()->HasTextEdit() &&
2000-09-18 11:07:07 -05:00
(nSdrObjKind == OBJ_TEXT ||
nSdrObjKind == OBJ_TITLETEXT ||
nSdrObjKind == OBJ_OUTLINETEXT || !mxTextObj->IsEmptyPresObj() ) )
2000-09-18 11:07:07 -05:00
{
// Neuen Outliner machen (gehoert der SdrObjEditView)
SdrOutliner* pOutl = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, mpDoc );
2000-09-18 11:07:07 -05:00
if (bEmptyOutliner)
mpView->SdrEndTextEdit(sal_True);
2000-09-18 11:07:07 -05:00
SdrTextObj* pTextObj = GetTextObj();
if( pTextObj )
{
OutlinerParaObject* pOPO = pTextObj->GetOutlinerParaObject();
if( ( pOPO && pOPO->IsVertical() ) || (nSlotId == SID_ATTR_CHAR_VERTICAL) || (nSlotId == SID_TEXT_FITTOSIZE_VERTICAL) )
pOutl->SetVertical( TRUE );
2001-02-05 04:35:37 -06:00
if( pTextObj->getTextCount() > 1 )
{
Point aPix(rMEvt.GetPosPixel());
Point aPnt(mpWindow->PixelToLogic(aPix));
pTextObj->setActiveText( pTextObj->CheckTextHit(aPnt ) );
}
2001-02-05 04:35:37 -06:00
if (mpView->SdrBeginTextEdit(pTextObj, pPV, mpWindow, sal_True, pOutl) && mxTextObj->GetObjInventor() == SdrInventor)
{
bFirstObjCreated = TRUE;
DeleteDefaultText();
2000-09-18 11:07:07 -05:00
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
2000-09-18 11:07:07 -05:00
nSdrObjKind = mxTextObj->GetObjIdentifier();
2000-09-18 11:07:07 -05:00
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
2000-09-18 11:07:07 -05:00
if (eHit == SDRHIT_TEXTEDIT)
2000-09-18 11:07:07 -05:00
{
// Text getroffen
if (nSdrObjKind == OBJ_TEXT ||
nSdrObjKind == OBJ_TITLETEXT ||
nSdrObjKind == OBJ_OUTLINETEXT ||
nSdrObjKind == OBJ_TABLE ||
nSlotId == SID_TEXTEDIT ||
!bQuickDrag)
{
pOLV->MouseButtonDown(rMEvt);
pOLV->MouseMove(rMEvt);
pOLV->MouseButtonUp(rMEvt);
}
2000-09-18 11:07:07 -05:00
if (mpViewShell->GetFrameView()->IsQuickEdit() && bQuickDrag && GetTextObj()->GetOutlinerParaObject())
{
pOLV->MouseButtonDown(rMEvt);
}
}
else
2000-09-18 11:07:07 -05:00
{
// #98198# Move cursor to end of text
ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND);
pOLV->SetSelection(aNewSelection);
2000-09-18 11:07:07 -05:00
}
}
else
{
mpView->RestoreDefaultText(dynamic_cast< SdrTextObj* >( mxTextObj.get() ));
}
2000-09-18 11:07:07 -05:00
}
}
}
}
else
{
mxTextObj.reset(0);
2000-09-18 11:07:07 -05:00
}
}
/*************************************************************************
|*
|* Texteingabe wird gestartet, ggf. Default-Text loeschen
|*
\************************************************************************/
BOOL FuText::DeleteDefaultText()
{
BOOL bDeleted = FALSE;
if ( mxTextObj.is() && mxTextObj->IsEmptyPresObj() )
2000-09-18 11:07:07 -05:00
{
String aString;
SdPage* pPage = (SdPage*) mxTextObj->GetPage();
2000-09-18 11:07:07 -05:00
if (pPage)
{
PresObjKind ePresObjKind = pPage->GetPresObjKind(mxTextObj.get());
2000-09-18 11:07:07 -05:00
if ( (ePresObjKind == PRESOBJ_TITLE ||
ePresObjKind == PRESOBJ_OUTLINE ||
ePresObjKind == PRESOBJ_NOTES ||
ePresObjKind == PRESOBJ_TEXT) &&
!pPage->IsMasterPage() )
{
::Outliner* pOutliner = mpView->GetTextEditOutliner();
2000-09-18 11:07:07 -05:00
SfxStyleSheet* pSheet = pOutliner->GetStyleSheet( 0 );
BOOL bIsUndoEnabled = pOutliner->IsUndoEnabled();
if( bIsUndoEnabled )
pOutliner->EnableUndo(FALSE);
2000-09-18 11:07:07 -05:00
pOutliner->SetText( String(), pOutliner->GetParagraph( 0 ) );
if( bIsUndoEnabled )
pOutliner->EnableUndo(TRUE);
2000-09-18 11:07:07 -05:00
if (pSheet &&
(ePresObjKind == PRESOBJ_NOTES || ePresObjKind == PRESOBJ_TEXT))
pOutliner->SetStyleSheet(0, pSheet);
mxTextObj->SetEmptyPresObj(TRUE);
2000-09-18 11:07:07 -05:00
bDeleted = TRUE;
}
}
}
return(bDeleted);
}
/*************************************************************************
|*
|* Command-event
|*
\************************************************************************/
BOOL FuText::Command(const CommandEvent& rCEvt)
{
return( FuPoor::Command(rCEvt) );
}
/*************************************************************************
|*
|* Help-event
|*
\************************************************************************/
BOOL FuText::RequestHelp(const HelpEvent& rHEvt)
{
BOOL bReturn = FALSE;
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
2000-09-18 11:07:07 -05:00
if ((Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled()) &&
mxTextObj.is() && pOLV && pOLV->GetFieldUnderMousePointer())
2000-09-18 11:07:07 -05:00
{
String aHelpText;
const SvxFieldItem* pFieldItem = pOLV->GetFieldUnderMousePointer();
const SvxFieldData* pField = pFieldItem->GetField();
if (pField && pField->ISA(SvxURLField))
{
/******************************************************************
* URL-Field
******************************************************************/
aHelpText = INetURLObject::decode( ((const SvxURLField*)pField)->GetURL(), '%', INetURLObject::DECODE_WITH_CHARSET );
2000-09-18 11:07:07 -05:00
}
if (aHelpText.Len())
{
Rectangle aLogicPix = mpWindow->LogicToPixel(mxTextObj->GetLogicRect());
Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()),
mpWindow->OutputToScreenPixel(aLogicPix.BottomRight()));
2000-09-18 11:07:07 -05:00
if (Help::IsBalloonHelpEnabled())
{
bReturn = Help::ShowBalloon( (Window*)mpWindow, rHEvt.GetMousePosPixel(), aScreenRect, aHelpText);
2000-09-18 11:07:07 -05:00
}
else if (Help::IsQuickHelpEnabled())
{
bReturn = Help::ShowQuickHelp( (Window*)mpWindow, aScreenRect, aHelpText);
2000-09-18 11:07:07 -05:00
}
}
}
if (!bReturn)
{
bReturn = FuConstruct::RequestHelp(rHEvt);
}
return(bReturn);
}
/*************************************************************************
|*
|* Request verarbeiten
|*
\************************************************************************/
void FuText::ReceiveRequest(SfxRequest& rReq)
{
nSlotId = rReq.GetSlot();
// Dann Basisklasse rufen (dort wird u.a. nSlotId NICHT gesetzt)
FuPoor::ReceiveRequest(rReq);
if (nSlotId == SID_TEXTEDIT || mpViewShell->GetFrameView()->IsQuickEdit() || /*#95971#*/ SID_ATTR_CHAR == nSlotId)
2000-09-18 11:07:07 -05:00
{
MouseEvent aMEvt(mpWindow->GetPointerPosPixel());
2000-09-18 11:07:07 -05:00
mxTextObj.reset(0);
2000-09-18 11:07:07 -05:00
if (nSlotId == SID_TEXTEDIT)
{
// Wird gerade editiert?
if(!bTestText)
mxTextObj.reset( dynamic_cast< SdrTextObj* >( mpView->GetTextEditObject() ) );
2000-09-18 11:07:07 -05:00
if (!mxTextObj.is())
2000-09-18 11:07:07 -05:00
{
// Versuchen, ein Obj zu selektieren
SdrPageView* pPV = mpView->GetSdrPageView();
2000-09-18 11:07:07 -05:00
SdrViewEvent aVEvt;
mpView->PickAnything(aMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
mpView->MarkObj(aVEvt.pRootObj, pPV);
2000-09-18 11:07:07 -05:00
if (aVEvt.pObj && aVEvt.pObj->ISA(SdrTextObj))
{
mxTextObj.reset( static_cast< SdrTextObj* >( aVEvt.pObj ) );
2000-09-18 11:07:07 -05:00
}
}
}
else if (mpView->AreObjectsMarked())
2000-09-18 11:07:07 -05:00
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
2000-09-18 11:07:07 -05:00
if (rMarkList.GetMarkCount() == 1)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
2000-09-18 11:07:07 -05:00
if (pObj->ISA(SdrTextObj))
{
mxTextObj.reset( static_cast< SdrTextObj* >( pObj ) );
2000-09-18 11:07:07 -05:00
}
}
}
BOOL bQuickDrag = TRUE;
const SfxItemSet* pArgs = rReq.GetArgs();
if (pArgs
// #98198# test for type before using
&& SID_TEXTEDIT == nSlotId
&& SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT)
&& (UINT16) ((SfxUInt16Item&) pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
2000-09-18 11:07:07 -05:00
{
// Anwahl per Doppelklick -> kein QuickDrag zulassen
bQuickDrag = FALSE;
}
SetInEditMode(aMEvt, bQuickDrag);
}
}
/*************************************************************************
|*
|* SpellChecker: Error-LinkHdl
|*
\************************************************************************/
IMPL_LINK( FuText, SpellError, void *, nLang )
{
String aError( SvtLanguageTable::GetLanguageString( (LanguageType)(ULONG)nLang ) );
2000-09-18 11:07:07 -05:00
ErrorHandler::HandleError(* new StringErrorInfo(
ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aError) );
return 0;
}
/*************************************************************************
|*
|* Reaktion auf Doppelklick
|*
\************************************************************************/
void FuText::DoubleClick(const MouseEvent& )
2000-09-18 11:07:07 -05:00
{
// Nichts zu tun
}
/** #97016#
#105815# Removed the insertion of default text and putting a new text
object directly into edit mode.
*/
SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle)
{
// case SID_TEXTEDIT: // BASIC ???
// case SID_ATTR_CHAR:
// case SID_ATTR_CHAR_VERTICAL:
// case SID_TEXT_FITTOSIZE:
// case SID_TEXT_FITTOSIZE_VERTICAL:
SdrObject* pObj = SdrObjFactory::MakeNewObject(
mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
0L, mpDoc);
if(pObj)
{
if(pObj->ISA(SdrTextObj))
{
SdrTextObj* pText = (SdrTextObj*)pObj;
pText->SetLogicRect(rRectangle);
sal_Bool bVertical = (SID_ATTR_CHAR_VERTICAL == nID || SID_TEXT_FITTOSIZE_VERTICAL == nID);
pText->SetVerticalWriting(bVertical);
// #97016#
ImpSetAttributesForNewTextObject(pText);
if (nSlotId == SID_TEXT_FITTOSIZE)
{
// #97016#
ImpSetAttributesFitToSize(pText);
}
else if ( nSlotId == SID_TEXT_FITTOSIZE_VERTICAL )
{
// #97016#
ImpSetAttributesFitToSizeVertical(pText);
}
else
{
// #97016#
ImpSetAttributesFitCommon(pText);
}
// Put text object into edit mode.
SdrPageView* pPV = mpView->GetSdrPageView();
mpView->SdrBeginTextEdit(pText, pPV);
}
else
{
DBG_ERROR("Object is NO text object");
}
}
2000-09-18 11:07:07 -05:00
return pObj;
}
2000-09-18 11:07:07 -05:00
/** is called when the currenct function should be aborted. <p>
This is used when a function gets a KEY_ESCAPE but can also
be called directly.
@returns true if a active function was aborted
*/
bool FuText::cancel()
{
if ( mpView->IsTextEdit() )
{
if(mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
mxTextObj.reset(0);
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_EDIT);
return true;
}
else
{
return false;
}
}
CWS-TOOLING: integrate CWS impressfontsize 2008-12-11 14:15:16 +0100 wg r265298 : i97125 2008-12-11 12:54:53 +0100 wg r265288 : i97125 2008-12-11 12:53:03 +0100 wg r265287 : i97125 2008-12-11 11:25:42 +0100 wg r265270 : i97125 2008-12-11 10:22:13 +0100 wg r265253 : i97125 2008-12-11 09:22:47 +0100 wg r265247 : i97125 2008-12-09 15:28:51 +0100 cl r265097 : added missing toolbar buttons for inc/dec font size 2008-12-08 17:39:46 +0100 cl r265012 : #i80257# added autolayout text only 2008-12-08 17:32:07 +0100 cl r265011 : #i80257# added autolayout text only 2008-12-08 16:42:19 +0100 cl r265008 : #i94459# fixed a bug in insertByName and replaceByName 2008-12-08 16:25:26 +0100 cl r265007 : #i80257# new image for text only auto layout in impress 2008-12-08 16:24:01 +0100 cl r265006 : #i80257# new image for text only auto layout in impress 2008-12-08 16:01:46 +0100 cl r265003 : #i88855# changed wording from Monitor to Display 2008-12-08 15:57:24 +0100 cl r265002 : #i91904# applied patch to fix a wrong index access 2008-12-05 12:51:47 +0100 cl r264900 : #i8824# allow setting of text properties at shape without reformating text 2008-12-05 11:09:21 +0100 cl r264895 : fixed build problem 2008-12-04 12:04:09 +0100 cl r264829 : fixed build issue 2008-12-04 11:03:58 +0100 cl r264823 : #i8824# set new fontsize at shape 2008-12-02 22:39:22 +0100 cl r264732 : fixed build problem 2008-12-02 22:38:42 +0100 cl r264731 : fixed build problem 2008-12-01 17:44:29 +0100 cl r264623 : CWS-TOOLING: rebase CWS impressfontsize to trunk@264325 (milestone: DEV300:m36) 2008-11-07 11:38:13 +0100 cl r263418 : #i95920# fixed an OpenSolaris build breaker 2008-11-06 14:56:04 +0100 cl r263386 : #i40730# added support to supress export of hidden slides to html 2008-11-06 14:55:41 +0100 cl r263385 : #i40730# added support to supress export of hidden slides to html 2008-11-06 14:03:59 +0100 cl r263384 : #158530# allow editing of interaction links with hyperlink editor 2008-10-20 15:34:13 +0200 cl r262322 : #i8824# migrate cws impressfontsize to subversion.
2008-12-11 09:25:59 -06:00
void FuText::ChangeFontSize( bool bGrow, OutlinerView* pOLV, const FontList* pFontList, ::sd::View* pView )
{
if( !pFontList || !pView )
return;
if( pOLV )
{
pOLV->GetEditView().ChangeFontSize( bGrow, pFontList );
}
else
{
// SdDrawDocument* pDoc = pView->GetDoc();
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
for( sal_uInt32 nMark = 0; nMark < rMarkList.GetMarkCount(); nMark++ )
{
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( rMarkList.GetMark(nMark)->GetMarkedSdrObj() );
if( pTextObj )
{
for( sal_Int32 nText = 0; nText < pTextObj->getTextCount(); nText++ )
{
pTextObj->setActiveText( nText );
// Put text object into edit mode.
SdrPageView* pPV = pView->GetSdrPageView();
pView->SdrBeginTextEdit(pTextObj, pPV);
pOLV = pView->GetTextEditOutlinerView();
if( pOLV )
{
EditEngine* pEditEngine = pOLV->GetEditView().GetEditEngine();
if( pEditEngine )
{
ESelection aSel;
aSel.nEndPara = pEditEngine->GetParagraphCount()-1;
aSel.nEndPos = pEditEngine->GetTextLen(aSel.nEndPara);
pOLV->SetSelection(aSel);
}
ChangeFontSize( bGrow, pOLV, pFontList, pView );
}
pView->SdrEndTextEdit();
}
SfxItemSet aShapeSet( pTextObj->GetMergedItemSet() );
if( EditView::ChangeFontSize( bGrow, aShapeSet, pFontList ) )
{
pTextObj->SetObjectItemNoBroadcast( aShapeSet.Get( EE_CHAR_FONTHEIGHT ) );
pTextObj->SetObjectItemNoBroadcast( aShapeSet.Get( EE_CHAR_FONTHEIGHT_CJK ) );
pTextObj->SetObjectItemNoBroadcast( aShapeSet.Get( EE_CHAR_FONTHEIGHT_CTL ) );
}
}
}
}
}
} // end of namespace sd