From 27f199af29794fffb97eb73357c7f9dd4dae0201 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Jun 2010 13:46:22 +0200 Subject: changehid: #i111874# remove SmartId, make HID of type rtl::OString, fill in dummies for all explicit help ids --- sw/source/ui/ribbar/inputwin.cxx | 3 ++- sw/source/ui/ribbar/workctrl.cxx | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index c14f91632a4c..f7d9067a1ded 100644 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -90,7 +90,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) InsertSeparator ( 1 ); InsertSeparator (); InsertWindow( ED_FORMULA, &aEdit); - SetHelpId(ED_FORMULA, HID_EDIT_FORMULA); + // FIXME: HELPID + SetHelpId(ED_FORMULA, ""/*HID_EDIT_FORMULA*/); BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC )); diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index c75cb3f0dfc4..aaa5b19b1f4e 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -492,7 +492,8 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr { USHORT i; - aToolBox.SetHelpId(HID_NAVI_VS); + // FIXME: HELPID + aToolBox.SetHelpId(""/*HID_NAVI_VS*/); aToolBox.SetLineCount( 2 ); aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT); for( i = 0; i < NID_COUNT; i++) @@ -508,7 +509,8 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr nTbxBits = TIB_CHECKABLE; } aToolBox.InsertItem(nNaviId, sText, nTbxBits); - aToolBox.SetHelpId( nNaviId, aNavigationHelpIds[i] ); + // FIXME: HELPID + aToolBox.SetHelpId( nNaviId, ""/*aNavigationHelpIds[i]*/ ); } ApplyImageList(); aToolBox.InsertBreak(NID_COUNT/2); -- cgit From bd7d8323135223d145f78a7d5847a7716552cc42 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 8 Jul 2010 19:03:59 +0200 Subject: vcl113: #i63604# make inputwin for sw and sc adjust to font from system settings --- sw/source/ui/ribbar/inputwin.cxx | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 sw/source/ui/ribbar/inputwin.cxx (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx old mode 100644 new mode 100755 index c14f91632a4c..9ee5a6e2ffa3 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -80,6 +80,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) FreeResource(); + aEdit.SetSizePixel( aEdit.CalcMinimumSize() ); + SfxImageManager* pManager = SfxImageManager::GetImageManager( SW_MOD() ); pManager->RegisterToolBox(this); -- cgit From c80988b0107424ba6de85531ed55fd493a0a64cb Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 10 Jul 2010 18:21:24 +0200 Subject: CWS changehid: #i111874#: change code to support HelpIds as byte strings --- sw/source/ui/ribbar/inputwin.cxx | 3 +- sw/source/ui/ribbar/inputwin.src | 12 ++-- sw/source/ui/ribbar/makefile.mk | 1 - sw/source/ui/ribbar/tblctrl.src | 94 ------------------------- sw/source/ui/ribbar/workctrl.cxx | 8 +-- sw/source/ui/ribbar/workctrl.src | 147 +++------------------------------------ 6 files changed, 19 insertions(+), 246 deletions(-) delete mode 100644 sw/source/ui/ribbar/tblctrl.src (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index f7d9067a1ded..c14f91632a4c 100644 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -90,8 +90,7 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) InsertSeparator ( 1 ); InsertSeparator (); InsertWindow( ED_FORMULA, &aEdit); - // FIXME: HELPID - SetHelpId(ED_FORMULA, ""/*HID_EDIT_FORMULA*/); + SetHelpId(ED_FORMULA, HID_EDIT_FORMULA); BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC )); diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src index 13d5fcdd0eae..5686fd7ae6c2 100644 --- a/sw/source/ui/ribbar/inputwin.src +++ b/sw/source/ui/ribbar/inputwin.src @@ -44,7 +44,7 @@ ToolBox RID_TBX_FORMULA ToolBoxItem { Identifier = FN_FORMULA_CALC ; - HelpID = FN_FORMULA_CALC ; + HelpId = HID_TBX_FORMULA_CALC ; DropDown = TRUE ; Text [ en-US ] = "Formula" ; /* ### ACHTUNG: Neuer Text in Resource? Formel auswählen : Formel auswõhlen */ @@ -52,14 +52,14 @@ ToolBox RID_TBX_FORMULA ToolBoxItem { Identifier = FN_FORMULA_CANCEL ; - HelpID = FN_FORMULA_CANCEL ; + HelpId = HID_TBX_FORMULA_CANCEL ; Text [ en-US ] = "Cancel" ; /* ### ACHTUNG: Neuer Text in Resource? Formel nicht übenehmen : Formel nicht ³benehmen */ }; ToolBoxItem { Identifier = FN_FORMULA_APPLY ; - HelpID = FN_FORMULA_APPLY ; + HelpId = HID_TBX_FORMULA_APPLY ; /* ### ACHTUNG: Neuer Text in Resource? Übernehmen : šbernehmen */ Text [ en-US ] = "Apply" ; /* ### ACHTUNG: Neuer Text in Resource? Formel einfügen : Formel einf³gen */ @@ -287,21 +287,21 @@ String STR_TBL_FORMULA ToolBoxItem\ {\ Identifier = FN_FORMULA_CALC ; \ - HelpID = FN_FORMULA_CALC ; \ + HelpID = HID_TBX_FORMULA_CALC ; \ Text [ en-US ] = "Formula" ; \ /* ### ACHTUNG: Neuer Text in Resource? Formel auswählen : Formel auswõhlen */\ };\ ToolBoxItem\ {\ Identifier = FN_FORMULA_CANCEL ; \ - HelpID = FN_FORMULA_CANCEL ; \ + HelpId = HID_TBX_FORMULA_CANCEL ; \ Text [ en-US ] = "Cancel" ; \ /* ### ACHTUNG: Neuer Text in Resource? Formel nicht übenehmen : Formel nicht ³benehmen */\ };\ ToolBoxItem\ {\ Identifier = FN_FORMULA_APPLY ; \ - HelpID = FN_FORMULA_APPLY ; \ + HelpID = HID_TBX_FORMULA_APPLY ; \ /* ### ACHTUNG: Neuer Text in Resource? Übernehmen : šbernehmen */\ Text [ en-US ] = "Apply" ; \ /* ### ACHTUNG: Neuer Text in Resource? Formel einfügen : Formel einf³gen */\ diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk index 72acc793070a..3a9edfee238b 100644 --- a/sw/source/ui/ribbar/makefile.mk +++ b/sw/source/ui/ribbar/makefile.mk @@ -42,7 +42,6 @@ SRS1NAME=$(TARGET) SRC1FILES = \ tbxanchr.src \ inputwin.src \ - tblctrl.src \ workctrl.src SLOFILES = \ diff --git a/sw/source/ui/ribbar/tblctrl.src b/sw/source/ui/ribbar/tblctrl.src deleted file mode 100644 index 0c783172af74..000000000000 --- a/sw/source/ui/ribbar/tblctrl.src +++ /dev/null @@ -1,94 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "tblctrl.hrc" -#include "helpid.h" -#include "cmdid.h" -FloatingWindow RID_TBL_OPT_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_TBL_OPT_CTRL ; - ToolBox TBX_OPTIMIZE_TABLE - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_TABLE_BALANCE_CELLS ; - HelpID = FN_TABLE_BALANCE_CELLS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_BALANCE_ROWS ; - HelpID = FN_TABLE_BALANCE_ROWS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_OPTIMAL_HEIGHT ; - HelpID = FN_TABLE_OPTIMAL_HEIGHT ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_ADJUST_CELLS ; - HelpID = FN_TABLE_ADJUST_CELLS ; - }; - }; - }; - Text [ en-US ] = "Optimize" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index aaa5b19b1f4e..cf7f4b15a33a 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -454,7 +454,7 @@ static USHORT __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] = NID_TABLE_FORMULA_ERROR, NID_NEXT }; -static USHORT __READONLY_DATA aNavigationHelpIds[ NAVI_ENTRIES ] = +static const char* __READONLY_DATA aNavigationHelpIds[ NAVI_ENTRIES ] = { // -- first line HID_NID_TBL, @@ -492,8 +492,7 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr { USHORT i; - // FIXME: HELPID - aToolBox.SetHelpId(""/*HID_NAVI_VS*/); + aToolBox.SetHelpId(HID_NAVI_VS); aToolBox.SetLineCount( 2 ); aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT); for( i = 0; i < NID_COUNT; i++) @@ -509,8 +508,7 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr nTbxBits = TIB_CHECKABLE; } aToolBox.InsertItem(nNaviId, sText, nTbxBits); - // FIXME: HELPID - aToolBox.SetHelpId( nNaviId, ""/*aNavigationHelpIds[i]*/ ); + aToolBox.SetHelpId( nNaviId, aNavigationHelpIds[i] ); } ApplyImageList(); aToolBox.InsertBreak(NID_COUNT/2); diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src index 93681f526502..4fff5c4a9260 100644 --- a/sw/source/ui/ribbar/workctrl.src +++ b/sw/source/ui/ribbar/workctrl.src @@ -32,138 +32,9 @@ #include #endif #include "workctrl.hrc" -#include "workctrl.hrc" #include "helpid.h" #include "cmdid.h" -FloatingWindow RID_INSERT_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_INSERT_CTRL ; - /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */ - ToolBox TBX_INSERT - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_FRAME_INTERACT_NOCOL ; - HelpID = FN_INSERT_FRAME_INTERACT_NOCOL ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FRAME_INTERACT ; - HelpID = FN_INSERT_FRAME_INTERACT ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_GRAPHIC ; - HelpID = SID_INSERT_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_TABLE ; - HelpID = FN_INSERT_TABLE ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_INSERTDOC ; - HelpID = SID_INSERTDOC ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FOOTNOTE ; - HelpID = FN_INSERT_FOOTNOTE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_ENDNOTE ; - HelpID = FN_INSERT_ENDNOTE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_SYMBOL ; - HelpID = FN_INSERT_SYMBOL ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_REGION ; - HelpID = FN_INSERT_REGION; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_IDX_ENTRY_DLG ; - HelpID = FN_INSERT_IDX_ENTRY_DLG ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_BOOKMARK ; - HelpID = FN_INSERT_BOOKMARK ; - RadioCheck = TRUE ; - }; - }; - }; - Text [ en-US ] = "Insert" ; -}; -FloatingWindow RID_INSERT_OBJ_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_INSERT_OBJ_CTRL ; - /* ### ACHTUNG: Neuer Text in Resource? Objekt einfügen : Objekt einf³gen */ - ToolBox TBX_OBJ_INSERT - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_INSERT_DIAGRAM ; - HelpID = SID_INSERT_DIAGRAM ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_SMA ; - HelpID = FN_INSERT_SMA ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_FLOATINGFRAME ; - HelpID = SID_INSERT_FLOATINGFRAME ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_OBJECT ; - HelpID = SID_INSERT_OBJECT ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_PLUGIN ; - HelpID = SID_INSERT_PLUGIN ; - }; -#ifdef SOLAR_JAVA - ToolBoxItem - { - Identifier = SID_INSERT_APPLET ; - HelpID = SID_INSERT_APPLET ; - }; -#endif - }; - }; - Text [ en-US ] = "Insert Object" ; -}; + Menu RID_INSERT_FIELD_CTRL { ItemList = @@ -171,45 +42,45 @@ Menu RID_INSERT_FIELD_CTRL MenuItem { Identifier = FN_INSERT_FLD_DATE ; - HelpID = FN_INSERT_FLD_DATE ; + HelpId = CMD_FN_INSERT_FLD_DATE ; Text [ en-US ] = "Date" ; }; MenuItem { Identifier = FN_INSERT_FLD_TIME ; - HelpID = FN_INSERT_FLD_TIME ; + HelpId = CMD_FN_INSERT_FLD_TIME ; Text [ en-US ] = "Time" ; }; //#ifndef MN_SW_WEB MenuItem { Identifier = FN_INSERT_FLD_PGNUMBER ; - HelpID = FN_INSERT_FLD_PGNUMBER ; + HelpId = CMD_FN_INSERT_FLD_PGNUMBER ; Text [ en-US ] = "Page Number" ; }; MenuItem { Identifier = FN_INSERT_FLD_PGCOUNT ; - HelpID = FN_INSERT_FLD_PGCOUNT ; + HelpId = CMD_FN_INSERT_FLD_PGCOUNT ; Text [ en-US ] = "Page Count" ; }; MenuItem { Identifier = FN_INSERT_FLD_TOPIC ; - HelpID = FN_INSERT_FLD_TOPIC ; + HelpId = CMD_FN_INSERT_FLD_TOPIC ; Text [ en-US ] = "Subject" ; }; MenuItem { Identifier = FN_INSERT_FLD_TITLE ; - HelpID = FN_INSERT_FLD_TITLE ; + HelpId = CMD_FN_INSERT_FLD_TITLE ; Text [ en-US ] = "Title" ; }; //#endif MenuItem { Identifier = FN_INSERT_FLD_AUTHOR ; - HelpID = FN_INSERT_FLD_AUTHOR ; + HelpId = CMD_FN_INSERT_FLD_AUTHOR ; Text [ en-US ] = "Author" ; }; MenuItem @@ -219,7 +90,7 @@ Menu RID_INSERT_FIELD_CTRL MenuItem { Identifier = FN_INSERT_FIELD ; - HelpID = FN_INSERT_FIELD ; + HelpId = CMD_FN_INSERT_FIELD ; Text [ en-US ] = "Other..." ; }; }; -- cgit From 793966da6c18295efd705637eb22c50370c986e7 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 31 Aug 2010 18:59:45 +0200 Subject: vcl115: #i113242# better layout for SwInputWindow --- sw/source/ui/ribbar/inputwin.cxx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index 9ee5a6e2ffa3..e6d7bf26db80 100755 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -103,16 +103,23 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl )); Size aSizeTbx = CalcWindowSizePixel(); + Size aEditSize = aEdit.GetSizePixel(); + Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) ); + long nMaxHeight = (aEditSize.Height() > aItemRect.GetHeight()) ? aEditSize.Height() : aItemRect.GetHeight(); + if( nMaxHeight+2 > aSizeTbx.Height() ) + aSizeTbx.Height() = nMaxHeight+2; Size aSize = GetSizePixel(); aSize.Height() = aSizeTbx.Height(); SetSizePixel( aSize ); - Size aPosSize = aPos.GetSizePixel(); - Size aEditSize = aEdit.GetSizePixel(); - aPosSize.Height() = aEditSize.Height() = GetItemRect(FN_FORMULA_CALC).GetHeight() - 2; - Point aPosPos = aPos.GetPosPixel(); - Point aEditPos= aEdit.GetPosPixel(); - aPosPos.Y() = aEditPos.Y() = GetItemRect( FN_FORMULA_CALC ).TopLeft().Y() + 1; + // align edit and item vcentered + Size aPosSize = aPos.GetSizePixel(); + aPosSize.Height() = nMaxHeight; + aEditSize.Height() = nMaxHeight; + Point aPosPos = aPos.GetPosPixel(); + Point aEditPos = aEdit.GetPosPixel(); + aPosPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; + aEditPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; aPos.SetPosSizePixel( aPosPos, aPosSize ); aEdit.SetPosSizePixel( aEditPos, aEditSize ); -- cgit From bacdf52829e90e9535ceefd1a08a5dd92adb610c Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 19 Nov 2010 21:45:41 +0100 Subject: gnumake2: removing old dmake file in migrated modules --- sw/source/ui/ribbar/makefile.mk | 70 ----------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 sw/source/ui/ribbar/makefile.mk (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk deleted file mode 100644 index 2adb59eec185..000000000000 --- a/sw/source/ui/ribbar/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ribbar - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - tbxanchr.src \ - inputwin.src \ - workctrl.src - -EXCEPTIONSFILES = \ - $(SLO)$/tblctrl.obj \ - $(SLO)$/tbxanchr.obj \ - $(SLO)$/workctrl.obj - -SLOFILES = \ - $(SLO)$/inputwin.obj \ - $(SLO)$/tbxanchr.obj \ - $(SLO)$/conrect.obj \ - $(SLO)$/conform.obj \ - $(SLO)$/conpoly.obj \ - $(SLO)$/conarc.obj \ - $(SLO)$/concustomshape.obj \ - $(SLO)$/dselect.obj \ - $(SLO)$/drawbase.obj \ - $(SLO)$/tblctrl.obj \ - $(SLO)$/workctrl.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/ribbar.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - -- cgit From d2ab337e8fd277143ac7e811f9f12ea15c592f6e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 25 Nov 2010 14:31:11 +0100 Subject: unodapi: #i115383#: clean up UndoActionCount: remove static {Get,Set}UndoActionCount() from SwDoc, UndoManager, SwEditShell. use the already existing UndoOptions in SwModule instead. refactor the ugly hack with undo in SwInputWindow a little. --- sw/source/ui/ribbar/inputwin.cxx | 94 +++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 55 deletions(-) (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index e6d7bf26db80..ec85bc2a3bf6 100755 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include "swtypes.hxx" #include "cmdid.h" @@ -74,9 +75,13 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) pView(0), pBindings(pBind), aAktTableName(aEmptyStr) + , m_nActionCount(0) + , m_bDoesUndo(true) + , m_bResetUndo(false) + , m_bCallUndo(false) { - bFirst = bDoesUndo = TRUE; - bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = FALSE; + bFirst = TRUE; + bActive = bIsTable = bDelSel = FALSE; FreeResource(); @@ -143,16 +148,27 @@ __EXPORT SwInputWindow::~SwInputWindow() if(pWrtShell) pWrtShell->EndSelTblCells(); - if( bResetUndo ) + CleanupUglyHackWithUndo(); +} + +void SwInputWindow::CleanupUglyHackWithUndo() +{ + if (m_bResetUndo) { DelBoxCntnt(); - pWrtShell->DoUndo( bDoesUndo ); - if(bCallUndo) + pWrtShell->DoUndo(m_bDoesUndo); + if (m_bCallUndo) + { pWrtShell->Undo(); - SwEditShell::SetUndoActionCount( nActionCnt ); + } + if (0 == m_nActionCount) + { + SW_MOD()->GetUndoOptions().SetUndoCount(0); + } } } + //================================================================== void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) @@ -233,13 +249,17 @@ void SwInputWindow::ShowWin() { if( bIsTable ) { - bResetUndo = TRUE; - nActionCnt = SwEditShell::GetUndoActionCount(); - SwEditShell::SetUndoActionCount( nActionCnt + 1 ); + m_bResetUndo = true; + m_nActionCount = SW_MOD()->GetUndoOptions().GetUndoCount(); + if (0 == m_nActionCount) { // deactivated? turn it on... + SW_MOD()->GetUndoOptions().SetUndoCount(1); + } - bDoesUndo = pWrtShell->DoesUndo(); - if( !bDoesUndo ) - pWrtShell->DoUndo( TRUE ); + m_bDoesUndo = pWrtShell->DoesUndo(); + if (!m_bDoesUndo) + { + pWrtShell->DoUndo(true); + } if( !pWrtShell->SwCrsrShell::HasSelection() ) { @@ -252,9 +272,11 @@ void SwInputWindow::ShowWin() pWrtShell->StartUndo( UNDO_DELETE ); pWrtShell->Delete(); if( 0 != pWrtShell->EndUndo( UNDO_DELETE )) - bCallUndo = TRUE; + { + m_bCallUndo = true; + } } - pWrtShell->DoUndo( FALSE ); + pWrtShell->DoUndo(false); SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); if( pWrtShell->GetTblBoxFormulaAttrs( aSet )) @@ -376,15 +398,7 @@ void SwInputWindow::ApplyFormula() { pView->GetViewFrame()->GetDispatcher()->Lock(FALSE); pView->GetEditWin().LockKeyInput(FALSE); - if( bResetUndo ) - { - DelBoxCntnt(); - pWrtShell->DoUndo( bDoesUndo ); - SwEditShell::SetUndoActionCount( nActionCnt ); - if( bCallUndo ) - pWrtShell->Undo(); - bResetUndo = FALSE; - } + CleanupUglyHackWithUndo(); pWrtShell->Pop( FALSE ); // JP 13.01.97: Formel soll immer mit einem "=" beginnen, hier @@ -411,15 +425,7 @@ void SwInputWindow::CancelFormula() { pView->GetViewFrame()->GetDispatcher()->Lock( FALSE ); pView->GetEditWin().LockKeyInput(FALSE); - if( bResetUndo ) - { - DelBoxCntnt(); - pWrtShell->DoUndo( bDoesUndo ); - SwEditShell::SetUndoActionCount( nActionCnt ); - if( bCallUndo ) - pWrtShell->Undo(); - bResetUndo = FALSE; - } + CleanupUglyHackWithUndo(); pWrtShell->Pop( FALSE ); if( bDelSel ) @@ -496,7 +502,7 @@ void SwInputWindow::SetFormula( const String& rFormula, BOOL bDelFlag ) IMPL_LINK( SwInputWindow, ModifyHdl, InputEdit*, EMPTYARG ) { - if( bIsTable && bResetUndo ) + if (bIsTable && m_bResetUndo) { pWrtShell->StartAllAction(); DelBoxCntnt(); @@ -670,25 +676,3 @@ SfxChildWinInfo __EXPORT SwInputChild::GetInfo() const return aInfo; } - - - - - - - - - - - - - - - - - - - - - - -- cgit From af1d03993616e4974388d760fc51ae54a8d2bd4a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 15 Dec 2010 09:13:50 +0100 Subject: undoapi: stuff in sw/source/ui should not include undobj.hxx --- sw/source/ui/ribbar/drawbase.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx index 61dcd3f23505..bbfa7242c4ad 100644 --- a/sw/source/ui/ribbar/drawbase.cxx +++ b/sw/source/ui/ribbar/drawbase.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include @@ -45,7 +46,7 @@ #include "edtwin.hxx" #include "caption.hxx" #include "swundo.hxx" -#include "undobj.hxx" +#include #include "comcore.hrc" using namespace ::com::sun::star; -- cgit From 7f33ed417b2e29e5470724ea76967f64699a2662 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 17 Jan 2011 15:06:54 +0100 Subject: removetooltypes01: #i112600# Remove tools types from sw --- sw/source/ui/ribbar/conarc.cxx | 18 ++--- sw/source/ui/ribbar/concustomshape.cxx | 8 +- sw/source/ui/ribbar/conform.cxx | 28 +++---- sw/source/ui/ribbar/conpoly.cxx | 18 ++--- sw/source/ui/ribbar/conrect.cxx | 34 ++++---- sw/source/ui/ribbar/drawbase.cxx | 138 ++++++++++++++++----------------- sw/source/ui/ribbar/dselect.cxx | 18 ++--- sw/source/ui/ribbar/inputwin.cxx | 92 +++++++++++----------- sw/source/ui/ribbar/tblctrl.cxx | 4 +- sw/source/ui/ribbar/tbxanchr.cxx | 10 +-- sw/source/ui/ribbar/workctrl.cxx | 108 +++++++++++++------------- 11 files changed, 238 insertions(+), 238 deletions(-) (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx index 4b2fafbd6040..60f733f328c7 100644 --- a/sw/source/ui/ribbar/conarc.cxx +++ b/sw/source/ui/ribbar/conarc.cxx @@ -61,11 +61,11 @@ ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) -BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) { - BOOL bReturn; + sal_Bool bReturn; - if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE) + if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True) { if (!nAnzButUp) aStartPnt = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); @@ -81,9 +81,9 @@ BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) -BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ((m_pSh->IsDrawCreate() || m_pWin->IsDrawAction()) && rMEvt.IsLeft()) { @@ -91,7 +91,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) if (!nAnzButUp && aPnt == aStartPnt) { SwDrawBase::MouseButtonUp(rMEvt); - bReturn = TRUE; + bReturn = sal_True; } else { nAnzButUp++; @@ -100,7 +100,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) { SwDrawBase::MouseButtonUp(rMEvt); nAnzButUp = 0; - bReturn = TRUE; + bReturn = sal_True; } else m_pSh->EndCreate(SDRCREATE_NEXTPOINT); @@ -109,7 +109,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) /* else if ( pView->IsCreateObj() && rMEvt.IsRight() ) { pView->EndCreateObj( SDRCREATE_FORCEEND ); - bReturn = TRUE; + bReturn = sal_True; }*/ return (bReturn); @@ -123,7 +123,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) -void ConstArc::Activate(const USHORT nSlotId) +void ConstArc::Activate(const sal_uInt16 nSlotId) { switch (nSlotId) { diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx index 66ba929fae47..ebf3e8beba65 100644 --- a/sw/source/ui/ribbar/concustomshape.cxx +++ b/sw/source/ui/ribbar/concustomshape.cxx @@ -104,9 +104,9 @@ rtl::OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq ) |* \************************************************************************/ -BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn = SwDrawBase::MouseButtonDown(rMEvt); + sal_Bool bReturn = SwDrawBase::MouseButtonDown(rMEvt); if ( bReturn ) { SdrView *pSdrView = m_pSh->GetDrawView(); @@ -140,7 +140,7 @@ BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) { return SwDrawBase::MouseButtonUp(rMEvt); } @@ -151,7 +151,7 @@ BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) |* \************************************************************************/ -void ConstCustomShape::Activate(const USHORT nSlotId) +void ConstCustomShape::Activate(const sal_uInt16 nSlotId) { m_pWin->SetSdrDrawMode( OBJ_CUSTOMSHAPE ); diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx index 8682e1d34462..1e6133d7703d 100644 --- a/sw/source/ui/ribbar/conform.cxx +++ b/sw/source/ui/ribbar/conform.cxx @@ -39,7 +39,7 @@ #include "drawbase.hxx" #include "conform.hxx" -extern BOOL bNoInterrupt; // in mainwn.cxx +extern sal_Bool bNoInterrupt; // in mainwn.cxx /************************************************************************* |* @@ -51,7 +51,7 @@ extern BOOL bNoInterrupt; // in mainwn.cxx ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : SwDrawBase(pWrtShell, pEditWin, pSwView) { - m_bInsForm = TRUE; + m_bInsForm = sal_True; } /************************************************************************* @@ -61,9 +61,9 @@ ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, S \************************************************************************/ -BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; SdrView *pSdrView = m_pSh->GetDrawView(); @@ -72,13 +72,13 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsMod2()) { - pSdrView->SetCreate1stPointAsCenter(TRUE); - pSdrView->SetResizeAtCenter(TRUE); + pSdrView->SetCreate1stPointAsCenter(sal_True); + pSdrView->SetResizeAtCenter(sal_True); } else { - pSdrView->SetCreate1stPointAsCenter(FALSE); - pSdrView->SetResizeAtCenter(FALSE); + pSdrView->SetCreate1stPointAsCenter(sal_False); + pSdrView->SetResizeAtCenter(sal_False); } SdrViewEvent aVEvt; @@ -88,16 +88,16 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsLeft() && !m_pWin->IsDrawAction() && (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate())) { - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; m_pWin->CaptureMouse(); m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos); + bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos); if (bReturn) - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else bReturn = SwDrawBase::MouseButtonDown(rMEvt); @@ -112,7 +112,7 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) \************************************************************************/ -void ConstFormControl::Activate(const USHORT nSlotId) +void ConstFormControl::Activate(const sal_uInt16 nSlotId) { m_pWin->SetSdrDrawMode( static_cast(nSlotId) ); SwDrawBase::Activate(nSlotId); @@ -136,8 +136,8 @@ void ConstFormControl::CreateDefaultObject() m_pSh->MakeDrawView(); SdrView *pSdrView = m_pSh->GetDrawView(); - pSdrView->SetDesignMode(TRUE); - m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos); + pSdrView->SetDesignMode(sal_True); + m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos); m_pSh->MoveCreate(aEndPos); m_pSh->EndCreate(SDRCREATE_FORCEEND); } diff --git a/sw/source/ui/ribbar/conpoly.cxx b/sw/source/ui/ribbar/conpoly.cxx index 0dbf109cc783..00f0067435b8 100644 --- a/sw/source/ui/ribbar/conpoly.cxx +++ b/sw/source/ui/ribbar/conpoly.cxx @@ -61,11 +61,11 @@ ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* p -BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn; + sal_Bool bReturn; - if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE) + if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True) aLastPos = rMEvt.GetPosPixel(); return (bReturn); @@ -79,9 +79,9 @@ BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) -BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt) +sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; bReturn = SwDrawBase::MouseMove(rMEvt); @@ -96,9 +96,9 @@ BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt) -BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if (m_pSh->IsDrawCreate()) { @@ -109,7 +109,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) { m_pSh->BreakCreate(); EnterSelectMode(rMEvt); - return TRUE; + return sal_True; } } else @@ -136,7 +136,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) -void ConstPolygon::Activate(const USHORT nSlotId) +void ConstPolygon::Activate(const sal_uInt16 nSlotId) { switch (nSlotId) { diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx index 3d77ae4829af..c1debe9eab34 100644 --- a/sw/source/ui/ribbar/conrect.cxx +++ b/sw/source/ui/ribbar/conrect.cxx @@ -58,7 +58,7 @@ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView ) : SwDrawBase( pWrtShell, pEditWin, pSwView ), - bMarquee(FALSE), + bMarquee(sal_False), // #93382# mbVertical(sal_False) { @@ -70,11 +70,11 @@ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin, |* \************************************************************************/ -BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn; + sal_Bool bReturn; - if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE + if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True && m_pWin->GetSdrDrawMode() == OBJ_CAPTION) { m_pView->NoRotate(); @@ -93,11 +93,11 @@ BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) { Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - BOOL bRet = SwDrawBase::MouseButtonUp(rMEvt); + sal_Bool bRet = SwDrawBase::MouseButtonUp(rMEvt); if( bRet ) { SdrView *pSdrView = m_pSh->GetDrawView(); @@ -117,13 +117,13 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) SfxItemSet aItemSet( pSdrView->GetModel()->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) ); - aItemSet.Put( SdrTextAutoGrowHeightItem( FALSE ) ); + aItemSet.Put( SdrTextAutoGrowWidthItem( sal_False ) ); + aItemSet.Put( SdrTextAutoGrowHeightItem( sal_False ) ); aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) ); aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aItemSet.Put( SdrTextAniCountItem( 0 ) ); aItemSet.Put( SdrTextAniAmountItem( - (INT16)m_pWin->PixelToLogic(Size(2,1)).Width()) ); + (sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) ); pObj->SetMergedItemSetAndBroadcast(aItemSet); } @@ -134,10 +134,10 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) SdrTextObj* pText = (SdrTextObj*)pObj; SfxItemSet aSet(pSdrView->GetModel()->GetItemPool()); - pText->SetVerticalWriting(TRUE); + pText->SetVerticalWriting(sal_True); - aSet.Put(SdrTextAutoGrowWidthItem(TRUE)); - aSet.Put(SdrTextAutoGrowHeightItem(FALSE)); + aSet.Put(SdrTextAutoGrowWidthItem(sal_True)); + aSet.Put(SdrTextAutoGrowHeightItem(sal_False)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); @@ -160,7 +160,7 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) pCaptObj->ForceOutlinerParaObject(); OutlinerParaObject* pOPO = pCaptObj->GetOutlinerParaObject(); if( pOPO && !pOPO->IsVertical() ) - pOPO->SetVertical( TRUE ); + pOPO->SetVertical( sal_True ); } } break; @@ -176,9 +176,9 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) |* \************************************************************************/ -void ConstRectangle::Activate(const USHORT nSlotId) +void ConstRectangle::Activate(const sal_uInt16 nSlotId) { - bMarquee = bCapVertical = FALSE; + bMarquee = bCapVertical = sal_False; mbVertical = sal_False; switch (nSlotId) @@ -196,7 +196,7 @@ void ConstRectangle::Activate(const USHORT nSlotId) break; case SID_DRAW_TEXT_MARQUEE: - bMarquee = TRUE; + bMarquee = sal_True; m_pWin->SetSdrDrawMode(OBJ_TEXT); break; @@ -211,7 +211,7 @@ void ConstRectangle::Activate(const USHORT nSlotId) break; case SID_DRAW_CAPTION_VERTICAL: - bCapVertical = TRUE; + bCapVertical = sal_True; // no break case SID_DRAW_CAPTION: m_pWin->SetSdrDrawMode(OBJ_CAPTION); diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx index 61dcd3f23505..5dc985d47ab1 100644 --- a/sw/source/ui/ribbar/drawbase.cxx +++ b/sw/source/ui/ribbar/drawbase.cxx @@ -50,9 +50,9 @@ using namespace ::com::sun::star; -extern BOOL bNoInterrupt; // in mainwn.cxx +extern sal_Bool bNoInterrupt; // in mainwn.cxx -#define MINMOVE ((USHORT)m_pSh->GetOut()->PixelToLogic(Size(m_pSh->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width()) +#define MINMOVE ((sal_uInt16)m_pSh->GetOut()->PixelToLogic(Size(m_pSh->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width()) /************************************************************************* @@ -67,8 +67,8 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV m_pSh(pSwWrtShell), m_pWin(pWindow), m_nSlotId(USHRT_MAX), - m_bCreateObj(TRUE), - m_bInsForm(FALSE) + m_bCreateObj(sal_True), + m_bInsForm(sal_False) { if ( !m_pSh->HasDrawView() ) m_pSh->MakeDrawView(); @@ -83,7 +83,7 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV __EXPORT SwDrawBase::~SwDrawBase() { if (m_pView->GetWrtShellPtr()) // Im view-Dtor koennte die wrtsh bereits geloescht worden sein... - m_pSh->GetDrawView()->SetEditMode(TRUE); + m_pSh->GetDrawView()->SetEditMode(sal_True); } /************************************************************************* @@ -93,9 +93,9 @@ __EXPORT SwDrawBase::~SwDrawBase() \************************************************************************/ -BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; SdrView *pSdrView = m_pSh->GetDrawView(); @@ -106,13 +106,13 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsMod2()) { - pSdrView->SetCreate1stPointAsCenter(TRUE); - pSdrView->SetResizeAtCenter(TRUE); + pSdrView->SetCreate1stPointAsCenter(sal_True); + pSdrView->SetResizeAtCenter(sal_True); } else { - pSdrView->SetCreate1stPointAsCenter(FALSE); - pSdrView->SetResizeAtCenter(FALSE); + pSdrView->SetCreate1stPointAsCenter(sal_False); + pSdrView->SetResizeAtCenter(sal_False); } SdrViewEvent aVEvt; @@ -123,17 +123,17 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) { if (IsCreateObj() && (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate())) { - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; m_pWin->CaptureMouse(); m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), m_aStartPos); + bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), m_aStartPos); SetDrawPointer(); if ( bReturn ) - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else if (!pSdrView->IsAction()) { @@ -142,25 +142,25 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) **********************************************************************/ m_pWin->CaptureMouse(); m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - UINT16 nEditMode = m_pWin->GetBezierMode(); + sal_uInt16 nEditMode = m_pWin->GetBezierMode(); if (eHit == SDRHIT_HANDLE && aVEvt.pHdl->GetKind() == HDL_BWGT) { /****************************************************************** * Handle draggen ******************************************************************/ - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, aVEvt.pHdl); - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else if (eHit == SDRHIT_MARKEDOBJECT && nEditMode == SID_BEZIER_INSERT) { /****************************************************************** * Klebepunkt einfuegen ******************************************************************/ - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; bReturn = pSdrView->BegInsObjPoint(m_aStartPos, rMEvt.IsMod1()); - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1()) { @@ -171,14 +171,14 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) pSdrView->UnmarkAllPoints(); bReturn = pSdrView->BegMarkPoints(m_aStartPos); - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2()) { /****************************************************************** * Objekt verschieben ******************************************************************/ - return FALSE; + return sal_False; } else if (eHit == SDRHIT_HANDLE) { @@ -209,10 +209,10 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) if (pHdl) { - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; pSdrView->MarkPoint(*pHdl); // bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, pHdl); -// m_pWin->SetDrawAction(TRUE); +// m_pWin->SetDrawAction(sal_True); } } } @@ -226,12 +226,12 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) if (pSdrView->HasMarkablePoints()) pSdrView->UnmarkAllPoints(); - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; // Drag im edtwin verwenden - return FALSE; + return sal_False; } - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; if (m_pSh->IsObjSelected()) { @@ -241,11 +241,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) { //JP 10.10.2001: Bug 89619 - don't scroll the // cursor into the visible area - BOOL bUnlockView = !m_pSh->IsViewLocked(); - m_pSh->LockView( TRUE ); //lock visible section + sal_Bool bUnlockView = !m_pSh->IsViewLocked(); + m_pSh->LockView( sal_True ); //lock visible section m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // Alles deselektieren if( bUnlockView ) - m_pSh->LockView( FALSE ); + m_pSh->LockView( sal_False ); } else pSdrView->UnmarkAllPoints(); @@ -255,7 +255,7 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) m_pSh->EnterSelFrmMode(NULL); if( 0 != (bReturn = m_pSh->BeginMark(m_aStartPos)) ) - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); SetDrawPointer(); } @@ -271,11 +271,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) \************************************************************************/ -BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt) +sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt) { SdrView *pSdrView = m_pSh->GetDrawView(); Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (IsCreateObj() && !m_pWin->IsDrawSelMode() && pSdrView->IsCreateObj()) { @@ -285,12 +285,12 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt) pSdrView->SetAngleSnapEnabled(rMEvt.IsShift()); m_pSh->MoveCreate(aPnt); - bRet = TRUE; + bRet = sal_True; } else if (pSdrView->IsAction() || pSdrView->IsInsObjPoint() || pSdrView->IsMarkPoints()) { m_pSh->MoveMark(aPnt); - bRet = TRUE; + bRet = sal_True; } return (bRet); @@ -303,11 +303,11 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt) \************************************************************************/ -BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; - BOOL bCheckShell = FALSE; - BOOL bAutoCap = FALSE; + sal_Bool bReturn = sal_False; + sal_Bool bCheckShell = sal_False; + sal_Bool bAutoCap = sal_False; Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); @@ -315,7 +315,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode(); //objects with multiple point may end at the start position - BOOL bMultiPoint = OBJ_PLIN == nDrawMode || + sal_Bool bMultiPoint = OBJ_PLIN == nDrawMode || OBJ_PATHLINE == nDrawMode || OBJ_FREELINE == nDrawMode; if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint)) @@ -342,12 +342,12 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME); aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME, - static_cast(FLY_AT_PARA) )); + static_cast(FLY_AT_PARA) )); aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff())); aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize())); aReq.Done(); } - bAutoCap = TRUE; + bAutoCap = sal_True; if(m_pWin->GetFrmColCount() > 1) { SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL); @@ -366,7 +366,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) m_pSh->EndUndo(UNDO_INSERT); } - bReturn = TRUE; + bReturn = sal_True; EnterSelectMode(rMEvt); } @@ -384,7 +384,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { bReturn = m_pSh->EndMark(); - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt)) { @@ -402,7 +402,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) } m_pView->NoRotate(); - bCheckShell = TRUE; // ggf BezierShell anwerfen + bCheckShell = sal_True; // ggf BezierShell anwerfen } else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) { @@ -417,7 +417,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) } m_pView->NoRotate(); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -435,9 +435,9 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) else { pSdrView->EndAction(); - bReturn = TRUE; + bReturn = sal_True; } - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); if (aPnt == m_aStartPos) { @@ -462,7 +462,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) } m_pView->NoRotate(); - bCheckShell = TRUE; // ggf BezierShell anwerfen + bCheckShell = sal_True; // ggf BezierShell anwerfen } } @@ -475,7 +475,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) m_pSh->LeaveSelFrmMode(); m_pView->NoRotate(); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -497,13 +497,13 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) \************************************************************************/ -void SwDrawBase::Activate(const USHORT nSlot) +void SwDrawBase::Activate(const sal_uInt16 nSlot) { SetSlotId(nSlot); SdrView *pSdrView = m_pSh->GetDrawView(); - pSdrView->SetCurrentObj( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()) ); - pSdrView->SetEditMode(FALSE); + pSdrView->SetCurrentObj( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()) ); + pSdrView->SetEditMode(sal_False); SetDrawPointer(); m_pSh->NoEdit(); @@ -519,16 +519,16 @@ void SwDrawBase::Activate(const USHORT nSlot) void __EXPORT SwDrawBase::Deactivate() { SdrView *pSdrView = m_pSh->GetDrawView(); - pSdrView->SetOrtho(FALSE); - pSdrView->SetAngleSnapEnabled(FALSE); + pSdrView->SetOrtho(sal_False); + pSdrView->SetAngleSnapEnabled(sal_False); if (m_pWin->IsDrawAction() && m_pSh->IsDrawCreate()) m_pSh->BreakCreate(); - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); m_pWin->ReleaseMouse(); - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; // if(!m_pSh->IsObjSelected()) // m_pSh->Edit(); @@ -542,16 +542,16 @@ void __EXPORT SwDrawBase::Deactivate() |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls -|* FALSE. +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls +|* sal_False. |* \************************************************************************/ -BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) +sal_Bool SwDrawBase::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; - USHORT nCode = rKEvt.GetKeyCode().GetCode(); + sal_Bool bReturn = sal_False; + sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); switch (nCode) { @@ -563,14 +563,14 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) m_pView->LeaveDrawCreate(); } - bReturn = TRUE; + bReturn = sal_True; } break; case KEY_DELETE: { m_pSh->DelSelectedObj(); - bReturn = TRUE; + bReturn = sal_True; } break; @@ -619,7 +619,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) pSdrView->MoveAllMarked(Size(nX, nY)); } - bReturn = TRUE; + bReturn = sal_True; } } break; @@ -633,8 +633,8 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls -|* FALSE. +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls +|* sal_False. |* \************************************************************************/ @@ -642,7 +642,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) void SwDrawBase::BreakCreate() { m_pSh->BreakCreate(); - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); m_pWin->ReleaseMouse(); Deactivate(); @@ -674,7 +674,7 @@ void SwDrawBase::SetDrawPointer() void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt) { - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) { @@ -711,7 +711,7 @@ void SwDrawBase::CreateDefaultObject() aEndPos.X() += 8 * MM50; aEndPos.Y() += 4 * MM50; Rectangle aRect(aStartPos, aEndPos); - m_pSh->CreateDefaultShape( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId); + m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId); } /* -----------------25.10.2002 14:14----------------- * diff --git a/sw/source/ui/ribbar/dselect.cxx b/sw/source/ui/ribbar/dselect.cxx index b7651eba981e..c810abe1a740 100644 --- a/sw/source/ui/ribbar/dselect.cxx +++ b/sw/source/ui/ribbar/dselect.cxx @@ -37,7 +37,7 @@ #include "drawbase.hxx" #include "dselect.hxx" -extern BOOL bNoInterrupt; // in mainwn.cxx +extern sal_Bool bNoInterrupt; // in mainwn.cxx /************************************************************************* |* @@ -48,21 +48,21 @@ extern BOOL bNoInterrupt; // in mainwn.cxx DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : SwDrawBase(pWrtShell, pEditWin, pSwView) { - m_bCreateObj = FALSE; + m_bCreateObj = sal_False; } /************************************************************************* |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls -|* FALSE. +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls +|* sal_False. |* \************************************************************************/ -BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt) +sal_Bool DrawSelection::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; switch (rKEvt.GetKeyCode().GetCode()) { @@ -73,7 +73,7 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt) m_pSh->BreakMark(); m_pWin->ReleaseMouse(); } - bReturn = TRUE; + bReturn = sal_True; } break; } @@ -90,10 +90,10 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt) |* \************************************************************************/ -void DrawSelection::Activate(const USHORT nSlotId) +void DrawSelection::Activate(const sal_uInt16 nSlotId) { m_pWin->SetSdrDrawMode(OBJ_NONE); - m_pWin->SetObjectSelect( TRUE ); + m_pWin->SetObjectSelect( sal_True ); SwDrawBase::Activate(nSlotId); m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index e6d7bf26db80..f6429dbdfc9f 100755 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -75,8 +75,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) pBindings(pBind), aAktTableName(aEmptyStr) { - bFirst = bDoesUndo = TRUE; - bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = FALSE; + bFirst = bDoesUndo = sal_True; + bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = sal_False; FreeResource(); @@ -94,7 +94,7 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) InsertWindow( ED_FORMULA, &aEdit); SetHelpId(ED_FORMULA, HID_EDIT_FORMULA); - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC )); SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL, bHC )); SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY, bHC )); @@ -135,8 +135,8 @@ __EXPORT SwInputWindow::~SwInputWindow() //Lineale aufwecken if(pView) { - pView->GetHLineal().SetActive( TRUE ); - pView->GetVLineal().SetActive( TRUE ); + pView->GetHLineal().SetActive( sal_True ); + pView->GetVLineal().SetActive( sal_True ); } if ( pMgr ) delete pMgr; @@ -162,7 +162,7 @@ void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) // update item images SwModule *pMod = SW_MOD(); SfxImageManager *pImgMgr = SfxImageManager::GetImageManager( pMod ); - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC, bHC )); SetItemImage( FN_FORMULA_CANCEL, pImgMgr->GetImage(FN_FORMULA_CANCEL, bHC )); @@ -191,16 +191,16 @@ void __EXPORT SwInputWindow::Resize() void SwInputWindow::ShowWin() { - bIsTable = FALSE; + bIsTable = sal_False; //Lineale anhalten if(pView) { - pView->GetHLineal().SetActive( FALSE ); - pView->GetVLineal().SetActive( FALSE ); + pView->GetHLineal().SetActive( sal_False ); + pView->GetVLineal().SetActive( sal_False ); DBG_ASSERT(pWrtShell, "Keine WrtShell!"); // Cursor in Tabelle - bIsTable = pWrtShell->IsCrsrInTbl() ? TRUE : FALSE; + bIsTable = pWrtShell->IsCrsrInTbl() ? sal_True : sal_False; if( bFirst ) pWrtShell->SelTblCells( LINK( this, SwInputWindow, @@ -208,7 +208,7 @@ void SwInputWindow::ShowWin() if( bIsTable ) { const String& rPos = pWrtShell->GetBoxNms(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; short nSrch = -1; while( (nPos = rPos.Search( ':',nPos + 1 ) ) != STRING_NOTFOUND ) nSrch = (short) nPos; @@ -233,13 +233,13 @@ void SwInputWindow::ShowWin() { if( bIsTable ) { - bResetUndo = TRUE; + bResetUndo = sal_True; nActionCnt = SwEditShell::GetUndoActionCount(); SwEditShell::SetUndoActionCount( nActionCnt + 1 ); bDoesUndo = pWrtShell->DoesUndo(); if( !bDoesUndo ) - pWrtShell->DoUndo( TRUE ); + pWrtShell->DoUndo( sal_True ); if( !pWrtShell->SwCrsrShell::HasSelection() ) { @@ -252,9 +252,9 @@ void SwInputWindow::ShowWin() pWrtShell->StartUndo( UNDO_DELETE ); pWrtShell->Delete(); if( 0 != pWrtShell->EndUndo( UNDO_DELETE )) - bCallUndo = TRUE; + bCallUndo = sal_True; } - pWrtShell->DoUndo( FALSE ); + pWrtShell->DoUndo( sal_False ); SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); if( pWrtShell->GetTblBoxFormulaAttrs( aSet )) @@ -269,7 +269,7 @@ void SwInputWindow::ShowWin() pWrtShell->EndSelect(); } - bFirst = FALSE; + bFirst = sal_False; aEdit.SetModifyHdl( LINK( this, SwInputWindow, ModifyHdl )); @@ -282,8 +282,8 @@ void SwInputWindow::ShowWin() aEdit.GrabFocus(); // UserInterface fuer die Eingabe abklemmen - pView->GetEditWin().LockKeyInput(TRUE); - pView->GetViewFrame()->GetDispatcher()->Lock(TRUE); + pView->GetEditWin().LockKeyInput(sal_True); + pView->GetViewFrame()->GetDispatcher()->Lock(sal_True); pWrtShell->Push(); } ToolBox::Show(); @@ -320,7 +320,7 @@ static const char * __READONLY_DATA aStrArr[] = { sCalc_Round }; - USHORT nId = pMenu->GetCurItemId(); + sal_uInt16 nId = pMenu->GetCurItemId(); if ( nId <= MN_CALC_ROUND ) { String aTmp( String::CreateFromAscii(aStrArr[nId - 1]) ); @@ -332,7 +332,7 @@ static const char * __READONLY_DATA aStrArr[] = { IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) { - USHORT nCurID = GetCurItemId(); + sal_uInt16 nCurID = GetCurItemId(); EndSelection(); // setzt CurItemId zurueck ! switch ( nCurID ) { @@ -345,7 +345,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) } } - return TRUE; + return sal_True; } //================================================================== @@ -353,7 +353,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) void __EXPORT SwInputWindow::Click( ) { - USHORT nCurID = GetCurItemId(); + sal_uInt16 nCurID = GetCurItemId(); EndSelection(); // setzt CurItemId zurueck ! switch ( nCurID ) { @@ -374,8 +374,8 @@ void __EXPORT SwInputWindow::Click( ) void SwInputWindow::ApplyFormula() { - pView->GetViewFrame()->GetDispatcher()->Lock(FALSE); - pView->GetEditWin().LockKeyInput(FALSE); + pView->GetViewFrame()->GetDispatcher()->Lock(sal_False); + pView->GetEditWin().LockKeyInput(sal_False); if( bResetUndo ) { DelBoxCntnt(); @@ -383,9 +383,9 @@ void SwInputWindow::ApplyFormula() SwEditShell::SetUndoActionCount( nActionCnt ); if( bCallUndo ) pWrtShell->Undo(); - bResetUndo = FALSE; + bResetUndo = sal_False; } - pWrtShell->Pop( FALSE ); + pWrtShell->Pop( sal_False ); // JP 13.01.97: Formel soll immer mit einem "=" beginnen, hier // also wieder entfernen @@ -409,8 +409,8 @@ void SwInputWindow::CancelFormula() { if(pView) { - pView->GetViewFrame()->GetDispatcher()->Lock( FALSE ); - pView->GetEditWin().LockKeyInput(FALSE); + pView->GetViewFrame()->GetDispatcher()->Lock( sal_False ); + pView->GetEditWin().LockKeyInput(sal_False); if( bResetUndo ) { DelBoxCntnt(); @@ -418,9 +418,9 @@ void SwInputWindow::CancelFormula() SwEditShell::SetUndoActionCount( nActionCnt ); if( bCallUndo ) pWrtShell->Undo(); - bResetUndo = FALSE; + bResetUndo = sal_False; } - pWrtShell->Pop( FALSE ); + pWrtShell->Pop( sal_False ); if( bDelSel ) pWrtShell->EnterStdMode(); @@ -478,7 +478,7 @@ IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller ) } -void SwInputWindow::SetFormula( const String& rFormula, BOOL bDelFlag ) +void SwInputWindow::SetFormula( const String& rFormula, sal_Bool bDelFlag ) { String sEdit( '=' ); if( rFormula.Len() ) @@ -518,7 +518,7 @@ void SwInputWindow::DelBoxCntnt() { pWrtShell->StartAllAction(); pWrtShell->ClearMark(); - pWrtShell->Pop( FALSE ); + pWrtShell->Pop( sal_False ); pWrtShell->Push(); pWrtShell->MoveSection( fnSectionCurr, fnSectionStart ); pWrtShell->SetMark(); @@ -559,32 +559,32 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes, String aBoxes = aPrefix; aBoxes += rBoxes; Selection aSelection(GetSelection()); - USHORT nSel = (USHORT) aSelection.Len(); + sal_uInt16 nSel = (sal_uInt16) aSelection.Len(); //OS: mit dem folgenden Ausdruck wird sichergestellt, dass im overwrite-Modus //die selektierte schliessende Klammer nicht geloescht wird if( nSel && ( nSel > 1 || - GetText().GetChar( (USHORT)aSelection.Min() ) != cClose ) ) + GetText().GetChar( (sal_uInt16)aSelection.Min() ) != cClose ) ) Cut(); else aSelection.Max() = aSelection.Min(); String aActText(GetText()); - const USHORT nLen = aActText.Len(); + const sal_uInt16 nLen = aActText.Len(); if( !nLen ) { String aStr(cOpen); aStr += aBoxes; aStr += cClose; SetText(aStr); - USHORT nPos = aStr.Search( cClose ); + sal_uInt16 nPos = aStr.Search( cClose ); ASSERT(nPos < aStr.Len(), Delimiter nicht gefunden.); ++nPos; SetSelection( Selection( nPos, nPos )); } else { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; sal_Unicode cCh; - USHORT nPos, nEndPos = 0, nStartPos = (USHORT) aSelection.Min(); + sal_uInt16 nPos, nEndPos = 0, nStartPos = (sal_uInt16) aSelection.Min(); if( nStartPos-- ) { do { @@ -598,22 +598,22 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes, } if( bFound ) { - bFound = FALSE; + bFound = sal_False; nEndPos = nStartPos; while( nEndPos < nLen ) { if( cClose == (cCh = aActText.GetChar( nEndPos )) /*|| cCh == cCloseBracket*/ ) { - bFound = TRUE; + bFound = sal_True; break; } ++nEndPos; } // nur wenn akt. Pos im Breich oder direkt dahinter liegt - if( bFound && !( nStartPos < (USHORT)aSelection.Max() && - (USHORT)aSelection.Max() <= nEndPos + 1 )) - bFound = FALSE; + if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() && + (sal_uInt16)aSelection.Max() <= nEndPos + 1 )) + bFound = sal_False; } if( bFound ) { @@ -627,7 +627,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes, String aTmp( (char)cOpen ); aTmp += aBoxes; aTmp += (char)cClose; - nPos = (USHORT)aSelection.Min(); + nPos = (sal_uInt16)aSelection.Min(); aActText.Insert( aTmp, nPos ); nPos = nPos + aTmp.Len(); } @@ -645,7 +645,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes, SwInputChild::SwInputChild(Window* _pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* ) : SfxChildWindow( _pParent, nId ) @@ -660,7 +660,7 @@ SwInputChild::SwInputChild(Window* _pParent, __EXPORT SwInputChild::~SwInputChild() { if(pDispatch) - pDispatch->Lock(FALSE); + pDispatch->Lock(sal_False); } diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx index ad5046af6b42..a5cc0d6725ba 100644 --- a/sw/source/ui/ribbar/tblctrl.cxx +++ b/sw/source/ui/ribbar/tblctrl.cxx @@ -51,8 +51,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTableOptimizeCtrl, SfxUInt16Item ); SwTableOptimizeCtrl::SwTableOptimizeCtrl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx index 6c20f9dd818d..31e3c21f5e13 100644 --- a/sw/source/ui/ribbar/tbxanchr.cxx +++ b/sw/source/ui/ribbar/tbxanchr.cxx @@ -61,7 +61,7 @@ SFX_IMPL_TOOLBOX_CONTROL(SwTbxAnchor, SfxUInt16Item); * Beschreibung: ******************************************************************************/ -SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), nActAnchorId(0) { @@ -80,7 +80,7 @@ SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : * Beschreibung: ******************************************************************************/ -void SwTbxAnchor::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) +void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); @@ -148,8 +148,8 @@ void SwTbxAnchor::Click() aPopMenu.EnableItem( FN_TOOL_ANKER_FRAME, 0 != pWrtShell->IsFlyInFly() ); Rectangle aRect(GetToolBox().GetItemRect(GetId())); - USHORT nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()); - BOOL bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS); + sal_uInt16 nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()); + sal_Bool bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS); if (bHtmlModeNoAnchor || pWrtShell->IsInHeaderFooter()) aPopMenu.RemoveItem(aPopMenu.GetItemPos(FN_TOOL_ANKER_PAGE)); @@ -158,7 +158,7 @@ void SwTbxAnchor::Click() aPopMenu.CheckItem(nActAnchorId); - USHORT nSlotId = aPopMenu.Execute(&GetToolBox(), aRect); + sal_uInt16 nSlotId = aPopMenu.Execute(&GetToolBox(), aRect); GetToolBox().EndSelection(); if (nSlotId) diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index cf7f4b15a33a..2e46b44cf82d 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -88,8 +88,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTbxAutoTextCtrl, SfxBoolItem ); **********************************************************************/ SwTbxInsertCtrl::SwTbxInsertCtrl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), nLastSlotId(FN_INSERT_CTRL == nSlotId ? FN_INSERT_TABLE : SID_INSERT_DIAGRAM) @@ -124,11 +124,11 @@ void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException) **********************************************************************/ -void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/, +void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); if( eState == SFX_ITEM_AVAILABLE ) @@ -148,7 +148,7 @@ void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/, hasBigImages(), rBox.GetSettings().GetStyleSettings().GetHighContrastMode() ); rBox.SetItemImage(GetId(), aImage); - rBox.SetItemImageMirrorMode( GetId(), FALSE ); + rBox.SetItemImageMirrorMode( GetId(), sal_False ); rBox.SetItemImageAngle( GetId(), pItem->GetRotation() ); rBox.SetItemImageMirrorMode( GetId(), pItem->IsMirrored() ); } @@ -191,7 +191,7 @@ SfxPopupWindowType SwTbxInsertCtrl::GetPopupWindowType() const **********************************************************************/ -void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ ) +void SwTbxInsertCtrl::Select( sal_Bool /*bMod1*/ ) { if( nLastSlotId ) { @@ -216,8 +216,8 @@ void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ ) SwTbxAutoTextCtrl::SwTbxAutoTextCtrl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), pPopup(0), @@ -271,22 +271,22 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow() { pPopup = new PopupMenu; SwGlossaryList* pGlossaryList = ::GetGlossaryList(); - USHORT nGroupCount = pGlossaryList->GetGroupCount(); - for(USHORT i = 1; i <= nGroupCount; i++) + sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount(); + for(sal_uInt16 i = 1; i <= nGroupCount; i++) { // Gruppenname mit Pfad-Extension besorgen String sTitle; - String sGroupName = pGlossaryList->GetGroupName(i - 1, FALSE, &sTitle); - USHORT nBlockCount = pGlossaryList->GetBlockCount(i -1); + String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle); + sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1); if(nBlockCount) { - USHORT nIndex = 100 * (i); + sal_uInt16 nIndex = 100 * (i); // aber ohne extension einfuegen pPopup->InsertItem( i, sTitle);//sGroupName.GetToken(0, GLOS_DELIM)); PopupMenu* pSub = new PopupMenu; pSub->SetSelectHdl(aLnk); pPopup->SetPopupMenu(i, pSub); - for(USHORT j = 0; j < nBlockCount; j++) + for(sal_uInt16 j = 0; j < nBlockCount; j++) { String sEntry; String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry)); @@ -299,14 +299,14 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow() } } ToolBox* pToolBox = &GetToolBox(); - USHORT nId = GetId(); - pToolBox->SetItemDown( nId, TRUE ); + sal_uInt16 nId = GetId(); + pToolBox->SetItemDown( nId, sal_True ); pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ), (pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ? POPUPMENU_EXECUTE_DOWN : POPUPMENU_EXECUTE_RIGHT ); - pToolBox->SetItemDown( nId, FALSE ); + pToolBox->SetItemDown( nId, sal_False ); } GetToolBox().EndSelection(); DelPopup(); @@ -330,7 +330,7 @@ SfxPopupWindowType SwTbxAutoTextCtrl::GetPopupWindowType() const **********************************************************************/ -void SwTbxAutoTextCtrl::StateChanged( USHORT nSID, +void SwTbxAutoTextCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { @@ -348,7 +348,7 @@ void SwTbxAutoTextCtrl::StateChanged( USHORT nSID, IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu) { - USHORT nId = pMenu->GetCurItemId(); + sal_uInt16 nId = pMenu->GetCurItemId(); if ( GetSlotId() == FN_INSERT_FIELD_CTRL) { @@ -384,11 +384,11 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu) } else { - USHORT nBlock = nId / 100; + sal_uInt16 nBlock = nId / 100; SwGlossaryList* pGlossaryList = ::GetGlossaryList(); String sShortName; - String sGroup = pGlossaryList->GetGroupName(nBlock - 1, FALSE); + String sGroup = pGlossaryList->GetGroupName(nBlock - 1, sal_False); String sLongName(pGlossaryList->GetBlockName(nBlock - 1, nId - (100 * nBlock) - 1, sShortName)); SwGlossaryHdl* pGlosHdl = pView->GetGlosHdl(); @@ -397,7 +397,7 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu) ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS ); if ( fnSetActGroup ) (*fnSetActGroup)( sGroup ); - pGlosHdl->SetCurGroup(sGroup, TRUE); + pGlosHdl->SetCurGroup(sGroup, sal_True); pGlosHdl->InsertGlossary(sShortName); } return 0; @@ -414,7 +414,7 @@ void SwTbxAutoTextCtrl::DelPopup() { if (GetSlotId() != FN_INSERT_FIELD_CTRL) { - for( USHORT i = 0; i < pPopup->GetItemCount(); i ++ ) + for( sal_uInt16 i = 0; i < pPopup->GetItemCount(); i ++ ) { PopupMenu* pSubPopup = pPopup->GetPopupMenu(pPopup->GetItemId(i)); delete pSubPopup; @@ -429,7 +429,7 @@ void SwTbxAutoTextCtrl::DelPopup() Navigations-Popup --------------------------------------------------*/ // determine the order of the toolbox items -static USHORT __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] = +static sal_uInt16 __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] = { // -- first line NID_TBL, @@ -480,7 +480,7 @@ static const char* __READONLY_DATA aNavigationHelpIds[ NAVI_ENTRIES ] = HID_NID_NEXT }; -SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFrame ) +SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >& rFrame ) : SfxPopupWindow(nId, rFrame, SW_RES(RID_SCROLL_NAVIGATION_WIN) ), aToolBox(this, 0), aSeparator(this, SW_RES(FL_SEP)), @@ -490,20 +490,20 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr nFwdId(FN_START_OF_NEXT_PAGE), nBackId(FN_START_OF_PREV_PAGE) { - USHORT i; + sal_uInt16 i; aToolBox.SetHelpId(HID_NAVI_VS); aToolBox.SetLineCount( 2 ); aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT); for( i = 0; i < NID_COUNT; i++) { - USHORT nNaviId = aNavigationInsertIds[i]; + sal_uInt16 nNaviId = aNavigationInsertIds[i]; String sText; ToolBoxItemBits nTbxBits = 0; if((NID_PREV != nNaviId) && (NID_NEXT != nNaviId)) { // -2, there's no string for Next/Prev - USHORT nResStr = ST_TBL - 2 + nNaviId - NID_START; + sal_uInt16 nResStr = ST_TBL - 2 + nNaviId - NID_START; sText = String(SW_RES(nResStr)); nTbxBits = TIB_CHECKABLE; } @@ -526,7 +526,7 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr aImgSize.Height() += 5; Size aSz = aToolBox.CalcWindowSizePixel(2); aToolBox.SetPosSizePixel( Point(), aSz ); - USHORT nItemId = SwView::GetMoveType(); + sal_uInt16 nItemId = SwView::GetMoveType(); aInfoField.SetText(aToolBox.GetItemText(nItemId)); aToolBox.CheckItem( nItemId, sal_True ); Size aFTSize(aInfoField.GetSizePixel()); @@ -570,9 +570,9 @@ void SwScrollNaviPopup::ApplyImageList() { ImageList& rImgLst = aToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ? aIListH : aIList; - for(USHORT i = 0; i < NID_COUNT; i++) + for(sal_uInt16 i = 0; i < NID_COUNT; i++) { - USHORT nNaviId = aNavigationInsertIds[i]; + sal_uInt16 nNaviId = aNavigationInsertIds[i]; aToolBox.SetItemImage(nNaviId, rImgLst.GetImage(nNaviId)); } } @@ -591,7 +591,7 @@ SfxPopupWindow* SwScrollNaviPopup::Clone() const IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) { - USHORT nSet = pSet->GetCurItemId(); + sal_uInt16 nSet = pSet->GetCurItemId(); if( nSet != NID_PREV && nSet != NID_NEXT ) { SwView::SetMoveType(nSet); @@ -599,9 +599,9 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) aToolBox.SetItemText(NID_PREV, sQuickHelp[nSet - NID_START + NID_COUNT]); aInfoField.SetText(aToolBox.GetItemText(nSet)); //check the current button only - for(USHORT i = 0; i < NID_COUNT; i++) + for(sal_uInt16 i = 0; i < NID_COUNT; i++) { - USHORT nItemId = aToolBox.GetItemId( i ); + sal_uInt16 nItemId = aToolBox.GetItemId( i ); aToolBox.CheckItem( nItemId, nItemId == nSet ); } } @@ -635,8 +635,8 @@ void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt ) --------------------------------------------------*/ void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt ) { - SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(TRUE)); - SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(FALSE)); + SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(sal_True)); + SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(sal_False)); ToolBox::RequestHelp( rHEvt ); } @@ -644,9 +644,9 @@ void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt ) /*-----------------20.06.97 13:41------------------- --------------------------------------------------*/ -String SwScrollNaviPopup::GetQuickHelpText(BOOL bNext) +String SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext) { - USHORT nResId = STR_IMGBTN_START; + sal_uInt16 nResId = STR_IMGBTN_START; nResId += SwView::GetMoveType() - NID_START; if(!bNext) nResId += NID_COUNT; @@ -760,14 +760,14 @@ void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt ) * --------------------------------------------------*/ class SwZoomBox_Impl : public ComboBox { - USHORT nSlotId; - BOOL bRelease; + sal_uInt16 nSlotId; + sal_Bool bRelease; uno::Reference< frame::XDispatchProvider > m_xDispatchProvider; public: SwZoomBox_Impl( Window* pParent, - USHORT nSlot, + sal_uInt16 nSlot, const Reference< XDispatchProvider >& rDispatchProvider ); ~SwZoomBox_Impl(); @@ -783,17 +783,17 @@ protected: * --------------------------------------------------*/ SwZoomBox_Impl::SwZoomBox_Impl( Window* pParent, - USHORT nSlot, + sal_uInt16 nSlot, const Reference< XDispatchProvider >& rDispatchProvider ): ComboBox( pParent, SW_RES(RID_PVIEW_ZOOM_LB)), nSlotId(nSlot), - bRelease(TRUE), + bRelease(sal_True), m_xDispatchProvider( rDispatchProvider ) { - EnableAutocomplete( FALSE ); - USHORT aZoomValues[] = + EnableAutocomplete( sal_False ); + sal_uInt16 aZoomValues[] = { 25, 50, 75, 100, 150, 200 }; - for(USHORT i = 0; i < sizeof(aZoomValues)/sizeof(USHORT); i++) + for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++) { String sEntry = String::CreateFromInt32(aZoomValues[i]); sEntry += '%'; @@ -814,7 +814,7 @@ void SwZoomBox_Impl::Select() { String sEntry(GetText()); sEntry.EraseAllChars( '%' ); - USHORT nZoom = (USHORT)sEntry.ToInt32(); + sal_uInt16 nZoom = (sal_uInt16)sEntry.ToInt32(); if(nZoom < MINZOOM) nZoom = MINZOOM; if(nZoom > MAXZOOM) @@ -846,7 +846,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { - USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); + sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch ( nCode ) { @@ -854,7 +854,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt ) case KEY_TAB: { if ( KEY_TAB == nCode ) - bRelease = FALSE; + bRelease = sal_False; else nHandled = 1; Select(); @@ -883,7 +883,7 @@ void SwZoomBox_Impl::ReleaseFocus() { if ( !bRelease ) { - bRelease = TRUE; + bRelease = sal_True; return; } SfxViewShell* pCurSh = SfxViewShell::Current(); @@ -903,8 +903,8 @@ void SwZoomBox_Impl::ReleaseFocus() SFX_IMPL_TOOLBOX_CONTROL( SwPreviewZoomControl, SfxUInt16Item); SwPreviewZoomControl::SwPreviewZoomControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx) : SfxToolBoxControl( nSlotId, nId, rTbx ) { @@ -918,11 +918,11 @@ SwPreviewZoomControl::~SwPreviewZoomControl() /* -----------------26.11.2002 09:29----------------- * * --------------------------------------------------*/ -void SwPreviewZoomControl::StateChanged( USHORT /*nSID*/, +void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() ); if(SFX_ITEM_AVAILABLE <= eState) -- cgit From 8bc2019cab507472a0412f47cea6e740ec697818 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 20 Jan 2011 19:19:11 +0100 Subject: undoapi: fix regression: undo comments with un-rewritten arguments: various EndUndo() calls undo SwRewriter applications done at StartUndo(). EndUndo() should only be called with a real ID if a comment should be generated from the ID that should become the list action comment. --- sw/source/ui/ribbar/drawbase.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx index bbfa7242c4ad..fae2df9c0f4a 100644 --- a/sw/source/ui/ribbar/drawbase.cxx +++ b/sw/source/ui/ribbar/drawbase.cxx @@ -364,7 +364,9 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) } } if (m_pWin->GetSdrDrawMode() == OBJ_NONE) - m_pSh->EndUndo(UNDO_INSERT); + { + m_pSh->EndUndo(); + } } bReturn = TRUE; -- cgit From 40bb208a5db70bd9ab1b877c911f537e4cb68afc Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 8 Feb 2011 11:05:35 +0100 Subject: removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw --- sw/source/ui/ribbar/inputwin.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sw/source/ui/ribbar') diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index d205e8650f43..fe148ff04841 100755 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -255,9 +255,11 @@ void SwInputWindow::ShowWin() SW_MOD()->GetUndoOptions().SetUndoCount(1); } - bDoesUndo = pWrtShell->DoesUndo(); - if( !bDoesUndo ) + m_bDoesUndo = pWrtShell->DoesUndo(); + if( !m_bDoesUndo ) + { pWrtShell->DoUndo( sal_True ); + } if( !pWrtShell->SwCrsrShell::HasSelection() ) { -- cgit