summaryrefslogtreecommitdiff
path: root/sw/source/uibase/cctrl/actctrl.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-16 15:08:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-16 16:59:09 +0100
commitfc2a0de9368db335f03461d76491d7fd733697e8 (patch)
tree9ee0c0304f90805afc5f281bb3b1a2cf4d68b88d /sw/source/uibase/cctrl/actctrl.cxx
parent4e4a350dff08ef1393cd87d48e095e18bf423821 (diff)
turn the no-space edit widgets into a editwidget feature
especially because most of them don't handle intercepting text getting *pasted* into them right, so start with the one which does that right. Change-Id: If6770798872ed3c72c469656ebf0d4fd76d2171d
Diffstat (limited to 'sw/source/uibase/cctrl/actctrl.cxx')
-rw-r--r--sw/source/uibase/cctrl/actctrl.cxx37
1 files changed, 0 insertions, 37 deletions
diff --git a/sw/source/uibase/cctrl/actctrl.cxx b/sw/source/uibase/cctrl/actctrl.cxx
index 4009eadf9f2b..c20a5b23a38e 100644
--- a/sw/source/uibase/cctrl/actctrl.cxx
+++ b/sw/source/uibase/cctrl/actctrl.cxx
@@ -48,31 +48,6 @@ bool NumEditAction::Notify( NotifyEvent& rNEvt )
return nHandled;
}
-NoSpaceEdit::NoSpaceEdit(Window* pParent)
- : Edit(pParent, WB_BORDER|WB_TABSTOP)
- , sForbiddenChars(OUString(" "))
-{
-}
-
-void NoSpaceEdit::Modify()
-{
- Selection aSel = GetSelection();
- OUString sTemp = GetText();
- for(sal_uInt16 i = 0; i < sForbiddenChars.getLength(); i++)
- {
- sTemp = comphelper::string::remove(sTemp, sForbiddenChars[i]);
- }
- sal_Int32 nDiff = GetText().getLength() - sTemp.getLength();
- if(nDiff)
- {
- aSel.setMin(aSel.getMin() - nDiff);
- aSel.setMax(aSel.getMin());
- SetText(sTemp);
- SetSelection(aSel);
- }
- Edit::Modify();
-}
-
void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
{
const KeyCode aKeyCode = rEvt.GetKeyCode();
@@ -87,18 +62,6 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
Edit::KeyInput(rEvt);
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTableNameEdit(Window *pParent, VclBuilder::stringmap &rMap)
-{
- VclBuilder::ensureDefaultWidthChars(rMap);
- return new TableNameEdit(pParent);
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeNoSpaceEdit(Window *pParent, VclBuilder::stringmap &rMap)
-{
- VclBuilder::ensureDefaultWidthChars(rMap);
- return new NoSpaceEdit(pParent);
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeReturnActionEdit(Window *pParent, VclBuilder::stringmap &rMap)
{
VclBuilder::ensureDefaultWidthChars(rMap);