Files
libreoffice/sw/source/ui/cctrl/actctrl.cxx
Kurt Zenker df78782330 CWS-TOOLING: integrate CWS hb32bugs02
2009-09-02 Henning Brinkmann #i102420# revert changes
2009-08-26 Henning Brinkmann merged DEV300_m56
2009-08-19 Henning Brinkmann merged DEV300_m55
2009-08-14 Henning Brinkmann merged changes from wntmsci12
2009-08-12 Henning Brinkmann Implemented NoSpaceEdit constructor and destructor in .cxx to allow compile with debug on wntmsci12.
2009-08-12 Henning Brinkmann Added some SW_DLLPUBLIC to make compilable on wntmsci12.
2009-08-11 Henning Brinkmann #i102420# dbg_out: surround output for SwNodes with <nodes-array>.
2009-08-10 Henning Brinkmann #i102420# rewritten debug output for SwNodes.
2009-08-07 Henning Brinkmann #i102420# debug _MoveNodes: output the destination, too. Break after two iterations.
2009-08-07 Henning Brinkmann #i102420# _MoveNodes: Additionally check if destination index is inside source => false
Check if current range was already handled => loop
Debug output current range
2009-08-06 Henning Brinkmann merged DEV300_m54
2009-08-06 Henning Brinkmann added master fix
2009-08-06 Henning Brinkmann debug output for SwNodeRange
2009-08-04 Henning Brinkmann #i102844# robustness: check for NULL pointer to prevent crash
2009-08-03 Henning Brinkmann #i103475# applied patch and verified
2009-08-03 Henning Brinkmann Removed code preventing build of sw with DEBUG.
2009-09-11 convert-repo update tags
2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
2009-09-05 22:49:00 +0200 ydario  r275858 : #i99588# applied os2port06 diff to DEV300 tree.
2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono  r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono  r275554 : i#104522: mingw port printf format fix
2009-09-10 kz CWS-TOOLING: integrate CWS mh232
2009-08-26 03:52:57 +0200 mh  r275385 : #i102182# FreeBSD patch
2009-08-26 03:43:20 +0200 mh  r275384 : #i101333# patch for FreeBSD
2009-08-26 03:11:20 +0200 mh  r275383 : #i39230
2009-08-26 03:07:51 +0200 mh  r275382 : #i39230# more space for initials field
2009-08-26 02:41:19 +0200 mh  r275380 : #i39230# use vos::osecurity for reading the user name
2009-08-18 22:06:00 +0200 mh  r275130 : #i104243#, line ending problem with newer perl
2009-08-18 21:53:21 +0200 mh  r275129 : #i39230# read initials via getpwnam
2009-08-18 21:34:05 +0200 mh  r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
2009-08-17 18:02:59 +0200 mh  r275067 : #i95498# make compile with gcc3
2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
2009-09-07 14:31:06 +0200 is  r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 09:17:29 +00:00

142 lines
3.8 KiB
C++

/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: actctrl.cxx,v $
* $Revision: 1.9 $
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <tools/list.hxx>
#include "actctrl.hxx"
void NumEditAction::Action()
{
aActionLink.Call( this );
}
long NumEditAction::Notify( NotifyEvent& rNEvt )
{
long nHandled = 0;
if ( rNEvt.GetType() == EVENT_KEYINPUT )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode aKeyCode = pKEvt->GetKeyCode();
const USHORT nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_RETURN &&
!nModifier)
{
Action();
nHandled = 1;
}
}
if(!nHandled)
NumericField::Notify( rNEvt );
return nHandled;
}
/*------------------------------------------------------------------------
Beschreibung: KeyInput fuer ShortName - Edits ohne Spaces
------------------------------------------------------------------------*/
NoSpaceEdit::NoSpaceEdit( Window* pParent, const ResId& rResId)
: Edit(pParent, rResId),
sForbiddenChars(String::CreateFromAscii(" "))
{
}
NoSpaceEdit::~NoSpaceEdit()
{
}
void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
{
BOOL bCallParent = TRUE;
if(rEvt.GetCharCode())
{
String sKey = rEvt.GetCharCode();
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
bCallParent = FALSE;
}
if(bCallParent)
Edit::KeyInput(rEvt);
}
/* -----------------------------11.02.00 15:28--------------------------------
---------------------------------------------------------------------------*/
void NoSpaceEdit::Modify()
{
Selection aSel = GetSelection();
String sTemp = GetText();
for(USHORT i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp.EraseAllChars( sForbiddenChars.GetChar(i) );
}
USHORT nDiff = GetText().Len() - sTemp.Len();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
aSel.setMax(aSel.getMin());
SetText(sTemp);
SetSelection(aSel);
}
if(GetModifyHdl().IsSet())
GetModifyHdl().Call(this);
}
/* -----------------25.06.2003 15:57-----------------
--------------------------------------------------*/
ReturnActionEdit::~ReturnActionEdit()
{
}
/* -----------------25.06.2003 15:58-----------------
--------------------------------------------------*/
void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
{
const KeyCode aKeyCode = rEvt.GetKeyCode();
const USHORT nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_RETURN &&
!nModifier)
{
if(aReturnActionLink.IsSet())
aReturnActionLink.Call(this);
}
else
Edit::KeyInput(rEvt);
}