diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:35:18 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:35:18 +0100 |
commit | 6a75a47be7b3aafbb655ffa70609fd2ed7ca4b3e (patch) | |
tree | d00d2024213e09b8eba4704b8b6660eb42c3921c | |
parent | 7fb1e1ea8c9f8d3ef13524d1327272824df7110d (diff) | |
parent | eee3dbc7af039669d447d2e55abd896ea3383df1 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
automation/source/communi/communi.cxx
automation/source/server/recorder.cxx
automation/source/server/server.cxx
basctl/source/basicide/basobj2.cxx
941 files changed, 23754 insertions, 19226 deletions
diff --git a/UnoControls/prj/build.lst b/UnoControls/prj/build.lst index de5d7fd81d33..775cb902f5ca 100644 --- a/UnoControls/prj/build.lst +++ b/UnoControls/prj/build.lst @@ -1,4 +1,4 @@ -us UnoControls : cppuhelper offuh tools NULL +us UnoControls : LIBXSLT:libxslt cppuhelper offuh tools NULL us UnoControls usr1 - all us_mkout NULL us UnoControls\source\base nmake - all us_base NULL us UnoControls\source\controls nmake - all us_ctrls NULL diff --git a/UnoControls/prj/d.lst b/UnoControls/prj/d.lst index 5f65d3c80717..370fc0c9fc46 100644 --- a/UnoControls/prj/d.lst +++ b/UnoControls/prj/d.lst @@ -3,3 +3,4 @@ ..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl ..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib +..\%__SRC%\misc\ctl.component %_DEST%\xml%_EXT%\ctl.component diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx index 637c401df35f..e9c2d4a1261d 100644 --- a/UnoControls/source/base/registercontrols.cxx +++ b/UnoControls/source/base/registercontrols.cxx @@ -76,50 +76,6 @@ using namespace ::com::sun::star::registry ; } //****************************************************************************************************************************** -#define COMPONENT_INFO(CLASS) \ - \ - try \ - { \ - /* Set default result of follow operations !!! */ \ - bReturn = sal_False ; \ - \ - /* Do the follow only, if given key is valid ! */ \ - if ( xKey.is () ) \ - { \ - /* Build new keyname */ \ - sKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")) ; \ - sKeyName += CLASS::impl_getStaticImplementationName() ; \ - sKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); \ - \ - /* Create new key with new name. */ \ - xNewKey = xKey->createKey( sKeyName ); \ - \ - /* If this new key valid ... */ \ - if ( xNewKey.is () ) \ - { \ - /* Get information about supported services. */ \ - seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \ - pArray = seqServiceNames.getArray() ; \ - nLength = seqServiceNames.getLength() ; \ - nCounter = 0 ; \ - \ - /* Then set this information on this key. */ \ - for ( nCounter = 0; nCounter < nLength; ++nCounter ) \ - { \ - xNewKey->createKey( pArray [nCounter] ); \ - } \ - \ - /* Result of this operations = OK. */ \ - bReturn = sal_True ; \ - } \ - } \ - } \ - catch( InvalidRegistryException& ) \ - { \ - bReturn = sal_False ; \ - } \ - -//****************************************************************************************************************************** #define CREATEFACTORY_ONEINSTANCE(CLASS) \ \ /* Create right factory ... */ \ @@ -186,45 +142,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_ } //______________________________________________________________________________________________________________ -// write component info to registry -//______________________________________________________________________________________________________________ - -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ , - void* pRegistryKey ) -{ - // Set default return value for this operation - if it failed. - sal_Bool bReturn = sal_False ; - - if ( pRegistryKey != NULL ) - { - // Define variables for following macros! - // bReturn is set automaticly. - Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ; - Reference< XRegistryKey > xNewKey ; - Sequence< OUString > seqServiceNames ; - const OUString* pArray ; - sal_Int32 nLength ; - sal_Int32 nCounter ; - OUString sKeyName ; - - //============================================================================= - // Add new macro line to register new services. - // - // !!! ATTENTION !!! - // Write no ";" at end of line! (see macro) - //============================================================================= - COMPONENT_INFO ( FrameControl ) - COMPONENT_INFO ( ProgressBar ) - COMPONENT_INFO ( ProgressMonitor ) - COMPONENT_INFO ( StatusIndicator ) - //============================================================================= - } - - // Return with result of this operation. - return bReturn ; -} - -//______________________________________________________________________________________________________________ // create right component factory //______________________________________________________________________________________________________________ diff --git a/UnoControls/util/ctl.component b/UnoControls/util/ctl.component new file mode 100644 index 000000000000..32901f529c8b --- /dev/null +++ b/UnoControls/util/ctl.component @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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 +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="stardiv.UnoControls.FrameControl"> + <service name="com.sun.star.frame.FrameControl"/> + </implementation> + <implementation name="stardiv.UnoControls.ProgressBar"> + <service name="com.sun.star.awt.XProgressBar"/> + </implementation> + <implementation name="stardiv.UnoControls.ProgressMonitor"> + <service name="com.sun.star.awt.XProgressMonitor"/> + </implementation> + <implementation name="stardiv.UnoControls.StatusIndicator"> + <service name="com.sun.star.task.XStatusIndicator"/> + </implementation> +</component> diff --git a/UnoControls/util/makefile.mk b/UnoControls/util/makefile.mk index aacddb23c0ad..73617d24452c 100644 --- a/UnoControls/util/makefile.mk +++ b/UnoControls/util/makefile.mk @@ -59,3 +59,11 @@ SHL1LIBS= $(LIB1TARGET) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/ctl.component + +$(MISC)/ctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ctl.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ctl.component diff --git a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java index 454cd15154d4..ec479fb3949d 100755 --- a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java +++ b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java @@ -142,11 +142,6 @@ public class AccessBridge { return xSingleServiceFactory; } - public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) { - return FactoryHelper.writeRegistryServiceInfo(AccessBridge.class.getName(), - _AccessBridge._serviceName, regKey); - } - static public class _AccessBridge implements XTopWindowListener, XInitialization, XComponent { static final String _serviceName = "com.sun.star.accessibility.AccessBridge"; diff --git a/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component b/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component new file mode 100644 index 000000000000..5fc897f2d5aa --- /dev/null +++ b/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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 +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.Java2" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="org.openoffice.accessibility.AccessBridge"> + <service name="com.sun.star.accessibility.AccessBridge"/> + </implementation> +</component> diff --git a/accessibility/bridge/org/openoffice/accessibility/makefile.mk b/accessibility/bridge/org/openoffice/accessibility/makefile.mk index 9510a3156a59..1fa29f5bfcb1 100755 --- a/accessibility/bridge/org/openoffice/accessibility/makefile.mk +++ b/accessibility/bridge/org/openoffice/accessibility/makefile.mk @@ -53,3 +53,10 @@ CUSTOMMANIFESTFILE = manifest .INCLUDE : target.mk +ALLTAR : $(MISC)/java_uno_accessbridge.component + +$(MISC)/java_uno_accessbridge.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx index 8346c1173fb3..74f0631d9670 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx @@ -33,7 +33,7 @@ #include <com/sun/star/lang/XTypeProvider.hpp> #include "accessibility/extended/accessiblebrowseboxcell.hxx" #include <cppuhelper/implbase2.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> // ============================================================================ namespace accessibility { @@ -47,8 +47,8 @@ namespace accessibility { private: TriState m_eState; - BOOL m_bEnabled; - BOOL m_bIsTriState; + sal_Bool m_bEnabled; + sal_Bool m_bIsTriState; protected: virtual ~AccessibleCheckBoxCell() {} diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx index f1a26269f824..59b70062ffb3 100644 --- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx +++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx @@ -113,7 +113,7 @@ namespace accessibility is our parent accessible object */ AccessibleIconChoiceCtrlEntry( SvtIconChoiceCtrl& _rIconCtrl, - ULONG _nPos, + sal_uLong _nPos, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent ); // XTypeProvider diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx index 9a437672b4c9..6fc675ba5b15 100644 --- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx +++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx @@ -625,7 +625,7 @@ private: // Must be called with both the external (Solar) and internal mutex // locked, and after init has been called: - void changeParagraphText(::ULONG nNumber, ::USHORT nBegin, ::USHORT nEnd, + void changeParagraphText(::sal_uLong nNumber, ::sal_uInt16 nBegin, ::sal_uInt16 nEnd, bool bCut, bool bPaste, ::rtl::OUString const & rText); diff --git a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx index fa6331ba4228..37bfd1997409 100644 --- a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx +++ b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx @@ -29,8 +29,7 @@ #define ACCESSIBILITY_HELPER_COMBOLISTBOXHELPER_HXX #include <tools/string.hxx> -#include <vcl/wintypes.hxx> -#include <tools/gen.hxx> +#include <tools/wintypes.hxx> namespace com { namespace sun { namespace star { namespace datatransfer { namespace clipboard { class XClipboard; @@ -42,27 +41,27 @@ namespace accessibility class SAL_NO_VTABLE IComboListBoxHelper { public: - virtual String GetEntry( USHORT nPos ) const = 0; + virtual String GetEntry( sal_uInt16 nPos ) const = 0; virtual Rectangle GetDropDownPosSizePixel( ) const = 0; - virtual Rectangle GetBoundingRectangle( USHORT nItem ) const = 0; + virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const = 0; virtual Rectangle GetWindowExtentsRelative( Window* pRelativeWindow ) = 0; - virtual BOOL IsActive() const = 0; - virtual BOOL IsEntryVisible( USHORT nPos ) const = 0; - virtual USHORT GetDisplayLineCount() const = 0; - virtual void GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const = 0; + virtual sal_Bool IsActive() const = 0; + virtual sal_Bool IsEntryVisible( sal_uInt16 nPos ) const = 0; + virtual sal_uInt16 GetDisplayLineCount() const = 0; + virtual void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const = 0; virtual WinBits GetStyle() const = 0; - virtual BOOL IsMultiSelectionEnabled() const = 0; - virtual USHORT GetTopEntry() const = 0; - virtual BOOL IsEntryPosSelected( USHORT nPos ) const = 0; - virtual USHORT GetEntryCount() const = 0; + virtual sal_Bool IsMultiSelectionEnabled() const = 0; + virtual sal_uInt16 GetTopEntry() const = 0; + virtual sal_Bool IsEntryPosSelected( sal_uInt16 nPos ) const = 0; + virtual sal_uInt16 GetEntryCount() const = 0; virtual void Select() = 0; - virtual void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE ) = 0; - virtual USHORT GetSelectEntryCount() const = 0; + virtual void SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True ) = 0; + virtual sal_uInt16 GetSelectEntryCount() const = 0; virtual void SetNoSelection() = 0; - virtual USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const = 0; - virtual BOOL IsInDropDown() const = 0; + virtual sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const = 0; + virtual sal_Bool IsInDropDown() const = 0; virtual Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const = 0; - virtual long GetIndexForPoint( const Point& rPoint, USHORT& nPos ) const = 0; + virtual long GetIndexForPoint( const Point& rPoint, sal_uInt16& nPos ) const = 0; virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetClipboard() = 0; }; diff --git a/accessibility/inc/accessibility/helper/listboxhelper.hxx b/accessibility/inc/accessibility/helper/listboxhelper.hxx index 8343d95e9447..c928735e42ea 100644 --- a/accessibility/inc/accessibility/helper/listboxhelper.hxx +++ b/accessibility/inc/accessibility/helper/listboxhelper.hxx @@ -55,7 +55,7 @@ public: m_aComboListBox( _pListBox ){} // ----------------------------------------------------------------------------- - virtual String GetEntry( USHORT nPos ) const + virtual String GetEntry( sal_uInt16 nPos ) const { return m_aComboListBox.GetEntry( nPos ); } @@ -68,7 +68,7 @@ public: return aRet; } // ----------------------------------------------------------------------------- - virtual Rectangle GetBoundingRectangle( USHORT nItem ) const + virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const { Rectangle aRect; if ( m_aComboListBox.IsInDropDown() && IsEntryVisible( nItem ) ) @@ -90,24 +90,24 @@ public: return m_aComboListBox.GetWindowExtentsRelative( pRelativeWindow ); } // ----------------------------------------------------------------------------- - virtual BOOL IsActive() const + virtual sal_Bool IsActive() const { return m_aComboListBox.IsActive(); } // ----------------------------------------------------------------------------- - virtual BOOL IsEntryVisible( USHORT nPos ) const + virtual sal_Bool IsEntryVisible( sal_uInt16 nPos ) const { - USHORT nTopEntry = m_aComboListBox.GetTopEntry(); - USHORT nLines = m_aComboListBox.GetDisplayLineCount(); + sal_uInt16 nTopEntry = m_aComboListBox.GetTopEntry(); + sal_uInt16 nLines = m_aComboListBox.GetDisplayLineCount(); return ( nPos >= nTopEntry && nPos < ( nTopEntry + nLines ) ); } // ----------------------------------------------------------------------------- - virtual USHORT GetDisplayLineCount() const + virtual sal_uInt16 GetDisplayLineCount() const { return m_aComboListBox.GetDisplayLineCount(); } // ----------------------------------------------------------------------------- - virtual void GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const + virtual void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const { m_aComboListBox.GetMaxVisColumnsAndLines(rnCols,rnLines); } @@ -117,22 +117,22 @@ public: return m_aComboListBox.GetStyle(); } // ----------------------------------------------------------------------------- - virtual BOOL IsMultiSelectionEnabled() const + virtual sal_Bool IsMultiSelectionEnabled() const { return m_aComboListBox.IsMultiSelectionEnabled(); } // ----------------------------------------------------------------------------- - virtual USHORT GetTopEntry() const + virtual sal_uInt16 GetTopEntry() const { return m_aComboListBox.GetTopEntry(); } // ----------------------------------------------------------------------------- - virtual BOOL IsEntryPosSelected( USHORT nPos ) const + virtual sal_Bool IsEntryPosSelected( sal_uInt16 nPos ) const { return m_aComboListBox.IsEntryPosSelected(nPos); } // ----------------------------------------------------------------------------- - virtual USHORT GetEntryCount() const + virtual sal_uInt16 GetEntryCount() const { return m_aComboListBox.GetEntryCount(); } @@ -142,12 +142,12 @@ public: m_aComboListBox.Select(); } // ----------------------------------------------------------------------------- - virtual void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE ) + virtual void SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True ) { m_aComboListBox.SelectEntryPos(nPos,bSelect); } // ----------------------------------------------------------------------------- - virtual USHORT GetSelectEntryCount() const + virtual sal_uInt16 GetSelectEntryCount() const { return m_aComboListBox.GetSelectEntryCount(); } @@ -157,12 +157,12 @@ public: m_aComboListBox.SetNoSelection(); } // ----------------------------------------------------------------------------- - virtual USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const + virtual sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const { return m_aComboListBox.GetSelectEntryPos(nSelIndex); } // ----------------------------------------------------------------------------- - virtual BOOL IsInDropDown() const + virtual sal_Bool IsInDropDown() const { return m_aComboListBox.IsInDropDown(); } @@ -180,7 +180,7 @@ public: return aRect; } // ----------------------------------------------------------------------------- - long GetIndexForPoint( const Point& rPoint, USHORT& nPos ) const + long GetIndexForPoint( const Point& rPoint, sal_uInt16& nPos ) const { return m_aComboListBox.GetIndexForPoint( rPoint, nPos ); } diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx index ea08b1b33919..f0c640e901f1 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx @@ -153,7 +153,7 @@ protected: /// Index in parent. This is settable from the outside. sal_Int32 m_nIndexInParent; sal_Int32 m_nLastTopEntry; - USHORT m_nLastSelectedPos; + sal_uInt16 m_nLastSelectedPos; bool m_bDisableProcessEvent; bool m_bVisible; @@ -212,8 +212,8 @@ private: void adjustEntriesIndexInParent(ListItems::iterator& _aBegin,::std::mem_fun_t<bool,VCLXAccessibleListItem>& _rMemFun); void UpdateEntryRange_Impl (void); protected: - void UpdateSelection_Impl (USHORT nPos = 0); - BOOL checkEntrySelected(USHORT _nPos, + void UpdateSelection_Impl (sal_uInt16 nPos = 0); + sal_Bool checkEntrySelected(sal_uInt16 _nPos, ::com::sun::star::uno::Any& _rNewValue, ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxNewAcc); private: diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx deleted file mode 100644 index 436a20f55f28..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx +++ /dev/null @@ -1,108 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOXLIST_HXX -#define ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOXLIST_HXX - -#include <accessibility/standard/vclxaccessiblelist.hxx> -#include <com/sun/star/accessibility/XAccessibleAction.hpp> -#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp> -#include <comphelper/broadcasthelper.hxx> -#include <comphelper/uno3.hxx> -#include <cppuhelper/implbase1.hxx> - -typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessibleSelection - > VCLXAccessibleListBoxList_BASE; - - -class ListBox; -/** This class extends the list of the <type>VCLXAccessibleList</type> class - about selection. -*/ -class VCLXAccessibleListBoxList : - public VCLXAccessibleList, - public VCLXAccessibleListBoxList_BASE -{ -public: - VCLXAccessibleListBoxList (VCLXWindow* pVCLXindow, BoxType aBoxType, - const ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible >& _xParent); - - // XInterface - DECLARE_XINTERFACE( ) - - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName (void) - throw (::com::sun::star::uno::RuntimeException); - // Return list box list specific services. - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames (void) - throw (::com::sun::star::uno::RuntimeException); - - // XAccessibleSelection - void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException); - sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - - /** Create the specified child and insert it into the list of children. - Sets the child's states. - */ - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - CreateChild (sal_Int32 i); - - -protected: - virtual ~VCLXAccessibleListBoxList (void); - - virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent); - -private: - sal_Int32 m_nLastTopEntry; - USHORT m_nLastSelectedPos; - bool m_bDisableProcessEvent; - - void UpdateEntryRange_Impl (void); - using VCLXAccessibleList::UpdateSelection_Impl; - void UpdateSelection_Impl (void); - using VCLXAccessibleList::checkEntrySelected; - BOOL checkEntrySelected(ListBox* _pListBox, - USHORT _nPos, - ::com::sun::star::uno::Any& _rNewValue, - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxNewAcc); -}; - -#endif // ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx index 26070a4e91bb..df08e601eae0 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx @@ -62,7 +62,7 @@ private: VCLExternalSolarLock* m_pExternalLock; sal_Int32 m_nIndexInParent; sal_Int16 m_nRole; - USHORT m_nItemId; + sal_uInt16 m_nItemId; sal_Bool m_bHasFocus; sal_Bool m_bIsChecked; bool m_bIndeterminate; diff --git a/accessibility/prj/build.lst b/accessibility/prj/build.lst index f410ece56d9b..c9a8c345e056 100755 --- a/accessibility/prj/build.lst +++ b/accessibility/prj/build.lst @@ -1,4 +1,4 @@ -ac accessibility : l10n tools jurt offuh unoil vcl javaunohelper jvmaccess cppu sal toolkit svtools NULL +ac accessibility : L10N:l10n tools jurt offuh unoil vcl javaunohelper jvmaccess cppu sal toolkit svtools LIBXSLT:libxslt NULL ac accessibility usr1 - all ac_mkout NULL ac accessibility\inc nmake - all ac_inc NULL ac accessibility\bridge\org\openoffice\java\accessibility nmake - w ac_ooja ac_inc NULL diff --git a/accessibility/prj/d.lst b/accessibility/prj/d.lst index f61319551e41..662373c7c487 100644 --- a/accessibility/prj/d.lst +++ b/accessibility/prj/d.lst @@ -5,4 +5,4 @@ ..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib - +..\%__SRC%\misc\java_uno_accessbridge.component %_DEST%\xml\java_uno_accessbridge.component diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx index 77a59ef99fc1..b40253c2e100 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx @@ -357,12 +357,12 @@ Sequence< sal_Int8 > SAL_CALL AccessibleBrowseBoxHeaderBar::getImplementationId( Rectangle AccessibleBrowseBoxHeaderBar::implGetBoundingBox() { - return mpBrowseBox->calcHeaderRect(isColumnBar(),FALSE); + return mpBrowseBox->calcHeaderRect(isColumnBar(),sal_False); } Rectangle AccessibleBrowseBoxHeaderBar::implGetBoundingBoxOnScreen() { - return mpBrowseBox->calcHeaderRect(isColumnBar(),TRUE); + return mpBrowseBox->calcHeaderRect(isColumnBar(),sal_True); } sal_Int32 AccessibleBrowseBoxHeaderBar::implGetRowCount() const diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx index 4f778f5b8df8..8fa50319f5db 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx @@ -131,7 +131,7 @@ void SAL_CALL AccessibleBrowseBoxHeaderCell::grabFocus() // ----------------------------------------------------------------------------- namespace { - Rectangle getRectangle(IAccessibleTableProvider* _pBrowseBox,sal_Int32 _nRowColIndex, BOOL _bOnScreen,BOOL _bRowBar) + Rectangle getRectangle(IAccessibleTableProvider* _pBrowseBox,sal_Int32 _nRowColIndex, sal_Bool _bOnScreen,sal_Bool _bRowBar) { sal_Int32 nRow = 0; sal_uInt16 nCol = (sal_uInt16)_nRowColIndex; @@ -141,20 +141,20 @@ namespace nCol = 0; } - Rectangle aRet(_pBrowseBox->GetFieldRectPixelAbs( nRow , nCol, TRUE, _bOnScreen)); + Rectangle aRet(_pBrowseBox->GetFieldRectPixelAbs( nRow , nCol, sal_True, _bOnScreen)); return Rectangle(aRet.TopLeft() - Point(0,aRet.GetHeight()),aRet.GetSize()); } } Rectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBox() { - return getRectangle(mpBrowseBox,m_nColumnRowId,FALSE,isRowBarCell()); + return getRectangle(mpBrowseBox,m_nColumnRowId,sal_False,isRowBarCell()); } // ----------------------------------------------------------------------------- Rectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBoxOnScreen() { - return getRectangle(mpBrowseBox,m_nColumnRowId,TRUE,isRowBarCell()); + return getRectangle(mpBrowseBox,m_nColumnRowId,sal_True,isRowBarCell()); } // ----------------------------------------------------------------------------- sal_Int32 SAL_CALL AccessibleBrowseBoxHeaderCell::getAccessibleIndexInParent() diff --git a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx index fabe25d079f5..1e10f902cf2a 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx @@ -240,7 +240,7 @@ OUString SAL_CALL AccessibleBrowseBoxTable::getImplementationName() Rectangle AccessibleBrowseBoxTable::implGetBoundingBox() { - return mpBrowseBox->calcTableRect(FALSE); + return mpBrowseBox->calcTableRect(sal_False); } Rectangle AccessibleBrowseBoxTable::implGetBoundingBoxOnScreen() diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx index 6cdd7e22c4ab..40ca8ef9fbe4 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx @@ -66,7 +66,7 @@ namespace accessibility ::rtl::OUString AccessibleBrowseBoxTableCell::implGetText() { ensureIsAlive(); - return mpBrowseBox->GetAccessibleCellText( getRowPos(), static_cast< USHORT >( getColumnPos() ) ); + return mpBrowseBox->GetAccessibleCellText( getRowPos(), static_cast< sal_uInt16 >( getColumnPos() ) ); } ::com::sun::star::lang::Locale AccessibleBrowseBoxTableCell::implGetLocale() diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 4fdadbec97f4..4c2c5d130582 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -246,8 +246,7 @@ void SAL_CALL AccessibleGridControlTable::selectAccessibleChild( sal_Int32 nChil ensureIsValidIndex( nChildIndex ); sal_Int32 nColumns = m_aTable.GetColumnCount(); sal_Int32 nRow = (nChildIndex / nColumns); - std::vector< sal_Int32 > selectedRows = m_aTable.GetSelectedRows(); - selectedRows.push_back(nRow); + m_aTable.SelectRow( nRow, sal_True ); } sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) @@ -266,8 +265,7 @@ void SAL_CALL AccessibleGridControlTable::clearAccessibleSelection() SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getOslMutex() ); ensureIsAlive(); - for(unsigned int i=0;i<m_aTable.GetSelectedRows().size();i++) - m_aTable.RemoveSelectedRow((sal_Int32)i); + m_aTable.SelectAllRows( false ); } void SAL_CALL AccessibleGridControlTable::selectAllAccessibleChildren() throw ( uno::RuntimeException ) diff --git a/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/accessibility/source/extended/AccessibleGridControlTableBase.cxx index 211f2a29d03f..5dc6032eab7a 100644 --- a/accessibility/source/extended/AccessibleGridControlTableBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlTableBase.cxx @@ -246,7 +246,10 @@ sal_Int32 AccessibleGridControlTableBase::implGetChildIndex( void AccessibleGridControlTableBase::implGetSelectedRows( Sequence< sal_Int32 >& rSeq ) { - rSeq = comphelper::containerToSequence(m_aTable.GetSelectedRows()); + sal_Int32 const selectionCount( m_aTable.GetSelectedRowCount() ); + rSeq.realloc( selectionCount ); + for ( sal_Int32 i=0; i<selectionCount; ++i ) + rSeq[i] = m_aTable.GetSelectedRowIndex(i); } void AccessibleGridControlTableBase::ensureIsValidRow( sal_Int32 nRow ) diff --git a/accessibility/source/extended/accessiblebrowseboxcell.cxx b/accessibility/source/extended/accessiblebrowseboxcell.cxx index addbcaaa7cf8..708d7bb0aabc 100644 --- a/accessibility/source/extended/accessiblebrowseboxcell.cxx +++ b/accessibility/source/extended/accessiblebrowseboxcell.cxx @@ -77,13 +77,13 @@ namespace accessibility // ----------------------------------------------------------------------------- ::Rectangle AccessibleBrowseBoxCell::implGetBoundingBox() { - return mpBrowseBox->GetFieldRectPixelAbs( m_nRowPos, m_nColPos, FALSE, FALSE ); + return mpBrowseBox->GetFieldRectPixelAbs( m_nRowPos, m_nColPos, sal_False, sal_False ); } // ----------------------------------------------------------------------------- ::Rectangle AccessibleBrowseBoxCell::implGetBoundingBoxOnScreen() { - return mpBrowseBox->GetFieldRectPixelAbs( m_nRowPos, m_nColPos, FALSE ); + return mpBrowseBox->GetFieldRectPixelAbs( m_nRowPos, m_nColPos, sal_False ); } // ................................................................................. diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index dddb38fcbea1..ec970a5db414 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -91,7 +91,7 @@ namespace accessibility SvxIconChoiceCtrlEntry* pEntry = static_cast< SvxIconChoiceCtrlEntry* >( rVclWindowEvent.GetData() ); if ( pEntry ) { - ULONG nPos = pCtrl->GetEntryListPos( pEntry ); + sal_uLong nPos = pCtrl->GetEntryListPos( pEntry ); Reference< XAccessible > xChild = new AccessibleIconChoiceCtrlEntry( *pCtrl, nPos, this ); uno::Any aOldValue, aNewValue; aNewValue <<= xChild; diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx index 2e91908ce36a..117975bcd6f4 100644 --- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx @@ -79,7 +79,7 @@ namespace accessibility // Ctor() and Dtor() // ----------------------------------------------------------------------------- AccessibleIconChoiceCtrlEntry::AccessibleIconChoiceCtrlEntry( SvtIconChoiceCtrl& _rIconCtrl, - ULONG _nPos, + sal_uLong _nPos, const Reference< XAccessible >& _xParent ) : AccessibleIconChoiceCtrlEntry_BASE ( m_aMutex ), @@ -504,7 +504,7 @@ throw(RuntimeException) for ( long i = 0; i < nLen; ++i ) { Rectangle aRect = aLayoutData.GetCharacterBounds(i); - BOOL bInside = aRect.IsInside( aPnt ); + sal_Bool bInside = aRect.IsInside( aPnt ); if ( bInside ) break; @@ -525,7 +525,7 @@ throw(RuntimeException) throw IndexOutOfBoundsException(); sal_Int32 nLen = nEndIndex - nStartIndex + 1; - ::svt::OStringTransfer::CopyString( sText.Copy( (USHORT)nStartIndex, (USHORT)nLen ), m_pIconCtrl ); + ::svt::OStringTransfer::CopyString( sText.Copy( (sal_uInt16)nStartIndex, (sal_uInt16)nLen ), m_pIconCtrl ); return sal_True; } diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index 95e52056e1da..5ad861d9da12 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -307,7 +307,7 @@ namespace accessibility if ( !pEntry ) throw IndexOutOfBoundsException(); - getListBox()->Select( pEntry, TRUE ); + getListBox()->Select( pEntry, sal_True ); } // ----------------------------------------------------------------------------- sal_Bool SAL_CALL AccessibleListBox::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) @@ -335,7 +335,7 @@ namespace accessibility { SvLBoxEntry* pEntry = getListBox()->GetEntry( i ); if ( getListBox()->IsSelected( pEntry ) ) - getListBox()->Select( pEntry, FALSE ); + getListBox()->Select( pEntry, sal_False ); } } // ----------------------------------------------------------------------------- @@ -351,7 +351,7 @@ namespace accessibility { SvLBoxEntry* pEntry = getListBox()->GetEntry( i ); if ( !getListBox()->IsSelected( pEntry ) ) - getListBox()->Select( pEntry, TRUE ); + getListBox()->Select( pEntry, sal_True ); } } // ----------------------------------------------------------------------------- @@ -411,7 +411,7 @@ namespace accessibility if ( !pEntry ) throw IndexOutOfBoundsException(); - getListBox()->Select( pEntry, FALSE ); + getListBox()->Select( pEntry, sal_False ); } // ----------------------------------------------------------------------------- void AccessibleListBox::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index 71c52a90b1db..27390c51ce1c 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -609,7 +609,7 @@ namespace accessibility throw IndexOutOfBoundsException(); sal_Int32 nLen = nEndIndex - nStartIndex + 1; - ::svt::OStringTransfer::CopyString( sText.Copy( (USHORT)nStartIndex, (USHORT)nLen ), getListBox() ); + ::svt::OStringTransfer::CopyString( sText.Copy( (sal_uInt16)nStartIndex, (sal_uInt16)nLen ), getListBox() ); return sal_True; } @@ -716,7 +716,7 @@ namespace accessibility if ( !pEntry ) throw IndexOutOfBoundsException(); - getListBox()->Select( pEntry, TRUE ); + getListBox()->Select( pEntry, sal_True ); } // ----------------------------------------------------------------------------- sal_Bool SAL_CALL AccessibleListBoxEntry::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) @@ -750,7 +750,7 @@ namespace accessibility { SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i ); if ( getListBox()->IsSelected( pEntry ) ) - getListBox()->Select( pEntry, FALSE ); + getListBox()->Select( pEntry, sal_False ); } } // ----------------------------------------------------------------------------- @@ -770,7 +770,7 @@ namespace accessibility { SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i ); if ( !getListBox()->IsSelected( pEntry ) ) - getListBox()->Select( pEntry, TRUE ); + getListBox()->Select( pEntry, sal_True ); } } // ----------------------------------------------------------------------------- @@ -842,7 +842,7 @@ namespace accessibility if ( !pEntry ) throw IndexOutOfBoundsException(); - getListBox()->Select( pEntry, FALSE ); + getListBox()->Select( pEntry, sal_False ); } sal_Int32 SAL_CALL AccessibleListBoxEntry::getCaretPosition( ) throw (::com::sun::star::uno::RuntimeException) { diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx index db46d1862b9d..61bd754c8d6a 100644 --- a/accessibility/source/extended/accessibletabbar.cxx +++ b/accessibility/source/extended/accessibletabbar.cxx @@ -273,7 +273,7 @@ namespace accessibility if ( i < nCount ) { - Window* pChild = m_pTabBar->GetAccessibleChildWindow( (USHORT)i ); + Window* pChild = m_pTabBar->GetAccessibleChildWindow( (sal_uInt16)i ); if ( pChild ) xChild = pChild->GetAccessible(); } @@ -319,7 +319,7 @@ namespace accessibility Window* pParent = m_pTabBar->GetAccessibleParentWindow(); if ( pParent ) { - for ( USHORT i = 0, nCount = pParent->GetAccessibleChildWindowCount(); i < nCount; ++i ) + for ( sal_uInt16 i = 0, nCount = pParent->GetAccessibleChildWindowCount(); i < nCount; ++i ) { Window* pChild = pParent->GetAccessibleChildWindow( i ); if ( pChild == static_cast< Window* >( m_pTabBar ) ) diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index ebbf07949e26..1f0adda0bc32 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -489,7 +489,7 @@ namespace accessibility { if ( m_pTabBar ) { - sal_uInt16 nPageId = m_pTabBar->GetPageId( (USHORT)i ); + sal_uInt16 nPageId = m_pTabBar->GetPageId( (sal_uInt16)i ); xChild = new AccessibleTabBarPage( m_pTabBar, nPageId, this ); @@ -716,7 +716,7 @@ namespace accessibility if ( m_pTabBar ) { - m_pTabBar->SetCurPageId( m_pTabBar->GetPageId( (USHORT)nChildIndex ) ); + m_pTabBar->SetCurPageId( m_pTabBar->GetPageId( (sal_uInt16)nChildIndex ) ); m_pTabBar->Update(); m_pTabBar->ActivatePage(); m_pTabBar->Select(); @@ -733,7 +733,7 @@ namespace accessibility throw IndexOutOfBoundsException(); sal_Bool bSelected = sal_False; - if ( m_pTabBar && m_pTabBar->GetCurPageId() == m_pTabBar->GetPageId( (USHORT)nChildIndex ) ) + if ( m_pTabBar && m_pTabBar->GetCurPageId() == m_pTabBar->GetPageId( (sal_uInt16)nChildIndex ) ) bSelected = sal_True; return bSelected; diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx index 746963c9fe7a..7374cc020cf6 100644 --- a/accessibility/source/extended/accessibletablistboxtable.cxx +++ b/accessibility/source/extended/accessibletablistboxtable.cxx @@ -82,7 +82,7 @@ namespace accessibility { if ( isAlive() ) { - ULONG nEventId = rVclWindowEvent.GetId(); + sal_uLong nEventId = rVclWindowEvent.GetId(); switch ( nEventId ) { case VCLEVENT_OBJECT_DYING : @@ -117,7 +117,7 @@ namespace accessibility if ( pEntry ) { sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry ); - USHORT nCol = m_pTabListBox->GetCurrColumn(); + sal_uInt16 nCol = m_pTabListBox->GetCurrColumn(); Reference< XAccessible > xChild = m_pTabListBox->CreateAccessibleCell( nRow, nCol ); uno::Any aOldValue, aNewValue; @@ -157,7 +157,7 @@ namespace accessibility if ( pEntry ) { sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry ); - USHORT nCol = m_pTabListBox->GetCurrColumn(); + sal_uInt16 nCol = m_pTabListBox->GetCurrColumn(); TriState eState = STATE_DONTKNOW; if ( m_pTabListBox->IsCellCheckBox( nRow, nCol, eState ) ) { @@ -182,7 +182,7 @@ namespace accessibility if ( pEntry ) { sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry ); - USHORT nCol = pData->m_nColumn; + sal_uInt16 nCol = pData->m_nColumn; Reference< XAccessible > xChild = m_pTabListBox->CreateAccessibleCell( nRow, nCol ); uno::Any aOldValue, aNewValue; diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 2d0b0b5d20fe..3dbe462c227a 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -896,7 +896,7 @@ Document::retrieveParagraphText(ParagraphImpl const * pParagraph) { ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); ::osl::MutexGuard aInternalGuard(GetMutex()); - return m_rEngine.GetText(static_cast< ::ULONG >(pParagraph->getNumber())); + return m_rEngine.GetText(static_cast< ::sal_uLong >(pParagraph->getNumber())); // numeric overflow cannot happen here } @@ -920,7 +920,7 @@ void Document::retrieveParagraphSelection(ParagraphImpl const * pParagraph, : static_cast< ::sal_Int32 >( aMinPaM.GetIndex() ); // XXX numeric overflow *pEnd = nNumber < aMaxPaM.GetPara() - ? static_cast< ::sal_Int32 >( m_rEngine.GetText(static_cast< ::ULONG >(nNumber)).Len() ) + ? static_cast< ::sal_Int32 >( m_rEngine.GetText(static_cast< ::sal_uLong >(nNumber)).Len() ) : static_cast< ::sal_Int32 >( aMaxPaM.GetIndex() ); // XXX numeric overflow (3x) @@ -952,7 +952,7 @@ Document::retrieveCharacterBounds(ParagraphImpl const * pParagraph, { ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); ::osl::MutexGuard aInternalGuard(GetMutex()); - ::ULONG nNumber = static_cast< ::ULONG >(pParagraph->getNumber()); + ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); sal_Int32 nLength = m_rEngine.GetText(nNumber).Len(); // XXX numeric overflow if (nIndex < 0 || nIndex > nLength) @@ -967,17 +967,17 @@ Document::retrieveCharacterBounds(ParagraphImpl const * pParagraph, { aBounds = AWTRectangle( m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, - static_cast< ::USHORT >(nIndex)))); + static_cast< ::sal_uInt16 >(nIndex)))); } else { ::Rectangle aLeft( m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, - static_cast< ::USHORT >(nIndex)))); + static_cast< ::sal_uInt16 >(nIndex)))); // XXX numeric overflow ::Rectangle aRight( m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, - static_cast< ::USHORT >(nIndex) + static_cast< ::sal_uInt16 >(nIndex) + 1))); // XXX numeric overflow (2x) // FIXME If the vertical extends of the two cursors do not match, assume @@ -1004,7 +1004,7 @@ Document::retrieveCharacterBounds(ParagraphImpl const * pParagraph, { ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); ::osl::MutexGuard aInternalGuard(GetMutex()); - ::ULONG nNumber = static_cast< ::ULONG >(pParagraph->getNumber()); + ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); // XXX numeric overflow ::TextPaM aPaM(m_rEngine.GetPaM(::Point(static_cast< long >(rPoint.X), static_cast< long >(rPoint.Y)))); @@ -1021,7 +1021,7 @@ Document::retrieveCharacterAttributes( { ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); ::osl::MutexGuard aInternalGuard(GetMutex()); - ::ULONG nNumber = static_cast< ::ULONG >(pParagraph->getNumber()); + ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); // XXX numeric overflow if (nIndex < 0 || nIndex >= m_rEngine.GetText(nNumber).Len()) throw ::css::lang::IndexOutOfBoundsException( @@ -1096,8 +1096,8 @@ void Document::retrieveRunAttributesImpl( const ::css::uno::Sequence< ::rtl::OUString >& RequestedAttributes, tPropValMap& rRunAttrSeq) { - ::ULONG nNumber = static_cast< ::ULONG >( pParagraph->getNumber() ); - ::TextPaM aPaM( nNumber, static_cast< ::USHORT >( Index ) ); + ::sal_uLong nNumber = static_cast< ::sal_uLong >( pParagraph->getNumber() ); + ::TextPaM aPaM( nNumber, static_cast< ::sal_uInt16 >( Index ) ); // XXX numeric overflow // FIXME TEXTATTR_HYPERLINK ignored: ::TextAttribFontColor const * pColor @@ -1153,7 +1153,7 @@ Document::retrieveRunAttributes( { ::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() ); ::osl::MutexGuard aInternalGuard( GetMutex() ); - ::ULONG nNumber = static_cast< ::ULONG >( pParagraph->getNumber() ); + ::sal_uLong nNumber = static_cast< ::sal_uLong >( pParagraph->getNumber() ); // XXX numeric overflow if ( Index < 0 || Index >= m_rEngine.GetText(nNumber).Len() ) throw ::css::lang::IndexOutOfBoundsException( @@ -1174,7 +1174,7 @@ void Document::changeParagraphText(ParagraphImpl * pParagraph, ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); { ::osl::MutexGuard aInternalGuard(GetMutex()); - ::ULONG nNumber = static_cast< ::ULONG >(pParagraph->getNumber()); + ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); // XXX numeric overflow changeParagraphText(nNumber, 0, m_rEngine.GetTextLen(nNumber), false, false, rText); @@ -1189,7 +1189,7 @@ void Document::changeParagraphText(ParagraphImpl * pParagraph, ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); { ::osl::MutexGuard aInternalGuard(GetMutex()); - ::ULONG nNumber = static_cast< ::ULONG >(pParagraph->getNumber()); + ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); // XXX numeric overflow if (nBegin < 0 || nBegin > nEnd || nEnd > m_rEngine.GetText(nNumber).Len()) @@ -1199,8 +1199,8 @@ void Document::changeParagraphText(ParagraphImpl * pParagraph, "textwindowaccessibility.cxx:" " Document::changeParagraphText")), static_cast< ::css::uno::XWeak * >(this)); - changeParagraphText(nNumber, static_cast< ::USHORT >(nBegin), - static_cast< ::USHORT >(nEnd), bCut, bPaste, rText); + changeParagraphText(nNumber, static_cast< ::sal_uInt16 >(nBegin), + static_cast< ::sal_uInt16 >(nEnd), bCut, bPaste, rText); // XXX numeric overflow (2x) } } @@ -1211,7 +1211,7 @@ void Document::copyParagraphText(ParagraphImpl const * pParagraph, ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); { ::osl::MutexGuard aInternalGuard(GetMutex()); - ::ULONG nNumber = static_cast< ::ULONG >(pParagraph->getNumber()); + ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); // XXX numeric overflow if (nBegin < 0 || nBegin > nEnd || nEnd > m_rEngine.GetText(nNumber).Len()) @@ -1221,8 +1221,8 @@ void Document::copyParagraphText(ParagraphImpl const * pParagraph, " Document::copyParagraphText")), static_cast< ::css::uno::XWeak * >(this)); m_rView.SetSelection( - ::TextSelection(::TextPaM(nNumber, static_cast< ::USHORT >(nBegin)), - ::TextPaM(nNumber, static_cast< ::USHORT >(nEnd)))); + ::TextSelection(::TextPaM(nNumber, static_cast< ::sal_uInt16 >(nBegin)), + ::TextPaM(nNumber, static_cast< ::sal_uInt16 >(nEnd)))); // XXX numeric overflow (2x) m_rView.Copy(); } @@ -1235,7 +1235,7 @@ void Document::changeParagraphAttributes( ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); { ::osl::MutexGuard aInternalGuard(GetMutex()); - ::ULONG nNumber = static_cast< ::ULONG >(pParagraph->getNumber()); + ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); // XXX numeric overflow if (nBegin < 0 || nBegin > nEnd || nEnd > m_rEngine.GetText(nNumber).Len()) @@ -1254,15 +1254,15 @@ void Document::changeParagraphAttributes( RTL_CONSTASCII_STRINGPARAM("CharColor"))) m_rEngine.SetAttrib(::TextAttribFontColor( mapFontColor(rAttributeSet[i].Value)), - nNumber, static_cast< ::USHORT >(nBegin), - static_cast< ::USHORT >(nEnd)); + nNumber, static_cast< ::sal_uInt16 >(nBegin), + static_cast< ::sal_uInt16 >(nEnd)); // XXX numeric overflow (2x) else if (rAttributeSet[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("CharWeight"))) m_rEngine.SetAttrib(::TextAttribFontWeight( mapFontWeight(rAttributeSet[i].Value)), - nNumber, static_cast< ::USHORT >(nBegin), - static_cast< ::USHORT >(nEnd)); + nNumber, static_cast< ::sal_uInt16 >(nBegin), + static_cast< ::sal_uInt16 >(nEnd)); // XXX numeric overflow (2x) } } @@ -1273,7 +1273,7 @@ void Document::changeParagraphSelection(ParagraphImpl * pParagraph, ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); { ::osl::MutexGuard aInternalGuard(GetMutex()); - ::ULONG nNumber = static_cast< ::ULONG >(pParagraph->getNumber()); + ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); // XXX numeric overflow if (nBegin < 0 || nBegin > nEnd || nEnd > m_rEngine.GetText(nNumber).Len()) @@ -1283,8 +1283,8 @@ void Document::changeParagraphSelection(ParagraphImpl * pParagraph, " Document::changeParagraphSelection")), static_cast< ::css::uno::XWeak * >(this)); m_rView.SetSelection( - ::TextSelection(::TextPaM(nNumber, static_cast< ::USHORT >(nBegin)), - ::TextPaM(nNumber, static_cast< ::USHORT >(nEnd)))); + ::TextSelection(::TextPaM(nNumber, static_cast< ::sal_uInt16 >(nBegin)), + ::TextPaM(nNumber, static_cast< ::sal_uInt16 >(nEnd)))); // XXX numeric overflow (2x) } } @@ -1300,7 +1300,7 @@ Document::retrieveParagraphLineBoundary( ParagraphImpl const * pParagraph, ::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() ); { ::osl::MutexGuard aInternalGuard( GetMutex() ); - ::ULONG nNumber = static_cast< ::ULONG >( pParagraph->getNumber() ); + ::sal_uLong nNumber = static_cast< ::sal_uLong >( pParagraph->getNumber() ); if ( nIndex < 0 || nIndex > m_rEngine.GetText( nNumber ).Len() ) throw ::css::lang::IndexOutOfBoundsException( ::rtl::OUString( @@ -1310,8 +1310,8 @@ Document::retrieveParagraphLineBoundary( ParagraphImpl const * pParagraph, static_cast< ::css::uno::XWeak * >( this ) ); ::sal_Int32 nLineStart = 0; ::sal_Int32 nLineEnd = 0; - ::USHORT nLineCount = m_rEngine.GetLineCount( nNumber ); - for ( ::USHORT nLine = 0; nLine < nLineCount; ++nLine ) + ::sal_uInt16 nLineCount = m_rEngine.GetLineCount( nNumber ); + for ( ::sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine ) { ::sal_Int32 nLineLength = static_cast< ::sal_Int32 >( m_rEngine.GetLineLen( nNumber, nLine ) ); @@ -1342,7 +1342,7 @@ Document::retrieveParagraphBoundaryOfLine( ParagraphImpl const * pParagraph, ::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() ); { ::osl::MutexGuard aInternalGuard( GetMutex() ); - ::ULONG nNumber = static_cast< ::ULONG >( pParagraph->getNumber() ); + ::sal_uLong nNumber = static_cast< ::sal_uLong >( pParagraph->getNumber() ); if ( nLineNo >= m_rEngine.GetLineCount( nNumber ) ) throw ::css::lang::IndexOutOfBoundsException( ::rtl::OUString( @@ -1352,7 +1352,7 @@ Document::retrieveParagraphBoundaryOfLine( ParagraphImpl const * pParagraph, static_cast< ::css::uno::XWeak * >( this ) ); ::sal_Int32 nLineStart = 0; ::sal_Int32 nLineEnd = 0; - for ( ::USHORT nLine = 0; nLine <= nLineNo; ++nLine ) + for ( ::sal_uInt16 nLine = 0; nLine <= nLineNo; ++nLine ) { ::sal_Int32 nLineLength = static_cast< ::sal_Int32 >( m_rEngine.GetLineLen( nNumber, nLine ) ); @@ -1673,11 +1673,11 @@ void Document::init() { if (m_xParagraphs.get() == 0) { - ::ULONG nCount = m_rEngine.GetParagraphCount(); + ::sal_uLong nCount = m_rEngine.GetParagraphCount(); ::std::auto_ptr< Paragraphs > p(new Paragraphs); p->reserve(static_cast< Paragraphs::size_type >(nCount)); // numeric overflow is harmless here - for (::ULONG i = 0; i < nCount; ++i) + for (::sal_uLong i = 0; i < nCount; ++i) p->push_back(ParagraphInfo(static_cast< ::sal_Int32 >( m_rEngine.GetTextHeight(i)))); // XXX numeric overflow @@ -1786,7 +1786,7 @@ void Document::notifyVisibleRangeChanges( } void -Document::changeParagraphText(::ULONG nNumber, ::USHORT nBegin, ::USHORT nEnd, +Document::changeParagraphText(::sal_uLong nNumber, ::sal_uInt16 nBegin, ::sal_uInt16 nEnd, bool bCut, bool bPaste, ::rtl::OUString const & rText) { @@ -1812,7 +1812,7 @@ void Document::handleParagraphNotifications() { case TEXT_HINT_PARAINSERTED: { - ::ULONG n = aHint.GetValue(); + ::sal_uLong n = aHint.GetValue(); OSL_ENSURE(n <= m_xParagraphs->size(), "bad TEXT_HINT_PARAINSERTED event"); @@ -1864,7 +1864,7 @@ void Document::handleParagraphNotifications() } case TEXT_HINT_PARAREMOVED: { - ::ULONG n = aHint.GetValue(); + ::sal_uLong n = aHint.GetValue(); if (n == TEXT_PARA_ALL) { {for (Paragraphs::iterator aIt(m_aVisibleBegin); @@ -1979,7 +1979,7 @@ void Document::handleParagraphNotifications() } case TEXT_HINT_FORMATPARA: { - ::ULONG n = aHint.GetValue(); + ::sal_uLong n = aHint.GetValue(); OSL_ENSURE(n < m_xParagraphs->size(), "Bad TEXT_HINT_FORMATPARA event"); @@ -2080,10 +2080,10 @@ void Document::handleSelectionChangeNotification() // overlap---the overlap and/or the range to the right of it possibly being // empty. Only for these two ranges notifications have to be sent.) - TextPaM aOldTextStart( static_cast< ULONG >( m_nSelectionFirstPara ), static_cast< USHORT >( m_nSelectionFirstPos ) ); - TextPaM aOldTextEnd( static_cast< ULONG >( m_nSelectionLastPara ), static_cast< USHORT >( m_nSelectionLastPos ) ); - TextPaM aNewTextStart( static_cast< ULONG >( nNewFirstPara ), static_cast< USHORT >( nNewFirstPos ) ); - TextPaM aNewTextEnd( static_cast< ULONG >( nNewLastPara ), static_cast< USHORT >( nNewLastPos ) ); + TextPaM aOldTextStart( static_cast< sal_uLong >( m_nSelectionFirstPara ), static_cast< sal_uInt16 >( m_nSelectionFirstPos ) ); + TextPaM aOldTextEnd( static_cast< sal_uLong >( m_nSelectionLastPara ), static_cast< sal_uInt16 >( m_nSelectionLastPos ) ); + TextPaM aNewTextStart( static_cast< sal_uLong >( nNewFirstPara ), static_cast< sal_uInt16 >( nNewFirstPos ) ); + TextPaM aNewTextEnd( static_cast< sal_uLong >( nNewLastPara ), static_cast< sal_uInt16 >( nNewLastPos ) ); // justify selections justifySelection( aOldTextStart, aOldTextEnd ); diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx index ab02caaa322c..d416efeee799 100644 --- a/accessibility/source/standard/accessiblemenubasecomponent.cxx +++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx @@ -354,13 +354,13 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChild( sal_Int32 i ) // create a new child OAccessibleMenuBaseComponent* pChild; - if ( m_pMenu->GetItemType( (USHORT)i ) == MENUITEM_SEPARATOR ) + if ( m_pMenu->GetItemType( (sal_uInt16)i ) == MENUITEM_SEPARATOR ) { pChild = new VCLXAccessibleMenuSeparator( m_pMenu, (sal_uInt16)i ); } else { - PopupMenu* pPopupMenu = m_pMenu->GetPopupMenu( m_pMenu->GetItemId( (USHORT)i ) ); + PopupMenu* pPopupMenu = m_pMenu->GetPopupMenu( m_pMenu->GetItemId( (sal_uInt16)i ) ); if ( pPopupMenu ) { pChild = new VCLXAccessibleMenu( m_pMenu, (sal_uInt16)i, pPopupMenu ); @@ -525,7 +525,7 @@ void OAccessibleMenuBaseComponent::SelectChild( sal_Int32 i ) // highlight the child if ( m_pMenu ) - m_pMenu->HighlightItem( (USHORT)i ); + m_pMenu->HighlightItem( (sal_uInt16)i ); } // ----------------------------------------------------------------------------- @@ -542,7 +542,7 @@ sal_Bool OAccessibleMenuBaseComponent::IsChildSelected( sal_Int32 i ) { sal_Bool bSelected = sal_False; - if ( m_pMenu && m_pMenu->IsHighlighted( (USHORT)i ) ) + if ( m_pMenu && m_pMenu->IsHighlighted( (sal_uInt16)i ) ) bSelected = sal_True; return bSelected; diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx index 0b34e2efa800..2348198a7a1e 100644 --- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx +++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx @@ -158,7 +158,7 @@ void OAccessibleMenuItemComponent::Click() // that the popup menus are executed synchronously. AllSettings aSettings = pWindow->GetSettings(); MouseSettings aMouseSettings = aSettings.GetMouseSettings(); - ULONG nDelay = aMouseSettings.GetMenuDelay(); + sal_uLong nDelay = aMouseSettings.GetMenuDelay(); aMouseSettings.SetMenuDelay( 0 ); aSettings.SetMouseSettings( aMouseSettings ); pWindow->SetSettings( aSettings ); diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index c8177943a3f2..8e7d349ef988 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -32,7 +32,6 @@ #include <accessibility/standard/vclxaccessibletextfield.hxx> #include <accessibility/standard/vclxaccessibleedit.hxx> #include <accessibility/standard/vclxaccessiblelist.hxx> -#include <accessibility/standard/vclxaccessiblelistboxlist.hxx> #include <accessibility/helper/listboxhelper.hxx> #include <unotools/accessiblestatesethelper.hxx> diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx index f30a690c89d9..11e7f5497da9 100644 --- a/accessibility/source/standard/vclxaccessiblebutton.cxx +++ b/accessibility/source/standard/vclxaccessiblebutton.cxx @@ -293,7 +293,7 @@ sal_Bool VCLXAccessibleButton::setCurrentValue( const Any& aNumber ) throw (Runt else if ( nValue > 1 ) nValue = 1; - pButton->SetPressed( (BOOL) nValue ); + pButton->SetPressed( (sal_Bool) nValue ); bReturn = sal_True; } diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx index b8f05dbc66c8..bbd329594f24 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -159,7 +159,7 @@ void VCLXAccessibleEdit::FillAccessibleStateSet( utl::AccessibleStateSetHelper& if ( !cEchoChar ) cEchoChar = '*'; XubString sTmp; - aText = sTmp.Fill( (USHORT)aText.getLength(), cEchoChar ); + aText = sTmp.Fill( (sal_uInt16)aText.getLength(), cEchoChar ); } } diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx index accce8440c7e..a411936fea4f 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -95,7 +95,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType } UpdateVisibleLineCount(); - USHORT nCount = static_cast<USHORT>(getAccessibleChildCount()); + sal_uInt16 nCount = static_cast<sal_uInt16>(getAccessibleChildCount()); m_aAccessibleChildren.reserve(nCount); } // ----------------------------------------------------------------------------- @@ -178,10 +178,10 @@ void VCLXAccessibleList::notifyVisibleStates(sal_Bool _bSetNew ) VCLXAccessibleListItem* pItem = static_cast<VCLXAccessibleListItem*>(xHold.get()); if ( pItem ) { - USHORT nTopEntry = 0; + sal_uInt16 nTopEntry = 0; if ( m_pListBoxHelper ) nTopEntry = m_pListBoxHelper->GetTopEntry(); - USHORT nPos = (USHORT)(aIter - m_aAccessibleChildren.begin()); + sal_uInt16 nPos = (sal_uInt16)(aIter - m_aAccessibleChildren.begin()); sal_Bool bVisible = ( nPos>=nTopEntry && nPos<( nTopEntry + m_nVisibleLineCount ) ); pItem->SetVisible( m_bVisible && bVisible ); } @@ -242,7 +242,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve { uno::Any aOldValue, aNewValue; - USHORT nPos = m_pListBoxHelper->GetSelectEntryPos(); + sal_uInt16 nPos = m_pListBoxHelper->GetSelectEntryPos(); if ( nPos == LISTBOX_ENTRY_NOTFOUND ) nPos = m_pListBoxHelper->GetTopEntry(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) @@ -272,7 +272,7 @@ void VCLXAccessibleList::UpdateSelection (::rtl::OUString sTextOfSelectedItem) if ( pBox != NULL ) { // Find the index of the selected item inside the VCL control... - USHORT nIndex = pBox->GetEntryPos (XubString(sTextOfSelectedItem)); + sal_uInt16 nIndex = pBox->GetEntryPos (XubString(sTextOfSelectedItem)); // ...and then find the associated accessibility object. if ( nIndex == LISTBOX_ENTRY_NOTFOUND ) nIndex = 0; @@ -301,7 +301,7 @@ Reference<XAccessible> VCLXAccessibleList::CreateChild (sal_Int32 i) { Reference<XAccessible> xChild; - USHORT nPos = static_cast<USHORT>(i); + sal_uInt16 nPos = static_cast<sal_uInt16>(i); if ( nPos >= m_aAccessibleChildren.size() ) { m_aAccessibleChildren.resize(nPos + 1); @@ -330,15 +330,15 @@ Reference<XAccessible> VCLXAccessibleList::CreateChild (sal_Int32 i) if ( xChild.is() ) { // Just add the SELECTED state. - BOOL bNowSelected = FALSE; + sal_Bool bNowSelected = sal_False; if ( m_pListBoxHelper ) - bNowSelected = m_pListBoxHelper->IsEntryPosSelected ((USHORT)i); + bNowSelected = m_pListBoxHelper->IsEntryPosSelected ((sal_uInt16)i); VCLXAccessibleListItem* pItem = static_cast< VCLXAccessibleListItem* >(xChild.get()); pItem->SetSelected( bNowSelected ); // Set the child's VISIBLE state. UpdateVisibleLineCount(); - USHORT nTopEntry = 0; + sal_uInt16 nTopEntry = 0; if ( m_pListBoxHelper ) nTopEntry = m_pListBoxHelper->GetTopEntry(); sal_Bool bVisible = ( nPos>=nTopEntry && nPos<( nTopEntry + m_nVisibleLineCount ) ); @@ -359,7 +359,7 @@ void VCLXAccessibleList::HandleChangedItemList (bool bItemInserted, sal_Int32 nI } else { - if ( nIndex >= 0 && static_cast<USHORT>(nIndex) < m_aAccessibleChildren.size() ) + if ( nIndex >= 0 && static_cast<sal_uInt16>(nIndex) < m_aAccessibleChildren.size() ) { ListItems::iterator aIter = m_aAccessibleChildren.erase(m_aAccessibleChildren.begin()+nIndex); ::std::mem_fun_t<bool, VCLXAccessibleListItem> aTemp(&VCLXAccessibleListItem::DecrementIndexInParent); @@ -416,7 +416,7 @@ Reference<XAccessible> SAL_CALL VCLXAccessibleList::getAccessibleChild (sal_Int3 Reference< XAccessible > xChild; // search for the child - if ( static_cast<USHORT>(i) >= m_aAccessibleChildren.size() ) + if ( static_cast<sal_uInt16>(i) >= m_aAccessibleChildren.size() ) xChild = CreateChild (i); else { @@ -488,8 +488,8 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleList::getAccessibleAt( const awt if ( contains( rPoint ) && m_nVisibleLineCount > 0 ) { Point aPos = VCLPoint( rPoint ); - USHORT nEndPos = m_pListBoxHelper->GetTopEntry() + (USHORT)m_nVisibleLineCount; - for ( USHORT i = m_pListBoxHelper->GetTopEntry(); i < nEndPos; ++i ) + sal_uInt16 nEndPos = m_pListBoxHelper->GetTopEntry() + (sal_uInt16)m_nVisibleLineCount; + for ( sal_uInt16 i = m_pListBoxHelper->GetTopEntry(); i < nEndPos; ++i ) { if ( m_pListBoxHelper->GetBoundingRectangle(i).IsInside( aPos ) ) { @@ -532,7 +532,7 @@ void VCLXAccessibleList::UpdateVisibleLineCount() m_nVisibleLineCount = m_pListBoxHelper->GetDisplayLineCount(); else { - USHORT nCols = 0, + sal_uInt16 nCols = 0, nLines = 0; m_pListBoxHelper->GetMaxVisColumnsAndLines (nCols, nLines); m_nVisibleLineCount = nLines; @@ -555,7 +555,7 @@ void VCLXAccessibleList::UpdateEntryRange_Impl() UpdateVisibleLineCount(); sal_Int32 nBegin = Min( m_nLastTopEntry, nTop ); sal_Int32 nEnd = Max( m_nLastTopEntry + m_nVisibleLineCount, nTop + m_nVisibleLineCount ); - for (USHORT i = static_cast<USHORT>(nBegin); (i <= static_cast<USHORT>(nEnd)); ++i) + for (sal_uInt16 i = static_cast<sal_uInt16>(nBegin); (i <= static_cast<sal_uInt16>(nEnd)); ++i) { sal_Bool bVisible = ( i >= nTop && i < ( nTop + m_nVisibleLineCount ) ); Reference< XAccessible > xHold; @@ -572,10 +572,10 @@ void VCLXAccessibleList::UpdateEntryRange_Impl() m_nLastTopEntry = nTop; } // ----------------------------------------------------------------------------- -BOOL VCLXAccessibleList::checkEntrySelected(USHORT _nPos,Any& _rNewValue,Reference< XAccessible >& _rxNewAcc) +sal_Bool VCLXAccessibleList::checkEntrySelected(sal_uInt16 _nPos,Any& _rNewValue,Reference< XAccessible >& _rxNewAcc) { OSL_ENSURE(m_pListBoxHelper,"Helper is not valid!"); - BOOL bNowSelected = FALSE; + sal_Bool bNowSelected = sal_False; if ( m_pListBoxHelper ) { bNowSelected = m_pListBoxHelper->IsEntryPosSelected (_nPos); @@ -589,7 +589,7 @@ BOOL VCLXAccessibleList::checkEntrySelected(USHORT _nPos,Any& _rNewValue,Referen } // ----------------------------------------------------------------------------- -void VCLXAccessibleList::UpdateSelection_Impl(USHORT) +void VCLXAccessibleList::UpdateSelection_Impl(sal_uInt16) { uno::Any aOldValue, aNewValue; @@ -600,7 +600,7 @@ void VCLXAccessibleList::UpdateSelection_Impl(USHORT) if ( m_pListBoxHelper ) { - USHORT i=0; + sal_uInt16 i=0; for ( ListItems::iterator aIter = m_aAccessibleChildren.begin(); aIter != m_aAccessibleChildren.end(); ++aIter,++i) { @@ -609,7 +609,7 @@ void VCLXAccessibleList::UpdateSelection_Impl(USHORT) { VCLXAccessibleListItem* pItem = static_cast< VCLXAccessibleListItem* >( xHold.get() ); // Retrieve the item's index from the list entry. - BOOL bNowSelected = m_pListBoxHelper->IsEntryPosSelected (i); + sal_Bool bNowSelected = m_pListBoxHelper->IsEntryPosSelected (i); if ( bNowSelected && !pItem->IsSelected() ) { @@ -626,7 +626,7 @@ void VCLXAccessibleList::UpdateSelection_Impl(USHORT) checkEntrySelected(i,aNewValue,xNewAcc); } } - USHORT nCount = m_pListBoxHelper->GetEntryCount(); + sal_uInt16 nCount = m_pListBoxHelper->GetEntryCount(); if ( i < nCount ) // here we have to check the if any other listbox entry is selected { for (; i < nCount && !checkEntrySelected(i,aNewValue,xNewAcc) ;++i ) @@ -665,7 +665,7 @@ void SAL_CALL VCLXAccessibleList::selectAccessibleChild( sal_Int32 nChildIndex ) { checkSelection_Impl(nChildIndex,*m_pListBoxHelper,sal_False); - m_pListBoxHelper->SelectEntryPos( (USHORT)nChildIndex, TRUE ); + m_pListBoxHelper->SelectEntryPos( (sal_uInt16)nChildIndex, sal_True ); // call the select handler, don't handle events in this time m_bDisableProcessEvent = true; m_pListBoxHelper->Select(); @@ -688,7 +688,7 @@ sal_Bool SAL_CALL VCLXAccessibleList::isAccessibleChildSelected( sal_Int32 nChil { checkSelection_Impl(nChildIndex,*m_pListBoxHelper,sal_False); - bRet = m_pListBoxHelper->IsEntryPosSelected( (USHORT)nChildIndex ); + bRet = m_pListBoxHelper->IsEntryPosSelected( (sal_uInt16)nChildIndex ); } return bRet; } @@ -722,9 +722,9 @@ void SAL_CALL VCLXAccessibleList::selectAllAccessibleChildren( ) throw (Runtime if ( m_pListBoxHelper ) { - USHORT nCount = m_pListBoxHelper->GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) - m_pListBoxHelper->SelectEntryPos( i, TRUE ); + sal_uInt16 nCount = m_pListBoxHelper->GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) + m_pListBoxHelper->SelectEntryPos( i, sal_True ); // call the select handler, don't handle events in this time m_bDisableProcessEvent = true; m_pListBoxHelper->Select(); @@ -756,7 +756,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleList::getSelectedAccessibleChild if ( m_pListBoxHelper ) { checkSelection_Impl(nSelectedChildIndex,*m_pListBoxHelper,sal_True); - return getAccessibleChild( (sal_Int32)m_pListBoxHelper->GetSelectEntryPos( (USHORT)nSelectedChildIndex ) ); + return getAccessibleChild( (sal_Int32)m_pListBoxHelper->GetSelectEntryPos( (sal_uInt16)nSelectedChildIndex ) ); } return NULL; @@ -774,7 +774,7 @@ void SAL_CALL VCLXAccessibleList::deselectAccessibleChild( sal_Int32 nSelectedCh { checkSelection_Impl(nSelectedChildIndex,*m_pListBoxHelper,sal_False); - m_pListBoxHelper->SelectEntryPos( (USHORT)nSelectedChildIndex, FALSE ); + m_pListBoxHelper->SelectEntryPos( (sal_uInt16)nSelectedChildIndex, sal_False ); // call the select handler, don't handle events in this time m_bDisableProcessEvent = true; m_pListBoxHelper->Select(); diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx index 31332bd14a21..121e781e8c30 100644 --- a/accessibility/source/standard/vclxaccessiblelistitem.cxx +++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx @@ -91,7 +91,7 @@ VCLXAccessibleListItem::VCLXAccessibleListItem( ::accessibility::IComboListBoxHe m_xParentContext = m_xParent->getAccessibleContext(); if ( m_pListBoxHelper ) - m_sEntryText = m_pListBoxHelper->GetEntry( (USHORT)_nIndexInParent ); + m_sEntryText = m_pListBoxHelper->GetEntry( (sal_uInt16)_nIndexInParent ); } // ----------------------------------------------------------------------------- VCLXAccessibleListItem::~VCLXAccessibleListItem() @@ -357,7 +357,7 @@ sal_Bool SAL_CALL VCLXAccessibleListItem::containsPoint( const awt::Point& _aPoi sal_Bool bInside = sal_False; if ( m_pListBoxHelper ) { - Rectangle aRect( m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ) ); + Rectangle aRect( m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ) ); aRect.Move(-aRect.TopLeft().X(),-aRect.TopLeft().Y()); bInside = aRect.IsInside( VCLPoint( _aPoint ) ); } @@ -376,7 +376,7 @@ awt::Rectangle SAL_CALL VCLXAccessibleListItem::getBounds( ) throw (RuntimeExce awt::Rectangle aRect; if ( m_pListBoxHelper ) - aRect = AWTRectangle( m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ) ); + aRect = AWTRectangle( m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ) ); return aRect; } @@ -389,7 +389,7 @@ awt::Point SAL_CALL VCLXAccessibleListItem::getLocation( ) throw (RuntimeExcept Point aPoint(0,0); if ( m_pListBoxHelper ) { - Rectangle aRect = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ); + Rectangle aRect = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); aPoint = aRect.TopLeft(); } return AWTPoint( aPoint ); @@ -403,7 +403,7 @@ awt::Point SAL_CALL VCLXAccessibleListItem::getLocationOnScreen( ) throw (Runti Point aPoint(0,0); if ( m_pListBoxHelper ) { - Rectangle aRect = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ); + Rectangle aRect = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); aPoint = aRect.TopLeft(); aPoint += m_pListBoxHelper->GetWindowExtentsRelative( NULL ).TopLeft(); } @@ -417,7 +417,7 @@ awt::Size SAL_CALL VCLXAccessibleListItem::getSize( ) throw (RuntimeException) Size aSize; if ( m_pListBoxHelper ) - aSize = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ).GetSize(); + aSize = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ).GetSize(); return AWTSize( aSize ); } @@ -478,7 +478,7 @@ awt::Rectangle SAL_CALL VCLXAccessibleListItem::getCharacterBounds( sal_Int32 nI if ( m_pListBoxHelper ) { Rectangle aCharRect = m_pListBoxHelper->GetEntryCharacterBounds( m_nIndexInParent, nIndex ); - Rectangle aItemRect = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ); + Rectangle aItemRect = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() ); aBounds = AWTRectangle( aCharRect ); } @@ -502,12 +502,12 @@ sal_Int32 SAL_CALL VCLXAccessibleListItem::getIndexAtPoint( const awt::Point& aP sal_Int32 nIndex = -1; if ( m_pListBoxHelper ) { - USHORT nPos = LISTBOX_ENTRY_NOTFOUND; - Rectangle aItemRect = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ); + sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND; + Rectangle aItemRect = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); Point aPnt( VCLPoint( aPoint ) ); aPnt += aItemRect.TopLeft(); sal_Int32 nI = m_pListBoxHelper->GetIndexForPoint( aPnt, nPos ); - if ( nI != -1 && (USHORT)m_nIndexInParent == nPos ) + if ( nI != -1 && (sal_uInt16)m_nIndexInParent == nPos ) nIndex = nI; } return nIndex; diff --git a/accessibility/source/standard/vclxaccessiblemenubar.cxx b/accessibility/source/standard/vclxaccessiblemenubar.cxx index 557c7756b027..56cd4fcf44f2 100644 --- a/accessibility/source/standard/vclxaccessiblemenubar.cxx +++ b/accessibility/source/standard/vclxaccessiblemenubar.cxx @@ -173,7 +173,7 @@ sal_Int32 VCLXAccessibleMenuBar::getAccessibleIndexInParent( ) throw (RuntimeEx Window* pParent = pWindow->GetAccessibleParentWindow(); if ( pParent ) { - for ( USHORT n = pParent->GetAccessibleChildWindowCount(); n; ) + for ( sal_uInt16 n = pParent->GetAccessibleChildWindowCount(); n; ) { Window* pChild = pParent->GetAccessibleChildWindow( --n ); if ( pChild == pWindow ) diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx index fd8be1a820b6..32e132802391 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx @@ -332,7 +332,7 @@ Reference< XAccessible > VCLXAccessibleStatusBar::getAccessibleChild( sal_Int32 { if ( m_pStatusBar ) { - sal_uInt16 nItemId = m_pStatusBar->GetItemId( (USHORT)i ); + sal_uInt16 nItemId = m_pStatusBar->GetItemId( (sal_uInt16)i ); xChild = new VCLXAccessibleStatusBarItem( m_pStatusBar, nItemId ); diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx index cb4339aab4f7..913871240191 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -289,7 +289,7 @@ void VCLXAccessibleTabControl::ProcessWindowChildEvent( const VclWindowEvent& rV { for ( sal_Int32 i = 0, nCount = m_pTabControl->GetPageCount(); i < nCount; ++i ) { - sal_uInt16 nPageId = m_pTabControl->GetPageId( (USHORT)i ); + sal_uInt16 nPageId = m_pTabControl->GetPageId( (sal_uInt16)i ); TabPage* pTabPage = m_pTabControl->GetTabPage( nPageId ); if ( pTabPage == (TabPage*) pChild ) UpdateTabPage( i, rVclWindowEvent.GetId() == VCLEVENT_WINDOW_SHOW ); @@ -392,7 +392,7 @@ Reference< XAccessible > VCLXAccessibleTabControl::getAccessibleChild( sal_Int32 { if ( m_pTabControl ) { - sal_uInt16 nPageId = m_pTabControl->GetPageId( (USHORT)i ); + sal_uInt16 nPageId = m_pTabControl->GetPageId( (sal_uInt16)i ); xChild = new VCLXAccessibleTabPage( m_pTabControl, nPageId ); @@ -434,7 +434,7 @@ void VCLXAccessibleTabControl::selectAccessibleChild( sal_Int32 nChildIndex ) th throw IndexOutOfBoundsException(); if ( m_pTabControl ) - m_pTabControl->SelectTabPage( m_pTabControl->GetPageId( (USHORT)nChildIndex ) ); + m_pTabControl->SelectTabPage( m_pTabControl->GetPageId( (sal_uInt16)nChildIndex ) ); } // ----------------------------------------------------------------------------- @@ -447,7 +447,7 @@ sal_Bool VCLXAccessibleTabControl::isAccessibleChildSelected( sal_Int32 nChildIn throw IndexOutOfBoundsException(); sal_Bool bSelected = sal_False; - if ( m_pTabControl && m_pTabControl->GetCurPageId() == m_pTabControl->GetPageId( (USHORT)nChildIndex ) ) + if ( m_pTabControl && m_pTabControl->GetCurPageId() == m_pTabControl->GetPageId( (sal_uInt16)nChildIndex ) ) bSelected = sal_True; return bSelected; diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index 26e586260005..71ae99652215 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -227,26 +227,26 @@ void VCLXAccessibleToolBox::UpdateFocus_Impl() return; // submit events only if toolbox has the focus to avoid sending events due to mouse move - BOOL bHasFocus = FALSE; + sal_Bool bHasFocus = sal_False; if ( pToolBox->HasFocus() ) - bHasFocus = TRUE; + bHasFocus = sal_True; else { // check for subtoolbar, i.e. check if our parent is a toolbar ToolBox* pToolBoxParent = dynamic_cast< ToolBox* >( pToolBox->GetParent() ); // subtoolbars never get the focus as key input is just forwarded, so check if the parent toolbar has it if ( pToolBoxParent && pToolBoxParent->HasFocus() ) - bHasFocus = TRUE; + bHasFocus = sal_True; } if ( bHasFocus ) { - USHORT nHighlightItemId = pToolBox->GetHighlightItemId(); - USHORT nFocusCount = 0; + sal_uInt16 nHighlightItemId = pToolBox->GetHighlightItemId(); + sal_uInt16 nFocusCount = 0; for ( ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.begin(); aIter != m_aAccessibleChildren.end(); ++aIter ) { - USHORT nItemId = pToolBox->GetItemId( (USHORT)aIter->first ); + sal_uInt16 nItemId = pToolBox->GetItemId( (sal_uInt16)aIter->first ); if ( aIter->second.is() ) { @@ -296,7 +296,7 @@ void VCLXAccessibleToolBox::UpdateChecked_Impl( sal_Int32 ) for ( ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.begin(); aIter != m_aAccessibleChildren.end(); ++aIter ) { - USHORT nItemId = pToolBox->GetItemId( (USHORT)aIter->first ); + sal_uInt16 nItemId = pToolBox->GetItemId( (sal_uInt16)aIter->first ); VCLXAccessibleToolBoxItem* pItem = static_cast< VCLXAccessibleToolBoxItem* >( aIter->second.get() ); @@ -310,7 +310,7 @@ void VCLXAccessibleToolBox::UpdateIndeterminate_Impl( sal_Int32 _nPos ) ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() ); if ( pToolBox ) { - USHORT nItemId = pToolBox->GetItemId( (USHORT)_nPos ); + sal_uInt16 nItemId = pToolBox->GetItemId( (sal_uInt16)_nPos ); ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.find( _nPos ); if ( aIter != m_aAccessibleChildren.end() && aIter->second.is() ) @@ -432,7 +432,7 @@ void VCLXAccessibleToolBox::UpdateAllItems_Impl() m_aAccessibleChildren.clear(); // register the new items - USHORT i, nCount = pToolBox->GetItemCount(); + sal_uInt16 i, nCount = pToolBox->GetItemCount(); for ( i = 0; i < nCount; ++i ) { Any aNewValue; @@ -726,8 +726,8 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.find(i); if ( m_aAccessibleChildren.end() == aIter ) { - USHORT nItemId = pToolBox->GetItemId( (USHORT)i ); - USHORT nHighlightItemId = pToolBox->GetHighlightItemId(); + sal_uInt16 nItemId = pToolBox->GetItemId( (sal_uInt16)i ); + sal_uInt16 nHighlightItemId = pToolBox->GetHighlightItemId(); Window* pItemWindow = pToolBox->GetItemWindow( nItemId ); // not found -> create a new child VCLXAccessibleToolBoxItem* pChild = new VCLXAccessibleToolBoxItem( pToolBox, i ); @@ -766,7 +766,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleAtPoint( c ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() ); if ( pToolBox ) { - USHORT nItemPos = pToolBox->GetItemPos( VCLPoint( _rPoint ) ); + sal_uInt16 nItemPos = pToolBox->GetItemPos( VCLPoint( _rPoint ) ); if ( nItemPos != TOOLBOX_ITEM_NOTFOUND ) xAccessible = getAccessibleChild( nItemPos ); } @@ -781,10 +781,10 @@ Reference< XAccessible > VCLXAccessibleToolBox::GetItemWindowAccessible( const V ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() ); if ( pChildWindow && pToolBox ) { - USHORT nCount = pToolBox->GetItemCount(); - for (USHORT i = 0 ; i < nCount && !xReturn.is() ; ++i) + sal_uInt16 nCount = pToolBox->GetItemCount(); + for (sal_uInt16 i = 0 ; i < nCount && !xReturn.is() ; ++i) { - USHORT nItemId = pToolBox->GetItemId( i ); + sal_uInt16 nItemId = pToolBox->GetItemId( i ); Window* pItemWindow = pToolBox->GetItemWindow( nItemId ); if ( pItemWindow == pChildWindow ) xReturn = getAccessibleChild(i); @@ -810,7 +810,7 @@ void VCLXAccessibleToolBox::selectAccessibleChild( sal_Int32 nChildIndex ) throw if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() ) throw IndexOutOfBoundsException(); ToolBox * pToolBox = static_cast < ToolBox * > ( GetWindow() ); - USHORT nPos = static_cast < USHORT > (nChildIndex); + sal_uInt16 nPos = static_cast < sal_uInt16 > (nChildIndex); pToolBox->ChangeHighlight( nPos ); } // ----------------------------------------------------------------------------- @@ -820,7 +820,7 @@ sal_Bool VCLXAccessibleToolBox::isAccessibleChildSelected( sal_Int32 nChildIndex if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() ) throw IndexOutOfBoundsException(); ToolBox * pToolBox = static_cast < ToolBox * > ( GetWindow() ); - USHORT nPos = static_cast < USHORT > (nChildIndex); + sal_uInt16 nPos = static_cast < sal_uInt16 > (nChildIndex); if ( pToolBox != NULL && pToolBox->GetHighlightItemId() == pToolBox->GetItemId( nPos ) ) return sal_True; else diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index d1a61c726711..3c6a46c17242 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -87,11 +87,11 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock( ) ); DBG_ASSERT( m_pToolBox, "invalid toolbox" ); - m_nItemId = m_pToolBox->GetItemId( (USHORT)m_nIndexInParent ); + m_nItemId = m_pToolBox->GetItemId( (sal_uInt16)m_nIndexInParent ); m_sOldName = GetText( true ); m_bIsChecked = m_pToolBox->IsItemChecked( m_nItemId ); m_bIndeterminate = ( m_pToolBox->GetItemState( m_nItemId ) == STATE_DONTKNOW ); - ToolBoxItemType eType = m_pToolBox->GetItemType( (USHORT)m_nIndexInParent ); + ToolBoxItemType eType = m_pToolBox->GetItemType( (sal_uInt16)m_nIndexInParent ); switch ( eType ) { case TOOLBOXITEM_BUTTON : @@ -234,7 +234,7 @@ awt::Rectangle SAL_CALL VCLXAccessibleToolBoxItem::implGetBounds( ) throw (Runt { awt::Rectangle aRect; if ( m_pToolBox ) - aRect = AWTRectangle( m_pToolBox->GetItemPosRect( (USHORT)m_nIndexInParent ) ); + aRect = AWTRectangle( m_pToolBox->GetItemPosRect( (sal_uInt16)m_nIndexInParent ) ); return aRect; } @@ -686,7 +686,7 @@ sal_Bool VCLXAccessibleToolBoxItem::setCurrentValue( const Any& aNumber ) throw else if ( nValue > 1 ) nValue = 1; - m_pToolBox->CheckItem( m_nItemId, (BOOL) nValue ); + m_pToolBox->CheckItem( m_nItemId, (sal_Bool) nValue ); bReturn = sal_True; } diff --git a/automation/inc/automation/commtypes.hxx b/automation/inc/automation/commtypes.hxx index cd6f7074fa15..8d7c976fb125 100644 --- a/automation/inc/automation/commtypes.hxx +++ b/automation/inc/automation/commtypes.hxx @@ -32,7 +32,7 @@ * This file is intended to supply the types and defines for Environment independent * building of the packethandler * Only adaption of this file should be necessary. Else it is a bug! - * Eather including apropriate files or defining the types when not available in the environment + * Ether including apropriate files or defining the types when not available in the environment * ************************************************************************/ @@ -53,46 +53,21 @@ #include <sal/types.h> typedef sal_Unicode comm_UniChar; - -// this is a trick to be sure the SO types are unknown, so the compiler will yell at us in case we use them -#ifndef _SOLAR_H -#define NO_SOLAR -#endif - -#ifdef NO_SOLAR -#define BYTE BYTE_hidden -#define BOOL BOOL_hidden -#define ULONG ULONG_hidden -#define USHORT USHORT_hidden -#define UINT16 UINT16_hidden -#define UINT32 UINT32_hidden - -#endif +#include "rtl/string.hxx" #include <tools/debug.hxx> #include <tools/solar.h> -typedef BYTE comm_BYTE; -typedef BOOL comm_BOOL; +typedef sal_uInt8 comm_BYTE; +typedef sal_Bool comm_BOOL; typedef sal_uInt32 comm_ULONG; typedef sal_uInt16 comm_USHORT; -typedef UINT16 comm_UINT16; -typedef UINT32 comm_UINT32; - -#ifdef NO_SOLAR -#undef BYTE -#undef BOOL -#undef ULONG -#undef USHORT -#undef UINT16 -#undef UINT32 - -#endif +typedef sal_uInt16 comm_UINT16; +typedef sal_uInt32 comm_UINT32; typedef sal_uInt16 comm_WORD; typedef sal_uInt32 comm_DWORD; -class SmartId; class String; #define comm_String String diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx index 5f873f5b393f..2c8ac15b6bd8 100644 --- a/automation/inc/automation/communi.hxx +++ b/automation/inc/automation/communi.hxx @@ -45,14 +45,14 @@ SV_DECL_PTRARR_SORT( CommunicationLinkList, CommunicationLink*, 1, 10 ) class MultiCommunicationManager : public CommunicationManager { public: - MultiCommunicationManager( BOOL bUseMultiChannel = FALSE ); + MultiCommunicationManager( sal_Bool bUseMultiChannel = sal_False ); virtual ~MultiCommunicationManager(); - virtual BOOL StopCommunication(); // Hält alle CommunicationLinks an - virtual BOOL IsLinkValid( CommunicationLink* pCL ); - virtual USHORT GetCommunicationLinkCount(); - virtual CommunicationLinkRef GetCommunicationLink( USHORT nNr ); + virtual sal_Bool StopCommunication(); + virtual sal_Bool IsLinkValid( CommunicationLink* pCL ); + virtual sal_uInt16 GetCommunicationLinkCount(); + virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr ); - void DoQuickShutdown( BOOL bQuickShutdown = TRUE) { bGracefullShutdown = !bQuickShutdown; } + void DoQuickShutdown( sal_Bool bQuickShutdown = sal_True) { bGracefullShutdown = !bQuickShutdown; } protected: virtual void CallConnectionOpened( CommunicationLink* pCL ); @@ -60,21 +60,21 @@ protected: CommunicationLinkList *ActiveLinks; CommunicationLinkList *InactiveLinks; /// Hier sind die CommunicationLinks drin, die sich noch nicht selbst abgemeldet haben. /// allerdings schon ein StopCommunication gekriegt haben, bzw ein ConnectionTerminated - virtual void DestroyingLink( CommunicationLink *pCL ); // Link trägt sich im Destruktor aus + virtual void DestroyingLink( CommunicationLink *pCL ); - BOOL bGracefullShutdown; + sal_Bool bGracefullShutdown; }; class CommunicationManagerServer : public MultiCommunicationManager { public: - CommunicationManagerServer( BOOL bUseMultiChannel = FALSE ):MultiCommunicationManager( bUseMultiChannel ){;} + CommunicationManagerServer( sal_Bool bUseMultiChannel = sal_False ):MultiCommunicationManager( bUseMultiChannel ){;} }; class CommunicationManagerClient : public MultiCommunicationManager, public ICommunicationManagerClient { public: - CommunicationManagerClient( BOOL bUseMultiChannel = FALSE ); + CommunicationManagerClient( sal_Bool bUseMultiChannel = sal_False ); }; class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public osl::Thread @@ -83,14 +83,14 @@ public: CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket ); virtual ~CommunicationLinkViaSocket(); - virtual BOOL IsCommunicationError(); - virtual BOOL DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); + virtual sal_Bool IsCommunicationError(); + virtual sal_Bool DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); // Diese sind Virtuelle Links!!!! virtual long ConnectionClosed( void* = NULL ); virtual long DataReceived( void* = NULL ); - virtual BOOL StopCommunication(); + virtual sal_Bool StopCommunication(); void SetPutDataReceivedHdl( Link lPutDataReceived ){ mlPutDataReceived = lPutDataReceived; } Link GetDataReceivedLink () {Link aLink = LINK( this, CommunicationLinkViaSocket, DataReceived ); return aLink;} @@ -99,17 +99,17 @@ public: protected: virtual void SAL_CALL run(); - virtual BOOL ShutdownCommunication(); - ULONG nConnectionClosedEventId; - ULONG nDataReceivedEventId; + virtual sal_Bool ShutdownCommunication(); + sal_uLong nConnectionClosedEventId; + sal_uLong nDataReceivedEventId; osl::Mutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist osl::Mutex aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist virtual void WaitForShutdown(); DECL_LINK( ShutdownLink, void* ); Timer aShutdownTimer; - BOOL bShutdownStarted; - BOOL bDestroying; + sal_Bool bShutdownStarted; + sal_Bool bDestroying; Link mlPutDataReceived; }; @@ -119,15 +119,15 @@ class CommunicationManagerServerViaSocket : public CommunicationManagerServer public: using CommunicationManager::StartCommunication; - CommunicationManagerServerViaSocket( ULONG nPort, USHORT nMaxCon, BOOL bUseMultiChannel = FALSE ); + CommunicationManagerServerViaSocket( sal_uLong nPort, sal_uInt16 nMaxCon, sal_Bool bUseMultiChannel = sal_False ); virtual ~CommunicationManagerServerViaSocket(); - virtual BOOL StartCommunication(); - virtual BOOL StopCommunication(); + virtual sal_Bool StartCommunication(); + virtual sal_Bool StopCommunication(); protected: - ULONG nPortToListen; - USHORT nMaxConnections; + sal_uLong nPortToListen; + sal_uInt16 nMaxConnections; private: CommunicationManagerServerAcceptThread *pAcceptThread; @@ -137,7 +137,7 @@ private: class CommunicationManagerServerAcceptThread: public osl::Thread { public: - CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon = CM_UNLIMITED_CONNECTIONS ); + CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, sal_uLong nPort, sal_uInt16 nMaxCon = CM_UNLIMITED_CONNECTIONS ); virtual ~CommunicationManagerServerAcceptThread(); CommunicationLinkRef GetNewConnection(){ CommunicationLinkRef xTemp = xmNewConnection; xmNewConnection.Clear(); return xTemp; } @@ -147,9 +147,9 @@ protected: private: CommunicationManagerServerViaSocket* pMyServer; osl::AcceptorSocket* pAcceptorSocket; - ULONG nPortToListen; - USHORT nMaxConnections; - ULONG nAddConnectionEventId; + sal_uLong nPortToListen; + sal_uInt16 nMaxConnections; + sal_uLong nAddConnectionEventId; osl::Mutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); } CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); } @@ -164,16 +164,16 @@ class CommunicationManagerClientViaSocket : public CommunicationManagerClient, C public: using CommunicationManager::StartCommunication; - CommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel = FALSE ); - CommunicationManagerClientViaSocket( BOOL bUseMultiChannel = FALSE ); + CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False ); + CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False ); virtual ~CommunicationManagerClientViaSocket(); - virtual BOOL StartCommunication(){ return StartCommunication( aHostToTalk, nPortToTalk );} - virtual BOOL StartCommunication( ByteString aHost, ULONG nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} + virtual sal_Bool StartCommunication(){ return StartCommunication( aHostToTalk, nPortToTalk );} + virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} private: ByteString aHostToTalk; - ULONG nPortToTalk; + sal_uLong nPortToTalk; protected: virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); } }; diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx index 775265c31f89..dd522cb3beeb 100644 --- a/automation/inc/automation/simplecm.hxx +++ b/automation/inc/automation/simplecm.hxx @@ -37,14 +37,14 @@ #include <automation/commdefines.hxx> -// CM steht für CommunicationManager +// CM steht f�r CommunicationManager #define CM_UNLIMITED_CONNECTIONS 0xffff -typedef USHORT CM_NameType; +typedef sal_uInt16 CM_NameType; #define CM_DOTTED ( (CM_NameType) 01 ) #define CM_FQDN ( (CM_NameType) 02 ) -typedef USHORT CM_InfoType; +typedef sal_uInt16 CM_InfoType; // nur eines dieser 3 defines darf verwendet werden #define CM_NO_TEXT ( (CM_InfoType) 01 ) #define CM_SHORT_TEXT ( (CM_InfoType) 02 ) @@ -124,9 +124,9 @@ protected: friend class SingleCommunicationManager; friend class MultiCommunicationManager; friend class CommunicationManagerServerAcceptThread; - // Darf nicht abgeräumt werden zwischen Empfang des Streams und ende des Callbacks + // Darf nicht abger�umt werden zwischen Empfang des Streams und ende des Callbacks -protected: // so daß nur über Ref gelöscht werden kann +protected: // so da� nur �ber Ref gel�scht werden kann virtual ~CommunicationLink(); void InvalidateManager() { pMyManager = NULL; } @@ -135,8 +135,8 @@ protected: // so daß nur über Ref gelöscht werden kann public: CommunicationLink( CommunicationManager *pMan ); - virtual BOOL StopCommunication()=0; - virtual BOOL IsCommunicationError()=0; + virtual sal_Bool StopCommunication()=0; + virtual sal_Bool IsCommunicationError()=0; CommunicationManager* GetCommunicationManager(){ return pMyManager; } // Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren @@ -151,27 +151,27 @@ public: /** will call virtual function DoTransferDataStream to do actual work Purpos is to allow housekeeping **/ - BOOL TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); + sal_Bool TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); // Liefert die ID, die vom Sender angegeben wurde. - // Dadurch lassen sich virtuelle Kommunikationen über einen physikalischen Link realisiren. - // Da die Kommunikation zu älteren Versionen kompatibel bleiben muß, muß der Empfänger raten, - // die neue oder die alte verwendet wird, da sich der Kopf eines Auftrages dann ändert. - UINT16 GetProtocol(){ return nServiceProtocol; } + // Dadurch lassen sich virtuelle Kommunikationen �ber einen physikalischen Link realisiren. + // Da die Kommunikation zu �lteren Versionen kompatibel bleiben mu�, mu� der Empf�nger raten, + // die neue oder die alte verwendet wird, da sich der Kopf eines Auftrages dann �ndert. + sal_uInt16 GetProtocol(){ return nServiceProtocol; } - // Der Stream wird hier übergeben. Der Aufrufer ist für dessen Löschung zuständig + // Der Stream wird hier �bergeben. Der Aufrufer ist f�r dessen L�schung zust�ndig // Die Methode MUSS gerufen werden, da sonst keine weiteren Daten empfangen werden. SvStream* GetServiceData(){ SvStream *pTemp = pServiceData; pServiceData = NULL; return pTemp; } - /// Ermöglicht das Auslösen des nächsten Callbacks. Wird auch Implizit gerufen. - void FinishCallback(){ bIsInsideCallback = FALSE; } + /// Erm�glicht das Ausl�sen des n�chsten Callbacks. Wird auch Implizit gerufen. + void FinishCallback(){ bIsInsideCallback = sal_False; } - /// Syncrones Empfangen der Daten. Nur für Kommandozeile, sonst leer implementiert - virtual BOOL ReceiveDataStream(){ return FALSE; } + /// Syncrones Empfangen der Daten. Nur f�r Kommandozeile, sonst leer implementiert + virtual sal_Bool ReceiveDataStream(){ return sal_False; } /// Statistics DateTime GetStart() { return aStart; } - ULONG GetTotalBytes() { return nTotalBytes; } + sal_uLong GetTotalBytes() { return nTotalBytes; } DateTime GetLastAccess() { return aLastAccess; } const ByteString& GetApplication() { return maApplication; } virtual void SetApplication( const ByteString& aApp ); @@ -184,23 +184,23 @@ protected: virtual DECL_LINK( ConnectionClosed, void* = NULL ); virtual DECL_LINK( DataReceived, void* = NULL ); - virtual BOOL DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); + virtual sal_Bool DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); SvStream *pServiceData; - UINT16 nServiceProtocol; - UINT16 nServiceHeaderType; + sal_uInt16 nServiceProtocol; + sal_uInt16 nServiceHeaderType; - /// Verhindert das vorzeitige Auslösen des nächsten Callbacks. - void StartCallback(){ bIsInsideCallback = TRUE; } - BOOL bIsInsideCallback; + /// Verhindert das vorzeitige Ausl�sen des n�chsten Callbacks. + void StartCallback(){ bIsInsideCallback = sal_True; } + sal_Bool bIsInsideCallback; - virtual BOOL SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL)=0; + virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL)=0; - virtual BOOL ShutdownCommunication() = 0; /// Really stop the Communication + virtual sal_Bool ShutdownCommunication() = 0; /// Really stop the Communication /// Statistics DateTime aStart; - ULONG nTotalBytes; + sal_uLong nTotalBytes; DateTime aLastAccess; private: @@ -209,8 +209,8 @@ private: #if OSL_DEBUG_LEVEL > 1 public: // misc (debuging) purposes - BOOL bFlag; - ULONG nSomething; + sal_Bool bFlag; + sal_uLong nSomething; #endif }; @@ -223,23 +223,23 @@ class CommunicationManager friend class CommunicationLink; friend class CommonSocketFunctions; public: - CommunicationManager( BOOL bUseMultiChannel = FALSE ); + CommunicationManager( sal_Bool bUseMultiChannel = sal_False ); virtual ~CommunicationManager(); - virtual BOOL StartCommunication()=0; - virtual BOOL StartCommunication( String aApp, String aParams ); - virtual BOOL StartCommunication( ByteString aHost, ULONG nPort ); - virtual BOOL StopCommunication()=0; // Hält alle CommunicationLinks an - virtual BOOL IsCommunicationRunning() { return bIsCommunicationRunning; } -// virtual BOOL IsCommunicationError(); + virtual sal_Bool StartCommunication()=0; + virtual sal_Bool StartCommunication( String aApp, String aParams ); + virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ); + virtual sal_Bool StopCommunication()=0; // H�lt alle CommunicationLinks an + virtual sal_Bool IsCommunicationRunning() { return bIsCommunicationRunning; } +// virtual sal_Bool IsCommunicationError(); // Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren virtual ByteString GetMyName( CM_NameType eType ); - virtual BOOL IsLinkValid( CommunicationLink* pCL )=0; // Notwendig für call im Destruktor + virtual sal_Bool IsLinkValid( CommunicationLink* pCL )=0; // Notwendig f�r call im Destruktor - virtual USHORT GetCommunicationLinkCount()=0; - virtual CommunicationLinkRef GetCommunicationLink( USHORT nNr )=0; + virtual sal_uInt16 GetCommunicationLinkCount()=0; + virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr )=0; // Liefert den letzten neuen Link oder NULL wenn dieser schon wieder geschlossen ist. CommunicationLinkRef GetLastNewLink() { return xLastNewLink; } @@ -252,8 +252,8 @@ public: void SetInfoType( CM_InfoType nIT ){ nInfoType = nIT; } CM_InfoType GetInfoType(){ return nInfoType; } - BOOL IsMultiChannel(){ return bIsMultiChannel; } - void SetApplication( const ByteString& aApp, BOOL bRunningLinks = FALSE ); + sal_Bool IsMultiChannel(){ return bIsMultiChannel; } + void SetApplication( const ByteString& aApp, sal_Bool bRunningLinks = sal_False ); const ByteString& GetApplication() { return maApplication; } protected: @@ -266,15 +266,15 @@ protected: CM_InfoType nInfoType; - // Diese Routinen rufen den Link oder sind überladen + // Diese Routinen rufen den Link oder sind �berladen virtual void ConnectionOpened( CommunicationLink* pCL ){ mlConnectionOpened.Call( pCL ); } virtual void ConnectionClosed( CommunicationLink* pCL ){ mlConnectionClosed.Call( pCL ); } virtual void DataReceived( CommunicationLink* pCL ){ mlDataReceived.Call( pCL ); } virtual void InfoMsg( InfoString aMsg ){ mlInfoMsg.Call( &aMsg ); } - BOOL bIsCommunicationRunning; + sal_Bool bIsCommunicationRunning; - virtual void DestroyingLink( CommunicationLink *pCL )=0; // Link trägt sich im Destruktor aus + virtual void DestroyingLink( CommunicationLink *pCL )=0; // Link tr�gt sich im Destruktor aus private: ByteString maApplication; @@ -284,40 +284,40 @@ private: Link mlInfoMsg; CommunicationLinkRef xLastNewLink; - BOOL bIsMultiChannel; + sal_Bool bIsMultiChannel; }; class SingleCommunicationManager : public CommunicationManager { public: - SingleCommunicationManager( BOOL bUseMultiChannel = FALSE ); + SingleCommunicationManager( sal_Bool bUseMultiChannel = sal_False ); virtual ~SingleCommunicationManager(); - virtual BOOL StopCommunication(); // Hält alle CommunicationLinks an - virtual BOOL IsLinkValid( CommunicationLink* pCL ); - virtual USHORT GetCommunicationLinkCount(); - virtual CommunicationLinkRef GetCommunicationLink( USHORT nNr ); + virtual sal_Bool StopCommunication(); // H�lt alle CommunicationLinks an + virtual sal_Bool IsLinkValid( CommunicationLink* pCL ); + virtual sal_uInt16 GetCommunicationLinkCount(); + virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr ); protected: virtual void CallConnectionOpened( CommunicationLink* pCL ); virtual void CallConnectionClosed( CommunicationLink* pCL ); CommunicationLinkRef xActiveLink; CommunicationLink *pInactiveLink; - virtual void DestroyingLink( CommunicationLink *pCL ); // Link trägt sich im Destruktor aus + virtual void DestroyingLink( CommunicationLink *pCL ); // Link tr�gt sich im Destruktor aus }; class ICommunicationManagerClient { friend class CommonSocketFunctions; protected: - virtual BOOL RetryConnect() { return FALSE; } // Kann dann eventuell die Applikation starten + virtual sal_Bool RetryConnect() { return sal_False; } // Kann dann eventuell die Applikation starten }; class TCPIO; class SimpleCommunicationLinkViaSocket : public CommunicationLink { public: - virtual BOOL IsCommunicationError(); - virtual BOOL StopCommunication(); + virtual sal_Bool IsCommunicationError(); + virtual sal_Bool StopCommunication(); virtual ByteString GetCommunicationPartner( CM_NameType eType ); virtual ByteString GetMyName( CM_NameType eType ); @@ -339,10 +339,10 @@ protected: void SetStreamSocket( osl::StreamSocket* pSocket ); SvStream *pReceiveStream; - BOOL DoReceiveDataStream(); /// Recieve DataPacket from Socket - virtual BOOL SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL); + sal_Bool DoReceiveDataStream(); /// Recieve DataPacket from Socket + virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL); bool IsReceiveReady(); - BOOL bIsRequestShutdownPending; + sal_Bool bIsRequestShutdownPending; virtual void WaitForShutdown()=0; void SetNewPacketAsCurrent(); }; @@ -352,16 +352,16 @@ class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommun public: SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket ); ~SimpleCommunicationLinkViaSocketWithReceiveCallbacks(); - virtual BOOL ReceiveDataStream(); + virtual sal_Bool ReceiveDataStream(); protected: - virtual BOOL ShutdownCommunication(); /// Really stop the Communication + virtual sal_Bool ShutdownCommunication(); /// Really stop the Communication virtual void WaitForShutdown(); }; class CommonSocketFunctions { public: - BOOL DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort ); + sal_Bool DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort ); protected: virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS )=0; }; @@ -371,13 +371,13 @@ class SingleCommunicationManagerClientViaSocket : public SingleCommunicationMana public: using CommunicationManager::StartCommunication; - SingleCommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel = FALSE ); - SingleCommunicationManagerClientViaSocket( BOOL bUseMultiChannel = FALSE ); - virtual BOOL StartCommunication(){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHostToTalk, nPortToTalk );} - virtual BOOL StartCommunication( ByteString aHost, ULONG nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} + SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False ); + SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False ); + virtual sal_Bool StartCommunication(){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHostToTalk, nPortToTalk );} + virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} private: ByteString aHostToTalk; - ULONG nPortToTalk; + sal_uLong nPortToTalk; protected: virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); } }; diff --git a/automation/source/app/testbasi.cxx b/automation/source/app/testbasi.cxx index 101d72b3471b..87ecf3e72045 100644 --- a/automation/source/app/testbasi.cxx +++ b/automation/source/app/testbasi.cxx @@ -43,7 +43,7 @@ TYPEINIT1(TTBasic,MyBasic) /*class MyFactory : public SbxFactory { public: - virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); + virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); }; static SampleObjectFac aFac1; @@ -52,7 +52,7 @@ static CommunicationFactory aComManFac; static ProcessFactory aProcessFac; static short nInst = 0; -SbxBase* MyFactory::Create( UINT16 nSbxId, UINT32 nCr ) +SbxBase* MyFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCr ) { if( nCr == SBXCR_TEST && nSbxId == SBXID_MYBASIC ) return new MyBasic; @@ -87,7 +87,7 @@ void TTBasic::LoadIniFile() ((TestToolObj*)pTestObject)->LoadIniFile(); } -SbTextType TTBasic::GetSymbolType( const String &rSymbol, BOOL bWasTTControl ) +SbTextType TTBasic::GetSymbolType( const String &rSymbol, sal_Bool bWasTTControl ) { return ((TestToolObj*)pTestObject)->GetSymbolType( rSymbol, bWasTTControl ); } @@ -102,7 +102,7 @@ IMPL_LINK( TTBasic, CErrorImpl, ErrorEntry*, pData ) return CError( pData->nError, pData->aText, pData->nLine, pData->nCol1, pData->nCol2 ); } -BOOL TTBasic::Compile( SbModule* p ) +sal_Bool TTBasic::Compile( SbModule* p ) { p->SetComment( ((TestToolObj*)pTestObject)->GetRevision(p->GetSource()) ); SbModule* pOldModule = GetCompileModule(); @@ -110,7 +110,7 @@ BOOL TTBasic::Compile( SbModule* p ) p->SetSource( ((TestToolObj*)pTestObject)->PreCompile(p->GetSource()) ); SetCompileModule( pOldModule ); if ( ((TestToolObj*)pTestObject)->WasPrecompilerError() ) - return FALSE; + return sal_False; return MyBasic::Compile( p ); } @@ -140,7 +140,7 @@ void TTBasic::ReportRuntimeError( AppBasEd *pEditWin ) MyBasic::ReportRuntimeError( pEditWin ); } -void TTBasic::DebugFindNoErrors( BOOL bDebugFindNoErrors ) +void TTBasic::DebugFindNoErrors( sal_Bool bDebugFindNoErrors ) { ((TestToolObj*)pTestObject)->DebugFindNoErrors( bDebugFindNoErrors ); } diff --git a/automation/source/app/testbasi.hxx b/automation/source/app/testbasi.hxx index 89d870a66cb4..2d8cbb5dca39 100644 --- a/automation/source/app/testbasi.hxx +++ b/automation/source/app/testbasi.hxx @@ -45,7 +45,7 @@ public: TYPEINFO(); TTBasic(); ~TTBasic(); - BOOL Compile( SbModule* ); + sal_Bool Compile( SbModule* ); static MyBasic* CreateMyBasic(); // nicht mit #ifdefs klammern, da diese Headerdatei für testtool und basic @@ -54,10 +54,10 @@ public: // SbxObject *pTestObject; // für das Testtool; ansonsten NULL void LoadIniFile(); - SbTextType GetSymbolType( const String &Symbol, BOOL bWasTTControl ); // Besimmt den erweiterten Symboltyp für das Syntaxhighlighting + SbTextType GetSymbolType( const String &Symbol, sal_Bool bWasTTControl ); // Besimmt den erweiterten Symboltyp für das Syntaxhighlighting virtual const String GetSpechialErrorText(); virtual void ReportRuntimeError( AppBasEd *pEditWin ); - virtual void DebugFindNoErrors( BOOL bDebugFindNoErrors ); + virtual void DebugFindNoErrors( sal_Bool bDebugFindNoErrors ); }; SV_DECL_IMPL_REF(TTBasic) diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx index 1f2067def0c7..10aa6f8e9107 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -52,11 +52,11 @@ #undef SV_IMPL_PTRARR_SORT #define SV_IMPL_PTRARR_SORT( nm,AE )\ _SV_IMPL_SORTAR_ALG( nm,AE )\ - void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \ + void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \ if( nL ) {\ DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\ - for( USHORT n=nP; n < nP + nL; n++ ) \ - OSL_FAIL("Das Element der Liste wurde nicht gelöscht"); \ + for( sal_uInt16 n=nP; n < nP + nL; n++ ) \ + OSL_FAIL("Das Element der Liste wurde nicht gel�scht"); \ SvPtrarr::Remove( nP, nL ); \ } \ } \ @@ -73,8 +73,8 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM : SimpleCommunicationLinkViaSocket( pMan, pSocket ) , nConnectionClosedEventId( 0 ) , nDataReceivedEventId( 0 ) -, bShutdownStarted( FALSE ) -, bDestroying( FALSE ) +, bShutdownStarted( sal_False ) +, bDestroying( sal_False ) { SetPutDataReceivedHdl(LINK( this, CommunicationLinkViaSocket, PutDataReceivedHdl )); if ( !pMPostUserEvent ) @@ -88,7 +88,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM CommunicationLinkViaSocket::~CommunicationLinkViaSocket() { - bDestroying = TRUE; + bDestroying = sal_True; StopCommunication(); while ( nConnectionClosedEventId || nDataReceivedEventId ) GetpApp()->Yield(); @@ -98,8 +98,8 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket() { GetpApp()->RemoveUserEvent( nConnectionClosedEventId ); nConnectionClosedEventId = 0; - INFO_MSG( CByteString("Event gelöscht"), - CByteString( "ConnectionClosedEvent aus Queue gelöscht"), + INFO_MSG( CByteString("Event gel�scht"), + CByteString( "ConnectionClosedEvent aus Queue gel�scht"), CM_MISC, NULL ); } } @@ -110,14 +110,14 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket() GetpApp()->RemoveUserEvent( nDataReceivedEventId ); nDataReceivedEventId = 0; delete GetServiceData(); - INFO_MSG( CByteString("Event gelöscht"), - CByteString( "DataReceivedEvent aus Queue gelöscht"), + INFO_MSG( CByteString("Event gel�scht"), + CByteString( "DataReceivedEvent aus Queue gel�scht"), CM_MISC, NULL ); } } } -BOOL CommunicationLinkViaSocket::ShutdownCommunication() +sal_Bool CommunicationLinkViaSocket::ShutdownCommunication() { if ( isRunning() ) { @@ -129,7 +129,7 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication() if ( GetStreamSocket() ) // Mal wieder nach oben verschoben, da sonst nicht vom Read runtergesprungen wird. GetStreamSocket()->close(); - resume(); // So daß das run auch die Schleife verlassen kann + resume(); // So da� das run auch die Schleife verlassen kann join(); @@ -145,10 +145,10 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication() join(); } - return TRUE; + return sal_True; } -BOOL CommunicationLinkViaSocket::StopCommunication() +sal_Bool CommunicationLinkViaSocket::StopCommunication() { if ( !bShutdownStarted ) { @@ -157,7 +157,7 @@ BOOL CommunicationLinkViaSocket::StopCommunication() else { WaitForShutdown(); - return TRUE; + return sal_True; } } @@ -177,7 +177,7 @@ void CommunicationLinkViaSocket::WaitForShutdown() aShutdownTimer.SetTimeout( 30000 ); // Should be 30 Seconds aShutdownTimer.SetTimeoutHdl( LINK( this, CommunicationLinkViaSocket, ShutdownLink ) ); aShutdownTimer.Start(); - bShutdownStarted = TRUE; + bShutdownStarted = sal_True; } if ( bDestroying ) { @@ -191,14 +191,14 @@ void CommunicationLinkViaSocket::WaitForShutdown() } } -BOOL CommunicationLinkViaSocket::IsCommunicationError() +sal_Bool CommunicationLinkViaSocket::IsCommunicationError() { return !isRunning() || SimpleCommunicationLinkViaSocket::IsCommunicationError(); } void CommunicationLinkViaSocket::run() { - BOOL bWasError = FALSE; + sal_Bool bWasError = sal_False; while ( schedule() && !bWasError && GetStreamSocket() ) { if ( bWasError |= !DoReceiveDataStream() ) @@ -227,10 +227,10 @@ void CommunicationLinkViaSocket::run() } } -BOOL CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) +sal_Bool CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) { if ( !isRunning() ) - return FALSE; + return sal_False; return SimpleCommunicationLinkViaSocket::DoTransferDataStream( pDataStream, nProtocol ); } @@ -240,7 +240,7 @@ long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG ) { { osl::MutexGuard aGuard( aMConnectionClosed ); - nConnectionClosedEventId = 0; // Achtung!! alles andere muß oben gemacht werden. + nConnectionClosedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden. } ShutdownCommunication(); return CommunicationLink::ConnectionClosed( ); @@ -251,7 +251,7 @@ long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG ) { { osl::MutexGuard aGuard( aMDataReceived ); - nDataReceivedEventId = 0; // Achtung!! alles andere muß oben gemacht werden. + nDataReceivedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden. } return CommunicationLink::DataReceived( ); } @@ -264,9 +264,9 @@ IMPL_LINK( CommunicationLinkViaSocket, PutDataReceivedHdl, CommunicationLinkViaS -MultiCommunicationManager::MultiCommunicationManager( BOOL bUseMultiChannel ) +MultiCommunicationManager::MultiCommunicationManager( sal_Bool bUseMultiChannel ) : CommunicationManager( bUseMultiChannel ) -, bGracefullShutdown( TRUE ) +, bGracefullShutdown( sal_True ) { ActiveLinks = new CommunicationLinkList; InactiveLinks = new CommunicationLinkList; @@ -281,8 +281,8 @@ MultiCommunicationManager::~MultiCommunicationManager() Timer aTimeout; aTimeout.SetTimeout( 40000 ); aTimeout.Start(); - USHORT nLinkCount = 0; - USHORT nNewLinkCount = 0; + sal_uInt16 nLinkCount = 0; + sal_uInt16 nNewLinkCount = 0; while ( aTimeout.IsActive() ) { GetpApp()->Yield(); @@ -297,9 +297,9 @@ MultiCommunicationManager::~MultiCommunicationManager() } } - // Alles weghauen, was nicht rechtzeitig auf die Bäume gekommen ist - // Was bei StopCommunication übrig geblieben ist, da es sich asynchron austragen wollte - USHORT i = ActiveLinks->Count(); + // Alles weghauen, was nicht rechtzeitig auf die B�ume gekommen ist + // Was bei StopCommunication �brig geblieben ist, da es sich asynchron austragen wollte + sal_uInt16 i = ActiveLinks->Count(); while ( i-- ) { CommunicationLinkRef rTempLink = ActiveLinks->GetObject( i ); @@ -310,7 +310,7 @@ MultiCommunicationManager::~MultiCommunicationManager() delete ActiveLinks; /// Die Links zwischen ConnectionClosed und Destruktor. - /// Hier NICHT gerefcounted, da sie sich sonst im Kreis festhaten würden, + /// Hier NICHT gerefcounted, da sie sich sonst im Kreis festhaten w�rden, /// da die Links sich erst in ihrem Destruktor austragen i = InactiveLinks->Count(); while ( i-- ) @@ -322,44 +322,44 @@ MultiCommunicationManager::~MultiCommunicationManager() delete InactiveLinks; } -BOOL MultiCommunicationManager::StopCommunication() +sal_Bool MultiCommunicationManager::StopCommunication() { // Alle Verbindungen abbrechen // ConnectionClosed entfernt die Links aus der Liste. Je nach Implementation syncron - // oder asyncron. Daher Von oben nach unten Abräumen, so daß sich nichts verschiebt. - USHORT i = ActiveLinks->Count(); + // oder asyncron. Daher Von oben nach unten Abr�umen, so da� sich nichts verschiebt. + sal_uInt16 i = ActiveLinks->Count(); int nFail = 0; while ( i ) { if ( !ActiveLinks->GetObject(i-1)->StopCommunication() ) - nFail++; // Hochzählen, da Verbindung sich nicht (sofort) beenden lässt. + nFail++; // Hochz�hlen, da Verbindung sich nicht (sofort) beenden l�sst. i--; } return nFail == 0; } -BOOL MultiCommunicationManager::IsLinkValid( CommunicationLink* pCL ) +sal_Bool MultiCommunicationManager::IsLinkValid( CommunicationLink* pCL ) { if ( ActiveLinks->Seek_Entry( pCL ) ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } -USHORT MultiCommunicationManager::GetCommunicationLinkCount() +sal_uInt16 MultiCommunicationManager::GetCommunicationLinkCount() { return ActiveLinks->Count(); } -CommunicationLinkRef MultiCommunicationManager::GetCommunicationLink( USHORT nNr ) +CommunicationLinkRef MultiCommunicationManager::GetCommunicationLink( sal_uInt16 nNr ) { return ActiveLinks->GetObject( nNr ); } void MultiCommunicationManager::CallConnectionOpened( CommunicationLink* pCL ) { - CommunicationLinkRef rHold(pCL); // Hält den Zeiger bis zum Ende des calls + CommunicationLinkRef rHold(pCL); // H�lt den Zeiger bis zum Ende des calls ActiveLinks->C40_PTR_INSERT(CommunicationLink, pCL); rHold->AddRef(); @@ -368,11 +368,11 @@ void MultiCommunicationManager::CallConnectionOpened( CommunicationLink* pCL ) void MultiCommunicationManager::CallConnectionClosed( CommunicationLink* pCL ) { - CommunicationLinkRef rHold(pCL); // Hält denm Zeiger bis zum Ende des calls + CommunicationLinkRef rHold(pCL); // H�lt denm Zeiger bis zum Ende des calls CommunicationManager::CallConnectionClosed( pCL ); - USHORT nPos; + sal_uInt16 nPos; if ( ActiveLinks->Seek_Entry( pCL, &nPos ) ) { InactiveLinks->C40_PTR_INSERT(CommunicationLink, pCL); // Ohne Reference @@ -383,13 +383,13 @@ void MultiCommunicationManager::CallConnectionClosed( CommunicationLink* pCL ) bIsCommunicationRunning = ActiveLinks->Count() > 0; // delete pCL; #if OSL_DEBUG_LEVEL > 1 - rHold->bFlag = TRUE; + rHold->bFlag = sal_True; #endif } void MultiCommunicationManager::DestroyingLink( CommunicationLink *pCL ) { - USHORT nPos; + sal_uInt16 nPos; if ( InactiveLinks->Seek_Entry( pCL, &nPos ) ) InactiveLinks->Remove( nPos ); pCL->InvalidateManager(); @@ -397,7 +397,7 @@ void MultiCommunicationManager::DestroyingLink( CommunicationLink *pCL ) -CommunicationManagerClient::CommunicationManagerClient( BOOL bUseMultiChannel ) +CommunicationManagerClient::CommunicationManagerClient( sal_Bool bUseMultiChannel ) : MultiCommunicationManager( bUseMultiChannel ) { ByteString aApplication("Something inside "); @@ -407,7 +407,7 @@ CommunicationManagerClient::CommunicationManagerClient( BOOL bUseMultiChannel ) -CommunicationManagerServerViaSocket::CommunicationManagerServerViaSocket( ULONG nPort, USHORT nMaxCon, BOOL bUseMultiChannel ) +CommunicationManagerServerViaSocket::CommunicationManagerServerViaSocket( sal_uLong nPort, sal_uInt16 nMaxCon, sal_Bool bUseMultiChannel ) : CommunicationManagerServer( bUseMultiChannel ) , nPortToListen( nPort ) , nMaxConnections( nMaxCon ) @@ -420,15 +420,15 @@ CommunicationManagerServerViaSocket::~CommunicationManagerServerViaSocket() StopCommunication(); } -BOOL CommunicationManagerServerViaSocket::StartCommunication() +sal_Bool CommunicationManagerServerViaSocket::StartCommunication() { if ( !pAcceptThread ) pAcceptThread = new CommunicationManagerServerAcceptThread( this, nPortToListen, nMaxConnections ); - return TRUE; + return sal_True; } -BOOL CommunicationManagerServerViaSocket::StopCommunication() +sal_Bool CommunicationManagerServerViaSocket::StopCommunication() { // Erst den Acceptor anhalten delete pAcceptThread; @@ -445,7 +445,7 @@ void CommunicationManagerServerViaSocket::AddConnection( CommunicationLink *pNew } -CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon ) +CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, sal_uLong nPort, sal_uInt16 nMaxCon ) : pMyServer( pServer ) , pAcceptorSocket( NULL ) , nPortToListen( nPort ) @@ -478,7 +478,7 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread( pAcceptorSocket = NULL; } #else - DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread Übersprungen!!!! (wegen Solaris BUG)\n"); + DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread �bersprungen!!!! (wegen Solaris BUG)\n"); #endif { osl::MutexGuard aGuard( aMAddConnection ); @@ -487,11 +487,11 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread( GetpApp()->RemoveUserEvent( nAddConnectionEventId ); nAddConnectionEventId = 0; CommunicationLinkRef xNewConnection = GetNewConnection(); - INFO_MSG( CByteString("Event gelöscht"), - CByteString( "AddConnectionEvent aus Queue gelöscht"), + INFO_MSG( CByteString("Event gel�scht"), + CByteString( "AddConnectionEvent aus Queue gel�scht"), CM_MISC, xNewConnection ); xNewConnection->InvalidateManager(); - xNewConnection.Clear(); // sollte das Objekt hier löschen + xNewConnection.Clear(); // sollte das Objekt hier l�schen } } } @@ -567,14 +567,14 @@ IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYAR return 1; } -CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel ) +CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel ) : CommunicationManagerClient( bUseMultiChannel ) , aHostToTalk( aHost ) , nPortToTalk( nPort ) { } -CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( BOOL bUseMultiChannel ) +CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel ) : CommunicationManagerClient( bUseMultiChannel ) , aHostToTalk( "" ) , nPortToTalk( 0 ) diff --git a/automation/source/inc/cmdbasestream.hxx b/automation/source/inc/cmdbasestream.hxx index 0170b08aefe0..ce3ee45e095f 100644 --- a/automation/source/inc/cmdbasestream.hxx +++ b/automation/source/inc/cmdbasestream.hxx @@ -49,20 +49,25 @@ protected: public: - void GenError( SmartId *pUId, comm_String *pString ); + void GenError( rtl::OString *pUId, comm_String *pString ); void GenReturn( comm_USHORT nRet, comm_ULONG nNr ); - void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_ULONG nNr ); - void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_String *pString ); - void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ); + void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr ); + void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_String *pString ); + void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_BOOL bBool ); + void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ); + + void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr ); + void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_String *pString ); + void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool ); + void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr ); // MacroRecorder - void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod ); - void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_String *pString ); - void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_BOOL bBool ); - void GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_ULONG nNr ); + void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod ); // also used outside MacroRecorder + void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString ); + void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool ); + void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool ); + void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_ULONG nNr ); void Read ( comm_USHORT &nNr ); void Read ( comm_ULONG &nNr ); @@ -77,10 +82,10 @@ public: // Complex Datatypes to be handled system dependent virtual void Read ( comm_String *&pString ); - virtual void Read ( SmartId* &pId ); + virtual void Read ( rtl::OString* &pId ); virtual void Write( comm_String *pString ); - virtual void Write( SmartId* pId ); + virtual void Write( rtl::OString* pId ); }; #endif diff --git a/automation/source/inc/rcontrol.hxx b/automation/source/inc/rcontrol.hxx index afc3bd8c4e74..13102892da08 100644 --- a/automation/source/inc/rcontrol.hxx +++ b/automation/source/inc/rcontrol.hxx @@ -37,12 +37,12 @@ #ifndef _RCONTROL_HXX #define _RCONTROL_HXX -#define UID_ACTIVE 0 +#define UID_ACTIVE "UID_ACTIVE" #define SI_IPCCommandBlock 1 #define SI_SocketCommandBlock SI_IPCCommandBlock // Zumindest erstmal #define SI_DirectCommandBlock 2 -#define SIControl 3 +#define SIControl 3 // remove after numeric HelpIDs are completely removed and no legacy testtool is used anymore #define SISlot 4 #define SIFlow 5 #define SICommand 6 @@ -207,7 +207,7 @@ #define M_LAST_NO_RETURN 200 #if ( M_LAST_NO_RETURN >= M_WITH_RETURN ) -#error "Bereich überschritten" +#error "Bereich �berschritten" #endif #define M_Exists ( M_WITH_RETURN | 1 ) @@ -315,7 +315,7 @@ #define _RC_LAST_NO_RETURN 27 #if ( _RC_LAST_NO_RETURN >= M_WITH_RETURN ) -#error "Bereich überschritten" +#error "Bereich �berschritten" #endif // Befehle mit Returnwert @@ -374,21 +374,21 @@ #define RC_WaitSlot ( M_SOFFICE | M_WITH_RETURN | 44 ) // Flow Control -#define F_EndCommandBlock 101 // Initiiert Rückmeldung des Status -#define F_Sequence 102 // Übergibt Sequence Nummer (1. in jedem Stream) +#define F_EndCommandBlock 101 // Initiiert R�ckmeldung des Status +#define F_Sequence 102 // �bergibt Sequence Nummer (1. in jedem Stream) // Return codes -#define RET_Sequence 132 // Übergibt Sequence Nummer (1. in jedem Stream) -#define RET_Value 133 // Übergibt Return-wert -#define RET_WinInfo 134 // Information über aktuelles Fenster/Control +#define RET_Sequence 132 // �bergibt Sequence Nummer (1. in jedem Stream) +#define RET_Value 133 // �bergibt Return-wert +#define RET_WinInfo 134 // Information �ber aktuelles Fenster/Control #define RET_ProfileInfo 135 // Profile Information -#define RET_DirectLoging 136 // Direktes Übertragen von Informationen in das Log -#define RET_MacroRecorder 137 // MakroRecorder Befehl übertragen +#define RET_DirectLoging 136 // Direktes �bertragen von Informationen in das Log +#define RET_MacroRecorder 137 // MakroRecorder Befehl �bertragen // Subcodes die in nUId geliefert werden -// für F_ProfileInfo +// f�r F_ProfileInfo #define S_ProfileReset 201 // nNr1 = Anzahl Borders - // Achtung!! Diese Defines müssen aufeinanderfolgende Nummern haben!! + // Achtung!! Diese Defines m�ssen aufeinanderfolgende Nummern haben!! #define S_ProfileBorder1 202 // nNr1 = Border1 in ms #define S_ProfileBorder2 203 // nNr1 = Border2 in ms #define S_ProfileBorder3 204 // nNr1 = Border3 in ms @@ -397,7 +397,7 @@ #define S_ProfileTime 210 // nNr1 = remote Zeit des Befehls #define S_ProfileDump 211 // Gibt die daten aus. -// für F_DirectLoging +// f�r F_DirectLoging #define S_AssertError 220 #define S_AssertWarning 221 #define S_AssertTrace 222 @@ -413,7 +413,7 @@ #define CONST_CTTableControl 106 #define CONST_CTUnknown 199 -// Konstanten für das ALignment des gesuchten Splitters +// Konstanten f�r das ALignment des gesuchten Splitters #define CONST_ALIGN_LEFT 120 #define CONST_ALIGN_TOP 121 #define CONST_ALIGN_RIGHT 122 @@ -455,8 +455,8 @@ #define PARAM_BOOL_2 0x0080 #define PARAM_SBXVALUE_1 0x0400 // hier mit 0x0400 Weiter!!! Siehe Oben! -// Zusätzliche Beschreibung!! wird auch mit dem Rest verodert -//#define PARAM_STR_RAW 0x8000 // Der Zeichensatz der Strings wird nicht konvertiert(für Fareastern) +// Zus�tzliche Beschreibung!! wird auch mit dem Rest verodert +//#define PARAM_STR_RAW 0x8000 // Der Zeichensatz der Strings wird nicht konvertiert(f�r Fareastern) #define ERR_SEND_TIMEOUT 100 #define ERR_EXEC_TIMEOUT 101 diff --git a/automation/source/inc/testapp.hxx b/automation/source/inc/testapp.hxx index 6760fb229af7..c5d04c1fee62 100644 --- a/automation/source/inc/testapp.hxx +++ b/automation/source/inc/testapp.hxx @@ -31,7 +31,6 @@ #include <basic/sbmod.hxx> #include <basic/testtool.hxx> -#include <vcl/smartid.hxx> class CommunicationLink; class CommunicationManagerClientViaSocketTT; @@ -56,10 +55,10 @@ class MyBasic; class ErrorEntry { public: - ErrorEntry(ULONG nNr, String aStr = String()) : nError(nNr),aText(aStr),nLine(0),nCol1(0),nCol2(0) {} - ErrorEntry(ULONG nNr, String aStr, xub_StrLen l, xub_StrLen c1, xub_StrLen c2 ) + ErrorEntry(sal_uLong nNr, String aStr = String()) : nError(nNr),aText(aStr),nLine(0),nCol1(0),nCol2(0) {} + ErrorEntry(sal_uLong nNr, String aStr, xub_StrLen l, xub_StrLen c1, xub_StrLen c2 ) : nError(nNr),aText(aStr),nLine(l),nCol1(c1),nCol2(c2) {} - ULONG nError; + sal_uLong nError; String aText; xub_StrLen nLine; xub_StrLen nCol1; @@ -70,7 +69,7 @@ SV_DECL_PTRARR_DEL(CErrors, ErrorEntry*, 1, 1) struct ControlDefLoad { const char* Kurzname; - ULONG nUId; + sal_uLong nUId; }; class TestToolObj: public SbxObject @@ -82,24 +81,24 @@ public: TestToolObj( String aName, MyBasic* pBas ); // Pfade aus INI, IPC benutzen ~TestToolObj(); void LoadIniFile(); // Laden der IniEinstellungen, die durch den ConfigDialog geändert werden können - void DebugFindNoErrors( BOOL bDebugFindNoErrors ); + void DebugFindNoErrors( sal_Bool bDebugFindNoErrors ); private: - BOOL bWasPrecompilerError; // True wenn beim letzten Precompile ein Fehler auftrat - BOOL CError( ULONG, const String&, xub_StrLen, xub_StrLen, xub_StrLen ); + sal_Bool bWasPrecompilerError; // True wenn beim letzten Precompile ein Fehler auftrat + sal_Bool CError( sal_uLong, const String&, xub_StrLen, xub_StrLen, xub_StrLen ); void CalcPosition( String const &aSource, xub_StrLen nPos, xub_StrLen &l, xub_StrLen &c ); xub_StrLen ImplSearch( const String &aSource, const xub_StrLen nStart, const xub_StrLen nEnd, const String &aSearch, const xub_StrLen nSearchStart = 0 ); - xub_StrLen PreCompilePart( String &aSource, xub_StrLen nStart, xub_StrLen nEnd, String aFinalErrorLabel, USHORT &nLabelCount ); + xub_StrLen PreCompilePart( String &aSource, xub_StrLen nStart, xub_StrLen nEnd, String aFinalErrorLabel, sal_uInt16 &nLabelCount ); void PreCompileDispatchParts( String &aSource, String aStart, String aEnd, String aFinalLable ); public: String GetRevision(String const &aSourceIn); // find Revision in the sourcecode String PreCompile(String const &aSourceIn); // try catch; testcase endcase .. - BOOL WasPrecompilerError(); // True wenn beim letzten Precompile ein Fehler auftrat + sal_Bool WasPrecompilerError(); // True wenn beim letzten Precompile ein Fehler auftrat void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ); virtual SbxVariable* Find( const String&, SbxClassType ); // String aKeyPlusClasses; // Pfad für keycodes & classes & res_type (Aus Configdatei) DECL_LINK( ReturnResultsLink, CommunicationLink* ); - BOOL ReturnResults( SvStream *pIn ); // Rücklieferung des Antwortstreams über IPC oder TCP/IP oder direkt + sal_Bool ReturnResults( SvStream *pIn ); // Rücklieferung des Antwortstreams über IPC oder TCP/IP oder direkt void SetLogHdl( const Link& rLink ) { aLogHdl = rLink; } const Link& GetLogHdl() const { return aLogHdl; } @@ -121,25 +120,25 @@ public: private: ImplTestToolObj *pImpl; // Alles was von der Implementation abhängt static const CErrors* GetFehlerListe() { return pFehlerListe; } - BOOL bUseIPC; + sal_Bool bUseIPC; Link aLogHdl; // Zum Logen der Fehlermeldungen im Testtool Link aWinInfoHdl; // Anzeigen der Windows/Controls der zu testenden App Link aModuleWinExistsHdl; // Prüft ob das Modul schon im Editor geladen ist Link aCErrorHdl; // Melden von Compilererror Link aWriteStringHdl; // Schreiben von text (e.g. MakroRecorder) - BOOL bReturnOK; // Bricht WaitForAnswer ab + sal_Bool bReturnOK; // Bricht WaitForAnswer ab CRevNames *pShortNames; // Aktuell verwendete Controls, zur gewinnung des Namens aus Fehlermeldung - ULONG nSequence; // Sequence um Antwort und Anfrage zu syncronisieren - SmartId aNextReturnId; // Id des Returnwertes i.e. UId + sal_uLong nSequence; // Sequence um Antwort und Anfrage zu syncronisieren + rtl::OString aNextReturnId; // Id des Returnwertes i.e. UId void ReplaceNumbers(String &aText); // Zahlen im String mit speziellem Format in Namen umwandeln String aLastRecordedKontext;// Keeps the last kontext recorded by the Macro Recorder -#define FLAT TRUE +#define FLAT sal_True String ProgPath; // Dateiname der zu Testenden APP; Gesetzt über Start String aLogFileName; // Momentaner Logfilename (Wie Programmdatei aber mit .res) - BOOL IsBlock; // Innerhalb Begin/EndBlock - BOOL SingleCommandBlock; // Implizit um jedes kommando ein Begin/EndBlock + sal_Bool IsBlock; // Innerhalb Begin/EndBlock + sal_Bool SingleCommandBlock; // Implizit um jedes kommando ein Begin/EndBlock CmdStream *In; void AddName(String &aBisher, String &aNeu ); // Name eventuell mit / anhängen @@ -153,31 +152,31 @@ private: CNames *m_pReverseUIds; // Langnamen nach Nummer - USHORT nMyVar; // Wievielte Var aus Pool ist dran + sal_uInt16 nMyVar; // Wievielte Var aus Pool ist dran void InitTestToolObj(); CommunicationManagerClientViaSocketTT *pCommunicationManager; void SendViaSocket(); - BOOL Load( String aFileName, SbModule *pMod ); + sal_Bool Load( String aFileName, SbModule *pMod ); - void ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, BOOL bIsFlat = FALSE ); - void ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName ); - BOOL ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pControls ); - BOOL WriteNamesBin( String Filename, CNames *pSIds, CNames *pControls ); + void ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, sal_Bool bIsFlat = sal_False ); + void ReadFlat( String Filename, CNames *&pNames, sal_Bool bSortByName ); + sal_Bool ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pControls ); + sal_Bool WriteNamesBin( String Filename, CNames *pSIds, CNames *pControls ); void ReadHidLstByNumber(); - void SortControlsByNumber( BOOL bIncludeActive = FALSE ); + void SortControlsByNumber( sal_Bool bIncludeActive = sal_False ); - String GetMethodName( ULONG nMethodId ); - String GetKeyName( USHORT nKeyCode ); + String GetMethodName( sal_uLong nMethodId ); + String GetKeyName( sal_uInt16 nKeyCode ); void WaitForAnswer (); DECL_LINK( IdleHdl, Application* ); DECL_LINK( CallDialogHandler, Application* ); String aDialogHandlerName; - USHORT nWindowHandlerCallLevel; + sal_uInt16 nWindowHandlerCallLevel; - USHORT nIdleCount; + sal_uInt16 nIdleCount; // wenn DialogHandler gesetzt wird er im IdleHandler inkrementiert und // in WaitForAnswer rückgesetzt. Übersteigt er einen gewissen wert, gehe ich davon aus, // daß WaitForAnswer still ligt und rufe die DialogHander Sub im BASIC auf. @@ -185,7 +184,7 @@ private: void BeginBlock(); void EndBlock(); - SbTextType GetSymbolType( const String &rSymbol, BOOL bWasControl ); + SbTextType GetSymbolType( const String &rSymbol, sal_Bool bWasControl ); static ControlDefLoad const arR_Cmds[]; static CNames *pRCommands; diff --git a/automation/source/inc/testtool.hxx b/automation/source/inc/testtool.hxx index 78a56b3160eb..30543fcedeb5 100644 --- a/automation/source/inc/testtool.hxx +++ b/automation/source/inc/testtool.hxx @@ -47,9 +47,9 @@ class ImplRemoteControl { friend class StatementFlow; - BOOL m_bIdleInserted; + sal_Bool m_bIdleInserted; AutoTimer m_aIdleTimer; - BOOL m_bInsideExecutionLoop; + sal_Bool m_bInsideExecutionLoop; #if OSL_DEBUG_LEVEL > 1 EditWindow *m_pDbgWin; #endif @@ -57,7 +57,7 @@ class ImplRemoteControl public: ImplRemoteControl(); ~ImplRemoteControl(); - BOOL QueCommands( ULONG nServiceId, SvStream *pIn ); + sal_Bool QueCommands( sal_uLong nServiceId, SvStream *pIn ); SvStream* GetReturnStream(); DECL_LINK( IdleHdl, Application* ); diff --git a/automation/source/miniapp/editwin.cxx b/automation/source/miniapp/editwin.cxx index 5568b5152320..395c9deb350a 100644 --- a/automation/source/miniapp/editwin.cxx +++ b/automation/source/miniapp/editwin.cxx @@ -34,13 +34,13 @@ #include <vcl/msgbox.hxx> -BOOL GHEditWindow::Close() +sal_Bool GHEditWindow::Close() { if (aInhalt.IsModified()) { } delete(this); - return TRUE; + return sal_True; } void GHEditWindow::Resize() @@ -64,7 +64,7 @@ void GHEditWindow::Clear() aInhalt.SetText(String()); } -void GHEditWindow::AddText( String aNew, BOOL bMoveToEnd) +void GHEditWindow::AddText( String aNew, sal_Bool bMoveToEnd) { String aOld = aInhalt.GetText(); @@ -110,11 +110,11 @@ void EditFileWindow::LoadFile() All.ConvertLineEnd(); - AddText(All,FALSE); + AddText(All,sal_False); } -BOOL EditFileWindow::Close() +sal_Bool EditFileWindow::Close() { if (aInhalt.IsModified() && QueryBox(this,WB_DEF_YES | WB_YES_NO_CANCEL, String(aFileName).AppendAscii("\nhas been changed.\n\nSave file?")).Execute()) diff --git a/automation/source/miniapp/editwin.hxx b/automation/source/miniapp/editwin.hxx index bf7cbfa3ca34..ed10acec2646 100644 --- a/automation/source/miniapp/editwin.hxx +++ b/automation/source/miniapp/editwin.hxx @@ -39,7 +39,7 @@ protected: MultiLineEdit aInhalt; - virtual BOOL Close(); // derived + virtual sal_Bool Close(); // derived void Resize(); public: @@ -48,7 +48,7 @@ public: GHEditWindow(Window * pParent, String aName = CUniString("Neues Fenster"), WinBits iWstyle = WB_STDWORK); void Clear(); - void AddText( String aNew, BOOL bMoveToEnd = TRUE); + void AddText( String aNew, sal_Bool bMoveToEnd = sal_True); }; @@ -57,7 +57,7 @@ class EditFileWindow : public GHEditWindow { String aFileName; - virtual BOOL Close(); // derived + virtual sal_Bool Close(); // derived void LoadFile(); public: diff --git a/automation/source/miniapp/servres.cxx b/automation/source/miniapp/servres.cxx index 3cbb4bf3c80c..1bd795fd4041 100644 --- a/automation/source/miniapp/servres.cxx +++ b/automation/source/miniapp/servres.cxx @@ -35,7 +35,7 @@ #include "servres.hxx" -ModalDialogGROSSER_TEST_DLG::ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, BOOL bFreeRes ) +ModalDialogGROSSER_TEST_DLG::ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, sal_Bool bFreeRes ) : ModalDialog( pParent, rResId ), aCheckBox1( this, ResId( 1, *rResId.GetResMgr() ) ), aTriStateBox1( this, ResId( 1, *rResId.GetResMgr() ) ), @@ -53,7 +53,7 @@ ModalDialogGROSSER_TEST_DLG::ModalDialogGROSSER_TEST_DLG( Window * pParent, cons if( bFreeRes ) FreeResource(); } -MenuMENU_CLIENT::MenuMENU_CLIENT( const ResId & rResId, BOOL ) +MenuMENU_CLIENT::MenuMENU_CLIENT( const ResId & rResId, sal_Bool ) : MenuBar( rResId ) { // No subresources, automatic free resource diff --git a/automation/source/miniapp/servres.hrc b/automation/source/miniapp/servres.hrc index 2f95a34a60b6..6efd2ce57460 100644 --- a/automation/source/miniapp/servres.hrc +++ b/automation/source/miniapp/servres.hrc @@ -29,9 +29,9 @@ #define IDM_FILE 1 #define IDM_FILE_OPEN_TEST 2 #define IDM_FILE_EXIT 3 -#define IDM_FILE_EXIT_HELP 4 -#define IDM_FILE_OPEN_TEST_HELP 1 -#define IDM_FILE_HELP 3 +#define IDM_FILE_EXIT_HELP "AUTOMATION_IDM_FILE_EXIT_HELP" +#define IDM_FILE_OPEN_TEST_HELP "AUTOMATION_IDM_FILE_OPEN_TEST_HELP" +#define IDM_FILE_HELP "AUTOMATION_IDM_FILE_HELP" #define GROSSER_TEST_DLG 256 #define IDM_TEST 5 #define IDM_TEST_GROSS 6 diff --git a/automation/source/miniapp/servres.hxx b/automation/source/miniapp/servres.hxx index c93c758ec229..72584163c7cd 100644 --- a/automation/source/miniapp/servres.hxx +++ b/automation/source/miniapp/servres.hxx @@ -52,14 +52,14 @@ protected: DateBox aDateBox1; FixedText aFixedText1; public: - ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, BOOL bFreeRes = TRUE ); + ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, sal_Bool bFreeRes = sal_True ); }; class MenuMENU_CLIENT : public MenuBar { protected: public: - MenuMENU_CLIENT( const ResId & rResId, BOOL bFreeRes = TRUE ); + MenuMENU_CLIENT( const ResId & rResId, sal_Bool bFreeRes = sal_True ); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/servres.src b/automation/source/miniapp/servres.src index 426be8b81532..c1af1caa775a 100644 --- a/automation/source/miniapp/servres.src +++ b/automation/source/miniapp/servres.src @@ -54,7 +54,7 @@ ModalDialog GROSSER_TEST_DLG }; OKButton 1 { - HelpID = 1 ; + HelpID = "hid1" ; Pos = MAP_APPFONT ( 132 , 92 ) ; Size = MAP_APPFONT ( 64 , 12 ) ; TabStop = TRUE ; diff --git a/automation/source/miniapp/servuid.hxx b/automation/source/miniapp/servuid.hxx index 7460c097606a..019479cc65a3 100644 --- a/automation/source/miniapp/servuid.hxx +++ b/automation/source/miniapp/servuid.hxx @@ -25,16 +25,16 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#define UID_GROSSER_TEST_DLG 101 -#define UID_CheckBox 202 -#define UID_TriStateBox 303 -#define UID_OKButton 404 -#define UID_TimeField 505 -#define UID_MultiLineEdit 606 -#define UID_RadioButton1 707 -#define UID_RadioButton2 708 -#define UID_MultiListBox 809 -#define UID_ComboBox 910 -#define UID_DateBox 1011 +#define UID_GROSSER_TEST_DLG "AUTOMATION_UID_GROSSER_TEST_DLG" +#define UID_CheckBox "AUTOMATION_UID_CheckBox" +#define UID_TriStateBox "AUTOMATION_UID_TriStateBox" +#define UID_OKButton "AUTOMATION_UID_OKButton" +#define UID_TimeField "AUTOMATION_UID_TimeField" +#define UID_MultiLineEdit "AUTOMATION_UID_MultiLineEdit" +#define UID_RadioButton1 "AUTOMATION_UID_RadioButton1" +#define UID_RadioButton2 "AUTOMATION_UID_RadioButton2" +#define UID_MultiListBox "AUTOMATION_UID_MultiListBox" +#define UID_ComboBox "AUTOMATION_UID_ComboBox" +#define UID_DateBox "AUTOMATION_UID_DateBox" /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/testapp.cxx b/automation/source/miniapp/testapp.cxx index 2c359e057434..914b59a6739c 100644 --- a/automation/source/miniapp/testapp.cxx +++ b/automation/source/miniapp/testapp.cxx @@ -97,11 +97,11 @@ void MainWindow::TestGross() } -BOOL MainWindow::Close() +sal_Bool MainWindow::Close() { WorkWindow::Close(); FileExit(); - return TRUE; + return sal_True; } void MainWindow::FileExit() @@ -110,7 +110,7 @@ void MainWindow::FileExit() } -void MainWindow::Tree(GHEditWindow *aEditWin, Window *pBase, USHORT Indent) +void MainWindow::Tree(GHEditWindow *aEditWin, Window *pBase, sal_uInt16 Indent) { String sIndent,aText; sIndent.Expand(5*Indent); @@ -119,9 +119,10 @@ void MainWindow::Tree(GHEditWindow *aEditWin, Window *pBase, USHORT Indent) aText.SearchAndReplaceAllAscii("\n",CUniString("\\n")); aEditWin->AddText(String(sIndent).AppendAscii("Text: ").Append(aText).AppendAscii("\n")); - aEditWin->AddText(String(sIndent).AppendAscii("Help: ").Append(String::CreateFromInt64(pBase->GetHelpId())).AppendAscii(":").Append(pBase->GetQuickHelpText()).AppendAscii(":").Append(pBase->GetHelpText()).AppendAscii("\n")); + // FIXME: HELPID + aEditWin->AddText(String(sIndent).AppendAscii("Help: ").Append(String(rtl::OStringToOUString(pBase->GetHelpId(), RTL_TEXTENCODING_UTF8))).AppendAscii(":").Append(pBase->GetQuickHelpText()).AppendAscii(":").Append(pBase->GetHelpText()).AppendAscii("\n")); - USHORT i; + sal_uInt16 i; for (i = 0 ; i < pBase->GetChildCount() ; i++) { Tree(aEditWin,pBase->GetChild(i),Indent+1); @@ -193,7 +194,7 @@ void MyApp::Property( ApplicationProperty& rProp ) } -USHORT MyDispatcher::ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs, USHORT nMode) +sal_uInt16 MyDispatcher::ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs, sal_uInt16 nMode) { (void) ppArgs; // avoid warning about unused parameter (void) nMode; // avoid warning about unused parameter diff --git a/automation/source/miniapp/testapp.hxx b/automation/source/miniapp/testapp.hxx index 498ee04af136..65bfe777d0d1 100644 --- a/automation/source/miniapp/testapp.hxx +++ b/automation/source/miniapp/testapp.hxx @@ -58,12 +58,12 @@ class MainWindow : public WorkWindow public: MainWindow(MyApp *pAppl); - virtual BOOL Close(); // derived + virtual sal_Bool Close(); // derived void FileExit(); void FileOpen(); void TestGross(); - void Tree(GHEditWindow *aEditWin, Window *pBase, USHORT Indent); + void Tree(GHEditWindow *aEditWin, Window *pBase, sal_uInt16 Indent); void WinTree(); void SysDlg(); DECL_LINK(MenuSelectHdl,MenuBar*); @@ -77,8 +77,8 @@ class MyDispatcher public: MyDispatcher(MainWindow *MainWin) : pMainWin(MainWin) {}; virtual ~MyDispatcher() {}; - virtual USHORT ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs = 0, USHORT nMode = 0); - virtual void SetExecuteMode( USHORT nMode ) + virtual sal_uInt16 ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs = 0, sal_uInt16 nMode = 0); + virtual void SetExecuteMode( sal_uInt16 nMode ) { (void) nMode; /* avoid warning about unused parameter */ }; // Ist hier sowieso egal diff --git a/automation/source/server/XMLParser.cxx b/automation/source/server/XMLParser.cxx index 8de072898297..ef73d2ef2e9b 100644 --- a/automation/source/server/XMLParser.cxx +++ b/automation/source/server/XMLParser.cxx @@ -89,9 +89,9 @@ void SAL_CALL SVInputStream::skipBytes( sal_Int32 nBytesToSkip ) throw (::com::s sal_Int32 SAL_CALL SVInputStream::available( ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { - ULONG nCurrent = pStream->Tell(); - ULONG nSize = pStream->Seek( STREAM_SEEK_TO_END ); - ULONG nAvailable = nSize - nCurrent; + sal_uLong nCurrent = pStream->Tell(); + sal_uLong nSize = pStream->Seek( STREAM_SEEK_TO_END ); + sal_uLong nAvailable = nSize - nCurrent; pStream->Seek( nCurrent ); return nAvailable; } @@ -160,8 +160,8 @@ class ElementNode : public Node public: ElementNode( const String& aName, Reference < XAttributeList > xAttributes ); void AppendNode( NodeRef xNewNode ); - ULONG GetChildCount(){ return aDocumentNodeList.Count(); } - NodeRef GetChild( USHORT nIndex ){ return aDocumentNodeList.GetObject( nIndex ); } + sal_uLong GetChildCount(){ return aDocumentNodeList.Count(); } + NodeRef GetChild( sal_uInt16 nIndex ){ return aDocumentNodeList.GetObject( nIndex ); } Reference < XAttributeList > GetAttributes(){ return xAttributeList; } String GetNodeName() { return aNodeName; } @@ -208,7 +208,7 @@ class SAXParser : public cppu::WeakImplHelper2< XErrorHandler, XDocumentHandler NodeRef xTreeRoot; NodeRef xCurrentNode; - ULONG nTimestamp; + sal_uLong nTimestamp; ParseAction aAction; public: @@ -219,11 +219,11 @@ public: NodeRef GetCurrentNode(){ return xCurrentNode; } void SetCurrentNode( NodeRef xCurrent ){ xCurrentNode = xCurrent; } NodeRef GetRootNode(){ return xTreeRoot; } - ULONG GetTimestamp(){ return nTimestamp; } + sal_uLong GetTimestamp(){ return nTimestamp; } void Touch(){ nTimestamp = Time::GetSystemTicks(); } // Methods SAXParser - BOOL Parse( ParseAction aAct ); + sal_Bool Parse( ParseAction aAct ); String GetErrors(){ return aErrors; } // Methods XErrorHandler @@ -254,13 +254,13 @@ SAXParser::~SAXParser() xParser.clear(); } -BOOL SAXParser::Parse( ParseAction aAct ) +sal_Bool SAXParser::Parse( ParseAction aAct ) { aAction = aAct; Touch(); SvStream* pStream = new SvFileStream( aFilename, STREAM_STD_READ ); if ( pStream->GetError() ) - return FALSE; + return sal_False; InputSource sSource; sSource.aInputStream = new SVInputStream( pStream ); // is refcounted and hence deletet appropriately @@ -296,8 +296,8 @@ BOOL SAXParser::Parse( ParseAction aAct ) xParser->setDocumentHandler( NULL ); // otherwile Object holds itself } else - return FALSE; - return TRUE; + return sal_False; + return sal_True; } @@ -365,13 +365,13 @@ void SAXParser::characters( const ::rtl::OUString& aChars ) throw (::com::sun::s { if ( aAction == COLLECT_DATA_IGNORE_WHITESPACE ) { // check for whitespace - BOOL bAllWhitespace = TRUE; + sal_Bool bAllWhitespace = sal_True; for ( int i = 0 ; bAllWhitespace && i < aChars.getLength() ; i++ ) if ( aChars[i] != 10 // LF && aChars[i] != 13 // CR && aChars[i] != ' ' // Blank && aChars[i] != '\t' ) // Tab - bAllWhitespace = FALSE; + bAllWhitespace = sal_False; if ( bAllWhitespace ) return; } @@ -457,7 +457,7 @@ void StatementCommand::HandleSAXParser() { if ( !pSAXParser->Parse( PARSE_ONLY ) ) ReportError( GEN_RES_STR1( S_NO_SAX_PARSER, RcString( nMethodId ) ) ); - pRet->GenReturn ( RET_Value, aSmartMethodId, pSAXParser->GetErrors() ); + pRet->GenReturn ( RET_Value, nMethodId, pSAXParser->GetErrors() ); } xParserKeepaliveReference.clear(); @@ -487,7 +487,7 @@ void StatementCommand::HandleSAXParser() if ( !pSAXParser->Parse( aAction ) ) ReportError( GEN_RES_STR1( S_NO_SAX_PARSER, RcString( nMethodId ) ) ); - pRet->GenReturn ( RET_Value, aSmartMethodId, pSAXParser->GetErrors() ); + pRet->GenReturn ( RET_Value, nMethodId, pSAXParser->GetErrors() ); } } else @@ -496,7 +496,7 @@ void StatementCommand::HandleSAXParser() break; case RC_SAXGetNodeType: { - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pSAXParser->GetCurrentNode()->GetNodeType() ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pSAXParser->GetCurrentNode()->GetNodeType() ); } break; case RC_SAXGetAttributeCount: @@ -511,23 +511,23 @@ void StatementCommand::HandleSAXParser() switch ( nMethodId ) { case RC_SAXGetElementName: - pRet->GenReturn ( RET_Value, aSmartMethodId, pElementNode->GetNodeName() ); + pRet->GenReturn ( RET_Value, nMethodId, pElementNode->GetNodeName() ); break; case RC_SAXGetChildCount: - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pElementNode->GetChildCount() ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pElementNode->GetChildCount() ); break; case RC_SAXGetAttributeCount: if ( xAttributeList.is() ) - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)xAttributeList->getLength() ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)xAttributeList->getLength() ); else - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)0 ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)0 ); break; case RC_SAXGetAttributeName: { - if( (nParams & PARAM_USHORT_1) && ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) ) + if( (nParams & PARAM_USHORT_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) ) { String aRet( xAttributeList->getNameByIndex( nNr1-1 ) ); - pRet->GenReturn ( RET_Value, aSmartMethodId, aRet ); + pRet->GenReturn ( RET_Value, nMethodId, aRet ); } else ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); @@ -536,15 +536,15 @@ void StatementCommand::HandleSAXParser() case RC_SAXGetAttributeValue: // Number or String { - if( (nParams & PARAM_USHORT_1) && ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) ) + if( (nParams & PARAM_USHORT_1) && ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, xAttributeList.is()?xAttributeList->getLength():0 ) ) { String aRet( xAttributeList->getValueByIndex( nNr1-1 ) ); - pRet->GenReturn ( RET_Value, aSmartMethodId, aRet ); + pRet->GenReturn ( RET_Value, nMethodId, aRet ); } else if( (nParams & PARAM_STR_1) && xAttributeList.is() ) { String aRet( xAttributeList->getValueByName( aString1 ) ); - pRet->GenReturn ( RET_Value, aSmartMethodId, aRet ); + pRet->GenReturn ( RET_Value, nMethodId, aRet ); } else ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); @@ -565,7 +565,7 @@ void StatementCommand::HandleSAXParser() { NodeRef xNode=pSAXParser->GetCurrentNode(); CharacterNode* aCharacterNode = (CharacterNode*)(&xNode); - pRet->GenReturn ( RET_Value, aSmartMethodId, aCharacterNode->GetCharacters() ); + pRet->GenReturn ( RET_Value, nMethodId, aCharacterNode->GetCharacters() ); } else ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); @@ -576,22 +576,22 @@ void StatementCommand::HandleSAXParser() case RC_SAXHasElement: // Number or String { - BOOL bCheckOnly = nMethodId == RC_SAXHasElement; + sal_Bool bCheckOnly = nMethodId == RC_SAXHasElement; if( (nParams & PARAM_USHORT_1) && !(nParams & PARAM_STR_1) ) { if ( nNr1 == 0 ) { if ( bCheckOnly ) - pRet->GenReturn ( RET_Value, aSmartMethodId, pSAXParser->GetCurrentNode()->GetParent().Is() ); + pRet->GenReturn ( RET_Value, nMethodId, pSAXParser->GetCurrentNode()->GetParent().Is() ); else if ( pSAXParser->GetCurrentNode()->GetParent().Is() ) pSAXParser->SetCurrentNode( pSAXParser->GetCurrentNode()->GetParent() ); } else if ( !pElementNode ) ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); else if ( bCheckOnly ) - pRet->GenReturn ( RET_Value, aSmartMethodId, ValueOK( aSmartMethodId, String(), nNr1, pElementNode->GetChildCount() ) ); - else if ( ValueOK( aSmartMethodId, RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) ) + pRet->GenReturn ( RET_Value, nMethodId, ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) ); + else if ( ValueOK( rtl::OString(), RcString( nMethodId ), nNr1, pElementNode->GetChildCount() ) ) pSAXParser->SetCurrentNode( pElementNode->GetChild( nNr1-1 ) ); } else if( (nParams & PARAM_STR_1) ) @@ -599,16 +599,16 @@ void StatementCommand::HandleSAXParser() if ( aString1.EqualsAscii( "/" ) ) { if ( bCheckOnly ) - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)TRUE ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)sal_True ); else pSAXParser->SetCurrentNode( pSAXParser->GetRootNode() ); } else if ( aString1.Copy(0,2).EqualsAscii( "*:" ) ) { - ULONG nTimestamp = (ULONG)aString1.GetToken( 1, ':' ).ToInt64(); - ULONG nPointer = (ULONG)aString1.GetToken( 2, ':' ).ToInt64(); + sal_uLong nTimestamp = (sal_uLong)aString1.GetToken( 1, ':' ).ToInt64(); + sal_uLong nPointer = (sal_uLong)aString1.GetToken( 2, ':' ).ToInt64(); if ( bCheckOnly ) - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)(pSAXParser->GetTimestamp() == nTimestamp) ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)(pSAXParser->GetTimestamp() == nTimestamp) ); else if ( pSAXParser->GetTimestamp() == nTimestamp ) { @@ -622,13 +622,13 @@ void StatementCommand::HandleSAXParser() } else if ( pElementNode ) { - USHORT nNthOccurrence; + sal_uInt16 nNthOccurrence; if( (nParams & PARAM_USHORT_1) ) nNthOccurrence = nNr1; else nNthOccurrence = 1; - USHORT i; + sal_uInt16 i; NodeRef xNew; for ( i = 0 ; i < pElementNode->GetChildCount() && !xNew.Is() ; i++ ) { @@ -651,7 +651,7 @@ void StatementCommand::HandleSAXParser() xNew.Clear(); } if ( bCheckOnly ) - pRet->GenReturn ( RET_Value, aSmartMethodId, xNew.Is() ); + pRet->GenReturn ( RET_Value, nMethodId, xNew.Is() ); else if ( xNew.Is() ) pSAXParser->SetCurrentNode( xNew ); @@ -660,7 +660,7 @@ void StatementCommand::HandleSAXParser() } else if ( bCheckOnly ) - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)FALSE ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)sal_False ); else ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); } @@ -670,15 +670,15 @@ void StatementCommand::HandleSAXParser() break; case RC_SAXGetElementPath: { - DBG_ASSERT( sizeof( ULONG ) == sizeof ( void* ), "Pointertype has different size than ULONG"); + DBG_ASSERT( sizeof( sal_uIntPtr ) == sizeof ( void* ), "Pointertype has different size than sal_uIntPtr"); String aPath; aPath.AppendAscii( "*:" ); aPath.Append( String::CreateFromInt64( pSAXParser->GetTimestamp() ) ); aPath.AppendAscii( ":" ); NodeRef xNode=pSAXParser->GetCurrentNode(); Node* pNode = (Node*)(&xNode); - aPath.Append( String::CreateFromInt64( (ULONG)pNode ) ); - pRet->GenReturn ( RET_Value, aSmartMethodId, aPath ); + aPath.Append( String::CreateFromInt64( (sal_uIntPtr)pNode ) ); + pRet->GenReturn ( RET_Value, nMethodId, aPath ); } break; diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx index 65e4c96f33fb..3988bcbab154 100644 --- a/automation/source/server/cmdbasestream.cxx +++ b/automation/source/server/cmdbasestream.cxx @@ -51,7 +51,7 @@ CmdBaseStream::~CmdBaseStream() { } -void CmdBaseStream::GenError (SmartId *pUId, comm_String *pString ) +void CmdBaseStream::GenError (rtl::OString *pUId, comm_String *pString ) { Write(comm_USHORT(SIReturnError)); Write(pUId); @@ -66,46 +66,95 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_ULONG nUId ) Write(comm_USHORT(PARAM_NONE)); // Typ der folgenden Parameter } -void CmdBaseStream::GenReturn (comm_USHORT nRet, SmartId *pUId, comm_ULONG nNr ) +void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr ) { Write(comm_USHORT(SIReturn)); Write(nRet); - Write(pUId); + if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) + Write(comm_ULONG(0)); + else + Write(pUId); Write(comm_USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter Write(nNr); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, SmartId *pUId, comm_String *pString ) +void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_String *pString ) { Write(comm_USHORT(SIReturn)); Write(nRet); - Write(pUId); + if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) + Write(comm_ULONG(0)); + else + Write(pUId); Write(comm_USHORT(PARAM_STR_1)); // Typ der folgenden Parameter Write(pString); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, SmartId *pUId, comm_BOOL bBool ) +void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_BOOL bBool ) { Write(comm_USHORT(SIReturn)); Write(nRet); - Write(pUId); + if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) + Write(comm_ULONG(0)); + else + Write(pUId); Write(comm_USHORT(PARAM_BOOL_1)); // Typ der folgenden Parameter Write(bBool); } -void CmdBaseStream::GenReturn (comm_USHORT nRet, SmartId *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ) +void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ) { Write(comm_USHORT(SIReturn)); Write(nRet); - Write(pUId); + if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) ) + Write(comm_ULONG(0)); + else + Write(pUId); Write(comm_USHORT(PARAM_ULONG_1|PARAM_STR_1|PARAM_BOOL_1)); // Typ der folgenden Parameter Write(nNr); Write(pString); Write(bBool); } +void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr ) +{ + Write(comm_USHORT(SIReturn)); + Write(nRet); + Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) + Write(comm_USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter + Write(nNr); +} + +void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_String *pString ) +{ + Write(comm_USHORT(SIReturn)); + Write(nRet); + Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) + Write(comm_USHORT(PARAM_STR_1)); // Typ der folgenden Parameter + Write(pString); +} + +void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool ) +{ + Write(comm_USHORT(SIReturn)); + Write(nRet); + Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) + Write(comm_USHORT(PARAM_BOOL_1)); // Typ der folgenden Parameter + Write(bBool); +} + +void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr ) +{ + Write(comm_USHORT(SIReturn)); + Write(nRet); + Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) + Write(comm_USHORT(PARAM_USHORT_1)); // Typ der folgenden Parameter + Write(nNr); +} + + // MacroRecorder -void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod ) +void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod ) { Write(comm_USHORT(SIReturn)); Write(nRet); @@ -114,7 +163,7 @@ void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMet Write(nMethod); } -void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_String *pString ) +void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString ) { Write(comm_USHORT(SIReturn)); Write(nRet); @@ -124,7 +173,7 @@ void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMet Write(pString); } -void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool ) +void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool ) { Write(comm_USHORT(SIReturn)); Write(nRet); @@ -135,7 +184,7 @@ void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMet Write(bBool); } -void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_BOOL bBool ) +void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool ) { Write(comm_USHORT(SIReturn)); Write(nRet); @@ -145,7 +194,7 @@ void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMet Write(bBool); } -void CmdBaseStream::GenReturn( comm_USHORT nRet, SmartId *pUId, comm_USHORT nMethod, comm_ULONG nNr ) +void CmdBaseStream::GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_ULONG nNr ) { Write(comm_USHORT(SIReturn)); Write(nRet); @@ -284,10 +333,10 @@ void CmdBaseStream::Read ( comm_String* &pString ) (void) pString; /* avoid warning about unused parameter */ OSL_FAIL("Read ( comm_String* &pString ) Not Implemented"); } -void CmdBaseStream::Read ( SmartId* &pId ) +void CmdBaseStream::Read ( rtl::OString* &pId ) { (void) pId; /* avoid warning about unused parameter */ - OSL_FAIL("Read ( SmartId* &pId ) Not Implemented"); + OSL_FAIL("Read ( rtl::OString* &pId ) Not Implemented"); } void CmdBaseStream::Write( comm_String *pString ) @@ -295,10 +344,10 @@ void CmdBaseStream::Write( comm_String *pString ) (void) pString; /* avoid warning about unused parameter */ OSL_FAIL("Write( comm_String *pString ) Not Implemented"); } -void CmdBaseStream::Write( SmartId* pId ) +void CmdBaseStream::Write( rtl::OString* pId ) { (void) pId; /* avoid warning about unused parameter */ - OSL_FAIL("Write( SmartId* pId ) Not Implemented"); + OSL_FAIL("Write( rtl::OString* pId ) Not Implemented"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/editwin.cxx b/automation/source/server/editwin.cxx index 5d3e1502b187..8056eebd6c02 100644 --- a/automation/source/server/editwin.cxx +++ b/automation/source/server/editwin.cxx @@ -63,14 +63,14 @@ void ImpWorkWindow::Resize() m_aInhalt.SetPosSizePixel( Point(), GetOutputSizePixel() ); } -BOOL EditWindow::Close() +sal_Bool EditWindow::Close() { if ( pImpWorkWindow ) { delete pImpWorkWindow; pImpWorkWindow = NULL; } - return TRUE; + return sal_True; } void EditWindow::Show() @@ -78,7 +78,7 @@ void EditWindow::Show() if ( Check() ) pImpWorkWindow->Show(); else - bShowWin = TRUE; + bShowWin = sal_True; } void EditWindow::Hide() @@ -86,7 +86,7 @@ void EditWindow::Hide() if ( Check() ) pImpWorkWindow->Hide(); else - bShowWin = FALSE; + bShowWin = sal_False; } EditWindow::EditWindow( WorkWindow *pParent, const String &rName, WinBits iWstyle ) @@ -95,7 +95,7 @@ EditWindow::EditWindow( WorkWindow *pParent, const String &rName, WinBits iWstyl , aMemName(rName) , iMemWstyle(iWstyle) , nTextLen(0) -, bQuiet(FALSE) +, bQuiet(sal_False) { } @@ -104,7 +104,7 @@ EditWindow::~EditWindow() Close(); } -BOOL EditWindow::Check() +sal_Bool EditWindow::Check() { if ( ! pImpWorkWindow && Application::IsInExecute() ) { @@ -114,7 +114,7 @@ BOOL EditWindow::Check() aMemPreWinText.Erase(); if ( bShowWin ) pImpWorkWindow->Show(); - return TRUE; + return sal_True; } return pImpWorkWindow != NULL; } diff --git a/automation/source/server/editwin.hxx b/automation/source/server/editwin.hxx index d01a824c3bdd..9b6d8b925f04 100644 --- a/automation/source/server/editwin.hxx +++ b/automation/source/server/editwin.hxx @@ -40,14 +40,14 @@ class EditWindow { protected: ImpWorkWindow *pImpWorkWindow; - BOOL check(); + sal_Bool check(); WorkWindow *pMemParent; String aMemName; WinBits iMemWstyle; String aMemPreWinText; - BOOL bShowWin; + sal_Bool bShowWin; xub_StrLen nTextLen; // aus Performanzgründen eigene Länge mitführen @@ -61,9 +61,9 @@ public: void AddText( const String &rNew ); void AddText( const sal_Char* rNew ); - virtual BOOL Close(); // derived - BOOL bQuiet; - BOOL Check(); + virtual sal_Bool Close(); // derived + sal_Bool bQuiet; + sal_Bool Check(); }; #endif diff --git a/automation/source/server/prof_nul.cxx b/automation/source/server/prof_nul.cxx index 3fb9d92a7597..46e1e3789d7b 100644 --- a/automation/source/server/prof_nul.cxx +++ b/automation/source/server/prof_nul.cxx @@ -83,7 +83,7 @@ String TTProfiler::GetSysdepProfileHeader() // Zustand merken -void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *, USHORT ) +void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *, sal_uInt16 ) {}; diff --git a/automation/source/server/prof_usl.cxx b/automation/source/server/prof_usl.cxx index a20e81606d7b..b7ca8037b0e1 100644 --- a/automation/source/server/prof_usl.cxx +++ b/automation/source/server/prof_usl.cxx @@ -86,7 +86,7 @@ String TTProfiler::GetSysdepProfileHeader() // Zustand merken -void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfileSnapshot, USHORT ) +void TTProfiler::GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfileSnapshot, sal_uInt16 ) { SvFileStream aStream( String::CreateFromAscii("/proc/self/psinfo"), STREAM_READ ); // Das ist ein expliziter Pfad für UNXSOL! if ( aStream.IsOpen() ) @@ -123,8 +123,8 @@ String TTProfiler::GetSysdepProfileLine( SysdepProfileSnapshot *pStart, SysdepPr aProfile += Pad( String::CreateFromInt64(DIFF_MS( pStart, pStop, mprusage.pr_rtime ) / AVER( pStart, pStop, mprusage.pr_count )), 7 ); - ULONG d_utime = DIFF_MS( pStart, pStop, mpstatus.pr_utime ) + DIFF_MS( pStart, pStop, mpstatus.pr_cutime ); - ULONG d_stime = DIFF_MS( pStart, pStop, mpstatus.pr_stime ) + DIFF_MS( pStart, pStop, mpstatus.pr_cstime ); + sal_uLong d_utime = DIFF_MS( pStart, pStop, mpstatus.pr_utime ) + DIFF_MS( pStart, pStop, mpstatus.pr_cutime ); + sal_uLong d_stime = DIFF_MS( pStart, pStop, mpstatus.pr_stime ) + DIFF_MS( pStart, pStop, mpstatus.pr_cstime ); aProfile += Pad( String::CreateFromInt64(d_utime), 7 ); aProfile += Pad( String::CreateFromInt64(d_stime), 7 ); diff --git a/automation/source/server/profiler.cxx b/automation/source/server/profiler.cxx index 1f9a63c18bd9..c11ddce1014a 100644 --- a/automation/source/server/profiler.cxx +++ b/automation/source/server/profiler.cxx @@ -43,10 +43,10 @@ TTProfiler::TTProfiler() : mpStart( NULL ) , mpEnd( NULL ) -, bIsProfileIntervalStarted( FALSE ) -, bIsProfilingPerCommand( FALSE ) -, bIsPartitioning( FALSE ) -, bIsAutoProfiling( FALSE ) +, bIsProfileIntervalStarted( sal_False ) +, bIsProfilingPerCommand( sal_False ) +, bIsPartitioning( sal_False ) +, bIsAutoProfiling( sal_False ) , pSysDepStatic( NULL ) { InitSysdepProfiler(); @@ -94,13 +94,13 @@ String TTProfiler::GetProfileHeader() } -void TTProfiler::StartProfileInterval( BOOL bReadAnyway ) +void TTProfiler::StartProfileInterval( sal_Bool bReadAnyway ) { if ( !bIsProfileIntervalStarted || bReadAnyway ) { GetProfileSnapshot( mpStart ); GetSysdepProfileSnapshot( mpStart->pSysdepProfileSnapshot, PROFILE_START ); - bIsProfileIntervalStarted = TRUE; + bIsProfileIntervalStarted = sal_True; } } @@ -108,10 +108,10 @@ String TTProfiler::GetProfileLine( ProfileSnapshot *pStart, ProfileSnapshot *pEn { String aProfileString; - aProfileString += Pad(GetpApp()->GetAppLocaleDataWrapper().getDuration( DIFF( pStart, pEnd, aTime) , TRUE, TRUE ), 12); + aProfileString += Pad(GetpApp()->GetAppLocaleDataWrapper().getDuration( DIFF( pStart, pEnd, aTime) , sal_True, sal_True ), 12); - ULONG nProcessTicks = DIFF( pStart, pEnd, nProcessTicks ); - ULONG nSystemTicks = DIFF( pStart, pEnd, nSystemTicks ); + sal_uLong nProcessTicks = DIFF( pStart, pEnd, nProcessTicks ); + sal_uLong nSystemTicks = DIFF( pStart, pEnd, nSystemTicks ); if ( nSystemTicks ) { aProfileString += Pad(UniString::CreateFromInt32( (100 * nProcessTicks) / nSystemTicks ), 11); @@ -146,7 +146,7 @@ void TTProfiler::EndProfileInterval() { GetProfileSnapshot( mpEnd ); GetSysdepProfileSnapshot( mpEnd->pSysdepProfileSnapshot, PROFILE_END ); - bIsProfileIntervalStarted = FALSE; + bIsProfileIntervalStarted = sal_False; } @@ -160,32 +160,32 @@ void TTProfiler::GetProfileSnapshot( ProfileSnapshot *pProfileSnapshot ) void TTProfiler::StartProfilingPerCommand() // Jeden Befehl mitschneiden { - bIsProfilingPerCommand = TRUE; + bIsProfilingPerCommand = sal_True; } void TTProfiler::StopProfilingPerCommand() { - bIsProfilingPerCommand = FALSE; + bIsProfilingPerCommand = sal_False; } void TTProfiler::StartPartitioning() { - bIsPartitioning = TRUE; + bIsPartitioning = sal_True; } void TTProfiler::StopPartitioning() { - bIsPartitioning = TRUE; + bIsPartitioning = sal_True; } -ULONG TTProfiler::GetPartitioningTime() +sal_uLong TTProfiler::GetPartitioningTime() { return DIFF( mpStart, mpEnd, nSystemTicks ); } -void TTProfiler::StartAutoProfiling( ULONG nMSec ) +void TTProfiler::StartAutoProfiling( sal_uLong nMSec ) { if ( !bIsAutoProfiling ) { @@ -196,7 +196,7 @@ void TTProfiler::StartAutoProfiling( ULONG nMSec ) GetProfileSnapshot( pAutoStart ); GetSysdepProfileSnapshot( pAutoStart->pSysdepProfileSnapshot, PROFILE_START ); SetTimeout( nMSec ); - bIsAutoProfiling = TRUE; + bIsAutoProfiling = sal_True; Start(); } @@ -233,14 +233,14 @@ void TTProfiler::StopAutoProfiling() if ( bIsAutoProfiling ) { Stop(); - bIsAutoProfiling = FALSE; + bIsAutoProfiling = sal_False; } } -//String TTProfiler::Hex( ULONG nNr ) -String TTProfiler::Dec( ULONG nNr ) +//String TTProfiler::Hex( sal_uLong nNr ) +String TTProfiler::Dec( sal_uLong nNr ) { String aRet(UniString::CreateFromInt32(nNr)); if ( nNr < 100 ) diff --git a/automation/source/server/profiler.hxx b/automation/source/server/profiler.hxx index cd6f309844a4..8bcb058bd4af 100644 --- a/automation/source/server/profiler.hxx +++ b/automation/source/server/profiler.hxx @@ -42,14 +42,14 @@ struct SysdepProfileSnapshot; -struct SysdepStaticData; // Nicht wirklich statisch, sondern statisch über mehrere Snapshots +struct SysdepStaticData; // Nicht wirklich statisch, sondern statisch �ber mehrere Snapshots struct ProfileSnapshot { Time aTime; SysdepProfileSnapshot *pSysdepProfileSnapshot; - ULONG nProcessTicks; - ULONG nSystemTicks; + sal_uLong nProcessTicks; + sal_uLong nSystemTicks; }; @@ -59,25 +59,25 @@ public: TTProfiler(); ~TTProfiler(); - String GetProfileHeader(); // Titelzeile für Logdatei - void StartProfileInterval( BOOL bReadAnyway = FALSE ); // Zustand merken + String GetProfileHeader(); // Titelzeile f�r Logdatei + void StartProfileInterval( sal_Bool bReadAnyway = sal_False ); // Zustand merken void EndProfileInterval(); // Informationszeile zusammenbauen String GetProfileLine( String &aPrefix ); void StartProfilingPerCommand(); // Jeden Befehl mitschneiden void StopProfilingPerCommand(); - BOOL IsProfilingPerCommand() { return bIsProfilingPerCommand; } + sal_Bool IsProfilingPerCommand() { return bIsProfilingPerCommand; } void StartPartitioning(); void StopPartitioning(); - BOOL IsPartitioning() { return bIsPartitioning; } - ULONG GetPartitioningTime(); + sal_Bool IsPartitioning() { return bIsPartitioning; } + sal_uLong GetPartitioningTime(); - void StartAutoProfiling( ULONG nMSec ); // Automatisch alle nMSec Milisekunden sampeln + void StartAutoProfiling( sal_uLong nMSec ); // Automatisch alle nMSec Milisekunden sampeln String GetAutoProfiling(); // Aktuelle `Sammlung` abholen void StopAutoProfiling(); // Sampeln beenden - BOOL IsAutoProfiling() { return bIsAutoProfiling; } + sal_Bool IsAutoProfiling() { return bIsAutoProfiling; } private: @@ -89,20 +89,20 @@ private: ProfileSnapshot *mpStart; ProfileSnapshot *mpEnd; - BOOL bIsProfileIntervalStarted; + sal_Bool bIsProfileIntervalStarted; // - BOOL bIsProfilingPerCommand; - BOOL bIsPartitioning; + sal_Bool bIsProfilingPerCommand; + sal_Bool bIsPartitioning; -// Für das Automatische Profiling in festen Intervallen +// F�r das Automatische Profiling in festen Intervallen ProfileSnapshot *pAutoStart; ProfileSnapshot *pAutoEnd; - BOOL bIsAutoProfiling; + sal_Bool bIsAutoProfiling; String aAutoProfileBuffer; virtual void Timeout(); @@ -110,11 +110,11 @@ private: // Einige Hilfsfunktionen -// String Hex( ULONG nNr ); - String Dec( ULONG nNr ); // Ergebnis = nNr / 100 mit 2 Dezimalen - String Pad( const String &aS, xub_StrLen nLen ); // Fügt blanks links an den String an +// String Hex( sal_uLong nNr ); + String Dec( sal_uLong nNr ); // Ergebnis = nNr / 100 mit 2 Dezimalen + String Pad( const String &aS, xub_StrLen nLen ); // F�gt blanks links an den String an -/* Ab hier werden die Methoden Systemabhängig in den entsprechenden cxx implementiert +/* Ab hier werden die Methoden Systemabh�ngig in den entsprechenden cxx implementiert Sie werden von den oberen Methoden gerufen. */ @@ -126,11 +126,11 @@ private: SysdepProfileSnapshot *NewSysdepSnapshotData(); void DeleteSysdepSnapshotData( SysdepProfileSnapshot *pSysdepProfileSnapshot ); - // Titelzeile für Logdatei + // Titelzeile f�r Logdatei String GetSysdepProfileHeader(); // Zustand merken - void GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfileSnapshot, USHORT nMode = PROFILE_START | PROFILE_END ); + void GetSysdepProfileSnapshot( SysdepProfileSnapshot *pSysdepProfileSnapshot, sal_uInt16 nMode = PROFILE_START | PROFILE_END ); // Informationszeile zusammenbauen String GetSysdepProfileLine( SysdepProfileSnapshot *pStart, SysdepProfileSnapshot *pStop ); diff --git a/automation/source/server/recorder.cxx b/automation/source/server/recorder.cxx index b6b430d407aa..dda348885dfc 100644 --- a/automation/source/server/recorder.cxx +++ b/automation/source/server/recorder.cxx @@ -57,9 +57,9 @@ MacroRecorder::MacroRecorder() , pActionParent( NULL ) , aKeyUniqueID() , pKeyWin( NULL ) -, bKeyFollowFocus( FALSE ) -, m_bRecord( FALSE ) -, m_bLog( FALSE ) +, bKeyFollowFocus( sal_False ) +, m_bRecord( sal_False ) +, m_bLog( sal_False ) { aHookRefresh.SetTimeout( 500 ); aHookRefresh.SetTimeoutHdl( LINK( this, MacroRecorder, HookRefreshHdl) ); @@ -106,41 +106,41 @@ IMPL_LINK( MacroRecorder, HookRefreshHdl, void*, EMPTYARG ) return 0; } -void MacroRecorder::LogVCL( SmartId aParentID, USHORT nVCLWindowType, SmartId aID, String aMethod, USHORT nParam ) +void MacroRecorder::LogVCL( rtl::OString aParentID, sal_uInt16 nVCLWindowType, rtl::OString aID, String aMethod, sal_uInt16 nParam ) { - ::comphelper::UiEventsLogger::logVcl( aParentID.GetText(), nVCLWindowType, aID.GetText(), aMethod, nParam ); + ::comphelper::UiEventsLogger::logVcl( Id2Str( aParentID ), nVCLWindowType, Id2Str( aID ), aMethod, nParam ); } -void MacroRecorder::LogVCL( SmartId aParentID, USHORT nVCLWindowType, SmartId aID, String aMethod ) +void MacroRecorder::LogVCL( rtl::OString aParentID, sal_uInt16 nVCLWindowType, rtl::OString aID, String aMethod ) { - ::comphelper::UiEventsLogger::logVcl( aParentID.GetText(), nVCLWindowType, aID.GetText(), aMethod ); + ::comphelper::UiEventsLogger::logVcl( Id2Str( aParentID ), nVCLWindowType, Id2Str( aID ), aMethod ); } Window* MacroRecorder::GetParentWithID( Window* pThis ) { Window *pOverlap = pThis->GetWindow( WINDOW_OVERLAP ); - while ( pOverlap != pThis && !pThis->GetSmartUniqueOrHelpId().HasAny() && pThis->GET_REAL_PARENT() ) + while ( pOverlap != pThis && !pThis->GetUniqueOrHelpId().getLength() && pThis->GET_REAL_PARENT() ) pThis = pThis->GET_REAL_PARENT(); return pThis; } -SmartId MacroRecorder::GetParentID( Window* pThis ) +rtl::OString MacroRecorder::GetParentID( Window* pThis ) { if ( pThis->GetParent() ) - return pThis->GetParent()->GetSmartUniqueOrHelpId(); + return pThis->GetParent()->GetUniqueOrHelpId(); else - return SmartId(); + return rtl::OString(); } IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { - BOOL bSendData = FALSE; + sal_Bool bSendData = sal_False; if ( pEvent->ISA( VclWindowEvent ) ) { VclWindowEvent* pWinEvent = ( VclWindowEvent* ) pEvent; Window* pWin = pWinEvent->GetWindow(); - ULONG nEventID = pWinEvent->GetId(); + sal_uLong nEventID = pWinEvent->GetId(); #if OSL_DEBUG_LEVEL > 1 if ( nEventID >= 1001 && nEventID != VCLEVENT_WINDOW_KEYUP ) nEventID = pWinEvent->GetId(); // Just something to set a breakpoint @@ -168,18 +168,18 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { // we cannot access pKeyWin since it might have dissapeared if ( bKeyFollowFocus ) - StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (USHORT)M_TypeKeys, aKeyString, bKeyFollowFocus ); + StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (sal_uInt16)M_TypeKeys, aKeyString, bKeyFollowFocus ); else - StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (USHORT)M_TypeKeys, aKeyString ); + StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (sal_uInt16)M_TypeKeys, aKeyString ); #if OSL_DEBUG_LEVEL > 1 - StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (USHORT)M_TypeKeys, String::CreateFromInt32( nEventID ) ); + StatementList::pRet->GenReturn( RET_MacroRecorder, aKeyUniqueID, (sal_uInt16)M_TypeKeys, String::CreateFromInt32( nEventID ) ); #endif - bSendData = TRUE; + bSendData = sal_True; } // cleanup aKeyString.Erase(); pKeyWin = NULL; - bKeyFollowFocus = FALSE; + bKeyFollowFocus = sal_False; } switch ( pWin->GetType() ) @@ -190,12 +190,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case VCLEVENT_WINDOW_ACTIVATE: if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, SmartId(), (comm_USHORT)(M_SetPage|M_RET_NUM_CONTROL), static_cast<comm_ULONG>(pWin->GetSmartUniqueOrHelpId().GetNum()) ); //GetNum() ULONG != comm_ULONG on 64bit - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString(), (comm_USHORT)(M_SetPage|M_RET_NUM_CONTROL), Id2Str( pWin->GetUniqueOrHelpId() ) ); + bSendData = sal_True; } if ( m_bLog ) { - LogVCL( SmartId(), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("SetPage") ); + LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("SetPage") ); } break; } @@ -210,12 +210,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Check ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Check ); + bSendData = sal_True; } if ( m_bLog ) { - LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Check") ); + LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Check") ); } } } @@ -240,12 +240,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) } if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), nMethod ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), nMethod ); + bSendData = sal_True; } if ( m_bLog ) { - LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod ); + LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod ); } } break; @@ -273,12 +273,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case VCLEVENT_LISTBOX_SELECT: if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Select, comm_ULONG( ((ListBox*)pWin)->GetSelectEntryPos() +1 ) ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, comm_ULONG( ((ListBox*)pWin)->GetSelectEntryPos() +1 ) ); + bSendData = sal_True; } if ( m_bLog ) { - LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Select"), ((ListBox*)pWin)->GetSelectEntryPos() ); + LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Select"), ((ListBox*)pWin)->GetSelectEntryPos() ); } break; } @@ -301,20 +301,20 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) pEditModify = NULL; aEditModifyString.Erase(); - USHORT nPos = ((ComboBox*)pWin)->GetEntryPos(((ComboBox*)pWin)->GetText()); + sal_uInt16 nPos = ((ComboBox*)pWin)->GetEntryPos(((ComboBox*)pWin)->GetText()); if ( m_bRecord ) { if ( nPos == COMBOBOX_ENTRY_NOTFOUND ) Sound::Beep(); else { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Select, (comm_ULONG) nPos+1 ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, (comm_ULONG) nPos+1 ); + bSendData = sal_True; } } if ( m_bLog ) { - LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Select"), nPos ); + LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Select"), nPos ); } } } @@ -329,8 +329,8 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { case VCLEVENT_BUTTON_CLICK: Window* pParent = pWin->GetParent(); - BOOL bDone = FALSE; - if ( pParent->IsDialog() && !pWin->GetSmartUniqueOrHelpId().HasAny() ) + sal_Bool bDone = sal_False; + if ( pParent->IsDialog() && !pWin->GetUniqueOrHelpId().getLength() ) { switch ( pParent->GetType() ) { @@ -346,8 +346,8 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) ButtonDialog* pBD = (ButtonDialog*)pParent; // we have to find the current Button ID ourselves since it is not generated at this point :-( - USHORT nCurrentButtonId = 0xffff; // Some wild value to wak up people - USHORT i; + sal_uInt16 nCurrentButtonId = 0xffff; // Some wild value to wak up people + sal_uInt16 i; for ( i = 0; i < pBD->GetButtonCount() ; i++ ) { if ( pBD->GetPushButton( pBD->GetButtonId(i) ) == pWin ) @@ -370,18 +370,18 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( m_bRecord ) { if ( nMethod != M_Click ) - StatementList::pRet->GenReturn( RET_MacroRecorder, SmartId( 0 ), nMethod ); + StatementList::pRet->GenReturn( RET_MacroRecorder, UID_ACTIVE, nMethod ); else - StatementList::pRet->GenReturn( RET_MacroRecorder, SmartId( 0 ), nMethod, (comm_ULONG)nCurrentButtonId ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, UID_ACTIVE, nMethod, (comm_ULONG)nCurrentButtonId ); + bSendData = sal_True; } if ( m_bLog ) { if ( nMethod != M_Click ) - LogVCL( SmartId(), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod ); + LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod ); else - LogVCL( SmartId(), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod, nCurrentButtonId ); - bDone = TRUE; + LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod, nCurrentButtonId ); + bDone = sal_True; } } break; @@ -399,13 +399,13 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) } if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pParent->GetSmartUniqueOrHelpId(), nMethod ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pParent->GetUniqueOrHelpId(), nMethod ); + bSendData = sal_True; } if ( m_bLog ) { - LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod ); - bDone = TRUE; + LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod ); + bDone = sal_True; } } break; @@ -413,16 +413,16 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) } if ( m_bRecord ) { - if ( !bSendData && pWin->GetSmartUniqueOrHelpId().HasAny() ) + if ( !bSendData && pWin->GetUniqueOrHelpId().getLength() ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Click ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click ); + bSendData = sal_True; } } if ( m_bLog ) { if ( !bDone ) - LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Click") ); + LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Click") ); } } break; @@ -456,12 +456,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) } if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), nMethod ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), nMethod ); + bSendData = sal_True; } if ( m_bLog ) { - LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), aMethod ); + LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod ); } } break; @@ -478,12 +478,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case VCLEVENT_BUTTON_CLICK: if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), (comm_USHORT)M_Click ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click ); + bSendData = sal_True; } if ( m_bLog ) { - LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Click") ); + LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Click") ); } break; } @@ -500,13 +500,13 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) // compare to 1 for floating ToolBoxes if ( m_bRecord ) { - if ( !pWin->GetSmartUniqueOrHelpId().HasAny() || pWin->GetSmartUniqueOrHelpId().Matches( 1 ) ) + if ( !pWin->GetUniqueOrHelpId().getLength() /* || pWin->GetUniqueOrHelpId().Matches( 1 ) */ ) // generate direct Button access - StatementList::pRet->GenReturn( RET_MacroRecorder, SmartId( pTB->GetItemCommand( pTB->GetCurItemId() ) ), (comm_USHORT)(M_Click) ); + StatementList::pRet->GenReturn( RET_MacroRecorder, Str2Id( pTB->GetItemCommand( pTB->GetCurItemId() ) ), (comm_USHORT)(M_Click) ); else // access via Toolbox - StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetSmartUniqueOrHelpId(), (comm_USHORT)(M_Click|M_RET_NUM_CONTROL), static_cast<comm_ULONG>(pTB->GetHelpId( pTB->GetCurItemId() )) ); // GetHelpId() ULONG != comm_ULONG on 64bit - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetUniqueOrHelpId(), (comm_USHORT)(M_Click|M_RET_NUM_CONTROL), Id2Str( pTB->GetHelpId( pTB->GetCurItemId() ) ) ); + bSendData = sal_True; } } break; @@ -534,8 +534,8 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) pKeyWin = pWin; Window *pIdWin = GetParentWithID( pWin ); if ( pIdWin != pWin ) - bKeyFollowFocus = TRUE; - aKeyUniqueID = pIdWin->GetSmartUniqueOrHelpId(); + bKeyFollowFocus = sal_True; + aKeyUniqueID = pIdWin->GetUniqueOrHelpId(); if ( ( !aKeyCode.IsMod1() && !aKeyCode.IsMod2() ) && (( aKeyCode.GetGroup() == KEYGROUP_NUM) || ( aKeyCode.GetGroup() == KEYGROUP_ALPHA) || @@ -579,7 +579,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { // case 1 .. 0xffff: OSL_TRACE( "TT_VCLMessage %u %u %X",nEventID, pWin->GetType(), pWin ); -// BOOL bx = ((DockingWindow*)pWin)->IsFloatingMode(); +// sal_Bool bx = ((DockingWindow*)pWin)->IsFloatingMode(); // break; } break; @@ -598,12 +598,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { if ( m_bRecord ) { - StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetSmartUniqueOrHelpId(), M_SetText, aEditModifyString ); - bSendData = TRUE; + StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), M_SetText, aEditModifyString ); + bSendData = sal_True; } if ( m_bLog ) { - LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetSmartUniqueOrHelpId(), CUniString("Modify") ); + LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), CUniString("Modify") ); } pEditModify = NULL; aEditModifyString.Erase(); //could be somewhat lengthy @@ -655,7 +655,7 @@ MacroRecorder* MacroRecorder::GetMacroRecorder() return pMacroRecorder; } -BOOL MacroRecorder::HasMacroRecorder() +sal_Bool MacroRecorder::HasMacroRecorder() { ::osl::MutexGuard aGuard( getRecorderMutex() ); return pMacroRecorder != NULL; diff --git a/automation/source/server/recorder.hxx b/automation/source/server/recorder.hxx index fff786d1484d..cde7b91e31c5 100644 --- a/automation/source/server/recorder.hxx +++ b/automation/source/server/recorder.hxx @@ -28,7 +28,6 @@ #include <tools/string.hxx> #include <tools/link.hxx> -#include <vcl/smartid.hxx> #include <vcl/timer.hxx> class ToolBox; @@ -39,7 +38,7 @@ class MacroRecorder { private: Window* GetParentWithID( Window* pThis ); - SmartId GetParentID( Window* pThis ); + rtl::OString GetParentID( Window* pThis ); Link aEventListenerHdl; DECL_LINK( EventListener, VclSimpleEvent* ); @@ -52,17 +51,17 @@ private: // record keys String aKeyString; - SmartId aKeyUniqueID; // has to be remembered seperately since Window might be gone when needed + rtl::OString aKeyUniqueID; // has to be remembered seperately since Window might be gone when needed Window* pKeyWin; - BOOL bKeyFollowFocus; + sal_Bool bKeyFollowFocus; AutoTimer aHookRefresh; void AddEventHooks(); void RemoveEventHooks(); DECL_LINK( HookRefreshHdl, void* ); - void LogVCL( SmartId aParentID, USHORT nVCLWindowType, SmartId aID, String aMethod, USHORT aParam ); - void LogVCL( SmartId aParentID, USHORT nVCLWindowType, SmartId aID, String aMethod ); + void LogVCL( rtl::OString aParentID, sal_uInt16 nVCLWindowType, rtl::OString aID, String aMethod, sal_uInt16 aParam ); + void LogVCL( rtl::OString aParentID, sal_uInt16 nVCLWindowType, rtl::OString aID, String aMethod ); static MacroRecorder *pMacroRecorder; @@ -71,16 +70,16 @@ private: void CheckDelete(); // Actions to perform - BOOL m_bRecord; - BOOL m_bLog; + sal_Bool m_bRecord; + sal_Bool m_bLog; public: - void SetActionRecord( BOOL bRecord = TRUE ) { m_bRecord = bRecord; CheckDelete(); }; - void SetActionLog( BOOL bLog = TRUE ) { m_bLog = bLog; CheckDelete(); }; + void SetActionRecord( sal_Bool bRecord = sal_True ) { m_bRecord = bRecord; CheckDelete(); }; + void SetActionLog( sal_Bool bLog = sal_True ) { m_bLog = bLog; CheckDelete(); }; static MacroRecorder* GetMacroRecorder(); - static BOOL HasMacroRecorder(); + static sal_Bool HasMacroRecorder(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/retstrm.cxx b/automation/source/server/retstrm.cxx index 1e89d1826ddd..abe79215ddec 100644 --- a/automation/source/server/retstrm.cxx +++ b/automation/source/server/retstrm.cxx @@ -29,6 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_automation.hxx" #include <tools/stream.hxx> +#include <basic/ttstrhlp.hxx> #include "retstrm.hxx" #include "rcontrol.hxx" @@ -48,41 +49,50 @@ RetStream::~RetStream() delete pSammel; } -void RetStream::GenError ( SmartId aUId, String aString ) +void RetStream::GenError ( rtl::OString aUId, String aString ) { CmdBaseStream::GenError ( &aUId, &aString ); } -void RetStream::GenReturn ( USHORT nRet, SmartId aUId, String aString ) +void RetStream::GenReturn ( sal_uInt16 nRet, rtl::OString aUId, String aString ) { CmdBaseStream::GenReturn ( nRet, &aUId, &aString ); } -void RetStream::GenReturn ( USHORT nRet, SmartId aUId, SbxValue &aValue ) -{ - Write(USHORT(SIReturn)); - Write(nRet); - Write(&aUId); - Write(USHORT(PARAM_SBXVALUE_1)); // Typ der folgenden Parameter - Write(aValue); -} - -void RetStream::GenReturn ( USHORT nRet, SmartId aUId, comm_ULONG nNr, String aString, BOOL bBool ) +void RetStream::GenReturn ( sal_uInt16 nRet, rtl::OString aUId, comm_ULONG nNr, String aString, sal_Bool bBool ) { CmdBaseStream::GenReturn ( nRet, &aUId, nNr, &aString, bBool ); } -void RetStream::GenReturn( USHORT nRet, SmartId aUId, comm_USHORT nMethod, String aString ) +// MacroRecorder +void RetStream::GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString ) { CmdBaseStream::GenReturn ( nRet, &aUId, nMethod, &aString ); } -void RetStream::GenReturn( USHORT nRet, SmartId aUId, comm_USHORT nMethod, String aString, BOOL bBool ) +void RetStream::GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, sal_Bool bBool ) { CmdBaseStream::GenReturn ( nRet, &aUId, nMethod, &aString, bBool ); } +void RetStream::GenReturn ( sal_uInt16 nRet, sal_uInt16 nMethod, SbxValue &aValue ) +{ + Write(sal_uInt16(SIReturn)); + Write(nRet); + Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) + Write(sal_uInt16(PARAM_SBXVALUE_1)); // Typ der folgenden Parameter + Write(aValue); +} + +void RetStream::GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, String aString ) +{ + CmdBaseStream::GenReturn ( nRet, nMethod, &aString ); +} + + + + void RetStream::Write( String *pString ) { CmdBaseStream::Write( pString->GetBuffer(), pString->Len() ); @@ -90,20 +100,15 @@ void RetStream::Write( String *pString ) void RetStream::Write( SbxValue &aValue ) { - *pSammel << USHORT( BinSbxValue ); + *pSammel << sal_uInt16( BinSbxValue ); aValue.Store( *pSammel ); } -void RetStream::Write( SmartId* pId ) +void RetStream::Write( rtl::OString* pId ) { - DBG_ASSERT( !pId->HasString() || !pId->HasNumeric(), "SmartId contains Number and String. using String only." ); - if ( pId->HasString() ) - { - String aTmp( pId->GetStr() ); - Write( &aTmp ); - } - else - Write( static_cast<comm_ULONG>(pId->GetNum()) ); ////GetNum() ULONG != comm_ULONG on 64bit + //HELPID BACKWARD (should use ByteString or OString) + String aTmp( Id2Str( *pId ) ); + Write( &aTmp ); } diff --git a/automation/source/server/retstrm.hxx b/automation/source/server/retstrm.hxx index fb66ef3bfa74..d21650898933 100644 --- a/automation/source/server/retstrm.hxx +++ b/automation/source/server/retstrm.hxx @@ -29,7 +29,6 @@ #define _RETSTRM_HXX #include <basic/sbxvar.hxx> -#include <vcl/smartid.hxx> #include "cmdbasestream.hxx" class SvStream; @@ -42,23 +41,28 @@ public: ~RetStream(); using CmdBaseStream::GenError; - void GenError( SmartId aUId, String aString ); + void GenError( rtl::OString aUId, String aString ); using CmdBaseStream::GenReturn; void GenReturn( comm_USHORT nRet, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, nNr );} - void GenReturn( comm_USHORT nRet, SmartId aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );} - void GenReturn( comm_USHORT nRet, SmartId aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );} + void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );} + void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );} + // MacroRecorder - void GenReturn( comm_USHORT nRet, SmartId aUId, comm_USHORT nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} - void GenReturn( comm_USHORT nRet, SmartId aUId, comm_USHORT nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, bBool );} - void GenReturn( comm_USHORT nRet, SmartId aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );} + void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} // also used outside MacroRecorder + void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, bBool );} + void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );} + + void GenReturn( sal_uInt16 nRet, rtl::OString aUId, String aString ); + void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_ULONG nNr, String aString, sal_Bool bBool ); + +// needed for RemoteCommand and Profiling + void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, SbxValue &aValue ); + void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, String aString ); - void GenReturn( USHORT nRet, SmartId aUId, String aString ); - void GenReturn( USHORT nRet, SmartId aUId, SbxValue &aValue ); - void GenReturn( USHORT nRet, SmartId aUId, comm_ULONG nNr, String aString, BOOL bBool ); // MacroRecorder - void GenReturn( USHORT nRet, SmartId aUId, comm_USHORT nMethod, String aString ); - void GenReturn( USHORT nRet, SmartId aUId, comm_USHORT nMethod, String aString, BOOL bBool ); + void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString ); + void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, sal_Bool bBool ); void Reset(); SvStream* GetStream(); @@ -72,7 +76,7 @@ public: void Write( SbxValue &aValue ); // Complex Datatypes to be handled system dependent - virtual void Write( SmartId* pId ); + virtual void Write( rtl::OString* pId ); virtual void Write( String *pString ); SvStream *pSammel; diff --git a/automation/source/server/scmdstrm.cxx b/automation/source/server/scmdstrm.cxx index e8399e43b342..2b0ed50eee7b 100644 --- a/automation/source/server/scmdstrm.cxx +++ b/automation/source/server/scmdstrm.cxx @@ -57,7 +57,7 @@ void SCmdStream::Read (String* &pString) if ( !pString ) pString = new String(); comm_UniChar* pStr; - USHORT nLenInChars; + sal_uInt16 nLenInChars; CmdBaseStream::Read( pStr, nLenInChars ); *pString = String( pStr, nLenInChars ); @@ -67,7 +67,7 @@ void SCmdStream::Read (String* &pString) void SCmdStream::Read (String &aString) { comm_UniChar* pStr; - USHORT nLenInChars; + sal_uInt16 nLenInChars; CmdBaseStream::Read( pStr, nLenInChars ); aString = String( pStr, nLenInChars ); @@ -76,8 +76,8 @@ void SCmdStream::Read (String &aString) void SCmdStream::Read ( SfxPoolItem *&pItem ) { - USHORT nType; - USHORT nId; + sal_uInt16 nType; + sal_uInt16 nId; Read(nId); #if OSL_DEBUG_LEVEL > 1 StatementList::m_pDbgWin->AddText( "Parameter: " ); @@ -146,7 +146,7 @@ void SCmdStream::Read ( SfxPoolItem *&pItem ) void SCmdStream::Read ( ::com::sun::star::beans::PropertyValue &rItem ) { - USHORT nType; + sal_uInt16 nType; String aId; Read(aId); rItem.Name = rtl::OUString( aId ); diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx index 3dbfe7212234..544772bb2bd5 100644 --- a/automation/source/server/server.cxx +++ b/automation/source/server/server.cxx @@ -84,16 +84,16 @@ void SAL_CALL osl_TestToolDebugPrint( const sal_Char *pString ) #endif -ULONG RemoteControlCommunicationManager::nPortIs = TT_PORT_NOT_INITIALIZED; -USHORT RemoteControlCommunicationManager::nComm = 0; -BOOL RemoteControlCommunicationManager::bQuiet = FALSE; +sal_uLong RemoteControlCommunicationManager::nPortIs = TT_PORT_NOT_INITIALIZED; +sal_uInt16 RemoteControlCommunicationManager::nComm = 0; +sal_Bool RemoteControlCommunicationManager::bQuiet = sal_False; #if OSL_DEBUG_LEVEL > 1 RemoteControlCommunicationManager::RemoteControlCommunicationManager( EditWindow * pDbgWin ) #else RemoteControlCommunicationManager::RemoteControlCommunicationManager() #endif -: CommunicationManagerServerViaSocket( GetPort(), 1, TRUE ) +: CommunicationManagerServerViaSocket( GetPort(), 1, sal_True ) #if OSL_DEBUG_LEVEL > 1 , m_pDbgWin( pDbgWin ) #endif @@ -108,7 +108,7 @@ RemoteControlCommunicationManager::RemoteControlCommunicationManager() { SetInfoType( CM_SHORT_TEXT | CM_ALL ); ByteString aByteString; - InfoMsg( InfoString( aByteString, CM_ALL ) ); // Anzeigen, daß wir da sind + InfoMsg( InfoString( aByteString, CM_ALL ) ); // Anzeigen, da� wir da sind } } @@ -149,7 +149,7 @@ IMPL_LINK( RemoteControlCommunicationManager, SetWinCaption, Timer*, EMPTYARG ) } else { // Dann Probieren wir es eben in 1 Sekunde nochmal - pTimer = new Timer(); // Wird im Link gelöscht + pTimer = new Timer(); // Wird im Link gel�scht pTimer->SetTimeout( 1000 ); pTimer->SetTimeoutHdl( LINK( this, RemoteControlCommunicationManager, SetWinCaption ) ); pTimer->Start(); @@ -169,20 +169,20 @@ void RemoteControlCommunicationManager::InfoMsg( InfoString aMsg ) #endif } -ULONG RemoteControlCommunicationManager::GetPort() +sal_uLong RemoteControlCommunicationManager::GetPort() { if ( TT_PORT_NOT_INITIALIZED == nPortIs ) { // Read Config - USHORT i; + sal_uInt16 i; // are we to be automated at all? - BOOL bAutomate = FALSE; + sal_Bool bAutomate = sal_False; for ( i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) { if ( Application::GetCommandLineParam( i ).EqualsIgnoreCaseAscii("/enableautomation") || Application::GetCommandLineParam( i ).EqualsIgnoreCaseAscii("-enableautomation")) { - bAutomate = TRUE; + bAutomate = sal_True; break; } } @@ -225,11 +225,11 @@ ULONG RemoteControlCommunicationManager::GetPort() nPortIs = aConf.ReadKey("TTPort","0").ToInt32(); - // noch prüfen ob dieses Office getestet werden soll. + // noch pr�fen ob dieses Office getestet werden soll. if ( !bAutomate || aConf.ReadKey( aNoTesttoolKey, "" ) != "" ) nPortIs = 0; - nComm = (USHORT)aConf.ReadKey("Comm","0").ToInt32(); + nComm = (sal_uInt16)aConf.ReadKey("Comm","0").ToInt32(); if ( nComm ) aConf.DeleteKey("Comm"); @@ -248,7 +248,7 @@ class ExtraIdle : public AutoTimer { virtual void Timeout(); - USHORT nStep; + sal_uInt16 nStep; ImplRemoteControl *pRemoteControl; public: ExtraIdle( ImplRemoteControl *pRC ); @@ -277,16 +277,16 @@ void ExtraIdle::Timeout() return; } - // Müssen wir selbst idlen? + // M�ssen wir selbst idlen? #if OSL_DEBUG_LEVEL > 1 - ULONG nLastInputInterval = Application::GetLastInputInterval(); - BOOL bIsInModalMode = Application::IsInModalMode(); + sal_uLong nLastInputInterval = Application::GetLastInputInterval(); + sal_Bool bIsInModalMode = Application::IsInModalMode(); if ( bIsInModalMode || nLastInputInterval < MIN_IDLE ) #else if ( Application::IsInModalMode() || Application::GetLastInputInterval() < MIN_IDLE ) #endif { - if ( nStep ) // Schon angefangen? dann abbrechen, sonst später nochmal + if ( nStep ) // Schon angefangen? dann abbrechen, sonst sp�ter nochmal { if ( nStep < 15 ) { @@ -314,11 +314,11 @@ void ExtraIdle::Timeout() } - switch ( nStep++ ) // Probieren ob wir noch was machen können + switch ( nStep++ ) // Probieren ob wir noch was machen k�nnen { case 0: { - SfxPoolItem *pItem = new SfxStringItem((USHORT)StatementList::pTTProperties->nSidNewDocDirect, CUniString("swriter/web") ); + SfxPoolItem *pItem = new SfxStringItem((sal_uInt16)StatementList::pTTProperties->nSidNewDocDirect, CUniString("swriter/web") ); new StatementSlot( StatementList::pTTProperties->nSidNewDocDirect, pItem ); SetTimeout(30000); return; @@ -378,7 +378,7 @@ void ExtraIdle::Timeout() #endif #ifdef TT_CODE - for ( USHORT i = 0 ; i < aStr.Len() ; i++ ) + for ( sal_uInt16 i = 0 ; i < aStr.Len() ; i++ ) { if ( aStr.GetChar(i) < 32 || aStr.GetChar(i) > 126 ) { @@ -563,7 +563,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) if ( StatementList::MaybeResetSafeReschedule() ) { - StatementList::bExecuting = FALSE; // Wird nacher im SafeReschedule wieder zurückgesetzt + StatementList::bExecuting = sal_False; // Wird nacher im SafeReschedule wieder zur�ckgesetzt #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "SafeReschedule has been reset\n" ); #endif @@ -590,14 +590,14 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) } m_pDbgWin->AddText( "Leaving CommandHdl\n" ); #endif - return 0; // Garnicht erst irgendwelchen blödsinn machen + return 0; // Garnicht erst irgendwelchen bl�dsinn machen } while( StatementList::pFirst && ( !StatementList::bReadingCommands || StatementList::bDying ) ) - // Schleift hier bis Befehl nicht zurückkommt, - // Wird dann rekursiv über IdleHdl und PostUserEvent aufgerufen. + // Schleift hier bis Befehl nicht zur�ckkommt, + // Wird dann rekursiv �ber IdleHdl und PostUserEvent aufgerufen. { - m_bInsideExecutionLoop = TRUE; + m_bInsideExecutionLoop = sal_True; #ifdef TIMERIDLE m_aIdleTimer.Stop(); m_aIdleTimer.Start(); @@ -611,7 +611,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Leaving CommandHdl\n" ); #endif - return 0; // So dass die App nochmal ´ne chance bekommt + return 0; // So dass die App nochmal �ne chance bekommt } } else @@ -623,7 +623,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Leaving CommandHdl\n" ); #endif - return 0; // So dass die App nochmal ´ne chance bekommt + return 0; // So dass die App nochmal �ne chance bekommt } } catch( ... ) @@ -639,8 +639,8 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) pDlg->Show(); OSL_FAIL("GPF"); pC->ReportError( GEN_RES_STR0( S_GPF_ABORT ) ); - StatementList::bDying = TRUE; - while ( StatementList::pFirst ) // Kommandos werden übersprungen + StatementList::bDying = sal_True; + while ( StatementList::pFirst ) // Kommandos werden �bersprungen StatementList::NormalReschedule(); delete pDlg; } @@ -652,10 +652,10 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) } } - m_bInsideExecutionLoop = FALSE; + m_bInsideExecutionLoop = sal_False; } - StatementList::aWindowWaitUId = SmartId(); // Warten rücksetzen, da handler sowieso verlassen wird + StatementList::aWindowWaitUId = rtl::OString(); // Warten r�cksetzen, da handler sowieso verlassen wird #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Leaving CommandHdl\n" ); @@ -671,9 +671,9 @@ IMPL_LINK( ImplRemoteControl, QueCommandsEvent, CommunicationLink*, pCL ) return 0; } -BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) +sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn ) { - USHORT nId; + sal_uInt16 nId; if( !m_bIdleInserted ) { @@ -684,11 +684,11 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) #else GetpApp()->InsertIdleHdl( LINK( this, ImplRemoteControl, IdleHdl ), 1 ); #endif - m_bIdleInserted = TRUE; + m_bIdleInserted = sal_True; } - StatementList::bReadingCommands = TRUE; + StatementList::bReadingCommands = sal_True; #if OSL_DEBUG_LEVEL > 1 if (!m_pDbgWin->bQuiet) @@ -701,7 +701,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) if( nServiceId != SI_IPCCommandBlock && nServiceId != SI_DirectCommandBlock ) { OSL_TRACE( "Ungültiger Request :%i", (int)nServiceId ); - return FALSE; + return sal_False; } SCmdStream *pCmdStream = new SCmdStream(pIn); @@ -713,28 +713,28 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) { case SICommand: { - new StatementCommand( pCmdStream ); // Wird im Konstruktor an Liste angehängt + new StatementCommand( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt break; } case SIControl: case SIStringControl: { - new StatementControl( pCmdStream, nId ); // Wird im Konstruktor an Liste angehängt + new StatementControl( pCmdStream, nId ); // Wird im Konstruktor an Liste angeh�ngt break; } case SISlot: { - new StatementSlot( pCmdStream ); // Wird im Konstruktor an Liste angehängt + new StatementSlot( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt break; } case SIUnoSlot: { - new StatementUnoSlot( pCmdStream ); // Wird im Konstruktor an Liste angehängt + new StatementUnoSlot( pCmdStream ); // Wird im Konstruktor an Liste angeh�ngt break; } case SIFlow: { - new StatementFlow( nServiceId, pCmdStream, this ); // Wird im Konstruktor an Liste angehängt + new StatementFlow( nServiceId, pCmdStream, this ); // Wird im Konstruktor an Liste angeh�ngt break; } default: @@ -748,7 +748,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) } } - StatementList::bReadingCommands = FALSE; + StatementList::bReadingCommands = sal_False; delete pCmdStream; #if OSL_DEBUG_LEVEL > 1 @@ -764,7 +764,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) GetpApp()->PostUserEvent( LINK( this, ImplRemoteControl, CommandHdl ) ); } - return TRUE; + return sal_True; } @@ -776,8 +776,8 @@ SvStream* ImplRemoteControl::GetReturnStream() } ImplRemoteControl::ImplRemoteControl() -: m_bIdleInserted( FALSE ) -, m_bInsideExecutionLoop( FALSE ) +: m_bIdleInserted( sal_False ) +, m_bInsideExecutionLoop( sal_False ) #if OSL_DEBUG_LEVEL > 1 , m_pDbgWin(NULL) #endif @@ -787,8 +787,11 @@ ImplRemoteControl::ImplRemoteControl() if ( RemoteControlCommunicationManager::GetPort() != TT_NO_PORT_DEFINED || RemoteControlCommunicationManager::nComm ) { m_pDbgWin = new EditWindow( NULL, CUniString("Debug Window"), WB_VSCROLL ); - m_pDbgWin->bQuiet = TRUE; + m_pDbgWin->bQuiet = sal_True; m_pDbgWin->Hide(); + m_pDbgWin->bQuiet = sal_False; + m_pDbgWin->Show(); + StatementList::m_pDbgWin = m_pDbgWin; } #endif @@ -819,26 +822,26 @@ ImplRemoteControl::ImplRemoteControl() ImplRemoteControl::~ImplRemoteControl() { if ( MacroRecorder::HasMacroRecorder() ) - MacroRecorder::GetMacroRecorder()->SetActionRecord( FALSE ); // Will delete MacroRecorder if necessary + MacroRecorder::GetMacroRecorder()->SetActionRecord( sal_False ); // Will delete MacroRecorder if necessary - StatementList::bDying = TRUE; + StatementList::bDying = sal_True; #if OSL_DEBUG_LEVEL > 1 if ( m_pDbgWin ) - m_pDbgWin->bQuiet = TRUE; // Keine Ausgabe mehr im Debugwindow + m_pDbgWin->bQuiet = sal_True; // Keine Ausgabe mehr im Debugwindow #endif #ifdef DBG_UTIL - // Zurücksetzen, so daß nachfolgende Assertions nicht verloren gehen + // Zur�cksetzen, so da� nachfolgende Assertions nicht verloren gehen DbgSetPrintTestTool( NULL ); osl_setDebugMessageFunc( StatementCommand::pOriginal_osl_DebugMessageFunc ); #endif if ( StatementList::pFirst ) - { // Es sind noch Kommandos da, also auch eine Möglichkeit zurückzusenden. + { // Es sind noch Kommandos da, also auch eine M�glichkeit zur�ckzusenden. StatementList::pFirst->ReportError( GEN_RES_STR0( S_APP_SHUTDOWN ) ); - while ( StatementList::pFirst ) // Kommandos werden übersprungen - StatementList::NormalReschedule(); // Fehler zurückgeschickt + while ( StatementList::pFirst ) // Kommandos werden �bersprungen + StatementList::NormalReschedule(); // Fehler zur�ckgeschickt } if ( pServiceMgr ) @@ -864,7 +867,7 @@ ImplRemoteControl::~ImplRemoteControl() #else GetpApp()->RemoveIdleHdl( LINK( this, ImplRemoteControl, IdleHdl ) ); #endif - m_bIdleInserted = FALSE; + m_bIdleInserted = sal_False; } delete pServiceMgr; } @@ -905,7 +908,7 @@ extern "C" void CreateEventLogger() extern "C" void DestroyEventLogger() { - MacroRecorder::GetMacroRecorder()->SetActionLog( FALSE ); // Will delete MacroRecorder if necessary + MacroRecorder::GetMacroRecorder()->SetActionLog( sal_False ); // Will delete MacroRecorder if necessary } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/server/server.hxx b/automation/source/server/server.hxx index e07ad2b0f6e4..7b4850474ad3 100644 --- a/automation/source/server/server.hxx +++ b/automation/source/server/server.hxx @@ -31,7 +31,7 @@ #include "editwin.hxx" #include <automation/communi.hxx> -#define TT_PORT_NOT_INITIALIZED ULONG(0xFFFFFFFF) // Eigentlich ja noch mehr, aber soll mal reichen +#define TT_PORT_NOT_INITIALIZED sal_uLong(0xFFFFFFFF) // Eigentlich ja noch mehr, aber soll mal reichen #define TT_NO_PORT_DEFINED 0 class RemoteControlCommunicationManager : public CommunicationManagerServerViaSocket @@ -41,12 +41,12 @@ class RemoteControlCommunicationManager : public CommunicationManagerServerViaSo #endif String aOriginalWinCaption; String aAdditionalWinCaption; - BOOL bIsPortValid; + sal_Bool bIsPortValid; DECL_LINK( SetWinCaption, Timer* = NULL); Timer* pTimer; virtual void InfoMsg( InfoString aMsg ); - static ULONG nPortIs; - static BOOL bQuiet; + static sal_uLong nPortIs; + static sal_Bool bQuiet; public: #if OSL_DEBUG_LEVEL > 1 @@ -59,8 +59,8 @@ public: virtual void ConnectionOpened( CommunicationLink* pCL ); virtual void ConnectionClosed( CommunicationLink* pCL ); - static ULONG GetPort(); - static USHORT nComm; + static sal_uLong GetPort(); + static sal_uInt16 nComm; #if OSL_DEBUG_LEVEL > 1 // virtual void DataReceived( CommunicationLink* pCL ); diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx index fbc046cddf42..e8be99121ce6 100644 --- a/automation/source/server/sta_list.cxx +++ b/automation/source/server/sta_list.cxx @@ -57,45 +57,45 @@ TTProfiler *StatementList::pProfiler = NULL; StatementList *StatementList::pFirst = NULL; -BOOL StatementList::bReadingCommands = FALSE; -BOOL StatementList::bIsInReschedule = FALSE; -USHORT StatementList::nModalCount = 0; +sal_Bool StatementList::bReadingCommands = sal_False; +sal_Bool StatementList::bIsInReschedule = sal_False; +sal_uInt16 StatementList::nModalCount = 0; Window *StatementList::pLastFocusWindow = NULL; -BOOL StatementList::bWasDragManager = FALSE; -BOOL StatementList::bWasPopupMenu = FALSE; -BOOL StatementList::bBasicWasRunning = FALSE; +sal_Bool StatementList::bWasDragManager = sal_False; +sal_Bool StatementList::bWasPopupMenu = sal_False; +sal_Bool StatementList::bBasicWasRunning = sal_False; RetStream *StatementList::pRet = NULL; -BOOL StatementList::IsError = FALSE; -BOOL StatementList::bDying = FALSE; -BOOL StatementList::bExecuting = FALSE; +sal_Bool StatementList::IsError = sal_False; +sal_Bool StatementList::bDying = sal_False; +sal_Bool StatementList::bExecuting = sal_False; StatementList *StatementList::pCurrentProfileStatement = NULL; -BOOL StatementList::bUsePostEvents = TRUE; +sal_Bool StatementList::bUsePostEvents = sal_True; #if OSL_DEBUG_LEVEL > 1 EditWindow *StatementList::m_pDbgWin; #endif -SmartId StatementList::aWindowWaitUId = SmartId(); +rtl::OString StatementList::aWindowWaitUId = rtl::OString(); Window *StatementList::pWindowWaitPointer = NULL; -SmartId StatementList::aWindowWaitOldHelpId = SmartId(); -SmartId StatementList::aWindowWaitOldUniqueId = SmartId(); -USHORT StatementList::nUseBindings = 0; +rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString(); +rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString(); +sal_uInt16 StatementList::nUseBindings = 0; -SmartId StatementList::aSubMenuId1 = SmartId(); // Untermenüs bei PopupMenus -SmartId StatementList::aSubMenuId2 = SmartId(); // erstmal 2-Stufig -SmartId StatementList::aSubMenuId3 = SmartId(); // and now even 3 levels #i31512# +sal_uInt16 StatementList::aSubMenuId1 = 0; // Untermen�s bei PopupMenus +sal_uInt16 StatementList::aSubMenuId2 = 0; // erstmal 2-Stufig +sal_uInt16 StatementList::aSubMenuId3 = 0; // and now even 3 levels #i31512# SystemWindow *StatementList::pMenuWindow = NULL; TTProperties *StatementList::pTTProperties = NULL; -USHORT StatementList::nMinTypeKeysDelay = 0; // Verzögerung der einzelnen Anschläge für TypeKeys -USHORT StatementList::nMaxTypeKeysDelay = 0; -BOOL StatementList::bDoTypeKeysDelay = FALSE; +sal_uInt16 StatementList::nMinTypeKeysDelay = 0; // Verz�gerung der einzelnen Anschl�ge f�r TypeKeys +sal_uInt16 StatementList::nMaxTypeKeysDelay = 0; +sal_Bool StatementList::bDoTypeKeysDelay = sal_False; Window* StatementList::pFirstDocFrame = NULL; -BOOL StatementList::bIsSlotInExecute = FALSE; +sal_Bool StatementList::bIsSlotInExecute = sal_False; -BOOL StatementList::bCatchGPF = TRUE; +sal_Bool StatementList::bCatchGPF = sal_True; IMPL_GEN_RES_STR; @@ -118,7 +118,7 @@ TTSettings* GetTTSettings() // Translate pTTSettings->pTranslateWin = NULL; - pTTSettings->bToTop = TRUE; + pTTSettings->bToTop = sal_True; } return pTTSettings; @@ -127,14 +127,15 @@ TTSettings* GetTTSettings() -#define IS_WINP_CLOSING(pWin) (pWin->GetSmartHelpId().Matches( 4321 ) && pWin->GetSmartUniqueId().Matches( 1234 )) +// FIXME: HELPID +#define IS_WINP_CLOSING(pWin) (pWin->GetHelpId().equals( "TT_Win_is_closing_HID" ) && pWin->GetUniqueId().equals( "TT_Win_is_closing_UID" )) StatementList::StatementList() : nRetryCount(MAX_RETRIES) -, bStatementInQue(FALSE) +, bStatementInQue(sal_False) { if (!pRet) - pRet = new RetStream; // so Spät wie möglich, aber dennoch Zentral und auf jeden Fall rechtzeitig, da pRet private ist. + pRet = new RetStream; // so Sp�t wie m�glich, aber dennoch Zentral und auf jeden Fall rechtzeitig, da pRet private ist. } void StatementList::InitProfile() @@ -146,7 +147,7 @@ void StatementList::InitProfile() #if OSL_DEBUG_LEVEL > 1 if ( pCurrentProfileStatement != NULL && pCurrentProfileStatement != this ) - pRet->GenReturn( RET_ProfileInfo, SmartId(), CUniString("InitProfile von anderem Statement gerufen ohne SendProfile\n") ); + pRet->GenReturn( RET_ProfileInfo, 0, CUniString("InitProfile von anderem Statement gerufen ohne SendProfile\n") ); #endif pCurrentProfileStatement = this; } @@ -162,18 +163,19 @@ void StatementList::SendProfile( String aText ) pProfiler->EndProfileInterval(); if ( pProfiler->IsProfilingPerCommand() ) - pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetProfileLine( aText ) ); + pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileLine( aText ) ); if ( pProfiler->IsPartitioning() ) - pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileTime ), static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() ULONG != comm_ULONG on 64bit + // FIXME: HELPID + pRet->GenReturn( RET_ProfileInfo, S_ProfileTime, static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() sal_uLong != comm_ULONG on 64bit } if ( pProfiler->IsAutoProfiling() ) - pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetAutoProfiling() ); + pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() ); #if OSL_DEBUG_LEVEL > 1 if ( pCurrentProfileStatement == NULL ) - pRet->GenReturn( RET_ProfileInfo, SmartId(), CUniString("SendProfile ohne InitProfile\n") ); + pRet->GenReturn( RET_ProfileInfo, 0, CUniString("SendProfile ohne InitProfile\n") ); #endif pCurrentProfileStatement = NULL; } @@ -181,11 +183,11 @@ void StatementList::SendProfile( String aText ) void StatementList::QueStatement(StatementList *pAfterThis) { - DBG_ASSERT(!bStatementInQue,"QueStatement für bereits eingetragenes Statement -> Abgebrochen"); + DBG_ASSERT(!bStatementInQue,"QueStatement f�r bereits eingetragenes Statement -> Abgebrochen"); if ( bStatementInQue ) return; - bStatementInQue = TRUE; + bStatementInQue = sal_True; if ( pAfterThis ) { if ( pAfterThis->bStatementInQue ) @@ -199,7 +201,7 @@ void StatementList::QueStatement(StatementList *pAfterThis) pFirst = this; } } - else // am Ende einfügen + else // am Ende einf�gen { pNext = NULL; if( !pFirst ) @@ -218,7 +220,7 @@ void StatementList::QueStatement(StatementList *pAfterThis) void StatementList::Advance() { // pFirst ist static! pFirst = pNext; - bStatementInQue = FALSE; + bStatementInQue = sal_False; pNext = NULL; } @@ -231,7 +233,7 @@ StatementList::~StatementList() DBG_ASSERT(!bReadingCommands,"Deleting commands while reading them!"); } -Window* StatementList::GetDocWin( USHORT nNr ) +Window* StatementList::GetDocWin( sal_uInt16 nNr ) { Window* pBase = Application::GetFirstTopLevelWindow(); @@ -248,10 +250,10 @@ Window* StatementList::GetDocWin( USHORT nNr ) return NULL; } -USHORT StatementList::GetDocFrameCount() +sal_uInt16 StatementList::GetDocFrameCount() { Window* pBase = Application::GetFirstTopLevelWindow(); - USHORT nCount = 0; + sal_uInt16 nCount = 0; while ( pBase ) { @@ -262,10 +264,10 @@ USHORT StatementList::GetDocFrameCount() return nCount; } -USHORT StatementList::GetDocWinCount() +sal_uInt16 StatementList::GetDocWinCount() { Window* pBase = Application::GetFirstTopLevelWindow(); - USHORT nCount = 0; + sal_uInt16 nCount = 0; while ( pBase ) { @@ -276,12 +278,12 @@ USHORT StatementList::GetDocWinCount() return nCount; } -Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, BOOL MaybeBase ) +Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase ) { if ( !pBase && !aSearch.HasSearchFlag( SEARCH_NO_TOPLEVEL_WIN ) ) { - BOOL bSearchFocusFirst = aSearch.HasSearchFlag( SEARCH_FOCUS_FIRST ); + sal_Bool bSearchFocusFirst = aSearch.HasSearchFlag( SEARCH_FOCUS_FIRST ); Window *pControl = NULL; if ( bSearchFocusFirst ) @@ -348,7 +350,7 @@ Window* StatementList::SearchAllWin( Window *pBase, Search &aSearch, BOOL MaybeB } -Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL MaybeBase ) +Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase ) { if ( !pBase ) return NULL; @@ -358,7 +360,7 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May Window *pResult = NULL; - USHORT i; + sal_uInt16 i; for( i = 0 ; i < pBase->GetChildCount() && !pResult; i++ ) pResult = SearchClientWin( pBase->GetChild(i), aSearch ); @@ -366,26 +368,26 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May } -BOOL SearchUID::IsWinOK( Window *pWin ) +sal_Bool SearchUID::IsWinOK( Window *pWin ) { - if ( aUId.Matches( pWin->GetSmartUniqueOrHelpId() ) ) + if ( aUId.equals( pWin->GetUniqueOrHelpId() ) ) { if ( ( pWin->IsEnabled() || HasSearchFlag( SEARCH_FIND_DISABLED ) ) && pWin->IsVisible() ) - return TRUE; + return sal_True; else { if ( !pMaybeResult ) pMaybeResult = pWin; - return FALSE; + return sal_False; } } else if ( pWin->GetType() == WINDOW_TOOLBOX ) // Buttons and Controls on ToolBox. { ToolBox *pTB = ((ToolBox*)pWin); - USHORT i; + sal_uInt16 i; for ( i = 0; i < pTB->GetItemCount() ; i++ ) { - if ( aUId.Matches( pTB->GetItemCommand(pTB->GetItemId( i )) ) || aUId.Matches( pTB->GetHelpId(pTB->GetItemId( i )) ) ) + if ( aUId.equals( Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ) ) || aUId.equals( pTB->GetHelpId(pTB->GetItemId( i )) ) ) { // ID matches. Window *pItemWin; pItemWin = pTB->GetItemWindow( pTB->GetItemId( i ) ); @@ -397,17 +399,17 @@ BOOL SearchUID::IsWinOK( Window *pWin ) { // We got a Button, see if its valid also. if ( ( pTB->IsItemEnabled(pTB->GetItemId(i)) || HasSearchFlag( SEARCH_FIND_DISABLED ) ) && pTB->IsItemVisible(pTB->GetItemId(i)) ) - return TRUE; // We got a Button. + return sal_True; // We got a Button. else { // better a disabled Button on a valid ToolBox than an invalid ToolBox as below pMaybeResult = pTB; - return FALSE; + return sal_False; } } else if ( !pMaybeResult ) { // invalid ToolBox pMaybeResult = pTB; - return FALSE; + return sal_False; } } if ( pItemWin ) @@ -417,23 +419,23 @@ BOOL SearchUID::IsWinOK( Window *pWin ) { if ( !pAlternateResult ) // only take the first found ItemWindow #i35365 pAlternateResult = pItemWin; // since we cannot return a Window here - return FALSE; // continue searching to prefer a window with the right ID #i32292 + return sal_False; // continue searching to prefer a window with the right ID #i32292 } else if ( !pMaybeResult ) { pMaybeResult = pItemWin; - return FALSE; + return sal_False; } } } } - return FALSE; + return sal_False; } else - return FALSE; + return sal_False; } -Window* StatementList::SearchTree( SmartId aUId ,BOOL bSearchButtonOnToolbox ) +Window* StatementList::SearchTree( rtl::OString aUId ,sal_Bool bSearchButtonOnToolbox ) { SearchUID aSearch(aUId,bSearchButtonOnToolbox); @@ -447,19 +449,19 @@ Window* StatementList::SearchTree( SmartId aUId ,BOOL bSearchButtonOnToolbox ) } -BOOL SearchWinPtr::IsWinOK( Window *pWin ) +sal_Bool SearchWinPtr::IsWinOK( Window *pWin ) { return pWin == pTest; } -BOOL StatementList::WinPtrValid(Window *pTest) +sal_Bool StatementList::WinPtrValid(Window *pTest) { SearchWinPtr aSearch( pTest ); return SearchAllWin( NULL, aSearch ) != NULL; } -BOOL SearchRT::IsWinOK( Window *pWin ) +sal_Bool SearchRT::IsWinOK( Window *pWin ) { if ( pWin->IsVisible() && pWin->GetType() == mnRT ) { @@ -467,15 +469,15 @@ BOOL SearchRT::IsWinOK( Window *pWin ) if ( mnSkip ) { mnSkip--; - return FALSE; + return sal_False; } else - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -Window* StatementList::GetWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase, USHORT nSkip, BOOL bSearchAll ) +Window* StatementList::GetWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase, sal_uInt16 nSkip, sal_Bool bSearchAll ) { SearchRT aSearch( nRT, 0, nSkip ); if ( bSearchAll ) @@ -486,7 +488,7 @@ Window* StatementList::GetWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase return SearchAllWin( pBase, aSearch, MaybeBase ); } -USHORT StatementList::CountWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase ) +sal_uInt16 StatementList::CountWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase ) { SearchRT aSearch( nRT, SEARCH_NOOVERLAP | SEARCH_NO_TOPLEVEL_WIN, 0xFFFF ); @@ -494,7 +496,7 @@ USHORT StatementList::CountWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBas return aSearch.GetCount(); } -BOOL SearchScroll::IsWinOK( Window *pWin ) +sal_Bool SearchScroll::IsWinOK( Window *pWin ) { if ( SearchRT::IsWinOK( pWin ) ) { @@ -502,10 +504,10 @@ BOOL SearchScroll::IsWinOK( Window *pWin ) return (( pWin->GetStyle() & WB_HORZ ) && ( nDirection == CONST_ALIGN_BOTTOM )) || (( pWin->GetStyle() & WB_VERT ) && ( nDirection == CONST_ALIGN_RIGHT )); } - return FALSE; + return sal_False; } -ScrollBar* StatementList::GetScrollBar( Window *pBase, USHORT nDirection, BOOL MaybeBase ) +ScrollBar* StatementList::GetScrollBar( Window *pBase, sal_uInt16 nDirection, sal_Bool MaybeBase ) { SearchScroll aSearch( nDirection, SEARCH_NOOVERLAP | SEARCH_NO_TOPLEVEL_WIN ); @@ -513,12 +515,12 @@ ScrollBar* StatementList::GetScrollBar( Window *pBase, USHORT nDirection, BOOL M } -BOOL SearchPopupFloatingWin::IsWinOK( Window *pWin ) +sal_Bool SearchPopupFloatingWin::IsWinOK( Window *pWin ) { return pWin->IsVisible() && pWin->GetType() == WINDOW_FLOATINGWINDOW && ((FloatingWindow*)pWin)->IsInPopupMode(); } -Window* StatementList::GetPopupFloatingWin( BOOL MaybeBase ) +Window* StatementList::GetPopupFloatingWin( sal_Bool MaybeBase ) { SearchPopupFloatingWin aSearch; @@ -533,7 +535,7 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) if ( pBaseMenu->GetWindow() == pWin ) return pBaseMenu; - USHORT i; + sal_uInt16 i; i = 0; while ( i < pBaseMenu->GetItemCount() ) { @@ -561,16 +563,16 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) return pMenu; } - USHORT nSkip = 0; + sal_uInt16 nSkip = 0; Window* pMenuBarWin = NULL; - while ( (pMenuBarWin = GetWinByRT( NULL, WINDOW_MENUBARWINDOW, TRUE, nSkip++, TRUE )) != NULL ) + while ( (pMenuBarWin = GetWinByRT( NULL, WINDOW_MENUBARWINDOW, sal_True, nSkip++, sal_True )) != NULL ) { Window* pParent = pMenuBarWin->GET_REAL_PARENT(); if ( pParent && pParent->GetType() == WINDOW_BORDERWINDOW && pParent->IsVisible() ) { Menu* pMenu = NULL; // find Menu of MenuBarWindow - USHORT nCount; + sal_uInt16 nCount; for ( nCount = 0 ; nCount < pParent->GetChildCount() ; nCount++ ) { if ( pParent->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW ) @@ -594,25 +596,25 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) } -BOOL SearchActive::IsWinOK( Window *pWin ) +sal_Bool SearchActive::IsWinOK( Window *pWin ) { // only matches ResID due to problems with UNIX Window Managers return pWin->IsVisible() && ( (nRT == WINDOW_ANYTYPE && IsDialog(pWin) ) || pWin->GetType() == nRT ); } -Window* StatementList::GetActive( WindowType nRT, BOOL MaybeBase ) +Window* StatementList::GetActive( WindowType nRT, sal_Bool MaybeBase ) { SearchActive aSearch( nRT ); return SearchAllWin( NULL, aSearch, MaybeBase ); } -BOOL SearchFadeSplitWin::IsWinOK( Window *pWin ) +sal_Bool SearchFadeSplitWin::IsWinOK( Window *pWin ) { #if OSL_DEBUG_LEVEL > 1 if ( pWin->GetType() == WINDOW_SPLITWINDOW ) { - BOOL bResult; + sal_Bool bResult; WindowAlign aAlign; bResult = pWin->IsVisible(); bResult = ((SplitWindow*)pWin)->IsFadeInButtonVisible(); @@ -626,7 +628,7 @@ BOOL SearchFadeSplitWin::IsWinOK( Window *pWin ) /*&& ((SplitWindow*)pWin)->IsAutoHideButtonVisible()*/ && ((SplitWindow*)pWin)->GetAlign() == nAlign; } -Window* StatementList::GetFadeSplitWin( Window *pBase, WindowAlign nAlign, BOOL MaybeBase ) +Window* StatementList::GetFadeSplitWin( Window *pBase, WindowAlign nAlign, sal_Bool MaybeBase ) { SearchFadeSplitWin aSearch( nAlign ); @@ -654,13 +656,13 @@ Window* StatementList::GetMouseWin() return NULL; } -Window* StatementList::GetFocus( WindowType nRT, BOOL MaybeBase ) +Window* StatementList::GetFocus( WindowType nRT, sal_Bool MaybeBase ) { if ( nRT == WINDOW_TABCONTROL ) { Window *pResult = GetActive( WINDOW_TABDIALOG, MaybeBase); - for( USHORT i = 0 ; pResult && i < pResult->GetChildCount(); i++ ) + for( sal_uInt16 i = 0 ; pResult && i < pResult->GetChildCount(); i++ ) if ( pResult->GetChild(i)->GetType() == nRT ) return pResult->GetChild(i); } @@ -668,7 +670,7 @@ Window* StatementList::GetFocus( WindowType nRT, BOOL MaybeBase ) return NULL; } -Window* StatementList::GetAnyActive( BOOL MaybeBase ) +Window* StatementList::GetAnyActive( sal_Bool MaybeBase ) { Window *pControl; @@ -757,7 +759,7 @@ Window* StatementList::GetFirstDocFrame() return pFirstDocFrame; } -BOOL StatementList::IsFirstDocFrame( Window* pWin ) +sal_Bool StatementList::IsFirstDocFrame( Window* pWin ) { return pWin && ( pWin == GetFirstDocFrame() || ( GetFirstDocFrame() && pWin == GetFirstDocFrame()->GetWindow( WINDOW_CLIENT ) ) ) && ( GetFirstDocFrame() && IsDocFrame( GetFirstDocFrame() ) ); } @@ -766,7 +768,7 @@ MenuBar* StatementList::GetDocFrameMenuBar( Window* pWin ) { if ( pWin && pWin->IsVisible() && pWin->GetType() == WINDOW_BORDERWINDOW ) { - USHORT nCount; + sal_uInt16 nCount; for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ ) { if ( pWin->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW ) @@ -777,35 +779,35 @@ MenuBar* StatementList::GetDocFrameMenuBar( Window* pWin ) } // a Doc Frame is a Document or the Backing Window -BOOL StatementList::IsDocFrame( Window* pWin ) +sal_Bool StatementList::IsDocFrame( Window* pWin ) { if ( pWin && pWin->IsVisible() && pWin->GetType() == WINDOW_BORDERWINDOW ) { - USHORT nCount; - BOOL bHasWorkWindow = FALSE; - BOOL bHasMenuBar = FALSE; + sal_uInt16 nCount; + sal_Bool bHasWorkWindow = sal_False; + sal_Bool bHasMenuBar = sal_False; // #91724# it is now necessary to sort out the IME WIndow in Solaris as well. // so now we check for existence of WINDOW_WORKWINDOW and newly for // WINDOW_MENUBARWINDOW which contains the Menu and the close/min/max buttons for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ ) { if ( pWin->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW ) - bHasWorkWindow = TRUE; + bHasWorkWindow = sal_True; if ( pWin->GetChild( nCount )->GetType() == WINDOW_MENUBARWINDOW ) - bHasMenuBar = TRUE; + bHasMenuBar = sal_True; } return bHasWorkWindow && bHasMenuBar; } - return FALSE; + return sal_False; } // a Doc Win is a real document (not the Backing Window) -BOOL StatementList::IsDocWin( Window* pWin ) +sal_Bool StatementList::IsDocWin( Window* pWin ) { if ( pWin && IsDocFrame( pWin ) ) { if ( GetDocFrameCount() != 1 ) - return TRUE; + return sal_True; else { // check for the close button to see if we are the last one or only the backing Window @@ -813,28 +815,28 @@ BOOL StatementList::IsDocWin( Window* pWin ) return GetDocFrameMenuBar( pWin )->HasCloser(); } } - return FALSE; + return sal_False; } -BOOL StatementList::IsIMEWin( Window* pWin ) // Input Window for CJK under Solaris +sal_Bool StatementList::IsIMEWin( Window* pWin ) // Input Window for CJK under Solaris { if ( pWin && pWin->IsVisible() && pWin->GetType() == WINDOW_BORDERWINDOW ) { - USHORT nCount; - BOOL bHasWorkWindow = FALSE; - BOOL bHasWindow = FALSE; + sal_uInt16 nCount; + sal_Bool bHasWorkWindow = sal_False; + sal_Bool bHasWindow = sal_False; // #91724# it is now necessary to sort out the IME WIndow in Solaris as well. // so now we check for existence of WINDOW_WORKWINDOW and newly for // WINDOW_WINDOW which contains the Menu and the close/min/max buttons for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ ) if ( pWin->GetChild( nCount )->GetType() == WINDOW_WORKWINDOW ) - bHasWorkWindow = TRUE; + bHasWorkWindow = sal_True; for ( nCount = 0 ; nCount < pWin->GetChildCount() ; nCount++ ) if ( pWin->GetChild( nCount )->GetType() == WINDOW_WINDOW ) - bHasWindow = TRUE; + bHasWindow = sal_True; return bHasWorkWindow && !bHasWindow; } - return FALSE; + return sal_False; } UniString StatementList::Tree(Window *pBase, int Indent) @@ -948,7 +950,7 @@ String StatementList::ClientTree(Window *pBase, int Indent) WRITE(sIndent); WRITEc("UId : "); - WRITE(UIdString(pBase->GetSmartUniqueOrHelpId())); + WRITE(Id2Str(pBase->GetUniqueOrHelpId())); WRITEc(":0x"); WRITE( String::CreateFromInt64( @@ -982,7 +984,7 @@ String StatementList::ClientTree(Window *pBase, int Indent) WRITEc("\n"); aReturn.ConvertLineEnd(); - USHORT i; + sal_uInt16 i; for (i = 0 ; i < pBase->GetChildCount() ; i++) { aReturn += ClientTree(pBase->GetChild(i),Indent+1); @@ -991,7 +993,7 @@ String StatementList::ClientTree(Window *pBase, int Indent) } -BOOL StatementList::CheckWindowWait() +sal_Bool StatementList::CheckWindowWait() { static Time StartTime = Time(0L); // Abbruch wenn Fenster absolut nicht schliesst. if ( StartTime == Time(0L) ) @@ -1005,7 +1007,7 @@ BOOL StatementList::CheckWindowWait() if ( WinPtrValid(pWindowWaitPointer) && IS_WINP_CLOSING(pWindowWaitPointer) ) { #if OSL_DEBUG_LEVEL > 1 - m_pDbgWin->AddText( aWindowWaitUId.GetText().AppendAscii(" Still Open. RType=") ); + m_pDbgWin->AddText( Id2Str(aWindowWaitUId).AppendAscii(" Still Open. RType=") ); m_pDbgWin->AddText( String::CreateFromInt32( pWindowWaitPointer->GetType() ).AppendAscii("\n") ); #endif @@ -1015,47 +1017,47 @@ BOOL StatementList::CheckWindowWait() #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Close timed out. Going on!! " ); #endif - pWindowWaitPointer->SetSmartHelpId(aWindowWaitOldHelpId, SMART_SET_ALL); - pWindowWaitPointer->SetSmartUniqueId(aWindowWaitOldUniqueId, SMART_SET_ALL); + pWindowWaitPointer->SetHelpId(aWindowWaitOldHelpId); + pWindowWaitPointer->SetUniqueId(aWindowWaitOldUniqueId); - aWindowWaitUId = SmartId(); + aWindowWaitUId = rtl::OString(); pWindowWaitPointer = NULL; StartTime = Time(0L); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } pWindowWaitPointer = NULL; - aWindowWaitUId = SmartId(); + aWindowWaitUId = rtl::OString(); #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Closed, Going on.\n" ); #endif } StartTime = Time(0L); - return TRUE; + return sal_True; } void StatementList::ReportError(String aMessage) { - ReportError ( SmartId(), aMessage ); + ReportError ( rtl::OString(), aMessage ); } -void StatementList::ReportError(SmartId aUId, String aMessage) +void StatementList::ReportError(rtl::OString aUId, String aMessage) { pRet->GenError ( aUId, aMessage ); - IsError = TRUE; + IsError = sal_True; } -void StatementList::ReportError(String aMessage, ULONG nWhatever) +void StatementList::ReportError(String aMessage, sal_uLong nWhatever) { ReportError ( aMessage.AppendAscii(" ").Append(UniString::CreateFromInt32(nWhatever))); } -void StatementList::DirectLog( ULONG nType, String aMessage ) +void StatementList::DirectLog( sal_uLong nType, String aMessage ) { if ( pRet ) - pRet->GenReturn( RET_DirectLoging, SmartId(nType), aMessage ); + pRet->GenReturn( RET_DirectLoging, (sal_uInt16) nType, aMessage ); } @@ -1069,15 +1071,15 @@ void StatementList::DirectLog( ULONG nType, String aMessage ) } \ } -void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect ) +void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, sal_Bool bForceDirect ) { if ( StatementList::bUsePostEvents && !bForceDirect ) { if ( StatementList::WinPtrValid( pWin ) ) { - ULONG nID1; - ULONG nID2; + sal_uLong nID1; + sal_uLong nID2; nID1 = Application::PostKeyEvent( VCLEVENT_WINDOW_KEYINPUT, pWin, &aKEvnt ); nID2 = Application::PostKeyEvent( VCLEVENT_WINDOW_KEYUP, pWin, &aKEvnt ); // wait after posting both events so deleting pWin will remove the second event also @@ -1101,7 +1103,7 @@ void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect ) Size aSize = pWin->GetOutputSize(); aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 ); - CommandEvent aEvent( aPos, COMMAND_CONTEXTMENU, FALSE ); + CommandEvent aEvent( aPos, COMMAND_CONTEXTMENU, sal_False ); ImplCommand( pWin, aEvent ); } } @@ -1111,13 +1113,13 @@ void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect ) } }; -void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) +void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect ) { if ( StatementList::bUsePostEvents && !bForceDirect ) { if ( StatementList::WinPtrValid( pWin ) ) { - ULONG nID; + sal_uLong nID; nID = Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, pWin, &aMEvnt ); ImplEventWait( nID ); } @@ -1134,13 +1136,13 @@ void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) } }; -void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) +void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect ) { if ( StatementList::bUsePostEvents && !bForceDirect ) { if ( StatementList::WinPtrValid( pWin ) ) { - ULONG nID; + sal_uLong nID; nID = Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pWin, &aMEvnt ); ImplEventWait( nID ); } @@ -1151,13 +1153,13 @@ void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) } }; -void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) +void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect ) { if ( StatementList::bUsePostEvents && !bForceDirect ) { if ( StatementList::WinPtrValid( pWin ) ) { - ULONG nID; + sal_uLong nID; nID = Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONUP, pWin, &aMEvnt ); ImplEventWait( nID ); } @@ -1166,7 +1168,7 @@ void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) { if ( pWin->IsTracking() ) { - // siehe #64693 die Position ist für Toolboxen relevant + // siehe #64693 die Position ist f�r Toolboxen relevant // #60020 Jetzt hoffentlich kein GPF mehr // Zuerst Tracking beenden ohne Event pWin->EndTracking( ENDTRACK_DONTCALLHDL ); @@ -1179,7 +1181,7 @@ void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect ) } }; -void ImplEventWait( ULONG nID ) +void ImplEventWait( sal_uLong nID ) { while ( !Application::IsProcessedMouseOrKeyEvent( nID ) ) Application::Yield(); diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 9163663f5c15..fdd5e1e0e781 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -35,6 +35,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/uieventslogger.hxx> +#include <tools/wintypes.hxx> #include <vcl/dialog.hxx> #include <vcl/button.hxx> #include <vcl/menubtn.hxx> @@ -59,10 +60,10 @@ #include <vcl/fixed.hxx> #include <vcl/wrkwin.hxx> #include <osl/diagnose.h> -#include <vcl/wintypes.hxx> #include <svtools/valueset.hxx> #include <svtools/roadmap.hxx> #include <svtools/table/tablecontrol.hxx> +#include <svtools/table/tablecontrolinterface.hxx> #include <svl/poolitem.hxx> #include <svtools/extensionlistbox.hxx> // Hat keinen Includeschutz @@ -117,11 +118,11 @@ SV_DECL_REF(SbxValue) SV_IMPL_REF(SbxValue) CommunicationLink *StatementFlow::pCommLink = NULL; -BOOL StatementFlow::bUseIPC = TRUE; -BOOL StatementFlow::bSending = FALSE; +sal_Bool StatementFlow::bUseIPC = sal_True; +sal_Bool StatementFlow::bSending = sal_False; ImplRemoteControl *StatementFlow::pRemoteControl = NULL; -USHORT StatementCommand::nDirPos = 0; +sal_uInt16 StatementCommand::nDirPos = 0; Dir *StatementCommand::pDir = NULL; pfunc_osl_printDebugMessage StatementCommand::pOriginal_osl_DebugMessageFunc = NULL; @@ -131,31 +132,31 @@ pfunc_osl_printDebugMessage StatementCommand::pOriginal_osl_DebugMessageFunc = N #define SET_WINP_CLOSING(pWin) \ pWindowWaitPointer = pWin; \ - aWindowWaitUId = pControl->GetSmartUniqueOrHelpId(); \ - aWindowWaitOldHelpId = pWin->GetSmartHelpId(); \ - aWindowWaitOldUniqueId = pWin->GetSmartUniqueId(); \ - pWin->SetSmartHelpId( SmartId(4321) ); \ - pWin->SetSmartUniqueId( SmartId(1234) ); + aWindowWaitUId = pControl->GetUniqueOrHelpId(); \ + aWindowWaitOldHelpId = pWin->GetHelpId(); \ + aWindowWaitOldUniqueId = pWin->GetUniqueId(); \ + pWin->SetHelpId( rtl::OString("TT_Win_is_closing_HID") ); \ + pWin->SetUniqueId( rtl::OString("TT_Win_is_closing_UID") ); -StatementFlow::StatementFlow( StatementList *pAfterThis, USHORT nArtP ) +StatementFlow::StatementFlow( StatementList *pAfterThis, sal_uInt16 nArtP ) : nArt(nArtP) , nParams(0) , nSNr1(0) , nLNr1(0) , aString1() -, bBool1(FALSE) +, bBool1(sal_False) { QueStatement( pAfterThis ); } -StatementFlow::StatementFlow( ULONG nServiceId, SCmdStream *pCmdIn, ImplRemoteControl *pRC ) +StatementFlow::StatementFlow( sal_uLong nServiceId, SCmdStream *pCmdIn, ImplRemoteControl *pRC ) : nArt(0) , nParams(0) , nSNr1(0) , nLNr1(0) , aString1() -, bBool1(FALSE) +, bBool1(sal_False) { QueStatement( NULL ); bUseIPC = (nServiceId == SI_IPCCommandBlock); @@ -190,10 +191,10 @@ void StatementFlow::SendViaSocket() OSL_FAIL("SendViaSocket called recursively. Aborted!!!"); return; } - bSending = TRUE; + bSending = sal_True; if ( pCommLink ) { - if ( !pCommLink->TransferDataStream( pRet->GetStream() ) ) // tritt ein Fehler auf, so wird sofort gelöscht ... + if ( !pCommLink->TransferDataStream( pRet->GetStream() ) ) // tritt ein Fehler auf, so wird sofort gel�scht ... pCommLink = NULL; } else @@ -203,11 +204,11 @@ void StatementFlow::SendViaSocket() } pRet->Reset(); - bSending = FALSE; - IsError = FALSE; + bSending = sal_False; + IsError = sal_False; } -BOOL StatementFlow::Execute() +sal_Bool StatementFlow::Execute() { #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Executing Flow: " ); @@ -221,16 +222,16 @@ BOOL StatementFlow::Execute() if ( !bUseIPC ) { - // bBool1 wurde im CTOR auf FALSE initialisiert + // bBool1 wurde im CTOR auf sal_False initialisiert if ( !bBool1 ) // also erster Durchlauf { pRemoteControl->pRetStream = pRet->GetStream(); - bBool1 = TRUE; // wurde im CTOR auf FALSE initialisiert + bBool1 = sal_True; // wurde im CTOR auf sal_False initialisiert nRetryCount = nRetryCount * 4; } if ( pRemoteControl->pRetStream && (nRetryCount--) ) // also solange nicht abgeholt { - return FALSE; // Bitte einmal vom Callstack runter + return sal_False; // Bitte einmal vom Callstack runter } } @@ -245,7 +246,7 @@ BOOL StatementFlow::Execute() if ( !bUseIPC ) { // wird oben abgehandelt pRet->Reset(); - IsError = FALSE; + IsError = sal_False; } else SendViaSocket(); @@ -268,37 +269,14 @@ BOOL StatementFlow::Execute() } delete this; - return TRUE; + return sal_True; } // neue Hilfsfunktion, die stetig erweitert werden muss -static short ImpGetRType( Window *pWin, SmartId aUId ) +static short ImpGetRType( Window *pWin ) { - ULONG nUId = aUId.GetNum(); // GetNum() is always zero if no num is defined - // GGGg gggg::gggg gggg::ggLL LLLl::llll llll - DBG_ASSERT( pWin, "missing Parameter" ); - short nRT; - if( (nUId & 0xE0000000) == 0 ) // keine auto ID - nRT = C_NoType; - else { - if( (nUId & 0x1FF) == 0 ) // globale Resource GH: soweit ich das verstanden habe 1FF - nRT = (short)(C_TabPage - 1 + (nUId >> 29)); - else - nRT = (short)((nUId & 0x00003E00) >> 9); - if ( nRT == C_TabPage ) // wegen TabDialog.UId = TabPage.UId - nRT = C_NoType; - else - { -#ifndef DBG_UTIL - return nRT; -#endif - } - } - -#ifdef DBG_UTIL - short n = nRT; -#endif + short nRT = C_NoType; WindowType eRT = pWin->GetType(); switch( eRT ) { case WINDOW_WINDOW: nRT = C_Window ; break; @@ -355,15 +333,6 @@ static short ImpGetRType( Window *pWin, SmartId aUId ) case WINDOW_DIALOG: nRT = C_Dialog; break; } -#ifdef DBG_UTIL - // Die Werte n sind bei den WindowTypen nicht mehr vergeben, werden aber in der AutoID noch verwendet - // Sie werden jetzt durch den Typ nRT implementiert. - DBG_ASSERT( n == C_NoType || n == nRT - || ( n == C_ImageButton && nRT == C_PushButton ) - || ( n == C_TriStateBox && nRT == C_CheckBox ) - || ( n == C_ImageRadioButton && nRT == C_RadioButton ) - , "error in algorithm" ); -#endif return nRT; } @@ -387,7 +356,7 @@ StatementSlot::StatementSlot( SCmdStream *pCmdIn ) { nAnzahl++; pItemArr = new SfxPoolItem*[nAnzahl]; - for (USHORT i = 0 ; i+1 < nAnzahl ; i++) + for (sal_uInt16 i = 0 ; i+1 < nAnzahl ; i++) pCmdIn->Read( pItemArr[i] ); pItemArr[nAnzahl-1] = NULL; } @@ -396,7 +365,7 @@ StatementSlot::StatementSlot( SCmdStream *pCmdIn ) { aArgs.realloc(nAnzahl); PropertyValue* pArg = aArgs.getArray(); - for (USHORT i = 0 ; i < nAnzahl ; i++) + for (sal_uInt16 i = 0 ; i < nAnzahl ; i++) pCmdIn->Read( pArg[i] ); } break; @@ -409,15 +378,15 @@ StatementSlot::StatementSlot() : nAnzahl( 0 ) , pItemArr(NULL) , nFunctionId( 0 ) -, bMenuClosed(FALSE) +, bMenuClosed(sal_False) {} -StatementSlot::StatementSlot( ULONG nSlot, SfxPoolItem* pItem ) +StatementSlot::StatementSlot( sal_uLong nSlot, SfxPoolItem* pItem ) : pItemArr(NULL) -, bMenuClosed(FALSE) +, bMenuClosed(sal_False) { QueStatement( NULL ); - nFunctionId = USHORT(nSlot); + nFunctionId = sal_uInt16(nSlot); #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Reading Slot: " ); m_pDbgWin->AddText( String::CreateFromInt32( nFunctionId ) ); @@ -440,7 +409,7 @@ StatementSlot::~StatementSlot() { if ( pItemArr ) { - for (USHORT i = 0 ; i+1 < nAnzahl ; i++) + for (sal_uInt16 i = 0 ; i+1 < nAnzahl ; i++) delete pItemArr[i]; delete[] pItemArr; } @@ -470,7 +439,7 @@ void StatementSlot::AddReferer() aArgs.realloc(nAnzahl); pArg = aArgs.getArray(); pArg[nAnzahl-1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SynchronMode" )); - pArg[nAnzahl-1].Value <<= sal_Bool( TRUE ); + pArg[nAnzahl-1].Value <<= sal_Bool( sal_True ); } class SlotStatusListener : public cppu::WeakImplHelper1< XStatusListener > @@ -484,13 +453,13 @@ public: virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); // local Members - BOOL bDisposed; - BOOL bEnabled; + sal_Bool bDisposed; + sal_Bool bEnabled; }; SlotStatusListener::SlotStatusListener() -: bDisposed( FALSE ) -, bEnabled( TRUE ) +: bDisposed( sal_False ) +, bEnabled( sal_True ) {} // XStatusListener @@ -502,10 +471,10 @@ void SAL_CALL SlotStatusListener::statusChanged( const ::com::sun::star::frame:: // XEventListener void SAL_CALL SlotStatusListener::disposing( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException) { - bDisposed = TRUE; + bDisposed = sal_True; } -BOOL StatementSlot::Execute() +sal_Bool StatementSlot::Execute() { if ( IsError ) { @@ -517,7 +486,7 @@ BOOL StatementSlot::Execute() Advance(); delete this; - return TRUE; + return sal_True; } InitProfile(); @@ -537,22 +506,22 @@ BOOL StatementSlot::Execute() if ( !bMenuClosed ) { pPopup->EndExecute(0); - aSubMenuId1 = SmartId(); - aSubMenuId2 = SmartId(); - aSubMenuId3 = SmartId(); + aSubMenuId1 = 0; + aSubMenuId2 = 0; + aSubMenuId3 = 0; pMenuWindow = NULL; - bMenuClosed = TRUE; + bMenuClosed = sal_True; #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Closed contextmenu\n" ); #endif - return FALSE; + return sal_False; } else if ( nRetryCount-- ) { #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Waiting for contextmenu to close\n" ); #endif - return FALSE; + return sal_False; } else ReportError( GEN_RES_STR0( S_MENU_NOT_CLOSING ) ); @@ -638,9 +607,9 @@ BOOL StatementSlot::Execute() ReportError( GEN_RES_STR0( S_SLOT_IN_EXECUTE ) ); else { - bIsSlotInExecute = TRUE; + bIsSlotInExecute = sal_True; xDisp->dispatch( aTargetURL, aArgs ); - bIsSlotInExecute = FALSE; + bIsSlotInExecute = sal_False; } } else @@ -661,12 +630,12 @@ BOOL StatementSlot::Execute() { case TT_PR_ERR_NODISPATCHER: { - ReportError( SmartId(nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED_NO_DISPATCHER ) ); + ReportError( rtl::OString::valueOf((sal_Int32)nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED_NO_DISPATCHER ) ); } break; case TT_PR_ERR_NOEXECUTE: { - ReportError(SmartId(nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED ) ); + ReportError( rtl::OString::valueOf((sal_Int32)nFunctionId), GEN_RES_STR0( S_SID_EXECUTE_FAILED ) ); } break; } @@ -675,14 +644,14 @@ BOOL StatementSlot::Execute() /* Neues Verfahren ab 334! - Neue Methode zum einstellen, daß Modale Dialoge immer Asynchron aufgerufen werden + Neue Methode zum einstellen, da� Modale Dialoge immer Asynchron aufgerufen werden und echter Returnwert, ob Slot geklappt hat - und Testen ob Slot überhaupt durch UI aufgerufen werden kann */ + und Testen ob Slot �berhaupt durch UI aufgerufen werden kann */ SendProfile( SlotString( nFunctionId ) ); delete this; - return TRUE; + return sal_True; } @@ -701,9 +670,8 @@ StatementUnoSlot::StatementUnoSlot(SCmdStream *pIn) } -StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId, USHORT Params, USHORT Nr1 ) +StatementCommand::StatementCommand( StatementList *pAfterThis, sal_uInt16 MethodId, sal_uInt16 Params, sal_uInt16 Nr1 ) : nMethodId( MethodId ) -, aSmartMethodId() , nParams(Params) , nNr1(Nr1) , nNr2(0) @@ -712,16 +680,15 @@ StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId, , nLNr1(0) , aString1() , aString2() -, bBool1(FALSE) -, bBool2(FALSE) +, bBool1(sal_False) +, bBool2(sal_False) { QueStatement( pAfterThis ); - aSmartMethodId = SmartId( nMethodId ); #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Directly adding Conmmand:" ); m_pDbgWin->AddText( " Methode: " ); - m_pDbgWin->AddText( aSmartMethodId.GetText() ); + m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) ); m_pDbgWin->AddText( " Params:" ); if( nParams & PARAM_USHORT_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr1 ) );} if( nParams & PARAM_USHORT_2 ) {m_pDbgWin->AddText( " n2:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );} @@ -739,7 +706,6 @@ StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId, StatementCommand::StatementCommand( SCmdStream *pCmdIn ) : nMethodId(0) -, aSmartMethodId() , nParams(0) , nNr1(0) , nNr2(0) @@ -748,12 +714,11 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn ) , nLNr1(0) , aString1() , aString2() -, bBool1(FALSE) -, bBool2(FALSE) +, bBool1(sal_False) +, bBool2(sal_False) { QueStatement( NULL ); pCmdIn->Read( nMethodId ); - aSmartMethodId = SmartId( nMethodId ); pCmdIn->Read( nParams ); if( nParams & PARAM_USHORT_1 ) pCmdIn->Read( nNr1 ); @@ -769,7 +734,7 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn ) #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Reading Conmmand:" ); m_pDbgWin->AddText( " Methode: " ); - m_pDbgWin->AddText( aSmartMethodId.GetText() ); + m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) ); m_pDbgWin->AddText( " Params:" ); if( nParams & PARAM_USHORT_1 ) {m_pDbgWin->AddText( " n1:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr1 ) );} if( nParams & PARAM_USHORT_2 ) {m_pDbgWin->AddText( " n2:" );m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );} @@ -788,14 +753,14 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn ) #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "*Deleting all Commands:\n" ); #endif - bReadingCommands = FALSE; - while ( StatementList::pFirst != this ) // Alles Löschen außer mich selbst + bReadingCommands = sal_False; + while ( StatementList::pFirst != this ) // Alles L�schen au�er mich selbst { StatementList *pDeQue = StatementList::pFirst; pDeQue->Advance(); delete pDeQue; } - bReadingCommands = TRUE; + bReadingCommands = sal_True; #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "*Done deleting all Commands:\n" ); #endif @@ -803,14 +768,14 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn ) } -void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst ) +void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Bool bFirst ) { if ( IsDialog(pBase) && !bFirst ) return; if ( bFirst ) - pRet->GenReturn ( RET_WinInfo, SmartId(), (comm_ULONG)nConf | DH_MODE_DATA_VALID, UniString(), TRUE ); + pRet->GenReturn ( RET_WinInfo, rtl::OString(), (comm_ULONG)nConf | DH_MODE_DATA_VALID, UniString(), sal_True ); if ( bFirst ) { @@ -819,9 +784,9 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst pBase = pBase->GetParent(); } - { // Klammerung, so daß der String nicht während der Rekursion bestehen bleibt + { // Klammerung, so da� der String nicht w�hrend der Rekursion bestehen bleibt String aName; - BOOL bSkip = FALSE; + sal_Bool bSkip = sal_False; switch ( pBase->GetType() ) { @@ -887,8 +852,9 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst break; default: - if ( pBase->GetSmartUniqueOrHelpId().Equals( SmartId() ) && !( nConf & DH_MODE_ALLWIN ) ) - bSkip = TRUE; + if ( ( pBase->GetUniqueOrHelpId().getLength() == 0 ) && !( nConf & DH_MODE_ALLWIN ) ) + bSkip = sal_True; + break; } if ( !bSkip ) @@ -918,19 +884,15 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst aTypeSuffix.AppendAscii( "/Unknown", 8 ); } - SmartId aId = pBase->GetSmartUniqueOrHelpId(); - if ( aId.HasString() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( aId.GetStr() ), (comm_ULONG)pBase->GetType(), - TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), FALSE ); - if ( !aId.HasString() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( aId.GetNum() ), (comm_ULONG)pBase->GetType(), - TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), FALSE ); + rtl::OString aId = pBase->GetUniqueOrHelpId(); + pRet->GenReturn ( RET_WinInfo, aId, (comm_ULONG)pBase->GetType(), + TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), sal_False ); if ( pBase->GetType() == WINDOW_TOOLBOX ) // Buttons und Controls auf Toolboxen. { ToolBox *pTB = ((ToolBox*)pBase); - USHORT i; + sal_uInt16 i; for ( i = 0; i < pTB->GetItemCount() ; i++ ) { aName = String(); @@ -944,25 +906,25 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst if ( pTB->GetItemType( i ) == TOOLBOXITEM_BUTTON && ( !pItemWin || !pItemWin->IsVisible() ) ) { if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BUTTON, - TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), FALSE ); + pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)WINDOW_BUTTON, + TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), sal_False ); if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetHelpId(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BUTTON, - TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), FALSE ); + pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BUTTON, + TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), sal_False ); } else { if ( pItemWin ) { if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)pItemWin->GetType(), - TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), FALSE ); + pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)pItemWin->GetType(), + TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), sal_False ); if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetHelpId(pTB->GetItemId( i )) ), (comm_ULONG)pItemWin->GetType(), - TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), FALSE ); - USHORT ii; + pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)pItemWin->GetType(), + TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), sal_False ); + sal_uInt16 ii; for( ii = 0 ; ii < pItemWin->GetChildCount(); ii++ ) - WriteControlData( pItemWin->GetChild(ii), nConf, FALSE ); + WriteControlData( pItemWin->GetChild(ii), nConf, sal_False ); } else { @@ -990,11 +952,11 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst OSL_TRACE( "Unknown TOOLBOXITEM %i", pTB->GetItemType( i ) ); } if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE, - aToolBoxItemType.AppendAscii(": ").Append(aName), FALSE ); + pRet->GenReturn ( RET_WinInfo, Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE, + aToolBoxItemType.AppendAscii(": ").Append(aName), sal_False ); if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( pTB->GetHelpId(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE, - aToolBoxItemType.AppendAscii(": ").Append(aName), FALSE ); + pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BASE, + aToolBoxItemType.AppendAscii(": ").Append(aName), sal_False ); } } } @@ -1012,41 +974,41 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst || pBase->GetType() == WINDOW_QUERYBOX ) { ButtonDialog *pBD = ((ButtonDialog*)pBase); - USHORT i; + sal_uInt16 i; for ( i = 0; i < pBD->GetButtonCount() ; i++ ) { aName = String(); if ( aName.Len() == 0 ) aName = pBD->GetPushButton( pBD->GetButtonId(i) )->GetText(); - String aID; + ByteString aID; switch ( pBD->GetButtonId(i) ) { case BUTTONID_OK: - aID.AssignAscii("Ok"); + aID.Assign("Ok"); break; case BUTTONID_CANCEL: - aID.AssignAscii("Cancel"); + aID.Assign("Cancel"); break; case BUTTONID_YES: - aID.AssignAscii("Yes"); + aID.Assign("Yes"); break; case BUTTONID_NO: - aID.AssignAscii("No"); + aID.Assign("No"); break; case BUTTONID_RETRY: - aID.AssignAscii("Retry"); + aID.Assign("Retry"); break; case BUTTONID_HELP: - aID.AssignAscii("Help"); + aID.Assign("Help"); break; default: - aID = UniString::CreateFromInt32( pBD->GetButtonId(i) ); + aID = ByteString::CreateFromInt32( pBD->GetButtonId(i) ); break; } - pRet->GenReturn ( RET_WinInfo, SmartId( aID ), (comm_ULONG)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // So daß der Text angezeigt wird! + pRet->GenReturn ( RET_WinInfo, aID, (comm_ULONG)pBD->GetPushButton( pBD->GetButtonId(i) )->GetType(), // So da� der Text angezeigt wird! TypeString(pBD->GetPushButton( pBD->GetButtonId(i) )->GetType()).AppendAscii(": ").Append(aName) - .AppendAscii(" ButtonId = ").Append(aID), FALSE ); + .AppendAscii(" ButtonId = ").AppendAscii( aID.GetBuffer() ), sal_False ); } return; // ButtonDialog ist hier schon komplett abgehandelt. @@ -1057,10 +1019,10 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst if ( pMenu ) // Menus { - USHORT i; + sal_uInt16 i; for ( i = 0; i < pMenu->GetItemCount() ; i++ ) { - USHORT nID = pMenu->GetItemId( i ); + sal_uInt16 nID = pMenu->GetItemId( i ); aName = String(); if ( aName.Len() == 0 ) @@ -1093,11 +1055,11 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst OSL_TRACE( "Unknown MENUITEM %i", pMenu->GetItemType( i ) ); } if ( pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( pMenu->GetItemCommand(nID) ), (comm_ULONG)0, - aMenuItemType.AppendAscii(": ").Append(aName), FALSE ); + pRet->GenReturn ( RET_WinInfo, Str2Id( pMenu->GetItemCommand(nID) ), (comm_ULONG)0, + aMenuItemType.AppendAscii(": ").Append(aName), sal_False ); if ( !pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) ) - pRet->GenReturn ( RET_WinInfo, SmartId( nID ), (comm_ULONG)0, - aMenuItemType.AppendAscii(": ").Append(aName), FALSE ); + pRet->GenReturn ( RET_WinInfo, rtl::OString::valueOf( (sal_Int32)nID ), (comm_ULONG)0, + aMenuItemType.AppendAscii(": ").Append(aName), sal_False ); } } @@ -1106,8 +1068,8 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst } } - for( USHORT i = 0 ; i < pBase->GetChildCount(); i++ ) - WriteControlData( pBase->GetChild(i), nConf, FALSE ); + for( sal_uInt16 i = 0 ; i < pBase->GetChildCount(); i++ ) + WriteControlData( pBase->GetChild(i), nConf, sal_False ); } class SysWinContainer : public WorkWindow @@ -1128,7 +1090,7 @@ SysWinContainer::SysWinContainer( ToolBox *pClient ) { pDock = new DockingWindow( this ); pClientWin->SetParent( pDock ); - pClientWin->SetFloatingMode( FALSE ); + pClientWin->SetFloatingMode( sal_False ); SetText( pClient->GetText() ); SetPosPixel( Point( 1,40 ) ); Resize(); @@ -1159,10 +1121,10 @@ void SysWinContainer::Resizing( Size& rSize ) { Size aSize; Size aBestSize; - USHORT i; - BOOL bHasValue = FALSE; - ULONG nBestValue = 0; - ULONG nThisValue; + sal_uInt16 i; + sal_Bool bHasValue = sal_False; + sal_uLong nBestValue = 0; + sal_uLong nThisValue; for ( i=1 ; i<=1 ; i++ ) { aSize = pClientWin->CalcWindowSizePixel( i ); @@ -1171,7 +1133,7 @@ void SysWinContainer::Resizing( Size& rSize ) { nBestValue = nThisValue; aBestSize = aSize; - bHasValue = TRUE; + bHasValue = sal_True; } } rSize = aBestSize; @@ -1182,15 +1144,15 @@ class DisplayHidWin : public ToolBox { Edit *pEdit; Size aMinEditSize; - USHORT nLastItemID; - BOOL bIsDraging; - BOOL bIsPermanentDraging; - void SetDraging( BOOL bNewDraging ); + sal_uInt16 nLastItemID; + sal_Bool bIsDraging; + sal_Bool bIsPermanentDraging; + void SetDraging( sal_Bool bNewDraging ); Image *pShow, *pShow2; - BOOL bConfigChanged; - void EnableButtons( ULONG nConf ); + sal_Bool bConfigChanged; + void EnableButtons( sal_uLong nConf ); - ULONG nEventHookID; + sal_uLong nEventHookID; static long stub_VCLEventHookProc( NotifyEvent& rEvt, void* pData ) { return ((DisplayHidWin*)pData)->VCLEventHook( rEvt ); @@ -1202,9 +1164,9 @@ class DisplayHidWin : public ToolBox SysWinContainer *pContainer; // aborting by pressing shist twice - BOOL bOldShift; + sal_Bool bOldShift; Time aLatest; - USHORT nShiftCount; + sal_uInt16 nShiftCount; public: DisplayHidWin(); @@ -1217,26 +1179,26 @@ public: void SetDisplayText( const String &aNewText ){ pEdit->SetText(aNewText); } String GetDisplayText() const { return pEdit->GetText(); } - BOOL IsDisplayTextModified() const { return pEdit->IsModified(); } + sal_Bool IsDisplayTextModified() const { return pEdit->IsModified(); } void ClearDisplayTextModified() const { pEdit->ClearModifyFlag(); } - void SetConfig( ULONG nConf ); - ULONG GetConfig(); + void SetConfig( sal_uLong nConf ); + sal_uLong GetConfig(); - BOOL IsConfigChanged() { return bConfigChanged; } - void ConfigSent() { bConfigChanged = FALSE; } + sal_Bool IsConfigChanged() { return bConfigChanged; } + void ConfigSent() { bConfigChanged = sal_False; } - BOOL IsSendData() { return GetItemState( TT_SEND_DATA ) == STATE_CHECK; } + sal_Bool IsSendData() { return GetItemState( TT_SEND_DATA ) == STATE_CHECK; } - BOOL IsDraging() { return bIsDraging; } + sal_Bool IsDraging() { return bIsDraging; } Window* LastMouseMoveWin() { return pLastMouseMoveWin; } }; DisplayHidWin::DisplayHidWin() : ToolBox( StatementList::GetFirstDocFrame(), TTProperties::GetSvtResId(DisplayHidToolBox) ) -, bIsDraging( FALSE ) -, bIsPermanentDraging( FALSE ) +, bIsDraging( sal_False ) +, bIsPermanentDraging( sal_False ) , pShow( NULL ) , pShow2( NULL ) , pLastMouseMoveWin( NULL ) @@ -1265,7 +1227,7 @@ DisplayHidWin::~DisplayHidWin() delete pEdit; } -void DisplayHidWin::SetDraging( BOOL bNewDraging ) +void DisplayHidWin::SetDraging( sal_Bool bNewDraging ) { if ( !pShow ) pShow = new Image( GetItemImage( TT_SHOW ) ); @@ -1280,9 +1242,9 @@ void DisplayHidWin::SetDraging( BOOL bNewDraging ) bIsDraging = bNewDraging; } -void DisplayHidWin::EnableButtons( ULONG nConf ) +void DisplayHidWin::EnableButtons( sal_uLong nConf ) { - BOOL bSend = BOOL(nConf & DH_MODE_SEND_DATA); + sal_Bool bSend = sal_Bool(nConf & DH_MODE_SEND_DATA); EnableItem( TT_ALLWIN, bSend ); EnableItem( TT_KURZNAME, bSend ); EnableItem( TT_LANGNAME, bSend ); @@ -1300,7 +1262,7 @@ void DisplayHidWin::Click() nLastItemID = GetCurItemId(); if ( nLastItemID == TT_SHOW ) { - SetDraging( TRUE ); + SetDraging( sal_True ); } ToolBox::Click(); } @@ -1312,8 +1274,8 @@ void DisplayHidWin::Select() SetItemState( GetCurItemId(), STATE_CHECK ); if ( GetCurItemId() == TT_SHOW ) { - bIsPermanentDraging = TRUE; - SetDraging( TRUE ); + bIsPermanentDraging = sal_True; + SetDraging( sal_True ); } } else @@ -1321,8 +1283,8 @@ void DisplayHidWin::Select() SetItemState( GetCurItemId(), STATE_NOCHECK ); if ( GetCurItemId() == TT_SHOW ) { - bIsPermanentDraging = FALSE; - SetDraging( FALSE ); + bIsPermanentDraging = sal_False; + SetDraging( sal_False ); } } if ( GetCurItemId() == TT_SEND_DATA ) @@ -1331,7 +1293,7 @@ void DisplayHidWin::Select() } } -void DisplayHidWin::SetConfig( ULONG nConf ) +void DisplayHidWin::SetConfig( sal_uLong nConf ) { SetItemState( TT_KURZNAME, ( nConf & DH_MODE_KURZNAME ) ? STATE_CHECK : STATE_NOCHECK ); SetItemState( TT_LANGNAME, ( nConf & DH_MODE_LANGNAME ) ? STATE_CHECK : STATE_NOCHECK ); @@ -1340,9 +1302,9 @@ void DisplayHidWin::SetConfig( ULONG nConf ) EnableButtons( nConf ); } -ULONG DisplayHidWin::GetConfig() +sal_uLong DisplayHidWin::GetConfig() { - ULONG nConf = 0; + sal_uLong nConf = 0; if ( GetItemState( TT_KURZNAME ) == STATE_CHECK ) nConf |= DH_MODE_KURZNAME; if ( GetItemState( TT_LANGNAME ) == STATE_CHECK ) @@ -1383,8 +1345,8 @@ long DisplayHidWin::VCLEventHook( NotifyEvent& rEvt ) nShiftCount++; if ( nShiftCount == 4 && aLatest > Time() ) { - bIsPermanentDraging = FALSE; - SetDraging( FALSE ); + bIsPermanentDraging = sal_False; + SetDraging( sal_False ); SetItemState( TT_SHOW, STATE_NOCHECK ); } } @@ -1392,23 +1354,23 @@ long DisplayHidWin::VCLEventHook( NotifyEvent& rEvt ) } if ( ( ( EVENT_MOUSEBUTTONUP == rEvt.GetType() && rEvt.GetMouseEvent()->GetButtons() == MOUSE_LEFT) || ( EVENT_MOUSEMOVE == rEvt.GetType() && !rEvt.GetMouseEvent()->GetButtons() ) ) && IsDraging() && !bIsPermanentDraging ) - SetDraging( FALSE ); + SetDraging( sal_False ); return 0; } -BOOL StatementCommand::DisplayHID() +sal_Bool StatementCommand::DisplayHID() { - // Return TRUE -> reexecute command + // Return sal_True -> reexecute command - if ( !bBool2 ) // Wird auf FALSE initialisiert + if ( !bBool2 ) // Wird auf sal_False initialisiert { - bBool2 = TRUE; // Wir sind initialisiert. + bBool2 = sal_True; // Wir sind initialisiert. GetTTSettings()->pDisplayInstance = this; // Und haben die Macht (Alle anderen beenden sich) if ( !(nParams & PARAM_ULONG_1) ) { - if( GetTTSettings()->pDisplayHidWin ) // Nichts verändern + if( GetTTSettings()->pDisplayHidWin ) // Nichts ver�ndern nLNr1 = GetTTSettings()->pDisplayHidWin->GetConfig(); else // Beim ersten Aufruf wollen wir alles richtig einstellen nLNr1 = DH_MODE_KURZNAME | DH_MODE_LANGNAME; @@ -1426,7 +1388,7 @@ BOOL StatementCommand::DisplayHID() if ( GetTTSettings()->pDisplayInstance && GetTTSettings()->pDisplayInstance != this ) { DBG_WARNING("Mehrere DisplayHID am laufen"); - return FALSE; // Noch eine andere Instanz macht das gleiche! + return sal_False; // Noch eine andere Instanz macht das gleiche! } if ( !GetTTSettings()->pDisplayHidWin ) @@ -1444,8 +1406,8 @@ BOOL StatementCommand::DisplayHID() } else { - GetTTSettings()->pDisplayHidWin->GetWindow( WINDOW_OVERLAP )->Enable( TRUE, TRUE ); - GetTTSettings()->pDisplayHidWin->GetWindow( WINDOW_OVERLAP )->EnableInput( TRUE, TRUE ); + GetTTSettings()->pDisplayHidWin->GetWindow( WINDOW_OVERLAP )->Enable( sal_True, sal_True ); + GetTTSettings()->pDisplayHidWin->GetWindow( WINDOW_OVERLAP )->EnableInput( sal_True, sal_True ); } @@ -1465,8 +1427,8 @@ BOOL StatementCommand::DisplayHID() RasterOp aROp = WinPtr->GetRasterOp(); \ WinPtr->SetRasterOp( ROP_XOR ); \ Size aSz = WinPtr->PixelToLogic( WinPtr->GetSizePixel() );\ - ULONG nMaxCornerRadius = WinPtr->PixelToLogic( Point( 80, 0 ) ).X();\ - ULONG iCorner = std::max ((ULONG) 8, (ULONG) std::min( nMaxCornerRadius, (ULONG) std::min((ULONG) (aSz.Width() / 6), (ULONG)(aSz.Height() / 6))));\ + sal_uLong nMaxCornerRadius = WinPtr->PixelToLogic( Point( 80, 0 ) ).X();\ + sal_uLong iCorner = std::max ((sal_uLong) 8, (sal_uLong) std::min( nMaxCornerRadius, (sal_uLong) std::min((sal_uLong) (aSz.Width() / 6), (sal_uLong)(aSz.Height() / 6))));\ WinPtr->DrawRect(Rectangle(Point(),aSz), iCorner, iCorner);\ WinPtr->SetLineColor( aLineColMem ); \ WinPtr->SetFillColor( aFillColMem ); \ @@ -1508,10 +1470,10 @@ BOOL StatementCommand::DisplayHID() if ( GetTTSettings()->Act ) { SET_WIN(GetTTSettings()->Act); - GetTTSettings()->pDisplayHidWin->SetDisplayText(GetTTSettings()->Act->GetSmartUniqueOrHelpId().GetText().AppendAscii(" WinType: ") + GetTTSettings()->pDisplayHidWin->SetDisplayText( Id2Str(GetTTSettings()->Act->GetUniqueOrHelpId()).AppendAscii(" WinType: ") .Append(UniString::CreateFromInt64(GetTTSettings()->Act->GetType())).AppendAscii(" ").Append(GetTTSettings()->Act->GetText())); - if ( GetTTSettings()->Act && !GetTTSettings()->Act->GetSmartUniqueId().Equals( GetTTSettings()->Act->GetSmartHelpId() ) ) - GetTTSettings()->pDisplayHidWin->SetText(UniString( TTProperties::GetSvtResId( TT_ALTERNATE_CAPTION ) ).Append(GetTTSettings()->Act->GetSmartHelpId().GetText())); + if ( GetTTSettings()->Act && !GetTTSettings()->Act->GetUniqueId().equals( GetTTSettings()->Act->GetHelpId() ) ) + GetTTSettings()->pDisplayHidWin->SetText(UniString( TTProperties::GetSvtResId( TT_ALTERNATE_CAPTION ) ).AppendAscii(GetTTSettings()->Act->GetHelpId().getStr())); else GetTTSettings()->pDisplayHidWin->SetText( GetTTSettings()->aOriginalCaption ); } @@ -1520,9 +1482,10 @@ BOOL StatementCommand::DisplayHID() } else if ( GetTTSettings()->Act ) { - if ( GetTTSettings()->pDisplayHidWin->IsDisplayTextModified() && GetTTSettings()->pDisplayHidWin->GetDisplayText().Len() > 0 ) + // allow setting a HelpID manually (just enter the ID in the displayHID Window and terminate it by | + if ( GetTTSettings()->pDisplayHidWin->IsDisplayTextModified() && GetTTSettings()->pDisplayHidWin->GetDisplayText().GetTokenCount( '|' ) > 1 ) { - GetTTSettings()->Act->SetSmartUniqueId( SmartId( GetTTSettings()->pDisplayHidWin->GetDisplayText().ToInt32() ) ); + GetTTSettings()->Act->SetUniqueId( Str2Id( GetTTSettings()->pDisplayHidWin->GetDisplayText().GetToken( '|' ) ) ); GetTTSettings()->pDisplayHidWin->ClearDisplayTextModified(); } } @@ -1530,7 +1493,7 @@ BOOL StatementCommand::DisplayHID() if ( GetTTSettings()->pDisplayHidWin->IsSendData() && GetTTSettings()->Act ) { if ( !StatementFlow::bSending ) - { // Normalerweise syncronisierung über Protokoll. Hier ist das aber asyncron!!! + { // Normalerweise syncronisierung �ber Protokoll. Hier ist das aber asyncron!!! WriteControlData( GetTTSettings()->Act, GetTTSettings()->pDisplayHidWin->GetConfig() ); new StatementFlow( this, F_EndCommandBlock ); // Kommando zum Senden erzeugen und in que eintragen } @@ -1546,7 +1509,7 @@ BOOL StatementCommand::DisplayHID() } if ( pFirst == this ) // Sollte immer so sein, aber besser isses - if ( pNext ) // Befehle warten auf Ausführung + if ( pNext ) // Befehle warten auf Ausf�hrung { // An Ende neu einsortieren Advance(); QueStatement( NULL ); @@ -1587,15 +1550,15 @@ private: Window *Old; Window *Act; Window *pTranslateWin; - BOOL bSelecting; + sal_Bool bSelecting; - BOOL bAvailable; - BOOL bNext; + sal_Bool bAvailable; + sal_Bool bNext; - BOOL TestChangedDataSaved(); + sal_Bool TestChangedDataSaved(); - ULONG nEventHookID; + sal_uLong nEventHookID; static long stub_VCLEventHookProc( NotifyEvent& rEvt, void* pData ) { return ((TranslateWin*)pData)->VCLEventHook( rEvt ); @@ -1607,11 +1570,11 @@ public: TranslateWin(); ~TranslateWin(); - static String MarkShortcutErrors( Window* pBase, BOOL bMark ); + static String MarkShortcutErrors( Window* pBase, sal_Bool bMark ); - BOOL IsTranslationAvailable(){ return bAvailable; } - BOOL IsNextDialog(){ return bNext; } - void ResetNextDialog(){ bNext = FALSE; } + sal_Bool IsTranslationAvailable(){ return bAvailable; } + sal_Bool IsNextDialog(){ return bNext; } + void ResetNextDialog(){ bNext = sal_False; } Window* GetTranslationWindow(){ return pTranslateWin; } String GetOriginalText(){ return FixedTextTT_FT_OLD.GetText(); } @@ -1635,9 +1598,9 @@ TranslateWin::TranslateWin() , Old( NULL ) , Act( NULL ) , pTranslateWin( NULL ) -, bSelecting( FALSE ) -, bAvailable( FALSE ) -, bNext( FALSE ) +, bSelecting( sal_False ) +, bAvailable( sal_False ) +, bNext( sal_False ) { FreeResource(); PushButtonTT_PB_NEXT.SetClickHdl( LINK( this, TranslateWin, DoNext ) ); @@ -1656,7 +1619,7 @@ TranslateWin::~TranslateWin() Application::RemoveEventHook( nEventHookID ); } -BOOL TranslateWin::TestChangedDataSaved() +sal_Bool TranslateWin::TestChangedDataSaved() { if ( ( EditTT_E_NEW.GetText().CompareTo( FixedTextTT_FT_OLD.GetText() ) != COMPARE_EQUAL || EditTT_E_COMMENT.GetText().Len() ) @@ -1665,7 +1628,7 @@ BOOL TranslateWin::TestChangedDataSaved() return MessBox( this, TTProperties::GetSvtResId( TT_DISCARD_CHANGED_DATA ) ).Execute() == RET_YES; } else - return TRUE; + return sal_True; } IMPL_LINK( TranslateWin, DoAccept, PushButton*, EMPTYARG ) @@ -1676,7 +1639,7 @@ IMPL_LINK( TranslateWin, DoAccept, PushButton*, EMPTYARG ) EditTT_E_NEW.Disable(); EditTT_E_COMMENT.Disable(); PushButtonTT_PB_ACCEPT.Disable(); - bAvailable = TRUE; + bAvailable = sal_True; return 0; } @@ -1690,7 +1653,7 @@ IMPL_LINK( TranslateWin, DoNext, PushButton*, EMPTYARG ) EditTT_E_NEW.Disable(); EditTT_E_COMMENT.Disable(); PushButtonTT_PB_ACCEPT.Disable(); - bNext = TRUE; + bNext = sal_True; } return 0; } @@ -1699,14 +1662,14 @@ IMPL_LINK( TranslateWin, DoSelect, PushButton*, EMPTYARG ) { if ( bSelecting ) { - bSelecting = FALSE; + bSelecting = sal_False; } else { if ( TestChangedDataSaved() ) { PushButtonTT_PB_RESTORE.Disable(); - bSelecting = TRUE; + bSelecting = sal_True; } } return 0; @@ -1723,7 +1686,7 @@ IMPL_LINK( TranslateWin, DoRestore, PushButton*, EMPTYARG ) sTT_E_NEW.SearchAndReplaceAll( CUniString("\\t"), CUniString("\t") ); if ( StatementList::WinPtrValid( pTranslateWin ) && pTranslateWin->GetText().CompareTo( sTT_E_NEW ) == COMPARE_EQUAL ) - { // Im ersten schritt nur in der UI zurück + { // Im ersten schritt nur in der UI zur�ck pTranslateWin->SetText( sTT_E_OLD ); } else @@ -1732,7 +1695,7 @@ IMPL_LINK( TranslateWin, DoRestore, PushButton*, EMPTYARG ) PushButtonTT_PB_RESTORE.Disable(); } if ( StatementList::WinPtrValid( pTranslateWin ) ) - MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), TRUE ); + MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), sal_True ); return 0; } @@ -1756,7 +1719,7 @@ IMPL_LINK( TranslateWin, ShowInplace, Timer*, EMPTYARG ) sTT_E_NEW.SearchAndReplaceAll( CUniString("\\t"), CUniString("\t") ); pTranslateWin->SetText( sTT_E_NEW ); - MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), TRUE ); + MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), sal_True ); } return 0; } @@ -1774,7 +1737,7 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt ) if ( Act ) { Window *pWin = Act; - USHORT i; + sal_uInt16 i; for ( i = 0 ; i < Act->GetChildCount() ; i++ ) { pWin = Act->GetChild(i); @@ -1832,7 +1795,7 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt ) pTranslateWin = Act; if ( pTranslateWin ) { - MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), TRUE ); + MarkShortcutErrors( pTranslateWin->GetWindow( WINDOW_OVERLAP ), sal_True ); // alle CRs quoten (NF) String sTT_E_NEW( pTranslateWin->GetText()); sTT_E_NEW.SearchAndReplaceAll( CUniString("\n"), CUniString("\\n") ); @@ -1847,7 +1810,7 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt ) EditTT_E_COMMENT.Enable(); PushButtonTT_PB_ACCEPT.Enable(); } - bSelecting = FALSE; + bSelecting = sal_False; } } @@ -1861,11 +1824,11 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt ) class FindShortcutErrors: public Search { String aShortcuts,aDoubleShortcuts; - USHORT nAction; + sal_uInt16 nAction; public: FindShortcutErrors(); - virtual BOOL IsWinOK( Window *pWin ); - void SetAction( USHORT nA ); + virtual sal_Bool IsWinOK( Window *pWin ); + void SetAction( sal_uInt16 nA ); String GetDoubleShortcuts() { return aDoubleShortcuts; } }; @@ -1875,7 +1838,7 @@ FindShortcutErrors::FindShortcutErrors() SetAction( FDS_ACTION_COLLECT ); // Wir fange immer mit sammeln an, ODER?? } -void FindShortcutErrors::SetAction( USHORT nA ) +void FindShortcutErrors::SetAction( sal_uInt16 nA ) { nAction = nA; if ( FDS_ACTION_COLLECT == nAction ) @@ -1885,14 +1848,14 @@ void FindShortcutErrors::SetAction( USHORT nA ) } } -BOOL FindShortcutErrors::IsWinOK( Window *pWin ) +sal_Bool FindShortcutErrors::IsWinOK( Window *pWin ) { if ( pWin->IsReallyVisible() ) { String aText = pWin->GetText(); xub_StrLen nPos = aText.Search('~'); String aShortcut; - BOOL bHasAccel = FALSE; + sal_Bool bHasAccel = sal_False; if ( nPos != STRING_NOTFOUND ) { aShortcut = aText.Copy( nPos+1, 1 ); @@ -1912,7 +1875,7 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin ) break; case FDS_ACTION_MARK: { - BOOL bMissing = FALSE; + sal_Bool bMissing = sal_False; if ( !bHasAccel && aText.Len() ) // should there be an accelarator defined { @@ -1926,7 +1889,7 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin ) (pChild->GetType() == WINDOW_PUSHBUTTON) ) { if ( !pChild->GetText().EqualsAscii( "..." ) ) - bMissing = TRUE; + bMissing = sal_True; } if ( pChild->GetType() == WINDOW_FIXEDTEXT ) @@ -1956,7 +1919,7 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin ) (pTempChild->GetType() == WINDOW_DATEBOX) || (pTempChild->GetType() == WINDOW_TIMEBOX) ) { - bMissing = TRUE; + bMissing = sal_True; } } } @@ -2004,22 +1967,22 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin ) pWin->SetControlBackground(); } - return FALSE; + return sal_False; } -String TranslateWin::MarkShortcutErrors( Window* pBase, BOOL bMark ) +String TranslateWin::MarkShortcutErrors( Window* pBase, sal_Bool bMark ) { if ( pBase ) { FindShortcutErrors aFinder; if ( bMark ) { - StatementList::SearchAllWin( pBase, aFinder, TRUE ); // collect Shortcuts first + StatementList::SearchAllWin( pBase, aFinder, sal_True ); // collect Shortcuts first aFinder.SetAction( FDS_ACTION_MARK ); } else aFinder.SetAction( FDS_ACTION_UNMARK ); - StatementList::SearchAllWin( pBase, aFinder, TRUE ); + StatementList::SearchAllWin( pBase, aFinder, sal_True ); return aFinder.GetDoubleShortcuts(); } return UniString(); @@ -2029,40 +1992,40 @@ void TranslateWin::EnableTranslation() { PushButtonTT_PB_SELECT.Enable(); PushButtonTT_PB_NEXT.Enable(); - bAvailable = FALSE; - bNext = FALSE; + bAvailable = sal_False; + bNext = sal_False; } void StatementCommand::Translate() { // Es wurde eine initale UniqueId mitgegeben. Dann nur die dopelten Shortcuts liefern - if( (nParams & PARAM_ULONG_1) && nLNr1 ) + if( (nParams & PARAM_STR_1) && nLNr1 ) { String aDouble; - Window *pWin = SearchTree( SmartId( nLNr1 ) ,FALSE ); + Window *pWin = SearchTree( Str2Id( aString1 ) ,sal_False ); if ( pWin ) { pWin = pWin->GetWindow( WINDOW_OVERLAP ); - aDouble = TranslateWin::MarkShortcutErrors( pWin, TRUE ); + aDouble = TranslateWin::MarkShortcutErrors( pWin, sal_True ); } - pRet->GenReturn ( RET_Value, aSmartMethodId, aDouble ); + pRet->GenReturn ( RET_Value, nMethodId, aDouble ); return; } if ( !GetTTSettings()->pTranslateWin ) { GetTTSettings()->pTranslateWin = new TranslateWin; - GetTTSettings()->bToTop = TRUE; + GetTTSettings()->bToTop = sal_True; } GetTTSettings()->pTranslateWin->Show(); if ( GetTTSettings()->bToTop ) { GetTTSettings()->pTranslateWin->ToTop(); - GetTTSettings()->bToTop = FALSE; + GetTTSettings()->bToTop = sal_False; } - GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->EnableInput( TRUE, TRUE ); + GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->EnableInput( sal_True, sal_True ); if ( GetTTSettings()->pTranslateWin->IsTranslationAvailable() ) { @@ -2076,15 +2039,15 @@ void StatementCommand::Translate() if ( pTranslationWindow->GetType() == WINDOW_BORDERWINDOW && pTranslationWindow->GetWindow( WINDOW_CLIENT ) ) { Window* pNew = pTranslationWindow->GetWindow( WINDOW_CLIENT ); - // Bei Dockingwindoes das kanze Geraffel von Docking Floating überspringen - while ( IsDialog( pNew ) && !pNew->GetSmartUniqueOrHelpId().HasAny() && pNew->GetChildCount() == 1 ) + // Bei Dockingwindoes das kanze Geraffel von Docking Floating �berspringen + while ( IsDialog( pNew ) && !pNew->GetUniqueOrHelpId().getLength() && pNew->GetChildCount() == 1 ) pNew = pNew->GetChild( 0 ); pTranslationWindow = pNew; } aTranslation = CUniString("0;"); - aTranslation += pTranslationWindow->GetSmartUniqueOrHelpId().GetText(); + aTranslation += Id2Str( pTranslationWindow->GetUniqueOrHelpId() ); aTranslation += ';'; aTranslation += TypeString( pTranslationWindow->GetType() ); @@ -2098,7 +2061,7 @@ void StatementCommand::Translate() if ( pParentDialog ) { - aTranslation += pParentDialog->GetSmartUniqueOrHelpId().GetText(); + aTranslation += Id2Str(pParentDialog->GetUniqueOrHelpId()); aTranslation += ';'; aTranslation += TypeString( pParentDialog->GetType() ); } @@ -2127,37 +2090,37 @@ void StatementCommand::Translate() // alle TABSs quoten () aTranslation.SearchAndReplaceAll( CUniString("\t"), CUniString("\\t") ); - pRet->GenReturn ( RET_Value, aSmartMethodId, aTranslation ); + pRet->GenReturn ( RET_Value, nMethodId, aTranslation ); GetTTSettings()->pTranslateWin->EnableTranslation(); - GetTTSettings()->bToTop = TRUE; + GetTTSettings()->bToTop = sal_True; } else { - pRet->GenReturn ( RET_Value, aSmartMethodId, String() ); + pRet->GenReturn ( RET_Value, nMethodId, String() ); GetTTSettings()->pTranslateWin->EnableTranslation(); ErrorBox err( GetTTSettings()->pTranslateWin, TTProperties::GetSvtResId( TT_NO_CONTROL )); err.Execute(); - GetTTSettings()->bToTop = TRUE; + GetTTSettings()->bToTop = sal_True; } } else if ( GetTTSettings()->pTranslateWin->IsNextDialog() ) { - pRet->GenReturn ( RET_Value, aSmartMethodId, CUniString("1") ); + pRet->GenReturn ( RET_Value, nMethodId, CUniString("1") ); GetTTSettings()->pTranslateWin->ResetNextDialog(); GetTTSettings()->pTranslateWin->LoseFocus(); - GetTTSettings()->bToTop = TRUE; + GetTTSettings()->bToTop = sal_True; } else { GetTTSettings()->pTranslateWin->EnableTranslation(); - pRet->GenReturn ( RET_Value, aSmartMethodId, String() ); + pRet->GenReturn ( RET_Value, nMethodId, String() ); } } Window* StatementCommand::GetNextOverlap( Window* pBase ) -{ // Findet irgendwelche Overlap-Fenster, die schließbar aussehen - // Eventuell muß noch die Auswahl verfeinert werden. +{ // Findet irgendwelche Overlap-Fenster, die schlie�bar aussehen + // Eventuell mu� noch die Auswahl verfeinert werden. if ( pBase->GetType() != WINDOW_BORDERWINDOW ) pBase = pBase->GetWindow( WINDOW_OVERLAP ); @@ -2190,7 +2153,7 @@ Window* StatementCommand::GetNextOverlap( Window* pBase ) Window* StatementCommand::GetNextRecoverWin() { - // über die TopLevelWindows der App iterieren + // �ber die TopLevelWindows der App iterieren Window* pBase = Application::GetFirstTopLevelWindow(); Window *pControl = NULL; Window* pMyFirstDocFrame = NULL; @@ -2212,7 +2175,7 @@ Window* StatementCommand::GetNextRecoverWin() } // dann das Fenster selbst Schliessen - // erstes DocWin überspringen + // erstes DocWin �berspringen // Assumption that Doc Windows are Borderwindows and ButtonDialog and such are not if ( pBase->IsVisible() && !IsFirstDocFrame( pBase ) && pBase->GetType() != WINDOW_BORDERWINDOW && !IsIMEWin( pBase ) ) return pBase; @@ -2232,25 +2195,25 @@ Window* StatementCommand::GetNextRecoverWin() return NULL; } -BOOL StatementCommand::Execute() +sal_Bool StatementCommand::Execute() { if ( IsError ) { #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Skipping Command: " ); - m_pDbgWin->AddText( aSmartMethodId.GetText() ); + m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) ); m_pDbgWin->AddText( "\n" ); #endif Advance(); delete this; - return TRUE; + return sal_True; } InitProfile(); #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "Executing Command: " ); - m_pDbgWin->AddText( aSmartMethodId.GetText() ); + m_pDbgWin->AddText( String::CreateFromInt32( nMethodId ) ); m_pDbgWin->AddText( "\n" ); #endif @@ -2261,7 +2224,7 @@ BOOL StatementCommand::Execute() #if OSL_DEBUG_LEVEL > 1 #define REPORT_WIN_CLOSED(pControl, aInfo) \ _REPORT_WIN_CLOSED(pControl, aInfo) \ - m_pDbgWin->AddText( aInfo.AppendAscii(" \"").Append( pControl->GetText() ).AppendAscii("\" geschlossen, RType = ").Append( TypeString(pControl->GetType()) ).AppendAscii(", UId = ").Append( UIdString(pControl->GetSmartUniqueOrHelpId()) ) ); + m_pDbgWin->AddText( aInfo.AppendAscii(" \"").Append( pControl->GetText() ).AppendAscii("\" geschlossen, RType = ").Append( TypeString(pControl->GetType()) ).AppendAscii(", UId = ").Append( UIdString( pControl->GetUniqueOrHelpId() ) ) ); #else #define REPORT_WIN_CLOSED(pControl, aInfo) _REPORT_WIN_CLOSED(pControl, aInfo) #endif @@ -2278,7 +2241,7 @@ BOOL StatementCommand::Execute() aString1.AppendAscii("\" geschlossen, RType = ");\ aString1 += TypeString(pControl->GetType()); \ aString1.AppendAscii(", UId = "); \ - aString1 += UIdString(pControl->GetSmartUniqueOrHelpId()); + aString1 += UIdString(pControl->GetUniqueOrHelpId()); switch ( nMethodId ) @@ -2287,33 +2250,33 @@ BOOL StatementCommand::Execute() if ( !bBool1 ) { nLNr1 = Time().GetTime() + nNr1/10; - bBool1 = TRUE; + bBool1 = sal_True; } if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit - return FALSE; + return sal_False; break; case RC_DisplayHid: if ( DisplayHID() ) - return FALSE; + return sal_False; break; case RC_ResetApplication: { if ( !bBool1 ) { nRetryCount = 150; // das sollte reichen. - bBool1 = TRUE; // Nur beim ersten mal! + bBool1 = sal_True; // Nur beim ersten mal! nNr1 = 1; // Welcher Button ist dran? nLNr1 = 0; // Speichern des AppWin aString1 = UniString(); // Liste der geschlossenen Fenster - // So daß nacher auch wieder alles auf Default steht + // So da� nacher auch wieder alles auf Default steht nUseBindings = 0; - bCatchGPF = TRUE; - bUsePostEvents = TRUE; + bCatchGPF = sal_True; + bUsePostEvents = sal_True; - aSubMenuId1 = SmartId(); - aSubMenuId2 = SmartId(); - aSubMenuId3 = SmartId(); + aSubMenuId1 = 0; + aSubMenuId2 = 0; + aSubMenuId3 = 0; pMenuWindow = NULL; } if ( !nRetryCount ) @@ -2323,7 +2286,7 @@ BOOL StatementCommand::Execute() if ( pControl ) { - bBool2 = FALSE; // flag for wait when all windows are closed + bBool2 = sal_False; // flag for wait when all windows are closed pControl->GrabFocus(); if ( pControl->GetType() != WINDOW_DOCKINGWINDOW @@ -2334,12 +2297,12 @@ BOOL StatementCommand::Execute() && pControl->GetType() != WINDOW_BORDERWINDOW && nRetryCount-- ) { - short nRT = ImpGetRType( pControl, pControl->GetSmartUniqueOrHelpId() ); + short nRT = ImpGetRType( pControl ); if ( nRT == C_TabControl && pControl->GET_REAL_PARENT() && pControl->GET_REAL_PARENT()->GetType() == WINDOW_TABDIALOG ) - { // Bei Tabcontrol den zugehörigen Tabdialog nehmen + { // Bei Tabcontrol den zugeh�rigen Tabdialog nehmen pControl = pControl->GET_REAL_PARENT(); - nRT = ImpGetRType( pControl, pControl->GetSmartUniqueOrHelpId() ); + nRT = ImpGetRType( pControl ); } switch( nRT ) @@ -2404,7 +2367,7 @@ BOOL StatementCommand::Execute() break; default: { - USHORT nID = pBD->GetButtonId( nNr1-10 ); + sal_uInt16 nID = pBD->GetButtonId( nNr1-10 ); if ( nID != BUTTONID_HELP ) { REPORT_WIN_CLOSED(pControl, CUniString("Message Box (").Append( UniString::CreateFromInt32(nID) ).AppendAscii(")")); @@ -2425,7 +2388,7 @@ BOOL StatementCommand::Execute() #endif break; } - return FALSE; + return sal_False; } else { @@ -2437,12 +2400,12 @@ BOOL StatementCommand::Execute() SET_WINP_CLOSING(pControl); ((DockingWindow*)pControl)->Close(); - // Eigentlich nur bei TaskWindows! Hoffen wir mal, daß keine anderen DockingWindows dazwischen hauen. + // Eigentlich nur bei TaskWindows! Hoffen wir mal, da� keine anderen DockingWindows dazwischen hauen. if ( (Window*)nLNr1 != pControl ) - nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen - nLNr1 = (ULONG)pControl; + nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en + nLNr1 = (sal_uLong)pControl; - return FALSE; + return sal_False; } } if ( nRetryCount-- @@ -2469,10 +2432,10 @@ BOOL StatementCommand::Execute() // nur bei TaskWindows! if ( (Window*)nLNr1 != pControl ) - nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen - nLNr1 = (ULONG)pControl; + nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en + nLNr1 = (sal_uLong)pControl; - return FALSE; + return sal_False; } } } @@ -2486,10 +2449,10 @@ BOOL StatementCommand::Execute() // Eigentlich nur bei TaskWindows! if ( (Window*)nLNr1 != pControl ) - nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen - nLNr1 = (ULONG)pControl; + nNr1 = 1; // Zum durchprobieren der Buttons beim Schlie�en + nLNr1 = (sal_uLong)pControl; - return FALSE; + return sal_False; } } } @@ -2499,12 +2462,12 @@ BOOL StatementCommand::Execute() if ( !bBool2 ) { nLNr1 = Time().GetTime() + 100; // 100 = 1 Second - bBool2 = TRUE; + bBool2 = sal_True; } if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit - return FALSE; + return sal_False; else - pRet->GenReturn ( RET_Value, aSmartMethodId, aString1); + pRet->GenReturn ( RET_Value, nMethodId, aString1); } break; case RC_WaitSlot: @@ -2514,16 +2477,16 @@ BOOL StatementCommand::Execute() if ( !bBool1 ) { nLNr1 = Time().GetTime() + nNr1/10; - bBool1 = TRUE; + bBool1 = sal_True; } if ( !bIsSlotInExecute ) - pRet->GenReturn ( RET_Value, aSmartMethodId, comm_USHORT(CONST_WSFinished) ); + pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSFinished) ); else { if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit - return FALSE; - pRet->GenReturn ( RET_Value, aSmartMethodId, comm_USHORT(CONST_WSTimeout) ); + return sal_False; + pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSTimeout) ); } } break; @@ -2540,11 +2503,11 @@ BOOL StatementCommand::Execute() case RC_ResetApplication: case RC_WaitSlot: - case RC_AppAbort: // Sofortiges Löschen aller Befehle + case RC_AppAbort: // Sofortiges L�schen aller Befehle break; case RC_Assert: { - ByteString aAssertion( "Diese Assertion wurde vom Testtool per Befehl ausgelöst" ); + ByteString aAssertion( "Diese Assertion wurde vom Testtool per Befehl ausgel�st" ); aAssertion = ByteString( String( aAssertion, RTL_TEXTENCODING_MS_1252 ), RTL_TEXTENCODING_UTF8 ); DBG_ASSERT( !aString1.Len(), ByteString( aString1, RTL_TEXTENCODING_UTF8 ).GetBuffer() ); DBG_ASSERT( aString1.Len(), aAssertion.GetBuffer() ); @@ -2571,32 +2534,32 @@ BOOL StatementCommand::Execute() break; case RC_ApplicationBusy: { - BOOL bWait = FALSE; + sal_Bool bWait = sal_False; ReportError( GEN_RES_STR0( S_NO_ACTIVE_WINDOW ) ); - pRet->GenReturn ( RET_Value, aSmartMethodId, bWait ); + pRet->GenReturn ( RET_Value, nMethodId, bWait ); break; } case RC_GetClipboard: { ::rtl::OUString aTemp; ::svt::OStringTransfer::PasteString( aTemp, GetFirstDocFrame() ); - pRet->GenReturn ( RET_Value, aSmartMethodId, String( aTemp ) ); + pRet->GenReturn ( RET_Value, nMethodId, String( aTemp ) ); } break; case RC_SetClipboard: ::svt::OStringTransfer::CopyString(aString1,GetFirstDocFrame()); break; case RC_WinTree: - pRet->GenReturn ( RET_Value, aSmartMethodId, Tree( NULL, 0)); + pRet->GenReturn ( RET_Value, nMethodId, Tree( NULL, 0)); break; #if OSL_DEBUG_LEVEL > 1 case RC_NoDebug: - m_pDbgWin->bQuiet = TRUE; + m_pDbgWin->bQuiet = sal_True; m_pDbgWin->Hide(); m_pDbgWin->Clear(); break; case RC_Debug: - m_pDbgWin->bQuiet = FALSE; + m_pDbgWin->bQuiet = sal_False; m_pDbgWin->Show(); break; #endif @@ -2611,7 +2574,9 @@ BOOL StatementCommand::Execute() else if ( !IsDialog(pWin) ) ReportError( GEN_RES_STR0( S_NO_DIALOG_IN_GETACTIVE ) ); else - pRet->GenReturn( RET_Value, aSmartMethodId, static_cast<comm_ULONG>(pWin->GetSmartUniqueOrHelpId().GetNum())); //GetNum() ULONG != comm_ULONG on 64bit + { + pRet->GenReturn( RET_Value, nMethodId, Id2Str(pWin->GetUniqueOrHelpId()) ); + } } break; case RC_UseBindings: @@ -2623,10 +2588,10 @@ BOOL StatementCommand::Execute() case RC_Profile: // Bei folgenden Parametern passiert folgendes: // ein boolean=false Alles Profiling stoppen (Ergebnisse liefern) - // ein boolean=true, 1-4 ints Einteilung der Zeiten in Kästchen + // ein boolean=true, 1-4 ints Einteilung der Zeiten in K�stchen // kein! boolean keine ints loggen jeden Befehls // kein! boolean 1 int loggen alle int Millisekunden - // ein String wird in das Logfile übernommen(sonst passiert nichts) + // ein String wird in das Logfile �bernommen(sonst passiert nichts) if( !(nParams & PARAM_BOOL_1) || bBool1 ) { if ( !pProfiler ) @@ -2643,8 +2608,8 @@ BOOL StatementCommand::Execute() } pProfiler->StartAutoProfiling( nNr1 ); - // Der Header ist abhängig vom Modus - pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetProfileHeader() ); + // Der Header ist abh�ngig vom Modus + pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() ); } else if ( nParams & PARAM_USHORT_1 ) { // Partitioning initialisieren: Profile true [,nNr][,nNr][,nNr][,nNr] @@ -2654,35 +2619,35 @@ BOOL StatementCommand::Execute() if ( nParams & PARAM_USHORT_3 ) { nAnzahl++; }; if ( nParams & PARAM_USHORT_4 ) { nAnzahl++; }; - // Hier werden die Parameter ans Testtool zurück übertragen. - // Das ist zwar etwas eigenartig, aber ansonsten müsste man im Testtool + // Hier werden die Parameter ans Testtool zur�ck �bertragen. + // Das ist zwar etwas eigenartig, aber ansonsten m�sste man im Testtool // die einfache Struktur der Remotebefehle aufbrechen. - pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileReset ), nAnzahl ); + pRet->GenReturn( RET_ProfileInfo, S_ProfileReset, nAnzahl ); // Und die einzelnen Grenzen - if ( nParams & PARAM_USHORT_1 ) { pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileBorder1 ), (comm_ULONG)nNr1 ); }; - if ( nParams & PARAM_USHORT_2 ) { pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileBorder2 ), (comm_ULONG)nNr2 ); }; - if ( nParams & PARAM_USHORT_3 ) { pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileBorder3 ), (comm_ULONG)nNr3 ); }; - if ( nParams & PARAM_USHORT_4 ) { pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileBorder4 ), (comm_ULONG)nNr4 ); }; + if ( nParams & PARAM_USHORT_1 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder1, (comm_ULONG)nNr1 ); }; + if ( nParams & PARAM_USHORT_2 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder2, (comm_ULONG)nNr2 ); }; + if ( nParams & PARAM_USHORT_3 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder3, (comm_ULONG)nNr3 ); }; + if ( nParams & PARAM_USHORT_4 ) { pRet->GenReturn( RET_ProfileInfo, S_ProfileBorder4, (comm_ULONG)nNr4 ); }; pProfiler->StartPartitioning(); } else if( nParams == PARAM_STR_1 ) // Genau ein String! { // Nur einen String ins Profiling aufnehmen aString1 += '\n'; - pRet->GenReturn( RET_ProfileInfo, SmartId(), aString1 ); + pRet->GenReturn( RET_ProfileInfo, 0, aString1 ); } else { // Normales Profiling je Kommando: profile if ( pProfiler->IsAutoProfiling() ) { - pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetAutoProfiling() ); + pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() ); pProfiler->StopAutoProfiling(); } pProfiler->StartProfilingPerCommand(); - // Der Header ist abhängig vom Modus - pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetProfileHeader() ); + // Der Header ist abh�ngig vom Modus + pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetProfileHeader() ); } } else // Profiling wieder ausschalten: Profile false @@ -2693,13 +2658,13 @@ BOOL StatementCommand::Execute() if ( pProfiler->IsAutoProfiling() ) { - pRet->GenReturn( RET_ProfileInfo, SmartId(), pProfiler->GetAutoProfiling() ); + pRet->GenReturn( RET_ProfileInfo, 0, pProfiler->GetAutoProfiling() ); pProfiler->StopAutoProfiling(); } if ( pProfiler->IsPartitioning() ) { - pRet->GenReturn( RET_ProfileInfo, SmartId( S_ProfileDump ), (comm_ULONG)0 ); + pRet->GenReturn( RET_ProfileInfo, S_ProfileDump, (comm_ULONG)0 ); pProfiler->StopPartitioning(); } @@ -2722,7 +2687,7 @@ BOOL StatementCommand::Execute() MenuBar *pMenuBar = NULL; Menu *pMenu; - USHORT nErr = GetCurrentMenues( pPopup, pMenuBar, pMenu ); + sal_uInt16 nErr = GetCurrentMenues( pPopup, pMenuBar, pMenu ); if ( !pMenu ) { @@ -2733,7 +2698,7 @@ BOOL StatementCommand::Execute() break; } - USHORT nItemCount = 0; + sal_uInt16 nItemCount = 0; switch ( nMethodId ) { case RC_MenuGetItemCount: @@ -2743,8 +2708,8 @@ BOOL StatementCommand::Execute() nItemCount = pMenu->GetItemCount(); if ( pMenu->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES ) { // jep, we have to adjust the count - BOOL bLastWasSeperator = TRUE; // TRUE for Separator at the top - for ( USHORT i = 0 ; i < pMenu->GetItemCount() ; i++ ) + sal_Bool bLastWasSeperator = sal_True; // sal_True for Separator at the top + for ( sal_uInt16 i = 0 ; i < pMenu->GetItemCount() ; i++ ) { if ( !pMenu->IsItemEnabled( pMenu->GetItemId( i ) ) ) nItemCount--; @@ -2763,7 +2728,7 @@ BOOL StatementCommand::Execute() } // for certain methods calculate the physical index (reinserting the hidden entries) - USHORT nPhysicalIndex = 0; + sal_uInt16 nPhysicalIndex = 0; switch ( nMethodId ) { case RC_MenuGetItemId: @@ -2772,9 +2737,9 @@ BOOL StatementCommand::Execute() nPhysicalIndex = nNr1; if ( pMenu->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES ) { // jep, we have to adjust the position - BOOL bLastWasSeperator = TRUE; // TRUE for Separator at the top - USHORT nVisibleCount = 0; - for ( USHORT i = 0 ; i < pMenu->GetItemCount() && nVisibleCount < nNr1 ; i++ ) + sal_Bool bLastWasSeperator = sal_True; // sal_True for Separator at the top + sal_uInt16 nVisibleCount = 0; + for ( sal_uInt16 i = 0 ; i < pMenu->GetItemCount() && nVisibleCount < nNr1 ; i++ ) { if ( pMenu->IsItemEnabled( pMenu->GetItemId( i ) ) && !( pMenu->GetItemType( i ) == MENUITEM_SEPARATOR && bLastWasSeperator ) ) @@ -2797,78 +2762,78 @@ BOOL StatementCommand::Execute() { case RC_MenuGetItemCount: { - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)nItemCount ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)nItemCount ); } break; case RC_MenuGetItemId: { - if ( ValueOK(aSmartMethodId, RcString( nMethodId ),nNr1,nItemCount) ) - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)pMenu->GetItemId(nPhysicalIndex-1) ); + if ( ValueOK( rtl::OString(), RcString( nMethodId ),nNr1,nItemCount) ) + pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)pMenu->GetItemId(nPhysicalIndex-1) ); } break; case RC_MenuGetItemPos: { - USHORT nLogicalPos = pMenu->GetItemPos(nNr1); + sal_uInt16 nLogicalPos = pMenu->GetItemPos(nNr1); if ( MENU_ITEM_NOTFOUND != nLogicalPos && pMenu->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES ) { // jep, we have to adjust the position if ( !pMenu->IsItemEnabled( nNr1 ) ) nLogicalPos = MENU_ITEM_NOTFOUND; else { - BOOL bLastWasSeperator = FALSE; + sal_Bool bLastWasSeperator = sal_False; for ( int i = nLogicalPos ; i >= 0 ; i-- ) { - if ( !pMenu->IsItemEnabled( pMenu->GetItemId( sal::static_int_cast< USHORT >(i) ) ) || - ( pMenu->GetItemType( sal::static_int_cast< USHORT >(i) ) == MENUITEM_SEPARATOR && bLastWasSeperator ) ) + if ( !pMenu->IsItemEnabled( pMenu->GetItemId( sal::static_int_cast< sal_uInt16 >(i) ) ) || + ( pMenu->GetItemType( sal::static_int_cast< sal_uInt16 >(i) ) == MENUITEM_SEPARATOR && bLastWasSeperator ) ) nLogicalPos--; - bLastWasSeperator = pMenu->GetItemType( sal::static_int_cast< USHORT >(i) ) == MENUITEM_SEPARATOR; + bLastWasSeperator = pMenu->GetItemType( sal::static_int_cast< sal_uInt16 >(i) ) == MENUITEM_SEPARATOR; } } } - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)(nLogicalPos+1) ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)(nLogicalPos+1) ); } break; case RC_MenuIsSeperator: { - if ( ValueOK(aSmartMethodId, RcString( nMethodId ),nNr1,nItemCount) ) - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)(pMenu->GetItemType(nPhysicalIndex-1) == MENUITEM_SEPARATOR) ); + if ( ValueOK( rtl::OString(), RcString( nMethodId ),nNr1,nItemCount) ) + pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)(pMenu->GetItemType(nPhysicalIndex-1) == MENUITEM_SEPARATOR) ); } break; case RC_MenuIsItemChecked: { - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)pMenu->IsItemChecked(nNr1) ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)pMenu->IsItemChecked(nNr1) ); } break; case RC_MenuIsItemEnabled: { - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_BOOL)pMenu->IsItemEnabled(nNr1) ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)pMenu->IsItemEnabled(nNr1) ); } break; case RC_MenuGetItemText: { - pRet->GenReturn ( RET_Value, aSmartMethodId, (String)pMenu->GetItemText(nNr1) ); + pRet->GenReturn ( RET_Value, nMethodId, (String)pMenu->GetItemText(nNr1) ); } break; case RC_MenuGetItemCommand: { - pRet->GenReturn ( RET_Value, aSmartMethodId, (String)pMenu->GetItemCommand(nNr1) ); + pRet->GenReturn ( RET_Value, nMethodId, (String)pMenu->GetItemCommand(nNr1) ); } break; case RC_MenuHasSubMenu: { - pRet->GenReturn ( RET_Value, aSmartMethodId, (BOOL)(pMenu->GetPopupMenu(nNr1) != NULL) ); + pRet->GenReturn ( RET_Value, nMethodId, (sal_Bool)(pMenu->GetPopupMenu(nNr1) != NULL) ); } break; case RC_MenuSelect: { if ( pMenu->GetPopupMenu(nNr1) ) { - if ( !aSubMenuId1.GetNum() ) - aSubMenuId1 = SmartId(nNr1); - else if ( !aSubMenuId2.GetNum() ) - aSubMenuId2 = SmartId(nNr1); - else if ( !aSubMenuId3.GetNum() ) - aSubMenuId3 = SmartId(nNr1); + if ( !aSubMenuId1 ) + aSubMenuId1 = nNr1; + else if ( !aSubMenuId2 ) + aSubMenuId2 = nNr1; + else if ( !aSubMenuId3 ) + aSubMenuId3 = nNr1; if ( pPopup ) pPopup->SelectEntry(nNr1); @@ -2880,17 +2845,17 @@ BOOL StatementCommand::Execute() if ( pPopup ) { pPopup->EndExecute(nNr1); - aSubMenuId1 = SmartId(); - aSubMenuId2 = SmartId(); - aSubMenuId3 = SmartId(); + aSubMenuId1 = 0; + aSubMenuId2 = 0; + aSubMenuId3 = 0; pMenuWindow = NULL; } else { pMenuBar->SelectEntry(nNr1); - aSubMenuId1 = SmartId(); - aSubMenuId2 = SmartId(); - aSubMenuId3 = SmartId(); + aSubMenuId1 = 0; + aSubMenuId2 = 0; + aSubMenuId3 = 0; pMenuWindow = NULL; } } @@ -2958,7 +2923,7 @@ BOOL StatementCommand::Execute() { String aPath; - USHORT nDirFlags = 0; + sal_uInt16 nDirFlags = 0; // from basic/source/inc/runtime.hxx #define Sb_ATTR_NORMAL 0x0000 #define Sb_ATTR_HIDDEN 0x0002 @@ -2981,27 +2946,20 @@ BOOL StatementCommand::Execute() } else { - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if ( (nParams & PARAM_USHORT_1) ) nDirFlags = nFlags = nNr1; else nDirFlags = nFlags = Sb_ATTR_HIDDEN | Sb_ATTR_SYSTEM | Sb_ATTR_DIRECTORY; // Nur diese Bitmaske ist unter Windows erlaubt - #ifdef WIN - if( nFlags & ~0x1E ) - { - nDirFlags = 0; - StarBASIC::Error( SbERR_BAD_ARGUMENT ); - } - #endif // Sb_ATTR_VOLUME wird getrennt gehandelt if( nDirFlags & Sb_ATTR_VOLUME ) aPath = aEntry.GetVolume(); else { // Die richtige Auswahl treffen - USHORT nMode = FSYS_KIND_FILE; + sal_uInt16 nMode = FSYS_KIND_FILE; if( nFlags & Sb_ATTR_DIRECTORY ) nMode |= FSYS_KIND_DIR; if( nFlags == Sb_ATTR_DIRECTORY ) @@ -3026,36 +2984,12 @@ BOOL StatementCommand::Execute() } DirEntry aNextEntry=(*(pDir))[nDirPos++]; aPath = aNextEntry.GetName(); - #ifdef WIN - aNextEntry.ToAbs(); - String sFull(aNextEntry.GetFull()); - unsigned nFlags; - - if (_dos_getfileattr( sFull.GetStr(), &nFlags )) - nErrorcode = FSYS_ERR_NOTEXISTS; - else - { - INT16 nCurFlags = nDirFlags; - if( (nCurFlags == Sb_ATTR_NORMAL) - && !(nFlags & ( _A_HIDDEN | _A_SYSTEM | _A_VOLID | _A_SUBDIR ) ) ) - break; - else if( (nCurFlags & Sb_ATTR_HIDDEN) && (nFlags & _A_HIDDEN) ) - break; - else if( (nCurFlags & Sb_ATTR_SYSTEM) && (nFlags & _A_SYSTEM) ) - break; - else if( (nCurFlags & Sb_ATTR_VOLUME) && (nFlags & _A_VOLID) ) - break; - else if( (nCurFlags & Sb_ATTR_DIRECTORY) && (nFlags & _A_SUBDIR) ) - break; - } - #else break; - #endif } } if ( !nErrorcode ) { - pRet->GenReturn ( RET_Value, aSmartMethodId, aPath ); + pRet->GenReturn ( RET_Value, nMethodId, aPath ); } } @@ -3067,7 +3001,7 @@ BOOL StatementCommand::Execute() if ( FSYS_ERR_OK == nErrorcode ) { FileStat aFS( aFile ); - pRet->GenReturn ( RET_Value, aSmartMethodId, static_cast<comm_ULONG>(aFS.GetSize()) ); //GetSize() ULONG != comm_ULONG on 64bit + pRet->GenReturn ( RET_Value, nMethodId, static_cast<comm_ULONG>(aFS.GetSize()) ); //GetSize() sal_uLong != comm_ULONG on 64bit nErrorcode = aFS.GetError(); } } @@ -3094,7 +3028,7 @@ BOOL StatementCommand::Execute() SbxValueRef xValue = new SbxValue( SbxDATE ); xValue->PutDate( fSerial ); - pRet->GenReturn ( RET_Value, aSmartMethodId, *xValue ); + pRet->GenReturn ( RET_Value, nMethodId, *xValue ); } } break; @@ -3205,7 +3139,7 @@ BOOL StatementCommand::Execute() ReportError( GEN_RES_STR1( S_POINTER_OUTSIDE_APPWIN, RcString( nMethodId ) ) ); aPointer = Pointer( POINTER_NULL ); } - pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)aPointer.GetStyle() ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_ULONG)aPointer.GetStyle() ); } break; case RC_UnpackStorage: @@ -3223,7 +3157,7 @@ BOOL StatementCommand::Execute( |